[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r103825: Fix theme and X-resource int
From: |
Chong Yidong |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r103825: Fix theme and X-resource interactions for the cursor face. |
Date: |
Mon, 04 Apr 2011 21:21:52 -0400 |
User-agent: |
Bazaar (2.0.3) |
------------------------------------------------------------
revno: 103825
committer: Chong Yidong <address@hidden>
branch nick: trunk
timestamp: Mon 2011-04-04 21:21:52 -0400
message:
Fix theme and X-resource interactions for the cursor face.
* lisp/startup.el (command-line): Save the cursor's theme-face
directly, instead of using face-override-spec.
* lisp/custom.el (load-theme): Minor optimization in assigning faces.
modified:
lisp/ChangeLog
lisp/custom.el
lisp/startup.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2011-04-04 22:08:01 +0000
+++ b/lisp/ChangeLog 2011-04-05 01:21:52 +0000
@@ -1,3 +1,10 @@
+2011-04-05 Chong Yidong <address@hidden>
+
+ * startup.el (command-line): Save the cursor's theme-face
+ directly, instead of using face-override-spec.
+
+ * custom.el (load-theme): Minor optimization in assigning faces.
+
2011-04-04 Juanma Barranquero <address@hidden>
* help-fns.el (describe-variable): Complete all variables having
=== modified file 'lisp/custom.el'
--- a/lisp/custom.el 2011-03-31 04:24:03 +0000
+++ b/lisp/custom.el 2011-04-05 01:21:52 +0000
@@ -1151,6 +1151,20 @@
(custom-theme-load-confirm hash))
(let ((custom--inhibit-theme-enable t))
(eval-buffer))
+ ;; Optimization: if the theme changes the `default' face, put that
+ ;; entry first. This avoids some `frame-set-background-mode' rigmarole
+ ;; by assigning the new background immediately.
+ (let* ((settings (get theme 'theme-settings))
+ (tail settings)
+ found)
+ (while (and tail (not found))
+ (and (eq (nth 0 (car tail)) 'theme-face)
+ (eq (nth 1 (car tail)) 'default)
+ (setq found (car tail)))
+ (setq tail (cdr tail)))
+ (if found
+ (put theme 'theme-settings (cons found (delq found settings)))))
+ ;; Finally, enable the theme.
(unless no-enable
(enable-theme theme))
t))))
=== modified file 'lisp/startup.el'
--- a/lisp/startup.el 2011-03-30 03:27:56 +0000
+++ b/lisp/startup.el 2011-04-05 01:21:52 +0000
@@ -906,7 +906,8 @@
;; spec, but mark it as changed outside of Customize.
(let ((color (x-get-resource "cursorColor" "CursorColor")))
(when color
- (face-spec-set 'cursor `((t (:background ,color))))
+ (put 'cursor 'theme-face
+ `((changed ((t :background ,color)))))
(put 'cursor 'face-modified t)))))
(frame-initialize))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r103825: Fix theme and X-resource interactions for the cursor face.,
Chong Yidong <=