emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] icomplete-vertical


From: Gregory Heytings
Subject: Re: [PATCH] icomplete-vertical
Date: Tue, 06 Apr 2021 07:44:42 +0000


Why is this a patch that uses advice and hook instead of a user option that changes the behaviour of icomplete directly?

Because it's the simplest / cleanest way to do it. It's a kind of derived minor mode.

Advice is not entirely unproblematic though, so the recommendation is usually to avoid them in libraries for use by others. Even more so in Emacs itself, I think.

See the ELisp Manual sections `(elisp) Advising Named Functions' and `(elisp) Coding Conventions'.

Indeed, we prefer not to use advice in our own code.


Okay, I did not know that there is a strict rule against advice. Here is the updated patch, which uses a hook instead. This makes the code even more flexible.

Attachment: 0001-Add-an-icomplete-vertical-minor-mode.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]