]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/finder.el (finder-mode-map): Use defvar-keymap.
authorStefan Kangas <stefan@marxist.se>
Thu, 24 Mar 2022 08:55:10 +0000 (09:55 +0100)
committerStefan Kangas <stefan@marxist.se>
Thu, 28 Apr 2022 14:57:38 +0000 (16:57 +0200)
lisp/finder.el

index 899e829296216d9a85045a7697b2263ba44e22df..a2a27ea061dd0d4be74a43dfc9a1d53d90658ced 100644 (file)
@@ -1,7 +1,6 @@
 ;;; finder.el --- topic & keyword-based code finder  -*- lexical-binding: t -*-
 
-;; Copyright (C) 1992, 1997-1999, 2001-2022 Free Software Foundation,
-;; Inc.
+;; Copyright (C) 1992-2022 Free Software Foundation, Inc.
 
 ;; Author: Eric S. Raymond <esr@snark.thyrsus.com>
 ;; Created: 16 Jun 1992
   "Association list of the standard \"Keywords:\" headers.
 Each element has the form (KEYWORD . DESCRIPTION).")
 
-(defvar finder-mode-map
-  (let ((map (make-sparse-keymap)))
-    (define-key map " "        'finder-select)
-    (define-key map "f"        'finder-select)
-    (define-key map [follow-link] 'mouse-face)
-    (define-key map [mouse-2]  'finder-mouse-select)
-    (define-key map "\C-m"     'finder-select)
-    (define-key map "?"        'finder-summary)
-    (define-key map "n" 'next-line)
-    (define-key map "p" 'previous-line)
-    (define-key map "q"        'finder-exit)
-    (define-key map "d"        'finder-list-keywords)
-    map)
-  "Keymap used in `finder-mode'.")
+(defvar-keymap finder-mode-map
+  :doc "Keymap used in `finder-mode'."
+  "SPC"           #'finder-select
+  "f"             #'finder-select
+  "<follow-link>" 'mouse-face
+  "<mouse-2>"     #'finder-mouse-select
+  "C-m"           #'finder-select
+  "?"             #'finder-summary
+  "n"             #'next-line
+  "p"             #'previous-line
+  "q"             #'finder-exit
+  "d"             #'finder-list-keywords)
 
 (easy-menu-define finder-mode-menu finder-mode-map
   "Menu for `finder-mode'."