2001-07-15 16:15:35 +00:00
|
|
|
|
;;; menu-bar.el --- define a default menu bar
|
1993-04-08 16:17:43 +00:00
|
|
|
|
|
2009-11-14 20:05:33 +00:00
|
|
|
|
;; Copyright (C) 1993, 1994, 1995, 2000, 2001, 2002, 2003, 2004, 2005,
|
2010-01-13 08:35:10 +00:00
|
|
|
|
;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
|
1996-01-14 07:34:30 +00:00
|
|
|
|
|
1993-04-08 16:17:43 +00:00
|
|
|
|
;; Author: RMS
|
1997-05-27 15:32:03 +00:00
|
|
|
|
;; Maintainer: FSF
|
2000-09-07 13:51:59 +00:00
|
|
|
|
;; Keywords: internal, mouse
|
1993-04-08 16:17:43 +00:00
|
|
|
|
|
1993-04-08 07:10:13 +00:00
|
|
|
|
;; This file is part of GNU Emacs.
|
|
|
|
|
|
2008-05-06 08:06:51 +00:00
|
|
|
|
;; GNU Emacs is free software: you can redistribute it and/or modify
|
1993-04-08 07:10:13 +00:00
|
|
|
|
;; it under the terms of the GNU General Public License as published by
|
2008-05-06 08:06:51 +00:00
|
|
|
|
;; the Free Software Foundation, either version 3 of the License, or
|
|
|
|
|
;; (at your option) any later version.
|
1993-04-08 07:10:13 +00:00
|
|
|
|
|
|
|
|
|
;; GNU Emacs is distributed in the hope that it will be useful,
|
|
|
|
|
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
;; GNU General Public License for more details.
|
|
|
|
|
|
|
|
|
|
;; You should have received a copy of the GNU General Public License
|
2008-05-06 08:06:51 +00:00
|
|
|
|
;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
|
1993-04-08 07:10:13 +00:00
|
|
|
|
|
1995-07-17 22:51:17 +00:00
|
|
|
|
;; Avishai Yacobi suggested some menu rearrangements.
|
|
|
|
|
|
2001-07-15 16:15:35 +00:00
|
|
|
|
;;; Commentary:
|
|
|
|
|
|
1996-01-14 07:34:30 +00:00
|
|
|
|
;;; Code:
|
|
|
|
|
|
1993-09-06 22:48:00 +00:00
|
|
|
|
;; Don't clobber an existing menu-bar keymap, to preserve any menu-bar key
|
|
|
|
|
;; definitions made in loaddefs.el.
|
|
|
|
|
(or (lookup-key global-map [menu-bar])
|
|
|
|
|
(define-key global-map [menu-bar] (make-sparse-keymap "menu-bar")))
|
1993-06-05 19:13:03 +00:00
|
|
|
|
(defvar menu-bar-help-menu (make-sparse-keymap "Help"))
|
1995-03-19 21:11:13 +00:00
|
|
|
|
|
|
|
|
|
;; Force Help item to come last, after the major mode's own items.
|
1995-06-13 03:29:47 +00:00
|
|
|
|
;; The symbol used to be called `help', but that gets confused with the
|
|
|
|
|
;; help key.
|
|
|
|
|
(setq menu-bar-final-items '(help-menu))
|
1995-03-19 21:11:13 +00:00
|
|
|
|
|
2009-10-23 05:15:26 +00:00
|
|
|
|
(define-key global-map [menu-bar help-menu] (cons (purecopy "Help") menu-bar-help-menu))
|
1995-03-19 21:11:13 +00:00
|
|
|
|
(defvar menu-bar-tools-menu (make-sparse-keymap "Tools"))
|
2009-10-23 05:15:26 +00:00
|
|
|
|
(define-key global-map [menu-bar tools] (cons (purecopy "Tools") menu-bar-tools-menu))
|
2000-02-17 11:08:09 +00:00
|
|
|
|
;; This definition is just to show what this looks like.
|
2007-10-22 04:10:04 +00:00
|
|
|
|
;; It gets modified in place when menu-bar-update-buffers is called.
|
|
|
|
|
(defvar global-buffers-menu-map (make-sparse-keymap "Buffers"))
|
2000-02-17 11:08:09 +00:00
|
|
|
|
(define-key global-map [menu-bar buffer]
|
2009-10-23 05:15:26 +00:00
|
|
|
|
(cons (purecopy "Buffers") global-buffers-menu-map))
|
2000-02-17 11:08:09 +00:00
|
|
|
|
(defvar menu-bar-options-menu (make-sparse-keymap "Options"))
|
|
|
|
|
(define-key global-map [menu-bar options]
|
2009-10-23 05:15:26 +00:00
|
|
|
|
(cons (purecopy "Options") menu-bar-options-menu))
|
2000-02-17 11:08:09 +00:00
|
|
|
|
(defvar menu-bar-edit-menu (make-sparse-keymap "Edit"))
|
2009-10-23 05:15:26 +00:00
|
|
|
|
(define-key global-map [menu-bar edit] (cons (purecopy "Edit") menu-bar-edit-menu))
|
2004-11-08 16:44:15 +00:00
|
|
|
|
(defvar menu-bar-file-menu (make-sparse-keymap "File"))
|
2009-10-23 05:15:26 +00:00
|
|
|
|
(define-key global-map [menu-bar file] (cons (purecopy "File") menu-bar-file-menu))
|
1995-04-08 05:01:03 +00:00
|
|
|
|
|
|
|
|
|
;; This alias is for compatibility with 19.28 and before.
|
2004-11-08 16:44:15 +00:00
|
|
|
|
(defvar menu-bar-files-menu menu-bar-file-menu)
|
2002-04-23 14:33:02 +00:00
|
|
|
|
|
|
|
|
|
;; This is referenced by some code below; it is defined in uniquify.el
|
|
|
|
|
(defvar uniquify-buffer-name-style)
|
|
|
|
|
|
2009-10-23 08:20:11 +00:00
|
|
|
|
;; From emulation/cua-base.el; used below
|
|
|
|
|
(defvar cua-enable-cua-keys)
|
|
|
|
|
|
1994-06-22 20:37:41 +00:00
|
|
|
|
|
2000-02-17 11:08:09 +00:00
|
|
|
|
;; The "File" menu items
|
2004-11-08 16:44:15 +00:00
|
|
|
|
(define-key menu-bar-file-menu [exit-emacs]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Quit") save-buffers-kill-terminal
|
|
|
|
|
:help ,(purecopy "Save unsaved buffers, then exit")))
|
1995-03-19 21:11:13 +00:00
|
|
|
|
|
2004-11-08 16:44:15 +00:00
|
|
|
|
(define-key menu-bar-file-menu [separator-exit]
|
2009-11-11 05:57:51 +00:00
|
|
|
|
menu-bar-separator)
|
1995-03-19 21:11:13 +00:00
|
|
|
|
|
2000-02-17 11:08:09 +00:00
|
|
|
|
;; Don't use delete-frame as event name because that is a special
|
|
|
|
|
;; event.
|
2004-11-08 16:44:15 +00:00
|
|
|
|
(define-key menu-bar-file-menu [delete-this-frame]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Delete Frame") delete-frame
|
2000-02-17 11:08:09 +00:00
|
|
|
|
:visible (fboundp 'delete-frame)
|
|
|
|
|
:enable (delete-frame-enabled-p)
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
:help ,(purecopy "Delete currently selected frame")))
|
2004-11-08 16:44:15 +00:00
|
|
|
|
(define-key menu-bar-file-menu [make-frame-on-display]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "New Frame on Display...") make-frame-on-display
|
2000-02-17 11:08:09 +00:00
|
|
|
|
:visible (fboundp 'make-frame-on-display)
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
:help ,(purecopy "Open a new frame on another display")))
|
2004-11-08 16:44:15 +00:00
|
|
|
|
(define-key menu-bar-file-menu [make-frame]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "New Frame") make-frame-command
|
2000-02-17 11:08:09 +00:00
|
|
|
|
:visible (fboundp 'make-frame-command)
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
:help ,(purecopy "Open a new frame")))
|
2000-02-17 11:08:09 +00:00
|
|
|
|
|
2004-11-08 16:44:15 +00:00
|
|
|
|
(define-key menu-bar-file-menu [one-window]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Remove Splits") delete-other-windows
|
2000-02-17 11:08:09 +00:00
|
|
|
|
:enable (not (one-window-p t nil))
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
:help ,(purecopy "Selected window grows to fill the whole frame")))
|
1995-03-19 21:11:13 +00:00
|
|
|
|
|
2004-11-08 16:44:15 +00:00
|
|
|
|
(define-key menu-bar-file-menu [split-window]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Split Window") split-window-vertically
|
2005-09-10 10:55:14 +00:00
|
|
|
|
:enable (and (menu-bar-menu-frame-live-and-visible-p)
|
|
|
|
|
(menu-bar-non-minibuffer-window-p))
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
:help ,(purecopy "Split selected window in two windows")))
|
2000-02-17 11:08:09 +00:00
|
|
|
|
|
2004-11-08 16:44:15 +00:00
|
|
|
|
(define-key menu-bar-file-menu [separator-window]
|
2009-11-11 05:57:51 +00:00
|
|
|
|
menu-bar-separator)
|
2000-02-17 11:08:09 +00:00
|
|
|
|
|
2004-11-08 16:44:15 +00:00
|
|
|
|
(define-key menu-bar-file-menu [ps-print-region]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Postscript Print Region (B+W)") ps-print-region
|
2001-01-29 14:59:34 +00:00
|
|
|
|
:enable mark-active
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
:help ,(purecopy "Pretty-print marked region in black and white to PostScript printer")))
|
2004-11-08 16:44:15 +00:00
|
|
|
|
(define-key menu-bar-file-menu [ps-print-buffer]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Postscript Print Buffer (B+W)") ps-print-buffer
|
2005-09-10 10:55:14 +00:00
|
|
|
|
:enable (menu-bar-menu-frame-live-and-visible-p)
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
:help ,(purecopy "Pretty-print current buffer in black and white to PostScript printer")))
|
2004-11-08 16:44:15 +00:00
|
|
|
|
(define-key menu-bar-file-menu [ps-print-region-faces]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Postscript Print Region") ps-print-region-with-faces
|
2000-02-17 11:08:09 +00:00
|
|
|
|
:enable mark-active
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
:help ,(purecopy "Pretty-print marked region to PostScript printer")))
|
2004-11-08 16:44:15 +00:00
|
|
|
|
(define-key menu-bar-file-menu [ps-print-buffer-faces]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Postscript Print Buffer") ps-print-buffer-with-faces
|
2005-09-10 10:55:14 +00:00
|
|
|
|
:enable (menu-bar-menu-frame-live-and-visible-p)
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
:help ,(purecopy "Pretty-print current buffer to PostScript printer")))
|
2004-11-08 16:44:15 +00:00
|
|
|
|
(define-key menu-bar-file-menu [print-region]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Print Region") print-region
|
2000-02-17 11:08:09 +00:00
|
|
|
|
:enable mark-active
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
:help ,(purecopy "Print region between mark and current position")))
|
2004-11-08 16:44:15 +00:00
|
|
|
|
(define-key menu-bar-file-menu [print-buffer]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Print Buffer") print-buffer
|
2005-09-10 10:55:14 +00:00
|
|
|
|
:enable (menu-bar-menu-frame-live-and-visible-p)
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
:help ,(purecopy "Print current buffer with page headings")))
|
2000-02-17 11:08:09 +00:00
|
|
|
|
|
2004-11-08 16:44:15 +00:00
|
|
|
|
(define-key menu-bar-file-menu [separator-print]
|
2009-11-11 05:57:51 +00:00
|
|
|
|
menu-bar-separator)
|
1994-06-22 20:37:41 +00:00
|
|
|
|
|
2004-11-08 16:44:15 +00:00
|
|
|
|
(define-key menu-bar-file-menu [recover-session]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Recover Crashed Session") recover-session
|
2000-02-17 11:08:09 +00:00
|
|
|
|
:enable (and auto-save-list-file-prefix
|
2000-07-24 00:28:27 +00:00
|
|
|
|
(file-directory-p
|
|
|
|
|
(file-name-directory auto-save-list-file-prefix))
|
|
|
|
|
(directory-files
|
2000-02-17 11:08:09 +00:00
|
|
|
|
(file-name-directory auto-save-list-file-prefix)
|
|
|
|
|
nil
|
|
|
|
|
(concat "\\`"
|
|
|
|
|
(regexp-quote
|
|
|
|
|
(file-name-nondirectory
|
|
|
|
|
auto-save-list-file-prefix)))
|
|
|
|
|
t))
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
:help ,(purecopy "Recover edits from a crashed session")))
|
2004-11-08 16:44:15 +00:00
|
|
|
|
(define-key menu-bar-file-menu [revert-buffer]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Revert Buffer") revert-buffer
|
2000-02-17 11:08:09 +00:00
|
|
|
|
:enable (or revert-buffer-function
|
|
|
|
|
revert-buffer-insert-file-contents-function
|
2003-02-23 15:17:29 +00:00
|
|
|
|
(and buffer-file-number
|
2000-02-17 11:08:09 +00:00
|
|
|
|
(or (buffer-modified-p)
|
|
|
|
|
(not (verify-visited-file-modtime
|
|
|
|
|
(current-buffer))))))
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
:help ,(purecopy "Re-read current buffer from its file")))
|
2004-11-08 16:44:15 +00:00
|
|
|
|
(define-key menu-bar-file-menu [write-file]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Save As...") write-file
|
2005-09-10 10:55:14 +00:00
|
|
|
|
:enable (and (menu-bar-menu-frame-live-and-visible-p)
|
|
|
|
|
(menu-bar-non-minibuffer-window-p))
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
:help ,(purecopy "Write current buffer to another file")))
|
2004-11-08 16:44:15 +00:00
|
|
|
|
(define-key menu-bar-file-menu [save-buffer]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Save") save-buffer
|
2000-02-17 11:08:09 +00:00
|
|
|
|
:enable (and (buffer-modified-p)
|
2000-09-15 20:28:56 +00:00
|
|
|
|
(buffer-file-name)
|
2005-09-10 10:55:14 +00:00
|
|
|
|
(menu-bar-non-minibuffer-window-p))
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
:help ,(purecopy "Save current buffer to its file")))
|
2000-02-17 11:08:09 +00:00
|
|
|
|
|
2004-11-08 16:44:15 +00:00
|
|
|
|
(define-key menu-bar-file-menu [separator-save]
|
2009-11-11 05:57:51 +00:00
|
|
|
|
menu-bar-separator)
|
2000-02-17 11:08:09 +00:00
|
|
|
|
|
2005-12-23 11:36:08 +00:00
|
|
|
|
(defun menu-find-file-existing ()
|
|
|
|
|
"Edit the existing file FILENAME."
|
|
|
|
|
(interactive)
|
|
|
|
|
(let* ((mustmatch (not (and (fboundp 'x-uses-old-gtk-dialog)
|
|
|
|
|
(x-uses-old-gtk-dialog))))
|
|
|
|
|
(filename (car (find-file-read-args "Find file: " mustmatch))))
|
|
|
|
|
(if mustmatch
|
|
|
|
|
(find-file-existing filename)
|
|
|
|
|
(find-file filename))))
|
|
|
|
|
|
|
|
|
|
|
2004-11-08 16:44:15 +00:00
|
|
|
|
(define-key menu-bar-file-menu [kill-buffer]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Close") kill-this-buffer
|
2000-02-17 11:08:09 +00:00
|
|
|
|
:enable (kill-this-buffer-enabled-p)
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
:help ,(purecopy "Discard (kill) current buffer")))
|
2004-11-08 16:44:15 +00:00
|
|
|
|
(define-key menu-bar-file-menu [insert-file]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Insert File...") insert-file
|
2005-09-10 10:55:14 +00:00
|
|
|
|
:enable (menu-bar-non-minibuffer-window-p)
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
:help ,(purecopy "Insert another file into current buffer")))
|
2004-11-08 16:44:15 +00:00
|
|
|
|
(define-key menu-bar-file-menu [dired]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Open Directory...") dired
|
2005-09-10 10:55:14 +00:00
|
|
|
|
:enable (menu-bar-non-minibuffer-window-p)
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
:help ,(purecopy "Read a directory, to operate on its files")))
|
2004-11-08 16:44:15 +00:00
|
|
|
|
(define-key menu-bar-file-menu [open-file]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Open File...") menu-find-file-existing
|
2005-09-10 10:55:14 +00:00
|
|
|
|
:enable (menu-bar-non-minibuffer-window-p)
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
:help ,(purecopy "Read an existing file into an Emacs buffer")))
|
2004-11-08 16:44:15 +00:00
|
|
|
|
(define-key menu-bar-file-menu [new-file]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Visit New File...") find-file
|
2005-09-10 10:55:14 +00:00
|
|
|
|
:enable (menu-bar-non-minibuffer-window-p)
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
:help ,(purecopy "Specify a new file's name, to edit the file")))
|
2000-02-17 11:08:09 +00:00
|
|
|
|
|
1994-06-22 20:37:41 +00:00
|
|
|
|
|
2000-02-17 11:08:09 +00:00
|
|
|
|
;; The "Edit" menu items
|
2002-09-15 21:35:23 +00:00
|
|
|
|
|
|
|
|
|
;; The "Edit->Search" submenu
|
|
|
|
|
(defvar menu-bar-last-search-type nil
|
|
|
|
|
"Type of last non-incremental search command called from the menu.")
|
|
|
|
|
|
|
|
|
|
(defun nonincremental-repeat-search-forward ()
|
|
|
|
|
"Search forward for the previous search string or regexp."
|
|
|
|
|
(interactive)
|
|
|
|
|
(cond
|
|
|
|
|
((and (eq menu-bar-last-search-type 'string)
|
|
|
|
|
search-ring)
|
|
|
|
|
(search-forward (car search-ring)))
|
|
|
|
|
((and (eq menu-bar-last-search-type 'regexp)
|
|
|
|
|
regexp-search-ring)
|
|
|
|
|
(re-search-forward (car regexp-search-ring)))
|
|
|
|
|
(t
|
|
|
|
|
(error "No previous search"))))
|
|
|
|
|
|
|
|
|
|
(defun nonincremental-repeat-search-backward ()
|
|
|
|
|
"Search backward for the previous search string or regexp."
|
|
|
|
|
(interactive)
|
|
|
|
|
(cond
|
|
|
|
|
((and (eq menu-bar-last-search-type 'string)
|
|
|
|
|
search-ring)
|
|
|
|
|
(search-backward (car search-ring)))
|
|
|
|
|
((and (eq menu-bar-last-search-type 'regexp)
|
|
|
|
|
regexp-search-ring)
|
|
|
|
|
(re-search-backward (car regexp-search-ring)))
|
|
|
|
|
(t
|
|
|
|
|
(error "No previous search"))))
|
|
|
|
|
|
1995-03-19 21:11:13 +00:00
|
|
|
|
(defun nonincremental-search-forward (string)
|
|
|
|
|
"Read a string and search for it nonincrementally."
|
|
|
|
|
(interactive "sSearch for string: ")
|
2002-09-15 21:35:23 +00:00
|
|
|
|
(setq menu-bar-last-search-type 'string)
|
1995-03-19 21:11:13 +00:00
|
|
|
|
(if (equal string "")
|
|
|
|
|
(search-forward (car search-ring))
|
|
|
|
|
(isearch-update-ring string nil)
|
|
|
|
|
(search-forward string)))
|
|
|
|
|
|
|
|
|
|
(defun nonincremental-search-backward (string)
|
|
|
|
|
"Read a string and search backward for it nonincrementally."
|
|
|
|
|
(interactive "sSearch for string: ")
|
2002-09-15 21:35:23 +00:00
|
|
|
|
(setq menu-bar-last-search-type 'string)
|
1995-03-19 21:11:13 +00:00
|
|
|
|
(if (equal string "")
|
|
|
|
|
(search-backward (car search-ring))
|
|
|
|
|
(isearch-update-ring string nil)
|
|
|
|
|
(search-backward string)))
|
|
|
|
|
|
|
|
|
|
(defun nonincremental-re-search-forward (string)
|
|
|
|
|
"Read a regular expression and search for it nonincrementally."
|
|
|
|
|
(interactive "sSearch for regexp: ")
|
2002-09-15 21:35:23 +00:00
|
|
|
|
(setq menu-bar-last-search-type 'regexp)
|
1995-03-19 21:11:13 +00:00
|
|
|
|
(if (equal string "")
|
|
|
|
|
(re-search-forward (car regexp-search-ring))
|
|
|
|
|
(isearch-update-ring string t)
|
|
|
|
|
(re-search-forward string)))
|
|
|
|
|
|
|
|
|
|
(defun nonincremental-re-search-backward (string)
|
|
|
|
|
"Read a regular expression and search backward for it nonincrementally."
|
|
|
|
|
(interactive "sSearch for regexp: ")
|
2002-09-15 21:35:23 +00:00
|
|
|
|
(setq menu-bar-last-search-type 'regexp)
|
1995-03-19 21:11:13 +00:00
|
|
|
|
(if (equal string "")
|
|
|
|
|
(re-search-backward (car regexp-search-ring))
|
|
|
|
|
(isearch-update-ring string t)
|
|
|
|
|
(re-search-backward string)))
|
|
|
|
|
|
2002-09-15 21:35:23 +00:00
|
|
|
|
(defvar menu-bar-search-menu (make-sparse-keymap "Search"))
|
1995-03-19 21:11:13 +00:00
|
|
|
|
|
2002-09-15 21:35:23 +00:00
|
|
|
|
;; The Edit->Search->Incremental Search menu
|
|
|
|
|
(defvar menu-bar-i-search-menu
|
|
|
|
|
(make-sparse-keymap "Incremental Search"))
|
|
|
|
|
|
|
|
|
|
(define-key menu-bar-i-search-menu [isearch-backward-regexp]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Backward Regexp...") isearch-backward-regexp
|
|
|
|
|
:help ,(purecopy "Search backwards for a regular expression as you type it")))
|
2002-09-15 21:35:23 +00:00
|
|
|
|
(define-key menu-bar-i-search-menu [isearch-forward-regexp]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Forward Regexp...") isearch-forward-regexp
|
|
|
|
|
:help ,(purecopy "Search forward for a regular expression as you type it")))
|
2002-09-15 21:35:23 +00:00
|
|
|
|
(define-key menu-bar-i-search-menu [isearch-backward]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Backward String...") isearch-backward
|
|
|
|
|
:help ,(purecopy "Search backwards for a string as you type it")))
|
2002-09-15 21:35:23 +00:00
|
|
|
|
(define-key menu-bar-i-search-menu [isearch-forward]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Forward String...") isearch-forward
|
|
|
|
|
:help ,(purecopy "Search forward for a string as you type it")))
|
2000-02-17 11:08:09 +00:00
|
|
|
|
|
2002-09-15 21:35:23 +00:00
|
|
|
|
(define-key menu-bar-search-menu [i-search]
|
2009-09-17 10:31:15 +00:00
|
|
|
|
`(menu-item ,(purecopy "Incremental Search") ,menu-bar-i-search-menu))
|
2002-09-15 21:35:23 +00:00
|
|
|
|
(define-key menu-bar-search-menu [separator-tag-isearch]
|
2009-11-11 05:57:51 +00:00
|
|
|
|
menu-bar-separator)
|
2000-02-17 11:08:09 +00:00
|
|
|
|
|
2002-09-15 21:35:23 +00:00
|
|
|
|
(define-key menu-bar-search-menu [tags-continue]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Continue Tags Search") tags-loop-continue
|
|
|
|
|
:help ,(purecopy "Continue last tags search operation")))
|
2002-09-15 21:35:23 +00:00
|
|
|
|
(define-key menu-bar-search-menu [tags-srch]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Search Tagged Files...") tags-search
|
|
|
|
|
:help ,(purecopy "Search for a regexp in all tagged files")))
|
2002-09-15 21:35:23 +00:00
|
|
|
|
(define-key menu-bar-search-menu [separator-tag-search]
|
2009-11-11 05:57:51 +00:00
|
|
|
|
menu-bar-separator)
|
1995-03-19 21:11:13 +00:00
|
|
|
|
|
1996-01-24 23:29:01 +00:00
|
|
|
|
(define-key menu-bar-search-menu [repeat-search-back]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Repeat Backwards") nonincremental-repeat-search-backward
|
2002-09-15 21:35:23 +00:00
|
|
|
|
:enable (or (and (eq menu-bar-last-search-type 'string)
|
|
|
|
|
search-ring)
|
|
|
|
|
(and (eq menu-bar-last-search-type 'regexp)
|
|
|
|
|
regexp-search-ring))
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
:help ,(purecopy "Repeat last search backwards")))
|
1996-01-24 23:29:01 +00:00
|
|
|
|
(define-key menu-bar-search-menu [repeat-search-fwd]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Repeat Forward") nonincremental-repeat-search-forward
|
2002-09-15 21:35:23 +00:00
|
|
|
|
:enable (or (and (eq menu-bar-last-search-type 'string)
|
|
|
|
|
search-ring)
|
|
|
|
|
(and (eq menu-bar-last-search-type 'regexp)
|
|
|
|
|
regexp-search-ring))
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
:help ,(purecopy "Repeat last search forward")))
|
2002-09-15 21:35:23 +00:00
|
|
|
|
(define-key menu-bar-search-menu [separator-repeat-search]
|
2009-11-11 05:57:51 +00:00
|
|
|
|
menu-bar-separator)
|
2002-09-15 21:35:23 +00:00
|
|
|
|
|
|
|
|
|
(define-key menu-bar-search-menu [re-search-backward]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Regexp Backwards...") nonincremental-re-search-backward
|
|
|
|
|
:help ,(purecopy "Search backwards for a regular expression")))
|
2002-09-15 21:35:23 +00:00
|
|
|
|
(define-key menu-bar-search-menu [re-search-forward]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Regexp Forward...") nonincremental-re-search-forward
|
|
|
|
|
:help ,(purecopy "Search forward for a regular expression")))
|
2002-09-15 21:35:23 +00:00
|
|
|
|
|
1996-01-24 23:29:01 +00:00
|
|
|
|
(define-key menu-bar-search-menu [search-backward]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "String Backwards...") nonincremental-search-backward
|
|
|
|
|
:help ,(purecopy "Search backwards for a string")))
|
1996-01-24 23:29:01 +00:00
|
|
|
|
(define-key menu-bar-search-menu [search-forward]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "String Forward...") nonincremental-search-forward
|
|
|
|
|
:help ,(purecopy "Search forward for a string")))
|
1994-06-22 20:37:41 +00:00
|
|
|
|
|
2002-09-15 21:35:23 +00:00
|
|
|
|
;; The Edit->Replace submenu
|
|
|
|
|
|
|
|
|
|
(defvar menu-bar-replace-menu (make-sparse-keymap "Replace"))
|
|
|
|
|
|
|
|
|
|
(define-key menu-bar-replace-menu [tags-repl-continue]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Continue Replace") tags-loop-continue
|
|
|
|
|
:help ,(purecopy "Continue last tags replace operation")))
|
2002-09-15 21:35:23 +00:00
|
|
|
|
(define-key menu-bar-replace-menu [tags-repl]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Replace in Tagged Files...") tags-query-replace
|
|
|
|
|
:help ,(purecopy "Interactively replace a regexp in all tagged files")))
|
2002-09-15 21:35:23 +00:00
|
|
|
|
(define-key menu-bar-replace-menu [separator-replace-tags]
|
2009-11-11 05:57:51 +00:00
|
|
|
|
menu-bar-separator)
|
2002-09-15 21:35:23 +00:00
|
|
|
|
|
|
|
|
|
(define-key menu-bar-replace-menu [query-replace-regexp]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Replace Regexp...") query-replace-regexp
|
2002-09-15 21:35:23 +00:00
|
|
|
|
:enable (not buffer-read-only)
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
:help ,(purecopy "Replace regular expression interactively, ask about each occurrence")))
|
2002-09-15 21:35:23 +00:00
|
|
|
|
(define-key menu-bar-replace-menu [query-replace]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Replace String...") query-replace
|
2002-09-15 21:35:23 +00:00
|
|
|
|
:enable (not buffer-read-only)
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
:help ,(purecopy "Replace string interactively, ask about each occurrence")))
|
2002-09-15 21:35:23 +00:00
|
|
|
|
|
2000-02-17 11:08:09 +00:00
|
|
|
|
;;; Assemble the top-level Edit menu items.
|
|
|
|
|
(define-key menu-bar-edit-menu [props]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Text Properties") facemenu-menu))
|
1994-09-15 22:16:49 +00:00
|
|
|
|
|
2001-09-04 08:10:29 +00:00
|
|
|
|
(define-key menu-bar-edit-menu [fill]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Fill") fill-region
|
2001-09-04 08:10:29 +00:00
|
|
|
|
:enable (and mark-active (not buffer-read-only))
|
|
|
|
|
:help
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
,(purecopy "Fill text in region to fit between left and right margin")))
|
2001-09-04 08:10:29 +00:00
|
|
|
|
|
|
|
|
|
(define-key menu-bar-edit-menu [separator-bookmark]
|
2009-11-11 05:57:51 +00:00
|
|
|
|
menu-bar-separator)
|
2000-02-17 11:08:09 +00:00
|
|
|
|
|
|
|
|
|
(define-key menu-bar-edit-menu [bookmark]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Bookmarks") menu-bar-bookmark-map))
|
2000-02-17 11:08:09 +00:00
|
|
|
|
|
|
|
|
|
(defvar menu-bar-goto-menu (make-sparse-keymap "Go To"))
|
|
|
|
|
|
|
|
|
|
(define-key menu-bar-goto-menu [set-tags-name]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Set Tags File Name...") visit-tags-table
|
|
|
|
|
:help ,(purecopy "Tell Tags commands which tag table file to use")))
|
2000-02-17 11:08:09 +00:00
|
|
|
|
|
|
|
|
|
(define-key menu-bar-goto-menu [separator-tag-file]
|
2009-11-11 05:57:51 +00:00
|
|
|
|
menu-bar-separator)
|
2000-02-17 11:08:09 +00:00
|
|
|
|
|
|
|
|
|
(define-key menu-bar-goto-menu [apropos-tags]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Tags Apropos...") tags-apropos
|
|
|
|
|
:help ,(purecopy "Find function/variables whose names match regexp")))
|
2000-02-17 11:08:09 +00:00
|
|
|
|
(define-key menu-bar-goto-menu [next-tag-otherw]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Next Tag in Other Window")
|
2002-08-15 20:15:20 +00:00
|
|
|
|
menu-bar-next-tag-other-window
|
2000-02-20 12:22:14 +00:00
|
|
|
|
:enable (and (boundp 'tags-location-ring)
|
|
|
|
|
(not (ring-empty-p tags-location-ring)))
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
:help ,(purecopy "Find next function/variable matching last tag name in another window")))
|
2002-08-15 20:15:20 +00:00
|
|
|
|
|
|
|
|
|
(defun menu-bar-next-tag-other-window ()
|
|
|
|
|
"Find the next definition of the tag already specified."
|
|
|
|
|
(interactive)
|
|
|
|
|
(find-tag-other-window nil t))
|
|
|
|
|
|
|
|
|
|
(defun menu-bar-next-tag ()
|
|
|
|
|
"Find the next definition of the tag already specified."
|
|
|
|
|
(interactive)
|
|
|
|
|
(find-tag nil t))
|
|
|
|
|
|
2000-02-17 11:08:09 +00:00
|
|
|
|
(define-key menu-bar-goto-menu [next-tag]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Find Next Tag")
|
2002-08-15 20:15:20 +00:00
|
|
|
|
menu-bar-next-tag
|
2000-02-20 12:22:14 +00:00
|
|
|
|
:enable (and (boundp 'tags-location-ring)
|
|
|
|
|
(not (ring-empty-p tags-location-ring)))
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
:help ,(purecopy "Find next function/variable matching last tag name")))
|
2000-02-17 11:08:09 +00:00
|
|
|
|
(define-key menu-bar-goto-menu [find-tag-otherw]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Find Tag in Other Window...") find-tag-other-window
|
|
|
|
|
:help ,(purecopy "Find function/variable definition in another window")))
|
2000-02-17 11:08:09 +00:00
|
|
|
|
(define-key menu-bar-goto-menu [find-tag]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Find Tag...") find-tag
|
|
|
|
|
:help ,(purecopy "Find definition of function or variable")))
|
2000-02-17 11:08:09 +00:00
|
|
|
|
|
|
|
|
|
(define-key menu-bar-goto-menu [separator-tags]
|
2009-11-11 05:57:51 +00:00
|
|
|
|
menu-bar-separator)
|
2000-02-17 11:08:09 +00:00
|
|
|
|
|
|
|
|
|
(define-key menu-bar-goto-menu [end-of-buf]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Goto End of Buffer") end-of-buffer))
|
2000-02-17 11:08:09 +00:00
|
|
|
|
(define-key menu-bar-goto-menu [beg-of-buf]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Goto Beginning of Buffer") beginning-of-buffer))
|
2000-02-17 11:08:09 +00:00
|
|
|
|
(define-key menu-bar-goto-menu [go-to-pos]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Goto Buffer Position...") goto-char
|
|
|
|
|
:help ,(purecopy "Read a number N and go to buffer position N")))
|
2000-02-17 11:08:09 +00:00
|
|
|
|
(define-key menu-bar-goto-menu [go-to-line]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Goto Line...") goto-line
|
|
|
|
|
:help ,(purecopy "Read a line number and go to that line")))
|
2000-02-17 11:08:09 +00:00
|
|
|
|
|
|
|
|
|
(define-key menu-bar-edit-menu [goto]
|
2009-09-17 10:31:15 +00:00
|
|
|
|
`(menu-item ,(purecopy "Go To") ,menu-bar-goto-menu))
|
2000-02-17 11:08:09 +00:00
|
|
|
|
|
2002-09-15 21:35:23 +00:00
|
|
|
|
(define-key menu-bar-edit-menu [replace]
|
2009-09-17 10:31:15 +00:00
|
|
|
|
`(menu-item ,(purecopy "Replace") ,menu-bar-replace-menu))
|
2002-09-15 21:35:23 +00:00
|
|
|
|
|
2000-02-17 11:08:09 +00:00
|
|
|
|
(define-key menu-bar-edit-menu [search]
|
2009-09-17 10:31:15 +00:00
|
|
|
|
`(menu-item ,(purecopy "Search") ,menu-bar-search-menu))
|
2000-02-17 11:08:09 +00:00
|
|
|
|
|
2001-09-04 08:10:29 +00:00
|
|
|
|
(define-key menu-bar-edit-menu [separator-search]
|
2009-11-11 05:57:51 +00:00
|
|
|
|
menu-bar-separator)
|
2001-09-04 08:10:29 +00:00
|
|
|
|
|
2000-06-28 04:48:17 +00:00
|
|
|
|
(define-key menu-bar-edit-menu [mark-whole-buffer]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Select All") mark-whole-buffer
|
|
|
|
|
:help ,(purecopy "Mark the whole buffer for a subsequent cut/copy")))
|
2000-02-17 11:08:09 +00:00
|
|
|
|
(define-key menu-bar-edit-menu [clear]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Clear") delete-region
|
2000-02-17 11:08:09 +00:00
|
|
|
|
:enable (and mark-active
|
|
|
|
|
(not buffer-read-only)
|
|
|
|
|
(not (mouse-region-match)))
|
|
|
|
|
:help
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
,(purecopy "Delete the text in region between mark and current position")))
|
2009-10-23 05:15:26 +00:00
|
|
|
|
(defvar yank-menu (cons (purecopy "Select Yank") nil))
|
1994-09-15 22:16:49 +00:00
|
|
|
|
(fset 'yank-menu (cons 'keymap yank-menu))
|
2006-12-04 00:30:11 +00:00
|
|
|
|
(define-key menu-bar-edit-menu [paste-from-menu]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Paste from Kill Menu") yank-menu
|
2006-12-04 00:30:11 +00:00
|
|
|
|
:enable (and (cdr yank-menu) (not buffer-read-only))
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
:help ,(purecopy "Choose a string from the kill ring and paste it")))
|
2000-02-17 11:08:09 +00:00
|
|
|
|
(define-key menu-bar-edit-menu [paste]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Paste") yank
|
2009-03-04 18:57:53 +00:00
|
|
|
|
:enable (and (or
|
|
|
|
|
;; Emacs compiled --without-x doesn't have
|
|
|
|
|
;; x-selection-exists-p.
|
|
|
|
|
(and (fboundp 'x-selection-exists-p)
|
|
|
|
|
(x-selection-exists-p))
|
|
|
|
|
kill-ring)
|
|
|
|
|
(not buffer-read-only))
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
:help ,(purecopy "Paste (yank) text most recently cut/copied")))
|
2000-02-17 11:08:09 +00:00
|
|
|
|
(define-key menu-bar-edit-menu [copy]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Copy") menu-bar-kill-ring-save
|
2000-02-17 11:08:09 +00:00
|
|
|
|
:enable mark-active
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
:help ,(purecopy "Copy text in region between mark and current position")
|
2009-11-11 05:57:51 +00:00
|
|
|
|
:keys ,(purecopy "\\[kill-ring-save]")))
|
2000-02-17 11:08:09 +00:00
|
|
|
|
(define-key menu-bar-edit-menu [cut]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Cut") kill-region
|
2000-02-17 11:08:09 +00:00
|
|
|
|
:enable (and mark-active (not buffer-read-only))
|
2000-10-26 21:51:22 +00:00
|
|
|
|
:help
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
,(purecopy "Cut (kill) text in region between mark and current position")))
|
2000-02-17 11:08:09 +00:00
|
|
|
|
(define-key menu-bar-edit-menu [undo]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Undo") undo
|
2000-02-17 11:08:09 +00:00
|
|
|
|
:enable (and (not buffer-read-only)
|
|
|
|
|
(not (eq t buffer-undo-list))
|
|
|
|
|
(if (eq last-command 'undo)
|
2005-12-09 10:02:19 +00:00
|
|
|
|
(listp pending-undo-list)
|
2000-02-17 11:08:09 +00:00
|
|
|
|
(consp buffer-undo-list)))
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
:help ,(purecopy "Undo last operation")))
|
2000-02-17 11:08:09 +00:00
|
|
|
|
|
1993-05-17 04:45:03 +00:00
|
|
|
|
|
1995-02-12 04:54:34 +00:00
|
|
|
|
(defun menu-bar-kill-ring-save (beg end)
|
|
|
|
|
(interactive "r")
|
|
|
|
|
(if (mouse-region-match)
|
1998-07-02 06:52:52 +00:00
|
|
|
|
(message "Selecting a region with the mouse does `copy' automatically")
|
1995-02-12 04:54:34 +00:00
|
|
|
|
(kill-ring-save beg end)))
|
|
|
|
|
|
1994-04-06 04:54:35 +00:00
|
|
|
|
;; These are alternative definitions for the cut, paste and copy
|
1995-02-12 04:54:34 +00:00
|
|
|
|
;; menu items. Use them if your system expects these to use the clipboard.
|
1994-04-06 04:54:35 +00:00
|
|
|
|
|
2007-11-19 07:48:56 +00:00
|
|
|
|
(put 'clipboard-kill-region 'menu-enable
|
|
|
|
|
'(and mark-active (not buffer-read-only)))
|
1994-04-06 04:54:35 +00:00
|
|
|
|
(put 'clipboard-kill-ring-save 'menu-enable 'mark-active)
|
|
|
|
|
(put 'clipboard-yank 'menu-enable
|
2009-03-04 18:57:53 +00:00
|
|
|
|
'(and (or (not (fboundp 'x-selection-exists-p))
|
|
|
|
|
(x-selection-exists-p)
|
2007-11-19 07:48:56 +00:00
|
|
|
|
(x-selection-exists-p 'CLIPBOARD))
|
2009-03-04 18:57:53 +00:00
|
|
|
|
(not buffer-read-only)))
|
1994-04-06 04:54:35 +00:00
|
|
|
|
|
|
|
|
|
(defun clipboard-yank ()
|
1999-01-03 02:05:10 +00:00
|
|
|
|
"Insert the clipboard contents, or the last stretch of killed text."
|
2006-09-20 04:13:32 +00:00
|
|
|
|
(interactive "*")
|
1994-04-06 04:54:35 +00:00
|
|
|
|
(let ((x-select-enable-clipboard t))
|
|
|
|
|
(yank)))
|
|
|
|
|
|
|
|
|
|
(defun clipboard-kill-ring-save (beg end)
|
|
|
|
|
"Copy region to kill ring, and save in the X clipboard."
|
|
|
|
|
(interactive "r")
|
|
|
|
|
(let ((x-select-enable-clipboard t))
|
|
|
|
|
(kill-ring-save beg end)))
|
|
|
|
|
|
|
|
|
|
(defun clipboard-kill-region (beg end)
|
|
|
|
|
"Kill the region, and save it in the X clipboard."
|
|
|
|
|
(interactive "r")
|
|
|
|
|
(let ((x-select-enable-clipboard t))
|
|
|
|
|
(kill-region beg end)))
|
|
|
|
|
|
|
|
|
|
(defun menu-bar-enable-clipboard ()
|
1994-07-31 03:01:00 +00:00
|
|
|
|
"Make CUT, PASTE and COPY (keys and menu bar items) use the clipboard.
|
|
|
|
|
Do the same for the keys of the same name."
|
1994-04-06 04:54:35 +00:00
|
|
|
|
(interactive)
|
1994-04-18 21:33:57 +00:00
|
|
|
|
;; We can't use constant list structure here because it becomes pure,
|
|
|
|
|
;; and because it gets modified with cache data.
|
|
|
|
|
(define-key menu-bar-edit-menu [paste]
|
2000-02-17 11:08:09 +00:00
|
|
|
|
(cons "Paste" (cons "Paste text from clipboard" 'clipboard-yank)))
|
1994-04-18 21:33:57 +00:00
|
|
|
|
(define-key menu-bar-edit-menu [copy]
|
2000-02-17 11:08:09 +00:00
|
|
|
|
(cons "Copy" (cons "Copy text in region to the clipboard"
|
|
|
|
|
'clipboard-kill-ring-save)))
|
1994-04-18 21:33:57 +00:00
|
|
|
|
(define-key menu-bar-edit-menu [cut]
|
2000-02-17 11:08:09 +00:00
|
|
|
|
(cons "Cut" (cons "Delete text in region and copy it to the clipboard"
|
|
|
|
|
'clipboard-kill-region)))
|
1994-07-31 03:01:00 +00:00
|
|
|
|
|
2003-09-01 18:48:10 +00:00
|
|
|
|
;; These are Sun server keysyms for the Cut, Copy and Paste keys
|
|
|
|
|
;; (also for XFree86 on Sun keyboard):
|
1994-07-31 03:01:00 +00:00
|
|
|
|
(define-key global-map [f20] 'clipboard-kill-region)
|
|
|
|
|
(define-key global-map [f16] 'clipboard-kill-ring-save)
|
|
|
|
|
(define-key global-map [f18] 'clipboard-yank)
|
2003-09-01 18:48:10 +00:00
|
|
|
|
;; X11R6 versions:
|
1994-07-31 03:01:00 +00:00
|
|
|
|
(define-key global-map [cut] 'clipboard-kill-region)
|
|
|
|
|
(define-key global-map [copy] 'clipboard-kill-ring-save)
|
|
|
|
|
(define-key global-map [paste] 'clipboard-yank))
|
1994-04-06 04:54:35 +00:00
|
|
|
|
|
2000-02-17 11:08:09 +00:00
|
|
|
|
;; The "Options" menu items
|
1997-04-08 22:20:30 +00:00
|
|
|
|
|
|
|
|
|
(defvar menu-bar-custom-menu (make-sparse-keymap "Customize"))
|
|
|
|
|
|
1997-07-09 19:03:09 +00:00
|
|
|
|
(define-key menu-bar-custom-menu [customize-apropos-groups]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Groups Matching Regexp...") customize-apropos-groups
|
|
|
|
|
:help ,(purecopy "Browse groups whose names match regexp")))
|
1997-07-09 19:03:09 +00:00
|
|
|
|
(define-key menu-bar-custom-menu [customize-apropos-faces]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Faces Matching Regexp...") customize-apropos-faces
|
|
|
|
|
:help ,(purecopy "Browse faces whose names match regexp")))
|
1997-07-09 19:03:09 +00:00
|
|
|
|
(define-key menu-bar-custom-menu [customize-apropos-options]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Options Matching Regexp...") customize-apropos-options
|
|
|
|
|
:help ,(purecopy "Browse options whose names match regexp")))
|
1997-04-08 22:20:30 +00:00
|
|
|
|
(define-key menu-bar-custom-menu [customize-apropos]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Settings Matching Regexp...") customize-apropos
|
|
|
|
|
:help ,(purecopy "Browse customizable settings whose names match regexp")))
|
2002-04-30 20:39:00 +00:00
|
|
|
|
(define-key menu-bar-custom-menu [separator-1]
|
2009-11-11 05:57:51 +00:00
|
|
|
|
menu-bar-separator)
|
1997-05-01 22:21:19 +00:00
|
|
|
|
(define-key menu-bar-custom-menu [customize-group]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Specific Group...") customize-group
|
|
|
|
|
:help ,(purecopy "Customize settings of specific group")))
|
1997-04-08 22:20:30 +00:00
|
|
|
|
(define-key menu-bar-custom-menu [customize-face]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Specific Face...") customize-face
|
|
|
|
|
:help ,(purecopy "Customize attributes of specific face")))
|
1997-07-09 19:03:09 +00:00
|
|
|
|
(define-key menu-bar-custom-menu [customize-option]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Specific Option...") customize-option
|
|
|
|
|
:help ,(purecopy "Customize value of specific option")))
|
2002-04-30 20:39:00 +00:00
|
|
|
|
(define-key menu-bar-custom-menu [separator-2]
|
2009-11-11 05:57:51 +00:00
|
|
|
|
menu-bar-separator)
|
1998-05-03 00:53:50 +00:00
|
|
|
|
(define-key menu-bar-custom-menu [customize-changed-options]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "New Options...") customize-changed-options
|
|
|
|
|
:help ,(purecopy "Options added or changed in recent Emacs versions")))
|
2002-04-30 20:39:00 +00:00
|
|
|
|
(define-key menu-bar-custom-menu [customize-saved]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Saved Options") customize-saved
|
|
|
|
|
:help ,(purecopy "Customize previously saved options")))
|
1997-07-09 19:03:09 +00:00
|
|
|
|
(define-key menu-bar-custom-menu [separator-3]
|
2009-11-11 05:57:51 +00:00
|
|
|
|
menu-bar-separator)
|
1997-07-04 13:25:17 +00:00
|
|
|
|
(define-key menu-bar-custom-menu [customize-browse]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Browse Customization Groups") customize-browse
|
|
|
|
|
:help ,(purecopy "Browse all customization groups")))
|
1997-07-09 19:03:09 +00:00
|
|
|
|
(define-key menu-bar-custom-menu [customize]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Top-level Customization Group") customize
|
|
|
|
|
:help ,(purecopy "The master group called `Emacs'")))
|
1997-04-08 22:20:30 +00:00
|
|
|
|
|
2000-02-17 11:08:09 +00:00
|
|
|
|
;(defvar menu-bar-preferences-menu (make-sparse-keymap "Preferences"))
|
1997-08-29 02:12:38 +00:00
|
|
|
|
|
2002-09-06 20:27:59 +00:00
|
|
|
|
(defmacro menu-bar-make-mm-toggle (fname doc help &optional props)
|
|
|
|
|
"Make a menu-item for a global minor mode toggle.
|
|
|
|
|
FNAME is the minor mode's name (variable and function).
|
2005-03-05 01:18:06 +00:00
|
|
|
|
DOC is the text to use for the menu entry.
|
2002-09-06 20:27:59 +00:00
|
|
|
|
HELP is the text to use for the tooltip.
|
|
|
|
|
PROPS are additional properties."
|
2009-10-23 05:15:26 +00:00
|
|
|
|
`(list 'menu-item (purecopy ,doc) ',fname
|
2009-11-04 02:53:03 +00:00
|
|
|
|
,@(mapcar (lambda (p) (list 'quote p)) props)
|
2009-11-03 07:28:19 +00:00
|
|
|
|
:help (purecopy ,help)
|
|
|
|
|
:button '(:toggle . (and (default-boundp ',fname)
|
|
|
|
|
(default-value ',fname)))))
|
2002-09-06 20:27:59 +00:00
|
|
|
|
|
2002-09-11 21:56:50 +00:00
|
|
|
|
(defmacro menu-bar-make-toggle (name variable doc message help &rest body)
|
1997-08-29 02:12:38 +00:00
|
|
|
|
`(progn
|
2004-10-26 08:31:40 +00:00
|
|
|
|
(defun ,name (&optional interactively)
|
2001-06-22 20:06:07 +00:00
|
|
|
|
,(concat "Toggle whether to " (downcase (substring help 0 1))
|
2005-06-12 00:04:44 +00:00
|
|
|
|
(substring help 1) ".
|
2004-10-26 08:31:40 +00:00
|
|
|
|
In an interactive call, record this option as a candidate for saving
|
|
|
|
|
by \"Save Options\" in Custom buffers.")
|
|
|
|
|
(interactive "p")
|
1997-08-29 02:12:38 +00:00
|
|
|
|
(if ,(if body `(progn . ,body)
|
2002-04-11 13:41:49 +00:00
|
|
|
|
`(progn
|
2002-02-11 16:47:55 +00:00
|
|
|
|
(custom-load-symbol ',variable)
|
|
|
|
|
(let ((set (or (get ',variable 'custom-set) 'set-default))
|
|
|
|
|
(get (or (get ',variable 'custom-get) 'default-value)))
|
|
|
|
|
(funcall set ',variable (not (funcall get ',variable))))))
|
2006-12-04 00:30:11 +00:00
|
|
|
|
(message ,message "enabled globally")
|
|
|
|
|
(message ,message "disabled globally"))
|
2002-09-11 21:56:50 +00:00
|
|
|
|
;; The function `customize-mark-as-set' must only be called when
|
|
|
|
|
;; a variable is set interactively, as the purpose is to mark it as
|
|
|
|
|
;; a candidate for "Save Options", and we do not want to save options
|
|
|
|
|
;; the user have already set explicitly in his init file.
|
2004-10-26 08:31:40 +00:00
|
|
|
|
(if interactively (customize-mark-as-set ',variable)))
|
2009-10-23 05:15:26 +00:00
|
|
|
|
(list 'menu-item (purecopy ,doc) ',name
|
2009-11-03 07:28:19 +00:00
|
|
|
|
:help (purecopy ,help)
|
|
|
|
|
:button '(:toggle . (and (default-boundp ',variable)
|
|
|
|
|
(default-value ',variable))))))
|
2000-02-17 11:08:09 +00:00
|
|
|
|
|
2008-06-10 19:55:38 +00:00
|
|
|
|
;; Function for setting/saving default font.
|
|
|
|
|
|
|
|
|
|
(defun menu-set-font ()
|
|
|
|
|
"Interactively select a font and make it the default."
|
|
|
|
|
(interactive)
|
2008-06-13 04:17:08 +00:00
|
|
|
|
(let ((font (if (fboundp 'x-select-font)
|
2008-06-12 15:30:04 +00:00
|
|
|
|
(x-select-font)
|
2008-06-10 19:55:38 +00:00
|
|
|
|
(mouse-select-font)))
|
|
|
|
|
spec)
|
|
|
|
|
(when font
|
2009-02-27 15:13:07 +00:00
|
|
|
|
;; Be careful here: when set-face-attribute is called for the
|
|
|
|
|
;; :font attribute, Emacs tries to guess the best matching font
|
|
|
|
|
;; by examining the other face attributes (Bug#2476).
|
|
|
|
|
(set-face-attribute 'default (selected-frame)
|
|
|
|
|
:width 'normal
|
|
|
|
|
:weight 'normal
|
|
|
|
|
:slant 'normal
|
|
|
|
|
:font font)
|
2009-02-27 00:04:59 +00:00
|
|
|
|
(let ((font-object (face-attribute 'default :font)))
|
|
|
|
|
(dolist (f (frame-list))
|
|
|
|
|
(and (not (eq f (selected-frame)))
|
|
|
|
|
(display-graphic-p f)
|
|
|
|
|
(set-face-attribute 'default f :font font-object)))
|
|
|
|
|
(set-face-attribute 'default t :font font-object))
|
2008-06-10 19:55:38 +00:00
|
|
|
|
(setq spec (list (list t (face-attr-construct 'default))))
|
|
|
|
|
(put 'default 'customized-face spec)
|
|
|
|
|
(custom-push-theme 'theme-face 'default 'user 'set spec)
|
|
|
|
|
(put 'default 'face-modified nil))))
|
|
|
|
|
|
2009-11-17 08:21:23 +00:00
|
|
|
|
|
|
|
|
|
|
2000-02-17 11:08:09 +00:00
|
|
|
|
;;; Assemble all the top-level items of the "Options" menu
|
|
|
|
|
(define-key menu-bar-options-menu [customize]
|
2009-09-17 10:31:15 +00:00
|
|
|
|
`(menu-item ,(purecopy "Customize Emacs") ,menu-bar-custom-menu))
|
2000-06-19 14:55:15 +00:00
|
|
|
|
|
|
|
|
|
(defun menu-bar-options-save ()
|
|
|
|
|
"Save current values of Options menu items using Custom."
|
|
|
|
|
(interactive)
|
2002-02-07 17:32:18 +00:00
|
|
|
|
(let ((need-save nil))
|
2004-11-27 19:01:02 +00:00
|
|
|
|
;; These are set with menu-bar-make-mm-toggle, which does not
|
|
|
|
|
;; put on a customized-value property.
|
2005-04-21 10:31:01 +00:00
|
|
|
|
(dolist (elt '(line-number-mode column-number-mode size-indication-mode
|
|
|
|
|
cua-mode show-paren-mode transient-mark-mode
|
2005-11-14 16:20:34 +00:00
|
|
|
|
blink-cursor-mode display-time-mode display-battery-mode))
|
2004-11-27 19:01:02 +00:00
|
|
|
|
(and (customize-mark-to-save elt)
|
|
|
|
|
(setq need-save t)))
|
2002-02-11 16:47:55 +00:00
|
|
|
|
;; These are set with `customize-set-variable'.
|
2004-11-27 19:01:02 +00:00
|
|
|
|
(dolist (elt '(scroll-bar-mode
|
2005-04-21 00:07:38 +00:00
|
|
|
|
debug-on-quit debug-on-error
|
|
|
|
|
tooltip-mode menu-bar-mode tool-bar-mode
|
2002-05-24 09:52:21 +00:00
|
|
|
|
save-place uniquify-buffer-name-style fringe-mode
|
2005-08-06 21:51:38 +00:00
|
|
|
|
indicate-empty-lines indicate-buffer-boundaries
|
2009-11-17 09:19:12 +00:00
|
|
|
|
case-fold-search font-use-system-font
|
2002-02-12 09:49:46 +00:00
|
|
|
|
current-language-environment default-input-method
|
2002-02-11 16:47:55 +00:00
|
|
|
|
;; Saving `text-mode-hook' is somewhat questionable,
|
|
|
|
|
;; as we might get more than we bargain for, if
|
|
|
|
|
;; other code may has added hooks as well.
|
|
|
|
|
;; Nonetheless, not saving it would like be confuse
|
|
|
|
|
;; more often.
|
|
|
|
|
;; -- Per Abrahamsen <abraham@dina.kvl.dk> 2002-02-11.
|
|
|
|
|
text-mode-hook))
|
|
|
|
|
(and (get elt 'customized-value)
|
|
|
|
|
(customize-mark-to-save elt)
|
|
|
|
|
(setq need-save t)))
|
2008-06-10 21:24:18 +00:00
|
|
|
|
(when (get 'default 'customized-face)
|
|
|
|
|
(put 'default 'saved-face (get 'default 'customized-face))
|
|
|
|
|
(put 'default 'customized-face nil)
|
|
|
|
|
(setq need-save t))
|
2002-02-07 17:32:18 +00:00
|
|
|
|
;; Save if we changed anything.
|
|
|
|
|
(when need-save
|
|
|
|
|
(custom-save-all))))
|
2000-06-19 14:55:15 +00:00
|
|
|
|
|
|
|
|
|
(define-key menu-bar-options-menu [save]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Save Options") menu-bar-options-save
|
|
|
|
|
:help ,(purecopy "Save options set from the menu above")))
|
2000-06-19 14:55:15 +00:00
|
|
|
|
|
|
|
|
|
(define-key menu-bar-options-menu [custom-separator]
|
2009-11-11 05:57:51 +00:00
|
|
|
|
menu-bar-separator)
|
2000-06-19 14:55:15 +00:00
|
|
|
|
|
2008-06-10 19:55:38 +00:00
|
|
|
|
(define-key menu-bar-options-menu [menu-set-font]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Set Default Font...") menu-set-font
|
2008-06-10 19:55:38 +00:00
|
|
|
|
:visible (display-multi-font-p)
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
:help ,(purecopy "Select a default font")))
|
2003-06-28 11:54:09 +00:00
|
|
|
|
|
2009-11-17 08:21:23 +00:00
|
|
|
|
(if (featurep 'system-font-setting)
|
|
|
|
|
(define-key menu-bar-options-menu [menu-system-font]
|
|
|
|
|
(menu-bar-make-toggle toggle-use-system-font font-use-system-font
|
|
|
|
|
"Use system font"
|
|
|
|
|
"Use system font: %s"
|
|
|
|
|
"Use the monospaced font defined by the system")))
|
|
|
|
|
|
|
|
|
|
|
2002-01-29 14:19:21 +00:00
|
|
|
|
;; The "Show/Hide" submenu of menu "Options"
|
|
|
|
|
|
|
|
|
|
(defvar menu-bar-showhide-menu (make-sparse-keymap "Show/Hide"))
|
2002-02-03 11:28:28 +00:00
|
|
|
|
|
2002-02-09 13:56:42 +00:00
|
|
|
|
(define-key menu-bar-showhide-menu [column-number-mode]
|
2002-09-11 21:56:50 +00:00
|
|
|
|
(menu-bar-make-mm-toggle column-number-mode
|
2003-09-01 18:48:10 +00:00
|
|
|
|
"Column Numbers"
|
2002-09-11 21:56:50 +00:00
|
|
|
|
"Show the current column number in the mode line"))
|
2002-02-09 13:56:42 +00:00
|
|
|
|
|
|
|
|
|
(define-key menu-bar-showhide-menu [line-number-mode]
|
2002-09-11 21:56:50 +00:00
|
|
|
|
(menu-bar-make-mm-toggle line-number-mode
|
2003-09-01 18:48:10 +00:00
|
|
|
|
"Line Numbers"
|
2002-09-11 21:56:50 +00:00
|
|
|
|
"Show the current line number in the mode line"))
|
2002-02-09 13:56:42 +00:00
|
|
|
|
|
2005-04-21 10:31:01 +00:00
|
|
|
|
(define-key menu-bar-showhide-menu [size-indication-mode]
|
|
|
|
|
(menu-bar-make-mm-toggle size-indication-mode
|
|
|
|
|
"Size Indication"
|
|
|
|
|
"Show the size of the buffer in the mode line"))
|
|
|
|
|
|
2002-02-09 13:56:42 +00:00
|
|
|
|
(define-key menu-bar-showhide-menu [linecolumn-separator]
|
2009-11-11 05:57:51 +00:00
|
|
|
|
menu-bar-separator)
|
2002-02-09 13:56:42 +00:00
|
|
|
|
|
2005-08-09 21:39:34 +00:00
|
|
|
|
(define-key menu-bar-showhide-menu [showhide-battery]
|
|
|
|
|
(menu-bar-make-mm-toggle display-battery-mode
|
2005-08-11 20:57:36 +00:00
|
|
|
|
"Battery Status"
|
2005-08-09 21:39:34 +00:00
|
|
|
|
"Display battery status information in mode line"))
|
|
|
|
|
|
2002-02-03 11:28:28 +00:00
|
|
|
|
(define-key menu-bar-showhide-menu [showhide-date-time]
|
2005-03-22 19:44:38 +00:00
|
|
|
|
(menu-bar-make-mm-toggle display-time-mode
|
2005-08-11 01:54:40 +00:00
|
|
|
|
"Time, Load and Mail"
|
|
|
|
|
"Display time, system load averages and \
|
|
|
|
|
mail status in mode line"))
|
2002-02-03 11:28:28 +00:00
|
|
|
|
|
|
|
|
|
(define-key menu-bar-showhide-menu [datetime-separator]
|
2009-11-11 05:57:51 +00:00
|
|
|
|
menu-bar-separator)
|
2002-02-03 11:28:28 +00:00
|
|
|
|
|
2002-02-17 12:15:17 +00:00
|
|
|
|
(define-key menu-bar-showhide-menu [showhide-speedbar]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Speedbar") speedbar-frame-mode
|
|
|
|
|
:help ,(purecopy "Display a Speedbar quick-navigation frame")
|
2002-02-17 12:15:17 +00:00
|
|
|
|
:button (:toggle
|
|
|
|
|
. (and (boundp 'speedbar-frame)
|
|
|
|
|
(frame-live-p (symbol-value 'speedbar-frame))
|
2002-04-11 13:41:49 +00:00
|
|
|
|
(frame-visible-p
|
2002-02-17 12:15:17 +00:00
|
|
|
|
(symbol-value 'speedbar-frame))))))
|
|
|
|
|
|
2005-08-06 21:51:38 +00:00
|
|
|
|
(defvar menu-bar-showhide-fringe-menu (make-sparse-keymap "Fringe"))
|
2004-11-28 00:56:43 +00:00
|
|
|
|
|
2005-08-06 21:51:38 +00:00
|
|
|
|
(defvar menu-bar-showhide-fringe-ind-menu
|
|
|
|
|
(make-sparse-keymap "Buffer boundaries"))
|
2004-11-28 00:56:43 +00:00
|
|
|
|
|
2005-08-06 21:51:38 +00:00
|
|
|
|
(defun menu-bar-showhide-fringe-ind-customize ()
|
|
|
|
|
"Show customization buffer for `indicate-buffer-boundaries'."
|
2004-11-28 00:56:43 +00:00
|
|
|
|
(interactive)
|
2005-08-06 21:51:38 +00:00
|
|
|
|
(customize-variable 'indicate-buffer-boundaries))
|
2004-11-28 00:56:43 +00:00
|
|
|
|
|
2005-08-06 21:51:38 +00:00
|
|
|
|
(define-key menu-bar-showhide-fringe-ind-menu [customize]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Other (Customize)")
|
2005-08-06 21:51:38 +00:00
|
|
|
|
menu-bar-showhide-fringe-ind-customize
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
:help ,(purecopy "Additional choices available through Custom buffer")
|
2008-03-23 11:44:23 +00:00
|
|
|
|
:visible (display-graphic-p)
|
|
|
|
|
:button (:radio . (not (member indicate-buffer-boundaries
|
|
|
|
|
'(nil left right
|
|
|
|
|
((top . left) (bottom . right))
|
|
|
|
|
((t . right) (top . left))))))))
|
2004-11-28 00:56:43 +00:00
|
|
|
|
|
|
|
|
|
(defun menu-bar-showhide-fringe-ind-mixed ()
|
2005-08-06 21:51:38 +00:00
|
|
|
|
"Display top and bottom indicators in opposite fringes, arrows in right."
|
2004-11-28 00:56:43 +00:00
|
|
|
|
(interactive)
|
2005-08-06 21:51:38 +00:00
|
|
|
|
(customize-set-variable 'indicate-buffer-boundaries
|
|
|
|
|
'((t . right) (top . left))))
|
2004-11-28 00:56:43 +00:00
|
|
|
|
|
|
|
|
|
(define-key menu-bar-showhide-fringe-ind-menu [mixed]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Opposite, Arrows Right") menu-bar-showhide-fringe-ind-mixed
|
2005-08-06 21:51:38 +00:00
|
|
|
|
:help
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
,(purecopy "Show top/bottom indicators in opposite fringes, arrows in right")
|
2004-11-28 00:56:43 +00:00
|
|
|
|
:visible (display-graphic-p)
|
2008-03-23 11:21:14 +00:00
|
|
|
|
:button (:radio . (equal indicate-buffer-boundaries
|
|
|
|
|
'((t . right) (top . left))))))
|
2004-11-28 00:56:43 +00:00
|
|
|
|
|
|
|
|
|
(defun menu-bar-showhide-fringe-ind-box ()
|
|
|
|
|
"Display top and bottom indicators in opposite fringes."
|
|
|
|
|
(interactive)
|
2005-08-06 21:51:38 +00:00
|
|
|
|
(customize-set-variable 'indicate-buffer-boundaries
|
|
|
|
|
'((top . left) (bottom . right))))
|
2004-11-28 00:56:43 +00:00
|
|
|
|
|
|
|
|
|
(define-key menu-bar-showhide-fringe-ind-menu [box]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Opposite, No Arrows") menu-bar-showhide-fringe-ind-box
|
|
|
|
|
:help ,(purecopy "Show top/bottom indicators in opposite fringes, no arrows")
|
2004-11-28 00:56:43 +00:00
|
|
|
|
:visible (display-graphic-p)
|
2008-03-23 11:21:14 +00:00
|
|
|
|
:button (:radio . (equal indicate-buffer-boundaries
|
|
|
|
|
'((top . left) (bottom . right))))))
|
2004-11-28 00:56:43 +00:00
|
|
|
|
|
|
|
|
|
(defun menu-bar-showhide-fringe-ind-right ()
|
2005-08-06 21:51:38 +00:00
|
|
|
|
"Display buffer boundaries and arrows in the right fringe."
|
2004-11-28 00:56:43 +00:00
|
|
|
|
(interactive)
|
2005-08-06 21:51:38 +00:00
|
|
|
|
(customize-set-variable 'indicate-buffer-boundaries 'right))
|
2004-11-28 00:56:43 +00:00
|
|
|
|
|
|
|
|
|
(define-key menu-bar-showhide-fringe-ind-menu [right]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "In Right Fringe") menu-bar-showhide-fringe-ind-right
|
|
|
|
|
:help ,(purecopy "Show buffer boundaries and arrows in right fringe")
|
2004-11-28 00:56:43 +00:00
|
|
|
|
:visible (display-graphic-p)
|
2005-08-06 21:51:38 +00:00
|
|
|
|
:button (:radio . (eq indicate-buffer-boundaries 'right))))
|
2004-11-28 00:56:43 +00:00
|
|
|
|
|
|
|
|
|
(defun menu-bar-showhide-fringe-ind-left ()
|
2005-08-06 21:51:38 +00:00
|
|
|
|
"Display buffer boundaries and arrows in the left fringe."
|
2004-11-28 00:56:43 +00:00
|
|
|
|
(interactive)
|
2005-08-06 21:51:38 +00:00
|
|
|
|
(customize-set-variable 'indicate-buffer-boundaries 'left))
|
2004-11-28 00:56:43 +00:00
|
|
|
|
|
|
|
|
|
(define-key menu-bar-showhide-fringe-ind-menu [left]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "In Left Fringe") menu-bar-showhide-fringe-ind-left
|
|
|
|
|
:help ,(purecopy "Show buffer boundaries and arrows in left fringe")
|
2004-11-28 00:56:43 +00:00
|
|
|
|
:visible (display-graphic-p)
|
2005-08-06 21:51:38 +00:00
|
|
|
|
:button (:radio . (eq indicate-buffer-boundaries 'left))))
|
2004-11-28 00:56:43 +00:00
|
|
|
|
|
|
|
|
|
(defun menu-bar-showhide-fringe-ind-none ()
|
2005-08-06 21:51:38 +00:00
|
|
|
|
"Do not display any buffer boundary indicators."
|
2004-11-28 00:56:43 +00:00
|
|
|
|
(interactive)
|
2005-08-06 21:51:38 +00:00
|
|
|
|
(customize-set-variable 'indicate-buffer-boundaries nil))
|
2004-11-28 00:56:43 +00:00
|
|
|
|
|
|
|
|
|
(define-key menu-bar-showhide-fringe-ind-menu [none]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "No Indicators") menu-bar-showhide-fringe-ind-none
|
|
|
|
|
:help ,(purecopy "Hide all buffer boundary indicators and arrows")
|
2004-11-28 00:56:43 +00:00
|
|
|
|
:visible (display-graphic-p)
|
2005-08-06 21:51:38 +00:00
|
|
|
|
:button (:radio . (eq indicate-buffer-boundaries nil))))
|
2004-11-28 00:56:43 +00:00
|
|
|
|
|
2005-08-06 21:51:38 +00:00
|
|
|
|
(define-key menu-bar-showhide-fringe-menu [showhide-fringe-ind]
|
2009-09-17 10:31:15 +00:00
|
|
|
|
`(menu-item ,(purecopy "Buffer Boundaries") ,menu-bar-showhide-fringe-ind-menu
|
|
|
|
|
:visible (display-graphic-p)
|
|
|
|
|
:help ,(purecopy "Indicate buffer boundaries in fringe")))
|
2004-11-28 00:56:43 +00:00
|
|
|
|
|
2005-08-06 21:51:38 +00:00
|
|
|
|
(define-key menu-bar-showhide-fringe-menu [indicate-empty-lines]
|
|
|
|
|
(menu-bar-make-toggle toggle-indicate-empty-lines indicate-empty-lines
|
2005-08-11 20:57:36 +00:00
|
|
|
|
"Empty Line Indicators"
|
2005-08-06 21:51:38 +00:00
|
|
|
|
"Indicating of empty lines %s"
|
2006-12-04 00:30:11 +00:00
|
|
|
|
"Indicate trailing empty lines in fringe, globally"))
|
2002-05-24 09:52:21 +00:00
|
|
|
|
|
|
|
|
|
(defun menu-bar-showhide-fringe-menu-customize ()
|
|
|
|
|
"Show customization buffer for `fringe-mode'."
|
|
|
|
|
(interactive)
|
|
|
|
|
(customize-variable 'fringe-mode))
|
|
|
|
|
|
|
|
|
|
(define-key menu-bar-showhide-fringe-menu [customize]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Customize Fringe") menu-bar-showhide-fringe-menu-customize
|
|
|
|
|
:help ,(purecopy "Detailed customization of fringe")
|
2002-05-24 09:52:21 +00:00
|
|
|
|
:visible (display-graphic-p)))
|
|
|
|
|
|
|
|
|
|
(defun menu-bar-showhide-fringe-menu-customize-reset ()
|
2002-08-15 20:15:20 +00:00
|
|
|
|
"Reset the fringe mode: display fringes on both sides of a window."
|
2002-05-24 09:52:21 +00:00
|
|
|
|
(interactive)
|
|
|
|
|
(customize-set-variable 'fringe-mode nil))
|
|
|
|
|
|
|
|
|
|
(define-key menu-bar-showhide-fringe-menu [default]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Default") menu-bar-showhide-fringe-menu-customize-reset
|
|
|
|
|
:help ,(purecopy "Default width fringe on both left and right side")
|
2002-05-24 09:52:21 +00:00
|
|
|
|
:visible (display-graphic-p)
|
2002-08-15 20:15:20 +00:00
|
|
|
|
:button (:radio . (eq fringe-mode nil))))
|
2002-05-24 09:52:21 +00:00
|
|
|
|
|
|
|
|
|
(defun menu-bar-showhide-fringe-menu-customize-right ()
|
2002-08-15 20:15:20 +00:00
|
|
|
|
"Display fringes only on the right of each window."
|
2002-05-24 09:52:21 +00:00
|
|
|
|
(interactive)
|
2002-05-25 05:15:07 +00:00
|
|
|
|
(require 'fringe)
|
|
|
|
|
(customize-set-variable 'fringe-mode '(0 . nil)))
|
2002-05-24 09:52:21 +00:00
|
|
|
|
|
|
|
|
|
(define-key menu-bar-showhide-fringe-menu [right]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "On the Right") menu-bar-showhide-fringe-menu-customize-right
|
|
|
|
|
:help ,(purecopy "Fringe only on the right side")
|
2002-05-24 09:52:21 +00:00
|
|
|
|
:visible (display-graphic-p)
|
2002-08-15 20:15:20 +00:00
|
|
|
|
:button (:radio . (equal fringe-mode '(0 . nil)))))
|
2002-05-24 09:52:21 +00:00
|
|
|
|
|
2005-12-13 11:07:50 +00:00
|
|
|
|
(defun menu-bar-showhide-fringe-menu-customize-left ()
|
|
|
|
|
"Display fringes only on the left of each window."
|
|
|
|
|
(interactive)
|
|
|
|
|
(require 'fringe)
|
|
|
|
|
(customize-set-variable 'fringe-mode '(nil . 0)))
|
|
|
|
|
|
|
|
|
|
(define-key menu-bar-showhide-fringe-menu [left]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "On the Left") menu-bar-showhide-fringe-menu-customize-left
|
|
|
|
|
:help ,(purecopy "Fringe only on the left side")
|
2005-12-13 11:07:50 +00:00
|
|
|
|
:visible (display-graphic-p)
|
|
|
|
|
:button (:radio . (equal fringe-mode '(nil . 0)))))
|
|
|
|
|
|
2002-05-24 09:52:21 +00:00
|
|
|
|
(defun menu-bar-showhide-fringe-menu-customize-disable ()
|
2002-08-15 20:15:20 +00:00
|
|
|
|
"Do not display window fringes."
|
2002-05-24 09:52:21 +00:00
|
|
|
|
(interactive)
|
2002-05-25 05:15:07 +00:00
|
|
|
|
(require 'fringe)
|
|
|
|
|
(customize-set-variable 'fringe-mode 0))
|
2002-05-24 09:52:21 +00:00
|
|
|
|
|
|
|
|
|
(define-key menu-bar-showhide-fringe-menu [none]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "None") menu-bar-showhide-fringe-menu-customize-disable
|
|
|
|
|
:help ,(purecopy "Turn off fringe")
|
2002-05-24 09:52:21 +00:00
|
|
|
|
:visible (display-graphic-p)
|
2002-08-15 20:15:20 +00:00
|
|
|
|
:button (:radio . (eq fringe-mode 0))))
|
2002-05-24 09:52:21 +00:00
|
|
|
|
|
|
|
|
|
(define-key menu-bar-showhide-menu [showhide-fringe]
|
2009-09-17 10:31:15 +00:00
|
|
|
|
`(menu-item ,(purecopy "Fringe") ,menu-bar-showhide-fringe-menu
|
|
|
|
|
:visible (display-graphic-p)))
|
2002-05-24 09:52:21 +00:00
|
|
|
|
|
2002-01-29 14:19:21 +00:00
|
|
|
|
(defvar menu-bar-showhide-scroll-bar-menu (make-sparse-keymap "Scroll-bar"))
|
|
|
|
|
|
|
|
|
|
(define-key menu-bar-showhide-scroll-bar-menu [right]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "On the Right")
|
2002-08-15 20:15:20 +00:00
|
|
|
|
menu-bar-right-scroll-bar
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
:help ,(purecopy "Scroll-bar on the right side")
|
2002-05-10 09:42:49 +00:00
|
|
|
|
:visible (display-graphic-p)
|
2002-02-11 16:47:55 +00:00
|
|
|
|
:button (:radio . (eq (cdr (assq 'vertical-scroll-bars
|
|
|
|
|
(frame-parameters))) 'right))))
|
2002-08-15 20:15:20 +00:00
|
|
|
|
(defun menu-bar-right-scroll-bar ()
|
|
|
|
|
"Display scroll bars on the right of each window."
|
|
|
|
|
(interactive)
|
|
|
|
|
(customize-set-variable 'scroll-bar-mode 'right))
|
2002-01-29 14:19:21 +00:00
|
|
|
|
|
|
|
|
|
(define-key menu-bar-showhide-scroll-bar-menu [left]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "On the Left")
|
2002-08-15 20:15:20 +00:00
|
|
|
|
menu-bar-left-scroll-bar
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
:help ,(purecopy "Scroll-bar on the left side")
|
2002-05-10 09:42:49 +00:00
|
|
|
|
:visible (display-graphic-p)
|
2002-02-11 16:47:55 +00:00
|
|
|
|
:button (:radio . (eq (cdr (assq 'vertical-scroll-bars
|
|
|
|
|
(frame-parameters))) 'left))))
|
2002-01-29 14:19:21 +00:00
|
|
|
|
|
2002-08-15 20:15:20 +00:00
|
|
|
|
(defun menu-bar-left-scroll-bar ()
|
|
|
|
|
"Display scroll bars on the left of each window."
|
|
|
|
|
(interactive)
|
2003-01-02 16:08:15 +00:00
|
|
|
|
(customize-set-variable 'scroll-bar-mode 'left))
|
2002-08-15 20:15:20 +00:00
|
|
|
|
|
2002-01-29 14:19:21 +00:00
|
|
|
|
(define-key menu-bar-showhide-scroll-bar-menu [none]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "None")
|
2002-08-15 20:15:20 +00:00
|
|
|
|
menu-bar-no-scroll-bar
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
:help ,(purecopy "Turn off scroll-bar")
|
2002-05-10 09:42:49 +00:00
|
|
|
|
:visible (display-graphic-p)
|
2002-02-11 16:47:55 +00:00
|
|
|
|
:button (:radio . (eq (cdr (assq 'vertical-scroll-bars
|
|
|
|
|
(frame-parameters))) nil))))
|
2002-01-29 14:19:21 +00:00
|
|
|
|
|
2002-08-15 20:15:20 +00:00
|
|
|
|
(defun menu-bar-no-scroll-bar ()
|
|
|
|
|
"Turn off scroll bars."
|
|
|
|
|
(interactive)
|
|
|
|
|
(customize-set-variable 'scroll-bar-mode nil))
|
|
|
|
|
|
2002-01-29 14:19:21 +00:00
|
|
|
|
(define-key menu-bar-showhide-menu [showhide-scroll-bar]
|
2009-09-17 10:31:15 +00:00
|
|
|
|
`(menu-item ,(purecopy "Scroll-bar") ,menu-bar-showhide-scroll-bar-menu
|
|
|
|
|
:visible (display-graphic-p)))
|
2002-01-29 14:19:21 +00:00
|
|
|
|
|
2005-04-21 00:07:38 +00:00
|
|
|
|
(define-key menu-bar-showhide-menu [showhide-tooltip-mode]
|
2009-09-17 10:31:15 +00:00
|
|
|
|
`(menu-item ,(purecopy "Tooltips") tooltip-mode
|
|
|
|
|
:help ,(purecopy "Turn tooltips on/off")
|
|
|
|
|
:visible (and (display-graphic-p) (fboundp 'x-show-tip))
|
|
|
|
|
:button (:toggle . tooltip-mode)))
|
2005-04-21 00:07:38 +00:00
|
|
|
|
|
2002-09-06 20:27:59 +00:00
|
|
|
|
(define-key menu-bar-showhide-menu [menu-bar-mode]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Menu-bar") toggle-menu-bar-mode-from-frame
|
|
|
|
|
:help ,(purecopy "Turn menu-bar on/off")
|
2006-03-26 14:20:01 +00:00
|
|
|
|
:button (:toggle . (> (frame-parameter nil 'menu-bar-lines) 0))))
|
2002-01-29 14:19:21 +00:00
|
|
|
|
|
|
|
|
|
(define-key menu-bar-showhide-menu [showhide-tool-bar]
|
2009-09-17 10:31:15 +00:00
|
|
|
|
`(menu-item ,(purecopy "Tool-bar") toggle-tool-bar-mode-from-frame
|
|
|
|
|
:help ,(purecopy "Turn tool-bar on/off")
|
|
|
|
|
:visible (display-graphic-p)
|
|
|
|
|
:button (:toggle . (> (frame-parameter nil 'tool-bar-lines) 0))))
|
2002-01-29 14:19:21 +00:00
|
|
|
|
|
|
|
|
|
(define-key menu-bar-options-menu [showhide]
|
2009-09-17 10:31:15 +00:00
|
|
|
|
`(menu-item ,(purecopy "Show/Hide") ,menu-bar-showhide-menu))
|
2002-01-29 14:19:21 +00:00
|
|
|
|
|
|
|
|
|
(define-key menu-bar-options-menu [showhide-separator]
|
2009-11-11 05:57:51 +00:00
|
|
|
|
menu-bar-separator)
|
2002-01-29 14:19:21 +00:00
|
|
|
|
|
2000-02-17 11:08:09 +00:00
|
|
|
|
(define-key menu-bar-options-menu [mule]
|
|
|
|
|
;; It is better not to use backquote here,
|
|
|
|
|
;; because that makes a bootstrapping problem
|
|
|
|
|
;; if you need to recompile all the Lisp files using interpreted code.
|
2009-09-17 10:31:15 +00:00
|
|
|
|
`(menu-item ,(purecopy "Mule (Multilingual Environment)") ,mule-menu-keymap
|
2000-04-12 18:26:04 +00:00
|
|
|
|
;; Most of the MULE menu actually does make sense in unibyte mode,
|
|
|
|
|
;; e.g. language selection.
|
2009-09-03 06:54:57 +00:00
|
|
|
|
;;; :visible '(default-value 'enable-multibyte-characters)
|
2006-05-24 14:21:52 +00:00
|
|
|
|
))
|
2000-02-17 11:08:09 +00:00
|
|
|
|
;(setq menu-bar-final-items (cons 'mule menu-bar-final-items))
|
|
|
|
|
;(define-key menu-bar-options-menu [preferences]
|
2009-09-17 10:31:15 +00:00
|
|
|
|
; `(menu-item ,(purecopy "Preferences") ,menu-bar-preferences-menu
|
|
|
|
|
; :help ,(purecopy "Toggle important global options")))
|
2000-02-17 11:08:09 +00:00
|
|
|
|
|
|
|
|
|
(define-key menu-bar-options-menu [mule-separator]
|
2009-11-11 05:57:51 +00:00
|
|
|
|
menu-bar-separator)
|
1997-08-29 02:12:38 +00:00
|
|
|
|
|
|
|
|
|
(define-key menu-bar-options-menu [debug-on-quit]
|
|
|
|
|
(menu-bar-make-toggle toggle-debug-on-quit debug-on-quit
|
2001-06-22 20:06:07 +00:00
|
|
|
|
"Enter Debugger on Quit/C-g" "Debug on Quit %s"
|
2000-02-17 11:08:09 +00:00
|
|
|
|
"Enter Lisp debugger when C-g is pressed"))
|
1997-08-29 02:12:38 +00:00
|
|
|
|
(define-key menu-bar-options-menu [debug-on-error]
|
|
|
|
|
(menu-bar-make-toggle toggle-debug-on-error debug-on-error
|
2001-06-22 20:06:07 +00:00
|
|
|
|
"Enter Debugger on Error" "Debug on Error %s"
|
|
|
|
|
"Enter Lisp debugger when an error is signaled"))
|
2000-02-17 11:08:09 +00:00
|
|
|
|
(define-key menu-bar-options-menu [debugger-separator]
|
2009-11-11 05:57:51 +00:00
|
|
|
|
menu-bar-separator)
|
2005-03-05 01:18:06 +00:00
|
|
|
|
|
|
|
|
|
(define-key menu-bar-options-menu [blink-cursor-mode]
|
|
|
|
|
(menu-bar-make-mm-toggle blink-cursor-mode
|
|
|
|
|
"Blinking Cursor"
|
|
|
|
|
"Whether the cursor blinks (Blink Cursor mode)"))
|
|
|
|
|
(define-key menu-bar-options-menu [cursor-separator]
|
2009-11-11 05:57:51 +00:00
|
|
|
|
menu-bar-separator)
|
2005-03-05 01:18:06 +00:00
|
|
|
|
|
1997-08-29 02:12:38 +00:00
|
|
|
|
(define-key menu-bar-options-menu [save-place]
|
|
|
|
|
(menu-bar-make-toggle toggle-save-place-globally save-place
|
1998-03-28 05:43:01 +00:00
|
|
|
|
"Save Place in Files between Sessions"
|
1997-08-29 02:12:38 +00:00
|
|
|
|
"Saving place in files %s"
|
2003-08-12 05:14:49 +00:00
|
|
|
|
"Visit files of previous session when restarting Emacs"
|
|
|
|
|
(require 'saveplace)
|
|
|
|
|
;; Do it by name, to avoid a free-variable
|
|
|
|
|
;; warning during byte compilation.
|
|
|
|
|
(set-default
|
|
|
|
|
'save-place (not (symbol-value 'save-place)))))
|
2002-02-11 16:47:55 +00:00
|
|
|
|
|
1997-08-29 02:12:38 +00:00
|
|
|
|
(define-key menu-bar-options-menu [uniquify]
|
|
|
|
|
(menu-bar-make-toggle toggle-uniquify-buffer-names uniquify-buffer-name-style
|
1998-03-28 05:43:01 +00:00
|
|
|
|
"Use Directory Names in Buffer Names"
|
1997-08-29 02:12:38 +00:00
|
|
|
|
"Directory name in buffer names (uniquify) %s"
|
2001-06-22 20:06:07 +00:00
|
|
|
|
"Uniquify buffer names by adding parent directory names"
|
1997-08-29 02:12:38 +00:00
|
|
|
|
(require 'uniquify)
|
|
|
|
|
(setq uniquify-buffer-name-style
|
|
|
|
|
(if (not uniquify-buffer-name-style)
|
|
|
|
|
'forward))))
|
2002-02-11 16:47:55 +00:00
|
|
|
|
|
2000-02-17 11:08:09 +00:00
|
|
|
|
(define-key menu-bar-options-menu [edit-options-separator]
|
2009-11-11 05:57:51 +00:00
|
|
|
|
menu-bar-separator)
|
2002-05-01 22:01:16 +00:00
|
|
|
|
(define-key menu-bar-options-menu [cua-mode]
|
2003-05-13 19:13:13 +00:00
|
|
|
|
(menu-bar-make-mm-toggle cua-mode
|
2005-08-11 20:57:36 +00:00
|
|
|
|
"C-x/C-c/C-v Cut and Paste (CUA)"
|
2005-11-01 23:21:39 +00:00
|
|
|
|
"Use C-z/C-x/C-c/C-v keys for undo/cut/copy/paste"
|
2009-11-04 02:53:03 +00:00
|
|
|
|
(:visible (or (not (boundp 'cua-enable-cua-keys))
|
|
|
|
|
cua-enable-cua-keys))))
|
2005-11-01 23:21:39 +00:00
|
|
|
|
|
|
|
|
|
(define-key menu-bar-options-menu [cua-emulation-mode]
|
|
|
|
|
(menu-bar-make-mm-toggle cua-mode
|
|
|
|
|
"Shift movement mark region (CUA)"
|
|
|
|
|
"Use shifted movement keys to set and extend the region."
|
2009-11-04 02:53:03 +00:00
|
|
|
|
(:visible (and (boundp 'cua-enable-cua-keys)
|
|
|
|
|
(not cua-enable-cua-keys)))))
|
2002-08-15 20:15:20 +00:00
|
|
|
|
|
1998-05-24 01:00:03 +00:00
|
|
|
|
(define-key menu-bar-options-menu [case-fold-search]
|
|
|
|
|
(menu-bar-make-toggle toggle-case-fold-search case-fold-search
|
2006-12-01 21:52:51 +00:00
|
|
|
|
"Case-Insensitive Search"
|
2006-12-04 00:30:11 +00:00
|
|
|
|
"Case-Insensitive Search %s"
|
2008-06-06 21:28:20 +00:00
|
|
|
|
"Ignore letter-case in search commands"))
|
2002-08-15 20:15:20 +00:00
|
|
|
|
|
|
|
|
|
(defun menu-bar-text-mode-auto-fill ()
|
|
|
|
|
(interactive)
|
|
|
|
|
(toggle-text-mode-auto-fill)
|
|
|
|
|
;; This is somewhat questionable, as `text-mode-hook'
|
|
|
|
|
;; might have changed outside customize.
|
|
|
|
|
;; -- Per Abrahamsen <abraham@dina.kvl.dk> 2002-02-11.
|
|
|
|
|
(customize-mark-as-set 'text-mode-hook))
|
|
|
|
|
|
2000-02-17 11:08:09 +00:00
|
|
|
|
(define-key menu-bar-options-menu [auto-fill-mode]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Auto Fill in Text Modes")
|
2002-08-15 20:15:20 +00:00
|
|
|
|
menu-bar-text-mode-auto-fill
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
:help ,(purecopy "Automatically fill text while typing (Auto Fill mode)")
|
2002-03-18 09:06:35 +00:00
|
|
|
|
:button (:toggle . (if (listp text-mode-hook)
|
|
|
|
|
(member 'turn-on-auto-fill text-mode-hook)
|
|
|
|
|
(eq 'turn-on-auto-fill text-mode-hook)))))
|
2008-06-06 21:28:20 +00:00
|
|
|
|
|
2008-07-10 04:27:23 +00:00
|
|
|
|
|
|
|
|
|
(defvar menu-bar-line-wrapping-menu (make-sparse-keymap "Line Wrapping"))
|
|
|
|
|
|
|
|
|
|
(define-key menu-bar-line-wrapping-menu [word-wrap]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Word Wrap (Visual Line mode)")
|
2008-07-21 18:14:46 +00:00
|
|
|
|
(lambda ()
|
|
|
|
|
(interactive)
|
|
|
|
|
(unless visual-line-mode
|
|
|
|
|
(visual-line-mode 1))
|
2009-11-11 05:57:51 +00:00
|
|
|
|
(message ,(purecopy "Visual-Line mode enabled")))
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
:help ,(purecopy "Wrap long lines at word boundaries")
|
2008-07-10 04:27:23 +00:00
|
|
|
|
:button (:radio . (and (null truncate-lines)
|
|
|
|
|
(not (truncated-partial-width-window-p))
|
|
|
|
|
word-wrap))
|
2008-07-21 18:14:46 +00:00
|
|
|
|
:visible (menu-bar-menu-frame-live-and-visible-p)))
|
|
|
|
|
|
|
|
|
|
(define-key menu-bar-line-wrapping-menu [truncate]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Truncate Long Lines")
|
2008-07-21 18:14:46 +00:00
|
|
|
|
(lambda ()
|
|
|
|
|
(interactive)
|
|
|
|
|
(if visual-line-mode (visual-line-mode 0))
|
|
|
|
|
(setq word-wrap nil)
|
|
|
|
|
(toggle-truncate-lines 1))
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
:help ,(purecopy "Truncate long lines at window edge")
|
2008-07-21 18:14:46 +00:00
|
|
|
|
:button (:radio . (or truncate-lines
|
|
|
|
|
(truncated-partial-width-window-p)))
|
2008-07-10 04:27:23 +00:00
|
|
|
|
:visible (menu-bar-menu-frame-live-and-visible-p)
|
|
|
|
|
:enable (not (truncated-partial-width-window-p))))
|
|
|
|
|
|
|
|
|
|
(define-key menu-bar-line-wrapping-menu [window-wrap]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Wrap at Window Edge")
|
2008-07-21 18:14:46 +00:00
|
|
|
|
(lambda () (interactive)
|
|
|
|
|
(if visual-line-mode (visual-line-mode 0))
|
|
|
|
|
(setq word-wrap nil)
|
|
|
|
|
(if truncate-lines (toggle-truncate-lines -1)))
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
:help ,(purecopy "Wrap long lines at window edge")
|
2008-07-10 04:27:23 +00:00
|
|
|
|
:button (:radio . (and (null truncate-lines)
|
|
|
|
|
(not (truncated-partial-width-window-p))
|
|
|
|
|
(not word-wrap)))
|
|
|
|
|
:visible (menu-bar-menu-frame-live-and-visible-p)
|
|
|
|
|
:enable (not (truncated-partial-width-window-p))))
|
|
|
|
|
|
|
|
|
|
(define-key menu-bar-options-menu [line-wrapping]
|
2009-09-17 10:31:15 +00:00
|
|
|
|
`(menu-item ,(purecopy "Line Wrapping in this Buffer") ,menu-bar-line-wrapping-menu))
|
2008-07-10 04:27:23 +00:00
|
|
|
|
|
2002-02-12 16:37:11 +00:00
|
|
|
|
|
2000-02-17 11:08:09 +00:00
|
|
|
|
(define-key menu-bar-options-menu [highlight-separator]
|
2009-11-11 05:57:51 +00:00
|
|
|
|
menu-bar-separator)
|
2000-02-17 11:08:09 +00:00
|
|
|
|
(define-key menu-bar-options-menu [highlight-paren-mode]
|
2002-09-06 20:27:59 +00:00
|
|
|
|
(menu-bar-make-mm-toggle show-paren-mode
|
|
|
|
|
"Paren Match Highlighting"
|
2002-09-11 21:56:50 +00:00
|
|
|
|
"Highlight matching/mismatched parentheses at cursor (Show Paren mode)"))
|
1997-08-29 02:12:38 +00:00
|
|
|
|
(define-key menu-bar-options-menu [transient-mark-mode]
|
2002-09-11 21:56:50 +00:00
|
|
|
|
(menu-bar-make-mm-toggle transient-mark-mode
|
|
|
|
|
"Active Region Highlighting"
|
|
|
|
|
"Make text in active region stand out in color (Transient Mark mode)"
|
2009-11-04 02:53:03 +00:00
|
|
|
|
(:enable (not cua-mode))))
|
2000-02-17 11:08:09 +00:00
|
|
|
|
|
1997-11-24 04:59:24 +00:00
|
|
|
|
|
2000-02-17 11:08:09 +00:00
|
|
|
|
;; The "Tools" menu items
|
|
|
|
|
|
2000-10-09 10:28:16 +00:00
|
|
|
|
(defun send-mail-item-name ()
|
|
|
|
|
(let* ((known-send-mail-commands '((sendmail-user-agent . "sendmail")
|
|
|
|
|
(mh-e-user-agent . "MH")
|
|
|
|
|
(message-user-agent . "Gnus Message")
|
|
|
|
|
(gnus-user-agent . "Gnus")))
|
|
|
|
|
(name (assq mail-user-agent known-send-mail-commands)))
|
|
|
|
|
(if name
|
|
|
|
|
(setq name (cdr name))
|
|
|
|
|
(setq name (symbol-name mail-user-agent))
|
|
|
|
|
(if (string-match "\\(.+\\)-user-agent" name)
|
|
|
|
|
(setq name (match-string 1 name))))
|
|
|
|
|
name))
|
|
|
|
|
|
2000-09-07 17:14:55 +00:00
|
|
|
|
(defun read-mail-item-name ()
|
|
|
|
|
(let* ((known-rmail-commands '((rmail . "RMAIL")
|
|
|
|
|
(mh-rmail . "MH")
|
|
|
|
|
(gnus . "Gnus")))
|
|
|
|
|
(known (assq read-mail-command known-rmail-commands)))
|
|
|
|
|
(if known (cdr known) (symbol-name read-mail-command))))
|
|
|
|
|
|
2008-04-30 05:48:32 +00:00
|
|
|
|
(defvar menu-bar-games-menu (make-sparse-keymap "Games"))
|
|
|
|
|
|
|
|
|
|
(define-key menu-bar-tools-menu [games]
|
2009-09-17 10:31:15 +00:00
|
|
|
|
`(menu-item ,(purecopy "Games") ,menu-bar-games-menu))
|
2008-04-30 05:48:32 +00:00
|
|
|
|
|
|
|
|
|
(define-key menu-bar-tools-menu [separator-games]
|
2009-11-11 05:57:51 +00:00
|
|
|
|
menu-bar-separator)
|
2008-04-30 05:48:32 +00:00
|
|
|
|
|
|
|
|
|
(define-key menu-bar-games-menu [zone]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Zone Out") zone
|
|
|
|
|
:help ,(purecopy "Play tricks with Emacs display when Emacs is idle")))
|
2008-04-30 05:48:32 +00:00
|
|
|
|
(define-key menu-bar-games-menu [tetris]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Tetris") tetris
|
|
|
|
|
:help ,(purecopy "Falling blocks game")))
|
2008-04-30 05:48:32 +00:00
|
|
|
|
(define-key menu-bar-games-menu [solitaire]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Solitaire") solitaire
|
|
|
|
|
:help ,(purecopy "Get rid of all the stones")))
|
2008-04-30 05:48:32 +00:00
|
|
|
|
(define-key menu-bar-games-menu [snake]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Snake") snake
|
|
|
|
|
:help ,(purecopy "Move snake around avoiding collisions")))
|
2008-04-30 05:48:32 +00:00
|
|
|
|
(define-key menu-bar-games-menu [pong]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Pong") pong
|
|
|
|
|
:help ,(purecopy "Bounce the ball to your opponent")))
|
2008-04-30 05:48:32 +00:00
|
|
|
|
(define-key menu-bar-games-menu [mult]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Multiplication Puzzle") mpuz
|
|
|
|
|
:help ,(purecopy "Exercise brain with multiplication")))
|
2008-04-30 05:48:32 +00:00
|
|
|
|
(define-key menu-bar-games-menu [life]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Life") life
|
|
|
|
|
:help ,(purecopy "Watch how John Conway's cellular automaton evolves")))
|
2010-08-21 02:11:34 +00:00
|
|
|
|
(define-key menu-bar-games-menu [land]
|
|
|
|
|
`(menu-item ,(purecopy "Landmark") landmark
|
|
|
|
|
:help ,(purecopy "Watch a neural-network robot learn landmarks")))
|
2008-04-30 05:48:32 +00:00
|
|
|
|
(define-key menu-bar-games-menu [hanoi]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Towers of Hanoi") hanoi
|
|
|
|
|
:help ,(purecopy "Watch Towers-of-Hanoi puzzle solved by Emacs")))
|
2008-04-30 05:48:32 +00:00
|
|
|
|
(define-key menu-bar-games-menu [gomoku]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Gomoku") gomoku
|
|
|
|
|
:help ,(purecopy "Mark 5 contiguous squares (like tic-tac-toe)")))
|
2008-04-30 05:48:32 +00:00
|
|
|
|
(define-key menu-bar-games-menu [bubbles]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Bubbles") bubbles
|
|
|
|
|
:help ,(purecopy "Remove all bubbles using the fewest moves")))
|
2008-04-30 05:48:32 +00:00
|
|
|
|
(define-key menu-bar-games-menu [black-box]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Blackbox") blackbox
|
|
|
|
|
:help ,(purecopy "Find balls in a black box by shooting rays")))
|
2008-04-30 05:48:32 +00:00
|
|
|
|
(define-key menu-bar-games-menu [adventure]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Adventure") dunnet
|
|
|
|
|
:help ,(purecopy "Dunnet, a text Adventure game for Emacs")))
|
2008-04-30 05:48:32 +00:00
|
|
|
|
(define-key menu-bar-games-menu [5x5]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "5x5") 5x5
|
|
|
|
|
:help ,(purecopy "Fill in all the squares on a 5x5 board")))
|
2008-04-30 05:48:32 +00:00
|
|
|
|
|
2008-04-27 19:49:15 +00:00
|
|
|
|
(defvar menu-bar-encryption-decryption-menu
|
|
|
|
|
(make-sparse-keymap "Encryption/Decryption"))
|
|
|
|
|
|
|
|
|
|
(define-key menu-bar-tools-menu [encryption-decryption]
|
2009-09-17 10:31:15 +00:00
|
|
|
|
`(menu-item ,(purecopy "Encryption/Decryption") ,menu-bar-encryption-decryption-menu))
|
2008-04-27 19:49:15 +00:00
|
|
|
|
|
|
|
|
|
(define-key menu-bar-tools-menu [separator-encryption-decryption]
|
2009-11-11 05:57:51 +00:00
|
|
|
|
menu-bar-separator)
|
2008-04-27 19:49:15 +00:00
|
|
|
|
|
|
|
|
|
(define-key menu-bar-encryption-decryption-menu [insert-keys]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Insert Keys") epa-insert-keys
|
|
|
|
|
:help ,(purecopy "Insert public keys after the current point")))
|
2008-04-27 19:49:15 +00:00
|
|
|
|
|
|
|
|
|
(define-key menu-bar-encryption-decryption-menu [export-keys]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Export Keys") epa-export-keys
|
|
|
|
|
:help ,(purecopy "Export public keys to a file")))
|
2008-04-27 19:49:15 +00:00
|
|
|
|
|
|
|
|
|
(define-key menu-bar-encryption-decryption-menu [import-keys-region]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Import Keys from Region") epa-import-keys-region
|
|
|
|
|
:help ,(purecopy "Import public keys from the current region")))
|
2008-04-27 19:49:15 +00:00
|
|
|
|
|
|
|
|
|
(define-key menu-bar-encryption-decryption-menu [import-keys]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Import Keys from File...") epa-import-keys
|
|
|
|
|
:help ,(purecopy "Import public keys from a file")))
|
2008-04-27 19:49:15 +00:00
|
|
|
|
|
|
|
|
|
(define-key menu-bar-encryption-decryption-menu [list-keys]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "List Keys") epa-list-keys
|
|
|
|
|
:help ,(purecopy "Browse your public keyring")))
|
2008-04-27 19:49:15 +00:00
|
|
|
|
|
|
|
|
|
(define-key menu-bar-encryption-decryption-menu [separator-keys]
|
2009-11-11 05:57:51 +00:00
|
|
|
|
menu-bar-separator)
|
2008-04-27 19:49:15 +00:00
|
|
|
|
|
|
|
|
|
(define-key menu-bar-encryption-decryption-menu [sign-region]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Sign Region") epa-sign-region
|
|
|
|
|
:help ,(purecopy "Create digital signature of the current region")))
|
2008-04-27 19:49:15 +00:00
|
|
|
|
|
|
|
|
|
(define-key menu-bar-encryption-decryption-menu [verify-region]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Verify Region") epa-verify-region
|
|
|
|
|
:help ,(purecopy "Verify digital signature of the current region")))
|
2008-04-27 19:49:15 +00:00
|
|
|
|
|
2008-04-30 05:48:32 +00:00
|
|
|
|
(define-key menu-bar-encryption-decryption-menu [encrypt-region]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Encrypt Region") epa-encrypt-region
|
|
|
|
|
:help ,(purecopy "Encrypt the current region")))
|
2008-04-27 19:49:15 +00:00
|
|
|
|
|
|
|
|
|
(define-key menu-bar-encryption-decryption-menu [decrypt-region]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Decrypt Region") epa-decrypt-region
|
|
|
|
|
:help ,(purecopy "Decrypt the current region")))
|
2008-04-27 19:49:15 +00:00
|
|
|
|
|
2008-04-30 05:48:32 +00:00
|
|
|
|
(define-key menu-bar-encryption-decryption-menu [separator-file]
|
2009-11-11 05:57:51 +00:00
|
|
|
|
menu-bar-separator)
|
2008-04-27 19:49:15 +00:00
|
|
|
|
|
2008-04-30 05:48:32 +00:00
|
|
|
|
(define-key menu-bar-encryption-decryption-menu [sign-file]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Sign File...") epa-sign-file
|
|
|
|
|
:help ,(purecopy "Create digital signature of a file")))
|
2000-02-17 11:08:09 +00:00
|
|
|
|
|
2008-04-30 05:48:32 +00:00
|
|
|
|
(define-key menu-bar-encryption-decryption-menu [verify-file]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Verify File...") epa-verify-file
|
|
|
|
|
:help ,(purecopy "Verify digital signature of a file")))
|
2000-02-17 11:08:09 +00:00
|
|
|
|
|
2008-04-30 05:48:32 +00:00
|
|
|
|
(define-key menu-bar-encryption-decryption-menu [encrypt-file]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Encrypt File...") epa-encrypt-file
|
|
|
|
|
:help ,(purecopy "Encrypt a file")))
|
2000-02-17 11:08:09 +00:00
|
|
|
|
|
2008-04-30 05:48:32 +00:00
|
|
|
|
(define-key menu-bar-encryption-decryption-menu [decrypt-file]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Decrypt File...") epa-decrypt-file
|
|
|
|
|
:help ,(purecopy "Decrypt a file")))
|
2000-02-17 11:08:09 +00:00
|
|
|
|
|
2002-05-16 19:32:32 +00:00
|
|
|
|
(define-key menu-bar-tools-menu [simple-calculator]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Simple Calculator") calculator
|
|
|
|
|
:help ,(purecopy "Invoke the Emacs built-in quick calculator")))
|
2002-05-16 19:32:32 +00:00
|
|
|
|
(define-key menu-bar-tools-menu [calc]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Programmable Calculator") calc
|
|
|
|
|
:help ,(purecopy "Invoke the Emacs built-in full scientific calculator")))
|
2000-04-12 18:26:04 +00:00
|
|
|
|
(define-key menu-bar-tools-menu [calendar]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Calendar") calendar
|
|
|
|
|
:help ,(purecopy "Invoke the Emacs built-in calendar")))
|
2002-02-15 13:59:05 +00:00
|
|
|
|
|
|
|
|
|
(define-key menu-bar-tools-menu [separator-net]
|
2009-11-11 05:57:51 +00:00
|
|
|
|
menu-bar-separator)
|
2002-02-15 13:59:05 +00:00
|
|
|
|
|
2000-02-17 11:08:09 +00:00
|
|
|
|
(define-key menu-bar-tools-menu [directory-search]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Directory Search") eudc-tools-menu))
|
2000-04-12 18:26:04 +00:00
|
|
|
|
(define-key menu-bar-tools-menu [compose-mail]
|
2009-11-14 20:05:33 +00:00
|
|
|
|
`(menu-item (format "Send Mail (with %s)" (send-mail-item-name)) compose-mail
|
2009-09-17 10:31:15 +00:00
|
|
|
|
:visible (and mail-user-agent (not (eq mail-user-agent 'ignore)))
|
|
|
|
|
:help ,(purecopy "Send a mail message")))
|
2000-04-12 18:26:04 +00:00
|
|
|
|
(define-key menu-bar-tools-menu [rmail]
|
2009-11-14 20:05:33 +00:00
|
|
|
|
`(menu-item (format "Read Mail (with %s)" (read-mail-item-name))
|
|
|
|
|
menu-bar-read-mail
|
|
|
|
|
:visible (and read-mail-command
|
|
|
|
|
(not (eq read-mail-command 'ignore)))
|
2009-09-17 10:31:15 +00:00
|
|
|
|
:help ,(purecopy "Read your mail and reply to it")))
|
2002-08-15 20:15:20 +00:00
|
|
|
|
|
|
|
|
|
(defun menu-bar-read-mail ()
|
2002-08-30 15:21:38 +00:00
|
|
|
|
"Read mail using `read-mail-command'."
|
2002-08-15 20:15:20 +00:00
|
|
|
|
(interactive)
|
|
|
|
|
(call-interactively read-mail-command))
|
|
|
|
|
|
2000-02-17 11:08:09 +00:00
|
|
|
|
(define-key menu-bar-tools-menu [gnus]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Read Net News (Gnus)") gnus
|
|
|
|
|
:help ,(purecopy "Read network news groups")))
|
2000-02-17 11:08:09 +00:00
|
|
|
|
|
|
|
|
|
(define-key menu-bar-tools-menu [separator-vc]
|
2009-11-11 05:57:51 +00:00
|
|
|
|
menu-bar-separator)
|
2000-02-17 11:08:09 +00:00
|
|
|
|
|
2000-03-22 03:05:09 +00:00
|
|
|
|
(define-key menu-bar-tools-menu [pcl-cvs]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "PCL-CVS") cvs-global-menu))
|
2007-08-21 15:08:47 +00:00
|
|
|
|
(define-key menu-bar-tools-menu [vc] nil) ;Create the place for the VC menu.
|
2000-02-17 11:08:09 +00:00
|
|
|
|
|
|
|
|
|
(define-key menu-bar-tools-menu [separator-compare]
|
2009-11-11 05:57:51 +00:00
|
|
|
|
menu-bar-separator)
|
2000-02-17 11:08:09 +00:00
|
|
|
|
|
|
|
|
|
(define-key menu-bar-tools-menu [epatch]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Apply Patch") menu-bar-epatch-menu))
|
2000-02-17 11:08:09 +00:00
|
|
|
|
(define-key menu-bar-tools-menu [ediff-merge]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Merge") menu-bar-ediff-merge-menu))
|
2000-02-17 11:08:09 +00:00
|
|
|
|
(define-key menu-bar-tools-menu [compare]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Compare (Ediff)") menu-bar-ediff-menu))
|
2000-02-17 11:08:09 +00:00
|
|
|
|
|
|
|
|
|
(define-key menu-bar-tools-menu [separator-spell]
|
2009-11-11 05:57:51 +00:00
|
|
|
|
menu-bar-separator)
|
2000-02-17 11:08:09 +00:00
|
|
|
|
|
|
|
|
|
(define-key menu-bar-tools-menu [spell]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Spell Checking") ispell-menu-map))
|
2000-02-17 11:08:09 +00:00
|
|
|
|
|
|
|
|
|
(define-key menu-bar-tools-menu [separator-prog]
|
2009-11-11 05:57:51 +00:00
|
|
|
|
menu-bar-separator)
|
2000-02-17 11:08:09 +00:00
|
|
|
|
|
2009-10-31 18:03:02 +00:00
|
|
|
|
(define-key menu-bar-tools-menu [semantic]
|
|
|
|
|
`(menu-item ,(purecopy "Source Code Parsers (Semantic)")
|
|
|
|
|
semantic-mode
|
|
|
|
|
:help ,(purecopy "Toggle automatic parsing in source code buffers (Semantic mode)")
|
|
|
|
|
:button (:toggle . (bound-and-true-p semantic-mode))))
|
|
|
|
|
|
|
|
|
|
(define-key menu-bar-tools-menu [ede]
|
|
|
|
|
`(menu-item ,(purecopy "Project support (EDE)")
|
|
|
|
|
global-ede-mode
|
|
|
|
|
:help ,(purecopy "Toggle the Emacs Development Environment (Global EDE mode)")
|
|
|
|
|
:button (:toggle . (bound-and-true-p global-ede-mode))))
|
|
|
|
|
|
2000-02-17 11:08:09 +00:00
|
|
|
|
(define-key menu-bar-tools-menu [gdb]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Debugger (GDB)...") gdb
|
|
|
|
|
:help ,(purecopy "Debug a program from within Emacs with GDB")))
|
2000-02-17 11:08:09 +00:00
|
|
|
|
(define-key menu-bar-tools-menu [shell-on-region]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Shell Command on Region...") shell-command-on-region
|
2000-02-17 11:08:09 +00:00
|
|
|
|
:enable mark-active
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
:help ,(purecopy "Pass marked region to a shell command")))
|
2000-02-17 11:08:09 +00:00
|
|
|
|
(define-key menu-bar-tools-menu [shell]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Shell Command...") shell-command
|
|
|
|
|
:help ,(purecopy "Invoke a shell command and catch its output")))
|
2000-02-17 11:08:09 +00:00
|
|
|
|
(define-key menu-bar-tools-menu [compile]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Compile...") compile
|
|
|
|
|
:help ,(purecopy "Invoke compiler or Make, view compilation errors")))
|
2000-02-17 11:08:09 +00:00
|
|
|
|
(define-key menu-bar-tools-menu [grep]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Search Files (Grep)...") grep
|
|
|
|
|
:help ,(purecopy "Search files for strings or regexps (with Grep)")))
|
2000-02-17 11:08:09 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;; The "Help" menu items
|
|
|
|
|
|
1997-11-24 04:59:24 +00:00
|
|
|
|
(defvar menu-bar-describe-menu (make-sparse-keymap "Describe"))
|
|
|
|
|
|
2000-02-17 11:08:09 +00:00
|
|
|
|
(define-key menu-bar-describe-menu [mule-diag]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Show All of Mule Status") mule-diag
|
2009-09-03 06:54:57 +00:00
|
|
|
|
:visible (default-value 'enable-multibyte-characters)
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
:help ,(purecopy "Display multilingual environment settings")))
|
2001-11-25 05:46:35 +00:00
|
|
|
|
(define-key menu-bar-describe-menu [describe-coding-system-briefly]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Describe Coding System (Briefly)")
|
2001-11-25 05:46:35 +00:00
|
|
|
|
describe-current-coding-system-briefly
|
2009-09-03 06:54:57 +00:00
|
|
|
|
:visible (default-value 'enable-multibyte-characters)))
|
2000-02-17 11:08:09 +00:00
|
|
|
|
(define-key menu-bar-describe-menu [describe-coding-system]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Describe Coding System...") describe-coding-system
|
2009-09-03 06:54:57 +00:00
|
|
|
|
:visible (default-value 'enable-multibyte-characters)))
|
2000-02-17 11:08:09 +00:00
|
|
|
|
(define-key menu-bar-describe-menu [describe-input-method]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Describe Input Method...") describe-input-method
|
2009-09-03 06:54:57 +00:00
|
|
|
|
:visible (default-value 'enable-multibyte-characters)
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
:help ,(purecopy "Keyboard layout for specific input method")))
|
2000-02-17 11:08:09 +00:00
|
|
|
|
(define-key menu-bar-describe-menu [describe-language-environment]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Describe Language Environment")
|
2009-09-17 10:31:15 +00:00
|
|
|
|
,describe-language-environment-map))
|
2000-02-17 11:08:09 +00:00
|
|
|
|
|
|
|
|
|
(define-key menu-bar-describe-menu [separator-desc-mule]
|
2009-11-11 05:57:51 +00:00
|
|
|
|
menu-bar-separator)
|
2000-02-17 11:08:09 +00:00
|
|
|
|
|
|
|
|
|
(define-key menu-bar-describe-menu [list-keybindings]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "List Key Bindings") describe-bindings
|
|
|
|
|
:help ,(purecopy "Display all current key bindings (keyboard shortcuts)")))
|
2001-11-25 05:46:35 +00:00
|
|
|
|
(define-key menu-bar-describe-menu [describe-current-display-table]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Describe Display Table") describe-current-display-table
|
|
|
|
|
:help ,(purecopy "Describe the current display table")))
|
2001-11-25 05:46:35 +00:00
|
|
|
|
(define-key menu-bar-describe-menu [describe-face]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Describe Face...") describe-face
|
|
|
|
|
:help ,(purecopy "Display the properties of a face")))
|
1997-11-24 04:59:24 +00:00
|
|
|
|
(define-key menu-bar-describe-menu [describe-variable]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Describe Variable...") describe-variable
|
|
|
|
|
:help ,(purecopy "Display documentation of variable/option")))
|
1997-11-24 04:59:24 +00:00
|
|
|
|
(define-key menu-bar-describe-menu [describe-function]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Describe Function...") describe-function
|
|
|
|
|
:help ,(purecopy "Display documentation of function/command")))
|
2002-11-24 19:01:18 +00:00
|
|
|
|
(define-key menu-bar-describe-menu [describe-key-1]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Describe Key or Mouse Operation...") describe-key
|
2000-04-12 18:26:04 +00:00
|
|
|
|
;; Users typically don't identify keys and menu items...
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
:help ,(purecopy "Display documentation of command bound to a \
|
|
|
|
|
key, a click, or a menu-item")))
|
2001-11-25 05:46:35 +00:00
|
|
|
|
(define-key menu-bar-describe-menu [describe-mode]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Describe Buffer Modes") describe-mode
|
|
|
|
|
:help ,(purecopy "Describe this buffer's major and minor mode")))
|
2001-11-25 05:46:35 +00:00
|
|
|
|
|
2007-09-26 14:28:11 +00:00
|
|
|
|
(defvar menu-bar-search-documentation-menu
|
|
|
|
|
(make-sparse-keymap "Search Documentation"))
|
2001-11-30 10:23:23 +00:00
|
|
|
|
(defun menu-bar-read-lispref ()
|
|
|
|
|
"Display the Emacs Lisp Reference manual in Info mode."
|
|
|
|
|
(interactive)
|
|
|
|
|
(info "elisp"))
|
|
|
|
|
|
|
|
|
|
(defun menu-bar-read-lispintro ()
|
|
|
|
|
"Display the Introduction to Emacs Lisp Programming in Info mode."
|
|
|
|
|
(interactive)
|
|
|
|
|
(info "eintr"))
|
|
|
|
|
|
|
|
|
|
(defun search-emacs-glossary ()
|
|
|
|
|
"Display the Glossary node of the Emacs manual in Info mode."
|
|
|
|
|
(interactive)
|
|
|
|
|
(info "(emacs)Glossary"))
|
|
|
|
|
|
|
|
|
|
(defun emacs-index-search (topic)
|
|
|
|
|
"Look up TOPIC in the indices of the Emacs User Manual."
|
|
|
|
|
(interactive "sSubject to look up: ")
|
|
|
|
|
(info "emacs")
|
|
|
|
|
(Info-index topic))
|
|
|
|
|
|
|
|
|
|
(defun elisp-index-search (topic)
|
|
|
|
|
"Look up TOPIC in the indices of the Emacs Lisp Reference Manual."
|
|
|
|
|
(interactive "sSubject to look up: ")
|
|
|
|
|
(info "elisp")
|
|
|
|
|
(Info-index topic))
|
2001-11-25 05:46:35 +00:00
|
|
|
|
|
2007-09-26 14:28:11 +00:00
|
|
|
|
(define-key menu-bar-search-documentation-menu [search-documentation-strings]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Search Documentation Strings...") apropos-documentation
|
2001-11-30 10:23:23 +00:00
|
|
|
|
:help
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
,(purecopy "Find functions and variables whose doc strings match a regexp")))
|
2007-09-26 14:28:11 +00:00
|
|
|
|
(define-key menu-bar-search-documentation-menu [find-any-object-by-name]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Find Any Object by Name...") apropos
|
|
|
|
|
:help ,(purecopy "Find symbols of any kind whose names match a regexp")))
|
2007-09-26 14:28:11 +00:00
|
|
|
|
(define-key menu-bar-search-documentation-menu [find-option-by-value]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Find Options by Value...") apropos-value
|
|
|
|
|
:help ,(purecopy "Find variables whose values match a regexp")))
|
2007-09-26 14:28:11 +00:00
|
|
|
|
(define-key menu-bar-search-documentation-menu [find-options-by-name]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Find Options by Name...") apropos-variable
|
|
|
|
|
:help ,(purecopy "Find variables whose names match a regexp")))
|
2007-09-26 14:28:11 +00:00
|
|
|
|
(define-key menu-bar-search-documentation-menu [find-commands-by-name]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Find Commands by Name...") apropos-command
|
|
|
|
|
:help ,(purecopy "Find commands whose names match a regexp")))
|
2007-09-26 14:28:11 +00:00
|
|
|
|
(define-key menu-bar-search-documentation-menu [sep1]
|
2009-11-11 05:57:51 +00:00
|
|
|
|
menu-bar-separator)
|
2007-09-26 14:28:11 +00:00
|
|
|
|
(define-key menu-bar-search-documentation-menu [lookup-command-in-manual]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Look Up Command in User Manual...") Info-goto-emacs-command-node
|
|
|
|
|
:help ,(purecopy "Display manual section that describes a command")))
|
2007-09-26 14:28:11 +00:00
|
|
|
|
(define-key menu-bar-search-documentation-menu [lookup-key-in-manual]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Look Up Key in User Manual...") Info-goto-emacs-key-command-node
|
|
|
|
|
:help ,(purecopy "Display manual section that describes a key")))
|
2007-09-26 14:28:11 +00:00
|
|
|
|
(define-key menu-bar-search-documentation-menu [lookup-subject-in-elisp-manual]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Look Up Subject in ELisp Manual...") elisp-index-search
|
|
|
|
|
:help ,(purecopy "Find description of a subject in Emacs Lisp manual")))
|
2007-09-26 14:28:11 +00:00
|
|
|
|
(define-key menu-bar-search-documentation-menu [lookup-subject-in-emacs-manual]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Look Up Subject in User Manual...") emacs-index-search
|
|
|
|
|
:help ,(purecopy "Find description of a subject in Emacs User manual")))
|
2007-09-26 14:28:11 +00:00
|
|
|
|
(define-key menu-bar-search-documentation-menu [emacs-terminology]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Emacs Terminology") search-emacs-glossary
|
|
|
|
|
:help ,(purecopy "Display the Glossary section of the Emacs manual")))
|
2001-11-30 10:23:23 +00:00
|
|
|
|
|
|
|
|
|
(defvar menu-bar-manuals-menu (make-sparse-keymap "More Manuals"))
|
1997-11-24 04:59:24 +00:00
|
|
|
|
|
|
|
|
|
(define-key menu-bar-manuals-menu [man]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Read Man Page...") manual-entry
|
|
|
|
|
:help ,(purecopy "Man-page docs for external commands and libraries")))
|
1997-11-24 04:59:24 +00:00
|
|
|
|
(define-key menu-bar-manuals-menu [sep2]
|
2009-11-11 05:57:51 +00:00
|
|
|
|
menu-bar-separator)
|
2001-11-30 10:23:23 +00:00
|
|
|
|
(define-key menu-bar-manuals-menu [order-emacs-manuals]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Ordering Manuals") view-order-manuals
|
|
|
|
|
:help ,(purecopy "How to order manuals from the Free Software Foundation")))
|
2007-09-26 14:28:11 +00:00
|
|
|
|
(define-key menu-bar-manuals-menu [lookup-subject-in-all-manuals]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Lookup Subject in all Manuals...") info-apropos
|
|
|
|
|
:help ,(purecopy "Find description of a subject in all installed manuals")))
|
2007-09-26 14:28:11 +00:00
|
|
|
|
(define-key menu-bar-manuals-menu [other-manuals]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "All Other Manuals (Info)") Info-directory
|
|
|
|
|
:help ,(purecopy "Read any of the installed manuals")))
|
2007-09-26 14:28:11 +00:00
|
|
|
|
(define-key menu-bar-manuals-menu [emacs-lisp-reference]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Emacs Lisp Reference") menu-bar-read-lispref
|
|
|
|
|
:help ,(purecopy "Read the Emacs Lisp Reference manual")))
|
2010-02-28 23:37:19 +00:00
|
|
|
|
(define-key menu-bar-manuals-menu [emacs-lisp-intro]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Introduction to Emacs Lisp") menu-bar-read-lispintro
|
|
|
|
|
:help ,(purecopy "Read the Introduction to Emacs Lisp Programming")))
|
1997-08-29 02:12:38 +00:00
|
|
|
|
|
2007-11-11 20:23:41 +00:00
|
|
|
|
(define-key menu-bar-help-menu [about-gnu-project]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "About GNU") describe-gnu-project
|
|
|
|
|
:help ,(purecopy "About the GNU System, GNU Project, and GNU/Linux")))
|
2007-11-11 20:23:41 +00:00
|
|
|
|
(define-key menu-bar-help-menu [about-emacs]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "About Emacs") about-emacs
|
|
|
|
|
:help ,(purecopy "Display version number, copyright info, and basic help")))
|
2001-11-30 10:23:23 +00:00
|
|
|
|
(define-key menu-bar-help-menu [sep4]
|
2009-11-11 05:57:51 +00:00
|
|
|
|
menu-bar-separator)
|
1998-01-24 02:23:15 +00:00
|
|
|
|
(define-key menu-bar-help-menu [describe-no-warranty]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "(Non)Warranty") describe-no-warranty
|
|
|
|
|
:help ,(purecopy "Explain that Emacs has NO WARRANTY")))
|
1998-01-24 02:23:15 +00:00
|
|
|
|
(define-key menu-bar-help-menu [describe-copying]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Copying Conditions") describe-copying
|
|
|
|
|
:help ,(purecopy "Show the Emacs license (GPL)")))
|
2007-09-26 14:28:11 +00:00
|
|
|
|
(define-key menu-bar-help-menu [getting-new-versions]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Getting New Versions") describe-distribution
|
|
|
|
|
:help ,(purecopy "How to get the latest version of Emacs")))
|
2002-08-15 20:15:20 +00:00
|
|
|
|
(defun menu-bar-help-extra-packages ()
|
|
|
|
|
"Display help about some additional packages available for Emacs."
|
|
|
|
|
(interactive)
|
|
|
|
|
(let (enable-local-variables)
|
|
|
|
|
(view-file (expand-file-name "MORE.STUFF"
|
|
|
|
|
data-directory))
|
2009-01-14 23:11:12 +00:00
|
|
|
|
(goto-address-mode 1)))
|
1997-11-24 04:59:24 +00:00
|
|
|
|
(define-key menu-bar-help-menu [sep2]
|
2009-11-11 05:57:51 +00:00
|
|
|
|
menu-bar-separator)
|
2007-11-11 20:23:41 +00:00
|
|
|
|
(define-key menu-bar-help-menu [external-packages]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "External Packages") menu-bar-help-extra-packages
|
|
|
|
|
:help ,(purecopy "Lisp packages distributed separately for use in Emacs")))
|
2007-09-26 14:28:11 +00:00
|
|
|
|
(define-key menu-bar-help-menu [find-emacs-packages]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Find Emacs Packages") finder-by-keyword
|
|
|
|
|
:help ,(purecopy "Find packages and features by keyword")))
|
2007-09-26 14:28:11 +00:00
|
|
|
|
(define-key menu-bar-help-menu [more-manuals]
|
2009-09-17 10:31:15 +00:00
|
|
|
|
`(menu-item ,(purecopy "More Manuals") ,menu-bar-manuals-menu))
|
2001-11-30 10:23:23 +00:00
|
|
|
|
(define-key menu-bar-help-menu [emacs-manual]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Read the Emacs Manual") info-emacs-manual
|
|
|
|
|
:help ,(purecopy "Full documentation of Emacs features")))
|
1997-11-24 04:59:24 +00:00
|
|
|
|
(define-key menu-bar-help-menu [describe]
|
2009-09-17 10:31:15 +00:00
|
|
|
|
`(menu-item ,(purecopy "Describe") ,menu-bar-describe-menu))
|
2007-09-26 14:28:11 +00:00
|
|
|
|
(define-key menu-bar-help-menu [search-documentation]
|
2009-09-17 10:31:15 +00:00
|
|
|
|
`(menu-item ,(purecopy "Search Documentation") ,menu-bar-search-documentation-menu))
|
1997-11-24 04:59:24 +00:00
|
|
|
|
(define-key menu-bar-help-menu [sep1]
|
2009-11-11 05:57:51 +00:00
|
|
|
|
menu-bar-separator)
|
2007-11-11 20:23:41 +00:00
|
|
|
|
(define-key menu-bar-help-menu [emacs-psychotherapist]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Emacs Psychotherapist") doctor
|
|
|
|
|
:help ,(purecopy "Our doctor will help you feel better")))
|
2007-09-26 14:28:11 +00:00
|
|
|
|
(define-key menu-bar-help-menu [send-emacs-bug-report]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Send Bug Report...") report-emacs-bug
|
|
|
|
|
:help ,(purecopy "Send e-mail to Emacs maintainers")))
|
2007-09-26 14:28:11 +00:00
|
|
|
|
(define-key menu-bar-help-menu [emacs-known-problems]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Emacs Known Problems") view-emacs-problems
|
|
|
|
|
:help ,(purecopy "Read about known problems with Emacs")))
|
2000-02-17 11:08:09 +00:00
|
|
|
|
(define-key menu-bar-help-menu [emacs-news]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Emacs News") view-emacs-news
|
|
|
|
|
:help ,(purecopy "New features of this version")))
|
2000-02-17 11:08:09 +00:00
|
|
|
|
(define-key menu-bar-help-menu [emacs-faq]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Emacs FAQ") view-emacs-FAQ
|
|
|
|
|
:help ,(purecopy "Frequently asked (and answered) questions about Emacs")))
|
2002-08-15 20:15:20 +00:00
|
|
|
|
|
|
|
|
|
(defun help-with-tutorial-spec-language ()
|
|
|
|
|
"Use the Emacs tutorial, specifying which language you want."
|
2003-02-04 12:29:42 +00:00
|
|
|
|
(interactive)
|
2002-08-15 20:15:20 +00:00
|
|
|
|
(help-with-tutorial t))
|
|
|
|
|
|
2000-06-15 19:52:15 +00:00
|
|
|
|
(define-key menu-bar-help-menu [emacs-tutorial-language-specific]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Emacs Tutorial (choose language)...")
|
2002-08-15 20:15:20 +00:00
|
|
|
|
help-with-tutorial-spec-language
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
:help ,(purecopy "Learn how to use Emacs (choose a language)")))
|
2000-02-17 11:08:09 +00:00
|
|
|
|
(define-key menu-bar-help-menu [emacs-tutorial]
|
(menu-bar-file-menu, menu-bar-file-menu)
(menu-bar-i-search-menu, menu-bar-edit-menu, menu-bar-custom-menu)
(menu-bar-options-menu, menu-bar-showhide-menu)
(menu-bar-showhide-fringe-ind-menu, menu-bar-showhide-fringe-menu)
(menu-bar-showhide-scroll-bar-menu, menu-bar-showhide-menu)
(menu-bar-options-menu, menu-bar-line-wrapping-menu)
(menu-bar-options-menu, menu-bar-tools-menu)
(menu-bar-describe-menu, menu-bar-search-documentation-menu)
(menu-bar-help-menu):
(menu-bar-make-mm-toggle, menu-bar-make-toggle): Purecopy the
string arguments.
2009-09-17 05:30:17 +00:00
|
|
|
|
`(menu-item ,(purecopy "Emacs Tutorial") help-with-tutorial
|
|
|
|
|
:help ,(purecopy "Learn how to use Emacs")))
|
1995-03-06 05:19:05 +00:00
|
|
|
|
|
2005-09-10 10:55:14 +00:00
|
|
|
|
(defun menu-bar-menu-frame-live-and-visible-p ()
|
|
|
|
|
"Return non-nil if the menu frame is alive and visible.
|
|
|
|
|
The menu frame is the frame for which we are updating the menu."
|
2005-12-20 21:41:31 +00:00
|
|
|
|
(let ((menu-frame (or menu-updating-frame (selected-frame))))
|
2005-09-10 10:55:14 +00:00
|
|
|
|
(and (frame-live-p menu-frame)
|
|
|
|
|
(frame-visible-p menu-frame))))
|
|
|
|
|
|
|
|
|
|
(defun menu-bar-non-minibuffer-window-p ()
|
|
|
|
|
"Return non-nil if selected window of the menu frame is not a minibuf window.
|
|
|
|
|
|
|
|
|
|
See the documentation of `menu-bar-menu-frame-live-and-visible-p'
|
|
|
|
|
for the definition of the menu frame."
|
2005-12-20 21:41:31 +00:00
|
|
|
|
(let ((menu-frame (or menu-updating-frame (selected-frame))))
|
2005-09-10 10:55:14 +00:00
|
|
|
|
(not (window-minibuffer-p (frame-selected-window menu-frame)))))
|
|
|
|
|
|
2005-12-16 20:37:23 +00:00
|
|
|
|
(defun kill-this-buffer () ; for the menu bar
|
2008-03-16 17:44:20 +00:00
|
|
|
|
"Kill the current buffer.
|
|
|
|
|
When called in the minibuffer, get out of the minibuffer
|
|
|
|
|
using `abort-recursive-edit'."
|
1993-03-14 23:39:34 +00:00
|
|
|
|
(interactive)
|
2008-03-16 17:44:20 +00:00
|
|
|
|
(if (menu-bar-non-minibuffer-window-p)
|
|
|
|
|
(kill-buffer (current-buffer))
|
|
|
|
|
(abort-recursive-edit)))
|
1993-03-14 23:39:34 +00:00
|
|
|
|
|
1993-03-15 01:05:11 +00:00
|
|
|
|
(defun kill-this-buffer-enabled-p ()
|
|
|
|
|
(let ((count 0)
|
|
|
|
|
(buffers (buffer-list)))
|
|
|
|
|
(while buffers
|
|
|
|
|
(or (string-match "^ " (buffer-name (car buffers)))
|
|
|
|
|
(setq count (1+ count)))
|
|
|
|
|
(setq buffers (cdr buffers)))
|
2008-03-16 17:44:20 +00:00
|
|
|
|
(or (not (menu-bar-non-minibuffer-window-p))
|
|
|
|
|
(> count 1))))
|
1995-04-24 15:26:19 +00:00
|
|
|
|
|
2005-09-10 10:55:14 +00:00
|
|
|
|
(put 'dired 'menu-enable '(menu-bar-non-minibuffer-window-p))
|
1995-04-24 15:26:19 +00:00
|
|
|
|
|
1993-07-29 04:50:27 +00:00
|
|
|
|
;; Permit deleting frame if it would leave a visible or iconified frame.
|
1995-05-24 01:02:08 +00:00
|
|
|
|
(defun delete-frame-enabled-p ()
|
|
|
|
|
"Return non-nil if `delete-frame' should be enabled in the menu bar."
|
|
|
|
|
(let ((frames (frame-list))
|
1996-06-21 05:54:19 +00:00
|
|
|
|
(count 0))
|
|
|
|
|
(while frames
|
|
|
|
|
(if (frame-visible-p (car frames))
|
|
|
|
|
(setq count (1+ count)))
|
|
|
|
|
(setq frames (cdr frames)))
|
|
|
|
|
(> count 1)))
|
1993-03-15 01:05:11 +00:00
|
|
|
|
|
1997-05-05 15:06:25 +00:00
|
|
|
|
(defcustom yank-menu-length 20
|
2008-12-03 05:48:14 +00:00
|
|
|
|
"Maximum length to display in the yank-menu."
|
1997-05-05 15:06:25 +00:00
|
|
|
|
:type 'integer
|
2008-04-22 20:36:08 +00:00
|
|
|
|
:group 'menu)
|
1994-09-15 22:16:49 +00:00
|
|
|
|
|
|
|
|
|
(defun menu-bar-update-yank-menu (string old)
|
|
|
|
|
(let ((front (car (cdr yank-menu)))
|
|
|
|
|
(menu-string (if (<= (length string) yank-menu-length)
|
|
|
|
|
string
|
1995-01-30 00:37:22 +00:00
|
|
|
|
(concat
|
|
|
|
|
(substring string 0 (/ yank-menu-length 2))
|
|
|
|
|
"..."
|
|
|
|
|
(substring string (- (/ yank-menu-length 2)))))))
|
1995-07-20 06:14:12 +00:00
|
|
|
|
;; Don't let the menu string be all dashes
|
|
|
|
|
;; because that has a special meaning in a menu.
|
|
|
|
|
(if (string-match "\\`-+\\'" menu-string)
|
|
|
|
|
(setq menu-string (concat menu-string " ")))
|
1994-09-15 22:16:49 +00:00
|
|
|
|
;; If we're supposed to be extending an existing string, and that
|
|
|
|
|
;; string really is at the front of the menu, then update it in place.
|
|
|
|
|
(if (and old (or (eq old (car front))
|
|
|
|
|
(string= old (car front))))
|
1993-07-01 03:31:58 +00:00
|
|
|
|
(progn
|
1994-09-15 22:16:49 +00:00
|
|
|
|
(setcar front string)
|
|
|
|
|
(setcar (cdr front) menu-string))
|
|
|
|
|
(setcdr yank-menu
|
|
|
|
|
(cons
|
|
|
|
|
(cons string (cons menu-string 'menu-bar-select-yank))
|
|
|
|
|
(cdr yank-menu)))))
|
|
|
|
|
(if (> (length (cdr yank-menu)) kill-ring-max)
|
|
|
|
|
(setcdr (nthcdr kill-ring-max yank-menu) nil)))
|
|
|
|
|
|
1997-12-21 01:46:29 +00:00
|
|
|
|
(put 'menu-bar-select-yank 'apropos-inhibit t)
|
1994-09-15 22:16:49 +00:00
|
|
|
|
(defun menu-bar-select-yank ()
|
2006-02-11 16:18:02 +00:00
|
|
|
|
"Insert the stretch of previously-killed text selected from menu.
|
|
|
|
|
The menu shows all the killed text sequences stored in `kill-ring'."
|
1994-09-15 22:16:49 +00:00
|
|
|
|
(interactive "*")
|
|
|
|
|
(push-mark (point))
|
|
|
|
|
(insert last-command-event))
|
2002-04-24 05:35:03 +00:00
|
|
|
|
|
1993-03-15 02:00:20 +00:00
|
|
|
|
|
2008-04-22 20:36:08 +00:00
|
|
|
|
;;; Buffers Menu
|
|
|
|
|
|
|
|
|
|
(defcustom buffers-menu-max-size 10
|
2008-12-03 05:48:14 +00:00
|
|
|
|
"Maximum number of entries which may appear on the Buffers menu.
|
2008-04-22 20:36:08 +00:00
|
|
|
|
If this is 10, then only the ten most-recently-selected buffers are shown.
|
|
|
|
|
If this is nil, then all buffers are shown.
|
|
|
|
|
A large number or nil slows down menu responsiveness."
|
|
|
|
|
:type '(choice integer
|
|
|
|
|
(const :tag "All" nil))
|
|
|
|
|
:group 'menu)
|
|
|
|
|
|
|
|
|
|
(defcustom buffers-menu-buffer-name-length 30
|
2008-12-03 05:48:14 +00:00
|
|
|
|
"Maximum length of the buffer name on the Buffers menu.
|
2008-04-22 20:36:08 +00:00
|
|
|
|
If this is a number, then buffer names are truncated to this length.
|
|
|
|
|
If this is nil, then buffer names are shown in full.
|
|
|
|
|
A large number or nil makes the menu too wide."
|
|
|
|
|
:type '(choice integer
|
|
|
|
|
(const :tag "Full length" nil))
|
|
|
|
|
:group 'menu)
|
|
|
|
|
|
2002-04-24 05:35:03 +00:00
|
|
|
|
(defcustom buffers-menu-show-directories 'unless-uniquify
|
|
|
|
|
"If non-nil, show directories in the Buffers menu for buffers that have them.
|
|
|
|
|
The special value `unless-uniquify' means that directories will be shown
|
|
|
|
|
unless `uniquify-buffer-name-style' is non-nil (in which case, buffer
|
|
|
|
|
names should include enough of a buffer's directory to distinguish it
|
|
|
|
|
from other buffers).
|
|
|
|
|
|
|
|
|
|
Setting this variable directly does not take effect until next time the
|
|
|
|
|
Buffers menu is regenerated."
|
|
|
|
|
:set (lambda (symbol value)
|
|
|
|
|
(set symbol value)
|
|
|
|
|
(menu-bar-update-buffers t))
|
|
|
|
|
:initialize 'custom-initialize-default
|
|
|
|
|
:type '(choice (const :tag "Never" nil)
|
|
|
|
|
(const :tag "Unless uniquify is enabled" unless-uniquify)
|
|
|
|
|
(const :tag "Always" t))
|
|
|
|
|
:group 'menu)
|
|
|
|
|
|
|
|
|
|
(defcustom buffers-menu-show-status t
|
|
|
|
|
"If non-nil, show modified/read-only status of buffers in the Buffers menu.
|
|
|
|
|
Setting this variable directly does not take effect until next time the
|
|
|
|
|
Buffers menu is regenerated."
|
|
|
|
|
:set (lambda (symbol value)
|
|
|
|
|
(set symbol value)
|
|
|
|
|
(menu-bar-update-buffers t))
|
|
|
|
|
:initialize 'custom-initialize-default
|
|
|
|
|
:type 'boolean
|
|
|
|
|
:group 'menu)
|
|
|
|
|
|
2009-09-25 04:35:14 +00:00
|
|
|
|
(defvar list-buffers-directory nil
|
2009-09-25 18:49:01 +00:00
|
|
|
|
"String to display in buffer listings for buffers not visiting a file.")
|
2009-09-25 04:35:14 +00:00
|
|
|
|
(make-variable-buffer-local 'list-buffers-directory)
|
1993-08-14 10:32:54 +00:00
|
|
|
|
|
2008-05-17 14:33:48 +00:00
|
|
|
|
(defun menu-bar-select-buffer ()
|
|
|
|
|
(interactive)
|
|
|
|
|
(switch-to-buffer last-command-event))
|
|
|
|
|
|
2008-03-11 17:44:39 +00:00
|
|
|
|
(defun menu-bar-select-frame (frame)
|
|
|
|
|
(make-frame-visible frame)
|
|
|
|
|
(raise-frame frame)
|
|
|
|
|
(select-frame frame))
|
1994-04-28 03:44:48 +00:00
|
|
|
|
|
1994-10-13 18:20:15 +00:00
|
|
|
|
(defun menu-bar-update-buffers-1 (elt)
|
2002-04-23 14:33:02 +00:00
|
|
|
|
(let* ((buf (car elt))
|
|
|
|
|
(file
|
2002-04-24 05:35:03 +00:00
|
|
|
|
(and (if (eq buffers-menu-show-directories 'unless-uniquify)
|
|
|
|
|
(or (not (boundp 'uniquify-buffer-name-style))
|
|
|
|
|
(null uniquify-buffer-name-style))
|
|
|
|
|
buffers-menu-show-directories)
|
2002-04-23 14:33:02 +00:00
|
|
|
|
(or (buffer-file-name buf)
|
2002-04-24 05:35:03 +00:00
|
|
|
|
(buffer-local-value 'list-buffers-directory buf)))))
|
2002-04-23 14:33:02 +00:00
|
|
|
|
(when file
|
|
|
|
|
(setq file (file-name-directory file)))
|
|
|
|
|
(when (and file (> (length file) 20))
|
|
|
|
|
(setq file (concat "..." (substring file -17))))
|
2002-04-24 05:35:03 +00:00
|
|
|
|
(cons (if buffers-menu-show-status
|
|
|
|
|
(let ((mod (if (buffer-modified-p buf) "*" ""))
|
|
|
|
|
(ro (if (buffer-local-value 'buffer-read-only buf) "%" "")))
|
|
|
|
|
(if file
|
|
|
|
|
(format "%s %s%s -- %s" (cdr elt) mod ro file)
|
|
|
|
|
(format "%s %s%s" (cdr elt) mod ro)))
|
|
|
|
|
(if file
|
|
|
|
|
(format "%s -- %s" (cdr elt) file)
|
|
|
|
|
(cdr elt)))
|
2002-04-23 14:33:02 +00:00
|
|
|
|
buf)))
|
|
|
|
|
|
2002-04-23 08:36:35 +00:00
|
|
|
|
;; Used to cache the menu entries for commands in the Buffers menu
|
|
|
|
|
(defvar menu-bar-buffers-menu-command-entries nil)
|
|
|
|
|
|
2001-02-20 15:25:06 +00:00
|
|
|
|
(defun menu-bar-update-buffers (&optional force)
|
1994-07-24 05:34:16 +00:00
|
|
|
|
;; If user discards the Buffers item, play along.
|
1994-07-26 19:57:59 +00:00
|
|
|
|
(and (lookup-key (current-global-map) [menu-bar buffer])
|
2001-02-20 15:25:06 +00:00
|
|
|
|
(or force (frame-or-buffer-changed-p))
|
1994-07-24 05:34:16 +00:00
|
|
|
|
(let ((buffers (buffer-list))
|
|
|
|
|
(frames (frame-list))
|
2007-10-22 04:10:04 +00:00
|
|
|
|
buffers-menu)
|
1994-07-24 05:34:16 +00:00
|
|
|
|
;; If requested, list only the N most recently selected buffers.
|
|
|
|
|
(if (and (integerp buffers-menu-max-size)
|
|
|
|
|
(> buffers-menu-max-size 1))
|
|
|
|
|
(if (> (length buffers) buffers-menu-max-size)
|
|
|
|
|
(setcdr (nthcdr buffers-menu-max-size buffers) nil)))
|
|
|
|
|
|
|
|
|
|
;; Make the menu of buffers proper.
|
|
|
|
|
(setq buffers-menu
|
2008-03-11 17:44:39 +00:00
|
|
|
|
(let (alist)
|
2002-04-23 05:02:14 +00:00
|
|
|
|
;; Put into each element of buffer-list
|
|
|
|
|
;; the name for actual display,
|
|
|
|
|
;; perhaps truncated in the middle.
|
2008-03-11 17:44:39 +00:00
|
|
|
|
(dolist (buf buffers)
|
|
|
|
|
(let ((name (buffer-name buf)))
|
|
|
|
|
(unless (eq ?\s (aref name 0))
|
|
|
|
|
(push (menu-bar-update-buffers-1
|
|
|
|
|
(cons buf
|
2008-04-22 20:36:08 +00:00
|
|
|
|
(if (and (integerp buffers-menu-buffer-name-length)
|
|
|
|
|
(> (length name) buffers-menu-buffer-name-length))
|
|
|
|
|
(concat
|
|
|
|
|
(substring
|
|
|
|
|
name 0 (/ buffers-menu-buffer-name-length 2))
|
|
|
|
|
"..."
|
|
|
|
|
(substring
|
|
|
|
|
name (- (/ buffers-menu-buffer-name-length 2))))
|
|
|
|
|
name)
|
|
|
|
|
))
|
2008-03-11 17:44:39 +00:00
|
|
|
|
alist))))
|
|
|
|
|
;; Now make the actual list of items.
|
|
|
|
|
(let ((buffers-vec (make-vector (length alist) nil))
|
|
|
|
|
(i (length alist)))
|
|
|
|
|
(dolist (pair alist)
|
|
|
|
|
(setq i (1- i))
|
|
|
|
|
(aset buffers-vec i
|
|
|
|
|
(nconc (list (car pair)
|
2002-04-23 05:02:14 +00:00
|
|
|
|
(cons nil nil))
|
2008-03-11 17:44:39 +00:00
|
|
|
|
`(lambda ()
|
|
|
|
|
(interactive)
|
|
|
|
|
(switch-to-buffer ,(cdr pair))))))
|
|
|
|
|
(list buffers-vec))))
|
1994-07-24 05:34:16 +00:00
|
|
|
|
|
|
|
|
|
;; Make a Frames menu if we have more than one frame.
|
2002-04-23 05:02:14 +00:00
|
|
|
|
(when (cdr frames)
|
2008-03-11 17:44:39 +00:00
|
|
|
|
(let* ((frames-vec (make-vector (length frames) nil))
|
|
|
|
|
(frames-menu
|
|
|
|
|
(cons 'keymap
|
|
|
|
|
(list "Select Frame" frames-vec)))
|
|
|
|
|
(i 0))
|
|
|
|
|
(dolist (frame frames)
|
|
|
|
|
(aset frames-vec i
|
|
|
|
|
(nconc
|
|
|
|
|
(list
|
|
|
|
|
(frame-parameter frame 'name)
|
|
|
|
|
(cons nil nil))
|
|
|
|
|
`(lambda ()
|
|
|
|
|
(interactive) (menu-bar-select-frame ,frame))))
|
|
|
|
|
(setq i (1+ i)))
|
2002-04-23 05:02:14 +00:00
|
|
|
|
;; Put it after the normal buffers
|
|
|
|
|
(setq buffers-menu
|
|
|
|
|
(nconc buffers-menu
|
|
|
|
|
`((frames-separator "--")
|
|
|
|
|
(frames menu-item "Frames" ,frames-menu))))))
|
|
|
|
|
|
2002-04-23 08:36:35 +00:00
|
|
|
|
;; Add in some normal commands at the end of the menu. We use
|
|
|
|
|
;; the copy cached in `menu-bar-buffers-menu-command-entries'
|
|
|
|
|
;; if it's been set already. Note that we can't use constant
|
|
|
|
|
;; lists for the menu-entries, because the low-level menu-code
|
|
|
|
|
;; modifies them.
|
|
|
|
|
(unless menu-bar-buffers-menu-command-entries
|
|
|
|
|
(setq menu-bar-buffers-menu-command-entries
|
|
|
|
|
(list '(command-separator "--")
|
2002-04-27 23:18:21 +00:00
|
|
|
|
(list 'next-buffer
|
|
|
|
|
'menu-item
|
|
|
|
|
"Next Buffer"
|
|
|
|
|
'next-buffer
|
|
|
|
|
:help "Switch to the \"next\" buffer in a cyclic order")
|
2005-12-16 11:35:25 +00:00
|
|
|
|
(list 'previous-buffer
|
2002-04-27 23:18:21 +00:00
|
|
|
|
'menu-item
|
|
|
|
|
"Previous Buffer"
|
2005-12-16 11:35:25 +00:00
|
|
|
|
'previous-buffer
|
2002-04-27 23:18:21 +00:00
|
|
|
|
:help "Switch to the \"previous\" buffer in a cyclic order")
|
2002-04-23 08:36:35 +00:00
|
|
|
|
(list 'select-named-buffer
|
|
|
|
|
'menu-item
|
|
|
|
|
"Select Named Buffer..."
|
|
|
|
|
'switch-to-buffer
|
|
|
|
|
:help "Prompt for a buffer name, and select that buffer in the current window")
|
|
|
|
|
(list 'list-all-buffers
|
|
|
|
|
'menu-item
|
|
|
|
|
"List All Buffers"
|
|
|
|
|
'list-buffers
|
2006-11-06 02:45:12 +00:00
|
|
|
|
:help "Pop up a window listing all Emacs buffers"
|
2002-04-23 08:36:35 +00:00
|
|
|
|
))))
|
2002-04-23 05:02:14 +00:00
|
|
|
|
(setq buffers-menu
|
2002-04-23 08:36:35 +00:00
|
|
|
|
(nconc buffers-menu menu-bar-buffers-menu-command-entries))
|
2002-04-23 05:02:14 +00:00
|
|
|
|
|
2007-10-22 04:10:04 +00:00
|
|
|
|
;; We used to "(define-key (current-global-map) [menu-bar buffer]"
|
|
|
|
|
;; but that did not do the right thing when the [menu-bar buffer]
|
|
|
|
|
;; entry above had been moved (e.g. to a parent keymap).
|
|
|
|
|
(setcdr global-buffers-menu-map (cons "Select Buffer" buffers-menu)))))
|
1994-04-28 03:44:48 +00:00
|
|
|
|
|
|
|
|
|
(add-hook 'menu-bar-update-hook 'menu-bar-update-buffers)
|
1993-03-15 01:05:11 +00:00
|
|
|
|
|
1995-07-21 08:30:54 +00:00
|
|
|
|
(menu-bar-update-buffers)
|
|
|
|
|
|
1993-03-15 02:00:20 +00:00
|
|
|
|
;; this version is too slow
|
2002-09-11 21:56:50 +00:00
|
|
|
|
;;(defun format-buffers-menu-line (buffer)
|
|
|
|
|
;; "Returns a string to represent the given buffer in the Buffer menu.
|
|
|
|
|
;;nil means the buffer shouldn't be listed. You can redefine this."
|
|
|
|
|
;; (if (string-match "\\` " (buffer-name buffer))
|
|
|
|
|
;; nil
|
* x-dnd.el (x-dnd-maybe-call-test-function):
* window.el (split-window-vertically):
* whitespace.el (whitespace-help-on):
* vc-rcs.el (vc-rcs-consult-headers):
* userlock.el (ask-user-about-lock-help)
(ask-user-about-supersession-help):
* type-break.el (type-break-force-mode-line-update):
* time-stamp.el (time-stamp-conv-warn):
* terminal.el (te-set-output-log, te-more-break, te-filter)
(te-sentinel,terminal-emulator):
* term.el (make-term, term-exec, term-sentinel, term-read-input-ring)
(term-write-input-ring, term-check-source, term-start-output-log):
(term-display-buffer-line, term-dynamic-list-completions):
(term-ansi-make-term, serial-term):
* subr.el (selective-display):
* strokes.el (strokes-xpm-to-compressed-string, strokes-decode-buffer)
(strokes-encode-buffer, strokes-xpm-for-compressed-string):
* speedbar.el (speedbar-buffers-tail-notes, speedbar-buffers-item-info)
(speedbar-reconfigure-keymaps, speedbar-add-localized-speedbar-support)
(speedbar-remove-localized-speedbar-support)
(speedbar-set-mode-line-format, speedbar-create-tag-hierarchy)
(speedbar-update-special-contents, speedbar-buffer-buttons-engine)
(speedbar-buffers-line-directory):
* simple.el (shell-command-on-region, append-to-buffer)
(prepend-to-buffer):
* shadowfile.el (shadow-save-todo-file):
* scroll-bar.el (scroll-bar-set-window-start, scroll-bar-drag-1)
(scroll-bar-maybe-set-window-start):
* sb-image.el (speedbar-image-dump):
* saveplace.el (save-place-alist-to-file, save-places-to-alist)
(load-save-place-alist-from-file):
* ps-samp.el (ps-print-message-from-summary):
* ps-print.el (ps-flush-output, ps-insert-file, ps-get-boundingbox)
(ps-background-image, ps-begin-job, ps-do-despool):
* ps-bdf.el (bdf-find-file, bdf-read-font-info):
* printing.el (pr-interface, pr-ps-file-print, pr-find-buffer-visiting)
(pr-ps-message-from-summary, pr-lpr-message-from-summary):
(pr-call-process, pr-file-list, pr-interface-save):
* novice.el (disabled-command-function)
(enable-command, disable-command):
* mouse.el (mouse-buffer-menu-alist):
* mouse-copy.el (mouse-kill-preserving-secondary):
* macros.el (kbd-macro-query):
* ledit.el (ledit-go-to-lisp, ledit-go-to-liszt):
* informat.el (batch-info-validate):
* ido.el (ido-copy-current-word, ido-initiate-auto-merge):
* hippie-exp.el (try-expand-dabbrev-visible):
* help-mode.el (help-make-xrefs):
* help-fns.el (describe-variable):
* generic-x.el (bat-generic-mode-run-as-comint):
* finder.el (finder-mouse-select):
* find-dired.el (find-dired-sentinel):
* filesets.el (filesets-file-close):
* files.el (list-directory):
* faces.el (list-faces-display, describe-face):
* facemenu.el (list-colors-display):
* ezimage.el (ezimage-image-association-dump, ezimage-image-dump):
* epg.el (epg--process-filter, epg-cancel):
* epa.el (epa--marked-keys, epa--select-keys, epa-display-info)
(epa--read-signature-type):
* emerge.el (emerge-copy-as-kill-A, emerge-copy-as-kill-B)
(emerge-file-names):
* ehelp.el (electric-helpify):
* ediff.el (ediff-regions-wordwise, ediff-regions-linewise):
* ediff-vers.el (rcs-ediff-view-revision):
* ediff-util.el (ediff-setup):
* ediff-mult.el (ediff-append-custom-diff):
* ediff-diff.el (ediff-exec-process, ediff-process-sentinel)
(ediff-wordify):
* echistory.el (Electric-command-history-redo-expression):
* dos-w32.el (find-file-not-found-set-buffer-file-coding-system):
* disp-table.el (describe-display-table):
* dired.el (dired-find-buffer-nocreate):
* dired-aux.el (dired-rename-subdir, dired-dwim-target-directory):
* dabbrev.el (dabbrev--same-major-mode-p):
* chistory.el (list-command-history):
* apropos.el (apropos-documentation):
* allout.el (allout-obtain-passphrase):
(allout-copy-exposed-to-buffer):
(allout-verify-passphrase): Use with-current-buffer.
2009-11-13 22:19:45 +00:00
|
|
|
|
;; (with-current-buffer buffer
|
2002-09-11 21:56:50 +00:00
|
|
|
|
;; (let ((size (buffer-size)))
|
|
|
|
|
;; (format "%s%s %-19s %6s %-15s %s"
|
|
|
|
|
;; (if (buffer-modified-p) "*" " ")
|
|
|
|
|
;; (if buffer-read-only "%" " ")
|
|
|
|
|
;; (buffer-name)
|
|
|
|
|
;; size
|
|
|
|
|
;; mode-name
|
|
|
|
|
;; (or (buffer-file-name) ""))))))
|
1993-03-15 02:00:20 +00:00
|
|
|
|
|
1995-06-29 03:11:37 +00:00
|
|
|
|
;;; Set up a menu bar menu for the minibuffer.
|
|
|
|
|
|
2001-10-12 19:59:43 +00:00
|
|
|
|
(dolist (map (list minibuffer-local-map
|
|
|
|
|
;; This shouldn't be necessary, but there's a funny
|
|
|
|
|
;; bug in keymap.c that I don't understand yet. -stef
|
2000-11-03 22:28:30 +00:00
|
|
|
|
minibuffer-local-completion-map))
|
|
|
|
|
(define-key map [menu-bar minibuf]
|
2009-10-23 05:15:26 +00:00
|
|
|
|
(cons (purecopy "Minibuf") (make-sparse-keymap "Minibuf"))))
|
2000-11-03 22:28:30 +00:00
|
|
|
|
|
2001-10-12 19:59:43 +00:00
|
|
|
|
(let ((map minibuffer-local-completion-map))
|
2000-11-03 22:28:30 +00:00
|
|
|
|
(define-key map [menu-bar minibuf ?\?]
|
2009-09-17 10:31:15 +00:00
|
|
|
|
`(menu-item ,(purecopy "List Completions") minibuffer-completion-help
|
|
|
|
|
:help ,(purecopy "Display all possible completions")))
|
2000-11-03 22:28:30 +00:00
|
|
|
|
(define-key map [menu-bar minibuf space]
|
2009-09-17 10:31:15 +00:00
|
|
|
|
`(menu-item ,(purecopy "Complete Word") minibuffer-complete-word
|
|
|
|
|
:help ,(purecopy "Complete at most one word")))
|
2000-11-03 22:28:30 +00:00
|
|
|
|
(define-key map [menu-bar minibuf tab]
|
2009-09-17 10:31:15 +00:00
|
|
|
|
`(menu-item ,(purecopy "Complete") minibuffer-complete
|
|
|
|
|
:help ,(purecopy "Complete as far as possible"))))
|
2000-11-03 22:28:30 +00:00
|
|
|
|
|
2001-10-12 19:59:43 +00:00
|
|
|
|
(let ((map minibuffer-local-map))
|
2000-11-03 22:28:30 +00:00
|
|
|
|
(define-key map [menu-bar minibuf quit]
|
2009-09-17 10:31:15 +00:00
|
|
|
|
`(menu-item ,(purecopy "Quit") abort-recursive-edit
|
|
|
|
|
:help ,(purecopy "Abort input and exit minibuffer")))
|
2000-11-03 22:28:30 +00:00
|
|
|
|
(define-key map [menu-bar minibuf return]
|
2009-09-17 10:31:15 +00:00
|
|
|
|
`(menu-item ,(purecopy "Enter") exit-minibuffer
|
* textmodes/tex-mode.el (tex-alt-dvi-print-command)
(tex-dvi-print-command, tex-bibtex-command, tex-start-commands)
(tex-start-options, slitex-run-command, latex-run-command)
(tex-run-command, tex-directory):
* textmodes/ispell.el (ispell-html-skip-alists)
(ispell-tex-skip-alists, ispell-tex-skip-alists):
* textmodes/fill.el (adaptive-fill-first-line-regexp):
(adaptive-fill-regexp):
* textmodes/dns-mode.el (auto-mode-alist):
* progmodes/python.el (interpreter-mode-alist):
* progmodes/etags.el (tags-compression-info-list):
* progmodes/etags.el (tags-file-name):
* net/browse-url.el (browse-url-galeon-program)
(browse-url-firefox-program):
* mail/sendmail.el (mail-signature-file)
(mail-citation-prefix-regexp):
* international/mule-conf.el (eight-bit):
* international/latexenc.el (latex-inputenc-coding-alist):
* international/fontset.el (x-pixel-size-width-font-regexp):
* emacs-lisp/warnings.el (warning-type-format):
* emacs-lisp/trace.el (trace-buffer):
* emacs-lisp/lisp-mode.el (lisp-interaction-mode-map)
(emacs-lisp-mode-map):
* calendar/holidays.el (holiday-solar-holidays)
(holiday-bahai-holidays, holiday-islamic-holidays)
(holiday-christian-holidays, holiday-hebrew-holidays)
(hebrew-holidays-4, hebrew-holidays-3, hebrew-holidays-2)
(hebrew-holidays-1, holiday-oriental-holidays)
(holiday-general-holidays):
* x-dnd.el (x-dnd-known-types):
* tool-bar.el (tool-bar):
* startup.el (site-run-file):
* shell.el (shell-dumb-shell-regexp):
* rfn-eshadow.el (file-name-shadow-tty-properties)
(file-name-shadow-properties):
* paths.el (remote-shell-program, news-directory):
* mouse.el ([C-down-mouse-3]):
* menu-bar.el (menu-bar-tools-menu):
* jka-cmpr-hook.el (jka-compr-load-suffixes)
(jka-compr-mode-alist-additions, jka-compr-compression-info-list)
(jka-compr-compression-info-list):
* isearch.el (search-whitespace-regexp):
* image-file.el (image-file-name-extensions):
* find-dired.el (find-ls-option):
* files.el (directory-listing-before-filename-regexp)
(directory-free-space-args, insert-directory-program)
(list-directory-brief-switches, magic-fallback-mode-alist)
(magic-fallback-mode-alist, auto-mode-interpreter-regexp)
(automount-dir-prefix):
* faces.el (face-x-resources, x-font-regexp, x-font-regexp-head)
(x-font-regexp-slant, x-font-regexp-weight, face-x-resources)
(face-font-registry-alternatives, face-font-registry-alternatives)
(face-font-family-alternatives):
* facemenu.el (facemenu-add-new-face, facemenu-background-menu)
(facemenu-foreground-menu, facemenu-face-menu):
* epa-hook.el (epa-file-name-regexp):
* dnd.el (dnd-protocol-alist):
* textmodes/rst.el (auto-mode-alist):
* button.el (default-button): Purecopy strings.
2009-11-06 05:16:23 +00:00
|
|
|
|
:key-sequence ,(purecopy "\r")
|
2009-09-17 10:31:15 +00:00
|
|
|
|
:help ,(purecopy "Terminate input and exit minibuffer")))
|
2008-02-28 20:46:30 +00:00
|
|
|
|
(define-key map [menu-bar minibuf isearch-forward]
|
2009-09-17 10:31:15 +00:00
|
|
|
|
`(menu-item ,(purecopy "Isearch History Forward") isearch-forward
|
|
|
|
|
:help ,(purecopy "Incrementally search minibuffer history forward")))
|
2008-02-28 20:46:30 +00:00
|
|
|
|
(define-key map [menu-bar minibuf isearch-backward]
|
2009-09-17 10:31:15 +00:00
|
|
|
|
`(menu-item ,(purecopy "Isearch History Backward") isearch-backward
|
|
|
|
|
:help ,(purecopy "Incrementally search minibuffer history backward")))
|
2008-02-28 20:46:30 +00:00
|
|
|
|
(define-key map [menu-bar minibuf next]
|
2009-09-17 10:31:15 +00:00
|
|
|
|
`(menu-item ,(purecopy "Next History Item") next-history-element
|
|
|
|
|
:help ,(purecopy "Put next minibuffer history element in the minibuffer")))
|
2008-02-28 20:46:30 +00:00
|
|
|
|
(define-key map [menu-bar minibuf previous]
|
2009-09-17 10:31:15 +00:00
|
|
|
|
`(menu-item ,(purecopy "Previous History Item") previous-history-element
|
|
|
|
|
:help ,(purecopy "Put previous minibuffer history element in the minibuffer"))))
|
1995-06-29 03:11:37 +00:00
|
|
|
|
|
2003-03-01 15:55:04 +00:00
|
|
|
|
;;;###autoload
|
Moved all remaining images from lisp/toolbar to etc/images, moved
lisp/toolbar/tool-bar to lisp and "deleted" lisp/toolbar. The low
resolution images were placed in their own directory (low-color).
Replaced underscore (_) in filenames with dash (-) per convention
* make-dist: Create and populate etc/images/low-color.
* admin/FOR-RELEASE (DOCUMENTATION): Removed lisp/toolbar from list
since it's gone. Also marked mh-e as done.
* lisp/toolbar/attach.*, lisp/toolbar/cancel.*, lisp/toolbar/close.*:
* lisp/toolbar/copy.*, lisp/toolbar/cut.*, lisp/toolbar/diropen.*:
* lisp/toolbar/exit.*, lisp/toolbar/help.*, lisp/toolbar/home.*:
* lisp/toolbar/index.*, lisp/toolbar/info.*, lisp/toolbar/mail.*:
* lisp/toolbar/new.*, lisp/toolbar/open.*, lisp/toolbar/paste.*, *
* lisp/toolbar/preferences.*, lisp/toolbar/print.*, lisp/toolbar/save.*:
* lisp/toolbar/saveas.*, lisp/toolbar/search.*:
* lisp/toolbar/search-replace.*: lisp/toolbar/spell.*:
* lisp/toolbar/undo.*: Moved to etc/images.
* lisp/toolbar/lc-copy.*: Moved to etc/images/low-color/copy.*.
* lisp/toolbar/lc-cut.*: Moved to etc/images/low-color/cut.*.
* lisp/toolbar/lc-help.*: Moved to etc/images/low-color/help.*.
* lisp/toolbar/lc-home.*: Moved to etc/images/low-color/home.*.
* lisp/toolbar/lc-index.*: Moved to etc/images/low-color/index.*.
* lisp/toolbar/lc-new.*: Moved to etc/images/low-color/new.*.
* lisp/toolbar/lc-open.*: Moved to etc/images/low-color/open.*.
* lisp/toolbar/lc-paste.*: Moved to etc/images/low-color/paste.*.
* lisp/toolbar/lc-preferences.*: Moved to etc/images/low-color/preferences.*.
* lisp/toolbar/lc-print.*: Moved to etc/images/low-color/print.*.
* lisp/toolbar/lc-save.*: Moved to etc/images/low-color/save.*.
* lisp/toolbar/lc-saveas.*: Moved to etc/images/low-color/saveas.*.
* lisp/toolbar/lc-search.*: Moved to etc/images/low-color/search.*.
* lisp/toolbar/lc-spell.*: Moved to etc/images/low-color/spell.*.
* lisp/toolbar/lc-undo.*: Moved to etc/images/low-color/undo.*.
To conform with convention, the underscore (_) in the following image
names were replaced with dash (-) or (/) as appropriate.
* lisp/toolbar/back_arrow.*: Moved to etc/images/back-arrow.*.
* lisp/toolbar/fld_open.*: Moved to etc/images/fld-open.*.
* lisp/toolbar/fwd_arrow.*: Moved to etc/images/fwd-arrow.*.
* lisp/toolbar/jump_to.*: Moved to etc/images/jump-to.*.
* lisp/toolbar/left_arrow.*: Moved to etc/images/left-arrow.*.
* lisp/toolbar/right_arrow.*: Moved to etc/images/right-arrow.*.
* lisp/toolbar/up_arrow.*: Moved to etc/images/up-arrow.*.
* lisp/toolbar/lc-back_arrow.*.: Moved to etc/images/low-color/back-arrow.*.
* lisp/toolbar/lc-fwd_arrow.*.: Moved to etc/images/low-color/fwd-arrow.*.
* lisp/toolbar/lc-jump_to.*: Moved to etc/images/low-color/jump-to.*.
* lisp/toolbar/lc-left_arrow.*.: Moved to etc/images/low-color/left-arrow.*.
* lisp/toolbar/lc-right_arrow.*.: Moved to etc/images/low-color/right-arrow.*.
* lisp/toolbar/lc-up_arrow.*: Moved to etc/images/low-color/up-arrow.*.
* lisp/toolbar/mail_compose.*.: Moved to etc/images/mail/compose.*.
* lisp/toolbar/mail_send.*: Moved to etc/images/mail/send.*.
* lisp/info.el (info-tool-bar-map): Replaced underscores in image
names with dashes.
* lisp/makefile.w32-in (WINS): Removed toolbar.
* lisp/menu-bar.el: Replaced toolbar/tool-bar.el with tool-bar.el in
comment.
* lisp/tool-bar.el: Moved to lisp from lisp/toolbar. Now that
lisp/toolbar is empty, it should be deleted when folks run "cvs up
-P".
* etc/images/README: Incorporated the content of lisp/toolbar/README
now that all of the images are here.
2005-10-17 22:21:06 +00:00
|
|
|
|
;; This comment is taken from tool-bar.el near
|
2003-03-01 15:55:04 +00:00
|
|
|
|
;; (put 'tool-bar-mode ...)
|
|
|
|
|
;; We want to pretend the menu bar by standard is on, as this will make
|
|
|
|
|
;; customize consider disabling the menu bar a customization, and save
|
|
|
|
|
;; that. We could do this for real by setting :init-value below, but
|
|
|
|
|
;; that would overwrite disabling the tool bar from X resources.
|
|
|
|
|
(put 'menu-bar-mode 'standard-value '(t))
|
|
|
|
|
|
|
|
|
|
(define-minor-mode menu-bar-mode
|
1993-05-24 05:06:35 +00:00
|
|
|
|
"Toggle display of a menu bar on each frame.
|
1993-05-17 04:45:03 +00:00
|
|
|
|
This command applies to all frames that exist and frames to be
|
|
|
|
|
created in the future.
|
1998-07-02 22:09:29 +00:00
|
|
|
|
With a numeric argument, if the argument is positive,
|
|
|
|
|
turn on menu bars; otherwise, turn off menu bars."
|
2003-03-01 15:55:04 +00:00
|
|
|
|
:init-value nil
|
|
|
|
|
:global t
|
|
|
|
|
:group 'frames
|
2006-03-26 13:57:43 +00:00
|
|
|
|
|
1994-06-25 18:20:30 +00:00
|
|
|
|
;; Make menu-bar-mode and default-frame-alist consistent.
|
2006-03-26 13:57:43 +00:00
|
|
|
|
(modify-all-frames-parameters (list (cons 'menu-bar-lines
|
|
|
|
|
(if menu-bar-mode 1 0))))
|
2003-03-01 15:55:04 +00:00
|
|
|
|
|
|
|
|
|
;; Make the message appear when Emacs is idle. We can not call message
|
|
|
|
|
;; directly. The minor-mode message "Menu-bar mode disabled" comes
|
|
|
|
|
;; after this function returns, overwriting any message we do here.
|
2009-10-02 03:48:36 +00:00
|
|
|
|
(when (and (called-interactively-p 'interactive) (not menu-bar-mode))
|
2003-03-01 15:55:04 +00:00
|
|
|
|
(run-with-idle-timer 0 nil 'message
|
|
|
|
|
"Menu-bar mode disabled. Use M-x menu-bar-mode to make the menu bar appear."))
|
2002-09-06 20:27:59 +00:00
|
|
|
|
menu-bar-mode)
|
1993-04-08 07:10:13 +00:00
|
|
|
|
|
2006-03-26 14:20:01 +00:00
|
|
|
|
(defun toggle-menu-bar-mode-from-frame (&optional arg)
|
|
|
|
|
"Toggle menu bar on or off, based on the status of the current frame.
|
|
|
|
|
See `menu-bar-mode' for more information."
|
|
|
|
|
(interactive (list (or current-prefix-arg 'toggle)))
|
|
|
|
|
(if (eq arg 'toggle)
|
|
|
|
|
(menu-bar-mode (if (> (frame-parameter nil 'menu-bar-lines) 0) 0 1))
|
|
|
|
|
(menu-bar-mode arg)))
|
|
|
|
|
|
2007-11-22 13:51:09 +00:00
|
|
|
|
(declare-function x-menu-bar-open "term/x-win" (&optional frame))
|
2008-06-12 03:54:06 +00:00
|
|
|
|
(declare-function w32-menu-bar-open "term/w32-win" (&optional frame))
|
2007-11-22 13:51:09 +00:00
|
|
|
|
|
2006-07-29 20:57:26 +00:00
|
|
|
|
(defun menu-bar-open (&optional frame)
|
|
|
|
|
"Start key navigation of the menu bar in FRAME.
|
|
|
|
|
|
|
|
|
|
This function decides which method to use to access the menu
|
|
|
|
|
depending on FRAME's terminal device. On X displays, it calls
|
2008-06-11 00:25:24 +00:00
|
|
|
|
`x-menu-bar-open'; on Windows, `w32-menu-bar-open' otherwise it
|
|
|
|
|
calls `tmm-menubar'.
|
2006-07-29 20:57:26 +00:00
|
|
|
|
|
|
|
|
|
If FRAME is nil or not given, use the selected frame."
|
|
|
|
|
(interactive)
|
2008-06-11 00:25:24 +00:00
|
|
|
|
(let ((type (framep (or frame (selected-frame)))))
|
|
|
|
|
(cond
|
|
|
|
|
((eq type 'x) (x-menu-bar-open frame))
|
|
|
|
|
((eq type 'w32) (w32-menu-bar-open frame))
|
|
|
|
|
(t (with-selected-frame (or frame (selected-frame))
|
|
|
|
|
(tmm-menubar))))))
|
2006-07-29 20:57:26 +00:00
|
|
|
|
|
|
|
|
|
(global-set-key [f10] 'menu-bar-open)
|
|
|
|
|
|
1993-05-13 03:34:18 +00:00
|
|
|
|
(provide 'menu-bar)
|
|
|
|
|
|
2007-10-22 04:10:04 +00:00
|
|
|
|
;; arch-tag: 6e6a3c22-4ec4-4d3d-8190-583f8ef94ced
|
1993-04-08 16:17:43 +00:00
|
|
|
|
;;; menu-bar.el ends here
|