diff options
| author | Matthias Dahl | 2014-04-05 10:44:56 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2014-04-05 10:44:56 +0300 |
| commit | f5e4494cd06f7624382f815585419f489bfe36c3 (patch) | |
| tree | b4891d0af45bc66e1dd58eba18f56568746142f3 | |
| parent | fdafd487a90fbd4febe853971f238c5395c12542 (diff) | |
| download | emacs-f5e4494cd06f7624382f815585419f489bfe36c3.tar.gz emacs-f5e4494cd06f7624382f815585419f489bfe36c3.zip | |
Fix bug #16434 with handling the -rv command-line option.
lisp/faces.el (make-face-x-resource-internal): Do nothing when
inhibit-x-resources is non-nil. Don't touch the default face if
reversed video is given--as was done in previous versions of Emacs.
(face-set-after-frame-default): Don't call
make-face-x-resource-internal here.
| -rw-r--r-- | lisp/ChangeLog | 6 | ||||
| -rw-r--r-- | lisp/faces.el | 22 |
2 files changed, 17 insertions, 11 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index bb283ab84df..71f3749a19c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -7,6 +7,12 @@ | |||
| 7 | value is returned if no matching attributes are found. | 7 | value is returned if no matching attributes are found. |
| 8 | (face-spec-recalc): Use the new optional argument when calling | 8 | (face-spec-recalc): Use the new optional argument when calling |
| 9 | face-spec-choose. (Bug#16378) | 9 | face-spec-choose. (Bug#16378) |
| 10 | (make-face-x-resource-internal): Do nothing when | ||
| 11 | inhibit-x-resources is non-nil. Don't touch the default face if | ||
| 12 | reversed video is given--as was done in previous versions of | ||
| 13 | Emacs. | ||
| 14 | (face-set-after-frame-default): Don't call | ||
| 15 | make-face-x-resource-internal here. (Bug#16434) | ||
| 10 | 16 | ||
| 11 | 2014-04-04 Tassilo Horn <tsdh@gnu.org> | 17 | 2014-04-04 Tassilo Horn <tsdh@gnu.org> |
| 12 | 18 | ||
diff --git a/lisp/faces.el b/lisp/faces.el index 1255d7c9ff7..e4d8a35ac68 100644 --- a/lisp/faces.el +++ b/lisp/faces.el | |||
| @@ -334,11 +334,16 @@ specifies an invalid attribute." | |||
| 334 | 334 | ||
| 335 | (defun make-face-x-resource-internal (face &optional frame) | 335 | (defun make-face-x-resource-internal (face &optional frame) |
| 336 | "Fill frame-local FACE on FRAME from X resources. | 336 | "Fill frame-local FACE on FRAME from X resources. |
| 337 | FRAME nil or not specified means do it for all frames." | 337 | FRAME nil or not specified means do it for all frames. |
| 338 | (if (null frame) | 338 | |
| 339 | (dolist (frame (frame-list)) | 339 | If `inhibit-x-resources' is non-nil, this function does nothing." |
| 340 | (set-face-attributes-from-resources face frame)) | 340 | (unless inhibit-x-resources |
| 341 | (set-face-attributes-from-resources face frame))) | 341 | (dolist (frame (if (null frame) (frame-list) (list frame))) |
| 342 | ;; `x-create-frame' already took care of correctly handling | ||
| 343 | ;; the reverse video case-- do _not_ touch the default face | ||
| 344 | (unless (and (eq face 'default) | ||
| 345 | (frame-parameter frame 'reverse)) | ||
| 346 | (set-face-attributes-from-resources face frame))))) | ||
| 342 | 347 | ||
| 343 | 348 | ||
| 344 | 349 | ||
| @@ -1641,8 +1646,7 @@ After the reset, the specs are applied from the following sources in this order: | |||
| 1641 | (while (get face 'face-alias) | 1646 | (while (get face 'face-alias) |
| 1642 | (setq face (get face 'face-alias))) | 1647 | (setq face (get face 'face-alias))) |
| 1643 | (face-spec-reset-face face frame) | 1648 | (face-spec-reset-face face frame) |
| 1644 | (unless inhibit-x-resources | 1649 | (make-face-x-resource-internal face frame) |
| 1645 | (make-face-x-resource-internal face frame)) | ||
| 1646 | ;; If FACE is customized or themed, set the custom spec from | 1650 | ;; If FACE is customized or themed, set the custom spec from |
| 1647 | ;; `theme-face' records. | 1651 | ;; `theme-face' records. |
| 1648 | (let ((theme-faces (get face 'theme-face)) | 1652 | (let ((theme-faces (get face 'theme-face)) |
| @@ -2045,10 +2049,6 @@ frame parameters in PARAMETERS." | |||
| 2045 | (progn | 2049 | (progn |
| 2046 | ;; Initialize faces from face spec and custom theme. | 2050 | ;; Initialize faces from face spec and custom theme. |
| 2047 | (face-spec-recalc face frame) | 2051 | (face-spec-recalc face frame) |
| 2048 | ;; X resources for the default face are applied during | ||
| 2049 | ;; `x-create-frame'. | ||
| 2050 | (and (not (eq face 'default)) window-system-p | ||
| 2051 | (make-face-x-resource-internal face frame)) | ||
| 2052 | ;; Apply attributes specified by face-new-frame-defaults | 2052 | ;; Apply attributes specified by face-new-frame-defaults |
| 2053 | (internal-merge-in-global-face face frame)) | 2053 | (internal-merge-in-global-face face frame)) |
| 2054 | ;; Don't let invalid specs prevent frame creation. | 2054 | ;; Don't let invalid specs prevent frame creation. |