Mercurial > emacs
comparison lisp/menu-bar.el @ 105050:f519ea72decd
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
author | Dan Nicolaescu <dann@ics.uci.edu> |
---|---|
date | Thu, 17 Sep 2009 05:30:17 +0000 |
parents | 68150c643e2e |
children | 27669cf921ef |
comparison
equal
deleted
inserted
replaced
105049:4b7d5275d592 | 105050:f519ea72decd |
---|---|
62 (defvar uniquify-buffer-name-style) | 62 (defvar uniquify-buffer-name-style) |
63 | 63 |
64 | 64 |
65 ;; The "File" menu items | 65 ;; The "File" menu items |
66 (define-key menu-bar-file-menu [exit-emacs] | 66 (define-key menu-bar-file-menu [exit-emacs] |
67 '(menu-item "Quit" save-buffers-kill-terminal | 67 `(menu-item ,(purecopy "Quit") save-buffers-kill-terminal |
68 :help "Save unsaved buffers, then exit")) | 68 :help ,(purecopy "Save unsaved buffers, then exit"))) |
69 | 69 |
70 (define-key menu-bar-file-menu [separator-exit] | 70 (define-key menu-bar-file-menu [separator-exit] |
71 '("--")) | 71 (purecopy "--")) |
72 | 72 |
73 ;; Don't use delete-frame as event name because that is a special | 73 ;; Don't use delete-frame as event name because that is a special |
74 ;; event. | 74 ;; event. |
75 (define-key menu-bar-file-menu [delete-this-frame] | 75 (define-key menu-bar-file-menu [delete-this-frame] |
76 '(menu-item "Delete Frame" delete-frame | 76 `(menu-item ,(purecopy "Delete Frame") delete-frame |
77 :visible (fboundp 'delete-frame) | 77 :visible (fboundp 'delete-frame) |
78 :enable (delete-frame-enabled-p) | 78 :enable (delete-frame-enabled-p) |
79 :help "Delete currently selected frame")) | 79 :help ,(purecopy "Delete currently selected frame"))) |
80 (define-key menu-bar-file-menu [make-frame-on-display] | 80 (define-key menu-bar-file-menu [make-frame-on-display] |
81 '(menu-item "New Frame on Display..." make-frame-on-display | 81 `(menu-item ,(purecopy "New Frame on Display...") make-frame-on-display |
82 :visible (fboundp 'make-frame-on-display) | 82 :visible (fboundp 'make-frame-on-display) |
83 :help "Open a new frame on another display")) | 83 :help ,(purecopy "Open a new frame on another display"))) |
84 (define-key menu-bar-file-menu [make-frame] | 84 (define-key menu-bar-file-menu [make-frame] |
85 '(menu-item "New Frame" make-frame-command | 85 `(menu-item ,(purecopy "New Frame") make-frame-command |
86 :visible (fboundp 'make-frame-command) | 86 :visible (fboundp 'make-frame-command) |
87 :help "Open a new frame")) | 87 :help ,(purecopy "Open a new frame"))) |
88 | 88 |
89 (define-key menu-bar-file-menu [one-window] | 89 (define-key menu-bar-file-menu [one-window] |
90 '(menu-item "Remove Splits" delete-other-windows | 90 `(menu-item ,(purecopy "Remove Splits") delete-other-windows |
91 :enable (not (one-window-p t nil)) | 91 :enable (not (one-window-p t nil)) |
92 :help "Selected window grows to fill the whole frame")) | 92 :help ,(purecopy "Selected window grows to fill the whole frame"))) |
93 | 93 |
94 (define-key menu-bar-file-menu [split-window] | 94 (define-key menu-bar-file-menu [split-window] |
95 '(menu-item "Split Window" split-window-vertically | 95 `(menu-item ,(purecopy "Split Window") split-window-vertically |
96 :enable (and (menu-bar-menu-frame-live-and-visible-p) | 96 :enable (and (menu-bar-menu-frame-live-and-visible-p) |
97 (menu-bar-non-minibuffer-window-p)) | 97 (menu-bar-non-minibuffer-window-p)) |
98 :help "Split selected window in two windows")) | 98 :help ,(purecopy "Split selected window in two windows"))) |
99 | 99 |
100 (define-key menu-bar-file-menu [separator-window] | 100 (define-key menu-bar-file-menu [separator-window] |
101 '(menu-item "--")) | 101 `(menu-item ,(purecopy "--"))) |
102 | 102 |
103 (define-key menu-bar-file-menu [ps-print-region] | 103 (define-key menu-bar-file-menu [ps-print-region] |
104 '(menu-item "Postscript Print Region (B+W)" ps-print-region | 104 `(menu-item ,(purecopy "Postscript Print Region (B+W)") ps-print-region |
105 :enable mark-active | 105 :enable mark-active |
106 :help "Pretty-print marked region in black and white to PostScript printer")) | 106 :help ,(purecopy "Pretty-print marked region in black and white to PostScript printer"))) |
107 (define-key menu-bar-file-menu [ps-print-buffer] | 107 (define-key menu-bar-file-menu [ps-print-buffer] |
108 '(menu-item "Postscript Print Buffer (B+W)" ps-print-buffer | 108 `(menu-item ,(purecopy "Postscript Print Buffer (B+W)") ps-print-buffer |
109 :enable (menu-bar-menu-frame-live-and-visible-p) | 109 :enable (menu-bar-menu-frame-live-and-visible-p) |
110 :help "Pretty-print current buffer in black and white to PostScript printer")) | 110 :help ,(purecopy "Pretty-print current buffer in black and white to PostScript printer"))) |
111 (define-key menu-bar-file-menu [ps-print-region-faces] | 111 (define-key menu-bar-file-menu [ps-print-region-faces] |
112 '(menu-item "Postscript Print Region" ps-print-region-with-faces | 112 `(menu-item ,(purecopy "Postscript Print Region") ps-print-region-with-faces |
113 :enable mark-active | 113 :enable mark-active |
114 :help "Pretty-print marked region to PostScript printer")) | 114 :help ,(purecopy "Pretty-print marked region to PostScript printer"))) |
115 (define-key menu-bar-file-menu [ps-print-buffer-faces] | 115 (define-key menu-bar-file-menu [ps-print-buffer-faces] |
116 '(menu-item "Postscript Print Buffer" ps-print-buffer-with-faces | 116 `(menu-item ,(purecopy "Postscript Print Buffer") ps-print-buffer-with-faces |
117 :enable (menu-bar-menu-frame-live-and-visible-p) | 117 :enable (menu-bar-menu-frame-live-and-visible-p) |
118 :help "Pretty-print current buffer to PostScript printer")) | 118 :help ,(purecopy "Pretty-print current buffer to PostScript printer"))) |
119 (define-key menu-bar-file-menu [print-region] | 119 (define-key menu-bar-file-menu [print-region] |
120 '(menu-item "Print Region" print-region | 120 `(menu-item ,(purecopy "Print Region") print-region |
121 :enable mark-active | 121 :enable mark-active |
122 :help "Print region between mark and current position")) | 122 :help ,(purecopy "Print region between mark and current position"))) |
123 (define-key menu-bar-file-menu [print-buffer] | 123 (define-key menu-bar-file-menu [print-buffer] |
124 '(menu-item "Print Buffer" print-buffer | 124 `(menu-item ,(purecopy "Print Buffer") print-buffer |
125 :enable (menu-bar-menu-frame-live-and-visible-p) | 125 :enable (menu-bar-menu-frame-live-and-visible-p) |
126 :help "Print current buffer with page headings")) | 126 :help ,(purecopy "Print current buffer with page headings"))) |
127 | 127 |
128 (define-key menu-bar-file-menu [separator-print] | 128 (define-key menu-bar-file-menu [separator-print] |
129 '(menu-item "--")) | 129 `(menu-item ,(purecopy "--"))) |
130 | 130 |
131 (define-key menu-bar-file-menu [recover-session] | 131 (define-key menu-bar-file-menu [recover-session] |
132 '(menu-item "Recover Crashed Session" recover-session | 132 `(menu-item ,(purecopy "Recover Crashed Session") recover-session |
133 :enable (and auto-save-list-file-prefix | 133 :enable (and auto-save-list-file-prefix |
134 (file-directory-p | 134 (file-directory-p |
135 (file-name-directory auto-save-list-file-prefix)) | 135 (file-name-directory auto-save-list-file-prefix)) |
136 (directory-files | 136 (directory-files |
137 (file-name-directory auto-save-list-file-prefix) | 137 (file-name-directory auto-save-list-file-prefix) |
139 (concat "\\`" | 139 (concat "\\`" |
140 (regexp-quote | 140 (regexp-quote |
141 (file-name-nondirectory | 141 (file-name-nondirectory |
142 auto-save-list-file-prefix))) | 142 auto-save-list-file-prefix))) |
143 t)) | 143 t)) |
144 :help "Recover edits from a crashed session")) | 144 :help ,(purecopy "Recover edits from a crashed session"))) |
145 (define-key menu-bar-file-menu [revert-buffer] | 145 (define-key menu-bar-file-menu [revert-buffer] |
146 '(menu-item "Revert Buffer" revert-buffer | 146 `(menu-item ,(purecopy "Revert Buffer") revert-buffer |
147 :enable (or revert-buffer-function | 147 :enable (or revert-buffer-function |
148 revert-buffer-insert-file-contents-function | 148 revert-buffer-insert-file-contents-function |
149 (and buffer-file-number | 149 (and buffer-file-number |
150 (or (buffer-modified-p) | 150 (or (buffer-modified-p) |
151 (not (verify-visited-file-modtime | 151 (not (verify-visited-file-modtime |
152 (current-buffer)))))) | 152 (current-buffer)))))) |
153 :help "Re-read current buffer from its file")) | 153 :help ,(purecopy "Re-read current buffer from its file"))) |
154 (define-key menu-bar-file-menu [write-file] | 154 (define-key menu-bar-file-menu [write-file] |
155 '(menu-item "Save As..." write-file | 155 `(menu-item ,(purecopy "Save As...") write-file |
156 :enable (and (menu-bar-menu-frame-live-and-visible-p) | 156 :enable (and (menu-bar-menu-frame-live-and-visible-p) |
157 (menu-bar-non-minibuffer-window-p)) | 157 (menu-bar-non-minibuffer-window-p)) |
158 :help "Write current buffer to another file")) | 158 :help ,(purecopy "Write current buffer to another file"))) |
159 (define-key menu-bar-file-menu [save-buffer] | 159 (define-key menu-bar-file-menu [save-buffer] |
160 '(menu-item "Save" save-buffer | 160 `(menu-item ,(purecopy "Save") save-buffer |
161 :enable (and (buffer-modified-p) | 161 :enable (and (buffer-modified-p) |
162 (buffer-file-name) | 162 (buffer-file-name) |
163 (menu-bar-non-minibuffer-window-p)) | 163 (menu-bar-non-minibuffer-window-p)) |
164 :help "Save current buffer to its file")) | 164 :help ,(purecopy "Save current buffer to its file"))) |
165 | 165 |
166 (define-key menu-bar-file-menu [separator-save] | 166 (define-key menu-bar-file-menu [separator-save] |
167 '(menu-item "--")) | 167 `(menu-item ,(purecopy "--"))) |
168 | 168 |
169 (defun menu-find-file-existing () | 169 (defun menu-find-file-existing () |
170 "Edit the existing file FILENAME." | 170 "Edit the existing file FILENAME." |
171 (interactive) | 171 (interactive) |
172 (let* ((mustmatch (not (and (fboundp 'x-uses-old-gtk-dialog) | 172 (let* ((mustmatch (not (and (fboundp 'x-uses-old-gtk-dialog) |
176 (find-file-existing filename) | 176 (find-file-existing filename) |
177 (find-file filename)))) | 177 (find-file filename)))) |
178 | 178 |
179 | 179 |
180 (define-key menu-bar-file-menu [kill-buffer] | 180 (define-key menu-bar-file-menu [kill-buffer] |
181 '(menu-item "Close" kill-this-buffer | 181 `(menu-item ,(purecopy "Close") kill-this-buffer |
182 :enable (kill-this-buffer-enabled-p) | 182 :enable (kill-this-buffer-enabled-p) |
183 :help "Discard (kill) current buffer")) | 183 :help ,(purecopy "Discard (kill) current buffer"))) |
184 (define-key menu-bar-file-menu [insert-file] | 184 (define-key menu-bar-file-menu [insert-file] |
185 '(menu-item "Insert File..." insert-file | 185 `(menu-item ,(purecopy "Insert File...") insert-file |
186 :enable (menu-bar-non-minibuffer-window-p) | 186 :enable (menu-bar-non-minibuffer-window-p) |
187 :help "Insert another file into current buffer")) | 187 :help ,(purecopy "Insert another file into current buffer"))) |
188 (define-key menu-bar-file-menu [dired] | 188 (define-key menu-bar-file-menu [dired] |
189 '(menu-item "Open Directory..." dired | 189 `(menu-item ,(purecopy "Open Directory...") dired |
190 :enable (menu-bar-non-minibuffer-window-p) | 190 :enable (menu-bar-non-minibuffer-window-p) |
191 :help "Read a directory, to operate on its files")) | 191 :help ,(purecopy "Read a directory, to operate on its files"))) |
192 (define-key menu-bar-file-menu [open-file] | 192 (define-key menu-bar-file-menu [open-file] |
193 '(menu-item "Open File..." menu-find-file-existing | 193 `(menu-item ,(purecopy "Open File...") menu-find-file-existing |
194 :enable (menu-bar-non-minibuffer-window-p) | 194 :enable (menu-bar-non-minibuffer-window-p) |
195 :help "Read an existing file into an Emacs buffer")) | 195 :help ,(purecopy "Read an existing file into an Emacs buffer"))) |
196 (define-key menu-bar-file-menu [new-file] | 196 (define-key menu-bar-file-menu [new-file] |
197 '(menu-item "Visit New File..." find-file | 197 `(menu-item ,(purecopy "Visit New File...") find-file |
198 :enable (menu-bar-non-minibuffer-window-p) | 198 :enable (menu-bar-non-minibuffer-window-p) |
199 :help "Specify a new file's name, to edit the file")) | 199 :help ,(purecopy "Specify a new file's name, to edit the file"))) |
200 | 200 |
201 | 201 |
202 ;; The "Edit" menu items | 202 ;; The "Edit" menu items |
203 | 203 |
204 ;; The "Edit->Search" submenu | 204 ;; The "Edit->Search" submenu |
272 ;; The Edit->Search->Incremental Search menu | 272 ;; The Edit->Search->Incremental Search menu |
273 (defvar menu-bar-i-search-menu | 273 (defvar menu-bar-i-search-menu |
274 (make-sparse-keymap "Incremental Search")) | 274 (make-sparse-keymap "Incremental Search")) |
275 | 275 |
276 (define-key menu-bar-i-search-menu [isearch-backward-regexp] | 276 (define-key menu-bar-i-search-menu [isearch-backward-regexp] |
277 '(menu-item "Backward Regexp..." isearch-backward-regexp | 277 `(menu-item ,(purecopy "Backward Regexp...") isearch-backward-regexp |
278 :help "Search backwards for a regular expression as you type it")) | 278 :help ,(purecopy "Search backwards for a regular expression as you type it"))) |
279 (define-key menu-bar-i-search-menu [isearch-forward-regexp] | 279 (define-key menu-bar-i-search-menu [isearch-forward-regexp] |
280 '(menu-item "Forward Regexp..." isearch-forward-regexp | 280 `(menu-item ,(purecopy "Forward Regexp...") isearch-forward-regexp |
281 :help "Search forward for a regular expression as you type it")) | 281 :help ,(purecopy "Search forward for a regular expression as you type it"))) |
282 (define-key menu-bar-i-search-menu [isearch-backward] | 282 (define-key menu-bar-i-search-menu [isearch-backward] |
283 '(menu-item "Backward String..." isearch-backward | 283 `(menu-item ,(purecopy "Backward String...") isearch-backward |
284 :help "Search backwards for a string as you type it")) | 284 :help ,(purecopy "Search backwards for a string as you type it"))) |
285 (define-key menu-bar-i-search-menu [isearch-forward] | 285 (define-key menu-bar-i-search-menu [isearch-forward] |
286 '(menu-item "Forward String..." isearch-forward | 286 `(menu-item ,(purecopy "Forward String...") isearch-forward |
287 :help "Search forward for a string as you type it")) | 287 :help ,(purecopy "Search forward for a string as you type it"))) |
288 | |
289 | 288 |
290 (define-key menu-bar-search-menu [i-search] | 289 (define-key menu-bar-search-menu [i-search] |
291 (list 'menu-item "Incremental Search" menu-bar-i-search-menu)) | 290 `(menu-item ,(purecopy "Incremental Search") menu-bar-i-search-menu)) |
292 (define-key menu-bar-search-menu [separator-tag-isearch] | 291 (define-key menu-bar-search-menu [separator-tag-isearch] |
293 '(menu-item "--")) | 292 `(menu-item ,(purecopy "--"))) |
294 | 293 |
295 (define-key menu-bar-search-menu [tags-continue] | 294 (define-key menu-bar-search-menu [tags-continue] |
296 '(menu-item "Continue Tags Search" tags-loop-continue | 295 `(menu-item ,(purecopy "Continue Tags Search") tags-loop-continue |
297 :help "Continue last tags search operation")) | 296 :help ,(purecopy "Continue last tags search operation"))) |
298 (define-key menu-bar-search-menu [tags-srch] | 297 (define-key menu-bar-search-menu [tags-srch] |
299 '(menu-item "Search Tagged Files..." tags-search | 298 `(menu-item ,(purecopy "Search Tagged Files...") tags-search |
300 :help "Search for a regexp in all tagged files")) | 299 :help ,(purecopy "Search for a regexp in all tagged files"))) |
301 (define-key menu-bar-search-menu [separator-tag-search] | 300 (define-key menu-bar-search-menu [separator-tag-search] |
302 '(menu-item "--")) | 301 `(menu-item ,(purecopy "--"))) |
303 | 302 |
304 (define-key menu-bar-search-menu [repeat-search-back] | 303 (define-key menu-bar-search-menu [repeat-search-back] |
305 '(menu-item "Repeat Backwards" nonincremental-repeat-search-backward | 304 `(menu-item ,(purecopy "Repeat Backwards") nonincremental-repeat-search-backward |
306 :enable (or (and (eq menu-bar-last-search-type 'string) | 305 :enable (or (and (eq menu-bar-last-search-type 'string) |
307 search-ring) | 306 search-ring) |
308 (and (eq menu-bar-last-search-type 'regexp) | 307 (and (eq menu-bar-last-search-type 'regexp) |
309 regexp-search-ring)) | 308 regexp-search-ring)) |
310 :help "Repeat last search backwards")) | 309 :help ,(purecopy "Repeat last search backwards"))) |
311 (define-key menu-bar-search-menu [repeat-search-fwd] | 310 (define-key menu-bar-search-menu [repeat-search-fwd] |
312 '(menu-item "Repeat Forward" nonincremental-repeat-search-forward | 311 `(menu-item ,(purecopy "Repeat Forward") nonincremental-repeat-search-forward |
313 :enable (or (and (eq menu-bar-last-search-type 'string) | 312 :enable (or (and (eq menu-bar-last-search-type 'string) |
314 search-ring) | 313 search-ring) |
315 (and (eq menu-bar-last-search-type 'regexp) | 314 (and (eq menu-bar-last-search-type 'regexp) |
316 regexp-search-ring)) | 315 regexp-search-ring)) |
317 :help "Repeat last search forward")) | 316 :help ,(purecopy "Repeat last search forward"))) |
318 (define-key menu-bar-search-menu [separator-repeat-search] | 317 (define-key menu-bar-search-menu [separator-repeat-search] |
319 '(menu-item "--")) | 318 `(menu-item ,(purecopy "--"))) |
320 | 319 |
321 (define-key menu-bar-search-menu [re-search-backward] | 320 (define-key menu-bar-search-menu [re-search-backward] |
322 '(menu-item "Regexp Backwards..." nonincremental-re-search-backward | 321 `(menu-item ,(purecopy "Regexp Backwards...") nonincremental-re-search-backward |
323 :help "Search backwards for a regular expression")) | 322 :help ,(purecopy "Search backwards for a regular expression"))) |
324 (define-key menu-bar-search-menu [re-search-forward] | 323 (define-key menu-bar-search-menu [re-search-forward] |
325 '(menu-item "Regexp Forward..." nonincremental-re-search-forward | 324 `(menu-item ,(purecopy "Regexp Forward...") nonincremental-re-search-forward |
326 :help "Search forward for a regular expression")) | 325 :help ,(purecopy "Search forward for a regular expression"))) |
327 | 326 |
328 (define-key menu-bar-search-menu [search-backward] | 327 (define-key menu-bar-search-menu [search-backward] |
329 '(menu-item "String Backwards..." nonincremental-search-backward | 328 `(menu-item ,(purecopy "String Backwards...") nonincremental-search-backward |
330 :help "Search backwards for a string")) | 329 :help ,(purecopy "Search backwards for a string"))) |
331 (define-key menu-bar-search-menu [search-forward] | 330 (define-key menu-bar-search-menu [search-forward] |
332 '(menu-item "String Forward..." nonincremental-search-forward | 331 `(menu-item ,(purecopy "String Forward...") nonincremental-search-forward |
333 :help "Search forward for a string")) | 332 :help ,(purecopy "Search forward for a string"))) |
334 | 333 |
335 ;; The Edit->Replace submenu | 334 ;; The Edit->Replace submenu |
336 | 335 |
337 (defvar menu-bar-replace-menu (make-sparse-keymap "Replace")) | 336 (defvar menu-bar-replace-menu (make-sparse-keymap "Replace")) |
338 | 337 |
339 (define-key menu-bar-replace-menu [tags-repl-continue] | 338 (define-key menu-bar-replace-menu [tags-repl-continue] |
340 '(menu-item "Continue Replace" tags-loop-continue | 339 `(menu-item ,(purecopy "Continue Replace") tags-loop-continue |
341 :help "Continue last tags replace operation")) | 340 :help ,(purecopy "Continue last tags replace operation"))) |
342 (define-key menu-bar-replace-menu [tags-repl] | 341 (define-key menu-bar-replace-menu [tags-repl] |
343 '(menu-item "Replace in Tagged Files..." tags-query-replace | 342 `(menu-item ,(purecopy "Replace in Tagged Files...") tags-query-replace |
344 :help "Interactively replace a regexp in all tagged files")) | 343 :help ,(purecopy "Interactively replace a regexp in all tagged files"))) |
345 (define-key menu-bar-replace-menu [separator-replace-tags] | 344 (define-key menu-bar-replace-menu [separator-replace-tags] |
346 '(menu-item "--")) | 345 `(menu-item ,(purecopy "--"))) |
347 | 346 |
348 (define-key menu-bar-replace-menu [query-replace-regexp] | 347 (define-key menu-bar-replace-menu [query-replace-regexp] |
349 '(menu-item "Replace Regexp..." query-replace-regexp | 348 `(menu-item ,(purecopy "Replace Regexp...") query-replace-regexp |
350 :enable (not buffer-read-only) | 349 :enable (not buffer-read-only) |
351 :help "Replace regular expression interactively, ask about each occurrence")) | 350 :help ,(purecopy "Replace regular expression interactively, ask about each occurrence"))) |
352 (define-key menu-bar-replace-menu [query-replace] | 351 (define-key menu-bar-replace-menu [query-replace] |
353 '(menu-item "Replace String..." query-replace | 352 `(menu-item ,(purecopy "Replace String...") query-replace |
354 :enable (not buffer-read-only) | 353 :enable (not buffer-read-only) |
355 :help "Replace string interactively, ask about each occurrence")) | 354 :help ,(purecopy "Replace string interactively, ask about each occurrence"))) |
356 | 355 |
357 ;;; Assemble the top-level Edit menu items. | 356 ;;; Assemble the top-level Edit menu items. |
358 (define-key menu-bar-edit-menu [props] | 357 (define-key menu-bar-edit-menu [props] |
359 '(menu-item "Text Properties" facemenu-menu)) | 358 `(menu-item ,(purecopy "Text Properties") facemenu-menu)) |
360 | 359 |
361 (define-key menu-bar-edit-menu [fill] | 360 (define-key menu-bar-edit-menu [fill] |
362 '(menu-item "Fill" fill-region | 361 `(menu-item ,(purecopy "Fill") fill-region |
363 :enable (and mark-active (not buffer-read-only)) | 362 :enable (and mark-active (not buffer-read-only)) |
364 :help | 363 :help |
365 "Fill text in region to fit between left and right margin")) | 364 ,(purecopy "Fill text in region to fit between left and right margin"))) |
366 | 365 |
367 (define-key menu-bar-edit-menu [separator-bookmark] | 366 (define-key menu-bar-edit-menu [separator-bookmark] |
368 '(menu-item "--")) | 367 `(menu-item ,(purecopy "--"))) |
369 | 368 |
370 (define-key menu-bar-edit-menu [bookmark] | 369 (define-key menu-bar-edit-menu [bookmark] |
371 '(menu-item "Bookmarks" menu-bar-bookmark-map)) | 370 `(menu-item ,(purecopy "Bookmarks") menu-bar-bookmark-map)) |
372 | 371 |
373 (defvar menu-bar-goto-menu (make-sparse-keymap "Go To")) | 372 (defvar menu-bar-goto-menu (make-sparse-keymap "Go To")) |
374 | 373 |
375 (define-key menu-bar-goto-menu [set-tags-name] | 374 (define-key menu-bar-goto-menu [set-tags-name] |
376 '(menu-item "Set Tags File Name..." visit-tags-table | 375 `(menu-item ,(purecopy "Set Tags File Name...") visit-tags-table |
377 :help "Tell Tags commands which tag table file to use")) | 376 :help ,(purecopy "Tell Tags commands which tag table file to use"))) |
378 | 377 |
379 (define-key menu-bar-goto-menu [separator-tag-file] | 378 (define-key menu-bar-goto-menu [separator-tag-file] |
380 '(menu-item "--")) | 379 `(menu-item ,(purecopy "--"))) |
381 | 380 |
382 (define-key menu-bar-goto-menu [apropos-tags] | 381 (define-key menu-bar-goto-menu [apropos-tags] |
383 '(menu-item "Tags Apropos..." tags-apropos | 382 `(menu-item ,(purecopy "Tags Apropos...") tags-apropos |
384 :help "Find function/variables whose names match regexp")) | 383 :help ,(purecopy "Find function/variables whose names match regexp"))) |
385 (define-key menu-bar-goto-menu [next-tag-otherw] | 384 (define-key menu-bar-goto-menu [next-tag-otherw] |
386 '(menu-item "Next Tag in Other Window" | 385 `(menu-item ,(purecopy "Next Tag in Other Window") |
387 menu-bar-next-tag-other-window | 386 menu-bar-next-tag-other-window |
388 :enable (and (boundp 'tags-location-ring) | 387 :enable (and (boundp 'tags-location-ring) |
389 (not (ring-empty-p tags-location-ring))) | 388 (not (ring-empty-p tags-location-ring))) |
390 :help "Find next function/variable matching last tag name in another window")) | 389 :help ,(purecopy "Find next function/variable matching last tag name in another window"))) |
391 | 390 |
392 (defun menu-bar-next-tag-other-window () | 391 (defun menu-bar-next-tag-other-window () |
393 "Find the next definition of the tag already specified." | 392 "Find the next definition of the tag already specified." |
394 (interactive) | 393 (interactive) |
395 (find-tag-other-window nil t)) | 394 (find-tag-other-window nil t)) |
398 "Find the next definition of the tag already specified." | 397 "Find the next definition of the tag already specified." |
399 (interactive) | 398 (interactive) |
400 (find-tag nil t)) | 399 (find-tag nil t)) |
401 | 400 |
402 (define-key menu-bar-goto-menu [next-tag] | 401 (define-key menu-bar-goto-menu [next-tag] |
403 '(menu-item "Find Next Tag" | 402 `(menu-item ,(purecopy "Find Next Tag") |
404 menu-bar-next-tag | 403 menu-bar-next-tag |
405 :enable (and (boundp 'tags-location-ring) | 404 :enable (and (boundp 'tags-location-ring) |
406 (not (ring-empty-p tags-location-ring))) | 405 (not (ring-empty-p tags-location-ring))) |
407 :help "Find next function/variable matching last tag name")) | 406 :help ,(purecopy "Find next function/variable matching last tag name"))) |
408 (define-key menu-bar-goto-menu [find-tag-otherw] | 407 (define-key menu-bar-goto-menu [find-tag-otherw] |
409 '(menu-item "Find Tag in Other Window..." find-tag-other-window | 408 `(menu-item ,(purecopy "Find Tag in Other Window...") find-tag-other-window |
410 :help "Find function/variable definition in another window")) | 409 :help ,(purecopy "Find function/variable definition in another window"))) |
411 (define-key menu-bar-goto-menu [find-tag] | 410 (define-key menu-bar-goto-menu [find-tag] |
412 '(menu-item "Find Tag..." find-tag | 411 `(menu-item ,(purecopy "Find Tag...") find-tag |
413 :help "Find definition of function or variable")) | 412 :help ,(purecopy "Find definition of function or variable"))) |
414 | 413 |
415 (define-key menu-bar-goto-menu [separator-tags] | 414 (define-key menu-bar-goto-menu [separator-tags] |
416 '(menu-item "--")) | 415 `(menu-item ,(purecopy "--"))) |
417 | 416 |
418 (define-key menu-bar-goto-menu [end-of-buf] | 417 (define-key menu-bar-goto-menu [end-of-buf] |
419 '(menu-item "Goto End of Buffer" end-of-buffer)) | 418 `(menu-item ,(purecopy "Goto End of Buffer") end-of-buffer)) |
420 (define-key menu-bar-goto-menu [beg-of-buf] | 419 (define-key menu-bar-goto-menu [beg-of-buf] |
421 '(menu-item "Goto Beginning of Buffer" beginning-of-buffer)) | 420 `(menu-item ,(purecopy "Goto Beginning of Buffer") beginning-of-buffer)) |
422 (define-key menu-bar-goto-menu [go-to-pos] | 421 (define-key menu-bar-goto-menu [go-to-pos] |
423 '(menu-item "Goto Buffer Position..." goto-char | 422 `(menu-item ,(purecopy "Goto Buffer Position...") goto-char |
424 :help "Read a number N and go to buffer position N")) | 423 :help ,(purecopy "Read a number N and go to buffer position N"))) |
425 (define-key menu-bar-goto-menu [go-to-line] | 424 (define-key menu-bar-goto-menu [go-to-line] |
426 '(menu-item "Goto Line..." goto-line | 425 `(menu-item ,(purecopy "Goto Line...") goto-line |
427 :help "Read a line number and go to that line")) | 426 :help ,(purecopy "Read a line number and go to that line"))) |
428 | 427 |
429 (define-key menu-bar-edit-menu [goto] | 428 (define-key menu-bar-edit-menu [goto] |
430 (list 'menu-item "Go To" menu-bar-goto-menu)) | 429 `(menu-item ,(purecopy "Go To") menu-bar-goto-menu)) |
431 | 430 |
432 (define-key menu-bar-edit-menu [replace] | 431 (define-key menu-bar-edit-menu [replace] |
433 (list 'menu-item "Replace" menu-bar-replace-menu)) | 432 `(menu-item ,(purecopy "Replace") menu-bar-replace-menu)) |
434 | 433 |
435 (define-key menu-bar-edit-menu [search] | 434 (define-key menu-bar-edit-menu [search] |
436 (list 'menu-item "Search" menu-bar-search-menu)) | 435 `(menu-item ,(purecopy "Search") menu-bar-search-menu)) |
437 | 436 |
438 (define-key menu-bar-edit-menu [separator-search] | 437 (define-key menu-bar-edit-menu [separator-search] |
439 '(menu-item "--")) | 438 `(menu-item ,(purecopy "--"))) |
440 | 439 |
441 (define-key menu-bar-edit-menu [mark-whole-buffer] | 440 (define-key menu-bar-edit-menu [mark-whole-buffer] |
442 '(menu-item "Select All" mark-whole-buffer | 441 `(menu-item ,(purecopy "Select All") mark-whole-buffer |
443 :help "Mark the whole buffer for a subsequent cut/copy")) | 442 :help ,(purecopy "Mark the whole buffer for a subsequent cut/copy"))) |
444 (define-key menu-bar-edit-menu [clear] | 443 (define-key menu-bar-edit-menu [clear] |
445 '(menu-item "Clear" delete-region | 444 `(menu-item ,(purecopy "Clear") delete-region |
446 :enable (and mark-active | 445 :enable (and mark-active |
447 (not buffer-read-only) | 446 (not buffer-read-only) |
448 (not (mouse-region-match))) | 447 (not (mouse-region-match))) |
449 :help | 448 :help |
450 "Delete the text in region between mark and current position")) | 449 ,(purecopy "Delete the text in region between mark and current position"))) |
451 (defvar yank-menu (cons "Select Yank" nil)) | 450 (defvar yank-menu (cons "Select Yank" nil)) |
452 (fset 'yank-menu (cons 'keymap yank-menu)) | 451 (fset 'yank-menu (cons 'keymap yank-menu)) |
453 (define-key menu-bar-edit-menu [paste-from-menu] | 452 (define-key menu-bar-edit-menu [paste-from-menu] |
454 '(menu-item "Paste from Kill Menu" yank-menu | 453 `(menu-item ,(purecopy "Paste from Kill Menu") yank-menu |
455 :enable (and (cdr yank-menu) (not buffer-read-only)) | 454 :enable (and (cdr yank-menu) (not buffer-read-only)) |
456 :help "Choose a string from the kill ring and paste it")) | 455 :help ,(purecopy "Choose a string from the kill ring and paste it"))) |
457 (define-key menu-bar-edit-menu [paste] | 456 (define-key menu-bar-edit-menu [paste] |
458 '(menu-item "Paste" yank | 457 `(menu-item ,(purecopy "Paste") yank |
459 :enable (and (or | 458 :enable (and (or |
460 ;; Emacs compiled --without-x doesn't have | 459 ;; Emacs compiled --without-x doesn't have |
461 ;; x-selection-exists-p. | 460 ;; x-selection-exists-p. |
462 (and (fboundp 'x-selection-exists-p) | 461 (and (fboundp 'x-selection-exists-p) |
463 (x-selection-exists-p)) | 462 (x-selection-exists-p)) |
464 kill-ring) | 463 kill-ring) |
465 (not buffer-read-only)) | 464 (not buffer-read-only)) |
466 :help "Paste (yank) text most recently cut/copied")) | 465 :help ,(purecopy "Paste (yank) text most recently cut/copied"))) |
467 (define-key menu-bar-edit-menu [copy] | 466 (define-key menu-bar-edit-menu [copy] |
468 '(menu-item "Copy" menu-bar-kill-ring-save | 467 `(menu-item ,(purecopy "Copy") menu-bar-kill-ring-save |
469 :enable mark-active | 468 :enable mark-active |
470 :help "Copy text in region between mark and current position" | 469 :help ,(purecopy "Copy text in region between mark and current position") |
471 :keys "\\[kill-ring-save]")) | 470 :keys "\\[kill-ring-save]")) |
472 (define-key menu-bar-edit-menu [cut] | 471 (define-key menu-bar-edit-menu [cut] |
473 '(menu-item "Cut" kill-region | 472 `(menu-item ,(purecopy "Cut") kill-region |
474 :enable (and mark-active (not buffer-read-only)) | 473 :enable (and mark-active (not buffer-read-only)) |
475 :help | 474 :help |
476 "Cut (kill) text in region between mark and current position")) | 475 ,(purecopy "Cut (kill) text in region between mark and current position"))) |
477 (define-key menu-bar-edit-menu [undo] | 476 (define-key menu-bar-edit-menu [undo] |
478 '(menu-item "Undo" undo | 477 `(menu-item ,(purecopy "Undo") undo |
479 :enable (and (not buffer-read-only) | 478 :enable (and (not buffer-read-only) |
480 (not (eq t buffer-undo-list)) | 479 (not (eq t buffer-undo-list)) |
481 (if (eq last-command 'undo) | 480 (if (eq last-command 'undo) |
482 (listp pending-undo-list) | 481 (listp pending-undo-list) |
483 (consp buffer-undo-list))) | 482 (consp buffer-undo-list))) |
484 :help "Undo last operation")) | 483 :help ,(purecopy "Undo last operation"))) |
485 | 484 |
486 | 485 |
487 (defun menu-bar-kill-ring-save (beg end) | 486 (defun menu-bar-kill-ring-save (beg end) |
488 (interactive "r") | 487 (interactive "r") |
489 (if (mouse-region-match) | 488 (if (mouse-region-match) |
548 ;; The "Options" menu items | 547 ;; The "Options" menu items |
549 | 548 |
550 (defvar menu-bar-custom-menu (make-sparse-keymap "Customize")) | 549 (defvar menu-bar-custom-menu (make-sparse-keymap "Customize")) |
551 | 550 |
552 (define-key menu-bar-custom-menu [customize-apropos-groups] | 551 (define-key menu-bar-custom-menu [customize-apropos-groups] |
553 '(menu-item "Groups Matching Regexp..." customize-apropos-groups | 552 `(menu-item ,(purecopy "Groups Matching Regexp...") customize-apropos-groups |
554 :help "Browse groups whose names match regexp")) | 553 :help ,(purecopy "Browse groups whose names match regexp"))) |
555 (define-key menu-bar-custom-menu [customize-apropos-faces] | 554 (define-key menu-bar-custom-menu [customize-apropos-faces] |
556 '(menu-item "Faces Matching Regexp..." customize-apropos-faces | 555 `(menu-item ,(purecopy "Faces Matching Regexp...") customize-apropos-faces |
557 :help "Browse faces whose names match regexp")) | 556 :help ,(purecopy "Browse faces whose names match regexp"))) |
558 (define-key menu-bar-custom-menu [customize-apropos-options] | 557 (define-key menu-bar-custom-menu [customize-apropos-options] |
559 '(menu-item "Options Matching Regexp..." customize-apropos-options | 558 `(menu-item ,(purecopy "Options Matching Regexp...") customize-apropos-options |
560 :help "Browse options whose names match regexp")) | 559 :help ,(purecopy "Browse options whose names match regexp"))) |
561 (define-key menu-bar-custom-menu [customize-apropos] | 560 (define-key menu-bar-custom-menu [customize-apropos] |
562 '(menu-item "Settings Matching Regexp..." customize-apropos | 561 `(menu-item ,(purecopy "Settings Matching Regexp...") customize-apropos |
563 :help "Browse customizable settings whose names match regexp")) | 562 :help ,(purecopy "Browse customizable settings whose names match regexp"))) |
564 (define-key menu-bar-custom-menu [separator-1] | 563 (define-key menu-bar-custom-menu [separator-1] |
565 '("--")) | 564 '("--")) |
566 (define-key menu-bar-custom-menu [customize-group] | 565 (define-key menu-bar-custom-menu [customize-group] |
567 '(menu-item "Specific Group..." customize-group | 566 `(menu-item ,(purecopy "Specific Group...") customize-group |
568 :help "Customize settings of specific group")) | 567 :help ,(purecopy "Customize settings of specific group"))) |
569 (define-key menu-bar-custom-menu [customize-face] | 568 (define-key menu-bar-custom-menu [customize-face] |
570 '(menu-item "Specific Face..." customize-face | 569 `(menu-item ,(purecopy "Specific Face...") customize-face |
571 :help "Customize attributes of specific face")) | 570 :help ,(purecopy "Customize attributes of specific face"))) |
572 (define-key menu-bar-custom-menu [customize-option] | 571 (define-key menu-bar-custom-menu [customize-option] |
573 '(menu-item "Specific Option..." customize-option | 572 `(menu-item ,(purecopy "Specific Option...") customize-option |
574 :help "Customize value of specific option")) | 573 :help ,(purecopy "Customize value of specific option"))) |
575 (define-key menu-bar-custom-menu [separator-2] | 574 (define-key menu-bar-custom-menu [separator-2] |
576 '("--")) | 575 '("--")) |
577 (define-key menu-bar-custom-menu [customize-changed-options] | 576 (define-key menu-bar-custom-menu [customize-changed-options] |
578 '(menu-item "New Options..." customize-changed-options | 577 `(menu-item ,(purecopy "New Options...") customize-changed-options |
579 :help "Options added or changed in recent Emacs versions")) | 578 :help ,(purecopy "Options added or changed in recent Emacs versions"))) |
580 (define-key menu-bar-custom-menu [customize-saved] | 579 (define-key menu-bar-custom-menu [customize-saved] |
581 '(menu-item "Saved Options" customize-saved | 580 `(menu-item ,(purecopy "Saved Options") customize-saved |
582 :help "Customize previously saved options")) | 581 :help ,(purecopy "Customize previously saved options"))) |
583 (define-key menu-bar-custom-menu [separator-3] | 582 (define-key menu-bar-custom-menu [separator-3] |
584 '("--")) | 583 '("--")) |
585 (define-key menu-bar-custom-menu [customize-browse] | 584 (define-key menu-bar-custom-menu [customize-browse] |
586 '(menu-item "Browse Customization Groups" customize-browse | 585 `(menu-item ,(purecopy "Browse Customization Groups") customize-browse |
587 :help "Browse all customization groups")) | 586 :help ,(purecopy "Browse all customization groups"))) |
588 (define-key menu-bar-custom-menu [customize] | 587 (define-key menu-bar-custom-menu [customize] |
589 '(menu-item "Top-level Customization Group" customize | 588 `(menu-item ,(purecopy "Top-level Customization Group") customize |
590 :help "The master group called `Emacs'")) | 589 :help ,(purecopy "The master group called `Emacs'"))) |
591 | 590 |
592 ;(defvar menu-bar-preferences-menu (make-sparse-keymap "Preferences")) | 591 ;(defvar menu-bar-preferences-menu (make-sparse-keymap "Preferences")) |
593 | 592 |
594 (defmacro menu-bar-make-mm-toggle (fname doc help &optional props) | 593 (defmacro menu-bar-make-mm-toggle (fname doc help &optional props) |
595 "Make a menu-item for a global minor mode toggle. | 594 "Make a menu-item for a global minor mode toggle. |
596 FNAME is the minor mode's name (variable and function). | 595 FNAME is the minor mode's name (variable and function). |
597 DOC is the text to use for the menu entry. | 596 DOC is the text to use for the menu entry. |
598 HELP is the text to use for the tooltip. | 597 HELP is the text to use for the tooltip. |
599 PROPS are additional properties." | 598 PROPS are additional properties." |
600 `'(menu-item ,doc ,fname | 599 `'(menu-item ,(purecopy doc) ,fname |
601 ,@props | 600 ,@props |
602 :help ,help | 601 :help ,(purecopy help) |
603 :button (:toggle . (and (default-boundp ',fname) | 602 :button (:toggle . (and (default-boundp ',fname) |
604 (default-value ',fname))))) | 603 (default-value ',fname))))) |
605 | 604 |
606 (defmacro menu-bar-make-toggle (name variable doc message help &rest body) | 605 (defmacro menu-bar-make-toggle (name variable doc message help &rest body) |
607 `(progn | 606 `(progn |
622 ;; The function `customize-mark-as-set' must only be called when | 621 ;; The function `customize-mark-as-set' must only be called when |
623 ;; a variable is set interactively, as the purpose is to mark it as | 622 ;; a variable is set interactively, as the purpose is to mark it as |
624 ;; a candidate for "Save Options", and we do not want to save options | 623 ;; a candidate for "Save Options", and we do not want to save options |
625 ;; the user have already set explicitly in his init file. | 624 ;; the user have already set explicitly in his init file. |
626 (if interactively (customize-mark-as-set ',variable))) | 625 (if interactively (customize-mark-as-set ',variable))) |
627 '(menu-item ,doc ,name | 626 '(menu-item ,(purecopy doc) ,name |
628 :help ,help | 627 :help ,(purecopy help) |
629 :button (:toggle . (and (default-boundp ',variable) | 628 :button (:toggle . (and (default-boundp ',variable) |
630 (default-value ',variable)))))) | 629 (default-value ',variable)))))) |
631 | 630 |
632 ;; Function for setting/saving default font. | 631 ;; Function for setting/saving default font. |
633 | 632 |
658 (custom-push-theme 'theme-face 'default 'user 'set spec) | 657 (custom-push-theme 'theme-face 'default 'user 'set spec) |
659 (put 'default 'face-modified nil)))) | 658 (put 'default 'face-modified nil)))) |
660 | 659 |
661 ;;; Assemble all the top-level items of the "Options" menu | 660 ;;; Assemble all the top-level items of the "Options" menu |
662 (define-key menu-bar-options-menu [customize] | 661 (define-key menu-bar-options-menu [customize] |
663 (list 'menu-item "Customize Emacs" menu-bar-custom-menu)) | 662 `(menu-item ,(purecopy "Customize Emacs") menu-bar-custom-menu)) |
664 | 663 |
665 (defun menu-bar-options-save () | 664 (defun menu-bar-options-save () |
666 "Save current values of Options menu items using Custom." | 665 "Save current values of Options menu items using Custom." |
667 (interactive) | 666 (interactive) |
668 (let ((need-save nil)) | 667 (let ((need-save nil)) |
698 ;; Save if we changed anything. | 697 ;; Save if we changed anything. |
699 (when need-save | 698 (when need-save |
700 (custom-save-all)))) | 699 (custom-save-all)))) |
701 | 700 |
702 (define-key menu-bar-options-menu [save] | 701 (define-key menu-bar-options-menu [save] |
703 '(menu-item "Save Options" menu-bar-options-save | 702 `(menu-item ,(purecopy "Save Options") menu-bar-options-save |
704 :help "Save options set from the menu above")) | 703 :help ,(purecopy "Save options set from the menu above"))) |
705 | 704 |
706 (define-key menu-bar-options-menu [custom-separator] | 705 (define-key menu-bar-options-menu [custom-separator] |
707 '("--")) | 706 '("--")) |
708 | 707 |
709 (define-key menu-bar-options-menu [menu-set-font] | 708 (define-key menu-bar-options-menu [menu-set-font] |
710 '(menu-item "Set Default Font..." menu-set-font | 709 `(menu-item ,(purecopy "Set Default Font...") menu-set-font |
711 :visible (display-multi-font-p) | 710 :visible (display-multi-font-p) |
712 :help "Select a default font")) | 711 :help ,(purecopy "Select a default font"))) |
713 | 712 |
714 ;; The "Show/Hide" submenu of menu "Options" | 713 ;; The "Show/Hide" submenu of menu "Options" |
715 | 714 |
716 (defvar menu-bar-showhide-menu (make-sparse-keymap "Show/Hide")) | 715 (defvar menu-bar-showhide-menu (make-sparse-keymap "Show/Hide")) |
717 | 716 |
746 | 745 |
747 (define-key menu-bar-showhide-menu [datetime-separator] | 746 (define-key menu-bar-showhide-menu [datetime-separator] |
748 '("--")) | 747 '("--")) |
749 | 748 |
750 (define-key menu-bar-showhide-menu [showhide-speedbar] | 749 (define-key menu-bar-showhide-menu [showhide-speedbar] |
751 '(menu-item "Speedbar" speedbar-frame-mode | 750 `(menu-item ,(purecopy "Speedbar") speedbar-frame-mode |
752 :help "Display a Speedbar quick-navigation frame" | 751 :help ,(purecopy "Display a Speedbar quick-navigation frame") |
753 :button (:toggle | 752 :button (:toggle |
754 . (and (boundp 'speedbar-frame) | 753 . (and (boundp 'speedbar-frame) |
755 (frame-live-p (symbol-value 'speedbar-frame)) | 754 (frame-live-p (symbol-value 'speedbar-frame)) |
756 (frame-visible-p | 755 (frame-visible-p |
757 (symbol-value 'speedbar-frame)))))) | 756 (symbol-value 'speedbar-frame)))))) |
765 "Show customization buffer for `indicate-buffer-boundaries'." | 764 "Show customization buffer for `indicate-buffer-boundaries'." |
766 (interactive) | 765 (interactive) |
767 (customize-variable 'indicate-buffer-boundaries)) | 766 (customize-variable 'indicate-buffer-boundaries)) |
768 | 767 |
769 (define-key menu-bar-showhide-fringe-ind-menu [customize] | 768 (define-key menu-bar-showhide-fringe-ind-menu [customize] |
770 '(menu-item "Other (Customize)" | 769 `(menu-item ,(purecopy "Other (Customize)") |
771 menu-bar-showhide-fringe-ind-customize | 770 menu-bar-showhide-fringe-ind-customize |
772 :help "Additional choices available through Custom buffer" | 771 :help ,(purecopy "Additional choices available through Custom buffer") |
773 :visible (display-graphic-p) | 772 :visible (display-graphic-p) |
774 :button (:radio . (not (member indicate-buffer-boundaries | 773 :button (:radio . (not (member indicate-buffer-boundaries |
775 '(nil left right | 774 '(nil left right |
776 ((top . left) (bottom . right)) | 775 ((top . left) (bottom . right)) |
777 ((t . right) (top . left)))))))) | 776 ((t . right) (top . left)))))))) |
781 (interactive) | 780 (interactive) |
782 (customize-set-variable 'indicate-buffer-boundaries | 781 (customize-set-variable 'indicate-buffer-boundaries |
783 '((t . right) (top . left)))) | 782 '((t . right) (top . left)))) |
784 | 783 |
785 (define-key menu-bar-showhide-fringe-ind-menu [mixed] | 784 (define-key menu-bar-showhide-fringe-ind-menu [mixed] |
786 '(menu-item "Opposite, Arrows Right" menu-bar-showhide-fringe-ind-mixed | 785 `(menu-item ,(purecopy "Opposite, Arrows Right") menu-bar-showhide-fringe-ind-mixed |
787 :help | 786 :help |
788 "Show top/bottom indicators in opposite fringes, arrows in right" | 787 ,(purecopy "Show top/bottom indicators in opposite fringes, arrows in right") |
789 :visible (display-graphic-p) | 788 :visible (display-graphic-p) |
790 :button (:radio . (equal indicate-buffer-boundaries | 789 :button (:radio . (equal indicate-buffer-boundaries |
791 '((t . right) (top . left)))))) | 790 '((t . right) (top . left)))))) |
792 | 791 |
793 (defun menu-bar-showhide-fringe-ind-box () | 792 (defun menu-bar-showhide-fringe-ind-box () |
795 (interactive) | 794 (interactive) |
796 (customize-set-variable 'indicate-buffer-boundaries | 795 (customize-set-variable 'indicate-buffer-boundaries |
797 '((top . left) (bottom . right)))) | 796 '((top . left) (bottom . right)))) |
798 | 797 |
799 (define-key menu-bar-showhide-fringe-ind-menu [box] | 798 (define-key menu-bar-showhide-fringe-ind-menu [box] |
800 '(menu-item "Opposite, No Arrows" menu-bar-showhide-fringe-ind-box | 799 `(menu-item ,(purecopy "Opposite, No Arrows") menu-bar-showhide-fringe-ind-box |
801 :help "Show top/bottom indicators in opposite fringes, no arrows" | 800 :help ,(purecopy "Show top/bottom indicators in opposite fringes, no arrows") |
802 :visible (display-graphic-p) | 801 :visible (display-graphic-p) |
803 :button (:radio . (equal indicate-buffer-boundaries | 802 :button (:radio . (equal indicate-buffer-boundaries |
804 '((top . left) (bottom . right)))))) | 803 '((top . left) (bottom . right)))))) |
805 | 804 |
806 (defun menu-bar-showhide-fringe-ind-right () | 805 (defun menu-bar-showhide-fringe-ind-right () |
807 "Display buffer boundaries and arrows in the right fringe." | 806 "Display buffer boundaries and arrows in the right fringe." |
808 (interactive) | 807 (interactive) |
809 (customize-set-variable 'indicate-buffer-boundaries 'right)) | 808 (customize-set-variable 'indicate-buffer-boundaries 'right)) |
810 | 809 |
811 (define-key menu-bar-showhide-fringe-ind-menu [right] | 810 (define-key menu-bar-showhide-fringe-ind-menu [right] |
812 '(menu-item "In Right Fringe" menu-bar-showhide-fringe-ind-right | 811 `(menu-item ,(purecopy "In Right Fringe") menu-bar-showhide-fringe-ind-right |
813 :help "Show buffer boundaries and arrows in right fringe" | 812 :help ,(purecopy "Show buffer boundaries and arrows in right fringe") |
814 :visible (display-graphic-p) | 813 :visible (display-graphic-p) |
815 :button (:radio . (eq indicate-buffer-boundaries 'right)))) | 814 :button (:radio . (eq indicate-buffer-boundaries 'right)))) |
816 | 815 |
817 (defun menu-bar-showhide-fringe-ind-left () | 816 (defun menu-bar-showhide-fringe-ind-left () |
818 "Display buffer boundaries and arrows in the left fringe." | 817 "Display buffer boundaries and arrows in the left fringe." |
819 (interactive) | 818 (interactive) |
820 (customize-set-variable 'indicate-buffer-boundaries 'left)) | 819 (customize-set-variable 'indicate-buffer-boundaries 'left)) |
821 | 820 |
822 (define-key menu-bar-showhide-fringe-ind-menu [left] | 821 (define-key menu-bar-showhide-fringe-ind-menu [left] |
823 '(menu-item "In Left Fringe" menu-bar-showhide-fringe-ind-left | 822 `(menu-item ,(purecopy "In Left Fringe") menu-bar-showhide-fringe-ind-left |
824 :help "Show buffer boundaries and arrows in left fringe" | 823 :help ,(purecopy "Show buffer boundaries and arrows in left fringe") |
825 :visible (display-graphic-p) | 824 :visible (display-graphic-p) |
826 :button (:radio . (eq indicate-buffer-boundaries 'left)))) | 825 :button (:radio . (eq indicate-buffer-boundaries 'left)))) |
827 | 826 |
828 (defun menu-bar-showhide-fringe-ind-none () | 827 (defun menu-bar-showhide-fringe-ind-none () |
829 "Do not display any buffer boundary indicators." | 828 "Do not display any buffer boundary indicators." |
830 (interactive) | 829 (interactive) |
831 (customize-set-variable 'indicate-buffer-boundaries nil)) | 830 (customize-set-variable 'indicate-buffer-boundaries nil)) |
832 | 831 |
833 (define-key menu-bar-showhide-fringe-ind-menu [none] | 832 (define-key menu-bar-showhide-fringe-ind-menu [none] |
834 '(menu-item "No Indicators" menu-bar-showhide-fringe-ind-none | 833 `(menu-item ,(purecopy "No Indicators") menu-bar-showhide-fringe-ind-none |
835 :help "Hide all buffer boundary indicators and arrows" | 834 :help ,(purecopy "Hide all buffer boundary indicators and arrows") |
836 :visible (display-graphic-p) | 835 :visible (display-graphic-p) |
837 :button (:radio . (eq indicate-buffer-boundaries nil)))) | 836 :button (:radio . (eq indicate-buffer-boundaries nil)))) |
838 | 837 |
839 (define-key menu-bar-showhide-fringe-menu [showhide-fringe-ind] | 838 (define-key menu-bar-showhide-fringe-menu [showhide-fringe-ind] |
840 (list 'menu-item "Buffer Boundaries" menu-bar-showhide-fringe-ind-menu | 839 `(menu-item ,(purecopy "Buffer Boundaries") menu-bar-showhide-fringe-ind-menu |
841 :visible `(display-graphic-p) | 840 :visible `(display-graphic-p) |
842 :help "Indicate buffer boundaries in fringe")) | 841 :help ,(purecopy "Indicate buffer boundaries in fringe"))) |
843 | 842 |
844 (define-key menu-bar-showhide-fringe-menu [indicate-empty-lines] | 843 (define-key menu-bar-showhide-fringe-menu [indicate-empty-lines] |
845 (menu-bar-make-toggle toggle-indicate-empty-lines indicate-empty-lines | 844 (menu-bar-make-toggle toggle-indicate-empty-lines indicate-empty-lines |
846 "Empty Line Indicators" | 845 "Empty Line Indicators" |
847 "Indicating of empty lines %s" | 846 "Indicating of empty lines %s" |
851 "Show customization buffer for `fringe-mode'." | 850 "Show customization buffer for `fringe-mode'." |
852 (interactive) | 851 (interactive) |
853 (customize-variable 'fringe-mode)) | 852 (customize-variable 'fringe-mode)) |
854 | 853 |
855 (define-key menu-bar-showhide-fringe-menu [customize] | 854 (define-key menu-bar-showhide-fringe-menu [customize] |
856 '(menu-item "Customize Fringe" menu-bar-showhide-fringe-menu-customize | 855 `(menu-item ,(purecopy "Customize Fringe") menu-bar-showhide-fringe-menu-customize |
857 :help "Detailed customization of fringe" | 856 :help ,(purecopy "Detailed customization of fringe") |
858 :visible (display-graphic-p))) | 857 :visible (display-graphic-p))) |
859 | 858 |
860 (defun menu-bar-showhide-fringe-menu-customize-reset () | 859 (defun menu-bar-showhide-fringe-menu-customize-reset () |
861 "Reset the fringe mode: display fringes on both sides of a window." | 860 "Reset the fringe mode: display fringes on both sides of a window." |
862 (interactive) | 861 (interactive) |
863 (customize-set-variable 'fringe-mode nil)) | 862 (customize-set-variable 'fringe-mode nil)) |
864 | 863 |
865 (define-key menu-bar-showhide-fringe-menu [default] | 864 (define-key menu-bar-showhide-fringe-menu [default] |
866 '(menu-item "Default" menu-bar-showhide-fringe-menu-customize-reset | 865 `(menu-item ,(purecopy "Default") menu-bar-showhide-fringe-menu-customize-reset |
867 :help "Default width fringe on both left and right side" | 866 :help ,(purecopy "Default width fringe on both left and right side") |
868 :visible (display-graphic-p) | 867 :visible (display-graphic-p) |
869 :button (:radio . (eq fringe-mode nil)))) | 868 :button (:radio . (eq fringe-mode nil)))) |
870 | 869 |
871 (defun menu-bar-showhide-fringe-menu-customize-right () | 870 (defun menu-bar-showhide-fringe-menu-customize-right () |
872 "Display fringes only on the right of each window." | 871 "Display fringes only on the right of each window." |
873 (interactive) | 872 (interactive) |
874 (require 'fringe) | 873 (require 'fringe) |
875 (customize-set-variable 'fringe-mode '(0 . nil))) | 874 (customize-set-variable 'fringe-mode '(0 . nil))) |
876 | 875 |
877 (define-key menu-bar-showhide-fringe-menu [right] | 876 (define-key menu-bar-showhide-fringe-menu [right] |
878 '(menu-item "On the Right" menu-bar-showhide-fringe-menu-customize-right | 877 `(menu-item ,(purecopy "On the Right") menu-bar-showhide-fringe-menu-customize-right |
879 :help "Fringe only on the right side" | 878 :help ,(purecopy "Fringe only on the right side") |
880 :visible (display-graphic-p) | 879 :visible (display-graphic-p) |
881 :button (:radio . (equal fringe-mode '(0 . nil))))) | 880 :button (:radio . (equal fringe-mode '(0 . nil))))) |
882 | 881 |
883 (defun menu-bar-showhide-fringe-menu-customize-left () | 882 (defun menu-bar-showhide-fringe-menu-customize-left () |
884 "Display fringes only on the left of each window." | 883 "Display fringes only on the left of each window." |
885 (interactive) | 884 (interactive) |
886 (require 'fringe) | 885 (require 'fringe) |
887 (customize-set-variable 'fringe-mode '(nil . 0))) | 886 (customize-set-variable 'fringe-mode '(nil . 0))) |
888 | 887 |
889 (define-key menu-bar-showhide-fringe-menu [left] | 888 (define-key menu-bar-showhide-fringe-menu [left] |
890 '(menu-item "On the Left" menu-bar-showhide-fringe-menu-customize-left | 889 `(menu-item ,(purecopy "On the Left") menu-bar-showhide-fringe-menu-customize-left |
891 :help "Fringe only on the left side" | 890 :help ,(purecopy "Fringe only on the left side") |
892 :visible (display-graphic-p) | 891 :visible (display-graphic-p) |
893 :button (:radio . (equal fringe-mode '(nil . 0))))) | 892 :button (:radio . (equal fringe-mode '(nil . 0))))) |
894 | 893 |
895 (defun menu-bar-showhide-fringe-menu-customize-disable () | 894 (defun menu-bar-showhide-fringe-menu-customize-disable () |
896 "Do not display window fringes." | 895 "Do not display window fringes." |
897 (interactive) | 896 (interactive) |
898 (require 'fringe) | 897 (require 'fringe) |
899 (customize-set-variable 'fringe-mode 0)) | 898 (customize-set-variable 'fringe-mode 0)) |
900 | 899 |
901 (define-key menu-bar-showhide-fringe-menu [none] | 900 (define-key menu-bar-showhide-fringe-menu [none] |
902 '(menu-item "None" menu-bar-showhide-fringe-menu-customize-disable | 901 `(menu-item ,(purecopy "None") menu-bar-showhide-fringe-menu-customize-disable |
903 :help "Turn off fringe" | 902 :help ,(purecopy "Turn off fringe") |
904 :visible (display-graphic-p) | 903 :visible (display-graphic-p) |
905 :button (:radio . (eq fringe-mode 0)))) | 904 :button (:radio . (eq fringe-mode 0)))) |
906 | 905 |
907 (define-key menu-bar-showhide-menu [showhide-fringe] | 906 (define-key menu-bar-showhide-menu [showhide-fringe] |
908 (list 'menu-item "Fringe" menu-bar-showhide-fringe-menu | 907 `(menu-item ,(purecopy "Fringe") menu-bar-showhide-fringe-menu |
909 :visible `(display-graphic-p))) | 908 :visible `(display-graphic-p))) |
910 | 909 |
911 (defvar menu-bar-showhide-scroll-bar-menu (make-sparse-keymap "Scroll-bar")) | 910 (defvar menu-bar-showhide-scroll-bar-menu (make-sparse-keymap "Scroll-bar")) |
912 | 911 |
913 (define-key menu-bar-showhide-scroll-bar-menu [right] | 912 (define-key menu-bar-showhide-scroll-bar-menu [right] |
914 '(menu-item "On the Right" | 913 `(menu-item ,(purecopy "On the Right") |
915 menu-bar-right-scroll-bar | 914 menu-bar-right-scroll-bar |
916 :help "Scroll-bar on the right side" | 915 :help ,(purecopy "Scroll-bar on the right side") |
917 :visible (display-graphic-p) | 916 :visible (display-graphic-p) |
918 :button (:radio . (eq (cdr (assq 'vertical-scroll-bars | 917 :button (:radio . (eq (cdr (assq 'vertical-scroll-bars |
919 (frame-parameters))) 'right)))) | 918 (frame-parameters))) 'right)))) |
920 (defun menu-bar-right-scroll-bar () | 919 (defun menu-bar-right-scroll-bar () |
921 "Display scroll bars on the right of each window." | 920 "Display scroll bars on the right of each window." |
922 (interactive) | 921 (interactive) |
923 (customize-set-variable 'scroll-bar-mode 'right)) | 922 (customize-set-variable 'scroll-bar-mode 'right)) |
924 | 923 |
925 (define-key menu-bar-showhide-scroll-bar-menu [left] | 924 (define-key menu-bar-showhide-scroll-bar-menu [left] |
926 '(menu-item "On the Left" | 925 `(menu-item ,(purecopy "On the Left") |
927 menu-bar-left-scroll-bar | 926 menu-bar-left-scroll-bar |
928 :help "Scroll-bar on the left side" | 927 :help ,(purecopy "Scroll-bar on the left side") |
929 :visible (display-graphic-p) | 928 :visible (display-graphic-p) |
930 :button (:radio . (eq (cdr (assq 'vertical-scroll-bars | 929 :button (:radio . (eq (cdr (assq 'vertical-scroll-bars |
931 (frame-parameters))) 'left)))) | 930 (frame-parameters))) 'left)))) |
932 | 931 |
933 (defun menu-bar-left-scroll-bar () | 932 (defun menu-bar-left-scroll-bar () |
934 "Display scroll bars on the left of each window." | 933 "Display scroll bars on the left of each window." |
935 (interactive) | 934 (interactive) |
936 (customize-set-variable 'scroll-bar-mode 'left)) | 935 (customize-set-variable 'scroll-bar-mode 'left)) |
937 | 936 |
938 (define-key menu-bar-showhide-scroll-bar-menu [none] | 937 (define-key menu-bar-showhide-scroll-bar-menu [none] |
939 '(menu-item "None" | 938 `(menu-item ,(purecopy "None") |
940 menu-bar-no-scroll-bar | 939 menu-bar-no-scroll-bar |
941 :help "Turn off scroll-bar" | 940 :help ,(purecopy "Turn off scroll-bar") |
942 :visible (display-graphic-p) | 941 :visible (display-graphic-p) |
943 :button (:radio . (eq (cdr (assq 'vertical-scroll-bars | 942 :button (:radio . (eq (cdr (assq 'vertical-scroll-bars |
944 (frame-parameters))) nil)))) | 943 (frame-parameters))) nil)))) |
945 | 944 |
946 (defun menu-bar-no-scroll-bar () | 945 (defun menu-bar-no-scroll-bar () |
947 "Turn off scroll bars." | 946 "Turn off scroll bars." |
948 (interactive) | 947 (interactive) |
949 (customize-set-variable 'scroll-bar-mode nil)) | 948 (customize-set-variable 'scroll-bar-mode nil)) |
950 | 949 |
951 (define-key menu-bar-showhide-menu [showhide-scroll-bar] | 950 (define-key menu-bar-showhide-menu [showhide-scroll-bar] |
952 (list 'menu-item "Scroll-bar" menu-bar-showhide-scroll-bar-menu | 951 `(menu-item ,(purecopy "Scroll-bar") menu-bar-showhide-scroll-bar-menu |
953 :visible `(display-graphic-p))) | 952 :visible `(display-graphic-p))) |
954 | 953 |
955 (define-key menu-bar-showhide-menu [showhide-tooltip-mode] | 954 (define-key menu-bar-showhide-menu [showhide-tooltip-mode] |
956 (list 'menu-item "Tooltips" 'tooltip-mode | 955 `(menu-item ,(purecopy "Tooltips") 'tooltip-mode |
957 :help "Turn tooltips on/off" | 956 :help ,(purecopy "Turn tooltips on/off") |
958 :visible `(and (display-graphic-p) (fboundp 'x-show-tip)) | 957 :visible `(and (display-graphic-p) (fboundp 'x-show-tip)) |
959 :button `(:toggle . tooltip-mode))) | 958 :button `(:toggle . tooltip-mode))) |
960 | 959 |
961 (define-key menu-bar-showhide-menu [menu-bar-mode] | 960 (define-key menu-bar-showhide-menu [menu-bar-mode] |
962 '(menu-item "Menu-bar" toggle-menu-bar-mode-from-frame | 961 `(menu-item ,(purecopy "Menu-bar") toggle-menu-bar-mode-from-frame |
963 :help "Turn menu-bar on/off" | 962 :help ,(purecopy "Turn menu-bar on/off") |
964 :button (:toggle . (> (frame-parameter nil 'menu-bar-lines) 0)))) | 963 :button (:toggle . (> (frame-parameter nil 'menu-bar-lines) 0)))) |
965 | 964 |
966 (define-key menu-bar-showhide-menu [showhide-tool-bar] | 965 (define-key menu-bar-showhide-menu [showhide-tool-bar] |
967 (list 'menu-item "Tool-bar" 'toggle-tool-bar-mode-from-frame | 966 `(menu-item ,(purecopy "Tool-bar") 'toggle-tool-bar-mode-from-frame |
968 :help "Turn tool-bar on/off" | 967 :help ,(purecopy "Turn tool-bar on/off") |
969 :visible `(display-graphic-p) | 968 :visible `(display-graphic-p) |
970 :button `(:toggle . (> (frame-parameter nil 'tool-bar-lines) 0)))) | 969 :button `(:toggle . (> (frame-parameter nil 'tool-bar-lines) 0)))) |
971 | 970 |
972 (define-key menu-bar-options-menu [showhide] | 971 (define-key menu-bar-options-menu [showhide] |
973 (list 'menu-item "Show/Hide" menu-bar-showhide-menu)) | 972 `(menu-item ,(purecopy "Show/Hide") menu-bar-showhide-menu)) |
974 | 973 |
975 (define-key menu-bar-options-menu [showhide-separator] | 974 (define-key menu-bar-options-menu [showhide-separator] |
976 '("--")) | 975 '("--")) |
977 | 976 |
978 (define-key menu-bar-options-menu [mule] | 977 (define-key menu-bar-options-menu [mule] |
979 ;; It is better not to use backquote here, | 978 ;; It is better not to use backquote here, |
980 ;; because that makes a bootstrapping problem | 979 ;; because that makes a bootstrapping problem |
981 ;; if you need to recompile all the Lisp files using interpreted code. | 980 ;; if you need to recompile all the Lisp files using interpreted code. |
982 (list 'menu-item "Mule (Multilingual Environment)" mule-menu-keymap | 981 `(menu-item ,(purecopy "Mule (Multilingual Environment)") mule-menu-keymap |
983 ;; Most of the MULE menu actually does make sense in unibyte mode, | 982 ;; Most of the MULE menu actually does make sense in unibyte mode, |
984 ;; e.g. language selection. | 983 ;; e.g. language selection. |
985 ;;; :visible '(default-value 'enable-multibyte-characters) | 984 ;;; :visible '(default-value 'enable-multibyte-characters) |
986 )) | 985 )) |
987 ;(setq menu-bar-final-items (cons 'mule menu-bar-final-items)) | 986 ;(setq menu-bar-final-items (cons 'mule menu-bar-final-items)) |
988 ;(define-key menu-bar-options-menu [preferences] | 987 ;(define-key menu-bar-options-menu [preferences] |
989 ; (list 'menu-item "Preferences" menu-bar-preferences-menu | 988 ; `(menu-item ,(purecopy "Preferences") menu-bar-preferences-menu |
990 ; :help "Toggle important global options")) | 989 ; :help ,(purecopy "Toggle important global options"))) |
991 | 990 |
992 (define-key menu-bar-options-menu [mule-separator] | 991 (define-key menu-bar-options-menu [mule-separator] |
993 '("--")) | 992 '("--")) |
994 | 993 |
995 (define-key menu-bar-options-menu [debug-on-quit] | 994 (define-key menu-bar-options-menu [debug-on-quit] |
1060 ;; might have changed outside customize. | 1059 ;; might have changed outside customize. |
1061 ;; -- Per Abrahamsen <abraham@dina.kvl.dk> 2002-02-11. | 1060 ;; -- Per Abrahamsen <abraham@dina.kvl.dk> 2002-02-11. |
1062 (customize-mark-as-set 'text-mode-hook)) | 1061 (customize-mark-as-set 'text-mode-hook)) |
1063 | 1062 |
1064 (define-key menu-bar-options-menu [auto-fill-mode] | 1063 (define-key menu-bar-options-menu [auto-fill-mode] |
1065 '(menu-item "Auto Fill in Text Modes" | 1064 `(menu-item ,(purecopy "Auto Fill in Text Modes") |
1066 menu-bar-text-mode-auto-fill | 1065 menu-bar-text-mode-auto-fill |
1067 :help "Automatically fill text while typing (Auto Fill mode)" | 1066 :help ,(purecopy "Automatically fill text while typing (Auto Fill mode)") |
1068 :button (:toggle . (if (listp text-mode-hook) | 1067 :button (:toggle . (if (listp text-mode-hook) |
1069 (member 'turn-on-auto-fill text-mode-hook) | 1068 (member 'turn-on-auto-fill text-mode-hook) |
1070 (eq 'turn-on-auto-fill text-mode-hook))))) | 1069 (eq 'turn-on-auto-fill text-mode-hook))))) |
1071 | 1070 |
1072 | 1071 |
1073 (defvar menu-bar-line-wrapping-menu (make-sparse-keymap "Line Wrapping")) | 1072 (defvar menu-bar-line-wrapping-menu (make-sparse-keymap "Line Wrapping")) |
1074 | 1073 |
1075 (define-key menu-bar-line-wrapping-menu [word-wrap] | 1074 (define-key menu-bar-line-wrapping-menu [word-wrap] |
1076 '(menu-item "Word Wrap (Visual Line mode)" | 1075 `(menu-item ,(purecopy "Word Wrap (Visual Line mode)") |
1077 (lambda () | 1076 (lambda () |
1078 (interactive) | 1077 (interactive) |
1079 (unless visual-line-mode | 1078 (unless visual-line-mode |
1080 (visual-line-mode 1)) | 1079 (visual-line-mode 1)) |
1081 (message "Visual-Line mode enabled")) | 1080 (message "Visual-Line mode enabled")) |
1082 :help "Wrap long lines at word boundaries" | 1081 :help ,(purecopy "Wrap long lines at word boundaries") |
1083 :button (:radio . (and (null truncate-lines) | 1082 :button (:radio . (and (null truncate-lines) |
1084 (not (truncated-partial-width-window-p)) | 1083 (not (truncated-partial-width-window-p)) |
1085 word-wrap)) | 1084 word-wrap)) |
1086 :visible (menu-bar-menu-frame-live-and-visible-p))) | 1085 :visible (menu-bar-menu-frame-live-and-visible-p))) |
1087 | 1086 |
1088 (define-key menu-bar-line-wrapping-menu [truncate] | 1087 (define-key menu-bar-line-wrapping-menu [truncate] |
1089 '(menu-item "Truncate Long Lines" | 1088 `(menu-item ,(purecopy "Truncate Long Lines") |
1090 (lambda () | 1089 (lambda () |
1091 (interactive) | 1090 (interactive) |
1092 (if visual-line-mode (visual-line-mode 0)) | 1091 (if visual-line-mode (visual-line-mode 0)) |
1093 (setq word-wrap nil) | 1092 (setq word-wrap nil) |
1094 (toggle-truncate-lines 1)) | 1093 (toggle-truncate-lines 1)) |
1095 :help "Truncate long lines at window edge" | 1094 :help ,(purecopy "Truncate long lines at window edge") |
1096 :button (:radio . (or truncate-lines | 1095 :button (:radio . (or truncate-lines |
1097 (truncated-partial-width-window-p))) | 1096 (truncated-partial-width-window-p))) |
1098 :visible (menu-bar-menu-frame-live-and-visible-p) | 1097 :visible (menu-bar-menu-frame-live-and-visible-p) |
1099 :enable (not (truncated-partial-width-window-p)))) | 1098 :enable (not (truncated-partial-width-window-p)))) |
1100 | 1099 |
1101 (define-key menu-bar-line-wrapping-menu [window-wrap] | 1100 (define-key menu-bar-line-wrapping-menu [window-wrap] |
1102 '(menu-item "Wrap at Window Edge" | 1101 `(menu-item ,(purecopy "Wrap at Window Edge") |
1103 (lambda () (interactive) | 1102 (lambda () (interactive) |
1104 (if visual-line-mode (visual-line-mode 0)) | 1103 (if visual-line-mode (visual-line-mode 0)) |
1105 (setq word-wrap nil) | 1104 (setq word-wrap nil) |
1106 (if truncate-lines (toggle-truncate-lines -1))) | 1105 (if truncate-lines (toggle-truncate-lines -1))) |
1107 :help "Wrap long lines at window edge" | 1106 :help ,(purecopy "Wrap long lines at window edge") |
1108 :button (:radio . (and (null truncate-lines) | 1107 :button (:radio . (and (null truncate-lines) |
1109 (not (truncated-partial-width-window-p)) | 1108 (not (truncated-partial-width-window-p)) |
1110 (not word-wrap))) | 1109 (not word-wrap))) |
1111 :visible (menu-bar-menu-frame-live-and-visible-p) | 1110 :visible (menu-bar-menu-frame-live-and-visible-p) |
1112 :enable (not (truncated-partial-width-window-p)))) | 1111 :enable (not (truncated-partial-width-window-p)))) |
1113 | 1112 |
1114 (define-key menu-bar-options-menu [line-wrapping] | 1113 (define-key menu-bar-options-menu [line-wrapping] |
1115 (list 'menu-item "Line Wrapping in this Buffer" menu-bar-line-wrapping-menu)) | 1114 `(menu-item ,(purecopy "Line Wrapping in this Buffer") menu-bar-line-wrapping-menu)) |
1116 | 1115 |
1117 | 1116 |
1118 (define-key menu-bar-options-menu [highlight-separator] | 1117 (define-key menu-bar-options-menu [highlight-separator] |
1119 '("--")) | 1118 '("--")) |
1120 (define-key menu-bar-options-menu [highlight-paren-mode] | 1119 (define-key menu-bar-options-menu [highlight-paren-mode] |
1151 (if known (cdr known) (symbol-name read-mail-command)))) | 1150 (if known (cdr known) (symbol-name read-mail-command)))) |
1152 | 1151 |
1153 (defvar menu-bar-games-menu (make-sparse-keymap "Games")) | 1152 (defvar menu-bar-games-menu (make-sparse-keymap "Games")) |
1154 | 1153 |
1155 (define-key menu-bar-tools-menu [games] | 1154 (define-key menu-bar-tools-menu [games] |
1156 (list 'menu-item "Games" menu-bar-games-menu)) | 1155 `(menu-item ,(purecopy "Games") menu-bar-games-menu)) |
1157 | 1156 |
1158 (define-key menu-bar-tools-menu [separator-games] | 1157 (define-key menu-bar-tools-menu [separator-games] |
1159 '("--")) | 1158 '("--")) |
1160 | 1159 |
1161 (define-key menu-bar-games-menu [zone] | 1160 (define-key menu-bar-games-menu [zone] |
1162 '(menu-item "Zone Out" zone | 1161 `(menu-item ,(purecopy "Zone Out") zone |
1163 :help "Play tricks with Emacs display when Emacs is idle")) | 1162 :help ,(purecopy "Play tricks with Emacs display when Emacs is idle"))) |
1164 (define-key menu-bar-games-menu [tetris] | 1163 (define-key menu-bar-games-menu [tetris] |
1165 '(menu-item "Tetris" tetris | 1164 `(menu-item ,(purecopy "Tetris") tetris |
1166 :help "Falling blocks game")) | 1165 :help ,(purecopy "Falling blocks game"))) |
1167 (define-key menu-bar-games-menu [solitaire] | 1166 (define-key menu-bar-games-menu [solitaire] |
1168 '(menu-item "Solitaire" solitaire | 1167 `(menu-item ,(purecopy "Solitaire") solitaire |
1169 :help "Get rid of all the stones")) | 1168 :help ,(purecopy "Get rid of all the stones"))) |
1170 (define-key menu-bar-games-menu [snake] | 1169 (define-key menu-bar-games-menu [snake] |
1171 '(menu-item "Snake" snake | 1170 `(menu-item ,(purecopy "Snake") snake |
1172 :help "Move snake around avoiding collisions")) | 1171 :help ,(purecopy "Move snake around avoiding collisions"))) |
1173 (define-key menu-bar-games-menu [pong] | 1172 (define-key menu-bar-games-menu [pong] |
1174 '(menu-item "Pong" pong | 1173 `(menu-item ,(purecopy "Pong") pong |
1175 :help "Bounce the ball to your opponent")) | 1174 :help ,(purecopy "Bounce the ball to your opponent"))) |
1176 (define-key menu-bar-games-menu [mult] | 1175 (define-key menu-bar-games-menu [mult] |
1177 '(menu-item "Multiplication Puzzle" mpuz | 1176 `(menu-item ,(purecopy "Multiplication Puzzle") mpuz |
1178 :help "Exercise brain with multiplication")) | 1177 :help ,(purecopy "Exercise brain with multiplication"))) |
1179 (define-key menu-bar-games-menu [life] | 1178 (define-key menu-bar-games-menu [life] |
1180 '(menu-item "Life" life | 1179 `(menu-item ,(purecopy "Life") life |
1181 :help "Watch how John Conway's cellular automaton evolves")) | 1180 :help ,(purecopy "Watch how John Conway's cellular automaton evolves"))) |
1182 (define-key menu-bar-games-menu [hanoi] | 1181 (define-key menu-bar-games-menu [hanoi] |
1183 '(menu-item "Towers of Hanoi" hanoi | 1182 `(menu-item ,(purecopy "Towers of Hanoi") hanoi |
1184 :help "Watch Towers-of-Hanoi puzzle solved by Emacs")) | 1183 :help ,(purecopy "Watch Towers-of-Hanoi puzzle solved by Emacs"))) |
1185 (define-key menu-bar-games-menu [gomoku] | 1184 (define-key menu-bar-games-menu [gomoku] |
1186 '(menu-item "Gomoku" gomoku | 1185 `(menu-item ,(purecopy "Gomoku") gomoku |
1187 :help "Mark 5 contiguous squares (like tic-tac-toe)")) | 1186 :help ,(purecopy "Mark 5 contiguous squares (like tic-tac-toe)"))) |
1188 (define-key menu-bar-games-menu [bubbles] | 1187 (define-key menu-bar-games-menu [bubbles] |
1189 '(menu-item "Bubbles" bubbles | 1188 `(menu-item ,(purecopy "Bubbles") bubbles |
1190 :help "Remove all bubbles using the fewest moves")) | 1189 :help ,(purecopy "Remove all bubbles using the fewest moves"))) |
1191 (define-key menu-bar-games-menu [black-box] | 1190 (define-key menu-bar-games-menu [black-box] |
1192 '(menu-item "Blackbox" blackbox | 1191 `(menu-item ,(purecopy "Blackbox") blackbox |
1193 :help "Find balls in a black box by shooting rays")) | 1192 :help ,(purecopy "Find balls in a black box by shooting rays"))) |
1194 (define-key menu-bar-games-menu [adventure] | 1193 (define-key menu-bar-games-menu [adventure] |
1195 '(menu-item "Adventure" dunnet | 1194 `(menu-item ,(purecopy "Adventure") dunnet |
1196 :help "Dunnet, a text Adventure game for Emacs")) | 1195 :help ,(purecopy "Dunnet, a text Adventure game for Emacs"))) |
1197 (define-key menu-bar-games-menu [5x5] | 1196 (define-key menu-bar-games-menu [5x5] |
1198 '(menu-item "5x5" 5x5 | 1197 `(menu-item ,(purecopy "5x5") 5x5 |
1199 :help "Fill in all the squares on a 5x5 board")) | 1198 :help ,(purecopy "Fill in all the squares on a 5x5 board"))) |
1200 | 1199 |
1201 (defvar menu-bar-encryption-decryption-menu | 1200 (defvar menu-bar-encryption-decryption-menu |
1202 (make-sparse-keymap "Encryption/Decryption")) | 1201 (make-sparse-keymap "Encryption/Decryption")) |
1203 | 1202 |
1204 (define-key menu-bar-tools-menu [encryption-decryption] | 1203 (define-key menu-bar-tools-menu [encryption-decryption] |
1205 (list 'menu-item "Encryption/Decryption" menu-bar-encryption-decryption-menu)) | 1204 `(menu-item ,(purecopy "Encryption/Decryption") menu-bar-encryption-decryption-menu)) |
1206 | 1205 |
1207 (define-key menu-bar-tools-menu [separator-encryption-decryption] | 1206 (define-key menu-bar-tools-menu [separator-encryption-decryption] |
1208 '("--")) | 1207 '("--")) |
1209 | 1208 |
1210 (define-key menu-bar-encryption-decryption-menu [insert-keys] | 1209 (define-key menu-bar-encryption-decryption-menu [insert-keys] |
1211 '(menu-item "Insert Keys" epa-insert-keys | 1210 `(menu-item ,(purecopy "Insert Keys") epa-insert-keys |
1212 :help "Insert public keys after the current point")) | 1211 :help ,(purecopy "Insert public keys after the current point"))) |
1213 | 1212 |
1214 (define-key menu-bar-encryption-decryption-menu [export-keys] | 1213 (define-key menu-bar-encryption-decryption-menu [export-keys] |
1215 '(menu-item "Export Keys" epa-export-keys | 1214 `(menu-item ,(purecopy "Export Keys") epa-export-keys |
1216 :help "Export public keys to a file")) | 1215 :help ,(purecopy "Export public keys to a file"))) |
1217 | 1216 |
1218 (define-key menu-bar-encryption-decryption-menu [import-keys-region] | 1217 (define-key menu-bar-encryption-decryption-menu [import-keys-region] |
1219 '(menu-item "Import Keys from Region" epa-import-keys-region | 1218 `(menu-item ,(purecopy "Import Keys from Region") epa-import-keys-region |
1220 :help "Import public keys from the current region")) | 1219 :help ,(purecopy "Import public keys from the current region"))) |
1221 | 1220 |
1222 (define-key menu-bar-encryption-decryption-menu [import-keys] | 1221 (define-key menu-bar-encryption-decryption-menu [import-keys] |
1223 '(menu-item "Import Keys from File..." epa-import-keys | 1222 `(menu-item ,(purecopy "Import Keys from File...") epa-import-keys |
1224 :help "Import public keys from a file")) | 1223 :help ,(purecopy "Import public keys from a file"))) |
1225 | 1224 |
1226 (define-key menu-bar-encryption-decryption-menu [list-keys] | 1225 (define-key menu-bar-encryption-decryption-menu [list-keys] |
1227 '(menu-item "List Keys" epa-list-keys | 1226 `(menu-item ,(purecopy "List Keys") epa-list-keys |
1228 :help "Browse your public keyring")) | 1227 :help ,(purecopy "Browse your public keyring"))) |
1229 | 1228 |
1230 (define-key menu-bar-encryption-decryption-menu [separator-keys] | 1229 (define-key menu-bar-encryption-decryption-menu [separator-keys] |
1231 '("--")) | 1230 '("--")) |
1232 | 1231 |
1233 (define-key menu-bar-encryption-decryption-menu [sign-region] | 1232 (define-key menu-bar-encryption-decryption-menu [sign-region] |
1234 '(menu-item "Sign Region" epa-sign-region | 1233 `(menu-item ,(purecopy "Sign Region") epa-sign-region |
1235 :help "Create digital signature of the current region")) | 1234 :help ,(purecopy "Create digital signature of the current region"))) |
1236 | 1235 |
1237 (define-key menu-bar-encryption-decryption-menu [verify-region] | 1236 (define-key menu-bar-encryption-decryption-menu [verify-region] |
1238 '(menu-item "Verify Region" epa-verify-region | 1237 `(menu-item ,(purecopy "Verify Region") epa-verify-region |
1239 :help "Verify digital signature of the current region")) | 1238 :help ,(purecopy "Verify digital signature of the current region"))) |
1240 | 1239 |
1241 (define-key menu-bar-encryption-decryption-menu [encrypt-region] | 1240 (define-key menu-bar-encryption-decryption-menu [encrypt-region] |
1242 '(menu-item "Encrypt Region" epa-encrypt-region | 1241 `(menu-item ,(purecopy "Encrypt Region") epa-encrypt-region |
1243 :help "Encrypt the current region")) | 1242 :help ,(purecopy "Encrypt the current region"))) |
1244 | 1243 |
1245 (define-key menu-bar-encryption-decryption-menu [decrypt-region] | 1244 (define-key menu-bar-encryption-decryption-menu [decrypt-region] |
1246 '(menu-item "Decrypt Region" epa-decrypt-region | 1245 `(menu-item ,(purecopy "Decrypt Region") epa-decrypt-region |
1247 :help "Decrypt the current region")) | 1246 :help ,(purecopy "Decrypt the current region"))) |
1248 | 1247 |
1249 (define-key menu-bar-encryption-decryption-menu [separator-file] | 1248 (define-key menu-bar-encryption-decryption-menu [separator-file] |
1250 '("--")) | 1249 '("--")) |
1251 | 1250 |
1252 (define-key menu-bar-encryption-decryption-menu [sign-file] | 1251 (define-key menu-bar-encryption-decryption-menu [sign-file] |
1253 '(menu-item "Sign File..." epa-sign-file | 1252 `(menu-item ,(purecopy "Sign File...") epa-sign-file |
1254 :help "Create digital signature of a file")) | 1253 :help ,(purecopy "Create digital signature of a file"))) |
1255 | 1254 |
1256 (define-key menu-bar-encryption-decryption-menu [verify-file] | 1255 (define-key menu-bar-encryption-decryption-menu [verify-file] |
1257 '(menu-item "Verify File..." epa-verify-file | 1256 `(menu-item ,(purecopy "Verify File...") epa-verify-file |
1258 :help "Verify digital signature of a file")) | 1257 :help ,(purecopy "Verify digital signature of a file"))) |
1259 | 1258 |
1260 (define-key menu-bar-encryption-decryption-menu [encrypt-file] | 1259 (define-key menu-bar-encryption-decryption-menu [encrypt-file] |
1261 '(menu-item "Encrypt File..." epa-encrypt-file | 1260 `(menu-item ,(purecopy "Encrypt File...") epa-encrypt-file |
1262 :help "Encrypt a file")) | 1261 :help ,(purecopy "Encrypt a file"))) |
1263 | 1262 |
1264 (define-key menu-bar-encryption-decryption-menu [decrypt-file] | 1263 (define-key menu-bar-encryption-decryption-menu [decrypt-file] |
1265 '(menu-item "Decrypt File..." epa-decrypt-file | 1264 `(menu-item ,(purecopy "Decrypt File...") epa-decrypt-file |
1266 :help "Decrypt a file")) | 1265 :help ,(purecopy "Decrypt a file"))) |
1267 | 1266 |
1268 (define-key menu-bar-tools-menu [simple-calculator] | 1267 (define-key menu-bar-tools-menu [simple-calculator] |
1269 '(menu-item "Simple Calculator" calculator | 1268 `(menu-item ,(purecopy "Simple Calculator") calculator |
1270 :help "Invoke the Emacs built-in quick calculator")) | 1269 :help ,(purecopy "Invoke the Emacs built-in quick calculator"))) |
1271 (define-key menu-bar-tools-menu [calc] | 1270 (define-key menu-bar-tools-menu [calc] |
1272 '(menu-item "Programmable Calculator" calc | 1271 `(menu-item ,(purecopy "Programmable Calculator") calc |
1273 :help "Invoke the Emacs built-in full scientific calculator")) | 1272 :help ,(purecopy "Invoke the Emacs built-in full scientific calculator"))) |
1274 (define-key menu-bar-tools-menu [calendar] | 1273 (define-key menu-bar-tools-menu [calendar] |
1275 '(menu-item "Calendar" calendar | 1274 `(menu-item ,(purecopy "Calendar") calendar |
1276 :help "Invoke the Emacs built-in calendar")) | 1275 :help ,(purecopy "Invoke the Emacs built-in calendar"))) |
1277 | 1276 |
1278 (define-key menu-bar-tools-menu [separator-net] | 1277 (define-key menu-bar-tools-menu [separator-net] |
1279 '("--")) | 1278 '("--")) |
1280 | 1279 |
1281 (define-key menu-bar-tools-menu [directory-search] | 1280 (define-key menu-bar-tools-menu [directory-search] |
1282 '(menu-item "Directory Search" eudc-tools-menu)) | 1281 `(menu-item ,(purecopy "Directory Search") eudc-tools-menu)) |
1283 (define-key menu-bar-tools-menu [compose-mail] | 1282 (define-key menu-bar-tools-menu [compose-mail] |
1284 (list | 1283 `(list |
1285 'menu-item `(format "Send Mail (with %s)" (send-mail-item-name)) | 1284 'menu-item `(format "Send Mail (with %s)" (send-mail-item-name)) |
1286 'compose-mail | 1285 'compose-mail |
1287 :visible `(and mail-user-agent (not (eq mail-user-agent 'ignore))) | 1286 :visible `(and mail-user-agent (not (eq mail-user-agent 'ignore))) |
1288 :help "Send a mail message")) | 1287 :help ,(purecopy "Send a mail message"))) |
1289 (define-key menu-bar-tools-menu [rmail] | 1288 (define-key menu-bar-tools-menu [rmail] |
1290 (list | 1289 `(list |
1291 'menu-item `(format "Read Mail (with %s)" (read-mail-item-name)) | 1290 'menu-item `(format "Read Mail (with %s)" (read-mail-item-name)) |
1292 'menu-bar-read-mail | 1291 'menu-bar-read-mail |
1293 :visible `(and read-mail-command (not (eq read-mail-command 'ignore))) | 1292 :visible `(and read-mail-command (not (eq read-mail-command 'ignore))) |
1294 :help "Read your mail and reply to it")) | 1293 :help ,(purecopy "Read your mail and reply to it"))) |
1295 | 1294 |
1296 (defun menu-bar-read-mail () | 1295 (defun menu-bar-read-mail () |
1297 "Read mail using `read-mail-command'." | 1296 "Read mail using `read-mail-command'." |
1298 (interactive) | 1297 (interactive) |
1299 (call-interactively read-mail-command)) | 1298 (call-interactively read-mail-command)) |
1300 | 1299 |
1301 (define-key menu-bar-tools-menu [gnus] | 1300 (define-key menu-bar-tools-menu [gnus] |
1302 '(menu-item "Read Net News (Gnus)" gnus | 1301 `(menu-item ,(purecopy "Read Net News (Gnus)") gnus |
1303 :help "Read network news groups")) | 1302 :help ,(purecopy "Read network news groups"))) |
1304 | 1303 |
1305 (define-key menu-bar-tools-menu [separator-vc] | 1304 (define-key menu-bar-tools-menu [separator-vc] |
1306 '("--")) | 1305 '("--")) |
1307 | 1306 |
1308 (define-key menu-bar-tools-menu [pcl-cvs] | 1307 (define-key menu-bar-tools-menu [pcl-cvs] |
1309 '(menu-item "PCL-CVS" cvs-global-menu)) | 1308 `(menu-item ,(purecopy "PCL-CVS") cvs-global-menu)) |
1310 (define-key menu-bar-tools-menu [vc] nil) ;Create the place for the VC menu. | 1309 (define-key menu-bar-tools-menu [vc] nil) ;Create the place for the VC menu. |
1311 | 1310 |
1312 (define-key menu-bar-tools-menu [separator-compare] | 1311 (define-key menu-bar-tools-menu [separator-compare] |
1313 '("--")) | 1312 '("--")) |
1314 | 1313 |
1315 (define-key menu-bar-tools-menu [ediff-misc] | 1314 (define-key menu-bar-tools-menu [ediff-misc] |
1316 '(menu-item "Ediff Miscellanea" menu-bar-ediff-misc-menu)) | 1315 `(menu-item ,(purecopy "Ediff Miscellanea") menu-bar-ediff-misc-menu)) |
1317 (define-key menu-bar-tools-menu [epatch] | 1316 (define-key menu-bar-tools-menu [epatch] |
1318 '(menu-item "Apply Patch" menu-bar-epatch-menu)) | 1317 `(menu-item ,(purecopy "Apply Patch") menu-bar-epatch-menu)) |
1319 (define-key menu-bar-tools-menu [ediff-merge] | 1318 (define-key menu-bar-tools-menu [ediff-merge] |
1320 '(menu-item "Merge" menu-bar-ediff-merge-menu)) | 1319 `(menu-item ,(purecopy "Merge") menu-bar-ediff-merge-menu)) |
1321 (define-key menu-bar-tools-menu [compare] | 1320 (define-key menu-bar-tools-menu [compare] |
1322 '(menu-item "Compare (Ediff)" menu-bar-ediff-menu)) | 1321 `(menu-item ,(purecopy "Compare (Ediff)") menu-bar-ediff-menu)) |
1323 | 1322 |
1324 (define-key menu-bar-tools-menu [separator-spell] | 1323 (define-key menu-bar-tools-menu [separator-spell] |
1325 '("--")) | 1324 '("--")) |
1326 | 1325 |
1327 (define-key menu-bar-tools-menu [spell] | 1326 (define-key menu-bar-tools-menu [spell] |
1328 '(menu-item "Spell Checking" ispell-menu-map)) | 1327 `(menu-item ,(purecopy "Spell Checking") ispell-menu-map)) |
1329 | 1328 |
1330 (define-key menu-bar-tools-menu [separator-prog] | 1329 (define-key menu-bar-tools-menu [separator-prog] |
1331 '("--")) | 1330 '("--")) |
1332 | 1331 |
1333 (define-key menu-bar-tools-menu [gdb] | 1332 (define-key menu-bar-tools-menu [gdb] |
1334 '(menu-item "Debugger (GDB)..." gdb | 1333 `(menu-item ,(purecopy "Debugger (GDB)...") gdb |
1335 :help "Debug a program from within Emacs with GDB")) | 1334 :help ,(purecopy "Debug a program from within Emacs with GDB"))) |
1336 (define-key menu-bar-tools-menu [shell-on-region] | 1335 (define-key menu-bar-tools-menu [shell-on-region] |
1337 '(menu-item "Shell Command on Region..." shell-command-on-region | 1336 `(menu-item ,(purecopy "Shell Command on Region...") shell-command-on-region |
1338 :enable mark-active | 1337 :enable mark-active |
1339 :help "Pass marked region to a shell command")) | 1338 :help ,(purecopy "Pass marked region to a shell command"))) |
1340 (define-key menu-bar-tools-menu [shell] | 1339 (define-key menu-bar-tools-menu [shell] |
1341 '(menu-item "Shell Command..." shell-command | 1340 `(menu-item ,(purecopy "Shell Command...") shell-command |
1342 :help "Invoke a shell command and catch its output")) | 1341 :help ,(purecopy "Invoke a shell command and catch its output"))) |
1343 (define-key menu-bar-tools-menu [compile] | 1342 (define-key menu-bar-tools-menu [compile] |
1344 '(menu-item "Compile..." compile | 1343 `(menu-item ,(purecopy "Compile...") compile |
1345 :help "Invoke compiler or Make, view compilation errors")) | 1344 :help ,(purecopy "Invoke compiler or Make, view compilation errors"))) |
1346 (define-key menu-bar-tools-menu [grep] | 1345 (define-key menu-bar-tools-menu [grep] |
1347 '(menu-item "Search Files (Grep)..." grep | 1346 `(menu-item ,(purecopy "Search Files (Grep)...") grep |
1348 :help "Search files for strings or regexps (with Grep)")) | 1347 :help ,(purecopy "Search files for strings or regexps (with Grep)"))) |
1349 | 1348 |
1350 | 1349 |
1351 ;; The "Help" menu items | 1350 ;; The "Help" menu items |
1352 | 1351 |
1353 (defvar menu-bar-describe-menu (make-sparse-keymap "Describe")) | 1352 (defvar menu-bar-describe-menu (make-sparse-keymap "Describe")) |
1354 | 1353 |
1355 (define-key menu-bar-describe-menu [mule-diag] | 1354 (define-key menu-bar-describe-menu [mule-diag] |
1356 '(menu-item "Show All of Mule Status" mule-diag | 1355 `(menu-item ,(purecopy "Show All of Mule Status") mule-diag |
1357 :visible (default-value 'enable-multibyte-characters) | 1356 :visible (default-value 'enable-multibyte-characters) |
1358 :help "Display multilingual environment settings")) | 1357 :help ,(purecopy "Display multilingual environment settings"))) |
1359 (define-key menu-bar-describe-menu [describe-coding-system-briefly] | 1358 (define-key menu-bar-describe-menu [describe-coding-system-briefly] |
1360 '(menu-item "Describe Coding System (Briefly)" | 1359 `(menu-item ,(purecopy "Describe Coding System (Briefly)") |
1361 describe-current-coding-system-briefly | 1360 describe-current-coding-system-briefly |
1362 :visible (default-value 'enable-multibyte-characters))) | 1361 :visible (default-value 'enable-multibyte-characters))) |
1363 (define-key menu-bar-describe-menu [describe-coding-system] | 1362 (define-key menu-bar-describe-menu [describe-coding-system] |
1364 '(menu-item "Describe Coding System..." describe-coding-system | 1363 `(menu-item ,(purecopy "Describe Coding System...") describe-coding-system |
1365 :visible (default-value 'enable-multibyte-characters))) | 1364 :visible (default-value 'enable-multibyte-characters))) |
1366 (define-key menu-bar-describe-menu [describe-input-method] | 1365 (define-key menu-bar-describe-menu [describe-input-method] |
1367 '(menu-item "Describe Input Method..." describe-input-method | 1366 `(menu-item ,(purecopy "Describe Input Method...") describe-input-method |
1368 :visible (default-value 'enable-multibyte-characters) | 1367 :visible (default-value 'enable-multibyte-characters) |
1369 :help "Keyboard layout for specific input method")) | 1368 :help ,(purecopy "Keyboard layout for specific input method"))) |
1370 (define-key menu-bar-describe-menu [describe-language-environment] | 1369 (define-key menu-bar-describe-menu [describe-language-environment] |
1371 (list 'menu-item "Describe Language Environment" | 1370 `(menu-item ,(purecopy "Describe Language Environment") |
1372 describe-language-environment-map)) | 1371 describe-language-environment-map)) |
1373 | 1372 |
1374 (define-key menu-bar-describe-menu [separator-desc-mule] | 1373 (define-key menu-bar-describe-menu [separator-desc-mule] |
1375 '("--")) | 1374 '("--")) |
1376 | 1375 |
1377 (define-key menu-bar-describe-menu [list-keybindings] | 1376 (define-key menu-bar-describe-menu [list-keybindings] |
1378 '(menu-item "List Key Bindings" describe-bindings | 1377 `(menu-item ,(purecopy "List Key Bindings") describe-bindings |
1379 :help "Display all current key bindings (keyboard shortcuts)")) | 1378 :help ,(purecopy "Display all current key bindings (keyboard shortcuts)"))) |
1380 (define-key menu-bar-describe-menu [describe-current-display-table] | 1379 (define-key menu-bar-describe-menu [describe-current-display-table] |
1381 '(menu-item "Describe Display Table" describe-current-display-table | 1380 `(menu-item ,(purecopy "Describe Display Table") describe-current-display-table |
1382 :help "Describe the current display table")) | 1381 :help ,(purecopy "Describe the current display table"))) |
1383 (define-key menu-bar-describe-menu [describe-face] | 1382 (define-key menu-bar-describe-menu [describe-face] |
1384 '(menu-item "Describe Face..." describe-face | 1383 `(menu-item ,(purecopy "Describe Face...") describe-face |
1385 :help "Display the properties of a face")) | 1384 :help ,(purecopy "Display the properties of a face"))) |
1386 (define-key menu-bar-describe-menu [describe-variable] | 1385 (define-key menu-bar-describe-menu [describe-variable] |
1387 '(menu-item "Describe Variable..." describe-variable | 1386 `(menu-item ,(purecopy "Describe Variable...") describe-variable |
1388 :help "Display documentation of variable/option")) | 1387 :help ,(purecopy "Display documentation of variable/option"))) |
1389 (define-key menu-bar-describe-menu [describe-function] | 1388 (define-key menu-bar-describe-menu [describe-function] |
1390 '(menu-item "Describe Function..." describe-function | 1389 `(menu-item ,(purecopy "Describe Function...") describe-function |
1391 :help "Display documentation of function/command")) | 1390 :help ,(purecopy "Display documentation of function/command"))) |
1392 (define-key menu-bar-describe-menu [describe-key-1] | 1391 (define-key menu-bar-describe-menu [describe-key-1] |
1393 '(menu-item "Describe Key or Mouse Operation..." describe-key | 1392 `(menu-item ,(purecopy "Describe Key or Mouse Operation...") describe-key |
1394 ;; Users typically don't identify keys and menu items... | 1393 ;; Users typically don't identify keys and menu items... |
1395 :help "Display documentation of command bound to a \ | 1394 :help ,(purecopy "Display documentation of command bound to a \ |
1396 key, a click, or a menu-item")) | 1395 key, a click, or a menu-item"))) |
1397 (define-key menu-bar-describe-menu [describe-mode] | 1396 (define-key menu-bar-describe-menu [describe-mode] |
1398 '(menu-item "Describe Buffer Modes" describe-mode | 1397 `(menu-item ,(purecopy "Describe Buffer Modes") describe-mode |
1399 :help "Describe this buffer's major and minor mode")) | 1398 :help ,(purecopy "Describe this buffer's major and minor mode"))) |
1400 | 1399 |
1401 (defvar menu-bar-search-documentation-menu | 1400 (defvar menu-bar-search-documentation-menu |
1402 (make-sparse-keymap "Search Documentation")) | 1401 (make-sparse-keymap "Search Documentation")) |
1403 (defun menu-bar-read-lispref () | 1402 (defun menu-bar-read-lispref () |
1404 "Display the Emacs Lisp Reference manual in Info mode." | 1403 "Display the Emacs Lisp Reference manual in Info mode." |
1426 (interactive "sSubject to look up: ") | 1425 (interactive "sSubject to look up: ") |
1427 (info "elisp") | 1426 (info "elisp") |
1428 (Info-index topic)) | 1427 (Info-index topic)) |
1429 | 1428 |
1430 (define-key menu-bar-search-documentation-menu [search-documentation-strings] | 1429 (define-key menu-bar-search-documentation-menu [search-documentation-strings] |
1431 '(menu-item "Search Documentation Strings..." apropos-documentation | 1430 `(menu-item ,(purecopy "Search Documentation Strings...") apropos-documentation |
1432 :help | 1431 :help |
1433 "Find functions and variables whose doc strings match a regexp")) | 1432 ,(purecopy "Find functions and variables whose doc strings match a regexp"))) |
1434 (define-key menu-bar-search-documentation-menu [find-any-object-by-name] | 1433 (define-key menu-bar-search-documentation-menu [find-any-object-by-name] |
1435 '(menu-item "Find Any Object by Name..." apropos | 1434 `(menu-item ,(purecopy "Find Any Object by Name...") apropos |
1436 :help "Find symbols of any kind whose names match a regexp")) | 1435 :help ,(purecopy "Find symbols of any kind whose names match a regexp"))) |
1437 (define-key menu-bar-search-documentation-menu [find-option-by-value] | 1436 (define-key menu-bar-search-documentation-menu [find-option-by-value] |
1438 '(menu-item "Find Options by Value..." apropos-value | 1437 `(menu-item ,(purecopy "Find Options by Value...") apropos-value |
1439 :help "Find variables whose values match a regexp")) | 1438 :help ,(purecopy "Find variables whose values match a regexp"))) |
1440 (define-key menu-bar-search-documentation-menu [find-options-by-name] | 1439 (define-key menu-bar-search-documentation-menu [find-options-by-name] |
1441 '(menu-item "Find Options by Name..." apropos-variable | 1440 `(menu-item ,(purecopy "Find Options by Name...") apropos-variable |
1442 :help "Find variables whose names match a regexp")) | 1441 :help ,(purecopy "Find variables whose names match a regexp"))) |
1443 (define-key menu-bar-search-documentation-menu [find-commands-by-name] | 1442 (define-key menu-bar-search-documentation-menu [find-commands-by-name] |
1444 '(menu-item "Find Commands by Name..." apropos-command | 1443 `(menu-item ,(purecopy "Find Commands by Name...") apropos-command |
1445 :help "Find commands whose names match a regexp")) | 1444 :help ,(purecopy "Find commands whose names match a regexp"))) |
1446 (define-key menu-bar-search-documentation-menu [sep1] | 1445 (define-key menu-bar-search-documentation-menu [sep1] |
1447 '("--")) | 1446 '("--")) |
1448 (define-key menu-bar-search-documentation-menu [lookup-command-in-manual] | 1447 (define-key menu-bar-search-documentation-menu [lookup-command-in-manual] |
1449 '(menu-item "Look Up Command in User Manual..." Info-goto-emacs-command-node | 1448 `(menu-item ,(purecopy "Look Up Command in User Manual...") Info-goto-emacs-command-node |
1450 :help "Display manual section that describes a command")) | 1449 :help ,(purecopy "Display manual section that describes a command"))) |
1451 (define-key menu-bar-search-documentation-menu [lookup-key-in-manual] | 1450 (define-key menu-bar-search-documentation-menu [lookup-key-in-manual] |
1452 '(menu-item "Look Up Key in User Manual..." Info-goto-emacs-key-command-node | 1451 `(menu-item ,(purecopy "Look Up Key in User Manual...") Info-goto-emacs-key-command-node |
1453 :help "Display manual section that describes a key")) | 1452 :help ,(purecopy "Display manual section that describes a key"))) |
1454 (define-key menu-bar-search-documentation-menu [lookup-subject-in-elisp-manual] | 1453 (define-key menu-bar-search-documentation-menu [lookup-subject-in-elisp-manual] |
1455 '(menu-item "Look Up Subject in ELisp Manual..." elisp-index-search | 1454 `(menu-item ,(purecopy "Look Up Subject in ELisp Manual...") elisp-index-search |
1456 :help "Find description of a subject in Emacs Lisp manual")) | 1455 :help ,(purecopy "Find description of a subject in Emacs Lisp manual"))) |
1457 (define-key menu-bar-search-documentation-menu [lookup-subject-in-emacs-manual] | 1456 (define-key menu-bar-search-documentation-menu [lookup-subject-in-emacs-manual] |
1458 '(menu-item "Look Up Subject in User Manual..." emacs-index-search | 1457 `(menu-item ,(purecopy "Look Up Subject in User Manual...") emacs-index-search |
1459 :help "Find description of a subject in Emacs User manual")) | 1458 :help ,(purecopy "Find description of a subject in Emacs User manual"))) |
1460 (define-key menu-bar-search-documentation-menu [emacs-terminology] | 1459 (define-key menu-bar-search-documentation-menu [emacs-terminology] |
1461 '(menu-item "Emacs Terminology" search-emacs-glossary | 1460 `(menu-item ,(purecopy "Emacs Terminology") search-emacs-glossary |
1462 :help "Display the Glossary section of the Emacs manual")) | 1461 :help ,(purecopy "Display the Glossary section of the Emacs manual"))) |
1463 | 1462 |
1464 (defvar menu-bar-manuals-menu (make-sparse-keymap "More Manuals")) | 1463 (defvar menu-bar-manuals-menu (make-sparse-keymap "More Manuals")) |
1465 | 1464 |
1466 (define-key menu-bar-manuals-menu [man] | 1465 (define-key menu-bar-manuals-menu [man] |
1467 '(menu-item "Read Man Page..." manual-entry | 1466 `(menu-item ,(purecopy "Read Man Page...") manual-entry |
1468 :help "Man-page docs for external commands and libraries")) | 1467 :help ,(purecopy "Man-page docs for external commands and libraries"))) |
1469 (define-key menu-bar-manuals-menu [sep2] | 1468 (define-key menu-bar-manuals-menu [sep2] |
1470 '("--")) | 1469 '("--")) |
1471 (define-key menu-bar-manuals-menu [order-emacs-manuals] | 1470 (define-key menu-bar-manuals-menu [order-emacs-manuals] |
1472 '(menu-item "Ordering Manuals" view-order-manuals | 1471 `(menu-item ,(purecopy "Ordering Manuals") view-order-manuals |
1473 :help "How to order manuals from the Free Software Foundation")) | 1472 :help ,(purecopy "How to order manuals from the Free Software Foundation"))) |
1474 (define-key menu-bar-manuals-menu [lookup-subject-in-all-manuals] | 1473 (define-key menu-bar-manuals-menu [lookup-subject-in-all-manuals] |
1475 '(menu-item "Lookup Subject in all Manuals..." info-apropos | 1474 `(menu-item ,(purecopy "Lookup Subject in all Manuals...") info-apropos |
1476 :help "Find description of a subject in all installed manuals")) | 1475 :help ,(purecopy "Find description of a subject in all installed manuals"))) |
1477 (define-key menu-bar-manuals-menu [other-manuals] | 1476 (define-key menu-bar-manuals-menu [other-manuals] |
1478 '(menu-item "All Other Manuals (Info)" Info-directory | 1477 `(menu-item ,(purecopy "All Other Manuals (Info)") Info-directory |
1479 :help "Read any of the installed manuals")) | 1478 :help ,(purecopy "Read any of the installed manuals"))) |
1480 (define-key menu-bar-manuals-menu [emacs-lisp-reference] | 1479 (define-key menu-bar-manuals-menu [emacs-lisp-reference] |
1481 '(menu-item "Emacs Lisp Reference" menu-bar-read-lispref | 1480 `(menu-item ,(purecopy "Emacs Lisp Reference") menu-bar-read-lispref |
1482 :help "Read the Emacs Lisp Reference manual")) | 1481 :help ,(purecopy "Read the Emacs Lisp Reference manual"))) |
1483 (define-key menu-bar-manuals-menu [emac-lisp-intro] | 1482 (define-key menu-bar-manuals-menu [emac-lisp-intro] |
1484 '(menu-item "Introduction to Emacs Lisp" menu-bar-read-lispintro | 1483 `(menu-item ,(purecopy "Introduction to Emacs Lisp") menu-bar-read-lispintro |
1485 :help "Read the Introduction to Emacs Lisp Programming")) | 1484 :help ,(purecopy "Read the Introduction to Emacs Lisp Programming"))) |
1486 | 1485 |
1487 (define-key menu-bar-help-menu [about-gnu-project] | 1486 (define-key menu-bar-help-menu [about-gnu-project] |
1488 '(menu-item "About GNU" describe-gnu-project | 1487 `(menu-item ,(purecopy "About GNU") describe-gnu-project |
1489 :help "About the GNU System, GNU Project, and GNU/Linux")) | 1488 :help ,(purecopy "About the GNU System, GNU Project, and GNU/Linux"))) |
1490 (define-key menu-bar-help-menu [about-emacs] | 1489 (define-key menu-bar-help-menu [about-emacs] |
1491 '(menu-item "About Emacs" about-emacs | 1490 `(menu-item ,(purecopy "About Emacs") about-emacs |
1492 :help "Display version number, copyright info, and basic help")) | 1491 :help ,(purecopy "Display version number, copyright info, and basic help"))) |
1493 (define-key menu-bar-help-menu [sep4] | 1492 (define-key menu-bar-help-menu [sep4] |
1494 '("--")) | 1493 '("--")) |
1495 (define-key menu-bar-help-menu [describe-no-warranty] | 1494 (define-key menu-bar-help-menu [describe-no-warranty] |
1496 '(menu-item "(Non)Warranty" describe-no-warranty | 1495 `(menu-item ,(purecopy "(Non)Warranty") describe-no-warranty |
1497 :help "Explain that Emacs has NO WARRANTY")) | 1496 :help ,(purecopy "Explain that Emacs has NO WARRANTY"))) |
1498 (define-key menu-bar-help-menu [describe-copying] | 1497 (define-key menu-bar-help-menu [describe-copying] |
1499 '(menu-item "Copying Conditions" describe-copying | 1498 `(menu-item ,(purecopy "Copying Conditions") describe-copying |
1500 :help "Show the Emacs license (GPL)")) | 1499 :help ,(purecopy "Show the Emacs license (GPL)"))) |
1501 (define-key menu-bar-help-menu [getting-new-versions] | 1500 (define-key menu-bar-help-menu [getting-new-versions] |
1502 '(menu-item "Getting New Versions" describe-distribution | 1501 `(menu-item ,(purecopy "Getting New Versions") describe-distribution |
1503 :help "How to get the latest version of Emacs")) | 1502 :help ,(purecopy "How to get the latest version of Emacs"))) |
1504 (defun menu-bar-help-extra-packages () | 1503 (defun menu-bar-help-extra-packages () |
1505 "Display help about some additional packages available for Emacs." | 1504 "Display help about some additional packages available for Emacs." |
1506 (interactive) | 1505 (interactive) |
1507 (let (enable-local-variables) | 1506 (let (enable-local-variables) |
1508 (view-file (expand-file-name "MORE.STUFF" | 1507 (view-file (expand-file-name "MORE.STUFF" |
1509 data-directory)) | 1508 data-directory)) |
1510 (goto-address-mode 1))) | 1509 (goto-address-mode 1))) |
1511 (define-key menu-bar-help-menu [sep2] | 1510 (define-key menu-bar-help-menu [sep2] |
1512 '("--")) | 1511 '("--")) |
1513 (define-key menu-bar-help-menu [external-packages] | 1512 (define-key menu-bar-help-menu [external-packages] |
1514 '(menu-item "External Packages" menu-bar-help-extra-packages | 1513 `(menu-item ,(purecopy "External Packages") menu-bar-help-extra-packages |
1515 :help "Lisp packages distributed separately for use in Emacs")) | 1514 :help ,(purecopy "Lisp packages distributed separately for use in Emacs"))) |
1516 (define-key menu-bar-help-menu [find-emacs-packages] | 1515 (define-key menu-bar-help-menu [find-emacs-packages] |
1517 '(menu-item "Find Emacs Packages" finder-by-keyword | 1516 `(menu-item ,(purecopy "Find Emacs Packages") finder-by-keyword |
1518 :help "Find packages and features by keyword")) | 1517 :help ,(purecopy "Find packages and features by keyword"))) |
1519 (define-key menu-bar-help-menu [more-manuals] | 1518 (define-key menu-bar-help-menu [more-manuals] |
1520 (list 'menu-item "More Manuals" menu-bar-manuals-menu)) | 1519 `(menu-item ,(purecopy "More Manuals") menu-bar-manuals-menu)) |
1521 (define-key menu-bar-help-menu [emacs-manual] | 1520 (define-key menu-bar-help-menu [emacs-manual] |
1522 '(menu-item "Read the Emacs Manual" info-emacs-manual | 1521 `(menu-item ,(purecopy "Read the Emacs Manual") info-emacs-manual |
1523 :help "Full documentation of Emacs features")) | 1522 :help ,(purecopy "Full documentation of Emacs features"))) |
1524 (define-key menu-bar-help-menu [describe] | 1523 (define-key menu-bar-help-menu [describe] |
1525 (list 'menu-item "Describe" menu-bar-describe-menu)) | 1524 `(menu-item ,(purecopy "Describe") menu-bar-describe-menu)) |
1526 (define-key menu-bar-help-menu [search-documentation] | 1525 (define-key menu-bar-help-menu [search-documentation] |
1527 (list 'menu-item "Search Documentation" menu-bar-search-documentation-menu)) | 1526 `(menu-item ,(purecopy "Search Documentation") menu-bar-search-documentation-menu)) |
1528 (define-key menu-bar-help-menu [sep1] | 1527 (define-key menu-bar-help-menu [sep1] |
1529 '("--")) | 1528 '("--")) |
1530 (define-key menu-bar-help-menu [emacs-psychotherapist] | 1529 (define-key menu-bar-help-menu [emacs-psychotherapist] |
1531 '(menu-item "Emacs Psychotherapist" doctor | 1530 `(menu-item ,(purecopy "Emacs Psychotherapist") doctor |
1532 :help "Our doctor will help you feel better")) | 1531 :help ,(purecopy "Our doctor will help you feel better"))) |
1533 (define-key menu-bar-help-menu [send-emacs-bug-report] | 1532 (define-key menu-bar-help-menu [send-emacs-bug-report] |
1534 '(menu-item "Send Bug Report..." report-emacs-bug | 1533 `(menu-item ,(purecopy "Send Bug Report...") report-emacs-bug |
1535 :help "Send e-mail to Emacs maintainers")) | 1534 :help ,(purecopy "Send e-mail to Emacs maintainers"))) |
1536 (define-key menu-bar-help-menu [emacs-known-problems] | 1535 (define-key menu-bar-help-menu [emacs-known-problems] |
1537 '(menu-item "Emacs Known Problems" view-emacs-problems | 1536 `(menu-item ,(purecopy "Emacs Known Problems") view-emacs-problems |
1538 :help "Read about known problems with Emacs")) | 1537 :help ,(purecopy "Read about known problems with Emacs"))) |
1539 (define-key menu-bar-help-menu [emacs-news] | 1538 (define-key menu-bar-help-menu [emacs-news] |
1540 '(menu-item "Emacs News" view-emacs-news | 1539 `(menu-item ,(purecopy "Emacs News") view-emacs-news |
1541 :help "New features of this version")) | 1540 :help ,(purecopy "New features of this version"))) |
1542 (define-key menu-bar-help-menu [emacs-faq] | 1541 (define-key menu-bar-help-menu [emacs-faq] |
1543 '(menu-item "Emacs FAQ" view-emacs-FAQ | 1542 `(menu-item ,(purecopy "Emacs FAQ") view-emacs-FAQ |
1544 :help "Frequently asked (and answered) questions about Emacs")) | 1543 :help ,(purecopy "Frequently asked (and answered) questions about Emacs"))) |
1545 | 1544 |
1546 (defun help-with-tutorial-spec-language () | 1545 (defun help-with-tutorial-spec-language () |
1547 "Use the Emacs tutorial, specifying which language you want." | 1546 "Use the Emacs tutorial, specifying which language you want." |
1548 (interactive) | 1547 (interactive) |
1549 (help-with-tutorial t)) | 1548 (help-with-tutorial t)) |
1550 | 1549 |
1551 (define-key menu-bar-help-menu [emacs-tutorial-language-specific] | 1550 (define-key menu-bar-help-menu [emacs-tutorial-language-specific] |
1552 '(menu-item "Emacs Tutorial (choose language)..." | 1551 `(menu-item ,(purecopy "Emacs Tutorial (choose language)...") |
1553 help-with-tutorial-spec-language | 1552 help-with-tutorial-spec-language |
1554 :help "Learn how to use Emacs (choose a language)")) | 1553 :help ,(purecopy "Learn how to use Emacs (choose a language)"))) |
1555 (define-key menu-bar-help-menu [emacs-tutorial] | 1554 (define-key menu-bar-help-menu [emacs-tutorial] |
1556 '(menu-item "Emacs Tutorial" help-with-tutorial | 1555 `(menu-item ,(purecopy "Emacs Tutorial") help-with-tutorial |
1557 :help "Learn how to use Emacs")) | 1556 :help ,(purecopy "Learn how to use Emacs"))) |
1558 | 1557 |
1559 (defun menu-bar-menu-frame-live-and-visible-p () | 1558 (defun menu-bar-menu-frame-live-and-visible-p () |
1560 "Return non-nil if the menu frame is alive and visible. | 1559 "Return non-nil if the menu frame is alive and visible. |
1561 The menu frame is the frame for which we are updating the menu." | 1560 The menu frame is the frame for which we are updating the menu." |
1562 (let ((menu-frame (or menu-updating-frame (selected-frame)))) | 1561 (let ((menu-frame (or menu-updating-frame (selected-frame)))) |
1867 (define-key map [menu-bar minibuf] | 1866 (define-key map [menu-bar minibuf] |
1868 (cons "Minibuf" (make-sparse-keymap "Minibuf")))) | 1867 (cons "Minibuf" (make-sparse-keymap "Minibuf")))) |
1869 | 1868 |
1870 (let ((map minibuffer-local-completion-map)) | 1869 (let ((map minibuffer-local-completion-map)) |
1871 (define-key map [menu-bar minibuf ?\?] | 1870 (define-key map [menu-bar minibuf ?\?] |
1872 (list 'menu-item "List Completions" 'minibuffer-completion-help | 1871 `(menu-item ,(purecopy "List Completions") 'minibuffer-completion-help |
1873 :help "Display all possible completions")) | 1872 :help ,(purecopy "Display all possible completions"))) |
1874 (define-key map [menu-bar minibuf space] | 1873 (define-key map [menu-bar minibuf space] |
1875 (list 'menu-item "Complete Word" 'minibuffer-complete-word | 1874 `(menu-item ,(purecopy "Complete Word") 'minibuffer-complete-word |
1876 :help "Complete at most one word")) | 1875 :help ,(purecopy "Complete at most one word"))) |
1877 (define-key map [menu-bar minibuf tab] | 1876 (define-key map [menu-bar minibuf tab] |
1878 (list 'menu-item "Complete" 'minibuffer-complete | 1877 `(menu-item ,(purecopy "Complete") 'minibuffer-complete |
1879 :help "Complete as far as possible"))) | 1878 :help ,(purecopy "Complete as far as possible")))) |
1880 | 1879 |
1881 (let ((map minibuffer-local-map)) | 1880 (let ((map minibuffer-local-map)) |
1882 (define-key map [menu-bar minibuf quit] | 1881 (define-key map [menu-bar minibuf quit] |
1883 (list 'menu-item "Quit" 'abort-recursive-edit | 1882 `(menu-item ,(purecopy "Quit") 'abort-recursive-edit |
1884 :help "Abort input and exit minibuffer")) | 1883 :help ,(purecopy "Abort input and exit minibuffer"))) |
1885 (define-key map [menu-bar minibuf return] | 1884 (define-key map [menu-bar minibuf return] |
1886 (list 'menu-item "Enter" 'exit-minibuffer | 1885 `(menu-item ,(purecopy "Enter") 'exit-minibuffer |
1887 :key-sequence "\r" | 1886 :key-sequence "\r" |
1888 :help "Terminate input and exit minibuffer")) | 1887 :help ,(purecopy "Terminate input and exit minibuffer"))) |
1889 (define-key map [menu-bar minibuf isearch-forward] | 1888 (define-key map [menu-bar minibuf isearch-forward] |
1890 (list 'menu-item "Isearch History Forward" 'isearch-forward | 1889 `(menu-item ,(purecopy "Isearch History Forward") 'isearch-forward |
1891 :help "Incrementally search minibuffer history forward")) | 1890 :help ,(purecopy "Incrementally search minibuffer history forward"))) |
1892 (define-key map [menu-bar minibuf isearch-backward] | 1891 (define-key map [menu-bar minibuf isearch-backward] |
1893 (list 'menu-item "Isearch History Backward" 'isearch-backward | 1892 `(menu-item ,(purecopy "Isearch History Backward") 'isearch-backward |
1894 :help "Incrementally search minibuffer history backward")) | 1893 :help ,(purecopy "Incrementally search minibuffer history backward"))) |
1895 (define-key map [menu-bar minibuf next] | 1894 (define-key map [menu-bar minibuf next] |
1896 (list 'menu-item "Next History Item" 'next-history-element | 1895 `(menu-item ,(purecopy "Next History Item") 'next-history-element |
1897 :help "Put next minibuffer history element in the minibuffer")) | 1896 :help ,(purecopy "Put next minibuffer history element in the minibuffer"))) |
1898 (define-key map [menu-bar minibuf previous] | 1897 (define-key map [menu-bar minibuf previous] |
1899 (list 'menu-item "Previous History Item" 'previous-history-element | 1898 `(menu-item ,(purecopy "Previous History Item") 'previous-history-element |
1900 :help "Put previous minibuffer history element in the minibuffer"))) | 1899 :help ,(purecopy "Put previous minibuffer history element in the minibuffer")))) |
1901 | 1900 |
1902 ;;;###autoload | 1901 ;;;###autoload |
1903 ;; This comment is taken from tool-bar.el near | 1902 ;; This comment is taken from tool-bar.el near |
1904 ;; (put 'tool-bar-mode ...) | 1903 ;; (put 'tool-bar-mode ...) |
1905 ;; We want to pretend the menu bar by standard is on, as this will make | 1904 ;; We want to pretend the menu bar by standard is on, as this will make |