comparison lisp/cus-edit.el @ 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 16c6946eeb2e
children 4aa56c6b5ac5
comparison
equal deleted inserted replaced
99480:217f567126de 99481:54d148d6078b
4653 4653
4654 Entry to this mode calls the value of `Custom-mode-hook' 4654 Entry to this mode calls the value of `Custom-mode-hook'
4655 if that value is non-nil." 4655 if that value is non-nil."
4656 (use-local-map custom-mode-map) 4656 (use-local-map custom-mode-map)
4657 (easy-menu-add Custom-mode-menu) 4657 (easy-menu-add Custom-mode-menu)
4658 (when (display-graphic-p) 4658 (set (make-local-variable 'tool-bar-map)
4659 (set (make-local-variable 'tool-bar-map) 4659 (or custom-tool-bar-map
4660 (or custom-tool-bar-map 4660 ;; Set up `custom-tool-bar-map'.
4661 ;; Set up `custom-tool-bar-map'. 4661 (let ((map (make-sparse-keymap)))
4662 (let ((map (make-sparse-keymap))) 4662 (mapc
4663 (mapc 4663 (lambda (arg)
4664 (lambda (arg) 4664 (tool-bar-local-item-from-menu
4665 (tool-bar-local-item-from-menu 4665 (nth 1 arg) (nth 4 arg) map custom-mode-map))
4666 (nth 1 arg) (nth 4 arg) map custom-mode-map)) 4666 custom-commands)
4667 custom-commands) 4667 (setq custom-tool-bar-map map))))
4668 (setq custom-tool-bar-map map)))))
4669 (make-local-variable 'custom-options) 4668 (make-local-variable 'custom-options)
4670 (make-local-variable 'custom-local-buffer) 4669 (make-local-variable 'custom-local-buffer)
4671 (make-local-variable 'widget-documentation-face) 4670 (make-local-variable 'widget-documentation-face)
4672 (setq widget-documentation-face 'custom-documentation) 4671 (setq widget-documentation-face 'custom-documentation)
4673 (make-local-variable 'widget-button-face) 4672 (make-local-variable 'widget-button-face)