[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 13:59:20 +0200 |
User-agent: |
mu4e 1.7.0; emacs 29.0.50 |
Hongyi Zhao <hongyi.zhao@gmail.com> writes:
> I'm trying to understand the code snippet here [1] as follows:
>
> ;;;
> (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.
Have a look at (info "(elisp) Advice Combinators").
Bye,
Tassilo
- 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/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