diff options
| author | Po Lu | 2022-03-22 08:22:41 +0800 |
|---|---|---|
| committer | Po Lu | 2022-03-22 08:22:41 +0800 |
| commit | 63a33c3057321a4d2fddbbfe34e11e87ef99b6ad (patch) | |
| tree | c43f873e68b259e1ae44d145a6c1f8859f2e7fc5 | |
| parent | f36d929ee768f03dcc63f59ff0572c2681c8f749 (diff) | |
| download | emacs-63a33c3057321a4d2fddbbfe34e11e87ef99b6ad.tar.gz emacs-63a33c3057321a4d2fddbbfe34e11e87ef99b6ad.zip | |
Fix unloading the hl-line library
* lisp/hl-line.el (hl-line-unload-function): Restore function.
| -rw-r--r-- | lisp/hl-line.el | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lisp/hl-line.el b/lisp/hl-line.el index 47d5b0f247e..70ba0fcfc28 100644 --- a/lisp/hl-line.el +++ b/lisp/hl-line.el | |||
| @@ -127,6 +127,16 @@ Currently used in calendar/todo-mode." | |||
| 127 | (let (inhibit-quit) | 127 | (let (inhibit-quit) |
| 128 | (hl-line-mode 1)))) | 128 | (hl-line-mode 1)))) |
| 129 | 129 | ||
| 130 | (defun hl-line-unload-function () | ||
| 131 | "Unload the Hl-Line library." | ||
| 132 | (global-hl-line-mode -1) | ||
| 133 | (save-current-buffer | ||
| 134 | (dolist (buffer (buffer-list)) | ||
| 135 | (set-buffer buffer) | ||
| 136 | (when hl-line-mode (hl-line-mode -1)))) | ||
| 137 | ;; continue standard unloading | ||
| 138 | nil) | ||
| 139 | |||
| 130 | ;;;###autoload | 140 | ;;;###autoload |
| 131 | (define-globalized-minor-mode global-hl-line-mode | 141 | (define-globalized-minor-mode global-hl-line-mode |
| 132 | hl-line-mode hl-line-turn-on | 142 | hl-line-mode hl-line-turn-on |