summaryrefslogtreecommitdiff
path: root/lisp/menu-bar.el
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1995-07-21 08:30:54 +0000
committerRichard M. Stallman <rms@gnu.org>1995-07-21 08:30:54 +0000
commit789ecf1e4905ade93703002710760f5f9c13abcb (patch)
tree055a5b2d867633aebcb72ecde051d0cfd38db519 /lisp/menu-bar.el
parent14c4f6210a69aab5ad2b84c185ada41b1a563b6f (diff)
downloademacs-789ecf1e4905ade93703002710760f5f9c13abcb.tar.gz
(menu-bar-buffer-menu): Function deleted.
(global-map): Define [menu-bar buffer] as a keymap with no fcn name. (menu-bar-update-buffers): After defining it, call it.
Diffstat (limited to 'lisp/menu-bar.el')
-rw-r--r--lisp/menu-bar.el9
1 files changed, 6 insertions, 3 deletions
diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el
index 445732b95f6..546def41216 100644
--- a/lisp/menu-bar.el
+++ b/lisp/menu-bar.el
@@ -421,9 +421,10 @@ Do the same for the keys of the same name."
(push-mark (point))
(insert last-command-event))
-(define-key global-map [menu-bar buffer] '("Buffers" . menu-bar-buffers))
-
-(defalias 'menu-bar-buffers (make-sparse-keymap "Buffers"))
+;; This definition is just to show what this looks like.
+;; It gets overridden below when menu-bar-update-buffers is called.
+(define-key global-map [menu-bar buffer]
+ (cons "Buffers" (make-sparse-keymap "Buffers")))
(defvar buffers-menu-max-size 10
"*Maximum number of entries which may appear on the Buffers menu.
@@ -585,6 +586,8 @@ A large number or nil slows down menu responsiveness.")
(add-hook 'menu-bar-update-hook 'menu-bar-update-buffers)
+(menu-bar-update-buffers)
+
;; this version is too slow
;;;(defun format-buffers-menu-line (buffer)
;;; "Returns a string to represent the given buffer in the Buffer menu.