aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/ui-navigation.el7
1 files changed, 5 insertions, 2 deletions
diff --git a/modules/ui-navigation.el b/modules/ui-navigation.el
index f0d2ef527..f2181d97e 100644
--- a/modules/ui-navigation.el
+++ b/modules/ui-navigation.el
@@ -179,8 +179,11 @@ With numeric prefix ARG, re-open the ARGth most-recently-killed file
(delq buf-file recently-killed-list)))
buffer-files-list)
(when recently-killed-list
- (find-file
- (nth (1- arg) recently-killed-list)))))
+ (let ((file (nth (1- arg) recently-killed-list)))
+ (if file
+ (find-file file)
+ (user-error "Only %d killed file(s) to choose from"
+ (length recently-killed-list)))))))
(keymap-global-set "M-S-z" #'cj/undo-kill-buffer) ;; was M-Z, overrides zap-to-char
;; ---------------------------- Undo Layout Changes ----------------------------