diff options
| author | Richard M. Stallman | 2003-01-25 19:48:14 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2003-01-25 19:48:14 +0000 |
| commit | d40dc1d037dd5636864c961d8c018554e7167ec5 (patch) | |
| tree | bb9f298f5afc14cb3344f0c70711582b8f8a1f73 /src | |
| parent | 6afc669e922800b77c892034a8723a9dfbc6159b (diff) | |
| download | emacs-d40dc1d037dd5636864c961d8c018554e7167ec5.tar.gz emacs-d40dc1d037dd5636864c961d8c018554e7167ec5.zip | |
(format2): New function, replaces format1
but takes exactly two Lisp Objects as format args.
Diffstat (limited to 'src')
| -rw-r--r-- | src/editfns.c | 29 |
1 files changed, 8 insertions, 21 deletions
diff --git a/src/editfns.c b/src/editfns.c index 1df3326762d..26d811d8f43 100644 --- a/src/editfns.c +++ b/src/editfns.c | |||
| @@ -3648,30 +3648,17 @@ usage: (format STRING &rest OBJECTS) */) | |||
| 3648 | return val; | 3648 | return val; |
| 3649 | } | 3649 | } |
| 3650 | 3650 | ||
| 3651 | |||
| 3652 | /* VARARGS 1 */ | ||
| 3653 | Lisp_Object | 3651 | Lisp_Object |
| 3654 | #ifdef NO_ARG_ARRAY | 3652 | format2 (string1, arg0, arg1) |
| 3655 | format1 (string1, arg0, arg1, arg2, arg3, arg4) | ||
| 3656 | EMACS_INT arg0, arg1, arg2, arg3, arg4; | ||
| 3657 | #else | ||
| 3658 | format1 (string1) | ||
| 3659 | #endif | ||
| 3660 | char *string1; | 3653 | char *string1; |
| 3654 | Lisp_Object arg0, arg1; | ||
| 3661 | { | 3655 | { |
| 3662 | char buf[100]; | 3656 | Lisp_Object args[3]; |
| 3663 | #ifdef NO_ARG_ARRAY | 3657 | int numargs; |
| 3664 | EMACS_INT args[5]; | 3658 | args[0] = build_string (string1); |
| 3665 | args[0] = arg0; | 3659 | args[1] = arg0; |
| 3666 | args[1] = arg1; | 3660 | args[2] = arg1; |
| 3667 | args[2] = arg2; | 3661 | return Fformat (3, args); |
| 3668 | args[3] = arg3; | ||
| 3669 | args[4] = arg4; | ||
| 3670 | doprnt (buf, sizeof buf, string1, (char *)0, 5, (char **) args); | ||
| 3671 | #else | ||
| 3672 | doprnt (buf, sizeof buf, string1, (char *)0, 5, &string1 + 1); | ||
| 3673 | #endif | ||
| 3674 | return build_string (buf); | ||
| 3675 | } | 3662 | } |
| 3676 | 3663 | ||
| 3677 | DEFUN ("char-equal", Fchar_equal, Schar_equal, 2, 2, 0, | 3664 | DEFUN ("char-equal", Fchar_equal, Schar_equal, 2, 2, 0, |