]> git.eshelyaron.com Git - emacs.git/commitdiff
Make hexl scrolling commands work more like the normal ones
authorLars Ingebrigtsen <larsi@gnus.org>
Tue, 8 Dec 2020 16:57:10 +0000 (17:57 +0100)
committerLars Ingebrigtsen <larsi@gnus.org>
Tue, 8 Dec 2020 16:57:10 +0000 (17:57 +0100)
* lisp/hexl.el (hexl-scroll-down):
(hexl-scroll-up): Heed `next-screen-context-lines' (bug#7031).

etc/NEWS
lisp/hexl.el

index f2fd9fb13860cb3f57ed581cf707d730477cd599..83fe7a349e39b33186e87d29dc3ce70a067e8564 100644 (file)
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -1370,6 +1370,12 @@ This new command (bound to 'C-c C-l') regenerates the current hunk.
 
 ** Miscellaneous
 
+---
+*** 'hexl-mode' scrolling commands now heed 'next-screen-context-lines'.
+Previously, 'hexl-scroll-down' and 'hexl-scroll-up' would scroll
+up/down an entire window, but they now work more like the standard
+scrolling commands.
+
 ---
 *** Errors in 'kill-emacs-hook' no longer prevent Emacs from shutting down.
 If a function in that hook signals an error in an interactive Emacs,
index fa514a540026339f3cec1eeb36550c2ed24b6a9c..1fe9aad66de83fbb125ef42c409a36e1325b9728 100644 (file)
@@ -724,7 +724,8 @@ With prefix arg N, puts point N bytes of the way from the true beginning."
   (setq arg (if (null arg)
                 (- (window-height)
                    1
-                   (if ruler-mode 1 0))
+                   (if ruler-mode 1 0)
+                   next-screen-context-lines)
               (prefix-numeric-value arg)))
   (hexl-scroll-up (- arg)))
 
@@ -735,7 +736,8 @@ If there's no byte at the target address, move to the first or last line."
   (setq arg (if (null arg)
                 (- (window-height)
                    1
-                   (if ruler-mode 1 0))
+                   (if ruler-mode 1 0)
+                   next-screen-context-lines)
               (prefix-numeric-value arg)))
   (let* ((movement (* arg 16))
         (address (hexl-current-address))