From: Stefan Kangas Date: Tue, 20 Aug 2019 17:04:16 +0000 (+0200) Subject: Bind Scroll_Lock to scroll-lock-mode globally X-Git-Tag: emacs-27.0.90~1280 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=591c8bc70fc5f0e1de5aa9a05800375ca4da8587;p=emacs.git Bind Scroll_Lock to scroll-lock-mode globally * lisp/bindings.el (global-map): Bind Scroll_Lock to scroll-lock-mode. (Bug#6861) * lisp/scroll-lock.el (scroll-lock-mode): Note that the binding will not work if 'w32-scroll-lock-modifier' is non-nil. * etc/NEWS: Announce it. --- diff --git a/etc/NEWS b/etc/NEWS index c8cc7537b04..db90e8e5c54 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -445,6 +445,11 @@ RGB triplets with a single hexadecimal digit per component. --- ** The toolbar now shows the equivalent key binding in its tooltips. +--- +** 'scroll-lock-mode' is now bound to the 'Scroll_Lock' key globally. +Note that this key binding will not work on MS-Windows systems if +'w32-scroll-lock-modifier' is non-nil. + * Editing Changes in Emacs 27.1 diff --git a/lisp/bindings.el b/lisp/bindings.el index 0be14587981..16da2bdf9a6 100644 --- a/lisp/bindings.el +++ b/lisp/bindings.el @@ -1054,6 +1054,7 @@ if `inhibit-field-text-motion' is non-nil." ;(define-key global-map [delete] 'backward-delete-char) ;; natural bindings for terminal keycaps --- defined in X keysym order +(define-key global-map [Scroll_Lock] 'scroll-lock-mode) (define-key global-map [C-S-backspace] 'kill-whole-line) (define-key global-map [home] 'move-beginning-of-line) (define-key global-map [C-home] 'beginning-of-buffer) diff --git a/lisp/scroll-lock.el b/lisp/scroll-lock.el index 3a74c11b7a1..36e2264fe4f 100644 --- a/lisp/scroll-lock.el +++ b/lisp/scroll-lock.el @@ -54,7 +54,10 @@ When enabled, keys that normally move point by line or paragraph will scroll the buffer by the respective amount of lines instead and point will be kept vertically fixed relative to window -boundaries during scrolling." +boundaries during scrolling. + +Note that the default key binding to Scroll_Lock will not work on +MS-Windows systems if `w32-scroll-lock-modifier' is non-nil." :lighter " ScrLck" :keymap scroll-lock-mode-map (if scroll-lock-mode