diff options
| author | Paul Eggert | 2011-03-14 20:17:20 -0700 |
|---|---|---|
| committer | Paul Eggert | 2011-03-14 20:17:20 -0700 |
| commit | f839df0cf5882909c0f6424455abed586f125987 (patch) | |
| tree | 207460e39a2c4eb3c225bb6f88df9e04612e6913 /src | |
| parent | b14aac08d08c5f17dc27e8d2cc1cc76b33e92c62 (diff) | |
| download | emacs-f839df0cf5882909c0f6424455abed586f125987.tar.gz emacs-f839df0cf5882909c0f6424455abed586f125987.zip | |
* fileio.c: (Fset_file_times, Finsert_file_contents, auto_save_error):
Rename locals to avoid shadowing.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 2 | ||||
| -rw-r--r-- | src/fileio.c | 39 |
2 files changed, 22 insertions, 19 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index aa21fb17c85..c84c2397810 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -9,6 +9,8 @@ | |||
| 9 | (Fmake_directory_internal, Fread_file_name): Remove unused vars. | 9 | (Fmake_directory_internal, Fread_file_name): Remove unused vars. |
| 10 | (Ffile_selinux_context, Fset_file_selinux_context): Fix pointer | 10 | (Ffile_selinux_context, Fset_file_selinux_context): Fix pointer |
| 11 | signedness issues. | 11 | signedness issues. |
| 12 | (Fset_file_times, Finsert_file_contents, auto_save_error): | ||
| 13 | Rename locals to avoid shadowing. | ||
| 12 | 14 | ||
| 13 | * minibuf.c (choose_minibuf_frame_1): Now static. | 15 | * minibuf.c (choose_minibuf_frame_1): Now static. |
| 14 | (Ftry_completion, Fall_completions): Rename or remove locals | 16 | (Ftry_completion, Fall_completions): Rename or remove locals |
diff --git a/src/fileio.c b/src/fileio.c index b4e28702029..826f2c18fbf 100644 --- a/src/fileio.c +++ b/src/fileio.c | |||
| @@ -2941,19 +2941,19 @@ The value is an integer. */) | |||
| 2941 | 2941 | ||
| 2942 | 2942 | ||
| 2943 | DEFUN ("set-file-times", Fset_file_times, Sset_file_times, 1, 2, 0, | 2943 | DEFUN ("set-file-times", Fset_file_times, Sset_file_times, 1, 2, 0, |
| 2944 | doc: /* Set times of file FILENAME to TIME. | 2944 | doc: /* Set times of file FILENAME to TIMESTAMP. |
| 2945 | Set both access and modification times. | 2945 | Set both access and modification times. |
| 2946 | Return t on success, else nil. | 2946 | Return t on success, else nil. |
| 2947 | Use the current time if TIME is nil. TIME is in the format of | 2947 | Use the current time if TIMESTAMP is nil. TIMESTAMP is in the format of |
| 2948 | `current-time'. */) | 2948 | `current-time'. */) |
| 2949 | (Lisp_Object filename, Lisp_Object time) | 2949 | (Lisp_Object filename, Lisp_Object timestamp) |
| 2950 | { | 2950 | { |
| 2951 | Lisp_Object absname, encoded_absname; | 2951 | Lisp_Object absname, encoded_absname; |
| 2952 | Lisp_Object handler; | 2952 | Lisp_Object handler; |
| 2953 | time_t sec; | 2953 | time_t sec; |
| 2954 | int usec; | 2954 | int usec; |
| 2955 | 2955 | ||
| 2956 | if (! lisp_time_argument (time, &sec, &usec)) | 2956 | if (! lisp_time_argument (timestamp, &sec, &usec)) |
| 2957 | error ("Invalid time specification"); | 2957 | error ("Invalid time specification"); |
| 2958 | 2958 | ||
| 2959 | absname = Fexpand_file_name (filename, BVAR (current_buffer, directory)); | 2959 | absname = Fexpand_file_name (filename, BVAR (current_buffer, directory)); |
| @@ -2962,7 +2962,7 @@ Use the current time if TIME is nil. TIME is in the format of | |||
| 2962 | call the corresponding file handler. */ | 2962 | call the corresponding file handler. */ |
| 2963 | handler = Ffind_file_name_handler (absname, Qset_file_times); | 2963 | handler = Ffind_file_name_handler (absname, Qset_file_times); |
| 2964 | if (!NILP (handler)) | 2964 | if (!NILP (handler)) |
| 2965 | return call3 (handler, Qset_file_times, absname, time); | 2965 | return call3 (handler, Qset_file_times, absname, timestamp); |
| 2966 | 2966 | ||
| 2967 | encoded_absname = ENCODE_FILE (absname); | 2967 | encoded_absname = ENCODE_FILE (absname); |
| 2968 | 2968 | ||
| @@ -3358,13 +3358,13 @@ variable `last-coding-system-used' to the coding system actually used. */) | |||
| 3358 | else if (nread > 0) | 3358 | else if (nread > 0) |
| 3359 | { | 3359 | { |
| 3360 | struct buffer *prev = current_buffer; | 3360 | struct buffer *prev = current_buffer; |
| 3361 | Lisp_Object buffer; | 3361 | Lisp_Object workbuf; |
| 3362 | struct buffer *buf; | 3362 | struct buffer *buf; |
| 3363 | 3363 | ||
| 3364 | record_unwind_protect (Fset_buffer, Fcurrent_buffer ()); | 3364 | record_unwind_protect (Fset_buffer, Fcurrent_buffer ()); |
| 3365 | 3365 | ||
| 3366 | buffer = Fget_buffer_create (build_string (" *code-converting-work*")); | 3366 | workbuf = Fget_buffer_create (build_string (" *code-converting-work*")); |
| 3367 | buf = XBUFFER (buffer); | 3367 | buf = XBUFFER (workbuf); |
| 3368 | 3368 | ||
| 3369 | delete_all_overlays (buf); | 3369 | delete_all_overlays (buf); |
| 3370 | BVAR (buf, directory) = BVAR (current_buffer, directory); | 3370 | BVAR (buf, directory) = BVAR (current_buffer, directory); |
| @@ -3876,7 +3876,7 @@ variable `last-coding-system-used' to the coding system actually used. */) | |||
| 3876 | 3876 | ||
| 3877 | if (not_regular) | 3877 | if (not_regular) |
| 3878 | { | 3878 | { |
| 3879 | Lisp_Object val; | 3879 | Lisp_Object nbytes; |
| 3880 | 3880 | ||
| 3881 | /* Maybe make more room. */ | 3881 | /* Maybe make more room. */ |
| 3882 | if (gap_size < trytry) | 3882 | if (gap_size < trytry) |
| @@ -3891,15 +3891,16 @@ variable `last-coding-system-used' to the coding system actually used. */) | |||
| 3891 | non_regular_fd = fd; | 3891 | non_regular_fd = fd; |
| 3892 | non_regular_inserted = inserted; | 3892 | non_regular_inserted = inserted; |
| 3893 | non_regular_nbytes = trytry; | 3893 | non_regular_nbytes = trytry; |
| 3894 | val = internal_condition_case_1 (read_non_regular, Qnil, Qerror, | 3894 | nbytes = internal_condition_case_1 (read_non_regular, |
| 3895 | read_non_regular_quit); | 3895 | Qnil, Qerror, |
| 3896 | if (NILP (val)) | 3896 | read_non_regular_quit); |
| 3897 | if (NILP (nbytes)) | ||
| 3897 | { | 3898 | { |
| 3898 | read_quit = 1; | 3899 | read_quit = 1; |
| 3899 | break; | 3900 | break; |
| 3900 | } | 3901 | } |
| 3901 | 3902 | ||
| 3902 | this = XINT (val); | 3903 | this = XINT (nbytes); |
| 3903 | } | 3904 | } |
| 3904 | else | 3905 | else |
| 3905 | { | 3906 | { |
| @@ -3990,7 +3991,7 @@ variable `last-coding-system-used' to the coding system actually used. */) | |||
| 3990 | care of marker adjustment. By this way, we can run Lisp | 3991 | care of marker adjustment. By this way, we can run Lisp |
| 3991 | program safely before decoding the inserted text. */ | 3992 | program safely before decoding the inserted text. */ |
| 3992 | Lisp_Object unwind_data; | 3993 | Lisp_Object unwind_data; |
| 3993 | int count = SPECPDL_INDEX (); | 3994 | int count1 = SPECPDL_INDEX (); |
| 3994 | 3995 | ||
| 3995 | unwind_data = Fcons (BVAR (current_buffer, enable_multibyte_characters), | 3996 | unwind_data = Fcons (BVAR (current_buffer, enable_multibyte_characters), |
| 3996 | Fcons (BVAR (current_buffer, undo_list), | 3997 | Fcons (BVAR (current_buffer, undo_list), |
| @@ -4017,7 +4018,7 @@ variable `last-coding-system-used' to the coding system actually used. */) | |||
| 4017 | if (CONSP (coding_system)) | 4018 | if (CONSP (coding_system)) |
| 4018 | coding_system = XCAR (coding_system); | 4019 | coding_system = XCAR (coding_system); |
| 4019 | } | 4020 | } |
| 4020 | unbind_to (count, Qnil); | 4021 | unbind_to (count1, Qnil); |
| 4021 | inserted = Z_BYTE - BEG_BYTE; | 4022 | inserted = Z_BYTE - BEG_BYTE; |
| 4022 | } | 4023 | } |
| 4023 | 4024 | ||
| @@ -4120,7 +4121,7 @@ variable `last-coding-system-used' to the coding system actually used. */) | |||
| 4120 | if (inserted > 0) | 4121 | if (inserted > 0) |
| 4121 | { | 4122 | { |
| 4122 | /* Don't run point motion or modification hooks when decoding. */ | 4123 | /* Don't run point motion or modification hooks when decoding. */ |
| 4123 | int count = SPECPDL_INDEX (); | 4124 | int count1 = SPECPDL_INDEX (); |
| 4124 | EMACS_INT old_inserted = inserted; | 4125 | EMACS_INT old_inserted = inserted; |
| 4125 | specbind (Qinhibit_point_motion_hooks, Qt); | 4126 | specbind (Qinhibit_point_motion_hooks, Qt); |
| 4126 | specbind (Qinhibit_modification_hooks, Qt); | 4127 | specbind (Qinhibit_modification_hooks, Qt); |
| @@ -4232,7 +4233,7 @@ variable `last-coding-system-used' to the coding system actually used. */) | |||
| 4232 | Otherwise start with an empty undo_list. */ | 4233 | Otherwise start with an empty undo_list. */ |
| 4233 | BVAR (current_buffer, undo_list) = EQ (old_undo, Qt) ? Qt : Qnil; | 4234 | BVAR (current_buffer, undo_list) = EQ (old_undo, Qt) ? Qt : Qnil; |
| 4234 | 4235 | ||
| 4235 | unbind_to (count, Qnil); | 4236 | unbind_to (count1, Qnil); |
| 4236 | } | 4237 | } |
| 4237 | 4238 | ||
| 4238 | /* Call after-change hooks for the inserted text, aside from the case | 4239 | /* Call after-change hooks for the inserted text, aside from the case |
| @@ -5064,7 +5065,7 @@ An argument specifies the modification time value to use | |||
| 5064 | } | 5065 | } |
| 5065 | 5066 | ||
| 5066 | static Lisp_Object | 5067 | static Lisp_Object |
| 5067 | auto_save_error (Lisp_Object error) | 5068 | auto_save_error (Lisp_Object error_val) |
| 5068 | { | 5069 | { |
| 5069 | Lisp_Object args[3], msg; | 5070 | Lisp_Object args[3], msg; |
| 5070 | int i, nbytes; | 5071 | int i, nbytes; |
| @@ -5078,7 +5079,7 @@ auto_save_error (Lisp_Object error) | |||
| 5078 | 5079 | ||
| 5079 | args[0] = build_string ("Auto-saving %s: %s"); | 5080 | args[0] = build_string ("Auto-saving %s: %s"); |
| 5080 | args[1] = BVAR (current_buffer, name); | 5081 | args[1] = BVAR (current_buffer, name); |
| 5081 | args[2] = Ferror_message_string (error); | 5082 | args[2] = Ferror_message_string (error_val); |
| 5082 | msg = Fformat (3, args); | 5083 | msg = Fformat (3, args); |
| 5083 | GCPRO1 (msg); | 5084 | GCPRO1 (msg); |
| 5084 | nbytes = SBYTES (msg); | 5085 | nbytes = SBYTES (msg); |