From: Chong Yidong Date: Tue, 11 Nov 2008 00:28:10 +0000 (+0000) Subject: (Custom-mode): Set up tool-bar-map unconditionally. X-Git-Tag: emacs-pretest-23.0.90~1894 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=8db5a4fe51703a8b5ad73ac7df609b462d975f82;p=emacs.git (Custom-mode): Set up tool-bar-map unconditionally. --- diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el index 40d1e2ffdfb..3f2dcd20ccc 100644 --- a/lisp/cus-edit.el +++ b/lisp/cus-edit.el @@ -4655,17 +4655,16 @@ Entry to this mode calls the value of `Custom-mode-hook' 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)