mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2025-02-01 20:06:00 +00:00
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.
This commit is contained in:
parent
c7db4c06c4
commit
881329dcf7
@ -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
|
||||
|
@ -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)))
|
||||
|
||||
|
||||
;; ----------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user