Guest User

Untitled

a guest
Dec 7th, 2017
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lisp 0.43 KB | None | 0 0
  1. ;;;###autoload
  2. (defun find-function-or-variable-at-point ()
  3.   "Locate function or variable at point."
  4.   (interactive)
  5.   (let* ((f-o-v (substring-no-properties (thing-at-point 'symbol)))
  6.      (f-o-v-symb (intern f-o-v)))
  7.     (cond
  8.      ((fboundp f-o-v-symb)
  9.       (find-function-other-window f-o-v-symb))
  10.      ((boundp f-o-v-symb)
  11.       (find-variable-other-window f-o-v-symb))
  12.      (t
  13.       (message "No definition found for %S" f-o-v)))))
Add Comment
Please, Sign In to add comment