annotate lisp/menubar-items.el @ 903:4a27df428c73

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