mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-18 11:50:38 -08:00
Improve `doprnt' and its usage. (Bug#8545)
src/doprnt.c (doprnt): Make sure `format' is never accessed beyond `format_end'. Remove support for %l as a conversion specifier. Don't use xrealloc. Improve diagnostics when the %l size modifier is used. Update the commentary. src/eval.c (verror): Simplify calculation of size_t. src/coding.c (Ffind_operation_coding_system): Fix diagnostic error messages.
This commit is contained in:
parent
211ec9072d
commit
94dcfacf12
4 changed files with 45 additions and 27 deletions
|
|
@ -9282,14 +9282,15 @@ usage: (find-operation-coding-system OPERATION ARGUMENTS...) */)
|
|||
|| !NATNUMP (target_idx = Fget (operation, Qtarget_idx)))
|
||||
error ("Invalid first argument");
|
||||
if (nargs < 1 + XFASTINT (target_idx))
|
||||
error ("Too few arguments for operation: %s",
|
||||
error ("Too few arguments for operation `%s'",
|
||||
SDATA (SYMBOL_NAME (operation)));
|
||||
target = args[XFASTINT (target_idx) + 1];
|
||||
if (!(STRINGP (target)
|
||||
|| (EQ (operation, Qinsert_file_contents) && CONSP (target)
|
||||
&& STRINGP (XCAR (target)) && BUFFERP (XCDR (target)))
|
||||
|| (EQ (operation, Qopen_network_stream) && INTEGERP (target))))
|
||||
error ("Invalid %"pI"dth argument", XFASTINT (target_idx) + 1);
|
||||
error ("Invalid argument %"pI"d of operation `%s'",
|
||||
XFASTINT (target_idx) + 1, SDATA (SYMBOL_NAME (operation)));
|
||||
if (CONSP (target))
|
||||
target = XCAR (target);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue