]> git.eshelyaron.com Git - emacs.git/commitdiff
Removed an erroneous comment.
authorLute Kamstra <lute@gnu.org>
Tue, 6 May 2003 15:35:58 +0000 (15:35 +0000)
committerLute Kamstra <lute@gnu.org>
Tue, 6 May 2003 15:35:58 +0000 (15:35 +0000)
(hl-line-mode): Use buffer local hooks.
(global-hl-line-mode): Turn local modes on unconditionally.
(hl-line-highlight): Comment fix.

lisp/ChangeLog
lisp/hl-line.el

index f86cfeea7b0f670dd541be51f204570ccba5e2c3..eae6838ae47e0c58c10b5792721ca8425f69b001 100644 (file)
@@ -1,3 +1,10 @@
+2003-05-06  Lute Kamstra  <lute@occarina.pna.cwi.nl>
+
+       * hl-line.el: Removed an erroneous comment.
+       (hl-line-mode): Use buffer local hooks.
+       (global-hl-line-mode): Turn local modes on unconditionally.
+       (hl-line-highlight): Comment fix.
+
 2003-05-06  Richard M. Stallman  <rms@gnu.org>
 
        * newcomment.el (comment-search-forward): Delete autoload cookie.
index 317788087d0d7add8b4df0f5757f3a528a0768c0..727f859a32e2542a6a272589febbdeed44ab290f 100644 (file)
@@ -46,9 +46,6 @@
 ;; `hl-line-highlight', on `post-command-hook', activates it again
 ;; across the window width.
 
-;; You could make variable `hl-line-mode' buffer-local to avoid
-;; highlighting specific buffers, when the global mode is used.
-
 ;;; Code:
 
 (defgroup hl-line nil
@@ -72,21 +69,21 @@ Uses functions `hl-line-unhighlight' and `hl-line-highlight' on
   nil nil nil
   (if hl-line-mode
       (progn
-       (add-hook 'pre-command-hook #'hl-line-unhighlight)
-       (add-hook 'post-command-hook #'hl-line-highlight))
+       (add-hook 'pre-command-hook #'hl-line-unhighlight nil t)
+       (add-hook 'post-command-hook #'hl-line-highlight nil t))
     (hl-line-unhighlight)
-    (remove-hook 'pre-command-hook #'hl-line-unhighlight)
-    (remove-hook 'post-command-hook #'hl-line-highlight)))
+    (remove-hook 'pre-command-hook #'hl-line-unhighlight t)
+    (remove-hook 'post-command-hook #'hl-line-highlight t)))
 
 ;;;###autoload
 (easy-mmode-define-global-mode
- global-hl-line-mode hl-line-mode hl-line-mode
+ global-hl-line-mode hl-line-mode (lambda () (hl-line-mode 1))
  :group 'hl-line)
 
 (defun hl-line-highlight ()
   "Active the Hl-Line overlay on the current line in the current window.
 \(Unless it's a minibuffer window.)"
-  (when hl-line-mode                   ; Could be made buffer-local.
+  (when hl-line-mode           ; Might be changed outside the mode function.
     (unless (window-minibuffer-p (selected-window)) ; silly in minibuffer
       (unless hl-line-overlay
        (setq hl-line-overlay (make-overlay 1 1)) ; to be moved