From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: Calling another major mode in a major mode body Date: Mon, 05 Dec 2022 17:37:07 -0500 Message-ID: References: <1263D369-330F-4624-A376-ECC1E1A26A52@gmail.com> <3FDE8ADA-C67E-4047-816B-9259E8041ED2@gmail.com> <8EC7180D-C1A3-4171-889F-829C1B851EC3@gmail.com> Reply-To: rms@gnu.org Content-Type: text/plain; charset=Utf-8 Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13001"; mail-complaints-to="usenet@ciao.gmane.io" Cc: monnier@iro.umontreal.ca, psainty@orcon.net.nz, emacs-devel@gnu.org To: Yuan Fu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Dec 05 23:37:59 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1p2K62-00039N-Rb for ged-emacs-devel@m.gmane-mx.org; Mon, 05 Dec 2022 23:37:58 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p2K5F-0005VC-Id; Mon, 05 Dec 2022 17:37:09 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p2K5E-0005V3-8X for emacs-devel@gnu.org; Mon, 05 Dec 2022 17:37:08 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p2K5D-0006Od-JV; Mon, 05 Dec 2022 17:37:07 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=Date:References:Subject:In-Reply-To:To:From: mime-version; bh=VAzxDstlotu/6ZPldbv1a6VJIx65/VNAFnx6TdD+blQ=; b=RyI4dmftadYz rtweihX8KeoBCB5uV41Lnq7ye8iBSabEu+DUc6xFvoYHOYKo6YQTAsJwWffzkpipyrlOKw2dq6uAh 7gvhezE1F8Nxj68ZcTwNwD+AdK6MCeynrBf4VKevYw1E3qetPPumv+GzmSQZHYq6m+Q3RsiGTPZC0 PO+Z+4RrPIOYgmsl9/7jTmzSlhqrzuKVezVgNpFNsu+P3MrLBhXw9xnaMf3UznccCu1YqQYuzClgP s/bNpQ7xjmB/Q39IYAqoY5wBBt+a1n5GBJw2a6EScoflKpeRCds1IL/s6CSrTtC/zE7Lf2943Vk88 6+PaWl0D1fCWho2gKB8vhg==; Original-Received: from rms by fencepost.gnu.org with local (Exim 4.90_1) (envelope-from ) id 1p2K5D-0004X7-B9; Mon, 05 Dec 2022 17:37:07 -0500 In-Reply-To: <8EC7180D-C1A3-4171-889F-829C1B851EC3@gmail.com> (message from Yuan Fu on Sat, 3 Dec 2022 23:54:22 -0800) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:300947 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. ]]] > Yeah, in Emacs 30, probably :-) I used the advice technique/hack similar to tex-mode for bash-ts-mode. Plsee fix that. To make one part of Emacs put advice on another part is asking for future development trouble. The worst thing is that the trouble is likely to happen to some other developer. When your code puts advice on a function BAR, that means other code that calls BAR will get behavior different from what the source code of BAR says. Someone else will debug a program that calls BAR and tear per hair out trying to figure out why it does not do what ALL the source code says it should do. Please don't install code that advises other code. If you've already done that, please fix it now. Don't add it to the backlog of pitfalls waiting to be fixed. -- Dr Richard Stallman (https://stallman.org) Chief GNUisance of the GNU Project (https://gnu.org) Founder, Free Software Foundation (https://fsf.org) Internet Hall-of-Famer (https://internethalloffame.org)