all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* How can function know its own name?
@ 2022-06-25 20:21 Jean Louis
  2022-06-25 21:37 ` Emanuel Berg
                   ` (3 more replies)
  0 siblings, 4 replies; 13+ messages in thread
From: Jean Louis @ 2022-06-25 20:21 UTC (permalink / raw)
  To: Help GNU Emacs


I would like to invoke logging for specific functions automatically,
without specifying what to log, and my function should know which
function invoked it.

For example

(defun my-log (&optional function-name)
  (log-to-database function-name))

(defun logged-function ()
  (my-log (find-function-name)) ;; I would like at this point to recognize that it was invoked from within logged-function?
  (ignore))

Would this be possible somehow?


Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns

In support of Richard M. Stallman
https://stallmansupport.org/




^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2022-06-27  2:35 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-25 20:21 How can function know its own name? Jean Louis
2022-06-25 21:37 ` Emanuel Berg
2022-06-26  5:46 ` tomas
2022-06-26  8:08   ` Jean Louis
2022-06-26  8:54 ` Stefan Monnier via Users list for the GNU Emacs text editor
2022-06-26  9:25   ` tomas
2022-06-26 10:13   ` Jean Louis
2022-06-26 21:25     ` Stefan Monnier
2022-06-27  2:35       ` Jean Louis
2022-06-26  9:43 ` Philip Kaludercic
2022-06-26 10:21   ` Jean Louis
2022-06-26 10:31   ` Jean Louis
2022-06-26 21:13     ` Stefan Monnier via Users list for the GNU Emacs text editor

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.