diff options
author | Kyle Meyer <kyle@kyleam.com> | 2016-03-23 20:50:05 -0400 |
---|---|---|
committer | Kyle Meyer <kyle@kyleam.com> | 2016-03-23 20:50:05 -0400 |
commit | df950b50a749bdc71462e7fc362e4d3a444895f6 (patch) | |
tree | af69037a3622fbcc802af029b7539d7529556cd7 /lisp | |
parent | ecb95568a82da5dbe97be0aba3b45b56efd0b75f (diff) | |
download | emacs.d-df950b50a749bdc71462e7fc362e4d3a444895f6.tar.gz |
magit-find-recently-changed-file: Make N optional
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/km-magit.el | 7 |
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" |