From: Stefan Kangas Date: Tue, 30 Mar 2021 23:23:29 +0000 (+0200) Subject: * lisp/ebuff-menu.el: Use lexical-binding. X-Git-Tag: emacs-28.0.90~3075 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=20f2488dbff62a0d0b2f491751b978559dba9861;p=emacs.git * lisp/ebuff-menu.el: Use lexical-binding. --- diff --git a/lisp/ebuff-menu.el b/lisp/ebuff-menu.el index fb73b2d1786..7fecf1a5045 100644 --- a/lisp/ebuff-menu.el +++ b/lisp/ebuff-menu.el @@ -1,4 +1,4 @@ -;;; ebuff-menu.el --- electric-buffer-list mode +;;; ebuff-menu.el --- electric-buffer-list mode -*- lexical-binding: t -*- ;; Copyright (C) 1985-1986, 1994, 2001-2021 Free Software Foundation, ;; Inc. @@ -34,55 +34,53 @@ (defvar electric-buffer-menu-mode-map (let ((map (make-keymap))) - (fillarray (car (cdr map)) 'Electric-buffer-menu-undefined) + (fillarray (car (cdr map)) #'Electric-buffer-menu-undefined) (define-key map "\e" nil) - (define-key map "\C-z" 'suspend-frame) - (define-key map "v" 'Electric-buffer-menu-mode-view-buffer) - (define-key map (char-to-string help-char) 'Helper-help) - (define-key map "?" 'Helper-describe-bindings) + (define-key map "\C-z" #'suspend-frame) + (define-key map "v" #'Electric-buffer-menu-mode-view-buffer) + (define-key map (char-to-string help-char) #'Helper-help) + (define-key map "?" #'Helper-describe-bindings) (define-key map "\C-c" nil) - (define-key map "\C-c\C-c" 'Electric-buffer-menu-quit) - (define-key map "\C-]" 'Electric-buffer-menu-quit) - (define-key map "q" 'Electric-buffer-menu-quit) - (define-key map " " 'Electric-buffer-menu-select) - (define-key map "\C-m" 'Electric-buffer-menu-select) - (define-key map "\C-l" 'recenter) - (define-key map "s" 'Buffer-menu-save) - (define-key map "d" 'Buffer-menu-delete) - (define-key map "k" 'Buffer-menu-delete) - (define-key map "\C-d" 'Buffer-menu-delete-backwards) - ;; (define-key map "\C-k" 'Buffer-menu-delete) - (define-key map "\177" 'Buffer-menu-backup-unmark) - (define-key map "~" 'Buffer-menu-not-modified) - (define-key map "u" 'Buffer-menu-unmark) - (define-key map "\M-\177" 'Buffer-menu-unmark-all-buffers) - (define-key map "U" 'Buffer-menu-unmark-all) - (let ((i ?0)) - (while (<= i ?9) - (define-key map (char-to-string i) 'digit-argument) - (define-key map (concat "\e" (char-to-string i)) 'digit-argument) - (setq i (1+ i)))) - (define-key map "-" 'negative-argument) - (define-key map "\e-" 'negative-argument) - (define-key map "m" 'Buffer-menu-mark) - (define-key map "\C-u" 'universal-argument) - (define-key map "\C-p" 'previous-line) - (define-key map "\C-n" 'next-line) - (define-key map "p" 'previous-line) - (define-key map "n" 'next-line) - (define-key map "\C-v" 'scroll-up-command) - (define-key map "\ev" 'scroll-down-command) - (define-key map ">" 'scroll-right) - (define-key map "<" 'scroll-left) - (define-key map "\e\C-v" 'scroll-other-window) - (define-key map "\e>" 'end-of-buffer) - (define-key map "\e<" 'beginning-of-buffer) + (define-key map "\C-c\C-c" #'Electric-buffer-menu-quit) + (define-key map "\C-]" #'Electric-buffer-menu-quit) + (define-key map "q" #'Electric-buffer-menu-quit) + (define-key map " " #'Electric-buffer-menu-select) + (define-key map "\C-m" #'Electric-buffer-menu-select) + (define-key map "\C-l" #'recenter) + (define-key map "s" #'Buffer-menu-save) + (define-key map "d" #'Buffer-menu-delete) + (define-key map "k" #'Buffer-menu-delete) + (define-key map "\C-d" #'Buffer-menu-delete-backwards) + ;; (define-key map "\C-k" #'Buffer-menu-delete) + (define-key map "\177" #'Buffer-menu-backup-unmark) + (define-key map "~" #'Buffer-menu-not-modified) + (define-key map "u" #'Buffer-menu-unmark) + (define-key map "\M-\177" #'Buffer-menu-unmark-all-buffers) + (define-key map "U" #'Buffer-menu-unmark-all) + (dotimes (i 10) + (define-key map (char-to-string i) #'digit-argument) + (define-key map (concat "\e" (char-to-string i)) #'digit-argument)) + (define-key map "-" #'negative-argument) + (define-key map "\e-" #'negative-argument) + (define-key map "m" #'Buffer-menu-mark) + (define-key map "\C-u" #'universal-argument) + (define-key map "\C-p" #'previous-line) + (define-key map "\C-n" #'next-line) + (define-key map "p" #'previous-line) + (define-key map "n" #'next-line) + (define-key map "\C-v" #'scroll-up-command) + (define-key map "\ev" #'scroll-down-command) + (define-key map ">" #'scroll-right) + (define-key map "<" #'scroll-left) + (define-key map "\e\C-v" #'scroll-other-window) + (define-key map "\e>" #'end-of-buffer) + (define-key map "\e<" #'beginning-of-buffer) (define-key map "\e\e" nil) - (define-key map "\e\e\e" 'Electric-buffer-menu-quit) + (define-key map "\e\e\e" #'Electric-buffer-menu-quit) ;; This binding prevents the "escape => ESC" function-key-map mapping from ;; kicking in! - ;; (define-key map [escape escape escape] 'Electric-buffer-menu-quit) - (define-key map [mouse-2] 'Electric-buffer-menu-mouse-select) + ;; (define-key map [escape escape escape] #'Electric-buffer-menu-quit) + (define-key map [mouse-2] #'Electric-buffer-menu-mouse-select) map)) (put 'Electric-buffer-menu-quit :advertised-binding "\C-c\C-c") @@ -205,7 +203,7 @@ See the documentation of `electric-buffer-list' for details." (setq-local Helper-return-blurb "return to buffer editing")) (define-obsolete-function-alias 'Electric-buffer-menu-mode - 'electric-buffer-menu-mode "24.3") + #'electric-buffer-menu-mode "24.3") ;; generally the same as Buffer-menu-mode-map ;; (except we don't indirect to global-map)