diff options
| author | Kenichi Handa | 2012-08-22 18:05:50 +0900 |
|---|---|---|
| committer | Kenichi Handa | 2012-08-22 18:05:50 +0900 |
| commit | fabc1281e9cde34ff9a19d843316d2ceca8647ad (patch) | |
| tree | f38f13cab3ec6c32ab8ab49ea2e60f64969a0d22 /src/editfns.c | |
| parent | 4ff819d728960bf5e52b72501c606f4bb3fde028 (diff) | |
| parent | 842e3a93aa3a0826cb4148376e54cd1527d10901 (diff) | |
| download | emacs-fabc1281e9cde34ff9a19d843316d2ceca8647ad.tar.gz emacs-fabc1281e9cde34ff9a19d843316d2ceca8647ad.zip | |
merge trunk
Diffstat (limited to 'src/editfns.c')
| -rw-r--r-- | src/editfns.c | 34 |
1 files changed, 16 insertions, 18 deletions
diff --git a/src/editfns.c b/src/editfns.c index b7feb733782..0bd632d14b7 100644 --- a/src/editfns.c +++ b/src/editfns.c | |||
| @@ -58,10 +58,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 58 | #include "window.h" | 58 | #include "window.h" |
| 59 | #include "blockinput.h" | 59 | #include "blockinput.h" |
| 60 | 60 | ||
| 61 | #ifndef USE_CRT_DLL | ||
| 62 | extern char **environ; | ||
| 63 | #endif | ||
| 64 | |||
| 65 | #define TM_YEAR_BASE 1900 | 61 | #define TM_YEAR_BASE 1900 |
| 66 | 62 | ||
| 67 | #ifdef WINDOWSNT | 63 | #ifdef WINDOWSNT |
| @@ -881,7 +877,7 @@ save_excursion_restore (Lisp_Object info) | |||
| 881 | info = XCDR (info); | 877 | info = XCDR (info); |
| 882 | tem = XCAR (info); | 878 | tem = XCAR (info); |
| 883 | tem1 = BVAR (current_buffer, mark_active); | 879 | tem1 = BVAR (current_buffer, mark_active); |
| 884 | BSET (current_buffer, mark_active, tem); | 880 | bset_mark_active (current_buffer, tem); |
| 885 | 881 | ||
| 886 | /* If mark is active now, and either was not active | 882 | /* If mark is active now, and either was not active |
| 887 | or was at a different place, run the activate hook. */ | 883 | or was at a different place, run the activate hook. */ |
| @@ -2815,13 +2811,15 @@ determines whether case is significant or ignored. */) | |||
| 2815 | static Lisp_Object | 2811 | static Lisp_Object |
| 2816 | subst_char_in_region_unwind (Lisp_Object arg) | 2812 | subst_char_in_region_unwind (Lisp_Object arg) |
| 2817 | { | 2813 | { |
| 2818 | return BSET (current_buffer, undo_list, arg); | 2814 | bset_undo_list (current_buffer, arg); |
| 2815 | return arg; | ||
| 2819 | } | 2816 | } |
| 2820 | 2817 | ||
| 2821 | static Lisp_Object | 2818 | static Lisp_Object |
| 2822 | subst_char_in_region_unwind_1 (Lisp_Object arg) | 2819 | subst_char_in_region_unwind_1 (Lisp_Object arg) |
| 2823 | { | 2820 | { |
| 2824 | return BSET (current_buffer, filename, arg); | 2821 | bset_filename (current_buffer, arg); |
| 2822 | return arg; | ||
| 2825 | } | 2823 | } |
| 2826 | 2824 | ||
| 2827 | DEFUN ("subst-char-in-region", Fsubst_char_in_region, | 2825 | DEFUN ("subst-char-in-region", Fsubst_char_in_region, |
| @@ -2895,11 +2893,11 @@ Both characters must have the same length of multi-byte form. */) | |||
| 2895 | { | 2893 | { |
| 2896 | record_unwind_protect (subst_char_in_region_unwind, | 2894 | record_unwind_protect (subst_char_in_region_unwind, |
| 2897 | BVAR (current_buffer, undo_list)); | 2895 | BVAR (current_buffer, undo_list)); |
| 2898 | BSET (current_buffer, undo_list, Qt); | 2896 | bset_undo_list (current_buffer, Qt); |
| 2899 | /* Don't do file-locking. */ | 2897 | /* Don't do file-locking. */ |
| 2900 | record_unwind_protect (subst_char_in_region_unwind_1, | 2898 | record_unwind_protect (subst_char_in_region_unwind_1, |
| 2901 | BVAR (current_buffer, filename)); | 2899 | BVAR (current_buffer, filename)); |
| 2902 | BSET (current_buffer, filename, Qnil); | 2900 | bset_filename (current_buffer, Qnil); |
| 2903 | } | 2901 | } |
| 2904 | 2902 | ||
| 2905 | if (pos_byte < GPT_BYTE) | 2903 | if (pos_byte < GPT_BYTE) |
| @@ -2981,7 +2979,7 @@ Both characters must have the same length of multi-byte form. */) | |||
| 2981 | INC_POS (pos_byte_next); | 2979 | INC_POS (pos_byte_next); |
| 2982 | 2980 | ||
| 2983 | if (! NILP (noundo)) | 2981 | if (! NILP (noundo)) |
| 2984 | BSET (current_buffer, undo_list, tem); | 2982 | bset_undo_list (current_buffer, tem); |
| 2985 | 2983 | ||
| 2986 | UNGCPRO; | 2984 | UNGCPRO; |
| 2987 | } | 2985 | } |
| @@ -3644,13 +3642,13 @@ usage: (format STRING &rest OBJECTS) */) | |||
| 3644 | ptrdiff_t max_bufsize = STRING_BYTES_BOUND + 1; | 3642 | ptrdiff_t max_bufsize = STRING_BYTES_BOUND + 1; |
| 3645 | char *p; | 3643 | char *p; |
| 3646 | Lisp_Object buf_save_value IF_LINT (= {0}); | 3644 | Lisp_Object buf_save_value IF_LINT (= {0}); |
| 3647 | register char *format, *end, *format_start; | 3645 | char *format, *end, *format_start; |
| 3648 | ptrdiff_t formatlen, nchars; | 3646 | ptrdiff_t formatlen, nchars; |
| 3649 | /* Nonzero if the format is multibyte. */ | 3647 | /* True if the format is multibyte. */ |
| 3650 | int multibyte_format = 0; | 3648 | bool multibyte_format = 0; |
| 3651 | /* Nonzero if the output should be a multibyte string, | 3649 | /* True if the output should be a multibyte string, |
| 3652 | which is true if any of the inputs is one. */ | 3650 | which is true if any of the inputs is one. */ |
| 3653 | int multibyte = 0; | 3651 | bool multibyte = 0; |
| 3654 | /* When we make a multibyte string, we must pay attention to the | 3652 | /* When we make a multibyte string, we must pay attention to the |
| 3655 | byte combining problem, i.e., a byte may be combined with a | 3653 | byte combining problem, i.e., a byte may be combined with a |
| 3656 | multibyte character of the previous string. This flag tells if we | 3654 | multibyte character of the previous string. This flag tells if we |
| @@ -3936,7 +3934,7 @@ usage: (format STRING &rest OBJECTS) */) | |||
| 3936 | 3934 | ||
| 3937 | /* If this argument has text properties, record where | 3935 | /* If this argument has text properties, record where |
| 3938 | in the result string it appears. */ | 3936 | in the result string it appears. */ |
| 3939 | if (string_get_intervals (args[n])) | 3937 | if (string_intervals (args[n])) |
| 3940 | info[n].intervals = arg_intervals = 1; | 3938 | info[n].intervals = arg_intervals = 1; |
| 3941 | 3939 | ||
| 3942 | continue; | 3940 | continue; |
| @@ -4280,7 +4278,7 @@ usage: (format STRING &rest OBJECTS) */) | |||
| 4280 | arguments has text properties, set up text properties of the | 4278 | arguments has text properties, set up text properties of the |
| 4281 | result string. */ | 4279 | result string. */ |
| 4282 | 4280 | ||
| 4283 | if (string_get_intervals (args[0]) || arg_intervals) | 4281 | if (string_intervals (args[0]) || arg_intervals) |
| 4284 | { | 4282 | { |
| 4285 | Lisp_Object len, new_len, props; | 4283 | Lisp_Object len, new_len, props; |
| 4286 | struct gcpro gcpro1; | 4284 | struct gcpro gcpro1; |
| @@ -4530,7 +4528,7 @@ Transposing beyond buffer boundaries is an error. */) | |||
| 4530 | Lisp_Object buf; | 4528 | Lisp_Object buf; |
| 4531 | 4529 | ||
| 4532 | XSETBUFFER (buf, current_buffer); | 4530 | XSETBUFFER (buf, current_buffer); |
| 4533 | cur_intv = buffer_get_intervals (current_buffer); | 4531 | cur_intv = buffer_intervals (current_buffer); |
| 4534 | 4532 | ||
| 4535 | validate_region (&startr1, &endr1); | 4533 | validate_region (&startr1, &endr1); |
| 4536 | validate_region (&startr2, &endr2); | 4534 | validate_region (&startr2, &endr2); |