From a8e1fefac0eea6687454c78937396a85f88ff612 Mon Sep 17 00:00:00 2001 From: Karl Heuer Date: Mon, 22 May 1995 22:08:18 +0000 Subject: [PATCH] (edit-kbd-macro): Better error messages for undefined keys or keys that are not keyboard macros. --- lisp/edmacro.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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)) -- 2.39.2