Make sure tool-bar changes are reflected on display.

lisp/tool-bar.el (tool-bar-local-item)
 (tool-bar-local-item-from-menu): Call force-mode-line-update to
 make sure the tool-bar changes show on display.
This commit is contained in:
Eli Zaretskii 2015-01-01 17:29:51 +02:00
parent 93796baeee
commit 5a9710f6e6
2 changed files with 10 additions and 2 deletions

View file

@ -1,3 +1,9 @@
2015-01-01 Eli Zaretskii <eliz@gnu.org>
* tool-bar.el (tool-bar-local-item)
(tool-bar-local-item-from-menu): Call force-mode-line-update to
make sure the tool-bar changes show on display.
2014-12-29 Michael Albinus <michael.albinus@gmx.de> 2014-12-29 Michael Albinus <michael.albinus@gmx.de>
Sync with Tramp 2.2.11. Sync with Tramp 2.2.11.

View file

@ -174,7 +174,8 @@ is less or equal to 256, then ICON.xpm, then ICON.pbm, and finally
ICON.xbm, using `find-image'." ICON.xbm, using `find-image'."
(let* ((image-exp (tool-bar--image-expression icon))) (let* ((image-exp (tool-bar--image-expression icon)))
(define-key-after map (vector key) (define-key-after map (vector key)
`(menu-item ,(symbol-name key) ,def :image ,image-exp ,@props)))) `(menu-item ,(symbol-name key) ,def :image ,image-exp ,@props))
(force-mode-line-update)))
;;;###autoload ;;;###autoload
(defun tool-bar-add-item-from-menu (command icon &optional map &rest props) (defun tool-bar-add-item-from-menu (command icon &optional map &rest props)
@ -239,7 +240,8 @@ holds a keymap."
(if (and (consp rest) (consp (car rest))) (if (and (consp rest) (consp (car rest)))
(setq rest (cdr rest))) (setq rest (cdr rest)))
(append `(menu-item ,(car defn) ,rest) (append `(menu-item ,(car defn) ,rest)
(list :image image-exp) props))))))) (list :image image-exp) props))))
(force-mode-line-update))))
;;; Set up some global items. Additions/deletions up for grabs. ;;; Set up some global items. Additions/deletions up for grabs.