summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2014-02-10 18:08:37 +0200
committerEli Zaretskii <eliz@gnu.org>2014-02-10 18:08:37 +0200
commit881329dcf739c835479ff188ce2937679ce987d7 (patch)
tree7a73ce58c3d9e598af92a2a75949de65eb1dd76a
parentc7db4c06c43c1caf7b51efb82ca7e7bad4fb9661 (diff)
Fix bug #16709 with too lazy redisplay when face-remap-alist changes.
lisp/face-remap.el (face-remap-add-relative) (face-remap-remove-relative, face-remap-reset-base) (face-remap-set-base): Call force-mode-line-update to redisplay the current buffer due to potential change in faces.
-rw-r--r--lisp/ChangeLog7
-rw-r--r--lisp/face-remap.el16
2 files changed, 19 insertions, 4 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index d67d626f13..6395bb1aa2 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,10 @@
+2014-02-10 Eli Zaretskii <eliz@gnu.org>
+
+ * face-remap.el (face-remap-add-relative)
+ (face-remap-remove-relative, face-remap-reset-base)
+ (face-remap-set-base): Call force-mode-line-update to redisplay
+ the current buffer due to potential change in faces. (Bug#16709)
+
2014-02-10 Michael Albinus <michael.albinus@gmx.de>
* net/tramp-sh.el (tramp-sh-handle-vc-registered): Apply heredoc
diff --git a/lisp/face-remap.el b/lisp/face-remap.el
index 0326643453..f1af4ec667 100644
--- a/lisp/face-remap.el
+++ b/lisp/face-remap.el
@@ -135,7 +135,9 @@ other than the normal definition of FACE via `face-remap-set-base'."
(let ((faces (cdr entry)))
(if (symbolp faces)
(setq faces (list faces)))
- (setcdr entry (face-remap-order (cons specs faces))))
+ (setcdr entry (face-remap-order (cons specs faces)))
+ ;; Force redisplay of this buffer.
+ (force-mode-line-update))
(cons face specs)))
(defun face-remap-remove-relative (cookie)
@@ -150,7 +152,9 @@ COOKIE should be the return value from that function."
(and (eq (car-safe updated-entries) (car cookie))
(null (cdr updated-entries))))
(setq face-remapping-alist
- (remq remapping face-remapping-alist)))
+ (remq remapping face-remapping-alist))
+ ;; Force redisplay of this buffer.
+ (force-mode-line-update))
(cdr cookie))))))
;;;###autoload
@@ -167,7 +171,9 @@ to apply on top of the normal definition of FACE."
(if (null (cddr entry)) ; nothing except base remapping
(setq face-remapping-alist ; so remove entire entry
(remq entry face-remapping-alist))
- (setcar (last entry) face))))) ; otherwise, just inherit global def
+ (setcar (last entry) face))
+ ;; Force redisplay of this buffer.
+ (force-mode-line-update)))) ; otherwise, just inherit global def
;;;###autoload
(defun face-remap-set-base (face &rest specs)
@@ -194,7 +200,9 @@ not to inherit from the global definition of FACE at all."
(let ((entry (assq face face-remapping-alist)))
(if entry
(setcar (last entry) specs) ; overwrite existing base entry
- (push (list face specs) face-remapping-alist)))))
+ (push (list face specs) face-remapping-alist)))
+ ;; Force redisplay of this buffer.
+ (force-mode-line-update)))
;; ----------------------------------------------------------------