aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Kangas2019-08-20 19:04:16 +0200
committerStefan Kangas2019-10-04 18:02:45 +0200
commit591c8bc70fc5f0e1de5aa9a05800375ca4da8587 (patch)
tree5c51faaff0ae7ffdece2f4bc771a6f04e69caeeb
parentef8fadf8c1399b4ce7086141ebf96610b6475df2 (diff)
downloademacs-591c8bc70fc5f0e1de5aa9a05800375ca4da8587.tar.gz
emacs-591c8bc70fc5f0e1de5aa9a05800375ca4da8587.zip
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.
-rw-r--r--etc/NEWS5
-rw-r--r--lisp/bindings.el1
-rw-r--r--lisp/scroll-lock.el5
3 files changed, 10 insertions, 1 deletions
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.
445--- 445---
446** The toolbar now shows the equivalent key binding in its tooltips. 446** The toolbar now shows the equivalent key binding in its tooltips.
447 447
448---
449** 'scroll-lock-mode' is now bound to the 'Scroll_Lock' key globally.
450Note that this key binding will not work on MS-Windows systems if
451'w32-scroll-lock-modifier' is non-nil.
452
448 453
449* Editing Changes in Emacs 27.1 454* Editing Changes in Emacs 27.1
450 455
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."
1054;(define-key global-map [delete] 'backward-delete-char) 1054;(define-key global-map [delete] 'backward-delete-char)
1055 1055
1056;; natural bindings for terminal keycaps --- defined in X keysym order 1056;; natural bindings for terminal keycaps --- defined in X keysym order
1057(define-key global-map [Scroll_Lock] 'scroll-lock-mode)
1057(define-key global-map [C-S-backspace] 'kill-whole-line) 1058(define-key global-map [C-S-backspace] 'kill-whole-line)
1058(define-key global-map [home] 'move-beginning-of-line) 1059(define-key global-map [home] 'move-beginning-of-line)
1059(define-key global-map [C-home] 'beginning-of-buffer) 1060(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 @@
54When enabled, keys that normally move point by line or paragraph 54When enabled, keys that normally move point by line or paragraph
55will scroll the buffer by the respective amount of lines instead 55will scroll the buffer by the respective amount of lines instead
56and point will be kept vertically fixed relative to window 56and point will be kept vertically fixed relative to window
57boundaries during scrolling." 57boundaries during scrolling.
58
59Note that the default key binding to Scroll_Lock will not work on
60MS-Windows systems if `w32-scroll-lock-modifier' is non-nil."
58 :lighter " ScrLck" 61 :lighter " ScrLck"
59 :keymap scroll-lock-mode-map 62 :keymap scroll-lock-mode-map
60 (if scroll-lock-mode 63 (if scroll-lock-mode