Mercurial > emacs
comparison lisp/menu-bar.el @ 17665:b11021ca3525
Use defcustom.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Mon, 05 May 1997 15:06:25 +0000 |
parents | 32f90c43d1d2 |
children | a30300999b49 |
comparison
equal
deleted
inserted
replaced
17664:d8cb277f0ce8 | 17665:b11021ca3525 |
---|---|
26 | 26 |
27 ;;; Code: | 27 ;;; Code: |
28 | 28 |
29 ;;; User options: | 29 ;;; User options: |
30 | 30 |
31 (defvar buffers-menu-max-size 10 | 31 (defcustom buffers-menu-max-size 10 |
32 "*Maximum number of entries which may appear on the Buffers menu. | 32 "*Maximum number of entries which may appear on the Buffers menu. |
33 If this is 10, then only the ten most-recently-selected buffers are shown. | 33 If this is 10, then only the ten most-recently-selected buffers are shown. |
34 If this is nil, then all buffers are shown. | 34 If this is nil, then all buffers are shown. |
35 A large number or nil slows down menu responsiveness.") | 35 A large number or nil slows down menu responsiveness." |
36 :type '(choice integer | |
37 (const :tag "All" nil)) | |
38 :group 'mouse) | |
36 | 39 |
37 ;; Don't clobber an existing menu-bar keymap, to preserve any menu-bar key | 40 ;; Don't clobber an existing menu-bar keymap, to preserve any menu-bar key |
38 ;; definitions made in loaddefs.el. | 41 ;; definitions made in loaddefs.el. |
39 (or (lookup-key global-map [menu-bar]) | 42 (or (lookup-key global-map [menu-bar]) |
40 (define-key global-map [menu-bar] (make-sparse-keymap "menu-bar"))) | 43 (define-key global-map [menu-bar] (make-sparse-keymap "menu-bar"))) |
420 (if (eq last-command 'undo) | 423 (if (eq last-command 'undo) |
421 (and (boundp 'pending-undo-list) | 424 (and (boundp 'pending-undo-list) |
422 pending-undo-list) | 425 pending-undo-list) |
423 buffer-undo-list))) | 426 buffer-undo-list))) |
424 | 427 |
425 (defvar yank-menu-length 20 | 428 (defcustom yank-menu-length 20 |
426 "*Maximum length to display in the yank-menu.") | 429 "*Maximum length to display in the yank-menu." |
430 :type 'integer | |
431 :group 'mouse) | |
427 | 432 |
428 (defun menu-bar-update-yank-menu (string old) | 433 (defun menu-bar-update-yank-menu (string old) |
429 (let ((front (car (cdr yank-menu))) | 434 (let ((front (car (cdr yank-menu))) |
430 (menu-string (if (<= (length string) yank-menu-length) | 435 (menu-string (if (<= (length string) yank-menu-length) |
431 string | 436 string |