[Top][All Lists]

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

[elpa] master 471285c: [el-search] Tweak my last commit "Add menus"

From: Michael Heerdegen
Subject: [elpa] master 471285c: [el-search] Tweak my last commit "Add menus"
Date: Sun, 13 Jan 2019 09:10:01 -0500 (EST)

branch: master
commit 471285c44114fad1f7931f9f0872eae81744979f
Author: Michael Heerdegen <address@hidden>
Commit: Michael Heerdegen <address@hidden>

    [el-search] Tweak my last commit "Add menus"
    Also bump version to 1.9.4.
    * packages/el-search/el-search.el (el-search-occur-revert-function):
    Respect current value of 'el-search-occur--outline-visible'.
    (emacs-lisp-mode-map): Declare 'el-search-occur-flag' as special in
    the "Occur" menu item command since el-search may not have yet been
    loaded when it is called.
 packages/el-search/el-search.el | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/packages/el-search/el-search.el b/packages/el-search/el-search.el
index 2c3d101..9f4893d 100644
--- a/packages/el-search/el-search.el
+++ b/packages/el-search/el-search.el
@@ -7,7 +7,7 @@
 ;; Created: 29 Jul 2015
 ;; Keywords: lisp
 ;; Compatibility: GNU Emacs 25
-;; Version: 1.9.3
+;; Version: 1.9.4
 ;; Package-Requires: ((emacs "25") (stream "2.2.4") (cl-print "1.0"))
@@ -3149,9 +3149,12 @@ Use the normal search commands to seize the search."
 (defvar-local el-search-occur-search-object nil)
+(defvar el-search-occur--outline-visible t)
 (defun el-search-occur-revert-function (&rest _)
-  (el-search--occur el-search-occur-search-object t))
+  (el-search--occur el-search-occur-search-object t)
+  (unless el-search-occur--outline-visible
+    (outline-hide-leaves)))
 (defun el-search-edit-occur-pattern (new-pattern)
   "Change the search pattern associated with this *El Occur* buffer.
@@ -3291,8 +3294,6 @@ Prompt for a new pattern and revert."
   (el-search-occur--next-match 'backward))
-(defvar el-search-occur--outline-visible t)
 (defun el-search-occur-cycle ()
   "Cycle between showing an outline and everything."
@@ -4547,6 +4548,7 @@ Reuse already given input."
       :enable (cdr (ring-elements el-search-history))]
      ["Query-Replace" el-search-query-replace :enable (not buffer-read-only)]
      ["Occur" ,(lambda () (interactive)
+                 (defvar el-search-occur-flag)
                  (let ((el-search-occur-flag t)) (call-interactively 
 (easy-menu-define nil el-search-occur-mode-map "El Occur Menu"

reply via email to

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