From: Tassilo Horn <tsdh@gnu.org>
To: Hongyi Zhao <hongyi.zhao@gmail.com>
Cc: help-gnu-emacs <help-gnu-emacs@gnu.org>
Subject: Re: The definition of orig-fn.
Date: Mon, 04 Oct 2021 14:23:40 +0200 [thread overview]
Message-ID: <878rz9ht1m.fsf@gnu.org> (raw)
In-Reply-To: <CAGP6POLa-RaiV_bB4KfbgGkfBiRzC4vwpkfW46FcC=dyF5SWtQ@mail.gmail.com>
Hongyi Zhao <hongyi.zhao@gmail.com> writes:
>> > (defun ora--company-good-prefix-p (orig-fn prefix)
>> > (unless (and (stringp prefix) (string-match-p "\\`[0-9]+\\'" prefix))
>> > (funcall orig-fn prefix)))
>> > (ora-advice-add 'company--good-prefix-p :around #'ora--company-good-prefix-p)
>> > ;;;
>> >
>> > The symbol `orig-fn' used above puzzles me the most. It can't be found
>> > by `C-h o orig-fn RET', and its definition cannot be found elsewhere
>> > in the above repository.
>>
>> It's just the first argument of the function and will always be
>> `company--good-prefix-p' according to the device definition.
>
> Thank you for pointing this out. But I completely commented out the
> above code snippet given there [1] as follows, and it still works
> smoothly:
Did you also delete the *.el{c,n} files and restart emacs? When you do
`C-h f company--good-prefix-p RET' it should mention that there is an
advice if there is one.
But I don't understand what you are trying to achieve. Why are you
commenting that out, and what does "works smoothly" mean in this
context? (FWIW, I don't use company nor oremacs, so I cannot comment on
that.)
Bye,
Tassilo
next prev parent reply other threads:[~2021-10-04 12:23 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-04 11:33 The definition of orig-fn Hongyi Zhao
2021-10-04 11:59 ` Tassilo Horn
2021-10-04 12:12 ` Hongyi Zhao
2021-10-04 12:23 ` Tassilo Horn [this message]
2021-10-04 13:57 ` Hongyi Zhao
2021-10-04 18:14 ` Tassilo Horn
2021-10-05 2:12 ` Hongyi Zhao
2021-10-05 4:56 ` Tassilo Horn
2021-10-05 6:06 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-10-05 6:25 ` Hongyi Zhao
2021-10-05 6:40 ` Hongyi Zhao
2021-10-05 7:32 ` Tassilo Horn
2021-10-05 8:15 ` Hongyi Zhao
2021-10-05 8:50 ` Tassilo Horn
2021-10-05 9:41 ` Hongyi Zhao
2021-10-05 9:43 ` Tassilo Horn
2021-10-05 10:19 ` Tassilo Horn
2021-10-05 10:25 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-10-05 11:55 ` Hongyi Zhao
2021-10-05 14:21 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-10-05 10:17 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-10-05 11:52 ` Hongyi Zhao
2021-10-04 12:01 ` Emanuel Berg via Users list for the GNU Emacs text editor
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=878rz9ht1m.fsf@gnu.org \
--to=tsdh@gnu.org \
--cc=help-gnu-emacs@gnu.org \
--cc=hongyi.zhao@gmail.com \
/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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).