diff options
| author | Karoly Lorentey | 2004-10-31 02:05:24 +0000 |
|---|---|---|
| committer | Karoly Lorentey | 2004-10-31 02:05:24 +0000 |
| commit | e0bc17abe6979d607e8de4684dddb96e53c60065 (patch) | |
| tree | b7cb7bc5df9f12138937fd958cdf4b9c2d19ee3a /src/editfns.c | |
| parent | f158167a84475d5fc41931531406821e6413afd7 (diff) | |
| parent | 707994d2626cf0f01c3ece4028d73835068d64dc (diff) | |
| download | emacs-e0bc17abe6979d607e8de4684dddb96e53c60065.tar.gz emacs-e0bc17abe6979d607e8de4684dddb96e53c60065.zip | |
Merged in changes from CVS trunk.
Patches applied:
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-639
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-640
Merge from gnus--rel--5.10
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-641
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-642
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-643
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-644
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-645
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-646
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-647
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-648
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-649
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-650
Merge from gnus--rel--5.10
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-651
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-652
Update from CVS
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-59
Update from CVS
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-60
Update from CVS
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-61
Update from CVS
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-62
Update from CVS
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-63
Update from CVS
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-263
Diffstat (limited to 'src/editfns.c')
| -rw-r--r-- | src/editfns.c | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/src/editfns.c b/src/editfns.c index 5b129a18a62..e83e53e9d24 100644 --- a/src/editfns.c +++ b/src/editfns.c | |||
| @@ -2775,7 +2775,7 @@ It returns the number of characters changed. */) | |||
| 2775 | 2775 | ||
| 2776 | pos = XINT (start); | 2776 | pos = XINT (start); |
| 2777 | pos_byte = CHAR_TO_BYTE (pos); | 2777 | pos_byte = CHAR_TO_BYTE (pos); |
| 2778 | end_pos = XINT (end); | 2778 | end_pos = XINT (end); |
| 2779 | modify_region (current_buffer, pos, XINT (end)); | 2779 | modify_region (current_buffer, pos, XINT (end)); |
| 2780 | 2780 | ||
| 2781 | cnt = 0; | 2781 | cnt = 0; |
| @@ -3049,11 +3049,14 @@ static int message_length; | |||
| 3049 | 3049 | ||
| 3050 | DEFUN ("message", Fmessage, Smessage, 1, MANY, 0, | 3050 | DEFUN ("message", Fmessage, Smessage, 1, MANY, 0, |
| 3051 | doc: /* Print a one-line message at the bottom of the screen. | 3051 | doc: /* Print a one-line message at the bottom of the screen. |
| 3052 | The message also goes into the `*Messages*' buffer. | ||
| 3053 | \(In keyboard macros, that's all it does.) | ||
| 3054 | |||
| 3052 | The first argument is a format control string, and the rest are data | 3055 | The first argument is a format control string, and the rest are data |
| 3053 | to be formatted under control of the string. See `format' for details. | 3056 | to be formatted under control of the string. See `format' for details. |
| 3054 | 3057 | ||
| 3055 | If the first argument is nil, clear any existing message; let the | 3058 | If the first argument is nil, the function clears any existing message; |
| 3056 | minibuffer contents show. | 3059 | this lets the minibuffer contents show. See also `current-message'. |
| 3057 | 3060 | ||
| 3058 | usage: (message STRING &rest ARGS) */) | 3061 | usage: (message STRING &rest ARGS) */) |
| 3059 | (nargs, args) | 3062 | (nargs, args) |
| @@ -3268,7 +3271,7 @@ usage: (format STRING &rest OBJECTS) */) | |||
| 3268 | /* discarded[I] is 1 if byte I of the format | 3271 | /* discarded[I] is 1 if byte I of the format |
| 3269 | string was not copied into the output. | 3272 | string was not copied into the output. |
| 3270 | It is 2 if byte I was not the first byte of its character. */ | 3273 | It is 2 if byte I was not the first byte of its character. */ |
| 3271 | char *discarded; | 3274 | char *discarded = 0; |
| 3272 | 3275 | ||
| 3273 | /* Each element records, for one argument, | 3276 | /* Each element records, for one argument, |
| 3274 | the start and end bytepos in the output string, | 3277 | the start and end bytepos in the output string, |
| @@ -3319,11 +3322,13 @@ usage: (format STRING &rest OBJECTS) */) | |||
| 3319 | { | 3322 | { |
| 3320 | int nbytes = (nargs+1) * sizeof *info; | 3323 | int nbytes = (nargs+1) * sizeof *info; |
| 3321 | int i; | 3324 | int i; |
| 3322 | info = (struct info *) alloca (nbytes); | 3325 | if (!info) |
| 3326 | info = (struct info *) alloca (nbytes); | ||
| 3323 | bzero (info, nbytes); | 3327 | bzero (info, nbytes); |
| 3324 | for (i = 0; i <= nargs; i++) | 3328 | for (i = 0; i <= nargs; i++) |
| 3325 | info[i].start = -1; | 3329 | info[i].start = -1; |
| 3326 | discarded = (char *) alloca (SBYTES (args[0])); | 3330 | if (!discarded) |
| 3331 | SAFE_ALLOCA (discarded, char *, SBYTES (args[0])); | ||
| 3327 | bzero (discarded, SBYTES (args[0])); | 3332 | bzero (discarded, SBYTES (args[0])); |
| 3328 | } | 3333 | } |
| 3329 | 3334 | ||
| @@ -3684,7 +3689,7 @@ usage: (format STRING &rest OBJECTS) */) | |||
| 3684 | val = make_specified_string (buf, nchars, p - buf, multibyte); | 3689 | val = make_specified_string (buf, nchars, p - buf, multibyte); |
| 3685 | 3690 | ||
| 3686 | /* If we allocated BUF with malloc, free it too. */ | 3691 | /* If we allocated BUF with malloc, free it too. */ |
| 3687 | SAFE_FREE (total); | 3692 | SAFE_FREE (); |
| 3688 | 3693 | ||
| 3689 | /* If the format string has text properties, or any of the string | 3694 | /* If the format string has text properties, or any of the string |
| 3690 | arguments has text properties, set up text properties of the | 3695 | arguments has text properties, set up text properties of the |
| @@ -4056,7 +4061,7 @@ Transposing beyond buffer boundaries is an error. */) | |||
| 4056 | bcopy (start2_addr, temp, len2_byte); | 4061 | bcopy (start2_addr, temp, len2_byte); |
| 4057 | bcopy (start1_addr, start1_addr + len2_byte, len1_byte); | 4062 | bcopy (start1_addr, start1_addr + len2_byte, len1_byte); |
| 4058 | bcopy (temp, start1_addr, len2_byte); | 4063 | bcopy (temp, start1_addr, len2_byte); |
| 4059 | SAFE_FREE (len2_byte); | 4064 | SAFE_FREE (); |
| 4060 | } | 4065 | } |
| 4061 | else | 4066 | else |
| 4062 | /* First region not smaller than second. */ | 4067 | /* First region not smaller than second. */ |
| @@ -4069,7 +4074,7 @@ Transposing beyond buffer boundaries is an error. */) | |||
| 4069 | bcopy (start1_addr, temp, len1_byte); | 4074 | bcopy (start1_addr, temp, len1_byte); |
| 4070 | bcopy (start2_addr, start1_addr, len2_byte); | 4075 | bcopy (start2_addr, start1_addr, len2_byte); |
| 4071 | bcopy (temp, start1_addr + len2_byte, len1_byte); | 4076 | bcopy (temp, start1_addr + len2_byte, len1_byte); |
| 4072 | SAFE_FREE (len1_byte); | 4077 | SAFE_FREE (); |
| 4073 | } | 4078 | } |
| 4074 | graft_intervals_into_buffer (tmp_interval1, start1 + len2, | 4079 | graft_intervals_into_buffer (tmp_interval1, start1 + len2, |
| 4075 | len1, current_buffer, 0); | 4080 | len1, current_buffer, 0); |
| @@ -4105,7 +4110,7 @@ Transposing beyond buffer boundaries is an error. */) | |||
| 4105 | bcopy (start1_addr, temp, len1_byte); | 4110 | bcopy (start1_addr, temp, len1_byte); |
| 4106 | bcopy (start2_addr, start1_addr, len2_byte); | 4111 | bcopy (start2_addr, start1_addr, len2_byte); |
| 4107 | bcopy (temp, start2_addr, len1_byte); | 4112 | bcopy (temp, start2_addr, len1_byte); |
| 4108 | SAFE_FREE (len1_byte); | 4113 | SAFE_FREE (); |
| 4109 | 4114 | ||
| 4110 | graft_intervals_into_buffer (tmp_interval1, start2, | 4115 | graft_intervals_into_buffer (tmp_interval1, start2, |
| 4111 | len1, current_buffer, 0); | 4116 | len1, current_buffer, 0); |
| @@ -4134,7 +4139,7 @@ Transposing beyond buffer boundaries is an error. */) | |||
| 4134 | bcopy (start1_addr, start1_addr + len_mid + len2_byte, len1_byte); | 4139 | bcopy (start1_addr, start1_addr + len_mid + len2_byte, len1_byte); |
| 4135 | safe_bcopy (start1_addr + len1_byte, start1_addr + len2_byte, len_mid); | 4140 | safe_bcopy (start1_addr + len1_byte, start1_addr + len2_byte, len_mid); |
| 4136 | bcopy (temp, start1_addr, len2_byte); | 4141 | bcopy (temp, start1_addr, len2_byte); |
| 4137 | SAFE_FREE (len2_byte); | 4142 | SAFE_FREE (); |
| 4138 | 4143 | ||
| 4139 | graft_intervals_into_buffer (tmp_interval1, end2 - len1, | 4144 | graft_intervals_into_buffer (tmp_interval1, end2 - len1, |
| 4140 | len1, current_buffer, 0); | 4145 | len1, current_buffer, 0); |
| @@ -4165,7 +4170,7 @@ Transposing beyond buffer boundaries is an error. */) | |||
| 4165 | bcopy (start2_addr, start1_addr, len2_byte); | 4170 | bcopy (start2_addr, start1_addr, len2_byte); |
| 4166 | bcopy (start1_addr + len1_byte, start1_addr + len2_byte, len_mid); | 4171 | bcopy (start1_addr + len1_byte, start1_addr + len2_byte, len_mid); |
| 4167 | bcopy (temp, start1_addr + len2_byte + len_mid, len1_byte); | 4172 | bcopy (temp, start1_addr + len2_byte + len_mid, len1_byte); |
| 4168 | SAFE_FREE (len1_byte); | 4173 | SAFE_FREE (); |
| 4169 | 4174 | ||
| 4170 | graft_intervals_into_buffer (tmp_interval1, end2 - len1, | 4175 | graft_intervals_into_buffer (tmp_interval1, end2 - len1, |
| 4171 | len1, current_buffer, 0); | 4176 | len1, current_buffer, 0); |