From 571c261525f2e50e4d843b360e3c04b451b24e07 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Wed, 31 Mar 2021 01:42:16 +0200 Subject: 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. --- lisp/chistory.el | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) (limited to 'lisp/chistory.el') 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. -- cgit v1.2.3