]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix unloading the hl-line library
authorPo Lu <luangruo@yahoo.com>
Tue, 22 Mar 2022 00:22:41 +0000 (08:22 +0800)
committerPo Lu <luangruo@yahoo.com>
Tue, 22 Mar 2022 00:22:41 +0000 (08:22 +0800)
* lisp/hl-line.el (hl-line-unload-function): Restore function.

lisp/hl-line.el

index 47d5b0f247e037653a27babd9271158fb6b65cbf..70ba0fcfc286d3b55baabebf02d059c6058dde7e 100644 (file)
@@ -127,6 +127,16 @@ Currently used in calendar/todo-mode."
     (let (inhibit-quit)
       (hl-line-mode 1))))
 
+(defun hl-line-unload-function ()
+  "Unload the Hl-Line library."
+  (global-hl-line-mode -1)
+  (save-current-buffer
+    (dolist (buffer (buffer-list))
+      (set-buffer buffer)
+      (when hl-line-mode (hl-line-mode -1))))
+  ;; continue standard unloading
+  nil)
+
 ;;;###autoload
 (define-globalized-minor-mode global-hl-line-mode
   hl-line-mode hl-line-turn-on