[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
How to get advised function name form inside of the advice
From: |
Vitalie Spinu |
Subject: |
How to get advised function name form inside of the advice |
Date: |
Fri, 04 Mar 2016 14:36:09 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.91 (gnu/linux) |
Hi,
How to retrieve the name of the original function from the inside of "new"
advice? I need to condition-case a function and show a meaningful error message
with function name instead of an error.
For concreteness:
(defun tt (a b)
(message "in: (%s . %d)" a b))
(defun tt-add (fun &rest args)
(message "running advice for: %s" how_to_get_tt_name_here_)
(apply fun args))
(advice-add 'tt :around 'tt-add)
Thanks,
Vitalie
- How to get advised function name form inside of the advice,
Vitalie Spinu <=