[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How can function know its own name?

From: Jean Louis
Subject: Re: How can function know its own name?
Date: Sun, 26 Jun 2022 13:31:42 +0300
User-agent: Mutt/+ () (2022-05-21)

* Philip Kaludercic <> [2022-06-26 12:45]:
> This might do the job: 

This way it somehow starts working. Condition is that I have to call
`my-function-name' in the first `let' as otherwise the index would

It is very useful however on my side. I can also get arguments to
function. I will use that for refresh and logging. 

(defun my-function-name ()
  (cadr (backtrace-frame 5)))

(defun my-aware-function ()
  (let ((my-name (my-function-name)))

(my-aware-function) ⇒ my-aware-function


Take action in Free Software Foundation campaigns:

In support of Richard M. Stallman

reply via email to

[Prev in Thread] Current Thread [Next in Thread]