From: Stefan Kangas Date: Tue, 30 Mar 2021 23:42:16 +0000 (+0200) Subject: Use lexical-binding in chistory.el X-Git-Tag: emacs-28.0.90~3074 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=571c261525f2e50e4d843b360e3c04b451b24e07;p=emacs.git 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. --- diff --git a/lisp/chistory.el b/lisp/chistory.el index 589b5b5feb9..95c1b49cd8b 100644 --- a/lisp/chistory.el +++ b/lisp/chistory.el @@ -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-repeat] to repeat the command on the current line.