summaryrefslogtreecommitdiff
path: root/lisp/edmacro.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/edmacro.el')
-rw-r--r--lisp/edmacro.el5
1 files changed, 4 insertions, 1 deletions
diff --git a/lisp/edmacro.el b/lisp/edmacro.el
index 8c9eaa2ed09..0255a675072 100644
--- a/lisp/edmacro.el
+++ b/lisp/edmacro.el
@@ -114,13 +114,16 @@ With a prefix argument, format the macro in a more concise way."
((eq cmd 'view-lossage)
(setq mac (recent-keys))
(setq cmd 'last-kbd-macro))
+ ((null cmd)
+ (error "Key sequence %s is not defined" (key-description keys)))
((symbolp cmd)
(setq mac (symbol-function cmd)))
(t
(setq mac cmd)
(setq cmd nil)))
(unless (arrayp mac)
- (error "Not a keyboard macro: %s" cmd))
+ (error "Key sequence %s is not a keyboard macro"
+ (key-description keys)))
(message "Formatting keyboard macro...")
(let* ((oldbuf (current-buffer))
(mmac (edmacro-fix-menu-commands mac))