Get rid of all the manual purecopy calls in menu-bar definitions.

* lisp/loadup.el (purify-flag): Pre-grow the hash-table to reduce the
memory use.
* lisp/bindings.el (bindings--define-key): New function.
* lisp/vc/vc-hooks.el, lisp/replace.el, lisp/menu-bar.el:
* lisp/international/mule-cmds.el, lisp/emacs-lisp/lisp-mode.el:
* lisp/buff-menu.el, lisp/bookmark.el:
* bindings.el: Use it to purecopy define-key bindings.
* src/fns.c (maybe_resize_hash_table): Output message when growing the
purify-hashtable.
This commit is contained in:
Stefan Monnier 2012-06-27 17:15:13 -04:00
parent e309e2a566
commit 1ec4b7b259
14 changed files with 1226 additions and 1190 deletions

View file

@ -1,5 +1,12 @@
2012-06-27 Stefan Monnier <monnier@iro.umontreal.ca>
* loadup.el (purify-flag): Pre-grow the hash-table to reduce the
memory use.
* bindings.el (bindings--define-key): New function.
* vc/vc-hooks.el, replace.el, menu-bar.el, international/mule-cmds.el:
* emacs-lisp/lisp-mode.el, buff-menu.el, bookmark.el:
* bindings.el: Use it to purecopy define-key bindings.
* textmodes/rst.el (rst-adornment-faces-alist): Avoid copy-list.
* emacs-lisp/cl.el (flet): Mark obsolete.

View file

@ -273,14 +273,34 @@ Normally nil in most modes, since there is no process to display.")
(put 'mode-line-process 'risky-local-variable t)
(make-variable-buffer-local 'mode-line-process)
(defun bindings--define-key (map key item)
"Make as much as possible of the menus pure."
(declare (indent 2))
(define-key map key
(cond
((not (consp item)) item) ;Not sure that could be other than a symbol.
;; Keymaps can't be made pure otherwise users can't remove/add elements
;; from/to them any more.
((keymapp item) item)
((stringp (car item))
(if (keymapp (cdr item))
(cons (purecopy (car item)) (cdr item))
(purecopy item)))
((eq 'menu-item (car item))
(if (keymapp (nth 2 item))
`(menu-item ,(purecopy (nth 1 item)) ,(nth 2 item)
,@(purecopy (nthcdr 3 item)))
(purecopy item)))
(t (message "non-menu-item: %S" item) item))))
(defvar mode-line-mode-menu (make-sparse-keymap "Minor Modes") "\
Menu of mode operations in the mode line.")
(defvar mode-line-major-mode-keymap
(let ((map (make-sparse-keymap)))
(define-key map [mode-line down-mouse-1]
`(menu-item ,(purecopy "Menu Bar") ignore
:filter (lambda (_) (mouse-menu-major-mode-map))))
(bindings--define-key map [mode-line down-mouse-1]
`(menu-item "Menu Bar" ignore
:filter ,(lambda (_) (mouse-menu-major-mode-map))))
(define-key map [mode-line mouse-2] 'describe-mode)
(define-key map [mode-line down-mouse-3] mode-line-mode-menu)
map) "\
@ -327,13 +347,13 @@ mouse-3: Toggle minor modes"
(defvar mode-line-column-line-number-mode-map
(let ((map (make-sparse-keymap))
(menu-map (make-sparse-keymap "Toggle Line and Column Number Display")))
(define-key menu-map [line-number-mode]
`(menu-item ,(purecopy "Display Line Numbers") line-number-mode
:help ,(purecopy "Toggle displaying line numbers in the mode-line")
(bindings--define-key menu-map [line-number-mode]
'(menu-item "Display Line Numbers" line-number-mode
:help "Toggle displaying line numbers in the mode-line"
:button (:toggle . line-number-mode)))
(define-key menu-map [column-number-mode]
`(menu-item ,(purecopy "Display Column Numbers") column-number-mode
:help ,(purecopy "Toggle displaying column numbers in the mode-line")
(bindings--define-key menu-map [column-number-mode]
'(menu-item "Display Column Numbers" column-number-mode
:help "Toggle displaying column numbers in the mode-line"
:button (:toggle . column-number-mode)))
(define-key map [mode-line down-mouse-1] menu-map)
map) "\
@ -491,51 +511,51 @@ Switch to the most recently selected buffer other than the current one."
;; Use mode-line-mode-menu for local minor-modes only.
;; Global ones can go on the menubar (Options --> Show/Hide).
(define-key mode-line-mode-menu [overwrite-mode]
`(menu-item ,(purecopy "Overwrite (Ovwrt)") overwrite-mode
:help ,(purecopy "Overwrite mode: typed characters replace existing text")
(bindings--define-key mode-line-mode-menu [overwrite-mode]
'(menu-item "Overwrite (Ovwrt)" overwrite-mode
:help "Overwrite mode: typed characters replace existing text"
:button (:toggle . overwrite-mode)))
(define-key mode-line-mode-menu [outline-minor-mode]
`(menu-item ,(purecopy "Outline (Outl)") outline-minor-mode
(bindings--define-key mode-line-mode-menu [outline-minor-mode]
'(menu-item "Outline (Outl)" outline-minor-mode
;; XXX: This needs a good, brief description.
:help ,(purecopy "")
:help ""
:button (:toggle . (bound-and-true-p outline-minor-mode))))
(define-key mode-line-mode-menu [highlight-changes-mode]
`(menu-item ,(purecopy "Highlight changes (Chg)") highlight-changes-mode
:help ,(purecopy "Show changes in the buffer in a distinctive color")
(bindings--define-key mode-line-mode-menu [highlight-changes-mode]
'(menu-item "Highlight changes (Chg)" highlight-changes-mode
:help "Show changes in the buffer in a distinctive color"
:button (:toggle . (bound-and-true-p highlight-changes-mode))))
(define-key mode-line-mode-menu [hide-ifdef-mode]
`(menu-item ,(purecopy "Hide ifdef (Ifdef)") hide-ifdef-mode
:help ,(purecopy "Show/Hide code within #ifdef constructs")
(bindings--define-key mode-line-mode-menu [hide-ifdef-mode]
'(menu-item "Hide ifdef (Ifdef)" hide-ifdef-mode
:help "Show/Hide code within #ifdef constructs"
:button (:toggle . (bound-and-true-p hide-ifdef-mode))))
(define-key mode-line-mode-menu [glasses-mode]
`(menu-item ,(purecopy "Glasses (o^o)") glasses-mode
:help ,(purecopy "Insert virtual separators to make long identifiers easy to read")
(bindings--define-key mode-line-mode-menu [glasses-mode]
'(menu-item "Glasses (o^o)" glasses-mode
:help "Insert virtual separators to make long identifiers easy to read"
:button (:toggle . (bound-and-true-p glasses-mode))))
(define-key mode-line-mode-menu [font-lock-mode]
`(menu-item ,(purecopy "Font Lock") font-lock-mode
:help ,(purecopy "Syntax coloring")
(bindings--define-key mode-line-mode-menu [font-lock-mode]
'(menu-item "Font Lock" font-lock-mode
:help "Syntax coloring"
:button (:toggle . font-lock-mode)))
(define-key mode-line-mode-menu [flyspell-mode]
`(menu-item ,(purecopy "Flyspell (Fly)") flyspell-mode
:help ,(purecopy "Spell checking on the fly")
(bindings--define-key mode-line-mode-menu [flyspell-mode]
'(menu-item "Flyspell (Fly)" flyspell-mode
:help "Spell checking on the fly"
:button (:toggle . (bound-and-true-p flyspell-mode))))
(define-key mode-line-mode-menu [auto-revert-tail-mode]
`(menu-item ,(purecopy "Auto revert tail (Tail)") auto-revert-tail-mode
:help ,(purecopy "Revert the tail of the buffer when buffer grows")
(bindings--define-key mode-line-mode-menu [auto-revert-tail-mode]
'(menu-item "Auto revert tail (Tail)" auto-revert-tail-mode
:help "Revert the tail of the buffer when buffer grows"
:enable (buffer-file-name)
:button (:toggle . (bound-and-true-p auto-revert-tail-mode))))
(define-key mode-line-mode-menu [auto-revert-mode]
`(menu-item ,(purecopy "Auto revert (ARev)") auto-revert-mode
:help ,(purecopy "Revert the buffer when the file on disk changes")
(bindings--define-key mode-line-mode-menu [auto-revert-mode]
'(menu-item "Auto revert (ARev)" auto-revert-mode
:help "Revert the buffer when the file on disk changes"
:button (:toggle . (bound-and-true-p auto-revert-mode))))
(define-key mode-line-mode-menu [auto-fill-mode]
`(menu-item ,(purecopy "Auto fill (Fill)") auto-fill-mode
:help ,(purecopy "Automatically insert new lines")
(bindings--define-key mode-line-mode-menu [auto-fill-mode]
'(menu-item "Auto fill (Fill)" auto-fill-mode
:help "Automatically insert new lines"
:button (:toggle . auto-fill-function)))
(define-key mode-line-mode-menu [abbrev-mode]
`(menu-item ,(purecopy "Abbrev (Abbrev)") abbrev-mode
:help ,(purecopy "Automatically expand abbreviations")
(bindings--define-key mode-line-mode-menu [abbrev-mode]
'(menu-item "Abbrev (Abbrev)" abbrev-mode
:help "Automatically expand abbreviations"
:button (:toggle . abbrev-mode)))
(defun mode-line-minor-mode-help (event)

View file

@ -2115,36 +2115,36 @@ strings returned are not."
;;;###autoload
(defvar menu-bar-bookmark-map
(let ((map (make-sparse-keymap "Bookmark functions")))
(define-key map [load]
`(menu-item ,(purecopy "Load a Bookmark File...") bookmark-load
:help ,(purecopy "Load bookmarks from a bookmark file)")))
(define-key map [write]
`(menu-item ,(purecopy "Save Bookmarks As...") bookmark-write
:help ,(purecopy "Write bookmarks to a file (reading the file name with the minibuffer)")))
(define-key map [save]
`(menu-item ,(purecopy "Save Bookmarks") bookmark-save
:help ,(purecopy "Save currently defined bookmarks")))
(define-key map [edit]
`(menu-item ,(purecopy "Edit Bookmark List") bookmark-bmenu-list
:help ,(purecopy "Display a list of existing bookmarks")))
(define-key map [delete]
`(menu-item ,(purecopy "Delete Bookmark...") bookmark-delete
:help ,(purecopy "Delete a bookmark from the bookmark list")))
(define-key map [rename]
`(menu-item ,(purecopy "Rename Bookmark...") bookmark-rename
:help ,(purecopy "Change the name of a bookmark")))
(define-key map [locate]
`(menu-item ,(purecopy "Insert Location...") bookmark-locate
:help ,(purecopy "Insert the name of the file associated with a bookmark")))
(define-key map [insert]
`(menu-item ,(purecopy "Insert Contents...") bookmark-insert
:help ,(purecopy "Insert the text of the file pointed to by a bookmark")))
(define-key map [set]
`(menu-item ,(purecopy "Set Bookmark...") bookmark-set
:help ,(purecopy "Set a bookmark named inside a file.")))
(define-key map [jump]
`(menu-item ,(purecopy "Jump to Bookmark...") bookmark-jump
:help ,(purecopy "Jump to a bookmark (a point in some file)")))
(bindings--define-key map [load]
'(menu-item "Load a Bookmark File..." bookmark-load
:help "Load bookmarks from a bookmark file)"))
(bindings--define-key map [write]
'(menu-item "Save Bookmarks As..." bookmark-write
:help "Write bookmarks to a file (reading the file name with the minibuffer)"))
(bindings--define-key map [save]
'(menu-item "Save Bookmarks" bookmark-save
:help "Save currently defined bookmarks"))
(bindings--define-key map [edit]
'(menu-item "Edit Bookmark List" bookmark-bmenu-list
:help "Display a list of existing bookmarks"))
(bindings--define-key map [delete]
'(menu-item "Delete Bookmark..." bookmark-delete
:help "Delete a bookmark from the bookmark list"))
(bindings--define-key map [rename]
'(menu-item "Rename Bookmark..." bookmark-rename
:help "Change the name of a bookmark"))
(bindings--define-key map [locate]
'(menu-item "Insert Location..." bookmark-locate
:help "Insert the name of the file associated with a bookmark"))
(bindings--define-key map [insert]
'(menu-item "Insert Contents..." bookmark-insert
:help "Insert the text of the file pointed to by a bookmark"))
(bindings--define-key map [set]
'(menu-item "Set Bookmark..." bookmark-set
:help "Set a bookmark named inside a file."))
(bindings--define-key map [jump]
'(menu-item "Jump to Bookmark..." bookmark-jump
:help "Jump to a bookmark (a point in some file)"))
map))
;;;###autoload

View file

@ -134,68 +134,68 @@ commands.")
(define-key map [follow-link] 'mouse-face)
(define-key map [menu-bar Buffer-menu-mode] (cons (purecopy "Buffer-Menu") menu-map))
(define-key menu-map [quit]
`(menu-item ,(purecopy "Quit") quit-window
:help ,(purecopy "Remove the buffer menu from the display")))
(define-key menu-map [rev]
`(menu-item ,(purecopy "Refresh") revert-buffer
:help ,(purecopy "Refresh the *Buffer List* buffer contents")))
(define-key menu-map [s0] menu-bar-separator)
(define-key menu-map [tf]
`(menu-item ,(purecopy "Show Only File Buffers") Buffer-menu-toggle-files-only
(bindings--define-key menu-map [quit]
'(menu-item "Quit" quit-window
:help "Remove the buffer menu from the display"))
(bindings--define-key menu-map [rev]
'(menu-item "Refresh" revert-buffer
:help "Refresh the *Buffer List* buffer contents"))
(bindings--define-key menu-map [s0] menu-bar-separator)
(bindings--define-key menu-map [tf]
'(menu-item "Show Only File Buffers" Buffer-menu-toggle-files-only
:button (:toggle . Buffer-menu-files-only)
:help ,(purecopy "Toggle whether the current buffer-menu displays only file buffers")))
(define-key menu-map [s1] menu-bar-separator)
:help "Toggle whether the current buffer-menu displays only file buffers"))
(bindings--define-key menu-map [s1] menu-bar-separator)
;; FIXME: The "Select" entries could use better names...
(define-key menu-map [sel]
`(menu-item ,(purecopy "Select Marked") Buffer-menu-select
:help ,(purecopy "Select this line's buffer; also display buffers marked with `>'")))
(define-key menu-map [bm2]
`(menu-item ,(purecopy "Select Two") Buffer-menu-2-window
:help ,(purecopy "Select this line's buffer, with previous buffer in second window")))
(define-key menu-map [bm1]
`(menu-item ,(purecopy "Select Current") Buffer-menu-1-window
:help ,(purecopy "Select this line's buffer, alone, in full frame")))
(define-key menu-map [ow]
`(menu-item ,(purecopy "Select in Other Window") Buffer-menu-other-window
:help ,(purecopy "Select this line's buffer in other window, leaving buffer menu visible")))
(define-key menu-map [tw]
`(menu-item ,(purecopy "Select in Current Window") Buffer-menu-this-window
:help ,(purecopy "Select this line's buffer in this window")))
(define-key menu-map [s2] menu-bar-separator)
(define-key menu-map [is]
`(menu-item ,(purecopy "Regexp Isearch Marked Buffers...") Buffer-menu-isearch-buffers-regexp
:help ,(purecopy "Search for a regexp through all marked buffers using Isearch")))
(define-key menu-map [ir]
`(menu-item ,(purecopy "Isearch Marked Buffers...") Buffer-menu-isearch-buffers
:help ,(purecopy "Search for a string through all marked buffers using Isearch")))
(define-key menu-map [s3] menu-bar-separator)
(define-key menu-map [by]
`(menu-item ,(purecopy "Bury") Buffer-menu-bury
:help ,(purecopy "Bury the buffer listed on this line")))
(define-key menu-map [vt]
`(menu-item ,(purecopy "Set Unmodified") Buffer-menu-not-modified
:help ,(purecopy "Mark buffer on this line as unmodified (no changes to save)")))
(define-key menu-map [ex]
`(menu-item ,(purecopy "Execute") Buffer-menu-execute
:help ,(purecopy "Save and/or delete buffers marked with s or k commands")))
(define-key menu-map [s4] menu-bar-separator)
(define-key menu-map [delb]
`(menu-item ,(purecopy "Mark for Delete and Move Backwards") Buffer-menu-delete-backwards
:help ,(purecopy "Mark buffer on this line to be deleted by x command and move up one line")))
(define-key menu-map [del]
`(menu-item ,(purecopy "Mark for Delete") Buffer-menu-delete
:help ,(purecopy "Mark buffer on this line to be deleted by x command")))
(bindings--define-key menu-map [sel]
'(menu-item "Select Marked" Buffer-menu-select
:help "Select this line's buffer; also display buffers marked with `>'"))
(bindings--define-key menu-map [bm2]
'(menu-item "Select Two" Buffer-menu-2-window
:help "Select this line's buffer, with previous buffer in second window"))
(bindings--define-key menu-map [bm1]
'(menu-item "Select Current" Buffer-menu-1-window
:help "Select this line's buffer, alone, in full frame"))
(bindings--define-key menu-map [ow]
'(menu-item "Select in Other Window" Buffer-menu-other-window
:help "Select this line's buffer in other window, leaving buffer menu visible"))
(bindings--define-key menu-map [tw]
'(menu-item "Select in Current Window" Buffer-menu-this-window
:help "Select this line's buffer in this window"))
(bindings--define-key menu-map [s2] menu-bar-separator)
(bindings--define-key menu-map [is]
'(menu-item "Regexp Isearch Marked Buffers..." Buffer-menu-isearch-buffers-regexp
:help "Search for a regexp through all marked buffers using Isearch"))
(bindings--define-key menu-map [ir]
'(menu-item "Isearch Marked Buffers..." Buffer-menu-isearch-buffers
:help "Search for a string through all marked buffers using Isearch"))
(bindings--define-key menu-map [s3] menu-bar-separator)
(bindings--define-key menu-map [by]
'(menu-item "Bury" Buffer-menu-bury
:help "Bury the buffer listed on this line"))
(bindings--define-key menu-map [vt]
'(menu-item "Set Unmodified" Buffer-menu-not-modified
:help "Mark buffer on this line as unmodified (no changes to save)"))
(bindings--define-key menu-map [ex]
'(menu-item "Execute" Buffer-menu-execute
:help "Save and/or delete buffers marked with s or k commands"))
(bindings--define-key menu-map [s4] menu-bar-separator)
(bindings--define-key menu-map [delb]
'(menu-item "Mark for Delete and Move Backwards" Buffer-menu-delete-backwards
:help "Mark buffer on this line to be deleted by x command and move up one line"))
(bindings--define-key menu-map [del]
'(menu-item "Mark for Delete" Buffer-menu-delete
:help "Mark buffer on this line to be deleted by x command"))
(define-key menu-map [sv]
`(menu-item ,(purecopy "Mark for Save") Buffer-menu-save
:help ,(purecopy "Mark buffer on this line to be saved by x command")))
(define-key menu-map [umk]
`(menu-item ,(purecopy "Unmark") Buffer-menu-unmark
:help ,(purecopy "Cancel all requested operations on buffer on this line and move down")))
(define-key menu-map [mk]
`(menu-item ,(purecopy "Mark") Buffer-menu-mark
:help ,(purecopy "Mark buffer on this line for being displayed by v command")))
(bindings--define-key menu-map [sv]
'(menu-item "Mark for Save" Buffer-menu-save
:help "Mark buffer on this line to be saved by x command"))
(bindings--define-key menu-map [umk]
'(menu-item "Unmark" Buffer-menu-unmark
:help "Cancel all requested operations on buffer on this line and move down"))
(bindings--define-key menu-map [mk]
'(menu-item "Mark" Buffer-menu-mark
:help "Mark buffer on this line for being displayed by v command"))
map)
"Local keymap for `Buffer-menu-mode' buffers.")

View file

@ -264,110 +264,111 @@ font-lock keywords will not be case sensitive."
(define-key map "\e\t" 'completion-at-point)
(define-key map "\e\C-x" 'eval-defun)
(define-key map "\e\C-q" 'indent-pp-sexp)
(define-key map [menu-bar emacs-lisp] (cons (purecopy "Emacs-Lisp") menu-map))
(define-key menu-map [eldoc]
`(menu-item ,(purecopy "Auto-Display Documentation Strings") eldoc-mode
(bindings--define-key map [menu-bar emacs-lisp]
(cons "Emacs-Lisp" menu-map))
(bindings--define-key menu-map [eldoc]
'(menu-item "Auto-Display Documentation Strings" eldoc-mode
:button (:toggle . (bound-and-true-p eldoc-mode))
:help ,(purecopy "Display the documentation string for the item under cursor")))
(define-key menu-map [checkdoc]
`(menu-item ,(purecopy "Check Documentation Strings") checkdoc
:help ,(purecopy "Check documentation strings for style requirements")))
(define-key menu-map [re-builder]
`(menu-item ,(purecopy "Construct Regexp") re-builder
:help ,(purecopy "Construct a regexp interactively")))
(define-key menu-map [tracing] (cons (purecopy "Tracing") tracing-map))
(define-key tracing-map [tr-a]
`(menu-item ,(purecopy "Untrace All") untrace-all
:help ,(purecopy "Untrace all currently traced functions")))
(define-key tracing-map [tr-uf]
`(menu-item ,(purecopy "Untrace Function...") untrace-function
:help ,(purecopy "Untrace function, and possibly activate all remaining advice")))
(define-key tracing-map [tr-sep] menu-bar-separator)
(define-key tracing-map [tr-q]
`(menu-item ,(purecopy "Trace Function Quietly...") trace-function-background
:help ,(purecopy "Trace the function with trace output going quietly to a buffer")))
(define-key tracing-map [tr-f]
`(menu-item ,(purecopy "Trace Function...") trace-function
:help ,(purecopy "Trace the function given as an argument")))
(define-key menu-map [profiling] (cons (purecopy "Profiling") prof-map))
(define-key prof-map [prof-restall]
`(menu-item ,(purecopy "Remove Instrumentation for All Functions") elp-restore-all
:help ,(purecopy "Restore the original definitions of all functions being profiled")))
(define-key prof-map [prof-restfunc]
`(menu-item ,(purecopy "Remove Instrumentation for Function...") elp-restore-function
:help ,(purecopy "Restore an instrumented function to its original definition")))
:help "Display the documentation string for the item under cursor"))
(bindings--define-key menu-map [checkdoc]
'(menu-item "Check Documentation Strings" checkdoc
:help "Check documentation strings for style requirements"))
(bindings--define-key menu-map [re-builder]
'(menu-item "Construct Regexp" re-builder
:help "Construct a regexp interactively"))
(bindings--define-key menu-map [tracing] (cons "Tracing" tracing-map))
(bindings--define-key tracing-map [tr-a]
'(menu-item "Untrace All" untrace-all
:help "Untrace all currently traced functions"))
(bindings--define-key tracing-map [tr-uf]
'(menu-item "Untrace Function..." untrace-function
:help "Untrace function, and possibly activate all remaining advice"))
(bindings--define-key tracing-map [tr-sep] menu-bar-separator)
(bindings--define-key tracing-map [tr-q]
'(menu-item "Trace Function Quietly..." trace-function-background
:help "Trace the function with trace output going quietly to a buffer"))
(bindings--define-key tracing-map [tr-f]
'(menu-item "Trace Function..." trace-function
:help "Trace the function given as an argument"))
(bindings--define-key menu-map [profiling] (cons "Profiling" prof-map))
(bindings--define-key prof-map [prof-restall]
'(menu-item "Remove Instrumentation for All Functions" elp-restore-all
:help "Restore the original definitions of all functions being profiled"))
(bindings--define-key prof-map [prof-restfunc]
'(menu-item "Remove Instrumentation for Function..." elp-restore-function
:help "Restore an instrumented function to its original definition"))
(define-key prof-map [sep-rem] menu-bar-separator)
(define-key prof-map [prof-resall]
`(menu-item ,(purecopy "Reset Counters for All Functions") elp-reset-all
:help ,(purecopy "Reset the profiling information for all functions being profiled")))
(define-key prof-map [prof-resfunc]
`(menu-item ,(purecopy "Reset Counters for Function...") elp-reset-function
:help ,(purecopy "Reset the profiling information for a function")))
(define-key prof-map [prof-res]
`(menu-item ,(purecopy "Show Profiling Results") elp-results
:help ,(purecopy "Display current profiling results")))
(define-key prof-map [prof-pack]
`(menu-item ,(purecopy "Instrument Package...") elp-instrument-package
:help ,(purecopy "Instrument for profiling all function that start with a prefix")))
(define-key prof-map [prof-func]
`(menu-item ,(purecopy "Instrument Function...") elp-instrument-function
:help ,(purecopy "Instrument a function for profiling")))
(define-key menu-map [lint] (cons (purecopy "Linting") lint-map))
(define-key lint-map [lint-di]
`(menu-item ,(purecopy "Lint Directory...") elint-directory
:help ,(purecopy "Lint a directory")))
(define-key lint-map [lint-f]
`(menu-item ,(purecopy "Lint File...") elint-file
:help ,(purecopy "Lint a file")))
(define-key lint-map [lint-b]
`(menu-item ,(purecopy "Lint Buffer") elint-current-buffer
:help ,(purecopy "Lint the current buffer")))
(define-key lint-map [lint-d]
`(menu-item ,(purecopy "Lint Defun") elint-defun
:help ,(purecopy "Lint the function at point")))
(define-key menu-map [edebug-defun]
`(menu-item ,(purecopy "Instrument Function for Debugging") edebug-defun
:help ,(purecopy "Evaluate the top level form point is in, stepping through with Edebug")
:keys ,(purecopy "C-u C-M-x")))
(define-key menu-map [separator-byte] menu-bar-separator)
(define-key menu-map [disas]
`(menu-item ,(purecopy "Disassemble Byte Compiled Object...") disassemble
:help ,(purecopy "Print disassembled code for OBJECT in a buffer")))
(define-key menu-map [byte-recompile]
`(menu-item ,(purecopy "Byte-recompile Directory...") byte-recompile-directory
:help ,(purecopy "Recompile every `.el' file in DIRECTORY that needs recompilation")))
(define-key menu-map [emacs-byte-compile-and-load]
`(menu-item ,(purecopy "Byte-compile and Load") emacs-lisp-byte-compile-and-load
:help ,(purecopy "Byte-compile the current file (if it has changed), then load compiled code")))
(define-key menu-map [byte-compile]
`(menu-item ,(purecopy "Byte-compile This File") emacs-lisp-byte-compile
:help ,(purecopy "Byte compile the file containing the current buffer")))
(define-key menu-map [separator-eval] menu-bar-separator)
(define-key menu-map [ielm]
`(menu-item ,(purecopy "Interactive Expression Evaluation") ielm
:help ,(purecopy "Interactively evaluate Emacs Lisp expressions")))
(define-key menu-map [eval-buffer]
`(menu-item ,(purecopy "Evaluate Buffer") eval-buffer
:help ,(purecopy "Execute the current buffer as Lisp code")))
(define-key menu-map [eval-region]
`(menu-item ,(purecopy "Evaluate Region") eval-region
:help ,(purecopy "Execute the region as Lisp code")
(bindings--define-key prof-map [sep-rem] menu-bar-separator)
(bindings--define-key prof-map [prof-resall]
'(menu-item "Reset Counters for All Functions" elp-reset-all
:help "Reset the profiling information for all functions being profiled"))
(bindings--define-key prof-map [prof-resfunc]
'(menu-item "Reset Counters for Function..." elp-reset-function
:help "Reset the profiling information for a function"))
(bindings--define-key prof-map [prof-res]
'(menu-item "Show Profiling Results" elp-results
:help "Display current profiling results"))
(bindings--define-key prof-map [prof-pack]
'(menu-item "Instrument Package..." elp-instrument-package
:help "Instrument for profiling all function that start with a prefix"))
(bindings--define-key prof-map [prof-func]
'(menu-item "Instrument Function..." elp-instrument-function
:help "Instrument a function for profiling"))
(bindings--define-key menu-map [lint] (cons "Linting" lint-map))
(bindings--define-key lint-map [lint-di]
'(menu-item "Lint Directory..." elint-directory
:help "Lint a directory"))
(bindings--define-key lint-map [lint-f]
'(menu-item "Lint File..." elint-file
:help "Lint a file"))
(bindings--define-key lint-map [lint-b]
'(menu-item "Lint Buffer" elint-current-buffer
:help "Lint the current buffer"))
(bindings--define-key lint-map [lint-d]
'(menu-item "Lint Defun" elint-defun
:help "Lint the function at point"))
(bindings--define-key menu-map [edebug-defun]
'(menu-item "Instrument Function for Debugging" edebug-defun
:help "Evaluate the top level form point is in, stepping through with Edebug"
:keys "C-u C-M-x"))
(bindings--define-key menu-map [separator-byte] menu-bar-separator)
(bindings--define-key menu-map [disas]
'(menu-item "Disassemble Byte Compiled Object..." disassemble
:help "Print disassembled code for OBJECT in a buffer"))
(bindings--define-key menu-map [byte-recompile]
'(menu-item "Byte-recompile Directory..." byte-recompile-directory
:help "Recompile every `.el' file in DIRECTORY that needs recompilation"))
(bindings--define-key menu-map [emacs-byte-compile-and-load]
'(menu-item "Byte-compile and Load" emacs-lisp-byte-compile-and-load
:help "Byte-compile the current file (if it has changed), then load compiled code"))
(bindings--define-key menu-map [byte-compile]
'(menu-item "Byte-compile This File" emacs-lisp-byte-compile
:help "Byte compile the file containing the current buffer"))
(bindings--define-key menu-map [separator-eval] menu-bar-separator)
(bindings--define-key menu-map [ielm]
'(menu-item "Interactive Expression Evaluation" ielm
:help "Interactively evaluate Emacs Lisp expressions"))
(bindings--define-key menu-map [eval-buffer]
'(menu-item "Evaluate Buffer" eval-buffer
:help "Execute the current buffer as Lisp code"))
(bindings--define-key menu-map [eval-region]
'(menu-item "Evaluate Region" eval-region
:help "Execute the region as Lisp code"
:enable mark-active))
(define-key menu-map [eval-sexp]
`(menu-item ,(purecopy "Evaluate Last S-expression") eval-last-sexp
:help ,(purecopy "Evaluate sexp before point; print value in minibuffer")))
(define-key menu-map [separator-format] menu-bar-separator)
(define-key menu-map [comment-region]
`(menu-item ,(purecopy "Comment Out Region") comment-region
:help ,(purecopy "Comment or uncomment each line in the region")
(bindings--define-key menu-map [eval-sexp]
'(menu-item "Evaluate Last S-expression" eval-last-sexp
:help "Evaluate sexp before point; print value in minibuffer"))
(bindings--define-key menu-map [separator-format] menu-bar-separator)
(bindings--define-key menu-map [comment-region]
'(menu-item "Comment Out Region" comment-region
:help "Comment or uncomment each line in the region"
:enable mark-active))
(define-key menu-map [indent-region]
`(menu-item ,(purecopy "Indent Region") indent-region
:help ,(purecopy "Indent each nonblank line in the region")
(bindings--define-key menu-map [indent-region]
'(menu-item "Indent Region" indent-region
:help "Indent each nonblank line in the region"
:enable mark-active))
(define-key menu-map [indent-line]
`(menu-item ,(purecopy "Indent Line") lisp-indent-line))
(bindings--define-key menu-map [indent-line]
'(menu-item "Indent Line" lisp-indent-line))
map)
"Keymap for Emacs Lisp mode.
All commands in `lisp-mode-shared-map' are inherited by this map.")
@ -430,16 +431,16 @@ if that value is non-nil."
(set-keymap-parent map lisp-mode-shared-map)
(define-key map "\e\C-x" 'lisp-eval-defun)
(define-key map "\C-c\C-z" 'run-lisp)
(define-key map [menu-bar lisp] (cons (purecopy "Lisp") menu-map))
(define-key menu-map [run-lisp]
`(menu-item ,(purecopy "Run inferior Lisp") run-lisp
:help ,(purecopy "Run an inferior Lisp process, input and output via buffer `*inferior-lisp*'")))
(define-key menu-map [ev-def]
`(menu-item ,(purecopy "Eval defun") lisp-eval-defun
:help ,(purecopy "Send the current defun to the Lisp process made by M-x run-lisp")))
(define-key menu-map [ind-sexp]
`(menu-item ,(purecopy "Indent sexp") indent-sexp
:help ,(purecopy "Indent each line of the list starting just after point")))
(bindings--define-key map [menu-bar lisp] (cons "Lisp" menu-map))
(bindings--define-key menu-map [run-lisp]
'(menu-item "Run inferior Lisp" run-lisp
:help "Run an inferior Lisp process, input and output via buffer `*inferior-lisp*'"))
(bindings--define-key menu-map [ev-def]
'(menu-item "Eval defun" lisp-eval-defun
:help "Send the current defun to the Lisp process made by M-x run-lisp"))
(bindings--define-key menu-map [ind-sexp]
'(menu-item "Indent sexp" indent-sexp
:help "Indent each line of the list starting just after point"))
map)
"Keymap for ordinary Lisp mode.
All commands in `lisp-mode-shared-map' are inherited by this map.")
@ -487,23 +488,24 @@ if that value is non-nil."
(define-key map "\e\C-q" 'indent-pp-sexp)
(define-key map "\e\t" 'completion-at-point)
(define-key map "\n" 'eval-print-last-sexp)
(define-key map [menu-bar lisp-interaction] (cons (purecopy "Lisp-Interaction") menu-map))
(define-key menu-map [eval-defun]
`(menu-item ,(purecopy "Evaluate Defun") eval-defun
:help ,(purecopy "Evaluate the top-level form containing point, or after point")))
(define-key menu-map [eval-print-last-sexp]
`(menu-item ,(purecopy "Evaluate and Print") eval-print-last-sexp
:help ,(purecopy "Evaluate sexp before point; print value into current buffer")))
(define-key menu-map [edebug-defun-lisp-interaction]
`(menu-item ,(purecopy "Instrument Function for Debugging") edebug-defun
:help ,(purecopy "Evaluate the top level form point is in, stepping through with Edebug")
:keys ,(purecopy "C-u C-M-x")))
(define-key menu-map [indent-pp-sexp]
`(menu-item ,(purecopy "Indent or Pretty-Print") indent-pp-sexp
:help ,(purecopy "Indent each line of the list starting just after point, or prettyprint it")))
(define-key menu-map [complete-symbol]
`(menu-item ,(purecopy "Complete Lisp Symbol") completion-at-point
:help ,(purecopy "Perform completion on Lisp symbol preceding point")))
(bindings--define-key map [menu-bar lisp-interaction]
(cons "Lisp-Interaction" menu-map))
(bindings--define-key menu-map [eval-defun]
'(menu-item "Evaluate Defun" eval-defun
:help "Evaluate the top-level form containing point, or after point"))
(bindings--define-key menu-map [eval-print-last-sexp]
'(menu-item "Evaluate and Print" eval-print-last-sexp
:help "Evaluate sexp before point; print value into current buffer"))
(bindings--define-key menu-map [edebug-defun-lisp-interaction]
'(menu-item "Instrument Function for Debugging" edebug-defun
:help "Evaluate the top level form point is in, stepping through with Edebug"
:keys "C-u C-M-x"))
(bindings--define-key menu-map [indent-pp-sexp]
'(menu-item "Indent or Pretty-Print" indent-pp-sexp
:help "Indent each line of the list starting just after point, or prettyprint it"))
(bindings--define-key menu-map [complete-symbol]
'(menu-item "Complete Lisp Symbol" completion-at-point
:help "Perform completion on Lisp symbol preceding point"))
map)
"Keymap for Lisp Interaction mode.
All commands in `lisp-mode-shared-map' are inherited by this map.")

View file

@ -58,98 +58,98 @@
(defvar describe-language-environment-map
(let ((map (make-sparse-keymap "Describe Language Environment")))
(define-key map
[Default] `(menu-item ,(purecopy "Default") describe-specified-language-support))
(bindings--define-key map
[Default] '(menu-item "Default" describe-specified-language-support))
map))
(defvar setup-language-environment-map
(let ((map (make-sparse-keymap "Set Language Environment")))
(define-key map
[Default] `(menu-item ,(purecopy "Default") setup-specified-language-environment))
(bindings--define-key map
[Default] '(menu-item "Default" setup-specified-language-environment))
map))
(defvar set-coding-system-map
(let ((map (make-sparse-keymap "Set Coding System")))
(define-key-after map [universal-coding-system-argument]
`(menu-item ,(purecopy "For Next Command") universal-coding-system-argument
:help ,(purecopy "Coding system to be used by next command")))
(define-key-after map [separator-1] menu-bar-separator)
(define-key-after map [set-buffer-file-coding-system]
`(menu-item ,(purecopy "For Saving This Buffer") set-buffer-file-coding-system
:help ,(purecopy "How to encode this buffer when saved")))
(define-key-after map [revert-buffer-with-coding-system]
`(menu-item ,(purecopy "For Reverting This File Now")
revert-buffer-with-coding-system
:enable buffer-file-name
:help ,(purecopy "Revisit this file immediately using specified coding system")))
(define-key-after map [set-file-name-coding-system]
`(menu-item ,(purecopy "For File Name") set-file-name-coding-system
:help ,(purecopy "How to decode/encode file names")))
(define-key-after map [separator-2] menu-bar-separator)
(define-key-after map [set-keyboard-coding-system]
`(menu-item ,(purecopy "For Keyboard") set-keyboard-coding-system
:help ,(purecopy "How to decode keyboard input")))
(define-key-after map [set-terminal-coding-system]
`(menu-item ,(purecopy "For Terminal") set-terminal-coding-system
:enable (null (memq initial-window-system '(x w32 ns)))
:help ,(purecopy "How to encode terminal output")))
(define-key-after map [separator-3] menu-bar-separator)
(define-key-after map [set-selection-coding-system]
`(menu-item ,(purecopy "For X Selections/Clipboard") set-selection-coding-system
:visible (display-selections-p)
:help ,(purecopy "How to en/decode data to/from selection/clipboard")))
(define-key-after map [set-next-selection-coding-system]
`(menu-item ,(purecopy "For Next X Selection") set-next-selection-coding-system
:visible (display-selections-p)
:help ,(purecopy "How to en/decode next selection/clipboard operation")))
(define-key-after map [set-buffer-process-coding-system]
`(menu-item ,(purecopy "For I/O with Subprocess") set-buffer-process-coding-system
(bindings--define-key map [set-buffer-process-coding-system]
'(menu-item "For I/O with Subprocess" set-buffer-process-coding-system
:visible (fboundp 'start-process)
:enable (get-buffer-process (current-buffer))
:help ,(purecopy "How to en/decode I/O from/to subprocess connected to this buffer")))
:help "How to en/decode I/O from/to subprocess connected to this buffer"))
(bindings--define-key map [set-next-selection-coding-system]
'(menu-item "For Next X Selection" set-next-selection-coding-system
:visible (display-selections-p)
:help "How to en/decode next selection/clipboard operation"))
(bindings--define-key map [set-selection-coding-system]
'(menu-item "For X Selections/Clipboard" set-selection-coding-system
:visible (display-selections-p)
:help "How to en/decode data to/from selection/clipboard"))
(bindings--define-key map [separator-3] menu-bar-separator)
(bindings--define-key map [set-terminal-coding-system]
'(menu-item "For Terminal" set-terminal-coding-system
:enable (null (memq initial-window-system '(x w32 ns)))
:help "How to encode terminal output"))
(bindings--define-key map [set-keyboard-coding-system]
'(menu-item "For Keyboard" set-keyboard-coding-system
:help "How to decode keyboard input"))
(bindings--define-key map [separator-2] menu-bar-separator)
(bindings--define-key map [set-file-name-coding-system]
'(menu-item "For File Name" set-file-name-coding-system
:help "How to decode/encode file names"))
(bindings--define-key map [revert-buffer-with-coding-system]
'(menu-item "For Reverting This File Now"
revert-buffer-with-coding-system
:enable buffer-file-name
:help "Revisit this file immediately using specified coding system"))
(bindings--define-key map [set-buffer-file-coding-system]
'(menu-item "For Saving This Buffer" set-buffer-file-coding-system
:help "How to encode this buffer when saved"))
(bindings--define-key map [separator-1] menu-bar-separator)
(bindings--define-key map [universal-coding-system-argument]
'(menu-item "For Next Command" universal-coding-system-argument
:help "Coding system to be used by next command"))
map))
(defvar mule-menu-keymap
(let ((map (make-sparse-keymap "Mule (Multilingual Environment)")))
(define-key-after map [set-language-environment]
`(menu-item ,(purecopy "Set Language Environment") ,setup-language-environment-map))
(define-key-after map [separator-mule] menu-bar-separator)
(define-key-after map [toggle-input-method]
`(menu-item ,(purecopy "Toggle Input Method") toggle-input-method))
(define-key-after map [set-input-method]
`(menu-item ,(purecopy "Select Input Method...") set-input-method))
(define-key-after map [describe-input-method]
`(menu-item ,(purecopy "Describe Input Method") describe-input-method))
(define-key-after map [separator-input-method] menu-bar-separator)
(define-key-after map [set-various-coding-system]
`(menu-item ,(purecopy "Set Coding Systems") ,set-coding-system-map
:enable (default-value 'enable-multibyte-characters)))
(define-key-after map [view-hello-file]
`(menu-item ,(purecopy "Show Multilingual Sample Text") view-hello-file
(bindings--define-key map [mule-diag]
'(menu-item "Show All Multilingual Settings" mule-diag
:help "Display multilingual environment settings"))
(bindings--define-key map [list-character-sets]
'(menu-item "List Character Sets" list-character-sets
:help "Show table of available character sets"))
(bindings--define-key map [describe-coding-system]
'(menu-item "Describe Coding System..." describe-coding-system))
(bindings--define-key map [describe-input-method]
'(menu-item "Describe Input Method..." describe-input-method
:help "Keyboard layout for a specific input method"))
(bindings--define-key map [describe-language-environment]
`(menu-item "Describe Language Environment"
,describe-language-environment-map
:help "Show multilingual settings for a specific language"))
(bindings--define-key map [separator-coding-system] menu-bar-separator)
(bindings--define-key map [view-hello-file]
'(menu-item "Show Multilingual Sample Text" view-hello-file
:enable (file-readable-p
(expand-file-name "HELLO" data-directory))
:help ,(purecopy "Demonstrate various character sets")))
(define-key-after map [separator-coding-system] menu-bar-separator)
:help "Demonstrate various character sets"))
(bindings--define-key map [set-various-coding-system]
`(menu-item "Set Coding Systems" ,set-coding-system-map
:enable (default-value 'enable-multibyte-characters)))
(define-key-after map [describe-language-environment]
`(menu-item ,(purecopy "Describe Language Environment")
,describe-language-environment-map
:help ,(purecopy "Show multilingual settings for a specific language")))
(define-key-after map [describe-input-method]
`(menu-item ,(purecopy "Describe Input Method...") describe-input-method
:help ,(purecopy "Keyboard layout for a specific input method")))
(define-key-after map [describe-coding-system]
`(menu-item ,(purecopy "Describe Coding System...") describe-coding-system))
(define-key-after map [list-character-sets]
`(menu-item ,(purecopy "List Character Sets") list-character-sets
:help ,(purecopy "Show table of available character sets")))
(define-key-after map [mule-diag]
`(menu-item ,(purecopy "Show All Multilingual Settings") mule-diag
:help ,(purecopy "Display multilingual environment settings")))
(bindings--define-key map [separator-input-method] menu-bar-separator)
(bindings--define-key map [describe-input-method]
'(menu-item "Describe Input Method" describe-input-method))
(bindings--define-key map [set-input-method]
'(menu-item "Select Input Method..." set-input-method))
(bindings--define-key map [toggle-input-method]
'(menu-item "Toggle Input Method" toggle-input-method))
(bindings--define-key map [separator-mule] menu-bar-separator)
(bindings--define-key map [set-language-environment]
`(menu-item "Set Language Environment" ,setup-language-environment-map))
map)
"Keymap for Mule (Multilingual environment) menu specific commands.")

View file

@ -61,7 +61,7 @@
(if (eq t purify-flag)
;; Hash consing saved around 11% of pure space in my tests.
(setq purify-flag (make-hash-table :test 'equal)))
(setq purify-flag (make-hash-table :test 'equal :size 70000)))
(message "Using load-path %s" load-path)

File diff suppressed because it is too large Load diff

View file

@ -763,48 +763,47 @@ a previously found match."
(defvar occur-menu-map
(let ((map (make-sparse-keymap)))
(define-key map [next-error-follow-minor-mode]
`(menu-item ,(purecopy "Auto Occurrence Display")
(bindings--define-key map [next-error-follow-minor-mode]
'(menu-item "Auto Occurrence Display"
next-error-follow-minor-mode
:help ,(purecopy
"Display another occurrence when moving the cursor")
:help "Display another occurrence when moving the cursor"
:button (:toggle . (and (boundp 'next-error-follow-minor-mode)
next-error-follow-minor-mode))))
(define-key map [separator-1] menu-bar-separator)
(define-key map [kill-this-buffer]
`(menu-item ,(purecopy "Kill Occur Buffer") kill-this-buffer
:help ,(purecopy "Kill the current *Occur* buffer")))
(define-key map [quit-window]
`(menu-item ,(purecopy "Quit Occur Window") quit-window
:help ,(purecopy "Quit the current *Occur* buffer. Bury it, and maybe delete the selected frame")))
(define-key map [revert-buffer]
`(menu-item ,(purecopy "Revert Occur Buffer") revert-buffer
:help ,(purecopy "Replace the text in the *Occur* buffer with the results of rerunning occur")))
(define-key map [clone-buffer]
`(menu-item ,(purecopy "Clone Occur Buffer") clone-buffer
:help ,(purecopy "Create and return a twin copy of the current *Occur* buffer")))
(define-key map [occur-rename-buffer]
`(menu-item ,(purecopy "Rename Occur Buffer") occur-rename-buffer
:help ,(purecopy "Rename the current *Occur* buffer to *Occur: original-buffer-name*.")))
(define-key map [occur-edit-buffer]
`(menu-item ,(purecopy "Edit Occur Buffer") occur-edit-mode
:help ,(purecopy "Edit the *Occur* buffer and apply changes to the original buffers.")))
(define-key map [separator-2] menu-bar-separator)
(define-key map [occur-mode-goto-occurrence-other-window]
`(menu-item ,(purecopy "Go To Occurrence Other Window") occur-mode-goto-occurrence-other-window
:help ,(purecopy "Go to the occurrence the current line describes, in another window")))
(define-key map [occur-mode-goto-occurrence]
`(menu-item ,(purecopy "Go To Occurrence") occur-mode-goto-occurrence
:help ,(purecopy "Go to the occurrence the current line describes")))
(define-key map [occur-mode-display-occurrence]
`(menu-item ,(purecopy "Display Occurrence") occur-mode-display-occurrence
:help ,(purecopy "Display in another window the occurrence the current line describes")))
(define-key map [occur-next]
`(menu-item ,(purecopy "Move to Next Match") occur-next
:help ,(purecopy "Move to the Nth (default 1) next match in an Occur mode buffer")))
(define-key map [occur-prev]
`(menu-item ,(purecopy "Move to Previous Match") occur-prev
:help ,(purecopy "Move to the Nth (default 1) previous match in an Occur mode buffer")))
(bindings--define-key map [separator-1] menu-bar-separator)
(bindings--define-key map [kill-this-buffer]
'(menu-item "Kill Occur Buffer" kill-this-buffer
:help "Kill the current *Occur* buffer"))
(bindings--define-key map [quit-window]
'(menu-item "Quit Occur Window" quit-window
:help "Quit the current *Occur* buffer. Bury it, and maybe delete the selected frame"))
(bindings--define-key map [revert-buffer]
'(menu-item "Revert Occur Buffer" revert-buffer
:help "Replace the text in the *Occur* buffer with the results of rerunning occur"))
(bindings--define-key map [clone-buffer]
'(menu-item "Clone Occur Buffer" clone-buffer
:help "Create and return a twin copy of the current *Occur* buffer"))
(bindings--define-key map [occur-rename-buffer]
'(menu-item "Rename Occur Buffer" occur-rename-buffer
:help "Rename the current *Occur* buffer to *Occur: original-buffer-name*."))
(bindings--define-key map [occur-edit-buffer]
'(menu-item "Edit Occur Buffer" occur-edit-mode
:help "Edit the *Occur* buffer and apply changes to the original buffers."))
(bindings--define-key map [separator-2] menu-bar-separator)
(bindings--define-key map [occur-mode-goto-occurrence-other-window]
'(menu-item "Go To Occurrence Other Window" occur-mode-goto-occurrence-other-window
:help "Go to the occurrence the current line describes, in another window"))
(bindings--define-key map [occur-mode-goto-occurrence]
'(menu-item "Go To Occurrence" occur-mode-goto-occurrence
:help "Go to the occurrence the current line describes"))
(bindings--define-key map [occur-mode-display-occurrence]
'(menu-item "Display Occurrence" occur-mode-display-occurrence
:help "Display in another window the occurrence the current line describes"))
(bindings--define-key map [occur-next]
'(menu-item "Move to Next Match" occur-next
:help "Move to the Nth (default 1) next match in an Occur mode buffer"))
(bindings--define-key map [occur-prev]
'(menu-item "Move to Previous Match" occur-prev
:help "Move to the Nth (default 1) previous match in an Occur mode buffer"))
map)
"Menu keymap for `occur-mode'.")
@ -822,7 +821,7 @@ a previously found match."
(define-key map "r" 'occur-rename-buffer)
(define-key map "c" 'clone-buffer)
(define-key map "\C-c\C-f" 'next-error-follow-minor-mode)
(define-key map [menu-bar occur] (cons (purecopy "Occur") occur-menu-map))
(bindings--define-key map [menu-bar occur] (cons "Occur" occur-menu-map))
map)
"Keymap for `occur-mode'.")
@ -870,7 +869,7 @@ Alternatively, click \\[occur-mode-mouse-goto] on an item to go to it.
(define-key map "\C-c\C-c" 'occur-cease-edit)
(define-key map "\C-o" 'occur-mode-display-occurrence)
(define-key map "\C-c\C-f" 'next-error-follow-minor-mode)
(define-key map [menu-bar occur] (cons (purecopy "Occur") occur-menu-map))
(bindings--define-key map [menu-bar occur] (cons "Occur" occur-menu-map))
map)
"Keymap for `occur-edit-mode'.")

View file

@ -947,66 +947,66 @@ current, and kill the buffer that visits the link."
(let ((map (make-sparse-keymap "Version Control")))
;;(define-key map [show-files]
;; '("Show Files under VC" . (vc-directory t)))
(define-key map [vc-retrieve-tag]
`(menu-item ,(purecopy "Retrieve Tag") vc-retrieve-tag
:help ,(purecopy "Retrieve tagged version or branch")))
(define-key map [vc-create-tag]
`(menu-item ,(purecopy "Create Tag") vc-create-tag
:help ,(purecopy "Create version tag")))
(define-key map [separator1] menu-bar-separator)
(define-key map [vc-annotate]
`(menu-item ,(purecopy "Annotate") vc-annotate
:help ,(purecopy "Display the edit history of the current file using colors")))
(define-key map [vc-rename-file]
`(menu-item ,(purecopy "Rename File") vc-rename-file
:help ,(purecopy "Rename file")))
(define-key map [vc-revision-other-window]
`(menu-item ,(purecopy "Show Other Version") vc-revision-other-window
:help ,(purecopy "Visit another version of the current file in another window")))
(define-key map [vc-diff]
`(menu-item ,(purecopy "Compare with Base Version") vc-diff
:help ,(purecopy "Compare file set with the base version")))
(define-key map [vc-root-diff]
`(menu-item ,(purecopy "Compare Tree with Base Version") vc-root-diff
:help ,(purecopy "Compare current tree with the base version")))
(define-key map [vc-update-change-log]
`(menu-item ,(purecopy "Update ChangeLog") vc-update-change-log
:help ,(purecopy "Find change log file and add entries from recent version control logs")))
(define-key map [vc-log-out]
`(menu-item ,(purecopy "Show Outgoing Log") vc-log-outgoing
:help ,(purecopy "Show a log of changes that will be sent with a push operation")))
(define-key map [vc-log-in]
`(menu-item ,(purecopy "Show Incoming Log") vc-log-incoming
:help ,(purecopy "Show a log of changes that will be received with a pull operation")))
(define-key map [vc-print-log]
`(menu-item ,(purecopy "Show History") vc-print-log
:help ,(purecopy "List the change log of the current file set in a window")))
(define-key map [vc-print-root-log]
`(menu-item ,(purecopy "Show Top of the Tree History ") vc-print-root-log
:help ,(purecopy "List the change log for the current tree in a window")))
(define-key map [separator2] menu-bar-separator)
(define-key map [vc-insert-header]
`(menu-item ,(purecopy "Insert Header") vc-insert-headers
:help ,(purecopy "Insert headers into a file for use with a version control system.
")))
(define-key map [undo]
`(menu-item ,(purecopy "Undo Last Check-In") vc-rollback
:help ,(purecopy "Remove the most recent changeset committed to the repository")))
(define-key map [vc-revert]
`(menu-item ,(purecopy "Revert to Base Version") vc-revert
:help ,(purecopy "Revert working copies of the selected file set to their repository contents")))
(define-key map [vc-update]
`(menu-item ,(purecopy "Update to Latest Version") vc-update
:help ,(purecopy "Update the current fileset's files to their tip revisions")))
(define-key map [vc-next-action]
`(menu-item ,(purecopy "Check In/Out") vc-next-action
:help ,(purecopy "Do the next logical version control operation on the current fileset")))
(define-key map [vc-register]
`(menu-item ,(purecopy "Register") vc-register
:help ,(purecopy "Register file set into a version control system")))
(define-key map [vc-dir]
`(menu-item ,(purecopy "VC Dir") vc-dir
:help ,(purecopy "Show the VC status of files in a directory")))
(bindings--define-key map [vc-retrieve-tag]
'(menu-item "Retrieve Tag" vc-retrieve-tag
:help "Retrieve tagged version or branch"))
(bindings--define-key map [vc-create-tag]
'(menu-item "Create Tag" vc-create-tag
:help "Create version tag"))
(bindings--define-key map [separator1] menu-bar-separator)
(bindings--define-key map [vc-annotate]
'(menu-item "Annotate" vc-annotate
:help "Display the edit history of the current file using colors"))
(bindings--define-key map [vc-rename-file]
'(menu-item "Rename File" vc-rename-file
:help "Rename file"))
(bindings--define-key map [vc-revision-other-window]
'(menu-item "Show Other Version" vc-revision-other-window
:help "Visit another version of the current file in another window"))
(bindings--define-key map [vc-diff]
'(menu-item "Compare with Base Version" vc-diff
:help "Compare file set with the base version"))
(bindings--define-key map [vc-root-diff]
'(menu-item "Compare Tree with Base Version" vc-root-diff
:help "Compare current tree with the base version"))
(bindings--define-key map [vc-update-change-log]
'(menu-item "Update ChangeLog" vc-update-change-log
:help "Find change log file and add entries from recent version control logs"))
(bindings--define-key map [vc-log-out]
'(menu-item "Show Outgoing Log" vc-log-outgoing
:help "Show a log of changes that will be sent with a push operation"))
(bindings--define-key map [vc-log-in]
'(menu-item "Show Incoming Log" vc-log-incoming
:help "Show a log of changes that will be received with a pull operation"))
(bindings--define-key map [vc-print-log]
'(menu-item "Show History" vc-print-log
:help "List the change log of the current file set in a window"))
(bindings--define-key map [vc-print-root-log]
'(menu-item "Show Top of the Tree History " vc-print-root-log
:help "List the change log for the current tree in a window"))
(bindings--define-key map [separator2] menu-bar-separator)
(bindings--define-key map [vc-insert-header]
'(menu-item "Insert Header" vc-insert-headers
:help "Insert headers into a file for use with a version control system.
"))
(bindings--define-key map [undo]
'(menu-item "Undo Last Check-In" vc-rollback
:help "Remove the most recent changeset committed to the repository"))
(bindings--define-key map [vc-revert]
'(menu-item "Revert to Base Version" vc-revert
:help "Revert working copies of the selected file set to their repository contents"))
(bindings--define-key map [vc-update]
'(menu-item "Update to Latest Version" vc-update
:help "Update the current fileset's files to their tip revisions"))
(bindings--define-key map [vc-next-action]
'(menu-item "Check In/Out" vc-next-action
:help "Do the next logical version control operation on the current fileset"))
(bindings--define-key map [vc-register]
'(menu-item "Register" vc-register
:help "Register file set into a version control system"))
(bindings--define-key map [vc-dir]
'(menu-item "VC Dir" vc-dir
:help "Show the VC status of files in a directory"))
map))
(defalias 'vc-menu-map vc-menu-map)

View file

@ -1,3 +1,8 @@
2012-06-27 Stefan Monnier <monnier@iro.umontreal.ca>
* fns.c (maybe_resize_hash_table): Output message when growing the
purify-hashtable.
2012-06-27 Dmitry Antipov <dmantipov@yandex.ru>
* alloc.c (allocate_string_data): Remove dead code.
@ -29,7 +34,7 @@
2012-06-26 John Wiegley <johnw@newartisans.com>
* unexmacosx.c (copy_data_segment): Added two section names used
* unexmacosx.c (copy_data_segment): Add two section names used
on Mac OS X Lion: __mod_init_func and __mod_term_func.
* alloc.c (mark_memory): Do not check with -faddress-sanitizer

View file

@ -517,7 +517,7 @@ DEFUN ("setcdr", Fsetcdr, Ssetcdr, 2, 2, 0,
return newcdr;
}
/* Extract and set components of symbols */
/* Extract and set components of symbols. */
DEFUN ("boundp", Fboundp, Sboundp, 1, 1, 0,
doc: /* Return t if SYMBOL's value is not void. */)

View file

@ -3749,6 +3749,17 @@ maybe_resize_hash_table (struct Lisp_Hash_Table *h)
if (INDEX_SIZE_BOUND < nsize)
error ("Hash table too large to resize");
#ifdef ENABLE_CHECKING
if (HASH_TABLE_P (Vpurify_flag)
&& XHASH_TABLE (Vpurify_flag) == h)
{
Lisp_Object args[2];
args[0] = build_string ("Growing hash table to: %d");
args[1] = make_number (new_size);
Fmessage (2, args);
}
#endif
h->key_and_value = larger_vector (h->key_and_value,
2 * (new_size - old_size), -1);
h->next = larger_vector (h->next, new_size - old_size, -1);

View file

@ -47,9 +47,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#ifndef PURESIZE_RATIO
#if EMACS_INT_MAX >> 31 != 0
#if PTRDIFF_MAX >> 31 != 0
#define PURESIZE_RATIO 10/6 /* Don't surround with `()'. */
#define PURESIZE_RATIO 10 / 6 /* Don't surround with `()'. */
#else
#define PURESIZE_RATIO 8/6 /* Don't surround with `()'. */
#define PURESIZE_RATIO 8 / 6 /* Don't surround with `()'. */
#endif
#else
#define PURESIZE_RATIO 1
@ -60,7 +60,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* ENABLE_CHECKING somehow increases the purespace used, probably because
it tends to cause some macro arguments to be evaluated twice. This is
a bug, but it's difficult to track it down. */
#define PURESIZE_CHECKING_RATIO 12/10 /* Don't surround with `()'. */
#define PURESIZE_CHECKING_RATIO 12 / 10 /* Don't surround with `()'. */
#else
#define PURESIZE_CHECKING_RATIO 1
#endif