aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1994-03-13 00:36:01 +0000
committerRichard M. Stallman1994-03-13 00:36:01 +0000
commitb2cd1a6eb5a3248816436a4863482c41cf7e5f8f (patch)
tree60643439a30f80e1b0db1886e062a78112968160
parent6f1111aa5a115a02104d8b2a553714e184cc6eca (diff)
downloademacs-b2cd1a6eb5a3248816436a4863482c41cf7e5f8f.tar.gz
emacs-b2cd1a6eb5a3248816436a4863482c41cf7e5f8f.zip
Preload menu-bar.
Prescan the menu bar keymaps for keyboard equivalents.
-rw-r--r--lisp/loadup.el12
1 files changed, 12 insertions, 0 deletions
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 @@
56 (load "frame") 56 (load "frame")
57 (load "mouse") 57 (load "mouse")
58 (garbage-collect) 58 (garbage-collect)
59 (load "menu-bar")
59 (load "scroll-bar") 60 (load "scroll-bar")
60 (load "select"))) 61 (load "select")))
61(garbage-collect) 62(garbage-collect)
@@ -114,6 +115,17 @@
114;; We specify .el in case someone compiled version.el by mistake. 115;; We specify .el in case someone compiled version.el by mistake.
115(load "version.el") 116(load "version.el")
116 117
118;; Precompute the keyboard equivalents in the menu bar items.
119(if (fboundp 'x-popup-menu)
120 (let ((submap (lookup-key global-map [menu-bar])))
121 (while submap
122 (and (consp (car submap))
123 (symbolp (car (car submap)))
124 (stringp (car-safe (cdr (car submap))))
125 (keymapp (cdr (cdr (car submap))))
126 (x-popup-menu nil (cdr (cdr (car submap)))))
127 (setq submap (cdr submap)))))
128
117;If you want additional libraries to be preloaded and their 129;If you want additional libraries to be preloaded and their
118;doc strings kept in the DOC file rather than in core, 130;doc strings kept in the DOC file rather than in core,
119;you may load them with a "site-load.el" file. 131;you may load them with a "site-load.el" file.