From: Richard M. Stallman Date: Sun, 13 Mar 1994 00:36:01 +0000 (+0000) Subject: Preload menu-bar. X-Git-Tag: emacs-19.34~9534 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b2cd1a6eb5a3248816436a4863482c41cf7e5f8f;p=emacs.git Preload menu-bar. Prescan the menu bar keymaps for keyboard equivalents. --- diff --git a/lisp/loadup.el b/lisp/loadup.el index 6cf138cd794..1f5063e0480 100644 --- a/lisp/loadup.el +++ b/lisp/loadup.el @@ -56,6 +56,7 @@ (load "frame") (load "mouse") (garbage-collect) + (load "menu-bar") (load "scroll-bar") (load "select"))) (garbage-collect) @@ -114,6 +115,17 @@ ;; We specify .el in case someone compiled version.el by mistake. (load "version.el") +;; Precompute the keyboard equivalents in the menu bar items. +(if (fboundp 'x-popup-menu) + (let ((submap (lookup-key global-map [menu-bar]))) + (while submap + (and (consp (car submap)) + (symbolp (car (car submap))) + (stringp (car-safe (cdr (car submap)))) + (keymapp (cdr (cdr (car submap)))) + (x-popup-menu nil (cdr (cdr (car submap))))) + (setq submap (cdr submap))))) + ;If you want additional libraries to be preloaded and their ;doc strings kept in the DOC file rather than in core, ;you may load them with a "site-load.el" file.