--- emacs-24.3/src/lisp.h +++ emacs-24.3/src/lisp.h @@ -3148,6 +3148,7 @@ extern _Noreturn void error (const char *, ...) ATTRIBUTE_FORMAT_PRINTF (1, 2); extern _Noreturn void verror (const char *, va_list) ATTRIBUTE_FORMAT_PRINTF (1, 0); +extern _Noreturn void user_error (const char *); extern Lisp_Object un_autoload (Lisp_Object); extern Lisp_Object call_debugger (Lisp_Object arg); extern void init_eval_once (void); --- emacs-24.3/src/keyboard.c +++ emacs-24.3/src/keyboard.c @@ -782,7 +782,7 @@ /* Handle throw from read_minibuf when using minibuffer while it's active but we're in another window. */ if (STRINGP (val)) - xsignal1 (Qerror, val); + xsignal1 (Quser_error, val); return unbind_to (count, Qnil); } @@ -1207,7 +1207,7 @@ Fthrow (Qtop_level, Qnil); } -static _Noreturn void +_Noreturn void user_error (const char *msg) { xsignal1 (Quser_error, build_string (msg)); --- emacs-24.3/src/minibuf.c +++ emacs-24.3/src/minibuf.c @@ -449,7 +449,7 @@ && minibuf_level > 0) { if (EQ (selected_window, minibuf_window)) - error ("Command attempted to use minibuffer while in minibuffer"); + user_error ("Command attempted to use minibuffer while in minibuffer"); else /* If we're in another window, cancel the minibuffer that's active. */ Fthrow (Qexit, --- emacs-24.3/src/undo.c +++ emacs-24.3/src/undo.c @@ -445,12 +445,6 @@ unbind_to (count, Qnil); } -static _Noreturn void -user_error (const char *msg) -{ - xsignal1 (Quser_error, build_string (msg)); -} - DEFUN ("primitive-undo", Fprimitive_undo, Sprimitive_undo, 2, 2, 0, doc: /* Undo N records from the front of the list LIST.