;;; funcs.el --- Emacs Lisp functions File ;; ;; Copyright (c) 2012-2016 Sylvain Benner & Contributors ;; ;; Author: Sylvain Benner ;; URL: https://github.com/syl20bnr/spacemacs ;; ;; This file is not part of GNU Emacs. ;; ;;; License: GPLv3 ;; idea from http://www.reddit.com/r/emacs/comments/312ge1/i_created_this_function_because_i_was_tired_of/ (defun spacemacs/eval-current-form () "Looks for the current def* or set* command then evaluates, unlike `eval-defun', does not go to topmost function" (interactive) (save-excursion (search-backward-regexp "(def\\|(set") (forward-list) (call-interactively 'eval-last-sexp))) (defun spacemacs/nav-find-elisp-thing-at-point-other-window () "Find thing under point and go to it another window." (interactive) (let ((symb (variable-at-point))) (if (and symb (not (equal symb 0)) (not (fboundp symb))) (find-variable-other-window symb) (find-function-at-point))))