Commit 0aaa5d69 authored by Ivan Shmakov's avatar Ivan Shmakov

Unloading support for misearch.

* lisp/misearch.el (multi-isearch-unload-function): New function.
(misearch-unload-function): New alias.

Fixes: debbugs:19566
parent e391d887
......@@ -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
......
......@@ -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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment