From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#13817: 24.3.50; Disabling whitespace-mode that was enabled in sgml-mode-hook breaks font-lock Date: Tue, 19 Mar 2013 19:14:15 +0400 Message-ID: <514880C7.2060007@yandex.ru> References: <87ppznbnba.fsf@yandex.ru> <5147F2EC.4060102@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1363706087 15476 80.91.229.3 (19 Mar 2013 15:14:47 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 19 Mar 2013 15:14:47 +0000 (UTC) Cc: 13817-done@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Mar 19 16:15:08 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UHyFn-0002Ol-SH for geb-bug-gnu-emacs@m.gmane.org; Tue, 19 Mar 2013 16:15:07 +0100 Original-Received: from localhost ([::1]:44198 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UHyFQ-0007r2-NY for geb-bug-gnu-emacs@m.gmane.org; Tue, 19 Mar 2013 11:14:44 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:43131) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UHyF9-0007TU-FC for bug-gnu-emacs@gnu.org; Tue, 19 Mar 2013 11:14:32 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UHyF4-0005RQ-ED for bug-gnu-emacs@gnu.org; Tue, 19 Mar 2013 11:14:27 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:59983) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UHyF4-0005R0-BU for bug-gnu-emacs@gnu.org; Tue, 19 Mar 2013 11:14:22 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1UHyGf-0000Jb-W8 for bug-gnu-emacs@gnu.org; Tue, 19 Mar 2013 11:16:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 19 Mar 2013 15:16:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 13817 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 13817-done@debbugs.gnu.org id=D13817.13637061571201 (code D ref 13817); Tue, 19 Mar 2013 15:16:01 +0000 Original-Received: (at 13817-done) by debbugs.gnu.org; 19 Mar 2013 15:15:57 +0000 Original-Received: from localhost ([127.0.0.1]:35859 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UHyGa-0000JK-JV for submit@debbugs.gnu.org; Tue, 19 Mar 2013 11:15:57 -0400 Original-Received: from mail-la0-f43.google.com ([209.85.215.43]:33316) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UHyGY-0000JB-0J for 13817-done@debbugs.gnu.org; Tue, 19 Mar 2013 11:15:55 -0400 Original-Received: by mail-la0-f43.google.com with SMTP id ek20so1122511lab.2 for <13817-done@debbugs.gnu.org>; Tue, 19 Mar 2013 08:14:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:sender:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type :content-transfer-encoding:x-antivirus:x-antivirus-status; bh=Zh9rLIG1VbV4qb0ddfN0lOc5U1upqRMjLDW1WC+KOYs=; b=nGybT1HL849phJwoa8oU9z2URX9YZizXlsYR8K5/QBmANfMJWkoIZj772/N7umZbLb Z7uz1AeeklzSy5fpozbVZm+niJO5jJe4riS5adNqbbFqJweNp1j0SVnV6ui8VVOrnuhN aWuOqzVWm3dr9yJCVd2oElVPvajuxSaoJinmN4ILBBGIpHdrET+hkfZ/WDqG/aeZCcOU o5zXTm27hzvUfePxJiySK8cLlQ9rUjewBYZvilBaPyz8oWYkGvqVXA49N2WHMuFOb1y8 g9+jCbzvVcb3R4BJSAMRYP2XtA2OvWJhw+mRKFn+pDjDXCMBTFLWdbu60kfxses+fCi7 qMrQ== X-Received: by 10.112.27.106 with SMTP id s10mr8201246lbg.27.1363706052891; Tue, 19 Mar 2013 08:14:12 -0700 (PDT) Original-Received: from [127.0.0.1] ([178.252.98.87]) by mx.google.com with ESMTPS id m2sm6851774lbz.7.2013.03.19.08.14.09 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 19 Mar 2013 08:14:10 -0700 (PDT) User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130307 Thunderbird/17.0.4 In-Reply-To: X-Antivirus: avast! (VPS 130319-0, 19.03.2013), Outbound message X-Antivirus-Status: Clean X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:72708 Archived-At: On 19.03.2013 17:02, Stefan Monnier wrote: >>>> On the surface, the reason for this is that when whitespace-mode is being >>>> turned on in the hook, font-lock-keywords is still nil, and so nil is >>>> saved in whitespace-font-lock-keywords. >>> whitespace.el should probably use font-lock-remove-keywords instead. >> That helped, thank you. >> I left the disabling/enabling of font-lock-mode there, because otherwise the >> changes in highlighting are not visible until the buffer is modified. > > Supposedly `font-lock-fontify-buffer' is meant to do that without > disabling+enabling. That works, too. :)