Skip to content

Commit

Permalink
Make M-. and M-, work in elisp like they do in slime
Browse files Browse the repository at this point in the history
  • Loading branch information
purcell committed May 30, 2011
1 parent 163d23a commit 2fd3d5b
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions init-lisp.el
Original file line number Diff line number Diff line change
Expand Up @@ -109,4 +109,18 @@
(when turn-on
(remove-hook 'pre-command-hook #'hl-sexp-unhighlight)))


;;; Make M-. and M-, work in elisp like they do in slime
(defun find-elisp-thing-at-point ()
(interactive)
(let ((sym (symbol-at-point)))
(when sym
(ring-insert find-tag-marker-ring (point-marker))
(if (fboundp sym)
(find-function sym)
(find-variable sym)))))

(define-key emacs-lisp-mode-map (kbd "M-.") 'find-elisp-thing-at-point)
(define-key emacs-lisp-mode-map (kbd "M-,") 'pop-tag-mark)

(provide 'init-lisp)

0 comments on commit 2fd3d5b

Please sign in to comment.