From 41eefb50482b30ec49f5b67df139296db1b7f2d6 Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Wed, 22 Oct 2014 21:11:29 -0400 Subject: Show line number when calling goto-line --- lisp/init-editing.el | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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) -- cgit v1.2.3