* bug#58882: ido-everywhere & add-function
@ 2022-10-29 21:38 Taylor Grinn
0 siblings, 0 replies; only message in thread
From: Taylor Grinn @ 2022-10-29 21:38 UTC (permalink / raw)
To: 58882
I can modify `read-file-name-function` like so:
(advice-add read-file-name-function :around #'my/setup-minibuffer)
However, with `ido-everywhere-mode` enabled, I have to do it like this:
(advice-add 'read-file-name-function :around #'my/setup-minibuffer)
The reason is that ido-everywhere adds a function to the variable
'read-file-name-function, rather than the value of that variable. This
changes the type of 'read-file-name-function from a symbol to a
function. This seems like it might have been a mistake.
Changing all instances of `add-function', which is a macro, to
`advice-add', which is a defun, will allow the variables
'read-file-name-function and 'read-buffer-function and 'ffap-file-finder
to remain unchanged, which I think was the intended effect.
Best,
Taylor
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-10-29 21:38 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-29 21:38 bug#58882: ido-everywhere & add-function Taylor Grinn
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.