Skip to content

Instantly share code, notes, and snippets.

@YoungFrog
Created February 8, 2016 13:11
Show Gist options
  • Save YoungFrog/6c15a2d95501bbd57a66 to your computer and use it in GitHub Desktop.
Save YoungFrog/6c15a2d95501bbd57a66 to your computer and use it in GitHub Desktop.

determine “current function” in the stack call

(defun cur-fun () (with-temp-buffer (let ((standard-output (current-buffer))) (backtrace)) (message (buffer-string)) (goto-char (point-min)) (dotimes (_ 3) (re-search-forward “^ [^(]” nil t)) (symbol-at-point)))

see also: http://sprunge.us/NfcJ?cl (defun yftest () (cur-fun)) (yftest) [2014-02-11 mar. 14:19]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment