emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/logview 88701f50c0 082/259: Make sure several commands wit


From: ELPA Syncer
Subject: [nongnu] elpa/logview 88701f50c0 082/259: Make sure several commands with optional `n' argument work when invoked without it non-interactively too.
Date: Fri, 31 Jan 2025 07:01:57 -0500 (EST)

branch: elpa/logview
commit 88701f50c0b052091facf389f1ae71b1db245a4c
Author: Paul Pogonyshev <pogonyshev@gmail.com>
Commit: Paul Pogonyshev <pogonyshev@gmail.com>

    Make sure several commands with optional `n' argument work when invoked 
without it non-interactively too.
---
 logview.el | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/logview.el b/logview.el
index 052c9eaa96..721f0bbc12 100644
--- a/logview.el
+++ b/logview.el
@@ -836,6 +836,8 @@ equal to `next-line'.  However, if messages span several 
lines,
 the function will have significantly different effect."
   (interactive "p")
   (logview--assert)
+  (unless n
+    (setq n 1))
   (when (/= n 0)
     (let ((case-fold-search nil)
           (original-point   (point))
@@ -868,6 +870,8 @@ Point is positioned at the beginning of the message of the
 resulting entry."
   (interactive "p")
   (logview--assert 'level)
+  (unless n
+    (setq n 1))
   (when (/= n 0)
     (let ((case-fold-search nil)
           (original-point   (point)))
@@ -1381,6 +1385,8 @@ region instead (i.e. just like 
`logview-hide-region-entries')."
   (if (eq n 'use-region)
       (logview-hide-region-entries (point) (mark))
     (logview--assert)
+    (unless n
+      (setq n 1))
     (logview--std-matching-and-altering
       (logview--maybe-complain-about-movement
        n (logview--iterate-successive-entries n (logview--hide-entry-callback 
'logview-hidden-entry) t) 0))))
@@ -1415,6 +1421,8 @@ entries in the region instead (i.e. work just like
   (if (eq n 'use-region)
       (logview-show-region-entries (point) (mark))
     (logview--assert)
+    (unless n
+      (setq n 1))
     ;; Much like 'logview--iterate-successive-entries', but because of
     ;; peculiar semantics, not broken out into its own function.
     (when (/= n 0)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]