annotate lisp/menubar-items.el @ 502:7039e6323819

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