[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: The definition of orig-fn.
From: |
Tassilo Horn |
Subject: |
Re: The definition of orig-fn. |
Date: |
Mon, 04 Oct 2021 14:23:40 +0200 |
User-agent: |
mu4e 1.7.0; emacs 29.0.50 |
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
- The definition of orig-fn., Hongyi Zhao, 2021/10/04
- Re: The definition of orig-fn., Tassilo Horn, 2021/10/04
- Re: The definition of orig-fn., Hongyi Zhao, 2021/10/04
- Re: The definition of orig-fn.,
Tassilo Horn <=
- Re: The definition of orig-fn., Hongyi Zhao, 2021/10/04
- Re: The definition of orig-fn., Tassilo Horn, 2021/10/04
- Re: The definition of orig-fn., Hongyi Zhao, 2021/10/04
- Re: The definition of orig-fn., Tassilo Horn, 2021/10/05
- Re: The definition of orig-fn., Emanuel Berg, 2021/10/05
- Re: The definition of orig-fn., Hongyi Zhao, 2021/10/05
- Re: The definition of orig-fn., Hongyi Zhao, 2021/10/05
- Re: The definition of orig-fn., Tassilo Horn, 2021/10/05
- Re: The definition of orig-fn., Hongyi Zhao, 2021/10/05
- Re: The definition of orig-fn., Tassilo Horn, 2021/10/05