From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Oleh Krehel Newsgroups: gmane.emacs.devel Subject: Re: [elpa] master 2ae5b9c 3/7: swiper.el (swiper-font-lock-ensure): Ignore gnus modes Date: Thu, 26 Mar 2015 14:52:57 +0100 Message-ID: References: <20150326113028.28088.99965@vcs.savannah.gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1427377986 21438 80.91.229.3 (26 Mar 2015 13:53:06 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 26 Mar 2015 13:53:06 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Mar 26 14:53:04 2015 Return-path: Envelope-to: ged-emacs-devel@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 1Yb8DY-00065B-EJ for ged-emacs-devel@m.gmane.org; Thu, 26 Mar 2015 14:53:04 +0100 Original-Received: from localhost ([::1]:44630 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yb8DX-0001Z8-HJ for ged-emacs-devel@m.gmane.org; Thu, 26 Mar 2015 09:53:03 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47945) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yb8DT-0001WS-Ri for emacs-devel@gnu.org; Thu, 26 Mar 2015 09:53:00 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yb8DS-0002BN-Vh for emacs-devel@gnu.org; Thu, 26 Mar 2015 09:52:59 -0400 Original-Received: from mail-wi0-x233.google.com ([2a00:1450:400c:c05::233]:32863) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yb8DS-0002B7-Pu for emacs-devel@gnu.org; Thu, 26 Mar 2015 09:52:58 -0400 Original-Received: by wixm2 with SMTP id m2so12192535wix.0 for ; Thu, 26 Mar 2015 06:52:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=ucLZJtR+cdu2lv5n+7fIeONWKhJxxS33TY/B+cqxxv0=; b=krLq+zQ1t31cnJJHJdBZwV9e+NlqPmngoq1a9PSA8ldcfTUpRAQaNgQMI11RLQZS+K KFpSa+A89maotI4JoDeeuWou8cc8rLfxENf83EGNJKQlqZJs05zbTx4821OzdDgO1Ale WlI/cBwMTN+OJYs5SBQM8BK/WQ5GlentZO7CDiDtPrJo19NlVgUWsrlo0wcTHOv9bwB7 XZNZLntNLnV6478dBKkuhz3WkG5E/o62WKeDfgIMq3fv+71mLEKLPKJzjyurvRYZAO7e 39FEYr30MF2bCMzrSQPEJrxeyVC+ycMrhuEvdDh7/a+P6XAjl+7eYWQoz+SgsnP/R01I XjFA== X-Received: by 10.194.71.175 with SMTP id w15mr27590600wju.16.1427377977527; Thu, 26 Mar 2015 06:52:57 -0700 (PDT) Original-Received: by 10.27.215.137 with HTTP; Thu, 26 Mar 2015 06:52:57 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:400c:c05::233 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:184329 Archived-At: On Thu, Mar 26, 2015 at 2:43 PM, Stefan Monnier wrote: >> "Ensure the entired buffer is highlighted." >> (unless (or (derived-mode-p 'magit-mode) >> (memq major-mode '(package-menu-mode >> + gnus-summary-mode >> + gnus-article-mode >> + gnus-group-mode >> emms-playlist-mode erc-mode))) >> (if (fboundp 'font-lock-ensure) >> (font-lock-ensure) > > I think you'll want to list many more modes here. Or rather, I think > what you really want to test is whether font-lock is in use on > this buffer. > There are various ways to test it, such as testing the value of > font-lock-fontified or font-lock-mode, or calling font-lock-specified-p, > and there might be others. But what is the cause of discoloration when I call `font-lock-ensure`? For instance, in `gnus-group-mode`, `font-lock-mode` is t, but `font-lock-fontified` is nil, and the color is erased when I call `font-lock-ensure`. Oleh