aboutsummaryrefslogtreecommitdiffstats
path: root/src/ChangeLog
diff options
context:
space:
mode:
authorBill Wohler2013-02-18 10:11:43 -0800
committerBill Wohler2013-02-18 10:11:43 -0800
commit21733e4f154f8830fa568a347a0d6dbd59793c2b (patch)
tree3170dbbcdfafeb42f6c381d6b80b251e9f31b788 /src/ChangeLog
parent6d14beddb06b5ae86f9dd770a1661ebd24846f28 (diff)
parent587feed443522f738b65b57b22a31cc8a25525c5 (diff)
downloademacs-21733e4f154f8830fa568a347a0d6dbd59793c2b.tar.gz
emacs-21733e4f154f8830fa568a347a0d6dbd59793c2b.zip
Merge from trunk; up to 2013-02-18T01:30:27Z!monnier@iro.umontreal.ca.
Diffstat (limited to 'src/ChangeLog')
-rw-r--r--src/ChangeLog1766
1 files changed, 1756 insertions, 10 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 222be9575b8..e945e221593 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,1749 @@
12013-02-17 Eli Zaretskii <eliz@gnu.org>
2
3 * xdisp.c (x_draw_vertical_border): For a window that is neither
4 the leftmost nor the rightmost, redraw both the left and the right
5 vertical borders. (Bug#13723)
6
72013-02-17 Stefan Monnier <monnier@iro.umontreal.ca>
8
9 * xml.c (init_libxml2_functions):
10 * sound.c (sound_warning):
11 * sheap.c (report_sheap_usage):
12 * process.c (wait_reading_process_output):
13 * msdos.c (XMenuActivate):
14 * macros.c (Fstart_kbd_macro, Fend_kbd_macro):
15 * keyboard.c (top_level_1):
16 * editfns.c (Fmessage, Fmessage_box):
17 * callint.c (Fcall_interactively):
18 * fns.c (Fyes_or_no_p): Prefer `message1' over `message'.
19
202013-02-17 Jan Djärv <jan.h.d@swipnet.se>
21
22 * xterm.c (syms_of_xterm): Move scroll-bar-adjust-thumb-portion ...
23 * frame.c (syms_of_frame): ... to here.
24
252013-02-16 Eli Zaretskii <eliz@gnu.org>
26
27 * w32.c (sys_chown): Remove unused function.
28
29 * w32term.c <input_signal_count>: Declare 'volatile'
30 unconditionally. (Bug#9066)
31
32 * w32.c (set_errno): Reset h_errno and don't set it to any other
33 value. Set errno instead.
34 (check_errno): Reset h_errno.
35 (sys_socket, socket_to_fd, sys_bind, sys_connect)
36 (sys_gethostname, sys_getservbyname, sys_getpeername)
37 (sys_shutdown, sys_setsockopt, sys_listen, sys_getsockname)
38 (sys_accept, sys_recvfrom, sys_sendto, fcntl, sys_read): Don't set
39 h_errno.
40 (sys_gethostbyname): Set h_errno only errors detected.
41
422013-02-15 Paul Eggert <eggert@cs.ucla.edu>
43
44 * process.c (h_errno) [!HAVE_H_ERRNO]: Remove unused decl.
45
462013-02-15 Eli Zaretskii <eliz@gnu.org>
47
48 * keyboard.c (read_char): Fix calculation of auto-save time out
49 when auto-save-timeout is less than 4. (Bug#13720)
50
51 * w32proc.c (new_child): Free up to 2 slots of dead processes at a
52 time. Improve diagnostics in DebPrint. (Bug#13546)
53
54 * w32.c (sys_socket, sys_bind, sys_connect, sys_gethostname)
55 (sys_gethostbyname, sys_getservbyname, sys_getpeername)
56 (sys_shutdown, sys_setsockopt, sys_listen, sys_getsockname)
57 (sys_accept, sys_recvfrom, sys_sendto, fcntl): In case of failure,
58 make sure errno is set to an appropriate value. (Bug#13546)
59 (socket_to_fd): Add assertion against indexing fd_info[] with a
60 value that is out of bounds.
61 (sys_accept): If fd is negative, do not set up the child_process
62 structure for reading.
63
642013-02-15 Dmitry Antipov <dmantipov@yandex.ru>
65
66 * composite.c (fill_gstring_header): Remove useless prototype.
67 Break long line.
68 * lisp.h (message_dolog, compile_pattern): Adjust prototype.
69 * print.c (PRINTDECLARE, print_object):
70 * search.c (compile_pattern, fast_looking_at, search_buffer):
71 (simple_search, boyer_moore, Freplace_match):
72 * xdisp.c (c_string_pos, number_of_chars, message_dolog):
73 (get_overlay_arrow_glyph_row, display_mode_element):
74 (decode_mode_spec_coding, message3):
75 * xfaces.c (face_at_string_position): Use bool for booleans.
76 Adjust comments.
77
782013-02-15 Paul Eggert <eggert@cs.ucla.edu>
79
80 Fix AIX port (Bug#13650).
81 * lisp.h (XPNTR) [!USE_LSB_TAG && DATA_SEG_BITS]:
82 Fix bug introduced in 2012-07-27 change. DATA_SEG_BITS, if set,
83 was #undeffed earlier, so it cannot be used as a macro here.
84 Use the constant and not the macro.
85
862013-02-15 Eli Zaretskii <eliz@gnu.org>
87
88 * w32proc.c (new_child): If no vacant slots are found in
89 child_procs[], make another pass looking for slots whose process
90 has exited or died. (Bug#13546)
91
92 * w32.c (sys_pipe): When failing due to file descriptors above
93 MAXDESC, set errno to EMFILE.
94 (_sys_read_ahead): Update cp->status when failing to read serial
95 communications input, so that the status doesn't stay at
96 STATUS_READ_IN_PROGRESS. (Bug#13546)
97
982013-02-14 Jan Djärv <jan.h.d@swipnet.se>
99
100 * gtkutil.c (tb_size_cb): New function.
101 (xg_create_tool_bar): Connect size-allocate to tb_size_cb (Bug#13512).
102
1032013-02-14 Stefan Monnier <monnier@iro.umontreal.ca>
104
105 * keyboard.c (active_maps): Fcurrent_active_maps expects a position, not
106 an event.
107
1082013-02-13 Stefan Monnier <monnier@iro.umontreal.ca>
109
110 * keyboard.c (syms_of_keyboard): Further tweaks of docstring.
111
1122013-02-13 Dmitry Antipov <dmantipov@yandex.ru>
113
114 * font.c (font_range): Add pos_byte argument. Adjust comment
115 and break long line.
116 * font.h (font_range): Adjust prototype.
117 * composite.c (autocmp_chars): Pass byte position to font_range.
118 Break long line. Remove useless prototype and format comment.
119
1202013-02-13 Glenn Morris <rgm@gnu.org>
121
122 * keyboard.c (input-decode-map, key-translation-map): Doc fixes.
123
1242013-02-13 Paul Eggert <eggert@cs.ucla.edu>
125
126 Improve AIX port some more (Bug#13650).
127 With this, it should be as good as it was in 23.3, though it's
128 still pretty bad: the dumped emacs does not run. See Mark Fleishman in
129 http://lists.gnu.org/archive/html/help-gnu-emacs/2011-04/msg00287.html
130 * unexaix.c (start_of_text): Remove.
131 (_data, _text): Declare as char[], not int, as AIX manual suggests.
132 (bias, lnnoptr, text_scnptr, data_scnptr, load_scnptr)
133 (orig_load_scnptr, orig_data_scnptr):
134 Now off_t, not long, since they are file offsets.
135 (make_hdr): Use _data, not start_of_data ().
136 This is the key part of the fix.
137 (make_hdr, unrelocate_symbols): Use off_t for file offsets.
138 (unrelocate_symbols): Cast pointers to intptr_t, not to ulong.
139
140 * pre-crt0.c (data_start): Initialize to 1.
141 This ports to compilers that optimize the external declaration
142 'int x = 0;' as if it were 'int x;' to shrink the executable.
143
144 Improve AIX port (Bug#13650).
145 This doesn't fix the bug, but it makes progress: Emacs builds now.
146 * unexaix.c: Include inttypes.h, stdarg.h.
147 (report_error, report_error_1): Mark as _Noreturn.
148 (report_error): Don't report the wrong errno.
149 (report_error_1): Now varargs. All callers changed.
150 (make_hdr): Use uintptr_t, not unsigned, when converting pointers
151 to unsigned. Don't use ADDR_CORRECT, as it no longer exists.
152 (write_ptr): Use %p to print address rather than %lx and a cast
153 to unsigned long. Grow buffer a bit, to be safer.
154
1552013-02-13 Eli Zaretskii <eliz@gnu.org>
156
157 * bidi.c (bidi_resolve_neutral): After finding the next
158 non-neutral character, accept NEUTRAL_ON type as well, because
159 directional control characters, such as LRE and RLE, have their
160 type converted to that by bidi_resolve_weak. This avoids aborts
161 when LRE/RLE follows a run of neutrals.
162 (bidi_move_to_visually_next): Assert that return value of
163 bidi_peek_at_next_level is non-negative. Negative values will
164 cause an infloop.
165
1662013-02-13 Paul Eggert <eggert@cs.ucla.edu>
167
168 Minor getenv-related fixes.
169 * callproc.c (Fcall_process_region) [!DOS_NT]:
170 Avoid unnecessary duplicate call to getenv.
171 * callproc.c (init_callproc):
172 * dispnew.c (init_display):
173 * sysdep.c (sys_subshell):
174 Omit unnecessary cast of getenv or egetenv.
175
1762013-02-13 Juanma Barranquero <lekktu@gmail.com>
177
178 * makefile.w32-in ($(BLD)/filelock.$(O), $(BLD)/sysdep.$(O)):
179 Update dependencies.
180
1812013-02-12 Eli Zaretskii <eliz@gnu.org>
182
183 * xdisp.c (redisplay_internal): Don't set w->region_showing to the
184 marker's position.
185 (display_line): Set w->region_showing to the value of
186 it->region_beg_charpos, not to -1. This fixes redisplay
187 optimization when cursor is moved up after M->. (Bug#13623)
188 (Bug#13626)
189 (try_scrolling): Scroll text up more if point is too close to ZV
190 and inside the scroll margin. This makes sure point is moved
191 outside the scroll margin in these cases.
192
193 * window.h (struct window): region_showing can no longer be
194 negative.
195
1962013-02-11 Paul Eggert <eggert@cs.ucla.edu>
197
198 Tune by using memchr and memrchr.
199 * doc.c (Fsnarf_documentation):
200 * fileio.c (Fsubstitute_in_file_name):
201 * search.c (find_newline, scan_newline):
202 * xdisp.c (pos_visible_p, display_count_lines):
203 Use memchr and memrchr rather than scanning byte-by-byte.
204 * search.c (find_newline): Rename from scan_buffer.
205 Omit first arg TARGET, as it's always '\n'. All callers changed.
206
207 Clean up read_key_sequence a tiny bit more.
208 * keyboard.c (read_char_x_menu_prompt) [HAVE_MENUS]:
209 (read_key_sequence): Remove unused locals.
210
2112013-02-11 Stefan Monnier <monnier@iro.umontreal.ca>
212
213 Clean up read_key_sequence a bit; reread active keymaps after first event.
214 * keyboard.c (read_char, read_char_x_menu_prompt)
215 (read_char_minibuf_menu_prompt):
216 Replace nmaps+maps with a single `map' arg.
217 (follow_key): Operate on a single map.
218 (active_maps): New function.
219 (test_undefined): Also return true for nil bindings.
220 (read_key_sequence): Use active_maps to replace the arrays of keymaps with
221 a single (composed) keymap. Remember `first_event' to choose the right
222 set of active keymaps. Recompute the set of keymaps after receiving
223 the first event. Remove GOBBLE_FIRST_EVENT.
224 (syms_of_keyboard): Remove inhibit_local_menu_bar_menus.
225 * keyboard.h (read_char): Update declaration.
226 * lread.c (read_filtered_event): Adjust call to read_char.
227
2282013-02-11 Eli Zaretskii <eliz@gnu.org>
229
230 * xdisp.c (move_it_vertically_backward, move_it_by_lines):
231 Don't use the limitation on backwards movement when lines are truncated
232 in the window. (Bug#13675)
233
2342013-02-11 Dmitry Antipov <dmantipov@yandex.ru>
235
236 * marker.c (set_marker_internal): If desired position is passed
237 as a marker, avoid call to buf_charpos_to_bytepos.
238 * window.c (Fset_window_point): Omit redundant type checking.
239 (Fset_window_start): Likewise. Format comment.
240 (window_scroll_pixel_based): Use set_marker_restricted_both
241 with character and byte positions obtained from an iterator.
242 (Fset_window_configuration): Use set_marker_restricted_both.
243 * xdisp.c (message_dolog): Likewise.
244
2452013-02-10 Eli Zaretskii <eliz@gnu.org>
246
247 * xdisp.c (move_it_vertically_backward, move_it_by_lines):
248 When text lines are longer than window's screen lines, don't move back
249 too far. This speeds up some redisplay operations. (Bug#13675)
250
2512013-02-10 Dmitry Antipov <dmantipov@yandex.ru>
252
253 * syntax.c (scan_sexps_forward): Fix byte position calculation
254 Bug#13664 (a.k.a Bug#13667) introduced with 2013-02-08 change.
255
2562013-02-10 Paul Eggert <eggert@cs.ucla.edu>
257
258 * fileio.c (Fexpand_file_name): Omit confusing pointer comparison
259 that was not needed.
260
2612013-02-09 Paul Eggert <eggert@cs.ucla.edu>
262
263 Minor hashing refactoring.
264 * fns.c (SXHASH_REDUCE): Move to lisp.h.
265 (sxhash_float): Return EMACS_UINT, for consistency with the other
266 hash functions.
267 * lisp.h (INTMASK): Now a macro, since SXHASH_REDUCE is now a
268 non-static inline function and therefore can't use static vars.
269 (SXHASH_REDUCE): Move here from fns.c, and make it inline.
270 * profiler.c (hashfn_profiler): Use SXHASH_REDUCE, to be consistent
271 with the other hash functions.
272
2732013-02-09 Eli Zaretskii <eliz@gnu.org>
274
275 * callproc.c (Fcall_process_region) [WINDOWSNT]: Make sure the
276 XXXXXX part of the temporary file pattern is not downcased even
277 when w32-downcase-file-names is non-nil. (Bug#13661)
278
279 * xdisp.c (decode_mode_spec): Remove handling of %t.
280
281 * msdos.c (careadlinkatcwd): Remove.
282
2832013-02-08 Stefan Monnier <monnier@iro.umontreal.ca>
284
285 * lread.c (skip_dyn_bytes): New function (bug#12598).
286 (read1): Use it. Use getc instead of READCHAR to read bytes.
287 (load_each_byte): Remove. Update users.
288
2892013-02-08 Dmitry Antipov <dmantipov@yandex.ru>
290
291 * search.c (scan_buffer): Calculate end byte position just once.
292 (scan_newline): Do not recalculate start_byte.
293 (search_command): Use eassert.
294 * syntax.c (struct lisp_parse_state): New member location_byte.
295 (scan_sexps_forward): Record from_byte and avoid redundant
296 character to byte position calculation ...
297 (Fparse_partial_sexp): ... here. Break too long line.
298
2992013-02-08 Dmitry Antipov <dmantipov@yandex.ru>
300
301 * lisp.h (make_uninit_vector): New function.
302 * alloc.c (Fvector, Fmake_byte_code):
303 * ccl.c (Fregister_ccl_program):
304 * charset.c (Fdefine_charset_internal, define_charset_internal):
305 * coding.c (make_subsidiaries, Fdefine_coding_system_internal):
306 * composite.c (syms_of_composite):
307 * font.c (Fquery_font, Ffont_info, syms_of_font):
308 * fontset.c (FONT_DEF_NEW, Fset_fontset_font):
309 * ftfont.c (ftfont_shape_by_flt):
310 * indent.c (recompute_width_table):
311 * nsselect.m (clean_local_selection_data):
312 * syntax.c (init_syntax_once):
313 * w32unsubscribe.c (uniscribe_shape):
314 * window.c (Fcurrent_window_configuration):
315 * xfaces.c (Fx_family_fonts):
316 * xselect.c (selection_data_to_lisp_data): Use it.
317
3182013-02-07 Dmitry Antipov <dmantipov@yandex.ru>
319
320 * coding.c (Fdefine_coding_system_internal): Use AREF where
321 argument is known to be a vector.
322 * fns.c (Flocale_info): Likewise for ASET.
323 * xselect.c (selection_data_to_lisp_data): Likewise for ASET.
324 * w32fns.c (w32_parse_hot_key): Likewise for ASIZE and AREF.
325
3262013-02-05 Jan Djärv <jan.h.d@swipnet.se>
327
328 * nsmenu.m (update_frame_tool_bar): Check for negative tool bar
329 height.
330
331 * nsterm.h (HAVE_NATIVE_FS): Define if OSX => 10.7.
332 (EmacsView): Add fs_is_native, fsIsNative, isFullscreen and
333 updateCollectionBehaviour.
334
335 * nsterm.m (NEW_STYLE_FS): Remove.
336 (ns_last_use_native_fullscreen): New variable.
337 (x_make_frame_visible): Replace NEW_STYLE_FS with isFullscreen.
338 (x_set_window_size): Do not take title bar and tool bar into account
339 if isFullscreen returns YES.
340 (ns_fullscreen_hook): Replace NEW_STYLE_FS with isFullscreen.
341 (check_native_fs): New function.
342 (ns_select, ns_read_socket): Call check_native_fs if HAVE_NATIVE_FS.
343 (ns_term_init): Remove NEW_STYLE_FS.
344 (updateFrameSize:, windowWillResize:toSize:): Only adjust for title bar
345 and tool bar if isFullscreen returns NO.
346 (windowDidResize:): Replace NEW_STYLE_FS with fsIsNative.
347 (initFrameFromEmacs:): Initialize fs_is_native. Replace NEW_STYLE_FS
348 with HAVE_NATIVE_FS.
349 (window:willUseFullScreenPresentationOptions:): New method.
350 (windowDidEnterFullScreen:): Replace NEW_STYLE_FS with fsIsNative.
351 Hide toolbar if not enabled (Bug#13444).
352 (windowDidExitFullScreen:): Call updateCollectionBehaviour.
353 Restore tool bar if enabled, hide it otherwise (Bug#13444).
354 (fsIsNative, isFullscreen, updateCollectionBehaviour): New methods.
355 (toggleFullScreen:): If fs_is_native, call toggleFullScreen on
356 window. Do no set FRAME_EXTERNAL_TOOL_BAR (f) to 0.
357 Check FRAME_EXTERNAL_TOOL_BAR (f) before restoring
358 FRAME_TOOLBAR_HEIGHT (f). Call updateFrameSize when going non-fs.
359 (syms_of_nsterm): Add ns-use-native-fullscreen.
360
3612013-02-04 Paul Eggert <eggert@cs.ucla.edu>
362
363 * fileio.c (Qchoose_write_coding_system): Now static.
364
3652013-02-04 Eli Zaretskii <eliz@gnu.org>
366
367 * xdisp.c (window_buffer_changed): region_showing can be negative,
368 which still means region is being displayed.
369 (redisplay_internal): Resurrect code that forced redisplay of the
370 whole window when showing region and the mark has changed.
371 Record the new mark position to allow redisplay optimizations.
372 (display_line): If it->region_beg_charpos is non-zero, set the
373 window's region_showing member to -1. (Bug#13623) (Bug#13626)
374
375 * window.h (struct window) <region_showing>: Declare ptrdiff_t,
376 not bitfield of 1 bit.
377
3782013-02-03 Daniel Colascione <dancol@dancol.org>
379
380 * emacs.c: Use execvp, not execv, when DAEMON_MUST_EXEC, so that
381 daemon mode works on cygw32 when Emacs is installed and not just
382 during development.
383
3842013-02-02 Paul Eggert <eggert@cs.ucla.edu>
385
386 Avoid file time stamp bug on MS-Windows (Bug#13149).
387 * fileio.c (Fwrite_region): Don't use the heuristic on empty files,
388 as FAT32 doesn't update time stamps when truncating them.
389 Also, check that a file time stamp is not a multiple of 100 ns;
390 this should catch all instances of the problem on MS-Windows,
391 as its native file system resolution is 100 ns or worse, and
392 checking for a non-multiple of 100 ns should impose only a small
393 overhead on systems with ns resolution.
394
3952013-02-02 Eli Zaretskii <eliz@gnu.org>
396
397 Avoid encoding file names on MS-Windows when they need to be run
398 through dostounix_filename.
399 * w32.c (normalize_filename): Accept an additional argument
400 MULTIBYTE; if non-zero, traverse the file name by bytes and don't
401 downcase it even if w32-downcase-file-names is non-nil.
402 (dostounix_filename): Accept an additional argument MULTIBYTE and
403 pass it to normalize_filename.
404 (emacs_root_dir): Adjust.
405
406 * msdos.h (dostounix_filename): Adjust prototype.
407
408 * w32.h (dostounix_filename): Adjust prototype.
409
410 * msdos.c (dostounix_filename): Accept an additional argument and
411 ignore it.
412 (init_environment): Adjust callers of dostounix_filename.
413
414 * fileio.c (Ffile_name_directory, file_name_as_directory)
415 (directory_file_name, Fexpand_file_name)
416 (Fsubstitute_in_file_name): [DOS_NT] Adjust call to
417 dostounix_filename.
418 [WINDOWSNT]: Downcase file names if w32-downcase-file-names is
419 non-nil.
420 (Fsubstitute_in_file_name): [DOS_NT] Don't downcase environment
421 variables, as egetenv is case-insensitive for DOS_NT.
422
423 * dired.c (file_name_completion): Don't call Fdirectory_file_name
424 with an encoded file name.
425
426 * w32proc.c (Fw32_short_file_name, Fw32_long_file_name):
427 Adjust calls to dostounix_filename.
428
429 * w32fns.c (Fx_file_dialog): Adjust call to dostounix_filename.
430
431 * unexw32.c (unexec): Adjust call to dostounix_filename.
432
433 * termcap.c (tgetent) [MSDOS]: Adjust call to dostounix_filename.
434
435 * emacs.c (decode_env_path) [DOS_NT]: Adjust call to
436 dostounix_filename.
437
438 * callproc.c (Fcall_process) [MSDOS]: Adjust call to
439 dostounix_filename.
440
441 * callproc.c (Fcall_process): Make sure program name in PATH and
442 new_argv[0] is encoded, if needed. Otherwise, un-encoded string
443 is passed to exec/spawnve, which fails unless the file-name
444 encoding is UTF-8.
445
446 * w32proc.c (sys_spawnve): Make sure escape_char is initialized,
447 even if w32-quote-process-args is nil.
448
4492013-02-01 Paul Eggert <eggert@cs.ucla.edu>
450
451 Fix timestamp bug when write-region appends nothing (Bug#13149).
452 * fileio.c (Fwrite_region): When neither O_EXCL nor O_TRUNC is used,
453 the file's time stamp doesn't change if Emacs happens to write nothing
454 to the file, and on a buggy file system this could cause Emacs to
455 incorrectly infer that the file system doesn't have the bug.
456 Avoid this problem by inhibiting the inference in this case.
457
4582013-02-01 Dmitry Antipov <dmantipov@yandex.ru>
459
460 * window.h (struct window): Convert base_line_number, base_line_pos
461 and column_number_displayed members from Lisp_Object to ptrdiff_t.
462 Convert region_showing member from Lisp_Object to bitfield.
463 Remove sequence_number member. Adjust comments.
464 * window.c (sequence_number): Remove.
465 (make_window): Initialize column_number_displayed.
466 * print.c (print_object): Follow the printed representation of
467 frames and print window pointer to distinguish between windows.
468 (adjust_window_count): Invalidate base_line_pos. Adjust comment.
469 * xdisp.c (wset_base_line_number, wset_base_line_pos)
470 (wset_column_number_displayed, wset_region_showing): Remove.
471 (window_buffer_changed, mode_line_update_needed, redisplay_internal)
472 (try_scrolling, try_cursor_movement, redisplay_window)
473 (try_window_reusing_current_matrix, try_window_id, display_line)
474 (display_mode_lines, decode_mode_spec): Adjust users.
475 * .gdbinit (pwinx): Do not print sequence_number.
476
4772013-02-01 Paul Eggert <eggert@cs.ucla.edu>
478
479 Use fdopendir, fstatat and readlinkat, for efficiency (Bug#13539).
480 * conf_post.h (GNULIB_SUPPORT_ONLY_AT_FDCWD): Remove.
481 * dired.c: Include <fcntl.h>.
482 (open_directory): New function, which uses open and fdopendir
483 rather than opendir. DOS_NT platforms still use opendir, though.
484 (directory_files_internal, file_name_completion): Use it.
485 (file_attributes): New function, with most of the old Ffile_attributes.
486 (directory_files_internal, Ffile_attributes): Use it.
487 (file_attributes, file_name_completion_stat): First arg is now fd,
488 not dir name. All uses changed. Use fstatat rather than lstat +
489 stat.
490 (file_attributes): Use emacs_readlinkat rather than Ffile_symlink_p.
491 * fileio.c: Include <allocator.h>, <careadlinkat.h>.
492 (emacs_readlinkat): New function, with much of the old
493 Ffile_symlink_p, but with an fd argument for speed.
494 It uses readlinkat rather than careadlinkatcwd, so that it
495 need not assume the working directory.
496 (Ffile_symlink_p): Use it.
497 * filelock.c (current_lock_owner): Use emacs_readlinkat
498 rather than emacs_readlink.
499 * lisp.h (emacs_readlinkat): New decl.
500 (READLINK_BUFSIZE, emacs_readlink): Remove.
501 * sysdep.c: Do not include <allocator.h>, <careadlinkat.h>.
502 (emacs_norealloc_allocator, emacs_readlink): Remove.
503 This stuff is moved to fileio.c.
504 * w32.c (fstatat, readlinkat): New functions.
505 (careadlinkat): Don't check that fd == AT_FDCWD.
506 (careadlinkatcwd): Remove; no longer needed.
507
5082013-01-31 Glenn Morris <rgm@gnu.org>
509
510 * fileio.c (choose_write_coding_system): Make it callable from Lisp.
511 (Fwrite_region): Update for new choose_write_coding_system args.
512 Move the last piece of choose_write_coding_system here. (Bug#13522)
513 (syms_of_fileio): Add choose-write-coding-system.
514
5152013-01-30 Eli Zaretskii <eliz@gnu.org>
516
517 * w32.c (sys_open): Zero out the flags for the new file descriptor.
518 (sys_close): Zero out the flags for the file descriptor before
519 closing it. (Bug#13546)
520
521 * w32.c (parse_root, get_volume_info, readdir, read_unc_volume)
522 (logon_network_drive, stat_worker, symlink, chase_symlinks):
523 Use CharNextExA and CharPrevExA to iterate over file names encoded in
524 DBCS. (Bug#13553)
525
526 * w32.c (w32_get_long_filename, init_environment, readlink):
527 Support file names encoded in DBCS codepages.
528 (readlink): Use the current file-name-coding-system, not the ANSI
529 codepage, to decode and handle targets of symlinks.
530
5312013-01-28 Eli Zaretskii <eliz@gnu.org>
532
533 * w32.c (opendir): Now accepts a 'const char *'.
534
5352013-01-28 Dmitry Antipov <dmantipov@yandex.ru>
536
537 Remove obsolete redisplay code. See the discussion at
538 http://lists.gnu.org/archive/html/emacs-devel/2013-01/msg00576.html.
539 * dispnew.c (preemption_period, preemption_next_check): Remove.
540 (Vredisplay_preemption_period): Likewise.
541 (update_frame, update_single_window, update_window, update_frame_1):
542 Adjust users. Always assume that PERIODIC_PREEMPTION_CHECKING is not
543 used, following the 2012-06-22 change.
544
5452013-01-25 Eli Zaretskii <eliz@gnu.org>
546
547 * w32notify.c (Fw32notify_add_watch): Doc fix. (Bug#13540)
548
5492013-01-25 Dmitry Antipov <dmantipov@yandex.ru>
550
551 * font.c (num_fonts): Remove the leftover from old
552 debugging code. Adjust comment style here and there.
553 * insdel.c (insert_1): Remove.
554 * lisp.h (insert_1): Remove prototype.
555 * xdisp.c (message_dolog): Adjust users to call insert_1_both.
556
5572013-01-25 Eli Zaretskii <eliz@gnu.org>
558
559 * w32.c (max_filename_mbslen): New function.
560 (normalize_filename, readdir): Use it to detect locales where ANSI
561 encoding of file names uses a double-byte character set (DBCS).
562 If a DBCS encoding is used, advance by characters using
563 CharNextExA, instead of incrementing a 'char *' pointer.
564 Use _mbslwr instead of _strlwr. (Bug#13515)
565
566 * w32heap.c (allocate_heap) [!_WIN64]: Decrease the initial
567 request of memory reservation to 1.7GB. (Bug#13065)
568
5692013-01-25 Andreas Schwab <schwab@linux-m68k.org>
570
571 * coding.c (detect_coding_iso_2022): Move back mis-reordered code
572 at check_extra_latin label. (Bug#13505)
573
5742013-01-24 Dmitry Antipov <dmantipov@yandex.ru>
575
576 * nsfont.m (ns_escape_name, ns_unescape_name, ns_registry_to_script):
577 Avoid redundant calls to strlen.
578
5792013-01-24 Dmitry Antipov <dmantipov@yandex.ru>
580
581 Drop async_visible and async_iconified fields of struct frame.
582 This is possible because async input is gone; for details, see
583 http://lists.gnu.org/archive/html/emacs-devel/2012-12/msg00734.html.
584 * frame.h (struct frame): Remove async_visible and async_iconified
585 members, convert garbaged to unsigned bitfield. Adjust comments.
586 (FRAME_SAMPLE_VISIBILITY): Remove. Adjust all users.
587 (SET_FRAME_VISIBLE, SET_FRAME_ICONIFIED): New macros.
588 * frame.c, gtkutil.c, term.c, w32fns.c, window.c, xdisp.c:
589 Consistently use SET_FRAME_VISIBLE, SET_FRAME_ICONIFIED,
590 FRAME_VISIBLE_P and FRAME_ICONIFIED_P macros where appropriate.
591 * w32term.c: Ditto.
592 (w32_read_socket): Save iconified state to generate DEICONIFY_EVENT
593 properly. Likewise for obscured.
594 * xterm.c: Ditto.
595 (handle_one_xevent): Save visible state to generate ICONIFY_EVENT
596 properly.
597 * nsterm.m: Ditto.
598 (windowDidDeminiaturize): Generate DEICONIFY_EVENT.
599
6002013-01-24 Dmitry Antipov <dmantipov@yandex.ru>
601
602 * insdel.c (prepare_to_modify_buffer): Revert last change as suggested
603 in http://lists.gnu.org/archive/html/emacs-devel/2013-01/msg00555.html.
604
6052013-01-23 Stefan Monnier <monnier@iro.umontreal.ca>
606
607 * xdisp.c (message2, message2_nolog): Remove functions.
608 (message3, message3_nolog): Extract nbytes and multibyteness directly
609 from the string. Change all callers.
610 (message3_nolog): Don't set message_enable_multibyte since set_message
611 will reset it anyway.
612 (message1, message1_nolog): Use message3.
613 (vmessage): Use a stack allocated buffer rather than f->message_buf.
614 (with_echo_area_buffer): Remove last two arguments. Update all callers.
615 (set_message): Drop all but the second arg, which has to be a string.
616 (set_message_1): Simplify now that we know that a1 is NULL and the
617 second arg is a string.
618 * frame.h (struct frame): Remove `message_buf' field.
619 Use glyphs_initialized_p instead.
620 (FRAME_MESSAGE_BUF): Remove macro.
621 * w16select.c (Fw16_set_clipboard_data): Prefer message3 to message2.
622 * lisp.h (message2, message2_nolog): Remove declarations.
623 (message3, message3_nolog): Update declarations.
624 * keyboard.c (read_char_minibuf_menu_text)
625 (read_char_minibuf_menu_width): Remove vars.
626 (read_char_minibuf_menu_prompt): Rewrite the menu's construction so as
627 to correctly handle multibyte strings.
628 * frame.c (delete_frame): Don't free message_buf any more.
629 * editfns.c (message_text, message_length): Remove vars.
630 (Fmessage_box): Don't copy the Lisp string's bytes any longer.
631 * fileio.c (auto_save_error): Use message3 instead of message2.
632 * dispnew.c (adjust_frame_message_buffer): Remove function.
633
6342013-01-23 Eli Zaretskii <eliz@gnu.org>
635
636 * w32term.c (w32fullscreen_hook): Account correctly for the screen
637 real estate used for the tool bar and the menu bar.
638
6392013-01-23 Dmitry Antipov <dmantipov@yandex.ru>
640
641 * insdel.c (prepare_to_modify_buffer): Force redisplay if
642 hidden buffer is prepared to modification (Bug#13164).
643
6442013-01-22 Dmitry Antipov <dmantipov@yandex.ru>
645
646 * window.h (struct window): Change window_end_valid member from
647 Lisp_Object to a bitfield. Adjust comments.
648 (wset_window_end_valid): Remove.
649 * window.c (adjust_window_count): Clear window_end_valid.
650 (Fwindow_end): Adjust user. Remove ancient #if 0 code.
651 (Fwindow_line_height, set_window_buffer, Frecenter)
652 (Fsplit_window_internal, Fdelete_other_windows_internal)
653 (Fset_window_fringes, Fset_window_scroll_bars): Adjust users.
654 * dispnew.c (adjust_glyph_matrix, clear_window_matrices): Likewise.
655 * xdisp.c (check_window_end, reconsider_clip_changes)
656 (redisplay_internal, mark_window_display_accurate_1, redisplay_window)
657 (try_window, try_window_reusing_current_matrix, note_mouse_highlight)
658 (find_first_unchanged_at_end_row, try_window_id): Likewise.
659
6602013-01-22 Dmitry Antipov <dmantipov@yandex.ru>
661
662 * xdisp.c (mark_window_display_accurate): Simplify the loop
663 assuming that the only one of vchild, hchild or buffer window
664 slots is non-nil. Call mark_window_display_accurate_1 for
665 the leaf windows only.
666 (mark_window_display_accurate_1): Always assume leaf window.
667 Adjust comment.
668
6692013-01-22 Paul Eggert <eggert@cs.ucla.edu>
670
671 * emacs.c (Qkill_emacs_hook): Now static.
672
673 * fileio.c (Finsert_file_contents): Simplify.
674 Remove unnecessary assignments and tests.
675
6762013-01-21 Eli Zaretskii <eliz@gnu.org>
677
678 * w32.c (acl_set_file): Don't test for errors unless
679 set_file_security returns FALSE. Avoids spurious errors when
680 saving files.
681
6822013-01-21 Dmitry Antipov <dmantipov@yandex.ru>
683
684 * fileio.c (Finsert_file_contents): Revert code introduced at
685 2013-01-18 in favor of the simpler and generally better fix.
686 Save stack space by removing 'buffer' and reusing 'read_buf'
687 where appropriate.
688
6892013-01-19 Paul Eggert <eggert@cs.ucla.edu>
690
691 * lisp.h (eabs): Define unconditionally (Bug#13419).
692 The old "#if !defined (eabs)" was an unnecessary revenant of back
693 when this macro was called "abs". Document 'eabs' better.
694
6952013-01-19 Glenn Morris <rgm@gnu.org>
696
697 * fns.c (Frandom): Doc fix.
698
6992013-01-19 Eli Zaretskii <eliz@gnu.org>
700
701 * editfns.c (get_pos_property): Use SAFE_ALLOCA_LISP, to avoid
702 segfault when there are lots of overlays.
703
704 * buffer.c (sort_overlays): Use SAFE_NALLOCA, to avoid segfault
705 when there are lots of overlays.
706 See http://lists.gnu.org/archive/html/emacs-devel/2013-01/msg00421.html
707 for the details and a way to reproduce.
708
7092013-01-19 Paul Eggert <eggert@cs.ucla.edu>
710
711 * fileio.c: Use O_APPEND to append.
712 This corresponds better to the natural interpretation of "append",
713 and avoids the need to open the output file twice, or to invoke
714 lseek when APPEND is neither nil nor a number.
715 This relies on POSIX 1003.1-1988 or later, which is OK nowadays.
716 (Fwrite_region): Simplify. Use O_APPEND instead of opening the
717 file possibly twice, and lseeking to its end; this avoids the
718 need to lseek on non-regular files. Do not use O_EXCL and O_TRUNC
719 at the same time: the combination is never needed and apparently
720 it doesn't work with DOS_NT.
721
722 Fix size bug on DOS_NT introduced by CIFS workaround (Bug#13149).
723 * fileio.c (Fwrite_region): Use O_BINARY in checking code, too.
724
725 Allow floating-point file offsets.
726 Problem reported by Vitalie Spinu in
727 <http://lists.gnu.org/archive/html/emacs-devel/2013-01/msg00411.html>.
728 * fileio.c (emacs_lseek): Remove.
729 (file_offset): New function.
730 (Finsert_file_contents, Fwrite_region): Use it.
731
7322013-01-19 Chong Yidong <cyd@gnu.org>
733
734 * emacs.c (Fkill_emacs): Set waiting_for_input to 0 to avoid
735 aborting on Fsignal (Bug#13289).
736
7372013-01-19 Eli Zaretskii <eliz@gnu.org>
738
739 * w32.c (acl_set_file): Treat ERROR_ACCESS_DENIED from
740 set_file_security as failure due to insufficient privileges.
741 Reported by Fabrice Popineau <fabrice.popineau@supelec.fr>.
742 (fstat): Return owner and group like 'stat' and 'lstat' do.
743
7442013-01-19 Paul Eggert <eggert@cs.ucla.edu>
745
746 Work around bug in CIFS and vboxsf file systems (Bug#13149).
747 The bug was observed on Ubuntu operating inside a virtual machine,
748 editing files mounted via CIFS or vboxsf from the MS Windows 7 host.
749 The workaround introduces a race condition on non-buggy hosts,
750 but it's an unlikely race and anyway there's a nearly identical
751 nearby race that can't be fixed.
752 * fileio.c (valid_timestamp_file_system, timestamp_file_system):
753 New static vars.
754 (Fwrite_region): Test for file system time stamp bug.
755 (init_fileio): New function.
756 * lisp.h (init_fileio): Declare it.
757 * emacs.c (main): Call it.
758
759 * fileio.c (Finsert_file_contents): Simplify new diagnostic
760 and make it more consistent with other stat-failure diagnostics.
761
7622013-01-18 Dmitry Antipov <dmantipov@yandex.ru>
763
764 Fix crash when inserting data from non-regular files.
765 See http://lists.gnu.org/archive/html/emacs-devel/2013-01/msg00406.html
766 for the error description produced by valgrind.
767 * fileio.c (read_non_regular): Rename to read_contents.
768 Free Lisp_Save_Value object used to pass parameters.
769 (read_non_regular_quit): Rename to read_contents_quit.
770 (Finsert_file_contents): Redesign internal file reading loop to adjust
771 gap and end positions after each read and so help make_gap to work
772 properly. Do not signal an I/O error too early and so do not leave
773 not yet decoded characters in a buffer, which was the reason of
774 redisplay crash. Use list2 to build return value. Adjust comments.
775
7762013-01-17 Paul Eggert <eggert@cs.ucla.edu>
777
778 Close a race when statting and reading files (Bug#13149).
779 * fileio.c (Finsert_file_contents): Use open+fstat, not stat+open.
780 This avoids a race if the file is renamed between stat and open.
781 This race is not the problem originally noted in Bug#13149;
782 see <http://bugs.gnu.org/13149#73> and later messages in the thread.
783
7842013-01-17 Dmitry Antipov <dmantipov@yandex.ru>
785
786 * lisp.h (toplevel): Add comment about using Lisp_Save_Value
787 objects, related functions and macros.
788 (make_save_value): Adjust prototype.
789 (make_save_pointer): New prototype.
790 (SAFE_NALLOCA): Fix indentation. Use make_save_pointer.
791 (SAFE_ALLOCA_LISP): Adjust make_save_value usage.
792 * alloc.c (format_save_value): Rename to make_save_value.
793 (make_save_pointer): New function.
794 (record_xmalloc): Use make_save_pointer.
795 * dired.c, editfns.c, fileio.c, font.c, gtkutil.c, lread.c:
796 * nsmenu.m, nsterm.m, xfns.c, xmenu.c, xselect.c, keymap.c:
797 Change users of make_save_value to make_save_pointer.
798 Likewise for format_save_value and make_save_value.
799
8002013-01-17 Dmitry Antipov <dmantipov@yandex.ru>
801
802 * buffer.h (NARROWED, BUF_NARROWED): Drop unused macros.
803 (DECODE_POSITION, BUFFER_CHECK_INDIRECTION): Fix indentation.
804 * buffer.c (toplevel, syms_of_buffer): Drop old commented-out
805 debugging stubs.
806
8072013-01-15 Paul Eggert <eggert@cs.ucla.edu>
808
809 * alloc.c (free_save_value): Now static.
810
8112013-01-15 Dmitry Antipov <dmantipov@yandex.ru>
812
813 * keymap.c (map_keymap_internal): Use format_save_value.
814 (map_keymap_char_table_item): Adjust accordingly.
815 * fileio.c (non_regular_fd, non_regular_inserted)
816 (non_regular_nbytes): Remove.
817 (Finsert_file_contents): Convert trytry to ptrdiff_t.
818 Use format_save_value to pass parameters to read_non_regular.
819 (read_non_regular): Use XSAVE_ macros to extract parameters.
820 Adjust comment.
821 * xmenu.c (xmenu_show) [!USE_X_TOOLKIT && !USE_GTK]: Use
822 format_save_value.
823 (pop_down_menu) [!USE_X_TOOLKIT && !USE_GTK]: Adjust user.
824
8252013-01-15 Dmitry Antipov <dmantipov@yandex.ru>
826
827 * lisp.h (XSAVE_POINTER, XSAVE_INTEGER): Change to allow
828 extraction from any Lisp_Save_Value slot. Add type checking.
829 * alloc.c, dired.c, editfns.c, fileio.c, ftfont.c, gtkutil.c:
830 * keymap.c, lread.c, nsterm.h, nsmenu.c, xfns.c, xmenu.c:
831 * xselect.c: All users changed.
832
8332013-01-15 Dmitry Antipov <dmantipov@yandex.ru>
834
835 Some convenient bits to deal with Lisp_Save_Values.
836 * lisp.h (XSAVE_OBJECT): New macro to extract saved objects.
837 (allocate_misc): Remove prototype.
838 (format_save_value): New prototype.
839 * alloc.c (allocate_misc): Revert back to static.
840 (format_save_value): New function to build Lisp_Save_Value
841 object with the specified internal structure.
842 (make_save_value): Reimplement using format_save_value.
843 * editfns.c (save_excursion_save): Use format_save_value.
844 (save_excursion_restore): Use XSAVE_OBJECT.
845
8462013-01-14 Paul Eggert <eggert@cs.ucla.edu>
847
848 Avoid needless casts with XSAVE_POINTER.
849 * alloc.c (mark_object) [GC_MARK_STACK]:
850 * dired.c (directory_files_internal_unwind):
851 * fileio.c (do_auto_save_unwind):
852 * gtkutil.c (pop_down_dialog):
853 * keymap.c (map_keymap_char_table_item):
854 * lread.c (load_unwind):
855 * nsmenu.m (pop_down_menu):
856 * print.c (print_object) [GC_MARK_STACK]:
857 * xfns.c (clean_up_file_dialog):
858 * xmenu.c (cleanup_widget_value_tree):
859 Omit casts between XSAVE_POINTER and a pointer type.
860
8612013-01-14 Dmitry Antipov <dmantipov@yandex.ru>
862
863 Fix compilation with GC_MARK_STACK == GC_USE_GCPROS_AS_BEFORE.
864 * eval.c (eval_sub): Protect `form' from being GCed before its
865 car and cdr becomes protected with the backtrace entry.
866
8672013-01-14 Dmitry Antipov <dmantipov@yandex.ru>
868
869 Make Lisp_Save_Value more versatile storage for up to four objects.
870 * lisp.h (toplevel): Enumeration to describe types of saved objects.
871 (struct Lisp_Save_Value): New layout. Adjust comments.
872 (XSAVE_POINTER): New macro.
873 (XSAVE_INTEGER): Likewise.
874 (allocate_misc): Add prototype.
875 (free_misc): Likewise.
876 * alloc.c (allocate_misc): Now global.
877 (free_misc): Likewise. Adjust comment.
878 (make_save_value): Use new Lisp_Save_Value layout. Adjust comment.
879 (free_save_value): Likewise.
880 (mark_object): Likewise.
881 * editfns.c (save_excursion_save): Pack everything within
882 Lisp_Save_Value and so avoid xmalloc.
883 (save_excursion_restore): Adjust to match new layout. Use free_misc
884 because we do not allocate extra memory any more. Add eassert.
885 * print.c (print_object): New code to print Lisp_Save_Value. Do not
886 rely on valid_lisp_object_p if !GC_MARK_STACK. Adjust comments.
887 * dired.c, fileio.c, font.c, ftfont.c, gtkutil.c, keymap.c,
888 * lread.c, nsmenu.m, nsterm.h, xfns.c, xmenu.c, xselect.c:
889 Use XSAVE_POINTER and XSAVE_INTEGER where appropriate.
890
8912013-01-13 Jan Djärv <jan.h.d@swipnet.se>
892
893 * nsfont.m (LCD_SMOOTHING_MARGIN): New define.
894 (nsfont_draw): Remove disabling of LCD smoothing.
895 (ns_glyph_metrics): Add LCD_SMOOTHING_MARGIN to bearings to fix
896 Bug#11484 with LCD smoothing on.
897
8982013-01-13 Paul Eggert <eggert@cs.ucla.edu>
899
900 Fix SIGDANGER handlers, for AIX (Bug#13408).
901 * sysdep.c.c (handle_danger_signal, deliver_danger_signal) [SIGDANGER]:
902 Move handlers here from emacs.c; they were out of place.
903
9042013-01-11 Jan Djärv <jan.h.d@swipnet.se>
905
906 * xterm.c (syms_of_xterm): Adjust documentation for
907 scroll-bar-adjust-thumb-portion.
908
9092012-12-31 Adam Sjøgren <asjo@koldfront.dk> (tiny change)
910
911 * xterm.c (scroll-bar-adjust-thumb-portion): New variable to
912 determine whether scroll bar thumb size should be adjusted or
913 not. Use variable for MOTIF.
914
915 * gtkutil.c (scroll-bar-adjust-thumb-portion): Use variable for
916 GTK.
917
9182013-01-13 Jan Djärv <jan.h.d@swipnet.se>
919
920 * nsterm.m (keyDown:): Set processingCompose to NO if an emacs key
921 event is generated.
922 (doCommandBySelector:): Set processingCompose to NO.
923
924 * nsfont.m (ns_findfonts): Add block/unblock_input calls.
925 Remove check for fkeys count > zero, block/unblock fixes the real bug.
926 (nsfont_list_family): Add block/unblock_input calls.
927 (nsfont_open): Move block_input earlier. Add unblock_input before early
928 return.
929 (nsfont_draw): Add block/unblock_input calls.
930
9312013-01-12 Dmitry Antipov <dmantipov@yandex.ru>
932
933 * indent.c (Fvertical_motion): Remove now-incorrect GCPROs
934 for old_charpos and old_bytepos.
935
9362013-01-12 Paul Eggert <eggert@cs.ucla.edu>
937
938 Fix bug with set-time-zone-rule and LOCALTIME_CACHE (Bug#13415).
939 * editfns.c (set_time_zone_rule) [LOCALTIME_CACHE]:
940 Clear tzvalbuf_in_environ if this workaround is in effect.
941 Problem and fix reported by Kazuhiro Ito.
942
9432013-01-11 Aaron S. Hawley <Aaron.Hawley@vtinfo.com>
944
945 * insdel.c (Fcombine_after_change_execute, syms_of_insdel):
946 Fix ambiguous doc string cross-reference(s).
947
948 * keyboard.c (Fcommand_execute, syms_of_keyboard): Fix ambiguous
949 doc string cross-reference(s).
950
951 * window.c (Fwindow_point, syms_of_window): Fix ambiguous doc
952 string cross-reference(s).
953
9542013-01-11 Dmitry Antipov <dmantipov@yandex.ru>
955
956 Avoid unnecessary byte position calculation for the gap movement.
957 Since all users of move_gap do CHAR_TO_BYTE for other purposes
958 anyway, all of them should use move_gap_both instead.
959 * lisp.h (move_gap): Remove prototype.
960 * insdel.c (move_gap): Remove.
961 (move_gap_both): Add eassert.
962 * editfns.c (Ftranspose_regions): Tweak to use move_gap_both.
963 * xml.c (parse_region): Likewise.
964
9652013-01-11 Paul Eggert <eggert@cs.ucla.edu>
966
967 emacsclient -t should not suspend Emacs server (Bug#13387)
968 * lisp.h, sysdep.c (block_tty_out_signal, unblock_tty_out_signal):
969 New functions.
970 * term.c (init_tty): Use them instead of rolling our own code.
971 * sysdep.c (tcsetpgrp_without_stopping): Likewise. Here, this
972 switches from 'signal' to 'pthread_sigmask', which is safer in
973 multithreaded applications.
974 * term.c (Fresume_tty): Don't bother dissociating if O_IGNORE_CTTY,
975 which has already arranged for that.
976 (dissociate_if_controlling_tty): If setsid fails, fall back on TIOCNOTTY.
977 This is the main part of the bug fix.
978
9792013-01-10 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> (tiny change)
980
981 * gtkutil.c (xg_initialize): Add ifdef HAVE_FREETYPE around
982 x_last_font_name (Bug#13403).
983
9842013-01-10 Dmitry Antipov <dmantipov@yandex.ru>
985
986 Omit buffer_slot_type_mismatch and use generic predicates to enforce
987 the type of per-buffer values where appropriate.
988 * lisp.h (struct Lisp_Buffer_Objfwd): Rename slottype member to
989 predicate, which is how it's really used now. Adjust comment.
990 * buffer.h (buffer_slot_type_mismatch): Remove prototype.
991 * buffer.c (buffer_slot_type_mismatch): Remove.
992 (DEFVAR_PER_BUFFER, defvar_per_buffer): Rename type argument to
993 predicate. Adjust comment.
994 (syms_of_buffer): Use Qsymbolp for major-mode. Use Qintegerp for
995 fill-column, left-margin, tab-width, buffer-saved-size,
996 left-margin-width, right-margin-width, left-fringe-width,
997 right-fringe-width, scroll-bar-width and buffer-display-count.
998 Use Qstringp for default-directory, buffer-file-name,
999 buffer-file-truename and buffer-auto-save-file-name. Use Qfloatp for
1000 scroll-up-aggressively and scroll-down-aggressively. Use Qnumberp for
1001 line-spacing.
1002 * data.c (store_symval_forwarding): Adjust to call the predicate.
1003
10042013-01-09 Juanma Barranquero <lekktu@gmail.com>
1005
1006 * w32.c (get_name_and_id, acl_set_file):
1007 * w32term.c (w32fullscreen_hook): Remove unused local variables.
1008
10092013-01-09 Dmitry Antipov <dmantipov@yandex.ru>
1010
1011 * lisp.h (make_gap_1): New prototype.
1012 * buffer.h (GAP_BYTES_DFL, GAP_BYTES_MIN): New macros for the special
1013 gap size values.
1014 * editfns.c (Fbuffer_size): Rename from Fbufsize to fit the common
1015 naming convention.
1016 (syms_of_editfns): Adjust defsubr. Drop commented-out obsolete code.
1017 * insdel.c (make_gap_larger): Use GAP_BYTES_DFL. Adjust comment.
1018 (make_gap_smaller): Use GAP_BYTES_MIN. Adjust comment.
1019 (make_gap_1): New function to adjust the gap of any buffer.
1020 * coding.c (coding_alloc_by_making_gap): Use it.
1021 * buffer.c (compact_buffer): Likewise. Use BUF_Z_BYTE, BUF_GAP_SIZE,
1022 GAP_BYTES_DFL and GAP_BYTES_MIN. Adjust comment.
1023
10242013-01-08 Juri Linkov <juri@jurta.org>
1025
1026 * xfaces.c (tty_supports_face_attributes_p): Return 0 for the case
1027 of (supports :underline (:style wave)). (Bug#13000)
1028
10292013-01-08 Aaron S. Hawley <aaron.s.hawley@gmail.com>
1030
1031 * undo.c (Fprimitive_undo): Move to simple.el.
1032 (syms_of_undo): Remove declarations for Sprimitive_undo.
1033
10342013-01-08 Stefan Monnier <monnier@iro.umontreal.ca>
1035
1036 * keyboard.c (echo_add_key): Rename from echo_add_char.
1037
10382013-01-06 Chong Yidong <cyd@gnu.org>
1039
1040 * keyboard.c (echo_add_char): New function, factored out from
1041 echo_char. Don't add a space if the previous echo string was
1042 empty (Bug#13255).
1043 (echo_char): Use it.
1044 (read_key_sequence): When echoing mock input, ensure that the
1045 trailing dash is properly added.
1046
10472013-01-05 Eli Zaretskii <eliz@gnu.org>
1048
1049 * xdisp.c (dump_glyph): Align glyph data better. Use "pD" instead
1050 of a non-portable "t" to print ptrdiff_t values. Allow up to 9
1051 digits for buffer positions, before misalignment starts.
1052 Display "0" for integer "object" field.
1053 (dump_glyph_row): Adapt the header line to changes in dump_glyph.
1054 Display the newline glyph more unambiguously.
1055
10562013-01-04 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
1057
1058 * nsterm.m (ns_draw_underwave):
1059 * w32term.c (w32_draw_underwave):
1060 * xterm.c (x_draw_underwave): Make underwave look more triangular
1061 and also degrade gracefully for small fonts. (Bug#13000)
1062
1063 * nsterm.m (ns_draw_text_decoration):
1064 * w32term.c (x_draw_glyph_string):
1065 * xterm.c (x_draw_glyph_string): Don't use previous underline
1066 thickness and position if previous underline type is underwave.
1067
10682013-01-04 Stefan Monnier <monnier@iro.umontreal.ca>
1069
1070 * fileio.c (Ffile_acl): Undocument return format.
1071
10722013-01-02 Glenn Morris <rgm@gnu.org>
1073
1074 * keymap.c (Fkey_description): Doc fix. (Bug#13323)
1075
10762013-01-02 Paul Eggert <eggert@cs.ucla.edu>
1077
1078 Simplify via eabs.
1079 * dired.c (file_name_completion):
1080 * doc.c (get_doc_string):
1081 * floatfns.c (round2):
1082 * font.c (font_score, font_delete_unmatched):
1083 * fringe.c (compute_fringe_widths):
1084 * lread.c (read_list):
1085 * minibuf.c (Ftry_completion):
1086 * term.c (tty_ins_del_lines):
1087 * xterm.c (x_draw_image_foreground, x_draw_image_foreground_1):
1088 Use eabs (x) rather than open-coding it as (x < 0 ? -x : x).
1089
10902012-12-31 Eli Zaretskii <eliz@gnu.org>
1091
1092 * w32.c (unsetenv): Set up the string passed to _putenv
1093 correctly.
1094 See http://lists.gnu.org/archive/html/emacs-devel/2012-12/msg00863.html
1095 for the bug this caused.
1096
10972012-12-30 Paul Eggert <eggert@cs.ucla.edu>
1098
1099 * coding.c (Qmac): Now static.
1100
11012012-12-30 Jan Djärv <jan.h.d@swipnet.se>
1102
1103 * gtkutil.c (TOOLBAR_TOP_WIDGET): New macro.
1104 (xg_pack_tool_bar): Use TOOLBAR_TOP_WIDGET, condition out use of
1105 handlebox_widget. Set toolbar_in_hbox to false/true, set
1106 toolbar_is_packed to true.
1107 (xg_update_tool_bar_sizes): Use widget returned by TOOLBAR_TOP_WIDGET.
1108 (update_frame_tool_bar): Check toolbar_is_packed for packing.
1109 Show all on TOOLBAR_TOP_WIDGET.
1110 (free_frame_tool_bar): Check toolbar_is_packed. Use widget returned
1111 by TOOLBAR_TOP_WIDGET.
1112 (xg_change_toolbar_position): Use widget returned by TOOLBAR_TOP_WIDGET.
1113 Check toolbar_is_packed.
1114 (xg_have_tear_offs, tearoff_remove, tearoff_activate): Condition on
1115 HAVE_GTK_TEAROFF_MENU_ITEM_NEW.
1116 (xg_have_tear_offs): When ! HAVE_GTK_TEAROFF_MENU_ITEM_NEW, return
1117 false.
1118 (create_menus): Create tearoff only if HAVE_GTK_TEAROFF_MENU_ITEM_NEW.
1119 (xg_update_menubar): Update title only if
1120 HAVE_GTK_TEAROFF_MENU_ITEM_NEW.
1121 (xg_update_submenu): Skip tearoff only if
1122 HAVE_GTK_TEAROFF_MENU_ITEM_NEW.
1123 (xg_initialize): Initialize xg_detached_menus only if
1124 HAVE_GTK_TEAROFF_MENU_ITEM_NEW.
1125
1126 * xterm.h (struct x_output): Surround handlebox_widget with
1127 #ifdef HAVE_GTK_HANDLE_BOX_NEW. toolbar_is_packed is new,
1128 toolbar_in_hbox is bool.
1129
11302012-12-30 Andreas Schwab <schwab@linux-m68k.org>
1131
1132 * src/Makefile.in (TEMACS_LDFLAGS2): Remove.
1133 (LIBS_GNUSTEP): Define.
1134 (LIBES): Add $(LIBS_GNUSTEP).
1135 (temacs$(EXEEXT)): Use $(LDFLAGS) instead of $(TEMACS_LDFLAGS2).
1136
11372012-12-30 Eli Zaretskii <eliz@gnu.org>
1138
1139 * xdisp.c (set_cursor_from_row): Don't confuse a truncation or
1140 continuation glyph on a TTY with an indication of an empty line.
1141 (Bug#13277)
1142
11432012-12-29 Eli Zaretskii <eliz@gnu.org>
1144
1145 * fileio.c (Fset_file_selinux_context, Fset_file_acl): Return t if
1146 file's SELinux context or ACLs successfully set, nil otherwise.
1147 (Bug#13298)
1148 (Fcopy_file) [WINDOWSNT]: Improve diagnostics when CopyFile fails.
1149
1150 * w32proc.c (reader_thread): Avoid passing NULL handles to
1151 SetEvent and WaitForSingleObject.
1152
11532012-12-28 Paul Eggert <eggert@cs.ucla.edu>
1154
1155 Port EXTERNALLY_VISIBLE to Clang 3.2.
1156 * conf_post.h (__has_attribute): New macro.
1157 (EXTERNALLY_VISIBLE): Use it. This ports to Clang 3.2.
1158
11592012-12-27 Glenn Morris <rgm@gnu.org>
1160
1161 * cygw32.c (Fcygwin_convert_file_name_to_windows)
1162 (Fcygwin_convert_file_name_from_windows): Doc fixes.
1163
11642012-12-27 Eli Zaretskii <eliz@gnu.org>
1165
1166 * fileio.c (file_name_as_directory, directory_file_name):
1167 Accept an additional argument MULTIBYTE to indicate whether the input C
1168 came from a multibyte or a unibyte Lisp string; all callers
1169 adjusted. Don't assume the input string is always multibyte.
1170 (Bug#13262)
1171 (Ffile_name_directory) [DOS_NT]: Handle unibyte strings correctly:
1172 don't ENCODE_FILE them, and return a unibyte string if the input
1173 was unibyte.
1174 (Fexpand_file_name): Don't mix unibyte with multibyte strings, and
1175 don't assume the input strings will always be multibyte. If the
1176 input strings are multibyte, decode strings obtained from C
1177 library functions.
1178
11792012-12-26 Dmitry Antipov <dmantipov@yandex.ru>
1180
1181 * lisp.h (toplevel): Add two notices to the comment about
1182 defining a new Lisp data type.
1183 * print.c (print_object): If Lisp_Save_Value object's pointer
1184 is the address of a memory area containing Lisp_Objects, try
1185 to print them.
1186 * alloc.c (valid_lisp_object_p): Adjust comment.
1187
11882012-12-26 Dmitry Antipov <dmantipov@yandex.ru>
1189
1190 * keyboard.c (record_asynch_buffer_change): Initialize an event
1191 only if it's really needed.
1192 * frame.h (enum output_method): Remove output_mac member since
1193 it's a leftover from the deleted code.
1194 * frame.c (Fframep): Adjust user here ...
1195 * terminal.c (Fterminal_live_p): ... and here.
1196 * coding.c (Qmac): Now here because it's only used to denote
1197 end-of-line encoding type.
1198 (syms_of_coding): DEFSYM it.
1199 * frame.h (Qmac): Remove duplicated declaration.
1200
12012012-12-26 Paul Eggert <eggert@cs.ucla.edu>
1202
1203 * window.c (select_window_1): Now static, since it's used only here.
1204
12052012-12-25 Eli Zaretskii <eliz@gnu.org>
1206
1207 * window.c (window_body_cols): Subtract display margins from the
1208 window body width on TTYs as well. See
1209 http://lists.gnu.org/archive/html/help-gnu-emacs/2012-12/msg00317.html
1210 for the original report.
1211
12122012-12-25 Dmitry Antipov <dmantipov@yandex.ru>
1213
1214 * xdisp.c (redisplay_window): Remove inner local variable
1215 because the outer shadowed one has the same meaning.
1216 * xterm.h (struct x_output): Remove toolbar_detached member since it's
1217 set but never used.
1218 * gtkutil.c (xg_tool_bar_detach_callback, xg_tool_bar_attach_callback)
1219 (xg_create_tool_bar): Adjust users.
1220
12212012-12-24 Dmitry Antipov <dmantipov@yandex.ru>
1222
1223 * buffer.h (BUF_COMPACT): New macro to follow the common style.
1224 * buffer.c (Fget_buffer_create): Use it to set compact field of
1225 struct buffer_text to avoid accessing an uninitialized value
1226 when compact_buffer is called for the first time.
1227 (compact_buffer): Use convenient BUF_COMPACT and BUF_MODIFF.
1228 (Fset_buffer_modified_p): Use buffer_window_count to check
1229 whether the buffer is displayed in some window.
1230 * xdisp.c (message_dolog): Likewise.
1231
12322012-12-23 Eli Zaretskii <eliz@gnu.org>
1233
1234 * w32.c (acl_set_file): If setting the file security descriptor
1235 fails, and the new DACL is identical to the existing one, silently
1236 return success. This fixes problems for users backing up their
1237 own files without having the necessary privileges for setting
1238 security descriptors.
1239
1240 * w32proc.c (reader_thread): Do not index fd_info[] with negative
1241 values.
1242 (reader_thread): Exit when cp->status becomes STATUS_READ_ERROR
1243 after WaitForSingleObject returns normally. This expedites reader
1244 thread shutdown when delete_child triggers it.
1245 (reap_subprocess): More accurate commentary for why we call
1246 delete_child only when cp->fd is negative.
1247
1248 * w32.c (sys_close): Do not call delete_child on a subprocess
1249 whose handle is not yet closed. Instead, set its file descriptor
1250 to a negative value, so that reap_subprocess will call
1251 delete_child on that subprocess when its SIGCHLD arrives.
1252 This avoids closing handles used for communications between sys_select
1253 and reader_thread, which doesn't give sys_select a chance to
1254 notice that the process exited and invoke the SIGCHLD handler for
1255 it.
1256
12572012-12-23 Jan Djärv <jan.h.d@swipnet.se>
1258
1259 * nsfns.m (Fns_do_applescript): Run event loop until script has
1260 been executed (Bug#12969).
1261 (ns_run_ascript): Chech as_script for nil, set to nil after
1262 executing script.
1263
12642012-12-22 Martin Rudalics <rudalics@gmx.at>
1265
1266 * window.c (Fselect_window): Reword doc-string (Bug#13248).
1267
12682012-12-22 Eli Zaretskii <eliz@gnu.org>
1269
1270 * w32term.c (w32fullscreen_hook): New function.
1271 (w32_create_terminal): Plug it into the terminal's fullscreen_hook.
1272
12732012-12-21 Eli Zaretskii <eliz@gnu.org>
1274
1275 * fileio.c (Finsert_file_contents): Doc fix.
1276
1277 * w32proc.c (new_child, delete_child, find_child_pid): For a
1278 subprocess, consider its slot being in use as long as its process
1279 handle (procinfo.hProcess) is not NULL. This avoids reusing the
1280 slot when a new process is started immediately after killing
1281 another one, without waiting enough time for the first process to
1282 be reaped and resources allocated for it be orderly freed.
1283 (Bug#13086)
1284 Suggested by Fabrice Popineau <fabrice.popineau@supelec.fr>.
1285
12862012-12-21 Chong Yidong <cyd@gnu.org>
1287
1288 * buffer.c (Fset_buffer_major_mode): Doc fix (Bug#13231).
1289
1290 * fns.c (Fcompare_strings): Doc fix (Bug#13081).
1291
12922012-12-21 Eli Zaretskii <eliz@gnu.org>
1293
1294 * w32.c (get_name_and_id): Always pass NULL as the first argument
1295 of lookup_account_sid. Avoids crashes with UNC file names that
1296 refer to DFS domains, not to specific machine names. (Bug#12621)
1297 Remove now unused argument FNAME; all callers changed.
1298 (get_file_owner_and_group): Remove now unused argument FNAME; all
1299 callers changed.
1300
13012012-12-21 Chong Yidong <cyd@gnu.org>
1302
1303 * editfns.c (Finsert_char): Since read-char-by-name now signals an
1304 error for invalid chars, don't check for a nil return value.
1305
13062012-12-20 Dmitry Antipov <dmantipov@yandex.ru>
1307
1308 Avoid calls to CHAR_TO_BYTE if byte position is known.
1309 * editfns.c (make_buffer_string_both): Use move_gap_both.
1310 (Fbuffer_string): Use make_buffer_string_both.
1311 * marker.c (buf_charpos_to_bytepos): Convert to eassert.
1312 Adjust comment.
1313 (buf_bytepos_to_charpos): Likewise.
1314 (charpos_to_bytepos): Remove.
1315 * fileio.c (Finsert_file_contents): Use move_gap_both.
1316 * search.c (Freplace_match): Likewise.
1317 * process.c (process_send_region): Likewise. Use convenient
1318 names for byte positions.
1319 * lisp.h (charpos_to_bytepos): Remove prototype.
1320 * indent.c (scan_for_column): Use CHAR_TO_BYTE.
1321 * insdel.c (move_gap): Likewise.
1322
13232012-12-20 Paul Eggert <eggert@cs.ucla.edu>
1324
1325 * xdisp.c (redisplay_internal): Remove now-unused local.
1326
13272012-12-20 Stefan Monnier <monnier@iro.umontreal.ca>
1328
1329 * xdisp.c (select_frame_for_redisplay, ensure_selected_frame): Remove.
1330 (redisplay_internal): Don't bother selecting the frame to get the
1331 proper value of frame-local variables (bug#13225).
1332
13332012-12-20 Dmitry Antipov <dmantipov@yandex.ru>
1334
1335 * textprop.c (set_text_properties_1): Do not allow NULL interval.
1336 Rename 4th argument since it may be buffer or string. Adjust comment.
1337 * intervals.c (graft_intervals_info_buffer): Find an interval here.
1338
13392012-12-19 Dmitry Antipov <dmantipov@yandex.ru>
1340
1341 * coding.c (Fdetect_coding_region): Do not check start and end with
1342 CHECK_NUMBER_COERCE_MARKER since validate_region does that itself.
1343 (code_convert_region): Likewise.
1344
13452012-12-18 Eli Zaretskii <eliz@gnu.org>
1346
1347 * w32.c (acl_get_file, acl_set_file): Run the file name through
1348 map_w32_filename, and resolve any symlinks in the file name, like
1349 Posix platforms do.
1350 (acl_set_file): Call revert_to_self, if any privileges were
1351 enabled.
1352
13532012-12-17 Juanma Barranquero <lekktu@gmail.com>
1354
1355 * makefile.w32-in ($(BLD)/editfns.$(O), $(BLD)/fileio.$(O))
1356 ($(BLD)/w32.$(O)): Update dependencies.
1357
13582012-12-17 Stefan Monnier <monnier@iro.umontreal.ca>
1359
1360 * xdisp.c (select_frame_for_redisplay): Use select_window_1 to
1361 propagate redisplay's scrolling (if any) to the right window.
1362 (redisplay_internal): Use ensure_selected_frame.
1363 (display_mode_lines): Complete last fix.
1364 * window.c (select_window_1): New func, extracted from select_window.
1365 (select_window): Use it.
1366 * window.h (select_window_1): Declare.
1367
13682012-12-17 Eli Zaretskii <eliz@gnu.org>
1369
1370 Emulate Posix ACL APIs on MS-Windows.
1371 * w32.c: Include sddl.h and sys/acl.h.
1372 (SDDL_REVISION_1): Define if not already defined.
1373 (g_b_init_get_security_descriptor_dacl)
1374 (g_b_init_convert_sd_to_sddl, g_b_init_convert_sddl_to_sd)
1375 (g_b_init_is_valid_security_descriptor)
1376 (g_b_init_set_file_security): New static flags.
1377 (globals_of_w32): Initialize them to zero.
1378 (SetFileSecurity_Name): New string constant.
1379 (SetFileSecurity_Proc, GetSecurityDescriptorDacl_Proc)
1380 (ConvertStringSecurityDescriptorToSecurityDescriptor_Proc)
1381 (ConvertSecurityDescriptorToStringSecurityDescriptor_Proc)
1382 (IsValidSecurityDescriptor_Proc): New typedefs.
1383 (get_file_security, get_security_descriptor_owner)
1384 (get_security_descriptor_group): Set errno to ENOTSUP.
1385 (set_file_security, get_security_descriptor_dacl)
1386 (is_valid_security_descriptor, convert_sd_to_sddl)
1387 (convert_sddl_to_sd, acl_valid, acl_to_text, acl_from_text)
1388 (acl_free, acl_get_file, acl_set_file): New functions.
1389
1390 * fileio.c (Fcopy_file) [WINDOWSNT]: Support copying ACLs.
1391
13922012-12-17 Paul Eggert <eggert@cs.ucla.edu>
1393
1394 Don't reraise SIGCHLD, as that can now lose (Bug#13192).
1395 With the 2012-12-03 fix for Bug#12980 in place, an old workaround
1396 for some of that bug's symptoms can now cause Emacs to abort.
1397 Remove the workaround.
1398 * process.c (wait_reading_process_output): Don't reraise SIGCHLD.
1399 The bug that caused SIGCHLD to get lost has been fixed, and the
1400 workaround for it can now cause Emacs to abort.
1401
14022012-12-16 Paul Eggert <eggert@cs.ucla.edu>
1403
1404 * sysdep.c (emacs_abort): Bump backtrace size to 40.
1405 Companion to the 2012-09-30 patch. Suggested by Eli Zaretskii in
1406 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00796.html>.
1407
14082012-12-16 Romain Francoise <romain@orebokech.com>
1409
1410 * fileio.c (Ffile_acl, Fset_file_acl): New functions.
1411 (Fcopy_file): Change last arg to `preserve_extended_attributes'
1412 and copy ACL entries of file in addition to SELinux context if set.
1413 (syms_of_fileio): Add `file-acl' and `set-file-acl'.
1414
1415 * Makefile.in (LIBACL_LIBS): New macro.
1416 (LIBES): Use it.
1417
14182012-12-15 Paul Eggert <eggert@cs.ucla.edu>
1419
1420 * fileio.c (internal_delete_file): Use bool for boolean.
1421
14222012-12-15 Eli Zaretskii <eliz@gnu.org>
1423
1424 Fix bug #13079 on MS-Windows with temp files not being deleted.
1425 * w32.h (_child_process): New members input_file and
1426 pending_deletion.
1427 (register_child): First argument is now pid_t.
1428 (record_infile, record_pending_deletion): New prototypes.
1429
1430 * w32proc.c (new_child): Initialize input_file and
1431 pending_deletion members of the child.
1432 (delete_child): Delete the child's temporary input file, if any,
1433 that is pending deletion.
1434 (register_child): First argument is now pid_t.
1435 (record_infile, record_pending_deletion): New functions.
1436 (reap_subprocess): Fix a typo in DebPrint string.
1437 (sys_spawnve, sys_kill): Use pid_t for PID arguments.
1438
1439 * fileio.c (internal_delete_file): Return an int again: non-zero
1440 if delete-file succeeds, zero otherwise.
1441
1442 * lisp.h (internal_delete_file): Adjust prototype.
1443
1444 * callproc.c (Fcall_process): Don't overwrite infile with result
1445 of DECODE_FILE.
1446 [WINDOWSNT] If BUFFER is an integer, i.e. we are launching an
1447 asynchronous subprocess, record the name of the input file name,
1448 if any.
1449 (delete_temp_file) [WINDOWSNT]: If internal_delete_file fails to
1450 delete the file, record it as pending deletion when the subprocess
1451 exits.
1452
14532012-12-14 Eli Zaretskii <eliz@gnu.org>
1454
1455 * editfns.c [HAVE_PWD_H]: Include grp.h.
1456
1457 * makefile.w32-in ($(BLD)/editfns.$(O)): Add $(NT_INC)/grp.h.
1458
14592012-12-14 Paul Eggert <eggert@cs.ucla.edu>
1460
1461 Fix permissions bugs with setgid directories etc. (Bug#13125)
1462 * dired.c (Ffile_attributes): Return t as the 9th attribute,
1463 to mark it as a placeholder. The old value was often wrong.
1464 The only user of this attribute has been changed to use
1465 file-ownership-preserved-p instead, with its new group arg.
1466 * editfns.c (Fgroup_gid, Fgroup_real_gid): New functions.
1467
14682012-12-14 Stefan Monnier <monnier@iro.umontreal.ca>
1469
1470 * xdisp.c (select_frame_for_redisplay, display_mode_lines):
1471 Keep selected_window and selected_frame in sync.
1472
14732012-12-14 Eli Zaretskii <eliz@gnu.org>
1474
1475 * w32.c (stat_worker): If w32_stat_get_owner_group is zero, do not
1476 try to get accurate owner and group information from NT file
1477 security APIs. This is to make most callers of 'stat' and
1478 'lstat', which don't need that information, much faster.
1479
1480 * dired.c (Ffile_attributes) [WINDOWSNT]:
1481 Set w32_stat_get_owner_group to a non-zero value, to request accurate
1482 owner and group information from 'lstat'.
1483
14842012-12-13 Paul Eggert <eggert@cs.ucla.edu>
1485
1486 * fileio.c (Finsert_file_contents): Don't put tail into head area,
1487 as that confuses set-auto-coding, so insist on the head-read
1488 returning the full 1024 bytes. Let lseek compute the tail offset;
1489 less work for us. Do not ignore I/O errors when reading the tail.
1490
1491 * xdisp.c: Minor style fixes.
1492 (init_iterator): Hoist assignment out of if-expression.
1493 (markpos_of_region): Callers now test for sign, not for -1.
1494
14952012-12-13 Dmitry Antipov <dmantipov@yandex.ru>
1496
1497 Minor redisplay optimization when the region length is zero.
1498 * xdisp.c (markpos_of_region): New function.
1499 (init_iterator): Do not highlight the region of zero length.
1500 (redisplay_window): Check whether the region is of non-zero length.
1501 (try_cursor_movement): Allow if the region length is zero.
1502 (try_window_reusing_current_matrix, try_window_id): Likewise.
1503
15042012-12-13 Eli Zaretskii <eliz@gnu.org>
1505
1506 * search.c (search_buffer): Check the inverse translations of each
1507 character in pattern when the buffer being searched is unibyte.
1508 (Bug#13084)
1509
15102012-12-13 Paul Eggert <eggert@cs.ucla.edu>
1511
1512 * fileio.c (Fvisited_file_modtime): Return (-1 ...) for nonexistent
1513 files, fixing a regression from 24.2.
1514 (Fverify_visited_file_modtime): Don't read uninitialized st.st_size.
1515
15162012-12-13 Paul Eggert <eggert@cs.ucla.edu>
1517
1518 * fileio.c (Fcopy_file): Make fstat failure as serious as open failure.
1519 fstat shouldn't fail, and if it does fail copy-file should not proceed.
1520 Remove unnecessary S_ISLNK test, as (contra the comments) this
1521 function can't copy symlinks. Improve quality of error message
1522 when attempting to copy files that are neither regular files nor
1523 directories.
1524
15252012-12-12 Dmitry Antipov <dmantipov@yandex.ru>
1526
1527 * dispnew.c (set_window_cursor_after_update): Use clip_to_bounds.
1528 * gtkutil.c (xg_set_toolkit_scroll_bar_thumb):
1529 * window.c (Frecenter):
1530 * xdisp.c (resize_mini_window, hscroll_window_tree, draw_glyphs):
1531 * xterm.c (x_set_toolkit_scroll_bar_thumb): Likewise.
1532
15332012-12-12 Daniel Colascione <dancol@dancol.org>
1534
1535 * unexcw.c (fixup_executable): Use posix_fallocate to ensure that
1536 the dumped Emacs is not a sparse file, greatly improving Cygwin
1537 "make bootstrap" performance.
1538
15392012-12-11 Michael Albinus <michael.albinus@gmx.de>
1540
1541 * inotify.c (inotify_callback): Generate an Emacs event for every
1542 incoming inotify event.
1543
15442012-12-11 Eli Zaretskii <eliz@gnu.org>
1545
1546 * xdisp.c (handle_face_prop): Fix logic of computing
1547 it->start_of_box_run_p.
1548 (append_space_for_newline): If the glyph row is R2L, reset the
1549 iterator's end_of_box_run_p flag before prepending the space glyph.
1550 (extend_face_to_end_of_line): If the glyph row is R2L, reset the
1551 iterator's start_of_box_run_p flag before prepending the stretch.
1552 (append_glyph, produce_image_glyph, append_composite_glyph)
1553 (append_stretch_glyph, append_glyphless_glyph): Reverse the
1554 left_box_line_p and right_box_line_p flags of the glyph for R2L
1555 glyph rows. (Bug#13011)
1556
15572012-12-11 Dmitry Antipov <dmantipov@yandex.ru>
1558
1559 * buffer.c (Fset_buffer_multibyte): Do not force redisplay
1560 if changed buffer is not shown in a window.
1561 * insdel.c (prepare_to_modify_buffer): Likewise.
1562 * window.c (replace_buffer_in_windows_safely): Do nothing
1563 if buffer is not shown in a window.
1564 (Fforce_window_update): Likewise if string or buffer argument
1565 is passed.
1566
15672012-12-11 Eli Zaretskii <eliz@gnu.org>
1568
1569 * inotify.c (Finotify_add_watch): Rename decoded_file_name to
1570 encoded_file_name, which is what it is.
1571
15722012-12-11 Dmitry Antipov <dmantipov@yandex.ru>
1573
1574 Consistently use marker_position and marker_byte_position.
1575 * fringe.c (Ffringe_bitmaps_at_pos):
1576 * indent.c (Fvertical_motion):
1577 * insdel.c (prepare_to_modify_buffer):
1578 * keyboard.c (make_lispy_position):
1579 * window.c (Fwindow_end, Fpos_visible_in_window_p, unshow_buffer)
1580 (window_scroll_pixel_based, displayed_window_lines)
1581 (Fset_window_configuration):
1582 * xdisp.c (message_dolog, with_echo_area_buffer_unwind_data)
1583 (mark_window_display_accurate_1, redisplay_window, decode_mode_spec):
1584 Replace direct access to marker fields with calls
1585 to marker_position and/or marker_byte_position.
1586
15872012-12-11 Juanma Barranquero <lekktu@gmail.com>
1588
1589 * makefile.w32-in (SIG2STR_H): New macro.
1590 (SYSWAIT_H, $(BLD)/emacs.$(O), $(BLD)/process.$(O))
1591 ($(BLD)/w32notify.$(O)): Update dependencies.
1592
15932012-12-10 Daniel Colascione <dancol@dancol.org>
1594
1595 * w32term.c, keyboard.c: Fix build break in cygw32 by omitting
1596 Windows file notification functionality unless WINDOWSNT.
1597
1598 * w32gui.h (hprevinst, lpCmdLine, nCmdShow): Remove unused
1599 declarations.
1600
1601 * w32fns.c (cache_system_info): Initialize the global hinst
1602 variable here so various initialization calls DTRT.
1603
1604 * unexw32.c (hprevinst, lpCmdLine, nCmdShow): Remove unused variables.
1605 (hinst): Remove unneeded extern declaration.
1606 (_start): Remove initialization of above variables; remove
1607 initialization of hinst, as cache_system_info now does that.
1608
1609 * emacs.c (main): Call cache_system_info early in startup; we
1610 previously weren't calling it in Cygwin builds.
1611
1612 * Makefile.in (ntsource, WINDRES, W32_RES, W#@_RES_LINK):
1613 Teach the autoconf build system how to compile a Windows resource file
1614 and link it to Emacs.
1615
16162012-12-10 Dmitry Antipov <dmantipov@yandex.ru>
1617
1618 Per-buffer window counters.
1619 * buffer.h (struct buffer): New member window_count.
1620 (buffer_window_count): New function.
1621 * buffer.c (Fget_buffer_create, Fmake_indirect_buffer):
1622 Initialize window_count.
1623 (Fkill_buffer): Verify window_count for the buffer being killed.
1624 (modify_overlay): Do not force redisplay if buffer is not shown
1625 in any window.
1626 (init_buffer_once): Initialize window_count for buffer_defaults
1627 and buffer_local_symbols.
1628 * window.h (buffer_shared): Remove declaration.
1629 (wset_buffer): Convert from inline ...
1630 * window.c (wset_buffer): ... to an ordinary function.
1631 (adjust_window_count): New function.
1632 (make_parent_window): Use it.
1633 * xdisp.c (buffer_shared): Remove.
1634 (redisplay_internal, redisplay_window): Adjust users.
1635 (buffer_shared_and_changed): Use per-buffer window counter.
1636
16372012-12-10 Eli Zaretskii <eliz@gnu.org>
1638
1639 Support for filesystem notifications on MS-Windows.
1640 * w32proc.c (sys_select): If drain_message_queue returns non-zero,
1641 and this is a TTY frame, signal the caller that keyboard input is
1642 available.
1643
1644 * w32xfns.c (drain_message_queue): Now returns an int: an
1645 indication whether any WM_EMACS_FILENOTIFY messages were found in
1646 the queue.
1647
1648 * w32inevt.c (handle_file_notifications): New function.
1649 (w32_console_read_socket): Call it to process file notifications.
1650
1651 * w32console.c (initialize_w32_display): Record the main thread ID
1652 in dwMainThreadId.
1653
1654 * deps.mk (inotify.o): New dependency list.
1655
1656 * Makefile.in (SOME_MACHINE_OBJECTS): Add w32notify.o.
1657
1658 * w32term.h (WM_EMACS_FILENOTIFY): New custom message.
1659 (WM_EMACS_END): Bump value by 1.
1660 (notification_buffer_in_use, file_notifications)
1661 (notifications_size, notifications_desc): Declare.
1662 (w32_get_watch_object, lispy_file_action, globals_of_w32notify):
1663 Add prototypes.
1664
1665 * w32term.c (lispy_file_action, queue_notifications): New functions.
1666 (syms_of_w32term) <Qadded, Qremoved, Qmodified, Qrenamed_from>
1667 <Qrenamed_to>: New symbols.
1668 (w32_read_socket): Handle the WM_EMACS_FILENOTIFY message.
1669
1670 * w32notify.c: New file, implements file event notifications for
1671 MS-Windows.
1672
1673 * w32fns.c (w32_wnd_proc): Handle the WM_EMACS_FILENOTIFY message
1674 by posting it to the w32_read_socket queue.
1675
1676 * termhooks.h (enum event_kind) [HAVE_NTGUI]: Support FILE_NOTIFY_EVENT.
1677
1678 * makefile.w32-in (OBJ2): Add $(BLD)/w32notify.$(O).
1679 (GLOBAL_SOURCES): Add w32notify.c
1680 ($(BLD)/w32notify.$(O)): New set of dependencies.
1681
1682 * lisp.h (syms_of_w32notify) [WINDOWSNT]: Add prototype.
1683
1684 * keyboard.c (kbd_buffer_get_event) [WINDOWSNT]:
1685 Handle FILE_NOTIFY_EVENT.
1686 (syms_of_keyboard) [HAVE_NTGUI] <Qfile_notify>: New symbol.
1687 (keys_of_keyboard) [WINDOWSNT]: Bind file-notify to
1688 w32notify-handle-event by default.
1689
1690 * emacs.c (main) [WINDOWSNT]: Call globals_of_w32notify and
1691 syms_of_w32notify.
1692
16932012-12-10 Rüdiger Sonderfeld <ruediger@c-plusplus.de>
1694
1695 Support for filesystem notifications on GNU/Linux via inotify.
1696 * termhooks.h (enum event_kind) [HAVE_INOTIFY]: Add FILE_NOTIFY_EVENT.
1697
1698 * lisp.h (syms_of_inotify) [HAVE_INOTIFY]: Add prototype.
1699
1700 * keyboard.c (Qfile_inotify) [HAVE_INOTIFY]: New variable.
1701 (syms_of_keyboard): DEFSYM it.
1702 (kbd_buffer_get_event) [HAVE_INOTIFY]: Generate FILE_NOTIFY_EVENT.
1703 (make_lispy_event): Support FILE_NOTIFY_EVENT by generating
1704 Qfile_inotify events.
1705 (keys_of_keyboard) [HAVE_INOTIFY]: Bind file-inotify events in
1706 special-event-map to inotify-handle-event.
1707
1708 * emacs.c (main) [HAVE_INOTIFY]: Call syms_of_inotify.
1709
1710 * Makefile.in (base_obj): Add inotify.o.
1711
1712 * inotify.c: New file.
1713
17142012-12-10 Jan Djärv <jan.h.d@swipnet.se>
1715
1716 * nsterm.m (fd_handler:): FD_ZERO fds (Bug#13103).
1717
17182012-12-10 Fabrice Popineau <fabrice.popineau@gmail.com>
1719
1720 * w32fns.c (cache_system_info): Cast sysinfo_cache.dwPageSize to
1721 DWORD_PTR, for compatibility with 64-bit builds.
1722
1723 * w32.c (_PROCESS_MEMORY_COUNTERS_EX):
1724 (GetProcessWorkingSetSize_Proc, get_process_working_set_size)
1725 (system_process_attributes): Use SIZE_T rather than DWORD, for
1726 compatibility with 64-bit builds.
1727
17282012-12-10 Christopher Schmidt <christopher@ch.ristopher.com>
1729
1730 * lread.c (Vload_source_file_function): Doc fix (Bug#11647).
1731
17322012-12-10 Eli Zaretskii <eliz@gnu.org>
1733
1734 * indent.c (Fvertical_motion): If a display string will be
1735 displayed on the left or the right margin, don't consider it as a
1736 factor in cursor positioning. (Bug#13108)
1737
17382012-12-10 Martin Rudalics <rudalics@gmx.at>
1739
1740 * editfns.c (Fcompare_buffer_substrings): Reword doc-string.
1741
17422012-12-10 Paul Eggert <eggert@cs.ucla.edu>
1743
1744 * fileio.c (Fsubstitute_in_file_name): Use ptrdiff_t, not int,
1745 for string length.
1746
12012-12-08 Eli Zaretskii <eliz@gnu.org> 17472012-12-08 Eli Zaretskii <eliz@gnu.org>
2 1748
3 * w32.c (unsetenv): Return 0 if the input string is too long. 1749 * w32.c (unsetenv): Return 0 if the input string is too long.
@@ -264,9 +2010,9 @@
2642012-12-03 Fabrice Popineau <fabrice.popineau@gmail.com> 20102012-12-03 Fabrice Popineau <fabrice.popineau@gmail.com>
265 2011
266 * w32fns.c: Remove prototype of atof. 2012 * w32fns.c: Remove prototype of atof.
267 (syspage_mask): Declared DWORD_PTR, for compatibility with 64-bit 2013 (syspage_mask): Make it DWORD_PTR, for compatibility with 64-bit
268 builds. 2014 builds.
269 (file_dialog_callback): Declared UINT_PTR. 2015 (file_dialog_callback): Make it UINT_PTR.
270 2016
271 * w32common.h (syspage_mask): Declare DWORD_PTR, for compatibility 2017 * w32common.h (syspage_mask): Declare DWORD_PTR, for compatibility
272 with 64-bit builds. 2018 with 64-bit builds.
@@ -409,8 +2155,8 @@
409 (set_frame_menubar): Adjust user. 2155 (set_frame_menubar): Adjust user.
410 * w32term.h (struct x_output): Drop outdated #if 0 code. 2156 * w32term.h (struct x_output): Drop outdated #if 0 code.
411 (struct w32_output): Use bitfields for explicit_parent, 2157 (struct w32_output): Use bitfields for explicit_parent,
412 asked_for_visible and menubar_active members. Drop 2158 asked_for_visible and menubar_active members.
413 unused pending_menu_activation member. 2159 Drop unused pending_menu_activation member.
414 * xterm.h (struct x_output): Drop outdated #if 0 code. 2160 * xterm.h (struct x_output): Drop outdated #if 0 code.
415 Use bitfields for explicit_parent, asked_for_visible, 2161 Use bitfields for explicit_parent, asked_for_visible,
416 has_been_visible and net_wm_state_hidden_seen members. 2162 has_been_visible and net_wm_state_hidden_seen members.
@@ -503,8 +2249,8 @@
503 * fileio.c (Fsubstitute_in_file_name, Ffile_name_directory) 2249 * fileio.c (Fsubstitute_in_file_name, Ffile_name_directory)
504 (Fexpand_file_name) [DOS_NT]: Pass encoded file name to 2250 (Fexpand_file_name) [DOS_NT]: Pass encoded file name to
505 dostounix_filename. Prevents crashes down the road, because 2251 dostounix_filename. Prevents crashes down the road, because
506 dostounix_filename assumes it gets a unibyte string. Reported by 2252 dostounix_filename assumes it gets a unibyte string.
507 Michel de Ruiter <michel@sentient.nl>, see 2253 Reported by Michel de Ruiter <michel@sentient.nl>, see
508 http://lists.gnu.org/archive/html/help-emacs-windows/2012-11/msg00017.html 2254 http://lists.gnu.org/archive/html/help-emacs-windows/2012-11/msg00017.html
509 2255
5102012-11-20 Stefan Monnier <monnier@iro.umontreal.ca> 22562012-11-20 Stefan Monnier <monnier@iro.umontreal.ca>
@@ -942,7 +2688,7 @@
942 * image.c (xpm_make_color_table_h): Fix compiler error because 2688 * image.c (xpm_make_color_table_h): Fix compiler error because
943 make_hash_table changed. 2689 make_hash_table changed.
944 2690
9452012-11-08 Thomas Kappler <tkappler@gmail.com> (tiny change) 26912012-11-08 Thomas Kappler <tkappler@gmail.com> (tiny change)
946 2692
947 * nsfont.m (ns_findfonts): Handle empty matchingDescs (Bug#11541). 2693 * nsfont.m (ns_findfonts): Handle empty matchingDescs (Bug#11541).
948 2694
@@ -1499,7 +3245,7 @@
1499 3245
15002012-10-19 Stefan Monnier <monnier@iro.umontreal.ca> 32462012-10-19 Stefan Monnier <monnier@iro.umontreal.ca>
1501 3247
1502 * fns.c (Fnreverse): Include the problem element when signalling an 3248 * fns.c (Fnreverse): Include the problem element when signaling an
1503 error (bug#12677). 3249 error (bug#12677).
1504 3250
15052012-10-18 Jan Djärv <jan.h.d@swipnet.se> 32512012-10-18 Jan Djärv <jan.h.d@swipnet.se>
@@ -10390,7 +12136,7 @@
103902012-05-09 Michael Albinus <michael.albinus@gmx.de> 121362012-05-09 Michael Albinus <michael.albinus@gmx.de>
10391 12137
10392 * dbusbind.c (xd_registered_buses): New internal Lisp object. 12138 * dbusbind.c (xd_registered_buses): New internal Lisp object.
10393 Rename all occurences of Vdbus_registered_buses to xd_registered_buses. 12139 Rename all occurrences of Vdbus_registered_buses to xd_registered_buses.
10394 (syms_of_dbusbind): Remove declaration of Vdbus_registered_buses. 12140 (syms_of_dbusbind): Remove declaration of Vdbus_registered_buses.
10395 Initialize xd_registered_buses. 12141 Initialize xd_registered_buses.
10396 12142
@@ -20634,7 +22380,7 @@ See ChangeLog.11 for earlier changes.
20634;; coding: utf-8 22380;; coding: utf-8
20635;; End: 22381;; End:
20636 22382
20637 Copyright (C) 2011-2012 Free Software Foundation, Inc. 22383 Copyright (C) 2011-2013 Free Software Foundation, Inc.
20638 22384
20639 This file is part of GNU Emacs. 22385 This file is part of GNU Emacs.
20640 22386