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: [PATCH] font-core: add font-lock-{enable, disable}-global-for functions Date: Sun, 04 Jan 2015 18:44:29 -0500 Message-ID: References: <1420300300-29754-1-git-send-email-mpn@google.com> <54A94BA7.8000705@yandex.ru> <54A9B9A2.2020301@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1420415131 29910 80.91.229.3 (4 Jan 2015 23:45:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 4 Jan 2015 23:45:31 +0000 (UTC) Cc: Michal Nazarewicz , emacs-devel@gnu.org To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jan 05 00:45:24 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 1Y7urM-000158-IM for ged-emacs-devel@m.gmane.org; Mon, 05 Jan 2015 00:45:24 +0100 Original-Received: from localhost ([::1]:58507 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y7urL-0008HL-Va for ged-emacs-devel@m.gmane.org; Sun, 04 Jan 2015 18:45:23 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60896) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y7uqc-0007Ln-Dn for emacs-devel@gnu.org; Sun, 04 Jan 2015 18:44:39 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y7uqV-0005at-1F for emacs-devel@gnu.org; Sun, 04 Jan 2015 18:44:35 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:12326) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y7uqU-0005ap-UQ for emacs-devel@gnu.org; Sun, 04 Jan 2015 18:44:30 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AjwPAOwQflRFpY0B/2dsb2JhbABbgweDYIVaxR0EAgKBJBcBAQEBAQF8hAMBAQMBViMFCwsOJhIUGA0kiEoJ1lkBAQEBBgEBAQEekG8HhEgFiwGkLoF4hBkhgncBAQE X-IPAS-Result: AjwPAOwQflRFpY0B/2dsb2JhbABbgweDYIVaxR0EAgKBJBcBAQEBAQF8hAMBAQMBViMFCwsOJhIUGA0kiEoJ1lkBAQEBBgEBAQEekG8HhEgFiwGkLoF4hBkhgncBAQE X-IronPort-AV: E=Sophos;i="5.07,502,1413259200"; d="scan'208";a="106563418" Original-Received: from 69-165-141-1.dsl.teksavvy.com (HELO ceviche.home) ([69.165.141.1]) by ironport2-out.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 04 Jan 2015 18:44:30 -0500 Original-Received: by ceviche.home (Postfix, from userid 20848) id B0F7666100; Sun, 4 Jan 2015 18:44:29 -0500 (EST) In-Reply-To: <54A9B9A2.2020301@yandex.ru> (Dmitry Gutov's message of "Mon, 05 Jan 2015 01:07:30 +0300") 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:180983 Archived-At: >> Maybe we should provide something like M-x customize-minor-mode-states RET >> which would collect the presence/absence of `foo-mode' or `(lambda () >> (foo-mode N))' in all the hooks and let the user add/remove them from >> those hooks. > That might be handy. > But that wouldn't solve the "derived modes problem" any better > than a docstring would (if it would, how?). Depends what you mean by "derived modes problem". My version of the problem is when activating foo-mode in parent-mode and foo-mode fails to be activated in child-mode. This problem should not affect M-x customize-minor-mode-states RET. > And scanning hooks for enabled/disabled modes would be necessarily > imprecise: even if we take care of the three main variations (`foo-mode', > (lambda () (foo-mode 1)), (lambda () (foo-mode -1))), that still leaves out > random functions (lambdas or named) that include a `foo-mode' call among > other code, that a more advanced user could have in their init file, or some > yet-another package might include in their "initialize me" function. That's no worse than the current font-lock-global-modes. Stefan