[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: address@hidden: customizing hl-line-face should reset global-hl-line
From: |
martin rudalics |
Subject: |
Re: address@hidden: customizing hl-line-face should reset global-hl-line-overlay to nil] |
Date: |
Mon, 28 Aug 2006 16:04:32 +0200 |
User-agent: |
Mozilla Thunderbird 1.0 (Windows/20041206) |
Customizing `hl-line-face' has no immediate effect. You must save the
customization, quit Emacs, and restart Emacs, to see the effect.
Would the attached patch help?
*** hl-line.el.~1.31.~ Wed Feb 1 09:17:44 2006
--- hl-line.el Mon Aug 28 15:58:58 2006
***************
*** 64,69 ****
--- 64,76 ----
;;; Code:
+ (defvar hl-line-overlay nil
+ "Overlay used by Hl-Line mode to highlight the current line.")
+ (make-variable-buffer-local 'hl-line-overlay)
+
+ (defvar global-hl-line-overlay nil
+ "Overlay used by Global-Hl-Line mode to highlight the current line.")
+
(defgroup hl-line nil
"Highlight the current line."
:version "21.1"
***************
*** 72,77 ****
--- 79,93 ----
(defcustom hl-line-face 'highlight
"Face with which to highlight the current line."
:type 'face
+ :require 'hl-line
+ :set (lambda (symbol value)
+ (set-default symbol value)
+ (dolist (buffer (buffer-list))
+ (with-current-buffer buffer
+ (when hl-line-overlay
+ (overlay-put hl-line-overlay 'face hl-line-face))))
+ (when global-hl-line-overlay
+ (overlay-put global-hl-line-overlay 'face hl-line-face)))
:group 'hl-line)
(defcustom hl-line-sticky-flag t
***************
*** 92,104 ****
This variable is expected to be made buffer-local by modes.")
- (defvar hl-line-overlay nil
- "Overlay used by Hl-Line mode to highlight the current line.")
- (make-variable-buffer-local 'hl-line-overlay)
-
- (defvar global-hl-line-overlay nil
- "Overlay used by Global-Hl-Line mode to highlight the current line.")
-
;;;###autoload
(define-minor-mode hl-line-mode
"Buffer-local minor mode to highlight the line about point.
--- 108,113 ----
Re: address@hidden: customizing hl-line-face should reset global-hl-line-overlay to nil], Richard Stallman, 2006/08/29