aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuanma Barranquero2008-10-14 15:02:05 +0000
committerJuanma Barranquero2008-10-14 15:02:05 +0000
commitb1bad9f3d6bcc725d9727c2dc4282c6080447cbf (patch)
treeece9448aff6c5ef099b550517a949904f6fc9dfb
parente234927a7eac7232d837574ba30aa20bbc539f29 (diff)
downloademacs-b1bad9f3d6bcc725d9727c2dc4282c6080447cbf.tar.gz
emacs-b1bad9f3d6bcc725d9727c2dc4282c6080447cbf.zip
* hl-line.el (hl-line-unload-function): New function.
(hl-line-unhighlight, global-hl-line-unhighlight): Use `when'. (hl-line-sticky-flag): Remove spurious * in docstring.
-rw-r--r--lisp/ChangeLog10
-rw-r--r--lisp/hl-line.el20
2 files changed, 23 insertions, 7 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 21e5953779f..bd2c8b65a91 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
12008-10-14 Juanma Barranquero <lekktu@gmail.com>
2
3 * hl-line.el (hl-line-unload-function): New function.
4 (hl-line-unhighlight, global-hl-line-unhighlight): Use `when'.
5 (hl-line-sticky-flag): Remove spurious * in docstring.
6
12008-10-14 Eric Hanchrow <offby1@blarg.net> (tiny change) 72008-10-14 Eric Hanchrow <offby1@blarg.net> (tiny change)
2 8
3 * vc-git.el (vc-git-show-log-entry): Include the revision in the 9 * vc-git.el (vc-git-show-log-entry): Include the revision in the
@@ -152,8 +158,8 @@
152 158
1532008-10-09 Eli Zaretskii <eliz@gnu.org> 1592008-10-09 Eli Zaretskii <eliz@gnu.org>
154 160
155 * frame.el (make-frame-on-tty): Use "F" inside interactive. Support 161 * frame.el (make-frame-on-tty): Use "F" inside interactive.
156 `pc' ``window-system''. 162 Support `pc' ``window-system''.
157 163
158 * progmodes/compile.el (compilation-start): Resurrect the version 164 * progmodes/compile.el (compilation-start): Resurrect the version
159 for systems that don't support asynchronous subprocesses. 165 for systems that don't support asynchronous subprocesses.
diff --git a/lisp/hl-line.el b/lisp/hl-line.el
index dae21af0b84..b04bda31aaf 100644
--- a/lisp/hl-line.el
+++ b/lisp/hl-line.el
@@ -94,7 +94,7 @@
94 (overlay-put global-hl-line-overlay 'face hl-line-face)))) 94 (overlay-put global-hl-line-overlay 'face hl-line-face))))
95 95
96(defcustom hl-line-sticky-flag t 96(defcustom hl-line-sticky-flag t
97 "*Non-nil means highlight the current line in all windows. 97 "Non-nil means highlight the current line in all windows.
98Otherwise Hl-Line mode will highlight only in the selected 98Otherwise Hl-Line mode will highlight only in the selected
99window. Setting this variable takes effect the next time you use 99window. Setting this variable takes effect the next time you use
100the command `hl-line-mode' to turn Hl-Line mode on." 100the command `hl-line-mode' to turn Hl-Line mode on."
@@ -155,8 +155,8 @@ addition to `hl-line-highlight' on `post-command-hook'."
155 155
156(defun hl-line-unhighlight () 156(defun hl-line-unhighlight ()
157 "Deactivate the Hl-Line overlay on the current line." 157 "Deactivate the Hl-Line overlay on the current line."
158 (if hl-line-overlay 158 (when hl-line-overlay
159 (delete-overlay hl-line-overlay))) 159 (delete-overlay hl-line-overlay)))
160 160
161;;;###autoload 161;;;###autoload
162(define-minor-mode global-hl-line-mode 162(define-minor-mode global-hl-line-mode
@@ -187,8 +187,8 @@ Global-Hl-Line mode uses the functions `global-hl-line-unhighlight' and
187 187
188(defun global-hl-line-unhighlight () 188(defun global-hl-line-unhighlight ()
189 "Deactivate the Global-Hl-Line overlay on the current line." 189 "Deactivate the Global-Hl-Line overlay on the current line."
190 (if global-hl-line-overlay 190 (when global-hl-line-overlay
191 (delete-overlay global-hl-line-overlay))) 191 (delete-overlay global-hl-line-overlay)))
192 192
193(defun hl-line-move (overlay) 193(defun hl-line-move (overlay)
194 "Move the Hl-Line overlay. 194 "Move the Hl-Line overlay.
@@ -207,6 +207,16 @@ the line including the point by OVERLAY."
207 (move-overlay overlay b e) 207 (move-overlay overlay b e)
208 (move-overlay overlay 1 1)))) 208 (move-overlay overlay 1 1))))
209 209
210(defun hl-line-unload-function ()
211 "Unload the Hl-Line library."
212 (global-hl-line-mode -1)
213 (save-current-buffer
214 (dolist (buffer (buffer-list))
215 (set-buffer buffer)
216 (when hl-line-mode (hl-line-mode -1))))
217 ;; continue standard unloading
218 nil)
219
210(provide 'hl-line) 220(provide 'hl-line)
211 221
212;; arch-tag: ac806940-0876-4959-8c89-947563ee2833 222;; arch-tag: ac806940-0876-4959-8c89-947563ee2833