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

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

[elpa] master 35c1152 2/7: Don't auto-confirm M-x ack if no symbol actua


From: João Távora
Subject: [elpa] master 35c1152 2/7: Don't auto-confirm M-x ack if no symbol actually yanked
Date: Mon, 6 Jul 2020 07:19:34 -0400 (EDT)

branch: master
commit 35c115204ca999816a07768ef29bfecf245fdea7
Author: João Távora <joaot@siscog.pt>
Commit: João Távora <joaot@siscog.pt>

    Don't auto-confirm M-x ack if no symbol actually yanked
    
    * ack.el (Version): Bump to 1.9
    (ack--auto-confirm): Only auto-confirm if symbol was
    actually yanked.
---
 ack.el | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/ack.el b/ack.el
index f52e9b3..6a8a382 100644
--- a/ack.el
+++ b/ack.el
@@ -4,7 +4,7 @@
 
 ;; Author: Leo Liu <sdl.web@gmail.com>
 ;; Maintainer: João Távora <joaotavora@gmail.com>
-;; Version: 1.8
+;; Version: 1.9
 ;; Keywords: tools, processes, convenience
 ;; Created: 2012-03-24
 ;; URL: https://github.com/leoliu/ack-el
@@ -468,9 +468,10 @@ automatically attempted."
   (run-hooks 'ack-minibuffer-setup-hook))
 
 (defun ack--auto-confirm ()
-  (throw 'ack--auto-confirm
-         (buffer-substring-no-properties
-          (minibuffer-prompt-end) (point-max))))
+  (when ack--yanked-symbol
+    (throw 'ack--auto-confirm
+           (buffer-substring-no-properties
+            (minibuffer-prompt-end) (point-max)))))
 
 ;;;###autoload
 (defun ack (command-args &optional directory)



reply via email to

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