Mercurial > emacs
changeset 99481:54d148d6078b
(Custom-mode): Set up tool-bar-map unconditionally.
author | Chong Yidong <cyd@stupidchicken.com> |
---|---|
date | Tue, 11 Nov 2008 00:28:10 +0000 |
parents | 217f567126de |
children | e228d5755549 |
files | lisp/cus-edit.el |
diffstat | 1 files changed, 10 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/cus-edit.el Tue Nov 11 00:25:28 2008 +0000 +++ b/lisp/cus-edit.el Tue Nov 11 00:28:10 2008 +0000 @@ -4655,17 +4655,16 @@ if that value is non-nil." (use-local-map custom-mode-map) (easy-menu-add Custom-mode-menu) - (when (display-graphic-p) - (set (make-local-variable 'tool-bar-map) - (or custom-tool-bar-map - ;; Set up `custom-tool-bar-map'. - (let ((map (make-sparse-keymap))) - (mapc - (lambda (arg) - (tool-bar-local-item-from-menu - (nth 1 arg) (nth 4 arg) map custom-mode-map)) - custom-commands) - (setq custom-tool-bar-map map))))) + (set (make-local-variable 'tool-bar-map) + (or custom-tool-bar-map + ;; Set up `custom-tool-bar-map'. + (let ((map (make-sparse-keymap))) + (mapc + (lambda (arg) + (tool-bar-local-item-from-menu + (nth 1 arg) (nth 4 arg) map custom-mode-map)) + custom-commands) + (setq custom-tool-bar-map map)))) (make-local-variable 'custom-options) (make-local-variable 'custom-local-buffer) (make-local-variable 'widget-documentation-face)