Subject: Re: bug#18140: [PATCH] macros.c: CHECK_VECTOR_OR_STRING invokes wrong_type_argument for Qnil instead of return 0

From: Jan Chaloupka <[email-masked]>
Date: Tue, 29 Jul 2014 11:59:38 +0200

On 07/29/2014 11:04 AM, Andreas Schwab wrote:
> Jan Chaloupka <[email-masked]> writes:
>
>> So is it correct if append and Vlast_kbd_macro are both Qnil resulting in
>> CHECK_VECTOR_OR_STRING fail?
> Sure, that's the point of the check.  last-kbd-macro is a lisp-level
> variable, so it must be checked.

Yes, I agree it has to be check. Having .emacs.desktop file with series
of the folkowing kbd macro definitions:

(desktop-create-buffer 206
     ...
     '(defining-kbd-macro global-auto-revert-mode)
     ...
)

append argument of start-kbd-macro is false. But because there is no 
last kbd macro,
check fails. I guess then .emacs.desktop is incorectly written. Thus 
resulting in
proper check fail.

>> Because Vlast_kbd_macro is not VECTOR nor STRING
> That just calls error, but not emacs_abort.
CHECK_VECTOR_OR_STRING -> wrong_type_argument -> xsignal2 -> xsignal

void
xsignal (Lisp_Object error_symbol, Lisp_Object data)
{
   Fsignal (error_symbol, data);
   emacs_abort ();
}

emacs_abort then has to be called after Fsignal finished. Or is there a 
back jmp back to main loop or somewhere else?
> Andreas.