mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-30 00:51:50 -08:00
(Fexecute_extended_command): Handle long EMACS_INT in sprintf.
This commit is contained in:
parent
b818092206
commit
5d5b907f9a
1 changed files with 16 additions and 2 deletions
|
|
@ -6054,9 +6054,23 @@ DEFUN ("execute-extended-command", Fexecute_extended_command, Sexecute_extended_
|
|||
else if (CONSP (prefixarg) && XINT (XCONS (prefixarg)->car) == 4)
|
||||
strcpy (buf, "C-u ");
|
||||
else if (CONSP (prefixarg) && INTEGERP (XCONS (prefixarg)->car))
|
||||
sprintf (buf, "%d ", XINT (XCONS (prefixarg)->car));
|
||||
{
|
||||
if (sizeof (int) == sizeof (EMACS_INT))
|
||||
sprintf (buf, "%d ", XINT (XCONS (prefixarg)->car));
|
||||
else if (sizeof (long) == sizeof (EMACS_INT))
|
||||
sprintf (buf, "%ld ", XINT (XCONS (prefixarg)->car));
|
||||
else
|
||||
abort ();
|
||||
}
|
||||
else if (INTEGERP (prefixarg))
|
||||
sprintf (buf, "%d ", XINT (prefixarg));
|
||||
{
|
||||
if (sizeof (int) == sizeof (EMACS_INT))
|
||||
sprintf (buf, "%d ", XINT (prefixarg));
|
||||
else if (sizeof (long) == sizeof (EMACS_INT))
|
||||
sprintf (buf, "%ld ", XINT (prefixarg));
|
||||
else
|
||||
abort ();
|
||||
}
|
||||
|
||||
/* This isn't strictly correct if execute-extended-command
|
||||
is bound to anything else. Perhaps it should use
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue