mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-11-22 07:09:54 +00:00
Use lexical-binding in chistory.el
* lisp/chistory.el: Use lexical-binding. Remove redundant :group args. (command-history-mode-map): Quote function symbols as such.
This commit is contained in:
parent
20f2488dbf
commit
571c261525
@ -1,4 +1,4 @@
|
||||
;;; chistory.el --- list command history
|
||||
;;; chistory.el --- list command history -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (C) 1985, 2001-2021 Free Software Foundation, Inc.
|
||||
|
||||
@ -71,8 +71,7 @@ If that function is given a list whose car is an element of this list,
|
||||
then it will return non-nil (indicating the list should be discarded from
|
||||
the history).
|
||||
Initially, all commands related to the command history are discarded."
|
||||
:type '(repeat symbol)
|
||||
:group 'chistory)
|
||||
:type '(repeat symbol))
|
||||
|
||||
(defvar list-command-history-filter 'default-command-history-filter
|
||||
"Predicate to test which commands should be excluded from the history listing.
|
||||
@ -90,8 +89,7 @@ from the command history."
|
||||
|
||||
(defcustom list-command-history-max 32
|
||||
"If non-nil, maximum length of the listing produced by `list-command-history'."
|
||||
:type '(choice integer (const nil))
|
||||
:group 'chistory)
|
||||
:type '(choice integer (const nil)))
|
||||
|
||||
;;;###autoload
|
||||
(defun list-command-history ()
|
||||
@ -127,10 +125,10 @@ The buffer is left in Command History mode."
|
||||
(let ((map (make-sparse-keymap)))
|
||||
(set-keymap-parent map (make-composed-keymap lisp-mode-shared-map
|
||||
special-mode-map))
|
||||
(define-key map "x" 'command-history-repeat)
|
||||
(define-key map "\n" 'next-line)
|
||||
(define-key map "\r" 'next-line)
|
||||
(define-key map "\177" 'previous-line)
|
||||
(define-key map "x" #'command-history-repeat)
|
||||
(define-key map "\n" #'next-line)
|
||||
(define-key map "\r" #'next-line)
|
||||
(define-key map "\177" #'previous-line)
|
||||
map)
|
||||
"Keymap for `command-history-mode'.")
|
||||
|
||||
@ -145,8 +143,7 @@ Keybindings:
|
||||
|
||||
(defcustom command-history-hook nil
|
||||
"If non-nil, its value is called on entry to `command-history-mode'."
|
||||
:type 'hook
|
||||
:group 'chistory)
|
||||
:type 'hook)
|
||||
|
||||
(defun command-history-revert (_ignore-auto _noconfirm)
|
||||
(list-command-history))
|
||||
@ -165,7 +162,7 @@ The buffer for that command is the previous current buffer."
|
||||
|
||||
;;;###autoload
|
||||
(defun command-history ()
|
||||
"Examine commands from `command-history' in a buffer.
|
||||
"Examine commands from variable `command-history' in a buffer.
|
||||
The number of commands listed is controlled by `list-command-history-max'.
|
||||
The command history is filtered by `list-command-history-filter' if non-nil.
|
||||
Use \\<command-history-map>\\[command-history-repeat] to repeat the command on the current line.
|
||||
|
Loading…
Reference in New Issue
Block a user