# HG changeset patch # User Chong Yidong # Date 1226363290 0 # Node ID 54d148d6078ba6178f6191e03824d806e6faa490 # Parent 217f567126decfc82285a0a10cbf8d86e9d27c99 (Custom-mode): Set up tool-bar-map unconditionally. diff -r 217f567126de -r 54d148d6078b lisp/cus-edit.el --- 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)