]> code.delx.au - gnu-emacs/commitdiff
Make sure tool-bar changes are reflected on display.
authorEli Zaretskii <eliz@gnu.org>
Thu, 1 Jan 2015 15:29:51 +0000 (17:29 +0200)
committerEli Zaretskii <eliz@gnu.org>
Thu, 1 Jan 2015 15:29:51 +0000 (17:29 +0200)
 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.

lisp/ChangeLog
lisp/tool-bar.el

index 74517345064ca2661032a081f17ff6db959ca945..135ee4749dcaf92755047a8a98a17d82e82dd6b4 100644 (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>
 
        Sync with Tramp 2.2.11.
index 6e5c8b7c44c2dfe87ce2307074af269332d3928f..6b732e9fb3f43d558b94d0fbc603e066629ea74e 100644 (file)
@@ -174,7 +174,8 @@ is less or equal to 256, then ICON.xpm, then ICON.pbm, and finally
 ICON.xbm, using `find-image'."
   (let* ((image-exp (tool-bar--image-expression icon)))
     (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
 (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)))
                 (setq rest (cdr 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.