diff options
| author | Eli Zaretskii | 2015-01-01 17:29:51 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2015-01-01 17:29:51 +0200 |
| commit | 5a9710f6e6f568ac00bd21dcb5c2af48469debbe (patch) | |
| tree | c940e3140d838ec9450f3753bea779142c77b9a3 | |
| parent | 93796baeee0707c77959ffad8f6c46e26c23bbbf (diff) | |
| download | emacs-5a9710f6e6f568ac00bd21dcb5c2af48469debbe.tar.gz emacs-5a9710f6e6f568ac00bd21dcb5c2af48469debbe.zip | |
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.
| -rw-r--r-- | lisp/ChangeLog | 6 | ||||
| -rw-r--r-- | lisp/tool-bar.el | 6 |
2 files changed, 10 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 74517345064..135ee4749dc 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2015-01-01 Eli Zaretskii <eliz@gnu.org> | ||
| 2 | |||
| 3 | * tool-bar.el (tool-bar-local-item) | ||
| 4 | (tool-bar-local-item-from-menu): Call force-mode-line-update to | ||
| 5 | make sure the tool-bar changes show on display. | ||
| 6 | |||
| 1 | 2014-12-29 Michael Albinus <michael.albinus@gmx.de> | 7 | 2014-12-29 Michael Albinus <michael.albinus@gmx.de> |
| 2 | 8 | ||
| 3 | Sync with Tramp 2.2.11. | 9 | Sync with Tramp 2.2.11. |
diff --git a/lisp/tool-bar.el b/lisp/tool-bar.el index 6e5c8b7c44c..6b732e9fb3f 100644 --- a/lisp/tool-bar.el +++ b/lisp/tool-bar.el | |||
| @@ -174,7 +174,8 @@ is less or equal to 256, then ICON.xpm, then ICON.pbm, and finally | |||
| 174 | ICON.xbm, using `find-image'." | 174 | ICON.xbm, using `find-image'." |
| 175 | (let* ((image-exp (tool-bar--image-expression icon))) | 175 | (let* ((image-exp (tool-bar--image-expression icon))) |
| 176 | (define-key-after map (vector key) | 176 | (define-key-after map (vector key) |
| 177 | `(menu-item ,(symbol-name key) ,def :image ,image-exp ,@props)))) | 177 | `(menu-item ,(symbol-name key) ,def :image ,image-exp ,@props)) |
| 178 | (force-mode-line-update))) | ||
| 178 | 179 | ||
| 179 | ;;;###autoload | 180 | ;;;###autoload |
| 180 | (defun tool-bar-add-item-from-menu (command icon &optional map &rest props) | 181 | (defun tool-bar-add-item-from-menu (command icon &optional map &rest props) |
| @@ -239,7 +240,8 @@ holds a keymap." | |||
| 239 | (if (and (consp rest) (consp (car rest))) | 240 | (if (and (consp rest) (consp (car rest))) |
| 240 | (setq rest (cdr rest))) | 241 | (setq rest (cdr rest))) |
| 241 | (append `(menu-item ,(car defn) ,rest) | 242 | (append `(menu-item ,(car defn) ,rest) |
| 242 | (list :image image-exp) props))))))) | 243 | (list :image image-exp) props)))) |
| 244 | (force-mode-line-update)))) | ||
| 243 | 245 | ||
| 244 | ;;; Set up some global items. Additions/deletions up for grabs. | 246 | ;;; Set up some global items. Additions/deletions up for grabs. |
| 245 | 247 | ||