all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Taylor Grinn <grinntaylor@gmail.com>
To: 58882@debbugs.gnu.org
Subject: bug#58882: ido-everywhere & add-function
Date: Sat, 29 Oct 2022 17:38:46 -0400	[thread overview]
Message-ID: <86eduq48ex.fsf@gmail.com> (raw)


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








                 reply	other threads:[~2022-10-29 21:38 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=86eduq48ex.fsf@gmail.com \
    --to=grinntaylor@gmail.com \
    --cc=58882@debbugs.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.