diff options
| author | Ivan Shmakov | 2015-01-17 19:15:51 +0000 |
|---|---|---|
| committer | Ivan Shmakov | 2015-01-17 19:35:52 +0000 |
| commit | 0aaa5d699bf95afb152317f0788b8e2d2042f59d (patch) | |
| tree | 459db84332b073005e92eecfa1d24d705de4ae9a | |
| parent | e391d88705efd3897996ed81e1f37b936dc3aa21 (diff) | |
| download | emacs-0aaa5d699bf95afb152317f0788b8e2d2042f59d.tar.gz emacs-0aaa5d699bf95afb152317f0788b8e2d2042f59d.zip | |
Unloading support for misearch.
* lisp/misearch.el (multi-isearch-unload-function): New function.
(misearch-unload-function): New alias.
Fixes: debbugs:19566
| -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 @@ | |||
| 17 | * desktop.el (desktop-read): Do not call desktop-clear when no | 17 | * desktop.el (desktop-read): Do not call desktop-clear when no |
| 18 | desktop file is found. (Bug#18371) | 18 | desktop file is found. (Bug#18371) |
| 19 | 19 | ||
| 20 | * misearch.el (multi-isearch-unload-function): New function. | ||
| 21 | (misearch-unload-function): New alias. (Bug#19566) | ||
| 22 | |||
| 20 | 2015-01-17 Stefan Monnier <monnier@iro.umontreal.ca> | 23 | 2015-01-17 Stefan Monnier <monnier@iro.umontreal.ca> |
| 21 | 24 | ||
| 22 | * emacs-lisp/eieio-core.el (eieio--class-constructor): Rename from | 25 | * 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." | |||
| 377 | (goto-char (if isearch-forward (point-min) (point-max))) | 377 | (goto-char (if isearch-forward (point-min) (point-max))) |
| 378 | (isearch-forward-regexp nil t))) | 378 | (isearch-forward-regexp nil t))) |
| 379 | 379 | ||
| 380 | (defun multi-isearch-unload-function () | ||
| 381 | "Remove autoloaded variables from `unload-function-defs-list'. | ||
| 382 | Also prevent the feature from being reloaded via `isearch-mode-hook'." | ||
| 383 | (remove-hook 'isearch-mode-hook 'multi-isearch-setup) | ||
| 384 | (let ((defs (list (car unload-function-defs-list))) | ||
| 385 | (auto '(multi-isearch-next-buffer-function | ||
| 386 | multi-isearch-next-buffer-current-function | ||
| 387 | multi-isearch-current-buffer | ||
| 388 | multi-isearch-buffer-list multi-isearch-file-list))) | ||
| 389 | (dolist (def (cdr unload-function-defs-list)) | ||
| 390 | (unless (and (symbolp def) | ||
| 391 | (memq def auto)) | ||
| 392 | (push def defs))) | ||
| 393 | (setq unload-function-defs-list (nreverse defs)) | ||
| 394 | ;; . | ||
| 395 | nil)) | ||
| 396 | |||
| 397 | (defalias 'misearch-unload-function 'multi-isearch-unload-function) | ||
| 398 | |||
| 380 | 399 | ||
| 381 | (provide 'multi-isearch) | 400 | (provide 'multi-isearch) |
| 382 | (provide 'misearch) | 401 | (provide 'misearch) |