all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Richard Stallman <rms@gnu.org>
To: emacs-devel@gnu.org
Subject: editorconfig makes advice
Date: Fri, 21 Jun 2024 22:47:19 -0400	[thread overview]
Message-ID: <E1sKqmd-00042P-F9@fencepost.gnu.org> (raw)

[[[ 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 was looking at the posted diffs and saw this:

             (advice-add 'find-file-noselect :around #'editorconfig--advice-find-file-noselect)
-            (advice-add 'insert-file-contents :around #'editorconfig--advice-insert-file-contents)
+            (advice-add 'find-auto-coding :after-until
+                        #'editorconfig--advice-find-auto-coding)

Our general design principle is that parts of Emacs should not advise other
parts of Emacs -- instead, they should set up hooks that the other parts run.
The reasons for this are documented.

Is there a rpecial reason to use advice here?  If not,
can we please eliminate this advice, perhaps by making a few new hooks?

-- 
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:[~2024-06-22  2:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-22  2:47 Richard Stallman [this message]
2024-06-22  2:56 ` editorconfig makes advice Po Lu
2024-06-25  2:49   ` 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=E1sKqmd-00042P-F9@fencepost.gnu.org \
    --to=rms@gnu.org \
    --cc=emacs-devel@gnu.org \
    /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.