diff options
Diffstat (limited to 'src/editfns.c')
| -rw-r--r-- | src/editfns.c | 31 |
1 files changed, 20 insertions, 11 deletions
diff --git a/src/editfns.c b/src/editfns.c index c43528c4863..71b518acb74 100644 --- a/src/editfns.c +++ b/src/editfns.c | |||
| @@ -1390,7 +1390,7 @@ name, or nil if there is no such user. */) | |||
| 1390 | } | 1390 | } |
| 1391 | 1391 | ||
| 1392 | DEFUN ("system-name", Fsystem_name, Ssystem_name, 0, 0, 0, | 1392 | DEFUN ("system-name", Fsystem_name, Ssystem_name, 0, 0, 0, |
| 1393 | doc: /* Return the name of the machine you are running on, as a string. */) | 1393 | doc: /* Return the host name of the machine you are running on, as a string. */) |
| 1394 | () | 1394 | () |
| 1395 | { | 1395 | { |
| 1396 | return Vsystem_name; | 1396 | return Vsystem_name; |
| @@ -1694,7 +1694,7 @@ For example, to produce full ISO 8601 format, use "%Y-%m-%dT%T%z". */) | |||
| 1694 | SBYTES (format_string), | 1694 | SBYTES (format_string), |
| 1695 | tm, ut); | 1695 | tm, ut); |
| 1696 | if ((result > 0 && result < size) || (result == 0 && buf[0] == '\0')) | 1696 | if ((result > 0 && result < size) || (result == 0 && buf[0] == '\0')) |
| 1697 | return code_convert_string_norecord (make_string (buf, result), | 1697 | return code_convert_string_norecord (make_unibyte_string (buf, result), |
| 1698 | Vlocale_coding_system, 0); | 1698 | Vlocale_coding_system, 0); |
| 1699 | 1699 | ||
| 1700 | /* If buffer was too small, make it bigger and try again. */ | 1700 | /* If buffer was too small, make it bigger and try again. */ |
| @@ -2781,7 +2781,7 @@ Both characters must have the same length of multi-byte form. */) | |||
| 2781 | else if (!changed) | 2781 | else if (!changed) |
| 2782 | { | 2782 | { |
| 2783 | changed = -1; | 2783 | changed = -1; |
| 2784 | modify_region (current_buffer, pos, XINT (end)); | 2784 | modify_region (current_buffer, pos, XINT (end), 0); |
| 2785 | 2785 | ||
| 2786 | if (! NILP (noundo)) | 2786 | if (! NILP (noundo)) |
| 2787 | { | 2787 | { |
| @@ -2897,7 +2897,7 @@ It returns the number of characters changed. */) | |||
| 2897 | pos = XINT (start); | 2897 | pos = XINT (start); |
| 2898 | pos_byte = CHAR_TO_BYTE (pos); | 2898 | pos_byte = CHAR_TO_BYTE (pos); |
| 2899 | end_pos = XINT (end); | 2899 | end_pos = XINT (end); |
| 2900 | modify_region (current_buffer, pos, XINT (end)); | 2900 | modify_region (current_buffer, pos, XINT (end), 0); |
| 2901 | 2901 | ||
| 2902 | cnt = 0; | 2902 | cnt = 0; |
| 2903 | for (; pos < end_pos; ) | 2903 | for (; pos < end_pos; ) |
| @@ -3178,6 +3178,9 @@ The message also goes into the `*Messages*' buffer. | |||
| 3178 | The first argument is a format control string, and the rest are data | 3178 | The first argument is a format control string, and the rest are data |
| 3179 | to be formatted under control of the string. See `format' for details. | 3179 | to be formatted under control of the string. See `format' for details. |
| 3180 | 3180 | ||
| 3181 | Note: Use (message "%s" VALUE) to print the value of expressions and | ||
| 3182 | variables to avoid accidentally interpreting `%' as format specifiers. | ||
| 3183 | |||
| 3181 | If the first argument is nil or the empty string, the function clears | 3184 | If the first argument is nil or the empty string, the function clears |
| 3182 | any existing message; this lets the minibuffer contents show. See | 3185 | any existing message; this lets the minibuffer contents show. See |
| 3183 | also `current-message'. | 3186 | also `current-message'. |
| @@ -3758,7 +3761,13 @@ usage: (format STRING &rest OBJECTS) */) | |||
| 3758 | this_format[format - this_format_start] = 0; | 3761 | this_format[format - this_format_start] = 0; |
| 3759 | 3762 | ||
| 3760 | if (INTEGERP (args[n])) | 3763 | if (INTEGERP (args[n])) |
| 3761 | sprintf (p, this_format, XINT (args[n])); | 3764 | { |
| 3765 | if (format[-1] == 'd') | ||
| 3766 | sprintf (p, this_format, XINT (args[n])); | ||
| 3767 | /* Don't sign-extend for octal or hex printing. */ | ||
| 3768 | else | ||
| 3769 | sprintf (p, this_format, XUINT (args[n])); | ||
| 3770 | } | ||
| 3762 | else | 3771 | else |
| 3763 | sprintf (p, this_format, XFLOAT_DATA (args[n])); | 3772 | sprintf (p, this_format, XFLOAT_DATA (args[n])); |
| 3764 | 3773 | ||
| @@ -4162,7 +4171,7 @@ Transposing beyond buffer boundaries is an error. */) | |||
| 4162 | 4171 | ||
| 4163 | if (end1 == start2) /* adjacent regions */ | 4172 | if (end1 == start2) /* adjacent regions */ |
| 4164 | { | 4173 | { |
| 4165 | modify_region (current_buffer, start1, end2); | 4174 | modify_region (current_buffer, start1, end2, 0); |
| 4166 | record_change (start1, len1 + len2); | 4175 | record_change (start1, len1 + len2); |
| 4167 | 4176 | ||
| 4168 | tmp_interval1 = copy_intervals (cur_intv, start1, len1); | 4177 | tmp_interval1 = copy_intervals (cur_intv, start1, len1); |
| @@ -4218,8 +4227,8 @@ Transposing beyond buffer boundaries is an error. */) | |||
| 4218 | { | 4227 | { |
| 4219 | USE_SAFE_ALLOCA; | 4228 | USE_SAFE_ALLOCA; |
| 4220 | 4229 | ||
| 4221 | modify_region (current_buffer, start1, end1); | 4230 | modify_region (current_buffer, start1, end1, 0); |
| 4222 | modify_region (current_buffer, start2, end2); | 4231 | modify_region (current_buffer, start2, end2, 0); |
| 4223 | record_change (start1, len1); | 4232 | record_change (start1, len1); |
| 4224 | record_change (start2, len2); | 4233 | record_change (start2, len2); |
| 4225 | tmp_interval1 = copy_intervals (cur_intv, start1, len1); | 4234 | tmp_interval1 = copy_intervals (cur_intv, start1, len1); |
| @@ -4248,7 +4257,7 @@ Transposing beyond buffer boundaries is an error. */) | |||
| 4248 | { | 4257 | { |
| 4249 | USE_SAFE_ALLOCA; | 4258 | USE_SAFE_ALLOCA; |
| 4250 | 4259 | ||
| 4251 | modify_region (current_buffer, start1, end2); | 4260 | modify_region (current_buffer, start1, end2, 0); |
| 4252 | record_change (start1, (end2 - start1)); | 4261 | record_change (start1, (end2 - start1)); |
| 4253 | tmp_interval1 = copy_intervals (cur_intv, start1, len1); | 4262 | tmp_interval1 = copy_intervals (cur_intv, start1, len1); |
| 4254 | tmp_interval_mid = copy_intervals (cur_intv, end1, len_mid); | 4263 | tmp_interval_mid = copy_intervals (cur_intv, end1, len_mid); |
| @@ -4279,7 +4288,7 @@ Transposing beyond buffer boundaries is an error. */) | |||
| 4279 | USE_SAFE_ALLOCA; | 4288 | USE_SAFE_ALLOCA; |
| 4280 | 4289 | ||
| 4281 | record_change (start1, (end2 - start1)); | 4290 | record_change (start1, (end2 - start1)); |
| 4282 | modify_region (current_buffer, start1, end2); | 4291 | modify_region (current_buffer, start1, end2, 0); |
| 4283 | 4292 | ||
| 4284 | tmp_interval1 = copy_intervals (cur_intv, start1, len1); | 4293 | tmp_interval1 = copy_intervals (cur_intv, start1, len1); |
| 4285 | tmp_interval_mid = copy_intervals (cur_intv, end1, len_mid); | 4294 | tmp_interval_mid = copy_intervals (cur_intv, end1, len_mid); |
| @@ -4364,7 +4373,7 @@ functions if all the text being accessed has this property. */); | |||
| 4364 | Vbuffer_access_fontified_property = Qnil; | 4373 | Vbuffer_access_fontified_property = Qnil; |
| 4365 | 4374 | ||
| 4366 | DEFVAR_LISP ("system-name", &Vsystem_name, | 4375 | DEFVAR_LISP ("system-name", &Vsystem_name, |
| 4367 | doc: /* The name of the machine Emacs is running on. */); | 4376 | doc: /* The host name of the machine Emacs is running on. */); |
| 4368 | 4377 | ||
| 4369 | DEFVAR_LISP ("user-full-name", &Vuser_full_name, | 4378 | DEFVAR_LISP ("user-full-name", &Vuser_full_name, |
| 4370 | doc: /* The full name of the user logged in. */); | 4379 | doc: /* The full name of the user logged in. */); |