From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.devel Subject: Re: [drew.adams@oracle.com: customizing hl-line-face should reset global-hl-line-overlay to nil] Date: Mon, 28 Aug 2006 16:04:32 +0200 Message-ID: <44F2F7F0.7070205@gmx.at> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------000802030207080500080402" X-Trace: sea.gmane.org 1156774039 29508 80.91.229.2 (28 Aug 2006 14:07:19 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 28 Aug 2006 14:07:19 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Aug 28 16:07:16 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GHhld-0004aY-3t for ged-emacs-devel@m.gmane.org; Mon, 28 Aug 2006 16:07:09 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GHhlc-0006qk-Fn for ged-emacs-devel@m.gmane.org; Mon, 28 Aug 2006 10:07:08 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GHhl6-0006SC-BO for emacs-devel@gnu.org; Mon, 28 Aug 2006 10:06:36 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GHhl4-0006Q8-JU for emacs-devel@gnu.org; Mon, 28 Aug 2006 10:06:35 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GHhl4-0006Pn-3n for emacs-devel@gnu.org; Mon, 28 Aug 2006 10:06:34 -0400 Original-Received: from [213.165.64.20] (helo=mail.gmx.net) by monty-python.gnu.org with smtp (Exim 4.52) id 1GHhu1-0003t5-Jx for emacs-devel@gnu.org; Mon, 28 Aug 2006 10:15:49 -0400 Original-Received: (qmail invoked by alias); 28 Aug 2006 14:06:31 -0000 Original-Received: from M3124P012.adsl.highway.telekom.at (EHLO [88.117.38.108]) [88.117.38.108] by mail.gmx.net (mp041) with SMTP; 28 Aug 2006 16:06:31 +0200 X-Authenticated: #14592706 User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: de-DE, de, en-us, en Original-To: rms@gnu.org In-Reply-To: X-Y-GMX-Trusted: 0 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:58995 Archived-At: This is a multi-part message in MIME format. --------------000802030207080500080402 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit > 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? --------------000802030207080500080402 Content-Type: text/plain; name="hl-line.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="hl-line.patch" *** 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 ---- --------------000802030207080500080402 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel --------------000802030207080500080402--