Mercurial > hg > xemacs-beta
annotate lisp/menubar-items.el @ 5043:d0c14ea98592
various frame-geometry fixes
-------------------- ChangeLog entries follow: --------------------
src/ChangeLog addition:
2010-02-15 Ben Wing <ben@xemacs.org>
* EmacsFrame.c:
* EmacsFrame.c (EmacsFrameResize):
* console-msw-impl.h:
* console-msw-impl.h (struct mswindows_frame):
* console-msw-impl.h (FRAME_MSWINDOWS_TARGET_RECT):
* device-tty.c:
* device-tty.c (tty_asynch_device_change):
* event-msw.c:
* event-msw.c (mswindows_wnd_proc):
* faces.c (Fface_list):
* faces.h:
* frame-gtk.c:
* frame-gtk.c (gtk_set_initial_frame_size):
* frame-gtk.c (gtk_set_frame_size):
* frame-msw.c:
* frame-msw.c (mswindows_init_frame_1):
* frame-msw.c (mswindows_set_frame_size):
* frame-msw.c (mswindows_size_frame_internal):
* frame-msw.c (msprinter_init_frame_3):
* frame.c:
* frame.c (enum):
* frame.c (Fmake_frame):
* frame.c (adjust_frame_size):
* frame.c (store_minibuf_frame_prop):
* frame.c (Fframe_property):
* frame.c (Fframe_properties):
* frame.c (Fframe_displayable_pixel_height):
* frame.c (Fframe_displayable_pixel_width):
* frame.c (internal_set_frame_size):
* frame.c (Fset_frame_height):
* frame.c (Fset_frame_pixel_height):
* frame.c (Fset_frame_displayable_pixel_height):
* frame.c (Fset_frame_width):
* frame.c (Fset_frame_pixel_width):
* frame.c (Fset_frame_displayable_pixel_width):
* frame.c (Fset_frame_size):
* frame.c (Fset_frame_pixel_size):
* frame.c (Fset_frame_displayable_pixel_size):
* frame.c (frame_conversion_internal_1):
* frame.c (get_frame_displayable_pixel_size):
* frame.c (change_frame_size_1):
* frame.c (change_frame_size):
* frame.c (generate_title_string):
* frame.h:
* gtk-xemacs.c:
* gtk-xemacs.c (gtk_xemacs_size_request):
* gtk-xemacs.c (gtk_xemacs_size_allocate):
* gtk-xemacs.c (gtk_xemacs_paint):
* gutter.c:
* gutter.c (update_gutter_geometry):
* redisplay.c (end_hold_frame_size_changes):
* redisplay.c (redisplay_frame):
* toolbar.c:
* toolbar.c (update_frame_toolbars_geometry):
* window.c:
* window.c (frame_pixsize_valid_p):
* window.c (check_frame_size):
Various fixes to frame geometry to make it a bit easier to understand
and fix some bugs.
1. IMPORTANT: Some renamings. Will need to be applied carefully to
the carbon repository, in the following order:
-- pixel_to_char_size -> pixel_to_frame_unit_size
-- char_to_pixel_size -> frame_unit_to_pixel_size
-- pixel_to_real_char_size -> pixel_to_char_size
-- char_to_real_pixel_size -> char_to_pixel_size
-- Reverse second and third arguments of change_frame_size() and
change_frame_size_1() to try to make functions consistent in
putting width before height.
-- Eliminate old round_size_to_char, because it didn't really
do anything differently from round_size_to_real_char()
-- round_size_to_real_char -> round_size_to_char; any places that
called the old round_size_to_char should just call the new one.
2. IMPORTANT FOR CARBON: The set_frame_size() method is now passed
sizes in "frame units", like all other frame-sizing functions,
rather than some hacked-up combination of char-cell units and
total pixel size. This only affects window systems that use
"pixelated geometry", and I'm not sure if Carbon is one of them.
MS Windows is pixelated, X and GTK are not. For pixelated-geometry
systems, the size in set_frame_size() is in displayable pixels
rather than total pixels and needs to be converted appropriately;
take a look at the changes made to mswindows_set_frame_size()
method if necessary.
3. Add a big long comment in frame.c describing how frame geometry
works.
4. Remove MS Windows-specific character height and width fields,
duplicative and unused.
5. frame-displayable-pixel-* and set-frame-displayable-pixel-*
didn't use to work on MS Windows, but they do now.
6. In general, clean up the handling of "pixelated geometry" so
that fewer functions have to worry about this. This is really
an abomination that should be removed entirely but that will
have to happen later. Fix some buggy code in
frame_conversion_internal() that happened to "work" because it
was countered by oppositely buggy code in change_frame_size().
7. Clean up some frame-size code in toolbar.c and use functions
already provided in frame.c instead of rolling its own.
8. Fix check_frame_size() in window.c, which formerly didn't take
pixelated geometry into account.
author | Ben Wing <ben@xemacs.org> |
---|---|
date | Mon, 15 Feb 2010 22:14:11 -0600 |
parents | e29fcfd8df5f |
children | cd167465bf69 308d34e9f07d |
rev | line source |
---|---|
428 | 1 ;;; menubar-items.el --- Menubar and popup-menu content for XEmacs. |
2 | |
3 ;; Copyright (C) 1991-1995, 1997-1998 Free Software Foundation, Inc. | |
4 ;; Copyright (C) 1995 Tinker Systems and INS Engineering Corp. | |
5 ;; Copyright (C) 1995 Sun Microsystems. | |
1275 | 6 ;; Copyright (C) 1995, 1996, 2000, 2001, 2002, 2003 Ben Wing. |
442 | 7 ;; Copyright (C) 1997 MORIOKA Tomohiko. |
428 | 8 |
9 ;; Maintainer: XEmacs Development Team | |
10 ;; Keywords: frames, extensions, internal, dumped | |
11 | |
12 ;; This file is part of XEmacs. | |
13 | |
14 ;; XEmacs is free software; you can redistribute it and/or modify it | |
15 ;; under the terms of the GNU General Public License as published by | |
16 ;; the Free Software Foundation; either version 2, or (at your option) | |
17 ;; any later version. | |
18 | |
19 ;; XEmacs is distributed in the hope that it will be useful, but | |
20 ;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
21 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
22 ;; General Public License for more details. | |
23 | |
24 ;; You should have received a copy of the GNU General Public License | |
25 ;; along with Xmacs; see the file COPYING. If not, write to the | |
26 ;; Free Software Foundation, 59 Temple Place - Suite 330, | |
27 ;; Boston, MA 02111-1307, USA. | |
28 | |
442 | 29 ;;; Authorship: |
30 | |
31 ;; Created c. 1991 for Lucid Emacs. Originally called x-menubar.el. | |
32 ;; Contained four menus -- File, Edit, Buffers, Help. | |
33 ;; Dynamic menu changes possible only through activate-menubar-hook. | |
34 ;; Also contained menu manipulation funs, e.g. find-menu-item, add-menu. | |
35 ;; Options menu added for 19.9 by Jamie Zawinski, late 1993. | |
36 ;; Major reorganization c. 1994 by Ben Wing; added many items and moved | |
37 ;; some items to two new menus, Apps and Tools. (for 19.10?) | |
38 ;; Generic menubar functions moved to new file, menubar.el, by Ben Wing, | |
39 ;; 1995, for 19.12; also, creation of current buffers menu options, | |
40 ;; and buffers menu changed from purely most-recent to sorted alphabetical, | |
41 ;; by mode. Also added mode-popup-menu support. | |
42 ;; New API (add-submenu, add-menu-button) and menu filter support added | |
43 ;; late summer 1995 by Stig, for 19.13. Also popup-menubar-menu. | |
44 ;; Renamed to menubar-items.el c. 1998, with MS Win support. | |
45 ;; Options menu rewritten to use custom c. 1999 by ? (Jan Vroonhof?). | |
46 ;; Major reorganization Mar. 2000 by Ben Wing; added many items and changed | |
47 ;; top-level menus to File, Edit, View, Cmds, Tools, Options, Buffers. | |
48 ;; Accelerator spec functionality added Mar. 2000 by Ben Wing. | |
49 | |
428 | 50 ;;; Commentary: |
51 | |
52 ;; This file is dumped with XEmacs (when window system and menubar support is | |
53 ;; compiled in). | |
54 | |
55 ;;; Code: | |
56 | |
679 | 57 (defun Menubar-items-truncate-history (list count label-length) |
58 "Truncate a history LIST to first COUNT items. | |
59 Return a list of (label value) lists with labels truncated to last | |
60 LABEL-LENGTH characters of value." | |
464 | 61 (mapcar #'(lambda (x) |
679 | 62 (if (<= (length x) label-length) |
63 (list x x) | |
64 (list | |
65 (concat "..." (substring x (- label-length))) x))) | |
66 (if (<= (length list) count) | |
464 | 67 list |
679 | 68 (butlast list (- (length list) count))))) |
442 | 69 |
771 | 70 |
71 (defun coding-system-menu-filter (fun active &optional dots) | |
72 "Filter for menu entries with a submenu listing all coding systems. | |
73 This is for operations that take a coding system as an argument. FUN | |
74 should be a function of one argument, which will be a coding system symbol. | |
75 ACTIVE should be a function one argument (again, a coding system symbol), | |
76 indicating whether the entry is active. If DOTS is given, the menu entries | |
77 will have three dots appended. | |
78 | |
79 Write your filter like this: | |
80 | |
81 :filter | |
82 (lambda (menu) | |
83 (lambda (entry) ...) | |
84 (lambda (entry) ...)) | |
85 " | |
2545 | 86 (menu-split-long-menu-and-sort |
87 (mapcar | |
88 #'(lambda (_csmf_entry) | |
89 `[ ,(concat (coding-system-description _csmf_entry) | |
90 (if dots "..." "")) | |
91 (funcall ,fun ',_csmf_entry) | |
92 :active (funcall ,active ',_csmf_entry) | |
93 ]) | |
94 (delete-if | |
95 #'(lambda (name) | |
96 (or (coding-system-alias-p name) | |
97 (not (eq name (coding-system-name | |
98 (coding-system-base name)))))) | |
99 (coding-system-list))))) | |
771 | 100 |
428 | 101 (defconst default-menubar |
4372
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
102 ;; This is backquoted; a lambda with a preceding , will be byte-compiled. |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
103 `(("%_File" |
442 | 104 ["%_Open..." find-file] |
105 ["Open in Other %_Window..." find-file-other-window] | |
106 ["Open in New %_Frame..." find-file-other-frame] | |
771 | 107 ("Open with Specified %_Encoding" |
108 :filter | |
4372
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
109 ,#'(lambda (menu) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
110 (coding-system-menu-filter |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
111 (lambda (entry) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
112 (let ((coding-system-for-read entry)) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
113 (call-interactively 'find-file))) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
114 (lambda (entry) t) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
115 t))) |
442 | 116 ["%_Hex Edit File..." hexl-find-file |
117 :active (fboundp 'hexl-find-file)] | |
118 ["%_Insert File..." insert-file] | |
119 ["%_View File..." view-file] | |
428 | 120 "------" |
788 | 121 ["%_New Frame" make-frame] |
122 ["Frame on Other %_Display..." make-frame-on-display | |
123 :active (fboundp 'make-frame-on-display)] | |
124 ["%_Close Frame" delete-frame | |
125 :active (not (eq (next-frame (selected-frame) 'nomini 'window-system) | |
126 (selected-frame)))] | |
127 "-----" | |
442 | 128 ["%_Save" save-buffer |
428 | 129 :active (buffer-modified-p) |
130 :suffix (if put-buffer-names-in-file-menu (buffer-name) "")] | |
442 | 131 ["Save %_As..." write-file] |
132 ["Save So%_me Buffers" save-some-buffers] | |
428 | 133 "-----" |
903 | 134 ,@(if (valid-specifier-tag-p 'msprinter) |
4372
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
135 '(["Page Set%_up..." generic-page-setup])) |
442 | 136 ["%_Print" generic-print-buffer |
137 :active (or (valid-specifier-tag-p 'msprinter) | |
138 (and (not (eq system-type 'windows-nt)) | |
506 | 139 (fboundp 'lpr-region))) |
510 | 140 :suffix (if (region-active-p) "Selection..." |
141 (if put-buffer-names-in-file-menu (concat (buffer-name) "...") | |
142 "..."))] | |
903 | 143 ,@(unless (valid-specifier-tag-p 'msprinter) |
506 | 144 '(["Prett%_y-Print" ps-print-buffer-with-faces |
145 :active (fboundp 'ps-print-buffer-with-faces) | |
146 :suffix (if put-buffer-names-in-file-menu (buffer-name) "")])) | |
428 | 147 "-----" |
442 | 148 ["%_Revert Buffer" revert-buffer |
428 | 149 :active (or buffer-file-name revert-buffer-function) |
150 :suffix (if put-buffer-names-in-file-menu (buffer-name) "")] | |
793 | 151 ("Rever%_t/Recover" |
4372
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
152 ("Revert Buffer with Specified %_Encoding" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
153 :filter |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
154 ,#'(lambda (menu) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
155 (coding-system-menu-filter |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
156 (lambda (entry) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
157 (let ((coding-system-for-read entry)) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
158 (revert-buffer))) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
159 (lambda (entry) (or buffer-file-name revert-buffer-function)) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
160 t))) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
161 ["Re%_cover Buffer from Autosave" (recover-file buffer-file-name) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
162 :active buffer-file-name |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
163 :suffix (if put-buffer-names-in-file-menu (buffer-name) "")] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
164 ["Recover %_Session..." recover-session] |
771 | 165 ) |
428 | 166 "-----" |
442 | 167 ["E%_xit XEmacs" save-buffers-kill-emacs] |
428 | 168 ) |
169 | |
442 | 170 ("%_Edit" |
4372
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
171 ["%_Undo" undo |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
172 :active (and (not (eq buffer-undo-list t)) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
173 (or buffer-undo-list pending-undo-list)) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
174 :suffix (if (eq last-command 'undo) "More" "")] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
175 ["%_Redo" redo |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
176 :included (fboundp 'redo) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
177 :active (not (or (eq buffer-undo-list t) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
178 (eq last-buffer-undo-list nil) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
179 (not (or (eq last-buffer-undo-list buffer-undo-list) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
180 (and (null (car-safe buffer-undo-list)) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
181 (eq last-buffer-undo-list |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
182 (cdr-safe buffer-undo-list))))) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
183 (or (eq buffer-undo-list pending-undo-list) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
184 (eq (cdr buffer-undo-list) pending-undo-list)))) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
185 :suffix (if (eq last-command 'redo) "More" "")] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
186 "----" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
187 ["Cu%_t" kill-primary-selection |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
188 :active (selection-owner-p)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
189 ["%_Copy" copy-primary-selection |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
190 :active (selection-owner-p)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
191 ["%_Paste" yank-clipboard-selection |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
192 :active (selection-exists-p 'CLIPBOARD)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
193 ["%_Delete" delete-primary-selection |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
194 :active (selection-owner-p)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
195 "----" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
196 ["Select %_All" mark-whole-buffer] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
197 ["Select Pa%_ge" mark-page] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
198 ["Select Paragrap%_h" mark-paragraph] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
199 ["Re%_select Region" activate-region :active (mark t)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
200 "----" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
201 ["%_Find..." make-search-dialog] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
202 ["R%_eplace..." query-replace] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
203 ["Replace (Rege%_xp)..." query-replace-regexp] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
204 ["List %_Matching Lines..." list-matching-lines] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
205 ) |
428 | 206 |
442 | 207 ("%_View" |
4372
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
208 ["%_Split Window" split-window-vertically] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
209 ["S%_plit Window (Side by Side)" split-window-horizontally] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
210 ["%_Un-Split (Keep This)" delete-other-windows |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
211 :active (not (one-window-p t))] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
212 ["Un-Split (Keep %_Others)" delete-window |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
213 :active (not (one-window-p t))] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
214 ["Balance %_Windows" balance-windows |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
215 :active (not (one-window-p t))] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
216 ["Shrink Window to %_Fit" shrink-window-if-larger-than-buffer] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
217 "----" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
218 ("N%_arrow" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
219 ["%_Narrow to Region" narrow-to-region :active (region-exists-p)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
220 ["Narrow to %_Page" narrow-to-page] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
221 ["Narrow to %_Defun" narrow-to-defun] |
428 | 222 "----" |
4372
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
223 ["%_Widen" widen :active (or (/= (point-min) 1) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
224 (/= (point-max) (1+ (buffer-size))))] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
225 ) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
226 "----" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
227 ["%_Goto Line..." goto-line] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
228 ["Beginning of %_Defun" beginning-of-defun] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
229 ["%_End of Defun" end-of-defun] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
230 ["%_Count Lines in Buffer" count-lines-buffer |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
231 :included (not (region-active-p))] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
232 ["%_Count Lines in Region" count-lines-region |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
233 :included (region-active-p)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
234 "----" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
235 ["%_Jump to Previous Mark" (set-mark-command t) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
236 :active (mark t)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
237 ["Se%_t Bookmark" bookmark-set |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
238 :active (fboundp 'bookmark-set)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
239 ("%_Bookmarks" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
240 :filter |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
241 ,#'(lambda (menu) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
242 (let ((alist (and-boundp 'bookmark-alist |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
243 bookmark-alist))) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
244 (if (not alist) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
245 menu |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
246 (let ((items |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
247 (submenu-generate-accelerator-spec |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
248 (mapcar #'(lambda (bmk) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
249 `[,bmk (bookmark-jump ',bmk)]) |
4783
e29fcfd8df5f
Eliminate most core code byte-compile warnings.
Aidan Kehoe <kehoea@parhasard.net>
parents:
4382
diff
changeset
|
250 (declare-fboundp (bookmark-all-names)))))) |
4372
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
251 (append menu '("---") items))))) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
252 "---" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
253 ["Insert %_Contents" bookmark-menu-insert |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
254 :active (fboundp 'bookmark-menu-insert)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
255 ["Insert L%_ocation" bookmark-menu-locate |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
256 :active (fboundp 'bookmark-menu-locate)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
257 "---" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
258 ["%_Rename Bookmark" bookmark-menu-rename |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
259 :active (fboundp 'bookmark-menu-rename)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
260 ("%_Delete Bookmark" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
261 :filter ,#'(lambda (menu) |
793 | 262 (submenu-generate-accelerator-spec |
263 (mapcar #'(lambda (bmk) | |
4372
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
264 `[,bmk (bookmark-delete ',bmk)]) |
793 | 265 (bookmark-all-names))))) |
4372
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
266 ["%_Edit Bookmark List" bookmark-bmenu-list |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
267 :active (and-boundp 'bookmark-alist bookmark-alist)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
268 "---" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
269 ["%_Save Bookmarks" bookmark-save |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
270 :active (and-boundp 'bookmark-alist bookmark-alist)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
271 ["Save Bookmarks %_As..." bookmark-write |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
272 :active (and-boundp 'bookmark-alist bookmark-alist)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
273 ["%_Load a Bookmark File" bookmark-load |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
274 :active (fboundp 'bookmark-load)] |
442 | 275 ) |
4372
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
276 ) |
428 | 277 |
442 | 278 ("C%_mds" |
4372
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
279 ["Repeat Last Comple%_x Command..." repeat-complex-command] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
280 ["E%_valuate Lisp Expression..." eval-expression] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
281 ["Execute %_Named Command..." execute-extended-command] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
282 "----" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
283 ["Start %_Defining Macro" start-kbd-macro |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
284 :included (not defining-kbd-macro)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
285 ["Stop %_Defining Macro" end-kbd-macro |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
286 :included defining-kbd-macro] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
287 ["%_Execute Last Macro" call-last-kbd-macro |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
288 :active last-kbd-macro] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
289 ("Other %_Macro" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
290 ["Edit %_Last Macro" edit-last-kbd-macro |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
291 :active last-kbd-macro] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
292 ["%_Edit Macro..." edit-kbd-macro] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
293 ["%_Append to Last Macro" (start-kbd-macro t) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
294 :active (and (not defining-kbd-macro) last-kbd-macro)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
295 "---" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
296 ["%_Name Last Macro..." name-last-kbd-macro |
442 | 297 :active last-kbd-macro] |
4372
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
298 ["Assign Last Macro to %_Key..." assign-last-kbd-macro-to-key |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
299 :active (and last-kbd-macro |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
300 (fboundp 'assign-last-kbd-macro-to-key))] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
301 "---" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
302 ["E%_xecute Last Macro on Region Lines" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
303 :active (and last-kbd-macro (region-exists-p))] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
304 "---" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
305 ["%_Query User During Macro" kbd-macro-query |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
306 :active defining-kbd-macro] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
307 ["Enter %_Recursive Edit During Macro" (kbd-macro-query t) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
308 :active defining-kbd-macro] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
309 "---" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
310 ["%_Insert Named Macro into Buffer..." insert-kbd-macro] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
311 ["Read Macro from Re%_gion" read-kbd-macro |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
312 :active (region-exists-p)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
313 ) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
314 "----" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
315 ["D%_ynamic Abbrev Expand" dabbrev-expand] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
316 ["Define %_Global Abbrev for " add-global-abbrev |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
317 :suffix (truncate-string-to-width (abbrev-string-to-be-defined nil) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
318 40 nil nil t)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
319 ("Other %_Abbrev" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
320 ["Dynamic Abbrev %_Complete" dabbrev-completion] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
321 ["Dynamic Abbrev Complete in %_All Buffers" (dabbrev-completion 16)] |
442 | 322 "----" |
4372
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
323 "----" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
324 ["%_Define Global Abbrev for " add-global-abbrev |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
325 :suffix (truncate-string-to-width (abbrev-string-to-be-defined nil) |
851 | 326 40 nil nil t)] |
4372
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
327 ["Define %_Mode-Specific Abbrev for " add-mode-abbrev |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
328 :suffix (truncate-string-to-width (abbrev-string-to-be-defined nil) |
851 | 329 40 nil nil t)] |
4372
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
330 ["Define Global Ex%_pansion for " inverse-add-global-abbrev |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
331 :suffix (truncate-string-to-width |
814 | 332 (inverse-abbrev-string-to-be-defined 1) |
851 | 333 40 nil nil t)] |
4372
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
334 ["Define Mode-Specific Expa%_nsion for " inverse-add-mode-abbrev |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
335 :suffix (truncate-string-to-width |
814 | 336 (inverse-abbrev-string-to-be-defined 1) |
851 | 337 40 nil nil t)] |
4372
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
338 "---" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
339 ["E%_xpand Abbrev" expand-abbrev] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
340 ["Expand Abbrevs in Re%_gion" expand-region-abbrevs |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
341 :active (region-exists-p)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
342 ["%_Unexpand Last Abbrev" unexpand-abbrev |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
343 :active (and (stringp last-abbrev-text) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
344 (> last-abbrev-location 0))] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
345 "---" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
346 ["%_Kill All Abbrevs" kill-all-abbrevs] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
347 ["%_Insert All Abbrevs into Buffer" insert-abbrevs] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
348 ["%_List Abbrevs" list-abbrevs] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
349 "---" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
350 ["%_Edit Abbrevs" edit-abbrevs] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
351 ["%_Redefine Abbrevs from Buffer" edit-abbrevs-redefine |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
352 :active (eq major-mode 'edit-abbrevs-mode)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
353 "---" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
354 ["%_Save Abbrevs As..." write-abbrev-file] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
355 ["L%_oad Abbrevs..." read-abbrev-file] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
356 ) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
357 "---" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
358 ["%_Cut Rectangle" kill-rectangle] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
359 ["%_Prefix Rectangle..." string-rectangle] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
360 ("Other %_Rectangles/Register" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
361 ["%_Yank Rectangle" yank-rectangle] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
362 ["Rectangle %_to Register" copy-rectangle-to-register] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
363 ["Rectangle %_from Register" insert-register] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
364 ["%_Delete Rectangle" clear-rectangle] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
365 ["%_Open Rectangle" open-rectangle] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
366 ["Rectangle %_Mousing" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
367 (customize-set-variable 'mouse-track-rectangle-p |
442 | 368 (not mouse-track-rectangle-p)) |
4372
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
369 :style toggle :selected mouse-track-rectangle-p] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
370 "---" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
371 ["%_Copy to Register..." copy-to-register :active (region-exists-p)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
372 ["%_Append to Register..." append-register :active (region-exists-p)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
373 ["%_Insert Register..." insert-register] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
374 "---" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
375 ["%_Save Point to Register" point-to-register] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
376 ["%_Jump to Register" register-to-point] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
377 ) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
378 "---" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
379 ["%_Sort Lines in Region" sort-lines :active (region-exists-p)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
380 ["%_Uppercase Region or Word" upcase-region-or-word] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
381 ["%_Lowercase Region or Word" downcase-region-or-word] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
382 ["%_Indent Region or Balanced Expression" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
383 indent-region-or-balanced-expression] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
384 ["%_Fill Paragraph or Region" fill-paragraph-or-region] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
385 ("Other %_Text Commands" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
386 ["Sort %_Paragraphs in Region" sort-paragraphs :active (region-exists-p)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
387 ["Sort Pa%_ges in Region" sort-pages :active (region-exists-p)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
388 ["Sort C%_olumns in Region" sort-columns :active (region-exists-p)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
389 ["Sort %_Regexp..." sort-regexp-fields :active (region-exists-p)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
390 "---" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
391 ["%_Capitalize Region" capitalize-region :active (region-exists-p)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
392 ["Title-C%_ase Region" capitalize-region-as-title |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
393 :active (region-exists-p)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
394 "----" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
395 ["C%_enter Region or Paragraph" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
396 (if (region-active-p) (center-region) (center-line))] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
397 ["Center %_Line" center-line] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
398 "---" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
399 ["%_Indent Region Rigidly" indent-rigidly :active (region-exists-p)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
400 ["In%_dent To Column..." indent-to-column] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
401 "---" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
402 ["%_Untabify (Tabs to Spaces)" untabify :active (and (region-exists-p) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
403 (fboundp 'untabify))] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
404 ["%_Tabify (Spaces to Tabs)" tabify :active (and (region-exists-p) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
405 (fboundp 'tabify))] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
406 ["Tab to Tab %_Stop" tab-to-tab-stop] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
407 ["Edit Ta%_b Stops" edit-tab-stops] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
408 ) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
409 "---" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
410 ("%_Tags" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
411 ["%_Find Tag..." find-tag] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
412 ["Find %_Other Window..." find-tag-other-window] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
413 ["%_Next Tag..." (find-tag nil)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
414 ["N%_ext Other Window..." (find-tag-other-window nil)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
415 ["Next %_File" next-file] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
416 "-----" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
417 ["Tags %_Search..." tags-search] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
418 ["Tags %_Replace..." tags-query-replace] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
419 ["%_Continue Search/Replace" tags-loop-continue] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
420 "-----" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
421 ["%_Pop stack" pop-tag-mark] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
422 ["%_Apropos..." tags-apropos] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
423 "-----" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
424 ["%_Set Tags Table File..." visit-tags-table] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
425 ) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
426 ) |
2545 | 427 |
428 ;; #### Delete this entire menu as soon as the new package source is | |
429 ;; committed. | |
442 | 430 ("%_Tools" |
4372
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
431 ("%_Packages" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
432 ("%_Set Download Site" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
433 ("%_Official Releases" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
434 :filter ,#'(lambda (&rest junk) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
435 (menu-split-long-menu |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
436 (submenu-generate-accelerator-spec |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
437 (package-ui-download-menu))))) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
438 ("%_Pre-Releases" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
439 :filter ,#'(lambda (&rest junk) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
440 (menu-split-long-menu |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
441 (submenu-generate-accelerator-spec |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
442 (package-ui-pre-release-download-menu))))) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
443 ("%_Site Releases" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
444 :filter ,#'(lambda (&rest junk) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
445 (menu-split-long-menu |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
446 (submenu-generate-accelerator-spec |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
447 (package-ui-site-release-download-menu)))))) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
448 "--:shadowEtchedIn" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
449 ["%_Update Package Index" package-get-update-base] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
450 ["%_List and Install" pui-list-packages] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
451 ["U%_pdate Installed Packages" package-get-update-all] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
452 ["%_Help" (Info-goto-node "(xemacs)Packages")]) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
453 ("%_Internet" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
454 ["Read Mail %_1 (VM)..." vm |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
455 :active (fboundp 'vm)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
456 ["Read Mail %_2 (MH)..." (mh-rmail t) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
457 :active (fboundp 'mh-rmail)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
458 ["Send %_Mail..." compose-mail |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
459 :active (fboundp 'compose-mail)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
460 ["Usenet %_News" gnus |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
461 :active (fboundp 'gnus)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
462 ["Browse the %_Web" w3 |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
463 :active (fboundp 'w3)]) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
464 "---" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
465 ("%_Grep" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
466 :filter |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
467 ,#'(lambda (menu) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
468 (if-boundp 'grep-history |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
469 (if grep-history |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
470 (let ((items |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
471 (submenu-generate-accelerator-spec |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
472 (mapcar #'(lambda (label-value) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
473 (vector (first label-value) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
474 (list 'grep |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
475 (second label-value)))) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
476 (Menubar-items-truncate-history |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
477 grep-history 10 50))))) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
478 (append menu '("---") items)) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
479 menu) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
480 menu)) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
481 ["%_Grep..." grep :active (fboundp 'grep)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
482 ["%_Kill Grep" kill-compilation |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
483 :active (and (fboundp 'kill-compilation) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
484 (fboundp 'compilation-find-buffer) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
485 (let ((buffer (condition-case nil |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
486 (compilation-find-buffer) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
487 (error nil)))) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
488 (and buffer (get-buffer-process buffer))))] |
442 | 489 "---" |
4372
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
490 ["Grep %_All Files in Current Directory..." |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
491 grep-all-files-in-current-directory |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
492 :active (fboundp 'grep-all-files-in-current-directory)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
493 ["Grep All Files in Current Directory %_Recursively..." |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
494 grep-all-files-in-current-directory-and-below |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
495 :active (fboundp 'grep-all-files-in-current-directory-and-below)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
496 "---" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
497 ["Grep %_C and C Header Files in Current Directory..." |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
498 (progn |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
499 (require 'compile) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
500 (let ((grep-command |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
501 (cons (concat grep-command " *.[chCH]" |
442 | 502 ; i wanted to also use *.cc and *.hh. |
503 ; see long comment below under Perl. | |
4372
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
504 ) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
505 (length grep-command)))) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
506 (call-interactively 'grep))) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
507 :active (fboundp 'grep)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
508 ["Grep C Hea%_der Files in Current Directory..." |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
509 (progn |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
510 (require 'compile) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
511 (let ((grep-command |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
512 (cons (concat grep-command " *.[hH]" |
442 | 513 ; i wanted to also use *.hh. |
514 ; see long comment below under Perl. | |
4372
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
515 ) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
516 (length grep-command)))) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
517 (call-interactively 'grep))) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
518 :active (fboundp 'grep)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
519 ["Grep %_E-Lisp Files in Current Directory..." |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
520 (progn |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
521 (require 'compile) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
522 (let ((grep-command |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
523 (cons (concat grep-command " *.el") |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
524 (length grep-command)))) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
525 (call-interactively 'grep))) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
526 :active (fboundp 'grep)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
527 ["Grep %_Perl Files in Current Directory..." |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
528 (progn |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
529 (require 'compile) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
530 (let ((grep-command |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
531 (cons (concat grep-command " *.pl" |
442 | 532 ; i wanted to use this: |
533 ; " *.pl *.pm *.am" | |
534 ; but grep complains if it can't | |
535 ; match anything in a glob, and | |
536 ; that screws other things up. | |
537 ; perhaps we need to first scan | |
538 ; each separate glob in the directory | |
539 ; to see if there are any files in | |
540 ; that glob, and if not, omit it. | |
4372
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
541 ) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
542 (length grep-command)))) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
543 (call-interactively 'grep))) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
544 :active (fboundp 'grep)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
545 ["Grep %_HTML Files in Current Directory..." |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
546 (progn |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
547 (require 'compile) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
548 (let ((grep-command |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
549 (cons (concat grep-command " *.*htm*") |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
550 (length grep-command)))) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
551 (call-interactively 'grep))) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
552 :active (fboundp 'grep)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
553 "---" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
554 ["%_Next Match" next-error |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
555 :active (and (fboundp 'compilation-errors-exist-p) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
556 (compilation-errors-exist-p))] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
557 ["Pre%_vious Match" previous-error |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
558 :active (and (fboundp 'compilation-errors-exist-p) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
559 (compilation-errors-exist-p))] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
560 ["%_First Match" first-error |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
561 :active (and (fboundp 'compilation-errors-exist-p) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
562 (compilation-errors-exist-p))] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
563 ["G%_oto Match" compile-goto-error |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
564 :active (and (fboundp 'compilation-errors-exist-p) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
565 (compilation-errors-exist-p))] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
566 "---" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
567 ["%_Set Grep Command..." |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
568 (progn |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
569 (require 'compile) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
570 (customize-set-variable |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
571 'grep-command |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
572 (read-shell-command "Default Grep Command: " grep-command))) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
573 :active (fboundp 'grep) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
574 ] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
575 ) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
576 ("%_Compile" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
577 :filter |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
578 ,#'(lambda (menu) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
579 (if-boundp 'compile-history |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
580 (if compile-history |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
581 (let ((items |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
582 (submenu-generate-accelerator-spec |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
583 (mapcar #'(lambda (label-value) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
584 (vector (first label-value) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
585 (list 'compile |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
586 (second label-value)))) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
587 (Menubar-items-truncate-history |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
588 compile-history 10 50))))) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
589 (append menu '("---") items)) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
590 menu) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
591 menu)) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
592 ["%_Compile..." compile :active (fboundp 'compile)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
593 ["%_Repeat Compilation" recompile :active (fboundp 'recompile)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
594 ["%_Kill Compilation" kill-compilation |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
595 :active (and (fboundp 'kill-compilation) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
596 (fboundp 'compilation-find-buffer) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
597 (let ((buffer (condition-case nil |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
598 (compilation-find-buffer) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
599 (error nil)))) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
600 (and buffer (get-buffer-process buffer))))] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
601 "---" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
602 ["%_Next Error" next-error |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
603 :active (and (fboundp 'compilation-errors-exist-p) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
604 (compilation-errors-exist-p))] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
605 ["Pre%_vious Error" previous-error |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
606 :active (and (fboundp 'compilation-errors-exist-p) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
607 (compilation-errors-exist-p))] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
608 ["%_First Error" first-error |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
609 :active (and (fboundp 'compilation-errors-exist-p) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
610 (compilation-errors-exist-p))] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
611 ["G%_oto Error" compile-goto-error |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
612 :active (and (fboundp 'compilation-errors-exist-p) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
613 (compilation-errors-exist-p))] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
614 ) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
615 ("%_Debug" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
616 ["%_GDB..." gdb |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
617 :active (fboundp 'gdb)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
618 ["%_DBX..." dbx |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
619 :active (fboundp 'dbx)]) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
620 ("%_Shell" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
621 ["%_Shell" shell |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
622 :active (fboundp 'shell)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
623 ["S%_hell Command..." shell-command |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
624 :active (fboundp 'shell-command)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
625 ["Shell Command on %_Region..." shell-command-on-region |
442 | 626 :active (and (fboundp 'shell-command-on-region) (region-exists-p))]) |
428 | 627 |
4372
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
628 ("%_Tags" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
629 ["%_Find Tag..." find-tag] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
630 ["Find %_Other Window..." find-tag-other-window] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
631 ["%_Next Tag..." (find-tag nil)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
632 ["N%_ext Other Window..." (find-tag-other-window nil)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
633 ["Next %_File" next-file] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
634 "-----" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
635 ["Tags %_Search..." tags-search] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
636 ["Tags %_Replace..." tags-query-replace] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
637 ["%_Continue Search/Replace" tags-loop-continue] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
638 "-----" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
639 ["%_Pop stack" pop-tag-mark] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
640 ["%_Apropos..." tags-apropos] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
641 "-----" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
642 ["%_Set Tags Table File..." visit-tags-table] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
643 ) |
442 | 644 |
4372
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
645 "----" |
442 | 646 |
4372
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
647 ("Ca%_lendar" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
648 ["%_3-Month Calendar" calendar |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
649 :active (fboundp 'calendar)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
650 ["%_Diary" diary |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
651 :active (fboundp 'diary)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
652 ["%_Holidays" holidays |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
653 :active (fboundp 'holidays)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
654 ;; we're all pagans at heart ... |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
655 ["%_Phases of the Moon" phases-of-moon |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
656 :active (fboundp 'phases-of-moon)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
657 ["%_Sunrise/Sunset" sunrise-sunset |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
658 :active (fboundp 'sunrise-sunset)]) |
428 | 659 |
4372
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
660 ("Ga%_mes" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
661 ["%_Mine Game" xmine |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
662 :active (fboundp 'xmine)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
663 ["%_Tetris" tetris |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
664 :active (fboundp 'tetris)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
665 ["%_Sokoban" sokoban |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
666 :active (fboundp 'sokoban)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
667 ["Quote from %_Zippy" yow |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
668 :active (fboundp 'yow)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
669 ["%_Psychoanalyst" doctor |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
670 :active (fboundp 'doctor)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
671 ["Ps%_ychoanalyze Zippy!" psychoanalyze-pinhead |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
672 :active (fboundp 'psychoanalyze-pinhead)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
673 ["%_Random Flames" flame |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
674 :active (fboundp 'flame)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
675 ["%_Dunnet (Adventure)" dunnet |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
676 :active (fboundp 'dunnet)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
677 ["Towers of %_Hanoi" hanoi |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
678 :active (fboundp 'hanoi)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
679 ["Game of %_Life" life |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
680 :active (fboundp 'life)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
681 ["M%_ultiplication Puzzle" mpuz |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
682 :active (fboundp 'mpuz)]) |
442 | 683 |
4372
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
684 "----" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
685 ) |
442 | 686 |
2545 | 687 ; ("%_Tools" |
688 ; :filter behavior-menu-filter) | |
689 | |
442 | 690 ("%_Options" |
4372
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
691 ("%_Advanced (Customize)" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
692 ("%_Emacs" :filter ,#'(lambda (&rest junk) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
693 (cdr (custom-menu-create 'emacs)))) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
694 ["%_Group..." customize-group] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
695 ["%_Variable..." customize-variable] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
696 ["%_Face..." customize-face] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
697 ["%_Saved..." customize-saved] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
698 ["Se%_t..." customize-customized] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
699 ["%_Apropos..." customize-apropos] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
700 ["%_Browse..." customize-browse]) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
701 "---" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
702 ("%_Editing" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
703 ["This Buffer %_Read Only" (toggle-read-only) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
704 :style toggle :selected buffer-read-only] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
705 ["%_Yank/Kill Interact With Clipboard" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
706 (if (eq interprogram-cut-function 'own-clipboard) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
707 (progn |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
708 (customize-set-variable 'interprogram-cut-function nil) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
709 (customize-set-variable 'interprogram-paste-function nil)) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
710 (customize-set-variable 'interprogram-cut-function 'own-clipboard) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
711 (customize-set-variable 'interprogram-paste-function 'get-clipboard)) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
712 :style toggle |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
713 :selected (eq interprogram-cut-function 'own-clipboard)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
714 ["%_Overstrike" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
715 (progn |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
716 (setq overwrite-mode (if overwrite-mode nil 'overwrite-mode-textual)) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
717 (customize-set-variable 'overwrite-mode overwrite-mode)) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
718 :style toggle :selected overwrite-mode] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
719 ["%_Abbrev Mode" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
720 (customize-set-variable 'abbrev-mode |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
721 (not (default-value 'abbrev-mode))) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
722 :style toggle |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
723 :selected (default-value 'abbrev-mode)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
724 ["Active Re%_gions" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
725 (customize-set-variable 'zmacs-regions (not zmacs-regions)) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
726 :style toggle :selected zmacs-regions] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
727 "---" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
728 ["%_Case Sensitive Search" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
729 (customize-set-variable 'case-fold-search |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
730 (setq case-fold-search (not case-fold-search))) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
731 :style toggle :selected (not case-fold-search)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
732 ["Case %_Matching Replace" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
733 (customize-set-variable 'case-replace (not case-replace)) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
734 :style toggle :selected case-replace] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
735 "---" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
736 ("%_Newline at End of File..." |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
737 ["%_Don't Require" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
738 (customize-set-variable 'require-final-newline nil) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
739 :style radio :selected (not require-final-newline)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
740 ["%_Require" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
741 (customize-set-variable 'require-final-newline t) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
742 :style radio :selected (eq require-final-newline t)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
743 ["%_Ask" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
744 (customize-set-variable 'require-final-newline 'ask) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
745 :style radio :selected (and require-final-newline |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
746 (not (eq require-final-newline t)))]) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
747 ["Add Newline When Moving Past %_End" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
748 (customize-set-variable 'next-line-add-newlines |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
749 (not next-line-add-newlines)) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
750 :style toggle :selected next-line-add-newlines]) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
751 ("%_Keyboard and Mouse" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
752 ["%_Delete Key Deletes Selection" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
753 (customize-set-variable 'pending-delete-mode (not pending-delete-mode)) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
754 :style toggle |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
755 :selected (and (boundp 'pending-delete-mode) pending-delete-mode) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
756 :active (boundp 'pending-delete-mode)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
757 ["`kill-%_word' Stores in Clipboard" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
758 (customize-set-variable 'kill-word-into-kill-ring |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
759 (not kill-word-into-kill-ring)) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
760 :style toggle |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
761 :selected kill-word-into-kill-ring] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
762 ["`kill-%_line' Kills Whole Line at Beg" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
763 (customize-set-variable 'kill-whole-line (not kill-whole-line)) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
764 :style toggle |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
765 :selected kill-whole-line] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
766 ["Size for %_Block-Movement Commands..." |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
767 (customize-set-variable 'block-movement-size |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
768 (read-number "Block Movement Size: " |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
769 t block-movement-size))] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
770 ["%_VI Emulation" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
771 (progn |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
772 (toggle-viper-mode) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
773 (customize-set-variable 'viper-mode viper-mode)) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
774 :style toggle :selected (and (boundp 'viper-mode) viper-mode) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
775 :active (fboundp 'toggle-viper-mode)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
776 "----" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
777 ["S%_hifted Motion Keys Select Region" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
778 (customize-set-variable 'shifted-motion-keys-select-region |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
779 (not shifted-motion-keys-select-region)) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
780 :style toggle |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
781 :selected shifted-motion-keys-select-region] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
782 ["%_After Shifted Motion, Unshifted Motion Keys Deselect" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
783 (customize-set-variable 'unshifted-motion-keys-deselect-region |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
784 (not unshifted-motion-keys-deselect-region)) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
785 :style toggle |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
786 :selected unshifted-motion-keys-deselect-region] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
787 "----" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
788 ["%_Set Key..." global-set-key] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
789 ["%_Unset Key..." global-unset-key] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
790 "---" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
791 ["%_Mouse Paste at Text Cursor (not Clicked Location)" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
792 (customize-set-variable 'mouse-yank-at-point (not mouse-yank-at-point)) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
793 :style toggle :selected mouse-yank-at-point] |
442 | 794 "---" |
4372
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
795 ["%_Teach Extended Commands" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
796 (customize-set-variable 'teach-extended-commands-p |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
797 (not teach-extended-commands-p)) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
798 :style toggle :selected teach-extended-commands-p] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
799 ) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
800 ("%_Printing" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
801 ["Set Printer %_Name for Generic Print Support..." |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
802 (customize-set-variable |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
803 'printer-name |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
804 (read-string "Set printer name: " printer-name))] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
805 "---" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
806 ["Command-Line %_Switches for `lpr'/`lp'..." |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
807 ;; better to directly open a customization buffer, since the value |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
808 ;; must be a list of strings, which is somewhat complex to prompt for. |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
809 (customize-variable 'lpr-switches) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
810 (boundp 'lpr-switches)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
811 ("%_Pretty-Print Paper Size" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
812 ["%_Letter" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
813 (customize-set-variable 'ps-paper-type 'letter) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
814 :style radio |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
815 :selected (and (boundp 'ps-paper-type) (eq ps-paper-type 'letter)) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
816 :active (boundp 'ps-paper-type)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
817 ["Lette%_r-Small" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
818 (customize-set-variable 'ps-paper-type 'letter-small) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
819 :style radio |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
820 :selected (and (boundp 'ps-paper-type) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
821 (eq ps-paper-type 'letter-small)) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
822 :active (boundp 'ps-paper-type)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
823 ["Le%_gal" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
824 (customize-set-variable 'ps-paper-type 'legal) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
825 :style radio |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
826 :selected (and (boundp 'ps-paper-type) (eq ps-paper-type 'legal)) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
827 :active (boundp 'ps-paper-type)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
828 ["%_Statement" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
829 (customize-set-variable 'ps-paper-type 'statement) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
830 :style radio |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
831 :selected (and (boundp 'ps-paper-type) (eq ps-paper-type 'statement)) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
832 :active (boundp 'ps-paper-type)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
833 ["%_Executive" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
834 (customize-set-variable 'ps-paper-type 'executive) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
835 :style radio |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
836 :selected (and (boundp 'ps-paper-type) (eq ps-paper-type 'executive)) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
837 :active (boundp 'ps-paper-type)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
838 ["%_Tabloid" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
839 (customize-set-variable 'ps-paper-type 'tabloid) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
840 :style radio |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
841 :selected (and (boundp 'ps-paper-type) (eq ps-paper-type 'tabloid)) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
842 :active (boundp 'ps-paper-type)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
843 ["Le%_dger" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
844 (customize-set-variable 'ps-paper-type 'ledger) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
845 :style radio |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
846 :selected (and (boundp 'ps-paper-type) (eq ps-paper-type 'ledger)) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
847 :active (boundp 'ps-paper-type)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
848 ["A%_3" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
849 (customize-set-variable 'ps-paper-type 'a3) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
850 :style radio |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
851 :selected (and (boundp 'ps-paper-type) (eq ps-paper-type 'a3)) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
852 :active (boundp 'ps-paper-type)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
853 ["%_A4" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
854 (customize-set-variable 'ps-paper-type 'a4) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
855 :style radio |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
856 :selected (and (boundp 'ps-paper-type) (eq ps-paper-type 'a4)) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
857 :active (boundp 'ps-paper-type)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
858 ["A4s%_mall" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
859 (customize-set-variable 'ps-paper-type 'a4small) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
860 :style radio |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
861 :selected (and (boundp 'ps-paper-type) (eq ps-paper-type 'a4small)) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
862 :active (boundp 'ps-paper-type)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
863 ["B%_4" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
864 (customize-set-variable 'ps-paper-type 'b4) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
865 :style radio |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
866 :selected (and (boundp 'ps-paper-type) (eq ps-paper-type 'b4)) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
867 :active (boundp 'ps-paper-type)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
868 ["%_B5" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
869 (customize-set-variable 'ps-paper-type 'b5) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
870 :style radio |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
871 :selected (and (boundp 'ps-paper-type) (eq ps-paper-type 'b5)) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
872 :active (boundp 'ps-paper-type)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
873 ) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
874 ["%_Color Printing" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
875 (cond (ps-print-color-p |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
876 (customize-set-variable 'ps-print-color-p nil) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
877 ;; I'm wondering whether all this muck is useful. |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
878 (and (boundp 'original-face-background) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
879 original-face-background |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
880 (set-face-background 'default original-face-background))) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
881 (t |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
882 (customize-set-variable 'ps-print-color-p t) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
883 (setq original-face-background |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
884 (face-background-instance 'default)) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
885 (set-face-background 'default "white"))) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
886 :style toggle |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
887 :selected (and (boundp 'ps-print-color-p) ps-print-color-p) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
888 :active (boundp 'ps-print-color-p)]) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
889 ("%_Internet" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
890 ("%_Compose Mail With" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
891 ["VM mail package" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
892 (customize-set-variable 'mail-user-agent 'vm-user-agent) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
893 :style radio |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
894 :selected (eq mail-user-agent 'vm-user-agent) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
895 :active (get 'vm-user-agent 'composefunc)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
896 ["Bare-bones Emacs Mailer" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
897 (customize-set-variable 'mail-user-agent 'sendmail-user-agent) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
898 :style radio |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
899 :selected (eq mail-user-agent 'sendmail-user-agent)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
900 ["MH" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
901 (customize-set-variable 'mail-user-agent 'mh-e-user-agent) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
902 :style radio |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
903 :selected (eq mail-user-agent 'mh-e-user-agent) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
904 :active (get 'mh-e-user-agent 'composefunc)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
905 ["GNUS" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
906 (customize-set-variable 'mail-user-agent 'message-user-agent) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
907 :style radio |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
908 :selected (eq mail-user-agent 'message-user-agent) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
909 :active (get 'message-user-agent 'composefunc)] |
428 | 910 ) |
4372
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
911 ["Set My %_Email Address..." |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
912 (customize-set-variable |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
913 'user-mail-address |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
914 (read-string "Set email address: " user-mail-address))] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
915 ["Set %_Machine Email Name..." |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
916 (customize-set-variable |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
917 'mail-host-address |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
918 (read-string "Set machine email name: " mail-host-address))] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
919 ["Set %_SMTP Server..." |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
920 (progn |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
921 (require 'smtpmail) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
922 (customize-set-variable |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
923 'smtpmail-smtp-server |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
924 (read-string "Set SMTP server: " smtpmail-smtp-server))) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
925 :active (and (boundp 'send-mail-function) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
926 (eq send-mail-function 'smtpmail-send-it))] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
927 ["SMTP %_Debug Info" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
928 (progn |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
929 (require 'smtpmail) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
930 (customize-set-variable 'smtpmail-debug-info |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
931 (not smtpmail-debug-info))) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
932 :style toggle |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
933 :selected (and (boundp 'smtpmail-debug-info) smtpmail-debug-info) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
934 :active (and (boundp 'send-mail-function) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
935 (eq send-mail-function 'smtpmail-send-it))]) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
936 ("%_Troubleshooting" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
937 ["%_Debug on Error [not saved]" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
938 (setq debug-on-error (not debug-on-error)) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
939 :style toggle :selected debug-on-error] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
940 ["Debug on %_Quit [not saved]" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
941 (setq debug-on-quit (not debug-on-quit)) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
942 :style toggle :selected debug-on-quit] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
943 ["Debug on S%_ignal [not saved]" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
944 (setq debug-on-signal (not debug-on-signal)) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
945 :style toggle :selected debug-on-signal] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
946 ["%_Stack Trace on Error [not saved]" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
947 (setq stack-trace-on-error (not stack-trace-on-error)) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
948 :style toggle :selected stack-trace-on-error] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
949 ["Stack Trace on Si%_gnal [not saved]" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
950 (setq stack-trace-on-signal (not stack-trace-on-signal)) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
951 :style toggle :selected stack-trace-on-signal] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
952 ) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
953 ("Encodin%_g" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
954 ["Automatic %_EOL Detection" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
955 (customize-set-variable 'eol-detection-enabled-p |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
956 (not eol-detection-enabled-p)) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
957 :style toggle |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
958 :selected eol-detection-enabled-p |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
959 :included (not (memq system-type '(windows-nt cygwin32)))] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
960 ("Set Coding System of %_Buffer File" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
961 :filter |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
962 ,#'(lambda (menu) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
963 (coding-system-menu-filter |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
964 (lambda (entry) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
965 (set-buffer-file-coding-system entry)) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
966 (lambda (entry) t)))) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
967 ;; not implemented yet |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
968 ("Set Coding System of %_Terminal" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
969 :filter |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
970 ,#'(lambda (menu) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
971 (coding-system-menu-filter |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
972 (lambda (entry) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
973 (set-terminal-coding-system entry)) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
974 (lambda (entry) nil))) |
428 | 975 ) |
4372
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
976 ;; not implemented yet |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
977 ("Set Coding System of %_Keyboard" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
978 :filter |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
979 ,#'(lambda (menu) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
980 (coding-system-menu-filter |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
981 (lambda (entry) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
982 (set-keyboard-coding-system entry)) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
983 (lambda (entry) nil)))) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
984 ("Set Coding System of %_Process" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
985 :filter |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
986 ,#'(lambda (menu) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
987 (coding-system-menu-filter |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
988 (lambda (entry) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
989 (set-buffer-process-coding-system entry entry)) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
990 (lambda (entry) (get-buffer-process (current-buffer))))))) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
991 ,@(when (featurep 'mule) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
992 `(("Internationa%_l" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
993 ("Set %_Language Environment" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
994 :filter |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
995 ,#'(lambda (menu) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
996 (menu-split-long-menu-and-sort |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
997 (mapcar #'(lambda (entry) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
998 `[ ,(car entry) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
999 (set-language-environment ',(car entry)) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1000 :style radio |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1001 :selected |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1002 ,(equal (car entry) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1003 current-language-environment)]) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1004 language-info-alist) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1005 ))) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1006 ["%_Toggle Input Method" toggle-input-method] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1007 ["Select %_Input Method" set-input-method] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1008 ))) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1009 "-----" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1010 ("%_Display" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1011 ,@(if (featurep 'scrollbar) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1012 '(["%_Scrollbars" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1013 (customize-set-variable 'scrollbars-visible-p |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1014 (not scrollbars-visible-p)) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1015 :style toggle |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1016 :selected scrollbars-visible-p])) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1017 ["%_Wrap Long Lines" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1018 (progn ;; becomes buffer-local |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1019 (setq truncate-lines (not truncate-lines)) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1020 (customize-set-variable 'truncate-lines truncate-lines)) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1021 :style toggle |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1022 :selected (not truncate-lines)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1023 "----" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1024 ["%_3D Modeline" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1025 (customize-set-variable 'modeline-3d-p |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1026 (not modeline-3d-p)) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1027 :style toggle |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1028 :selected modeline-3d-p] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1029 ("Modeline %_Horizontal Scrolling" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1030 ["%_None" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1031 (customize-set-variable 'modeline-scrolling-method nil) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1032 :style radio |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1033 :selected (not modeline-scrolling-method)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1034 ["As %_Text" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1035 (customize-set-variable 'modeline-scrolling-method t) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1036 :style radio |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1037 :selected (eq modeline-scrolling-method t)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1038 ["As %_Scrollbar" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1039 (customize-set-variable 'modeline-scrolling-method 'scrollbar) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1040 :style radio |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1041 :selected (eq modeline-scrolling-method 'scrollbar)] |
771 | 1042 ) |
4372
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1043 ,@(if (featurep 'toolbar) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1044 '("---" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1045 ["%_Toolbars Visible" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1046 (customize-set-variable 'toolbar-visible-p |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1047 (not toolbar-visible-p)) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1048 :style toggle |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1049 :selected toolbar-visible-p] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1050 ["Toolbars Ca%_ptioned" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1051 (customize-set-variable 'toolbar-captioned-p |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1052 (not toolbar-captioned-p)) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1053 :style toggle |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1054 :active toolbar-visible-p |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1055 :selected toolbar-captioned-p] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1056 ("Default Toolba%_r Location" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1057 ["%_Top" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1058 (customize-set-variable 'default-toolbar-position 'top) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1059 :style radio |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1060 :active toolbar-visible-p |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1061 :selected (eq default-toolbar-position 'top)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1062 ["%_Bottom" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1063 (customize-set-variable 'default-toolbar-position 'bottom) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1064 :style radio |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1065 :active toolbar-visible-p |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1066 :selected (eq default-toolbar-position 'bottom)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1067 ["%_Left" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1068 (customize-set-variable 'default-toolbar-position 'left) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1069 :style radio |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1070 :active toolbar-visible-p |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1071 :selected (eq default-toolbar-position 'left)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1072 ["%_Right" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1073 (customize-set-variable 'default-toolbar-position 'right) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1074 :style radio |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1075 :active toolbar-visible-p |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1076 :selected (eq default-toolbar-position 'right)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1077 ) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1078 )) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1079 ,@(if (featurep 'gutter) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1080 '("---" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1081 ["B%_uffers Tab Visible" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1082 (customize-set-variable 'gutter-buffers-tab-visible-p |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1083 (not gutter-buffers-tab-visible-p)) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1084 :style toggle |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1085 :selected gutter-buffers-tab-visible-p] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1086 ("Default %_Gutter Location" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1087 ["%_Top" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1088 (customize-set-variable 'default-gutter-position 'top) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1089 :style radio |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1090 :selected (eq default-gutter-position 'top)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1091 ["%_Bottom" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1092 (customize-set-variable 'default-gutter-position 'bottom) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1093 :style radio |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1094 :selected (eq default-gutter-position 'bottom)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1095 ["%_Left" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1096 (customize-set-variable 'default-gutter-position 'left) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1097 :style radio |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1098 :selected (eq default-gutter-position 'left)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1099 ["%_Right" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1100 (customize-set-variable 'default-gutter-position 'right) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1101 :style radio |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1102 :selected (eq default-gutter-position 'right)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1103 ) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1104 )) |
428 | 1105 "-----" |
4372
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1106 ["%_Blinking Cursor" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1107 (customize-set-variable 'blink-cursor-mode (not blink-cursor-mode)) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1108 :style toggle |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1109 :selected (and (boundp 'blink-cursor-mode) blink-cursor-mode) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1110 :active (boundp 'blink-cursor-mode)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1111 ["Bl%_ock Cursor" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1112 (progn |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1113 (customize-set-variable 'bar-cursor nil) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1114 (force-cursor-redisplay)) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1115 :style radio |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1116 :selected (null bar-cursor)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1117 ["Bar Cursor (%_1 Pixel)" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1118 (progn |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1119 (customize-set-variable 'bar-cursor t) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1120 (force-cursor-redisplay)) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1121 :style radio |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1122 :selected (eq bar-cursor t)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1123 ["Bar Cursor (%_2 Pixels)" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1124 (progn |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1125 (customize-set-variable 'bar-cursor 2) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1126 (force-cursor-redisplay)) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1127 :style radio |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1128 :selected (and bar-cursor (not (eq bar-cursor t)))] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1129 "----" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1130 ("Pa%_ren Highlighting" |
442 | 1131 ["%_None" |
1132 (customize-set-variable 'paren-mode nil) | |
1133 :style radio | |
1134 :selected (and (boundp 'paren-mode) (not paren-mode)) | |
1135 :active (boundp 'paren-mode)] | |
1136 ["%_Blinking Paren" | |
1137 (customize-set-variable 'paren-mode 'blink-paren) | |
1138 :style radio | |
1139 :selected (and (boundp 'paren-mode) (eq paren-mode 'blink-paren)) | |
1140 :active (boundp 'paren-mode)] | |
1141 ["%_Steady Paren" | |
1142 (customize-set-variable 'paren-mode 'paren) | |
1143 :style radio | |
1144 :selected (and (boundp 'paren-mode) (eq paren-mode 'paren)) | |
1145 :active (boundp 'paren-mode)] | |
1146 ["%_Expression" | |
1147 (customize-set-variable 'paren-mode 'sexp) | |
1148 :style radio | |
1149 :selected (and (boundp 'paren-mode) (eq paren-mode 'sexp)) | |
1150 :active (boundp 'paren-mode)] | |
1151 ;; ["Nes%_ted Shading" | |
1152 ;; (customize-set-variable 'paren-mode 'nested) | |
1153 ;; :style radio | |
1154 ;; :selected (and (boundp 'paren-mode) (eq paren-mode 'nested)) | |
1155 ;; :active (boundp 'paren-mode)] | |
1156 ) | |
4372
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1157 "------" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1158 ["%_Line Numbers" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1159 (progn |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1160 (customize-set-variable 'line-number-mode (not line-number-mode)) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1161 (redraw-modeline)) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1162 :style toggle :selected line-number-mode] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1163 ["%_Column Numbers" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1164 (progn |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1165 (customize-set-variable 'column-number-mode |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1166 (not column-number-mode)) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1167 (redraw-modeline)) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1168 :style toggle :selected column-number-mode] |
454 | 1169 |
4372
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1170 ("\"Other %_Window\" Location" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1171 ["%_Always in Same Frame" |
442 | 1172 (customize-set-variable |
4372
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1173 'get-frame-for-buffer-default-instance-limit nil) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1174 :style radio |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1175 :selected (null get-frame-for-buffer-default-instance-limit)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1176 ["Other Frame (%_2 Frames Max)" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1177 (customize-set-variable 'get-frame-for-buffer-default-instance-limit |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1178 2) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1179 :style radio |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1180 :selected (eq 2 get-frame-for-buffer-default-instance-limit)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1181 ["Other Frame (%_3 Frames Max)" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1182 (customize-set-variable 'get-frame-for-buffer-default-instance-limit |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1183 3) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1184 :style radio |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1185 :selected (eq 3 get-frame-for-buffer-default-instance-limit)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1186 ["Other Frame (%_4 Frames Max)" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1187 (customize-set-variable 'get-frame-for-buffer-default-instance-limit |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1188 4) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1189 :style radio |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1190 :selected (eq 4 get-frame-for-buffer-default-instance-limit)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1191 ["Other Frame (%_5 Frames Max)" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1192 (customize-set-variable 'get-frame-for-buffer-default-instance-limit |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1193 5) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1194 :style radio |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1195 :selected (eq 5 get-frame-for-buffer-default-instance-limit)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1196 ["Always Create %_New Frame" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1197 (customize-set-variable 'get-frame-for-buffer-default-instance-limit |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1198 0) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1199 :style radio |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1200 :selected (eq 0 get-frame-for-buffer-default-instance-limit)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1201 "-----" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1202 ["%_Temp Buffers Always in Same Frame" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1203 (customize-set-variable 'temp-buffer-show-function |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1204 'show-temp-buffer-in-current-frame) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1205 :style radio |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1206 :selected (eq temp-buffer-show-function |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1207 'show-temp-buffer-in-current-frame)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1208 ["Temp Buffers %_Like Other Buffers" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1209 (customize-set-variable 'temp-buffer-show-function nil) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1210 :style radio |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1211 :selected (null temp-buffer-show-function)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1212 "-----" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1213 ["%_Make Current Frame Gnuserv Target" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1214 (customize-set-variable 'gnuserv-frame (if (eq gnuserv-frame t) nil |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1215 t)) |
428 | 1216 :style toggle |
4372
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1217 :selected (and (boundp 'gnuserv-frame) (eq gnuserv-frame t)) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1218 :active (boundp 'gnuserv-frame)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1219 ) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1220 ) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1221 ("%_Menubars" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1222 ["%_Frame-Local Font Menu" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1223 (customize-set-variable 'font-menu-this-frame-only-p |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1224 (not font-menu-this-frame-only-p)) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1225 :style toggle |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1226 :selected (and (boundp 'font-menu-this-frame-only-p) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1227 font-menu-this-frame-only-p)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1228 ["%_Alt/Meta Selects Menu Items" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1229 (if (eq menu-accelerator-enabled 'menu-force) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1230 (customize-set-variable 'menu-accelerator-enabled nil) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1231 (customize-set-variable 'menu-accelerator-enabled 'menu-force)) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1232 :style toggle |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1233 :selected (eq menu-accelerator-enabled 'menu-force)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1234 "----" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1235 ["Buffers Menu %_Length..." |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1236 (customize-set-variable |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1237 'buffers-menu-max-size |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1238 ;; would it be better to open a customization buffer ? |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1239 (let ((val |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1240 (read-number |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1241 "Enter number of buffers to display (or 0 for unlimited): "))) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1242 (if (eq val 0) nil val)))] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1243 ["%_Multi-Operation Buffers Sub-Menus" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1244 (customize-set-variable 'complex-buffers-menu-p |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1245 (not complex-buffers-menu-p)) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1246 :style toggle |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1247 :selected complex-buffers-menu-p] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1248 ["S%_ubmenus for Buffer Groups" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1249 (customize-set-variable 'buffers-menu-submenus-for-groups-p |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1250 (not buffers-menu-submenus-for-groups-p)) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1251 :style toggle |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1252 :selected buffers-menu-submenus-for-groups-p] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1253 ["%_Verbose Buffer Menu Entries" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1254 (if (eq buffers-menu-format-buffer-line-function |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1255 'slow-format-buffers-menu-line) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1256 (customize-set-variable 'buffers-menu-format-buffer-line-function |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1257 'format-buffers-menu-line) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1258 (customize-set-variable 'buffers-menu-format-buffer-line-function |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1259 'slow-format-buffers-menu-line)) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1260 :style toggle |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1261 :selected (eq buffers-menu-format-buffer-line-function |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1262 'slow-format-buffers-menu-line)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1263 ("Buffers Menu %_Sorting" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1264 ["%_Most Recently Used" |
428 | 1265 (progn |
4372
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1266 (customize-set-variable 'buffers-menu-sort-function nil) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1267 (customize-set-variable 'buffers-menu-grouping-function nil)) |
428 | 1268 :style radio |
4372
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1269 :selected (null buffers-menu-sort-function)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1270 ["%_Alphabetically" |
428 | 1271 (progn |
4372
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1272 (customize-set-variable 'buffers-menu-sort-function |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1273 'sort-buffers-menu-alphabetically) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1274 (customize-set-variable 'buffers-menu-grouping-function nil)) |
428 | 1275 :style radio |
4372
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1276 :selected (eq 'sort-buffers-menu-alphabetically |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1277 buffers-menu-sort-function)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1278 ["%_By Major Mode, Then Alphabetically" |
428 | 1279 (progn |
4372
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1280 (customize-set-variable |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1281 'buffers-menu-sort-function |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1282 'sort-buffers-menu-by-mode-then-alphabetically) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1283 (customize-set-variable |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1284 'buffers-menu-grouping-function |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1285 'group-buffers-menu-by-mode-then-alphabetically)) |
428 | 1286 :style radio |
4372
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1287 :selected (eq 'sort-buffers-menu-by-mode-then-alphabetically |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1288 buffers-menu-sort-function)]) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1289 "---" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1290 ["%_Ignore Scaled Fonts" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1291 (customize-set-variable 'font-menu-ignore-scaled-fonts |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1292 (not font-menu-ignore-scaled-fonts)) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1293 :style toggle |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1294 :selected (and (boundp 'font-menu-ignore-scaled-fonts) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1295 font-menu-ignore-scaled-fonts)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1296 ) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1297 ("S%_yntax Highlighting" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1298 ["%_In This Buffer" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1299 (progn ;; becomes buffer local |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1300 (font-lock-mode) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1301 (customize-set-variable 'font-lock-mode font-lock-mode)) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1302 :style toggle |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1303 :selected (and (boundp 'font-lock-mode) font-lock-mode) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1304 :active (boundp 'font-lock-mode)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1305 ["%_Automatic" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1306 (customize-set-variable 'font-lock-auto-fontify |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1307 (not font-lock-auto-fontify)) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1308 :style toggle |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1309 :selected (and (boundp 'font-lock-auto-fontify) font-lock-auto-fontify) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1310 :active (fboundp 'font-lock-mode)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1311 "-----" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1312 ["Force %_Rehighlight in this Buffer" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1313 (customize-set-variable 'font-lock-auto-fontify |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1314 (not font-lock-auto-fontify)) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1315 :style toggle |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1316 :selected (and (boundp 'font-lock-auto-fontify) font-lock-auto-fontify) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1317 :active (fboundp 'font-lock-mode)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1318 "-----" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1319 ["%_Fonts" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1320 (progn |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1321 (require 'font-lock) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1322 (font-lock-use-default-fonts) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1323 (customize-set-variable 'font-lock-use-fonts t) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1324 (customize-set-variable 'font-lock-use-colors nil) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1325 (font-lock-mode 1)) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1326 :style radio |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1327 :selected (and (boundp 'font-lock-use-fonts) font-lock-use-fonts) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1328 :active (fboundp 'font-lock-mode)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1329 ["%_Colors" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1330 (progn |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1331 (require 'font-lock) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1332 (font-lock-use-default-colors) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1333 (customize-set-variable 'font-lock-use-colors t) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1334 (customize-set-variable 'font-lock-use-fonts nil) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1335 (font-lock-mode 1)) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1336 :style radio |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1337 :selected (and (boundp 'font-lock-use-colors) font-lock-use-colors) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1338 :active (boundp 'font-lock-mode)] |
428 | 1339 "-----" |
4372
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1340 ["%_1 Least" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1341 (progn |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1342 (require 'font-lock) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1343 (if (or (and (not (integerp font-lock-maximum-decoration)) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1344 (not (eq t font-lock-maximum-decoration))) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1345 (and (integerp font-lock-maximum-decoration) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1346 (<= font-lock-maximum-decoration 0))) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1347 nil |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1348 (customize-set-variable 'font-lock-maximum-decoration nil) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1349 (font-lock-recompute-variables))) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1350 :style radio |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1351 :active (fboundp 'font-lock-mode) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1352 :selected (and (boundp 'font-lock-maximum-decoration) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1353 (or (and (not (integerp font-lock-maximum-decoration)) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1354 (not (eq t font-lock-maximum-decoration))) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1355 (and (integerp font-lock-maximum-decoration) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1356 (<= font-lock-maximum-decoration 0))))] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1357 ["%_2 More" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1358 (progn |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1359 (require 'font-lock) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1360 (if (and (integerp font-lock-maximum-decoration) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1361 (= 1 font-lock-maximum-decoration)) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1362 nil |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1363 (customize-set-variable 'font-lock-maximum-decoration 1) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1364 (font-lock-recompute-variables))) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1365 :style radio |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1366 :active (fboundp 'font-lock-mode) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1367 :selected (and (boundp 'font-lock-maximum-decoration) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1368 (integerp font-lock-maximum-decoration) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1369 (= 1 font-lock-maximum-decoration))] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1370 ["%_3 Even More" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1371 (progn |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1372 (require 'font-lock) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1373 (if (and (integerp font-lock-maximum-decoration) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1374 (= 2 font-lock-maximum-decoration)) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1375 nil |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1376 (customize-set-variable 'font-lock-maximum-decoration 2) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1377 (font-lock-recompute-variables))) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1378 :style radio |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1379 :active (fboundp 'font-lock-mode) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1380 :selected (and (boundp 'font-lock-maximum-decoration) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1381 (integerp font-lock-maximum-decoration) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1382 (= 2 font-lock-maximum-decoration))] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1383 ["%_4 Most" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1384 (progn |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1385 (require 'font-lock) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1386 (if (or (eq font-lock-maximum-decoration t) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1387 (and (integerp font-lock-maximum-decoration) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1388 (>= font-lock-maximum-decoration 3))) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1389 nil |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1390 (customize-set-variable 'font-lock-maximum-decoration t) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1391 (font-lock-recompute-variables))) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1392 :style radio |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1393 :active (fboundp 'font-lock-mode) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1394 :selected (and (boundp 'font-lock-maximum-decoration) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1395 (or (eq font-lock-maximum-decoration t) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1396 (and (integerp font-lock-maximum-decoration) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1397 (>= font-lock-maximum-decoration 3))))] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1398 "-----" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1399 ["Lazy %_Lock" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1400 (progn ;; becomes buffer local |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1401 (lazy-lock-mode) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1402 (customize-set-variable 'lazy-lock-mode lazy-lock-mode) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1403 ;; this shouldn't be necessary so there has to |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1404 ;; be a redisplay bug lurking somewhere (or |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1405 ;; possibly another event handler bug) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1406 (redraw-modeline)) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1407 :active (and (boundp 'font-lock-mode) (boundp 'lazy-lock-mode) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1408 font-lock-mode) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1409 :style toggle |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1410 :selected (and (boundp 'lazy-lock-mode) lazy-lock-mode)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1411 ["Lazy %_Shot" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1412 (progn ;; becomes buffer local |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1413 (lazy-shot-mode) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1414 (customize-set-variable 'lazy-shot-mode lazy-shot-mode) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1415 ;; this shouldn't be necessary so there has to |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1416 ;; be a redisplay bug lurking somewhere (or |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1417 ;; possibly another event handler bug) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1418 (redraw-modeline)) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1419 :active (and (boundp 'font-lock-mode) (boundp 'lazy-shot-mode) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1420 font-lock-mode) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1421 :style toggle |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1422 :selected (and (boundp 'lazy-shot-mode) lazy-shot-mode)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1423 ["Cac%_hing" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1424 (progn ;; becomes buffer local |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1425 (fast-lock-mode) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1426 (customize-set-variable 'fast-lock-mode fast-lock-mode) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1427 ;; this shouldn't be necessary so there has to |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1428 ;; be a redisplay bug lurking somewhere (or |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1429 ;; possibly another event handler bug) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1430 (redraw-modeline)) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1431 :active (and (boundp 'font-lock-mode) (boundp 'fast-lock-mode) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1432 font-lock-mode) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1433 :style toggle |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1434 :selected (and (boundp 'fast-lock-mode) fast-lock-mode)] |
442 | 1435 ) |
4372
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1436 ("%_Font" :filter font-menu-family-constructor) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1437 ("Font Si%_ze" :filter font-menu-size-constructor) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1438 ;; ("Font Weig%_ht" :filter font-menu-weight-constructor) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1439 ["Edit Fa%_ces..." (customize-face nil)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1440 "-----" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1441 ["Edit I%_nit File" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1442 ;; #### there should be something that holds the name that the init |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1443 ;; file should be created as, when it's not present. |
4382
12ff8dc2b57e
Create the containing directory for the custom and init files if necessary.
Aidan Kehoe <kehoea@parhasard.net>
parents:
4372
diff
changeset
|
1444 (let ((el-file (or user-init-file "~/.xemacs/init.el")) |
12ff8dc2b57e
Create the containing directory for the custom and init files if necessary.
Aidan Kehoe <kehoea@parhasard.net>
parents:
4372
diff
changeset
|
1445 el-file-directory) |
4372
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1446 (if (string-match "\\.elc$" el-file) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1447 (setq el-file |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1448 (substring user-init-file 0 (1- (length el-file))))) |
4382
12ff8dc2b57e
Create the containing directory for the custom and init files if necessary.
Aidan Kehoe <kehoea@parhasard.net>
parents:
4372
diff
changeset
|
1449 (unless (file-directory-p |
12ff8dc2b57e
Create the containing directory for the custom and init files if necessary.
Aidan Kehoe <kehoea@parhasard.net>
parents:
4372
diff
changeset
|
1450 (setq el-file-directory (file-name-directory el-file))) |
12ff8dc2b57e
Create the containing directory for the custom and init files if necessary.
Aidan Kehoe <kehoea@parhasard.net>
parents:
4372
diff
changeset
|
1451 (message "Creating %s... " el-file-directory) |
12ff8dc2b57e
Create the containing directory for the custom and init files if necessary.
Aidan Kehoe <kehoea@parhasard.net>
parents:
4372
diff
changeset
|
1452 (make-directory el-file-directory t) |
12ff8dc2b57e
Create the containing directory for the custom and init files if necessary.
Aidan Kehoe <kehoea@parhasard.net>
parents:
4372
diff
changeset
|
1453 (message "Creating %s... done." el-file-directory)) |
4372
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1454 (find-file el-file) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1455 (or (eq major-mode 'emacs-lisp-mode) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1456 (emacs-lisp-mode)))] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1457 ["%_Save Options to Custom File" customize-save-customized] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1458 ) |
442 | 1459 |
1460 ("%_Buffers" | |
4372
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1461 :filter buffers-menu-filter |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1462 ["Go To %_Previous Buffer" switch-to-other-buffer] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1463 ["Go To %_Buffer..." switch-to-buffer] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1464 "----" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1465 ["%_List All Buffers" list-all-buffers] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1466 ["%_Delete Buffer" kill-this-buffer |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1467 :suffix (if put-buffer-names-in-file-menu (buffer-name) "")] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1468 "----" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1469 ) |
428 | 1470 |
4372
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1471 nil ; the partition: menus after this are flushright |
428 | 1472 |
442 | 1473 ("%_Help" |
4372
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1474 ["%_About XEmacs..." about-xemacs] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1475 ["%_Home Page (www.xemacs.org)" xemacs-www-page |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1476 :active (fboundp 'browse-url)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1477 ["What's %_New in XEmacs" view-emacs-news] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1478 ["B%_eta Info" describe-beta |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1479 :included (string-match "beta" emacs-version)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1480 "-----" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1481 ("%_Info (Online Docs)" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1482 ["%_Info Contents" (Info-goto-node "(dir)")] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1483 "-----" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1484 ["XEmacs %_User's Manual" (Info-goto-node "(XEmacs)")] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1485 ["XEmacs %_Lisp Reference Manual" (Info-goto-node "(Lispref)")] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1486 ["All About %_Packages" (Info-goto-node "(xemacs)Packages")] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1487 ["%_Getting Started with XEmacs" (Info-goto-node "(New-Users-Guide)")] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1488 ["%_XEmacs Internals Manual" (Info-goto-node "(Internals)")] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1489 ["%_How to Use Info" (Info-goto-node "(Info)")] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1490 "-----" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1491 ["Lookup %_Key Sequence in User's Manual..." |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1492 Info-goto-emacs-key-command-node] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1493 ["Lookup %_Command in User's Manual..." Info-goto-emacs-command-node] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1494 ["Lookup %_Function in Lisp Reference..." Info-elisp-ref] |
428 | 1495 "-----" |
4372
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1496 ["Find %_Topic in User's Manual/Lispref..." |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1497 Info-search-index-in-xemacs-and-lispref] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1498 ["%_Search Text in User's Manual..." Info-search-text-in-xemacs] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1499 ["S%_earch Text in Lisp Reference..." |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1500 Info-search-text-in-lispref] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1501 ) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1502 ("XEmacs %_FAQ" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1503 ["%_FAQ (local)" xemacs-local-faq] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1504 ["FAQ via %_WWW" xemacs-www-faq |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1505 :active (fboundp 'browse-url)]) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1506 ("%_Tutorials" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1507 :filter tutorials-menu-filter) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1508 ("%_Samples" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1509 ["View Sample %_init.el" view-sample-init-el |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1510 :active (locate-data-file "sample.init.el")] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1511 ["View Sample .%_gtkrc" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1512 (Help-find-file (locate-data-file "sample.gtkrc")) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1513 :included (featurep 'gtk) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1514 :active (locate-data-file "sample.gtkrc")] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1515 ["View Sample .%_Xresources" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1516 (Help-find-file (locate-data-file "sample.Xresources")) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1517 :included (featurep 'x) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1518 :active (locate-data-file "sample.Xresources")] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1519 ["View Sample %_enriched.doc" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1520 (Help-find-file (locate-data-file "enriched.doc")) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1521 :active (locate-data-file "enriched.doc")]) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1522 ("%_Commands, Variables, Keys" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1523 ["Describe %_Mode" describe-mode] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1524 ["%_Apropos..." hyper-apropos] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1525 ["%_Command-Only Apropos..." command-hyper-apropos] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1526 ["Apropos %_Docs..." apropos-documentation] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1527 "-----" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1528 ["Describe %_Key..." describe-key] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1529 ["Show %_Bindings" describe-bindings] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1530 ["Show M%_ouse Bindings" describe-pointer] |
502 | 1531 "-----" |
4372
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1532 ["Describe %_Function..." describe-function] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1533 ["Describe %_Variable..." describe-variable] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1534 ["%_Locate Command in Keymap..." where-is]) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1535 ,@(when (featurep 'mule) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1536 `(("Internationa%_l" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1537 ("Describe %_Language Support" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1538 :filter |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1539 ,#'(lambda (menu) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1540 (menu-split-long-menu-and-sort |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1541 (mapcar #'(lambda (entry) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1542 `[ ,(car entry) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1543 (describe-language-environment |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1544 ',(car entry)) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1545 :style radio |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1546 :selected |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1547 ,(equal (car entry) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1548 current-language-environment)]) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1549 language-info-alist) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1550 ))) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1551 ["Describe %_Input Method" describe-input-method] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1552 ["Describe Current %_Coding Systems" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1553 describe-current-coding-system] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1554 ["Show Character %_Table" view-charset-by-menu] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1555 ;; not implemented yet |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1556 ["Show %_Diagnosis for MULE" mule-diag :active nil] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1557 ["Show \"%_hello\" in Many Languages" view-hello-file] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1558 ))) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1559 ("%_Other" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1560 ["%_Current Installation Info" describe-installation |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1561 :active (boundp 'Installation-string)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1562 ["%_Known Problems" view-xemacs-problems ] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1563 ["%_Obtaining the Latest Version" describe-distribution] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1564 ["%_No Warranty" describe-no-warranty] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1565 ["XEmacs %_License" describe-copying] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1566 ["Find %_Packages" finder-by-keyword] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1567 ["View %_Splash Screen" xemacs-splash-buffer] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1568 ["%_Unix Manual..." manual-entry]) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1569 "-----" |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1570 ["Recent %_Messages" (view-lossage t)] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1571 ["Recent %_Keystrokes" view-lossage] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1572 ["Recent %_Warnings" view-warnings] |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1573 ["Send %_Bug Report..." report-xemacs-bug |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1574 :active (fboundp 'report-xemacs-bug)])) |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1575 "The default XEmacs menubar. |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1576 See the documentation for `current-menubar' for details of the syntax |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1577 used here.") |
428 | 1578 |
1579 | |
771 | 1580 (defun init-menubar-at-startup () |
428 | 1581 "Don't call this. |
2376 | 1582 Adds `Load init files' button to menubar when starting up with -q." |
1583 ;; load-user-init-file finds the init files itself now | |
1584 (when (not load-user-init-file-p) | |
442 | 1585 (add-menu-button |
1586 nil | |
2376 | 1587 ["%_Load init files" |
442 | 1588 (progn |
1589 (mapc #'(lambda (buf) | |
1590 (with-current-buffer buf | |
2376 | 1591 (delete-menu-item '("Load init files")))) |
442 | 1592 (buffer-list)) |
1593 (load-user-init-file)) | |
1594 ] | |
1595 "Help"))) | |
428 | 1596 |
1597 | |
1598 ;;; The File menu | |
1599 | |
1600 (defvar put-buffer-names-in-file-menu t) | |
1601 | |
1602 ;;; The Buffers menu | |
1603 | |
1604 (defgroup buffers-menu nil | |
1605 "Customization of `Buffers' menu." | |
1606 :group 'menu) | |
1607 | |
442 | 1608 (defvar buffers-menu-omit-chars-list '(?b ?p ?l ?d)) |
1609 | |
428 | 1610 (defcustom buffers-menu-max-size 25 |
1611 "*Maximum number of entries which may appear on the \"Buffers\" menu. | |
1612 If this is 10, then only the ten most-recently-selected buffers will be | |
1613 shown. If this is nil, then all buffers will be shown. Setting this to | |
1614 a large number or nil will slow down menu responsiveness." | |
1615 :type '(choice (const :tag "Show all" nil) | |
1616 (integer 10)) | |
1617 :group 'buffers-menu) | |
1618 | |
1619 (defcustom complex-buffers-menu-p nil | |
1620 "*If non-nil, the buffers menu will contain several commands. | |
1621 Commands will be presented as submenus of each buffer line. If this | |
1622 is false, then there will be only one command: select that buffer." | |
1623 :type 'boolean | |
1624 :group 'buffers-menu) | |
1625 | |
1626 (defcustom buffers-menu-submenus-for-groups-p nil | |
1627 "*If non-nil, the buffers menu will contain one submenu per group of buffers. | |
1628 The grouping function is specified in `buffers-menu-grouping-function'. | |
1629 If this is an integer, do not build submenus if the number of buffers | |
1630 is not larger than this value." | |
1631 :type '(choice (const :tag "No Subgroups" nil) | |
1632 (integer :tag "Max. submenus" 10) | |
1633 (sexp :format "%t\n" :tag "Allow Subgroups" :value t)) | |
1634 :group 'buffers-menu) | |
1635 | |
1636 (defcustom buffers-menu-switch-to-buffer-function 'switch-to-buffer | |
1637 "*The function to call to select a buffer from the buffers menu. | |
1638 `switch-to-buffer' is a good choice, as is `pop-to-buffer'." | |
1639 :type '(radio (function-item switch-to-buffer) | |
1640 (function-item pop-to-buffer) | |
1641 (function :tag "Other")) | |
1642 :group 'buffers-menu) | |
1643 | |
1644 (defcustom buffers-menu-omit-function 'buffers-menu-omit-invisible-buffers | |
1645 "*If non-nil, a function specifying the buffers to omit from the buffers menu. | |
1646 This is passed a buffer and should return non-nil if the buffer should be | |
1647 omitted. The default value `buffers-menu-omit-invisible-buffers' omits | |
1648 buffers that are normally considered \"invisible\" (those whose name | |
1649 begins with a space)." | |
1650 :type '(choice (const :tag "None" nil) | |
1651 function) | |
1652 :group 'buffers-menu) | |
1653 | |
1654 (defcustom buffers-menu-format-buffer-line-function 'format-buffers-menu-line | |
442 | 1655 "*The function to call to return a string to represent a buffer in |
1656 the buffers menu. The function is passed a buffer and a number | |
1657 (starting with 1) indicating which buffer line in the menu is being | |
1658 processed and should return a string containing an accelerator | |
1659 spec. (Check out `menu-item-generate-accelerator-spec' as a convenient | |
1660 way of generating the accelerator specs.) The default value | |
1661 `format-buffers-menu-line' just returns the name of the buffer and | |
1662 uses the number as the accelerator. Also check out | |
1663 `slow-format-buffers-menu-line' which returns a whole bunch of info | |
1664 about a buffer. | |
1665 | |
1666 Note: Gross Compatibility Hack: Older versions of this function prototype | |
1667 only expected one argument, not two. We deal gracefully with such | |
1668 functions by simply calling them with one argument and leaving out the | |
1669 line number. However, this may go away at any time, so make sure to | |
1670 update all of your functions of this type." | |
428 | 1671 :type 'function |
1672 :group 'buffers-menu) | |
1673 | |
1674 (defcustom buffers-menu-sort-function | |
1675 'sort-buffers-menu-by-mode-then-alphabetically | |
1676 "*If non-nil, a function to sort the list of buffers in the buffers menu. | |
1677 It will be passed two arguments (two buffers to compare) and should return | |
1678 t if the first is \"less\" than the second. One possible value is | |
1679 `sort-buffers-menu-alphabetically'; another is | |
1680 `sort-buffers-menu-by-mode-then-alphabetically'." | |
1681 :type '(choice (const :tag "None" nil) | |
1682 function) | |
1683 :group 'buffers-menu) | |
1684 | |
1685 (defcustom buffers-menu-grouping-function | |
1686 'group-buffers-menu-by-mode-then-alphabetically | |
1687 "*If non-nil, a function to group buffers in the buffers menu together. | |
1688 It will be passed two arguments, successive members of the sorted buffers | |
1689 list after being passed through `buffers-menu-sort-function'. It should | |
1690 return non-nil if the second buffer begins a new group. The return value | |
1691 should be the name of the old group, which may be used in hierarchical | |
1692 buffers menus. The last invocation of the function contains nil as the | |
1693 second argument, so that the name of the last group can be determined. | |
1694 | |
1695 The sensible values of this function are dependent on the value specified | |
1696 for `buffers-menu-sort-function'." | |
1697 :type '(choice (const :tag "None" nil) | |
1698 function) | |
1699 :group 'buffers-menu) | |
1700 | |
792 | 1701 (defcustom list-all-buffers-function 'list-buffers |
1702 "*Function that `list-all-buffers' calls." | |
1703 :type '(choice (const list-buffers) | |
1704 (const ibuffer) | |
1705 (const ibuffer-other-window) | |
1706 function) | |
1707 :group 'buffers-menu) | |
1708 | |
428 | 1709 (defun sort-buffers-menu-alphabetically (buf1 buf2) |
1710 "For use as a value of `buffers-menu-sort-function'. | |
1711 Sorts the buffers in alphabetical order by name, but puts buffers beginning | |
1712 with a star at the end of the list." | |
1713 (let* ((nam1 (buffer-name buf1)) | |
1714 (nam2 (buffer-name buf2)) | |
438 | 1715 (inv1p (not (null (string-match "\\` " nam1)))) |
1716 (inv2p (not (null (string-match "\\` " nam2)))) | |
428 | 1717 (star1p (not (null (string-match "\\`*" nam1)))) |
1718 (star2p (not (null (string-match "\\`*" nam2))))) | |
438 | 1719 (cond ((not (eq inv1p inv2p)) |
1720 (not inv1p)) | |
1721 ((not (eq star1p star2p)) | |
1722 (not star1p)) | |
1723 (t | |
1724 (string-lessp nam1 nam2))))) | |
428 | 1725 |
1726 (defun sort-buffers-menu-by-mode-then-alphabetically (buf1 buf2) | |
1727 "For use as a value of `buffers-menu-sort-function'. | |
1728 Sorts first by major mode and then alphabetically by name, but puts buffers | |
1729 beginning with a star at the end of the list." | |
1730 (let* ((nam1 (buffer-name buf1)) | |
1731 (nam2 (buffer-name buf2)) | |
438 | 1732 (inv1p (not (null (string-match "\\` " nam1)))) |
1733 (inv2p (not (null (string-match "\\` " nam2)))) | |
428 | 1734 (star1p (not (null (string-match "\\`*" nam1)))) |
1735 (star2p (not (null (string-match "\\`*" nam2)))) | |
1736 (mode1 (symbol-value-in-buffer 'major-mode buf1)) | |
1737 (mode2 (symbol-value-in-buffer 'major-mode buf2))) | |
438 | 1738 (cond ((not (eq inv1p inv2p)) |
1739 (not inv1p)) | |
1740 ((not (eq star1p star2p)) | |
1741 (not star1p)) | |
428 | 1742 ((and star1p star2p (string-lessp nam1 nam2))) |
438 | 1743 ((string-lessp mode1 mode2) |
1744 t) | |
1745 ((string-lessp mode2 mode1) | |
1746 nil) | |
1747 (t | |
1748 (string-lessp nam1 nam2))))) | |
428 | 1749 |
1750 ;; this version is too slow on some machines. | |
442 | 1751 ;; (vintage 1990, that is) |
1752 (defun slow-format-buffers-menu-line (buffer n) | |
428 | 1753 "For use as a value of `buffers-menu-format-buffer-line-function'. |
1754 This returns a string containing a bunch of info about the buffer." | |
442 | 1755 (concat (menu-item-generate-accelerator-spec n buffers-menu-omit-chars-list) |
1756 (format "%s%s %-19s %6s %-15s %s" | |
1757 (if (buffer-modified-p buffer) "*" " ") | |
1758 (if (symbol-value-in-buffer 'buffer-read-only buffer) | |
1759 "%" " ") | |
1760 (buffer-name buffer) | |
1761 (buffer-size buffer) | |
1762 (symbol-value-in-buffer 'mode-name buffer) | |
1763 (or (buffer-file-name buffer) "")))) | |
428 | 1764 |
442 | 1765 (defun format-buffers-menu-line (buffer n) |
428 | 1766 "For use as a value of `buffers-menu-format-buffer-line-function'. |
1767 This just returns the buffer's name." | |
442 | 1768 (concat (menu-item-generate-accelerator-spec n buffers-menu-omit-chars-list) |
1769 (buffer-name buffer))) | |
428 | 1770 |
1771 (defun group-buffers-menu-by-mode-then-alphabetically (buf1 buf2) | |
1772 "For use as a value of `buffers-menu-grouping-function'. | |
1773 This groups buffers by major mode. It only really makes sense if | |
1774 `buffers-menu-sorting-function' is | |
1775 `sort-buffers-menu-by-mode-then-alphabetically'." | |
1776 (cond ((string-match "\\`*" (buffer-name buf1)) | |
1777 (and (null buf2) "*Misc*")) | |
1778 ((or (null buf2) | |
1779 (string-match "\\`*" (buffer-name buf2)) | |
1780 (not (eq (symbol-value-in-buffer 'major-mode buf1) | |
1781 (symbol-value-in-buffer 'major-mode buf2)))) | |
1782 (symbol-value-in-buffer 'mode-name buf1)) | |
1783 (t nil))) | |
1784 | |
1785 (defun buffer-menu-save-buffer (buffer) | |
1786 (save-excursion | |
1787 (set-buffer buffer) | |
1788 (save-buffer))) | |
1789 | |
1790 (defun buffer-menu-write-file (buffer) | |
1791 (save-excursion | |
1792 (set-buffer buffer) | |
1793 (write-file (read-file-name | |
1794 (format "Write %s to file: " | |
1795 (buffer-name (current-buffer))))))) | |
1796 | |
1797 (defsubst build-buffers-menu-internal (buffers) | |
442 | 1798 (let (name line (n 0)) |
428 | 1799 (mapcar |
1800 #'(lambda (buffer) | |
1801 (if (eq buffer t) | |
1802 "---" | |
442 | 1803 (setq n (1+ n)) |
1804 (setq line | |
1805 ; #### a truly Kyle-friendly hack. | |
1806 (let ((fn buffers-menu-format-buffer-line-function)) | |
1807 (if (= (function-max-args fn) 1) | |
1808 (funcall fn buffer) | |
1809 (funcall fn buffer n)))) | |
428 | 1810 (if complex-buffers-menu-p |
1811 (delq nil | |
1812 (list line | |
442 | 1813 (vector "S%_witch to Buffer" |
428 | 1814 (list buffers-menu-switch-to-buffer-function |
1815 (setq name (buffer-name buffer))) | |
1816 t) | |
1817 (if (eq buffers-menu-switch-to-buffer-function | |
1818 'switch-to-buffer) | |
442 | 1819 (vector "Switch to Buffer, Other %_Frame" |
428 | 1820 (list 'switch-to-buffer-other-frame |
1821 (setq name (buffer-name buffer))) | |
1822 t) | |
1823 nil) | |
1824 (if (and (buffer-modified-p buffer) | |
1825 (buffer-file-name buffer)) | |
442 | 1826 (vector "%_Save Buffer" |
428 | 1827 (list 'buffer-menu-save-buffer name) t) |
442 | 1828 ["%_Save Buffer" nil nil] |
428 | 1829 ) |
442 | 1830 (vector "Save %_As..." |
428 | 1831 (list 'buffer-menu-write-file name) t) |
442 | 1832 (vector "%_Delete Buffer" (list 'kill-buffer name) |
428 | 1833 t))) |
440 | 1834 ;; #### We don't want buffer names to be translated, |
1835 ;; #### so we put the buffer name in the suffix. | |
1836 ;; #### Also, avoid losing with non-ASCII buffer names. | |
1837 ;; #### We still lose, however, if complex-buffers-menu-p. --mrb | |
428 | 1838 (vector "" |
1839 (list buffers-menu-switch-to-buffer-function | |
1840 (buffer-name buffer)) | |
1841 t line)))) | |
1842 buffers))) | |
1843 | |
1844 (defun buffers-menu-filter (menu) | |
1845 "This is the menu filter for the top-level buffers \"Buffers\" menu. | |
1846 It dynamically creates a list of buffers to use as the contents of the menu. | |
1847 Only the most-recently-used few buffers will be listed on the menu, for | |
1848 efficiency reasons. You can control how many buffers will be shown by | |
1849 setting `buffers-menu-max-size'. You can control the text of the menu | |
1850 items by redefining the function `format-buffers-menu-line'." | |
1851 (let ((buffers (delete-if buffers-menu-omit-function (buffer-list)))) | |
1852 (and (integerp buffers-menu-max-size) | |
1853 (> buffers-menu-max-size 1) | |
1854 (> (length buffers) buffers-menu-max-size) | |
1855 ;; shorten list of buffers (not with submenus!) | |
1856 (not (and buffers-menu-grouping-function | |
1857 buffers-menu-submenus-for-groups-p)) | |
1858 (setcdr (nthcdr buffers-menu-max-size buffers) nil)) | |
1859 (if buffers-menu-sort-function | |
1860 (setq buffers (sort buffers buffers-menu-sort-function))) | |
1861 (if (and buffers-menu-grouping-function | |
1862 buffers-menu-submenus-for-groups-p | |
1863 (or (not (integerp buffers-menu-submenus-for-groups-p)) | |
1864 (> (length buffers) buffers-menu-submenus-for-groups-p))) | |
1865 (let (groups groupnames current-group) | |
1866 (mapl | |
1867 #'(lambda (sublist) | |
1868 (let ((groupname (funcall buffers-menu-grouping-function | |
1869 (car sublist) (cadr sublist)))) | |
1870 (setq current-group (cons (car sublist) current-group)) | |
1871 (if groupname | |
1872 (progn | |
1873 (setq groups (cons (nreverse current-group) | |
1874 groups)) | |
1875 (setq groupnames (cons groupname groupnames)) | |
1876 (setq current-group nil))))) | |
1877 buffers) | |
1878 (setq buffers | |
1879 (mapcar* | |
1880 #'(lambda (groupname group) | |
1881 (cons groupname (build-buffers-menu-internal group))) | |
1882 (nreverse groupnames) | |
1883 (nreverse groups)))) | |
1884 (if buffers-menu-grouping-function | |
1885 (progn | |
1886 (setq buffers | |
1887 (mapcon | |
1888 #'(lambda (sublist) | |
1889 (cond ((funcall buffers-menu-grouping-function | |
1890 (car sublist) (cadr sublist)) | |
1891 (list (car sublist) t)) | |
1892 (t (list (car sublist))))) | |
1893 buffers)) | |
1894 ;; remove a trailing separator. | |
1895 (and (>= (length buffers) 2) | |
1896 (let ((lastcdr (nthcdr (- (length buffers) 2) buffers))) | |
1897 (if (eq t (cadr lastcdr)) | |
1898 (setcdr lastcdr nil)))))) | |
1899 (setq buffers (build-buffers-menu-internal buffers))) | |
1900 (append menu buffers) | |
1901 )) | |
1902 | |
792 | 1903 (defun list-all-buffers () |
1904 "Display a list of buffers. Calls `list-all-buffers-function'." | |
1905 (interactive) | |
1906 (funcall (if (fboundp list-all-buffers-function) | |
1907 list-all-buffers-function | |
1908 'list-buffers))) | |
1909 | |
428 | 1910 |
1911 ;;; The Help menu | |
1912 | |
442 | 1913 (defun tutorials-menu-filter (menu-items) |
1914 (declare (special language-info-alist | |
1915 current-language-environment | |
1916 tutorial-supported-languages)) | |
1917 (append | |
1918 (if (featurep 'mule) | |
1919 (if (assq 'tutorial | |
1920 (assoc current-language-environment language-info-alist)) | |
1921 `([,(concat "%_Default (" current-language-environment ")") | |
1922 help-with-tutorial])) | |
1923 '(["%_English" help-with-tutorial])) | |
1924 (submenu-generate-accelerator-spec | |
1925 (if (featurep 'mule) | |
1926 ;; Mule tutorials. | |
1927 (mapcan #'(lambda (lang) | |
1928 (let ((tut (assq 'tutorial lang))) | |
1929 (and tut | |
1930 (not (string= (car lang) "ASCII")) | |
1931 ;; skip current language, since we already | |
1932 ;; included it first | |
1933 (not (string= (car lang) | |
1934 current-language-environment)) | |
4372
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1935 ;; Hackish approach; if a language environment |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1936 ;; doesn't have associated locale information, |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1937 ;; it's not the preferred implementation for that |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1938 ;; language. Don't use it. |
ebb35ddea76a
Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents:
3074
diff
changeset
|
1939 (assq 'locale lang) |
442 | 1940 `([,(car lang) |
771 | 1941 (help-with-tutorial nil ,(car lang))])))) |
442 | 1942 language-info-alist) |
1943 ;; Non mule tutorials. | |
1944 (mapcar #'(lambda (lang) | |
1945 `[,(car lang) | |
771 | 1946 (help-with-tutorial nil ,(car lang))]) |
442 | 1947 tutorial-supported-languages))))) |
428 | 1948 |
1949 (set-menubar default-menubar) | |
1950 | |
814 | 1951 (when (featurep 'menubar-items) |
1952 (loop for buf being the buffers do | |
1953 (or (eq default-menubar (symbol-value-in-buffer 'current-menubar buf)) | |
1954 (with-current-buffer buf | |
1955 (condition-case nil | |
1956 (funcall major-mode) | |
1957 (error (setq current-menubar default-menubar))))))) | |
1958 | |
428 | 1959 |
1960 ;;; Popup menus. | |
1961 | |
1962 (defconst default-popup-menu | |
1963 '("XEmacs Commands" | |
502 | 1964 ["%_Split Window" split-window-vertically] |
1965 ["S%_plit Window (Side by Side)" split-window-horizontally] | |
1966 ["%_Un-Split (Keep This)" delete-other-windows | |
1967 :active (not (one-window-p t))] | |
1968 ["Un-Split (Keep %_Others)" delete-window | |
1969 :active (not (one-window-p t))] | |
428 | 1970 )) |
1971 | |
1972 ;; In an effort to avoid massive menu clutter, this mostly worthless menu is | |
440 | 1973 ;; superseded by any local popup menu... |
428 | 1974 (setq-default mode-popup-menu default-popup-menu) |
1975 | |
442 | 1976 |
428 | 1977 ;;; backwards compatibility |
1978 (provide 'x-menubar) | |
1979 (provide 'menubar-items) | |
1980 | |
438 | 1981 ;;; menubar-items.el ends here. |