Commits

Peter Szilagyi committed 4fd9f78

Don't set frame-inherited-parameters, which seems to cause more
trouble than it fixes. Emacs 24, and apparently even Emacs 23, do a
pretty good job with the default nil.

Comments (0)

Files changed (1)

elisp/jane/jane-micro-features.el

   ;; Give frames and icons good names
   (setq-default frame-title-format (list "Emacs: %f"))
   (setq-default icon-title-format "Emacs - %b")
-  (setq frame-inherited-parameters '(font background-color foreground-color))
+  ;; When you run "(unset DISPLAY; emacs --daemon)", there is a nonce
+  ;; initial frame with bogus font and colors.
+  ;;
+  ;; In Emacs 24, according to mstanojevic, the default font and
+  ;; colors match your customizations even without this setting, and
+  ;; not setting frame-inherited-parameters avoids a warning.  We are
+  ;; upgrading to Emacs 24 to fix the Emacs-side bugs.  In the
+  ;; meantime, Emacs 23 does work well without this setting, for the
+  ;; common case where frames are manually created, at least.
+  '(when (string-match-p "GNU Emacs 23\." (emacs-version))
+     (setq frame-inherited-parameters '(font background-color foreground-color)))
   (set-custom-defaults
    ;; prefer side-by-side buffers
    '(split-height-threshold nil)))
 
-;; DOESN'T MATTER - FRAME-PARAMETER BEING A C FUNCTION IS SIGNIFICANT;
-;; ADVICE APPARENTLY NOT CALLED IN SOME IMPORTANT CASES.
-;;
-;; May need to (setq ad-return-value ...) rather than returning the
-;; result from the body of the advice.
-;;
-;; ;; When you run "emacs --daemon", there is an initial selected frame,
-;; ;; but it's a nonce, and in particular, its font is bogus.  The colors
-;; ;; are OK, though.
-;; (defadvice frame-parameter (around jane-micro-features.el activate)
-;;   "Don't propagate the bogus font from non-X frames."
-;;   (let ((val ad-do-it))
-;;     (print `((frame-parameter ,(ad-get-arg 0) ,(ad-get-arg 1)) => ,val))
-;;     (if (and (eq 'font (ad-get-arg 1))
-;;              (not (font-info val (ad-get-arg 0))))
-;;         nil
-;;       val)))
-
 
 
 ;; (Jane.global-keybindings)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.