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

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

[ELPA-diffs] ELPA branch, master, updated. 7a47daeb4e9c229c332bf6d270576


From: Stefan Monnier
Subject: [ELPA-diffs] ELPA branch, master, updated. 7a47daeb4e9c229c332bf6d270576726b9188367
Date: Wed, 21 Aug 2013 19:00:43 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "ELPA".

The branch, master has been updated
       via  7a47daeb4e9c229c332bf6d270576726b9188367 (commit)
       via  b11474b9fcee5284fd846ddab5d080554a3d0364 (commit)
      from  5f9f173d7488db2922a697debaa1579175ef9808 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 7a47daeb4e9c229c332bf6d270576726b9188367
Merge: 5f9f173 b11474b
Author: Stefan Monnier <address@hidden>
Date:   Wed Aug 21 15:00:32 2013 -0400

    Sync from ioccur/master


commit b11474b9fcee5284fd846ddab5d080554a3d0364
Author: Thierry Volpiatto <address@hidden>
Date:   Sat Mar 23 07:58:58 2013 +0100

    * ioccur.el (ioccur-save-pos-before-jump-hook): New hook that run before 
jump and quit.

diff --git a/ioccur.el b/ioccur.el
index d53b04b..d2b2a3c 100644
--- a/ioccur.el
+++ b/ioccur.el
@@ -155,6 +155,9 @@ Default value is smart, other possible values are nil and 
t."
 Set it to non--nil if menu disapear or if keys are echoing in minibuffer.
 Deprecated, should be used only in old Emacs versions.")
 
+(defvar ioccur-save-pos-before-jump-hook nil
+  "A hook that run before jumping and quitting `ioccur'.")
+
 ;;; Faces.
 (defface ioccur-overlay-face
     '((t (:background "Green4" :underline t)))
@@ -227,7 +230,8 @@ Deprecated, should be used only in old Emacs versions.")
 (defvar ioccur-message nil)
 ;; Store last window-configuration
 (defvar ioccur-last-window-configuration nil)
-
+;; Save point in current buffer here.
+(defvar ioccur-current-pos nil)
 
 (define-derived-mode ioccur-mode
     text-mode "ioccur"
@@ -580,11 +584,19 @@ Move point to first occurence of `ioccur-pattern'."
 (defun ioccur-jump-and-quit ()
   "Jump to line in other buffer and quit search buffer."
   (interactive)
+  (run-hooks 'ioccur-save-pos-before-jump-hook)
   (when (ioccur-jump ioccur-last-window-configuration)
     (sit-for 0.3)
     (when ioccur-match-overlay
       (delete-overlay ioccur-match-overlay))))
 
+(defun ioccur-save-current-pos-to-mark-ring ()
+  "Save current buffer position to mark ring.
+To use this add it to `ioccur-save-pos-before-jump-hook'."
+  (with-current-buffer ioccur-current-buffer
+    (set-marker (mark-marker) ioccur-current-pos)
+    (push-mark ioccur-current-pos 'nomsg)))
+
 ;;;###autoload
 (defun ioccur-jump-without-quit (&optional mark)
   "Jump to line in `ioccur-current-buffer' without quitting."
@@ -993,6 +1005,7 @@ for commands provided in the `ioccur-buffer'."
       (jit-lock-fontify-now) (message nil))
     (setq ioccur-buffer (concat "*ioccur-" ioccur-current-buffer "*"))
     (setq ioccur-last-window-configuration (current-window-configuration))
+    (setq ioccur-current-pos (point))
     (if (and (not initial-input)
              (get-buffer ioccur-buffer)
              (not (get-buffer-window ioccur-buffer)))
@@ -1057,7 +1070,8 @@ for commands provided in the `ioccur-buffer'."
               (setq ioccur-count-occurences 0)
               (setq ioccur-quit-flag nil)
               (setq ioccur-message nil)
-              (setq ioccur-search-function 
ioccur-default-search-function)))))))
+              (setq ioccur-search-function ioccur-default-search-function)
+              (setq ioccur-current-pos nil)))))))
 
 (defun ioccur-save-history ()
   "Save last ioccur element found in `ioccur-history'."

-----------------------------------------------------------------------

Summary of changes:
 packages/ioccur/ioccur.el |   18 ++++++++++++++++--
 1 files changed, 16 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
ELPA



reply via email to

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