about summary refs log tree commit diff
path: root/init/functions.el
diff options
context:
space:
mode:
authorVincent Ambo <vincent@kivra.com>2015-02-20T10·45+0100
committerVincent Ambo <vincent@kivra.com>2015-02-20T10·45+0100
commit4cca819886657fe6300435ed97296a9848995cc8 (patch)
treebf76d94871f61fc09704ef4f5a695daf83c5988b /init/functions.el
parentd9bd9ef50c19a6b918a490b429d6571685446c22 (diff)
Minor changes
* use ace-jump-line-mode for quick line jumping
* column-number-mode enabled by default
Diffstat (limited to 'init/functions.el')
-rw-r--r--init/functions.el7
1 files changed, 7 insertions, 0 deletions
diff --git a/init/functions.el b/init/functions.el
index e26e1f1bea62..a0bf51a9e031 100644
--- a/init/functions.el
+++ b/init/functions.el
@@ -99,4 +99,11 @@ Including indent-buffer, which should not be called automatically on save."
       (find-file (concat "/sudo:root@localhost:" (ido-read-file-name "File: ")))
     (find-alternate-file (concat "/sudo:root@localhost:" buffer-file-name))))
 
+;; Evaluate sexp and replace it with result
+(defun replace-last-sexp ()
+    (interactive)
+    (let ((value (eval (preceding-sexp))))
+      (kill-sexp -1)
+      (insert (format "%S" value))))
+
 (provide 'functions)