From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: global-font-lock-mode-check-buffers: What does it do? Date: Tue, 18 Aug 2015 01:11:24 -0400 Message-ID: References: <21968.64541.229380.952834@gargle.gargle.HOWL> <21970.4072.675256.230793@retriever.mtv.corp.google.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1439874710 23632 80.91.229.3 (18 Aug 2015 05:11:50 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 18 Aug 2015 05:11:50 +0000 (UTC) Cc: tv.raman.tv@gmail.com, emacs-devel@gnu.org To: raman@google.com (T.V Raman) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Aug 18 07:11:37 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 1ZRZBQ-0002i6-DX for ged-emacs-devel@m.gmane.org; Tue, 18 Aug 2015 07:11:36 +0200 Original-Received: from localhost ([::1]:45529 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZRZBP-00025N-De for ged-emacs-devel@m.gmane.org; Tue, 18 Aug 2015 01:11:35 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50267) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZRZBL-000244-Kk for emacs-devel@gnu.org; Tue, 18 Aug 2015 01:11:32 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZRZBH-0007nd-FF for emacs-devel@gnu.org; Tue, 18 Aug 2015 01:11:31 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:45570) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZRZBH-0007nC-CA for emacs-devel@gnu.org; Tue, 18 Aug 2015 01:11:27 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0AxFgA731xV/5P+d0tcgxCEAoVVu0CHSwQCAoE8OhMBAQEBAQEBgQpBBYNdAQEDAVYjBQsLNBIUGA2IWwjPIwEBAQcCAR+LOoUFB4QtAQSzP4FFI4QUIoJ4AQEB X-IPAS-Result: A0AxFgA731xV/5P+d0tcgxCEAoVVu0CHSwQCAoE8OhMBAQEBAQEBgQpBBYNdAQEDAVYjBQsLNBIUGA2IWwjPIwEBAQcCAR+LOoUFB4QtAQSzP4FFI4QUIoJ4AQEB X-IronPort-AV: E=Sophos;i="5.13,465,1427774400"; d="scan'208";a="160512367" Original-Received: from 75-119-254-147.dsl.teksavvy.com (HELO ceviche.home) ([75.119.254.147]) by ironport2-out.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 18 Aug 2015 01:11:25 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id B44E56618B; Tue, 18 Aug 2015 01:11:24 -0400 (EDT) In-Reply-To: <21970.4072.675256.230793@retriever.mtv.corp.google.com> (T. V. Raman's message of "Mon, 17 Aug 2015 09:46:32 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.181 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:188860 Archived-At: > But I still cant tell what it does after looking at the code where it > is generated. Also, why is it placed on post-command-hook -- given > that jit-lock is already attached to after-change-functions? As mentioned, it's created by define-globalized-minor-mode, i.e. code which works for any minor mode. It knows nothing about jit-lock's own hooks. What it does is check whether some newly created buffer might need font-lock enabled. Stefan > Stefan Monnier writes: >> > I see that global-font-lock-mode-check-buffers is present in >> > post-command-hook -- that function appears to get defined >> > automagically in font-core.el >> >> It's defined by the call to define-globalized-minor-mode. >> >> >> Stefan > -- > --