aboutsummaryrefslogtreecommitdiffstats
path: root/src/ChangeLog
diff options
context:
space:
mode:
authorTom Tromey2013-03-08 11:57:29 -0700
committerTom Tromey2013-03-08 11:57:29 -0700
commit71f91792e3013b397996905224f387da5cc539a9 (patch)
tree4c3d3ba909e76deea1cdf73b73fca67a57149465 /src/ChangeLog
parent6f4de085f065e11f4df3195d47479f28f5ef08ba (diff)
parentb5426561089d39f18b42bed9dbfcb531f43ed562 (diff)
downloademacs-71f91792e3013b397996905224f387da5cc539a9.tar.gz
emacs-71f91792e3013b397996905224f387da5cc539a9.zip
merge from trunk
Diffstat (limited to 'src/ChangeLog')
-rw-r--r--src/ChangeLog1259
1 files changed, 1255 insertions, 4 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 115b8d42915..fe084b160c4 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,1254 @@
12013-03-08 Dmitry Antipov <dmantipov@yandex.ru>
2
3 * search.c (find_newline): Accept start and end byte positions
4 as arguments and allow -1 if not known.
5 (find_newline_no_quit): Likewise for start position.
6 * lisp.h (find_newline, find_newline_no_quit): Adjust prototype.
7 * bidi.c (bidi_find_paragraph_start): Pass byte position to
8 find_newline_no_quit, thus eliminating CHAR_TO_BYTE.
9 * editfns.c (Fconstrain_to_field): Break long line. Adjust
10 call to find_newline.
11 * indent.c (vmotion): Adjust calls to find_newline_no_quit.
12 Use DEC_BOTH to start next search from the previous buffer
13 position, where appropriate.
14 * xdisp.c (back_to_previous_line_start, forward_to_next_line_start)
15 (get_visually_first_element, move_it_vertically_backward): Likewise.
16 Obtain byte position from the display iterator, where appropriate.
17
182013-03-08 Paul Eggert <eggert@cs.ucla.edu>
19
20 print.c, process.c: Use bool for booleans.
21 * lisp.h (wait_reading_process_output):
22 * print.c (print_output_debug_flag, PRINTDECLARE, printchar)
23 (strout, debug_output_compilation_hack, float_to_string, print)
24 (print_object):
25 * process.c (kbd_is_on_hold, inhibit_sentinels, process_output_skip)
26 (decode_status, status_message, create_process, create_pty)
27 (Fmake_network_process, Fnetwork_interface_info)
28 (wait_reading_process_output, read_process_output)
29 (write_queue_push, write_queue_pop, process_send_signal)
30 (handle_child_signal, keyboard_bit_set, kbd_on_hold_p):
31 * process.h (struct Lisp_Process, inhibit_sentinels, kbd_on_hold_p):
32 Use bool for booleans.
33 * process.c (Fnetwork_interface_list): Remove unused local.
34 (connect_counter): Now EMACS_INT, not int.
35
362013-03-08 Dmitry Antipov <dmantipov@yandex.ru>
37
38 * bidi.c (bidi_fetch_char): Swap first and second arguments
39 to match other functions accepting character and byte positions.
40 Adjust comment.
41 (bidi_resolve_explicit_1, bidi_level_of_next_char): Adjust users.
42 (bidi_paragraph_init): Likewise. Use DEC_BOTH which is faster
43 when you need just to move to the previous buffer position.
44 * xdisp.c (Fcurrent_bidi_paragraph_direction): Use DEC_BOTH.
45
462013-03-07 Eli Zaretskii <eliz@gnu.org>
47
48 * .gdbinit (prowlims): Display the enabled_p flag of the row.
49
502013-03-07 Dmitry Antipov <dmantipov@yandex.ru>
51
52 Avoid character to byte conversions in motion subroutines.
53 * indent.h (compute_motion, vmotion): Add byte position argument.
54 * indent.c (compute_motion): Use it and avoid CHAR_TO_BYTE.
55 Add eassert.
56 (Fcompute_motion): Break long line. Adjust call to compute_motion.
57 Use list5 for return value.
58 (vmotion): Use byte position argument and avoid call to CHAR_TO_BYTE.
59 Adjust comments, style and calls to compute_motion.
60 (Fvertical_motion): Adjust call to vmotion.
61 * window.c (Fdelete_other_windows_internal): Record window start
62 byte position and adjust call to vmotion.
63 (window_scroll_line_based): Likewise with call to compute_motion.
64 Use SET_PT_BOTH.
65 (Frecenter): Adjust calls to vmotion.
66
672013-03-07 Dmitry Antipov <dmantipov@yandex.ru>
68
69 * lisp.h (list2i, list3i): New functions.
70 (list4i): Move from window.c and make LISP_INLINE.
71 * editfns.c (make_lisp_time):
72 * fns.c (Flocale_info):
73 * keyboard.c (parse_modifiers):
74 * xterm.c (x_ewmh_activate_frame): Use list2i.
75 * instel.c (signal_after_change):
76 * nsfns.m (Fx_server_version, Fxw_color_values):
77 * w32fns.c (Fxw_color_values, Fx_server_version):
78 * xfns.c (Fxw_color_values, Fx_server_version): Use list3i.
79 * fileio.c (Fvisited_file_modtime):
80 * nsfns.m (Fns_display_usable_bounds):
81 * w32.c (ltime): Use list4i.
82
832013-03-06 Eli Zaretskii <eliz@gnu.org>
84
85 * search.c (find_newline_no_quit): Rename from find_next_newline.
86 Add commentary.
87
88 * lisp.h (find_newline_no_quit): Rename prototype.
89
90 * xdisp.c (back_to_previous_line_start)
91 (forward_to_next_line_start, get_visually_first_element)
92 (move_it_vertically_backward): Callers of find_newline_no_quit changed.
93 * indent.c (vmotion): Callers of find_newline_no_quit changed.
94 * bidi.c (bidi_find_paragraph_start): Callers of
95 find_newline_no_quit changed.
96
97 * msdos.c: Change encoding to cp850. (Bug#13879)
98 (fr_keyboard, it_keyboard, dk_keyboard): Update keyboard layouts.
99
1002013-03-06 Dmitry Antipov <dmantipov@yandex.ru>
101
102 Coding system support cleanup and minor refactoring.
103 * coding.h (enum coding_result_code): Remove
104 CODING_RESULT_INCONSISTENT_EOL and CODING_RESULT_INSUFFICIENT_MEM.
105 (toplevel): Remove unused CODING_MODE_INHIBIT_INCONSISTENT_EOL.
106 (CODING_MODE_LAST_BLOCK, CODING_MODE_SELECTIVE_DISPLAY)
107 (CODING_MODE_DIRECTION, CODING_MODE_FIXED_DESTINATION)
108 (CODING_MODE_SAFE_ENCODING): Rearrange bit values.
109 (decode_coding_region, encode_coding_region, decode_coding_string):
110 Remove unused compatibility macros.
111 * coding.c (Qinconsistent_eol, Qinsufficient_memory): Remove.
112 (record_conversion_result): Adjust user.
113 (syms_of_coding): Likewise.
114 (ALLOC_CONVERSION_WORK_AREA): Use SAFE_ALLOCA.
115 (decode_coding, encode_coding): Add USE_SAFE_ALLOCA and SAFE_FREE.
116 (decode_coding_object): Simplify since xrealloc never returns NULL.
117 Add eassert.
118
1192013-03-06 Paul Eggert <eggert@cs.ucla.edu>
120
121 Fix a build failure on OpenBSD 4.x and MirBSD (Bug#13881).
122 * sysdep.c (list_system_processes)
123 [BSD_SYSTEM && !DARWIN_OS && !__FreeBSD__]:
124 Make it a stub in this case; otherwise the build might fail,
125 and this code hasn't been tested on such hosts anyway.
126 Problem reported by Nelson H. F. Beebe in
127 <http://lists.gnu.org/archive/html/emacs-devel/2013-03/msg00021.html>
128 and analyzed by Jérémie Courrèges-Anglas in
129 <http://lists.gnu.org/archive/html/emacs-devel/2013-03/msg00062.html>.
130
1312013-03-06 Dmitry Antipov <dmantipov@yandex.ru>
132
133 * lisp.h (find_next_newline_no_quit): Rename to find_next_newline.
134 * xdisp.c (back_to_previous_line_start, forward_to_next_line_start)
135 (get_visually_first_element, move_it_vertically_backward): Ajust users.
136 * bidi.c (bidi_find_paragraph_start): Likewise.
137 * indent.c (vmotion): Likewise.
138
1392013-03-05 Paul Eggert <eggert@cs.ucla.edu>
140
141 FILE's lock is now always .#FILE and may be a regular file (Bug#13807).
142 * filelock.c: Include <c-ctype.h>.
143 (MAX_LFINFO): New top-level constant.
144 (lock_info_type): Remove members pid, boot_time. Add members at,
145 dot, colon. Change user member to be the entire buffer, not a
146 pointer. This allows us to handle the case where a foreign
147 pid or boot time exceeds the local range. All uses changed.
148 (LINKS_MIGHT_NOT_WORK): New constant.
149 (FREE_LOCK_INFO): Remove, as the pieces no longer need freeing.
150 (defined_WINDOWSNT): Remove.
151 (MAKE_LOCK_NAME, file_in_lock_file_name):
152 Always use .#FILE (not .#-FILE) for the file lock,
153 even if it is a regular file.
154 (rename_lock_file): New function.
155 (create_lock_file): Use it.
156 (create_lock_file, read_lock_data):
157 Prefer a symbolic link for the lock file, falling back on a
158 regular file if symlinks don't work. Do not try to create
159 symlinks on MS-Windows, due to security hassles. Stick with
160 POSIXish functions (open, read, write, close, fchmod, readlink, symlink,
161 link, rename, unlink, mkstemp) when creating locks, as a GNUish
162 host may be using a Windowsish file system, and cannot use
163 MS-Windows-only system calls. Fall back on mktemp if mkstemp
164 doesn't work. Don't fail merely because of a symlink-contents
165 length limit in the current file system; fall back on regular
166 files. Increase the symlink contents length limit to 8 KiB, this
167 should be big enough for any real use and doesn't crunch the
168 stack.
169 (create_lock_file, lock_file_1, read_lock_data):
170 Simplify allocation of lock file buffers now that they fit in 8 KiB.
171 (lock_file_1): Return error number, not bool. All callers changed.
172 (ELOOP): New macro, if not already defined.
173 (read_lock_data): Return size of lock file contents, not Lisp object.
174 All callers changed. Handle a race condition if some other process
175 replaces a regular-file lock with a symlink lock or vice versa,
176 while we're trying to read the lock.
177 (current_lock_owner): Parse contents more carefully, to help avoid
178 confusing a regular-file lock with some other application's use
179 of the file. Check for lock file contents being too long, or
180 not parsing correctly.
181 (current_lock_owner, lock_file):
182 Allow foreign pid and boot times that exceed the local range.
183 (current_lock_owner, lock_if_free, lock_file):
184 Simplify allocation of lock file contents.
185 * w32.c (sys_rename_replace): New function, containing most of
186 the contents of the old sys_rename.
187 (sys_rename): Use it.
188 (fchmod): New dummy function.
189 * w32.h (sys_rename_replace, fchmod): New decls.
190
1912013-03-05 Eli Zaretskii <eliz@gnu.org>
192
193 * bidi.c (bidi_resolve_explicit_1): Don't call CHAR_TO_BYTE or
194 bidi_count_bytes, as the callers now arrange for bidi_it->charpos
195 to be in sync with bidi_it->bytepos. Suggested by Dmitry Antipov
196 <dmantipov@yandex.ru>.
197
1982013-03-05 Dmitry Antipov <dmantipov@yandex.ru>
199
200 * composite.c (get_composition_id, fill_gstring_header):
201 Use make_uninit_vector where appropriate.
202 * font.c (Ffont_get_glyphs, build_style_table): Likewise.
203 * xselect.c (clean_local_selection_data): Likewise.
204
2052013-03-04 Paul Eggert <eggert@cs.ucla.edu>
206
207 Fix misuse of ImageMagick that caused core dump (Bug#13846).
208 * image.c (imagemagick_load_image): Calculate height and width
209 after flattening the image, not before.
210
2112013-03-04 Dmitry Antipov <dmantipov@yandex.ru>
212
213 * font.c (Ffont_get_glyphs): Use convenient LGLYPH_NEW.
214 * ftfont.c (ftfont_shape_by_flt): Likewise.
215 * w32uniscribe.c (uniscribe_shape): Likewise.
216
2172013-03-02 Paul Eggert <eggert@cs.ucla.edu>
218
219 The lock for FILE is now .#FILE or .#-FILE (Bug#13807).
220 The old approach, which fell back on DIR/.#FILE.0 through
221 DIR/.#FILE.9, had race conditions that could not be easily fixed.
222 If DIR/.#FILE is a non-symlink file, Emacs now does not create a
223 lock file for DIR/FILE; that is, DIR/FILE is no longer partly
224 protected by a lock if DIR/.#FILE is a non-symlink file ("partly"
225 because the locking mechanism was never reliable in that case).
226 This patch fixes this and other bugs discovered by a code
227 inspection that was prompted by
228 <http://lists.gnu.org/archive/html/emacs-devel/2013-02/msg00531.html>.
229 Also, this patch switches to .#-FILE (not .#FILE) on MS-Windows,
230 to avoid interoperability problems between the MS-Windows and
231 non-MS-Windows implementations. MS-Windows and non-MS-Windows
232 instances of Emacs now ignore each others' locks.
233 * filelock.c (defined_WINDOWSNT): New constant.
234 (MAKE_LOCK_NAME, fill_in_lock_file_name):
235 Don't create DIR/.#FILE.0 through DIR/.#FILE.9. Instead, create
236 DIR/.#FILE symlinks on non-MS-Windows hosts, and DIR/.#-FILE
237 regular files on MS-Windows hosts.
238 (MAKE_LOCK_NAME, unlock_file, Ffile_locked_p):
239 Use SAFE_ALLOCA to avoid problems with long file names.
240 (MAX_LFINFO): Now a local constant, not a global macro.
241 (IS_LOCK_FILE): Remove.
242 (lock_file_1): Don't inspect errno if symlink call succeeds;
243 that's not portable.
244 (lock_file): Document that this function can return if lock
245 creation fails.
246 (lock_file): Don't access freed storage.
247
2482013-03-02 Andreas Schwab <schwab@linux-m68k.org>
249
250 * lisp.h (XPNTR) [!USE_LSB_TAG]: Remove extra paren. (Bug#13734)
251
2522013-03-02 Paul Eggert <eggert@cs.ucla.edu>
253
254 * textprop.c: Use bool for booleans.
255 (validate_interval_range, Fadd_text_properties)
256 (Fremove_text_properties): Prefer bool to int when either works.
257
2582013-03-02 Eli Zaretskii <eliz@gnu.org>
259
260 * textprop.c (Fadd_text_properties, Fremove_text_properties): If
261 the interval tree changes as a side effect of calling
262 modify_region, re-do processing starting from the call to
263 validate_interval_range. (Bug#13743)
264
2652013-02-28 Eli Zaretskii <eliz@gnu.org>
266
267 * w32.c (sys_open): Don't reset the flags for FD in fd_info[].
268 (Bug#13546).
269
2702013-02-27 Eli Zaretskii <eliz@gnu.org>
271
272 * filelock.c (create_lock_file) [WINDOWSNT]: Use _sopen with
273 _SH_DENYRW flag, instead of emacs_open, to deny any other process
274 access to the lock file until it is written and closed.
275 (Bug#13807)
276
2772013-02-27 Paul Eggert <eggert@cs.ucla.edu>
278
279 * callint.c (Qcall_interactively):
280 * macros.c (Qexecute_kbd_macro):
281 Now static.
282
2832013-02-26 Bastien Guerry <bzg@gnu.org>
284
285 * window.c (Frecenter): Tiny docstring enhancement.
286
2872013-02-26 Paul Eggert <eggert@cs.ucla.edu>
288
289 Minor textprop integer cleanup.
290 * intervals.h, textprop.c (add_text_properties_from_list):
291 Return void, not int, since nobody uses the return value.
292 * textprop.c (validate_plist, add_properties, remove_properties)
293 (Fadd_text_properties):
294 Don't assume list length fits in int.
295 (interval_has_all_properties, interval_has_some_properties)
296 (interval_has_some_properties_list, add_properties, remove_properties)
297 (Fadd_text_properties, Fremove_text_properties)
298 (Fremove_list_of_text_properties, text_property_stickiness):
299 Use bool for booleans.
300 (Fadd_text_properties, Fremove_text_properties):
301 (Fremove_list_of_text_properties):
302 Reindent do-while as per GNU style.
303
3042013-02-25 Eli Zaretskii <eliz@gnu.org>
305
306 Implement CLASH_DETECTION for MS-Windows.
307
308 * filelock.c [WINDOWSNT]: Include w32.h.
309 (MAKE_LOCK_NAME): Don't use 'lock', it clashes with MS runtime
310 function of that name. Up-case the macro arguments.
311 (IS_LOCK_FILE): New macro.
312 (fill_in_lock_file_name): Use IS_LOCK_FILE instead of S_ISLNK.
313 (create_lock_file): New function, with body extracted from
314 lock_file_1.
315 [WINDOWSNT]: Implement lock files by writing a regular file with
316 the lock information as its contents.
317 (read_lock_data): New function, on Posix platforms just calls
318 emacs_readlinkat.
319 [WINDOWSNT]: Read the lock info from the file.
320 (current_lock_owner): Call read_lock_data instead of calling
321 emacs_readlinkat directly.
322 (lock_file) [WINDOWSNT]: Run the file name through
323 dostounix_filename.
324
325 * w32proc.c (sys_kill): Support the case of SIG = 0, in which case
326 just check if the process by that PID exists.
327
328 * w32.c (sys_open): Don't reset the _O_CREAT flag if _O_EXCL is
329 also present, as doing so will fail to error out if the file
330 already exists.
331
332 * makefile.w32-in ($(BLD)/filelock.$(O)): Depend on src/w32.h.
333
334 * textprop.c (Fadd_text_properties, Fremove_text_properties)
335 (Fremove_list_of_text_properties): Skip all of the intervals in
336 the region between START and END that already have resp. don't
337 have the requested properties, not just the first one. Add
338 assertions that the loop afterwards always modifies the
339 properties. (Bug#13743)
340
3412013-02-25 Stefan Monnier <monnier@iro.umontreal.ca>
342
343 * callint.c (Fcall_interactively): Use the right lexical environment
344 for `interactive' specs (bug#13811).
345 * eval.c (Feval): Accept a lexical environment.
346
3472013-02-25 Paul Eggert <eggert@cs.ucla.edu>
348
349 Simplify data_start configuration (Bug#13783).
350 This is a followon simplification to the fix for Bug#13650.
351 * Makefile.in (LD_FIRSTFLAG, LIB_GCC, CRT_DIR, LIB_STANDARD)
352 (START_FILES): Remove. All uses removed.
353 (otherobj): Remove $(VMLIMIT_OBJ), as it's now first.
354 (ALLOBJS): Move here from autodeps.mk, and with VMLIMITS_OBJ first.
355 (buildobj.h): Use it.
356 ($(ALLOBJS)): Depend on globals.h.
357 (temacs$(EXEEXT)): Use $(ALLOBJS).
358 * autodeps.mk (ALLOBJS): Move to Makefile.in.
359 * deps.mk (vm-limit.o):
360 * makefile.w32-in ($(BLD)/vm-limit.$(O)):
361 Do not depend on mem-limits.h.
362 * emacs.c (__do_global_ctors, __do_global_ctors_aux)
363 (__do_global_dtors, __CTOR_LIST__, __DTOR_LIST__)
364 [__GNUC__ && !ORDINARY_LINK]: Remove.
365 * mem-limits.h, pre-crt0.c: Remove.
366 * unexaix.c, unexcoff.c: Don't include mem-limits.h.
367 * unexcoff.c (etext): New decl.
368 (make_hdr): Use DATA_START instead of start_of_data.
369 * vm-limit.c: Move most of mem-limits.h's contents here.
370 (data_start): New decl. It's OK if this is approximate,
371 so simplify-away some unnecessary exactness.
372 (POINTER): Remove; all uses removed.
373 (data_space_start): Now char *, to avoid casts.
374 (exceeds_lisp_ptr): New function, replacing the old
375 EXCEEDS_LISP_PTR macro. All uses changed.
376 (check_memory_limits): Simplify and remove casts.
377 (start_of_data) [!CANNOT_DUMP || !SYSTEM_MALLOC]: Remove.
378 (memory_warnings): Use data_start instead of start_of_data.
379
3802013-02-24 Andreas Schwab <schwab@linux-m68k.org>
381
382 * xdisp.c (set_message): Only check for debug-on-message if STRING
383 is a string. (Bug#13797)
384
3852013-02-24 Paul Eggert <eggert@cs.ucla.edu>
386
387 Fix regression introduced by July 10 filelock.c patch.
388 * filelock.c (fill_in_lock_file_name): Fix crash caused by the
389 2012-07-10 patch to this file. Reported by Eli Zaretskii in
390 <http://lists.gnu.org/archive/html/emacs-devel/2013-02/msg00533.html>
391 and diagnosed by Andreas Schwab in
392 <http://lists.gnu.org/archive/html/emacs-devel/2013-02/msg00534.html>.
393
3942013-02-22 Paul Eggert <eggert@cs.ucla.edu>
395
396 Assume C89 or better.
397 * ralloc.c (SIZE, POINTER, NIL):
398 * vm-limit.c (POINTER):
399 Remove, replacing all uses with C89 equivalents. These old
400 symbols were present only for porting to pre-C89 platforms.
401
4022013-02-22 Claudio Bley <claudio.bley@gmail.com>
403
404 * w32.c (emacs_gnutls_pull): Don't call 'select', and don't loop.
405 This avoids warning messages reported as part of Bug#13546.
406
4072013-02-21 Ken Brown <kbrown@cornell.edu>
408
409 * sheap.c (report_sheap_usage): Fix arguments of message1_no_log.
410
4112013-02-20 Stefan Monnier <monnier@iro.umontreal.ca>
412
413 * sheap.c (report_sheap_usage): Prefer message1_nolog.
414
415 * keyboard.c (Qcommand_execute): New var.
416 (command_loop_1, read_char): Use it.
417 (Fcommand_execute): Remove, replace by an Elisp implementation.
418 (syms_of_keyboard): Adjust accordingly.
419
4202013-02-19 Daniel Colascione <dancol@dancol.org>
421
422 * sheap.c (report_sheap_usage): Use message, not message1, so
423 that we don't try to create a buffer while we're in the middle
424 of dumping Emacs. Explain why.
425
4262013-02-20 Dmitry Antipov <dmantipov@yandex.ru>
427
428 * search.c (find_newline): Return byte position in bytepos.
429 Adjust comment.
430 (find_next_newline_no_quit, find_before_next_newline):
431 Add bytepos argument.
432 * lisp.h (find_newline, find_next_newline_no_quit)
433 (find_before_next_newline): Adjust prototypes.
434 * bidi.c (bidi_find_paragraph_start):
435 * editfns.c (Fconstrain_to_field, Fline_end_position):
436 * indent.c (compute_motion, vmotion):
437 * xdisp.c (back_to_previous_line_start, forward_to_next_line_start):
438 (get_visually_first_element, move_it_vertically_backward):
439 Adjust users and avoid calls to CHAR_TO_BYTE where appropriate.
440
4412013-02-19 Eli Zaretskii <eliz@gnu.org>
442
443 * w32proc.c (new_child): Avoid leaking handles if the subprocess
444 resources were not orderly released.
445
4462013-02-17 Eli Zaretskii <eliz@gnu.org>
447
448 * xdisp.c (x_draw_vertical_border): For a window that is neither
449 the leftmost nor the rightmost, redraw both the left and the right
450 vertical borders. (Bug#13723)
451
4522013-02-17 Stefan Monnier <monnier@iro.umontreal.ca>
453
454 * xml.c (init_libxml2_functions):
455 * sound.c (sound_warning):
456 * sheap.c (report_sheap_usage):
457 * process.c (wait_reading_process_output):
458 * msdos.c (XMenuActivate):
459 * macros.c (Fstart_kbd_macro, Fend_kbd_macro):
460 * keyboard.c (top_level_1):
461 * editfns.c (Fmessage, Fmessage_box):
462 * callint.c (Fcall_interactively):
463 * fns.c (Fyes_or_no_p): Prefer `message1' over `message'.
464
4652013-02-17 Jan Djärv <jan.h.d@swipnet.se>
466
467 * xterm.c (syms_of_xterm): Move scroll-bar-adjust-thumb-portion ...
468 * frame.c (syms_of_frame): ... to here.
469
4702013-02-16 Eli Zaretskii <eliz@gnu.org>
471
472 * w32.c (sys_chown): Remove unused function.
473
474 * w32term.c <input_signal_count>: Declare 'volatile'
475 unconditionally. (Bug#9066)
476
477 * w32.c (set_errno): Reset h_errno and don't set it to any other
478 value. Set errno instead.
479 (check_errno): Reset h_errno.
480 (sys_socket, socket_to_fd, sys_bind, sys_connect)
481 (sys_gethostname, sys_getservbyname, sys_getpeername)
482 (sys_shutdown, sys_setsockopt, sys_listen, sys_getsockname)
483 (sys_accept, sys_recvfrom, sys_sendto, fcntl, sys_read): Don't set
484 h_errno.
485 (sys_gethostbyname): Set h_errno only errors detected.
486
4872013-02-15 Paul Eggert <eggert@cs.ucla.edu>
488
489 * process.c (h_errno) [!HAVE_H_ERRNO]: Remove unused decl.
490
4912013-02-15 Eli Zaretskii <eliz@gnu.org>
492
493 * keyboard.c (read_char): Fix calculation of auto-save time out
494 when auto-save-timeout is less than 4. (Bug#13720)
495
496 * w32proc.c (new_child): Free up to 2 slots of dead processes at a
497 time. Improve diagnostics in DebPrint. (Bug#13546)
498
499 * w32.c (sys_socket, sys_bind, sys_connect, sys_gethostname)
500 (sys_gethostbyname, sys_getservbyname, sys_getpeername)
501 (sys_shutdown, sys_setsockopt, sys_listen, sys_getsockname)
502 (sys_accept, sys_recvfrom, sys_sendto, fcntl): In case of failure,
503 make sure errno is set to an appropriate value. (Bug#13546)
504 (socket_to_fd): Add assertion against indexing fd_info[] with a
505 value that is out of bounds.
506 (sys_accept): If fd is negative, do not set up the child_process
507 structure for reading.
508
5092013-02-15 Dmitry Antipov <dmantipov@yandex.ru>
510
511 * composite.c (fill_gstring_header): Remove useless prototype.
512 Break long line.
513 * lisp.h (message_dolog, compile_pattern): Adjust prototype.
514 * print.c (PRINTDECLARE, print_object):
515 * search.c (compile_pattern, fast_looking_at, search_buffer):
516 (simple_search, boyer_moore, Freplace_match):
517 * xdisp.c (c_string_pos, number_of_chars, message_dolog):
518 (get_overlay_arrow_glyph_row, display_mode_element):
519 (decode_mode_spec_coding, message3):
520 * xfaces.c (face_at_string_position): Use bool for booleans.
521 Adjust comments.
522
5232013-02-15 Paul Eggert <eggert@cs.ucla.edu>
524
525 Fix AIX port (Bug#13650).
526 * lisp.h (XPNTR) [!USE_LSB_TAG && DATA_SEG_BITS]:
527 Fix bug introduced in 2012-07-27 change. DATA_SEG_BITS, if set,
528 was #undeffed earlier, so it cannot be used as a macro here.
529 Use the constant and not the macro.
530
5312013-02-15 Eli Zaretskii <eliz@gnu.org>
532
533 * w32proc.c (new_child): If no vacant slots are found in
534 child_procs[], make another pass looking for slots whose process
535 has exited or died. (Bug#13546)
536
537 * w32.c (sys_pipe): When failing due to file descriptors above
538 MAXDESC, set errno to EMFILE.
539 (_sys_read_ahead): Update cp->status when failing to read serial
540 communications input, so that the status doesn't stay at
541 STATUS_READ_IN_PROGRESS. (Bug#13546)
542
5432013-02-14 Jan Djärv <jan.h.d@swipnet.se>
544
545 * gtkutil.c (tb_size_cb): New function.
546 (xg_create_tool_bar): Connect size-allocate to tb_size_cb (Bug#13512).
547
5482013-02-14 Stefan Monnier <monnier@iro.umontreal.ca>
549
550 * keyboard.c (active_maps): Fcurrent_active_maps expects a position, not
551 an event.
552
5532013-02-13 Stefan Monnier <monnier@iro.umontreal.ca>
554
555 * keyboard.c (syms_of_keyboard): Further tweaks of docstring.
556
5572013-02-13 Dmitry Antipov <dmantipov@yandex.ru>
558
559 * font.c (font_range): Add pos_byte argument. Adjust comment
560 and break long line.
561 * font.h (font_range): Adjust prototype.
562 * composite.c (autocmp_chars): Pass byte position to font_range.
563 Break long line. Remove useless prototype and format comment.
564
5652013-02-13 Glenn Morris <rgm@gnu.org>
566
567 * keyboard.c (input-decode-map, key-translation-map): Doc fixes.
568
5692013-02-13 Paul Eggert <eggert@cs.ucla.edu>
570
571 Improve AIX port some more (Bug#13650).
572 With this, it should be as good as it was in 23.3, though it's
573 still pretty bad: the dumped emacs does not run. See Mark Fleishman in
574 http://lists.gnu.org/archive/html/help-gnu-emacs/2011-04/msg00287.html
575 * unexaix.c (start_of_text): Remove.
576 (_data, _text): Declare as char[], not int, as AIX manual suggests.
577 (bias, lnnoptr, text_scnptr, data_scnptr, load_scnptr)
578 (orig_load_scnptr, orig_data_scnptr):
579 Now off_t, not long, since they are file offsets.
580 (make_hdr): Use _data, not start_of_data ().
581 This is the key part of the fix.
582 (make_hdr, unrelocate_symbols): Use off_t for file offsets.
583 (unrelocate_symbols): Cast pointers to intptr_t, not to ulong.
584
585 * pre-crt0.c (data_start): Initialize to 1.
586 This ports to compilers that optimize the external declaration
587 'int x = 0;' as if it were 'int x;' to shrink the executable.
588
589 Improve AIX port (Bug#13650).
590 This doesn't fix the bug, but it makes progress: Emacs builds now.
591 * unexaix.c: Include inttypes.h, stdarg.h.
592 (report_error, report_error_1): Mark as _Noreturn.
593 (report_error): Don't report the wrong errno.
594 (report_error_1): Now varargs. All callers changed.
595 (make_hdr): Use uintptr_t, not unsigned, when converting pointers
596 to unsigned. Don't use ADDR_CORRECT, as it no longer exists.
597 (write_ptr): Use %p to print address rather than %lx and a cast
598 to unsigned long. Grow buffer a bit, to be safer.
599
6002013-02-13 Eli Zaretskii <eliz@gnu.org>
601
602 * bidi.c (bidi_resolve_neutral): After finding the next
603 non-neutral character, accept NEUTRAL_ON type as well, because
604 directional control characters, such as LRE and RLE, have their
605 type converted to that by bidi_resolve_weak. This avoids aborts
606 when LRE/RLE follows a run of neutrals.
607 (bidi_move_to_visually_next): Assert that return value of
608 bidi_peek_at_next_level is non-negative. Negative values will
609 cause an infloop.
610
6112013-02-13 Paul Eggert <eggert@cs.ucla.edu>
612
613 Minor getenv-related fixes.
614 * callproc.c (Fcall_process_region) [!DOS_NT]:
615 Avoid unnecessary duplicate call to getenv.
616 * callproc.c (init_callproc):
617 * dispnew.c (init_display):
618 * sysdep.c (sys_subshell):
619 Omit unnecessary cast of getenv or egetenv.
620
6212013-02-13 Juanma Barranquero <lekktu@gmail.com>
622
623 * makefile.w32-in ($(BLD)/filelock.$(O), $(BLD)/sysdep.$(O)):
624 Update dependencies.
625
6262013-02-12 Eli Zaretskii <eliz@gnu.org>
627
628 * xdisp.c (redisplay_internal): Don't set w->region_showing to the
629 marker's position.
630 (display_line): Set w->region_showing to the value of
631 it->region_beg_charpos, not to -1. This fixes redisplay
632 optimization when cursor is moved up after M->. (Bug#13623)
633 (Bug#13626)
634 (try_scrolling): Scroll text up more if point is too close to ZV
635 and inside the scroll margin. This makes sure point is moved
636 outside the scroll margin in these cases.
637
638 * window.h (struct window): region_showing can no longer be
639 negative.
640
6412013-02-11 Paul Eggert <eggert@cs.ucla.edu>
642
643 Tune by using memchr and memrchr.
644 * doc.c (Fsnarf_documentation):
645 * fileio.c (Fsubstitute_in_file_name):
646 * search.c (find_newline, scan_newline):
647 * xdisp.c (pos_visible_p, display_count_lines):
648 Use memchr and memrchr rather than scanning byte-by-byte.
649 * search.c (find_newline): Rename from scan_buffer.
650 Omit first arg TARGET, as it's always '\n'. All callers changed.
651
652 Clean up read_key_sequence a tiny bit more.
653 * keyboard.c (read_char_x_menu_prompt) [HAVE_MENUS]:
654 (read_key_sequence): Remove unused locals.
655
6562013-02-11 Stefan Monnier <monnier@iro.umontreal.ca>
657
658 Clean up read_key_sequence a bit; reread active keymaps after first event.
659 * keyboard.c (read_char, read_char_x_menu_prompt)
660 (read_char_minibuf_menu_prompt):
661 Replace nmaps+maps with a single `map' arg.
662 (follow_key): Operate on a single map.
663 (active_maps): New function.
664 (test_undefined): Also return true for nil bindings.
665 (read_key_sequence): Use active_maps to replace the arrays of keymaps with
666 a single (composed) keymap. Remember `first_event' to choose the right
667 set of active keymaps. Recompute the set of keymaps after receiving
668 the first event. Remove GOBBLE_FIRST_EVENT.
669 (syms_of_keyboard): Remove inhibit_local_menu_bar_menus.
670 * keyboard.h (read_char): Update declaration.
671 * lread.c (read_filtered_event): Adjust call to read_char.
672
6732013-02-11 Eli Zaretskii <eliz@gnu.org>
674
675 * xdisp.c (move_it_vertically_backward, move_it_by_lines):
676 Don't use the limitation on backwards movement when lines are truncated
677 in the window. (Bug#13675)
678
6792013-02-11 Dmitry Antipov <dmantipov@yandex.ru>
680
681 * marker.c (set_marker_internal): If desired position is passed
682 as a marker, avoid call to buf_charpos_to_bytepos.
683 * window.c (Fset_window_point): Omit redundant type checking.
684 (Fset_window_start): Likewise. Format comment.
685 (window_scroll_pixel_based): Use set_marker_restricted_both
686 with character and byte positions obtained from an iterator.
687 (Fset_window_configuration): Use set_marker_restricted_both.
688 * xdisp.c (message_dolog): Likewise.
689
6902013-02-10 Eli Zaretskii <eliz@gnu.org>
691
692 * xdisp.c (move_it_vertically_backward, move_it_by_lines):
693 When text lines are longer than window's screen lines, don't move back
694 too far. This speeds up some redisplay operations. (Bug#13675)
695
6962013-02-10 Dmitry Antipov <dmantipov@yandex.ru>
697
698 * syntax.c (scan_sexps_forward): Fix byte position calculation
699 Bug#13664 (a.k.a Bug#13667) introduced with 2013-02-08 change.
700
7012013-02-10 Paul Eggert <eggert@cs.ucla.edu>
702
703 * fileio.c (Fexpand_file_name): Omit confusing pointer comparison
704 that was not needed.
705
7062013-02-09 Paul Eggert <eggert@cs.ucla.edu>
707
708 Minor hashing refactoring.
709 * fns.c (SXHASH_REDUCE): Move to lisp.h.
710 (sxhash_float): Return EMACS_UINT, for consistency with the other
711 hash functions.
712 * lisp.h (INTMASK): Now a macro, since SXHASH_REDUCE is now a
713 non-static inline function and therefore can't use static vars.
714 (SXHASH_REDUCE): Move here from fns.c, and make it inline.
715 * profiler.c (hashfn_profiler): Use SXHASH_REDUCE, to be consistent
716 with the other hash functions.
717
7182013-02-09 Eli Zaretskii <eliz@gnu.org>
719
720 * callproc.c (Fcall_process_region) [WINDOWSNT]: Make sure the
721 XXXXXX part of the temporary file pattern is not downcased even
722 when w32-downcase-file-names is non-nil. (Bug#13661)
723
724 * xdisp.c (decode_mode_spec): Remove handling of %t.
725
726 * msdos.c (careadlinkatcwd): Remove.
727
7282013-02-08 Stefan Monnier <monnier@iro.umontreal.ca>
729
730 * lread.c (skip_dyn_bytes): New function (bug#12598).
731 (read1): Use it. Use getc instead of READCHAR to read bytes.
732 (load_each_byte): Remove. Update users.
733
7342013-02-08 Dmitry Antipov <dmantipov@yandex.ru>
735
736 * search.c (scan_buffer): Calculate end byte position just once.
737 (scan_newline): Do not recalculate start_byte.
738 (search_command): Use eassert.
739 * syntax.c (struct lisp_parse_state): New member location_byte.
740 (scan_sexps_forward): Record from_byte and avoid redundant
741 character to byte position calculation ...
742 (Fparse_partial_sexp): ... here. Break too long line.
743
7442013-02-08 Dmitry Antipov <dmantipov@yandex.ru>
745
746 * lisp.h (make_uninit_vector): New function.
747 * alloc.c (Fvector, Fmake_byte_code):
748 * ccl.c (Fregister_ccl_program):
749 * charset.c (Fdefine_charset_internal, define_charset_internal):
750 * coding.c (make_subsidiaries, Fdefine_coding_system_internal):
751 * composite.c (syms_of_composite):
752 * font.c (Fquery_font, Ffont_info, syms_of_font):
753 * fontset.c (FONT_DEF_NEW, Fset_fontset_font):
754 * ftfont.c (ftfont_shape_by_flt):
755 * indent.c (recompute_width_table):
756 * nsselect.m (clean_local_selection_data):
757 * syntax.c (init_syntax_once):
758 * w32unsubscribe.c (uniscribe_shape):
759 * window.c (Fcurrent_window_configuration):
760 * xfaces.c (Fx_family_fonts):
761 * xselect.c (selection_data_to_lisp_data): Use it.
762
7632013-02-07 Dmitry Antipov <dmantipov@yandex.ru>
764
765 * coding.c (Fdefine_coding_system_internal): Use AREF where
766 argument is known to be a vector.
767 * fns.c (Flocale_info): Likewise for ASET.
768 * xselect.c (selection_data_to_lisp_data): Likewise for ASET.
769 * w32fns.c (w32_parse_hot_key): Likewise for ASIZE and AREF.
770
7712013-02-05 Jan Djärv <jan.h.d@swipnet.se>
772
773 * nsmenu.m (update_frame_tool_bar): Check for negative tool bar
774 height.
775
776 * nsterm.h (HAVE_NATIVE_FS): Define if OSX => 10.7.
777 (EmacsView): Add fs_is_native, fsIsNative, isFullscreen and
778 updateCollectionBehaviour.
779
780 * nsterm.m (NEW_STYLE_FS): Remove.
781 (ns_last_use_native_fullscreen): New variable.
782 (x_make_frame_visible): Replace NEW_STYLE_FS with isFullscreen.
783 (x_set_window_size): Do not take title bar and tool bar into account
784 if isFullscreen returns YES.
785 (ns_fullscreen_hook): Replace NEW_STYLE_FS with isFullscreen.
786 (check_native_fs): New function.
787 (ns_select, ns_read_socket): Call check_native_fs if HAVE_NATIVE_FS.
788 (ns_term_init): Remove NEW_STYLE_FS.
789 (updateFrameSize:, windowWillResize:toSize:): Only adjust for title bar
790 and tool bar if isFullscreen returns NO.
791 (windowDidResize:): Replace NEW_STYLE_FS with fsIsNative.
792 (initFrameFromEmacs:): Initialize fs_is_native. Replace NEW_STYLE_FS
793 with HAVE_NATIVE_FS.
794 (window:willUseFullScreenPresentationOptions:): New method.
795 (windowDidEnterFullScreen:): Replace NEW_STYLE_FS with fsIsNative.
796 Hide toolbar if not enabled (Bug#13444).
797 (windowDidExitFullScreen:): Call updateCollectionBehaviour.
798 Restore tool bar if enabled, hide it otherwise (Bug#13444).
799 (fsIsNative, isFullscreen, updateCollectionBehaviour): New methods.
800 (toggleFullScreen:): If fs_is_native, call toggleFullScreen on
801 window. Do no set FRAME_EXTERNAL_TOOL_BAR (f) to 0.
802 Check FRAME_EXTERNAL_TOOL_BAR (f) before restoring
803 FRAME_TOOLBAR_HEIGHT (f). Call updateFrameSize when going non-fs.
804 (syms_of_nsterm): Add ns-use-native-fullscreen.
805
8062013-02-04 Paul Eggert <eggert@cs.ucla.edu>
807
808 * fileio.c (Qchoose_write_coding_system): Now static.
809
8102013-02-04 Eli Zaretskii <eliz@gnu.org>
811
812 * xdisp.c (window_buffer_changed): region_showing can be negative,
813 which still means region is being displayed.
814 (redisplay_internal): Resurrect code that forced redisplay of the
815 whole window when showing region and the mark has changed.
816 Record the new mark position to allow redisplay optimizations.
817 (display_line): If it->region_beg_charpos is non-zero, set the
818 window's region_showing member to -1. (Bug#13623) (Bug#13626)
819
820 * window.h (struct window) <region_showing>: Declare ptrdiff_t,
821 not bitfield of 1 bit.
822
8232013-02-03 Daniel Colascione <dancol@dancol.org>
824
825 * emacs.c: Use execvp, not execv, when DAEMON_MUST_EXEC, so that
826 daemon mode works on cygw32 when Emacs is installed and not just
827 during development.
828
8292013-02-02 Paul Eggert <eggert@cs.ucla.edu>
830
831 Avoid file time stamp bug on MS-Windows (Bug#13149).
832 * fileio.c (Fwrite_region): Don't use the heuristic on empty files,
833 as FAT32 doesn't update time stamps when truncating them.
834 Also, check that a file time stamp is not a multiple of 100 ns;
835 this should catch all instances of the problem on MS-Windows,
836 as its native file system resolution is 100 ns or worse, and
837 checking for a non-multiple of 100 ns should impose only a small
838 overhead on systems with ns resolution.
839
8402013-02-02 Eli Zaretskii <eliz@gnu.org>
841
842 Avoid encoding file names on MS-Windows when they need to be run
843 through dostounix_filename.
844 * w32.c (normalize_filename): Accept an additional argument
845 MULTIBYTE; if non-zero, traverse the file name by bytes and don't
846 downcase it even if w32-downcase-file-names is non-nil.
847 (dostounix_filename): Accept an additional argument MULTIBYTE and
848 pass it to normalize_filename.
849 (emacs_root_dir): Adjust.
850
851 * msdos.h (dostounix_filename): Adjust prototype.
852
853 * w32.h (dostounix_filename): Adjust prototype.
854
855 * msdos.c (dostounix_filename): Accept an additional argument and
856 ignore it.
857 (init_environment): Adjust callers of dostounix_filename.
858
859 * fileio.c (Ffile_name_directory, file_name_as_directory)
860 (directory_file_name, Fexpand_file_name)
861 (Fsubstitute_in_file_name): [DOS_NT] Adjust call to
862 dostounix_filename.
863 [WINDOWSNT]: Downcase file names if w32-downcase-file-names is
864 non-nil.
865 (Fsubstitute_in_file_name): [DOS_NT] Don't downcase environment
866 variables, as egetenv is case-insensitive for DOS_NT.
867
868 * dired.c (file_name_completion): Don't call Fdirectory_file_name
869 with an encoded file name.
870
871 * w32proc.c (Fw32_short_file_name, Fw32_long_file_name):
872 Adjust calls to dostounix_filename.
873
874 * w32fns.c (Fx_file_dialog): Adjust call to dostounix_filename.
875
876 * unexw32.c (unexec): Adjust call to dostounix_filename.
877
878 * termcap.c (tgetent) [MSDOS]: Adjust call to dostounix_filename.
879
880 * emacs.c (decode_env_path) [DOS_NT]: Adjust call to
881 dostounix_filename.
882
883 * callproc.c (Fcall_process) [MSDOS]: Adjust call to
884 dostounix_filename.
885
886 * callproc.c (Fcall_process): Make sure program name in PATH and
887 new_argv[0] is encoded, if needed. Otherwise, un-encoded string
888 is passed to exec/spawnve, which fails unless the file-name
889 encoding is UTF-8.
890
891 * w32proc.c (sys_spawnve): Make sure escape_char is initialized,
892 even if w32-quote-process-args is nil.
893
8942013-02-01 Paul Eggert <eggert@cs.ucla.edu>
895
896 Fix timestamp bug when write-region appends nothing (Bug#13149).
897 * fileio.c (Fwrite_region): When neither O_EXCL nor O_TRUNC is used,
898 the file's time stamp doesn't change if Emacs happens to write nothing
899 to the file, and on a buggy file system this could cause Emacs to
900 incorrectly infer that the file system doesn't have the bug.
901 Avoid this problem by inhibiting the inference in this case.
902
9032013-02-01 Dmitry Antipov <dmantipov@yandex.ru>
904
905 * window.h (struct window): Convert base_line_number, base_line_pos
906 and column_number_displayed members from Lisp_Object to ptrdiff_t.
907 Convert region_showing member from Lisp_Object to bitfield.
908 Remove sequence_number member. Adjust comments.
909 * window.c (sequence_number): Remove.
910 (make_window): Initialize column_number_displayed.
911 * print.c (print_object): Follow the printed representation of
912 frames and print window pointer to distinguish between windows.
913 (adjust_window_count): Invalidate base_line_pos. Adjust comment.
914 * xdisp.c (wset_base_line_number, wset_base_line_pos)
915 (wset_column_number_displayed, wset_region_showing): Remove.
916 (window_buffer_changed, mode_line_update_needed, redisplay_internal)
917 (try_scrolling, try_cursor_movement, redisplay_window)
918 (try_window_reusing_current_matrix, try_window_id, display_line)
919 (display_mode_lines, decode_mode_spec): Adjust users.
920 * .gdbinit (pwinx): Do not print sequence_number.
921
9222013-02-01 Paul Eggert <eggert@cs.ucla.edu>
923
924 Use fdopendir, fstatat and readlinkat, for efficiency (Bug#13539).
925 * conf_post.h (GNULIB_SUPPORT_ONLY_AT_FDCWD): Remove.
926 * dired.c: Include <fcntl.h>.
927 (open_directory): New function, which uses open and fdopendir
928 rather than opendir. DOS_NT platforms still use opendir, though.
929 (directory_files_internal, file_name_completion): Use it.
930 (file_attributes): New function, with most of the old Ffile_attributes.
931 (directory_files_internal, Ffile_attributes): Use it.
932 (file_attributes, file_name_completion_stat): First arg is now fd,
933 not dir name. All uses changed. Use fstatat rather than lstat +
934 stat.
935 (file_attributes): Use emacs_readlinkat rather than Ffile_symlink_p.
936 * fileio.c: Include <allocator.h>, <careadlinkat.h>.
937 (emacs_readlinkat): New function, with much of the old
938 Ffile_symlink_p, but with an fd argument for speed.
939 It uses readlinkat rather than careadlinkatcwd, so that it
940 need not assume the working directory.
941 (Ffile_symlink_p): Use it.
942 * filelock.c (current_lock_owner): Use emacs_readlinkat
943 rather than emacs_readlink.
944 * lisp.h (emacs_readlinkat): New decl.
945 (READLINK_BUFSIZE, emacs_readlink): Remove.
946 * sysdep.c: Do not include <allocator.h>, <careadlinkat.h>.
947 (emacs_norealloc_allocator, emacs_readlink): Remove.
948 This stuff is moved to fileio.c.
949 * w32.c (fstatat, readlinkat): New functions.
950 (careadlinkat): Don't check that fd == AT_FDCWD.
951 (careadlinkatcwd): Remove; no longer needed.
952
9532013-01-31 Glenn Morris <rgm@gnu.org>
954
955 * fileio.c (choose_write_coding_system): Make it callable from Lisp.
956 (Fwrite_region): Update for new choose_write_coding_system args.
957 Move the last piece of choose_write_coding_system here. (Bug#13522)
958 (syms_of_fileio): Add choose-write-coding-system.
959
9602013-01-30 Eli Zaretskii <eliz@gnu.org>
961
962 * w32.c (sys_open): Zero out the flags for the new file descriptor.
963 (sys_close): Zero out the flags for the file descriptor before
964 closing it. (Bug#13546)
965
966 * w32.c (parse_root, get_volume_info, readdir, read_unc_volume)
967 (logon_network_drive, stat_worker, symlink, chase_symlinks):
968 Use CharNextExA and CharPrevExA to iterate over file names encoded in
969 DBCS. (Bug#13553)
970
971 * w32.c (w32_get_long_filename, init_environment, readlink):
972 Support file names encoded in DBCS codepages.
973 (readlink): Use the current file-name-coding-system, not the ANSI
974 codepage, to decode and handle targets of symlinks.
975
9762013-01-28 Eli Zaretskii <eliz@gnu.org>
977
978 * w32.c (opendir): Now accepts a 'const char *'.
979
9802013-01-28 Dmitry Antipov <dmantipov@yandex.ru>
981
982 Remove obsolete redisplay code. See the discussion at
983 http://lists.gnu.org/archive/html/emacs-devel/2013-01/msg00576.html.
984 * dispnew.c (preemption_period, preemption_next_check): Remove.
985 (Vredisplay_preemption_period): Likewise.
986 (update_frame, update_single_window, update_window, update_frame_1):
987 Adjust users. Always assume that PERIODIC_PREEMPTION_CHECKING is not
988 used, following the 2012-06-22 change.
989
9902013-01-25 Eli Zaretskii <eliz@gnu.org>
991
992 * w32notify.c (Fw32notify_add_watch): Doc fix. (Bug#13540)
993
9942013-01-25 Dmitry Antipov <dmantipov@yandex.ru>
995
996 * font.c (num_fonts): Remove the leftover from old
997 debugging code. Adjust comment style here and there.
998 * insdel.c (insert_1): Remove.
999 * lisp.h (insert_1): Remove prototype.
1000 * xdisp.c (message_dolog): Adjust users to call insert_1_both.
1001
10022013-01-25 Eli Zaretskii <eliz@gnu.org>
1003
1004 * w32.c (max_filename_mbslen): New function.
1005 (normalize_filename, readdir): Use it to detect locales where ANSI
1006 encoding of file names uses a double-byte character set (DBCS).
1007 If a DBCS encoding is used, advance by characters using
1008 CharNextExA, instead of incrementing a 'char *' pointer.
1009 Use _mbslwr instead of _strlwr. (Bug#13515)
1010
1011 * w32heap.c (allocate_heap) [!_WIN64]: Decrease the initial
1012 request of memory reservation to 1.7GB. (Bug#13065)
1013
10142013-01-25 Andreas Schwab <schwab@linux-m68k.org>
1015
1016 * coding.c (detect_coding_iso_2022): Move back mis-reordered code
1017 at check_extra_latin label. (Bug#13505)
1018
10192013-01-24 Dmitry Antipov <dmantipov@yandex.ru>
1020
1021 * nsfont.m (ns_escape_name, ns_unescape_name, ns_registry_to_script):
1022 Avoid redundant calls to strlen.
1023
10242013-01-24 Dmitry Antipov <dmantipov@yandex.ru>
1025
1026 Drop async_visible and async_iconified fields of struct frame.
1027 This is possible because async input is gone; for details, see
1028 http://lists.gnu.org/archive/html/emacs-devel/2012-12/msg00734.html.
1029 * frame.h (struct frame): Remove async_visible and async_iconified
1030 members, convert garbaged to unsigned bitfield. Adjust comments.
1031 (FRAME_SAMPLE_VISIBILITY): Remove. Adjust all users.
1032 (SET_FRAME_VISIBLE, SET_FRAME_ICONIFIED): New macros.
1033 * frame.c, gtkutil.c, term.c, w32fns.c, window.c, xdisp.c:
1034 Consistently use SET_FRAME_VISIBLE, SET_FRAME_ICONIFIED,
1035 FRAME_VISIBLE_P and FRAME_ICONIFIED_P macros where appropriate.
1036 * w32term.c: Ditto.
1037 (w32_read_socket): Save iconified state to generate DEICONIFY_EVENT
1038 properly. Likewise for obscured.
1039 * xterm.c: Ditto.
1040 (handle_one_xevent): Save visible state to generate ICONIFY_EVENT
1041 properly.
1042 * nsterm.m: Ditto.
1043 (windowDidDeminiaturize): Generate DEICONIFY_EVENT.
1044
10452013-01-24 Dmitry Antipov <dmantipov@yandex.ru>
1046
1047 * insdel.c (prepare_to_modify_buffer): Revert last change as suggested
1048 in http://lists.gnu.org/archive/html/emacs-devel/2013-01/msg00555.html.
1049
10502013-01-23 Stefan Monnier <monnier@iro.umontreal.ca>
1051
1052 * xdisp.c (message2, message2_nolog): Remove functions.
1053 (message3, message3_nolog): Extract nbytes and multibyteness directly
1054 from the string. Change all callers.
1055 (message3_nolog): Don't set message_enable_multibyte since set_message
1056 will reset it anyway.
1057 (message1, message1_nolog): Use message3.
1058 (vmessage): Use a stack allocated buffer rather than f->message_buf.
1059 (with_echo_area_buffer): Remove last two arguments. Update all callers.
1060 (set_message): Drop all but the second arg, which has to be a string.
1061 (set_message_1): Simplify now that we know that a1 is NULL and the
1062 second arg is a string.
1063 * frame.h (struct frame): Remove `message_buf' field.
1064 Use glyphs_initialized_p instead.
1065 (FRAME_MESSAGE_BUF): Remove macro.
1066 * w16select.c (Fw16_set_clipboard_data): Prefer message3 to message2.
1067 * lisp.h (message2, message2_nolog): Remove declarations.
1068 (message3, message3_nolog): Update declarations.
1069 * keyboard.c (read_char_minibuf_menu_text)
1070 (read_char_minibuf_menu_width): Remove vars.
1071 (read_char_minibuf_menu_prompt): Rewrite the menu's construction so as
1072 to correctly handle multibyte strings.
1073 * frame.c (delete_frame): Don't free message_buf any more.
1074 * editfns.c (message_text, message_length): Remove vars.
1075 (Fmessage_box): Don't copy the Lisp string's bytes any longer.
1076 * fileio.c (auto_save_error): Use message3 instead of message2.
1077 * dispnew.c (adjust_frame_message_buffer): Remove function.
1078
10792013-01-23 Eli Zaretskii <eliz@gnu.org>
1080
1081 * w32term.c (w32fullscreen_hook): Account correctly for the screen
1082 real estate used for the tool bar and the menu bar.
1083
10842013-01-23 Dmitry Antipov <dmantipov@yandex.ru>
1085
1086 * insdel.c (prepare_to_modify_buffer): Force redisplay if
1087 hidden buffer is prepared to modification (Bug#13164).
1088
10892013-01-22 Dmitry Antipov <dmantipov@yandex.ru>
1090
1091 * window.h (struct window): Change window_end_valid member from
1092 Lisp_Object to a bitfield. Adjust comments.
1093 (wset_window_end_valid): Remove.
1094 * window.c (adjust_window_count): Clear window_end_valid.
1095 (Fwindow_end): Adjust user. Remove ancient #if 0 code.
1096 (Fwindow_line_height, set_window_buffer, Frecenter)
1097 (Fsplit_window_internal, Fdelete_other_windows_internal)
1098 (Fset_window_fringes, Fset_window_scroll_bars): Adjust users.
1099 * dispnew.c (adjust_glyph_matrix, clear_window_matrices): Likewise.
1100 * xdisp.c (check_window_end, reconsider_clip_changes)
1101 (redisplay_internal, mark_window_display_accurate_1, redisplay_window)
1102 (try_window, try_window_reusing_current_matrix, note_mouse_highlight)
1103 (find_first_unchanged_at_end_row, try_window_id): Likewise.
1104
11052013-01-22 Dmitry Antipov <dmantipov@yandex.ru>
1106
1107 * xdisp.c (mark_window_display_accurate): Simplify the loop
1108 assuming that the only one of vchild, hchild or buffer window
1109 slots is non-nil. Call mark_window_display_accurate_1 for
1110 the leaf windows only.
1111 (mark_window_display_accurate_1): Always assume leaf window.
1112 Adjust comment.
1113
11142013-01-22 Paul Eggert <eggert@cs.ucla.edu>
1115
1116 * emacs.c (Qkill_emacs_hook): Now static.
1117
1118 * fileio.c (Finsert_file_contents): Simplify.
1119 Remove unnecessary assignments and tests.
1120
11212013-01-21 Eli Zaretskii <eliz@gnu.org>
1122
1123 * w32.c (acl_set_file): Don't test for errors unless
1124 set_file_security returns FALSE. Avoids spurious errors when
1125 saving files.
1126
11272013-01-21 Dmitry Antipov <dmantipov@yandex.ru>
1128
1129 * fileio.c (Finsert_file_contents): Revert code introduced at
1130 2013-01-18 in favor of the simpler and generally better fix.
1131 Save stack space by removing 'buffer' and reusing 'read_buf'
1132 where appropriate.
1133
11342013-01-19 Paul Eggert <eggert@cs.ucla.edu>
1135
1136 * lisp.h (eabs): Define unconditionally (Bug#13419).
1137 The old "#if !defined (eabs)" was an unnecessary revenant of back
1138 when this macro was called "abs". Document 'eabs' better.
1139
11402013-01-19 Glenn Morris <rgm@gnu.org>
1141
1142 * fns.c (Frandom): Doc fix.
1143
11442013-01-19 Eli Zaretskii <eliz@gnu.org>
1145
1146 * editfns.c (get_pos_property): Use SAFE_ALLOCA_LISP, to avoid
1147 segfault when there are lots of overlays.
1148
1149 * buffer.c (sort_overlays): Use SAFE_NALLOCA, to avoid segfault
1150 when there are lots of overlays.
1151 See http://lists.gnu.org/archive/html/emacs-devel/2013-01/msg00421.html
1152 for the details and a way to reproduce.
1153
11542013-01-19 Paul Eggert <eggert@cs.ucla.edu>
1155
1156 * fileio.c: Use O_APPEND to append.
1157 This corresponds better to the natural interpretation of "append",
1158 and avoids the need to open the output file twice, or to invoke
1159 lseek when APPEND is neither nil nor a number.
1160 This relies on POSIX 1003.1-1988 or later, which is OK nowadays.
1161 (Fwrite_region): Simplify. Use O_APPEND instead of opening the
1162 file possibly twice, and lseeking to its end; this avoids the
1163 need to lseek on non-regular files. Do not use O_EXCL and O_TRUNC
1164 at the same time: the combination is never needed and apparently
1165 it doesn't work with DOS_NT.
1166
1167 Fix size bug on DOS_NT introduced by CIFS workaround (Bug#13149).
1168 * fileio.c (Fwrite_region): Use O_BINARY in checking code, too.
1169
1170 Allow floating-point file offsets.
1171 Problem reported by Vitalie Spinu in
1172 <http://lists.gnu.org/archive/html/emacs-devel/2013-01/msg00411.html>.
1173 * fileio.c (emacs_lseek): Remove.
1174 (file_offset): New function.
1175 (Finsert_file_contents, Fwrite_region): Use it.
1176
11772013-01-19 Chong Yidong <cyd@gnu.org>
1178
1179 * emacs.c (Fkill_emacs): Set waiting_for_input to 0 to avoid
1180 aborting on Fsignal (Bug#13289).
1181
11822013-01-19 Eli Zaretskii <eliz@gnu.org>
1183
1184 * w32.c (acl_set_file): Treat ERROR_ACCESS_DENIED from
1185 set_file_security as failure due to insufficient privileges.
1186 Reported by Fabrice Popineau <fabrice.popineau@supelec.fr>.
1187 (fstat): Return owner and group like 'stat' and 'lstat' do.
1188
11892013-01-19 Paul Eggert <eggert@cs.ucla.edu>
1190
1191 Work around bug in CIFS and vboxsf file systems (Bug#13149).
1192 The bug was observed on Ubuntu operating inside a virtual machine,
1193 editing files mounted via CIFS or vboxsf from the MS Windows 7 host.
1194 The workaround introduces a race condition on non-buggy hosts,
1195 but it's an unlikely race and anyway there's a nearly identical
1196 nearby race that can't be fixed.
1197 * fileio.c (valid_timestamp_file_system, timestamp_file_system):
1198 New static vars.
1199 (Fwrite_region): Test for file system time stamp bug.
1200 (init_fileio): New function.
1201 * lisp.h (init_fileio): Declare it.
1202 * emacs.c (main): Call it.
1203
1204 * fileio.c (Finsert_file_contents): Simplify new diagnostic
1205 and make it more consistent with other stat-failure diagnostics.
1206
12072013-01-18 Dmitry Antipov <dmantipov@yandex.ru>
1208
1209 Fix crash when inserting data from non-regular files.
1210 See http://lists.gnu.org/archive/html/emacs-devel/2013-01/msg00406.html
1211 for the error description produced by valgrind.
1212 * fileio.c (read_non_regular): Rename to read_contents.
1213 Free Lisp_Save_Value object used to pass parameters.
1214 (read_non_regular_quit): Rename to read_contents_quit.
1215 (Finsert_file_contents): Redesign internal file reading loop to adjust
1216 gap and end positions after each read and so help make_gap to work
1217 properly. Do not signal an I/O error too early and so do not leave
1218 not yet decoded characters in a buffer, which was the reason of
1219 redisplay crash. Use list2 to build return value. Adjust comments.
1220
12212013-01-17 Paul Eggert <eggert@cs.ucla.edu>
1222
1223 Close a race when statting and reading files (Bug#13149).
1224 * fileio.c (Finsert_file_contents): Use open+fstat, not stat+open.
1225 This avoids a race if the file is renamed between stat and open.
1226 This race is not the problem originally noted in Bug#13149;
1227 see <http://bugs.gnu.org/13149#73> and later messages in the thread.
1228
12292013-01-17 Dmitry Antipov <dmantipov@yandex.ru>
1230
1231 * lisp.h (toplevel): Add comment about using Lisp_Save_Value
1232 objects, related functions and macros.
1233 (make_save_value): Adjust prototype.
1234 (make_save_pointer): New prototype.
1235 (SAFE_NALLOCA): Fix indentation. Use make_save_pointer.
1236 (SAFE_ALLOCA_LISP): Adjust make_save_value usage.
1237 * alloc.c (format_save_value): Rename to make_save_value.
1238 (make_save_pointer): New function.
1239 (record_xmalloc): Use make_save_pointer.
1240 * dired.c, editfns.c, fileio.c, font.c, gtkutil.c, lread.c:
1241 * nsmenu.m, nsterm.m, xfns.c, xmenu.c, xselect.c, keymap.c:
1242 Change users of make_save_value to make_save_pointer.
1243 Likewise for format_save_value and make_save_value.
1244
12452013-01-17 Dmitry Antipov <dmantipov@yandex.ru>
1246
1247 * buffer.h (NARROWED, BUF_NARROWED): Drop unused macros.
1248 (DECODE_POSITION, BUFFER_CHECK_INDIRECTION): Fix indentation.
1249 * buffer.c (toplevel, syms_of_buffer): Drop old commented-out
1250 debugging stubs.
1251
12013-01-15 Paul Eggert <eggert@cs.ucla.edu> 12522013-01-15 Paul Eggert <eggert@cs.ucla.edu>
2 1253
3 * alloc.c (free_save_value): Now static. 1254 * alloc.c (free_save_value): Now static.
@@ -8,8 +1259,8 @@
8 (map_keymap_char_table_item): Adjust accordingly. 1259 (map_keymap_char_table_item): Adjust accordingly.
9 * fileio.c (non_regular_fd, non_regular_inserted) 1260 * fileio.c (non_regular_fd, non_regular_inserted)
10 (non_regular_nbytes): Remove. 1261 (non_regular_nbytes): Remove.
11 (Finsert_file_contents): Convert trytry to ptrdiff_t. Use 1262 (Finsert_file_contents): Convert trytry to ptrdiff_t.
12 format_save_value to pass parameters to read_non_regular. 1263 Use format_save_value to pass parameters to read_non_regular.
13 (read_non_regular): Use XSAVE_ macros to extract parameters. 1264 (read_non_regular): Use XSAVE_ macros to extract parameters.
14 Adjust comment. 1265 Adjust comment.
15 * xmenu.c (xmenu_show) [!USE_X_TOOLKIT && !USE_GTK]: Use 1266 * xmenu.c (xmenu_show) [!USE_X_TOOLKIT && !USE_GTK]: Use
@@ -136,8 +1387,8 @@
136 1387
1372013-01-11 Aaron S. Hawley <Aaron.Hawley@vtinfo.com> 13882013-01-11 Aaron S. Hawley <Aaron.Hawley@vtinfo.com>
138 1389
139 * insdel.c (Fcombine_after_change_execute, syms_of_insdel): Fix 1390 * insdel.c (Fcombine_after_change_execute, syms_of_insdel):
140 ambiguous doc string cross-reference(s). 1391 Fix ambiguous doc string cross-reference(s).
141 1392
142 * keyboard.c (Fcommand_execute, syms_of_keyboard): Fix ambiguous 1393 * keyboard.c (Fcommand_execute, syms_of_keyboard): Fix ambiguous
143 doc string cross-reference(s). 1394 doc string cross-reference(s).