]> code.delx.au - gnu-emacs/blobdiff - lisp/menu-bar.el
Customize.
[gnu-emacs] / lisp / menu-bar.el
index 9474e08a4b0ec8399936470564a32400f0fc332f..41bc628c895ef8c0927cb1017e6fccf3f5ccd59f 100644 (file)
 
 ;;; User options:
 
-(defvar buffers-menu-max-size 10
+(defcustom buffers-menu-max-size 10
   "*Maximum number of entries which may appear on the Buffers menu.
 If this is 10, then only the ten most-recently-selected buffers are shown.
 If this is nil, then all buffers are shown.
-A large number or nil slows down menu responsiveness.")
+A large number or nil slows down menu responsiveness."
+  :type '(choice integer
+                (const :tag "All" nil))
+  :group 'mouse)
 
 ;; Don't clobber an existing menu-bar keymap, to preserve any menu-bar key
 ;; definitions made in loaddefs.el.
@@ -316,6 +319,24 @@ Do the same for the keys of the same name."
   (define-key global-map [copy] 'clipboard-kill-ring-save)
   (define-key global-map [paste] 'clipboard-yank))
 \f
+
+;;; Menu support
+
+(defvar menu-bar-custom-menu (make-sparse-keymap "Customize"))
+
+(define-key menu-bar-custom-menu [custom-menu-update]
+  '("Update This Menu" . custom-menu-update))
+(define-key menu-bar-custom-menu [customize-apropos]
+  '("Apropos..." . customize-apropos))
+(define-key menu-bar-custom-menu [customize-group]
+  '("Specific Group..." . customize-group))
+(define-key menu-bar-custom-menu [customize-face]
+  '("Specific Face..." . customize-face))
+(define-key menu-bar-custom-menu [customize-variable]
+  '("Specific Variable..." . customize-variable))
+(define-key menu-bar-custom-menu [customize]
+  '("Browse Hierarchy of User Options" . customize))
+
 (define-key menu-bar-help-menu [emacs-version]
   '("Show Version" . emacs-version))
 (define-key menu-bar-help-menu [report-emacs-bug]
@@ -341,6 +362,8 @@ Do the same for the keys of the same name."
 (define-key menu-bar-help-menu [info] '("Browse Manuals" . info))
 (define-key menu-bar-help-menu [emacs-faq] '("Emacs FAQ" . view-emacs-FAQ))
 (define-key menu-bar-help-menu [emacs-news] '("Emacs News" . view-emacs-news))
+(define-key menu-bar-help-menu [customize-menu]
+  (cons "Customize" menu-bar-custom-menu))
 
 (defun kill-this-buffer ()     ; for the menubar
   "Kills the current buffer."
@@ -402,8 +425,10 @@ Do the same for the keys of the same name."
                    pending-undo-list)
             buffer-undo-list)))
 
-(defvar yank-menu-length 20
-  "*Maximum length to display in the yank-menu.")
+(defcustom yank-menu-length 20
+  "*Maximum length to display in the yank-menu."
+  :type 'integer
+  :group 'mouse)
 
 (defun menu-bar-update-yank-menu (string old)
   (let ((front (car (cdr yank-menu)))