703f78c2b8
- Apply `/` and `//` rules (double / is for private functions) - Add missing `spacemacs/` prefixes - Move functions used outside of spacemacs-base layer to core/core-funcs.el - Remove unused functions Commit originally intented to only rename linum-update-window-scale-fix to spacemacs/linum-update-window-scale-fix :-)
31 lines
1,008 B
EmacsLisp
31 lines
1,008 B
EmacsLisp
;;; funcs.el --- Emacs Lisp functions File
|
||
;;
|
||
;; Copyright (c) 2012-2016 Sylvain Benner & Contributors
|
||
;;
|
||
;; Author: Sylvain Benner <sylvain.benner@gmail.com>
|
||
;; 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))))
|