Is there a way to obtain the function name of current function?

Viewed 1632
(defun foo ()
    (send-to-debug-log "Error. Function terminated." (get-current-function-name)))

I currently do this:

(defun foo ()
    (send-to-debug-log "Error. Function terminated." 'foo)))

Hard coding the function name seems not to be a good practice. Any suggestion to implement the get-current-function-name or get-function-name-that-call-me.

4 Answers
Related