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

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

[elpa] externals/shell-command+ 3fffa5c13d 08/13: Fall back to point-min


From: ELPA Syncer
Subject: [elpa] externals/shell-command+ 3fffa5c13d 08/13: Fall back to point-min/max if BEG and END are nil
Date: Thu, 25 Aug 2022 09:57:59 -0400 (EDT)

branch: externals/shell-command+
commit 3fffa5c13d8dd9a7a07e6cd1668b8e8f9b33e98f
Author: Philip Kaludercic <philipk@posteo.net>
Commit: Philip Kaludercic <philipk@posteo.net>

    Fall back to point-min/max if BEG and END are nil
---
 shell-command+.el | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/shell-command+.el b/shell-command+.el
index ef5b487863..c8e643638d 100644
--- a/shell-command+.el
+++ b/shell-command+.el
@@ -461,11 +461,9 @@ between BEG and END.  Otherwise the whole buffer is 
processed."
                                     (abbreviate-file-name default-directory))
                           shell-command+-prompt))
                        (cond ((use-region-p) (region-beginning))
-                             (bounds (car bounds))
-                             ((point-min)))
+                             (bounds (car bounds)))
                        (cond ((use-region-p) (region-end))
-                             (bounds (cdr bounds))
-                             ((point-max))))))
+                             (bounds (cdr bounds))))))
   ;; Make sure in case there is a previous output buffer, that it has
   ;; the same `default-directory' as the `default-directory' caller.
   (let ((shell-command-buffer (get-buffer (or (bound-and-true-p 
shell-command-buffer-name)
@@ -489,7 +487,9 @@ between BEG and END.  Otherwise the whole buffer is 
processed."
               form (nth 1 step)
               context (nth 2 step))))
     (save-excursion
-      (funcall context form (nth 3 parse) beg end))))
+      (funcall context form (nth 3 parse)
+               (or beg (point-min))
+               (or end (point-max))))))
 
 (provide 'shell-command+)
 



reply via email to

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