From: Stefan Kangas Date: Sat, 2 Jul 2022 04:25:01 +0000 (+0200) Subject: * lisp/ruler-mode.el (ruler-mode-map): Use defvar-keymap. X-Git-Tag: emacs-29.0.90~1447^2~1288 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=6c9c8b09b974e6cd356038a4308c61195b547e35;p=emacs.git * lisp/ruler-mode.el (ruler-mode-map): Use defvar-keymap. --- diff --git a/lisp/ruler-mode.el b/lisp/ruler-mode.el index f0efc20f037..0b18697cea7 100644 --- a/lisp/ruler-mode.el +++ b/lisp/ruler-mode.el @@ -509,36 +509,21 @@ START-EVENT is the mouse click event." (setq ruler-mode-show-tab-stops (not ruler-mode-show-tab-stops)) (force-mode-line-update)) -(defvar ruler-mode-map - (let ((km (make-sparse-keymap))) - (define-key km [header-line down-mouse-1] - #'ignore) - (define-key km [header-line down-mouse-3] - #'ignore) - (define-key km [header-line down-mouse-2] - #'ruler-mode-mouse-grab-any-column) - (define-key km [header-line (shift down-mouse-1)] - #'ruler-mode-mouse-set-left-margin) - (define-key km [header-line (shift down-mouse-3)] - #'ruler-mode-mouse-set-right-margin) - (define-key km [header-line (control down-mouse-1)] - #'ruler-mode-mouse-add-tab-stop) - (define-key km [header-line (control down-mouse-3)] - #'ruler-mode-mouse-del-tab-stop) - (define-key km [header-line (control down-mouse-2)] - #'ruler-mode-toggle-show-tab-stops) - (define-key km [header-line (shift mouse-1)] - #'ignore) - (define-key km [header-line (shift mouse-3)] - #'ignore) - (define-key km [header-line (control mouse-1)] - #'ignore) - (define-key km [header-line (control mouse-3)] - #'ignore) - (define-key km [header-line (control mouse-2)] - #'ignore) - km) - "Keymap for ruler minor mode.") +(defvar-keymap ruler-mode-map + :doc "Keymap for `ruler-mode'." + " " #'ignore + " " #'ignore + " " #'ruler-mode-mouse-grab-any-column + " S-" #'ruler-mode-mouse-set-left-margin + " S-" #'ruler-mode-mouse-set-right-margin + " C-" #'ruler-mode-mouse-add-tab-stop + " C-" #'ruler-mode-mouse-del-tab-stop + " C-" #'ruler-mode-toggle-show-tab-stops + " S-" #'ignore + " S-" #'ignore + " C-" #'ignore + " C-" #'ignore + " C-" #'ignore) (defvar ruler-mode-header-line-format-old nil "Hold previous value of `header-line-format'.")