annotate lisp/menubar-items.el @ 5940:c608d4b0b75e cygwin64 tip

rescue lost branch from 64bit.backup
author Henry Thompson <ht@markup.co.uk>
date Thu, 16 Dec 2021 18:48:58 +0000
parents 40fbceabaafd
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1 ;;; menubar-items.el --- Menubar and popup-menu content for XEmacs.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
3 ;; Copyright (C) 1991-1995, 1997-1998 Free Software Foundation, Inc.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
4 ;; Copyright (C) 1995 Tinker Systems and INS Engineering Corp.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
5 ;; Copyright (C) 1995 Sun Microsystems.
1275
57b76886836d [xemacs-hg @ 2003-02-08 02:29:52 by ben]
ben
parents: 903
diff changeset
6 ;; Copyright (C) 1995, 1996, 2000, 2001, 2002, 2003 Ben Wing.
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
7 ;; Copyright (C) 1997 MORIOKA Tomohiko.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
8
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
9 ;; Maintainer: XEmacs Development Team
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
10 ;; Keywords: frames, extensions, internal, dumped
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
11
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
12 ;; This file is part of XEmacs.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
13
5402
308d34e9f07d Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents: 4783
diff changeset
14 ;; XEmacs is free software: you can redistribute it and/or modify it
308d34e9f07d Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents: 4783
diff changeset
15 ;; under the terms of the GNU General Public License as published by the
308d34e9f07d Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents: 4783
diff changeset
16 ;; Free Software Foundation, either version 3 of the License, or (at your
308d34e9f07d Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents: 4783
diff changeset
17 ;; option) any later version.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
18
5402
308d34e9f07d Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents: 4783
diff changeset
19 ;; XEmacs is distributed in the hope that it will be useful, but WITHOUT
308d34e9f07d Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents: 4783
diff changeset
20 ;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
308d34e9f07d Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents: 4783
diff changeset
21 ;; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
308d34e9f07d Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents: 4783
diff changeset
22 ;; for more details.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
23
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
24 ;; You should have received a copy of the GNU General Public License
5402
308d34e9f07d Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents: 4783
diff changeset
25 ;; along with XEmacs. If not, see <http://www.gnu.org/licenses/>.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
26
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
27 ;;; Authorship:
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
28
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
29 ;; Created c. 1991 for Lucid Emacs. Originally called x-menubar.el.
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
30 ;; Contained four menus -- File, Edit, Buffers, Help.
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
31 ;; Dynamic menu changes possible only through activate-menubar-hook.
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
32 ;; Also contained menu manipulation funs, e.g. find-menu-item, add-menu.
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
33 ;; Options menu added for 19.9 by Jamie Zawinski, late 1993.
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
34 ;; Major reorganization c. 1994 by Ben Wing; added many items and moved
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
35 ;; some items to two new menus, Apps and Tools. (for 19.10?)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
36 ;; Generic menubar functions moved to new file, menubar.el, by Ben Wing,
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
37 ;; 1995, for 19.12; also, creation of current buffers menu options,
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
38 ;; and buffers menu changed from purely most-recent to sorted alphabetical,
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
39 ;; by mode. Also added mode-popup-menu support.
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
40 ;; New API (add-submenu, add-menu-button) and menu filter support added
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
41 ;; late summer 1995 by Stig, for 19.13. Also popup-menubar-menu.
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
42 ;; Renamed to menubar-items.el c. 1998, with MS Win support.
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
43 ;; Options menu rewritten to use custom c. 1999 by ? (Jan Vroonhof?).
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
44 ;; Major reorganization Mar. 2000 by Ben Wing; added many items and changed
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
45 ;; top-level menus to File, Edit, View, Cmds, Tools, Options, Buffers.
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
46 ;; Accelerator spec functionality added Mar. 2000 by Ben Wing.
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
47
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
48 ;;; Commentary:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
49
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
50 ;; This file is dumped with XEmacs (when window system and menubar support is
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
51 ;; compiled in).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
52
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
53 ;;; Code:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
54
679
6b890cfde2b1 [xemacs-hg @ 2001-11-29 18:39:21 by adrian]
adrian
parents: 644
diff changeset
55 (defun Menubar-items-truncate-history (list count label-length)
6b890cfde2b1 [xemacs-hg @ 2001-11-29 18:39:21 by adrian]
adrian
parents: 644
diff changeset
56 "Truncate a history LIST to first COUNT items.
6b890cfde2b1 [xemacs-hg @ 2001-11-29 18:39:21 by adrian]
adrian
parents: 644
diff changeset
57 Return a list of (label value) lists with labels truncated to last
6b890cfde2b1 [xemacs-hg @ 2001-11-29 18:39:21 by adrian]
adrian
parents: 644
diff changeset
58 LABEL-LENGTH characters of value."
464
5aa1854ad537 Import from CVS: tag r21-2-47
cvs
parents: 462
diff changeset
59 (mapcar #'(lambda (x)
679
6b890cfde2b1 [xemacs-hg @ 2001-11-29 18:39:21 by adrian]
adrian
parents: 644
diff changeset
60 (if (<= (length x) label-length)
6b890cfde2b1 [xemacs-hg @ 2001-11-29 18:39:21 by adrian]
adrian
parents: 644
diff changeset
61 (list x x)
6b890cfde2b1 [xemacs-hg @ 2001-11-29 18:39:21 by adrian]
adrian
parents: 644
diff changeset
62 (list
6b890cfde2b1 [xemacs-hg @ 2001-11-29 18:39:21 by adrian]
adrian
parents: 644
diff changeset
63 (concat "..." (substring x (- label-length))) x)))
6b890cfde2b1 [xemacs-hg @ 2001-11-29 18:39:21 by adrian]
adrian
parents: 644
diff changeset
64 (if (<= (length list) count)
464
5aa1854ad537 Import from CVS: tag r21-2-47
cvs
parents: 462
diff changeset
65 list
679
6b890cfde2b1 [xemacs-hg @ 2001-11-29 18:39:21 by adrian]
adrian
parents: 644
diff changeset
66 (butlast list (- (length list) count)))))
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
67
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 732
diff changeset
68
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 732
diff changeset
69 (defun coding-system-menu-filter (fun active &optional dots)
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 732
diff changeset
70 "Filter for menu entries with a submenu listing all coding systems.
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 732
diff changeset
71 This is for operations that take a coding system as an argument. FUN
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 732
diff changeset
72 should be a function of one argument, which will be a coding system symbol.
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 732
diff changeset
73 ACTIVE should be a function one argument (again, a coding system symbol),
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 732
diff changeset
74 indicating whether the entry is active. If DOTS is given, the menu entries
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 732
diff changeset
75 will have three dots appended.
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 732
diff changeset
76
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 732
diff changeset
77 Write your filter like this:
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 732
diff changeset
78
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 732
diff changeset
79 :filter
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 732
diff changeset
80 (lambda (menu)
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 732
diff changeset
81 (lambda (entry) ...)
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 732
diff changeset
82 (lambda (entry) ...))
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 732
diff changeset
83 "
2545
9caf26dd924f [xemacs-hg @ 2005-02-03 05:03:36 by ben]
ben
parents: 2505
diff changeset
84 (menu-split-long-menu-and-sort
9caf26dd924f [xemacs-hg @ 2005-02-03 05:03:36 by ben]
ben
parents: 2505
diff changeset
85 (mapcar
9caf26dd924f [xemacs-hg @ 2005-02-03 05:03:36 by ben]
ben
parents: 2505
diff changeset
86 #'(lambda (_csmf_entry)
9caf26dd924f [xemacs-hg @ 2005-02-03 05:03:36 by ben]
ben
parents: 2505
diff changeset
87 `[ ,(concat (coding-system-description _csmf_entry)
9caf26dd924f [xemacs-hg @ 2005-02-03 05:03:36 by ben]
ben
parents: 2505
diff changeset
88 (if dots "..." ""))
9caf26dd924f [xemacs-hg @ 2005-02-03 05:03:36 by ben]
ben
parents: 2505
diff changeset
89 (funcall ,fun ',_csmf_entry)
9caf26dd924f [xemacs-hg @ 2005-02-03 05:03:36 by ben]
ben
parents: 2505
diff changeset
90 :active (funcall ,active ',_csmf_entry)
9caf26dd924f [xemacs-hg @ 2005-02-03 05:03:36 by ben]
ben
parents: 2505
diff changeset
91 ])
9caf26dd924f [xemacs-hg @ 2005-02-03 05:03:36 by ben]
ben
parents: 2505
diff changeset
92 (delete-if
9caf26dd924f [xemacs-hg @ 2005-02-03 05:03:36 by ben]
ben
parents: 2505
diff changeset
93 #'(lambda (name)
9caf26dd924f [xemacs-hg @ 2005-02-03 05:03:36 by ben]
ben
parents: 2505
diff changeset
94 (or (coding-system-alias-p name)
9caf26dd924f [xemacs-hg @ 2005-02-03 05:03:36 by ben]
ben
parents: 2505
diff changeset
95 (not (eq name (coding-system-name
9caf26dd924f [xemacs-hg @ 2005-02-03 05:03:36 by ben]
ben
parents: 2505
diff changeset
96 (coding-system-base name))))))
9caf26dd924f [xemacs-hg @ 2005-02-03 05:03:36 by ben]
ben
parents: 2505
diff changeset
97 (coding-system-list)))))
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 732
diff changeset
98
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
99 (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
100 ;; 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
101 `(("%_File"
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
102 ["%_Open..." find-file]
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
103 ["Open in Other %_Window..." find-file-other-window]
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
104 ["Open in New %_Frame..." find-file-other-frame]
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 732
diff changeset
105 ("Open with Specified %_Encoding"
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 732
diff changeset
106 :filter
4372
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
107 ,#'(lambda (menu)
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
108 (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
109 (lambda (entry)
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
110 (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
111 (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
112 (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
113 t)))
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
114 ["%_Hex Edit File..." hexl-find-file
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
115 :active (fboundp 'hexl-find-file)]
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
116 ["%_Insert File..." insert-file]
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
117 ["%_View File..." view-file]
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
118 "------"
788
026c5bf9c134 [xemacs-hg @ 2002-03-21 07:29:57 by ben]
ben
parents: 771
diff changeset
119 ["%_New Frame" make-frame]
026c5bf9c134 [xemacs-hg @ 2002-03-21 07:29:57 by ben]
ben
parents: 771
diff changeset
120 ["Frame on Other %_Display..." make-frame-on-display
026c5bf9c134 [xemacs-hg @ 2002-03-21 07:29:57 by ben]
ben
parents: 771
diff changeset
121 :active (fboundp 'make-frame-on-display)]
026c5bf9c134 [xemacs-hg @ 2002-03-21 07:29:57 by ben]
ben
parents: 771
diff changeset
122 ["%_Close Frame" delete-frame
026c5bf9c134 [xemacs-hg @ 2002-03-21 07:29:57 by ben]
ben
parents: 771
diff changeset
123 :active (not (eq (next-frame (selected-frame) 'nomini 'window-system)
026c5bf9c134 [xemacs-hg @ 2002-03-21 07:29:57 by ben]
ben
parents: 771
diff changeset
124 (selected-frame)))]
026c5bf9c134 [xemacs-hg @ 2002-03-21 07:29:57 by ben]
ben
parents: 771
diff changeset
125 "-----"
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
126 ["%_Save" save-buffer
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
127 :active (buffer-modified-p)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
128 :suffix (if put-buffer-names-in-file-menu (buffer-name) "")]
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
129 ["Save %_As..." write-file]
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
130 ["Save So%_me Buffers" save-some-buffers]
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
131 "-----"
903
4a27df428c73 [xemacs-hg @ 2002-07-06 05:48:14 by andyp]
andyp
parents: 851
diff changeset
132 ,@(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
133 '(["Page Set%_up..." generic-page-setup]))
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
134 ["%_Print" generic-print-buffer
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
135 :active (or (valid-specifier-tag-p 'msprinter)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
136 (and (not (eq system-type 'windows-nt))
506
39ccc7dd8077 [xemacs-hg @ 2001-05-05 08:39:59 by ben]
ben
parents: 502
diff changeset
137 (fboundp 'lpr-region)))
510
5bdbc721d46a [xemacs-hg @ 2001-05-06 08:33:35 by ben]
ben
parents: 506
diff changeset
138 :suffix (if (region-active-p) "Selection..."
5bdbc721d46a [xemacs-hg @ 2001-05-06 08:33:35 by ben]
ben
parents: 506
diff changeset
139 (if put-buffer-names-in-file-menu (concat (buffer-name) "...")
5bdbc721d46a [xemacs-hg @ 2001-05-06 08:33:35 by ben]
ben
parents: 506
diff changeset
140 "..."))]
903
4a27df428c73 [xemacs-hg @ 2002-07-06 05:48:14 by andyp]
andyp
parents: 851
diff changeset
141 ,@(unless (valid-specifier-tag-p 'msprinter)
506
39ccc7dd8077 [xemacs-hg @ 2001-05-05 08:39:59 by ben]
ben
parents: 502
diff changeset
142 '(["Prett%_y-Print" ps-print-buffer-with-faces
39ccc7dd8077 [xemacs-hg @ 2001-05-05 08:39:59 by ben]
ben
parents: 502
diff changeset
143 :active (fboundp 'ps-print-buffer-with-faces)
39ccc7dd8077 [xemacs-hg @ 2001-05-05 08:39:59 by ben]
ben
parents: 502
diff changeset
144 :suffix (if put-buffer-names-in-file-menu (buffer-name) "")]))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
145 "-----"
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
146 ["%_Revert Buffer" revert-buffer
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
147 :active (or buffer-file-name revert-buffer-function)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
148 :suffix (if put-buffer-names-in-file-menu (buffer-name) "")]
793
e38acbeb1cae [xemacs-hg @ 2002-03-29 04:46:17 by ben]
ben
parents: 792
diff changeset
149 ("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
150 ("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
151 :filter
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
152 ,#'(lambda (menu)
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
153 (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
154 (lambda (entry)
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
155 (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
156 (revert-buffer)))
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
157 (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
158 t)))
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
159 ["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
160 :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
161 :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
162 ["Recover %_Session..." recover-session]
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 732
diff changeset
163 )
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
164 "-----"
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
165 ["E%_xit XEmacs" save-buffers-kill-emacs]
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
166 )
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
167
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
168 ("%_Edit"
4372
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
169 ["%_Undo" undo
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
170 :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
171 (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
172 :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
173 ["%_Redo" redo
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
174 :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
175 :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
176 (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
177 (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
178 (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
179 (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
180 (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
181 (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
182 (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
183 :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
184 "----"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
185 ["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
186 :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
187 ["%_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
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 ["%_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
190 :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
191 ["%_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
192 :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
193 "----"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
194 ["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
195 ["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
196 ["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
197 ["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
198 "----"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
199 ["%_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
200 ["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
201 ["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
202 ["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
203 )
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
204
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
205 ("%_View"
4372
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
206 ["%_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
207 ["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
208 ["%_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
209 :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
210 ["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
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 ["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
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 ["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
215 "----"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
216 ("N%_arrow"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
217 ["%_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
218 ["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
219 ["Narrow to %_Defun" narrow-to-defun]
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
220 "----"
4372
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
221 ["%_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
222 (/= (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
223 )
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
224 "----"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
225 ["%_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
226 ["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
227 ["%_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
228 ["%_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
229 :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
230 ["%_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
231 :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
232 "----"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
233 ["%_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
234 :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
235 ["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
236 :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
237 ("%_Bookmarks"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
238 :filter
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
239 ,#'(lambda (menu)
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
240 (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
241 bookmark-alist)))
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
242 (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
243 menu
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
244 (let ((items
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
245 (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
246 (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
247 `[,bmk (bookmark-jump ',bmk)])
4783
e29fcfd8df5f Eliminate most core code byte-compile warnings.
Aidan Kehoe <kehoea@parhasard.net>
parents: 4382
diff changeset
248 (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
249 (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
250 "---"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
251 ["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
252 :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
253 ["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
254 :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
255 "---"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
256 ["%_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
257 :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
258 ("%_Delete Bookmark"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
259 :filter ,#'(lambda (menu)
793
e38acbeb1cae [xemacs-hg @ 2002-03-29 04:46:17 by ben]
ben
parents: 792
diff changeset
260 (submenu-generate-accelerator-spec
e38acbeb1cae [xemacs-hg @ 2002-03-29 04:46:17 by ben]
ben
parents: 792
diff changeset
261 (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
262 `[,bmk (bookmark-delete ',bmk)])
5369
4141aeddc55b Eliminate byte-compile warnings, core Lisp.
Aidan Kehoe <kehoea@parhasard.net>
parents: 5287
diff changeset
263 (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
264 ["%_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
265 :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
266 "---"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
267 ["%_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
268 :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
269 ["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
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 ["%_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
272 :active (fboundp 'bookmark-load)]
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
273 )
4372
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
274 )
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
275
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
276 ("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
277 ["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
278 ["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
279 ["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
280 "----"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
281 ["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
282 :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
283 ["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
284 :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
285 ["%_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
286 :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
287 ("Other %_Macro"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
288 ["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
289 :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
290 ["%_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
291 ["%_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
292 :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
293 "---"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
294 ["%_Name Last Macro..." name-last-kbd-macro
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
295 :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
296 ["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
297 :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
298 (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
299 "---"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
300 ["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
301 :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
302 "---"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
303 ["%_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
304 :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
305 ["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
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 "---"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
308 ["%_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
309 ["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
310 :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
311 )
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
312 "----"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
313 ["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
314 ["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
315 :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
316 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
317 ("Other %_Abbrev"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
318 ["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
319 ["Dynamic Abbrev Complete in %_All Buffers" (dabbrev-completion 16)]
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
320 "----"
4372
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
321 "----"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
322 ["%_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
323 :suffix (truncate-string-to-width (abbrev-string-to-be-defined nil)
851
e7ee5f8bde58 [xemacs-hg @ 2002-05-23 11:46:08 by ben]
ben
parents: 844
diff changeset
324 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
325 ["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
326 :suffix (truncate-string-to-width (abbrev-string-to-be-defined nil)
851
e7ee5f8bde58 [xemacs-hg @ 2002-05-23 11:46:08 by ben]
ben
parents: 844
diff changeset
327 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
328 ["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
329 :suffix (truncate-string-to-width
814
a634e3b7acc8 [xemacs-hg @ 2002-04-14 12:41:59 by ben]
ben
parents: 800
diff changeset
330 (inverse-abbrev-string-to-be-defined 1)
851
e7ee5f8bde58 [xemacs-hg @ 2002-05-23 11:46:08 by ben]
ben
parents: 844
diff changeset
331 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
332 ["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
333 :suffix (truncate-string-to-width
814
a634e3b7acc8 [xemacs-hg @ 2002-04-14 12:41:59 by ben]
ben
parents: 800
diff changeset
334 (inverse-abbrev-string-to-be-defined 1)
851
e7ee5f8bde58 [xemacs-hg @ 2002-05-23 11:46:08 by ben]
ben
parents: 844
diff changeset
335 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
336 "---"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
337 ["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
338 ["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
339 :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
340 ["%_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
341 :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
342 (> 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
343 "---"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
344 ["%_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
345 ["%_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
346 ["%_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
347 "---"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
348 ["%_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
349 ["%_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
350 :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
351 "---"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
352 ["%_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
353 ["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
354 )
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
355 "---"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
356 ["%_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
357 ["%_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
358 ("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
359 ["%_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
360 ["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
361 ["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
362 ["%_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
363 ["%_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
364 ["Rectangle %_Mousing"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
365 (customize-set-variable 'mouse-track-rectangle-p
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
366 (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
367 :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
368 "---"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
369 ["%_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
370 ["%_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
371 ["%_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
372 "---"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
373 ["%_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
374 ["%_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
375 )
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
376 "---"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
377 ["%_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
378 ["%_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
379 ["%_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
380 ["%_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
381 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
382 ["%_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
383 ("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
384 ["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
385 ["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
386 ["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
387 ["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
388 "---"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
389 ["%_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
390 ["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
391 :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 "----"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
393 ["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
394 (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
395 ["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
396 "---"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
397 ["%_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
398 ["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
399 "---"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
400 ["%_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
401 (fboundp 'untabify))]
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
402 ["%_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
403 (fboundp 'tabify))]
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
404 ["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
405 ["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
406 )
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
407 "---"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
408 ("%_Tags"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
409 ["%_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
410 ["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
411 ["%_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
412 ["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
413 ["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
414 "-----"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
415 ["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
416 ["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
417 ["%_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
418 "-----"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
419 ["%_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
420 ["%_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
421 "-----"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
422 ["%_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
423 )
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
424 )
2545
9caf26dd924f [xemacs-hg @ 2005-02-03 05:03:36 by ben]
ben
parents: 2505
diff changeset
425
9caf26dd924f [xemacs-hg @ 2005-02-03 05:03:36 by ben]
ben
parents: 2505
diff changeset
426 ;; #### Delete this entire menu as soon as the new package source is
9caf26dd924f [xemacs-hg @ 2005-02-03 05:03:36 by ben]
ben
parents: 2505
diff changeset
427 ;; committed.
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
428 ("%_Tools"
4372
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
429 ("%_Packages"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
430 ("%_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
431 ("%_Official Releases"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
432 :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
433 (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
434 (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
435 (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
436 ("%_Pre-Releases"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
437 :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
438 (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
439 (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
440 (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
441 ("%_Site Releases"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
442 :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
443 (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
444 (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
445 (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
446 "--:shadowEtchedIn"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
447 ["%_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
448 ["%_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
449 ["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
450 ["%_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
451 ("%_Internet"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
452 ["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
453 :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
454 ["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
455 :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
456 ["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
457 :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
458 ["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
459 :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
460 ["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
461 :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
462 "---"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
463 ("%_Grep"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
464 :filter
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
465 ,#'(lambda (menu)
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
466 (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
467 (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
468 (let ((items
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
469 (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
470 (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
471 (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
472 (list 'grep
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
473 (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
474 (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
475 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
476 (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
477 menu)
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
478 menu))
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
479 ["%_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
480 ["%_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
481 :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
482 (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
483 (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
484 (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 (error nil))))
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
486 (and buffer (get-buffer-process buffer))))]
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
487 "---"
4372
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
488 ["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
489 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
490 :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
491 ["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
492 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
493 :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
494 "---"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
495 ["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
496 (progn
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
497 (require 'compile)
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
498 (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
499 (cons (concat grep-command " *.[chCH]"
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
500 ; i wanted to also use *.cc and *.hh.
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
501 ; 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
502 )
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
503 (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
504 (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
505 :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
506 ["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
507 (progn
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
508 (require 'compile)
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
509 (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
510 (cons (concat grep-command " *.[hH]"
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
511 ; i wanted to also use *.hh.
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
512 ; 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
513 )
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
514 (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
515 (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
516 :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
517 ["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
518 (progn
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
519 (require 'compile)
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
520 (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
521 (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
522 (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
523 (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
524 :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
525 ["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
526 (progn
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
527 (require 'compile)
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
528 (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
529 (cons (concat grep-command " *.pl"
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
530 ; i wanted to use this:
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
531 ; " *.pl *.pm *.am"
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
532 ; but grep complains if it can't
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
533 ; match anything in a glob, and
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
534 ; that screws other things up.
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
535 ; perhaps we need to first scan
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
536 ; each separate glob in the directory
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
537 ; to see if there are any files in
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
538 ; 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
539 )
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
540 (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
541 (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
542 :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
543 ["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
544 (progn
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
545 (require 'compile)
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
546 (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
547 (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
548 (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
549 (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
550 :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
551 "---"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
552 ["%_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
553 :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
554 (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
555 ["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
556 :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
557 (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
558 ["%_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
559 :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
560 (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
561 ["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
562 :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
563 (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
564 "---"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
565 ["%_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
566 (progn
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
567 (require 'compile)
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
568 (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
569 'grep-command
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
570 (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
571 :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
572 ]
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
573 )
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
574 ("%_Compile"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
575 :filter
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
576 ,#'(lambda (menu)
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
577 (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
578 (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
579 (let ((items
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
580 (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
581 (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
582 (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
583 (list 'compile
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
584 (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
585 (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
586 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
587 (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
588 menu)
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
589 menu))
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
590 ["%_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
591 ["%_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
592 ["%_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
593 :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
594 (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
595 (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
596 (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 (error nil))))
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
598 (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
599 "---"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
600 ["%_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
601 :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
602 (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
603 ["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
604 :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
605 (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
606 ["%_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
607 :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
608 (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
609 ["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
610 :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
611 (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
612 )
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
613 ("%_Debug"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
614 ["%_GDB..." gdb
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
615 :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
616 ["%_DBX..." dbx
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 'dbx)])
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
618 ("%_Shell"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
619 ["%_Shell" shell
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
620 :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
621 ["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
622 :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
623 ["Shell Command on %_Region..." shell-command-on-region
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
624 :active (and (fboundp 'shell-command-on-region) (region-exists-p))])
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
625
4372
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
626 ("%_Tags"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
627 ["%_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
628 ["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
629 ["%_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
630 ["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
631 ["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
632 "-----"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
633 ["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
634 ["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
635 ["%_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
636 "-----"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
637 ["%_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
638 ["%_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
639 "-----"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
640 ["%_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
641 )
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
642
4372
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
643 "----"
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
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 ("Ca%_lendar"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
646 ["%_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
647 :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
648 ["%_Diary" diary
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 'diary)]
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
650 ["%_Holidays" holidays
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 'holidays)]
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
652 ;; 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
653 ["%_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
654 :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
655 ["%_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
656 :active (fboundp 'sunrise-sunset)])
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
657
4372
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
658 ("Ga%_mes"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
659 ["%_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
660 :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
661 ["%_Tetris" tetris
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 'tetris)]
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
663 ["%_Sokoban" sokoban
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 'sokoban)]
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
665 ["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
666 :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
667 ["%_Psychoanalyst" doctor
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 'doctor)]
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
669 ["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
670 :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
671 ["%_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
672 :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
673 ["%_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
674 :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
675 ["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
676 :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
677 ["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
678 :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
679 ["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
680 :active (fboundp 'mpuz)])
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
681
4372
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
682 "----"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
683 )
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
684
2545
9caf26dd924f [xemacs-hg @ 2005-02-03 05:03:36 by ben]
ben
parents: 2505
diff changeset
685 ; ("%_Tools"
9caf26dd924f [xemacs-hg @ 2005-02-03 05:03:36 by ben]
ben
parents: 2505
diff changeset
686 ; :filter behavior-menu-filter)
9caf26dd924f [xemacs-hg @ 2005-02-03 05:03:36 by ben]
ben
parents: 2505
diff changeset
687
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
688 ("%_Options"
4372
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
689 ("%_Advanced (Customize)"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
690 ("%_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
691 (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
692 ["%_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
693 ["%_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
694 ["%_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
695 ["%_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
696 ["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
697 ["%_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
698 ["%_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
699 "---"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
700 ("%_Editing"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
701 ["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
702 :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
703 ["%_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
704 (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
705 (progn
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
706 (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
707 (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
708 (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
709 (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
710 :style toggle
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
711 :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
712 ["%_Overstrike"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
713 (progn
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
714 (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
715 (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
716 :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
717 ["%_Abbrev Mode"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
718 (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
719 (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
720 :style toggle
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
721 :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
722 ["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
723 (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
724 :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
725 "---"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
726 ["%_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
727 (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
728 (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
729 :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
730 ["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
731 (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
732 :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
733 "---"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
734 ("%_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
735 ["%_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
736 (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
737 :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
738 ["%_Require"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
739 (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
740 :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
741 ["%_Ask"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
742 (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
743 :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
744 (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
745 ["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
746 (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
747 (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
748 :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
749 ("%_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
750 ["%_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
751 (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
752 :style toggle
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
753 :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
754 :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
755 ["`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
756 (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
757 (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
758 :style toggle
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
759 :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
760 ["`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
761 (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
762 :style toggle
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
763 :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
764 ["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
765 (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
766 (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
767 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
768 ["%_VI Emulation"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
769 (progn
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
770 (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
771 (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
772 :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
773 :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
774 "----"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
775 ["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
776 (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
777 (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
778 :style toggle
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
779 :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
780 ["%_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
781 (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
782 (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
783 :style toggle
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
784 :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
785 "----"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
786 ["%_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
787 ["%_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
788 "---"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
789 ["%_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
790 (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
791 :style toggle :selected mouse-yank-at-point]
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
792 "---"
4372
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
793 ["%_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
794 (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
795 (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
796 :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
797 )
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
798 ("%_Printing"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
799 ["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
800 (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
801 'printer-name
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
802 (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
803 "---"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
804 ["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
805 ;; 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
806 ;; 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
807 (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
808 (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
809 ("%_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
810 ["%_Letter"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
811 (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
812 :style radio
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
813 :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
814 :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
815 ["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
816 (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
817 :style radio
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
818 :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
819 (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
820 :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
821 ["Le%_gal"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
822 (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
823 :style radio
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
824 :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
825 :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
826 ["%_Statement"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
827 (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
828 :style radio
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
829 :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
830 :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
831 ["%_Executive"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
832 (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
833 :style radio
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
834 :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
835 :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
836 ["%_Tabloid"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
837 (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
838 :style radio
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
839 :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
840 :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
841 ["Le%_dger"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
842 (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
843 :style radio
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
844 :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
845 :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
846 ["A%_3"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
847 (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
848 :style radio
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
849 :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
850 :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
851 ["%_A4"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
852 (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
853 :style radio
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
854 :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
855 :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
856 ["A4s%_mall"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
857 (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
858 :style radio
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
859 :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
860 :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
861 ["B%_4"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
862 (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
863 :style radio
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
864 :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
865 :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
866 ["%_B5"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
867 (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
868 :style radio
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
869 :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
870 :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
871 )
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
872 ["%_Color Printing"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
873 (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
874 (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
875 ;; 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
876 (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
877 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
878 (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
879 (t
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
880 (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
881 (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
882 (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
883 (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
884 :style toggle
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
885 :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
886 :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
887 ("%_Internet"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
888 ("%_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
889 ["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
890 (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
891 :style radio
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
892 :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
893 :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
894 ["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
895 (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
896 :style radio
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
897 :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
898 ["MH"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
899 (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
900 :style radio
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
901 :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
902 :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
903 ["GNUS"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
904 (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
905 :style radio
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
906 :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
907 :active (get 'message-user-agent 'composefunc)]
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
908 )
4372
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
909 ["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
910 (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
911 '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
912 (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
913 ["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
914 (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
915 '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
916 (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
917 ["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
918 (progn
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
919 (require 'smtpmail)
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
920 (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
921 '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
922 (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
923 :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
924 (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
925 ["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
926 (progn
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
927 (require 'smtpmail)
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
928 (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
929 (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
930 :style toggle
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
931 :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
932 :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
933 (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
934 ("%_Troubleshooting"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
935 ["%_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
936 (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
937 :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
938 ["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
939 (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
940 :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
941 ["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
942 (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
943 :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
944 ["%_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
945 (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
946 :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
947 ["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
948 (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
949 :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
950 )
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
951 ("Encodin%_g"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
952 ["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
953 (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
954 (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
955 :style toggle
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
956 :selected eol-detection-enabled-p
5940
c608d4b0b75e rescue lost branch from 64bit.backup
Henry Thompson <ht@markup.co.uk>
parents: 5697
diff changeset
957 :included (not (memq system-type '(windows-nt cygwin32 cygwin64)))]
4372
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
958 ("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
959 :filter
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
960 ,#'(lambda (menu)
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
961 (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
962 (lambda (entry)
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
963 (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
964 (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
965 ;; 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
966 ("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
967 :filter
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
968 ,#'(lambda (menu)
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
969 (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
970 (lambda (entry)
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
971 (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
972 (lambda (entry) nil)))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
973 )
4372
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
974 ;; 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
975 ("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
976 :filter
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
977 ,#'(lambda (menu)
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
978 (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
979 (lambda (entry)
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
980 (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
981 (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
982 ("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
983 :filter
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
984 ,#'(lambda (menu)
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
985 (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
986 (lambda (entry)
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
987 (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
988 (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
989 ,@(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
990 `(("Internationa%_l"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
991 ("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
992 :filter
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
993 ,#'(lambda (menu)
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
994 (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
995 (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
996 `[ ,(car entry)
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
997 (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
998 :style radio
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
999 :selected
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1000 ,(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
1001 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
1002 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
1003 )))
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1004 ["%_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
1005 ["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
1006 )))
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1007 "-----"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1008 ("%_Display"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1009 ,@(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
1010 '(["%_Scrollbars"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1011 (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
1012 (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
1013 :style toggle
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1014 :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
1015 ["%_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
1016 (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
1017 (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
1018 (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
1019 :style toggle
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1020 :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
1021 "----"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1022 ["%_3D Modeline"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1023 (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
1024 (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
1025 :style toggle
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1026 :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
1027 ("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
1028 ["%_None"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1029 (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
1030 :style radio
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1031 :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
1032 ["As %_Text"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1033 (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
1034 :style radio
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1035 :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
1036 ["As %_Scrollbar"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1037 (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
1038 :style radio
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1039 :selected (eq modeline-scrolling-method 'scrollbar)]
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 732
diff changeset
1040 )
4372
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1041 ,@(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
1042 '("---"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1043 ["%_Toolbars Visible"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1044 (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
1045 (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
1046 :style toggle
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1047 :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
1048 ["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
1049 (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
1050 (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
1051 :style toggle
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1052 :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
1053 :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
1054 ("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
1055 ["%_Top"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1056 (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
1057 :style radio
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1058 :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
1059 :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
1060 ["%_Bottom"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1061 (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
1062 :style radio
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1063 :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
1064 :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
1065 ["%_Left"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1066 (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
1067 :style radio
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1068 :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
1069 :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
1070 ["%_Right"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1071 (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
1072 :style radio
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1073 :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
1074 :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
1075 )
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1076 ))
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1077 ,@(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
1078 '("---"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1079 ["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
1080 (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
1081 (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
1082 :style toggle
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1083 :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
1084 ("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
1085 ["%_Top"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1086 (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
1087 :style radio
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1088 :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
1089 ["%_Bottom"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1090 (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
1091 :style radio
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1092 :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
1093 ["%_Left"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1094 (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
1095 :style radio
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1096 :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
1097 ["%_Right"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1098 (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
1099 :style radio
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1100 :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
1101 )
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1102 ))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1103 "-----"
4372
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1104 ["%_Blinking Cursor"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1105 (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
1106 :style toggle
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1107 :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
1108 :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
1109 ["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
1110 (progn
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1111 (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
1112 (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
1113 :style radio
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1114 :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
1115 ["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
1116 (progn
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1117 (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
1118 (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
1119 :style radio
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1120 :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
1121 ["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
1122 (progn
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1123 (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
1124 (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
1125 :style radio
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1126 :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
1127 "----"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1128 ("Pa%_ren Highlighting"
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1129 ["%_None"
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1130 (customize-set-variable 'paren-mode nil)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1131 :style radio
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1132 :selected (and (boundp 'paren-mode) (not paren-mode))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1133 :active (boundp 'paren-mode)]
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1134 ["%_Blinking Paren"
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1135 (customize-set-variable 'paren-mode 'blink-paren)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1136 :style radio
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1137 :selected (and (boundp 'paren-mode) (eq paren-mode 'blink-paren))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1138 :active (boundp 'paren-mode)]
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1139 ["%_Steady Paren"
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1140 (customize-set-variable 'paren-mode 'paren)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1141 :style radio
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1142 :selected (and (boundp 'paren-mode) (eq paren-mode 'paren))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1143 :active (boundp 'paren-mode)]
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1144 ["%_Expression"
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1145 (customize-set-variable 'paren-mode 'sexp)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1146 :style radio
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1147 :selected (and (boundp 'paren-mode) (eq paren-mode 'sexp))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1148 :active (boundp 'paren-mode)]
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1149 ;; ["Nes%_ted Shading"
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1150 ;; (customize-set-variable 'paren-mode 'nested)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1151 ;; :style radio
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1152 ;; :selected (and (boundp 'paren-mode) (eq paren-mode 'nested))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1153 ;; :active (boundp 'paren-mode)]
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1154 )
4372
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1155 "------"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1156 ["%_Line Numbers"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1157 (progn
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1158 (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
1159 (redraw-modeline))
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1160 :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
1161 ["%_Column Numbers"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1162 (progn
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1163 (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
1164 (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
1165 (redraw-modeline))
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1166 :style toggle :selected column-number-mode]
454
d7a9135ec789 Import from CVS: tag r21-2-42
cvs
parents: 444
diff changeset
1167
4372
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1168 ("\"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
1169 ["%_Always in Same Frame"
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1170 (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
1171 '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
1172 :style radio
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1173 :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
1174 ["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
1175 (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
1176 2)
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1177 :style radio
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1178 :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
1179 ["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
1180 (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
1181 3)
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1182 :style radio
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1183 :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
1184 ["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
1185 (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
1186 4)
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1187 :style radio
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1188 :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
1189 ["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
1190 (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
1191 5)
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1192 :style radio
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1193 :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
1194 ["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
1195 (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
1196 0)
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1197 :style radio
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1198 :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
1199 "-----"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1200 ["%_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
1201 (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
1202 '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
1203 :style radio
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1204 :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
1205 '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
1206 ["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
1207 (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
1208 :style radio
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1209 :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
1210 "-----"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1211 ["%_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
1212 (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
1213 t))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1214 :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
1215 :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
1216 :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
1217 )
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1218 )
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1219 ("%_Menubars"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1220 ["%_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
1221 (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
1222 (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
1223 :style toggle
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1224 :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
1225 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
1226 ["%_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
1227 (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
1228 (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
1229 (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
1230 :style toggle
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1231 :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
1232 "----"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1233 ["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
1234 (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
1235 '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
1236 ;; 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
1237 (let ((val
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1238 (read-number
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1239 "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
1240 (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
1241 ["%_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
1242 (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
1243 (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
1244 :style toggle
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1245 :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
1246 ["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
1247 (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
1248 (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
1249 :style toggle
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1250 :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
1251 ["%_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
1252 (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
1253 '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
1254 (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
1255 '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 '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
1258 :style toggle
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1259 :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
1260 '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
1261 ("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
1262 ["%_Most Recently Used"
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1263 (progn
4372
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1264 (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
1265 (customize-set-variable 'buffers-menu-grouping-function nil))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1266 :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
1267 :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
1268 ["%_Alphabetically"
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1269 (progn
4372
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1270 (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
1271 '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
1272 (customize-set-variable 'buffers-menu-grouping-function nil))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1273 :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
1274 :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
1275 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
1276 ["%_By Major Mode, Then Alphabetically"
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1277 (progn
4372
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1278 (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
1279 '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
1280 '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
1281 (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
1282 '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
1283 'group-buffers-menu-by-mode-then-alphabetically))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1284 :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
1285 :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
1286 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
1287 "---"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1288 ["%_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
1289 (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
1290 (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
1291 :style toggle
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1292 :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
1293 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
1294 )
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1295 ("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
1296 ["%_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
1297 (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
1298 (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
1299 (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
1300 :style toggle
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1301 :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
1302 :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
1303 ["%_Automatic"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1304 (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
1305 (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
1306 :style toggle
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1307 :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
1308 :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
1309 "-----"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1310 ["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
1311 (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
1312 (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
1313 :style toggle
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1314 :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
1315 :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
1316 "-----"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1317 ["%_Fonts"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1318 (progn
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1319 (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
1320 (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
1321 (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
1322 (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
1323 (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
1324 :style radio
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1325 :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
1326 :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
1327 ["%_Colors"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1328 (progn
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1329 (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
1330 (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
1331 (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
1332 (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
1333 (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
1334 :style radio
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1335 :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
1336 :active (boundp 'font-lock-mode)]
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1337 "-----"
4372
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1338 ["%_1 Least"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1339 (progn
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1340 (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
1341 (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
1342 (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
1343 (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
1344 (<= 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
1345 nil
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1346 (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
1347 (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
1348 :style radio
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1349 :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
1350 :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
1351 (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
1352 (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
1353 (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
1354 (<= 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
1355 ["%_2 More"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1356 (progn
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1357 (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
1358 (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
1359 (= 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
1360 nil
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1361 (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
1362 (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
1363 :style radio
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1364 :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
1365 :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
1366 (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
1367 (= 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
1368 ["%_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
1369 (progn
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1370 (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
1371 (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
1372 (= 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
1373 nil
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1374 (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
1375 (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
1376 :style radio
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1377 :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
1378 :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
1379 (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
1380 (= 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
1381 ["%_4 Most"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1382 (progn
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1383 (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
1384 (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
1385 (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
1386 (>= 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
1387 nil
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1388 (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
1389 (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
1390 :style radio
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1391 :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
1392 :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
1393 (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
1394 (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
1395 (>= 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
1396 "-----"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1397 ["Lazy %_Lock"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1398 (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
1399 (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
1400 (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
1401 ;; 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
1402 ;; 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
1403 ;; 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
1404 (redraw-modeline))
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1405 :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
1406 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
1407 :style toggle
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1408 :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
1409 ["Lazy %_Shot"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1410 (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
1411 (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
1412 (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
1413 ;; 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
1414 ;; 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
1415 ;; 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
1416 (redraw-modeline))
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1417 :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
1418 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
1419 :style toggle
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1420 :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
1421 ["Cac%_hing"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1422 (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
1423 (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
1424 (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
1425 ;; 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
1426 ;; 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
1427 ;; 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
1428 (redraw-modeline))
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1429 :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
1430 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
1431 :style toggle
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1432 :selected (and (boundp 'fast-lock-mode) fast-lock-mode)]
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1433 )
4372
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1434 ("%_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
1435 ("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
1436 ;; ("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
1437 ["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
1438 "-----"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1439 ["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
1440 ;; #### 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
1441 ;; 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
1442 (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
1443 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
1444 (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
1445 (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
1446 (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
1447 (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
1448 (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
1449 (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
1450 (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
1451 (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
1452 (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
1453 (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
1454 (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
1455 ["%_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
1456 )
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1457
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1458 ("%_Buffers"
4372
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1459 :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
1460 ["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
1461 ["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
1462 "----"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1463 ["%_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
1464 ["%_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
1465 :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
1466 "----"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1467 )
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1468
4372
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1469 nil ; the partition: menus after this are flushright
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1470
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1471 ("%_Help"
5697
40fbceabaafd menubar-items.el (default-menubar): Reorganize.
Stephen J. Turnbull <stephen@xemacs.org>
parents: 5652
diff changeset
1472 ["%_About XEmacs and Contributors" about-xemacs]
40fbceabaafd menubar-items.el (default-menubar): Reorganize.
Stephen J. Turnbull <stephen@xemacs.org>
parents: 5652
diff changeset
1473 ("%_More about XEmacs"
40fbceabaafd menubar-items.el (default-menubar): Reorganize.
Stephen J. Turnbull <stephen@xemacs.org>
parents: 5652
diff changeset
1474 ["What's %_New in XEmacs" view-emacs-news]
40fbceabaafd menubar-items.el (default-menubar): Reorganize.
Stephen J. Turnbull <stephen@xemacs.org>
parents: 5652
diff changeset
1475 ["XEmacs %_License" describe-copying]
40fbceabaafd menubar-items.el (default-menubar): Reorganize.
Stephen J. Turnbull <stephen@xemacs.org>
parents: 5652
diff changeset
1476 ["%_No Warranty" describe-no-warranty]
40fbceabaafd menubar-items.el (default-menubar): Reorganize.
Stephen J. Turnbull <stephen@xemacs.org>
parents: 5652
diff changeset
1477 ["%_Obtaining the Latest Version" describe-distribution]
40fbceabaafd menubar-items.el (default-menubar): Reorganize.
Stephen J. Turnbull <stephen@xemacs.org>
parents: 5652
diff changeset
1478 ["View %_Splash Screen" xemacs-splash-buffer]
40fbceabaafd menubar-items.el (default-menubar): Reorganize.
Stephen J. Turnbull <stephen@xemacs.org>
parents: 5652
diff changeset
1479 ["%_Home Page (www.xemacs.org)" xemacs-www-page
40fbceabaafd menubar-items.el (default-menubar): Reorganize.
Stephen J. Turnbull <stephen@xemacs.org>
parents: 5652
diff changeset
1480 :active (fboundp 'browse-url)])
4372
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1481 ["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
1482 :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
1483 "-----"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1484 ("%_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
1485 ["%_Info Contents" (Info-goto-node "(dir)")]
5697
40fbceabaafd menubar-items.el (default-menubar): Reorganize.
Stephen J. Turnbull <stephen@xemacs.org>
parents: 5652
diff changeset
1486 ["%_How to Use Info" (Info-goto-node "(Info)")]
4372
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1487 "-----"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1488 ["XEmacs %_User's Manual" (Info-goto-node "(XEmacs)")]
5697
40fbceabaafd menubar-items.el (default-menubar): Reorganize.
Stephen J. Turnbull <stephen@xemacs.org>
parents: 5652
diff changeset
1489 ["%_Getting Started with XEmacs" (Info-goto-node "(New-Users-Guide)")]
4372
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1490 ["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
1491 ["All About %_Packages" (Info-goto-node "(xemacs)Packages")]
5697
40fbceabaafd menubar-items.el (default-menubar): Reorganize.
Stephen J. Turnbull <stephen@xemacs.org>
parents: 5652
diff changeset
1492 ["Find %_Packages" finder-by-keyword]
4372
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1493 ["%_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
1494 "-----"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1495 ["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
1496 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
1497 ["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
1498 ["Lookup %_Function in Lisp Reference..." Info-elisp-ref]
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1499 "-----"
4372
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1500 ["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
1501 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
1502 ["%_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
1503 ["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
1504 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
1505 )
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1506 ("XEmacs %_FAQ"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1507 ["%_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
1508 ["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
1509 :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
1510 ("%_Tutorials"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1511 :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
1512 ("%_Samples"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1513 ["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
1514 :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
1515 ["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
1516 (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
1517 :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
1518 :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
1519 ["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
1520 (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
1521 :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
1522 :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
1523 ["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
1524 (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
1525 :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
1526 ("%_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
1527 ["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
1528 ["%_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
1529 ["%_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
1530 ["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
1531 "-----"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1532 ["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
1533 ["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
1534 ["Show M%_ouse Bindings" describe-pointer]
502
7039e6323819 [xemacs-hg @ 2001-05-04 22:41:46 by ben]
ben
parents: 479
diff changeset
1535 "-----"
4372
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1536 ["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
1537 ["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
1538 ["%_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
1539 ,@(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
1540 `(("Internationa%_l"
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1541 ("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
1542 :filter
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1543 ,#'(lambda (menu)
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1544 (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
1545 (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
1546 `[ ,(car entry)
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1547 (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
1548 ',(car entry))
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1549 :style radio
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1550 :selected
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1551 ,(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
1552 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
1553 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
1554 )))
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1555 ["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
1556 ["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
1557 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
1558 ["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
1559 ;; 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
1560 ["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
1561 ["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
1562 )))
5697
40fbceabaafd menubar-items.el (default-menubar): Reorganize.
Stephen J. Turnbull <stephen@xemacs.org>
parents: 5652
diff changeset
1563 ["%_Unix Manual" manual-entry]
4372
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1564 "-----"
5697
40fbceabaafd menubar-items.el (default-menubar): Reorganize.
Stephen J. Turnbull <stephen@xemacs.org>
parents: 5652
diff changeset
1565 ["%_Current Installation Info" describe-installation
40fbceabaafd menubar-items.el (default-menubar): Reorganize.
Stephen J. Turnbull <stephen@xemacs.org>
parents: 5652
diff changeset
1566 :active (boundp 'Installation-string)]
40fbceabaafd menubar-items.el (default-menubar): Reorganize.
Stephen J. Turnbull <stephen@xemacs.org>
parents: 5652
diff changeset
1567 ["%_Known Problems" view-xemacs-problems ]
40fbceabaafd menubar-items.el (default-menubar): Reorganize.
Stephen J. Turnbull <stephen@xemacs.org>
parents: 5652
diff changeset
1568 ("Recent History"
40fbceabaafd menubar-items.el (default-menubar): Reorganize.
Stephen J. Turnbull <stephen@xemacs.org>
parents: 5652
diff changeset
1569 ["%_Messages" (view-lossage t)]
40fbceabaafd menubar-items.el (default-menubar): Reorganize.
Stephen J. Turnbull <stephen@xemacs.org>
parents: 5652
diff changeset
1570 ["%_Keystrokes" view-lossage]
40fbceabaafd menubar-items.el (default-menubar): Reorganize.
Stephen J. Turnbull <stephen@xemacs.org>
parents: 5652
diff changeset
1571 ["%_Warnings" view-warnings])
4372
ebb35ddea76a Byte-compile menu lambdas; make the menu of available tutorials more readable.
Aidan Kehoe <kehoea@parhasard.net>
parents: 3074
diff changeset
1572 ["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
1573 :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
1574 "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
1575 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
1576 used here.")
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1577
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1578
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 732
diff changeset
1579 (defun init-menubar-at-startup ()
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1580 "Don't call this.
2376
3a1ce66c92fa [xemacs-hg @ 2004-11-08 14:17:00 by stephent]
stephent
parents: 2030
diff changeset
1581 Adds `Load init files' button to menubar when starting up with -q."
3a1ce66c92fa [xemacs-hg @ 2004-11-08 14:17:00 by stephent]
stephent
parents: 2030
diff changeset
1582 ;; load-user-init-file finds the init files itself now
3a1ce66c92fa [xemacs-hg @ 2004-11-08 14:17:00 by stephent]
stephent
parents: 2030
diff changeset
1583 (when (not load-user-init-file-p)
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1584 (add-menu-button
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1585 nil
2376
3a1ce66c92fa [xemacs-hg @ 2004-11-08 14:17:00 by stephent]
stephent
parents: 2030
diff changeset
1586 ["%_Load init files"
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1587 (progn
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1588 (mapc #'(lambda (buf)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1589 (with-current-buffer buf
2376
3a1ce66c92fa [xemacs-hg @ 2004-11-08 14:17:00 by stephent]
stephent
parents: 2030
diff changeset
1590 (delete-menu-item '("Load init files"))))
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1591 (buffer-list))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1592 (load-user-init-file))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1593 ]
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1594 "Help")))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1595
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1596
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1597 ;;; The File menu
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1598
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1599 (defvar put-buffer-names-in-file-menu t)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1600
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1601 ;;; The Buffers menu
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1602
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1603 (defgroup buffers-menu nil
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1604 "Customization of `Buffers' menu."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1605 :group 'menu)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1606
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1607 (defvar buffers-menu-omit-chars-list '(?b ?p ?l ?d))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1608
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1609 (defcustom buffers-menu-max-size 25
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1610 "*Maximum number of entries which may appear on the \"Buffers\" menu.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1611 If this is 10, then only the ten most-recently-selected buffers will be
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1612 shown. If this is nil, then all buffers will be shown. Setting this to
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1613 a large number or nil will slow down menu responsiveness."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1614 :type '(choice (const :tag "Show all" nil)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1615 (integer 10))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1616 :group 'buffers-menu)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1617
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1618 (defcustom complex-buffers-menu-p nil
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1619 "*If non-nil, the buffers menu will contain several commands.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1620 Commands will be presented as submenus of each buffer line. If this
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1621 is false, then there will be only one command: select that buffer."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1622 :type 'boolean
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1623 :group 'buffers-menu)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1624
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1625 (defcustom buffers-menu-submenus-for-groups-p nil
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1626 "*If non-nil, the buffers menu will contain one submenu per group of buffers.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1627 The grouping function is specified in `buffers-menu-grouping-function'.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1628 If this is an integer, do not build submenus if the number of buffers
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1629 is not larger than this value."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1630 :type '(choice (const :tag "No Subgroups" nil)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1631 (integer :tag "Max. submenus" 10)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1632 (sexp :format "%t\n" :tag "Allow Subgroups" :value t))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1633 :group 'buffers-menu)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1634
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1635 (defcustom buffers-menu-switch-to-buffer-function 'switch-to-buffer
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1636 "*The function to call to select a buffer from the buffers menu.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1637 `switch-to-buffer' is a good choice, as is `pop-to-buffer'."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1638 :type '(radio (function-item switch-to-buffer)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1639 (function-item pop-to-buffer)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1640 (function :tag "Other"))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1641 :group 'buffers-menu)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1642
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1643 (defcustom buffers-menu-omit-function 'buffers-menu-omit-invisible-buffers
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1644 "*If non-nil, a function specifying the buffers to omit from the buffers menu.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1645 This is passed a buffer and should return non-nil if the buffer should be
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1646 omitted. The default value `buffers-menu-omit-invisible-buffers' omits
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1647 buffers that are normally considered \"invisible\" (those whose name
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1648 begins with a space)."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1649 :type '(choice (const :tag "None" nil)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1650 function)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1651 :group 'buffers-menu)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1652
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1653 (defcustom buffers-menu-format-buffer-line-function 'format-buffers-menu-line
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1654 "*The function to call to return a string to represent a buffer in
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1655 the buffers menu. The function is passed a buffer and a number
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1656 (starting with 1) indicating which buffer line in the menu is being
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1657 processed and should return a string containing an accelerator
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1658 spec. (Check out `menu-item-generate-accelerator-spec' as a convenient
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1659 way of generating the accelerator specs.) The default value
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1660 `format-buffers-menu-line' just returns the name of the buffer and
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1661 uses the number as the accelerator. Also check out
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1662 `slow-format-buffers-menu-line' which returns a whole bunch of info
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1663 about a buffer.
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1664
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1665 Note: Gross Compatibility Hack: Older versions of this function prototype
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1666 only expected one argument, not two. We deal gracefully with such
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1667 functions by simply calling them with one argument and leaving out the
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1668 line number. However, this may go away at any time, so make sure to
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1669 update all of your functions of this type."
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1670 :type 'function
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1671 :group 'buffers-menu)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1672
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1673 (defcustom buffers-menu-sort-function
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1674 'sort-buffers-menu-by-mode-then-alphabetically
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1675 "*If non-nil, a function to sort the list of buffers in the buffers menu.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1676 It will be passed two arguments (two buffers to compare) and should return
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1677 t if the first is \"less\" than the second. One possible value is
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1678 `sort-buffers-menu-alphabetically'; another is
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1679 `sort-buffers-menu-by-mode-then-alphabetically'."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1680 :type '(choice (const :tag "None" nil)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1681 function)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1682 :group 'buffers-menu)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1683
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1684 (defcustom buffers-menu-grouping-function
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1685 'group-buffers-menu-by-mode-then-alphabetically
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1686 "*If non-nil, a function to group buffers in the buffers menu together.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1687 It will be passed two arguments, successive members of the sorted buffers
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1688 list after being passed through `buffers-menu-sort-function'. It should
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1689 return non-nil if the second buffer begins a new group. The return value
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1690 should be the name of the old group, which may be used in hierarchical
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1691 buffers menus. The last invocation of the function contains nil as the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1692 second argument, so that the name of the last group can be determined.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1693
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1694 The sensible values of this function are dependent on the value specified
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1695 for `buffers-menu-sort-function'."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1696 :type '(choice (const :tag "None" nil)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1697 function)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1698 :group 'buffers-menu)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1699
792
4e83fdb13eb9 [xemacs-hg @ 2002-03-23 05:08:47 by youngs]
youngs
parents: 788
diff changeset
1700 (defcustom list-all-buffers-function 'list-buffers
4e83fdb13eb9 [xemacs-hg @ 2002-03-23 05:08:47 by youngs]
youngs
parents: 788
diff changeset
1701 "*Function that `list-all-buffers' calls."
4e83fdb13eb9 [xemacs-hg @ 2002-03-23 05:08:47 by youngs]
youngs
parents: 788
diff changeset
1702 :type '(choice (const list-buffers)
4e83fdb13eb9 [xemacs-hg @ 2002-03-23 05:08:47 by youngs]
youngs
parents: 788
diff changeset
1703 (const ibuffer)
4e83fdb13eb9 [xemacs-hg @ 2002-03-23 05:08:47 by youngs]
youngs
parents: 788
diff changeset
1704 (const ibuffer-other-window)
4e83fdb13eb9 [xemacs-hg @ 2002-03-23 05:08:47 by youngs]
youngs
parents: 788
diff changeset
1705 function)
4e83fdb13eb9 [xemacs-hg @ 2002-03-23 05:08:47 by youngs]
youngs
parents: 788
diff changeset
1706 :group 'buffers-menu)
4e83fdb13eb9 [xemacs-hg @ 2002-03-23 05:08:47 by youngs]
youngs
parents: 788
diff changeset
1707
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1708 (defun sort-buffers-menu-alphabetically (buf1 buf2)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1709 "For use as a value of `buffers-menu-sort-function'.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1710 Sorts the buffers in alphabetical order by name, but puts buffers beginning
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1711 with a star at the end of the list."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1712 (let* ((nam1 (buffer-name buf1))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1713 (nam2 (buffer-name buf2))
438
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 428
diff changeset
1714 (inv1p (not (null (string-match "\\` " nam1))))
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 428
diff changeset
1715 (inv2p (not (null (string-match "\\` " nam2))))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1716 (star1p (not (null (string-match "\\`*" nam1))))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1717 (star2p (not (null (string-match "\\`*" nam2)))))
438
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 428
diff changeset
1718 (cond ((not (eq inv1p inv2p))
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 428
diff changeset
1719 (not inv1p))
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 428
diff changeset
1720 ((not (eq star1p star2p))
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 428
diff changeset
1721 (not star1p))
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 428
diff changeset
1722 (t
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 428
diff changeset
1723 (string-lessp nam1 nam2)))))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1724
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1725 (defun sort-buffers-menu-by-mode-then-alphabetically (buf1 buf2)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1726 "For use as a value of `buffers-menu-sort-function'.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1727 Sorts first by major mode and then alphabetically by name, but puts buffers
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1728 beginning with a star at the end of the list."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1729 (let* ((nam1 (buffer-name buf1))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1730 (nam2 (buffer-name buf2))
438
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 428
diff changeset
1731 (inv1p (not (null (string-match "\\` " nam1))))
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 428
diff changeset
1732 (inv2p (not (null (string-match "\\` " nam2))))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1733 (star1p (not (null (string-match "\\`*" nam1))))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1734 (star2p (not (null (string-match "\\`*" nam2))))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1735 (mode1 (symbol-value-in-buffer 'major-mode buf1))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1736 (mode2 (symbol-value-in-buffer 'major-mode buf2)))
438
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 428
diff changeset
1737 (cond ((not (eq inv1p inv2p))
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 428
diff changeset
1738 (not inv1p))
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 428
diff changeset
1739 ((not (eq star1p star2p))
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 428
diff changeset
1740 (not star1p))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1741 ((and star1p star2p (string-lessp nam1 nam2)))
438
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 428
diff changeset
1742 ((string-lessp mode1 mode2)
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 428
diff changeset
1743 t)
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 428
diff changeset
1744 ((string-lessp mode2 mode1)
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 428
diff changeset
1745 nil)
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 428
diff changeset
1746 (t
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 428
diff changeset
1747 (string-lessp nam1 nam2)))))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1748
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1749 ;; this version is too slow on some machines.
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1750 ;; (vintage 1990, that is)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1751 (defun slow-format-buffers-menu-line (buffer n)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1752 "For use as a value of `buffers-menu-format-buffer-line-function'.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1753 This returns a string containing a bunch of info about the buffer."
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1754 (concat (menu-item-generate-accelerator-spec n buffers-menu-omit-chars-list)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1755 (format "%s%s %-19s %6s %-15s %s"
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1756 (if (buffer-modified-p buffer) "*" " ")
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1757 (if (symbol-value-in-buffer 'buffer-read-only buffer)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1758 "%" " ")
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1759 (buffer-name buffer)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1760 (buffer-size buffer)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1761 (symbol-value-in-buffer 'mode-name buffer)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1762 (or (buffer-file-name buffer) ""))))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1763
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1764 (defun format-buffers-menu-line (buffer n)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1765 "For use as a value of `buffers-menu-format-buffer-line-function'.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1766 This just returns the buffer's name."
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1767 (concat (menu-item-generate-accelerator-spec n buffers-menu-omit-chars-list)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1768 (buffer-name buffer)))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1769
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1770 (defun group-buffers-menu-by-mode-then-alphabetically (buf1 buf2)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1771 "For use as a value of `buffers-menu-grouping-function'.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1772 This groups buffers by major mode. It only really makes sense if
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1773 `buffers-menu-sorting-function' is
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1774 `sort-buffers-menu-by-mode-then-alphabetically'."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1775 (cond ((string-match "\\`*" (buffer-name buf1))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1776 (and (null buf2) "*Misc*"))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1777 ((or (null buf2)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1778 (string-match "\\`*" (buffer-name buf2))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1779 (not (eq (symbol-value-in-buffer 'major-mode buf1)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1780 (symbol-value-in-buffer 'major-mode buf2))))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1781 (symbol-value-in-buffer 'mode-name buf1))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1782 (t nil)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1783
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1784 (defun buffer-menu-save-buffer (buffer)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1785 (save-excursion
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1786 (set-buffer buffer)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1787 (save-buffer)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1788
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1789 (defun buffer-menu-write-file (buffer)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1790 (save-excursion
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1791 (set-buffer buffer)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1792 (write-file (read-file-name
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1793 (format "Write %s to file: "
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1794 (buffer-name (current-buffer)))))))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1795
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1796 (defsubst build-buffers-menu-internal (buffers)
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1797 (let (name line (n 0))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1798 (mapcar
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1799 #'(lambda (buffer)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1800 (if (eq buffer t)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1801 "---"
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1802 (setq n (1+ n))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1803 (setq line
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1804 ; #### a truly Kyle-friendly hack.
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1805 (let ((fn buffers-menu-format-buffer-line-function))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1806 (if (= (function-max-args fn) 1)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1807 (funcall fn buffer)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1808 (funcall fn buffer n))))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1809 (if complex-buffers-menu-p
5652
cc6f0266bc36 Avoid #'delq in core Lisp, for the sake of style, a very slightly smaller binary
Aidan Kehoe <kehoea@parhasard.net>
parents: 5473
diff changeset
1810 (delete* nil
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1811 (list line
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1812 (vector "S%_witch to Buffer"
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1813 (list buffers-menu-switch-to-buffer-function
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1814 (setq name (buffer-name buffer)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1815 t)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1816 (if (eq buffers-menu-switch-to-buffer-function
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1817 'switch-to-buffer)
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1818 (vector "Switch to Buffer, Other %_Frame"
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1819 (list 'switch-to-buffer-other-frame
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1820 (setq name (buffer-name buffer)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1821 t)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1822 nil)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1823 (if (and (buffer-modified-p buffer)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1824 (buffer-file-name buffer))
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1825 (vector "%_Save Buffer"
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1826 (list 'buffer-menu-save-buffer name) t)
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1827 ["%_Save Buffer" nil nil]
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1828 )
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1829 (vector "Save %_As..."
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1830 (list 'buffer-menu-write-file name) t)
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1831 (vector "%_Delete Buffer" (list 'kill-buffer name)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1832 t)))
440
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
1833 ;; #### We don't want buffer names to be translated,
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
1834 ;; #### so we put the buffer name in the suffix.
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
1835 ;; #### Also, avoid losing with non-ASCII buffer names.
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
1836 ;; #### We still lose, however, if complex-buffers-menu-p. --mrb
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1837 (vector ""
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1838 (list buffers-menu-switch-to-buffer-function
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1839 (buffer-name buffer))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1840 t line))))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1841 buffers)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1842
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1843 (defun buffers-menu-filter (menu)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1844 "This is the menu filter for the top-level buffers \"Buffers\" menu.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1845 It dynamically creates a list of buffers to use as the contents of the menu.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1846 Only the most-recently-used few buffers will be listed on the menu, for
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1847 efficiency reasons. You can control how many buffers will be shown by
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1848 setting `buffers-menu-max-size'. You can control the text of the menu
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1849 items by redefining the function `format-buffers-menu-line'."
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1850 (let ((buffers (delete-if buffers-menu-omit-function (buffer-list))))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1851 (and (integerp buffers-menu-max-size)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1852 (> buffers-menu-max-size 1)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1853 (> (length buffers) buffers-menu-max-size)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1854 ;; shorten list of buffers (not with submenus!)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1855 (not (and buffers-menu-grouping-function
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1856 buffers-menu-submenus-for-groups-p))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1857 (setcdr (nthcdr buffers-menu-max-size buffers) nil))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1858 (if buffers-menu-sort-function
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1859 (setq buffers (sort buffers buffers-menu-sort-function)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1860 (if (and buffers-menu-grouping-function
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1861 buffers-menu-submenus-for-groups-p
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1862 (or (not (integerp buffers-menu-submenus-for-groups-p))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1863 (> (length buffers) buffers-menu-submenus-for-groups-p)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1864 (let (groups groupnames current-group)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1865 (mapl
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1866 #'(lambda (sublist)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1867 (let ((groupname (funcall buffers-menu-grouping-function
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1868 (car sublist) (cadr sublist))))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1869 (setq current-group (cons (car sublist) current-group))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1870 (if groupname
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1871 (progn
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1872 (setq groups (cons (nreverse current-group)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1873 groups))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1874 (setq groupnames (cons groupname groupnames))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1875 (setq current-group nil)))))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1876 buffers)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1877 (setq buffers
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1878 (mapcar*
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1879 #'(lambda (groupname group)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1880 (cons groupname (build-buffers-menu-internal group)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1881 (nreverse groupnames)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1882 (nreverse groups))))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1883 (if buffers-menu-grouping-function
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1884 (progn
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1885 (setq buffers
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1886 (mapcon
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1887 #'(lambda (sublist)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1888 (cond ((funcall buffers-menu-grouping-function
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1889 (car sublist) (cadr sublist))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1890 (list (car sublist) t))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1891 (t (list (car sublist)))))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1892 buffers))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1893 ;; remove a trailing separator.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1894 (and (>= (length buffers) 2)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1895 (let ((lastcdr (nthcdr (- (length buffers) 2) buffers)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1896 (if (eq t (cadr lastcdr))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1897 (setcdr lastcdr nil))))))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1898 (setq buffers (build-buffers-menu-internal buffers)))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1899 (append menu buffers)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1900 ))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1901
792
4e83fdb13eb9 [xemacs-hg @ 2002-03-23 05:08:47 by youngs]
youngs
parents: 788
diff changeset
1902 (defun list-all-buffers ()
4e83fdb13eb9 [xemacs-hg @ 2002-03-23 05:08:47 by youngs]
youngs
parents: 788
diff changeset
1903 "Display a list of buffers. Calls `list-all-buffers-function'."
4e83fdb13eb9 [xemacs-hg @ 2002-03-23 05:08:47 by youngs]
youngs
parents: 788
diff changeset
1904 (interactive)
4e83fdb13eb9 [xemacs-hg @ 2002-03-23 05:08:47 by youngs]
youngs
parents: 788
diff changeset
1905 (funcall (if (fboundp list-all-buffers-function)
4e83fdb13eb9 [xemacs-hg @ 2002-03-23 05:08:47 by youngs]
youngs
parents: 788
diff changeset
1906 list-all-buffers-function
4e83fdb13eb9 [xemacs-hg @ 2002-03-23 05:08:47 by youngs]
youngs
parents: 788
diff changeset
1907 'list-buffers)))
4e83fdb13eb9 [xemacs-hg @ 2002-03-23 05:08:47 by youngs]
youngs
parents: 788
diff changeset
1908
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1909
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1910 ;;; The Help menu
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1911
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1912 (defun tutorials-menu-filter (menu-items)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1913 (declare (special language-info-alist
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1914 current-language-environment
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1915 tutorial-supported-languages))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1916 (append
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1917 (if (featurep 'mule)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1918 (if (assq 'tutorial
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1919 (assoc current-language-environment language-info-alist))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1920 `([,(concat "%_Default (" current-language-environment ")")
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1921 help-with-tutorial]))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1922 '(["%_English" help-with-tutorial]))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1923 (submenu-generate-accelerator-spec
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1924 (if (featurep 'mule)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1925 ;; Mule tutorials.
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1926 (mapcan #'(lambda (lang)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1927 (let ((tut (assq 'tutorial lang)))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1928 (and tut
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1929 (not (string= (car lang) "ASCII"))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1930 ;; skip current language, since we already
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1931 ;; included it first
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1932 (not (string= (car lang)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1933 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
1934 ;; 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
1935 ;; 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
1936 ;; 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
1937 ;; 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
1938 (assq 'locale lang)
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1939 `([,(car lang)
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 732
diff changeset
1940 (help-with-tutorial nil ,(car lang))]))))
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1941 language-info-alist)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1942 ;; Non mule tutorials.
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1943 (mapcar #'(lambda (lang)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1944 `[,(car lang)
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 732
diff changeset
1945 (help-with-tutorial nil ,(car lang))])
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1946 tutorial-supported-languages)))))
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1947
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1948 (set-menubar default-menubar)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1949
814
a634e3b7acc8 [xemacs-hg @ 2002-04-14 12:41:59 by ben]
ben
parents: 800
diff changeset
1950 (when (featurep 'menubar-items)
a634e3b7acc8 [xemacs-hg @ 2002-04-14 12:41:59 by ben]
ben
parents: 800
diff changeset
1951 (loop for buf being the buffers do
a634e3b7acc8 [xemacs-hg @ 2002-04-14 12:41:59 by ben]
ben
parents: 800
diff changeset
1952 (or (eq default-menubar (symbol-value-in-buffer 'current-menubar buf))
a634e3b7acc8 [xemacs-hg @ 2002-04-14 12:41:59 by ben]
ben
parents: 800
diff changeset
1953 (with-current-buffer buf
a634e3b7acc8 [xemacs-hg @ 2002-04-14 12:41:59 by ben]
ben
parents: 800
diff changeset
1954 (condition-case nil
a634e3b7acc8 [xemacs-hg @ 2002-04-14 12:41:59 by ben]
ben
parents: 800
diff changeset
1955 (funcall major-mode)
a634e3b7acc8 [xemacs-hg @ 2002-04-14 12:41:59 by ben]
ben
parents: 800
diff changeset
1956 (error (setq current-menubar default-menubar)))))))
a634e3b7acc8 [xemacs-hg @ 2002-04-14 12:41:59 by ben]
ben
parents: 800
diff changeset
1957
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1958
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1959 ;;; Popup menus.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1960
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1961 (defconst default-popup-menu
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1962 '("XEmacs Commands"
502
7039e6323819 [xemacs-hg @ 2001-05-04 22:41:46 by ben]
ben
parents: 479
diff changeset
1963 ["%_Split Window" split-window-vertically]
7039e6323819 [xemacs-hg @ 2001-05-04 22:41:46 by ben]
ben
parents: 479
diff changeset
1964 ["S%_plit Window (Side by Side)" split-window-horizontally]
7039e6323819 [xemacs-hg @ 2001-05-04 22:41:46 by ben]
ben
parents: 479
diff changeset
1965 ["%_Un-Split (Keep This)" delete-other-windows
7039e6323819 [xemacs-hg @ 2001-05-04 22:41:46 by ben]
ben
parents: 479
diff changeset
1966 :active (not (one-window-p t))]
7039e6323819 [xemacs-hg @ 2001-05-04 22:41:46 by ben]
ben
parents: 479
diff changeset
1967 ["Un-Split (Keep %_Others)" delete-window
7039e6323819 [xemacs-hg @ 2001-05-04 22:41:46 by ben]
ben
parents: 479
diff changeset
1968 :active (not (one-window-p t))]
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1969 ))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1970
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1971 ;; In an effort to avoid massive menu clutter, this mostly worthless menu is
440
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 438
diff changeset
1972 ;; superseded by any local popup menu...
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1973 (setq-default mode-popup-menu default-popup-menu)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1974
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 440
diff changeset
1975
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1976 ;;; backwards compatibility
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1977 (provide 'x-menubar)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1978 (provide 'menubar-items)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1979
438
84b14dcb0985 Import from CVS: tag r21-2-27
cvs
parents: 428
diff changeset
1980 ;;; menubar-items.el ends here.