[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 0aaa5d6 6/6: Unloading support for misearch.
From: |
Ivan Shmakov |
Subject: |
[Emacs-diffs] master 0aaa5d6 6/6: Unloading support for misearch. |
Date: |
Sat, 17 Jan 2015 20:04:27 +0000 |
branch: master
commit 0aaa5d699bf95afb152317f0788b8e2d2042f59d
Author: Ivan Shmakov <address@hidden>
Commit: Ivan Shmakov <address@hidden>
Unloading support for misearch.
* lisp/misearch.el (multi-isearch-unload-function): New function.
(misearch-unload-function): New alias.
Fixes: debbugs:19566
---
lisp/ChangeLog | 3 +++
lisp/misearch.el | 19 +++++++++++++++++++
2 files changed, 22 insertions(+), 0 deletions(-)
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 60732e7..bf5f60d 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -17,6 +17,9 @@
* desktop.el (desktop-read): Do not call desktop-clear when no
desktop file is found. (Bug#18371)
+ * misearch.el (multi-isearch-unload-function): New function.
+ (misearch-unload-function): New alias. (Bug#19566)
+
2015-01-17 Stefan Monnier <address@hidden>
* emacs-lisp/eieio-core.el (eieio--class-constructor): Rename from
diff --git a/lisp/misearch.el b/lisp/misearch.el
index 6daae24..dcc8195 100644
--- a/lisp/misearch.el
+++ b/lisp/misearch.el
@@ -377,6 +377,25 @@ whose file names match the specified wildcard."
(goto-char (if isearch-forward (point-min) (point-max)))
(isearch-forward-regexp nil t)))
+(defun multi-isearch-unload-function ()
+ "Remove autoloaded variables from `unload-function-defs-list'.
+Also prevent the feature from being reloaded via `isearch-mode-hook'."
+ (remove-hook 'isearch-mode-hook 'multi-isearch-setup)
+ (let ((defs (list (car unload-function-defs-list)))
+ (auto '(multi-isearch-next-buffer-function
+ multi-isearch-next-buffer-current-function
+ multi-isearch-current-buffer
+ multi-isearch-buffer-list multi-isearch-file-list)))
+ (dolist (def (cdr unload-function-defs-list))
+ (unless (and (symbolp def)
+ (memq def auto))
+ (push def defs)))
+ (setq unload-function-defs-list (nreverse defs))
+ ;; .
+ nil))
+
+(defalias 'misearch-unload-function 'multi-isearch-unload-function)
+
(provide 'multi-isearch)
(provide 'misearch)
- [Emacs-diffs] master updated (ca80ebc -> 0aaa5d6), Ivan Shmakov, 2015/01/17
- [Emacs-diffs] master e000ff3 3/6: Fix dir-locals handling for non-file buffers., Ivan Shmakov, 2015/01/17
- [Emacs-diffs] master 3e824b0 2/6: Avoid mapcar in two cases in files.el., Ivan Shmakov, 2015/01/17
- [Emacs-diffs] master 22441b6 1/6: Ignore print-length and print-level while formatting url-cookie data., Ivan Shmakov, 2015/01/17
- [Emacs-diffs] master e391d88 5/6: Do not clear the session when trying to read a non-existent desktop file., Ivan Shmakov, 2015/01/17
- [Emacs-diffs] master 1728544 4/6: Fix: inhibit point motion hooks when encoding an enriched document., Ivan Shmakov, 2015/01/17
- [Emacs-diffs] master 0aaa5d6 6/6: Unloading support for misearch.,
Ivan Shmakov <=