From: Stefan Kangas Date: Mon, 12 Sep 2022 15:03:26 +0000 (+0200) Subject: Prefer defvar-keymap in pixel-scroll-precision-mode-map X-Git-Tag: emacs-29.0.90~1856^2~570 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=16d6ef13c27805781e6c2b43672d911ed9dfdc66;p=emacs.git Prefer defvar-keymap in pixel-scroll-precision-mode-map * lisp/pixel-scroll.el (pixel-scroll-precision-mode-map): Prefer defvar-keymap. --- diff --git a/lisp/pixel-scroll.el b/lisp/pixel-scroll.el index 167cb4fabe8..c4d59728ae1 100644 --- a/lisp/pixel-scroll.el +++ b/lisp/pixel-scroll.el @@ -116,39 +116,37 @@ is always with pixel resolution.") (defvar mwheel-coalesce-scroll-events) -(defvar pixel-scroll-precision-mode-map - (let ((map (make-sparse-keymap))) - (define-key map [wheel-down] 'pixel-scroll-precision) - (define-key map [wheel-up] 'pixel-scroll-precision) - (define-key map [touch-end] 'pixel-scroll-start-momentum) - (define-key map [mode-line wheel-down] 'pixel-scroll-precision) - (define-key map [mode-line wheel-up] 'pixel-scroll-precision) - (define-key map [mode-line touch-end] 'pixel-scroll-start-momentum) - (define-key map [header-line wheel-down] 'pixel-scroll-precision) - (define-key map [header-line wheel-up] 'pixel-scroll-precision) - (define-key map [header-line touch-end] 'pixel-scroll-start-momentum) - (define-key map [vertical-scroll-bar wheel-down] 'pixel-scroll-precision) - (define-key map [vertical-scroll-bar wheel-up] 'pixel-scroll-precision) - (define-key map [vertical-scroll-bar touch-end] 'pixel-scroll-start-momentum) - (define-key map [tool-bar wheel-down] 'pixel-scroll-precision) - (define-key map [tool-bar wheel-up] 'pixel-scroll-precision) - (define-key map [tool-bar touch-end] 'pixel-scroll-start-momentum) - (define-key map [left-margin wheel-down] 'pixel-scroll-precision) - (define-key map [left-margin wheel-up] 'pixel-scroll-precision) - (define-key map [left-margin touch-end] 'pixel-scroll-start-momentum) - (define-key map [right-margin wheel-down] 'pixel-scroll-precision) - (define-key map [right-margin wheel-up] 'pixel-scroll-precision) - (define-key map [right-margin touch-end] 'pixel-scroll-start-momentum) - (define-key map [left-fringe wheel-down] 'pixel-scroll-precision) - (define-key map [left-fringe wheel-up] 'pixel-scroll-precision) - (define-key map [left-fringe touch-end] 'pixel-scroll-start-momentum) - (define-key map [right-fringe wheel-down] 'pixel-scroll-precision) - (define-key map [right-fringe wheel-up] 'pixel-scroll-precision) - (define-key map [right-fringe touch-end] 'pixel-scroll-start-momentum) - (define-key map [next] 'pixel-scroll-interpolate-down) - (define-key map [prior] 'pixel-scroll-interpolate-up) - map) - "The key map used by `pixel-scroll-precision-mode'.") +(defvar-keymap pixel-scroll-precision-mode-map + :doc "The key map used by `pixel-scroll-precision-mode'." + "" #'pixel-scroll-precision + "" #'pixel-scroll-precision + "" #'pixel-scroll-start-momentum + " " #'pixel-scroll-precision + " " #'pixel-scroll-precision + " " #'pixel-scroll-start-momentum + " " #'pixel-scroll-precision + " " #'pixel-scroll-precision + " " #'pixel-scroll-start-momentum + " " #'pixel-scroll-precision + " " #'pixel-scroll-precision + " " #'pixel-scroll-start-momentum + " " #'pixel-scroll-precision + " " #'pixel-scroll-precision + " " #'pixel-scroll-start-momentum + " " #'pixel-scroll-precision + " " #'pixel-scroll-precision + " " #'pixel-scroll-start-momentum + " " #'pixel-scroll-precision + " " #'pixel-scroll-precision + " " #'pixel-scroll-start-momentum + " " #'pixel-scroll-precision + " " #'pixel-scroll-precision + " " #'pixel-scroll-start-momentum + " " #'pixel-scroll-precision + " " #'pixel-scroll-precision + " " #'pixel-scroll-start-momentum + "" #'pixel-scroll-interpolate-down + "" #'pixel-scroll-interpolate-up) (defcustom pixel-scroll-precision-use-momentum nil "If non-nil, continue to scroll the display after wheel movement stops.