all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Richard Stallman <rms@gnu.org>
To: Yuan Fu <casouri@gmail.com>
Cc: monnier@iro.umontreal.ca, psainty@orcon.net.nz, emacs-devel@gnu.org
Subject: Re: Calling another major mode in a major mode body
Date: Mon, 05 Dec 2022 17:37:07 -0500	[thread overview]
Message-ID: <E1p2K5D-0004X7-B9@fencepost.gnu.org> (raw)
In-Reply-To: <8EC7180D-C1A3-4171-889F-829C1B851EC3@gmail.com> (message from Yuan Fu on Sat, 3 Dec 2022 23:54:22 -0800)

[[[ 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)





  reply	other threads:[~2022-12-05 22:37 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-21 22:07 Calling another major mode in a major mode body Yuan Fu
2022-11-22  0:44 ` Phil Sainty
2022-11-23  2:03   ` Yuan Fu
2022-11-23  2:15     ` Yuan Fu
2022-11-23  2:46     ` Stefan Monnier
2022-11-23 18:36       ` Yuan Fu
2022-11-23 19:21         ` Stefan Monnier
2022-12-04  7:54           ` Yuan Fu
2022-12-05 22:37             ` Richard Stallman [this message]
2022-12-05 22:50               ` Stefan Monnier
2022-12-08 23:07                 ` Richard Stallman
2022-12-09 12:56                   ` Stefan Monnier
2022-12-10 22:05                     ` Richard Stallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E1p2K5D-0004X7-B9@fencepost.gnu.org \
    --to=rms@gnu.org \
    --cc=casouri@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=psainty@orcon.net.nz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.