summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2014-10-22 21:11:29 -0400
committerKyle Meyer <kyle@kyleam.com>2014-10-22 21:11:29 -0400
commit41eefb50482b30ec49f5b67df139296db1b7f2d6 (patch)
tree36999914331b806bb5482c5e857e8c18a34a4b5d
parent851de4f6b3e973bdd62463c18050c40d8303a9b0 (diff)
downloademacs.d-41eefb50482b30ec49f5b67df139296db1b7f2d6.tar.gz
Show line number when calling goto-line
-rw-r--r--lisp/init-editing.el12
1 files changed, 12 insertions, 0 deletions
diff --git a/lisp/init-editing.el b/lisp/init-editing.el
index 0d5646d..acd01c8 100644
--- a/lisp/init-editing.el
+++ b/lisp/init-editing.el
@@ -150,6 +150,18 @@ and '<<<' mark the bounds of the narrowed region.
(define-key km/editing-map "i" 'indent-relative)
+;; From http://whattheemacsd.com/key-bindings.el-01.html
+(defun km/goto-line-with-feedback ()
+ "Show line numbers temporarily, while prompting for the line number input"
+ (interactive)
+ (unwind-protect
+ (progn
+ (linum-mode 1)
+ (call-interactively 'goto-line))
+ (linum-mode -1)))
+
+(global-set-key [remap goto-line] 'km/goto-line-with-feedback)
+
;; Kill map
(define-prefix-command 'km/kill-map)
(global-set-key (kbd "C-c k") 'km/kill-map)