diff options
author | Ivan Shmakov <ivan@siamics.net> | 2015-01-17 19:15:51 +0000 |
---|---|---|
committer | Ivan Shmakov <ivan@siamics.net> | 2015-01-17 19:35:52 +0000 |
commit | 0aaa5d699bf95afb152317f0788b8e2d2042f59d (patch) | |
tree | 459db84332b073005e92eecfa1d24d705de4ae9a /lisp | |
parent | e391d88705efd3897996ed81e1f37b936dc3aa21 (diff) | |
download | emacs-0aaa5d699bf95afb152317f0788b8e2d2042f59d.tar.gz |
Unloading support for misearch.
* lisp/misearch.el (multi-isearch-unload-function): New function.
(misearch-unload-function): New alias.
Fixes: debbugs:19566
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/ChangeLog | 3 | ||||
-rw-r--r-- | lisp/misearch.el | 19 |
2 files changed, 22 insertions, 0 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 60732e781fc..bf5f60db13e 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 <monnier@iro.umontreal.ca> * emacs-lisp/eieio-core.el (eieio--class-constructor): Rename from diff --git a/lisp/misearch.el b/lisp/misearch.el index 6daae243fbb..dcc819564fb 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) |