From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.bugs Subject: bug#35351: 27.0.50; Enable derived modes to run their own very-early 'change-major-mode-hook' code Date: Sun, 21 Apr 2019 02:01:51 -0400 Message-ID: References: <85237c18-768d-089b-221a-fe70b0ba4379@orcon.net.nz> <09a9ac76-ed6c-e6c2-9967-761a61fcfda4@orcon.net.nz> Reply-To: rms@gnu.org Content-Type: text/plain; charset=Utf-8 Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="195782"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 35351@debbugs.gnu.org To: Phil Sainty Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Apr 21 08:02:10 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hI5YI-000oma-Gq for geb-bug-gnu-emacs@m.gmane.org; Sun, 21 Apr 2019 08:02:10 +0200 Original-Received: from localhost ([127.0.0.1]:49354 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hI5YH-00032s-BT for geb-bug-gnu-emacs@m.gmane.org; Sun, 21 Apr 2019 02:02:09 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:51519) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hI5YB-00032n-Gp for bug-gnu-emacs@gnu.org; Sun, 21 Apr 2019 02:02:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hI5YA-0000Le-HJ for bug-gnu-emacs@gnu.org; Sun, 21 Apr 2019 02:02:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:33752) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hI5YA-0000LA-EE for bug-gnu-emacs@gnu.org; Sun, 21 Apr 2019 02:02:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hI5YA-0001Z0-5M for bug-gnu-emacs@gnu.org; Sun, 21 Apr 2019 02:02:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Richard Stallman Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 21 Apr 2019 06:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 35351 X-GNU-PR-Package: emacs Original-Received: via spool by 35351-submit@debbugs.gnu.org id=B35351.15558265216003 (code B ref 35351); Sun, 21 Apr 2019 06:02:02 +0000 Original-Received: (at 35351) by debbugs.gnu.org; 21 Apr 2019 06:02:01 +0000 Original-Received: from localhost ([127.0.0.1]:47296 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hI5Y9-0001Yl-0b for submit@debbugs.gnu.org; Sun, 21 Apr 2019 02:02:01 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:37103) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hI5Y6-0001YY-Vu for 35351@debbugs.gnu.org; Sun, 21 Apr 2019 02:01:59 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:45688) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hI5Y1-00009j-CT; Sun, 21 Apr 2019 02:01:53 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1hI5Xz-0007hl-CQ; Sun, 21 Apr 2019 02:01:51 -0400 In-Reply-To: <09a9ac76-ed6c-e6c2-9967-761a61fcfda4@orcon.net.nz> (message from Phil Sainty on Sun, 21 Apr 2019 14:45:15 +1200) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.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" Xref: news.gmane.org gmane.emacs.bugs:157928 Archived-At: [[[ To any NSA and FBI agents reading my email: please consider ]]] [[[ whether defending the US Constitution against all enemies, ]]] [[[ foreign or domestic, requires you to follow Snowden's example. ]]] > I forgot to mention the other hack solution which occurred to me, > which is for the library which defines the major mode to add its > own before-advice for that major mode function. We have adopted the design principle that advice is for users to add, and nothing else. This is because developers investigating why a call to the function foo doesn't work as expected will not think of the possibility that foo has advice. Thus, our design rule is that, if you want some code to be run before or after calls to foo, add code to foo to run a hook. This way, the code for foo will show developers that a hook is called. -- Dr Richard Stallman President, Free Software Foundation (https://gnu.org, https://fsf.org) Internet Hall-of-Famer (https://internethalloffame.org)