annotate lisp/menubar-items.el @ 412:697ef44129c6 r21-2-14

Import from CVS: tag r21-2-14
author cvs
date Mon, 13 Aug 2007 11:20:41 +0200
parents 501cfd01ee6d
children 41dbb7a9d5f2
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1 ;;; menubar-items.el --- Menubar and popup-menu content for XEmacs.
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
2
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
3 ;; Copyright (C) 1991-1995, 1997-1998 Free Software Foundation, Inc.
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
4 ;; Copyright (C) 1995 Tinker Systems and INS Engineering Corp.
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
5 ;; Copyright (C) 1995 Sun Microsystems.
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
6 ;; Copyright (C) 1995, 1996 Ben Wing.
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
7 ;; Copyright (C) 1997 MORIOKA Tomohiko
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
8
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
9 ;; Maintainer: XEmacs Development Team
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
10 ;; Keywords: frames, extensions, internal, dumped
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
11
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
12 ;; This file is part of XEmacs.
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
13
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
14 ;; XEmacs is free software; you can redistribute it and/or modify it
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
15 ;; under the terms of the GNU General Public License as published by
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
16 ;; the Free Software Foundation; either version 2, or (at your option)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
17 ;; any later version.
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
18
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
19 ;; XEmacs is distributed in the hope that it will be useful, but
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
20 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
21 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
22 ;; General Public License for more details.
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
23
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
24 ;; You should have received a copy of the GNU General Public License
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
25 ;; along with Xmacs; see the file COPYING. If not, write to the
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
26 ;; Free Software Foundation, 59 Temple Place - Suite 330,
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
27 ;; Boston, MA 02111-1307, USA.
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
28
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
29 ;;; Commentary:
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
30
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
31 ;; This file is dumped with XEmacs (when window system and menubar support is
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
32 ;; compiled in).
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
33
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
34 ;;; Code:
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
35
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
36 ;;; Warning-free compile
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
37 (eval-when-compile
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
38 (defvar language-environment-list)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
39 (defvar bookmark-alist)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
40 (defvar language-info-alist)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
41 (defvar current-language-environment)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
42 (defvar tutorial-supported-languages))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
43
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
44 (defconst default-menubar
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
45 (purecopy-menubar
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
46 ;; note backquote.
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
47 `(
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
48 ("File"
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
49 ["Open..." find-file]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
50 ["Open in Other Window..." find-file-other-window]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
51 ["Open in New Frame..." find-file-other-frame]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
52 ["Insert File..." insert-file]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
53 ["View File..." view-file]
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
54 "------"
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
55 ["Save" save-buffer
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
56 :active (buffer-modified-p)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
57 :suffix (if put-buffer-names-in-file-menu (buffer-name) "")]
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
58 ["Save As..." write-file]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
59 ["Save Some Buffers" save-some-buffers]
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
60 "-----"
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
61 ["Print Buffer" lpr-buffer
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
62 :active (fboundp 'lpr-buffer)
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
63 :suffix (if put-buffer-names-in-file-menu (buffer-name) "")]
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
64 ["Pretty-Print Buffer" ps-print-buffer-with-faces
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
65 :active (fboundp 'ps-print-buffer-with-faces)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
66 :suffix (if put-buffer-names-in-file-menu (buffer-name) "")]
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
67 "-----"
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
68 ["New Frame" make-frame]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
69 ["Frame on Other Display..." make-frame-on-display]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
70 ["Delete Frame" delete-frame
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
71 :active (not (eq (next-frame (selected-frame) 'nomini 'window-system)
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
72 (selected-frame)))]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
73 "-----"
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
74 ["Split Window" split-window-vertically]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
75 ["Un-Split (Keep This)" delete-other-windows
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
76 :active (not (one-window-p t))]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
77 ["Un-Split (Keep Others)" delete-window
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
78 :active (not (one-window-p t))]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
79 "-----"
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
80 ["Revert Buffer" revert-buffer
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
81 :active (or buffer-file-name revert-buffer-function)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
82 :suffix (if put-buffer-names-in-file-menu (buffer-name) "")]
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
83 ["Delete Buffer" kill-this-buffer
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
84 :active t
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
85 :suffix (if put-buffer-names-in-file-menu (buffer-name) "")]
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
86 "-----"
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
87 ["Exit XEmacs" save-buffers-kill-emacs]
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
88 )
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
89
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
90 ("Edit"
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
91 ["Undo" advertised-undo
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
92 :active (and (not (eq buffer-undo-list t))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
93 (or buffer-undo-list pending-undo-list))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
94 :suffix (if (or (eq last-command 'undo)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
95 (eq last-command 'advertised-undo))
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
96 "More" "")]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
97 ["Redo" redo
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
98 :included (fboundp 'redo)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
99 :active (not (or (eq buffer-undo-list t)
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
100 (eq last-buffer-undo-list nil)
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
101 (not (or (eq last-buffer-undo-list buffer-undo-list)
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
102 (and (null (car-safe buffer-undo-list))
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
103 (eq last-buffer-undo-list
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
104 (cdr-safe buffer-undo-list)))))
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
105 (or (eq buffer-undo-list pending-undo-list)
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
106 (eq (cdr buffer-undo-list) pending-undo-list))))
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
107 :suffix (if (eq last-command 'redo) "More" "")]
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
108 ["Cut" kill-primary-selection
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
109 :active (selection-owner-p)]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
110 ["Copy" copy-primary-selection
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
111 :active (selection-owner-p)]
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
112 ["Paste" yank-clipboard-selection
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
113 :active (selection-exists-p 'CLIPBOARD)]
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
114 ["Clear" delete-primary-selection
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
115 :active (selection-owner-p)]
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
116 "----"
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
117 ["Search..." isearch-forward]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
118 ["Search Backward..." isearch-backward]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
119 ["Replace..." query-replace]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
120 "----"
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
121 ["Search (Regexp)..." isearch-forward-regexp]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
122 ["Search Backward (Regexp)..." isearch-backward-regexp]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
123 ["Replace (Regexp)..." query-replace-regexp]
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
124 "----"
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
125 ["Goto Line..." goto-line]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
126 ["What Line" what-line]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
127 ("Bookmarks"
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
128 :filter bookmark-menu-filter)
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
129 "----"
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
130 ["Start Macro Recording" start-kbd-macro
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
131 :active (not defining-kbd-macro)]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
132 ["End Macro Recording" end-kbd-macro
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
133 :active defining-kbd-macro]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
134 ["Execute Last Macro" call-last-kbd-macro
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
135 :active last-kbd-macro]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
136 "----"
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
137 ["Show Message Log" show-message-log]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
138 )
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
139
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
140 ,@(when (featurep 'mule)
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
141 '(("Mule"
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
142 ("Describe language support")
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
143 ("Set language environment")
394
7d59cb494b73 Import from CVS: tag r21-2-12
cvs
parents: 392
diff changeset
144 "--"
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
145 ["Toggle input method" toggle-input-method]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
146 ["Select input method" select-input-method]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
147 ["Describe input method" describe-input-method]
394
7d59cb494b73 Import from CVS: tag r21-2-12
cvs
parents: 392
diff changeset
148 "--"
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
149 ["Describe current coding systems"
394
7d59cb494b73 Import from CVS: tag r21-2-12
cvs
parents: 392
diff changeset
150 describe-current-coding-system]
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
151 ["Set coding system of buffer file"
394
7d59cb494b73 Import from CVS: tag r21-2-12
cvs
parents: 392
diff changeset
152 set-buffer-file-coding-system]
7d59cb494b73 Import from CVS: tag r21-2-12
cvs
parents: 392
diff changeset
153 ;; not implemented yet
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
154 ["Set coding system of terminal"
394
7d59cb494b73 Import from CVS: tag r21-2-12
cvs
parents: 392
diff changeset
155 set-terminal-coding-system :active nil]
7d59cb494b73 Import from CVS: tag r21-2-12
cvs
parents: 392
diff changeset
156 ;; not implemented yet
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
157 ["Set coding system of keyboard"
394
7d59cb494b73 Import from CVS: tag r21-2-12
cvs
parents: 392
diff changeset
158 set-keyboard-coding-system :active nil]
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
159 ["Set coding system of process"
394
7d59cb494b73 Import from CVS: tag r21-2-12
cvs
parents: 392
diff changeset
160 set-buffer-process-coding-system
7d59cb494b73 Import from CVS: tag r21-2-12
cvs
parents: 392
diff changeset
161 :active (get-buffer-process (current-buffer))]
7d59cb494b73 Import from CVS: tag r21-2-12
cvs
parents: 392
diff changeset
162 "--"
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
163 ["Show character table" view-charset-by-menu]
394
7d59cb494b73 Import from CVS: tag r21-2-12
cvs
parents: 392
diff changeset
164 ;; not implemented yet
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
165 ["Show diagnosis for MULE" mule-diag :active nil]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
166 ["Show many languages" view-hello-file])))
404
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents: 398
diff changeset
167
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
168 ("Apps"
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
169 ["Read Mail (VM)..." vm
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
170 :active (fboundp 'vm)]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
171 ["Read Mail (MH)..." (mh-rmail t)
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
172 :active (fboundp 'mh-rmail)]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
173 ["Send mail..." compose-mail
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
174 :active (fboundp 'compose-mail)]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
175 ["Usenet News" gnus
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
176 :active (fboundp 'gnus)]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
177 ["Browse the Web" w3
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
178 :active (fboundp 'w3)]
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
179 "----"
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
180 ["Spell-Check Buffer" ispell-buffer
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
181 :active (fboundp 'ispell-buffer)]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
182 ["Toggle VI emulation" toggle-viper-mode
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
183 :active (fboundp 'toggle-viper-mode)]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
184 "----"
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
185 ("Calendar"
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
186 ["3-Month Calendar" calendar
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
187 :active (fboundp 'calendar)]
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
188 ["Diary" diary
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
189 :active (fboundp 'diary)]
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
190 ["Holidays" holidays
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
191 :active (fboundp 'holidays)]
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
192 ;; we're all pagans at heart ...
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
193 ["Phases of the Moon" phases-of-moon
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
194 :active (fboundp 'phases-of-moon)]
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
195 ["Sunrise/Sunset" sunrise-sunset
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
196 :active (fboundp 'sunrise-sunset)])
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
197
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
198 ("Games"
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
199 ["Mine Game" xmine
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
200 :active (fboundp 'xmine)]
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
201 ["Tetris" tetris
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
202 :active (fboundp 'tetris)]
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
203 ["Sokoban" sokoban
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
204 :active (fboundp 'sokoban)]
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
205 ["Quote from Zippy" yow
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
206 :active (fboundp 'yow)]
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
207 ["Psychoanalyst" doctor
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
208 :active (fboundp 'doctor)]
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
209 ["Psychoanalyze Zippy!" psychoanalyze-pinhead
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
210 :active (fboundp 'psychoanalyze-pinhead)]
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
211 ["Random Flames" flame
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
212 :active (fboundp 'flame)]
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
213 ["Dunnet (Adventure)" dunnet
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
214 :active (fboundp 'dunnet)]
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
215 ["Towers of Hanoi" hanoi
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
216 :active (fboundp 'hanoi)]
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
217 ["Game of Life" life
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
218 :active (fboundp 'life)]
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
219 ["Multiplication Puzzle" mpuz
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
220 :active (fboundp 'mpuz)]))
404
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents: 398
diff changeset
221
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
222 ("Options"
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
223 ("Customize"
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
224 ("Emacs" :filter (lambda (&rest junk)
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
225 (cdr (custom-menu-create 'emacs))))
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
226 ["Group..." customize-group]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
227 ["Variable..." customize-variable]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
228 ["Face..." customize-face]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
229 ["Saved..." customize-saved]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
230 ["Set..." customize-customized]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
231 ["Apropos..." customize-apropos]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
232 ["Browse..." customize-browse])
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
233
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
234 ("Manage Packages"
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
235 ("Add Download Site"
377
d883f39b8495 Import from CVS: tag r21-2b4
cvs
parents: 375
diff changeset
236 :filter (lambda (&rest junk)
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
237 (package-get-download-menu)))
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
238 ["Update Package Index" package-get-update-base]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
239 ["List & Install" pui-list-packages]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
240 ["Update Installed Packages" package-get-update-all]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
241 ;; hack-o-matic, we can't force a laod of package-base here
396
6719134a07c2 Import from CVS: tag r21-2-13
cvs
parents: 394
diff changeset
242 ;; since it triggers dialog box interactions which we can't
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
243 ;; deal while using a menu
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
244 ("Using Custom"
396
6719134a07c2 Import from CVS: tag r21-2-13
cvs
parents: 394
diff changeset
245 :filter (lambda (&rest junk)
6719134a07c2 Import from CVS: tag r21-2-13
cvs
parents: 394
diff changeset
246 (if package-get-base
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
247 (cdr (custom-menu-create 'packages))
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
248 '(["Please load Package Index" (lamda (&rest junk) ()) nil]))))
396
6719134a07c2 Import from CVS: tag r21-2-13
cvs
parents: 394
diff changeset
249
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
250 ["Help" (Info-goto-node "(xemacs)Packages")])
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
251
375
a300bb07d72d Import from CVS: tag r21-2b3
cvs
parents: 373
diff changeset
252 "---"
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
253
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
254 ("Editing Options"
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
255 ["Overstrike"
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
256 (progn
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
257 (setq overwrite-mode (if overwrite-mode nil 'overwrite-mode-textual))
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
258 (customize-set-variable 'overwrite-mode overwrite-mode))
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
259 :style toggle :selected overwrite-mode]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
260 ["Case Sensitive Search"
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
261 (customize-set-variable 'case-fold-search
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
262 (setq case-fold-search (not case-fold-search)))
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
263 :style toggle :selected (not case-fold-search)]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
264 ["Case Matching Replace"
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
265 (customize-set-variable 'case-replace (not case-replace))
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
266 :style toggle :selected case-replace]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
267 ["Auto Delete Selection"
404
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents: 398
diff changeset
268 (customize-set-variable 'pending-delete-mode (not pending-delete-mode))
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents: 398
diff changeset
269 :style toggle
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents: 398
diff changeset
270 :selected (and (boundp 'pending-delete-mode) pending-delete-mode)
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents: 398
diff changeset
271 :active (boundp 'pending-delete-mode)]
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
272 ["Active Regions"
404
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents: 398
diff changeset
273 (customize-set-variable 'zmacs-regions (not zmacs-regions))
2f8bb876ab1d Import from CVS: tag r21-2-32
cvs
parents: 398
diff changeset
274 :style toggle :selected zmacs-regions]
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
275 ["Mouse Paste At Text Cursor"
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
276 (customize-set-variable 'mouse-yank-at-point (not mouse-yank-at-point))
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
277 :style toggle :selected mouse-yank-at-point]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
278 ("Newline at end of file..."
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
279 ["Don't require"
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
280 (customize-set-variable 'require-final-newline nil)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
281 :style radio :selected (not require-final-newline)]
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
282 ["Require"
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
283 (customize-set-variable 'require-final-newline t)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
284 :style radio :selected (eq require-final-newline t)]
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
285 ["Ask"
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
286 (customize-set-variable 'require-final-newline 'ask)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
287 :style radio :selected (and require-final-newline
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
288 (not (eq require-final-newline t)))])
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
289 ["Add Newline When Moving Past End"
394
7d59cb494b73 Import from CVS: tag r21-2-12
cvs
parents: 392
diff changeset
290 (customize-set-variable 'next-line-add-newlines
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
291 (not next-line-add-newlines))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
292 :style toggle :selected next-line-add-newlines]
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
293 )
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
294 ("General Options"
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
295 ["Teach Extended Commands"
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
296 (customize-set-variable 'teach-extended-commands-p
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
297 (not teach-extended-commands-p))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
298 :style toggle :selected teach-extended-commands-p]
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
299 ["Debug On Error"
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
300 (customize-set-variable 'debug-on-error (not debug-on-error))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
301 :style toggle :selected debug-on-error]
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
302 ["Debug On Quit"
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
303 (customize-set-variable 'debug-on-quit (not debug-on-quit))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
304 :style toggle :selected debug-on-quit]
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
305 )
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
306 ("Printing Options"
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
307 ["Command-Line Switches for `lpr'/`lp'..."
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
308 ;; better to directly open a customization buffer, since the value
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
309 ;; must be a list of strings, which is somewhat complex to prompt for.
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
310 (customize-variable 'lpr-switches)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
311 (boundp 'lpr-switches)]
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
312 ("Pretty-Print Paper Size"
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
313 ["Letter"
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
314 (customize-set-variable 'ps-paper-type 'letter)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
315 :style radio
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
316 :selected (and (boundp 'ps-paper-type) (eq ps-paper-type 'letter))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
317 :active (boundp 'ps-paper-type)]
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
318 ["Letter-small"
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
319 (customize-set-variable 'ps-paper-type 'letter-small)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
320 :style radio
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
321 :selected (and (boundp 'ps-paper-type)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
322 (eq ps-paper-type 'letter-small))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
323 :active (boundp 'ps-paper-type)]
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
324 ["Legal"
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
325 (customize-set-variable 'ps-paper-type 'legal)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
326 :style radio
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
327 :selected (and (boundp 'ps-paper-type) (eq ps-paper-type 'legal))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
328 :active (boundp 'ps-paper-type)]
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
329 ["Statement"
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
330 (customize-set-variable 'ps-paper-type 'statement)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
331 :style radio
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
332 :selected (and (boundp 'ps-paper-type) (eq ps-paper-type 'statement))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
333 :active (boundp 'ps-paper-type)]
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
334 ["Executive"
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
335 (customize-set-variable 'ps-paper-type 'executive)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
336 :style radio
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
337 :selected (and (boundp 'ps-paper-type) (eq ps-paper-type 'executive))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
338 :active (boundp 'ps-paper-type)]
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
339 ["Tabloid"
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
340 (customize-set-variable 'ps-paper-type 'tabloid)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
341 :style radio
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
342 :selected (and (boundp 'ps-paper-type) (eq ps-paper-type 'tabloid))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
343 :active (boundp 'ps-paper-type)]
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
344 ["Ledger"
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
345 (customize-set-variable 'ps-paper-type 'ledger)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
346 :style radio
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
347 :selected (and (boundp 'ps-paper-type) (eq ps-paper-type 'ledger))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
348 :active (boundp 'ps-paper-type)]
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
349 ["A3"
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
350 (customize-set-variable 'ps-paper-type 'a3)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
351 :style radio
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
352 :selected (and (boundp 'ps-paper-type) (eq ps-paper-type 'a3))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
353 :active (boundp 'ps-paper-type)]
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
354 ["A4"
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
355 (customize-set-variable 'ps-paper-type 'a4)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
356 :style radio
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
357 :selected (and (boundp 'ps-paper-type) (eq ps-paper-type 'a4))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
358 :active (boundp 'ps-paper-type)]
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
359 ["A4small"
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
360 (customize-set-variable 'ps-paper-type 'a4small)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
361 :style radio
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
362 :selected (and (boundp 'ps-paper-type) (eq ps-paper-type 'a4small))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
363 :active (boundp 'ps-paper-type)]
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
364 ["B4"
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
365 (customize-set-variable 'ps-paper-type 'b4)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
366 :style radio
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
367 :selected (and (boundp 'ps-paper-type) (eq ps-paper-type 'b4))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
368 :active (boundp 'ps-paper-type)]
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
369 ["B5"
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
370 (customize-set-variable 'ps-paper-type 'b5)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
371 :style radio
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
372 :selected (and (boundp 'ps-paper-type) (eq ps-paper-type 'b5))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
373 :active (boundp 'ps-paper-type)]
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
374 )
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
375 ["Color Printing"
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
376 (cond (ps-print-color-p
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
377 (customize-set-variable 'ps-print-color-p nil)
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
378 ;; I'm wondering whether all this muck is usefull.
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
379 (and (boundp 'original-face-background)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
380 original-face-background
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
381 (set-face-background 'default original-face-background)))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
382 (t
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
383 (customize-set-variable 'ps-print-color-p t)
394
7d59cb494b73 Import from CVS: tag r21-2-12
cvs
parents: 392
diff changeset
384 (setq original-face-background
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
385 (face-background-instance 'default))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
386 (set-face-background 'default "white")))
394
7d59cb494b73 Import from CVS: tag r21-2-12
cvs
parents: 392
diff changeset
387 :style toggle
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
388 :selected (and (boundp 'ps-print-color-p) ps-print-color-p)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
389 :active (boundp 'ps-print-color-p)])
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
390 ("\"Other Window\" Location"
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
391 ["Always in Same Frame"
394
7d59cb494b73 Import from CVS: tag r21-2-12
cvs
parents: 392
diff changeset
392 (customize-set-variable
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
393 'get-frame-for-buffer-default-instance-limit nil)
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
394 :style radio
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
395 :selected (null get-frame-for-buffer-default-instance-limit)]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
396 ["Other Frame (2 Frames Max)"
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
397 (customize-set-variable 'get-frame-for-buffer-default-instance-limit 2)
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
398 :style radio
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
399 :selected (eq 2 get-frame-for-buffer-default-instance-limit)]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
400 ["Other Frame (3 Frames Max)"
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
401 (customize-set-variable 'get-frame-for-buffer-default-instance-limit 3)
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
402 :style radio
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
403 :selected (eq 3 get-frame-for-buffer-default-instance-limit)]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
404 ["Other Frame (4 Frames Max)"
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
405 (customize-set-variable 'get-frame-for-buffer-default-instance-limit 4)
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
406 :style radio
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
407 :selected (eq 4 get-frame-for-buffer-default-instance-limit)]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
408 ["Other Frame (5 Frames Max)"
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
409 (customize-set-variable 'get-frame-for-buffer-default-instance-limit 5)
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
410 :style radio
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
411 :selected (eq 5 get-frame-for-buffer-default-instance-limit)]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
412 ["Always Create New Frame"
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
413 (customize-set-variable 'get-frame-for-buffer-default-instance-limit 0)
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
414 :style radio
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
415 :selected (eq 0 get-frame-for-buffer-default-instance-limit)]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
416 "-----"
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
417 ["Temp Buffers Always in Same Frame"
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
418 (customize-set-variable 'temp-buffer-show-function
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
419 'show-temp-buffer-in-current-frame)
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
420 :style radio
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
421 :selected (eq temp-buffer-show-function
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
422 'show-temp-buffer-in-current-frame)]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
423 ["Temp Buffers Like Other Buffers"
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
424 (customize-set-variable 'temp-buffer-show-function nil)
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
425 :style radio
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
426 :selected (null temp-buffer-show-function)]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
427 "-----"
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
428 ["Make current frame gnuserv target"
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
429 (customize-set-variable 'gnuserv-frame (if (eq gnuserv-frame t) nil t))
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
430 :style toggle
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
431 :selected (and (boundp 'gnuserv-frame) (eq gnuserv-frame t))
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
432 :active (boundp 'gnuserv-frame)]
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
433 )
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
434 "-----"
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
435 ("Syntax Highlighting"
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
436 ["In This Buffer"
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
437 (progn ;; becomes buffer local
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
438 (font-lock-mode)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
439 (customize-set-variable 'font-lock-mode font-lock-mode))
394
7d59cb494b73 Import from CVS: tag r21-2-12
cvs
parents: 392
diff changeset
440 :style toggle
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
441 :selected (and (boundp 'font-lock-mode) font-lock-mode)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
442 :active (boundp 'font-lock-mode)]
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
443 ["Automatic"
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
444 (customize-set-variable 'font-lock-auto-fontify
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
445 (not font-lock-auto-fontify))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
446 :style toggle
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
447 :selected (and (boundp 'font-lock-auto-fontify) font-lock-auto-fontify)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
448 :active (fboundp 'font-lock-mode)]
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
449 "-----"
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
450 ["Fonts"
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
451 (progn
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
452 (require 'font-lock)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
453 (font-lock-use-default-fonts)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
454 (customize-set-variable 'font-lock-use-fonts t)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
455 (customize-set-variable 'font-lock-use-colors nil)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
456 (font-lock-mode 1))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
457 :style radio
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
458 :selected (and (boundp 'font-lock-use-fonts) font-lock-use-fonts)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
459 :active (fboundp 'font-lock-mode)]
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
460 ["Colors"
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
461 (progn
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
462 (require 'font-lock)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
463 (font-lock-use-default-colors)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
464 (customize-set-variable 'font-lock-use-colors t)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
465 (customize-set-variable 'font-lock-use-fonts nil)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
466 (font-lock-mode 1))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
467 :style radio
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
468 :selected (and (boundp 'font-lock-use-colors) font-lock-use-colors)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
469 :active (boundp 'font-lock-mode)]
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
470 "-----"
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
471 ["Least"
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
472 (progn
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
473 (require 'font-lock)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
474 (if (or (and (not (integerp font-lock-maximum-decoration))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
475 (not (eq t font-lock-maximum-decoration)))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
476 (and (integerp font-lock-maximum-decoration)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
477 (<= font-lock-maximum-decoration 0)))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
478 nil
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
479 (customize-set-variable 'font-lock-maximum-decoration nil)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
480 (font-lock-recompute-variables)))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
481 :style radio
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
482 :active (fboundp 'font-lock-mode)
371
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents: 365
diff changeset
483 :selected (and (boundp 'font-lock-maximium-decoration)
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
484 (or (and (not (integerp font-lock-maximum-decoration))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
485 (not (eq t font-lock-maximum-decoration)))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
486 (and (integerp font-lock-maximum-decoration)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
487 (<= font-lock-maximum-decoration 0))))]
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
488 ["More"
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
489 (progn
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
490 (require 'font-lock)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
491 (if (and (integerp font-lock-maximum-decoration)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
492 (= 1 font-lock-maximum-decoration))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
493 nil
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
494 (customize-set-variable 'font-lock-maximum-decoration 1)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
495 (font-lock-recompute-variables)))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
496 :style radio
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
497 :active (fboundp 'font-lock-mode)
371
cc15677e0335 Import from CVS: tag r21-2b1
cvs
parents: 365
diff changeset
498 :selected (and (boundp 'font-lock-maximium-decoration)
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
499 (integerp font-lock-maximum-decoration)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
500 (= 1 font-lock-maximum-decoration))]
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
501 ["Even More"
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
502 (progn
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
503 (require 'font-lock)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
504 (if (and (integerp font-lock-maximum-decoration)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
505 (= 2 font-lock-maximum-decoration))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
506 nil
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
507 (customize-set-variable 'font-lock-maximum-decoration 2)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
508 (font-lock-recompute-variables)))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
509 :style radio
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
510 :active (fboundp 'font-lock-mode)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
511 :selected (and (boundp 'font-lock-maximum-decoration)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
512 (integerp font-lock-maximum-decoration)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
513 (= 2 font-lock-maximum-decoration))]
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
514 ["Most"
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
515 (progn
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
516 (require 'font-lock)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
517 (if (or (eq font-lock-maximum-decoration t)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
518 (and (integerp font-lock-maximum-decoration)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
519 (>= font-lock-maximum-decoration 3)))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
520 nil
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
521 (customize-set-variable 'font-lock-maximum-decoration t)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
522 (font-lock-recompute-variables)))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
523 :style radio
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
524 :active (fboundp 'font-lock-mode)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
525 :selected (and (boundp 'font-lock-maximum-decoration)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
526 (or (eq font-lock-maximum-decoration t)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
527 (and (integerp font-lock-maximum-decoration)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
528 (>= font-lock-maximum-decoration 3))))]
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
529 "-----"
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
530 ["Lazy"
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
531 (progn ;; becomes buffer local
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
532 (lazy-shot-mode)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
533 (customize-set-variable 'lazy-shot-mode lazy-shot-mode)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
534 ;; this shouldn't be necessary so there has to
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
535 ;; be a redisplay bug lurking somewhere (or
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
536 ;; possibly another event handler bug)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
537 (redraw-modeline))
394
7d59cb494b73 Import from CVS: tag r21-2-12
cvs
parents: 392
diff changeset
538 :active (and (boundp 'font-lock-mode) (boundp 'lazy-shot-mode)
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
539 font-lock-mode)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
540 :style toggle
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
541 :selected (and (boundp 'lazy-shot-mode) lazy-shot-mode)]
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
542 ["Caching"
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
543 (progn ;; becomes buffer local
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
544 (fast-lock-mode)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
545 (customize-set-variable 'fast-lock-mode fast-lock-mode)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
546 ;; this shouldn't be necessary so there has to
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
547 ;; be a redisplay bug lurking somewhere (or
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
548 ;; possibly another event handler bug)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
549 (redraw-modeline))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
550 :active (and (boundp 'font-lock-mode) (boundp 'fast-lock-mode)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
551 font-lock-mode)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
552 :style toggle
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
553 :selected (and (boundp 'fast-lock-mode) fast-lock-mode)]
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
554 )
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
555 ("Paren Highlighting"
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
556 ["None"
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
557 (customize-set-variable 'paren-mode nil)
394
7d59cb494b73 Import from CVS: tag r21-2-12
cvs
parents: 392
diff changeset
558 :style radio
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
559 :selected (and (boundp 'paren-mode) (not paren-mode))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
560 :active (boundp 'paren-mode)]
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
561 ["Blinking Paren"
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
562 (customize-set-variable 'paren-mode 'blink-paren)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
563 :style radio
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
564 :selected (and (boundp 'paren-mode) (eq paren-mode 'blink-paren))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
565 :active (boundp 'paren-mode)]
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
566 ["Steady Paren"
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
567 (customize-set-variable 'paren-mode 'paren)
394
7d59cb494b73 Import from CVS: tag r21-2-12
cvs
parents: 392
diff changeset
568 :style radio
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
569 :selected (and (boundp 'paren-mode) (eq paren-mode 'paren))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
570 :active (boundp 'paren-mode)]
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
571 ["Expression"
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
572 (customize-set-variable 'paren-mode 'sexp)
394
7d59cb494b73 Import from CVS: tag r21-2-12
cvs
parents: 392
diff changeset
573 :style radio
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
574 :selected (and (boundp 'paren-mode) (eq paren-mode 'sexp))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
575 :active (boundp 'paren-mode)]
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
576 ;; ["Nested Shading"
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
577 ;; (customize-set-variable 'paren-mode 'nested)
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
578 ;; :style radio
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
579 ;; :selected (and (boundp 'paren-mode) (eq paren-mode 'nested))
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
580 ;; :active (boundp 'paren-mode)]
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
581 )
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
582 "-----"
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
583 ("Frame Appearance"
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
584 ["Frame-Local Font Menu"
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
585 (customize-set-variable 'font-menu-this-frame-only-p
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
586 (not font-menu-this-frame-only-p))
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
587 :style toggle
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
588 :selected (and (boundp 'font-menu-this-frame-only-p)
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
589 font-menu-this-frame-only-p)]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
590 ,@(if (featurep 'scrollbar)
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
591 '(["Scrollbars"
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
592 (customize-set-variable 'scrollbars-visible-p
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
593 (not scrollbars-visible-p))
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
594 :style toggle
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
595 :selected scrollbars-visible-p]))
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
596 ;; I don't think this is of any interest. - dverna apr. 98
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
597 ;; #### I beg to differ! Many FSFmacs converts hate the 3D
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
598 ;; modeline, and it was perfectly fine to be able to turn them
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
599 ;; off through the Options menu. I would have uncommented this
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
600 ;; source, but the code for saving options would not save the
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
601 ;; modeline 3D-ness. Grrr. --hniksic
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
602 ;; ["3D Modeline"
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
603 ;; (progn
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
604 ;; (if (zerop (specifier-instance modeline-shadow-thickness))
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
605 ;; (set-specifier modeline-shadow-thickness 2)
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
606 ;; (set-specifier modeline-shadow-thickness 0))
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
607 ;; (redraw-modeline t))
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
608 ;; :style toggle
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
609 ;; :selected (let ((thickness
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
610 ;; (specifier-instance modeline-shadow-thickness)))
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
611 ;; (and (integerp thickness)
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
612 ;; (> thickness 0)))]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
613 ["Truncate Lines"
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
614 (progn ;; becomes buffer-local
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
615 (setq truncate-lines (not truncate-lines))
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
616 (customize-set-variable 'truncate-lines truncate-lines))
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
617 :style toggle
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
618 :selected truncate-lines]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
619 ["Blinking Cursor"
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
620 (customize-set-variable 'blink-cursor-mode (not blink-cursor-mode))
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
621 :style toggle
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
622 :selected (and (boundp 'blink-cursor-mode) blink-cursor-mode)
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
623 :active (boundp 'blink-cursor-mode)]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
624 "-----"
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
625 ["Block cursor"
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
626 (progn
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
627 (customize-set-variable 'bar-cursor nil)
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
628 (force-cursor-redisplay))
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
629 :style radio
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
630 :selected (null bar-cursor)]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
631 ["Bar cursor (1 pixel)"
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
632 (progn
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
633 (customize-set-variable 'bar-cursor t)
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
634 (force-cursor-redisplay))
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
635 :style radio
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
636 :selected (eq bar-cursor t)]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
637 ["Bar cursor (2 pixels)"
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
638 (progn
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
639 (customize-set-variable 'bar-cursor 2)
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
640 (force-cursor-redisplay))
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
641 :style radio
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
642 :selected (and bar-cursor (not (eq bar-cursor t)))]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
643 "------"
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
644 ["Line Numbers"
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
645 (progn
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
646 (customize-set-variable 'line-number-mode (not line-number-mode))
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
647 (redraw-modeline))
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
648 :style toggle :selected line-number-mode]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
649 ["Column Numbers"
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
650 (progn
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
651 (customize-set-variable 'column-number-mode
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
652 (not column-number-mode))
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
653 (redraw-modeline))
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
654 :style toggle :selected column-number-mode]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
655 )
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
656 ("Menubar Appearance"
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
657 ["Buffers Menu Length..."
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
658 (customize-set-variable
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
659 'buffers-menu-max-size
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
660 ;; would it be better to open a customization buffer ?
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
661 (let ((val
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
662 (read-number
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
663 "Enter number of buffers to display (or 0 for unlimited): ")))
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
664 (if (eq val 0) nil val)))]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
665 ["Multi-Operation Buffers Sub-Menus"
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
666 (customize-set-variable 'complex-buffers-menu-p
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
667 (not complex-buffers-menu-p))
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
668 :style toggle
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
669 :selected complex-buffers-menu-p]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
670 ("Buffers Menu Sorting"
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
671 ["Most Recently Used"
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
672 (progn
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
673 (customize-set-variable 'buffers-menu-sort-function nil)
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
674 (customize-set-variable 'buffers-menu-grouping-function nil))
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
675 :style radio
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
676 :selected (null buffers-menu-sort-function)]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
677 ["Alphabetically"
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
678 (progn
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
679 (customize-set-variable 'buffers-menu-sort-function
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
680 'sort-buffers-menu-alphabetically)
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
681 (customize-set-variable 'buffers-menu-grouping-function nil))
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
682 :style radio
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
683 :selected (eq 'sort-buffers-menu-alphabetically
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
684 buffers-menu-sort-function)]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
685 ["By Major Mode, Then Alphabetically"
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
686 (progn
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
687 (customize-set-variable
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
688 'buffers-menu-sort-function
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
689 'sort-buffers-menu-by-mode-then-alphabetically)
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
690 (customize-set-variable
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
691 'buffers-menu-grouping-function
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
692 'group-buffers-menu-by-mode-then-alphabetically))
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
693 :style radio
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
694 :selected (eq 'sort-buffers-menu-by-mode-then-alphabetically
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
695 buffers-menu-sort-function)])
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
696 ["Submenus for Buffer Groups"
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
697 (customize-set-variable 'buffers-menu-submenus-for-groups-p
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
698 (not buffers-menu-submenus-for-groups-p))
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
699 :style toggle
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
700 :selected buffers-menu-submenus-for-groups-p]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
701 "---"
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
702 ["Ignore Scaled Fonts"
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
703 (customize-set-variable 'font-menu-ignore-scaled-fonts
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
704 (not font-menu-ignore-scaled-fonts))
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
705 :style toggle
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
706 :selected (and (boundp 'font-menu-ignore-scaled-fonts)
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
707 font-menu-ignore-scaled-fonts)]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
708 )
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
709 ,@(if (featurep 'toolbar)
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
710 '(("Toolbar Appearance"
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
711 ["Visible"
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
712 (customize-set-variable 'toolbar-visible-p
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
713 (not toolbar-visible-p))
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
714 :style toggle
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
715 :selected toolbar-visible-p]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
716 ["Captioned"
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
717 (customize-set-variable 'toolbar-captioned-p
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
718 (not toolbar-captioned-p))
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
719 :style toggle
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
720 :selected toolbar-captioned-p]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
721 ("Default Location"
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
722 ["Top"
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
723 (customize-set-variable 'default-toolbar-position 'top)
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
724 :style radio
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
725 :selected (eq default-toolbar-position 'top)]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
726 ["Bottom"
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
727 (customize-set-variable 'default-toolbar-position 'bottom)
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
728 :style radio
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
729 :selected (eq default-toolbar-position 'bottom)]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
730 ["Left"
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
731 (customize-set-variable 'default-toolbar-position 'left)
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
732 :style radio
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
733 :selected (eq default-toolbar-position 'left)]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
734 ["Right"
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
735 (customize-set-variable 'default-toolbar-position 'right)
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
736 :style radio
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
737 :selected (eq default-toolbar-position 'right)]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
738 )
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
739 )))
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
740 ("Mouse"
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
741 ["Avoid Text..."
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
742 (customize-set-variable 'mouse-avoidance-mode
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
743 (if mouse-avoidance-mode nil 'banish))
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
744 :style toggle
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
745 :selected (and (boundp 'mouse-avoidance-mode) mouse-avoidance-mode)
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
746 :active (and (boundp 'mouse-avoidance-mode)
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
747 (device-on-window-system-p))]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
748 ["strokes-mode"
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
749 (customize-set-variable 'strokes-mode (not strokes-mode))
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
750 :style toggle
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
751 :selected (and (boundp 'strokes-mode) strokes-mode)
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
752 :active (and (boundp 'strokes-mode)
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
753 (device-on-window-system-p))]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
754 )
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
755 ("Open URLs With"
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
756 ["Emacs-W3"
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
757 (customize-set-variable 'browse-url-browser-function 'browse-url-w3)
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
758 :style radio
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
759 :selected (and (boundp 'browse-url-browser-function)
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
760 (eq browse-url-browser-function 'browse-url-w3))
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
761 :active (and (boundp 'browse-url-browser-function)
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
762 (fboundp 'browse-url-w3)
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
763 (fboundp 'w3-fetch))]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
764 ["Netscape"
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
765 (customize-set-variable 'browse-url-browser-function
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
766 'browse-url-netscape)
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
767 :style radio
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
768 :selected (and (boundp 'browse-url-browser-function)
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
769 (eq browse-url-browser-function 'browse-url-netscape))
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
770 :active (and (boundp 'browse-url-browser-function)
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
771 (fboundp 'browse-url-netscape))]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
772 ["Mosaic"
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
773 (customize-set-variable 'browse-url-browser-function
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
774 'browse-url-mosaic)
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
775 :style radio
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
776 :selected (and (boundp 'browse-url-browser-function)
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
777 (eq browse-url-browser-function 'browse-url-mosaic))
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
778 :active (and (boundp 'browse-url-browser-function)
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
779 (fboundp 'browse-url-mosaic))]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
780 ["Mosaic (CCI)"
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
781 (customize-set-variable 'browse-url-browser-function 'browse-url-cci)
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
782 :style radio
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
783 :selected (and (boundp 'browse-url-browser-function)
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
784 (eq browse-url-browser-function 'browse-url-cci))
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
785 :active (and (boundp 'browse-url-browser-function)
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
786 (fboundp 'browse-url-cci))]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
787 ["IXI Mosaic"
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
788 (customize-set-variable 'browse-url-browser-function
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
789 'browse-url-iximosaic)
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
790 :style radio
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
791 :selected (and (boundp 'browse-url-browser-function)
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
792 (eq browse-url-browser-function 'browse-url-iximosaic))
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
793 :active (and (boundp 'browse-url-browser-function)
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
794 (fboundp 'browse-url-iximosaic))]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
795 ["Lynx (xterm)"
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
796 (customize-set-variable 'browse-url-browser-function
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
797 'browse-url-lynx-xterm)
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
798 :style radio
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
799 :selected (and (boundp 'browse-url-browser-function)
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
800 (eq browse-url-browser-function 'browse-url-lynx-xterm))
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
801 :active (and (boundp 'browse-url-browser-function)
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
802 (fboundp 'browse-url-lynx-xterm))]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
803 ["Lynx (xemacs)"
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
804 (customize-set-variable 'browse-url-browser-function
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
805 'browse-url-lynx-emacs)
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
806 :style radio
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
807 :selected (and (boundp 'browse-url-browser-function)
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
808 (eq browse-url-browser-function 'browse-url-lynx-emacs))
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
809 :active (and (boundp 'browse-url-browser-function)
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
810 (fboundp 'browse-url-lynx-emacs))]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
811 ["Grail"
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
812 (customize-set-variable 'browse-url-browser-function
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
813 'browse-url-grail)
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
814 :style radio
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
815 :selected (and (boundp 'browse-url-browser-function)
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
816 (eq browse-url-browser-function 'browse-url-grail))
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
817 :active (and (boundp 'browse-url-browser-function)
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
818 (fboundp 'browse-url-grail))]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
819 ["Kfm"
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
820 (customize-set-variable 'browse-url-browser-function
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
821 'browse-url-kfm)
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
822 :style radio
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
823 :selected (and (boundp 'browse-url-browser-function)
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
824 (eq browse-url-browser-function 'browse-url-kfm))
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
825 :active (and (boundp 'browse-url-browser-function)
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
826 (fboundp 'browse-url-kfm))]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
827 )
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
828 "-----"
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
829 ["Edit Faces..." (customize-face nil)]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
830 ("Font" :filter font-menu-family-constructor)
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
831 ("Size" :filter font-menu-size-constructor)
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
832 ; ("Weight" :filter font-menu-weight-constructor)
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
833 "-----"
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
834 ["Save Options" customize-save-customized]
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
835 )
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
836
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
837 ("Buffers"
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
838 :filter buffers-menu-filter
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
839 ["Read Only" (toggle-read-only)
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
840 :style toggle :selected buffer-read-only]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
841 ["List All Buffers" list-buffers]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
842 "--"
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
843 )
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
844
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
845 ("Tools"
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
846 ["Grep..." grep
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
847 :active (fboundp 'grep)]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
848 ["Compile..." compile
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
849 :active (fboundp 'compile)]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
850 ["Shell" shell
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
851 :active (fboundp 'shell)]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
852 ["Shell Command..." shell-command
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
853 :active (fboundp 'shell-command)]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
854 ["Shell Command on Region..." shell-command-on-region
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
855 :active (and (fboundp 'shell-command-on-region) (region-exists-p))]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
856 ["Debug (GDB)..." gdb
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
857 :active (fboundp 'gdb)]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
858 ["Debug (DBX)..." dbx
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
859 :active (fboundp 'dbx)]
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
860 "-----"
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
861 ("Tags"
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
862 ["Find Tag..." find-tag]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
863 ["Find Other Window..." find-tag-other-window]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
864 ["Next Tag..." (find-tag nil)]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
865 ["Next Other Window..." (find-tag-other-window nil)]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
866 ["Next File" next-file]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
867 "-----"
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
868 ["Tags Search..." tags-search]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
869 ["Tags Replace..." tags-query-replace]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
870 ["Continue Search/Replace" tags-loop-continue]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
871 "-----"
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
872 ["Pop stack" pop-tag-mark]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
873 ["Apropos..." tags-apropos]
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
874 "-----"
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
875 ["Set Tags Table File..." visit-tags-table]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
876 ))
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
877
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
878 nil ; the partition: menus after this are flushright
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
879
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
880 ("Help"
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
881 ["About XEmacs..." about-xemacs]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
882 ("Basics"
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
883 ["Installation" describe-installation
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
884 :active (boundp 'Installation-string)]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
885 ;; Tutorials.
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
886 ,(if (featurep 'mule)
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
887 ;; Mule tutorials.
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
888 (let ((lang language-info-alist)
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
889 submenu tut)
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
890 (while lang
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
891 (and (setq tut (assq 'tutorial (car lang)))
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
892 (not (string= (caar lang) "ASCII"))
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
893 (setq
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
894 submenu
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
895 (cons
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
896 `[,(caar lang) (help-with-tutorial nil ,(cdr tut))]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
897 submenu)))
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
898 (setq lang (cdr lang)))
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
899 (append `("Tutorials"
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
900 :filter tutorials-menu-filter
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
901 ["Default" help-with-tutorial t
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
902 ,(concat "(" current-language-environment ")")])
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
903 submenu))
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
904 ;; Non mule tutorials.
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
905 (let ((lang tutorial-supported-languages)
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
906 submenu)
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
907 (while lang
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
908 (setq submenu
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
909 (cons
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
910 `[,(caar lang)
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
911 (help-with-tutorial ,(format "TUTORIAL.%s"
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
912 (cadr (car lang))))]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
913 submenu))
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
914 (setq lang (cdr lang)))
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
915 (append '("Tutorials"
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
916 ["English" help-with-tutorial])
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
917 submenu)))
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
918 ["News" view-emacs-news]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
919 ["Packages" finder-by-keyword]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
920 ["Splash" xemacs-splash-buffer])
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
921 "-----"
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
922 ("XEmacs FAQ"
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
923 ["FAQ (local)" xemacs-local-faq]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
924 ["FAQ via WWW" xemacs-www-faq (boundp 'browse-url-browser-function)]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
925 ["Home Page" xemacs-www-page (boundp 'browse-url-browser-function)])
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
926 ("Samples"
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
927 ["Sample .emacs" (find-file (locate-data-file "sample.emacs")) (locate-data-file "sample.emacs")]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
928 ["Sample .Xdefaults" (find-file (locate-data-file "sample.Xdefaults")) (locate-data-file "sample.Xdefaults")]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
929 ["Sample enriched" (find-file (locate-data-file "enriched.doc")) (locate-data-file "enriched.doc")])
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
930 "-----"
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
931 ("Lookup in Info"
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
932 ["Key Binding..." Info-goto-emacs-key-command-node]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
933 ["Command..." Info-goto-emacs-command-node]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
934 ["Function..." Info-elisp-ref]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
935 ["Topic..." Info-query])
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
936 ("Manuals"
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
937 ["Info" info]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
938 ["Unix Manual..." manual-entry])
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
939 ("Commands & Keys"
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
940 ["Mode" describe-mode]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
941 ["Apropos..." hyper-apropos]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
942 ["Apropos Docs..." apropos-documentation]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
943 "-----"
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
944 ["Key..." describe-key]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
945 ["Bindings" describe-bindings]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
946 ["Mouse Bindings" describe-pointer]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
947 ["Recent Keys" view-lossage]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
948 "-----"
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
949 ["Function..." describe-function]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
950 ["Variable..." describe-variable]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
951 ["Locate Command..." where-is])
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
952 "-----"
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
953 ["Recent Messages" view-lossage]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
954 ("Misc"
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
955 ["No Warranty" describe-no-warranty]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
956 ["XEmacs License" describe-copying]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
957 ["The Latest Version" describe-distribution])
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
958 ["Send Bug Report..." report-emacs-bug]))))
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
959
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
960
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
961 (defun maybe-add-init-button ()
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
962 "Don't call this.
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
963 Adds `Load .emacs' button to menubar when starting up with -q."
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
964 ;; by Stig@hackvan.com
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
965 (cond
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
966 (init-file-user nil)
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
967 ((file-exists-p (expand-file-name ".emacs" "~"))
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
968 (add-menu-button nil
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
969 ["Load .emacs"
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
970 (progn (delete-menu-item '("Load .emacs"))
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
971 (load-user-init-file (user-login-name)))
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
972 ]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
973 "Help"))
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
974 (t nil)))
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
975
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
976 (add-hook 'before-init-hook 'maybe-add-init-button)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
977
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
978
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
979 ;;; The File menu
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
980
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
981 (defvar put-buffer-names-in-file-menu t)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
982
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
983
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
984 ;;; The Bookmarks menu
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
985
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
986 (defun bookmark-menu-filter (&rest ignore)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
987 (let ((definedp (and (boundp 'bookmark-alist)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
988 bookmark-alist
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
989 t)))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
990 `(,(if definedp
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
991 '("Jump to Bookmark"
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
992 :filter (lambda (&rest junk)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
993 (mapcar #'(lambda (bmk)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
994 `[,bmk (bookmark-jump ',bmk)])
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
995 (bookmark-all-names))))
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
996 ["Jump to Bookmark" nil nil])
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
997 ["Set bookmark" bookmark-set
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
998 :active (fboundp 'bookmark-set)]
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
999 "---"
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
1000 ["Insert contents" bookmark-menu-insert
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1001 :active (fboundp 'bookmark-menu-insert)]
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
1002 ["Insert location" bookmark-menu-locate
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1003 :active (fboundp 'bookmark-menu-locate)]
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1004 "---"
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
1005 ["Rename bookmark" bookmark-menu-rename
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1006 :active (fboundp 'bookmark-menu-rename)]
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1007 ,(if definedp
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
1008 '("Delete Bookmark"
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1009 :filter (lambda (&rest junk)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1010 (mapcar #'(lambda (bmk)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1011 `[,bmk (bookmark-delete ',bmk)])
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1012 (bookmark-all-names))))
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
1013 ["Delete Bookmark" nil nil])
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
1014 ["Edit Bookmark List" bookmark-bmenu-list ,definedp]
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1015 "---"
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
1016 ["Save bookmarks" bookmark-save ,definedp]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
1017 ["Save bookmarks as..." bookmark-write ,definedp]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
1018 ["Load a bookmark file" bookmark-load
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1019 :active (fboundp 'bookmark-load)])))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1020
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1021 ;;; The Buffers menu
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1022
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1023 (defgroup buffers-menu nil
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1024 "Customization of `Buffers' menu."
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1025 :group 'menu)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1026
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1027 (defcustom buffers-menu-max-size 25
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1028 "*Maximum number of entries which may appear on the \"Buffers\" menu.
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1029 If this is 10, then only the ten most-recently-selected buffers will be
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1030 shown. If this is nil, then all buffers will be shown. Setting this to
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1031 a large number or nil will slow down menu responsiveness."
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1032 :type '(choice (const :tag "Show all" nil)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1033 (integer 10))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1034 :group 'buffers-menu)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1035
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1036 (defcustom complex-buffers-menu-p nil
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1037 "*If non-nil, the buffers menu will contain several commands.
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1038 Commands will be presented as submenus of each buffer line. If this
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1039 is false, then there will be only one command: select that buffer."
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1040 :type 'boolean
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1041 :group 'buffers-menu)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1042
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1043 (defcustom buffers-menu-submenus-for-groups-p nil
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1044 "*If non-nil, the buffers menu will contain one submenu per group of buffers.
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1045 The grouping function is specified in `buffers-menu-grouping-function'.
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1046 If this is an integer, do not build submenus if the number of buffers
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1047 is not larger than this value."
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1048 :type '(choice (const :tag "No Subgroups" nil)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1049 (integer :tag "Max. submenus" 10)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1050 (sexp :format "%t\n" :tag "Allow Subgroups" :value t))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1051 :group 'buffers-menu)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1052
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1053 (defcustom buffers-menu-switch-to-buffer-function 'switch-to-buffer
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1054 "*The function to call to select a buffer from the buffers menu.
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1055 `switch-to-buffer' is a good choice, as is `pop-to-buffer'."
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1056 :type '(radio (function-item switch-to-buffer)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1057 (function-item pop-to-buffer)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1058 (function :tag "Other"))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1059 :group 'buffers-menu)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1060
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1061 (defcustom buffers-menu-omit-function 'buffers-menu-omit-invisible-buffers
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1062 "*If non-nil, a function specifying the buffers to omit from the buffers menu.
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1063 This is passed a buffer and should return non-nil if the buffer should be
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1064 omitted. The default value `buffers-menu-omit-invisible-buffers' omits
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1065 buffers that are normally considered \"invisible\" (those whose name
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1066 begins with a space)."
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1067 :type '(choice (const :tag "None" nil)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1068 function)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1069 :group 'buffers-menu)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1070
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1071 (defcustom buffers-menu-format-buffer-line-function 'format-buffers-menu-line
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
1072 "*The function to call to return a string to represent a buffer in the
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
1073 buffers menu. The function is passed a buffer and should return a string.
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
1074 The default value `format-buffers-menu-line' just returns the name of
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
1075 the buffer. Also check out `slow-format-buffers-menu-line' which
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
1076 returns a whole bunch of info about a buffer."
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1077 :type 'function
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1078 :group 'buffers-menu)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1079
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1080 (defcustom buffers-menu-sort-function
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1081 'sort-buffers-menu-by-mode-then-alphabetically
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1082 "*If non-nil, a function to sort the list of buffers in the buffers menu.
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1083 It will be passed two arguments (two buffers to compare) and should return
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
1084 T if the first is \"less\" than the second. One possible value is
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1085 `sort-buffers-menu-alphabetically'; another is
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1086 `sort-buffers-menu-by-mode-then-alphabetically'."
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1087 :type '(choice (const :tag "None" nil)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1088 function)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1089 :group 'buffers-menu)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1090
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1091 (defcustom buffers-menu-grouping-function
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1092 'group-buffers-menu-by-mode-then-alphabetically
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1093 "*If non-nil, a function to group buffers in the buffers menu together.
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1094 It will be passed two arguments, successive members of the sorted buffers
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1095 list after being passed through `buffers-menu-sort-function'. It should
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1096 return non-nil if the second buffer begins a new group. The return value
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1097 should be the name of the old group, which may be used in hierarchical
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1098 buffers menus. The last invocation of the function contains nil as the
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1099 second argument, so that the name of the last group can be determined.
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1100
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1101 The sensible values of this function are dependent on the value specified
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1102 for `buffers-menu-sort-function'."
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1103 :type '(choice (const :tag "None" nil)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1104 function)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1105 :group 'buffers-menu)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1106
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
1107 (defun buffers-menu-omit-invisible-buffers (buf)
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
1108 "For use as a value of `buffers-menu-omit-function'.
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
1109 Omits normally invisible buffers (those whose name begins with a space)."
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
1110 (not (null (string-match "\\` " (buffer-name buf)))))
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
1111
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1112 (defun sort-buffers-menu-alphabetically (buf1 buf2)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1113 "For use as a value of `buffers-menu-sort-function'.
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1114 Sorts the buffers in alphabetical order by name, but puts buffers beginning
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1115 with a star at the end of the list."
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1116 (let* ((nam1 (buffer-name buf1))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1117 (nam2 (buffer-name buf2))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1118 (star1p (not (null (string-match "\\`*" nam1))))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1119 (star2p (not (null (string-match "\\`*" nam2)))))
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
1120 (if (not (eq star1p star2p))
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
1121 (not star1p)
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
1122 (string-lessp nam1 nam2))))
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1123
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1124 (defun sort-buffers-menu-by-mode-then-alphabetically (buf1 buf2)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1125 "For use as a value of `buffers-menu-sort-function'.
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1126 Sorts first by major mode and then alphabetically by name, but puts buffers
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1127 beginning with a star at the end of the list."
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1128 (let* ((nam1 (buffer-name buf1))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1129 (nam2 (buffer-name buf2))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1130 (star1p (not (null (string-match "\\`*" nam1))))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1131 (star2p (not (null (string-match "\\`*" nam2))))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1132 (mode1 (symbol-value-in-buffer 'major-mode buf1))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1133 (mode2 (symbol-value-in-buffer 'major-mode buf2)))
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
1134 (cond ((not (eq star1p star2p)) (not star1p))
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1135 ((and star1p star2p (string-lessp nam1 nam2)))
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
1136 ((string-lessp mode1 mode2) t)
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
1137 ((string-lessp mode2 mode1) nil)
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
1138 (t (string-lessp nam1 nam2)))))
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1139
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1140 ;; this version is too slow on some machines.
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
1141 (defun slow-format-buffers-menu-line (buffer)
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1142 "For use as a value of `buffers-menu-format-buffer-line-function'.
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1143 This returns a string containing a bunch of info about the buffer."
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
1144 (format "%s%s %-19s %6s %-15s %s"
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
1145 (if (buffer-modified-p buffer) "*" " ")
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
1146 (if (symbol-value-in-buffer 'buffer-read-only buffer) "%" " ")
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
1147 (buffer-name buffer)
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
1148 (buffer-size buffer)
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
1149 (symbol-value-in-buffer 'mode-name buffer)
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
1150 (or (buffer-file-name buffer) "")))
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1151
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
1152 (defun format-buffers-menu-line (buffer)
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1153 "For use as a value of `buffers-menu-format-buffer-line-function'.
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1154 This just returns the buffer's name."
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
1155 (buffer-name buffer))
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1156
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1157 (defun group-buffers-menu-by-mode-then-alphabetically (buf1 buf2)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1158 "For use as a value of `buffers-menu-grouping-function'.
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1159 This groups buffers by major mode. It only really makes sense if
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1160 `buffers-menu-sorting-function' is
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1161 `sort-buffers-menu-by-mode-then-alphabetically'."
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1162 (cond ((string-match "\\`*" (buffer-name buf1))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1163 (and (null buf2) "*Misc*"))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1164 ((or (null buf2)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1165 (string-match "\\`*" (buffer-name buf2))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1166 (not (eq (symbol-value-in-buffer 'major-mode buf1)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1167 (symbol-value-in-buffer 'major-mode buf2))))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1168 (symbol-value-in-buffer 'mode-name buf1))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1169 (t nil)))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1170
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1171 (defun buffer-menu-save-buffer (buffer)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1172 (save-excursion
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1173 (set-buffer buffer)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1174 (save-buffer)))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1175
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1176 (defun buffer-menu-write-file (buffer)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1177 (save-excursion
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1178 (set-buffer buffer)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1179 (write-file (read-file-name
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1180 (format "Write %s to file: "
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1181 (buffer-name (current-buffer)))))))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1182
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1183 (defsubst build-buffers-menu-internal (buffers)
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
1184 (let (name line)
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1185 (mapcar
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1186 #'(lambda (buffer)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1187 (if (eq buffer t)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1188 "---"
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
1189 (setq line (funcall buffers-menu-format-buffer-line-function
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
1190 buffer))
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1191 (if complex-buffers-menu-p
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1192 (delq nil
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1193 (list line
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
1194 (vector "Switch to Buffer"
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1195 (list buffers-menu-switch-to-buffer-function
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1196 (setq name (buffer-name buffer)))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1197 t)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1198 (if (eq buffers-menu-switch-to-buffer-function
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1199 'switch-to-buffer)
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
1200 (vector "Switch to Buffer, Other Frame"
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1201 (list 'switch-to-buffer-other-frame
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1202 (setq name (buffer-name buffer)))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1203 t)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1204 nil)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1205 (if (and (buffer-modified-p buffer)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1206 (buffer-file-name buffer))
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
1207 (vector "Save Buffer"
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1208 (list 'buffer-menu-save-buffer name) t)
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
1209 ["Save Buffer" nil nil]
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1210 )
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
1211 (vector "Save As..."
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1212 (list 'buffer-menu-write-file name) t)
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
1213 (vector "Delete Buffer" (list 'kill-buffer name)
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1214 t)))
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
1215 ;; ### We don't want buffer names to be translated,
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
1216 ;; ### so we put the buffer name in the suffix.
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
1217 ;; ### Also, avoid losing with non-ASCII buffer names.
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
1218 ;; ### We still lose, however, if complex-buffers-menu-p. --mrb
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1219 (vector ""
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1220 (list buffers-menu-switch-to-buffer-function
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1221 (buffer-name buffer))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1222 t line))))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1223 buffers)))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1224
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1225 (defun buffers-menu-filter (menu)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1226 "This is the menu filter for the top-level buffers \"Buffers\" menu.
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1227 It dynamically creates a list of buffers to use as the contents of the menu.
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1228 Only the most-recently-used few buffers will be listed on the menu, for
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1229 efficiency reasons. You can control how many buffers will be shown by
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1230 setting `buffers-menu-max-size'. You can control the text of the menu
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1231 items by redefining the function `format-buffers-menu-line'."
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1232 (let ((buffers (delete-if buffers-menu-omit-function (buffer-list))))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1233 (and (integerp buffers-menu-max-size)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1234 (> buffers-menu-max-size 1)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1235 (> (length buffers) buffers-menu-max-size)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1236 ;; shorten list of buffers (not with submenus!)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1237 (not (and buffers-menu-grouping-function
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1238 buffers-menu-submenus-for-groups-p))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1239 (setcdr (nthcdr buffers-menu-max-size buffers) nil))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1240 (if buffers-menu-sort-function
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1241 (setq buffers (sort buffers buffers-menu-sort-function)))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1242 (if (and buffers-menu-grouping-function
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1243 buffers-menu-submenus-for-groups-p
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1244 (or (not (integerp buffers-menu-submenus-for-groups-p))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1245 (> (length buffers) buffers-menu-submenus-for-groups-p)))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1246 (let (groups groupnames current-group)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1247 (mapl
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1248 #'(lambda (sublist)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1249 (let ((groupname (funcall buffers-menu-grouping-function
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1250 (car sublist) (cadr sublist))))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1251 (setq current-group (cons (car sublist) current-group))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1252 (if groupname
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1253 (progn
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1254 (setq groups (cons (nreverse current-group)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1255 groups))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1256 (setq groupnames (cons groupname groupnames))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1257 (setq current-group nil)))))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1258 buffers)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1259 (setq buffers
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1260 (mapcar*
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1261 #'(lambda (groupname group)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1262 (cons groupname (build-buffers-menu-internal group)))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1263 (nreverse groupnames)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1264 (nreverse groups))))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1265 (if buffers-menu-grouping-function
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1266 (progn
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1267 (setq buffers
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1268 (mapcon
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1269 #'(lambda (sublist)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1270 (cond ((funcall buffers-menu-grouping-function
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1271 (car sublist) (cadr sublist))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1272 (list (car sublist) t))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1273 (t (list (car sublist)))))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1274 buffers))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1275 ;; remove a trailing separator.
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1276 (and (>= (length buffers) 2)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1277 (let ((lastcdr (nthcdr (- (length buffers) 2) buffers)))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1278 (if (eq t (cadr lastcdr))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1279 (setcdr lastcdr nil))))))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1280 (setq buffers (build-buffers-menu-internal buffers)))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1281 (append menu buffers)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1282 ))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1283
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1284 (defun language-environment-menu-filter (menu)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1285 "This is the menu filter for the \"Language Environment\" submenu."
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
1286 (mapcar (lambda (env-sym)
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
1287 `[ ,(capitalize (symbol-name env-sym))
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
1288 (set-language-environment ',env-sym)])
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
1289 language-environment-list))
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1290
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1291
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1292 ;;; The Options menu
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1293
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1294 ;; We'll keep those variables here for a while, in order to provide a
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1295 ;; function for porting the old options file that a user may own to Custom.
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1296
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1297 (defvar options-save-faces nil
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1298 "*Non-nil value means save-options will save information about faces.
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1299 A nil value means save-options will not save face information.
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1300 Set this non-nil only if you use M-x edit-faces to change face
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1301 settings. If you use M-x customize-face or the \"Browse Faces...\"
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1302 menu entry, you will see a button in the Customize Face buffer that you
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1303 can use to permanently save your face changes.
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1304
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1305 M-x edit-faces is deprecated. Support for it and this variable will
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1306 be discontinued in a future release.")
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1307
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1308 (defvar save-options-init-file nil
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1309 "File into which to save forms to load the options file (nil for .emacs).
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1310 Normally this is nil, which means save into your .emacs file (the value
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1311 of `user-init-file'.")
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1312
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1313 (defvar save-options-file ".xemacs-options"
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1314 "File to save options into.
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1315 This file is loaded from your .emacs file.
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1316 If this is a relative filename, it is put into the same directory as your
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1317 .emacs file.")
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1318
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1319
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1320
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1321 ;;; The Help menu
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1322
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
1323 (if (featurep 'mule)
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
1324 (defun tutorials-menu-filter (menu-items)
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
1325 ;; If there's a tutorial for the current language environment, make it
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
1326 ;; appear first as the default one. Otherwise, use the english one.
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
1327 (let* ((menu menu-items)
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
1328 (item (pop menu-items)))
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
1329 (aset
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
1330 item 3
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
1331 (concat "("
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
1332 (if (assoc
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
1333 'tutorial
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
1334 (assoc current-language-environment language-info-alist))
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
1335 current-language-environment
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
1336 "English")
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
1337 ")"))
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
1338 menu)))
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1339
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1340
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1341 (set-menubar default-menubar)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1342
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1343
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1344 ;;; Popup menus.
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1345
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1346 (defconst default-popup-menu
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1347 '("XEmacs Commands"
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
1348 ["Undo" advertised-undo
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1349 :active (and (not (eq buffer-undo-list t))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1350 (or buffer-undo-list pending-undo-list))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1351 :suffix (if (or (eq last-command 'undo)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1352 (eq last-command 'advertised-undo))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1353 "More" "")]
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
1354 ["Cut" kill-primary-selection
284
558f606b08ae Import from CVS: tag r21-0b40
cvs
parents: 282
diff changeset
1355 :active (selection-owner-p)]
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
1356 ["Copy" copy-primary-selection
284
558f606b08ae Import from CVS: tag r21-0b40
cvs
parents: 282
diff changeset
1357 :active (selection-owner-p)]
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
1358 ["Paste" yank-clipboard-selection
284
558f606b08ae Import from CVS: tag r21-0b40
cvs
parents: 282
diff changeset
1359 :active (selection-exists-p 'CLIPBOARD)]
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
1360 ["Clear" delete-primary-selection
284
558f606b08ae Import from CVS: tag r21-0b40
cvs
parents: 282
diff changeset
1361 :active (selection-owner-p)]
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1362 "-----"
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
1363 ["Select Block" mark-paragraph]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
1364 ["Split Window" split-window-vertically]
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
1365 ["Unsplit Window" delete-other-windows]
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1366 ))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1367
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1368 (defvar global-popup-menu nil
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1369 "The global popup menu. This is present in all modes.
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1370 See the function `popup-menu' for a description of menu syntax.")
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1371
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1372 (defvar mode-popup-menu nil
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1373 "The mode-specific popup menu. Automatically buffer local.
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1374 This is appended to the default items in `global-popup-menu'.
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1375 See the function `popup-menu' for a description of menu syntax.")
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1376 (make-variable-buffer-local 'mode-popup-menu)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1377
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1378 ;; In an effort to avoid massive menu clutter, this mostly worthless menu is
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
1379 ;; superceded by any local popup menu...
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1380 (setq-default mode-popup-menu default-popup-menu)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1381
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1382 (defvar activate-popup-menu-hook nil
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1383 "Function or functions run before a mode-specific popup menu is made visible.
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1384 These functions are called with no arguments, and should interrogate and
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1385 modify the value of `global-popup-menu' or `mode-popup-menu' as desired.
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1386 Note: this hook is only run if you use `popup-mode-menu' for activating the
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1387 global and mode-specific commands; if you have your own binding for button3,
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1388 this hook won't be run.")
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1389
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1390 (defun popup-mode-menu ()
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1391 "Pop up a menu of global and mode-specific commands.
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1392 The menu is computed by combining `global-popup-menu' and `mode-popup-menu'."
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1393 (interactive "@_")
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1394 (run-hooks 'activate-popup-menu-hook)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1395 (popup-menu
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1396 (cond ((and global-popup-menu mode-popup-menu)
284
558f606b08ae Import from CVS: tag r21-0b40
cvs
parents: 282
diff changeset
1397 ;; Merge global-popup-menu and mode-popup-menu
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1398 (check-menu-syntax mode-popup-menu)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1399 (let* ((title (car mode-popup-menu))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1400 (items (cdr mode-popup-menu))
284
558f606b08ae Import from CVS: tag r21-0b40
cvs
parents: 282
diff changeset
1401 mode-filters)
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1402 ;; Strip keywords from local menu for attaching them at the top
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1403 (while (and items
284
558f606b08ae Import from CVS: tag r21-0b40
cvs
parents: 282
diff changeset
1404 (keywordp (car items)))
558f606b08ae Import from CVS: tag r21-0b40
cvs
parents: 282
diff changeset
1405 ;; Push both keyword and its argument.
558f606b08ae Import from CVS: tag r21-0b40
cvs
parents: 282
diff changeset
1406 (push (pop items) mode-filters)
558f606b08ae Import from CVS: tag r21-0b40
cvs
parents: 282
diff changeset
1407 (push (pop items) mode-filters))
558f606b08ae Import from CVS: tag r21-0b40
cvs
parents: 282
diff changeset
1408 (setq mode-filters (nreverse mode-filters))
558f606b08ae Import from CVS: tag r21-0b40
cvs
parents: 282
diff changeset
1409 ;; If mode-filters contains a keyword already present in
558f606b08ae Import from CVS: tag r21-0b40
cvs
parents: 282
diff changeset
1410 ;; `global-popup-menu', you will probably lose.
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1411 (append (list (car global-popup-menu))
284
558f606b08ae Import from CVS: tag r21-0b40
cvs
parents: 282
diff changeset
1412 mode-filters
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1413 (cdr global-popup-menu)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1414 '("---" "---")
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1415 (if popup-menu-titles (list title))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1416 (if popup-menu-titles '("---" "---"))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1417 items)))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1418 (t
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1419 (or mode-popup-menu
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1420 global-popup-menu
284
558f606b08ae Import from CVS: tag r21-0b40
cvs
parents: 282
diff changeset
1421 (error "No menu defined in this buffer"))))))
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1422
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1423 (defun popup-buffer-menu (event)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1424 "Pop up a copy of the Buffers menu (from the menubar) where the mouse is clicked."
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1425 (interactive "e")
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1426 (let ((window (and (event-over-text-area-p event) (event-window event)))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1427 (bmenu nil))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1428 (or window
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1429 (error "Pointer must be in a normal window"))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1430 (select-window window)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1431 (if current-menubar
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
1432 (setq bmenu (assoc "Buffers" current-menubar)))
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1433 (if (null bmenu)
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
1434 (setq bmenu (assoc "Buffers" default-menubar)))
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1435 (if (null bmenu)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1436 (error "Can't find the Buffers menu"))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1437 (popup-menu bmenu)))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1438
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1439 (defun popup-menubar-menu (event)
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
1440 "Pop up a copy of menu that also appears in the menubar"
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
1441 ;; by Stig@hackvan.com
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1442 (interactive "e")
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1443 (let ((window (and (event-over-text-area-p event) (event-window event)))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1444 popup-menubar)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1445 (or window
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1446 (error "Pointer must be in a normal window"))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1447 (select-window window)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1448 (and current-menubar (run-hooks 'activate-menubar-hook))
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
1449 ;; ##### Instead of having to copy this just to safely get rid of
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1450 ;; any nil what we should really do is fix up the internal menubar
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1451 ;; code to just ignore nil if generating a popup menu
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1452 (setq popup-menubar (delete nil (copy-sequence (or current-menubar
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1453 default-menubar))))
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
1454 (popup-menu (cons "Menubar Menu" popup-menubar))
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1455 ))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1456
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1457 (global-set-key 'button3 'popup-mode-menu)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1458 ;; shift button3 and shift button2 are reserved for Hyperbole
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1459 (global-set-key '(meta control button3) 'popup-buffer-menu)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1460 ;; The following command is way too dangerous with Custom.
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1461 ;; (global-set-key '(meta shift button3) 'popup-menubar-menu)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1462
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1463 ;; Here's a test of the cool new menu features (from Stig).
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1464
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1465 ;;(setq mode-popup-menu
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1466 ;; '("Test Popup Menu"
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1467 ;; :filter cdr
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1468 ;; ["this item won't appear because of the menu filter" ding t]
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1469 ;; "--:singleLine"
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1470 ;; "singleLine"
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1471 ;; "--:doubleLine"
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1472 ;; "doubleLine"
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1473 ;; "--:singleDashedLine"
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1474 ;; "singleDashedLine"
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1475 ;; "--:doubleDashedLine"
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1476 ;; "doubleDashedLine"
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1477 ;; "--:noLine"
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1478 ;; "noLine"
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1479 ;; "--:shadowEtchedIn"
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1480 ;; "shadowEtchedIn"
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1481 ;; "--:shadowEtchedOut"
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1482 ;; "shadowEtchedOut"
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1483 ;; "--:shadowDoubleEtchedIn"
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1484 ;; "shadowDoubleEtchedIn"
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1485 ;; "--:shadowDoubleEtchedOut"
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1486 ;; "shadowDoubleEtchedOut"
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1487 ;; "--:shadowEtchedInDash"
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1488 ;; "shadowEtchedInDash"
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1489 ;; "--:shadowEtchedOutDash"
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1490 ;; "shadowEtchedOutDash"
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1491 ;; "--:shadowDoubleEtchedInDash"
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1492 ;; "shadowDoubleEtchedInDash"
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1493 ;; "--:shadowDoubleEtchedOutDash"
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1494 ;; "shadowDoubleEtchedOutDash"
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1495 ;; ))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1496
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1497 (defun xemacs-splash-buffer ()
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1498 "Redisplay XEmacs splash screen in a buffer."
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1499 (interactive)
396
6719134a07c2 Import from CVS: tag r21-2-13
cvs
parents: 394
diff changeset
1500 (let ((buffer (get-buffer-create "*Splash*"))
6719134a07c2 Import from CVS: tag r21-2-13
cvs
parents: 394
diff changeset
1501 tmout)
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1502 (set-buffer buffer)
396
6719134a07c2 Import from CVS: tag r21-2-13
cvs
parents: 394
diff changeset
1503 (setq buffer-read-only t)
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1504 (erase-buffer buffer)
396
6719134a07c2 Import from CVS: tag r21-2-13
cvs
parents: 394
diff changeset
1505 (setq tmout (display-splash-frame))
6719134a07c2 Import from CVS: tag r21-2-13
cvs
parents: 394
diff changeset
1506 (when tmout
6719134a07c2 Import from CVS: tag r21-2-13
cvs
parents: 394
diff changeset
1507 (make-local-hook 'kill-buffer-hook)
6719134a07c2 Import from CVS: tag r21-2-13
cvs
parents: 394
diff changeset
1508 (add-hook 'kill-buffer-hook
6719134a07c2 Import from CVS: tag r21-2-13
cvs
parents: 394
diff changeset
1509 `(lambda ()
6719134a07c2 Import from CVS: tag r21-2-13
cvs
parents: 394
diff changeset
1510 (disable-timeout ,tmout))
6719134a07c2 Import from CVS: tag r21-2-13
cvs
parents: 394
diff changeset
1511 nil t))
282
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1512 (pop-to-buffer buffer)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1513 (delete-other-windows)))
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1514
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1515
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1516 ;;; backwards compatibility
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1517 (provide 'x-menubar)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1518 (provide 'menubar-items)
c42ec1d1cded Import from CVS: tag r21-0b39
cvs
parents:
diff changeset
1519
412
697ef44129c6 Import from CVS: tag r21-2-14
cvs
parents: 408
diff changeset
1520 ;;; x-menubar.el ends here.