summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2016-03-23 20:50:05 -0400
committerKyle Meyer <kyle@kyleam.com>2016-03-23 20:50:05 -0400
commitdf950b50a749bdc71462e7fc362e4d3a444895f6 (patch)
treeaf69037a3622fbcc802af029b7539d7529556cd7
parentecb95568a82da5dbe97be0aba3b45b56efd0b75f (diff)
downloademacs.d-df950b50a749bdc71462e7fc362e4d3a444895f6.tar.gz
magit-find-recently-changed-file: Make N optional
-rw-r--r--lisp/km-magit.el7
1 files changed, 4 insertions, 3 deletions
diff --git a/lisp/km-magit.el b/lisp/km-magit.el
index 199d858..ffba9bd 100644
--- a/lisp/km-magit.el
+++ b/lisp/km-magit.el
@@ -336,11 +336,12 @@ If CHECKOUT is non-nil, checkout file instead."
magit-buffer-refname "--" magit-buffer-file-name)))
;;;###autoload
-(defun km/magit-find-recently-changed-file (n)
+(defun km/magit-find-recently-changed-file (&optional n)
"Find a file that changed from \"HEAD~N..HEAD\".
N defaults to 20."
- (interactive "p")
- (unless current-prefix-arg (setq n 10))
+ (interactive (list (and current-prefix-arg
+ (prefix-numeric-value current-prefix-arg))))
+ (setq n (or n 10))
(magit-with-toplevel
(find-file (magit-completing-read
"File"