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

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

[elpa] master 30566f8 2/4: Fix for non-interactive calls of el-search-pa


From: Michael Heerdegen
Subject: [elpa] master 30566f8 2/4: Fix for non-interactive calls of el-search-pattern
Date: Wed, 02 Mar 2016 10:14:51 +0000

branch: master
commit 30566f8bf5cc98f8ef2184035f15b339ce1d9691
Author: Michael Heerdegen <address@hidden>
Commit: Michael Heerdegen <address@hidden>

    Fix for non-interactive calls of el-search-pattern
---
 packages/el-search/el-search.el |   36 +++++++++++++++++++-----------------
 1 files changed, 19 insertions(+), 17 deletions(-)

diff --git a/packages/el-search/el-search.el b/packages/el-search/el-search.el
index dea74b2..52e919a 100644
--- a/packages/el-search/el-search.el
+++ b/packages/el-search/el-search.el
@@ -849,23 +849,25 @@ The following additional pattern types are currently 
defined:"
                                         (not (eq (symbol-value pattern) 
pattern))))
                            (error "Please don't forget the quote when 
searching for a symbol"))
                          (el-search--wrap-pattern pattern)))))
-  (setq this-command 'el-search-pattern) ;in case we come from isearch
-  (setq el-search-current-pattern pattern)
-  (let ((opoint (point)))
-    (when (and (eq this-command last-command) el-search-success)
-      (el-search--skip-expression nil t))
-    (setq el-search-success nil)
-    (when (condition-case nil
-              (el-search--search-pattern pattern)
-            (end-of-buffer (message "No match")
-                           (goto-char opoint)
-                           (el-search-hl-remove)
-                           (ding)
-                           nil))
-      (setq el-search-success t)
-      (el-search-hl-sexp)
-      (unless (eq this-command last-command)
-        (el-search-hl-other-matches pattern)))))
+  (if (not (called-interactively-p 'any))
+      (el-search--search-pattern pattern)
+    (setq this-command 'el-search-pattern) ;in case we come from isearch
+    (setq el-search-current-pattern pattern)
+    (let ((opoint (point)))
+      (when (and (eq this-command last-command) el-search-success)
+        (el-search--skip-expression nil t))
+      (setq el-search-success nil)
+      (when (condition-case nil
+                (el-search--search-pattern pattern)
+              (end-of-buffer (message "No match")
+                             (goto-char opoint)
+                             (el-search-hl-remove)
+                             (ding)
+                             nil))
+        (setq el-search-success t)
+        (el-search-hl-sexp)
+        (unless (eq this-command last-command)
+          (el-search-hl-other-matches pattern))))))
 
 (defvar el-search-search-and-replace-help-string
   "\



reply via email to

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