diff options
| author | Martin Rudalics | 2008-01-06 09:49:16 +0000 |
|---|---|---|
| committer | Martin Rudalics | 2008-01-06 09:49:16 +0000 |
| commit | 2614ccc373ed188a240bf2c2f7e131ee99f110c0 (patch) | |
| tree | d36659cb359c01a10ff93f50addbb41176c4372c | |
| parent | df49d02eba46dd0b8f463c18c27da094efdf9ad7 (diff) | |
| download | emacs-2614ccc373ed188a240bf2c2f7e131ee99f110c0.tar.gz emacs-2614ccc373ed188a240bf2c2f7e131ee99f110c0.zip | |
(custom-tool-bar-map): Move initialization of this
keymap from here ...
(custom-mode): ... to here.
| -rw-r--r-- | lisp/ChangeLog | 6 | ||||
| -rw-r--r-- | lisp/cus-edit.el | 29 |
2 files changed, 24 insertions, 11 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 9665c6cd561..caa9c0f71f1 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2008-01-06 Martin Rudalics <rudalics@gmx.at> | ||
| 2 | |||
| 3 | * cus-edit.el (custom-tool-bar-map): Move initialization of this | ||
| 4 | keymap from here ... | ||
| 5 | (custom-mode): ... to here. Reported by Reiner Steib. | ||
| 6 | |||
| 1 | 2008-01-06 Dan Nicolaescu <dann@ics.uci.edu> | 7 | 2008-01-06 Dan Nicolaescu <dann@ics.uci.edu> |
| 2 | 8 | ||
| 3 | * obsolete/x-apollo.el: Remove file for unsupported system. | 9 | * obsolete/x-apollo.el: Remove file for unsupported system. |
diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el index b46981f137b..c1071f3b3ef 100644 --- a/lisp/cus-edit.el +++ b/lisp/cus-edit.el | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | ;;; cus-edit.el --- tools for customizing Emacs and Lisp packages | 1 | ;;; cus-edit.el --- tools for customizing Emacs and Lisp packages |
| 2 | ;; | 2 | ;; |
| 3 | ;; Copyright (C) 1996, 1997, 1999, 2000, 2001, 2002, 2003, 2004, | 3 | ;; Copyright (C) 1996, 1997, 1999, 2000, 2001, 2002, 2003, 2004, |
| 4 | ;; 2005, 2006, 2007 Free Software Foundation, Inc. | 4 | ;; 2005, 2006, 2007, 2008 Free Software Foundation, Inc. |
| 5 | ;; | 5 | ;; |
| 6 | ;; Author: Per Abrahamsen <abraham@dina.kvl.dk> | 6 | ;; Author: Per Abrahamsen <abraham@dina.kvl.dk> |
| 7 | ;; Maintainer: FSF | 7 | ;; Maintainer: FSF |
| @@ -4465,15 +4465,12 @@ The format is suitable for use with `easy-menu-define'." | |||
| 4465 | custom-commands))) | 4465 | custom-commands))) |
| 4466 | 4466 | ||
| 4467 | (defvar tool-bar-map) | 4467 | (defvar tool-bar-map) |
| 4468 | (defvar custom-tool-bar-map | 4468 | |
| 4469 | (if (display-graphic-p) | 4469 | ;;; `custom-tool-bar-map' used to be set up here. This will fail to |
| 4470 | (let ((map (make-sparse-keymap))) | 4470 | ;;; DTRT when `display-graphic-p' returns nil during compilation. Hence |
| 4471 | (mapc | 4471 | ;;; we set this up lazily in `custom-mode'. |
| 4472 | (lambda (arg) | 4472 | (defvar custom-tool-bar-map nil |
| 4473 | (tool-bar-local-item-from-menu | 4473 | "Keymap for toolbar in Custom mode.") |
| 4474 | (nth 1 arg) (nth 4 arg) map custom-mode-map)) | ||
| 4475 | custom-commands) | ||
| 4476 | map))) | ||
| 4477 | 4474 | ||
| 4478 | ;;; The Custom Mode. | 4475 | ;;; The Custom Mode. |
| 4479 | 4476 | ||
| @@ -4534,7 +4531,17 @@ Entry to this mode calls the value of `custom-mode-hook' | |||
| 4534 | if that value is non-nil." | 4531 | if that value is non-nil." |
| 4535 | (use-local-map custom-mode-map) | 4532 | (use-local-map custom-mode-map) |
| 4536 | (easy-menu-add Custom-mode-menu) | 4533 | (easy-menu-add Custom-mode-menu) |
| 4537 | (set (make-local-variable 'tool-bar-map) custom-tool-bar-map) | 4534 | (when (display-graphic-p) |
| 4535 | (set (make-local-variable 'tool-bar-map) | ||
| 4536 | (or custom-tool-bar-map | ||
| 4537 | ;; Set up `custom-tool-bar-map'. | ||
| 4538 | (let ((map (make-sparse-keymap))) | ||
| 4539 | (mapc | ||
| 4540 | (lambda (arg) | ||
| 4541 | (tool-bar-local-item-from-menu | ||
| 4542 | (nth 1 arg) (nth 4 arg) map custom-mode-map)) | ||
| 4543 | custom-commands) | ||
| 4544 | (setq custom-tool-bar-map map))))) | ||
| 4538 | (make-local-variable 'custom-options) | 4545 | (make-local-variable 'custom-options) |
| 4539 | (make-local-variable 'custom-local-buffer) | 4546 | (make-local-variable 'custom-local-buffer) |
| 4540 | (make-local-variable 'widget-documentation-face) | 4547 | (make-local-variable 'widget-documentation-face) |