* doc-view.el Fix bug#13887.
[bpt/emacs.git] / src / ChangeLog
CommitLineData
a5cc4dde
EZ
12013-03-14 Eli Zaretskii <eliz@gnu.org>
2
3 * w32term.c (w32_read_socket) <WM_WINDOWPOSCHANGED>: Remove old
4 and incorrect code. Treat WM_WINDOWPOSCHANGED like WM_ACTIVATE
5 and WM_ACTIVATEAPP.
6 (w32fullscreen_hook): If the frame is visible, reset
7 f->want_fullscreen flag after changing the frame size. If the
8 frame is not visible, set f->want_fullscreen to FULLSCREEN_WAIT.
9 (Bug#13953)
10
3fc5e44a
DC
112013-03-13 Daniel Colascione <dancol@dancol.org>
12
13 * emacs.c (main): Call syms_of_cygw32 on CYGWIN non-NTGUI builds
14 too so that these builds can use Cygwin's file conversion
15 functions. (We've been building and linking cygw32.o all along
16 and just not using it.)
17
47d7532e
PE
182013-03-13 Paul Eggert <eggert@cs.ucla.edu>
19
20 File synchronization fixes (Bug#13944).
21 * Makefile.in (LIB_FDATASYNC): New macro.
22 (LIBES): Use it.
23 * conf_post.h (BSD_SYSTEM, BSD_SYSTEM_AHB): Remove; no longer needed.
24 * fileio.c (Fwrite_region, write_region_inhibit_fsync):
25 Don't worry about HAVE_FSYNC, since a substitute fsync is
26 available if the system lacks one.
27 (Fwrite_regin): Retry fsync if interrupted.
28
c7ffccaf
EZ
292013-03-13 Eli Zaretskii <eliz@gnu.org>
30
31 * w32term.c (w32_read_socket): If we Emacs frame is being
32 activated, call w32fullscreen_hook, to make sure the new frame
33 dimensions are in effect. (Bug#13937)
34
8a7debc1
DA
352013-03-13 Dmitry Antipov <dmantipov@yandex.ru>
36
37 * xdisp.c (init_iterator): Simplify because both character and byte
38 positions are either specified or -1. Add eassert. Adjust comment.
ffcd945e
DA
39 * window.c (Fscroll_other_window): Use SET_PT_BOTH because both
40 character and byte positions can be obtained from marker.
8a7debc1 41
7fd8c501
PE
422013-03-13 Paul Eggert <eggert@cs.ucla.edu>
43
d9df6f40
PE
44 Static checking by Sun C 5.12.
45 * alloc.c (buffer_memory_full) [REL_ALLOC]:
46 * bytecode.c (exec_byte_code):
47 * dispnew.c (init_display):
48 * eval.c (error):
49 * fileio.c (Fsubstitute_in_file_name):
50 * keyboard.c (Fevent_convert_list):
51 * keymap.c (Fsingle_key_description):
52 * term.c (maybe_fatal, fatal):
53 * xfns.c (Fx_display_backing_store, Fx_display_visual_class):
54 * xsmfns.c (Fhandle_save_session):
55 Omit unreachable code.
56 * keymap.c (map_keymap_char_table_item): Cast void * to
57 a function pointer type; the C Standard requires this.
58
7fd8c501
PE
59 * sysdep.c: Remove a use of BSD_SYSTEM, which I'm trying to phase out.
60 Include <sys/param.h> unconditionally, as that works elsewhere and
61 is simpler here. Include <sys/sysctl.h> if DARWIN_OS ||
62 __FreeBSD__, not if BSD_SYSTEM, since it's needed only for Darwin
63 and FreeBSD now.
64
cb0290df
PE
652013-03-11 Paul Eggert <eggert@cs.ucla.edu>
66
67 * insdel.c (adjust_after_replace): Use bool for boolean.
68
cbae07d5
SM
692013-03-11 Stefan Monnier <monnier@iro.umontreal.ca>
70
71 * keyboard.c: Move keyboard decoding to read_key_sequence.
72 (decode_keyboard_code): Remove.
73 (tty_read_avail_input): Don't try to decode input.
74 (read_decoded_char): New function.
75 (read_key_sequence): Use it.
76
819e2da9
DC
772013-03-10 Daniel Colascione <dancol@dancol.org>
78
79 * w32term.h (GUISTR, GUI_ENCODE_FILE, GUI_ENCODE_SYSTEM, GUI_FN)
80 (GUI_SDATA, guichar_t): Macros to abstract out differences between
81 NTGUI_UNICODE and !NTGUI_UNICODE builds, some moved out of
82 w32fns.c.
83
84 * w32term.c (construct_drag_n_drop): Use the above macros to make
85 drag-and-drop work for non-ASCII filenames in cygw32 builds.
86
87 * w32fns.c (x_set_name, x_set_title): Use the above macros to
88 properly display non-ASCII frame titles in cygw32 builds.
89
90 * w32fns.c (Fw32_shell_execute): Use the above macros to properly
91 call ShellExecute in cygw32 builds.
92
93 * w32fn.c (Fx_file_dialog): Use the above macros to simplify the
94 common file dialog code.
95
96 * w32fns.c (Ffile_system_info): Remove from cygw32 builds, which
97 can just use du like other systems.
98
99 * coding.c (from_unicode_buffer): Declare.
100 * coding.c (from_unicode_buffer): Implement.
101
99ec1647
SM
1022013-03-10 Stefan Monnier <monnier@iro.umontreal.ca>
103
d2e24f92
SM
104 * lread.c: Minor cleanup.
105 (FROM_FILE_P): New macro.
106 (skip_dyn_bytes, unreadchar, read1): Use it.
107 (read_list): Consolidate duplicated code.
108
99ec1647
SM
109 * bytecode.c (struct byte_stack): Remove `constants' when unused.
110
138c0ae8
EZ
1112013-03-10 Eli Zaretskii <eliz@gnu.org>
112
113 * xdisp.c (display_tool_bar_line, redisplay_tool_bar)
114 (redisplay_internal, set_cursor_from_row, try_window)
115 (try_window_id, dump_glyph_row, extend_face_to_end_of_line)
116 (display_line, notice_overwritten_cursor)
99ec1647
SM
117 (mouse_face_from_buffer_pos, note_mouse_highlight):
118 Use MATRIX_ROW_DISPLAYS_TEXT_P.
138c0ae8 119 (note_mouse_highlight): Use MATRIX_ROW_GLYPH_START.
99ec1647
SM
120 (mouse_face_from_string_pos, fast_find_string_pos):
121 Use MATRIX_ROW_VPOS.
138c0ae8
EZ
122
123 * xfns.c (Fx_show_tip): Use MATRIX_ROW_DISPLAYS_TEXT_P.
124
125 * w32fns.c (Fx_show_tip): Use MATRIX_ROW_DISPLAYS_TEXT_P.
126
127 * xdisp.c (try_cursor_movement): Use MATRIX_ROW and
128 MATRIX_MODE_LINE_ROW.
129
130 * dispnew.c (update_window): Use MATRIX_ROW and MATRIX_MODE_LINE_ROW.
131
c230dd7d
KH
1322013-03-10 handa <handa@gnu.org>
133
134 * lisp.h (adjust_after_replace): Extern it.
135
136 * coding.c (detect_coding): Cound the heading ASCII bytes in the
137 case of detection for coding_category_utf_8_auto.
99ec1647
SM
138 (decode_coding_gap) [not CODING_DISABLE_ASCII_OPTIMIZATION]:
139 Skip decoding if all bytes are ASCII.
c230dd7d
KH
140
141 * insdel.c (adjust_after_replace): Make it public. New arg
142 text_at_gap_tail.
143 (adjust_after_insert): Call adjust_after_replace with the new arg
144 value 0.
145
27a98a62
SM
1462013-03-09 Stefan Monnier <monnier@iro.umontreal.ca>
147
148 * keyboard.h (EVENT_START, EVENT_END, POSN_WINDOW, POSN_POSN)
149 (POSN_WINDOW_POSN, POSN_TIMESTAMP): Be careful since events may come
150 from Elisp via unread-command-events.
151
152 * keyboard.c (access_keymap_keyremap): Accept nil return value from
153 functions to mean "no change".
154
457882c2
PE
1552013-03-08 Paul Eggert <eggert@cs.ucla.edu>
156
157 region-cache.c, scroll.c, search.c: Use bool for booleans.
158 * lisp.h (compile_pattern):
159 * scroll.c (do_scrolling, do_direct_scrolling):
160 * search.c (struct regexp_cache, compile_pattern_1)
161 (compile_pattern, string_match_1, search_command)
162 (trivial_regexp_p, search_buffer, Freplace_match, match_limit)
163 (search_regs_saved, Fregexp_quote):
164 Use bool for boolean.
165 * region-cache.c (region_cache_forward, region_cache_backward):
166 Fix comments to match code: these functions return int, not boolean.
167
b5426561
DA
1682013-03-08 Dmitry Antipov <dmantipov@yandex.ru>
169
170 * search.c (find_newline): Accept start and end byte positions
171 as arguments and allow -1 if not known.
172 (find_newline_no_quit): Likewise for start position.
173 * lisp.h (find_newline, find_newline_no_quit): Adjust prototype.
174 * bidi.c (bidi_find_paragraph_start): Pass byte position to
175 find_newline_no_quit, thus eliminating CHAR_TO_BYTE.
27a98a62
SM
176 * editfns.c (Fconstrain_to_field): Break long line.
177 Adjust call to find_newline.
b5426561
DA
178 * indent.c (vmotion): Adjust calls to find_newline_no_quit.
179 Use DEC_BOTH to start next search from the previous buffer
180 position, where appropriate.
181 * xdisp.c (back_to_previous_line_start, forward_to_next_line_start)
182 (get_visually_first_element, move_it_vertically_backward): Likewise.
183 Obtain byte position from the display iterator, where appropriate.
184
0bce5d9e
PE
1852013-03-08 Paul Eggert <eggert@cs.ucla.edu>
186
187 print.c, process.c: Use bool for booleans.
188 * lisp.h (wait_reading_process_output):
189 * print.c (print_output_debug_flag, PRINTDECLARE, printchar)
190 (strout, debug_output_compilation_hack, float_to_string, print)
191 (print_object):
192 * process.c (kbd_is_on_hold, inhibit_sentinels, process_output_skip)
193 (decode_status, status_message, create_process, create_pty)
194 (Fmake_network_process, Fnetwork_interface_info)
195 (wait_reading_process_output, read_process_output)
196 (write_queue_push, write_queue_pop, process_send_signal)
197 (handle_child_signal, keyboard_bit_set, kbd_on_hold_p):
198 * process.h (struct Lisp_Process, inhibit_sentinels, kbd_on_hold_p):
199 Use bool for booleans.
200 * process.c (Fnetwork_interface_list): Remove unused local.
201 (connect_counter): Now EMACS_INT, not int.
202
36075a19
DA
2032013-03-08 Dmitry Antipov <dmantipov@yandex.ru>
204
205 * bidi.c (bidi_fetch_char): Swap first and second arguments
206 to match other functions accepting character and byte positions.
207 Adjust comment.
208 (bidi_resolve_explicit_1, bidi_level_of_next_char): Adjust users.
209 (bidi_paragraph_init): Likewise. Use DEC_BOTH which is faster
210 when you need just to move to the previous buffer position.
211 * xdisp.c (Fcurrent_bidi_paragraph_direction): Use DEC_BOTH.
212
4aae1914
EZ
2132013-03-07 Eli Zaretskii <eliz@gnu.org>
214
215 * .gdbinit (prowlims): Display the enabled_p flag of the row.
216
c54aa166
DA
2172013-03-07 Dmitry Antipov <dmantipov@yandex.ru>
218
219 Avoid character to byte conversions in motion subroutines.
220 * indent.h (compute_motion, vmotion): Add byte position argument.
221 * indent.c (compute_motion): Use it and avoid CHAR_TO_BYTE.
222 Add eassert.
223 (Fcompute_motion): Break long line. Adjust call to compute_motion.
224 Use list5 for return value.
225 (vmotion): Use byte position argument and avoid call to CHAR_TO_BYTE.
226 Adjust comments, style and calls to compute_motion.
227 (Fvertical_motion): Adjust call to vmotion.
228 * window.c (Fdelete_other_windows_internal): Record window start
229 byte position and adjust call to vmotion.
230 (window_scroll_line_based): Likewise with call to compute_motion.
231 Use SET_PT_BOTH.
232 (Frecenter): Adjust calls to vmotion.
233
3de717bd
DA
2342013-03-07 Dmitry Antipov <dmantipov@yandex.ru>
235
236 * lisp.h (list2i, list3i): New functions.
237 (list4i): Move from window.c and make LISP_INLINE.
238 * editfns.c (make_lisp_time):
239 * fns.c (Flocale_info):
240 * keyboard.c (parse_modifiers):
241 * xterm.c (x_ewmh_activate_frame): Use list2i.
242 * instel.c (signal_after_change):
243 * nsfns.m (Fx_server_version, Fxw_color_values):
244 * w32fns.c (Fxw_color_values, Fx_server_version):
245 * xfns.c (Fxw_color_values, Fx_server_version): Use list3i.
246 * fileio.c (Fvisited_file_modtime):
247 * nsfns.m (Fns_display_usable_bounds):
248 * w32.c (ltime): Use list4i.
249
d26e478e
EZ
2502013-03-06 Eli Zaretskii <eliz@gnu.org>
251
a611149e
EZ
252 * search.c (find_newline_no_quit): Rename from find_next_newline.
253 Add commentary.
254
255 * lisp.h (find_newline_no_quit): Rename prototype.
256
257 * xdisp.c (back_to_previous_line_start)
258 (forward_to_next_line_start, get_visually_first_element)
259 (move_it_vertically_backward): Callers of find_newline_no_quit changed.
260 * indent.c (vmotion): Callers of find_newline_no_quit changed.
261 * bidi.c (bidi_find_paragraph_start): Callers of
262 find_newline_no_quit changed.
263
d26e478e
EZ
264 * msdos.c: Change encoding to cp850. (Bug#13879)
265 (fr_keyboard, it_keyboard, dk_keyboard): Update keyboard layouts.
266
1af1a51a
DA
2672013-03-06 Dmitry Antipov <dmantipov@yandex.ru>
268
269 Coding system support cleanup and minor refactoring.
270 * coding.h (enum coding_result_code): Remove
271 CODING_RESULT_INCONSISTENT_EOL and CODING_RESULT_INSUFFICIENT_MEM.
272 (toplevel): Remove unused CODING_MODE_INHIBIT_INCONSISTENT_EOL.
273 (CODING_MODE_LAST_BLOCK, CODING_MODE_SELECTIVE_DISPLAY)
274 (CODING_MODE_DIRECTION, CODING_MODE_FIXED_DESTINATION)
275 (CODING_MODE_SAFE_ENCODING): Rearrange bit values.
276 (decode_coding_region, encode_coding_region, decode_coding_string):
277 Remove unused compatibility macros.
278 * coding.c (Qinconsistent_eol, Qinsufficient_memory): Remove.
279 (record_conversion_result): Adjust user.
280 (syms_of_coding): Likewise.
281 (ALLOC_CONVERSION_WORK_AREA): Use SAFE_ALLOCA.
282 (decode_coding, encode_coding): Add USE_SAFE_ALLOCA and SAFE_FREE.
283 (decode_coding_object): Simplify since xrealloc never returns NULL.
284 Add eassert.
285
0bafabe7 2862013-03-06 Paul Eggert <eggert@cs.ucla.edu>
725eb027 287
9b1c3271 288 Fix a build failure on OpenBSD 4.x and MirBSD (Bug#13881).
0845a75c
PE
289 * sysdep.c (list_system_processes)
290 [BSD_SYSTEM && !DARWIN_OS && !__FreeBSD__]:
9b1c3271 291 Make it a stub in this case; otherwise the build might fail,
0845a75c 292 and this code hasn't been tested on such hosts anyway.
725eb027 293 Problem reported by Nelson H. F. Beebe in
9b1c3271
PE
294 <http://lists.gnu.org/archive/html/emacs-devel/2013-03/msg00021.html>
295 and analyzed by Jérémie Courrèges-Anglas in
296 <http://lists.gnu.org/archive/html/emacs-devel/2013-03/msg00062.html>.
725eb027 297
ffc65bee
DA
2982013-03-06 Dmitry Antipov <dmantipov@yandex.ru>
299
300 * lisp.h (find_next_newline_no_quit): Rename to find_next_newline.
301 * xdisp.c (back_to_previous_line_start, forward_to_next_line_start)
302 (get_visually_first_element, move_it_vertically_backward): Ajust users.
303 * bidi.c (bidi_find_paragraph_start): Likewise.
304 * indent.c (vmotion): Likewise.
305
70743157
PE
3062013-03-05 Paul Eggert <eggert@cs.ucla.edu>
307
308 FILE's lock is now always .#FILE and may be a regular file (Bug#13807).
309 * filelock.c: Include <c-ctype.h>.
310 (MAX_LFINFO): New top-level constant.
311 (lock_info_type): Remove members pid, boot_time. Add members at,
312 dot, colon. Change user member to be the entire buffer, not a
313 pointer. This allows us to handle the case where a foreign
314 pid or boot time exceeds the local range. All uses changed.
315 (LINKS_MIGHT_NOT_WORK): New constant.
316 (FREE_LOCK_INFO): Remove, as the pieces no longer need freeing.
317 (defined_WINDOWSNT): Remove.
318 (MAKE_LOCK_NAME, file_in_lock_file_name):
319 Always use .#FILE (not .#-FILE) for the file lock,
320 even if it is a regular file.
321 (rename_lock_file): New function.
322 (create_lock_file): Use it.
323 (create_lock_file, read_lock_data):
324 Prefer a symbolic link for the lock file, falling back on a
325 regular file if symlinks don't work. Do not try to create
326 symlinks on MS-Windows, due to security hassles. Stick with
327 POSIXish functions (open, read, write, close, fchmod, readlink, symlink,
328 link, rename, unlink, mkstemp) when creating locks, as a GNUish
329 host may be using a Windowsish file system, and cannot use
330 MS-Windows-only system calls. Fall back on mktemp if mkstemp
331 doesn't work. Don't fail merely because of a symlink-contents
332 length limit in the current file system; fall back on regular
333 files. Increase the symlink contents length limit to 8 KiB, this
334 should be big enough for any real use and doesn't crunch the
335 stack.
336 (create_lock_file, lock_file_1, read_lock_data):
337 Simplify allocation of lock file buffers now that they fit in 8 KiB.
338 (lock_file_1): Return error number, not bool. All callers changed.
339 (ELOOP): New macro, if not already defined.
340 (read_lock_data): Return size of lock file contents, not Lisp object.
341 All callers changed. Handle a race condition if some other process
342 replaces a regular-file lock with a symlink lock or vice versa,
343 while we're trying to read the lock.
344 (current_lock_owner): Parse contents more carefully, to help avoid
345 confusing a regular-file lock with some other application's use
346 of the file. Check for lock file contents being too long, or
347 not parsing correctly.
348 (current_lock_owner, lock_file):
349 Allow foreign pid and boot times that exceed the local range.
350 (current_lock_owner, lock_if_free, lock_file):
351 Simplify allocation of lock file contents.
352 * w32.c (sys_rename_replace): New function, containing most of
353 the contents of the old sys_rename.
354 (sys_rename): Use it.
355 (fchmod): New dummy function.
356 * w32.h (sys_rename_replace, fchmod): New decls.
357
05e193f1
EZ
3582013-03-05 Eli Zaretskii <eliz@gnu.org>
359
360 * bidi.c (bidi_resolve_explicit_1): Don't call CHAR_TO_BYTE or
361 bidi_count_bytes, as the callers now arrange for bidi_it->charpos
362 to be in sync with bidi_it->bytepos. Suggested by Dmitry Antipov
363 <dmantipov@yandex.ru>.
364
3bfc46eb
DA
3652013-03-05 Dmitry Antipov <dmantipov@yandex.ru>
366
367 * composite.c (get_composition_id, fill_gstring_header):
368 Use make_uninit_vector where appropriate.
369 * font.c (Ffont_get_glyphs, build_style_table): Likewise.
370 * xselect.c (clean_local_selection_data): Likewise.
371
84ac6f9d
PE
3722013-03-04 Paul Eggert <eggert@cs.ucla.edu>
373
374 Fix misuse of ImageMagick that caused core dump (Bug#13846).
375 * image.c (imagemagick_load_image): Calculate height and width
376 after flattening the image, not before.
377
42926ec8
DA
3782013-03-04 Dmitry Antipov <dmantipov@yandex.ru>
379
380 * font.c (Ffont_get_glyphs): Use convenient LGLYPH_NEW.
381 * ftfont.c (ftfont_shape_by_flt): Likewise.
382 * w32uniscribe.c (uniscribe_shape): Likewise.
383
b5029e23
PE
3842013-03-02 Paul Eggert <eggert@cs.ucla.edu>
385
386 The lock for FILE is now .#FILE or .#-FILE (Bug#13807).
387 The old approach, which fell back on DIR/.#FILE.0 through
388 DIR/.#FILE.9, had race conditions that could not be easily fixed.
389 If DIR/.#FILE is a non-symlink file, Emacs now does not create a
390 lock file for DIR/FILE; that is, DIR/FILE is no longer partly
391 protected by a lock if DIR/.#FILE is a non-symlink file ("partly"
392 because the locking mechanism was never reliable in that case).
393 This patch fixes this and other bugs discovered by a code
394 inspection that was prompted by
395 <http://lists.gnu.org/archive/html/emacs-devel/2013-02/msg00531.html>.
396 Also, this patch switches to .#-FILE (not .#FILE) on MS-Windows,
397 to avoid interoperability problems between the MS-Windows and
398 non-MS-Windows implementations. MS-Windows and non-MS-Windows
399 instances of Emacs now ignore each others' locks.
400 * filelock.c (defined_WINDOWSNT): New constant.
401 (MAKE_LOCK_NAME, fill_in_lock_file_name):
402 Don't create DIR/.#FILE.0 through DIR/.#FILE.9. Instead, create
403 DIR/.#FILE symlinks on non-MS-Windows hosts, and DIR/.#-FILE
404 regular files on MS-Windows hosts.
405 (MAKE_LOCK_NAME, unlock_file, Ffile_locked_p):
406 Use SAFE_ALLOCA to avoid problems with long file names.
407 (MAX_LFINFO): Now a local constant, not a global macro.
408 (IS_LOCK_FILE): Remove.
409 (lock_file_1): Don't inspect errno if symlink call succeeds;
410 that's not portable.
411 (lock_file): Document that this function can return if lock
412 creation fails.
2db41375 413 (lock_file): Don't access freed storage.
b5029e23 414
b270d116
AS
4152013-03-02 Andreas Schwab <schwab@linux-m68k.org>
416
417 * lisp.h (XPNTR) [!USE_LSB_TAG]: Remove extra paren. (Bug#13734)
418
81c23309
PE
4192013-03-02 Paul Eggert <eggert@cs.ucla.edu>
420
421 * textprop.c: Use bool for booleans.
422 (validate_interval_range, Fadd_text_properties)
423 (Fremove_text_properties): Prefer bool to int when either works.
424
18f2ac09
EZ
4252013-03-02 Eli Zaretskii <eliz@gnu.org>
426
27a98a62
SM
427 * textprop.c (Fadd_text_properties, Fremove_text_properties):
428 If the interval tree changes as a side effect of calling
18f2ac09
EZ
429 modify_region, re-do processing starting from the call to
430 validate_interval_range. (Bug#13743)
431
929aeac6 4322013-02-28 Eli Zaretskii <eliz@gnu.org>
c49e2256
EZ
433
434 * w32.c (sys_open): Don't reset the flags for FD in fd_info[].
435 (Bug#13546).
436
531e70ec
EZ
4372013-02-27 Eli Zaretskii <eliz@gnu.org>
438
439 * filelock.c (create_lock_file) [WINDOWSNT]: Use _sopen with
440 _SH_DENYRW flag, instead of emacs_open, to deny any other process
441 access to the lock file until it is written and closed.
442 (Bug#13807)
443
6e65b9cc
PE
4442013-02-27 Paul Eggert <eggert@cs.ucla.edu>
445
446 * callint.c (Qcall_interactively):
447 * macros.c (Qexecute_kbd_macro):
448 Now static.
449
3b166f09
BG
4502013-02-26 Bastien Guerry <bzg@gnu.org>
451
452 * window.c (Frecenter): Tiny docstring enhancement.
453
ecc0fdd4
PE
4542013-02-26 Paul Eggert <eggert@cs.ucla.edu>
455
456 Minor textprop integer cleanup.
457 * intervals.h, textprop.c (add_text_properties_from_list):
458 Return void, not int, since nobody uses the return value.
459 * textprop.c (validate_plist, add_properties, remove_properties)
460 (Fadd_text_properties):
461 Don't assume list length fits in int.
462 (interval_has_all_properties, interval_has_some_properties)
463 (interval_has_some_properties_list, add_properties, remove_properties)
464 (Fadd_text_properties, Fremove_text_properties)
465 (Fremove_list_of_text_properties, text_property_stickiness):
466 Use bool for booleans.
467 (Fadd_text_properties, Fremove_text_properties):
468 (Fremove_list_of_text_properties):
469 Reindent do-while as per GNU style.
470
0248b0d7
EZ
4712013-02-25 Eli Zaretskii <eliz@gnu.org>
472
343a2aef
EZ
473 Implement CLASH_DETECTION for MS-Windows.
474
475 * filelock.c [WINDOWSNT]: Include w32.h.
476 (MAKE_LOCK_NAME): Don't use 'lock', it clashes with MS runtime
477 function of that name. Up-case the macro arguments.
478 (IS_LOCK_FILE): New macro.
479 (fill_in_lock_file_name): Use IS_LOCK_FILE instead of S_ISLNK.
480 (create_lock_file): New function, with body extracted from
481 lock_file_1.
482 [WINDOWSNT]: Implement lock files by writing a regular file with
483 the lock information as its contents.
484 (read_lock_data): New function, on Posix platforms just calls
485 emacs_readlinkat.
486 [WINDOWSNT]: Read the lock info from the file.
487 (current_lock_owner): Call read_lock_data instead of calling
488 emacs_readlinkat directly.
489 (lock_file) [WINDOWSNT]: Run the file name through
490 dostounix_filename.
491
492 * w32proc.c (sys_kill): Support the case of SIG = 0, in which case
493 just check if the process by that PID exists.
494
495 * w32.c (sys_open): Don't reset the _O_CREAT flag if _O_EXCL is
496 also present, as doing so will fail to error out if the file
497 already exists.
498
499 * makefile.w32-in ($(BLD)/filelock.$(O)): Depend on src/w32.h.
500
0248b0d7
EZ
501 * textprop.c (Fadd_text_properties, Fremove_text_properties)
502 (Fremove_list_of_text_properties): Skip all of the intervals in
503 the region between START and END that already have resp. don't
27a98a62
SM
504 have the requested properties, not just the first one.
505 Add assertions that the loop afterwards always modifies the
0248b0d7
EZ
506 properties. (Bug#13743)
507
b5071fc7
SM
5082013-02-25 Stefan Monnier <monnier@iro.umontreal.ca>
509
510 * callint.c (Fcall_interactively): Use the right lexical environment
511 for `interactive' specs (bug#13811).
512 * eval.c (Feval): Accept a lexical environment.
513
1ddc2bd6
PE
5142013-02-25 Paul Eggert <eggert@cs.ucla.edu>
515
516 Simplify data_start configuration (Bug#13783).
517 This is a followon simplification to the fix for Bug#13650.
518 * Makefile.in (LD_FIRSTFLAG, LIB_GCC, CRT_DIR, LIB_STANDARD)
519 (START_FILES): Remove. All uses removed.
520 (otherobj): Remove $(VMLIMIT_OBJ), as it's now first.
521 (ALLOBJS): Move here from autodeps.mk, and with VMLIMITS_OBJ first.
522 (buildobj.h): Use it.
523 ($(ALLOBJS)): Depend on globals.h.
524 (temacs$(EXEEXT)): Use $(ALLOBJS).
525 * autodeps.mk (ALLOBJS): Move to Makefile.in.
526 * deps.mk (vm-limit.o):
527 * makefile.w32-in ($(BLD)/vm-limit.$(O)):
528 Do not depend on mem-limits.h.
529 * emacs.c (__do_global_ctors, __do_global_ctors_aux)
530 (__do_global_dtors, __CTOR_LIST__, __DTOR_LIST__)
531 [__GNUC__ && !ORDINARY_LINK]: Remove.
532 * mem-limits.h, pre-crt0.c: Remove.
533 * unexaix.c, unexcoff.c: Don't include mem-limits.h.
534 * unexcoff.c (etext): New decl.
535 (make_hdr): Use DATA_START instead of start_of_data.
536 * vm-limit.c: Move most of mem-limits.h's contents here.
537 (data_start): New decl. It's OK if this is approximate,
538 so simplify-away some unnecessary exactness.
539 (POINTER): Remove; all uses removed.
540 (data_space_start): Now char *, to avoid casts.
541 (exceeds_lisp_ptr): New function, replacing the old
542 EXCEEDS_LISP_PTR macro. All uses changed.
543 (check_memory_limits): Simplify and remove casts.
544 (start_of_data) [!CANNOT_DUMP || !SYSTEM_MALLOC]: Remove.
545 (memory_warnings): Use data_start instead of start_of_data.
546
51aa2a8b
AS
5472013-02-24 Andreas Schwab <schwab@linux-m68k.org>
548
549 * xdisp.c (set_message): Only check for debug-on-message if STRING
550 is a string. (Bug#13797)
551
1938d88c
PE
5522013-02-24 Paul Eggert <eggert@cs.ucla.edu>
553
554 Fix regression introduced by July 10 filelock.c patch.
555 * filelock.c (fill_in_lock_file_name): Fix crash caused by the
556 2012-07-10 patch to this file. Reported by Eli Zaretskii in
557 <http://lists.gnu.org/archive/html/emacs-devel/2013-02/msg00533.html>
558 and diagnosed by Andreas Schwab in
559 <http://lists.gnu.org/archive/html/emacs-devel/2013-02/msg00534.html>.
560
fcee5028
PE
5612013-02-22 Paul Eggert <eggert@cs.ucla.edu>
562
563 Assume C89 or better.
564 * ralloc.c (SIZE, POINTER, NIL):
565 * vm-limit.c (POINTER):
566 Remove, replacing all uses with C89 equivalents. These old
567 symbols were present only for porting to pre-C89 platforms.
568
d78cf5ed
CB
5692013-02-22 Claudio Bley <claudio.bley@gmail.com>
570
571 * w32.c (emacs_gnutls_pull): Don't call 'select', and don't loop.
572 This avoids warning messages reported as part of Bug#13546.
573
6bcd97a4
KB
5742013-02-21 Ken Brown <kbrown@cornell.edu>
575
576 * sheap.c (report_sheap_usage): Fix arguments of message1_no_log.
577
b6c2bfff
SM
5782013-02-20 Stefan Monnier <monnier@iro.umontreal.ca>
579
e11dacb5
SM
580 * sheap.c (report_sheap_usage): Prefer message1_nolog.
581
b6c2bfff
SM
582 * keyboard.c (Qcommand_execute): New var.
583 (command_loop_1, read_char): Use it.
584 (Fcommand_execute): Remove, replace by an Elisp implementation.
585 (syms_of_keyboard): Adjust accordingly.
586
d69f1120 5872013-02-19 Daniel Colascione <dancol@dancol.org>
b6c2bfff 588
d69f1120
DC
589 * sheap.c (report_sheap_usage): Use message, not message1, so
590 that we don't try to create a buffer while we're in the middle
591 of dumping Emacs. Explain why.
b6c2bfff 592
2a14a4f1 5932013-02-20 Dmitry Antipov <dmantipov@yandex.ru>
42926ec8 594
2a14a4f1
DA
595 * search.c (find_newline): Return byte position in bytepos.
596 Adjust comment.
b6c2bfff
SM
597 (find_next_newline_no_quit, find_before_next_newline):
598 Add bytepos argument.
2a14a4f1
DA
599 * lisp.h (find_newline, find_next_newline_no_quit)
600 (find_before_next_newline): Adjust prototypes.
601 * bidi.c (bidi_find_paragraph_start):
602 * editfns.c (Fconstrain_to_field, Fline_end_position):
603 * indent.c (compute_motion, vmotion):
604 * xdisp.c (back_to_previous_line_start, forward_to_next_line_start):
605 (get_visually_first_element, move_it_vertically_backward):
606 Adjust users and avoid calls to CHAR_TO_BYTE where appropriate.
607
872faefb 6082013-02-19 Eli Zaretskii <eliz@gnu.org>
17ddfd15
EZ
609
610 * w32proc.c (new_child): Avoid leaking handles if the subprocess
611 resources were not orderly released.
612
fd80c659
EZ
6132013-02-17 Eli Zaretskii <eliz@gnu.org>
614
615 * xdisp.c (x_draw_vertical_border): For a window that is neither
616 the leftmost nor the rightmost, redraw both the left and the right
617 vertical borders. (Bug#13723)
618
2f73da9c
SM
6192013-02-17 Stefan Monnier <monnier@iro.umontreal.ca>
620
621 * xml.c (init_libxml2_functions):
622 * sound.c (sound_warning):
623 * sheap.c (report_sheap_usage):
624 * process.c (wait_reading_process_output):
625 * msdos.c (XMenuActivate):
626 * macros.c (Fstart_kbd_macro, Fend_kbd_macro):
627 * keyboard.c (top_level_1):
628 * editfns.c (Fmessage, Fmessage_box):
629 * callint.c (Fcall_interactively):
630 * fns.c (Fyes_or_no_p): Prefer `message1' over `message'.
631
fd9547e8
JD
6322013-02-17 Jan Djärv <jan.h.d@swipnet.se>
633
634 * xterm.c (syms_of_xterm): Move scroll-bar-adjust-thumb-portion ...
fd9547e8
JD
635 * frame.c (syms_of_frame): ... to here.
636
f277993b
EZ
6372013-02-16 Eli Zaretskii <eliz@gnu.org>
638
c7939585
EZ
639 * w32.c (sys_chown): Remove unused function.
640
cd91fb4b
EZ
641 * w32term.c <input_signal_count>: Declare 'volatile'
642 unconditionally. (Bug#9066)
643
f277993b
EZ
644 * w32.c (set_errno): Reset h_errno and don't set it to any other
645 value. Set errno instead.
646 (check_errno): Reset h_errno.
647 (sys_socket, socket_to_fd, sys_bind, sys_connect)
648 (sys_gethostname, sys_getservbyname, sys_getpeername)
649 (sys_shutdown, sys_setsockopt, sys_listen, sys_getsockname)
650 (sys_accept, sys_recvfrom, sys_sendto, fcntl, sys_read): Don't set
651 h_errno.
652 (sys_gethostbyname): Set h_errno only errors detected.
653
e454145b
PE
6542013-02-15 Paul Eggert <eggert@cs.ucla.edu>
655
656 * process.c (h_errno) [!HAVE_H_ERRNO]: Remove unused decl.
657
bcf7fe2a
EZ
6582013-02-15 Eli Zaretskii <eliz@gnu.org>
659
ef9c57e2
EZ
660 * keyboard.c (read_char): Fix calculation of auto-save time out
661 when auto-save-timeout is less than 4. (Bug#13720)
662
ef862e20 663 * w32proc.c (new_child): Free up to 2 slots of dead processes at a
b2af991a 664 time. Improve diagnostics in DebPrint. (Bug#13546)
ef862e20 665
bcf7fe2a
EZ
666 * w32.c (sys_socket, sys_bind, sys_connect, sys_gethostname)
667 (sys_gethostbyname, sys_getservbyname, sys_getpeername)
668 (sys_shutdown, sys_setsockopt, sys_listen, sys_getsockname)
669 (sys_accept, sys_recvfrom, sys_sendto, fcntl): In case of failure,
670 make sure errno is set to an appropriate value. (Bug#13546)
671 (socket_to_fd): Add assertion against indexing fd_info[] with a
672 value that is out of bounds.
673 (sys_accept): If fd is negative, do not set up the child_process
674 structure for reading.
675
0063fdb1
DA
6762013-02-15 Dmitry Antipov <dmantipov@yandex.ru>
677
678 * composite.c (fill_gstring_header): Remove useless prototype.
679 Break long line.
680 * lisp.h (message_dolog, compile_pattern): Adjust prototype.
681 * print.c (PRINTDECLARE, print_object):
682 * search.c (compile_pattern, fast_looking_at, search_buffer):
683 (simple_search, boyer_moore, Freplace_match):
684 * xdisp.c (c_string_pos, number_of_chars, message_dolog):
685 (get_overlay_arrow_glyph_row, display_mode_element):
686 (decode_mode_spec_coding, message3):
687 * xfaces.c (face_at_string_position): Use bool for booleans.
688 Adjust comments.
689
648e5523 6902013-02-15 Paul Eggert <eggert@cs.ucla.edu>
974c7646 691
35b3a27e
PE
692 Fix AIX port (Bug#13650).
693 * lisp.h (XPNTR) [!USE_LSB_TAG && DATA_SEG_BITS]:
694 Fix bug introduced in 2012-07-27 change. DATA_SEG_BITS, if set,
695 was #undeffed earlier, so it cannot be used as a macro here.
696 Use the constant and not the macro.
35b3a27e 697
648e5523 6982013-02-15 Eli Zaretskii <eliz@gnu.org>
6e432f0c 699
0e4e7b74
EZ
700 * w32proc.c (new_child): If no vacant slots are found in
701 child_procs[], make another pass looking for slots whose process
702 has exited or died. (Bug#13546)
703
6e432f0c
EZ
704 * w32.c (sys_pipe): When failing due to file descriptors above
705 MAXDESC, set errno to EMFILE.
706 (_sys_read_ahead): Update cp->status when failing to read serial
707 communications input, so that the status doesn't stay at
708 STATUS_READ_IN_PROGRESS. (Bug#13546)
709
51b3a99c
JD
7102013-02-14 Jan Djärv <jan.h.d@swipnet.se>
711
712 * gtkutil.c (tb_size_cb): New function.
713 (xg_create_tool_bar): Connect size-allocate to tb_size_cb (Bug#13512).
714
e31560a7
SM
7152013-02-14 Stefan Monnier <monnier@iro.umontreal.ca>
716
717 * keyboard.c (active_maps): Fcurrent_active_maps expects a position, not
718 an event.
719
fe336261
SM
7202013-02-13 Stefan Monnier <monnier@iro.umontreal.ca>
721
722 * keyboard.c (syms_of_keyboard): Further tweaks of docstring.
723
5a655b9f
DA
7242013-02-13 Dmitry Antipov <dmantipov@yandex.ru>
725
726 * font.c (font_range): Add pos_byte argument. Adjust comment
727 and break long line.
728 * font.h (font_range): Adjust prototype.
729 * composite.c (autocmp_chars): Pass byte position to font_range.
730 Break long line. Remove useless prototype and format comment.
731
1a359750
GM
7322013-02-13 Glenn Morris <rgm@gnu.org>
733
734 * keyboard.c (input-decode-map, key-translation-map): Doc fixes.
735
01fcc3a5 7362013-02-13 Paul Eggert <eggert@cs.ucla.edu>
4458c255 737
f53f992a
PE
738 Improve AIX port some more (Bug#13650).
739 With this, it should be as good as it was in 23.3, though it's
740 still pretty bad: the dumped emacs does not run. See Mark Fleishman in
741 http://lists.gnu.org/archive/html/help-gnu-emacs/2011-04/msg00287.html
742 * unexaix.c (start_of_text): Remove.
743 (_data, _text): Declare as char[], not int, as AIX manual suggests.
744 (bias, lnnoptr, text_scnptr, data_scnptr, load_scnptr)
745 (orig_load_scnptr, orig_data_scnptr):
746 Now off_t, not long, since they are file offsets.
747 (make_hdr): Use _data, not start_of_data ().
748 This is the key part of the fix.
749 (make_hdr, unrelocate_symbols): Use off_t for file offsets.
750 (unrelocate_symbols): Cast pointers to intptr_t, not to ulong.
751
4458c255
PE
752 * pre-crt0.c (data_start): Initialize to 1.
753 This ports to compilers that optimize the external declaration
754 'int x = 0;' as if it were 'int x;' to shrink the executable.
755
227be86d
PE
756 Improve AIX port (Bug#13650).
757 This doesn't fix the bug, but it makes progress: Emacs builds now.
758 * unexaix.c: Include inttypes.h, stdarg.h.
759 (report_error, report_error_1): Mark as _Noreturn.
760 (report_error): Don't report the wrong errno.
761 (report_error_1): Now varargs. All callers changed.
762 (make_hdr): Use uintptr_t, not unsigned, when converting pointers
763 to unsigned. Don't use ADDR_CORRECT, as it no longer exists.
764 (write_ptr): Use %p to print address rather than %lx and a cast
765 to unsigned long. Grow buffer a bit, to be safer.
766
01fcc3a5 7672013-02-13 Eli Zaretskii <eliz@gnu.org>
713bfeaa
EZ
768
769 * bidi.c (bidi_resolve_neutral): After finding the next
770 non-neutral character, accept NEUTRAL_ON type as well, because
771 directional control characters, such as LRE and RLE, have their
772 type converted to that by bidi_resolve_weak. This avoids aborts
773 when LRE/RLE follows a run of neutrals.
774 (bidi_move_to_visually_next): Assert that return value of
775 bidi_peek_at_next_level is non-negative. Negative values will
776 cause an infloop.
777
83be8524
PE
7782013-02-13 Paul Eggert <eggert@cs.ucla.edu>
779
780 Minor getenv-related fixes.
781 * callproc.c (Fcall_process_region) [!DOS_NT]:
782 Avoid unnecessary duplicate call to getenv.
783 * callproc.c (init_callproc):
784 * dispnew.c (init_display):
785 * sysdep.c (sys_subshell):
786 Omit unnecessary cast of getenv or egetenv.
787
45b2b768
JB
7882013-02-13 Juanma Barranquero <lekktu@gmail.com>
789
790 * makefile.w32-in ($(BLD)/filelock.$(O), $(BLD)/sysdep.$(O)):
791 Update dependencies.
792
33b49d71
EZ
7932013-02-12 Eli Zaretskii <eliz@gnu.org>
794
795 * xdisp.c (redisplay_internal): Don't set w->region_showing to the
796 marker's position.
797 (display_line): Set w->region_showing to the value of
798 it->region_beg_charpos, not to -1. This fixes redisplay
799 optimization when cursor is moved up after M->. (Bug#13623)
800 (Bug#13626)
c4131562
EZ
801 (try_scrolling): Scroll text up more if point is too close to ZV
802 and inside the scroll margin. This makes sure point is moved
803 outside the scroll margin in these cases.
33b49d71
EZ
804
805 * window.h (struct window): region_showing can no longer be
806 negative.
807
b09a4810
PE
8082013-02-11 Paul Eggert <eggert@cs.ucla.edu>
809
a84b7c53
PE
810 Tune by using memchr and memrchr.
811 * doc.c (Fsnarf_documentation):
812 * fileio.c (Fsubstitute_in_file_name):
813 * search.c (find_newline, scan_newline):
814 * xdisp.c (pos_visible_p, display_count_lines):
815 Use memchr and memrchr rather than scanning byte-by-byte.
816 * search.c (find_newline): Rename from scan_buffer.
817 Omit first arg TARGET, as it's always '\n'. All callers changed.
818
b09a4810
PE
819 Clean up read_key_sequence a tiny bit more.
820 * keyboard.c (read_char_x_menu_prompt) [HAVE_MENUS]:
821 (read_key_sequence): Remove unused locals.
822
99d0d6dc
SM
8232013-02-11 Stefan Monnier <monnier@iro.umontreal.ca>
824
825 Clean up read_key_sequence a bit; reread active keymaps after first event.
826 * keyboard.c (read_char, read_char_x_menu_prompt)
827 (read_char_minibuf_menu_prompt):
828 Replace nmaps+maps with a single `map' arg.
829 (follow_key): Operate on a single map.
830 (active_maps): New function.
831 (test_undefined): Also return true for nil bindings.
832 (read_key_sequence): Use active_maps to replace the arrays of keymaps with
833 a single (composed) keymap. Remember `first_event' to choose the right
834 set of active keymaps. Recompute the set of keymaps after receiving
835 the first event. Remove GOBBLE_FIRST_EVENT.
836 (syms_of_keyboard): Remove inhibit_local_menu_bar_menus.
837 * keyboard.h (read_char): Update declaration.
838 * lread.c (read_filtered_event): Adjust call to read_char.
839
f5e1b680
EZ
8402013-02-11 Eli Zaretskii <eliz@gnu.org>
841
99d0d6dc
SM
842 * xdisp.c (move_it_vertically_backward, move_it_by_lines):
843 Don't use the limitation on backwards movement when lines are truncated
f5e1b680
EZ
844 in the window. (Bug#13675)
845
f74de345
DA
8462013-02-11 Dmitry Antipov <dmantipov@yandex.ru>
847
848 * marker.c (set_marker_internal): If desired position is passed
849 as a marker, avoid call to buf_charpos_to_bytepos.
850 * window.c (Fset_window_point): Omit redundant type checking.
851 (Fset_window_start): Likewise. Format comment.
852 (window_scroll_pixel_based): Use set_marker_restricted_both
853 with character and byte positions obtained from an iterator.
854 (Fset_window_configuration): Use set_marker_restricted_both.
855 * xdisp.c (message_dolog): Likewise.
856
a4ba3963
EZ
8572013-02-10 Eli Zaretskii <eliz@gnu.org>
858
99d0d6dc
SM
859 * xdisp.c (move_it_vertically_backward, move_it_by_lines):
860 When text lines are longer than window's screen lines, don't move back
a4ba3963
EZ
861 too far. This speeds up some redisplay operations. (Bug#13675)
862
68643cde
DA
8632013-02-10 Dmitry Antipov <dmantipov@yandex.ru>
864
865 * syntax.c (scan_sexps_forward): Fix byte position calculation
866 Bug#13664 (a.k.a Bug#13667) introduced with 2013-02-08 change.
867
7ba11bee
PE
8682013-02-10 Paul Eggert <eggert@cs.ucla.edu>
869
870 * fileio.c (Fexpand_file_name): Omit confusing pointer comparison
871 that was not needed.
872
eff1c190
PE
8732013-02-09 Paul Eggert <eggert@cs.ucla.edu>
874
875 Minor hashing refactoring.
876 * fns.c (SXHASH_REDUCE): Move to lisp.h.
877 (sxhash_float): Return EMACS_UINT, for consistency with the other
878 hash functions.
879 * lisp.h (INTMASK): Now a macro, since SXHASH_REDUCE is now a
880 non-static inline function and therefore can't use static vars.
881 (SXHASH_REDUCE): Move here from fns.c, and make it inline.
882 * profiler.c (hashfn_profiler): Use SXHASH_REDUCE, to be consistent
883 with the other hash functions.
884
6b48c831
EZ
8852013-02-09 Eli Zaretskii <eliz@gnu.org>
886
4dde2087
EZ
887 * callproc.c (Fcall_process_region) [WINDOWSNT]: Make sure the
888 XXXXXX part of the temporary file pattern is not downcased even
889 when w32-downcase-file-names is non-nil. (Bug#13661)
74ba1583 890
8549f9e8
EZ
891 * xdisp.c (decode_mode_spec): Remove handling of %t.
892
6b48c831
EZ
893 * msdos.c (careadlinkatcwd): Remove.
894
75a65c7e
SM
8952013-02-08 Stefan Monnier <monnier@iro.umontreal.ca>
896
897 * lread.c (skip_dyn_bytes): New function (bug#12598).
898 (read1): Use it. Use getc instead of READCHAR to read bytes.
899 (load_each_byte): Remove. Update users.
900
8ca30920
DA
9012013-02-08 Dmitry Antipov <dmantipov@yandex.ru>
902
903 * search.c (scan_buffer): Calculate end byte position just once.
904 (scan_newline): Do not recalculate start_byte.
905 (search_command): Use eassert.
906 * syntax.c (struct lisp_parse_state): New member location_byte.
907 (scan_sexps_forward): Record from_byte and avoid redundant
908 character to byte position calculation ...
909 (Fparse_partial_sexp): ... here. Break too long line.
910
25721f5b
DA
9112013-02-08 Dmitry Antipov <dmantipov@yandex.ru>
912
913 * lisp.h (make_uninit_vector): New function.
914 * alloc.c (Fvector, Fmake_byte_code):
915 * ccl.c (Fregister_ccl_program):
916 * charset.c (Fdefine_charset_internal, define_charset_internal):
917 * coding.c (make_subsidiaries, Fdefine_coding_system_internal):
918 * composite.c (syms_of_composite):
919 * font.c (Fquery_font, Ffont_info, syms_of_font):
920 * fontset.c (FONT_DEF_NEW, Fset_fontset_font):
921 * ftfont.c (ftfont_shape_by_flt):
922 * indent.c (recompute_width_table):
923 * nsselect.m (clean_local_selection_data):
924 * syntax.c (init_syntax_once):
925 * w32unsubscribe.c (uniscribe_shape):
926 * window.c (Fcurrent_window_configuration):
927 * xfaces.c (Fx_family_fonts):
928 * xselect.c (selection_data_to_lisp_data): Use it.
929
9a9d91d9
DA
9302013-02-07 Dmitry Antipov <dmantipov@yandex.ru>
931
932 * coding.c (Fdefine_coding_system_internal): Use AREF where
933 argument is known to be a vector.
934 * fns.c (Flocale_info): Likewise for ASET.
935 * xselect.c (selection_data_to_lisp_data): Likewise for ASET.
936 * w32fns.c (w32_parse_hot_key): Likewise for ASIZE and AREF.
937
6871e574
JD
9382013-02-05 Jan Djärv <jan.h.d@swipnet.se>
939
940 * nsmenu.m (update_frame_tool_bar): Check for negative tool bar
941 height.
942
943 * nsterm.h (HAVE_NATIVE_FS): Define if OSX => 10.7.
944 (EmacsView): Add fs_is_native, fsIsNative, isFullscreen and
945 updateCollectionBehaviour.
946
947 * nsterm.m (NEW_STYLE_FS): Remove.
948 (ns_last_use_native_fullscreen): New variable.
949 (x_make_frame_visible): Replace NEW_STYLE_FS with isFullscreen.
950 (x_set_window_size): Do not take title bar and tool bar into account
951 if isFullscreen returns YES.
952 (ns_fullscreen_hook): Replace NEW_STYLE_FS with isFullscreen.
953 (check_native_fs): New function.
954 (ns_select, ns_read_socket): Call check_native_fs if HAVE_NATIVE_FS.
955 (ns_term_init): Remove NEW_STYLE_FS.
956 (updateFrameSize:, windowWillResize:toSize:): Only adjust for title bar
957 and tool bar if isFullscreen returns NO.
958 (windowDidResize:): Replace NEW_STYLE_FS with fsIsNative.
959 (initFrameFromEmacs:): Initialize fs_is_native. Replace NEW_STYLE_FS
960 with HAVE_NATIVE_FS.
961 (window:willUseFullScreenPresentationOptions:): New method.
962 (windowDidEnterFullScreen:): Replace NEW_STYLE_FS with fsIsNative.
963 Hide toolbar if not enabled (Bug#13444).
964 (windowDidExitFullScreen:): Call updateCollectionBehaviour.
965 Restore tool bar if enabled, hide it otherwise (Bug#13444).
966 (fsIsNative, isFullscreen, updateCollectionBehaviour): New methods.
967 (toggleFullScreen:): If fs_is_native, call toggleFullScreen on
968 window. Do no set FRAME_EXTERNAL_TOOL_BAR (f) to 0.
969 Check FRAME_EXTERNAL_TOOL_BAR (f) before restoring
970 FRAME_TOOLBAR_HEIGHT (f). Call updateFrameSize when going non-fs.
971 (syms_of_nsterm): Add ns-use-native-fullscreen.
972
3f011c7f
PE
9732013-02-04 Paul Eggert <eggert@cs.ucla.edu>
974
975 * fileio.c (Qchoose_write_coding_system): Now static.
976
86f7c0fe
EZ
9772013-02-04 Eli Zaretskii <eliz@gnu.org>
978
979 * xdisp.c (window_buffer_changed): region_showing can be negative,
980 which still means region is being displayed.
981 (redisplay_internal): Resurrect code that forced redisplay of the
99d0d6dc
SM
982 whole window when showing region and the mark has changed.
983 Record the new mark position to allow redisplay optimizations.
86f7c0fe
EZ
984 (display_line): If it->region_beg_charpos is non-zero, set the
985 window's region_showing member to -1. (Bug#13623) (Bug#13626)
986
987 * window.h (struct window) <region_showing>: Declare ptrdiff_t,
988 not bitfield of 1 bit.
989
5257b701
DC
9902013-02-03 Daniel Colascione <dancol@dancol.org>
991
992 * emacs.c: Use execvp, not execv, when DAEMON_MUST_EXEC, so that
993 daemon mode works on cygw32 when Emacs is installed and not just
994 during development.
995
8ea41ea9
PE
9962013-02-02 Paul Eggert <eggert@cs.ucla.edu>
997
998 Avoid file time stamp bug on MS-Windows (Bug#13149).
999 * fileio.c (Fwrite_region): Don't use the heuristic on empty files,
1000 as FAT32 doesn't update time stamps when truncating them.
1001 Also, check that a file time stamp is not a multiple of 100 ns;
1002 this should catch all instances of the problem on MS-Windows,
1003 as its native file system resolution is 100 ns or worse, and
1004 checking for a non-multiple of 100 ns should impose only a small
1005 overhead on systems with ns resolution.
1006
94fbc901 10072013-02-02 Eli Zaretskii <eliz@gnu.org>
18a80473 1008
e7ac588e
EZ
1009 Avoid encoding file names on MS-Windows when they need to be run
1010 through dostounix_filename.
1011 * w32.c (normalize_filename): Accept an additional argument
1012 MULTIBYTE; if non-zero, traverse the file name by bytes and don't
1013 downcase it even if w32-downcase-file-names is non-nil.
1014 (dostounix_filename): Accept an additional argument MULTIBYTE and
1015 pass it to normalize_filename.
1016 (emacs_root_dir): Adjust.
1017
1018 * msdos.h (dostounix_filename): Adjust prototype.
1019
1020 * w32.h (dostounix_filename): Adjust prototype.
1021
1022 * msdos.c (dostounix_filename): Accept an additional argument and
1023 ignore it.
1024 (init_environment): Adjust callers of dostounix_filename.
1025
1026 * fileio.c (Ffile_name_directory, file_name_as_directory)
1027 (directory_file_name, Fexpand_file_name)
1028 (Fsubstitute_in_file_name): [DOS_NT] Adjust call to
1029 dostounix_filename.
1030 [WINDOWSNT]: Downcase file names if w32-downcase-file-names is
1031 non-nil.
1032 (Fsubstitute_in_file_name): [DOS_NT] Don't downcase environment
1033 variables, as egetenv is case-insensitive for DOS_NT.
1034
1035 * dired.c (file_name_completion): Don't call Fdirectory_file_name
1036 with an encoded file name.
1037
99d0d6dc
SM
1038 * w32proc.c (Fw32_short_file_name, Fw32_long_file_name):
1039 Adjust calls to dostounix_filename.
e7ac588e
EZ
1040
1041 * w32fns.c (Fx_file_dialog): Adjust call to dostounix_filename.
1042
1043 * unexw32.c (unexec): Adjust call to dostounix_filename.
1044
1045 * termcap.c (tgetent) [MSDOS]: Adjust call to dostounix_filename.
1046
1047 * emacs.c (decode_env_path) [DOS_NT]: Adjust call to
1048 dostounix_filename.
1049
1050 * callproc.c (Fcall_process) [MSDOS]: Adjust call to
1051 dostounix_filename.
1052
e7c3fb06
EZ
1053 * callproc.c (Fcall_process): Make sure program name in PATH and
1054 new_argv[0] is encoded, if needed. Otherwise, un-encoded string
1055 is passed to exec/spawnve, which fails unless the file-name
1056 encoding is UTF-8.
1057
18a80473
EZ
1058 * w32proc.c (sys_spawnve): Make sure escape_char is initialized,
1059 even if w32-quote-process-args is nil.
1060
35e85499
PE
10612013-02-01 Paul Eggert <eggert@cs.ucla.edu>
1062
1063 Fix timestamp bug when write-region appends nothing (Bug#13149).
1064 * fileio.c (Fwrite_region): When neither O_EXCL nor O_TRUNC is used,
1065 the file's time stamp doesn't change if Emacs happens to write nothing
1066 to the file, and on a buggy file system this could cause Emacs to
1067 incorrectly infer that the file system doesn't have the bug.
1068 Avoid this problem by inhibiting the inference in this case.
1069
422ff52b
DA
10702013-02-01 Dmitry Antipov <dmantipov@yandex.ru>
1071
1072 * window.h (struct window): Convert base_line_number, base_line_pos
1073 and column_number_displayed members from Lisp_Object to ptrdiff_t.
1074 Convert region_showing member from Lisp_Object to bitfield.
1075 Remove sequence_number member. Adjust comments.
1076 * window.c (sequence_number): Remove.
1077 (make_window): Initialize column_number_displayed.
1078 * print.c (print_object): Follow the printed representation of
1079 frames and print window pointer to distinguish between windows.
1080 (adjust_window_count): Invalidate base_line_pos. Adjust comment.
1081 * xdisp.c (wset_base_line_number, wset_base_line_pos)
1082 (wset_column_number_displayed, wset_region_showing): Remove.
1083 (window_buffer_changed, mode_line_update_needed, redisplay_internal)
1084 (try_scrolling, try_cursor_movement, redisplay_window)
1085 (try_window_reusing_current_matrix, try_window_id, display_line)
1086 (display_mode_lines, decode_mode_spec): Adjust users.
1087 * .gdbinit (pwinx): Do not print sequence_number.
1088
8654f9d7
PE
10892013-02-01 Paul Eggert <eggert@cs.ucla.edu>
1090
1091 Use fdopendir, fstatat and readlinkat, for efficiency (Bug#13539).
1092 * conf_post.h (GNULIB_SUPPORT_ONLY_AT_FDCWD): Remove.
1093 * dired.c: Include <fcntl.h>.
1094 (open_directory): New function, which uses open and fdopendir
1095 rather than opendir. DOS_NT platforms still use opendir, though.
1096 (directory_files_internal, file_name_completion): Use it.
1097 (file_attributes): New function, with most of the old Ffile_attributes.
1098 (directory_files_internal, Ffile_attributes): Use it.
1099 (file_attributes, file_name_completion_stat): First arg is now fd,
1100 not dir name. All uses changed. Use fstatat rather than lstat +
1101 stat.
1102 (file_attributes): Use emacs_readlinkat rather than Ffile_symlink_p.
1103 * fileio.c: Include <allocator.h>, <careadlinkat.h>.
1104 (emacs_readlinkat): New function, with much of the old
1105 Ffile_symlink_p, but with an fd argument for speed.
1106 It uses readlinkat rather than careadlinkatcwd, so that it
1107 need not assume the working directory.
1108 (Ffile_symlink_p): Use it.
1109 * filelock.c (current_lock_owner): Use emacs_readlinkat
1110 rather than emacs_readlink.
1111 * lisp.h (emacs_readlinkat): New decl.
1112 (READLINK_BUFSIZE, emacs_readlink): Remove.
1113 * sysdep.c: Do not include <allocator.h>, <careadlinkat.h>.
1114 (emacs_norealloc_allocator, emacs_readlink): Remove.
1115 This stuff is moved to fileio.c.
1116 * w32.c (fstatat, readlinkat): New functions.
1117 (careadlinkat): Don't check that fd == AT_FDCWD.
1118 (careadlinkatcwd): Remove; no longer needed.
1119
9dbda100
GM
11202013-01-31 Glenn Morris <rgm@gnu.org>
1121
1122 * fileio.c (choose_write_coding_system): Make it callable from Lisp.
20a8c477
GM
1123 (Fwrite_region): Update for new choose_write_coding_system args.
1124 Move the last piece of choose_write_coding_system here. (Bug#13522)
9dbda100
GM
1125 (syms_of_fileio): Add choose-write-coding-system.
1126
3f82a88a 11272013-01-30 Eli Zaretskii <eliz@gnu.org>
224f4ec1
EZ
1128
1129 * w32.c (sys_open): Zero out the flags for the new file descriptor.
1130 (sys_close): Zero out the flags for the file descriptor before
1131 closing it. (Bug#13546)
1132
806fed21 1133 * w32.c (parse_root, get_volume_info, readdir, read_unc_volume)
99d0d6dc
SM
1134 (logon_network_drive, stat_worker, symlink, chase_symlinks):
1135 Use CharNextExA and CharPrevExA to iterate over file names encoded in
806fed21
EZ
1136 DBCS. (Bug#13553)
1137
6ee4509a
EZ
1138 * w32.c (w32_get_long_filename, init_environment, readlink):
1139 Support file names encoded in DBCS codepages.
26854e9c
EZ
1140 (readlink): Use the current file-name-coding-system, not the ANSI
1141 codepage, to decode and handle targets of symlinks.
6ee4509a 1142
cf01a359
EZ
11432013-01-28 Eli Zaretskii <eliz@gnu.org>
1144
1145 * w32.c (opendir): Now accepts a 'const char *'.
1146
6fd326b7
DA
11472013-01-28 Dmitry Antipov <dmantipov@yandex.ru>
1148
1149 Remove obsolete redisplay code. See the discussion at
1150 http://lists.gnu.org/archive/html/emacs-devel/2013-01/msg00576.html.
1151 * dispnew.c (preemption_period, preemption_next_check): Remove.
1152 (Vredisplay_preemption_period): Likewise.
1153 (update_frame, update_single_window, update_window, update_frame_1):
1154 Adjust users. Always assume that PERIODIC_PREEMPTION_CHECKING is not
1155 used, following the 2012-06-22 change.
1156
d8cd7742
EZ
11572013-01-25 Eli Zaretskii <eliz@gnu.org>
1158
1159 * w32notify.c (Fw32notify_add_watch): Doc fix. (Bug#13540)
1160
266fee4f
DA
11612013-01-25 Dmitry Antipov <dmantipov@yandex.ru>
1162
1163 * font.c (num_fonts): Remove the leftover from old
1164 debugging code. Adjust comment style here and there.
59e624b3
DA
1165 * insdel.c (insert_1): Remove.
1166 * lisp.h (insert_1): Remove prototype.
1167 * xdisp.c (message_dolog): Adjust users to call insert_1_both.
266fee4f 1168
830e46e6 11692013-01-25 Eli Zaretskii <eliz@gnu.org>
6d2851de
EZ
1170
1171 * w32.c (max_filename_mbslen): New function.
1172 (normalize_filename, readdir): Use it to detect locales where ANSI
1173 encoding of file names uses a double-byte character set (DBCS).
1174 If a DBCS encoding is used, advance by characters using
99d0d6dc
SM
1175 CharNextExA, instead of incrementing a 'char *' pointer.
1176 Use _mbslwr instead of _strlwr. (Bug#13515)
6d2851de 1177
81abbb95
EZ
1178 * w32heap.c (allocate_heap) [!_WIN64]: Decrease the initial
1179 request of memory reservation to 1.7GB. (Bug#13065)
1180
830e46e6 11812013-01-25 Andreas Schwab <schwab@linux-m68k.org>
ba14c607
AS
1182
1183 * coding.c (detect_coding_iso_2022): Move back mis-reordered code
1184 at check_extra_latin label. (Bug#13505)
1185
fd3ceb09
DA
11862013-01-24 Dmitry Antipov <dmantipov@yandex.ru>
1187
1188 * nsfont.m (ns_escape_name, ns_unescape_name, ns_registry_to_script):
1189 Avoid redundant calls to strlen.
1190
edfa7fa0
DA
11912013-01-24 Dmitry Antipov <dmantipov@yandex.ru>
1192
1193 Drop async_visible and async_iconified fields of struct frame.
1194 This is possible because async input is gone; for details, see
1195 http://lists.gnu.org/archive/html/emacs-devel/2012-12/msg00734.html.
1196 * frame.h (struct frame): Remove async_visible and async_iconified
1197 members, convert garbaged to unsigned bitfield. Adjust comments.
1198 (FRAME_SAMPLE_VISIBILITY): Remove. Adjust all users.
1199 (SET_FRAME_VISIBLE, SET_FRAME_ICONIFIED): New macros.
1200 * frame.c, gtkutil.c, term.c, w32fns.c, window.c, xdisp.c:
1201 Consistently use SET_FRAME_VISIBLE, SET_FRAME_ICONIFIED,
1202 FRAME_VISIBLE_P and FRAME_ICONIFIED_P macros where appropriate.
1203 * w32term.c: Ditto.
1204 (w32_read_socket): Save iconified state to generate DEICONIFY_EVENT
1205 properly. Likewise for obscured.
1206 * xterm.c: Ditto.
266fee4f 1207 (handle_one_xevent): Save visible state to generate ICONIFY_EVENT
edfa7fa0
DA
1208 properly.
1209 * nsterm.m: Ditto.
1210 (windowDidDeminiaturize): Generate DEICONIFY_EVENT.
1211
5ad86e34
DA
12122013-01-24 Dmitry Antipov <dmantipov@yandex.ru>
1213
1214 * insdel.c (prepare_to_modify_buffer): Revert last change as suggested
1215 in http://lists.gnu.org/archive/html/emacs-devel/2013-01/msg00555.html.
1216
b09cca6a
SM
12172013-01-23 Stefan Monnier <monnier@iro.umontreal.ca>
1218
1219 * xdisp.c (message2, message2_nolog): Remove functions.
1220 (message3, message3_nolog): Extract nbytes and multibyteness directly
1221 from the string. Change all callers.
1222 (message3_nolog): Don't set message_enable_multibyte since set_message
1223 will reset it anyway.
1224 (message1, message1_nolog): Use message3.
1225 (vmessage): Use a stack allocated buffer rather than f->message_buf.
1226 (with_echo_area_buffer): Remove last two arguments. Update all callers.
1227 (set_message): Drop all but the second arg, which has to be a string.
1228 (set_message_1): Simplify now that we know that a1 is NULL and the
1229 second arg is a string.
1230 * frame.h (struct frame): Remove `message_buf' field.
1231 Use glyphs_initialized_p instead.
1232 (FRAME_MESSAGE_BUF): Remove macro.
1233 * w16select.c (Fw16_set_clipboard_data): Prefer message3 to message2.
1234 * lisp.h (message2, message2_nolog): Remove declarations.
1235 (message3, message3_nolog): Update declarations.
1236 * keyboard.c (read_char_minibuf_menu_text)
1237 (read_char_minibuf_menu_width): Remove vars.
1238 (read_char_minibuf_menu_prompt): Rewrite the menu's construction so as
1239 to correctly handle multibyte strings.
1240 * frame.c (delete_frame): Don't free message_buf any more.
1241 * editfns.c (message_text, message_length): Remove vars.
1242 (Fmessage_box): Don't copy the Lisp string's bytes any longer.
1243 * fileio.c (auto_save_error): Use message3 instead of message2.
1244 * dispnew.c (adjust_frame_message_buffer): Remove function.
1245
54ab1c5a
EZ
12462013-01-23 Eli Zaretskii <eliz@gnu.org>
1247
1248 * w32term.c (w32fullscreen_hook): Account correctly for the screen
1249 real estate used for the tool bar and the menu bar.
1250
6c27465b
DA
12512013-01-23 Dmitry Antipov <dmantipov@yandex.ru>
1252
1253 * insdel.c (prepare_to_modify_buffer): Force redisplay if
1254 hidden buffer is prepared to modification (Bug#13164).
1255
9d93ce29
DA
12562013-01-22 Dmitry Antipov <dmantipov@yandex.ru>
1257
1258 * window.h (struct window): Change window_end_valid member from
1259 Lisp_Object to a bitfield. Adjust comments.
1260 (wset_window_end_valid): Remove.
1261 * window.c (adjust_window_count): Clear window_end_valid.
1262 (Fwindow_end): Adjust user. Remove ancient #if 0 code.
1263 (Fwindow_line_height, set_window_buffer, Frecenter)
1264 (Fsplit_window_internal, Fdelete_other_windows_internal)
1265 (Fset_window_fringes, Fset_window_scroll_bars): Adjust users.
1266 * dispnew.c (adjust_glyph_matrix, clear_window_matrices): Likewise.
1267 * xdisp.c (check_window_end, reconsider_clip_changes)
1268 (redisplay_internal, mark_window_display_accurate_1, redisplay_window)
1269 (try_window, try_window_reusing_current_matrix, note_mouse_highlight)
1270 (find_first_unchanged_at_end_row, try_window_id): Likewise.
1271
1dcb8ea2
DA
12722013-01-22 Dmitry Antipov <dmantipov@yandex.ru>
1273
1274 * xdisp.c (mark_window_display_accurate): Simplify the loop
1275 assuming that the only one of vchild, hchild or buffer window
1276 slots is non-nil. Call mark_window_display_accurate_1 for
1277 the leaf windows only.
1278 (mark_window_display_accurate_1): Always assume leaf window.
1279 Adjust comment.
1280
b41b8a7e
PE
12812013-01-22 Paul Eggert <eggert@cs.ucla.edu>
1282
593a5f2e
PE
1283 * emacs.c (Qkill_emacs_hook): Now static.
1284
b41b8a7e
PE
1285 * fileio.c (Finsert_file_contents): Simplify.
1286 Remove unnecessary assignments and tests.
1287
84e5ed96
EZ
12882013-01-21 Eli Zaretskii <eliz@gnu.org>
1289
1290 * w32.c (acl_set_file): Don't test for errors unless
1291 set_file_security returns FALSE. Avoids spurious errors when
1292 saving files.
1293
2ef88fd4
DA
12942013-01-21 Dmitry Antipov <dmantipov@yandex.ru>
1295
1296 * fileio.c (Finsert_file_contents): Revert code introduced at
1297 2013-01-18 in favor of the simpler and generally better fix.
1298 Save stack space by removing 'buffer' and reusing 'read_buf'
1299 where appropriate.
1300
d7a0a7c9
PE
13012013-01-19 Paul Eggert <eggert@cs.ucla.edu>
1302
1303 * lisp.h (eabs): Define unconditionally (Bug#13419).
1304 The old "#if !defined (eabs)" was an unnecessary revenant of back
1305 when this macro was called "abs". Document 'eabs' better.
1306
795e7a5b 13072013-01-19 Glenn Morris <rgm@gnu.org>
085d34c4
GM
1308
1309 * fns.c (Frandom): Doc fix.
1310
59ac2d13
EZ
13112013-01-19 Eli Zaretskii <eliz@gnu.org>
1312
1313 * editfns.c (get_pos_property): Use SAFE_ALLOCA_LISP, to avoid
1314 segfault when there are lots of overlays.
1315
1316 * buffer.c (sort_overlays): Use SAFE_NALLOCA, to avoid segfault
99d0d6dc
SM
1317 when there are lots of overlays.
1318 See http://lists.gnu.org/archive/html/emacs-devel/2013-01/msg00421.html
59ac2d13
EZ
1319 for the details and a way to reproduce.
1320
b3fbb395
PE
13212013-01-19 Paul Eggert <eggert@cs.ucla.edu>
1322
3a955a1f
PE
1323 * fileio.c: Use O_APPEND to append.
1324 This corresponds better to the natural interpretation of "append",
1325 and avoids the need to open the output file twice, or to invoke
1326 lseek when APPEND is neither nil nor a number.
1327 This relies on POSIX 1003.1-1988 or later, which is OK nowadays.
1328 (Fwrite_region): Simplify. Use O_APPEND instead of opening the
1329 file possibly twice, and lseeking to its end; this avoids the
1330 need to lseek on non-regular files. Do not use O_EXCL and O_TRUNC
1331 at the same time: the combination is never needed and apparently
1332 it doesn't work with DOS_NT.
1333
21cd50b8
PE
1334 Fix size bug on DOS_NT introduced by CIFS workaround (Bug#13149).
1335 * fileio.c (Fwrite_region): Use O_BINARY in checking code, too.
1336
b3fbb395
PE
1337 Allow floating-point file offsets.
1338 Problem reported by Vitalie Spinu in
1339 <http://lists.gnu.org/archive/html/emacs-devel/2013-01/msg00411.html>.
1340 * fileio.c (emacs_lseek): Remove.
1341 (file_offset): New function.
1342 (Finsert_file_contents, Fwrite_region): Use it.
1343
73c14218
CY
13442013-01-19 Chong Yidong <cyd@gnu.org>
1345
1346 * emacs.c (Fkill_emacs): Set waiting_for_input to 0 to avoid
1347 aborting on Fsignal (Bug#13289).
1348
6a9465f3
EZ
13492013-01-19 Eli Zaretskii <eliz@gnu.org>
1350
1351 * w32.c (acl_set_file): Treat ERROR_ACCESS_DENIED from
1352 set_file_security as failure due to insufficient privileges.
1353 Reported by Fabrice Popineau <fabrice.popineau@supelec.fr>.
76e9f7b9 1354 (fstat): Return owner and group like 'stat' and 'lstat' do.
6a9465f3 1355
fa705c99
PE
13562013-01-19 Paul Eggert <eggert@cs.ucla.edu>
1357
9fe43ff6
PE
1358 Work around bug in CIFS and vboxsf file systems (Bug#13149).
1359 The bug was observed on Ubuntu operating inside a virtual machine,
1360 editing files mounted via CIFS or vboxsf from the MS Windows 7 host.
1361 The workaround introduces a race condition on non-buggy hosts,
1362 but it's an unlikely race and anyway there's a nearly identical
1363 nearby race that can't be fixed.
1364 * fileio.c (valid_timestamp_file_system, timestamp_file_system):
1365 New static vars.
1366 (Fwrite_region): Test for file system time stamp bug.
1367 (init_fileio): New function.
1368 * lisp.h (init_fileio): Declare it.
1369 * emacs.c (main): Call it.
1370
fa705c99
PE
1371 * fileio.c (Finsert_file_contents): Simplify new diagnostic
1372 and make it more consistent with other stat-failure diagnostics.
1373
e07469fa
DA
13742013-01-18 Dmitry Antipov <dmantipov@yandex.ru>
1375
99d0d6dc
SM
1376 Fix crash when inserting data from non-regular files.
1377 See http://lists.gnu.org/archive/html/emacs-devel/2013-01/msg00406.html
e07469fa
DA
1378 for the error description produced by valgrind.
1379 * fileio.c (read_non_regular): Rename to read_contents.
1380 Free Lisp_Save_Value object used to pass parameters.
1381 (read_non_regular_quit): Rename to read_contents_quit.
1382 (Finsert_file_contents): Redesign internal file reading loop to adjust
1383 gap and end positions after each read and so help make_gap to work
1384 properly. Do not signal an I/O error too early and so do not leave
1385 not yet decoded characters in a buffer, which was the reason of
1386 redisplay crash. Use list2 to build return value. Adjust comments.
1387
67722112
PE
13882013-01-17 Paul Eggert <eggert@cs.ucla.edu>
1389
1390 Close a race when statting and reading files (Bug#13149).
1391 * fileio.c (Finsert_file_contents): Use open+fstat, not stat+open.
1392 This avoids a race if the file is renamed between stat and open.
1393 This race is not the problem originally noted in Bug#13149;
1394 see <http://bugs.gnu.org/13149#73> and later messages in the thread.
1395
468afbac
DA
13962013-01-17 Dmitry Antipov <dmantipov@yandex.ru>
1397
1398 * lisp.h (toplevel): Add comment about using Lisp_Save_Value
1399 objects, related functions and macros.
1400 (make_save_value): Adjust prototype.
1401 (make_save_pointer): New prototype.
1402 (SAFE_NALLOCA): Fix indentation. Use make_save_pointer.
1403 (SAFE_ALLOCA_LISP): Adjust make_save_value usage.
1404 * alloc.c (format_save_value): Rename to make_save_value.
1405 (make_save_pointer): New function.
1406 (record_xmalloc): Use make_save_pointer.
1407 * dired.c, editfns.c, fileio.c, font.c, gtkutil.c, lread.c:
1408 * nsmenu.m, nsterm.m, xfns.c, xmenu.c, xselect.c, keymap.c:
1409 Change users of make_save_value to make_save_pointer.
1410 Likewise for format_save_value and make_save_value.
1411
0e70695a
DA
14122013-01-17 Dmitry Antipov <dmantipov@yandex.ru>
1413
1414 * buffer.h (NARROWED, BUF_NARROWED): Drop unused macros.
1415 (DECODE_POSITION, BUFFER_CHECK_INDIRECTION): Fix indentation.
1416 * buffer.c (toplevel, syms_of_buffer): Drop old commented-out
1417 debugging stubs.
1418
963ea40f
PE
14192013-01-15 Paul Eggert <eggert@cs.ucla.edu>
1420
1421 * alloc.c (free_save_value): Now static.
1422
3346c1d0
DA
14232013-01-15 Dmitry Antipov <dmantipov@yandex.ru>
1424
1425 * keymap.c (map_keymap_internal): Use format_save_value.
1426 (map_keymap_char_table_item): Adjust accordingly.
1427 * fileio.c (non_regular_fd, non_regular_inserted)
1428 (non_regular_nbytes): Remove.
99d0d6dc
SM
1429 (Finsert_file_contents): Convert trytry to ptrdiff_t.
1430 Use format_save_value to pass parameters to read_non_regular.
3346c1d0
DA
1431 (read_non_regular): Use XSAVE_ macros to extract parameters.
1432 Adjust comment.
1433 * xmenu.c (xmenu_show) [!USE_X_TOOLKIT && !USE_GTK]: Use
1434 format_save_value.
1435 (pop_down_menu) [!USE_X_TOOLKIT && !USE_GTK]: Adjust user.
1436
2b30549c
DA
14372013-01-15 Dmitry Antipov <dmantipov@yandex.ru>
1438
1439 * lisp.h (XSAVE_POINTER, XSAVE_INTEGER): Change to allow
1440 extraction from any Lisp_Save_Value slot. Add type checking.
1441 * alloc.c, dired.c, editfns.c, fileio.c, ftfont.c, gtkutil.c:
1442 * keymap.c, lread.c, nsterm.h, nsmenu.c, xfns.c, xmenu.c:
1443 * xselect.c: All users changed.
1444
1b971ac1
DA
14452013-01-15 Dmitry Antipov <dmantipov@yandex.ru>
1446
1447 Some convenient bits to deal with Lisp_Save_Values.
1448 * lisp.h (XSAVE_OBJECT): New macro to extract saved objects.
1449 (allocate_misc): Remove prototype.
1450 (format_save_value): New prototype.
1451 * alloc.c (allocate_misc): Revert back to static.
1452 (format_save_value): New function to build Lisp_Save_Value
1453 object with the specified internal structure.
1454 (make_save_value): Reimplement using format_save_value.
1455 * editfns.c (save_excursion_save): Use format_save_value.
1456 (save_excursion_restore): Use XSAVE_OBJECT.
1457
c50cf2ea
PE
14582013-01-14 Paul Eggert <eggert@cs.ucla.edu>
1459
1460 Avoid needless casts with XSAVE_POINTER.
1461 * alloc.c (mark_object) [GC_MARK_STACK]:
1462 * dired.c (directory_files_internal_unwind):
1463 * fileio.c (do_auto_save_unwind):
1464 * gtkutil.c (pop_down_dialog):
1465 * keymap.c (map_keymap_char_table_item):
1466 * lread.c (load_unwind):
1467 * nsmenu.m (pop_down_menu):
1468 * print.c (print_object) [GC_MARK_STACK]:
1469 * xfns.c (clean_up_file_dialog):
1470 * xmenu.c (cleanup_widget_value_tree):
1471 Omit casts between XSAVE_POINTER and a pointer type.
1472
9d5a1260
DA
14732013-01-14 Dmitry Antipov <dmantipov@yandex.ru>
1474
1475 Fix compilation with GC_MARK_STACK == GC_USE_GCPROS_AS_BEFORE.
1476 * eval.c (eval_sub): Protect `form' from being GCed before its
1477 car and cdr becomes protected with the backtrace entry.
1478
73ebd38f
DA
14792013-01-14 Dmitry Antipov <dmantipov@yandex.ru>
1480
1481 Make Lisp_Save_Value more versatile storage for up to four objects.
1482 * lisp.h (toplevel): Enumeration to describe types of saved objects.
1483 (struct Lisp_Save_Value): New layout. Adjust comments.
1484 (XSAVE_POINTER): New macro.
1485 (XSAVE_INTEGER): Likewise.
1486 (allocate_misc): Add prototype.
1487 (free_misc): Likewise.
1488 * alloc.c (allocate_misc): Now global.
1489 (free_misc): Likewise. Adjust comment.
1490 (make_save_value): Use new Lisp_Save_Value layout. Adjust comment.
1491 (free_save_value): Likewise.
1492 (mark_object): Likewise.
1493 * editfns.c (save_excursion_save): Pack everything within
1494 Lisp_Save_Value and so avoid xmalloc.
1495 (save_excursion_restore): Adjust to match new layout. Use free_misc
1496 because we do not allocate extra memory any more. Add eassert.
1497 * print.c (print_object): New code to print Lisp_Save_Value. Do not
1498 rely on valid_lisp_object_p if !GC_MARK_STACK. Adjust comments.
1499 * dired.c, fileio.c, font.c, ftfont.c, gtkutil.c, keymap.c,
1500 * lread.c, nsmenu.m, nsterm.h, xfns.c, xmenu.c, xselect.c:
1501 Use XSAVE_POINTER and XSAVE_INTEGER where appropriate.
1502
b826986f
JD
15032013-01-13 Jan Djärv <jan.h.d@swipnet.se>
1504
1505 * nsfont.m (LCD_SMOOTHING_MARGIN): New define.
1506 (nsfont_draw): Remove disabling of LCD smoothing.
1507 (ns_glyph_metrics): Add LCD_SMOOTHING_MARGIN to bearings to fix
2e7a1892 1508 Bug#11484 with LCD smoothing on.
b826986f 1509
c0511b57 15102013-01-13 Paul Eggert <eggert@cs.ucla.edu>
45b7bfdd 1511
b6f960a0
PE
1512 Fix SIGDANGER handlers, for AIX (Bug#13408).
1513 * sysdep.c.c (handle_danger_signal, deliver_danger_signal) [SIGDANGER]:
1514 Move handlers here from emacs.c; they were out of place.
1515
616763d5
JD
15162013-01-11 Jan Djärv <jan.h.d@swipnet.se>
1517
1518 * xterm.c (syms_of_xterm): Adjust documentation for
1519 scroll-bar-adjust-thumb-portion.
1520
0b59090b 15212012-12-31 Adam Sjøgren <asjo@koldfront.dk> (tiny change)
ec782c5f
JD
1522
1523 * xterm.c (scroll-bar-adjust-thumb-portion): New variable to
1524 determine whether scroll bar thumb size should be adjusted or
1525 not. Use variable for MOTIF.
1526
1527 * gtkutil.c (scroll-bar-adjust-thumb-portion): Use variable for
1528 GTK.
1529
7bc916b4
JD
15302013-01-13 Jan Djärv <jan.h.d@swipnet.se>
1531
eac4d08f
JD
1532 * nsterm.m (keyDown:): Set processingCompose to NO if an emacs key
1533 event is generated.
1534 (doCommandBySelector:): Set processingCompose to NO.
1535
7bc916b4
JD
1536 * nsfont.m (ns_findfonts): Add block/unblock_input calls.
1537 Remove check for fkeys count > zero, block/unblock fixes the real bug.
1538 (nsfont_list_family): Add block/unblock_input calls.
1539 (nsfont_open): Move block_input earlier. Add unblock_input before early
1540 return.
1541 (nsfont_draw): Add block/unblock_input calls.
1542
bdc9b756
PE
15432013-01-12 Dmitry Antipov <dmantipov@yandex.ru>
1544
1545 * indent.c (Fvertical_motion): Remove now-incorrect GCPROs
1546 for old_charpos and old_bytepos.
1547
ee56a6dc
PE
15482013-01-12 Paul Eggert <eggert@cs.ucla.edu>
1549
1550 Fix bug with set-time-zone-rule and LOCALTIME_CACHE (Bug#13415).
1551 * editfns.c (set_time_zone_rule) [LOCALTIME_CACHE]:
1552 Clear tzvalbuf_in_environ if this workaround is in effect.
1553 Problem and fix reported by Kazuhiro Ito.
1554
9fc9a531
AH
15552013-01-11 Aaron S. Hawley <Aaron.Hawley@vtinfo.com>
1556
99d0d6dc
SM
1557 * insdel.c (Fcombine_after_change_execute, syms_of_insdel):
1558 Fix ambiguous doc string cross-reference(s).
9fc9a531
AH
1559
1560 * keyboard.c (Fcommand_execute, syms_of_keyboard): Fix ambiguous
1561 doc string cross-reference(s).
1562
1563 * window.c (Fwindow_point, syms_of_window): Fix ambiguous doc
1564 string cross-reference(s).
1565
6020559a
DA
15662013-01-11 Dmitry Antipov <dmantipov@yandex.ru>
1567
1568 Avoid unnecessary byte position calculation for the gap movement.
1569 Since all users of move_gap do CHAR_TO_BYTE for other purposes
1570 anyway, all of them should use move_gap_both instead.
1571 * lisp.h (move_gap): Remove prototype.
1572 * insdel.c (move_gap): Remove.
1573 (move_gap_both): Add eassert.
1574 * editfns.c (Ftranspose_regions): Tweak to use move_gap_both.
1575 * xml.c (parse_region): Likewise.
1576
b8956427
PE
15772013-01-11 Paul Eggert <eggert@cs.ucla.edu>
1578
1579 emacsclient -t should not suspend Emacs server (Bug#13387)
1580 * lisp.h, sysdep.c (block_tty_out_signal, unblock_tty_out_signal):
1581 New functions.
1582 * term.c (init_tty): Use them instead of rolling our own code.
1583 * sysdep.c (tcsetpgrp_without_stopping): Likewise. Here, this
1584 switches from 'signal' to 'pthread_sigmask', which is safer in
1585 multithreaded applications.
1586 * term.c (Fresume_tty): Don't bother dissociating if O_IGNORE_CTTY,
1587 which has already arranged for that.
1588 (dissociate_if_controlling_tty): If setsid fails, fall back on TIOCNOTTY.
1589 This is the main part of the bug fix.
1590
0b59090b 15912013-01-10 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> (tiny change)
48660ca5
JD
1592
1593 * gtkutil.c (xg_initialize): Add ifdef HAVE_FREETYPE around
1594 x_last_font_name (Bug#13403).
1595
58cc0a01
DA
15962013-01-10 Dmitry Antipov <dmantipov@yandex.ru>
1597
1598 Omit buffer_slot_type_mismatch and use generic predicates to enforce
1599 the type of per-buffer values where appropriate.
1600 * lisp.h (struct Lisp_Buffer_Objfwd): Rename slottype member to
1601 predicate, which is how it's really used now. Adjust comment.
1602 * buffer.h (buffer_slot_type_mismatch): Remove prototype.
1603 * buffer.c (buffer_slot_type_mismatch): Remove.
1604 (DEFVAR_PER_BUFFER, defvar_per_buffer): Rename type argument to
1605 predicate. Adjust comment.
1606 (syms_of_buffer): Use Qsymbolp for major-mode. Use Qintegerp for
1607 fill-column, left-margin, tab-width, buffer-saved-size,
1608 left-margin-width, right-margin-width, left-fringe-width,
1609 right-fringe-width, scroll-bar-width and buffer-display-count.
1610 Use Qstringp for default-directory, buffer-file-name,
1611 buffer-file-truename and buffer-auto-save-file-name. Use Qfloatp for
1612 scroll-up-aggressively and scroll-down-aggressively. Use Qnumberp for
1613 line-spacing.
1614 * data.c (store_symval_forwarding): Adjust to call the predicate.
1615
5104861e
JB
16162013-01-09 Juanma Barranquero <lekktu@gmail.com>
1617
1618 * w32.c (get_name_and_id, acl_set_file):
1619 * w32term.c (w32fullscreen_hook): Remove unused local variables.
1620
eefd7278
DA
16212013-01-09 Dmitry Antipov <dmantipov@yandex.ru>
1622
1623 * lisp.h (make_gap_1): New prototype.
1624 * buffer.h (GAP_BYTES_DFL, GAP_BYTES_MIN): New macros for the special
1625 gap size values.
1626 * editfns.c (Fbuffer_size): Rename from Fbufsize to fit the common
1627 naming convention.
1628 (syms_of_editfns): Adjust defsubr. Drop commented-out obsolete code.
2eae9ccc 1629 * insdel.c (make_gap_larger): Use GAP_BYTES_DFL. Adjust comment.
eefd7278
DA
1630 (make_gap_smaller): Use GAP_BYTES_MIN. Adjust comment.
1631 (make_gap_1): New function to adjust the gap of any buffer.
1632 * coding.c (coding_alloc_by_making_gap): Use it.
1633 * buffer.c (compact_buffer): Likewise. Use BUF_Z_BYTE, BUF_GAP_SIZE,
1634 GAP_BYTES_DFL and GAP_BYTES_MIN. Adjust comment.
1635
073ca75b
JL
16362013-01-08 Juri Linkov <juri@jurta.org>
1637
1638 * xfaces.c (tty_supports_face_attributes_p): Return 0 for the case
1639 of (supports :underline (:style wave)). (Bug#13000)
1640
3bace969
AH
16412013-01-08 Aaron S. Hawley <aaron.s.hawley@gmail.com>
1642
1643 * undo.c (Fprimitive_undo): Move to simple.el.
1644 (syms_of_undo): Remove declarations for Sprimitive_undo.
1645
63a63bd4
SM
16462013-01-08 Stefan Monnier <monnier@iro.umontreal.ca>
1647
1648 * keyboard.c (echo_add_key): Rename from echo_add_char.
1649
56ed110a
CY
16502013-01-06 Chong Yidong <cyd@gnu.org>
1651
1652 * keyboard.c (echo_add_char): New function, factored out from
1653 echo_char. Don't add a space if the previous echo string was
1654 empty (Bug#13255).
1655 (echo_char): Use it.
1656 (read_key_sequence): When echoing mock input, ensure that the
1657 trailing dash is properly added.
1658
b630991b
EZ
16592013-01-05 Eli Zaretskii <eliz@gnu.org>
1660
1661 * xdisp.c (dump_glyph): Align glyph data better. Use "pD" instead
1662 of a non-portable "t" to print ptrdiff_t values. Allow up to 9
63a63bd4
SM
1663 digits for buffer positions, before misalignment starts.
1664 Display "0" for integer "object" field.
b630991b
EZ
1665 (dump_glyph_row): Adapt the header line to changes in dump_glyph.
1666 Display the newline glyph more unambiguously.
1667
f032a318
YM
16682013-01-04 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
1669
1670 * nsterm.m (ns_draw_underwave):
1671 * w32term.c (w32_draw_underwave):
1672 * xterm.c (x_draw_underwave): Make underwave look more triangular
1673 and also degrade gracefully for small fonts. (Bug#13000)
1674
4240dd3c
YM
1675 * nsterm.m (ns_draw_text_decoration):
1676 * w32term.c (x_draw_glyph_string):
1677 * xterm.c (x_draw_glyph_string): Don't use previous underline
1678 thickness and position if previous underline type is underwave.
1679
553081a5
SM
16802013-01-04 Stefan Monnier <monnier@iro.umontreal.ca>
1681
1682 * fileio.c (Ffile_acl): Undocument return format.
1683
9539d465 16842013-01-02 Glenn Morris <rgm@gnu.org>
08f59219
GM
1685
1686 * keymap.c (Fkey_description): Doc fix. (Bug#13323)
1687
71376d4b
PE
16882013-01-02 Paul Eggert <eggert@cs.ucla.edu>
1689
1690 Simplify via eabs.
1691 * dired.c (file_name_completion):
1692 * doc.c (get_doc_string):
1693 * floatfns.c (round2):
1694 * font.c (font_score, font_delete_unmatched):
1695 * fringe.c (compute_fringe_widths):
1696 * lread.c (read_list):
1697 * minibuf.c (Ftry_completion):
1698 * term.c (tty_ins_del_lines):
1699 * xterm.c (x_draw_image_foreground, x_draw_image_foreground_1):
1700 Use eabs (x) rather than open-coding it as (x < 0 ? -x : x).
1701
a7f11948
EZ
17022012-12-31 Eli Zaretskii <eliz@gnu.org>
1703
1704 * w32.c (unsetenv): Set up the string passed to _putenv
63a63bd4
SM
1705 correctly.
1706 See http://lists.gnu.org/archive/html/emacs-devel/2012-12/msg00863.html
a7f11948
EZ
1707 for the bug this caused.
1708
84cc1ab6
PE
17092012-12-30 Paul Eggert <eggert@cs.ucla.edu>
1710
1711 * coding.c (Qmac): Now static.
1712
5a1d858b
JD
17132012-12-30 Jan Djärv <jan.h.d@swipnet.se>
1714
1715 * gtkutil.c (TOOLBAR_TOP_WIDGET): New macro.
1716 (xg_pack_tool_bar): Use TOOLBAR_TOP_WIDGET, condition out use of
1717 handlebox_widget. Set toolbar_in_hbox to false/true, set
1718 toolbar_is_packed to true.
1719 (xg_update_tool_bar_sizes): Use widget returned by TOOLBAR_TOP_WIDGET.
1720 (update_frame_tool_bar): Check toolbar_is_packed for packing.
1721 Show all on TOOLBAR_TOP_WIDGET.
1722 (free_frame_tool_bar): Check toolbar_is_packed. Use widget returned
1723 by TOOLBAR_TOP_WIDGET.
1724 (xg_change_toolbar_position): Use widget returned by TOOLBAR_TOP_WIDGET.
1725 Check toolbar_is_packed.
8b745d92
JD
1726 (xg_have_tear_offs, tearoff_remove, tearoff_activate): Condition on
1727 HAVE_GTK_TEAROFF_MENU_ITEM_NEW.
1728 (xg_have_tear_offs): When ! HAVE_GTK_TEAROFF_MENU_ITEM_NEW, return
1729 false.
1730 (create_menus): Create tearoff only if HAVE_GTK_TEAROFF_MENU_ITEM_NEW.
1731 (xg_update_menubar): Update title only if
1732 HAVE_GTK_TEAROFF_MENU_ITEM_NEW.
1733 (xg_update_submenu): Skip tearoff only if
1734 HAVE_GTK_TEAROFF_MENU_ITEM_NEW.
1735 (xg_initialize): Initialize xg_detached_menus only if
1736 HAVE_GTK_TEAROFF_MENU_ITEM_NEW.
5a1d858b
JD
1737
1738 * xterm.h (struct x_output): Surround handlebox_widget with
1739 #ifdef HAVE_GTK_HANDLE_BOX_NEW. toolbar_is_packed is new,
1740 toolbar_in_hbox is bool.
1741
d5e5e7b4 17422012-12-30 Andreas Schwab <schwab@linux-m68k.org>
2550c6e4
AS
1743
1744 * src/Makefile.in (TEMACS_LDFLAGS2): Remove.
1745 (LIBS_GNUSTEP): Define.
1746 (LIBES): Add $(LIBS_GNUSTEP).
1747 (temacs$(EXEEXT)): Use $(LDFLAGS) instead of $(TEMACS_LDFLAGS2).
1748
d5e5e7b4 17492012-12-30 Eli Zaretskii <eliz@gnu.org>
7a3a7493
EZ
1750
1751 * xdisp.c (set_cursor_from_row): Don't confuse a truncation or
1752 continuation glyph on a TTY with an indication of an empty line.
1753 (Bug#13277)
1754
e7ae8039
EZ
17552012-12-29 Eli Zaretskii <eliz@gnu.org>
1756
ccad023b
EZ
1757 * fileio.c (Fset_file_selinux_context, Fset_file_acl): Return t if
1758 file's SELinux context or ACLs successfully set, nil otherwise.
1759 (Bug#13298)
8d23a331 1760 (Fcopy_file) [WINDOWSNT]: Improve diagnostics when CopyFile fails.
ccad023b 1761
e7ae8039
EZ
1762 * w32proc.c (reader_thread): Avoid passing NULL handles to
1763 SetEvent and WaitForSingleObject.
1764
7456e13f
PE
17652012-12-28 Paul Eggert <eggert@cs.ucla.edu>
1766
1767 Port EXTERNALLY_VISIBLE to Clang 3.2.
1768 * conf_post.h (__has_attribute): New macro.
1769 (EXTERNALLY_VISIBLE): Use it. This ports to Clang 3.2.
1770
1ab0c851
GM
17712012-12-27 Glenn Morris <rgm@gnu.org>
1772
1773 * cygw32.c (Fcygwin_convert_file_name_to_windows)
1774 (Fcygwin_convert_file_name_from_windows): Doc fixes.
1775
82e2a1f0 17762012-12-27 Eli Zaretskii <eliz@gnu.org>
f5c81c80 1777
63a63bd4
SM
1778 * fileio.c (file_name_as_directory, directory_file_name):
1779 Accept an additional argument MULTIBYTE to indicate whether the input C
f5c81c80
EZ
1780 came from a multibyte or a unibyte Lisp string; all callers
1781 adjusted. Don't assume the input string is always multibyte.
1782 (Bug#13262)
1783 (Ffile_name_directory) [DOS_NT]: Handle unibyte strings correctly:
1784 don't ENCODE_FILE them, and return a unibyte string if the input
1785 was unibyte.
1786 (Fexpand_file_name): Don't mix unibyte with multibyte strings, and
1787 don't assume the input strings will always be multibyte. If the
1788 input strings are multibyte, decode strings obtained from C
1789 library functions.
1790
8847a0de
DA
17912012-12-26 Dmitry Antipov <dmantipov@yandex.ru>
1792
1793 * lisp.h (toplevel): Add two notices to the comment about
1794 defining a new Lisp data type.
6cda572a
DA
1795 * print.c (print_object): If Lisp_Save_Value object's pointer
1796 is the address of a memory area containing Lisp_Objects, try
1797 to print them.
1798 * alloc.c (valid_lisp_object_p): Adjust comment.
8847a0de 1799
4b298d5a
DA
18002012-12-26 Dmitry Antipov <dmantipov@yandex.ru>
1801
1802 * keyboard.c (record_asynch_buffer_change): Initialize an event
1803 only if it's really needed.
1804 * frame.h (enum output_method): Remove output_mac member since
1805 it's a leftover from the deleted code.
1806 * frame.c (Fframep): Adjust user here ...
1807 * terminal.c (Fterminal_live_p): ... and here.
1808 * coding.c (Qmac): Now here because it's only used to denote
1809 end-of-line encoding type.
1810 (syms_of_coding): DEFSYM it.
1811 * frame.h (Qmac): Remove duplicated declaration.
1812
12384b01
PE
18132012-12-26 Paul Eggert <eggert@cs.ucla.edu>
1814
1815 * window.c (select_window_1): Now static, since it's used only here.
1816
f1665bdc
EZ
18172012-12-25 Eli Zaretskii <eliz@gnu.org>
1818
1819 * window.c (window_body_cols): Subtract display margins from the
1820 window body width on TTYs as well. See
1821 http://lists.gnu.org/archive/html/help-gnu-emacs/2012-12/msg00317.html
1822 for the original report.
1823
9a0d4f34
DA
18242012-12-25 Dmitry Antipov <dmantipov@yandex.ru>
1825
1826 * xdisp.c (redisplay_window): Remove inner local variable
1827 because the outer shadowed one has the same meaning.
cd78d9b1
DA
1828 * xterm.h (struct x_output): Remove toolbar_detached member since it's
1829 set but never used.
1830 * gtkutil.c (xg_tool_bar_detach_callback, xg_tool_bar_attach_callback)
1831 (xg_create_tool_bar): Adjust users.
9a0d4f34 1832
f9e7c67e
DA
18332012-12-24 Dmitry Antipov <dmantipov@yandex.ru>
1834
1835 * buffer.h (BUF_COMPACT): New macro to follow the common style.
1836 * buffer.c (Fget_buffer_create): Use it to set compact field of
1837 struct buffer_text to avoid accessing an uninitialized value
1838 when compact_buffer is called for the first time.
1839 (compact_buffer): Use convenient BUF_COMPACT and BUF_MODIFF.
2944d406
DA
1840 (Fset_buffer_modified_p): Use buffer_window_count to check
1841 whether the buffer is displayed in some window.
1842 * xdisp.c (message_dolog): Likewise.
f9e7c67e 1843
299614f3
EZ
18442012-12-23 Eli Zaretskii <eliz@gnu.org>
1845
40ff07a5
EZ
1846 * w32.c (acl_set_file): If setting the file security descriptor
1847 fails, and the new DACL is identical to the existing one, silently
1848 return success. This fixes problems for users backing up their
1849 own files without having the necessary privileges for setting
1850 security descriptors.
1851
299614f3
EZ
1852 * w32proc.c (reader_thread): Do not index fd_info[] with negative
1853 values.
1854 (reader_thread): Exit when cp->status becomes STATUS_READ_ERROR
1855 after WaitForSingleObject returns normally. This expedites reader
1856 thread shutdown when delete_child triggers it.
1857 (reap_subprocess): More accurate commentary for why we call
1858 delete_child only when cp->fd is negative.
1859
1860 * w32.c (sys_close): Do not call delete_child on a subprocess
1861 whose handle is not yet closed. Instead, set its file descriptor
1862 to a negative value, so that reap_subprocess will call
63a63bd4
SM
1863 delete_child on that subprocess when its SIGCHLD arrives.
1864 This avoids closing handles used for communications between sys_select
299614f3
EZ
1865 and reader_thread, which doesn't give sys_select a chance to
1866 notice that the process exited and invoke the SIGCHLD handler for
1867 it.
1868
cf162aee
JD
18692012-12-23 Jan Djärv <jan.h.d@swipnet.se>
1870
1871 * nsfns.m (Fns_do_applescript): Run event loop until script has
1872 been executed (Bug#12969).
1873 (ns_run_ascript): Chech as_script for nil, set to nil after
1874 executing script.
1875
94900bfe
MR
18762012-12-22 Martin Rudalics <rudalics@gmx.at>
1877
1878 * window.c (Fselect_window): Reword doc-string (Bug#13248).
1879
b2faf49c
EZ
18802012-12-22 Eli Zaretskii <eliz@gnu.org>
1881
1882 * w32term.c (w32fullscreen_hook): New function.
1883 (w32_create_terminal): Plug it into the terminal's fullscreen_hook.
1884
7efa3fb3
EZ
18852012-12-21 Eli Zaretskii <eliz@gnu.org>
1886
bb085aed
EZ
1887 * fileio.c (Finsert_file_contents): Doc fix.
1888
7efa3fb3
EZ
1889 * w32proc.c (new_child, delete_child, find_child_pid): For a
1890 subprocess, consider its slot being in use as long as its process
1891 handle (procinfo.hProcess) is not NULL. This avoids reusing the
1892 slot when a new process is started immediately after killing
1893 another one, without waiting enough time for the first process to
1894 be reaped and resources allocated for it be orderly freed.
1895 (Bug#13086)
1896 Suggested by Fabrice Popineau <fabrice.popineau@supelec.fr>.
1897
c1f02afa
CY
18982012-12-21 Chong Yidong <cyd@gnu.org>
1899
1900 * buffer.c (Fset_buffer_major_mode): Doc fix (Bug#13231).
1901
5bec25eb
CY
1902 * fns.c (Fcompare_strings): Doc fix (Bug#13081).
1903
a4b0cca1 19042012-12-21 Eli Zaretskii <eliz@gnu.org>
92340ec7
EZ
1905
1906 * w32.c (get_name_and_id): Always pass NULL as the first argument
1907 of lookup_account_sid. Avoids crashes with UNC file names that
1908 refer to DFS domains, not to specific machine names. (Bug#12621)
1909 Remove now unused argument FNAME; all callers changed.
1910 (get_file_owner_and_group): Remove now unused argument FNAME; all
1911 callers changed.
1912
34b4b7eb
CY
19132012-12-21 Chong Yidong <cyd@gnu.org>
1914
1915 * editfns.c (Finsert_char): Since read-char-by-name now signals an
1916 error for invalid chars, don't check for a nil return value.
1917
13002885
DA
19182012-12-20 Dmitry Antipov <dmantipov@yandex.ru>
1919
1920 Avoid calls to CHAR_TO_BYTE if byte position is known.
1921 * editfns.c (make_buffer_string_both): Use move_gap_both.
1922 (Fbuffer_string): Use make_buffer_string_both.
1923 * marker.c (buf_charpos_to_bytepos): Convert to eassert.
1924 Adjust comment.
1925 (buf_bytepos_to_charpos): Likewise.
1926 (charpos_to_bytepos): Remove.
1927 * fileio.c (Finsert_file_contents): Use move_gap_both.
1928 * search.c (Freplace_match): Likewise.
9a0d4f34 1929 * process.c (process_send_region): Likewise. Use convenient
13002885
DA
1930 names for byte positions.
1931 * lisp.h (charpos_to_bytepos): Remove prototype.
1932 * indent.c (scan_for_column): Use CHAR_TO_BYTE.
1933 * insdel.c (move_gap): Likewise.
1934
99e9311c
PE
19352012-12-20 Paul Eggert <eggert@cs.ucla.edu>
1936
1937 * xdisp.c (redisplay_internal): Remove now-unused local.
1938
e02230bf
SM
19392012-12-20 Stefan Monnier <monnier@iro.umontreal.ca>
1940
1941 * xdisp.c (select_frame_for_redisplay, ensure_selected_frame): Remove.
1942 (redisplay_internal): Don't bother selecting the frame to get the
4a74c818 1943 proper value of frame-local variables (bug#13225).
e02230bf 1944
1687fb14
DA
19452012-12-20 Dmitry Antipov <dmantipov@yandex.ru>
1946
1947 * textprop.c (set_text_properties_1): Do not allow NULL interval.
1948 Rename 4th argument since it may be buffer or string. Adjust comment.
1949 * intervals.c (graft_intervals_info_buffer): Find an interval here.
1950
a2f07cd2
DA
19512012-12-19 Dmitry Antipov <dmantipov@yandex.ru>
1952
1953 * coding.c (Fdetect_coding_region): Do not check start and end with
1954 CHECK_NUMBER_COERCE_MARKER since validate_region does that itself.
1955 (code_convert_region): Likewise.
1956
474d441e
EZ
19572012-12-18 Eli Zaretskii <eliz@gnu.org>
1958
1959 * w32.c (acl_get_file, acl_set_file): Run the file name through
1960 map_w32_filename, and resolve any symlinks in the file name, like
1961 Posix platforms do.
1962 (acl_set_file): Call revert_to_self, if any privileges were
1963 enabled.
1964
8725c076
JB
19652012-12-17 Juanma Barranquero <lekktu@gmail.com>
1966
1967 * makefile.w32-in ($(BLD)/editfns.$(O), $(BLD)/fileio.$(O))
1968 ($(BLD)/w32.$(O)): Update dependencies.
1969
1e101a4b
SM
19702012-12-17 Stefan Monnier <monnier@iro.umontreal.ca>
1971
1972 * xdisp.c (select_frame_for_redisplay): Use select_window_1 to
1973 propagate redisplay's scrolling (if any) to the right window.
1974 (redisplay_internal): Use ensure_selected_frame.
1975 (display_mode_lines): Complete last fix.
1976 * window.c (select_window_1): New func, extracted from select_window.
1977 (select_window): Use it.
1978 * window.h (select_window_1): Declare.
1979
66447e07
EZ
19802012-12-17 Eli Zaretskii <eliz@gnu.org>
1981
1982 Emulate Posix ACL APIs on MS-Windows.
1983 * w32.c: Include sddl.h and sys/acl.h.
1984 (SDDL_REVISION_1): Define if not already defined.
1985 (g_b_init_get_security_descriptor_dacl)
1986 (g_b_init_convert_sd_to_sddl, g_b_init_convert_sddl_to_sd)
1987 (g_b_init_is_valid_security_descriptor)
1988 (g_b_init_set_file_security): New static flags.
1989 (globals_of_w32): Initialize them to zero.
1990 (SetFileSecurity_Name): New string constant.
1991 (SetFileSecurity_Proc, GetSecurityDescriptorDacl_Proc)
1992 (ConvertStringSecurityDescriptorToSecurityDescriptor_Proc)
1993 (ConvertSecurityDescriptorToStringSecurityDescriptor_Proc)
1994 (IsValidSecurityDescriptor_Proc): New typedefs.
1995 (get_file_security, get_security_descriptor_owner)
1996 (get_security_descriptor_group): Set errno to ENOTSUP.
1997 (set_file_security, get_security_descriptor_dacl)
1998 (is_valid_security_descriptor, convert_sd_to_sddl)
1999 (convert_sddl_to_sd, acl_valid, acl_to_text, acl_from_text)
2000 (acl_free, acl_get_file, acl_set_file): New functions.
2001
2002 * fileio.c (Fcopy_file) [WINDOWSNT]: Support copying ACLs.
2003
207a7ef0
PE
20042012-12-17 Paul Eggert <eggert@cs.ucla.edu>
2005
2006 Don't reraise SIGCHLD, as that can now lose (Bug#13192).
2007 With the 2012-12-03 fix for Bug#12980 in place, an old workaround
2008 for some of that bug's symptoms can now cause Emacs to abort.
2009 Remove the workaround.
2010 * process.c (wait_reading_process_output): Don't reraise SIGCHLD.
2011 The bug that caused SIGCHLD to get lost has been fixed, and the
2012 workaround for it can now cause Emacs to abort.
2013
17fdfc15
PE
20142012-12-16 Paul Eggert <eggert@cs.ucla.edu>
2015
2016 * sysdep.c (emacs_abort): Bump backtrace size to 40.
2017 Companion to the 2012-09-30 patch. Suggested by Eli Zaretskii in
2018 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00796.html>.
2019
7c3d167f
RF
20202012-12-16 Romain Francoise <romain@orebokech.com>
2021
2022 * fileio.c (Ffile_acl, Fset_file_acl): New functions.
2023 (Fcopy_file): Change last arg to `preserve_extended_attributes'
1e101a4b 2024 and copy ACL entries of file in addition to SELinux context if set.
7c3d167f
RF
2025 (syms_of_fileio): Add `file-acl' and `set-file-acl'.
2026
2027 * Makefile.in (LIBACL_LIBS): New macro.
2028 (LIBES): Use it.
2029
7d80ea23
PE
20302012-12-15 Paul Eggert <eggert@cs.ucla.edu>
2031
2032 * fileio.c (internal_delete_file): Use bool for boolean.
2033
b0728617
EZ
20342012-12-15 Eli Zaretskii <eliz@gnu.org>
2035
2036 Fix bug #13079 on MS-Windows with temp files not being deleted.
2037 * w32.h (_child_process): New members input_file and
2038 pending_deletion.
2039 (register_child): First argument is now pid_t.
2040 (record_infile, record_pending_deletion): New prototypes.
2041
2042 * w32proc.c (new_child): Initialize input_file and
2043 pending_deletion members of the child.
2044 (delete_child): Delete the child's temporary input file, if any,
2045 that is pending deletion.
2046 (register_child): First argument is now pid_t.
2047 (record_infile, record_pending_deletion): New functions.
2048 (reap_subprocess): Fix a typo in DebPrint string.
2049 (sys_spawnve, sys_kill): Use pid_t for PID arguments.
2050
2051 * fileio.c (internal_delete_file): Return an int again: non-zero
2052 if delete-file succeeds, zero otherwise.
2053
2054 * lisp.h (internal_delete_file): Adjust prototype.
2055
2056 * callproc.c (Fcall_process): Don't overwrite infile with result
2057 of DECODE_FILE.
2058 [WINDOWSNT] If BUFFER is an integer, i.e. we are launching an
2059 asynchronous subprocess, record the name of the input file name,
2060 if any.
2061 (delete_temp_file) [WINDOWSNT]: If internal_delete_file fails to
2062 delete the file, record it as pending deletion when the subprocess
2063 exits.
2064
7e90af26
EZ
20652012-12-14 Eli Zaretskii <eliz@gnu.org>
2066
2067 * editfns.c [HAVE_PWD_H]: Include grp.h.
2068
2069 * makefile.w32-in ($(BLD)/editfns.$(O)): Add $(NT_INC)/grp.h.
2070
97976f9f
PE
20712012-12-14 Paul Eggert <eggert@cs.ucla.edu>
2072
2073 Fix permissions bugs with setgid directories etc. (Bug#13125)
2074 * dired.c (Ffile_attributes): Return t as the 9th attribute,
2075 to mark it as a placeholder. The old value was often wrong.
2076 The only user of this attribute has been changed to use
2077 file-ownership-preserved-p instead, with its new group arg.
2078 * editfns.c (Fgroup_gid, Fgroup_real_gid): New functions.
2079
26ec1f49
SM
20802012-12-14 Stefan Monnier <monnier@iro.umontreal.ca>
2081
ad966fe7
SM
2082 * xdisp.c (select_frame_for_redisplay, display_mode_lines):
2083 Keep selected_window and selected_frame in sync.
26ec1f49 2084
5c207910
EZ
20852012-12-14 Eli Zaretskii <eliz@gnu.org>
2086
2087 * w32.c (stat_worker): If w32_stat_get_owner_group is zero, do not
2088 try to get accurate owner and group information from NT file
2089 security APIs. This is to make most callers of 'stat' and
2090 'lstat', which don't need that information, much faster.
2091
26ec1f49
SM
2092 * dired.c (Ffile_attributes) [WINDOWSNT]:
2093 Set w32_stat_get_owner_group to a non-zero value, to request accurate
5c207910
EZ
2094 owner and group information from 'lstat'.
2095
893f52d8
PE
20962012-12-13 Paul Eggert <eggert@cs.ucla.edu>
2097
4c95c9a5
PE
2098 * fileio.c (Finsert_file_contents): Don't put tail into head area,
2099 as that confuses set-auto-coding, so insist on the head-read
2100 returning the full 1024 bytes. Let lseek compute the tail offset;
2101 less work for us. Do not ignore I/O errors when reading the tail.
2102
893f52d8
PE
2103 * xdisp.c: Minor style fixes.
2104 (init_iterator): Hoist assignment out of if-expression.
2105 (markpos_of_region): Callers now test for sign, not for -1.
2106
40d1e434
DA
21072012-12-13 Dmitry Antipov <dmantipov@yandex.ru>
2108
2109 Minor redisplay optimization when the region length is zero.
2110 * xdisp.c (markpos_of_region): New function.
2111 (init_iterator): Do not highlight the region of zero length.
2112 (redisplay_window): Check whether the region is of non-zero length.
2113 (try_cursor_movement): Allow if the region length is zero.
2114 (try_window_reusing_current_matrix, try_window_id): Likewise.
2115
727f9739 21162012-12-13 Eli Zaretskii <eliz@gnu.org>
e8c6e965
EZ
2117
2118 * search.c (search_buffer): Check the inverse translations of each
2119 character in pattern when the buffer being searched is unibyte.
2120 (Bug#13084)
2121
727f9739 21222012-12-13 Paul Eggert <eggert@cs.ucla.edu>
184246df
PE
2123
2124 * fileio.c (Fvisited_file_modtime): Return (-1 ...) for nonexistent
2125 files, fixing a regression from 24.2.
645c6a30 2126 (Fverify_visited_file_modtime): Don't read uninitialized st.st_size.
184246df 2127
d20704ef
PE
21282012-12-13 Paul Eggert <eggert@cs.ucla.edu>
2129
2130 * fileio.c (Fcopy_file): Make fstat failure as serious as open failure.
2131 fstat shouldn't fail, and if it does fail copy-file should not proceed.
2132 Remove unnecessary S_ISLNK test, as (contra the comments) this
2133 function can't copy symlinks. Improve quality of error message
2134 when attempting to copy files that are neither regular files nor
2135 directories.
2136
2dd61a9b
DA
21372012-12-12 Dmitry Antipov <dmantipov@yandex.ru>
2138
2139 * dispnew.c (set_window_cursor_after_update): Use clip_to_bounds.
2140 * gtkutil.c (xg_set_toolkit_scroll_bar_thumb):
2141 * window.c (Frecenter):
2142 * xdisp.c (resize_mini_window, hscroll_window_tree, draw_glyphs):
2143 * xterm.c (x_set_toolkit_scroll_bar_thumb): Likewise.
2144
cc98b684
DC
21452012-12-12 Daniel Colascione <dancol@dancol.org>
2146
1e101a4b 2147 * unexcw.c (fixup_executable): Use posix_fallocate to ensure that
cc98b684
DC
2148 the dumped Emacs is not a sparse file, greatly improving Cygwin
2149 "make bootstrap" performance.
2150
38e791fd
MA
21512012-12-11 Michael Albinus <michael.albinus@gmx.de>
2152
2153 * inotify.c (inotify_callback): Generate an Emacs event for every
2154 incoming inotify event.
2155
f9d1448f
EZ
21562012-12-11 Eli Zaretskii <eliz@gnu.org>
2157
2158 * xdisp.c (handle_face_prop): Fix logic of computing
2159 it->start_of_box_run_p.
2160 (append_space_for_newline): If the glyph row is R2L, reset the
2161 iterator's end_of_box_run_p flag before prepending the space glyph.
2162 (extend_face_to_end_of_line): If the glyph row is R2L, reset the
2163 iterator's start_of_box_run_p flag before prepending the stretch.
2164 (append_glyph, produce_image_glyph, append_composite_glyph)
2165 (append_stretch_glyph, append_glyphless_glyph): Reverse the
2166 left_box_line_p and right_box_line_p flags of the glyph for R2L
2167 glyph rows. (Bug#13011)
2168
c6afe371
DA
21692012-12-11 Dmitry Antipov <dmantipov@yandex.ru>
2170
2171 * buffer.c (Fset_buffer_multibyte): Do not force redisplay
2172 if changed buffer is not shown in a window.
2173 * insdel.c (prepare_to_modify_buffer): Likewise.
2174 * window.c (replace_buffer_in_windows_safely): Do nothing
2175 if buffer is not shown in a window.
2176 (Fforce_window_update): Likewise if string or buffer argument
2177 is passed.
2178
1b47babd
EZ
21792012-12-11 Eli Zaretskii <eliz@gnu.org>
2180
2181 * inotify.c (Finotify_add_watch): Rename decoded_file_name to
2182 encoded_file_name, which is what it is.
2183
4c1acb95
DA
21842012-12-11 Dmitry Antipov <dmantipov@yandex.ru>
2185
2186 Consistently use marker_position and marker_byte_position.
2187 * fringe.c (Ffringe_bitmaps_at_pos):
2188 * indent.c (Fvertical_motion):
2189 * insdel.c (prepare_to_modify_buffer):
2190 * keyboard.c (make_lispy_position):
2191 * window.c (Fwindow_end, Fpos_visible_in_window_p, unshow_buffer)
2192 (window_scroll_pixel_based, displayed_window_lines)
2193 (Fset_window_configuration):
2194 * xdisp.c (message_dolog, with_echo_area_buffer_unwind_data)
2195 (mark_window_display_accurate_1, redisplay_window, decode_mode_spec):
2196 Replace direct access to marker fields with calls
2197 to marker_position and/or marker_byte_position.
2198
0eeb69fe
JB
21992012-12-11 Juanma Barranquero <lekktu@gmail.com>
2200
2201 * makefile.w32-in (SIG2STR_H): New macro.
2202 (SYSWAIT_H, $(BLD)/emacs.$(O), $(BLD)/process.$(O))
2203 ($(BLD)/w32notify.$(O)): Update dependencies.
2204
1cf1bbd5
DC
22052012-12-10 Daniel Colascione <dancol@dancol.org>
2206
8db4b52f
DC
2207 * w32term.c, keyboard.c: Fix build break in cygw32 by omitting
2208 Windows file notification functionality unless WINDOWSNT.
2209
1cf1bbd5
DC
2210 * w32gui.h (hprevinst, lpCmdLine, nCmdShow): Remove unused
2211 declarations.
2212
2213 * w32fns.c (cache_system_info): Initialize the global hinst
2214 variable here so various initialization calls DTRT.
2215
1e101a4b 2216 * unexw32.c (hprevinst, lpCmdLine, nCmdShow): Remove unused variables.
1cf1bbd5
DC
2217 (hinst): Remove unneeded extern declaration.
2218 (_start): Remove initialization of above variables; remove
2219 initialization of hinst, as cache_system_info now does that.
2220
2221 * emacs.c (main): Call cache_system_info early in startup; we
2222 previously weren't calling it in Cygwin builds.
2223
26ec1f49
SM
2224 * Makefile.in (ntsource, WINDRES, W32_RES, W#@_RES_LINK):
2225 Teach the autoconf build system how to compile a Windows resource file
1cf1bbd5
DC
2226 and link it to Emacs.
2227
98a07056
DA
22282012-12-10 Dmitry Antipov <dmantipov@yandex.ru>
2229
2230 Per-buffer window counters.
2231 * buffer.h (struct buffer): New member window_count.
2232 (buffer_window_count): New function.
2233 * buffer.c (Fget_buffer_create, Fmake_indirect_buffer):
2234 Initialize window_count.
2235 (Fkill_buffer): Verify window_count for the buffer being killed.
2236 (modify_overlay): Do not force redisplay if buffer is not shown
2237 in any window.
2238 (init_buffer_once): Initialize window_count for buffer_defaults
2239 and buffer_local_symbols.
2240 * window.h (buffer_shared): Remove declaration.
2241 (wset_buffer): Convert from inline ...
2242 * window.c (wset_buffer): ... to an ordinary function.
2243 (adjust_window_count): New function.
2244 (make_parent_window): Use it.
2245 * xdisp.c (buffer_shared): Remove.
2246 (redisplay_internal, redisplay_window): Adjust users.
2247 (buffer_shared_and_changed): Use per-buffer window counter.
2248
2b8c9064
EZ
22492012-12-10 Eli Zaretskii <eliz@gnu.org>
2250
2251 Support for filesystem notifications on MS-Windows.
2252 * w32proc.c (sys_select): If drain_message_queue returns non-zero,
2253 and this is a TTY frame, signal the caller that keyboard input is
2254 available.
2255
2256 * w32xfns.c (drain_message_queue): Now returns an int: an
2257 indication whether any WM_EMACS_FILENOTIFY messages were found in
2258 the queue.
2259
2260 * w32inevt.c (handle_file_notifications): New function.
2261 (w32_console_read_socket): Call it to process file notifications.
2262
2263 * w32console.c (initialize_w32_display): Record the main thread ID
2264 in dwMainThreadId.
2265
2266 * deps.mk (inotify.o): New dependency list.
2267
2268 * Makefile.in (SOME_MACHINE_OBJECTS): Add w32notify.o.
2269
2270 * w32term.h (WM_EMACS_FILENOTIFY): New custom message.
2271 (WM_EMACS_END): Bump value by 1.
2272 (notification_buffer_in_use, file_notifications)
2273 (notifications_size, notifications_desc): Declare.
2274 (w32_get_watch_object, lispy_file_action, globals_of_w32notify):
2275 Add prototypes.
2276
2277 * w32term.c (lispy_file_action, queue_notifications): New functions.
2278 (syms_of_w32term) <Qadded, Qremoved, Qmodified, Qrenamed_from>
2279 <Qrenamed_to>: New symbols.
2280 (w32_read_socket): Handle the WM_EMACS_FILENOTIFY message.
2281
2282 * w32notify.c: New file, implements file event notifications for
2283 MS-Windows.
2284
2285 * w32fns.c (w32_wnd_proc): Handle the WM_EMACS_FILENOTIFY message
2286 by posting it to the w32_read_socket queue.
2287
1e101a4b 2288 * termhooks.h (enum event_kind) [HAVE_NTGUI]: Support FILE_NOTIFY_EVENT.
2b8c9064
EZ
2289
2290 * makefile.w32-in (OBJ2): Add $(BLD)/w32notify.$(O).
2291 (GLOBAL_SOURCES): Add w32notify.c
2292 ($(BLD)/w32notify.$(O)): New set of dependencies.
2293
2294 * lisp.h (syms_of_w32notify) [WINDOWSNT]: Add prototype.
2295
1e101a4b
SM
2296 * keyboard.c (kbd_buffer_get_event) [WINDOWSNT]:
2297 Handle FILE_NOTIFY_EVENT.
2b8c9064
EZ
2298 (syms_of_keyboard) [HAVE_NTGUI] <Qfile_notify>: New symbol.
2299 (keys_of_keyboard) [WINDOWSNT]: Bind file-notify to
2300 w32notify-handle-event by default.
2301
2302 * emacs.c (main) [WINDOWSNT]: Call globals_of_w32notify and
2303 syms_of_w32notify.
2304
81606b10
RS
23052012-12-10 Rüdiger Sonderfeld <ruediger@c-plusplus.de>
2306
2b8c9064 2307 Support for filesystem notifications on GNU/Linux via inotify.
1e101a4b 2308 * termhooks.h (enum event_kind) [HAVE_INOTIFY]: Add FILE_NOTIFY_EVENT.
81606b10
RS
2309
2310 * lisp.h (syms_of_inotify) [HAVE_INOTIFY]: Add prototype.
2311
2312 * keyboard.c (Qfile_inotify) [HAVE_INOTIFY]: New variable.
2313 (syms_of_keyboard): DEFSYM it.
2314 (kbd_buffer_get_event) [HAVE_INOTIFY]: Generate FILE_NOTIFY_EVENT.
2315 (make_lispy_event): Support FILE_NOTIFY_EVENT by generating
2316 Qfile_inotify events.
2317 (keys_of_keyboard) [HAVE_INOTIFY]: Bind file-inotify events in
2318 special-event-map to inotify-handle-event.
2319
2320 * emacs.c (main) [HAVE_INOTIFY]: Call syms_of_inotify.
2321
2322 * Makefile.in (base_obj): Add inotify.o.
2323
2324 * inotify.c: New file.
2325
265c2fbf 23262012-12-10 Jan Djärv <jan.h.d@swipnet.se>
a06ae17d
JD
2327
2328 * nsterm.m (fd_handler:): FD_ZERO fds (Bug#13103).
2329
265c2fbf 23302012-12-10 Fabrice Popineau <fabrice.popineau@gmail.com>
cb576b5c
FP
2331
2332 * w32fns.c (cache_system_info): Cast sysinfo_cache.dwPageSize to
2333 DWORD_PTR, for compatibility with 64-bit builds.
2334
a06ae17d 2335 * w32.c (_PROCESS_MEMORY_COUNTERS_EX):
cb576b5c
FP
2336 (GetProcessWorkingSetSize_Proc, get_process_working_set_size)
2337 (system_process_attributes): Use SIZE_T rather than DWORD, for
2338 compatibility with 64-bit builds.
2339
265c2fbf 23402012-12-10 Christopher Schmidt <christopher@ch.ristopher.com>
76b92fee
CS
2341
2342 * lread.c (Vload_source_file_function): Doc fix (Bug#11647).
2343
265c2fbf 23442012-12-10 Eli Zaretskii <eliz@gnu.org>
81d8cc53
EZ
2345
2346 * indent.c (Fvertical_motion): If a display string will be
2347 displayed on the left or the right margin, don't consider it as a
2348 factor in cursor positioning. (Bug#13108)
2349
265c2fbf 23502012-12-10 Martin Rudalics <rudalics@gmx.at>
2cec368c
MR
2351
2352 * editfns.c (Fcompare_buffer_substrings): Reword doc-string.
2353
5f460827
PE
23542012-12-10 Paul Eggert <eggert@cs.ucla.edu>
2355
2356 * fileio.c (Fsubstitute_in_file_name): Use ptrdiff_t, not int,
2357 for string length.
2358
a16e75cd
EZ
23592012-12-08 Eli Zaretskii <eliz@gnu.org>
2360
2361 * w32.c (unsetenv): Return 0 if the input string is too long.
2362
5745a7df
PE
23632012-12-08 Paul Eggert <eggert@cs.ucla.edu>
2364
2365 Use putenv+unsetenv instead of modifying environ directly (Bug#13070).
2366 * alloc.c (xputenv): New function.
2367 * dbusbind.c (Fdbus_init_bus):
2368 * emacs.c (main):
2369 * xterm.c (x_term_init):
2370 Use xputenv instead of setenv or putenv, to detect memory exhaustion.
2371 * editfns.c (initial_tz): Move static var decl up.
2372 (tzvalbuf_in_environ): New static var.
2373 (init_editfns): Initialize these two static vars.
2374 (Fencode_time): Don't assume arbitrary limit on EMACS_INT width.
2375 Save old TZ value on stack, if it's small.
2376 (Fencode_time, set_time_zone_rule): Don't modify 'environ' directly;
2377 instead, use xputenv+unsetenv to set and restore TZ.
2378 (environbuf): Remove static var. All uses removed.
2379 (Fset_time_zone_rule): Do not save TZ and environ;
2380 no longer needed here.
2381 (set_time_zone_rule_tz1, set_time_zone_rule_tz2) [LOCALTIME_CACHE]:
2382 Move to inside set_time_zone_rule; they don't need file scope any more.
2383 (set_time_zone_rule): Maintain the TZ=value string separately.
2384 (syms_of_editfns): Don't initialize initial_tz;
2385 init_editfns now does it.
2386 * emacs.c (dump_tz) [HAVE_TZSET]: Now const.
2387 * lisp.h (xputenv): New decl.
2388
c56efa40
FP
23892012-12-08 Fabrice Popineau <fabrice.popineau@gmail.com>
2390
2391 * w32fns.c (emacs_abort): Don't do arithmetics on void pointers.
2392
75ceee05
EZ
23932012-12-08 Eli Zaretskii <eliz@gnu.org>
2394
2395 * w32.c (unsetenv, sys_putenv): New functions.
2396
1b6dbfeb
CY
23972012-12-08 Chong Yidong <cyd@gnu.org>
2398
2399 * editfns.c (Finsert_char): Make the error message more
2400 informative (Bug#12992).
2401
d983a10b
PE
24022012-12-08 Paul Eggert <eggert@cs.ucla.edu>
2403
7be78020
PE
2404 Simplify get_lim_data.
2405 * vm-limit.c (get_lim_data): Combine RLIMIT_AS and RLIMIT_DATA methods.
2406 Remove USG and vlimit methods; no longer used these days.
2407 Add #error catchall just in case.
2408
d983a10b
PE
2409 Assume POSIX 1003.1-1988 or later for signal.h (Bug#13026).
2410 Exceptions: do not assume SIGCONT, SIGSTOP, SIGTSTP, SIGTTIN,
2411 SIGTTOU, SIGUSR1, SIGUSR2, as Microsoft platforms lack these.
2412 * process.c [subprocesses]: Include <c-ctype.h>, <sig2str.h>.
2413 (deleted_pid_list, Fdelete_process, create_process)
2414 (record_child_status_change, handle_child_signal, deliver_child_signal)
2415 (init_process_emacs, syms_of_process):
2416 Assume SIGCHLD is defined.
2417 (parse_signal): Remove. All uses removed.
2418 (abbr_to_signal): New static function.
2419 (Fsignal_process): Use it to convert signal names to ints.
2420 * sysdep.c (sys_suspend) [!DOS_NT]: Use kill (0, ...) rather than
2421 kill (getpgrp (), ...).
2422 (emacs_sigaction_init): Assume SIGCHLD is defined.
2423 (init_signals): Assume SIGALRM, SIGCHLD, SIGHUP, SIGKILL,
2424 SIGPIPE, and SIGQUIT are defined. Do not worry about SIGCLD any more.
2425 * syssignal.h (EMACS_KILLPG): Remove.
2426 All uses replaced by 'kill' with a negative pid.
2427 (SIGCHLD): Remove definition, as we now assume SIGCHLD.
2428 * w32proc.c (sys_kill): Support negative pids compatibly with POSIX.
2429
9cdde1e2
PE
24302012-12-07 Paul Eggert <eggert@cs.ucla.edu>
2431
2432 * sysdep.c (get_child_status): Abort on internal error (Bug#13086).
2433 This will cause a production Emacs to dump core instead of
2434 infinite-looping.
2435
822995f8
DA
24362012-12-07 Dmitry Antipov <dmantipov@yandex.ru>
2437
2438 * frame.c (make_frame): Do not set window's buffer to t.
2439 * window.c (Fsplit_window_internal): Likewise. Previously it was
2440 used to indicate that the window is being set up. Now we use
2441 set_window_buffer for all new windows, so the condition in ...
2442 (Fset_window_buffer): ... is always true and can be removed.
2443
ed08365b
DA
24442012-12-07 Dmitry Antipov <dmantipov@yandex.ru>
2445
2446 Convenient macro to check whether the buffer is hidden.
2447 * buffer.h (BUFFER_HIDDEN_P): New macro.
2448 * frame.c (make_frame): Use it. Adjust comment.
2449 * buffer.c (candidate_buffer): New function.
2450 (Fother_buffer, other_buffer_safely): Use it.
2451
e86f5134
EZ
24522012-12-06 Eli Zaretskii <eliz@gnu.org>
2453
2454 * w32proc.c (waitpid): Avoid busy-waiting when called with WNOHANG
2455 if the child process is still running. Instead, exit the wait
2456 loop and return zero. (Bug#13086)
2457
1700db3c
DA
24582012-12-06 Dmitry Antipov <dmantipov@yandex.ru>
2459
2460 * frame.h (x_char_width, x_char_height): Remove prototypes.
2461 * w32term.h (x_char_width, x_char_height): Likewise.
2462 * xfns.c (x_char_width, x_char_height): Remove.
2463 * w32fns.c (x_char_width, x_char_height): Likewise.
2464 * nsfns.c (x_char_width, x_char_height): Likewise.
2465 * frame.c (Fframe_char_width): Use FRAME_COLUMN_WIDTH for
2466 all window frames.
2467 (Fframe_char_height): Likewise with FRAME_LINE_HEIGHT.
2468 * keyboard.c (command_loop_1): Remove prototype.
2469 (command_loop_2, top_level_1): Add static to match prototype.
2470
35fb8050
PE
24712012-12-06 Paul Eggert <eggert@cs.ucla.edu>
2472
2473 Fix a recently-introduced delete-process race condition.
2474 * callproc.c, process.h (record_kill_process):
2475 New function, containing part of the old call_process_kill.
2476 (call_process_kill): Use it.
2477 This does not change call_process_kill's behavior.
2478 * process.c (Fdelete_process): Use record_kill_process to fix a
2479 race condition that could cause Emacs to lose track of a child.
2480
565212e5
DA
24812012-12-06 Dmitry Antipov <dmantipov@yandex.ru>
2482
2483 Avoid code duplication between prev_frame and next_frame.
2484 * frame.c (candidate_frame): New function. Add comment.
2485 (prev_frame, next_frame): Use it. Adjust comment.
2486
d8ad4d3f 24872012-12-06 Eli Zaretskii <eliz@gnu.org>
d3cefd13
EZ
2488
2489 * callproc.c (Fcall_process_region) [!HAVE_MKSTEMP]: If mktemp
2490 fails, signal an error instead of continuing with an empty
2491 string. (Bug#13079)
7c2fcf9b
EZ
2492 Encode expanded temp file pattern before passing it to mkstemp or
2493 mktemp.
d3cefd13 2494
2e7cddd3
EZ
2495 * fileio.c (file_name_as_directory, directory_file_name) [DOS_NT]:
2496 Encode the file name before passing it to dostounix_filename, in
2497 case it will downcase it (under w32-downcase-file-names).
2498 (Bug#12933)
2499
644d3f0d
PE
25002012-12-05 Paul Eggert <eggert@cs.ucla.edu>
2501
2502 Minor call-process cleanups.
2503 * callproc.c (Fcall_process): Do record-unwind-protect on MSDOS
2504 at the same time as other platforms, to simplify analysis.
2505 No need for fd0_volatile since we have synch_process_fd.
2506 Avoid needless emacs_close; arg is always negative.
2507
396376f1
AS
25082012-12-04 Andreas Schwab <schwab@linux-m68k.org>
2509
2510 * callproc.c (Fcall_process): Fix specpdl nesting for asynchronous
2511 processes.
2512
350f51ad
DA
25132012-12-04 Dmitry Antipov <dmantipov@yandex.ru>
2514
2515 * lisp.h (Mouse_HLInfo): Remove set-but-unused mouse_face_image_state
2516 member. Adjust users. Convert mouse_face_past_end, mouse_face_defer
2517 and mouse_face_hidden members to a bitfields.
2518 * frame.h (struct frame): Remove set-but-not-used space_width member.
2519 (FRAME_SPACE_WIDTH): Remove.
2520 * nsterm.m, w32term.c, xterm.c: Adjust users.
2521 * termchar.h (struct tty_display_info): Remove set-but-unused se_is_so
2522 member. Adjust users. Convert term_initted, delete_in_insert_mode,
2523 costs_set, insert_mode, standout_mode, cursor_hidden and flow_control
2524 members to a bitfields.
2525
bc9dbce6
PE
25262012-12-03 Paul Eggert <eggert@cs.ucla.edu>
2527
bb5f74ee
PE
2528 Don't let call-process be a zombie factory (Bug#12980).
2529 Fixing this bug required some cleanup of the signal-handling code.
2530 As a side effect, this change also fixes a longstanding rare race
2531 condition whereby Emacs could mistakenly kill unrelated processes,
2532 and it fixes a bug where a second C-g does not kill a recalcitrant
2533 synchronous process in GNU/Linux and similar platforms.
2534 The patch should also fix the last vestiges of Bug#9488,
2535 a bug which has mostly been fixed on the trunk by other changes.
2536 * callproc.c, process.h (synch_process_alive, synch_process_death)
2537 (synch_process_termsig, sync_process_retcode):
2538 Remove. All uses removed, to simplify analysis and so that
2539 less consing is done inside critical sections.
2540 * callproc.c (call_process_exited): Remove. All uses replaced
2541 with !synch_process_pid.
2542 * callproc.c (synch_process_pid, synch_process_fd): New static vars.
2543 These take the role of what used to be in unwind-protect arg.
2544 All uses changed.
2545 (block_child_signal, unblock_child_signal):
2546 New functions, to avoid races that could kill innocent-victim processes.
2547 (call_process_kill, call_process_cleanup, Fcall_process): Use them.
2548 (call_process_kill): Record killed processes as deleted, so that
2549 zombies do not clutter up the system. Do this inside a critical
2550 section, to avoid a race that would allow the clutter.
2551 (call_process_cleanup): Fix code so that the second C-g works again
2552 on common platforms such as GNU/Linux.
2553 (Fcall_process): Create the child process in a critical section,
2554 to fix a race condition. If creating an asynchronous process,
2555 record it as deleted so that zombies do not clutter up the system.
2556 Do unwind-protect for WINDOWSNT too, as that's simpler in the
2557 light of these changes. Omit unnecessary call to emacs_close
2558 before failure, as the unwind-protect code does that.
2559 * callproc.c (call_process_cleanup):
2560 * w32proc.c (waitpid): Simplify now that synch_process_alive is gone.
2561 * process.c (record_deleted_pid): New function, containing
2562 code refactored out of Fdelete_process.
2563 (Fdelete_process): Use it.
2564 (process_status_retrieved): Remove. All callers changed to use
2565 child_status_change.
2566 (record_child_status_change): Remove, folding its contents into ...
2567 (handle_child_signal): ... this signal handler. Now, this
2568 function is purely a handler for SIGCHLD, and is not called after
2569 a synchronous waitpid returns; the synchronous code is moved to
2570 wait_for_termination. There is no need to worry about reaping
2571 more than one child now.
2572 * sysdep.c (get_child_status, child_status_changed): New functions.
2573 (wait_for_termination): Now takes int * status and bool
2574 interruptible arguments, too. Do not record child status change;
2575 that's now the caller's responsibility. All callers changed.
2576 Reimplement in terms of get_child_status.
2577 (wait_for_termination_1, interruptible_wait_for_termination):
2578 Remove. All callers changed to use wait_for_termination.
2579 * syswait.h: Include <stdbool.h>, for bool.
2580 (record_child_status_change, interruptible_wait_for_termination):
2581 Remove decls.
2582 (record_deleted_pid, child_status_changed): New decls.
2583 (wait_for_termination): Adjust to API changes noted above.
2584
bc9dbce6
PE
2585 * bytecode.c, lisp.h (Qbytecode): Remove.
2586 No longer needed after 2012-11-20 interactive-p changes.
2587
3cf3c607
EZ
25882012-12-03 Eli Zaretskii <eliz@gnu.org>
2589
2590 * xdisp.c (redisplay_window): If the cursor is visible, but inside
2591 the scroll margin, move point outside the margin. (Bug#13055)
2592
005c8d13
JD
25932012-12-03 Jan Djärv <jan.h.d@swipnet.se>
2594
2595 * gtkutil.c (my_log_handler): New function.
2596 (xg_set_geometry): Set log handler to my_log_handler (Bug#11177).
2597
20edc1c9
DA
25982012-12-03 Dmitry Antipov <dmantipov@yandex.ru>
2599
2600 * lisp.h (modify_region): Rename to...
2601 (modify_region_1): ...new prototype.
2602 * textprop.c (modify_region): Now static. Adjust users.
2603 * insdel.c (modify_region): Rename to...
2604 (modify_region_1): ...new function to work with current buffer.
2605 Adjust comment and users. Use true and false for booleans.
2606
62c2e5ed
DA
26072012-12-03 Dmitry Antipov <dmantipov@yandex.ru>
2608
2609 * alloc.c (free_save_value): New function.
2610 (safe_alloca_unwind): Use it.
2611 * lisp.h (free_save_value): New prototype.
2612 * editfns.c (save_excursion_save): Use Lisp_Misc_Save_Value.
2613 Add comment.
2614 (save_excursion_restore): Adjust to match saved data structure.
2615 Use free_save_value to offload some work from GC. Drop obsolete
2616 #if 0 code.
2617
c5bc2d1d 26182012-12-03 Chong Yidong <cyd@gnu.org>
a2458031
CY
2619
2620 * fileio.c (Vauto_save_list_file_name): Doc fix.
2621
c5bc2d1d 26222012-12-03 Fabrice Popineau <fabrice.popineau@gmail.com>
c7b36b95
FP
2623
2624 * w32fns.c: Remove prototype of atof.
1e101a4b 2625 (syspage_mask): Make it DWORD_PTR, for compatibility with 64-bit
c7b36b95 2626 builds.
1e101a4b 2627 (file_dialog_callback): Make it UINT_PTR.
c7b36b95
FP
2628
2629 * w32common.h (syspage_mask): Declare DWORD_PTR, for compatibility
2630 with 64-bit builds.
2631
2632 * w32.c (FILE_DEVICE_FILE_SYSTEM, METHOD_BUFFERED)
2633 (FILE_ANY_ACCESS, CTL_CODE) [_MSC_VER]: Define only if not already
2634 defined.
2635
c5bc2d1d 26362012-12-03 Glenn Morris <rgm@gnu.org>
14d27346 2637
a9de9f0c 2638 * data.c (Fboundp, Fsymbol_value): Doc fix re lexical-binding.
14d27346 2639
21e54a94
PE
26402012-12-02 Paul Eggert <eggert@cs.ucla.edu>
2641
2dd2e622
PE
2642 Fix xpalloc confusion after memory is exhausted.
2643 * alloc.c (xpalloc): Comment fix.
2644 * charset.c (Fdefine_charset_internal): If xpalloc exhausts memory
2645 and signals an error, do not clear charset_table_size, as
2646 charset_table is still valid.
2647 * doprnt.c (evxprintf): Clear *BUF after freeing it.
2648
21e54a94
PE
2649 Use execve to avoid need to munge environ (Bug#13054).
2650 * callproc.c (Fcall_process):
2651 * process.c (create_process):
2652 Don't save and restore environ; no longer needed.
2653 * callproc.c (child_setup):
2654 Use execve, not execvp, to preserve environ.
2655
3e5490f7
PE
26562012-12-01 Paul Eggert <eggert@cs.ucla.edu>
2657
2658 * xterm.c (x_draw_image_relief): Remove unused locals (Bug#10500).
2659
75b4f59c
YM
26602012-12-01 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
2661
2662 * xterm.c (x_draw_relief_rect, x_draw_image_relief): Fix relief
2663 display for sliced images (Bug#10500).
2664
2665 * w32term.c (w32_draw_relief_rect, x_draw_image_relief): Likewise.
2666
f8aff4c6
JB
26672012-11-30 Juanma Barranquero <lekktu@gmail.com>
2668
2669 * doc.c (Fdocumentation): Re-add handling of function-documentation,
2670 accidentally removed in 2012-11-09T04:10:16Z!monnier@iro.umontreal.ca (bug#13034).
2671
3940b924
DA
26722012-11-29 Dmitry Antipov <dmantipov@yandex.ru>
2673
2674 * xdisp.c (window_outdated): Remove eassert since it hits
2675 some suspicious corner cases (see Bug#13007 and Bug#13012).
2676 (mode_line_update_needed): New function.
2677 (redisplay_internal, redisplay_window): Use it.
2678 (ensure_selected_frame): New function.
2679 (redisplay_internal, unwind_redisplay): Use it.
2680 (redisplay_internal): Move comment about buffer_shared...
2681 (buffer_shared_and_changed): ...near to its real use.
2682
4a9204fe
PE
26832012-11-29 Paul Eggert <eggert@cs.ucla.edu>
2684
2685 * callproc.c (Fcall_process): Don't misreport vfork failure.
2686
60aeceb8
PE
26872012-11-28 Paul Eggert <eggert@cs.ucla.edu>
2688
2689 * callproc.c (Fcall_process): Fix vfork portability problems.
2690 Do not assume that fd[0], count, filefd, and save_environ survive
2691 vfork. Fix bug whereby wrong errno value could be reported for
2692 pipe failure. Some minor cleanups, too, as follows. Move buf and
2693 bufsize to the context where they're needed. Change new_argv to
2694 be of type char **, as this is more convenient and avoids casts.
2695 (CALLPROC_BUFFER_SIZE_MIN, CALLPROC_BUFFER_SIZE_MAX):
2696 Now local constants, not macros.
2697
00dc3ead
KH
26982012-11-18 Kenichi Handa <handa@gnu.org>
2699
2700 * font.c (font_unparse_xlfd): Fix previous change. Keep "const"
2701 for the variable "f".
2702
e1bf05c1
KH
27032012-11-13 Kenichi Handa <handa@gnu.org>
2704
2705 * font.c (font_unparse_xlfd): Exclude special characters from the
2706 generating XLFD name.
2707
22626a85
PE
27082012-11-27 Paul Eggert <eggert@cs.ucla.edu>
2709
350e0088
PE
2710 Assume POSIX 1003.1-1988 or later for grp.h, pwd.h.
2711 * dired.c (stat_uname, stat_gname):
2712 * fileio.c (Fexpand_file_name): Remove no-longer-needed casts.
2713
22626a85
PE
2714 Assume POSIX 1003.1-1988 or later for errno.h (Bug#12968).
2715 * dired.c (directory_files_internal, file_name_completion):
2716 Assume EAGAIN and EINTR are defined.
350e0088 2717
22626a85
PE
2718 * fileio.c (Fcopy_file): Assume EISDIR is defined.
2719 * gmalloc.c (ENOMEM, EINVAL): Assume they're defined.
2720 * gnutls.c (emacs_gnutls_write): Assume EAGAIN is defined.
2721 * lread.c (readbyte_from_file): Assume EINTR is defined.
2722 * process.c (wait_reading_process_output, send_process) [subprocesses]:
2723 Assume EIO and EAGAIN are defined.
2724 * unexcoff.c (write_segment): Assume EFAULT is defined.
2725
5c9cf0a3 27262012-11-27 Eli Zaretskii <eliz@gnu.org>
3fa1e84d
EZ
2727
2728 * fontset.c (Finternal_char_font): Return nil on non-GUI frames.
2729 (Bug#11964)
2730
22294a56
EZ
2731 * xdisp.c (draw_glyphs): Don't draw in mouse face if mouse
2732 highlighting on the frame was cleared. Prevents assertion
2733 violations when repeatedly clicking on the "Top" link of the
2734 "bread-crumbs" in Info buffers.
2735
5fbab051
PE
27362012-11-25 Paul Eggert <eggert@cs.ucla.edu>
2737
2738 * sysdep.c (sys_subshell): Don't assume pid_t fits in int.
2739
bcd77a2b
KB
27402012-11-24 Ken Brown <kbrown@cornell.edu>
2741
2742 * keyboard.c (HAVE_MOUSE):
2743 * frame.c (HAVE_MOUSE): Remove, and rewrite code as if HAVE_MOUSE
2744 were always defined.
2745
d125ca15 27462012-11-24 Eli Zaretskii <eliz@gnu.org>
8654a41b 2747
24becea4
EZ
2748 * xdisp.c (set_cursor_from_row): Skip step 2 only if point is not
2749 between bpos_covered and bpos_max. This fixes cursor display when
2750 several display strings follow each other.
2751
8654a41b
EZ
2752 * .gdbinit (pgx): If the glyph's object is a string, display the
2753 pointer to string data, rather than the value of the string object
2754 itself (which barfs under CHECK_LISP_OBJECT_TYPE).
2755
cb5867b1
EZ
2756 * indent.c (Fvertical_motion): If the starting position is covered
2757 by a display string, return to one position before that, to avoid
2758 overshooting it inside move_it_to. (Bug#12930)
2759
f418b22e
DA
27602012-11-23 Dmitry Antipov <dmantipov@yandex.ru>
2761
2762 * frame.h (struct frame): Remove display_preempted member
2763 since all users are dead long ago.
2764 * nsterm.h (struct x_output): Use the only dummy member.
2765 * w32menu.c (pending_menu_activation): Remove since not
2766 really used.
2767 (set_frame_menubar): Adjust user.
2768 * w32term.h (struct x_output): Drop outdated #if 0 code.
2769 (struct w32_output): Use bitfields for explicit_parent,
26ec1f49
SM
2770 asked_for_visible and menubar_active members.
2771 Drop unused pending_menu_activation member.
f418b22e
DA
2772 * xterm.h (struct x_output): Drop outdated #if 0 code.
2773 Use bitfields for explicit_parent, asked_for_visible,
2774 has_been_visible and net_wm_state_hidden_seen members.
2775
a879f0ea
EZ
27762012-11-23 Eli Zaretskii <eliz@gnu.org>
2777
2778 * makefile.w32-in (globals.h, gl-stamp): Use $(SWITCHCHAR) instead
2779 of a literal "/". (Bug#12955)
2780 (gl-stamp): Invoke fc.exe directly, not through cmd.
2781
95ef7787
PE
27822012-11-23 Paul Eggert <eggert@cs.ucla.edu>
2783
2784 Assume POSIX 1003.1-1988 or later for dirent.h (Bug#12958).
2785 * dired.c: Assume HAVE_DIRENT_H.
2786 (NAMLEN): Remove, replacing with ...
2787 (dirent_namelen): New function. All uses changed. Use the GNU macro
2788 _D_EXACT_NAMELEN if available, as it's faster than strlen.
2789 (DIRENTRY): Remove, replacing all uses with 'struct dirent'.
2790 (DIRENTRY_NONEMPTY): Remove. All callers now assume it's nonzero.
2791 * makefile.w32-in (DIR_H): Remove. All uses replaced with
2792 $(NT_INC)/dirent.h.
2793 ($(BLD)/w32.$(O)): Do not depend on $(SRC)/ndir.h.
2794 * ndir.h: Rename to ../nt/inc/dirent.h.
2795 * sysdep.h (closedir) [!HAVE_CLOSEDIR]: Remove.
2796 Do not include <dirent.h>; no longer needed.
2797 * w32.c: Include <dirent.h> rather than "ndir.h".
2798
12645ae6
CY
27992012-11-23 Chong Yidong <cyd@gnu.org>
2800
2801 * xftfont.c (xftfont_open): Remove duplicate assignment.
2802
5c747675
DA
28032012-11-22 Dmitry Antipov <dmantipov@yandex.ru>
2804
2805 * alloc.c (Fgarbage_collect): Unblock input after clearing
2806 gc_in_progress to avoid note_mouse_highlight glitch with GC.
2807 * frame.h (FRAME_MOUSE_UPDATE): New macro.
2808 * msdos.c (IT_frame_up_to_date): Use it here...
2809 * w32term.c (w32_frame_up_to_date): ...here...
2810 * xterm.c (XTframe_up_to_date): ...and here...
2811 * nsterm.m (ns_frame_up_to_date): ...but not here.
2812 * lisp.h (Mouse_HLInfo): Remove mouse_face_deferred_gc member.
2813 Adjust users.
2814 * xdisp.c (message2_nolog, message3_nolog, note_mouse_highlight):
2815 Do not check whether GC is in progress.
2816
6ceeb5f1
DA
28172012-11-22 Dmitry Antipov <dmantipov@yandex.ru>
2818
2819 * xdisp.c (window_buffer_changed): New function.
2820 (update_menu_bar, update_tool_bar): Use it to
2821 simplify large 'if' statements.
2822 (redisplay_internal): Generalize commonly used
2823 'tail' and 'frame' local variables.
2824
ec84768f
EZ
28252012-11-22 Eli Zaretskii <eliz@gnu.org>
2826
2827 * w32.c (getcwd): Fix the 2nd argument type, to prevent conflicts
2828 with Windows system header.
2829
9239d970
PE
28302012-11-21 Paul Eggert <eggert@cs.ucla.edu>
2831
2832 Assume POSIX 1003.1-1988 or later for unistd.h (Bug#12945).
2833 * alloc.c: Assume unistd.h exists.
2834 * fileio.c (Fexpand_file_name) [DOS_NT]: Use getcwd, not getwd.
2835 * sysdep.c (get_current_dir_name): Assume getcwd exists.
2836 (getwd) [USG]: Remove; no longer needed.
2837 (sys_subshell) [DOS_NT]: Use getcwd, not getwd.
2838 * w32.c (getcwd): Rename from getwd, and switch to getcwd's API.
2839 * w32.h (getcwd): Remove decl.
2840
954bba56
SM
28412012-11-21 Stefan Monnier <monnier@iro.umontreal.ca>
2842
2843 * xdisp.c (fast_set_selected_frame): Rename from update_tool_bar_unwind.
2844 Make it set selected_window as well.
2845 (update_tool_bar): Use it.
2846
6ef2e5ef 28472012-11-21 Ken Brown <kbrown@cornell.edu>
4ffea447
KB
2848
2849 * emacs.c (main): Set the G_SLICE environment variable for all
2850 Cygwin builds, not just GTK builds. See
2851 https://lists.gnu.org/archive/html/emacs-devel/2012-11/msg00368.html.
2852
6ef2e5ef 28532012-11-21 Eli Zaretskii <eliz@gnu.org>
88c4a13c
EZ
2854
2855 * w32.c (FILE_DEVICE_FILE_SYSTEM, METHOD_BUFFERED)
2856 (FILE_ANY_ACCESS, CTL_CODE, FSCTL_GET_REPARSE_POINT) [_MSC_VER]:
2857 Define for the MSVC compiler.
2858
6ef2e5ef 2859 * w32term.h (EnumSystemLocalesW) [_MSC_VER]: Add a missing semi-colon.
273ac8d1
EZ
2860
2861 * fileio.c (Fsubstitute_in_file_name, Ffile_name_directory)
2862 (Fexpand_file_name) [DOS_NT]: Pass encoded file name to
2863 dostounix_filename. Prevents crashes down the road, because
26ec1f49
SM
2864 dostounix_filename assumes it gets a unibyte string.
2865 Reported by Michel de Ruiter <michel@sentient.nl>, see
273ac8d1
EZ
2866 http://lists.gnu.org/archive/html/help-emacs-windows/2012-11/msg00017.html
2867
eadf1faa
SM
28682012-11-20 Stefan Monnier <monnier@iro.umontreal.ca>
2869
2870 Conflate Qnil and Qunbound for `symbol-function'.
2871 * alloc.c (Fmake_symbol): Initialize `function' to Qnil.
2872 * lread.c (init_obarray): Set `function' fields to Qnil.
2873 * eval.c (Fcommandp): Ignore Qunbound.
2874 (Fautoload, eval_sub, Fapply, Ffuncall, Fmacroexpand):
2875 * data.c (Ffset, Ffboundp, indirect_function, Findirect_function):
2876 Test NILP rather than Qunbound.
2877 (Ffmakunbound): Set to Qnil.
2878 (Fsymbol_function): Never signal an error.
2879 (Finteractive_form): Ignore Qunbound.
2880
b83fdfa9
PE
28812012-11-20 Paul Eggert <eggert@cs.ucla.edu>
2882
2883 * eval.c (interactive_p): Remove no-longer-used decl.
2884
952580c5
DA
28852012-11-20 Dmitry Antipov <dmantipov@yandex.ru>
2886
2887 * xdisp.c (buffer_shared): Adjust comment.
2888 (buffer_shared_and_changed): New function.
2889 (prepare_menu_bars, redisplay_internal): Use it to
2890 decide whether all windows or frames should be updated.
ea6de9b1
DA
2891 (window_outdated): New function.
2892 (text_outside_line_unchanged_p, redisplay_window): Use it.
2893 (redisplay_internal): Likewise. Fix indentation.
952580c5 2894
23ba2705
SM
28952012-11-20 Stefan Monnier <monnier@iro.umontreal.ca>
2896
2897 * eval.c (Finteractive_p, Fcalled_interactively_p, interactive_p): Remove.
2898 (syms_of_eval): Remove corresponding defsubr.
2899 * bytecode.c (exec_byte_code): `interactive-p' is now a Lisp function.
2900
6e9f7997
DC
29012012-11-19 Daniel Colascione <dancol@dancol.org>
2902
2903 * w32fns.c (Fx_file_dialog):
2904 (Fx_file_dialog): Accomodate rename of cygwin_convert_path* to
2905 cygwin_convert_file_name*.
2906
2907 * cygw32.c (Fcygwin_convert_path_to_windows, syms_of_cygw32):
2908 Rename cygwin_convert_path* to cygwin_convert_file_name*.
2909
552a1590
PE
29102012-11-18 Paul Eggert <eggert@cs.ucla.edu>
2911
2912 * nsterm.m (ns_select): Send SIGIO only to self, not to process group.
2913
2ac9538d 29142012-11-18 Eli Zaretskii <eliz@gnu.org>
d8715cdf
EZ
2915
2916 * w32select.c: Include w32common.h before w32term.h, so that
2917 windows.h gets included before w32term.h uses some of its
2918 features, see below.
2919
23ba2705
SM
2920 * w32term.h (LOCALE_ENUMPROCA, LOCALE_ENUMPROCW) [_MSC_VER]:
2921 New typedefs.
2922 (EnumSystemLocalesA, EnumSystemLocalesW) [_MSC_VER]:
2923 New prototypes.
d8715cdf
EZ
2924 (EnumSystemLocales) [_MSC_VER]: Define if undefined. (Bug#12878)
2925
2ac9538d 29262012-11-18 Jan Djärv <jan.h.d@swipnet.se>
7436fc63
JD
2927
2928 * nsterm.m (hold_event): Set send_appdefined to YES (Bug#12834).
2929 (ns_select): Return at once if events are held (Bug#12834).
2930
2ac9538d 29312012-11-18 enami tsugutomo <tsugutomo.enami@jp.sony.com>
86dcf21c 2932
2933 * unexelf.c (ELFSIZE) [__NetBSD__ && _LP64]: Set to 64.
2934 Needed following 2012-10-20 change. (Bug#12902)
2935
c1f7ba3a
JB
29362012-11-18 Juanma Barranquero <lekktu@gmail.com>
2937
2938 * w32proc.c (waitpid): Remove unused label get_result.
2939
a75ce9d3
JB
29402012-11-17 Juanma Barranquero <lekktu@gmail.com>
2941
2942 * makefile.w32-in (SYSWAIT_H): New macro.
2943 ($(BLD)/callproc.$(O), $(BLD)/w32proc.$(O), $(BLD)/process.$(O))
2944 ($(BLD)/sysdep.$(O)): Update dependencies.
2945
49cdacda
PE
29462012-11-17 Paul Eggert <eggert@cs.ucla.edu>
2947
2948 Assume POSIX 1003.1-1988 or later for fcntl.h (Bug#12881).
2949 * callproc.c (relocate_fd): Assume F_DUPFD.
2950 * emacs.c, term.c (O_RDWR): Remove.
2951 * keyboard.c (tty_read_avail_input): Use O_NONBLOCK rather than
2952 O_NDELAY, since O_NONBLOCK is the standard name for this flag.
2953 * nsterm.m: Assume <fcntl.h> exists.
2954 * process.c (NON_BLOCKING_CONNECT, allocate_pty, create_process)
2955 (create_pty, Fmake_network_process, server_accept_connection)
2956 (wait_reading_process_output, init_process_emacs):
2957 Assume O_NONBLOCK.
2958 (wait_reading_process_output): Put in a special case for WINDOWSNT
2959 to mimick the older behavior where it had O_NDELAY but not O_NONBLOCK.
2960 It's not clear this is needed, but it's a more-conservative change.
2961 (create_process): Assume FD_CLOEXEC.
2962 (create_process, create_pty): Assume O_NOCTTY.
2963 * sysdep.c (init_sys_modes, reset_sys_modes): Assume F_SETFL.
2964 (reset_sys_modes): Use O_NONBLOCK rather than O_NDELAY.
2965 Omit if not DOS_NT, since F_GETFL is not defined there.
2966 (serial_open): Assume O_NONBLOCK and O_NOCTTY.
2967 * term.c: Include <fcntl.h>, for flags like O_NOCTTY.
2968 (O_NOCTTY): Remove.
2969 (init_tty): Assume O_IGNORE_CTTY is defined to 0 on platforms that
2970 lack it, since gnulib guarantees this.
2971 * w32.c (fcntl): Test for O_NONBLOCK rather than O_NDELAY.
2972
22bae83f
EZ
29732012-11-17 Eli Zaretskii <eliz@gnu.org>
2974
6ad30855
EZ
2975 * w32.c (faccessat): Pretend that directories have the execute bit
2976 set. Emacs expects that, e.g., in files.el:cd-absolute.
2977
22bae83f
EZ
2978 * w32proc.c (create_child): Don't clip the PID of the child
2979 process to fit into an Emacs integer, as this is no longer a
2980 restriction.
2981 (waitpid): Rename from sys_wait. Emulate a Posix 'waitpid' by
2982 reaping only the process specified by PID argument, if that is
2983 positive. Use PID instead of dead_child to know which process to
2984 reap. Wait for the child to die only if WNOHANG is not in
2985 OPTIONS.
2986 (sys_select): Don't set dead_child.
2987
2988 * sysdep.c (wait_for_termination_1): Remove the WINDOWSNT portion,
2989 as it is no longer needed.
2990
2991 * process.c (waitpid, WUNTRACED) [!WNOHANG]: Remove definitions,
2992 no longer needed.
2993 (record_child_status_change): Remove the setting of
2994 record_at_most_one_child for the !WNOHANG case.
2995
a631d0e0
PE
29962012-11-17 Paul Eggert <eggert@cs.ucla.edu>
2997
2998 Fix problems in ns port found by static checking.
2999 * nsterm.m: Include <pthread.h>, for pthread_mutex_lock etc.
3000 (hold_event, setPosition:portion:whole:): Send SIGIO only to self,
3001 not to process group.
3002 (ns_select): Use emacs_write, not write, as that's more robust
3003 in the presence of signals.
3004 (fd_handler:): Check for read errors.
3005
d56f2e49
GM
30062012-11-16 Glenn Morris <rgm@gnu.org>
3007
3008 * editfns.c (Fmessage): Mention message-log-max. (Bug#12849)
3009
96e05507 30102012-11-16 Stefan Monnier <monnier@iro.umontreal.ca>
5c2a7148
SM
3011
3012 * eval.c (Finteractive_p): Revert lexbind-merge mishap.
3013
96e05507 30142012-11-16 Eli Zaretskii <eliz@gnu.org>
730b2d8f
EZ
3015
3016 * w32proc.c (timer_loop): Make sure SuspendThread and ResumeThread
3017 use the same value of thread handle.
3018 (start_timer_thread): If the timer thread exited (due to error),
3019 clean up by closing the two handles it used. Duplicate the caller
3020 thread's handle here, so it gets duplicated only once, when
3021 launching the timer thread. Set priority of the timer thread, not
3022 the caller thread.
3023 (getitimer): Don't duplicate the caller thread's handle here.
3024 (Bug#12832)
3025
96e05507 30262012-11-16 Jan Djärv <jan.h.d@swipnet.se>
f99c65e5
JD
3027
3028 * nsterm.m (hold_event): Send SIGIO to make sure ns_read_socket is
3029 called (Bug#12834).
3030
3d082a26
PE
30312012-11-16 Paul Eggert <eggert@cs.ucla.edu>
3032
3033 Remove no-longer-used pty_max_bytes variable.
3034 * process.c (pty_max_bytes): Remove; unused.
3035 (send_process): Do not set it.
3036
b72c161c
JB
30372012-11-15 Juanma Barranquero <lekktu@gmail.com>
3038
3039 * makefile.w32-in ($(BLD)/dispnew.$(O), $(BLD)/emacs.$(O)):
3040 Update dependencies.
3041
bf20ea80
PE
30422012-11-15 Paul Eggert <eggert@cs.ucla.edu>
3043
3044 * eval.c (mark_backtrace) [BYTE_MARK_STACK]: Remove stray '*'.
3045 This follows up on the 2012-09-29 patch that removed indirection
3046 for the 'function' field. Reported by Sergey Vinokurov in
3047 <http://lists.gnu.org/archive/html/emacs-devel/2012-11/msg00263.html>.
3048
14f20728
EZ
30492012-11-14 Eli Zaretskii <eliz@gnu.org>
3050
3051 * w32.c (faccessat): Rename from sys_faccessat. (No need to use a
3052 different name, as the MS runtime does not have such a function,
3053 and probably never will.) All callers changed. Ignore DIRFD
3054 value if PATH is an absolute file name, to match Posix spec
3055 better. If AT_SYMLINK_NOFOLLOW is set in FLAGS, don't resolve
3056 symlinks.
3057
77731919
DA
30582012-11-14 Dmitry Antipov <dmantipov@yandex.ru>
3059
3060 * xdisp.c (echo_area_display, redisplay_internal):
3061 Omit redundant check whether frame_garbaged is set.
3062
73dcdb9f
PE
30632012-11-14 Paul Eggert <eggert@cs.ucla.edu>
3064
3065 Use faccessat, not access, when checking file permissions (Bug#12632).
3066 This fixes a bug that has been present in Emacs since its creation.
3067 It was reported by Chris Torek in 1983 even before GNU Emacs existed,
3068 which must set some sort of record. (Torek's bug report was against
3069 a predecessor of GNU Emacs, but GNU Emacs happened to have the
3070 same common flaw.) See Torek's Usenet posting
3071 "setuid/setgid programs & Emacs" Article-I.D.: sri-arpa.858
3072 Posted: Fri Apr 8 14:18:56 1983.
3073 * Makefile.in (LIB_EACCESS): New macro.
3074 (LIBES): Use it.
3075 * callproc.c (init_callproc):
3076 * charset.c (init_charset):
3077 * fileio.c (check_existing, check_executable, check_writable)
3078 (Ffile_readable_p):
3079 * lread.c (openp, load_path_check):
3080 * process.c (allocate_pty):
3081 * xrdb.c (file_p):
3082 Use effective UID when checking permissions, not real UID.
3083 * callproc.c (init_callproc):
3084 * charset.c (init_charset):
3085 * lread.c (load_path_check, init_lread):
3086 Test whether directories are accessible, not merely whether they exist.
3087 * conf_post.h (GNULIB_SUPPORT_ONLY_AT_FDCWD): New macro.
3088 * fileio.c (check_existing, check_executable, check_writable)
3089 (Ffile_readable_p):
3090 Use symbolic names instead of integers for the flags, as they're
3091 portable now.
3092 (check_writable): New arg AMODE. All uses changed.
3093 Set errno on failure.
3094 (Ffile_readable_p): Use faccessat, not stat + open + close.
3095 (Ffile_writable_p): No need to call check_existing + check_writable.
3096 Just call check_writable and then look at errno. This saves a syscall.
3097 dir should never be nil; replace an unnecessary runtime check
3098 with an eassert. When checking the parent directory of a nonexistent
3099 file, check that the directory is searchable as well as writable, as
3100 we can't create files in unsearchable directories.
3101 (file_directory_p): New function, which uses 'stat' on most platforms
3102 but faccessat with D_OK (for efficiency) if WINDOWSNT.
3103 (Ffile_directory_p, Fset_file_times): Use it.
3104 (file_accessible_directory_p): New function, which uses a single
3105 syscall for efficiency.
3106 (Ffile_accessible_directory_p): Use it.
3107 * xrdb.c (file_p): Use file_directory_p.
3108 * lisp.h (file_directory_p, file_accessible_directory_p): New decls.
3109 * lread.c (openp): When opening a file, use fstat rather than
3110 stat, as that avoids a permissions race. When not opening a file,
3111 use file_directory_p rather than stat.
3112 (dir_warning): First arg is now a usage string, not a format.
3113 Use errno. All uses changed.
3114 * nsterm.m (ns_term_init): Remove unnecessary call to file-readable
3115 that merely introduced a race.
3116 * process.c, sysdep.c, term.c: All uses of '#ifdef O_NONBLOCK'
3117 changed to '#if O_NONBLOCK', to accommodate gnulib O_* style,
3118 and similarly for the other O_* flags.
3119 * w32.c (sys_faccessat): Rename from sys_access and switch to
3120 faccessat's API. All uses changed.
3121 * xrdb.c: Do not include <sys/stat.h>; no longer needed.
3122 (magic_db): Rename from magic_file_p.
3123 (magic_db, search_magic_path): Return an XrmDatabase rather than a
3124 char *, so that we don't have to test for file existence
3125 separately from opening the file for reading. This removes a race
3126 fixes a permission-checking problem, and simplifies the code.
3127 All uses changed.
3128 (file_p): Remove; no longer needed.
3129
2a14f83b
DA
31302012-11-13 Dmitry Antipov <dmantipov@yandex.ru>
3131
3132 Omit glyphs initialization at startup.
3133 * dispnew.c (glyphs_initialized_initially_p): Remove.
3134 (adjust_frame_glyphs_initially): Likewise. Adjust users.
3135 (Fredraw_frame): Move actual code from here...
c7085245 3136 (redraw_frame): ...to here. Add eassert. Adjust comment.
2a14f83b
DA
3137 (Fredraw_display): Use redraw_frame.
3138 * xdisp.c (clear_garbaged_frames): Likewise.
3139
f78ee6af 31402012-11-13 Eli Zaretskii <eliz@gnu.org>
32520273
EZ
3141
3142 * xdisp.c (decode_mode_spec): Limit the value of WIDTH argument
3143 passed to pint2str and pint2hrstr to be at most the size of the
3144 frame's decode_mode_spec_buffer. This avoids crashes with very
3145 large values of FIELD_WIDTH argument to decode_mode_spec.
3146 (Bug#12867)
3147
b95a9c0c
PE
31482012-11-13 Paul Eggert <eggert@cs.ucla.edu>
3149
3150 Fix a race with verify-visited-file-modtime (Bug#12863).
3151 Since at least 1991 Emacs has ignored an mtime difference of no
3152 more than one second, but my guess is that this was to work around
3153 file system bugs that were fixed long ago. Since the race is
3154 causing problems now, let's remove that code.
3155 * fileio.c (Fverify_visited_file_modtime): Do not accept a file
3156 whose time stamp is off by no more than a second. Insist that the
3157 file time stamps match exactly.
3158
be49ba74
DA
31592012-11-12 Dmitry Antipov <dmantipov@yandex.ru>
3160
3161 * frame.h (struct frame): Convert external_tool_bar member to
3162 1-bit unsigned bitfield.
3163 * termhooks.h (struct terminal): Remove mouse_moved member since
3164 all users are long dead. Adjust comment on mouse_position_hook.
3165
5b04e9f9
DA
31662012-11-12 Dmitry Antipov <dmantipov@yandex.ru>
3167
3168 Simplify by using FOR_EACH_FRAME here and there.
3169 * frame.c (next_frame, prev_frame, other_visible_frames)
3170 (delete_frame, visible-frame-list): Use FOR_EACH_FRAME.
3171 * w32term.c (x_window_to_scroll_bar): Likewise.
3172 * window.c (window_list): Likewise.
3173 * xdisp.c (x_consider_frame_title): Likewise.
3174 * xfaces.c ( Fdisplay_supports_face_attributes_p): Likewise.
3175 * xfns.c (x_window_to_frame, x_any_window_to_frame)
3176 (x_menubar_window_to_frame, x_top_window_to_frame): Likewise.
3177 * xmenu.c (menubar_id_to_frame): Likewise.
3178 * xselect.c (frame_for_x_selection): Likewise.
3179 * xterm.c (x_frame_of_widget, x_window_to_scroll_bar)
3180 (x_window_to_menu_bar): Likewise.
3181 * w32fns.c (x_window_to_frame): Likewise. Adjust comment.
3182
76ae24d7
PE
31832012-11-12 Paul Eggert <eggert@cs.ucla.edu>
3184
12cc4337
PE
3185 * data.c (Qdefalias_fset_function): Now static.
3186
76ae24d7
PE
3187 Another tweak to vectorlike_header change.
3188 * alloc.c (struct Lisp_Vectorlike_Free, NEXT_IN_FREE_LIST):
3189 Remove, and replace all uses with ...
3190 (next_in_free_list, set_next_in_free_list):
3191 New functions, which respect C's aliasing rules better.
3192
1479c557
PE
31932012-11-11 Paul Eggert <eggert@cs.ucla.edu>
3194
3195 * window.c (list4i): Rename from 'quad'. All uses changed.
3196 Needed because <sys/types.h> defines 'quad' on Solaris 10.
3197
11235c03
JB
31982012-11-11 Juanma Barranquero <lekktu@gmail.com>
3199
3200 * xdisp.c (start_hourglass) [HAVE_NTGUI]: Add block to silence
3201 warning about mixing declarations and code in ISO C90.
3202
6baf66d5 32032012-11-10 Martin Rudalics <rudalics@gmx.at>
fdaf534a
MR
3204
3205 * window.c (Fsplit_window_internal): Set combination limit of
3206 new parent window to t iff Vwindow_combination_limit is t;
3207 fixing a regression introduced with the change from 2012-09-22.
6baf66d5 3208 (Fset_window_combination_limit): Fix doc-string.
fdaf534a 3209
6baf66d5 32102012-11-10 Eli Zaretskii <eliz@gnu.org>
acf93bcf
EZ
3211
3212 * xdisp.c (try_scrolling): Fix correction of aggressive-scroll
3213 amount when the scroll margins are too large. When scrolling
3214 backwards in the buffer, give up if cannot reach point or the
23ba2705
SM
3215 scroll margin within a reasonable number of screen lines.
3216 Fixes point position in window under scroll-up/down-aggressively when
acf93bcf
EZ
3217 point is positioned many lines beyond the window top/bottom.
3218 (Bug#12811)
3219
508f51f5
EZ
3220 * ralloc.c (relinquish): If real_morecore fails to return memory
3221 to the system, don't crash; instead, leave the last heap
3222 unchanged and return. (Bug#12774)
3223
32e5c58c
SM
32242012-11-09 Stefan Monnier <monnier@iro.umontreal.ca>
3225
3226 * lisp.h (AUTOLOADP): New macro.
3227 * eval.c (Fautoload): Don't attach to loadhist, call Fdefalias instead.
3228 * data.c (Ffset): Remove special ad-advice-info handling.
3229 (Fdefalias): Handle autoload definitions and new Qdefalias_fset_function.
3230 (Fsubr_arity): CSE.
3231 (Finteractive_form): Simplify.
3232 (Fquo): Don't insist on having at least 2 arguments.
3233 (Qdefalias_fset_function): New var.
3234
719b0aa5
JD
32352012-11-09 Jan Djärv <jan.h.d@swipnet.se>
3236
4ab15c3e
JD
3237 * image.c (xpm_make_color_table_h): Change to hashtest_equal.
3238
719b0aa5
JD
3239 * nsfont.m (Qcondensed, Qexpanded): New variables.
3240 (ns_descriptor_to_entity): Restore Qcondensed, Qexpanded setting.
3241 (syms_of_nsfont): Defsym Qcondensed, Qexpanded.
3242
535cc8e9
DA
32432012-11-09 Dmitry Antipov <dmantipov@yandex.ru>
3244
3245 Fix recently introduced crash on MS-Windows (Bug#12839).
3246 * w32term.h (struct scroll_bar): Use convenient header.
3247 (SCROLL_BAR_VEC_SIZE): Remove.
3248 * w32term.c (x_scroll_bar_create): Use VECSIZE.
3249
7d377c48
DA
32502012-11-09 Dmitry Antipov <dmantipov@yandex.ru>
3251
3252 Tweak last vectorlike_header change.
3253 * alloc.c (struct Lisp_Vectorlike_Free): Special type to represent
3254 vectorlike object on the free list. This is introduced to avoid
3255 some (but not all) pointer casting and aliasing problems, see
3256 http://lists.gnu.org/archive/html/emacs-devel/2012-11/msg00105.html.
3257 * .gdbinit (pvectype, pvecsize): New commands to examine vectorlike
3258 objects.
3259 (xvectype, xvecsize): Use them to examine Lisp_Object values.
3260
7ad27466
JD
32612012-11-09 Jan Djärv <jan.h.d@swipnet.se>
3262
32e5c58c 3263 * nsfont.m (ns_descriptor_to_entity): Qcondensed and Qexpanded has
7ad27466
JD
3264 been removed, so remove them here also.
3265
57618ecf
SM
32662012-11-09 Stefan Monnier <monnier@iro.umontreal.ca>
3267
3268 * doc.c (Fdocumentation): Handle new property
3269 dynamic-docstring-function to replace the old ad-advice-info.
3270
53371430
PE
32712012-11-09 Paul Eggert <eggert@cs.ucla.edu>
3272
3273 * fns.c (Qeql, hashtest_eq): Now static.
3274
61ddb1b9
SM
32752012-11-08 Stefan Monnier <monnier@iro.umontreal.ca>
3276
3277 * lisp.h (XHASH): Redefine to be imperfect and fit in a Lisp int.
3278 * fns.c (hashfn_eq, hashfn_eql, sxhash):
3279 * profiler.c (hashfn_profiler): Don't use XUINT on non-integers.
3280 * buffer.c (compare_overlays): Use XLI rather than XHASH.
3281
04a2d0d3
PE
32822012-11-08 Paul Eggert <eggert@cs.ucla.edu>
3283
3284 Use same hash function for hashfn_profiler as for hash_string etc.
3285 * fns.c (SXHASH_COMBINE): Remove. All uses replaced by sxhash_combine.
3286 * lisp.h (sxhash_combine): New inline function, with the contents
3287 of the old SXHASH_COMBINE.
3288 * profiler.c (hashfn_profiler): Use it, instead of having a
3289 special hash function containing a comparison that always yields 1.
3290
de5ef41a
SM
32912012-11-08 Stefan Monnier <monnier@iro.umontreal.ca>
3292
3293 * xfaces.c (Qultra_light, Qreverse_oblique, Qreverse_italic)
3294 (Qultra_condensed, Qextra_condensed, Qcondensed, Qsemi_condensed)
3295 (Qsemi_expanded, Qextra_expanded, Qexpanded, Qultra_expanded):
3296 Remove unused vars.
3297
a23c4171
JD
32982012-11-08 Jan Djärv <jan.h.d@swipnet.se>
3299
3300 * image.c (xpm_make_color_table_h): Fix compiler error because
3301 make_hash_table changed.
3302
0b59090b 33032012-11-08 Thomas Kappler <tkappler@gmail.com> (tiny change)
074d7bb0
JD
3304
3305 * nsfont.m (ns_findfonts): Handle empty matchingDescs (Bug#11541).
3306
b7432bb2
SM
33072012-11-08 Stefan Monnier <monnier@iro.umontreal.ca>
3308
3309 Use ad-hoc comparison function for the profiler's hash-tables.
3310 * profiler.c (Qprofiler_backtrace_equal, hashtest_profiler): New vars.
3311 (make_log): Use them.
3312 (handle_profiler_signal): Don't inhibit quit any longer since we don't
3313 call Fequal any more.
3314 (Ffunction_equal): New function.
3315 (cmpfn_profiler, hashfn_profiler): New functions.
3316 (syms_of_profiler): Initialize them.
3317 * lisp.h (struct hash_table_test): New struct.
3318 (struct Lisp_Hash_Table): Use it.
3319 * alloc.c (mark_object): Mark hash_table_test fields of hash tables.
3320 * fns.c (make_hash_table): Take a struct to describe the test.
3321 (cmpfn_eql, cmpfn_equal, cmpfn_user_defined, hashfn_eq, hashfn_eql)
3322 (hashfn_equal, hashfn_user_defined): Adjust to new calling convention.
3323 (hash_lookup, hash_remove_from_table): Move assertion checking of
3324 hashfn result here. Check hash-equality before calling cmpfn.
3325 (Fmake_hash_table): Adjust call to make_hash_table.
3326 (hashtest_eq, hashtest_eql, hashtest_equal): New structs.
3327 (syms_of_fns): Initialize them.
3328 * emacs.c (main): Move syms_of_fns earlier.
3329 * xterm.c (syms_of_xterm):
3330 * category.c (hash_get_category_set): Adjust call to make_hash_table.
3331 * print.c (print_object): Adjust to new hash-table struct.
3332 * composite.c (composition_gstring_put_cache): Adjust to new hashfn.
3333
88002743
EZ
33342012-11-08 Eli Zaretskii <eliz@gnu.org>
3335
3336 * w32fns.c (modifier_set): Fix handling of Scroll Lock when the
3337 value of w32-scroll-lock-modifier is neither nil nor one of the
3338 known key modifiers. (Bug#12806)
3339
914adc42
DA
33402012-11-08 Dmitry Antipov <dmantipov@yandex.ru>
3341
3342 Shrink struct vectorlike_header to the only size field.
3343 * lisp.h (enum pvec_type): Avoid explicit enum member values.
3344 Adjust comment.
3345 (enum More_Lisp_Bits): Change PSEUDOVECTOR_SIZE_BITS and
3346 PVEC_TYPE_MASK to arrange new bitfield in the vector header.
3347 (PSEUDOVECTOR_REST_BITS, PSEUDOVECTOR_REST_MASK): New members.
3348 (PSEUDOVECTOR_AREA_BITS): New member used to extract subtype
3349 information from the vector header. Adjust comment.
3350 (XSETPVECTYPE, XSETPVECTYPESIZE, XSETTYPED_PSEUDOVECTOR)
3351 (PSEUDOVECTOR_TYPEP, DEFUN): Adjust to match new vector header
3352 layout.
3353 (XSETSUBR, SUBRP): Adjust to match new Lisp_Subr layout.
3354 (struct vectorlike_header): Remove next member. Adjust comment.
3355 (struct Lisp_Subr): Add convenient header. Adjust comment.
3356 (allocate_pseudovector): Adjust prototype.
3357 * alloc.c (mark_glyph_matrix, mark_face_cache, allocate_string)
3358 (sweep_string, lisp_malloc): Remove useless prototypes.
3359 (enum mem_type): Adjust comment.
3360 (NEXT_IN_FREE_LIST): New macro.
3361 (SETUP_ON_FREE_LIST): Adjust XSETPVECTYPESIZE usage.
3362 (Fmake_bool_vector): Likewise.
3363 (struct large_vector): New type to represent allocation unit for
3364 the vectors with the memory footprint more than VBLOOCK_BYTES_MAX.
3365 (large_vectors): Change type to struct large_vector.
3366 (allocate_vector_from_block): Simplify.
3367 (PSEUDOVECTOR_NBYTES): Replace with...
3368 (vector_nbytes): ...new function. Adjust users.
3369 (sweep_vectors): Adjust processing of large vectors.
3370 (allocate_vectorlike): Likewise.
3371 (allocate_pseudovector): Change type of 3rd arg to enum pvec_type.
3372 Add easserts. Adjust XSETPVECTYPESIZE usage.
3373 (allocate_buffer): Use BUFFER_PVEC_INIT.
3374 (live_vector_p): Adjust to match large vector.
3375 * buffer.c (init_buffer_once): Use BUFFER_PVEC_INIT.
3376 * buffer.h (struct buffer): Add next member.
3377 (BUFFER_LISP_SIZE, BUFFER_REST_SIZE, BUFFER_PVEC_INIT):
3378 New macros.
3379 (FOR_EACH_BUFFER): Adjust to match struct buffer change.
3380 * fns.c (internal_equal): Adjust to match enum pvec_type change.
3381 (copy_hash_table): Adjust to match vector header change.
3382 * lread.c (defsubr): Use XSETPVECTYPE.
3383 * .gdbinit (xpr, xbacktrace): Adjust to match vector header change.
3384 (xvectype): Likewise. Print PVEC_NORMAL_VECTOR for regular vectors.
3385 (xvecsize): New command.
3386
c66f21ea
DA
33872012-11-08 Dmitry Antipov <dmantipov@yandex.ru>
3388
3389 * keyboard.c (event_to_kboard): Do not dereference
3390 frame_or_window field of SELECTION_REQUEST_EVENT
3391 and SELECTION_CLEAR_EVENT events (Bug#12814).
3392 * xterm.h (struct selection_input_event): Adjust comment.
3393
eb147960
EZ
33942012-11-07 Eli Zaretskii <eliz@gnu.org>
3395
dab72075
EZ
3396 * w32fns.c (modifier_set): Don't report modifiers from toggle key,
3397 such as Scroll Lock, if the respective keys are treated as
3398 function keys, not as modifiers. This avoids destroying non-ASCII
6b064c16 3399 keyboard input when Scroll Lock is toggled ON. (Bug#12806)
eb147960 3400
5890e400
DA
34012012-11-07 Dmitry Antipov <dmantipov@yandex.ru>
3402
3403 * xfns.c (Fx_wm_set_size_hint): Use check_x_frame. Adjust docstring.
3404
b6b3b294
PE
34052012-11-06 Paul Eggert <eggert@cs.ucla.edu>
3406
3407 Restore some duplicate definitions (Bug#12814).
3408 This undoes part of the 2012-11-03 changes. Some people build
3409 with plain -g rather than with -g3, and they need the duplicate
3410 definitions for .gdbinit to work; see <http://bugs.gnu.org/12814#26>.
3411 * lisp.h (GCTYPEBITS, ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK):
3412 Define as macros, as well as as enums or as constants.
3413
e770aad5
JD
34142012-11-06 Jan Djärv <jan.h.d@swipnet.se>
3415
3416 * nsterm.m (convert_ns_to_X_keysym, keyDown:): Add NSNumericPadKeyMask
3417 to keypad keys (Bug#12816).
3418
68f8f1c0
PE
34192012-11-06 Paul Eggert <eggert@cs.ucla.edu>
3420
3421 Minor adjustments of recently-changed frame functions.
3422 * buffer.c (Fbuffer_list): Omit CHECK_FRAME, since arg is already
3423 known to be a frame (we're in the FRAMEP branch).
3424 * lisp.h (Qframep): Remove decl. frame.h declares this.
3425 * window.c (quad): Args are of type EMACS_INT, not ptrdiff_t,
3426 since they're meant for Lisp fixnum values.
3427
72f94d4b
DA
34282012-11-06 Dmitry Antipov <dmantipov@yandex.ru>
3429
3430 * window.c (Fwindow_combination_limit): Revert to the only
3431 required argument and adjust docstring as suggested in
3432 http://lists.gnu.org/archive/html/emacs-diffs/2012-11/msg01082.html
3433 by Martin Rudalics <rudalics@gmx.at>.
3434
d9f07150
DA
34352012-11-06 Dmitry Antipov <dmantipov@yandex.ru>
3436
3437 Widely used frame validity and checking functions.
3438 * frame.h (decode_live_frame, decode_any_frame): Add prototypes.
3439 * frame.c (decode_live_frame, decode_any_frame): New functions.
3440 (delete_frame, Fredirect_frame_focus, Fframe_parameters)
3441 (Fframe_parameter, Fframe_char_height, Fframe_char_width)
3442 (Fframe_pixel_height, Fframe_pixel_width, Ftool_bar_pixel_width)
3443 (Fframe_pointer_visible_p): Use decode_any_frame.
3444 (Fmake_frame_visible, Fmake_frame_invisible, Ficonify_frame)
3445 (Fraise_frame, Flower_frame, Fmodify_frame_parameters)
3446 (Fset_frame_height, Fset_frame_width): Use decode_live_frame.
3447 (Fframe_focus): Likewise. Allow zero number of arguments.
3448 Adjust docstring.
3449 (frame_buffer_list, frame_buffer_predicate): Remove.
3450 * lisp.h (frame_buffer_predicate): Remove prototype.
3451 * buffer.c (Fother_buffer): Use decode_any_frame.
3452 * xdisp.c (Ftool_bar_lines_needed): Likewise.
3453 * xfaces.c (Fcolor_gray_p, Fcolor_supported_p): Likewise.
3454 * font.c (Ffont_face_attributes, Ffont_family_list, Fopen_font)
3455 (Fclose_font, Ffont_info): Use decode_live_frame.
3456 * fontset.c (check_fontset_name): Likewise.
3457 * terminal.c (Fframe_terminal): Likewise.
3458 * w32fns.c (check_x_frame): Likewise.
3459 * window.c (Fminibuffer_window, Fwindow_at)
3460 (Fcurrent_window_configuration): Likewise.
3461 (Frun_window_configuration_change_hook, Fwindow_resize_apply):
3462 Likewise. Allow zero number of arguments. Adjust docstring.
3463 * dispnew.c (Fredraw_frame): Likewise.
3464 * xfaces.c (frame_or_selected_frame): Remove.
3465 (Fx_list_fonts, Finternal_get_lisp_face_attribute, Fface_font)
3466 (Finternal_lisp_face_equal_p, Finternal_lisp_face_empty_p)
3467 (Fframe_face_alist): Use decode_live_frame.
3468 * xfns.c (check_x_frame): Likewise.
3469
89bc0592
DA
34702012-11-06 Dmitry Antipov <dmantipov@yandex.ru>
3471
3472 * window.c (quad): New function.
3473 (Fwindow_edges, Fwindow_pixel_edges, Fwindow_inside_edges)
3474 (Fwindow_absolute_pixel_edges, Fwindow_inside_absolute_pixel_edges)
3475 (Fwindow_inside_pixel_edges, Fpos_visible_in_window_p)
3476 (Fwindow_line_height): Use it.
3477 (Fwindow_fringes): Use list3.
3478 (Fwindow_scroll_bars): Use list4.
3479 (Fwindow_frame, Fwindow_top_child, Fwindow_left_child)
3480 (Fwindow_combination_limit): Allow zero number of arguments.
3481
c8e3a9c3
EZ
34822012-11-05 Eli Zaretskii <eliz@gnu.org>
3483
3484 * makefile.w32-in ($(BLD)/w32fns.$(O)): Depend on $(NT_INC)/unistd.h.
3485
8e2417bf 3486 * w32fns.c: Include unistd.h, to avoid compiler warnings on Cygwin.
c8e3a9c3 3487 (emacs_abort) [CYGWIN]: Don't call _open_osfhandle; instead, use
ae600a8e 3488 file descriptor 2 for standard error. (Bug#12805)
c8e3a9c3 3489
209c6a58
CY
34902012-11-05 Chong Yidong <cyd@gnu.org>
3491
3492 * process.c (wait_reading_process_output): Revert previous change.
3493
8148369c
PE
34942012-11-05 Paul Eggert <eggert@cs.ucla.edu>
3495
dd0333b6
PE
3496 Assume at least POSIX.1-1988 for getpgrp, setpgid, setsid (Bug#12800).
3497 This removes code that has been obsolete since around 1990.
3498 * callproc.c (Fcall_process):
3499 * emacs.c (main):
3500 * process.c (create_process):
3501 * term.c (dissociate_if_controlling_tty):
3502 Assume setsid exists.
3503 * callproc.c (child_setup): Assume setpgid exists and behaves as
3504 per POSIX.1-1988 or later.
3505 * conf_post.h (setpgid) [!HAVE_SETPGID]: Remove.
3506 * emacs.c (shut_down_emacs):
3507 * sysdep.c (sys_suspend, init_foreground_group):
3508 Assume getpgrp behaves as per POSIX.1-1998 or later.
3509 * msdos.c (setpgrp): Remove.
3510 (tcgetpgrp, setpgid, setsid): New functions.
3511 * systty.h (EMACS_GETPGRP): Remove. All callers now use getpgrp.
3512 * term.c (no_controlling_tty): Remove; unused.
3513 * w32proc.c (setpgrp): Remove.
3514 (setsid, tcgetpgrp): New functions.
3515
8148369c
PE
3516 Simplify by assuming __fpending.
3517 * dispnew.c: Include <fpending.h>, not <stdio_ext.h>.
3518 (update_frame_1): Use __fpending, not PENDING_OUTPUT_COUNT.
3519 Do not assume that __fpending's result fits in int.
3520
76abf5e5
PE
35212012-11-04 Paul Eggert <eggert@cs.ucla.edu>
3522
06b63c9b
PE
3523 Remove EMACS_OUTQSIZE+sleep hack.
3524 * dispnew.c (update_frame_1): Remove hack for terminals slower
de5ef41a
SM
3525 than 2400 bps, which throttled Emacs by having it sleep.
3526 This code hasn't worked since at least 2007, when the multi-tty stuff
06b63c9b
PE
3527 was added, and anyway those old terminals are long dead.
3528 * systty.h (EMACS_OUTQSIZE): Remove; unused. The macro isn't used even
3529 without the dispnew.c change, as dispnew.c doesn't include systty.h.
3530
76abf5e5
PE
3531 Fix data-loss with --version (Bug#9574).
3532 * emacs.c (close_output_streams): Use strerror, not emacs_strerror,
3533 as we can't assume that emacs_strerror is initialized, and strerror
3534 is good enough here.
3535 (main): Invoke atexit earlier, to catch earlier instances of
3536 sending data to stdout and exiting, e.g., "emacs --version >/dev/full".
3537
8f31e74b
MM
35382012-11-04 Michael Marchionna <tralfaz@pacbell.net>
3539
3540 * nsterm.m: Add NSClearLineFunctionKey and keypad keys (Bug#8680).
3541 (keyDown): Remap keypad keys to X11 virtual key codes.
3542
0d879dca
PE
35432012-11-03 Paul Eggert <eggert@cs.ucla.edu>
3544
7ccfb720
PE
3545 Fix data-loss with --batch (Bug#9574).
3546 * emacs.c: Include <close-stream.h>.
3547 (close_output_streams): New function.
3548 (main): Pass it to atexit, so that Emacs closes stdout and stderr
3549 and handles errors appropriately.
3550 (Fkill_emacs): Don't worry about flushing, as close_output_stream
3551 does that now.
3552
0b3d4a47
PE
3553 Fix a race condition that causes Emacs to mess up glib (Bug#8855).
3554 The symptom is a diagnostic "GLib-WARNING **: In call to
3555 g_spawn_sync(), exit status of a child process was requested but
3556 SIGCHLD action was set to SIG_IGN and ECHILD was received by
3557 waitpid(), so exit status can't be returned." The diagnostic
3558 is partly wrong, as the SIGCHLD action is not set to SIG_IGN.
3559 The real bug is a race condition between Emacs and glib: Emacs
3560 does a waitpid (-1, ...) and reaps glib's subprocess by mistake,
3561 so that glib can't find it. Work around the bug by invoking
3562 waitpid only on subprocesses that Emacs itself creates.
3563 * process.c (create_process, record_child_status_change):
3564 Don't use special value -1 in pid field, as the caller now must
de5ef41a
SM
3565 know the pid rather than having the callee infer it.
3566 The inference was sometimes incorrect anyway, due to another race.
0b3d4a47
PE
3567 (create_process): Set new 'alive' member if child is created.
3568 (process_status_retrieved): New function.
3569 (record_child_status_change): Use it.
3570 Accept negative 1st argument, which means to wait for the
3571 processes that Emacs already knows about. Move special-case code
3572 for DOS_NT (which lacks WNOHANG) here, from caller. Keep track of
3573 processes that have already been waited for, by testing and
3574 clearing new 'alive' member.
3575 (CAN_HANDLE_MULTIPLE_CHILDREN): Remove, as record_child_status_change
3576 now does this internally.
3577 (handle_child_signal): Let record_child_status_change do all
3578 the work, since we do not want to reap all exited child processes,
3579 only the child processes that Emacs itself created.
3580 * process.h (Lisp_Process): New boolean member 'alive'.
3581
0d879dca
PE
3582 Omit duplicate definitions no longer needed with gcc -g3.
3583 * lisp.h (GCTYPEBITS, GCALIGNMENT, ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG)
3584 (VALMASK, MOST_POSITIVE_FIXNUM, MOST_NEGATIVE_FIXNUM):
3585 Define only as macros. There's no longer any need to also define
3586 these symbols as enums or as constants, since we now assume
3587 gcc -g3 when debugging.
3588
3478f4b5
EZ
35892012-11-03 Eli Zaretskii <eliz@gnu.org>
3590
3591 * lisp.mk: Adjust comments to the fact that term/internal is now
3592 loaded from loadup.el.
3593
3594 * msdos.c (msdos_abort): Rename from emacs_abort, and make static.
3595 (msdos_fatal_signal): New function.
3596 (XMenuActivate): Adjust the call to kbd_buffer_events_waiting to
3597 its argument list.
3598
3599 * conf_post.h (_GL_EXECINFO_INLINE) [MSDOS]: Define to "inline"
3600 for GCC versions before 4.
3601 (emacs_raise): Define to call msdos_fatal_signal.
3602
3603 * xdisp.c (init_from_display_pos): Fix initialization of the bidi
3604 iterator when starting in the middle of a display or overlay
3605 string. (Bug#12745)
3606
85fabcb7
CY
36072012-11-03 Chong Yidong <cyd@gnu.org>
3608
3609 * process.c (wait_reading_process_output): Clean up the last
3610 change.
3611
893cc455
CY
36122012-11-03 Jim Paris <jim@jtan.com> (tiny change)
3613
3614 * process.c (wait_reading_process_output): Avoid a race condition
3615 with SIGIO delivery (Bug#11536).
3616
0f7b074f
CY
36172012-11-03 Chong Yidong <cyd@gnu.org>
3618
3619 * buffer.c (cursor_type): Untabify docstring.
3620
3737fee7
DA
36212012-11-03 Dmitry Antipov <dmantipov@yandex.ru>
3622
3623 * frame.h (struct frame): Drop can_have_scroll_bars member
3624 which is meaningless for a long time. Adjust comments.
3625 (FRAME_CAN_HAVE_SCROLL_BARS): Remove.
3626 * frame.c, nsfns.m, term.c, w32fns.c, xfns.c: Adjust users.
3627
b6a9e8b1
DA
36282012-11-03 Dmitry Antipov <dmantipov@yandex.ru>
3629
3630 * window.c (decode_next_window_args): Update window arg after
3631 calling decode_live_window and so fix crash reported at
3632 http://lists.gnu.org/archive/html/emacs-devel/2012-11/msg00035.html
3633 by Juanma Barranquero <lekktu@gmail.com>.
3634 (Fwindow_body_width, Fwindow_body_height): Simplify a bit.
3635 * font.c (Ffont_at): Likewise.
3636
600d4768
JD
36372012-11-01 Jan Djärv <jan.h.d@swipnet.se>
3638
3639 * widget.c (resize_cb): New function.
3640 (EmacsFrameRealize): Add resize_cb as event handler (Bug#12733).
3641 (EmacsFrameResize): Check if all is up to date before changing frame
3642 size.
3643
1005b4b9
EZ
36442012-11-02 Eli Zaretskii <eliz@gnu.org>
3645
3646 Implement backtrace output for fatal errors on MS-Windows.
3647 * w32fns.c (CaptureStackBackTrace_proc): New typedef.
3648 (BACKTRACE_LIMIT_MAX): New macro.
3649 (w32_backtrace): New function.
3650 (emacs_abort): Use w32_backtrace when the user chooses not to
3651 attach a debugger. Update the text of the abort dialog.
3652
b9e9df47
DA
36532012-11-02 Dmitry Antipov <dmantipov@yandex.ru>
3654
3655 Window-related stuff cleanup here and there.
3656 * dispnew.c (Finternal_show_cursor, Finternal_show_cursor_p):
3657 Use decode_any_window.
3658 * fringe.c (Ffringe_bitmaps_at_pos): Likewise.
3659 * xdisp.c (Fformat_mode_line): Likewise.
3660 * font.c (Ffont_at): Use decode_live_window.
3661 * indent.c (Fcompute_motion, Fvertical_motion): Likewise.
3662 * window.c (decode_next_window_args): Likewise.
3663 (decode_any_window): Remove static.
3664 * window.h (decode_any_window): Add prototype.
3665 * lisp.h (CHECK_VALID_WINDOW, CHECK_LIVE_WINDOW): Move from here...
3666 * window.h: ...to here, redefine via WINDOW_VALID_P and WINDOW_LIVE_P,
3667 respectively.
3668
2b371ff7
DA
36692012-11-02 Dmitry Antipov <dmantipov@yandex.ru>
3670
3671 Remove pad from struct input_event.
3672 * termhooks.h (struct input_event): Remove padding field.
3673 Adjust comment.
3674 * keyboard.c (event_to_kboard): Simplify because frame_or_window
3675 member is never cons for a long time. Adjust comment.
3676 (mark_kboards): Adjust because SELECTION_REQUEST_EVENT and
3677 SELECTION_CLEAR_EVENT has no Lisp_Objects to mark. Add comment.
3678 * xterm.c (handle_one_xevent): Do not initialize frame_or_window
3679 field of SELECTION_REQUEST_EVENT and SELECTION_CLEAR_EVENT.
3680
7e8b50d9
EZ
36812012-11-01 Eli Zaretskii <eliz@gnu.org>
3682
3683 * w32proc.c (getpgrp, setpgid): New functions. (Bug#12776)
3684
322aea6d
PE
36852012-10-31 Paul Eggert <eggert@cs.ucla.edu>
3686
3687 Fix crash when using Emacs as commit editor for git (Bug#12697).
3688 * callproc.c (setpgrp): Remove macro, as we now use setpgid
3689 and it is configured in conf_post.h.
3690 (Fcall_process): Don't invoke both setsid and setpgid; the former
3691 is enough, if it exists.
3692 * callproc.c (Fcall_process, child_setup):
3693 * process.c (create_process): Use setpgid.
3694 * conf_post.h (setpgid) [!HAVE_SETPGID]: New macro, which substitutes
3695 for the real thing.
3696 * dispnew.c (init_display): Initialize the foreground group
3697 if we are running a tty display.
3698 * emacs.c (main): Do not worry about setpgrp; init_display does it now.
3699 * lisp.h (init_foreground_group): New decl.
3700 * sysdep.c (inherited_pgroup): New static var.
3701 (init_foreground_group, tcsetpgrp_without_stopping)
3702 (narrow_foreground_group, widen_foreground_group): New functions.
3703 (init_sys_modes): Narrow foreground group.
3704 (reset_sys_modes): Widen foreground group.
3705
220cb2bd
MA
37062012-10-31 Michael Albinus <michael.albinus@gmx.de>
3707
3708 * dbusbind.c: Fix cut'n'waste error. Use HAVE_DBUS_VALIDATE_INTERFACE.
3709
218e997a
MR
37102012-10-31 Martin Rudalics <rudalics@gmx.at>
3711
3712 * minibuf.c (read_minibuf): Restore current buffer since
3713 choose_minibuf_frame calling Fset_frame_selected_window may
3714 change it (Bug#12766).
3715
02615da0
JD
37162012-10-30 Jan Djärv <jan.h.d@swipnet.se>
3717
3718 * frame.c (Fframe_pixel_height): Fix documentation (Bug#12733).
3719
aee5b18e
KH
37202012-10-30 Kenichi Handa <handa@gnu.org>
3721
3722 * font.c (Ffont_at): If WINDOW is specified and it is not
3723 displaying the current buffer, signal an error.
3724
ba116008
DC
37252012-10-29 Daniel Colascione <dancol@dancol.org>
3726
de5ef41a
SM
3727 * cygw32.h, cygw32.c (Qutf_16le, from_unicode, to_unicode):
3728 In preparation for fixing bug#12739, move these functions from
ba116008
DC
3729 here...
3730
3731 * coding.h, coding.c: ... to here, and compile them only when
53372c27
DC
3732 WINDOWSNT or CYGWIN. Moving these functions out of cygw32 proper
3733 lets us write cygw32-agnostic code for the HAVE_NTGUI case.
ba116008 3734
640bf8ad
EZ
37352012-10-28 Eli Zaretskii <eliz@gnu.org>
3736
3737 * w32proc.c (TIMER_TICKS_PER_SEC): New macro.
3738 (timer_loop, getitimer, setitimer): Use it instead of
3739 CLOCKS_PER_SEC, which is no longer pertinent, since we don't use
3740 'clock'.
3741 (w32_get_timer_time): Use 10*TIMER_TICKS_PER_SEC instead of a
3742 literal 10000.
3743
64ccff5f
JD
37442012-10-28 Jan Djärv <jan.h.d@swipnet.se>
3745
3746 * nsterm.m (NO_APPDEFINED_DATA): New define.
3747 (last_appdefined_event_data): New variable
3748 (last_appdefined_event): Remove.
3749 (ns_select): Initialize t from last_appdefined_event_data instead
3750 of [last_appdefined_event data1].
3751 (sendEvent:): Save [theEvent data1] to last_appdefined_event_data,
3752 remove last_appdefined_event (Bug#12698).
3753
e483264c
SM
37542012-10-28 Stefan Monnier <monnier@iro.umontreal.ca>
3755
3756 * frame.c (x_set_font): Catch internal error.
3757
6c16c13e
EZ
37582012-10-27 Eli Zaretskii <eliz@gnu.org>
3759
e483264c
SM
3760 Avoid overflow in w32 implementation of interval timers.
3761 When possible, for ITIMER_PROF count only times the main thread
6c16c13e
EZ
3762 actually executes.
3763 * w32proc.c <struct itimer_data>: 'expire' and 'reload' are now
2e612797
EZ
3764 'volatile ULONGLONG' types. All the other data which was
3765 previously clock_t is now ULONGLONG. 'terminate' is 'volatile int'.
6c16c13e
EZ
3766 (GetThreadTimes_Proc): New typedef.
3767 (w32_get_timer_time): New function, returns a suitable time value
3768 for the timer.
3769 (timer_loop): Enter critical section when accessing ULONGLONG
3770 values of the itimer_data struct, as these accesses are no longer
e483264c
SM
3771 atomic. Call 'w32_get_timer_time' instead of 'clock'.
3772 Remove unused variable.
6c16c13e
EZ
3773 (init_timers): Initialize s_pfn_Get_Thread_Times.
3774 (start_timer_thread): Don't assign itimer->caller_thread here.
3775 (getitimer): Assign itimer->caller_thread here.
3776 (setitimer): Always call getitimer to get the value of ticks_now.
2f246cd3 3777 (sys_spawnve): Avoid compiler warning about format mismatch.
6c16c13e 3778
ccc83f50
EZ
37792012-10-26 Eli Zaretskii <eliz@gnu.org>
3780
3781 * w32fns.c (w32_wnd_proc) <WM_MOUSEMOVE>: Don't enable tracking of
3782 mouse movement events if the menu bar is active. This avoids
3783 producing a busy "hour-glass" cursor by Windows if the mouse
3784 pointer is positioned over a tooltip shown for some menu item.
3785
69deda53
PE
37862012-10-25 Paul Eggert <eggert@cs.ucla.edu>
3787
3788 Don't assume process IDs fit in int.
3789 * emacs.c (shut_down_emacs) [!DOS_NT]:
3790 * sysdep.c (sys_suspend) [SIGTSTP && !MSDOS]:
3791 * term.c (dissociate_if_controlling_tty) [!DOS_NT]:
3792 Use pid_t, not int, to store process IDs, as 'int'
3793 is not wide enough on a few platforms (e.g., AIX and IRIX).
3794
7e70a152
KH
37952012-10-23 Kenichi Handa <handa@gnu.org>
3796
3797 The following change is to make face-font-rescale-alist work
3798 correctly for non-ASCII fonts.
3799
3800 * font.c (font_open_entity): Don't handle Vface_font_rescale_alist.
3801 (font_open_for_lface): Handle Vface_font_rescale_alist.
3802
49238e7f
CY
38032012-10-23 Chong Yidong <cyd@gnu.org>
3804
3805 * xfaces.c (Vfont_list_limit): Move unused variable to faces.el.
3806
5ec86886
JD
38072012-10-21 Jan Djärv <jan.h.d@swipnet.se>
3808
ef446959
JD
3809 * nsfont.m (nsfont_open, ns_glyph_metrics): Force integer advancement
3810 for screen font.
3811 (nsfont_draw): Turn off LCD-smoothing (Bug#11484).
3812
5ec86886
JD
3813 * xterm.c (x_focus_changed): Check if daemonp when sending focus in
3814 event (Bug#12681).
3815
ee7a418d
GM
38162012-10-21 Glenn Morris <rgm@gnu.org>
3817
3818 * lisp.mk (lisp): Add cp51932.el and eucjp-ms.el.
3819
4973679b
PE
38202012-10-20 Paul Eggert <eggert@cs.ucla.edu>
3821
3822 Port to OpenBSD 5.1.
3823 * frame.c (Fmouse_position, Fmouse_pixel_position):
3824 * xdisp.c (produce_stretch_glyph):
3825 Declare local vars only when they're needed.
3826 This is clearer and avoids a warning on OpenBSD about unused vars.
3827 * frame.h (FRAME_WINDOW_P): Always evaluate its argument.
3828 This is safer, and avoids OpenBSD warnings about unused vars.
3829 * keyboard.c (record_menu_key): Remove unnecessary decl.
3830 (poll_timer): Define only if POLL_FOR_INPUT is defined.
3831 * unexelf.c (ELFSIZE) [!ElfW]: Do not define if already defined,
3832 as our definition clashes with OpenBSD's.
3833 * xfaces.c (load_face_colors, check_lface_attrs)
3834 (get_lface_attributes_no_remap, get_lface_attributes)
3835 (lface_fully_specified_p, x_supports_face_attributes_p)
3836 (tty_supports_face_attributes_p, face_fontset, realize_face)
3837 (realize_x_face, realize_tty_face):
3838 Declare parameters to be Lisp_Object[LFACE_VECTOR_SIZE], not
3839 merely Lisp_Object *. This is more informative and avoids
3840 a warning on OpenBSD about accessing beyond an object's size.
3841
c664f463
CY
38422012-10-20 Chong Yidong <cyd@gnu.org>
3843
3844 * lread.c (Fload): Doc fix (Bug#12592).
3845
6ec83f92 38462012-10-19 Kazuhiro Ito <kzhr@d1.dion.ne.jp> (tiny change)
a0d7415f
KH
3847
3848 * font.c (Ffont_at): Fix previous change.
3849
d2824928
EZ
38502012-10-19 Eli Zaretskii <eliz@gnu.org>
3851
e483264c
SM
3852 * puresize.h (BASE_PURESIZE): Bump the base value to 1700000.
3853 See http://lists.gnu.org/archive/html/emacs-devel/2012-10/msg00593.html
c052c554
EZ
3854 for the reasons.
3855
d2824928
EZ
3856 * alloc.c (NSTATICS): Decrease to 0x800.
3857
f60d391f
SM
38582012-10-19 Stefan Monnier <monnier@iro.umontreal.ca>
3859
4a0e1924 3860 * fns.c (Fnreverse): Include the problem element when signaling an
f60d391f
SM
3861 error (bug#12677).
3862
1a9327d5
JD
38632012-10-18 Jan Djärv <jan.h.d@swipnet.se>
3864
3865 * nsterm.m (ns_select): Check writefds before call to
3866 FD_ISSET (Bug#12668).
3867
14145a1e
DC
38682012-10-18 Daniel Colascione <dancol@dancol.org>
3869
3870 * alloc.c (NSTATICS): Increase from 0x650 to 0x1000
3871 (staticpro): If we run out of staticpro slots, die with an
3872 informative error instead of just calling emacs_abort.
3873
1f76f6f5
MR
38742012-10-18 Martin Rudalics <rudalics@gmx.at>
3875
3876 Fix two flaws reported by Dmitry Antipov.
3877 * window.c (Ftemp_output_buffer_show): Remove.
3878 (Fwindow_vscroll, Fset_window_vscroll): Use decode_live_window.
3879 (syms_of_window): Remove defsubr for Stemp_output_buffer_show.
3880
fcf14875
EZ
38812012-10-17 Eli Zaretskii <eliz@gnu.org>
3882
1f76f6f5
MR
3883 * makefile.w32-in ($(BLD)/w32.$(O)):
3884 ($(BLD)/vm-limit.$(O)):
3885 ($(BLD)/term.$(O)):
3886 ($(BLD)/unexw32.$(O)):
3887 ($(BLD)/fileio.$(O)):
a68089e4
EZ
3888 ($(BLD)/dispnew.$(O)): Update dependencies.
3889
3890 * w32term.h (w32_initialize_display_info, initialize_w32_display):
3891 Add prototypes.
3892
3893 * w32proc.c: Include ctype.h.
3894
3895 * w32.h (init_environment, check_windows_init_file)
3896 (syms_of_ntproc, syms_of_ntterm, dostounix_filename)
3897 (unixtodos_filename, init_winsock, srandom, random, sys_pipe)
3898 (set_process_dir, sys_spawnve, register_child, sys_sleep, getwd)
3899 (sys_link): Add prototypes.
3900
3901 * w32.c: Include w32select.h.
3902 (sys_access, e_malloc, sys_select): Add prototypes.
3903 (emacs_gnutls_pull): 'timeout' is now EMACS_TIME, not struct timeval.
3904
3905 * vm-limit.c [WINDOWSNT]: Include w32heap.h.
3906
3907 * unexw32.c: Include lisp.h and w32.h.
3908
3909 * term.c [WINDOWSNT]: Include w32term.h.
3910
3911 * process.c [WINDOWSNT]: Add prototype of sys_select.
3912
3913 * fileio.c [WINDOWSNT]: Include w32.h.
3914
3915 * dispnew.c [WINDOWSNT]: Include w32.h.
3916
fcf14875
EZ
3917 * cygw32.c (Fcygwin_convert_path_to_windows)
3918 (Fcygwin_convert_path_from_windows): Use EQ to compare 2
3919 Lisp_Object values. (Bug#12661)
3920
3921 * w32fns.c (w32_msg_pump): Use XIL instead of casting an integer
3922 to Lisp_Object. (Bug#12661)
3923
fe0b1ec4
KH
39242012-10-17 Kenichi Handa <handa@gnu.org>
3925
3926 * xdisp.c (reseat_1): Make the information stored in it->cmp_it
3927 invalidate.
3928
d556ebf9
DA
39292012-10-17 Dmitry Antipov <dmantipov@yandex.ru>
3930
3931 * buffer.c (Fkill_buffer): When unchaining the marker,
1f9f395d 3932 reset its buffer pointer to NULL (Bug#12652).
d556ebf9 3933
f0863a54
DA
39342012-10-17 Dmitry Antipov <dmantipov@yandex.ru>
3935
3936 Do not verify indirection counters of killed buffers (Bug#12579).
3937 * buffer.h (BUFFER_CHECK_INDIRECTION): New macro.
3938 * buffer.c (compact_buffer, set_buffer_internal_1): Use it.
3939
12fbe755
DA
39402012-10-16 Dmitry Antipov <dmantipov@yandex.ru>
3941
3942 * alloc.c (Fmake_byte_code): Fix typo in comment.
3943 * print.c (print_interval): Define as static to match prototype.
3944 * indent.c (disptab_matches_widthtab, recompute_width_table):
3945 Convert to eassert.
3946
61655b89
DA
39472012-10-16 Dmitry Antipov <dmantipov@yandex.ru>
3948
3949 * editfns.c (get_system_name): Remove.
3950 * lisp.h (get_system_name): Remove prototype.
3951 * xrdb.c (getenv, getpwuid, getpwnam): Remove prototypes.
3952 (get_environ_db): Use Vsystem_name. Avoid call to strlen.
3953
9520f2f2
DC
39542012-10-15 Daniel Colascione <dancol@dancol.org>
3955
3956 * dbusbind.c: Add comment explaining reason for previous change.
3957
dca778d5
MR
39582012-10-15 Martin Rudalics <rudalics@gmx.at>
3959
3960 * window.c (Fwindow_end): Rewrite check whether cached position
3961 can be used (Bug#12600).
3962 (resize_frame_windows, grow_mini_window, shrink_mini_window):
3963 Set windows_or_buffers_changed.
3964
3e0341b0
DC
39652012-10-15 Daniel Colascione <dancol@dancol.org>
3966
3967 * dbusbind.c: Fix cygw32 build break when compiling with dbus
3968 enabled by undefining the symbol "interface", which the platform
3969 headers define to something incompatible.
3970
33d4113c
DC
39712012-10-14 Daniel Colascione <dancol@dancol.org>
3972
3973 * image.c (init_tiff_functions, init_imagemagick_functions)
3974 (init_svg_functions): Fix cygw32 build break by using these
3975 functions only when WINDOWSNT _and_ HAVE_NTGUI.
3976
a36fb15e
JD
39772012-10-14 Jan Djärv <jan.h.d@swipnet.se>
3978
3979 * nsterm.m (ns_select): Count fd:s in writefs also (Bug#12422).
3980
537f336d
JD
39812012-10-13 Jan Djärv <jan.h.d@swipnet.se>
3982
3983 * gtkutil.c (xg_set_widget_bg): Divide by 65535 (Bug#12612).
3984
0ba06a77
KH
39852012-10-13 HANATAKA, Shinya <bogytech@gmail.com> (tiny change)
3986
3987 * coding.c (detect_coding): Set coding->id before calling
3988 this->detector.
3989
ce2fe65a
AS
39902012-10-13 Andreas Schwab <schwab@linux-m68k.org>
3991
3992 * fileio.c: Formatting fixes.
3993
d6453ce4
PE
39942012-10-13 Paul Eggert <eggert@cs.ucla.edu>
3995
3996 Fix some stat-related races.
3997 * fileio.c (Fwrite_region): Avoid race condition if a file is
3998 removed or renamed by some other process immediately after Emacs
3999 writes it but before Emacs stats it. Do not assume that stat (or
4000 fstat) succeeds.
4001 * image.c (slurp_file): Resolve the file name with fopen + fstat
4002 rather than stat + fopen.
4003 (pbm_read_file) [0]: Remove unused code with stat race.
4004 * process.c (allocate_pty) [HAVE_PTYS && !PTY_ITERATION && !PTY_OPEN]:
4005 Remove ineffective code with stat race.
4006
06485aa8
SM
40072012-10-12 Stefan Monnier <monnier@iro.umontreal.ca>
4008
4009 * doc.c (get_doc_string): Don't signal an error if the file is missing.
4010
167e3640
JD
40112012-10-12 Jan Djärv <jan.h.d@swipnet.se>
4012
4013 * nsterm.m (hold_event_q): New static variable.
4014 (EV_TRAILER, sendScrollEventAtLoc:fromEvent:): Call hold_event if
4015 ! q_event_ptr.
4016 (hold_event): New function.
4017 (ns_read_socket): If hold_event_q have events, store them and
4018 return (Bug#12384).
4019 (setPosition:portion:whole:): Send SIGIO to ourselves if apploopnr
4020 is zero (Bug#12384).
4021
c40239df
JB
40222012-10-12 Juanma Barranquero <lekktu@gmail.com>
4023
4024 * makefile.w32-in ($(BLD)/w32select.$(O)): Update dependencies.
4025
bb385a92
EZ
40262012-10-12 Eli Zaretskii <eliz@gnu.org>
4027
2a9f1099
EZ
4028 * makefile.w32-in ($(BLD)/fileio.$(O)): Add sys/file.h.
4029
bb385a92
EZ
4030 * fileio.c (check_existing): New function.
4031 (make_temp_name, Ffile_exists_p, Ffile_writable_p): Call it
4032 instead of calling 'stat', when what's needed is to check whether
4033 a file exists. This avoids expensive system calls on MS-Windows.
4034 (Bug#12587)
4035
8599b23a 4036 * w32.c (init_environment): Call 'check_existing' instead of 'stat'.
bb385a92
EZ
4037
4038 * lread.c (openp) [WINDOWSNT]: Call 'access' instead of 'stat' to
4039 determine whether a file exists and is not a directory.
4040
4041 * lisp.h (check_existing): Add prototype.
4042
2b9c2e68
JD
40432012-10-12 Jan Djärv <jan.h.d@swipnet.se>
4044
4045 * nsfont.m (nsfont_open): Remove font cache, it is not GC correct.
4046
81749a23
GM
40472012-10-12 Glenn Morris <rgm@gnu.org>
4048
4049 * buffer.c (Fset_buffer): Doc fix. (Bug#12624)
4050
5253a5fd
SM
40512012-10-11 Stefan Monnier <monnier@iro.umontreal.ca>
4052
389a94a5
SM
4053 * buffer.c (Fkill_buffer): Null out the overlay list(s) as well.
4054
5253a5fd
SM
4055 * eval.c (Fautoload): Remember previous autoload status in load-history.
4056
7cded46f
PE
40572012-10-11 Paul Eggert <eggert@cs.ucla.edu>
4058
4059 lread.c, macros.c, marker.c, menu.c, minibuf.c: Use bool for booleans.
4060 * lread.c (load_each_byte, new_backquote_flag, readchar)
4061 (read_filtered_event, lisp_file_lexically_bound_p)
4062 (safe_to_load_version, Fload, complete_filename_p, openp)
4063 (build_load_history, readevalloop, read_escape, read1)
4064 (string_to_number, read_vector, read_list):
4065 * macros.c (Fstart_kbd_macro):
4066 * marker.c (CONSIDER):
4067 * menu.c (parse_single_submenu, digest_single_submenu)
4068 (find_and_return_menu_selection, Fx_popup_menu):
4069 * minibuf.c (read_minibuf_noninteractive, read_minibuf)
4070 (Ftry_completion):
4071 * nsmenu.m (ns_update_menubar, runMenuAt:forFrame:keymaps:):
4072 (ns_menu_show):
4073 * xmenu.c (set_frame_menubar, create_and_show_popup_menu)
4074 (xmenu_show, xdialog_show):
4075 Use bool for booleans.
4076 * lread.c (safe_to_load_version): Rename from safe_to_load_p,
4077 as it's not a predicate. All uses changed. Omit unnecessary
4078 buffer termination.
4079
549c3414
DA
40802012-10-11 Dmitry Antipov <dmantipov@yandex.ru>
4081
4082 * editfns.c (save_excursion_save): Use nil if mark points to nowhere.
4083 (save_excursion_restore): Do not restore mark if it was not saved.
4084
e85aafe7
PE
40852012-10-11 Paul Eggert <eggert@cs.ucla.edu>
4086
fd2f90cf
PE
4087 * marker.c (cached_modiff): EMACS_INT, not int.
4088
c1af190b
PE
4089 * w32select.c (waiting_for_input): Declare by including "keyboard.h"
4090 instead of having a wrong decl.
e85aafe7
PE
4091 * nsmenu.m (waiting_for_input): Remove wrong decl.
4092
e738ca56
PE
40932012-10-10 Paul Eggert <eggert@cs.ucla.edu>
4094
9fa1de30
PE
4095 keyboard.c, keymap.c: Use bool for booleans.
4096 * dispnew.c (sit_for): Distinguish between 3-way display_option
4097 and boolean do_display.
4098 * keyboard.c (single_kboard, this_command_key_count_reset)
4099 (waiting_for_input, echoing, immediate_quit, input_pending)
4100 (interrupt_input, interrupts_deferred, pop_kboard)
4101 (temporarily_switch_to_single_kboard, ignore_mouse_drag_p)
4102 (command_loop_1, adjust_point_for_property)
4103 (safe_run_hooks_error, input_polling_used, read_char):
4104 (help_char_p, readable_events, kbd_buffer_events_waiting)
4105 (kbd_buffer_get_event, timer_check_2, make_lispy_event)
4106 (lucid_event_type_list_p, get_input_pending):
4107 (gobble_input, menu_separator_name_p, menu_bar_item)
4108 (parse_menu_item, parse_tool_bar_item, read_char_x_menu_prompt)
4109 (read_char_minibuf_menu_prompt, access_keymap_keyremap)
4110 (keyremap_step, test_undefined, read_key_sequence)
4111 (detect_input_pending, detect_input_pending_ignore_squeezables)
4112 (detect_input_pending_run_timers, requeued_events_pending_p)
4113 (quit_throw_to_read_char, Fset_input_interrupt_mode):
4114 * keymap.c (get_keymap, keymap_parent, keymap_memberp)
4115 (access_keymap_1, access_keymap, map_keymap, get_keyelt)
4116 (Fdefine_key, Flookup_key, struct accessible_keymaps_data)
4117 (accessible_keymaps_1, Fkey_description, push_key_description):
4118 (shadow_lookup, struct where_is_internal_data)
4119 (where_is_internal, Fwhere_is_internal, where_is_internal_1)
4120 (Fdescribe_buffer_bindings, describe_map_tree, struct describe_map_elt)
4121 (describe_map, describe_vector):
4122 * menu.c (single_menu_item):
4123 * nsmenu.m (ns_update_menubar):
4124 * process.c (wait_reading_process_output):
4125 * search.c (scan_buffer, scan_newline):
4126 Use bool for boolean.
4127 * keyboard.c (timers_run, swallow_events)
4128 (detect_input_pending_run_timers):
4129 * process.c (wait_reading_process_output):
4130 Use unsigned for counter where wraparound-on-overflow is desired,
4131 since unsigned is guaranteed to have that behavior and signed is not.
4132 (read_char): Use ptrdiff_t for string length.
4133 (get_input_pending): Remove first argument, since it was always
4134 the same pointer-to-int (now pointer-to-boolean) &input_pending,
4135 and behave as if it had that value. Return new value of
4136 input_pending. All callers changed.
4137 * keyboard.h (struct kboard): Use unsigned : 1 for boolean member
4138 immediate_echo. Use ptrdiff_t for echo_after_prompt, since it's
4139 a string length.
4140 * keymap.c (push_key_description): Omit last arg, which was always 1.
4141 All callers changed.
4142
e738ca56
PE
4143 * regex.c (immediate_quit) [emacs]: Remove duplicate decl.
4144
29f21cdf
JB
41452012-10-10 Juanma Barranquero <lekktu@gmail.com>
4146
4147 * makefile.w32-in ($(BLD)/dispnew.$(O), $(BLD)/indent.$(O))
4148 ($(BLD)/term.$(O)): Update dependencies.
4149
6aea7528
DA
41502012-10-10 Dmitry Antipov <dmantipov@yandex.ru>
4151
4152 * alloc.c (mark_object): Use meaningful PVEC_NORMAL_VECTOR.
4153 * lisp.h (enum pvec_type): Adjust comments and omit explicit
4154 initializer for PVEC_NORMAL_VECTOR.
4155
5f3f57be
PE
41562012-10-10 Paul Eggert <eggert@cs.ucla.edu>
4157
4158 Clean out old termopts cruft.
4159 * termopts.h (flow_control, meta_key): Remove unused decls.
4160 * dispnew.c, indent.c, nsterm.m, term.c, xsettings.c, xsmfns.c:
4161 Don't include termopts.h.
4162
3e98c68e
DA
41632012-10-10 Dmitry Antipov <dmantipov@yandex.ru>
4164
4165 * alloc.c (gc_sweep): Use pointer-to-a-pointer loop for buffers.
4166
77e344e5
PE
41672012-10-10 Paul Eggert <eggert@cs.ucla.edu>
4168
4169 * commands.h (immediate_quit): Remove duplicate decl.
4170
5683d7cd
JD
41712012-10-09 Jan Djärv <jan.h.d@swipnet.se>
4172
4173 * nsfont.m (Vfonts_in_cache): Remove, not needed as font.c handles
4174 caching.
4175 (nsfont_open): Remove setting of Vfonts_in_cache.
1f9f395d 4176 (syms_of_nsfont): Remove initialization of Vfonts_in_cache.
5683d7cd 4177
cf5fc6db
EZ
41782012-10-09 Eli Zaretskii <eliz@gnu.org>
4179
b15736e6
EZ
4180 * w32fns.c (w32_last_error): Change the return value to DWORD, to
4181 match what GetLastError returns. Explain why the function is
4182 needed.
4183
cf5fc6db
EZ
4184 * frame.c (delete_frame): Rename local variable 'tooltip_frame' to
4185 'is_tooltip_frame', to avoid confusion with its global namesake.
4186
f99714ce
DC
41872012-10-08 Daniel Colascione <dancol@dancol.org>
4188
4189 * xdisp.c (start_hourglass): Call w32_note_current_window when
2b1f11ed
EZ
4190 HAVE_NTGUI, not just WINDOWSNT, resolving a problem in the cygw32
4191 build that caused Emacs to display the hourglass cursor forever.
f99714ce 4192
fd59cb29
GM
4193 * w32fns.c (Fx_display_color_cells): Instead of using NCOLORS,
4194 which is broken under remote desktop, calculate the number of
4195 colors available for a display based on the display's number of
4196 planes and number of bits per pixel per plane. (bug#10397).
4197
62c480c9 41982012-10-08 Jan Djärv <jan.h.d@swipnet.se>
fd59cb29 4199
62c480c9
JD
4200 * nsfont.m (Vfonts_in_cache): New variable.
4201 (nsfont_open): Use unsignedLongLongValue for cache in case wide ints
4202 are used. Add cached fonts to Vfonts_in_cache.
4203 (syms_of_nsfont): Initialize and staticpro Vfonts_in_cache.
4204
607446ba
JB
42052012-10-08 Juanma Barranquero <lekktu@gmail.com>
4206
fd5125ad
JB
4207 * makefile.w32-in (LOCAL_FLAGS): Don't define HAVE_NTGUI, it's now
4208 in nt/config.nt.
46979e0b
JB
4209 (FONT_H): Define after FRAME_H.
4210 ($(BLD)/emacs.$(O), $(BLD)/process.$(O), $(BLD)/w32heap.$(O)):
4211 Update dependencies.
fd5125ad 4212
607446ba
JB
4213 * w32term.c: Remove leftover declaration of keyboard_codepage.
4214
b6f4e300
EZ
42152012-10-08 Eli Zaretskii <eliz@gnu.org>
4216
c54ebba4
EZ
4217 * makefile.w32-in (FONT_H): Add $(FRAME_H).
4218 (W32TERM_H): Add $(ATIMER_H) and $(FRAME_H).
4219 ($(BLD)/emacs.$(O), $(BLD)/w32console.$(O)): Update dependencies.
4220 (GLOBAL_SOURCES): Add cygw32.c.
fd59cb29
GM
4221 ($(BLD)/unexw32.$(O)):
4222 ($(BLD)/w32.$(O)):
4223 ($(BLD)/w32console.$(O)):
4224 ($(BLD)/w32fns.$(O)):
4225 ($(BLD)/w32heap.$(O)):
4226 ($(BLD)/w32menu.$(O)):
15c720a3 4227 ($(BLD)/w32proc.$(O)): Add w32common.h.
c54ebba4 4228
b6f4e300
EZ
4229 * w32fns.c (w32_color_map_lookup, x_to_w32_color): Argument is now
4230 'const char *'.
4231 (x_to_w32_color): Don't modify the argument, modify a copy instead.
4232
501199a3
DC
42332012-10-08 Daniel Colascione <dancol@dancol.org>
4234
4235 * w32term.h (WM_EMACS_BRINGTOTOP, WM_EMACS_INPUT_READY)
4236 (WM_EMACS_END): Change WM_EMACS_BRINGTOTOP from 22 to 21 to close
4237 accidental message numbering hole. Change other messages to
4238 match.
4239
4240 * w32select.h (HAVE_W32SELECT): Remove.
4241
4242 * w32select.c, w32proc.c, w32menu.c, w32console.c, w32.c: Include
1f9f395d 4243 w32common.h instead of w32heap.h.
501199a3
DC
4244
4245 * w32heap.h (ROUND_UP, ROUND_DOWN, get_page_size)
4246 (get_allocation_unit, get_processor_type, get_w32_major_version)
4247 (get_w32_minor_version, sysinfo_cache, osinfo_cache)
4248 (w32_major_version, w32_minor_version, w32_build_number, OS_9X)
4249 (OS_NT, os_subtype, cache_system_info): Move declarations to
4250 w32common.
4251
4252 * w32heap.c: Include w32common.h.
4253 (sysinfo_cache, syspage_mask, osinfo_cache, w32_major_version)
8599b23a
SM
4254 (w32_minor_version, w32_build_number, w32_subtype):
4255 Remove duplicate definitions.
501199a3
DC
4256
4257 * w32fns.c: Include w32common.h; include w32heap.h only in
4258 WINDOWSNT.
4259
4260 (Fx_file_dialog): Clarify comment on GetOpenFileName structure.
4261 Use `report_file_error' instead of `error' in order to better
4262 inform users of what went wrong. Increase NTGUI_UNICODE file
4263 dialog box file name length to 32k, the maximum allowed by the NT
4264 kernel.
4265
4266 * w32common.h: New file.
4267 (ROUND_UP, ROUND_DOWN, get_page_size)
4268 (get_allocation_unit, get_processor_type, get_w32_major_version)
4269 (get_w32_minor_version, sysinfo_cache, osinfo_cache)
4270 (w32_major_version, w32_minor_version, w32_build_number, OS_9X)
4271 (OS_NT, os_subtype, cache_system_info): Move here.
4272
4273 * unexw32.c, unexcw.c: Include w32common.h.
4274
4275 * emacs.c (main): Use (defined (WINDOWSNT) || defined
4276 HAVE_NTGUI) instead of removed HAVE_W32SELECT to decide whether
4277 to call syms_of_w32select.
4278
4279 * cygw32.h: Remove obsolete EXFUN declarations.
4280
4281 * cygw32.c (Qutf_16_le): Rename to Qutf_16le.
4282
4283 * Makefile.in (SOME_MACHINE_OBJECTS): Reverse accidental removal
4284 of w32inevt.o from SOME_MACHINE_OBJECTS.
4285
93aa5c81
DC
42862012-10-08 Daniel Colascione <dancol@dancol.org>
4287
4288 * image.c: Permanent fix for JPEG compilation issue --- limit
4289 jpeglib `boolean' redefinition to Cygwin builds.
4290
d424f3d8
EZ
42912012-10-08 Eli Zaretskii <eliz@gnu.org>
4292
8ee4c6ce
EZ
4293 * image.c (CHECK_LIB_AVAILABLE): Remove, no longer used.
4294
d424f3d8
EZ
4295 * emacs.c (DAEMON_MUST_EXEC) [HAVE_NTGUI]: Define this only on
4296 Cygwin.
4297
e08348a0
DC
42982012-10-08 Daniel Colascione <dancol@dancol.org>
4299
4300 * xfaces.c, xdisp.c, window.c, w32xfns.c, w32term.h, w32term.c,
4301 w32select.h w32select.c, w32proc.c, w32menu.c, w32inevt.c,
4302 w32help.c, w32font.c, w32font.c, w32fns.c, w32console.c, w32.h,
4303 w32.c, unexw32.c, termhooks.h, process.c, menu.c, keyboard.h,
4304 keyboard.c, image.c, frame.h, frame.c, fontset.c, font.h, font.c,
4305 emacs.c, dispextern.h, cygw32.h, cygw32.c, conf_post.h,
4306 Makefile.in: use HAVE_NTGUI for W32 GUI and WINDOWSNT for the
4307 operating system. defined(HAVE_NTGUI) && !defined(WINDOWSNT) is
4308 now a supported configuration.
4309
4310 * Makefile.in: consolidate image variables into LIBIMAGE; add
8e2417bf 4311 W32_OBJ and W32_LIBS. Compile new files.
e08348a0
DC
4312
4313 * conf_post.h:
4314 (_DebPrint) declare tracing facility for W32 debugging. We need
4315 to unify tracing later.
4316
4317 (NTGUI_UNICODE) Define when compiling for Cygwin to allow the
4318 unconditional use of W32 Unicode functions. Cygwin runs only on
4319 100% Unicode operating systems.
4320
4321 * cygw32.c: New file. Define Cygwin-specific facilities.
4322 (Fcygwin_convert_path_to_windows)
4323 (Fcygwin_convert_path_from_windows): New user functions for
4324 accessing Cygwin path-munging routines.
4325
4326 * cygw32.h: New file.
4327 (WCSDATA, to_unicode, from_unicode): Define facilities for storing
4328 UTF-16LE strings temporarily inside non-Lisp-visible string
4329 objects.
4330
4331 (w32_strerror): Just what it says on the tin.
4332
4333 * emacs.c: Make the NS fork-then-exec code for daemon-launching
4334 also run for Cygwin; both systems have the same problem with using
4335 GUI facilities in a forked child. Also call syms_of_cygw32,
4336 syms_of_w32select in correct places.
4337
4338 (DAEMON_MUST_EXEC): new macro defined to signal that a platform
4339 needs fork-then-exec for daemon launching.
4340
4341 * font.h: Include frame.h.
4342
4343 * image.c: Use the image library cache machinery only when we're
4344 compiling for native WINDOWSNT; Cygwin can use shared libraries
4345 like any other Unixlike system.
4346
4347 * keyboard.c: Clarify a comment regarding the input loop.
4348
4349 * menu.c: When NTGUI_UNICODE is defined, use Unicode menu
4350 functions directly instead of trying to detect at runtime that our
4351 host operating system supports them. We make this change for two
4352 reasons: Cygwin lacks support for the multibyte character
4353 conversion functions used by the legacy menu code, and Cygwin
4354 never needs to rely on non-Unicode APIs.
4355
4356 * unexw32.c (hinst): Declare extern.
4357
4358 * w32.c: Change header order;
4359 (w32_strerror): Move to w32fns.c because we need it for
4360 non-WINDOWSNT builds.
4361
4362 * w32.h: Add #error macro to make sure we don't include w32.h for
4363 Cygwin builds. Remove w32select declarations.
4364
4365 * w32console.c (w32_sys_ring_bell, Fset_message_beep): Move to
1f9f395d 4366 w32fns.c. w32console.c is WINDOWSNT-only.
e08348a0
DC
4367
4368 * w32fns.c: Include cygw32.h or w32.h depending on CYGWIN; more
4369 NTGUI_UNICODE tweaks. (See above.) Change _snprintf to the more
4370 POSIXy alternative.
4371 (faked_key, sysinfo_cache, osinfo_cahce, syspage_mask)
4372 (w32_major_version, w32_minor_version, w32_build_number)
4373 (os_subtype, sound_type): Define here
4374 (w32_defined_color): Make color parameter const for consistency
4375 with other _defined_color functions.
4376 (w32_createwindow): Unconditionally call w32_init_class instead of
4377 doing so only when hprevinst is non-NULL. Plumbing hprevinst
4378 through the code is complex and unnecessary because class
4379 registration is practically free.
4380 (w32_name_of_message): New EMACSDEBUG-only function.
4381 (Fset_message_beep): Move here
4382 (Fx_open_connection): Require that the display name for Windows be
4383 "w32" for consistency, emacsclient disambiguation, and maybe, one
4384 day, multi-window-system support.
4385 (file_dialog_callback): NTGUI_UNICODE changes; encode and decode
4386 Cygwin files for W32 GUI facilities, since these clearly don't
4387 expect Cygwin names.
4388 (_DebPrint): Define.
4389 (w32_strerror, w32_console_toggle_lock_key, w32_kbd_mods_to_emacs)
4390 (w32_kbd_patch_key, w32_sys_ring_bell): Move here.
4391 (Ssystem_move_file_to_trash): Define only for native WINDOWSNT.
4392 (w32_last_error): Remove.
4393
4394 * w32font.c: Define _strlwr to strlwr for non-WINDOWSNT builds.
4395
4396 * w32heap.c (syspage_mask): Declare here.
4397 (cache_system_info): Remove.
4398
4399 * w32inevt.c (faked_key): Define globally, not statically.
4400 (w32_kbd_mods_to_emacs, w32_kbd_patch_key, faked_key)
4401 (w32_console_toggle_lock_key): Move to w32fns.c.
4402
4403 * w32menu.c: Include setjmp.h. NTGUI_UNICODE changes throughout.
4404
4405 * w32proc.c (_DebPrint): Move to w32fns.c.
4406 * w32select.c: Include string.h, stdio.h for Cygwin.
4407 * w32select.h: New File.
4408
4409 * w32term.c: Include io.h for non-CYGWIN builds; needed for
4410 get_osfhandle.
4411 (w32_message_fd): New variable. Under Cygwin, holds the file
4412 descriptor the system used to tell us about pending thread
4413 messages.
4414
4415 (w32_init_term): Remove incorrect calls to fcntl and init_sigio
4416 that prevented compilation under non-WINDOWSNT systems.
4417
4418 (w32_initialize): Open /dev/windows and assign it to
4419 w32_message_fd. Provide w32 feature.
4420
4421 * w32term.h: Include frame.h, atimer.h. Declare various frame functions.
4422 (WM_EMACS_INPUT_READY): add.
4423 (prepend_msg, w32_message_fd): Declare globally.
4424
4425 * w32xfns.c:
4426 (keyboard_handle): Use only when WINDOWSNT.
4427 (notify_msg_ready): New function. Posts a message to the main
4428 thread's message queue under CYGWIN, which wakes up the main
4429 thread from select(2) by making the /dev/windows file descriptor
4430 ready. Under WINDOWSNT, it sets an event the same way the old
4431 code did.
4432
4433 (post, prepend_msg): Actually call notify_msg_ready instead of
4434 setting the input event directly.
4435
98daa893
EZ
44362012-10-07 Eli Zaretskii <eliz@gnu.org>
4437
4438 * ralloc.c (relinquish): If a heap is ready to be relinquished,
4439 but it still has blocs in it, don't return it to the system,
4440 instead of aborting. (Bug#12402)
4441
3bc0a2f7
JD
44422012-10-07 Jan Djärv <jan.h.d@swipnet.se>
4443
8ad5b73b 4444 * nsterm.m (ns_dumpglyphs_image): Only draw slice of image (Bug#12506).
493b5b1c 4445
335f5ae4
JD
4446 * nsterm.m (ns_update_auto_hide_menu_bar): Remove defintion of
4447 MAC_OS_X_VERSION_10_6.
8ad5b73b
JD
4448 (syms_of_nsterm): Remove comment about Panther and above for
4449 ns-antialias-text.
335f5ae4
JD
4450 * nsterm.h (MAC_OS_X_VERSION_10_3, onTiger): Remove.
4451 (EmacsApp): Remove check for >= MAC_OS_X_VERSION_10_4.
4452 (struct nsfont_info): Remove check for >= MAC_OS_X_VERSION_10_3.
4453
4454 * nsselect.m (ns_string_from_pasteboard): Remove check for >=
4455 MAC_OS_X_VERSION_10_4.
4456
8ad5b73b
JD
4457 * nsmenu.m (fillWithWidgetValue:): Remove code for <
4458 MAC_OS_X_VERSION_10_2.
335f5ae4
JD
4459
4460 * nsimage.m (setPixmapData, getPixelAtX, setAlphaAtX): Remove onTiger.
4461
4462 * nsfns.m (Fns_list_services): Remove comment and check for OSX < 10.4.
4463 (ns_do_applescript): Remove check for >= MAC_OS_X_VERSION_10_4.
4464
3bc0a2f7
JD
4465 * nsterm.m (ns_in_resize): Remove (Bug#12479).
4466 (ns_resize_handle_rect, mouseDown, mouseUp, mouseDragged): Remove.
8599b23a
SM
4467 (ns_clear_frame, sendEvent, windowDidResize, drawRect:):
4468 Remove ns_in_resize check.
3bc0a2f7
JD
4469 (ns_clear_frame_area): Remove resize handle code.
4470
4471 * nsfns.m (ns_in_resize): Remove.
e483264c
SM
4472 (x_set_icon_name, ns_set_name, ns_set_name_as_filename):
4473 Remove ns_in_resize check.
3bc0a2f7 4474
c622b48f
PE
44752012-10-07 Paul Eggert <eggert@cs.ucla.edu>
4476
4477 Improve sys_siglist detection.
4478 * sysdep.c (sys_siglist, init_signals): Use _sys_siglist if it's
4479 defined as a macro, as is done in Solaris.
4480 (sys_siglist_entries): New macro.
4481 (save_strsignal): Use it.
4482 * syssignal.h (safe_strsignal): Now ATTRIBUTE_CONST, to pacify
4483 GCC 4.7.2 on Fedora 17 with the fixed sys_siglist detection.
4484
04fafa46
JD
44852012-10-06 Jan Djärv <jan.h.d@swipnet.se>
4486
4487 * nsfns.m (Fx_create_frame): Call x_default_parameter with
4488 fullscreen/Fullscreen.
4489
4490 * nsterm.h (EmacsView): Rename tbar_height to tibar_height.
4491 tobar_height is new.
4492
4493 * nsterm.m (x_make_frame_visible): Check for fullscreen.
4494 (ns_fullscreen_hook): Activate old style fullscreen with a timer.
4495 (ns_term_init): Set activateIgnoringOtherApps if old style fullscreen.
4496 (windowDidResize:): Check for correct window if old style fullscreen.
4497 Capitalize word in comment. Remove incorrect comment.
4498 (initFrameFromEmacs:): tbar_height renamed tibar_height.
4499 (windowDidEnterFullScreen:): Toggle toolbar for fullscreen to fix
4500 error in drawing background.
1f9f395d 4501 (toggleFullScreen:): Remove comment. Rearrange calls.
04fafa46
JD
4502 Set toolbar values to zero, save old height in tobar_height.
4503 Restore tool bar height when leaving fullscreen.
4504 (canBecomeMainWindow): New function.
4505
c6e21c03
PE
45062012-10-06 Paul Eggert <eggert@cs.ucla.edu>
4507
4508 * keyboard.c (read_char): Remove unnecessary 'volatile's and label.
4509
0d9f584b
EZ
45102012-10-05 Eli Zaretskii <eliz@gnu.org>
4511
a65fbb5f
EZ
4512 * w32proc.c (stop_timer_thread): Fix declaration of 'err'.
4513
0d9f584b 4514 * w32.c (utime): Open the file with FILE_FLAG_BACKUP_SEMANTICS, so
8599b23a
SM
4515 that time stamps of directories could also be changed.
4516 Don't request the too broad GENERIC_WRITE, only the more restrictive
0d9f584b
EZ
4517 FILE_WRITE_ATTRIBUTES access rights.
4518
4519 * fileio.c (Fset_file_times): Special-case ignoring errors for
4520 directories only on MSDOS, not on MS-Windows.
4521
e8757f09 45222012-10-05 Ikumi Keita <ikumi@ikumi.que.jp> (tiny change)
ca347e3d
IK
4523
4524 * minibuf.c (Fcompleting_read): Doc fix. (Bug#12555)
4525
7604f298
EZ
45262012-10-04 Eli Zaretskii <eliz@gnu.org>
4527
4528 * w32.c (utime): Test for INVALID_HANDLE_VALUE, not for NULL, to
4529 see whether CreateFile failed.
4530
88d69b7d
PE
45312012-10-04 Paul Eggert <eggert@cs.ucla.edu>
4532
4533 * profiler.c (handle_profiler_signal): Inhibit pending signals too,
4534 to avoid similar races.
4535 * keyboard.c (pending_signals): Now bool, not int.
4536
7509f454
PE
4537 Port timers to OpenBSD, plus check for timer failures.
4538 OpenBSD problem reported by Han Boetes.
4539 * profiler.c (setup_cpu_timer): Check for failure of timer_settime
4540 and/or setitimer.
4541 (Fprofiler_cpu_stop): Don't assume HAVE_SETITIMER.
4542 * syssignal.h (HAVE_ITIMERSPEC): New macro. This is for platforms
4543 like OpenBSD, which has timer_settime but does not declare it.
4544 OpenBSD does not define SIGEV_SIGNAL, so use that when deciding
4545 whether to use itimerspec-related primitives. All uses of
4546 HAVE_TIMER_SETTIME replaced with HAVE_ITIMERSPEC.
4547
a3c5c0c5
PE
45482012-10-02 Paul Eggert <eggert@cs.ucla.edu>
4549
4550 * profiler.c (handle_profiler_signal): Fix a malloc race
4551 that caused Emacs to hang on Fedora 17 when profiling Lisp.
4552
914e743b
JD
45532012-10-02 Jan Djärv <jan.h.d@swipnet.se>
4554
4555 * nsterm.m (windowDidEnterFullScreen): Remove fprintf.
4556
d8ab37a8
EZ
45572012-10-02 Eli Zaretskii <eliz@gnu.org>
4558
4559 * w32proc.c (sys_wait): Declare 'signame' 'const char *', to be
4560 consistent with the change in return value of 'safe_strsignal'.
4561
b3ecad33
PE
45622012-10-02 Paul Eggert <eggert@cs.ucla.edu>
4563
0a99eee1
PE
4564 Prefer plain 'static' to 'static inline' (Bug#12541).
4565 * bidi.c (bidi_get_type, bidi_check_type, bidi_get_category)
4566 (bidi_set_sor_type, bidi_push_embedding_level)
4567 (bidi_pop_embedding_level, bidi_remember_char, bidi_copy_it)
4568 (bidi_cache_reset, bidi_cache_shrink, bidi_cache_fetch_state)
4569 (bidi_cache_search, bidi_cache_ensure_space)
4570 (bidi_cache_iterator_state, bidi_cache_find)
4571 (bidi_peek_at_next_level, bidi_set_paragraph_end)
4572 (bidi_count_bytes, bidi_char_at_pos, bidi_fetch_char)
4573 (bidi_explicit_dir_char, bidi_resolve_neutral_1):
4574 Now 'static', not 'static inline'.
4575
b3ecad33
PE
4576 Count overruns when profiling; change units to ns.
4577 * profiler.c (handle_profiler_signal): Count sampling intervals, not ms.
4578 Give extra weight to samples after overruns, to attempt to count
4579 the time more accurately.
4580 (setup_cpu_timer): Change sampling interval units from ms to ns, since
4581 the underlying primitives nominally do ns.
4582 (Fprofiler_cpu_start): Document the change. Mention that
4583 the sampling intervals are only approximate.
4584
090cf9db
SM
45852012-10-02 Stefan Monnier <monnier@iro.umontreal.ca>
4586
4587 * frame.c (Fmake_terminal_frame): Prefer safer CONSP over !NILP.
4588
4589 * coding.h (ENCODE_FILE, DECODE_FILE, DECODE_SYSTEM): Remove special
4590 case for the special 0 coding-system.
4591
4592 * buffer.c (Fset_buffer_multibyte): Signal an error instead of widening.
4593 (Fmake_overlay): Remove redundant tests.
64edc777 4594 (fix_start_end_in_overlays): Remove redundant recentering.
090cf9db 4595
81550bf4
JB
45962012-10-02 Juanma Barranquero <lekktu@gmail.com>
4597
4598 * makefile.w32-in ($(BLD)/alloc.$(O), $(BLD)/gmalloc.$(O)):
4599 Update dependencies.
4600
aa1ba90e
PE
46012012-10-01 Paul Eggert <eggert@cs.ucla.edu>
4602
4603 Fix a malloc race condition involving strsignal.
4604 A signal can arrive in the middle of a malloc, and Emacs's signal
4605 handler can invoke strsignal, which can invoke malloc, which is
4606 not portable. This race condition bug makes Emacs hang on GNU/Linux.
4607 Fix it by altering the signal handler so that it does not invoke
4608 strsignal.
4609 * emacs.c (shut_down_emacs): Use safe_strsignal, not strsignal.
4610 * process.c (status_message): Use const pointer, in case strsignal
4611 is #defined to safe_strsignal.
4612 * sysdep.c (sys_siglist, init_signals): Always define and
4613 initialize a substitute sys_siglist if the system does not define
4614 one, even if HAVE_STRSIGNAL.
4615 (safe_strsignal): Rename from strsignal. Always define,
4616 using sys_siglist. Return a const pointer.
4617 * syssignal.h (safe_strsignal): New decl.
4618 (strsignal) [!HAVE_STRSIGNAL]: Define in terms of safe_strsignal.
4619
ace917bd
EZ
46202012-10-01 Eli Zaretskii <eliz@gnu.org>
4621
4622 * w32proc.c (timer_loop): Fix code that waits for timer
4623 expiration, to avoid high CPU usage.
4624
9eb71b9c
SM
46252012-10-01 Stefan Monnier <monnier@iro.umontreal.ca>
4626
4627 * fns.c (check_hash_table, get_key_arg, maybe_resize_hash_table)
4628 (sweep_weak_table): Remove redundant prototypes.
4629
b3317662
FP
46302012-10-01 Fabrice Popineau <fabrice.popineau@gmail.com>
4631
4632 * emacs.c: Move the inclusion of TERM_HEADER after including
4633 windows.h on WINDOWSNT. This avoids compilation problems with
4634 MSVC.
4635
f0e5f225
EZ
46362012-10-01 Eli Zaretskii <eliz@gnu.org>
4637
2d7d1608
EZ
4638 * unexw32.c (OFFSET_TO_RVA, RVA_TO_OFFSET)
4639 (RVA_TO_SECTION_OFFSET): Encode all macro arguments in parentheses.
4640 (RVA_TO_PTR): Cast the result of RVA_TO_OFFSET to 'unsigned char *',
4641 as the previous version used 'void *'.
4642
4643 * ralloc.c (ROUNDUP): Fix last change.
4644 (MEM_ROUNDUP): Don't cast MEM_ALIGN, it is already of type
4645 'size_t'.
4646
f0e5f225
EZ
4647 * w32proc.c <disable_itimers>: New static flag.
4648 (init_timers): Initialize it to zero, after creating the critical
4649 sections used by the timer threads.
4650 (term_timers): Set to 1 before deleting the critical sections.
4651 (getitimer, setitimer): If disable_itimers is non-zero, return an
4652 error indication without doing anything. Reported by Fabrice
4653 Popineau <fabrice.popineau@supelec.fr> as part of bug#12544.
4cdfbb89
EZ
4654 (alarm) [HAVE_SETITIMER]: Be more conformant to the expected
4655 return results.
4656 [!HAVE_SETITIMER]: Behave as the previous version that didn't
4657 support timers.
f0e5f225
EZ
4658
4659 * emacs.c (shut_down_emacs) [WINDOWSNT]: Move the call to
4660 term_ntproc after all the other bookkeeping, to get timers working
4661 as long as possible.
4662
82ef37c1
PE
46632012-10-01 Paul Eggert <eggert@cs.ucla.edu>
4664
b3a4c387
PE
4665 * xdisp.c (syms_of_xdisp): Default message-log-max to 1000, not 100.
4666 Suggested by Juri Linkov in
4667 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00821.html>.
4668
b0ab8123
PE
4669 Prefer plain 'static' to 'static inline' (Bug#12541).
4670 With static functions, modern compilers inline pretty well by
4671 themselves; advice from programmers often hurts as much as it helps.
4672 On my host (x86-64, Fedora 17, GCC 4.7.2, default 'configure'),
4673 this change shrinks the text size of the Emacs executable by 1.1%
4674 without affecting CPU significantly in my benchmark.
4675 * alloc.c (mem_find, live_string_p, live_cons_p, live_symbol_p)
4676 (live_float_p, live_misc_p, live_vector_p, live_buffer_p)
4677 (mark_maybe_object, mark_maybe_pointer, bounded_number):
4678 * buffer.c (bset_abbrev_mode, bset_abbrev_table)
4679 (bset_auto_fill_function, bset_auto_save_file_format)
4680 (bset_auto_save_file_name, bset_backed_up, bset_begv_marker)
4681 (bset_bidi_display_reordering, bset_buffer_file_coding_system)
4682 (bset_cache_long_line_scans, bset_case_fold_search)
4683 (bset_ctl_arrow, bset_cursor_in_non_selected_windows)
4684 (bset_cursor_type, bset_display_table, bset_extra_line_spacing)
4685 (bset_file_format, bset_file_truename, bset_fringe_cursor_alist)
4686 (bset_fringe_indicator_alist, bset_fringes_outside_margins)
4687 (bset_header_line_format, bset_indicate_buffer_boundaries)
4688 (bset_indicate_empty_lines, bset_invisibility_spec)
4689 (bset_left_fringe_width, bset_major_mode, bset_mark)
4690 (bset_minor_modes, bset_mode_line_format, bset_mode_name)
4691 (bset_name, bset_overwrite_mode, bset_pt_marker)
4692 (bset_right_fringe_width, bset_save_length)
4693 (bset_scroll_bar_width, bset_scroll_down_aggressively)
4694 (bset_scroll_up_aggressively, bset_selective_display)
4695 (bset_selective_display_ellipses, bset_vertical_scroll_bar_type)
4696 (bset_word_wrap, bset_zv_marker, set_buffer_overlays_before)
4697 (set_buffer_overlays_after):
4698 * category.c (bset_category_table):
4699 * charset.c (read_hex):
4700 * coding.c (produce_composition, produce_charset)
4701 (handle_composition_annotation, handle_charset_annotation)
4702 (char_encodable_p):
4703 * dispnew.c (swap_glyph_pointers, copy_row_except_pointers)
4704 (assign_row, set_frame_matrix_frame, make_current)
4705 (add_row_entry):
4706 * eval.c (set_specpdl_symbol, set_specpdl_old_value):
4707 * fns.c (maybe_resize_hash_table):
4708 * frame.c (fset_buffer_predicate, fset_minibuffer_window):
4709 * gmalloc.c (register_heapinfo):
4710 * image.c (lookup_image_type):
4711 * intervals.c (set_interval_object, set_interval_left)
4712 (set_interval_right, copy_interval_parent, rotate_right)
4713 (rotate_left, balance_possible_root_interval):
4714 * keyboard.c (kset_echo_string, kset_kbd_queue)
4715 (kset_keyboard_translate_table, kset_last_prefix_arg)
4716 (kset_last_repeatable_command, kset_local_function_key_map)
4717 (kset_overriding_terminal_local_map, kset_real_last_command)
4718 (kset_system_key_syms, clear_event, set_prop):
4719 * lread.c (digit_to_number):
4720 * marker.c (attach_marker, live_buffer, set_marker_internal):
4721 * nsterm.m (ns_compute_glyph_string_overhangs):
4722 * process.c (pset_buffer, pset_command)
4723 (pset_decode_coding_system, pset_decoding_buf)
4724 (pset_encode_coding_system, pset_encoding_buf, pset_filter)
4725 (pset_log, pset_mark, pset_name, pset_plist, pset_sentinel)
4726 (pset_status, pset_tty_name, pset_type, pset_write_queue):
4727 * syntax.c (bset_syntax_table, dec_bytepos):
4728 * terminal.c (tset_param_alist):
4729 * textprop.c (interval_has_some_properties)
4730 (interval_has_some_properties_list):
4731 * window.c (wset_combination_limit, wset_dedicated)
4732 (wset_display_table, wset_hchild, wset_left_fringe_width)
4733 (wset_left_margin_cols, wset_new_normal, wset_new_total)
4734 (wset_normal_cols, wset_normal_lines, wset_parent, wset_pointm)
4735 (wset_right_fringe_width, wset_right_margin_cols)
4736 (wset_scroll_bar_width, wset_start, wset_temslot, wset_vchild)
4737 (wset_vertical_scroll_bar_type, wset_window_parameters):
4738 * xdisp.c (wset_base_line_number, wset_base_line_pos)
4739 (wset_column_number_displayed, wset_region_showing)
4740 (window_box_edges, run_window_scroll_functions)
4741 (append_glyph_string_lists, prepend_glyph_string_lists)
4742 (append_glyph_string, set_glyph_string_background_width)
4743 (append_glyph, append_composite_glyph)
4744 (take_vertical_position_into_account):
4745 * xfaces.c (x_create_gc, x_free_gc, merge_face_vectors)
4746 (face_attr_equal_p, lface_equal_p, hash_string_case_insensitive)
4747 (lface_hash, lface_same_font_attributes_p, lookup_face):
4748 * xml.c (libxml2_loaded_p):
4749 * xterm.c (x_set_mode_line_face_gc, x_set_glyph_string_gc)
4750 (x_set_glyph_string_clipping, x_clear_glyph_string_rect):
4751 Now 'static', not 'static inline'.
4752
05584c31
PE
4753 * bidi.c: Tune.
4754 (bidi_copy_it): Do the whole copy with a single memcpy.
4755 (bidi_char_at_pos): Merge the two STRING_CHAR calls into one.
4756
86ec63ba
PE
4757 Revert the FOLLOW-SYMLINKS change for file-attributes.
4758 Doing it right would require several changes to Tramp, and there's
4759 not enough time to get that tested before the freeze today.
4760 * dired.c (directory_files_internal, Ffile_attributes):
4761 Undo last change.
4762
82ef37c1
PE
4763 * frame.c (x_report_frame_params): Port better to wider ints.
4764 Do not assume that EMACS_UINT is the same width as uprintmax_t,
4765 or that pointers can be printed in 15 decimal digits.
4766 Avoid GCC warnings if EMACS_UINT is wider than a pointer.
4767
62aba0d4
FP
47682012-09-30 Fabrice Popineau <fabrice.popineau@supelec.fr>
4769
4770 Support x64 build on MS-Windows.
4771 * w32term.h (SCROLL_BAR_PACK, SCROLL_BAR_UNPACK): Define for x64.
4772 (SET_SCROLL_BAR_W32_WINDOW): Cast ID to intptr_t, for
4773 compatibility with x64.
5e4daaf3 4774 (x_get_focus_frame): Add prototype.
62aba0d4
FP
4775
4776 * w32term.c (w32_draw_underwave): Don't use GCC extensions for
4777 defining an XRectangle structure.
4778
4779 * w32proc.c (RVA_TO_PTR, w32_executable_type): Fix pointer
4780 arithmetics for compatibility with x64.
4781
4782 * w32menu.c (add_menu_item): Use UINT_PTR instead of UINT, for
4783 compatibility with x64.
4784
4785 * w32heap.h: Adjust prototypes and declarations.
4786
4787 * w32heap.c (RVA_TO_PTR, allocate_heap, sbrk, init_heap)
4788 (round_heap): Use DWORD_PTR, ptrdiff_t and size_t instead of
4789 DWORD, long, and unsigned long, for compatibility with x64.
4790 (allocate_heap) [_WIN64]: Reserve 32GB of memory.
4791 (sbrk): Argument is now of type ptrdiff_t.
4792
4793 * w32fns.c (HMONITOR): Condition declaration on _WIN32_WINNT being
4794 less than 0x0500.
4795 (w32_msg_pump): Use WPARAM type for 'result'.
4796
4797 * w32.c (init_environment, get_emacs_configuration): Support AMD64
4798 architecture.
4799 (init_ntproc): Cast arguments of _open_osfhandle to intptr_t, for
4800 compatibility with x64.
4801
4802 * vm-limit.c (lim_data): Now size_t.
4803 (check_memory_limits): Adjust prototypes of real_morecore and
4804 __morecore to receive argument of type ptrdiff_t. Use size_t for
4805 five_percent and data_size.
4806
4807 * unexw32.c: Use DWORD_PTR instead of DWORD for file-scope
4808 variables, for compatibility with x64.
4809 (rva_to_section, offset_to_section, relocate_offset)
4810 (OFFSET_TO_RVA, RVA_TO_OFFSET, RVA_TO_SECTION_OFFSET)
4811 (PTR_TO_RVA, RVA_TO_PTR, OFFSET_TO_PTR, get_section_info)
4812 (copy_executable_and_dump_data): Use DWORD_PTR instead of DWORD
4813 for compatibility with x64.
4814
4815 * sysdep.c (STDERR_FILENO): Define if not already defined.
4816
4817 * ralloc.c (real_morecore): Argument type is now ptrdiff_t.
4818 (__morecore): Argument type is now ptrdiff_t.
4819 (ROUNDUP, MEM_ROUNDUP): Use size_t instead of 'unsigned long'.
4820 (relinquish): Use ptrdiff_t type for 'excess'.
4821 (r_alloc_sbrk): Argument type is now ptrdiff_t.
4822
4823 * makefile.w32-in (HEAPSIZE): Get value from EMACS_HEAPSIZE.
4824 (bootstrap-temacs-CMD, bootstrap-temacs-SH): Use $(EMACS_PURESIZE)
4825 instead of a literal number.
4826
4827 * gmalloc.c [WINDOWSNT]: Include w32heap.h.
4828 (min): Define only if not already defined.
4829
4830 * frame.c (x_report_frame_params): Use EMACS_UINT for the return
4831 value of FRAME_X_WINDOW, to fit a 64-bit pointer on 64-bit Windows
4832 hosts.
4833
4834 * image.c (x_bitmap_pixmap): Return ptrdiff_t, not int, since
4835 'bitmaps' is a pointer.
4836
4837 * dispextern.h (x_bitmap_pixmap): Adjust prototype.
4838
4839 * alloc.c (gdb_make_enums_visible): Now conditional on __GNUC__.
4840
e7a2937b
PE
48412012-09-30 Paul Eggert <eggert@cs.ucla.edu>
4842
4843 file-attributes has a new optional arg FOLLOW-SYMLINKS.
4844 * dired.c (directory_files_internal, Ffile_attributes):
4845 New arg follow_symlinks. All uses changed.
4846
b43d62ae
SM
48472012-09-30 Stefan Monnier <monnier@iro.umontreal.ca>
4848
4849 * .gdbinit (xbacktrace): Adjust to recent "struct backtrace" change.
4850
c06c382a
EZ
48512012-09-30 Eli Zaretskii <eliz@gnu.org>
4852
4853 Support atimers and CPU profiler via profile.c on MS-Windows.
4854 * w32proc.c (sig_mask, crit_sig): New static variables.
4855 (sys_signal): Support SIGALRM and SIGPROF.
4856 (sigemptyset, sigaddset, sigfillset, sigprocmask)
b43d62ae 4857 (pthread_sigmask, setpgrp): Move here from w32.c. sigaddset,
c06c382a
EZ
4858 sigfillset, and sigprocmask are no longer no-ops.
4859 (sigismember): New function.
4860 (struct itimer_data): New definition.
4861 (ticks_now, real_itimer, prof_itimer, clocks_min, crit_real)
4862 (crit_prof): New static variables.
4863 (MAX_SINGLE_SLEEP): New definition.
4864 (timer_loop, stop_timer_thread, term_timers, init_timers)
4865 (start_timer_thread, getitimer, setitimer): New functions.
4866 (alarm): No longer a no-op, calls setitimer.
4867
4868 * w32.c (term_ntproc): Call term_timers.
4869 (init_ntproc): Make sure all signals are unblocked at startup, to
4870 erase any traces of dumping. Call init_timers.
4871
4872 * w32fns.c (hourglass_timer, HOURGLASS_ID): Remove.
4873 Windows-specific code to display the hourglass mouse pointer is no
4874 longer used.
4875 (w32_wnd_proc): Remove code that handled the WM_TIMER message due
4876 to hourglass timer expiration.
4877 (start_hourglass, cancel_hourglass, DEFAULT_HOURGLASS_DELAY):
4878 Remove, no longer used.
b43d62ae
SM
4879 (w32_note_current_window, show_hourglass, hide_hourglass):
4880 New functions, in support of hourglass cursor display similar to other
c06c382a
EZ
4881 window systems.
4882 (syms_of_w32fns): Don't initialize hourglass_timer.
4883
4884 * xdisp.c (start_hourglass, cancel_hourglass): Now used on
4885 WINDOWSNT as well.
4886 (start_hourglass) [WINDOWSNT]: Call w32_note_current_window.
4887
4888 * w32.h (init_timers, term_timers): Add prototypes.
4889
95402d5f
KH
48902012-09-30 Kenichi Handa <handa@gnu.org>
4891
4892 * coding.c (decode_coding_ccl, encode_coding_ccl): Pay attention
4893 to the buffer relocation which may be caused by ccl_driver.
4894
dd946752
JD
48952012-09-30 Jan Djärv <jan.h.d@swipnet.se>
4896
d7e642cc
JD
4897 * xfns.c (Fx_file_dialog): Update comment.
4898
4899 * w32fns.c (Fx_file_dialog): Update comment.
4900
4901 * nsfns.m (Fns_read_file_name): Add argument DIR_ONLY_P.
4902 Initialize panel name field if OSX >= 10.6.
4903
4904 * fileio.c (Fnext_read_file_uses_dialog_p): Add HAVE_NS.
4905
dd946752
JD
4906 * nsfns.m (ns_frame_parm_handlers): Add x_set_fullscreen.
4907
4908 * nsterm.m (NEW_STYLE_FS): New define.
4909 (ns_fullscreen_hook, windowWillEnterFullScreen)
4910 (windowDidEnterFullScreen, windowWillExitFullScreen)
4911 (windowDidExitFullScreen, toggleFullScreen, handleFS)
4912 (setFSValue): New functions.
4913 (EmacsFSWindow): New implementation.
4914 (canBecomeKeyWindow): New function for EmacsFSWindow.
4915 (ns_create_terminal): Set fullscreen_hook to ns_fullscreen_hook.
4916 (dealloc): Release nonfs_window if in fullscreen.
4917 (updateFrameSize:): Call windowDidMove to update top/left.
4918 (windowWillResize:toSize:): Check if frame is still maximized.
4919 (initFrameFromEmacs:): Initialize fs_state, fs_before_fs,
4920 next_maximized, maximized_width, maximized_height and nonfs_window.
4921 Call setCollectionBehavior if NEW_STYLE_FS. Initialize bwidth and
4922 tbar_height.
4923 (windowWillUseStandardFrame:defaultFrame:): Update frame parameter
1f9f395d 4924 fullscreen. Set maximized_width/height. Act on next_maximized.
dd946752
JD
4925
4926 * nsterm.h (MAC_OS_X_VERSION_10_7, MAC_OS_X_VERSION_10_8): New.
4927 (EmacsView): Add variables for fullscreen.
4928 (handleFS, setFSValue, toggleFullScreen): New in EmacsView.
4929 (EmacsFSWindow): New interface for fullscreen.
4930
427730eb
JB
49312012-09-30 Juanma Barranquero <lekktu@gmail.com>
4932
4933 * makefile.w32-in ($(BLD)/profiler.$(O)): Update dependencies.
4934
48de8b12
CY
49352012-09-30 Chong Yidong <cyd@gnu.org>
4936
4937 * fns.c (Frandom): Doc fix.
4938
5938d519
MR
49392012-09-30 Martin Rudalics <rudalics@gmx.at>
4940
4941 * window.c (Vwindow_combination_limit): New default value.
4942 (Qwindow_size): New symbol replacing Qtemp_buffer_resize.
4943
cb5b0266
PE
49442012-09-30 Paul Eggert <eggert@cs.ucla.edu>
4945
4946 * syssignal.h (PROFILER_CPU_SUPPORT): Don't define if PROFILING.
4947 Suggested by Eli Zaretskii in
4948 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00811.html>.
4949
84f72efd
EZ
49502012-09-30 Eli Zaretskii <eliz@gnu.org>
4951
4952 * profiler.c (Fprofiler_cpu_stop): Use timer_settime only if
4953 HAVE_TIMER_SETTIME is defined.
4954
9d4dcdc9
PE
49552012-09-30 Paul Eggert <eggert@cs.ucla.edu>
4956
d89460ed
PE
4957 Profiler improvements: more-accurate timers, overflow checks.
4958 * profiler.c: Don't include stdio.h, limits.h, sys/time.h,
4959 signal.h, setjmp.h. Include systime.h instead.
4960 (saturated_add): New function.
4961 (record_backtrace, current_sample_interval): Use EMACS_INT, not size_t.
4962 (record_backtrace, handle_profiler_signal): Saturate on fixnum overflow.
4963 (profiler_timer, profiler_timer_ok) [HAVE_TIMER_SETTIME]:
4964 New static vars.
84f72efd 4965 (enum profiler_cpu_running): New enum.
d89460ed
PE
4966 (profiler_cpu_running): Now of that enum type, not bool.
4967 All uses changed to store the new value.
4968 (handle_profiler_signal): Rename from sigprof_handler_1,
4969 for consistency with other handlers. Do not check whether
4970 cpu_log is a hash-table if garbage collecting, since it
4971 doesn't matter in that case.
4972 (deliver_profiler_signal): Rename from sigprof_handler,
4973 for consistency with other handlers.
4974 (setup_cpu_timer): New function, with much of what used to be in
4975 Fprofiler_cpu_start. Check for out-of-range argument.
4976 Prefer timer_settime if available, and prefer
4977 thread cputime clocks, then process cputime clocks, then
4978 monotonic clocks, to the old realtime clock. Use make_timeval
4979 to round more-correctly when falling back to setitimer.
4980 (Fprofiler_cpu_start): Use it.
4981 (Fprofiler_cpu_stop): Prefer timer_settime if available.
4982 Don't assume that passing NULL as the 2nd argument of setitimer
4983 is the same as passing a pointer to all-zero storage.
4984 Ignore SIGPROF afterwards.
4985 (malloc_probe): Saturate at MOST_POSITIVE_FIXNUM.
4986 * sysdep.c (emacs_sigaction_init): Also mask out SIGPROF in
4987 non-fatal signal handlers. Ignore SIGPROF on startup.
4988 * syssignal.h (PROFILER_CPU_SUPPORT): Define this macro here, not
4989 in profiler.c, since sysdep.c now uses it.
4990
9d4dcdc9
PE
4991 * sysdep.c (handle_fatal_signal): Bump backtrace size to 40.
4992 Suggested by Eli Zaretskii in
4993 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00796.html>.
4994
8e5691a0
JB
49952012-09-29 Juanma Barranquero <lekktu@gmail.com>
4996
4997 * makefile.w32-in ($(BLD)/profiler.$(O)): Update dependencies.
4998
e7c1b6ef
SM
49992012-09-29 Stefan Monnier <monnier@iro.umontreal.ca>
5000
5001 * lisp.h (struct backtrace): Remove indirection for `function' field.
5002 * xdisp.c (redisplay_internal):
5003 * profiler.c (record_backtrace, sigprof_handler_1):
5004 * alloc.c (Fgarbage_collect):
5005 * eval.c (interactive_p, Fsignal, eval_sub, Ffuncall, Fbacktrace)
5006 (Fbacktrace_frame): Adjust accordingly.
5007
e61d39cd 50082012-09-28 Glenn Morris <rgm@gnu.org>
d393cefb
GM
5009
5010 * eval.c (Frun_hook_with_args, Frun_hook_with_args_until_success)
5011 (Frun_hook_with_args_until_failure): Doc fixes.
5012
404043ea
EZ
50132012-09-28 Eli Zaretskii <eliz@gnu.org>
5014
5015 * xdisp.c (syms_of_xdisp) <Qredisplay_internal>: Rename from
5016 Qautomatic_redisplay and change the symbol name. All users changed.
5017
704d3f45
TM
50182012-09-28 Tomohiro Matsuyama <tomo@cx4a.org>
5019
5020 * profiler.c (sigprof_handler): Fix race condition.
5021
757140ff
GM
50222012-09-28 Glenn Morris <rgm@gnu.org>
5023
5024 * lread.c (lisp_file_lexically_bound_p): Handle #! lines. (Bug#12528)
5025
a615a3ae
PE
50262012-09-27 Paul Eggert <eggert@cs.ucla.edu>
5027
5028 Check more robustly for timer_settime.
89d17fd0
PE
5029 * Makefile.in (LIB_TIMER_TIME): New macro.
5030 (LIBES): Add it.
a615a3ae
PE
5031 * atimer.c (alarm_timer, alarm_timer_ok, set_alarm, init_atimer):
5032 Use HAVE_TIMER_SETTIME, not SIGEV_SIGNAL, to decide whether to
5033 call timer_settime.
5034
3670daf7
TM
50352012-09-26 Tomohiro Matsuyama <tomo@cx4a.org>
5036
5037 * profiler.c (Fprofiler_cpu_start): Remove unnecessary flag SA_SIGINFO.
5038
6a586b7f
JB
50392012-09-26 Juanma Barranquero <lekktu@gmail.com>
5040
5041 * makefile.w32-in ($(BLD)/profiler.$(O)): Update dependencies.
5042
41c8bfcf
PE
50432012-09-26 Paul Eggert <eggert@cs.ucla.edu>
5044
5045 * character.h (MAYBE_UNIFY_CHAR): Remove.
5046 * charset.c, charset.h (maybe_unify_char): Now static.
5047 * charset.c (decode_char): Use maybe_unify_char, not MAYBE_UNIFY_CHAR.
5048 Since this stuff is now private to charset.c, there's no need for
5049 a public macro and no need to inline by hand.
5050
3a880af4
SM
50512012-09-26 Tomohiro Matsuyama <tomo@cx4a.org>
5052 Stefan Monnier <monnier@iro.umontreal.ca>
5053 Juanma Barranquero <lekktu@gmail.com>
611b7507 5054
3a880af4
SM
5055 * profiler.c: New file.
5056 * Makefile.in (base_obj): Add profiler.o.
611b7507
JB
5057 * makefile.w32-in (OBJ2, GLOBAL_SOURCES): Add profiler.c.
5058 ($(BLD)/profiler.$(O)): New target.
3a880af4
SM
5059 * emacs.c (main): Call syms_of_profiler.
5060 * alloc.c (Qautomatic_gc): New constant.
5061 (MALLOC_PROBE): New macro.
5062 (xmalloc, xzalloc, xrealloc, lisp_malloc, lisp_align_malloc): Use it.
5063 (total_bytes_of_live_objects): New function.
5064 (Fgarbage_collect): Use it. Record itself in backtrace_list.
5065 Call malloc_probe for the memory profiler.
5066 (syms_of_alloc): Define Qautomatic_gc.
5067 * eval.c (eval_sub, Ffuncall): Reorder assignments to avoid
5068 race condition.
5069 (struct backtrace): Move definition...
5070 * lisp.h (struct backtrace): ..here.
5071 (Qautomatic_gc, profiler_memory_running): Declare vars.
5072 (malloc_probe, syms_of_profiler): Declare functions.
5073 * xdisp.c (Qautomatic_redisplay): New constant.
5074 (redisplay_internal): Record itself in backtrace_list.
5075 (syms_of_xdisp): Define Qautomatic_redisplay.
611b7507 5076
5938d519 50772012-09-25 Eli Zaretskii <eliz@gnu.org>
b67238c2
JB
50782012-09-25 Juanma Barranquero <lekktu@gmail.com>
5079
5080 * makefile.w32-in ($(BLD)/callproc.$(O)): Update dependencies.
5081
e26fd2e4
PE
50822012-09-25 Paul Eggert <eggert@cs.ucla.edu>
5083
5084 Prefer POSIX timers if available.
5085 They avoid a race if the timer is too close to the current time.
5086 * atimer.c (alarm_timer, alarm_timer_ok) [SIGEV_SIGNAL]: New static vars.
5087 (set_alarm) [SIGEV_SIGNAL]: Use POSIX timers if available.
9180598c 5088 (init_atimer) [SIGEV_SIGNAL]: Initialize them.
e26fd2e4 5089
eedec3ee
EZ
50902012-09-25 Eli Zaretskii <eliz@gnu.org>
5091
5092 * coding.c (CHAR_STRING_ADVANCE_NO_UNIFY): Make it an alias of
5093 CHAR_STRING_ADVANCE.
5094 (STRING_CHAR_ADVANCE_NO_UNIFY): Make it an alias of
5095 STRING_CHAR_ADVANCE.
5096
aa15c6bb
JB
50972012-09-25 Juanma Barranquero <lekktu@gmail.com>
5098
5099 Move Vlibrary_cache to emacs.c and reset before dumping.
5100
5101 * lisp.h (reset_image_types): Declare.
5102 [WINDOWSNT] (Vlibrary_cache): Declare.
5103
5104 * image.c (reset_image_types): New function.
5105
5106 * emacs.c [WINDOWSNT] (Vlibrary_cache): Move from w32.c.
5107 (syms_of_emacs) [WINDOWSNT] <Vlibrary_cache>: Initialize and staticpro.
5108 (Fdump_emacs): Reset Vlibrary_cache and image_types.
5109
5110 * w32.c (Vlibrary_cache): Do not define; moved to emacs.c
5111 (globals_of_w32) <Vlibrary_cache>: Do not initialize.
5112
5113 * w32.h (Vlibrary_cache): Do not declare.
5114
54d629be
EZ
51152012-09-25 Eli Zaretskii <eliz@gnu.org>
5116
16b22fef
EZ
5117 * w32proc.c (sys_signal): Handle all signals defined by the
5118 MS-Windows runtime, not just SIGCHLD. Actually install the signal
5119 handlers for signals supported by Windows. Don't override
5120 term_ntproc as the handler for SIGABRT.
5121 (sigaction): Rewrite to call sys_signal instead of duplicating its
5122 code.
5123 (sys_kill): Improve commentary.
5124
5125 * w32.c (term_ntproc): Accept (and ignore) one argument, for
5126 consistency with a signature of a signal handler. All callers
5127 changed.
5128 (init_ntproc): Accept an argument DUMPING. If dumping, don't
5129 install term_ntproc as a signal handler for SIGABRT, as that
5130 should be done by the dumped Emacs.
5131
5132 * w32.h (init_ntproc, term_ntproc): Adjust prototypes.
5133
5134 * w32select.c (term_w32select): Protect against repeated
5135 invocation by setting clipboard_owner to NULL after calling
5136 DestroyWindow.
5137
5138 * emacs.c (shut_down_emacs, main): Adapt the calls to init_ntproc
5139 and term_ntproc to their modified signatures.
5140
54d629be
EZ
5141 * character.c (char_string, string_char): Remove calls to
5142 MAYBE_UNIFY_CHAR. See the discussion starting at
5143 http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00433.html
5144 for the details.
5145
59f7af81
CY
51462012-09-25 Chong Yidong <cyd@gnu.org>
5147
5148 * xdisp.c (mode_line_inverse_video): Delete obsolete variable.
5149
22e8cf4a
SM
51502012-09-24 Stefan Monnier <monnier@iro.umontreal.ca>
5151
5152 * bytecode.c (exec_byte_code): Signal an error instead of aborting,
5153 when encountering an unknown bytecode.
5154
578098f3
PE
51552012-09-24 Paul Eggert <eggert@cs.ucla.edu>
5156
5157 image.c, indent.c: Use bool for booleans.
5158 * dispextern.h (struct image_type): Members valid_p, load, init
5159 now return bool, not int. All uses changed.
5160 * image.c: Omit unnecessary static decls.
5161 (x_create_bitmap_mask, x_build_heuristic_mask):
5162 Return void, not int, since callers don't care about the return value.
5163 (x_create_bitmap_mask, define_image_type, valid_image_p)
5164 (struct image_keyword, parse_image_spec, image_spec_value)
5165 (check_image_size, image_background)
5166 (image_background_transparent, x_clear_image_1)
5167 (postprocess_image, lookup_image, x_check_image_size)
5168 (x_create_x_image_and_pixmap, xbm_image_p)
5169 (Create_Pixmap_From_Bitmap_Data, xbm_read_bitmap_data)
5170 (xbm_load_image, xbm_file_p, xbm_load, xpm_lookup_color)
5171 (init_xpm_functions, xpm_valid_color_symbols_p, xpm_image_p)
5172 (xpm_load, xpm_load_image, lookup_rgb_color, lookup_pixel_color)
5173 (x_to_xcolors, x_build_heuristic_mask, pbm_image_p, pbm_load)
5174 (png_image_p, init_png_functions, png_load_body, png_load)
5175 (jpeg_image_p, init_jpeg_functions, jpeg_load_body, jpeg_load)
5176 (tiff_image_p, init_tiff_functions, tiff_load, gif_image_p)
5177 (init_gif_functions, gif_load, imagemagick_image_p)
5178 (imagemagick_load_image, imagemagick_load, svg_image_p)
5179 (init_svg_functions, svg_load, svg_load_image, gs_image_p)
5180 (gs_load):
5181 * nsimage.m (ns_load_image):
5182 * nsterm.m (ns_defined_color):
5183 * xfaces.c (tty_lookup_color, tty_defined_color, defined_color):
5184 * xfns.c (x_defined_color):
5185 * xterm.c (x_alloc_lighter_color_for_widget)
5186 (x_alloc_nearest_color_1, x_alloc_nearest_color)
5187 (x_alloc_lighter_color):
5188 * indent.c (disptab_matches_widthtab, current_column)
5189 (scan_for_column, string_display_width, indented_beyond_p)
5190 (compute_motion, vmotion, Fvertical_motion):
5191 Use bool for booleans.
5192
a5f2b6ec
CY
51932012-09-24 Chong Yidong <cyd@gnu.org>
5194
5195 * chartab.c (Fset_char_table_default): Obsolete function removed.
5196
18e27ea8
PE
51972012-09-23 Paul Eggert <eggert@cs.ucla.edu>
5198
afea8a8a
PE
5199 Move pid_t related decls out of lisp.h.
5200 * lisp.h, syswait.h (record_child_status_change, wait_for_termination)
5201 (interruptible_wait_for_termination):
5202 Move these decls from lisp.h to syswait.h, since they use pid_t.
5203 Needed on FreeBSD; see Herbert J. Skuhra in
5204 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00571.html>.
5205 * callproc.c: Include syswait.h.
5206
18e27ea8
PE
5207 gnutls.c, gtkutil.c: Use bool for boolean.
5208 * gnutls.c (gnutls_global_initialized, init_gnutls_functions)
5209 (emacs_gnutls_handle_error):
5210 * gtkutil.c (xg_check_special_colors, xg_prepare_tooltip)
5211 (xg_hide_tooltip, xg_create_frame_widgets)
5212 (create_dialog, xg_uses_old_file_dialog)
5213 (xg_get_file_with_chooser, xg_get_file_with_selection)
5214 (xg_get_file_name, xg_have_tear_offs, create_menus, xg_create_widget)
5215 (xg_item_label_same_p, xg_update_menubar)
5216 (xg_modify_menubar_widgets, xg_event_is_for_menubar)
5217 (xg_ignore_gtk_scrollbar, xg_set_toolkit_scroll_bar_thumb)
5218 (xg_event_is_for_scrollbar, xg_pack_tool_bar, xg_make_tool_item)
5219 (is_box_type, xg_tool_item_stale_p, xg_update_tool_bar_sizes)
5220 (update_frame_tool_bar, free_frame_tool_bar):
5221 * gtkutil.c, w32term.c, xterm.c (x_wm_set_size_hint):
5222 * nsmenu.m (ns_update_menubar):
5223 * nsmenu.m, w32menu.c, xmenu.c (set_frame_menubar):
5224 * xfns.c (Fx_show_tip) [USE_GTK]:
5225 Use bool for boolean.
5226 * gtkutil.c (xg_update_frame_menubar):
5227 * xmenu.c (update_frame_menubar):
5228 Return void, not int, since caller ignores return value.
5229 * gtkutil.c (xg_change_toolbar_position):
5230 Return void, not 1.
5231
af0e9f75
JB
52322012-09-23 Juanma Barranquero <lekktu@gmail.com>
5233
5234 * makefile.w32-in (BLOCKINPUT_H): Remove.
5235 (SYSSIGNAL_H): New macro.
5236 ($(BLD)/alloc.$(O), $(BLD)/atimer.$(O), $(BLD)/buffer.$(O))
5237 ($(BLD)/callproc.$(O), $(BLD)/data.$(O), $(BLD)/dired.$(O))
5238 ($(BLD)/dispnew.$(O), $(BLD)/editfns.$(O), $(BLD)/emacs.$(O))
5239 ($(BLD)/eval.$(O), $(BLD)/fileio.$(O), $(BLD)/floatfns.$(O))
5240 ($(BLD)/fns.$(O), $(BLD)/fontset.$(O), $(BLD)/frame.$(O))
5241 ($(BLD)/fringe.$(O), $(BLD)/image.$(O), $(BLD)/insdel.$(O))
5242 ($(BLD)/keyboard.$(O), $(BLD)/keymap.$(O), $(BLD)/lread.$(O))
5243 ($(BLD)/menu.$(O), $(BLD)/w32inevt.$(O), $(BLD)/w32proc.$(O))
5244 ($(BLD)/print.$(O), $(BLD)/process.$(O), $(BLD)/ralloc.$(O))
5245 ($(BLD)/search.$(O), $(BLD)/sound.$(O), $(BLD)/sysdep.$(O))
5246 ($(BLD)/term.$(O), $(BLD)/window.$(O), $(BLD)/xdisp.$(O))
5247 ($(BLD)/xfaces.$(O), $(BLD)/w32fns.$(O), $(BLD)/w32menu.$(O))
5248 ($(BLD)/w32term.$(O), $(BLD)/w32select.$(O), $(BLD)/w32reg.$(O))
5249 ($(BLD)/w32xfns.$(O)): Update dependencies.
5250
5101529e
EZ
52512012-09-23 Eli Zaretskii <eliz@gnu.org>
5252
5253 * .gdbinit: Set breakpoint on terminate_due_to_signal, not on
5254 fatal_error_backtrace.
5255
5256 * w32proc.c (sys_kill): Undo last change: don't do anything when
5257 invoked to deliver SIGABRT to our own process. This is now
5258 handled by emacs_raise.
5259
2c3ee0ad
JB
52602012-09-23 Juanma Barranquero <lekktu@gmail.com>
5261
5262 * w32term.c (w32_read_socket): Remove leftover reference to
5263 interrupt_input_pending.
5264
62a1d661
PE
52652012-09-23 Paul Eggert <eggert@cs.ucla.edu>
5266
5267 Do not use SA_NODEFER.
5268 Problem reported by Dani Moncayo in
5269 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00557.html>.
5270 * alloc.c (die):
5271 * sysdep.c (emacs_abort): Do not reset signal handler.
5272 * emacs.c (terminate_due_to_signal): Reset signal handler here.
5273 * sysdep.c (init_signals): Do not use SA_NODEFER. It wasn't
5274 wanted even on POSIXish hosts, and it doesn't work on Windows.
5275
a0942b9a
JD
52762012-09-23 Jan Djärv <jan.h.d@swipnet.se>
5277
5278 * xterm.c (x_term_init): Call fixup_locale before and after calling
5279 gtk_init (Bug#12392).
5280
d07ff9db
CY
52812012-09-23 Chong Yidong <cyd@gnu.org>
5282
5283 * w32.c (w32_delayed_load): Remove LIBRARIES argument; always use
5284 Vdynamic_library_alist.
5285
5286 * gnutls.c (init_gnutls_functions): Caller changed; remove arg.
5287 (Fgnutls_available_p): Caller changed.
5288
5289 * xml.c (init_libxml2_functions, Flibxml_parse_html_region)
5290 (Flibxml_parse_xml_region): Likewise.
5291
5292 * dispextern.h (struct image_type): Remove arg from init function.
5293
5294 * image.c (Finit_image_library, lookup_image_type)
5295 (define_image_type): Remove now-unneeded second arg.
5296 (init_xpm_functions, init_png_functions, init_jpeg_functions)
5297 (init_tiff_functions, init_gif_functions, init_svg_functions):
5298 Arglist and w32_delayed_load calling convention changed.
5299 (gs_type): Remove init_gs_functions; there is no such function.
641cfd14 5300 (valid_image_p, make_image): Fix caller to lookup_image_type.
d07ff9db 5301
4d7e6e51
PE
53022012-09-23 Paul Eggert <eggert@cs.ucla.edu>
5303
5304 Simplify and avoid signal-handling races (Bug#12471).
5305 * alloc.c (die):
5306 * sysdep.c (emacs_abort) [HAVE_NTGUI]:
5307 Avoid recursive loop if there's a fatal error in the function itself.
5308 * atimer.c (pending_atimers):
5309 * blockinput.h: Don't include "atimer.h"; no longer needed.
5310 (interrupt_input_pending): Remove. All uses removed.
5311 pending_signals now counts both atimers and ordinary interrupts.
5312 This is less racy than having three separate pending-signal flags.
5313 (block_input, unblock_input, totally_unblock_input, unblock_input_to)
5314 (input_blocked_p):
5315 Rename from their upper-case counterparts BLOCK_INPUT,
5316 UNBLOCK_INPUT, TOTALLY_UNBLOCK_INPUT, UNBLOCK_INPUT_TO,
5317 INPUT_BLOCKED_P, and turn into functions. All uses changed.
5318 This makes it easier to access volatile variables more accurately.
5319 (BLOCK_INPUT_RESIGNAL): Remove. All uses replaced by unblock_input ().
5320 (input_blocked_p): Prefer this to 'interrupt_input_blocked', as
5321 that's more reliable if the code is buggy and sets
5322 interrupt_input_blocked to a negative value. All uses changed.
5323 * atimer.c (deliver_alarm_signal):
5324 Remove. No need to deliver this to the parent; any thread can
5325 handle this signal now. All uses replaced by underlying handler.
5326 * atimer.c (turn_on_atimers):
5327 * dispnew.c (handle_window_change_signal):
5328 * emacs.c (handle_danger_signal):
5329 * keyboard.c (kbd_buffer_get_event):
5330 Don't reestablish signal handler; not needed with sigaction.
5331 * blockinput.h (UNBLOCK_INPUT_TO, TOTALLY_UNBLOCK_INPUT)
5332 (UNBLOCK_INPUT_TO):
5333 Rework to avoid unnecessary accesses to volatile variables.
5334 (UNBLOCK_INPUT_TO): Now a function.
5335 (totally_unblock_input, unblock_input): New decls.
5336 * data.c (handle_arith_signal, deliver_arith_signal): Move to sysdep.c
5337 (init_data): Remove. Necessary stuff now done in init_signal.
5338 * emacs.c, xdisp.c: Include "atimer.h", since we invoke atimer functions.
5339 * emacs.c (handle_fatal_signal, deliver_fatal_signal): Move to sysdep.c.
5340 (fatal_error_code): Remove; no longer needed.
5341 (terminate_due_to_signal): Rename from fatal_error_backtrace, since
5342 it doesn't always backtrace. All uses changed. No need to reset
5343 signal to default, since sigaction and/or die does that for us now.
5344 Use emacs_raise (FOO), not kill (getpid (), FOO).
5345 (main): Check more-accurately whether we're dumping.
5346 Move fatal-error setup to sysdep.c
5347 * floatfns.c: Do not include "syssignal.h"; no longer needed.
5348 * gtkutil.c (xg_get_file_name, xg_get_font):
5349 Remove no-longer-needed signal-mask manipulation.
5350 * keyboard.c, process.c (POLL_FOR_INPUT):
5351 Don't depend on USE_ASYNC_EVENTS, a symbol that is never defined.
5352 * keyboard.c (read_avail_input): Remove.
5353 All uses replaced by gobble_input.
5354 (Ftop_level): Use TOTALLY_UNBLOCK_INPUT rather than open code.
5355 (kbd_buffer_store_event_hold, gobble_input):
5356 (record_asynch_buffer_change) [USABLE_SIGIO]:
5357 (store_user_signal_events):
5358 No need to mess with signal mask.
5359 (gobble_input): If blocking input and there are terminals, simply
5360 set pending_signals to 1 and return. All hooks changed to not
5361 worry about whether input is blocked.
5362 (process_pending_signals): Clear pending_signals before processing
5363 them, in case a signal comes in while we're processing.
5364 By convention callers now test pending_signals before calling us.
5365 (UNBLOCK_INPUT_TO, unblock_input, totally_unblock_input):
5366 New functions, to support changes to blockinput.h.
5367 (handle_input_available_signal): Now extern.
5368 (reinvoke_input_signal): Remove. All uses replaced by
5369 handle_async_input.
5370 (quit_count): Now volatile, since a signal handler uses it.
3a880af4
SM
5371 (handle_interrupt): Now takes bool IN_SIGNAL_HANDLER as arg.
5372 All callers changed. Block SIGINT only if not already blocked.
4d7e6e51
PE
5373 Clear sigmask reliably, even if Fsignal returns, which it can.
5374 Omit unnecessary accesses to volatile var.
5375 (quit_throw_to_read_char): No need to restore sigmask.
5376 * keyboard.c (gobble_input, handle_user_signal):
5377 * process.c (wait_reading_process_output):
5378 Call signal-handling code rather than killing ourselves.
5379 * lisp.h: Include <float.h>, for...
5380 (IEEE_FLOATING_POINT): New macro, moved here to avoid duplication.
5381 (pending_signals): Now volatile.
5382 (syms_of_data): Now const if IEEE floating point.
5383 (handle_input_available_signal) [USABLE_SIGIO]:
5384 (terminate_due_to_signal, record_child_status_change): New decls.
5385 * process.c (create_process): Avoid disaster if memory is exhausted
5386 while we're processing a vfork, by tightening the critical section
5387 around the vfork.
5388 (send_process_frame, process_sent_to, handle_pipe_signal)
5389 (deliver_pipe_signal): Remove. No longer needed, as Emacs now
5390 ignores SIGPIPE.
5391 (send_process): No need for setjmp/longjmp any more, since the
5392 SIGPIPE stuff is now gone. Instead, report an error if errno
5393 is EPIPE.
5394 (record_child_status_change): Now extern. PID and W are now args.
5395 Return void, not bool. All callers changed.
5396 * sysdep.c (wait_debugging) [(BSD_SYSTEM || HPUX) && !defined (__GNU__)]:
5397 Remove. All uses removed. This bug should be fixed now in a
5398 different way.
5399 (wait_for_termination_1): Use waitpid rather than sigsuspend,
5400 and record the child status change directly. This avoids the
5401 need to futz with the signal mask.
5402 (process_fatal_action): Move here from emacs.c.
5403 (emacs_sigaction_flags): New function, containing
5404 much of what used to be in emacs_sigaction_init.
5405 (emacs_sigaction_init): Use it. Block nonfatal system signals that are
5406 caught by emacs, to make races less likely.
5407 (deliver_process_signal): Rename from handle_on_main_thread.
5408 All uses changed.
5409 (BACKTRACE_LIMIT_MAX): Now at top level.
5410 (thread_backtrace_buffer, threadback_backtrace_pointers):
5411 New static vars.
5412 (deliver_thread_signal, deliver_fatal_thread_signal):
5413 New functions, for more-accurate delivery of thread-specific signals.
5414 (handle_fatal_signal, deliver_fatal_signal): Move here from emacs.c.
5415 (deliver_arith_signal): Handle in this thread, not
5416 in the main thread, since it's triggered by this thread.
5417 (maybe_fatal_sig): New function.
5418 (init_signals): New arg DUMPING so that we can be more accurate
5419 about whether we're dumping. Caller changed.
5420 Treat thread-specific signals differently from process-general signals.
5421 Block all signals while handling fatal error; that's safer.
5422 xsignal from SIGFPE only on non-IEEE hosts, treating it as fatal
5423 on IEEE hosts.
5424 When batch, ignore SIGHUP, SIGINT, SIGTERM if they were already ignored.
5425 Ignore SIGPIPE unless batch.
5426 (emacs_backtrace): Output backtrace for the appropriate thread,
5427 which is not necessarily the main thread.
5428 * syssignal.h: Include <stdbool.h>.
5429 (emacs_raise): New macro.
5430 * xterm.c (x_connection_signal): Remove; no longer needed
5431 now that we use sigaction.
5432 (x_connection_closed): No need to mess with sigmask now.
5433 (x_initialize): No need to reset SIGPIPE handler here, since
5434 init_signals does this for us now.
5435
8f4635e9
JD
54362012-09-23 Jan Djärv <jan.h.d@swipnet.se>
5437
5438 * nsterm.m (ns_dumpglyphs_image): dr is a new rect to draw image into,
fb39b937 5439 background rect may be larger (Bug#12245).
8f4635e9 5440
3296976d
CY
54412012-09-23 Chong Yidong <cyd@gnu.org>
5442
5443 * keyboard.c (timer_check): Avoid quitting during Fcopy_sequence.
5444
d41e491e
PE
54452012-09-22 Paul Eggert <eggert@cs.ucla.edu>
5446
5447 * .gdbinit: Just stop at fatal_error_backtrace.
5448 See Stefan Monnier's request in
5449 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00549.html>.
5450 Remove no-longer-used query of system type.
5451
c88b867f
CY
54522012-09-22 Chong Yidong <cyd@gnu.org>
5453
5454 * search.c (Freplace_match): Doc fix (Bug#12325).
5455
5456 * minibuf.c (Finternal_complete_buffer): Doc fix (Bug#12391).
5457
5458 * editfns.c (Fline_beginning_position): Doc fix (Bug#12416).
5459 (Fline_end_position): Doc fix.
5460
5461 * cmds.c (Fforward_char, Fbackward_char): Doc fix (Bug#12414).
5462
bb4d86b4
CY
54632012-09-22 Chong Yidong <cyd@gnu.org>
5464
5465 * dispextern.h (struct image_type): Add new slot, storing a type
5466 initialization function.
5467
5468 * image.c (define_image_type): Call the image initializer function
5469 if it is defined. Arguments and return value changed.
5470 (valid_image_p, make_image): Callers changed.
5471 (xbm_type, xpm_type, pbm_type, png_type, jpeg_type, tiff_type)
3a880af4
SM
5472 (gif_type, imagemagick_type, svg_type, gs_type):
5473 Add initialization functions.
bb4d86b4
CY
5474 (Finit_image_library): Call lookup_image_type.
5475 (CHECK_LIB_AVAILABLE): Macro deleted.
5476 (lookup_image_type): Call define_image_type here, rather than via
5477 Finit_image_library, and without using CHECK_LIB_AVAILABLE.
5478 (syms_of_image): Move define_image_type calls for xbm_type and
5479 pbm_type to lookup_image_type.
5480
df9685f3
EZ
54812012-09-22 Eli Zaretskii <eliz@gnu.org>
5482
5483 * keyboard.c (timer_check_2): Move calculation of 'timers' and
5484 'idle_timers' from here ...
5485 (timer_check): ... to here. Use Fcopy_sequence to copy the timer
5486 lists, to avoid infloops when the timer does something stupid,
5487 like reinvoke itself with the same or smaller time-out.
5488 (Bug#12447)
5489
8e17c9ba
MR
54902012-09-22 Martin Rudalics <rudalics@gmx.at>
5491
5492 * window.c (Fsplit_window_internal): Handle only Qt value of
5493 Vwindow_combination_limit separately.
5494 (Qtemp_buffer_resize): New symbol.
3a880af4
SM
5495 (Vwindow_combination_limit): New default value.
5496 Rewrite doc-string.
8e17c9ba 5497
589bd69b
EZ
54982012-09-22 Eli Zaretskii <eliz@gnu.org>
5499
5500 * xdisp.c (next_overlay_string): Initialize it->end_charpos for
5501 the new overlay string. (Bug#10159)
5502
01108e3f
PE
55032012-09-22 Paul Eggert <eggert@cs.ucla.edu>
5504
5505 * emacs.c (shut_down_emacs): Don't assume stderr is buffered,
5506 or that fprintf is async-signal-safe. POSIX doesn't require
5507 either assumption.
5508
82f8cd94
CY
55092012-09-22 Chong Yidong <cyd@gnu.org>
5510
5511 * buffer.c (Fset_buffer_modified_p): Handle indirect buffers
5512 (Bug#8207).
5513
3cccbd87
KH
55142012-09-22 Kenichi Handa <handa@gnu.org>
5515
5516 * composite.c (composition_reseat_it): Handle the case that a
5517 grapheme cluster is not covered by a single font (Bug#12352).
5518
09c01941
CY
55192012-09-21 Chong Yidong <cyd@gnu.org>
5520
5521 * image.c (define_image_type): Avoid adding duplicate types to
5522 image_types (Bug#12463). Suggested by Jörg Walter.
5523
acfa068f 55242012-09-21 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
e25c1a30
YM
5525
5526 * unexmacosx.c: Define LC_DATA_IN_CODE if not defined.
5527 (print_load_command_name): Add case LC_DATA_IN_CODE.
5528 (dump_it) [LC_DATA_IN_CODE]: Call copy_linkedit_data.
5529
acfa068f 55302012-09-21 Glenn Morris <rgm@gnu.org>
1e9bbf47
GM
5531
5532 * eval.c (Frun_hook_with_args_until_success)
5533 (Frun_hook_with_args_until_failure): Doc fixes. (Bug#12393)
5534
acfa068f 55352012-09-21 Andreas Schwab <schwab@linux-m68k.org>
c6ba4138
AS
5536
5537 * fileio.c (Ffile_selinux_context): Only call freecon when
5538 lgetfilecon succeeded.
5539 (Fset_file_selinux_context): Likewise. (Bug#12444)
5540
acfa068f 55412012-09-21 Eli Zaretskii <eliz@gnu.org>
aa36e4d2
EZ
5542
5543 * xdisp.c (try_window_reusing_current_matrix): Under bidi
5544 reordering, locate the cursor by calling set_cursor_from_row; if
5545 that fails, clear the desired glyph matrix before returning a
5546 failure indication to the caller. Fixes leaving garbled display
5547 when fast scrolling with a down-key. (Bug#12403)
f2016bea
EZ
5548 (compute_stop_pos_backwards): Fix a typo that caused crashes while
5549 scrolling through multibyte text.
aa36e4d2 5550
e99f70c8
SM
55512012-09-20 Stefan Monnier <monnier@iro.umontreal.ca>
5552
5553 * alloc.c (mark_object) <PVEC_WINDOW>: Mark prev/next_buffers *after*
5554 calling mark_vectorlike since that's the one that marks the window.
5555 (mark_discard_killed_buffers): Mark the final cdr.
5556 * window.h (struct window): Move prev/next_buffers to the
5557 non-standard fields.
5558 * window.c (make_window): Initialize prev/next_buffers manually.
5559
f75beb47
PE
55602012-09-20 Paul Eggert <eggert@cs.ucla.edu>
5561
5562 Omit unused arg EXPECTED from socket hooks.
5563 * keyboard.c (gobble_input, read_avail_input, tty_read_avail_input):
5564 * nsterm.m (ns_term_init):
5565 * termhooks.h (struct terminal.read_socket_hook):
5566 * w32inevt.c (w32_console_read_socket):
5567 * w32term.c (w32_read_socket):
5568 * xterm.c (XTread_socket):
5569 Omit unused arg EXPECTED. All callers changed.
5570 (store_user_signal_events): Return void, not int, since callers no
5571 longer care about the return value. All uses changed.
5572
b019b76a
JB
55732012-09-20 Juanma Barranquero <lekktu@gmail.com>
5574
5575 * w32gui.h (XParseGeometry): Do not declare.
5576
05642592
PE
55772012-09-19 Paul Eggert <eggert@cs.ucla.edu>
5578
e4bce92a 5579 * w32inevt.c (w32_console_read_socket): Return -1 on failure, not 0.
1f9f395d 5580 Ignore 'expected'. See Eli Zaretskii in
e4bce92a
PE
5581 <http://bugs.gnu.org/12471#8> (last line).
5582
05642592
PE
5583 * frame.c (read_integer): Remove. All uses replaced by strtol/strtoul.
5584 (XParseGeometry): Now static. Substitute extremal values for
5585 values that are out of range.
5586
e543ae91
JD
55872012-09-19 Jan Djärv <jan.h.d@swipnet.se>
5588
5589 * w32xfns.c (read_integer, XParseGeometry): Move to frame.c.
5590
5591 * nsfns.m (XParseGeometry): Remove.
5592 (Fx_create_frame): Call x_set_offset to correctly interpret
5593 top_pos in geometry.
5594
3a880af4 5595 * frame.c (read_integer, XParseGeometry): Move from w32xfns.c.
e543ae91
JD
5596 (Fx_parse_geometry): If there is a space in string, call
5597 Qns_parse_geometry, otherwise do as on other terms (Bug#12368).
5598
45ba16c7
EZ
55992012-09-17 Eli Zaretskii <eliz@gnu.org>
5600
c8b9f1bc
EZ
5601 * search.c (scan_buffer): Use character positions in calls to
5602 region_cache_forward and region_cache_backward, not byte
5603 positions. (Bug#12196)
5604
b4c932a2
EZ
5605 * w32term.c (w32_read_socket): Set pending_signals to 1, like
5606 xterm.c does. Reported by Daniel Colascione <dancol@dancol.org>.
5607
45ba16c7
EZ
5608 * ralloc.c (r_alloc_init) [!SYSTEM_MALLOC]: Initialize
5609 __malloc_extra_blocks to 32 instead of 64, like alloc.c did in
5610 emacs_blocked_malloc, now deleted.
5611
eeceac93
PE
56122012-09-17 Paul Eggert <eggert@cs.ucla.edu>
5613
5614 Remove no-longer-needed Solaris 2.4 vfork bug workaround.
5615 The workaround was for improving performance on Solaris 2.4, but
5616 is getting in the way now. Emacs will still work if someone is
5617 still running Solaris 2.4 in a museum somewhere; Sun dropped
5618 support for Solaris 2.4 in 2003.
5619 * callproc.c (Fcall_process) [HAVE_WORKING_VFORK]:
5620 * process.c (create_process) [HAVE_WORKING_VFORK]:
5621 Omit now-unnecessary workaround for the Solaris 2.4 vfork bug,
5622 since Emacs no longer uses vfork on that platform.
5623
78f83752
GM
56242012-09-17 Glenn Morris <rgm@gnu.org>
5625
5626 * emacs.c: Use COPYRIGHT.
5627
634b8cac
PE
56282012-09-16 Paul Eggert <eggert@cs.ucla.edu>
5629
0caaedb1
PE
5630 Remove configure's --without-sync-input option (Bug#12450).
5631 When auditing signal-handling in preparation for cleaning it up,
5632 I found that SYNC_INPUT has race conditions and would be a real
5633 pain to fix. Since it's an undocumented and deprecated
5634 configure-time option, now seems like a good time to remove it.
5635 Also see <http://bugs.gnu.org/11080#16>.
5636 * alloc.c (_bytes_used, __malloc_extra_blocks, _malloc_internal)
5637 (_free_internal) [!DOUG_LEA_MALLOC]: Remove decls.
5638 (alloc_mutex) [!SYSTEM_MALLOC && !SYNC_INPUT && HAVE_PTHREAD]:
5639 (malloc_hysteresis):
5640 (check_depth) [XMALLOC_OVERRUN_CHECK]:
5641 (MALLOC_BLOCK_INPUT, MALLOC_UNBLOCK_INPUT):
5642 (__malloc_hook, __realloc_hook, __free_hook, BYTES_USED)
5643 (dont_register_blocks, bytes_used_when_reconsidered)
5644 (bytes_used_when_full, emacs_blocked_free, emacs_blocked_malloc)
5645 (emacs_blocked_realloc, reset_malloc_hooks, uninterrupt_malloc):
5646 [!SYSTEM_MALLOC && !SYNC_INPUT]:
1f9f395d 5647 Remove. All uses removed.
0caaedb1
PE
5648 (MALLOC_BLOCK_INPUT, MALLOC_UNBLOCK_INPUT): Use a different
5649 implementation, one that depends on whether the new macro
5650 XMALLOC_BLOCK_INPUT_CHECK is defined, not on whether SYNC_INPUT
5651 is defined.
5652 * atimer.c (run_timers, handle_alarm_signal):
5653 * keyboard.c (pending_signal, poll_for_input_1, poll_for_input)
5654 (handle_async_input, process_pending_signals)
5655 (handle_input_available_signal, init_keyboard):
5656 * nsterm.m (ns_read_socket):
5657 * process.c (wait_reading_process_output):
5658 * regex.c (immediate_quit, IMMEDIATE_QUIT_CHECK):
5659 * sysdep.c (emacs_sigaction_init) [SA_RESTART]:
5660 (emacs_write):
5661 * xterm.c (XTread_socket):
5662 Assume SYNC_INPUT.
5663 * conf_post.h (SA_RESTART) [IRIX6_5]: Do not #undef.
5664 * eval.c (handling_signal): Remove. All uses removed.
5665 * lisp.h (ELSE_PENDING_SIGNALS): Remove.
5666 All uses replaced with the SYNC_INPUT version.
5667 (reset_malloc_hooks, uninterrupt_malloc, handling_signal):
5668 Remove decls.
5669 * sysdep.c, syssignal.h (main_thread) [FORWARD_SIGNAL_TO_MAIN_THREAD]:
5670 Now static.
5671
634b8cac
PE
5672 * font.c (Ffont_shape_gstring): Remove unused local.
5673
83da1b55
GM
56742012-09-16 Glenn Morris <rgm@gnu.org>
5675
518650a5
GM
5676 * Makefile.in (clean): No longer run nextstep's clean.
5677
83da1b55
GM
5678 * Makefile.in (ns_appdir, ns_appbindir, ns_appsrc): Remove variables.
5679 (ns_frag): Remove.
5680 (ns-app): Move here from ns.mk, and simplify.
5681 (clean): Simplify nextstep entry.
5682 * ns.mk: Remove file.
5683
85a43e2e
KH
56842012-09-17 Kenichi Handa <handa@gnu.org>
5685
5686 * font.c (Ffont_shape_gstring): Fix previous change; GLYPHs may
5687 not covert the last few charactes.
5688
ba13e616 56892012-09-16 Kenichi Handa <handa@gnu.org>
ea964864
KH
5690
5691 * font.c (Ffont_shape_gstring): Don't adjust grapheme cluster
5692 here, but just check the validity of glyphs in the glyph-string.
5693
a8c729af
MR
56942012-09-16 Martin Rudalics <rudalics@gmx.at>
5695
3a880af4
SM
5696 * window.c (Fwindow_parameter, Fset_window_parameter):
5697 Accept any window as argument (Bug#12452).
a8c729af 5698
c077c059
JD
56992012-09-16 Jan Djärv <jan.h.d@swipnet.se>
5700
5701 * nsfns.m (Fx_open_connection): Move initialization of ns_*_types
5702 to ns_term_init to avoid memory leak.
5703
5704 * nsterm.m (ns_update_begin): Initialize bp after lcokFocus, use
5705 explicit retain/release.
5706 (ns_term_init): Only allow one display. Initialize outerpool and
5707 ns_*_types.
5708
39a57ad0
PE
57092012-09-15 Paul Eggert <eggert@cs.ucla.edu>
5710
5711 Port _setjmp fix to POSIXish hosts as well as Microsoft.
5712 * image.c (_setjmp) [!HAVE__SETJMP]: Restore definition, as
5713 it's needed on POSIXish hosts that lack _setjmp. Attempt to solve
5714 the Microsoft problem in a different way, by altering ../nt/config.nt.
5715
7105c8cb
EZ
57162012-09-15 Eli Zaretskii <eliz@gnu.org>
5717
5718 * w32xfns.c:
5719 * w32uniscribe.c:
5720 * w32term.c:
5721 * w32select.c:
5722 * w32reg.c:
5723 * w32proc.c:
5724 * w32menu.c:
5725 * w32inevt.c:
5726 * w32heap.c:
5727 * w32font.c:
5728 * w32fns.c:
5729 * w32console.c:
5730 * w32.c:
5731 * w16select.c: Remove inclusion of setjmp.h, as it is now included
5732 by lisp.h. This completes removal of setjmp.h inclusion
5733 erroneously announced in the previous commit. (Bug#12446)
5734
5735 * lisp.h [!HAVE__SETJMP, !HAVE_SIGSETJMP]: Make the commentary
5736 more accurate.
5737
5738 * image.c (_setjmp) [!HAVE__SETJMP]: Define only if 'setjmp' is
5739 not defined as a macro. The latter happens on MS-Windows.
5740 (Bug#12446)
5741
0328b6de
PE
57422012-09-15 Paul Eggert <eggert@cs.ucla.edu>
5743
5744 Port better to POSIX hosts lacking _setjmp (Bug#12446).
5745 * lisp.h: Include <setjmp.h> here, since we use its symbols here.
7105c8cb 5746 Some instances of '#include <setjmp.h>' removed, if the
0328b6de
PE
5747 only reason for the instance was because "lisp.h" was included.
5748 (sys_jmp_buf, sys_setjmp, sys_longjmp): New symbols.
5749 Unless otherwise specified, replace all uses of jmp_buf, _setjmp,
5750 and _longjmp with the new symbols. Emacs already uses _setjmp if
5751 available, so this change affects only POSIXish hosts that have
5752 sigsetjmp but not _setjmp, such as some versions of Solaris and
5753 Unixware. (Also, POSIX-2008 marks _setjmp as obsolescent.)
5754 * image.c (_setjmp, _longjmp) [HAVE_PNG && !HAVE__SETJMP]: New macros.
5755 (png_load_body) [HAVE_PNG]:
5756 (PNG_LONGJMP) [HAVE_PNG && PNG_LIBPNG_VER < 10500]:
5757 (PNG_JMPBUF) [HAVE_PNG && PNG_LIBPNG_VER >= 10500]:
5758 Use _setjmp and _longjmp rather than sys_setjmp and sys_longjmp,
5759 since PNG requires jmp_buf. This is the only exception to the
5760 general rule that we now use sys_setjmp and sys_longjmp.
5761 This exception is OK since this code does not change the signal
5762 mask or longjmp out of a signal handler.
5763
2af03429
PE
57642012-09-14 Paul Eggert <eggert@cs.ucla.edu>
5765
5766 * alloc.c [!SYSTEM_MALLOC && !SYNC_INPUT && HAVE_PTHREAD]:
5767 Include "syssignal.h", for 'main_thread'.
5768
2f294edf
DA
57692012-09-14 Dmitry Antipov <dmantipov@yandex.ru>
5770
5771 Avoid out-of-range marker position (Bug#12426).
3a880af4
SM
5772 * insdel.c (replace_range, replace_range_2):
5773 Adjust markers before overlays, as suggested by comments.
2f294edf
DA
5774 (insert_1_both, insert_from_buffer_1, adjust_after_replace):
5775 Remove redundant check before calling offset_intervals.
5776
6b533e9c
MR
57772012-09-14 Martin Rudalics <rudalics@gmx.at>
5778
5779 * xdisp.c (Fformat_mode_line): Unconditionally save/restore
5780 current buffer (Bug#12387).
5781
2a7931e3
JB
57822012-09-14 Juanma Barranquero <lekktu@gmail.com>
5783
5784 * makefile.w32-in ($(BLD)/alloc.$(O)): Update dependencies.
5785
c18e885b
PE
57862012-09-13 Paul Eggert <eggert@cs.ucla.edu>
5787
5788 Use a more backwards-compatible timer format (Bug#12430).
5789 * keyboard.c (decode_timer): Get PSECS from the 8th (origin-0)
5790 vector element, not from the 4th, since PSECS is now at the end.
5791 (Fcurrent_idle_time): Doc fix.
5792
d59a1afb
DA
57932012-09-13 Dmitry Antipov <dmantipov@yandex.ru>
5794
5795 Function to mark objects and remove killed buffers at once.
5796 * alloc.c (discard_killed_buffers): Rename to ...
5797 (mark_discard_killed buffers) ... new name. Add marking
5798 of remaining objects. Fix comment. Adjust users.
5799 (mark_object): Do not touch frame buffer lists here.
5800 * frame.c (delete_frame): Reset frame buffer lists here.
5801
5f0cb45a
PE
58022012-09-13 Paul Eggert <eggert@cs.ucla.edu>
5803
8ea47e3a
PE
5804 Better workaround for GNOME bug when --enable-gcc-warnings.
5805 * emacsgtkfixed.c (G_STATIC_ASSERT): Remove, undoing last change.
5806 Instead, disable -Wunused-local-typedefs. See Dmitry Antipov in
5807 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00335.html>.
5808
4a4bbad2
PE
5809 Simplify SIGIO usage (Bug#12408).
5810 The code that dealt with SIGIO was crufty and confusing, e.g., it
5811 played tricks like "#undef SIGIO" but these tricks were not used
5812 consistently. Simplify mostly by not #undeffing standard symbols,
5813 e.g., use "defined USABLE_SIGIO" (our symbol, which we can define
5814 or not as we please) rather than "defined SIGIO" (standard symbol
5815 that we probably shouldn't #undef).
5816 * conf_post.h [USG5_4]: Do not include <sys/wait.h> here.
5817 Modules that need it can include it.
5818 [USG5_4 && emacs]: Likewise, do not include the streams stuff here.
5819 * dispextern.h (ignore_sigio): New decl.
5820 * emacs.c (shut_down_emacs): Invoke unrequest_sigio
5821 unconditionally, since it's now a no-op if !USABLE_SIGIO.
5822 * emacs.c (shut_down_emacs):
5823 * keyboard.c (kbd_buffer_store_event_hold):
5824 Use ignore_sigio rather than invoking 'signal' directly.
5825 * keyboard.c (USABLE_FIONREAD && USG5_4): Include <sys/filio.h>,
5826 for FIONREAD.
5827 (FIONREAD, SIGIO): Do not #undef.
5828 (tty_read_avail_input): Use #error rather than a syntax error.
5829 * process.c [USG5_4]: Include <sys/stream.h> and <sys/stropts.h>,
5830 for I_PIPE, used by SETUP_SLAVE_PTY.
5831 (DATAGRAM_SOCKETS): Simplify defn, based on USABLE_FIONREAD.
5832 * sysdep.c (croak): Remove; no longer needed. This bit of
5833 temporary code, with Fred N. Fish's comment that it's temporary,
5834 has been in Emacs since at least 1992!
5835 (init_sigio, reset_sigio, request_sigio, unrequest_sigio):
5836 Arrange for them to be no-ops in all cases when ! USABLE_SIGIO.
5837 * syssignal.h (croak): Remove decl.
5838 (SIGIO, SIGPOO, SIGAIO, SIGPTY): Do not #undef; that's too fragile.
5839 * systty.h [!NO_TERMIO]: Do not include <termio.h>; no longer needed
5840 now that we're termios-only.
5841 (FIONREAD, ASYNC) [BROKEN_FIONREAD]: Do not #undef.
5842 * term.c (dissociate_if_controlling_tty): Use #error rather than
5843 a run-time error.
5844
5f0cb45a
PE
5845 Work around GCC and GNOME bugs when --enable-gcc-warnings.
5846 * emacsgtkfixed.c (G_STATIC_ASSERT): Redefine to use 'verify',
5847 to work around GNOME bug 683906.
5848 * image.c (jpeg_load_body) [HAVE_JPEG && lint]: Pacify gcc -Wclobber.
5849 (struct my_jpeg_error_mgr) [HAVE_JPEG && lint]: New member fp.
5850 This works around GCC bug 54561.
5851
40bce90b
PE
58522012-09-12 Paul Eggert <eggert@cs.ucla.edu>
5853
5854 More fixes for 'volatile' and setjmp/longjmp.
5855 * eval.c (Fdefvar, Fcondition_case): Remove unnecessary 'volatile's.
5856 * image.c (struct png_load_context) [HAVE_PNG]: New type.
5857 (png_load_body) [HAVE_PNG]:
5858 (jpeg_load_body) [HAVE_JPEG]:
5859 New function, with most of the old parent function's body.
5860 (png_load) [HAVE_PNG]:
5861 (jpeg_load) [HAVE_JPEG]:
5862 Invoke the new function, to avoid longjmp munging our locals.
5863 (struct my_jpeg_error_mgr) [HAVE_JPEG]: New members cinfo, failure_code.
5864 (my_error_exit) [HAVE_JPEG]: Don't trust 'setjmp' to return 2 when
5865 longjmp is passed 2, as the C standard doesn't guarantee this.
5866 Instead, store the failure code into mgr->failure_code.
5867
bfeae2cf
SM
58682012-09-12 Stefan Monnier <monnier@iro.umontreal.ca>
5869
5870 * keyboard.c (read_char, requeued_events_pending_p, Finput_pending_p)
5871 (Fdiscard_input, quit_throw_to_read_char, init_keyboard)
5872 (syms_of_keyboard): Remove support for unread-command-char.
5873
8099e36b
EZ
58742012-09-12 Eli Zaretskii <eliz@gnu.org>
5875
5876 * w32proc.c (sys_kill): If PID is our process ID and the signal is
5877 SIGABRT, call emacs_abort. Avoids silently exiting upon assertion
5878 violation. (Bug#12426)
5879
92547ff9
PE
58802012-09-12 Paul Eggert <eggert@cs.ucla.edu>
5881
5882 * image.c (jpeg_memory_src): Don't assume string len fits in unsigned.
5883
45b82ad0
SM
58842012-09-12 Stefan Monnier <monnier@iro.umontreal.ca>
5885
5886 * eval.c: Add `inhibit-debugger'.
5887 (Qinhibit_debugger): New symbol.
5888 (call_debugger): Bind it instead of Qdebug_on_error.
5889 (maybe_call_debugger): Test Vinhibit_debugger.
5890 (syms_of_eval): Define inhibit-debugger.
5891 * xdisp.c (set_message): Don't bind Qinhibit_debug_on_message.
5892 (syms_of_xdisp): Remove inhibit-debug-on-message.
5893
5779a1dc
PE
58942012-09-11 Paul Eggert <eggert@cs.ucla.edu>
5895
50f2e553
PE
5896 Avoid _setjmp/_longjmp problems with local nonvolatile variables.
5897 If a nonvolatile local variable is written before a _longjmp to
5898 the frame containing the variable, and is read after the _longjmp,
5899 the value read is indeterminate. Some local variables of type
5900 'struct handler' and 'struct catchtag' are used in this way, so
5901 mark each of their slots as volatile if the slot can be set before
5902 _longjmp and read afterwards.
5903 * lisp.h (struct handler): var and chosen_clause are now volatile.
5904 (struct catchtag): val, next, and pdlcount are now volatile.
5905
ae1d87e2
PE
5906 * bidi.c (bidi_push_it, bidi_pop_it):
5907 * fns.c (copy_hash_table):
5908 * image.c (define_image_type):
5909 * keyboard.c (kbd_buffer_store_event_hold):
5910 * process.c (Fprocess_send_eof):
5911 * xfaces.c (x_create_gc) [HAVE_NS]:
5912 * xgselect.c (xg_select):
5913 Prefer assignment to memcpy when either will do.
5914
5779a1dc
PE
5915 * alloc.c (discard_killed_buffers): Tune and simplify a bit.
5916 Use pointer-to-a-pointer to simplify and avoid a NILP check each
5917 time an item is removed. No need to mark this function 'inline';
5918 the compiler knows better than we do.
5919
c4c9756b
JD
59202012-09-11 Jan Djärv <jan.h.d@swipnet.se>
5921
5922 * nsterm.m (ns_judge_scroll_bars): Pass NO to updateFrameSize.
5923 (updateFrameSize:): Add delay parameter to updateFrameSize, send it
5924 to change_frame_size (Bug#12388).
5925 (windowDidResize:): Pass YES to updateFrameSize.
5926
5927 * nsterm.h: Add delay parameter to updateFrameSize.
5928
d73e321c
DA
59292012-09-11 Dmitry Antipov <dmantipov@yandex.ru>
5930
5931 Discard killed buffers from deleted window and frame objects.
5932 This reduces an amount of references to killed buffers and
5933 helps GC to reclaim them faster.
5934 * alloc.c (discard_killed_buffers): New function.
5935 (mark_object): Use it for deleted windows and frames.
5936 (mark_object): If symbol's value is set up for a killed buffer
1f9f395d 5937 or deleted frame, restore its global binding.
d73e321c
DA
5938 * data.c (swap_in_global_binding): Add GC notice.
5939 (swap_in_symval_forwarding): Use convenient set_blv_where.
5940 * window.c (wset_next_buffers, wset_prev_buffers): Move ...
5941 * window.h: ... to here.
5942
e578f381
DA
59432012-09-11 Dmitry Antipov <dmantipov@yandex.ru>
5944
5945 Convenient macro to check whether the buffer is live.
5946 * buffer.h (BUFFER_LIVE_P): New macro.
5947 * alloc.c, buffer.c, editfns.c, insdel.c, lread.c, marker.c:
5948 * minibuf.c, print.c, process.c, window.c, xdisp.c: Use it.
5949
3057e615
YM
59502012-09-11 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
5951
5952 * xdisp.c (right_overwritten, right_overwriting): Also handle gstring
5953 composition cases (Bug#12364).
5954
5955 * xterm.c (x_draw_glyph_string): Avoid overwriting inverted left
5956 overhang of succeeding glyphs overlapping box cursor.
5957
5958 * w32term.c (x_draw_glyph_string): Likewise.
5959
6fda35f2
PE
59602012-09-11 Paul Eggert <eggert@cs.ucla.edu>
5961
c990426a
PE
5962 Simplify, document, and port floating-point (Bug#12381).
5963 The porting part of this patch fixes bugs on non-IEEE platforms
5964 with frexp, ldexp, logb.
5965 * data.c, lisp.h (Qdomain_error, Qsingularity_error, Qunderflow_error):
5966 Now static.
5967 * floatfns.c: Simplify discussion of functions that Emacs doesn't
5968 support, by removing commented-out code and briefly listing the
5969 C89 functions excluded. The commented-out stuff was confusing
5970 maintenance, e.g., we thought we needed cbrt but it was commented out.
5971 (logb): Remove decl; no longer needed.
5972 (isfinite): New macro, if not already supplied.
5973 (isnan): Don't replace any existing macro.
5974 (Ffrexp, Fldexp): Define even if !HAVE_COPYSIGN, as frexp and ldexp
5975 are present on all C89 platforms.
5976 (Ffrexp): Do not special-case zero, as frexp does the right thing
5977 for that case.
5978 (Flogb): Do not use logb, as it doesn't have the desired meaning
5979 on hosts that use non-base-2 floating point. Instead, stick with
5980 frexp, which is C89 anyway. Do not pass an infinity or a NaN to
5981 frexp, to avoid getting an unspecified result.
5982
6fda35f2
PE
5983 * xdisp.c (Qinhibit_debug_on_message): Now static.
5984
16130a58
JD
59852012-09-10 Jan Djärv <jan.h.d@swipnet.se>
5986
5987 * nsterm.m (ns_update_begin): Set clip path to whole view by using
5988 NSBezierPath (Bug#12131).
5989
d105a573
CY
59902012-09-10 Chong Yidong <cyd@gnu.org>
5991
5992 * fns.c (Fdelq, Fdelete): Doc fix.
5993
ff55dfe8
PE
59942012-09-10 Paul Eggert <eggert@cs.ucla.edu>
5995
5996 * lisp.h (XSETINT, XSETCONS, XSETVECTOR, XSETSTRING, XSETSYMBOL)
5997 (XSETFLOAT, XSETMISC): Parenthesize macro bodies.
5998
e7032e7c
SM
59992012-09-09 Stefan Monnier <monnier@iro.umontreal.ca>
6000
6001 * lisp.h (make_lisp_ptr): New macro to replace XSET.
6002 (XSETCONS, XSETVECTOR, XSETSTRING, XSETSYMBOL, XSETFLOAT, XSETMISC):
6003 Use it.
6004
e9957956
EZ
60052012-09-09 Eli Zaretskii <eliz@gnu.org>
6006
aba05ce9
EZ
6007 * fringe.c (draw_fringe_bitmap_1): Don't reduce the width of the
6008 left fringe if the window has a left margin. This avoids leaving
6009 traces of the cursor because its leftmost pixel is not drawn over.
6010
e9957956
EZ
6011 * dispnew.c (update_window_line): When the left margin area of a
6012 screen line is updated, set the redraw_fringe_bitmaps_p flag of
6013 that screen line. (Bug#12277)
6014
f6196b87
PE
60152012-09-09 Paul Eggert <eggert@cs.ucla.edu>
6016
6017 Assume C89 or later for math functions (Bug#12381).
6018 This simplifies the code, and makes it a bit smaller and faster,
6019 and (most important) makes it easier to clean up signal handling
6020 since we can stop worring about floating-point exceptions in
6021 library code. That was a problem before C89, but the problem
6022 went away many years ago on all practical Emacs targets.
6023 * data.c, image.c, lread.c, print.c:
6024 Don't include <math.h>; no longer needed.
6025 * data.c, floatfns.c (IEEE_FLOATING_POINT): Don't worry that it
6026 might be autoconfigured, as that never happens.
6027 * data.c (fmod):
6028 * doprnt.c (DBL_MAX_10_EXP):
6029 * print.c (DBL_DIG):
6030 Remove. C89 or later always defines these.
6031 * floatfns.c (HAVE_MATHERR, FLOAT_CHECK_ERRNO, FLOAT_CHECK_DOMAIN)
6032 (in_float, float_error_arg, float_error_arg2, float_error_fn_name)
6033 (arith_error, domain_error, domain_error2):
6034 Remove all this pre-C89 cruft. Do not include <errno.h> as that's
6035 no longer needed -- we simply return what C returns. All uses removed.
6036 (IN_FLOAT, IN_FLOAT2): Remove. All uses replaced with
6037 the wrapped code.
6038 (FLOAT_TO_INT, FLOAT_TO_INT2, range_error, range_error2):
6039 Remove. All uses expanded, as these macros are no longer used
6040 more than once and are now more trouble than they're worth.
6041 (Ftan): Use tan, not sin / cos.
6042 (Flogb): Assume C89 frexp.
6043 (fmod_float): Assume C89 fmod.
6044 (matherr) [HAVE_MATHERR]: Remove; no longer needed.
6045 (init_floatfns): Remove. All uses removed.
6046
9d7f1863
JD
60472012-09-08 Jan Djärv <jan.h.d@swipnet.se>
6048
6049 * nsterm.m (ns_draw_fringe_bitmap, ns_dumpglyphs_image): Take back
6050 compositeToPoint for OSX < 10.6 (Bug#12390).
6051
eabf0404
PE
60522012-09-08 Paul Eggert <eggert@cs.ucla.edu>
6053
6054 * floatfns.c (Ftan): Use tan (x), not (sin (x) / cos (x)).
6055 This produces more-accurate results.
6056
0b3b1d23
JD
60572012-09-08 Jan Djärv <jan.h.d@swipnet.se>
6058
6059 * nsterm.m (updateFrameSize): Call setFrame: on the view when size
6060 changes (Bug#12088).
6061
6dcef6ec
CY
60622012-09-08 Chong Yidong <cyd@gnu.org>
6063
6064 * syntax.c (Fstring_to_syntax): Doc fix.
6065
aa7d57c5
JD
60662012-09-08 Jan Djärv <jan.h.d@swipnet.se>
6067
6068 * nsterm.m (ns_clip_to_row): Remove code that deals with drawing fringe
6069 in the internal border.
6070 (x_set_window_size): Remove static variables and their usage.
6071 (ns_redraw_scroll_bars): Fix NSTRACE arg.
3a880af4
SM
6072 (ns_after_update_window_line, ns_draw_fringe_bitmap):
6073 Remove fringe/internal border adjustment (Bug#11052).
aa7d57c5
JD
6074 (ns_draw_fringe_bitmap): Make code more like other terms (xterm.c).
6075 (ns_draw_window_cursor): Remove fringe/internal border adjustment.
6076 (ns_fix_rect_ibw): Remove.
6077 (ns_get_glyph_string_clip_rect): Remove call to ns_fix_rect_ibw.
6078 (ns_dumpglyphs_box_or_relief): Ditto.
6079 (ns_maybe_dumpglyphs_background): Remove fringe/internal border
6080 adjustment.
6081 (ns_dumpglyphs_image): Ditto.
fc0c31f8 6082 (ns_dumpglyphs_stretch): Fix coding style. Remove fringe/internal
aa7d57c5
JD
6083 border adjustment.
6084 (ns_set_vertical_scroll_bar): Remove variables barOnVeryLeft/Right and
6085 their usage. Add fringe_extended_p and its use as in other terms.
6086 (ns_judge_scroll_bars): Code style fix. Call updateFrameSize if
6087 scroll bar was removed.
6088 (updateFrameSize): New function.
6089 (windowDidResize): Move code to updateFrameSize and call it.
6090
6091 * nsterm.h (EmacsView): Add updateFrameSize.
6092
1a5432bc
CY
60932012-09-07 Chong Yidong <cyd@gnu.org>
6094
b4f5313e
CY
6095 * textprop.c (Fget_text_property): Minor doc fix (Bug#12323).
6096
1a5432bc
CY
6097 * data.c (Flocal_variable_if_set_p): Doc fix (Bug#10713).
6098
1a4f1e9b
PE
60992012-09-07 Paul Eggert <eggert@cs.ucla.edu>
6100
6101 More signal-handler cleanup (Bug#12327).
eddb36a7
PE
6102 * emacs.c (main): Convert three 'signal' calls to 'sigaction' calls.
6103 Problem introduced when merging patches. Noted by Eli Zaretskii in
6104 <http://bugs.gnu.org/12327#67>.
1a4f1e9b
PE
6105 * floatfns.c: Comment fix.
6106 * lisp.h (force_auto_save_soon): Declare regardless of SIGDANGER.
6107 SIGDANGER might not be in scope so "#ifdef SIGDANGER" is not right,
6108 and anyway the declaration is harmless even if SIGDANGER is not defined.
6109 * syssignal.h (SIGIO): Also #undef if (! defined FIONREAD ||
6110 defined BROKEN_FIONREAD). systty.h formerly did this, but other
6111 source files not surprisingly expected syssignal.h to define, or
6112 not define, SIGIO, and it's cleaner to do it that way, for consistency.
6113 Include <sys/ioctl.h>, for FIONREAD.
6114 * systty.h (SIGIO): Do not #undef here; it's now syssignal.h's job.
6115 This eliminates a problem whereby other files mysteriously had
6116 to include "syssignal.h" before including "systty.h" if they
6117 wanted to use "#ifdef SIGIO".
6118
bc8000ff
EZ
61192012-09-07 Eli Zaretskii <eliz@gnu.org>
6120
3e6d6928
EZ
6121 * w32proc.c (sigaction): New function, emulates Posix 'sigaction'.
6122
6123 * w32.c (sigemptyset): Empty the set.
6124 (sigsetmask, sigmask, sigblock, sigunblock): Remove unused functions.
6125
bc8000ff
EZ
6126 * alloc.c [ENABLE_CHECKING]: Include signal.h, since we need SIGABRT.
6127
b4fa72f2
DA
61282012-09-07 Dmitry Antipov <dmantipov@yandex.ru>
6129
6130 * alloc.c (mark_buffer): Revert unsafe marking optimization.
6131 (mark_object): Likewise for frame objects.
6132
30730c93
PE
61332012-09-07 Paul Eggert <eggert@cs.ucla.edu>
6134
6135 * syssignal.h (handle_on_main_thread): Always declare,
6136 even if FORWARD_SIGNAL_TO_MAIN_THREAD is not defined.
6137 This ports to platforms without HAVE_PTHREAD.
6138
2fe28299
PE
61392012-09-06 Paul Eggert <eggert@cs.ucla.edu>
6140
6141 Signal-handler cleanup (Bug#12327).
6142 Emacs's signal handlers were written in the old 4.2BSD style with
6143 sigblock and sigmask and so forth, and this led to some
6144 inefficiencies and confusion. Rewrite these to use
6145 pthread_sigmask etc. without copying signal sets around. Also,
6146 get rid of the confusing macros 'SIGNAL_THREAD_CHECK' and
6147 'signal', and instead use functions that do not attempt to take
6148 over the system name space. This patch causes Emacs's text
6149 segment to shrink by 0.7% on my platform, Fedora 17 x86-64.
6150 * alloc.c, emacsgtkfixed.c, nsfns.m, widget.c, xmenu.c:
6151 Do not include <signal.h> or "syssignal.h", as these
6152 modules do not use signals.
6153 * atimer.c, callproc.c, data.c, dispnew.c, emacs.c, floatfns.c:
6154 * gtkutil.c, keyboard.c, process.c, sound.c, sysdep.c, term.c, xterm.c:
6155 Do not include <signal.h>, as "syssignal.h" does that for us now.
6156 * atimer.c (sigmask_atimers): New function.
6157 (block_atimers, unblock_atimers): New functions,
6158 replacing the old macros BLOCK_ATIMERS and UNBLOCK_ATIMERS.
6159 All uses replaced.
6160 * conf_post.h [SIGNAL_H_AHB]: Do not include <signal.h>;
6161 no longer needed here.
6162 * emacs.c (main): Inspect existing signal handler with sigaction,
fc0c31f8 6163 so that there's no need to block and unblock SIGHUP.
2fe28299
PE
6164 * sysdep.c (struct save_signal): New member 'action', replacing
6165 old member 'handler'.
6166 (save_signal_handlers, restore_signal_handlers):
6167 Use sigaction instead of 'signal' to save and restore.
6168 (get_set_sighandler, set_sighandler) [!WINDOWSNT]:
6169 New function. All users of 'signal' modified to use set_sighandler
6170 if they're writeonly, and to use sys_signal if they're read+write.
6171 (emacs_sigaction_init, forwarded_signal): New functions.
6172 (sys_signal): Remove. All uses replaced by calls to sigaction
6173 and emacs_sigaction_init, or by direct calls to 'signal'.
6174 (sys_sigmask) [!__GNUC__]: Remove; no longer needed.
6175 (sys_sigblock, sys_sigunblock, sys_sigsetmask): Remove;
6176 all uses replaced by pthread_sigmask etc. calls.
6177 * syssignal.h: Include <signal.h>.
6178 (emacs_sigaction_init, forwarded_signal): New decls.
6179 (SIGMASKTYPE): Remove. All uses replaced by its definiens, sigset_t.
6180 (SIGEMPTYMASK): Remove; all uses replaced by its definiens, empty_mask.
6181 (sigmask, sys_sigmask): Remove; no longer needed.
6182 (sigpause): Remove. All uses replaced by its definiens, sigsuspend.
6183 (sigblock, sigunblock, sigfree):
6184 (sigsetmask) [!defined sigsetmask]:
6185 Remove. All uses replaced by pthread_sigmask.
6186 (signal): Remove. Its remaining uses (with SIG_DFL and SIG_IGN)
6187 no longer need to be replaced, and its typical old uses
6188 are now done via emacs_sigaction_init and sigaction.
6189 (sys_sigblock, sys_sigunblock, sys_sigsetmask): Remove decls.
6190 (sys_sigdel): Remove; unused.
6191 (NSIG): Remove a FIXME; the code's fine. Remove an unnecessary ifdef.
6192
0216c128
EZ
61932012-09-06 Eli Zaretskii <eliz@gnu.org>
6194
6195 * process.c (CAN_HANDLE_MULTIPLE_CHILDREN): Fix a typo that broke
6196 SIGCHLD handling on systems that don't have WNOHANG. (Bug#12327)
6197
c752cfa9
DA
61982012-09-06 Dmitry Antipov <dmantipov@yandex.ru>
6199
6200 Explicitly mark buffer_defaults and buffer_local_symbols.
6201 * alloc.c (Fgarbage_collect): Mark buffer_defaults and
6202 mark_local_symbols here.
6203 (mark_object): If GC_CHECK_MARKED_OBJECTS, simplify checking
6204 since special buffers aren't marked here any more.
6205 (allocate_buffer): Chain new buffer with all_buffers here...
6206 * buffer.c (Fget_buffer_create, Fmake_indirect_buffer): ...and
6207 not here.
6208 (Vbuffer_defaults, Vbuffer_local_symbols): Remove.
6209 (syms_of_buffer): Remove staticpro of the above.
6210 (init_buffer_once): Set names for buffer_defaults and
6211 buffer_local_symbols.
6212
a864ef14
PE
62132012-09-06 Paul Eggert <eggert@cs.ucla.edu>
6214
6215 Use bool for booleans in font-related modules.
6216 * font.c (font_intern_prop, font_style_to_value)
6217 (font_style_symbolic, font_parse_xlfd, font_parse_fcname)
6218 (generate_otf_features, font_check_otf_features, font_check_otf)
6219 (font_match_p, font_list_entities, font_at):
6220 * fontset.c (fontset_id_valid_p, reorder_font_vector
6221 (fontset_find_font, Fset_fontset_font)
6222 (face_suitable_for_char_p) [0]:
6223 * ftfont.c (fc_initialized, ftfont_get_open_type_spec)
6224 (ftfont_open, ftfont_text_extents, ftfont_check_otf):
6225 (m17n_flt_initialized, ftfont_shape_by_flt):
6226 * ftxfont.c (ftxfont_draw_bitmap, ftxfont_draw):
6227 * nsfont.m (nsfont_draw):
6228 * w32font.c (w32font_draw):
6229 * w32term.c (x_draw_glyphless_glyph_string_foreground):
6230 Use bool for booleans.
6231 * font.h: Adjust to above API changes.
6232 (struct font, struct font_driver, struct font_driver_list):
6233 Use bool for booleans.
6234 (struct font): Remove useless member encoding_type.
6235 All users removed.
6236 * fontset.c, xftfont.c: Omit unnecessary static decls.
6237
0699fc18
DA
62382012-09-06 Dmitry Antipov <dmantipov@yandex.ru>
6239
6240 * alloc.c (mark_object): Revert window marking code
6241 since it's unsafe for the Fset_window_configuration.
6242
20ef56db
PE
62432012-09-05 Paul Eggert <eggert@cs.ucla.edu>
6244
2fe28299 6245 Fix race conditions with signal handlers and errno (Bug#12327).
20ef56db
PE
6246 Be more systematic about preserving errno whenever a signal
6247 handler returns, even if it's not in the main thread. Do this by
6248 renaming signal handlers to distinguish between signal delivery
6249 and signal handling. All uses changed.
6250 * atimer.c (deliver_alarm_signal): Rename from alarm_signal_handler.
6251 * data.c (deliver_arith_signal): Rename from arith_error.
6252 * dispnew.c (deliver_window_change_signal): Rename from
6253 window_change_signal.
6254 * emacs.c (deliver_error_signal): Rename from fatal_error_signal.
6255 (deliver_danger_signal) [SIGDANGER]: Rename from memory_warning_signal.
6256 * keyboard.c (deliver_input_available_signal): Rename from
6257 input_available_signal.
6258 (deliver_user_signal): Rename from handle_user_signal.
6259 (deliver_interrupt_signal): Rename from interrupt_signal.
6260 * process.c (deliver_pipe_signal): Rename from send_process_trap.
6261 (deliver_child_signal): Rename from sigchld_handler.
6262 * atimer.c (handle_alarm_signal):
6263 * data.c (handle_arith_signal):
6264 * dispnew.c (handle_window_change_signal):
6265 * emacs.c (handle_fatal_signal, handle_danger_signal):
6266 * keyboard.c (handle_input_available_signal):
6267 * keyboard.c (handle_user_signal, handle_interrupt_signal):
6268 * process.c (handle_pipe_signal, handle_child_signal):
6269 New functions, with the actual signal-handling code taken from the
6270 original respective signal handlers, sans the sporadic attempts to
6271 preserve errno, since that's now done by handle_on_main_thread.
6272 * atimer.c (alarm_signal_handler): Remove unnecessary decl.
6273 * emacs.c, floatfns.c, lisp.h: Remove unused FLOAT_CATCH_SIGKILL cruft.
6274 * emacs.c (main_thread) [FORWARD_SIGNAL_TO_MAIN_THREAD]:
6275 Move to sysdep.c.
6276 (main) [FORWARD_SIGNAL_TO_MAIN_THREAD]:
6277 Move initialization of main_thread to sysdep.c's init_signals.
6278 * process.c (waitpid) [!WNOHANG]: #define to wait; that's good enough for
6279 our usage, and simplifies the mainline code.
6280 (record_child_status_change): New static function, as a helper
6281 for handle_child_signal, and with most of the old child handler's
6282 contents.
6283 (CAN_HANDLE_MULTIPLE_CHILDREN): New constant.
6284 (handle_child_signal): Use the above.
6285 * sysdep.c (main_thread) [FORWARD_SIGNAL_TO_MAIN_THREAD]:
6286 Moved here from emacs.c.
6287 (init_signals) [FORWARD_SIGNAL_TO_MAIN_THREAD]: Initialize it;
6288 code moved here from emacs.c's main function.
6289 * sysdep.c, syssignal.h (handle_on_main_thread): New function,
3a880af4
SM
6290 replacing the old SIGNAL_THREAD_CHECK. All uses changed.
6291 This lets callers save and restore errno properly.
20ef56db 6292
e3ccf108
DA
62932012-09-05 Dmitry Antipov <dmantipov@yandex.ru>
6294
6295 Remove redundant or unused things here and there.
6296 * lisp.h (CYCLE_CHECK, CHAR_TABLE_TRANSLATE): Remove.
6297 * conf_post.h (RE_TRANSLATE): Use char_table_translate.
6298 * editfns.c (Fcompare_buffer_substrings): Likewise.
6299 * frame.h (struct terminal, struct font_driver_list):
6300 Remove redundant declarations.
6301 * window.h (Qleft, Qright): Likewise.
6302
697e1e39
DA
63032012-09-05 Dmitry Antipov <dmantipov@yandex.ru>
6304
6305 Do not mark objects from deleted buffers, windows and frames.
6306 * alloc.c (mark_buffer): Mark just the buffer if it is dead.
6307 (mark_object): Likewise for windows and frames.
6308
c1ca42ca
DA
63092012-09-05 Dmitry Antipov <dmantipov@yandex.ru>
6310
6311 * alloc.c (valid_lisp_object_p): Treat killed buffers,
6312 buffer_defaults and buffer_local_symbols as valid objects.
6313 Return special value to denote them.
6314
014d93be
PE
63152012-09-05 Paul Eggert <eggert@cs.ucla.edu>
6316
f75d7a91
PE
6317 * fileio.c, filelock.c, floatfns.c, fns.c: Use bool for boolean.
6318 * fileio.c (auto_saving, auto_save_error_occurred, make_temp_name)
6319 (Fexpand_file_name, barf_or_query_if_file_exists, Fcopy_file)
6320 (file_name_absolute_p, Fsubstitute_in_file_name):
6321 (check_executable, check_writable, Ffile_accessible_directory_p)
6322 (Fset_file_selinux_context, Fdefault_file_modes)
6323 (Finsert_file_contents, choose_write_coding_system)
6324 (Fwrite_region, build_annotations, a_write, e_write)
6325 (Fdo_auto_save):
6326 * filelock.c (boot_time_initialized, get_boot_time)
6327 (get_boot_time_1, lock_file_1, within_one_second):
6328 * floatfns.c (in_float):
6329 * fns.c (concat, internal_equal, Frequire, base64_encode_1)
6330 (base64_decode_1, cmpfn_eql, cmpfn_user_defined)
6331 (sweep_weak_table, sweep_weak_hash_tables, secure_hash):
6332 * lisp.h (struct Lisp_Hash_Table.cmpfn):
6333 * window.c (compare_window_configurations):
6334 Use bool for booleans.
6335 * fileio.c (auto_saving_dir_umask, auto_saving_mode_bits)
6336 (Fdefault_file_modes): Now mode_t, not int, for modes.
6337 (Fdo_auto_save): Set a boolean to 1 rather than using ++.
6338 (internal_delete_file): Now returns void, not a (boolean) int,
6339 since nobody was looking at the return value.
6340 * lisp.h, window.h: Adjust to above API changes.
6341
014d93be
PE
6342 * xdisp.c (set_message): Simplify and reindent last change.
6343
776f29e1
JB
63442012-09-05 Juanma Barranquero <lekktu@gmail.com>
6345
6346 * makefile.w32-in ($(BLD)/sysdep.$(O)): Update dependencies.
6347
7f7e0167
LI
63482012-09-04 Lars Ingebrigtsen <larsi@gnus.org>
6349
6350 * eval.c (call_debugger): Make the function non-static so that we
6351 can call it from set_message.
6352
6353 * xdisp.c (set_message): Implement the new variable `debug-on-message'.
6354 (syms_of_xdisp): Defvar it and `inhibit-debug-on-message'.
6355
cf29dd84
PE
63562012-09-04 Paul Eggert <eggert@cs.ucla.edu>
6357
6358 Give more-useful info on a fatal error (Bug#12328).
6359 * alloc.c [ENABLE_CHECKING]: Do not include <execinfo.h>.
6360 (die) [ENABLE_CHECKING]: Call fatal_error_backtrace instead
6361 of doing the work ourselves.
6362 * emacs.c (fatal_error_signal): Let fatal_error_backtrace
6363 do most of the work.
6364 (fatal_error_backtrace): New function, taken from the guts
6365 of the old fatal_error_signal, but with a new option to output
6366 a backtrace.
6367 (shut_down_emacs) [!DOS_NT]: Use strsignal to give more-useful
6368 info about the signal than just its number.
6369 * lisp.h (fatal_error_backtrace, emacs_backtrace): New decls.
6370 * sysdep.c: Include <execinfo.h>
6371 (emacs_backtrace): New function, taken partly from the previous
6372 code of the 'die' function.
6373 (emacs_abort): Call fatal_error_backtrace rather than abort.
6374
972debf2
SM
63752012-09-04 Stefan Monnier <monnier@iro.umontreal.ca>
6376
6377 * lread.c (readevalloop): Call internal-macroexpand-for-load to perform
6378 eager (load-time) macro-expansion.
6379 * lisp.mk (lisp): Add macroexp.
6380
1088b922
PE
63812012-09-04 Paul Eggert <eggert@cs.ucla.edu>
6382
6383 Simplify redefinition of 'abort' (Bug#12316).
6384 Do not try to redefine the 'abort' function. Instead, redo
6385 the code so that it calls 'emacs_abort' rather than 'abort'.
6386 This removes the need for the NO_ABORT configure-time macro
6387 and makes it easier to change the abort code to do a backtrace.
6388 * .gdbinit: Just stop at emacs_abort, not at w32_abort or abort.
6389 * emacs.c (abort) [!DOS_NT && !NO_ABORT]:
6390 Remove; sysdep.c's emacs_abort now takes its place.
6391 * lisp.h (emacs_abort): New decl. All calls from Emacs code to
6392 'abort' changed to use 'emacs_abort'.
6393 * msdos.c (dos_abort) [defined abort]: Remove; not used.
6394 (abort) [!defined abort]: Rename to ...
6395 (emacs_abort): ... new name.
6396 * sysdep.c (emacs_abort) [!HAVE_NTGUI]: New function, taking
6397 the place of the old 'abort' in emacs.c.
6398 * w32.c, w32fns.c (abort): Do not #undef.
6399 * w32.c (emacs_abort): Rename from w32_abort.
6400
30934d33
EZ
64012012-09-04 Eli Zaretskii <eliz@gnu.org>
6402
6403 * w32uniscribe.c (uniscribe_shape): Reverse the sign of
6404 offsets[j].dv, since the y axis of the screen coordinates points
6405 down, while the y axis of the font definition coordinates points
6406 up. This fixes display of Arabic diacritics such as KASRA and
6407 KASRATAN. (Bug#11860)
6408
af26b72c
PE
64092012-09-04 Paul Eggert <eggert@cs.ucla.edu>
6410
6411 Be more systematic about _setjmp vs setjmp.
6412 * alloc.c (test_setjmp, mark_stack):
6413 * image.c (PNG_LONGJMP) [PNG_LIBPNG_VER < 10500]:
6414 (PNG_JMPBUF) [! (PNG_LIBPNG_VER < 10500)]:
6415 (png_load, my_error_exit, jpeg_load):
6416 * process.c (send_process_trap, send_process):
6417 Uniformly prefer _setjmp and _longjmp to setjmp and longjmp.
6418 The underscored versions are up to 30x faster on some hosts.
6419 Formerly, the code used setjmp+longjmp sometimes and
6420 _setjmp+_longjmp at other times, with no particular reason to
6421 prefer setjmp+longjmp.
6422
26d4541d
PE
64232012-09-03 Paul Eggert <eggert@cs.ucla.edu>
6424
d42f4f0f 6425 Fix minor problem found by static checking.
26d4541d 6426 * buffer.c (Fdelete_all_overlays): Return nil.
26d4541d 6427
c5e28e39
MR
64282012-09-03 Martin Rudalics <rudalics@gmx.at>
6429
6430 * buffer.c (Fdelete_all_overlays): New function.
6431
3eab3ca9
CY
64322012-09-03 Chong Yidong <cyd@gnu.org>
6433
6434 * gtkutil.c: Add extern decl for Qxft.
6435
c04889f8
PE
64362012-09-02 Paul Eggert <eggert@cs.ucla.edu>
6437
1882aa38
PE
6438 * emacs.c, eval.c: Use bool for boolean.
6439 * emacs.c (initialized, inhibit_window_system, running_asynch_code):
6440 (malloc_using_checking) [DOUG_LEA_MALLOC]:
6441 (display_arg) [HAVE_X_WINDOWS || HAVE_NS]:
6442 (noninteractive, no_site_lisp, fatal_error_in_progress, argmatch)
6443 (main, decode_env_path, Fdaemon_initialized):
6444 * eval.c (call_debugger, Finteractive_p, interactive_p):
6445 (unwind_to_catch, Fsignal, wants_debugger, skip_debugger)
6446 (maybe_call_debugger, Fbacktrace):
6447 * process.c (read_process_output, exec_sentinel):
6448 Use bool for booleans.
6449 * emacs.c (shut_down_emacs): Omit unused boolean argument NO_X.
6450 All callers changed.
6451 * eval.c (interactive_p): Omit always-true boolean argument
6452 EXCLUDE_SUBRS_P. All callers changed.
6453 * dispextern.h, lisp.h: Reflect above API changes.
6454 * firstfile.c (dummy): Use the address of 'main', whose signature
6455 won't change, instead of the address of 'initialize', whose
6456 signature just changed from int to bool.
6457 * lisp.h (fatal_error_in_progress): New decl of boolean, moved here ...
6458 * msdos.c (fatal_error_in_progress): ... from here.
6459 * xdisp.c (redisplaying_p): Now a boolean. Set it to 1 instead
6460 of incrementing it.
6461 (redisplay_internal, unwind_redisplay): Simply clear
6462 REDISPLAYING_P when unwinding, instead of saving its previous,
6463 always-false value and then restoring it.
6464
a411ac43
PE
6465 Clean up some extern decls.
6466 Mostly, this hoists extern decls out of .c files and into .h files.
6467 That way, we're more likely to catch errors if the interfaces change.
6468 * alloc.c [USE_GTK]: Include "gtkutil.h" so that we need not
6469 declare xg_mark_data.
6470 * dispextern.h (x_frame_parm_handlers):
6471 * font.h (Qxft):
6472 * lisp.h (Qlexical_binding, Qinternal_interpreter_environment)
6473 (Qextra_light, Qlight, Qsemi_light, Qsemi_bold, Qbold, Qextra_bold)
6474 (Qultra_bold, Qoblique, Qitalic):
6475 Move extern decl here from .c file.
6476 * alloc.c (xg_mark_data) [USE_GTK]:
6477 * doc.c (Qclosure):
6478 * eval.c (Qlexical_binding):
6479 * fns.c (time) [!HAVE_UNISTD_H]:
6480 * gtkutil.c (Qxft, Qnormal, Qextra_light, Qlight, Qsemi_light)
6481 (Qsemi_bold, Qbold, Qextra_bold, Qultra_bold, Qoblique, Qitalic):
6482 * image.c (Vlibrary_cache, QCloaded_from) [HAVE_NTGUI]:
6483 * lread.c (Qinternal_interpreter_environment):
6484 * minibuf.c (Qbuffer):
6485 * process.c (QCfamily, QCfilter):
6486 * widget.c (free_frame_faces):
6487 * xfaces.c (free_frame_menubar) [USE_X_TOOLKIT]:
6488 * xfont.c (x_clear_errors):
6489 * xterm.c (x_frame_parm_handlers):
6490 Remove now-redundant extern decls.
6491 * keyboard.c, keyboard.h (ignore_mouse_drag_p) [USE_GTK || HAVE_NS]:
6492 * xfaces.c (Qultra_light, Qreverse_oblique, Qreverse_italic):
6493 Now static.
6494 * xfaces.c: Remove unnecessary static decls.
6495 * xterm.c (updating_frame): Remove decl of nonexistent object.
6496
c04889f8
PE
6497 * Makefile.in (gl-stamp): Don't scan $(SOME_MACHINE_OBJECTS)
6498 when building globals.h, as the objects that are not built on
6499 this host are not needed to compile C files on this host.
6500
8b339673
JD
65012012-09-02 Jan Djärv <jan.h.d@swipnet.se>
6502
6503 * gtkutil.h: Remove prototype for x_wm_set_size_hint.
6504
6505 * frame.h: Add missing prototype for x_wm_set_size_hint.
6506
a08d4ba7
PE
65072012-09-02 Paul Eggert <eggert@cs.ucla.edu>
6508
6509 * doc.c, editfns.c, insdel.c, intervals.c: Use bool for boolean.
6510 * doc.c (read_bytecode_char, get_doc_string, reread_doc_file)
6511 (Fdocumentation, Fdocumentation_property, Fsnarf_documentation)
6512 (Fsubstitute_command_keys):
6513 * editfns.c (region_limit, find_field, Fconstrain_to_field)
6514 (save_excursion_save, save_excursion_restore)
6515 (disassemble_lisp_time, decode_time_components, emacs_nmemftime)
6516 (format_time_string, general_insert_function)
6517 (make_buffer_string, make_buffer_string_both)
6518 (Fsubst_char_in_region, Ftranslate_region_internal, Fformat):
6519 * insdel.c (check_markers, gap_left, adjust_markers_for_insert)
6520 (copy_text, insert_1, insert_1_both, insert_from_string)
6521 (insert_from_string_before_markers, insert_from_string_1)
6522 (insert_from_buffer, insert_from_buffer_1, replace_range)
6523 (replace_range_2, del_range_1, del_range_byte, del_range_both)
6524 (del_range_2, modify_region):
6525 * intervals.c (intervals_equal, balance_possible_root_interval)
6526 (adjust_intervals_for_insertion, merge_properties_sticky)
6527 (graft_intervals_into_buffer, lookup_char_property)
6528 (adjust_for_invis_intang, set_point_both)
6529 (get_property_and_range, compare_string_intervals)
6530 (set_intervals_multibyte_1, set_intervals_multibyte):
6531 * keyboard.c (decode_timer):
6532 Use bool for boolean.
6533 * intervals.h, lisp.h, systime.h: Reflect above API changes.
6534 * editfns.c (struct info): Use 1-bit unsigned bitfields for booleans.
6535
48c948de
CY
65362012-09-02 Chong Yidong <cyd@gnu.org>
6537
6538 * keymap.c (push_key_description): Print M-TAB as C-M-i
6539 (Bug#11758).
6540
6c49a40b
JB
65412012-09-02 Juanma Barranquero <lekktu@gmail.com>
6542
6543 * makefile.w32-in (CCL_H, W32FONT_H): New macros.
6544 (ATIMER_H, FONT_H, $(BLD)/alloc.$(O), $(BLD)/callproc.$(O))
6545 ($(BLD)/editfns.$(O), $(BLD)/ccl.$(O), $(BLD)/chartab.$(O))
6546 ($(BLD)/coding.$(O), $(BLD)/sysdep.$(O), $(BLD)/fontset.$(O))
6547 ($(BLD)/sysdep.$(O), $(BLD)/w32fns.$(O), $(BLD)/keyboard.$(O))
6548 ($(BLD)/w32term.$(O), $(BLD)/w32menu.$(O), $(BLD)/process.$(O))
6549 ($(BLD)/w32font.$(O), $(BLD)/w32uniscribe.$(O)): Update dependencies.
6550
4dfbd238
EZ
65512012-09-01 Eli Zaretskii <eliz@gnu.org>
6552
7e510e28
EZ
6553 * w32uniscribe.c (uniscribe_shape): Handle correctly the case of
6554 more than one grapheme cluster passed to the shaper: compute the
6555 offset adjustment values separately for each cluster. (Bug#11860)
6556
4dfbd238
EZ
6557 * image.c: Restore mistakenly removed inclusion of w32.h. Without
6558 it, GCC doesn't see prototypes of w32_delayed_load, and complains
6559 about implicit conversions from integer to pointer.
6560
86571ae0
DC
65612012-09-01 Daniel Colascione <dancol@dancol.org>
6562
6563 * w32fns.c (x_display_info_for_name): Prevent crash if w32 window
6564 system used too early.
6565
0e23ef9d
PE
65662012-09-01 Paul Eggert <eggert@cs.ucla.edu>
6567
6568 Better seed support for (random).
6569 * emacs.c (main): Call init_random.
6570 * fns.c (Frandom): Set the seed from a string argument, if given.
6571 Remove long-obsolete Gentzel cruft.
6572 * lisp.h, sysdep.c (seed_random): Now takes address and size, not long.
6573 (init_random): New function.
6574
17a2cbbd
DC
65752012-09-01 Daniel Colascione <dancol@dancol.org>
6576
6577 * xterm.h: Add header guards. Declare x_menubar_window_to_frame.
6578 Remove x_set_frame_alpha, x_bitmap_icon, x_make_frame_visible,
6579 x_make_frame_invisible, x_iconify_frame, x_free_frame_resources,
6580 x_wm_set_size_hint, x_query_colors, x_real_positions,
6581 x_set_menu_bar_lines, x_char_width, x_char_height, x_sync,
6582 x_set_tool_bar_lines, x_activate_menubar, and free_frame_menubar,
6583 all of which have been moved to common code.
6584
6585 * xfaces.c: Include TERM_HEADER instead of listing all possible
6586 window-system headers.
6587
6588 * w32xfns.c (x_sync): Correct definition of x_sync (a no-op here)
6589 to match header.
6590
6591 * w32term.h (FRAME_X_WINDOW): Use FRAME_W32_WINDOW instead of
6592 directly accessing frame internals.
6593
f18cbb28 6594 * w32font.h: Include font.h. Define syms_of_w32font and
17a2cbbd
DC
6595 globals_of_w32font.
6596
6597 * process.c: Include TERM_HEADER instead of listing all possible
6598 window-system headers.
6599
3a880af4
SM
6600 * nsterm.h: Remove declarations now in frame.h.
6601 Define FRAME_X_SCREEN, FRAME_X_VISUAL.
17a2cbbd
DC
6602
6603 * menu.c: Include TERM_HEADER instead of listing all possible
6604 window-system headers.
6605
6606 * keyboard.h: Declare ignore_mouse_drag_p whenever we have a
6607 window system.
6608
6609 * keyboard.c: Include TERM_HEADER instead of listing all possible
6610 window-system headers.
6611
6612 * image.c: Include TERM_HEADER instead of listing all possible
6613 window-system headers. Declare Vlibrary_cache when compiling for
6614 Windows.
6615
6616 * gtkutil.h (xg_list_node_): Include xterm.h to pick up needed
6617 window system declarations.
6618
6619 * frame.h: Move common functions here: set_frame_menubar,
6620 x_set_window_size, x_sync, x_get_focus_frame,
6621 x_set_mouse_position, x_set_mouse_pixel_position,
6622 x_make_frame_visible, x_make_frame_invisible, x_iconify_frame,
6623 x_char_width, x_char_height, x_pixel_width, x_pixel_height,
6624 x_set_frame_alpha, x_set_menu_bar_lines, x_set_tool_bar_lines,
6625 x_activate_menubar, x_real_positions, x_bitmap_icon,
6626 x_set_menu_bar_lines, free_frame_menubar, x_free_frame_resources,
6627 and x_query_colors.
6628
6629 * frame.c: Include TERM_HEADER instead of listing all possible
6630 window-system headers.
6631
6632 * font.c: Include TERM_HEADER instead of listing all possible
6633 window-system headers.
6634
6635 * emacs.c: Include TERM_HEADER.
6636
f18cbb28
EZ
6637 * dispnew.c: Include TERM_HEADER instead of listing all possible
6638 window-system headers.
17a2cbbd 6639
f18cbb28 6640 * ccl.h: Include character.h.
17a2cbbd
DC
6641
6642 * Makefile.in: Define WINDOW_SYSTEM_OBJ to hold objects needed for
6643 the current window system; include in list of objects to link into
6644 Emacs.
6645
c650a5de
DA
66462012-08-31 Dmitry Antipov <dmantipov@yandex.ru>
6647
6648 Remove mark_ttys function and fix tty_display_info initialization.
6649 * lisp.h (mark_ttys): Remove prototype.
6650 * alloc.c (Fgarbage_collect): Remove redundant (and the only) call
6651 to mark_ttys because all possible values of 'top_frame' slot are
6652 the frames which are reachable from Vframe_list.
6653 * term.c (mark_ttys): Remove.
6654 (init_tty): Safely initialize 'top_frame' slot with Qnil.
6655
4e0f6479
DA
66562012-08-31 Dmitry Antipov <dmantipov@yandex.ru>
6657
6658 Change struct frame bitfields from unsigned char to unsigned.
6659 * frame.h (struct frame): Change type of 'display_preempted',
6660 'visible', 'iconified', 'has_minibuffer', 'wants_modeline',
6661 'auto_raise', 'auto_lower', 'no_split', 'explicit_name',
6662 'window_sizes_changed', 'mouse_moved' and 'pointer_invisible'
6663 bitfields from unsigned char to unsigned.
6664
8b96a52c
DA
66652012-08-31 Dmitry Antipov <dmantipov@yandex.ru>
6666
6667 Remove unused member of struct x_output and struct w32_output.
6668 * xterm.h (struct x_output): Remove unused field 'needs_exposure'.
6669 * w32term.h (struct w32_output): Likewise.
6670
b4444c8a
JD
66712012-08-30 Jan Djärv <jan.h.d@swipnet.se>
6672
6673 * gtkutil.c (x_wm_set_size_hint): Use 1 col for base_width so it
6674 does not become zero (Bug#12234).
6675
b98521db
PE
66762012-08-30 Paul Eggert <eggert@cs.ucla.edu>
6677
6678 * dispnew.c (update_frame_1): Pacify gcc -Wstrict-overflow
6679 for GCC 4.7.1 x86-64.
6680
31d02438
GM
66812012-08-30 Glenn Morris <rgm@gnu.org>
6682
6683 * lread.c (init_lread): For out-of-tree builds, only add the
6684 source directory's site-lisp dir to the load-path if it exists,
6685 consistent with in-tree builds. (Bug#12302)
6686
7f8941d8
JD
66872012-08-28 Jan Djärv <jan.h.d@swipnet.se>
6688
6689 * nsmenu.m (initWithContentRect:styleMask:backing:defer:): Initialize
fc0c31f8 6690 button_values to NULL. Call setStykeMask so dialogs get a close button.
7f8941d8
JD
6691 (windowShouldClose:): Set window_closed.
6692 (dealloc): New member, free button_values.
fc0c31f8
JB
6693 (process_dialog:): Make member function. Remove window argument,
6694 replace window with self. Count buttons and allocate and store values
7f8941d8
JD
6695 in button_values.
6696 (addButton:value:row:): value is int with the name tag. Call setTag
fc0c31f8 6697 with tag. Remove return self, declare return value as void.
7f8941d8
JD
6698 (addString:row:): Remove return self, declare return value as void.
6699 (addSplit): Remove return self, declare return value as void.
6700 (clicked:): Remove return self, declare return value as void.
fc0c31f8 6701 Set dialog_return to button_values[seltag]. Code formatting change.
7f8941d8
JD
6702 (initFromContents:isQuestion:): Adjust call to process_dialog.
6703 Code formatting change.
6704 (timeout_handler:): Set timer_fired to YES.
6705 (runDialogAt:): Set timer_fired to NO.
6706 Handle click on close button as quit.
6707
6708 * nsterm.h (EmacsDialogPanel): Make timer_fired BOOL.
6709 Add window_closed and button_values. Add void as return value for
6710 add(Button|String|Split). addButton takes int instead of Lisp_Object.
6711 Add process_dialog as new member.
6712
eada0861 67132012-08-28 Eli Zaretskii <eliz@gnu.org>
19c17fc1 6714
eada0861
GM
6715 * ralloc.c (free_bloc): Don't dereference a 'heap' structure if it
6716 is not one of the heaps we manage. (Bug#12242)
6717
67182012-08-28 Glenn Morris <rgm@gnu.org>
6719
6720 * eval.c (Fcalled_interactively_p): Doc fix. (Bug#11747)
6721
457294dd
MR
67222012-08-28 Martin Rudalics <rudalics@gmx.at>
6723
6724 * window.c (Fset_window_configuration): Remove handling of
37b9743e
MR
6725 auto-buffer-name window parameter. Install revision of reverted
6726 fix.
457294dd 6727
4f2daf31
DA
67282012-08-28 Dmitry Antipov <dmantipov@yandex.ru>
6729
6730 Do not allow to set major mode for a dead buffer.
6731 * buffer.c (Fset_buffer_major_mode): Signal an error
6732 if the buffer is dead.
6733 (Fother_buffer, other_buffer_safely): Remove redundant
6734 nested declaration.
6735
66322887
DA
67362012-08-28 Dmitry Antipov <dmantipov@yandex.ru>
6737
6738 Always use set_buffer_if_live to restore original buffer at unwind.
6739 * buffer.h (record_unwind_current_buffer): New function.
6740 * bytecode.c, dispnew.c, editfns.c, fileio.c, fns.c, insdel.c:
6741 * keyboard.c, keymap.c, minibuf.c, print.c, process.c, textprop.c:
6742 * undo.c, window.c: Adjust users.
6743 * buffer.c (set_buffer_if_live): Fix comment.
6744
a3d794a1
DA
67452012-08-28 Dmitry Antipov <dmantipov@yandex.ru>
6746
6747 Fix usage of set_buffer_internal.
6748 * buffer.h (set_buffer_internal): Make it BUFFER_INLINE.
6749 * buffer.c (set_buffer_if_live): Use set_buffer_internal.
6750 * coding.c (decode_coding): Omit redundant test.
6751 * fileio.c (decide_coding_unwind): Likewise.
6752 * fns.c (secure_hash): Likewise.
6753 * insdel.c (modify_region): Likewise.
6754 * keyboard.c (command_loop_1): Likewise.
6755 * print.c (PRINTFINISH): Likewise.
6756 * xdisp.c (run_window_scroll_functions): Use set_buffer_internal.
6757
59ea14cd
PE
67582012-08-27 Paul Eggert <eggert@cs.ucla.edu>
6759
6760 * dispnew.c: Use bool for boolean.
6761 (frame_garbaged, display_completed, delayed_size_change)
6762 (fonts_changed_p, add_window_display_history)
6763 (add_frame_display_history, verify_row_hash)
6764 (adjust_glyph_matrix, clear_window_matrices, glyph_row_slice_p)
6765 (row_equal_p, realloc_glyph_pool)
6766 (allocate_matrices_for_frame_redisplay)
6767 (showing_window_margins_p)
6768 (adjust_frame_glyphs_for_frame_redisplay)
6769 (build_frame_matrix_from_leaf_window, make_current)
6770 (mirrored_line_dance, mirror_line_dance, update_frame)
6771 (update_window_tree, update_single_window)
6772 (check_current_matrix_flags, update_window, update_text_area)
6773 (update_window_line, set_window_update_flags, scrolling_window)
6774 (update_frame_1, scrolling, buffer_posn_from_coords)
6775 (do_pending_window_change, change_frame_size)
6776 (change_frame_size_1, sit_for):
6777 Use bool for boolean.
6778 (clear_glyph_matrix_rows): Rename from enable_glyph_matrix_rows,
6779 and remove last int (actually boolean) argument, which was always 0.
6780 All callers changed.
6781 * dispextern.h, frame.h, lisp.h: Reflect above API changes.
6782 * dispextern.h (struct composition_it): Use bool for boolean.
6783 (struct glyph_matrix): Don't assume buffer sizes can fit in 'int'.
6784 (struct bidi_it): Use unsigned:1, not int, for boolean prev_was_pdf.
6785 * dired.c (file_name_completion):
6786 Use bool for boolean. (This was missed in an earlier change.)
6787
95072a94
MR
67882012-08-27 Martin Rudalics <rudalics@gmx.at>
6789
6790 * window.c (Fset_window_configuration): Revert first part of
6791 last change.
6792
0f19feff
JD
67932012-08-27 Jan Djärv <jan.h.d@swipnet.se>
6794
6795 * nsterm.h (NSPanel): New class variable dialog_return.
6796
3a880af4
SM
6797 * nsmenu.m (initWithContentRect:styleMask:backing:defer:):
6798 Initialize dialog_return.
0f19feff
JD
6799 (windowShouldClose:): Use stop instead of stopModalWithCode.
6800 (clicked:): Ditto, and also set dialog_return (Bug#12258).
6801 (timeout_handler:): Use stop instead of abortModal. Send a dummy
6802 event.
6803 (runDialogAt:): Make ret Lisp_Object. Set it from dialog_return when
6804 modal loop returns.
6805
f10fe38f
PE
68062012-08-27 Paul Eggert <eggert@cs.ucla.edu>
6807
de1339b0
PE
6808 * composite.c, data.c, dbusbind.c, dired.c: Use bool for booleans.
6809 * composite.c (find_composition, composition_gstring_p)
6810 (composition_reseat_it, find_automatic_composition):
6811 * data.c (let_shadows_buffer_binding_p)
6812 (let_shadows_global_binding_p, set_internal, make_blv)
6813 (Fmake_variable_buffer_local, Fmake_local_variable)
6814 (Fmake_variable_frame_local, arithcompare, cons_to_unsigned)
6815 (cons_to_signed, arith_driver):
6816 * dbusbind.c (xd_in_read_queued_messages):
6817 * dired.c (directory_files_internal, file_name_completion):
6818 Use bool for booleans.
6819 * dired.c (file_name_completion):
6820 * process.h (fd_callback):
6821 Omit int (actually boolean) argument. It wasn't being used.
6822 All uses changed.
6823 * composite.h, lisp.h: Reflect above API changes.
6824
f10fe38f
PE
6825 * cmds.c, coding.c: Use bool for booleans.
6826 * cmds.c (move_point, Fself_insert_command):
6827 * coding.h (struct composition status, struct coding_system):
6828 * coding.c (detect_coding_utf_8, encode_coding_utf_8)
6829 (detect_coding_utf_16, encode_coding_utf_16, detect_coding_emacs_mule)
6830 (emacs_mule_char, decode_coding_emacs_mule)
6831 (encode_coding_emacs_mule, detect_coding_iso_2022)
6832 (decode_coding_iso_2022, encode_invocation_designation)
6833 (encode_designation_at_bol, encode_coding_iso_2022)
6834 (detect_coding_sjis, detect_coding_big5, decode_coding_sjis)
6835 (decode_coding_big5, encode_coding_sjis, encode_coding_big5)
6836 (detect_coding_ccl, encode_coding_ccl, decode_coding_raw_text)
6837 (encode_coding_raw_text, detect_coding_charset)
6838 (decode_coding_charset, encode_coding_charset, detect_eol)
6839 (detect_coding, get_translation_table, produce_chars)
6840 (consume_chars, reused_workbuf_in_use)
6841 (make_conversion_work_buffer, code_conversion_save)
6842 (decode_coding_object, encode_coding_object)
6843 (detect_coding_system, char_encodable_p)
6844 (Funencodable_char_position, code_convert_region)
6845 (code_convert_string, code_convert_string_norecord)
6846 (Fset_coding_system_priority):
6847 * fileio.c (Finsert_file_contents):
6848 Use bool for booleans.
6849 * coding.h, lisp.h: Reflect above API changes.
6850 * coding.c: Remove unnecessary static function decls.
6851 (detect_coding): Use unsigned, not signed, to copy an unsigned field.
6852 (decode_coding, encode_coding, decode_coding_gap): Return 'void',
6853 not a boolean 'int', since callers never look at the return value.
6854 (ALLOC_CONVERSION_WORK_AREA): Assume caller returns 'void', not 'int'.
6855 * coding.h (decoding_buffer_size, encoding_buffer_size)
6856 (emacs_mule_string_char): Remove unused extern decls.
6857 (struct iso_2022_spec, struct coding_system):
6858 Use 'unsigned int : 1' for boolean fields, since there's more than one.
6859 (struct emacs_mule_spec): Remove unused field 'full_support'.
6860 All initializations removed.
6861 * cmds.c (internal_self_insert): Don't assume EMACS_INT fits in 'int'.
6862
5474c384
DA
68632012-08-27 Dmitry Antipov <dmantipov@yandex.ru>
6864
f10fe38f 6865 Fix spare memory change (Bug#12286).
5474c384
DA
6866 * alloc.c (mark_maybe_pointer): Handle MEM_TYPE_SPARE.
6867 (valid_lisp_object_p): Likewise.
6868
c4b6914d
MR
68692012-08-27 Martin Rudalics <rudalics@gmx.at>
6870
6871 * window.c (Fset_window_configuration): Record any window's old
6872 buffer if it's replaced (see Bug#8789). If the new current
6873 buffer doesn't appear in the selected window, go to its old
6874 point (Bug#12208).
6875
35aaa1ea
DA
68762012-08-27 Dmitry Antipov <dmantipov@yandex.ru>
6877
6878 Special MEM_TYPE_SPARE to denote reserved memory.
6879 * alloc.c (enum mem_type): New memory type.
6880 (refill_memory_reserve): Use new type for spare memory.
6881 This prevents live_cons_p and live_string_p from incorrect
6882 detection of uninitialized objects from spare memory as live.
6883
6af64513
PE
68842012-08-26 Paul Eggert <eggert@cs.ucla.edu>
6885
8b2e00a3
PE
6886 Spelling fixes.
6887 * Makefile.in (.PHONY): versioclean -> versionclean.
6888
b52d6985
PE
6889 Remove unused external symbols.
6890 * data.c (Qcons, Qfloat, Qmisc, Qstring, Qvector):
6891 * window.c (Qwindow_valid_p, decode_valid_window):
6892 Now static, not extern.
6893 * data.c (Qinterval): Remove; unused.
6894 (syms_of_data): Do not define 'interval'.
6895 * lisp.h (Qinteger, Qstring, Qmisc, Qvector, Qfloat, Qcons):
6896 * window.h (decode_valid_window):
6897 Remove decls.
6898
d5172d4f
PE
6899 * character.c, charset.c, chartab.c: Use bool for booleans.
6900 * character.c (lisp_string_width, string_count_byte8)
6901 (string_escape_byte8):
6902 * charset.c (charset_map_loaded, load_charset_map, read_hex):
6903 (load_charset_map_from_file, map_charset_chars)
6904 (Fdefine_charset_internal, define_charset_internal)
6905 (Fdeclare_equiv_charset, find_charsets_in_text)
6906 (Ffind_charset_region, char_charset, Fiso_charset):
6907 * chartab.c (sub_char_table_ref, sub_char_table_ref_and_range)
6908 (sub_char_table_set, sub_char_table_set_range)
6909 (char_table_set_range, optimize_sub_char_table)
6910 (map_sub_char_table):
6911 Use bool for boolean.
6912 * character.c (str_to_unibyte): Omit last boolean argument; it was
6913 always 0. All callers changed.
6914 * character.h, charset.h: Adjust to match previous changes.
6915 * character.h (char_printable_p): Remove decl of nonexistent function.
6916 * charset.h (struct charset): Members code_linear_p, iso_chars_96,
6917 ascii_compatible_p, supplementary_p, compact_codes_p, unified_p
6918 are all boolean, so make them single-bit bitfields.
6919
6af64513
PE
6920 * lisp.h (ASET): Remove attempt to detect side effects.
6921 It was meant to be temporary and it often doesn't work,
6922 because when IDX has side effects the behavior of IDX==IDX
6923 is undefined. See Stefan Monnier in
6924 <http://lists.gnu.org/archive/html/emacs-devel/2012-08/msg00762.html>.
6925
e1f29348
BR
69262012-08-26 Barry OReilly <gundaetiapo@gmail.com> (tiny change)
6927
6928 * lisp.h (functionp): New function (extracted from Ffunctionp).
6929 (FUNCTIONP): Use it.
6930 * eval.c (Ffunctionp): Use it.
6931
17c05d74
PE
69322012-08-25 Paul Eggert <eggert@cs.ucla.edu>
6933
0f46bc75
PE
6934 * xgselect.c (xg_select): Use auto storage for the GPollFD buffer
6935 as that's faster and simpler than static storage. Don't bother
6936 with the g_main_context_query overhead if g_main_context_pending
6937 says no events are pending.
6938 (gfds, gfds_size): Remove these static vars.
6939 (xgselect_initialize): Remove; no longer needed.
6940 All uses and decls removed.
6941
ee4c0f69
PE
6942 * emacs.c (fatal_error_signal_hook): Remove.
6943 All uses removed. This leftover from old code was always 0.
6944
17c05d74
PE
6945 * casefiddle.c, casetab.c, category.c: Use bool for boolean.
6946 * casefiddle.c (casify_object, casify_region):
6947 * casetab.c (set_case_table):
6948 * category.c, category.h (word_boundary_p):
6949 * category.h (CHAR_HAS_CATEGORY):
6950 Use bool for booleans, instead of int.
6951
391ceac5
EZ
69522012-08-25 Eli Zaretskii <eliz@gnu.org>
6953
6954 * makefile.w32-in ($(BLD)/alloc.$(O)): Depend on $(GNU_LIB)/execinfo.h.
6955
2f221583
PE
69562012-08-25 Paul Eggert <eggert@cs.ucla.edu>
6957
f4a681b0
PE
6958 On assertion failure, print backtrace if available.
6959 * alloc.c [ENABLE_CHECKING]: Include <execinfo.h>.
6960 (die) [ENABLE_CHECKING]: Print a backtrace if available.
6961 * Makefile.in (LIB_EXECINFO): New macro.
6962 (LIBES): Use it.
6963
2f221583
PE
6964 * bytecode.c, callint.c, callproc.c: Use bool for boolean.
6965 * bytecode.c (exec_byte_code):
6966 * callint.c (check_mark, Fcall_interactively):
6967 * callproc.c (Fcall_process, add_env, child_setup, getenv_internal_1)
6968 (getenv_internal, sync_process_alive, call_process_exited):
6969 * lisp.h (USE_SAFE_ALLOCA):
6970 Use bool for booleans, instead of int.
6971 * lisp.h, process.h: Adjust prototypes to match above changes.
6972 * callint.c (Fcall_interactively): Don't assume the mark's
6973 offset fits in 'int'.
6974
37ef52bb
PE
69752012-08-24 Paul Eggert <eggert@cs.ucla.edu>
6976
6977 * buffer.c, buffer.h: Use bool for boolean.
6978 * buffer.c (reset_buffer_local_variables)
6979 (buffer_lisp_local_variables, Fset_buffer_modified_p)
6980 (Frestore_buffer_modified_p, Fset_buffer_multibyte):
6981 (overlays_at, overlays_in, mouse_face_overlay_overlaps)
6982 (overlay_touches_p, overlay_strings, Foverlay_put)
6983 (report_overlay_modification, call_overlay_mod_hooks):
6984 (mmap_enlarge, mmap_set_vars):
6985 * buffer.h (buffer_has_overlays, uppercasep, lowercasep):
6986 Use bool for booleans, instead of int.
6987 * buffer.c (compact_buffer, mmap_free_1): Return void, not int,
6988 since the 1-or-0 return value is always ignored anyway.
6989 (mmap_initialized_p):
6990 * buffer.h (struct buffer_text.inhibit_shrinking): Now bool, not int.
6991 * buffer.h, lisp.h: Adjust prototypes to match above changes.
6992
2cc21167
PE
69932012-08-23 Paul Eggert <eggert@cs.ucla.edu>
6994
6995 * bidi.c: Use bool for boolean.
6996 This is a bit more readable, and makes the text segment of bidi.o
6997 0.4% smaller on my platform (GCC 4.7.1 x86-64, Fedora 15).
6998 Presumably it's faster too.
6999 (bidi_initialized, bidi_ignore_explicit_marks_for_paragraph_level):
7000 Now bool.
7001 (bidi_cache_find_level_change, bidi_cache_iterator_state)
7002 (bidi_unshelve_cache, bidi_init_it, bidi_count_bytes)
7003 (bidi_char_at_pos, bidi_fetch_char, bidi_paragraph_init)
7004 (bidi_explicit_dir_char, bidi_level_of_next_char)
7005 (bidi_find_other_level_edge, bidi_move_to_visually_next):
7006 Use bool for booleans, instead of int.
7007 * dispextern.h (bidi_init_it, bidi_paragraph_init)
7008 (bidi_unshelve_cache): Adjust decls to match code.
7009
7db4ddf4
MR
70102012-08-23 Martin Rudalics <rudalics@gmx.at>
7011
7012 * keyboard.c (Fposn_at_x_y): Do not allow internal window as
7013 argument.
7014
b1bb8011
PE
70152012-08-23 Paul Eggert <eggert@cs.ucla.edu>
7016
7017 * atimer.c, atimer.h (turn_on_atimers): Use bool for boolean.
7018 * atimer.h: Include <stdbool.h>.
7019
ff687885
DN
70202012-08-22 Dan Nicolaescu <dann@gnu.org>
7021
7022 * frame.h (FRAME_W32_P, FRAME_MSDOS_P, FRAME_NS_P): Change to
7023 compile time tests instead of run time tests on systems that do
7024 not use them.
7025 (FRAME_MAC_P): Remove leftover from deleted code.
7026 * frame.c (syms_of_frame): Remove leftover from deleted code.
7027
4ce7a138
JD
70282012-08-22 Jan Djärv <jan.h.d@swipnet.se>
7029
7030 * nsterm.m (insertText:): Don't clear modifiers if code is space.
7031
d733ec6d
PE
70322012-08-22 Paul Eggert <eggert@cs.ucla.edu>
7033
7034 * fontset.c (FONTSET_ADD): Return void, not Lisp_Object.
7035 Otherwise, the compiler complains about (A?B:C) where B is void
fc0c31f8 7036 and C is Lisp_Object. This fixes an incompatibility with Sun C 5.12.
d733ec6d
PE
7037 (fontset_add): Return void, for FONTSET_ADD.
7038
d0d2d26f
PE
70392012-08-21 Paul Eggert <eggert@cs.ucla.edu>
7040
fce31d69
PE
7041 * alloc.c: Use bool for booleans.
7042 (gc_in_progress, abort_on_gc)
7043 (setjmp_tested_p) [!GC_SAVE_REGISTERS_ON_STACK && !GC_SETJMP_WORKS]:
7044 (dont_register_blocks) [GC_MALLOC_CHECK]:
7045 (suppress_checking) [ENABLE_CHECKING]: Now bool, not int.
7046 (check_string_bytes, make_specified_string, memory_full)
7047 (live_string_p, live_cons_p, live_symbol_p, live_float_p)
7048 (live_misc_p, live_vector_p, live_buffer_p, mark_maybe_object)
7049 (mark_stack, valid_pointer_p, make_pure_string)
7050 (Fgarbage_collect, survives_gc_p, gc_sweep):
7051 Use bool for booleans, instead of int.
7052 (test_setjmp) [!GC_SAVE_REGISTERS_ON_STACK && !GC_SETJMP_WORKS]:
7053 Remove unused local.
7054 * alloc.c (PURE_POINTER_P):
7055 * lisp.h (STRING_MULTIBYTE): Document that it returns a boolean.
7056 * editfns.c (Fformat):
7057 * fileio.c (Fexpand_file_name, Fsubstitute_in_file_name)
7058 (Fdo_auto_save):
7059 * fns.c (sweep_weak_table):
7060 * lisp.h (suppress_checking, push_message, survives_gc_p)
7061 (make_pure_string, gc_in_progress, abort_on_gc):
7062 * lread.c (readchar, read1):
7063 * print.c (Fprin1_to_string):
7064 * xdisp.c (push_message):
7065 Use bool for booleans affected directly or indirectly by
7066 alloc.c's changes.
7067
d0d2d26f
PE
7068 Make recently-introduced setters macros.
7069 * fontset.c (set_fontset_id, set_fontset_name, set_fontset_ascii)
7070 (set_fontset_base, set_fontset_frame, set_fontset_nofont_face)
7071 (set_fontset_default, set_fontset_fallback): Rename from their
7072 upper-case counterparts, and make them functions rather than macros.
7073 This is more consistent with the other recently-introduced setters.
7074 These don't need to be inline, since they're local.
7075
d18e2bb6
JD
70762012-08-21 Jan Djärv <jan.h.d@swipnet.se>
7077
7078 * nsterm.m (fd_handler:): Alloc and release a NSAutoreleasePool in
7079 the loop (Bug#12247).
7080
1b9d9d16
PE
70812012-08-21 Paul Eggert <eggert@cs.ucla.edu>
7082
7083 * lisp.h (vcopy): Use memcpy rather than our own loop.
7084 This fixes a performance regression introduced by the recent
7085 addition of vcopy. This means 'vcopy' will need to be modified
7086 for a copying collector, but that's OK. Also, tighten the
7087 checking in the assertion.
7088
b2f09701
EZ
70892012-08-21 Eli Zaretskii <eliz@gnu.org>
7090
7091 * w32uniscribe.c (uniscribe_shape): Fix producing gstring
7092 components for RTL text (Bug#11860). Adjust X-OFFSET of each
7093 non-base glyph for the width of the base character, according to
e1f29348
BR
7094 what x_draw_composite_glyph_string_foreground expects.
7095 Generate WADJUST value according to composition_gstring_width's
b2f09701
EZ
7096 expectations, to produce correct width of the composed character.
7097 Reverse the sign of the DU offset produced by ScriptPlace.
7098
9b994fed
PE
70992012-08-21 Paul Eggert <eggert@cs.ucla.edu>
7100
7101 * dbusbind.c (xd_remove_watch): Do not assume C99 comments.
7102
086ca913
DA
71032012-08-21 Dmitry Antipov <dmantipov@yandex.ru>
7104
7105 Avoid direct writes to contents member of struct Lisp_Vector.
7106 * lisp.h (vcopy): New function to copy data into vector.
7107 * dispnew.c (Fframe_or_buffer_changed_p): Use AREF and ASET.
7108 * fns.c (Ffillarray): Use ASET.
7109 * keyboard.c (timer_check_2): Use AREF and ASET.
7110 (append_tool_bar_item, Frecent_keys): Use vcopy.
7111 * lread.c (read_vector): Use ASET.
7112 * msdos.c (Frecent_doskeys): Use vcopy.
7113 * xface.c (Finternal_copy_lisp_face): Use vcopy.
7114 (Finternal_merge_in_global_face): Use ASET and vcopy.
7115 * xfont.c (xfont_list_pattern): Likewise.
7116
5481664a
MR
71172012-08-21 Martin Rudalics <rudalics@gmx.at>
7118
7119 * window.c (Fwindow_point): For the selected window always return
7120 the position of its buffer's point.
7121 (Fset_window_point): For the selected window always go in its
7122 buffer to the specified position.
7123
6d470bdd
DA
71242012-08-21 Dmitry Antipov <dmantipov@yandex.ru>
7125
7126 Setter macros for fontsets.
7127 * fontset.c (SET_FONTSET_ID, SET_FONTSET_NAME, SET_FONTSET_ASCII)
7128 (SET_FONTSET_BASE, SET_FONTSET_FRAME, SET_FONTSET_NOFONT_FACE)
7129 (SET_FONTSET_DEFAULT, SET_FONTSET_FALLBACK): New macros.
7130 Adjust users.
7131
24564fe1
GM
71322012-08-20 Glenn Morris <rgm@gnu.org>
7133
7134 * Makefile.in (emacs$(EXEEXT), bootstrap-emacs$(EXEEXT)):
7135 Don't assume that `ln -f' works.
7136
0a05a035
EZ
71372012-08-20 Eli Zaretskii <eliz@gnu.org>
7138
7139 * .gdbinit: Use "set $dummy = ..." to avoid warnings from GDB 7.5
7140 and later about non-assignments with no effect. See discussion at
7141 http://sourceware.org/ml/gdb-patches/2012-08/msg00518.html for
7142 details.
7143
e46f2325
DA
71442012-08-20 Dmitry Antipov <dmantipov@yandex.ru>
7145
7146 Inline setter functions for Lisp_Objects slots of struct specbinding.
7147 * eval.c (set_specpdl_symbol, set_specpdl_old_value): New functions.
7148 Adjust users.
7149
734fbd86
MR
71502012-08-20 Martin Rudalics <rudalics@gmx.at>
7151
7152 * window.c (select_window): Always make selected window's buffer
7153 current.
7154
f1a95992
DA
71552012-08-20 Dmitry Antipov <dmantipov@yandex.ru>
7156
7157 Use AREF and ASET for docstrings of category tables.
7158 * category.h (CATEGORY_DOCSTRING): Use AREF.
7159 (SET_CATEGORY_DOCSTRING): Use ASET.
7160 * category.c (Fdefine_category): Use SET_CATEGORY_DOCSTRING.
7161
e83064be
DA
71622012-08-20 Dmitry Antipov <dmantipov@yandex.ru>
7163
7164 Inline setter functions for hash table members.
7165 * lisp.h (set_hash_key, set_hash_value, set_hash_next)
7166 (set_hash_hash, set_hash_index): Rename with _slot suffix.
7167 (set_hash_key_and_value, set_hash_index, set_hash_next)
7168 (set_hash_hash): New functions.
7169 * charset.c, fns.c: Adjust users.
7170
4ce60d2e
DA
71712012-08-20 Dmitry Antipov <dmantipov@yandex.ru>
7172
7173 Inline getter and setter functions for per-buffer values.
7174 * buffer.h (per_buffer_default, set_per_buffer_default)
7175 (per_buffer_value, set_per_buffer_value): New functions.
7176 (PER_BUFFER_VALUE, PER_BUFFER_DEFAULT): Remove.
7177 * buffer.c, data.c: Adjust users.
7178
c06c9690
JB
71792012-08-20 Juanma Barranquero <lekktu@gmail.com>
7180
7181 * makefile.w32-in ($(BLD)/vm-limit.$(O)): Update dependencies.
7182
32bd4250
PE
71832012-08-19 Paul Eggert <eggert@cs.ucla.edu>
7184
bad03192 7185 Rely on <config.h> + <unistd.h> to declare 'environ',
b69a6d22
PE
7186 as gnulib does this if the system doesn't.
7187 * callproc.c, editfns.c, process.c (environ) [!USE_CRT_DLL]:
72279493
EZ
7188 Remove declaration. MS-Windows declares it on stdlib.h which is
7189 included by conf_post.h.
b69a6d22
PE
7190 * emacs.c (environ) [DOUG_LEA_MALLOC]:
7191 * vm-limit.c (environ) [ORDINARY_LINK]: Remove decl.
7192 * vm-limit.c: Include <unistd.h>, for 'environ'.
7193
22d7feb2
PE
7194 * unexaix.c, unexcoff.c: Include "mem-limits.h".
7195 (start_of_data): Remove decl; mem-limits.h provides it.
7196
32bd4250
PE
7197 * xdisp.c (handle_invisible_prop): Make it a bit faster
7198 and avoid a gcc -Wmaybe-uninitialized diagnostic.
7199
450809af
CY
72002012-08-19 Chong Yidong <cyd@gnu.org>
7201
7202 * xdisp.c (handle_invisible_prop): Fix ellipses at overlay string
7203 ends (Bug#3874).
7204
9e677988
AS
72052012-08-19 Andreas Schwab <schwab@linux-m68k.org>
7206
6b1319ce
AS
7207 * .gdbinit: Use call instead of set when calling a function in the
7208 inferior.
7209
9e677988
AS
7210 * data.c (set_internal): Don't use set_blv_found.
7211 (Fkill_local_variable): Likewise.
7212
d7191076
AA
72132012-08-18 Alp Aker <alp.tekin.aker@gmail.com>
7214
7215 * nsfont.m (ns_ascii_average_width): Ensure the string
7216 ascii_printable is initialized with a null-terminated character
7217 array. Otherwise, it can contain undesired extra characters.
7218
e757f1c6
PE
72192012-08-18 Paul Eggert <eggert@cs.ucla.edu>
7220
7221 port new setting code to Sun C 5.8 2005/10/13
7222 * chartab.c, lisp.h (char_table_set, char_table_set_range):
7223 Return void, not Lisp_Object. Otherwise, the compiler
7224 complains about (A?B:C) where B is void and C is Lisp_Object
7225 when compiling CHAR_TABLE_SET, due to the recent change to
7226 the API of sub_char_table_set_contents.
7227
a999ce26
CY
72282012-08-18 Chong Yidong <cyd@gnu.org>
7229
7230 * xdisp.c (handle_invisible_prop): Obey TEXT_PROP_MEANS_INVISIBLE
7231 for the string case (Bug#3874).
7232
3f22b86f
PE
72332012-08-18 Paul Eggert <eggert@cs.ucla.edu>
7234
39eb03f1
PE
7235 * buffer.h (BSET): Remove (Bug#12215).
7236 Replace all uses with calls to new setter functions.
7237 (bset_bidi_paragraph_direction, bset_case_canon_table)
7238 (bset_case_eqv_table, bset_directory, bset_display_count)
7239 (bset_display_time, bset_downcase_table)
7240 (bset_enable_multibyte_characters, bset_filename, bset_keymap)
7241 (bset_last_selected_window, bset_local_var_alist)
7242 (bset_mark_active, bset_point_before_scroll, bset_read_only)
7243 (bset_truncate_lines, bset_undo_list, bset_upcase_table)
7244 (bset_width_table):
7245 * buffer.c (bset_abbrev_mode, bset_abbrev_table)
7246 (bset_auto_fill_function, bset_auto_save_file_format)
7247 (bset_auto_save_file_name, bset_backed_up, bset_begv_marker)
7248 (bset_bidi_display_reordering, bset_buffer_file_coding_system)
7249 (bset_cache_long_line_scans, bset_case_fold_search)
7250 (bset_ctl_arrow, bset_cursor_in_non_selected_windows)
7251 (bset_cursor_type, bset_display_table, bset_extra_line_spacing)
7252 (bset_file_format, bset_file_truename, bset_fringe_cursor_alist)
7253 (bset_fringe_indicator_alist, bset_fringes_outside_margins)
7254 (bset_header_line_format, bset_indicate_buffer_boundaries)
7255 (bset_indicate_empty_lines, bset_invisibility_spec)
7256 (bset_left_fringe_width, bset_major_mode, bset_mark)
7257 (bset_minor_modes, bset_mode_line_format, bset_mode_name)
7258 (bset_name, bset_overwrite_mode, bset_pt_marker)
7259 (bset_right_fringe_width, bset_save_length)
7260 (bset_scroll_bar_width, bset_scroll_down_aggressively)
7261 (bset_scroll_up_aggressively, bset_selective_display)
7262 (bset_selective_display_ellipses, bset_vertical_scroll_bar_type)
7263 (bset_word_wrap, bset_zv_marker):
7264 * category.c (bset_category_table):
7265 * syntax.c (bset_syntax_table):
7266 New setter functions.
7267
6a09a33b
PE
7268 * process.h (PSET): Remove (Bug#12215).
7269 Replace all uses with calls to new setter functions.
7270 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
7271 (PROCESS_INLINE): New macro.
7272 (pset_childp): New setter function.
7273 (pset_gnutls_cred_type) [HAVE_GNUTLS]: New setter function.
7274 * process.c (PROCESS_INLINE):
7275 Define to EXTERN_INLINE, so that the corresponding functions
7276 are compiled into code.
7277 (pset_buffer, pset_command, pset_decode_coding_system)
7278 (pset_decoding_buf, pset_encode_coding_system)
7279 (pset_encoding_buf, pset_filter, pset_log, pset_mark, pset_name)
7280 (pset_plist, pset_sentinel, pset_status, pset_tty_name)
7281 (pset_type, pset_write_queue): New setter functions.
7282
e8c17b81
PE
7283 * window.h (WSET): Remove (Bug#12215).
7284 Replace all uses with calls to new setter functions.
7285 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
7286 (WINDOW_INLINE): New macro.
7287 (wset_buffer, wset_frame, wset_left_col, wset_next, wset_prev)
7288 (wset_redisplay_end_trigger, wset_top_line, wset_total_cols)
7289 (wset_total_lines, wset_vertical_scroll_bar)
7290 (wset_window_end_pos, wset_window_end_valid)
7291 (wset_window_end_vpos): New setter functions.
7292 * window.c (WINDOW_INLINE):
7293 Define to EXTERN_INLINE, so that the corresponding functions
7294 are compiled into code.
7295 (wset_combination_limit, wset_dedicated, wset_display_table)
7296 (wset_hchild, wset_left_fringe_width, wset_left_margin_cols)
7297 (wset_new_normal, wset_new_total, wset_next_buffers)
7298 (wset_normal_cols, wset_normal_lines, wset_parent, wset_pointm)
7299 (wset_prev_buffers, wset_right_fringe_width)
7300 (wset_right_margin_cols, wset_scroll_bar_width, wset_start)
7301 (wset_temslot, wset_vchild, wset_vertical_scroll_bar_type)
7302 (wset_window_parameters):
7303 * xdisp.c (wset_base_line_number, wset_base_line_pos)
7304 (wset_column_number_displayed, wset_region_showing):
7305 New setter functions.
7306
3f22b86f
PE
7307 * termhooks.h (TSET): Remove (Bug#12215).
7308 Replace all uses with calls to new setter functions.
7309 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
7310 (TERMHOOKS_INLINE): New macro.
7311 (tset_charset_list, tset_selection_alist): New setter functions.
7312 * terminal.c (TERMHOOKS_INLINE):
7313 Define to EXTERN_INLINE, so that the corresponding functions
7314 are compiled into code.
7315 (tset_param_alist): New setter function.
7316
742af32f
PE
73172012-08-17 Paul Eggert <eggert@cs.ucla.edu>
7318
15dbb4d6
PE
7319 * keyboard.h (KSET): Remove (Bug#12215).
7320 Replace all uses with calls to new setter functions.
7321 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
7322 (KEYBOARD_INLINE): New macro.
7323 (kset_default_minibuffer_frame, kset_defining_kbd_macro)
7324 (kset_input_decode_map, kset_last_command, kset_last_kbd_macro)
7325 (kset_prefix_arg, kset_system_key_alist, kset_window_system):
7326 New setter functions.
7327 * keyboard.c (KEYBOARD_INLINE):
7328 Define to EXTERN_INLINE, so that the corresponding functions
7329 are compiled into code.
7330 (kset_echo_string, kset_kbd_queue)
7331 (kset_keyboard_translate_table, kset_last_prefix_arg)
7332 (kset_last_repeatable_command, kset_local_function_key_map)
7333 (kset_overriding_terminal_local_map, kset_real_last_command)
7334 (kset_system_key_syms): New setter functions.
7335
f00af5b1
PE
7336 * frame.h (FSET): Remove (Bug#12215).
7337 Replace all uses with calls to new setter functions.
7338 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
7339 (FRAME_INLINE): New macro.
7340 (fset_buffer_list, fset_buried_buffer_list, fset_condemned_scroll_bars)
7341 (fset_current_tool_bar_string, fset_desired_tool_bar_string)
7342 (fset_face_alist, fset_focus_frame, fset_icon_name, fset_menu_bar_items)
7343 (fset_menu_bar_vector, fset_menu_bar_window, fset_name)
7344 (fset_param_alist, fset_root_window, fset_scroll_bars)
7345 (fset_selected_window, fset_title, fset_tool_bar_items)
7346 (fset_tool_bar_position, fset_tool_bar_window): New functions.
7347 * frame.c (FRAME_INLINE):
7348 Define to EXTERN_INLINE, so that the corresponding functions
7349 are compiled into code.
7350 (fset_buffer_predicate, fset_minibuffer_window): New setter functions.
7351
0c94c8d6
PE
7352 A few more naming-convention fixes for getters and setters.
7353 * buffer.c (set_buffer_overlays_before): Move here from buffer.h,
7354 and rename from buffer_overlays_set_before.
7355 (set_buffer_overlays_after): Move here from buffer.h, and rename
7356 from buffer_overlays_set_after.
7357 * buffer.h (buffer_intervals): Rename from buffer_get_intervals.
7358 All uses changed.
7359 (set_buffer_intervals): Rename from buffer_set_intervals.
7360 * intervals.c (set_interval_object): Move here from intervals.h,
7361 and rename from interval_set_object.
7362 (set_interval_left): Move here from intervals.h, and rename from
7363 interval_set_left.
7364 (set_interval_right): Move here from intervals.h, and rename from
7365 interval_set_right.
7366 (copy_interval_parent): Move here from intervals.h, and rename from
7367 interval_copy_parent.
7368 * intervals.h (set_interval_parent): Rename from interval_set_parent.
7369 (set_interval_plist): Rename from interval_set_plist.
7370 Return void, not Lisp_Object, since no caller uses the result.
7371 * lisp.h (string_intervals): Rename from string_get_intervals.
7372 (set_string_intervals): Rename from string_set_intervals.
7373
34dabdb7
PE
7374 * lisp.h (set_char_table_extras): Rename from char_table_set_extras.
7375 (set_char_table_contents): Rename from char_table_set_contents.
0b390a9d 7376 (set_sub_char_table_contents): Rename from sub_char_table_set_contents.
34dabdb7
PE
7377 All uses changed. See the end of
7378 <http://lists.gnu.org/archive/html/emacs-devel/2012-08/msg00549.html>.
7379
742af32f
PE
7380 * lisp.h (CSET): Remove (Bug#12215).
7381 (set_char_table_ascii, set_char_table_defalt, set_char_table_parent)
7382 (set_char_table_purpose): New functions,
7383 replacing CSET. All uses changed. For example, replace
7384 "CSET (XCHAR_TABLE (char_table), parent, parent);" with
c24eb18a 7385 "set_char_table_parent (char_table, parent);".
742af32f
PE
7386 The old version was confusing because it used the same name
7387 'parent' for two different things.
7388
a04e2c62
DA
73892012-08-17 Dmitry Antipov <dmantipov@yandex.ru>
7390
7391 Functions to get and set Lisp_Object fields of buffer-local variables.
7392 * lisp.h (blv_found, set_blv_found, blv_value, set_blv_value)
7393 (set_blv_where, set_blv_defcell, set_blv_valcell): New functions.
7394 (BLV_FOUND, SET_BLV_FOUND, BLV_VALUE, SET_BLV_VALUE): Remove.
7395 * data.c, eval.c, frame.c: Adjust users.
7396
383dcbf9
CY
73972012-08-17 Chong Yidong <cyd@gnu.org>
7398
7399 * xfaces.c (merge_face_vectors): If the target font specfies a
7400 font spec, make the font's attributes take precedence over
7401 directly-specified attributes.
7402 (merge_face_ref): Recognize :font.
7403
44386687
DA
74042012-08-17 Dmitry Antipov <dmantipov@yandex.ru>
7405
7406 Do not use memcpy for copying intervals.
7407 * intervals.c (reproduce_interval): New function.
7408 (reproduce_tree, reproduce_tree_obj): Use it.
7409 (reproduce_tree_obj): Remove prototype.
7410
927c7216
PE
74112012-08-17 Paul Eggert <eggert@cs.ucla.edu>
7412
7413 * lisp.h (duration_to_sec_usec): Remove unused decl.
7414
93044f7b
AA
74152012-08-17 Alp Aker <alp.tekin.aker@gmail.com>
7416
7417 * nsfont.m (ns_ascii_average_width): Send initWithFormat selector
7418 to an allocated instance of NSString, not to the class itself.
7419
9851e4a5
JB
74202012-08-17 Juanma Barranquero <lekktu@gmail.com>
7421
7422 * makefile.w32-in (C_CTYPE_H): New macro.
7423 (LISP_H, $(BLD)/ccl.$(O), $(BLD)/doc.$(O), $(BLD)/w32console.$(O)):
7424 ($(BLD)/fontset.$(O), $(BLD)/frame.$(O), $(BLD)/composite.$(O)):
7425 ($(BLD)/sysdep.$(O), $(BLD)/w32uniscribe.$(O)): Update dependencies.
7426
620f13b0
PE
74272012-08-16 Paul Eggert <eggert@cs.ucla.edu>
7428
7429 Use ASCII tests for character types.
7430 * category.c, dispnew.c, doprnt.c, editfns.c, syntax.c, term.c:
7431 * xfns.c, xterm.c:
7432 Don't include <ctype.h>; was not needed.
7433 * charset.c, doc.c, fileio.c, font.c, frame.c, gtkutil.c, image.c:
7434 * sysdep.c, xfaces.c:
7435 Include <c-ctype.h> instead of <ctype.h>.
7436 * nsterm.m: Include <c-ctype.h>.
7437 * charset.c (read_hex):
7438 * doc.c (Fsnarf_documentation):
7439 * fileio.c (IS_DRIVE) [WINDOWSNT]:
7440 (DRIVE_LETTER) [DOS_NT]:
7441 (Ffile_name_directory, Fexpand_file_name)
7442 (Fsubstitute_in_file_name):
7443 * font.c (font_parse_xlfd, font_parse_fcname):
7444 * frame.c (x_set_font_backend):
7445 * gtkutil.c (xg_get_font):
7446 * image.c (xbm_scan, xpm_scan, pbm_scan_number):
7447 * nsimage.m (hexchar):
7448 * nsterm.m (ns_xlfd_to_fontname):
7449 * sysdep.c (system_process_attributes):
7450 * xfaces.c (hash_string_case_insensitive):
7451 Use C-locale tests instead of locale-specific tests for character
7452 types, since we want the ASCII interpretation here, not the
7453 interpretation suitable for whatever happens to be the current locale.
7454
52162052
MR
74552012-08-16 Martin Rudalics <rudalics@gmx.at>
7456
7457 Consistently check windows for validity/liveness
7458 (Bug#11984, Bug#12025, Bug#12026).
7459 * lisp.h (CHECK_VALID_WINDOW): New macro.
7460 * window.c (decode_window): Rename to decode_live_window.
7461 (decode_valid_window, Fwindow_valid_p): New functions.
7462 (Fwindow_frame, Fframe_root_window, Fwindow_minibuffer_p)
7463 (Fframe_first_window, Fframe_selected_window, Fwindow_parent)
7464 (Fwindow_top_child, Fwindow_left_child, Fwindow_next_sibling)
7465 (Fwindow_prev_sibling, Fwindow_combination_limit)
7466 (Fset_window_combination_limit, Fwindow_use_time)
7467 (Fwindow_total_height, Fwindow_total_width, Fwindow_new_total)
7468 (Fwindow_normal_size, Fwindow_new_normal, Fwindow_left_column)
7469 (Fwindow_top_line, Fwindow_body_height, Fwindow_body_width)
7470 (Fwindow_hscroll, Fset_window_hscroll)
7471 (Fwindow_redisplay_end_trigger)
7472 (Fset_window_redisplay_end_trigger, Fwindow_edges)
7473 (Fwindow_pixel_edges, Fwindow_absolute_pixel_edges)
7474 (Fwindow_inside_edges, Fwindow_inside_pixel_edges)
7475 (Fcoordinates_in_window_p, Fwindow_point, Fwindow_start)
7476 (Fwindow_end, Fset_window_point, Fset_window_start)
7477 (Fpos_visible_in_window_p, Fwindow_line_height)
7478 (Fwindow_dedicated_p, Fset_window_dedicated_p)
7479 (Fwindow_prev_buffers, Fset_window_prev_buffers)
7480 (Fwindow_next_buffers, Fwindow_parameters, Fwindow_parameter)
7481 (Fset_window_parameter, Fwindow_display_table)
7482 (Fset_window_display_table, Fdelete_other_windows_internal)
7483 (Fset_window_buffer, Fset_window_new_total)
7484 (Fset_window_new_normal, Fdelete_window_internal)
7485 (Fwindow_text_height, Fset_window_margins, Fwindow_margins)
7486 (Fset_window_fringes, Fwindow_fringes, Fset_window_scroll_bars)
7487 (Fwindow_scroll_bars): Check whether argument window is a valid or
7488 live window. Update doc-strings.
7489 (syms_of_window): New symbol Qwindow_valid_p.
7490 * keyboard.c (Fposn_at_x_y): Check whether argument
7491 frame_or_window denotes a valid window.
7492
2751c80f
DA
74932012-08-16 Dmitry Antipov <dmantipov@yandex.ru>
7494
7495 Fix previous char table change.
7496 * lisp.h (CHAR_TABLE_SET): Use sub_char_table_set_contents.
7497 * chartab.c (optimize_sub_char_table): Likewise.
7498
032a42c8
CY
74992012-08-16 Chong Yidong <cyd@gnu.org>
7500
a2d19368
CY
7501 * gtkutil.c (xg_get_font): Demand an Xft font (Bug#3228).
7502
032a42c8
CY
7503 * xfont.c (xfont_open):
7504 * xftfont.c (xftfont_open): Set the font's max_width field.
7505
7506 * nsfont.m (nsfont_open): Similar to the Xft backend, set
7507 min_width to space_width and average_width to the average over
7508 printable ASCII characters.
7509 (ns_char_width): Code cleanup.
7510 (ns_ascii_average_width): New utility function.
7511
7512 * font.h (struct font): Update comments.
7513
a098c930
DA
75142012-08-16 Dmitry Antipov <dmantipov@yandex.ru>
7515
032a42c8 7516 Simple interface to set Lisp_Object fields of character tables.
a098c930
DA
7517 * lisp.h (CSET): New macro.
7518 (char_table_set_extras, char_table_set_contents)
7519 (sub_char_table_set_contents): New function.
7520 * casetab.c, category.c, chartab.c, fns.c, fontset.c, search.c:
7521 * syntax.c: Adjust users.
7522
8be3a09c
SM
75232012-08-16 Stefan Monnier <monnier@iro.umontreal.ca>
7524
7525 * eval.c (eval_sub): Bind lexical-binding.
7526 * lread.c (Qlexical_binding): Make non-static.
7527
ac4845a6
JD
75282012-08-15 Jan Djärv <jan.h.d@swipnet.se>
7529
ddee6515
JD
7530 * nsmenu.m (popupSession): Remove.
7531 (pop_down_menu): Remove endModalSession.
7532 (timeout_handler:): New method.
7533 (runDialogAt:): Get next timeout. Start a NSTimer with that timeout.
7534 Call runModalForWindow. Check timer_fired when it returns.
7535 If not set, cancel timer and break out of loop.
7536 Otherwise loop again, with a new timeout.
7537
7538 * nsterm.m: Include fcntl.h if present.
7539 (fd_entry, t_readfds, inNsSelect): Remove.
7540 (select_writefds, select_valid, select_timeout, selfds)
7541 (select_mutex, apploopnr): Add.
7542 (EV_TRAILER): Call kbd_buffer_store_event_hold only if q_event_ptr.
7543 Otherwise call kbd_buffer_store_event.
7544 (ns_send_appdefined): Remove release of fd_entry.
7545 (ns_read_socket): Always send appdefined. Remove inNsSelect check.
7546 Increment and decrement apploopnr.
7547 (ns_select): If no file descriptors, just do a NSTimer.
7548 Otherwise copy read/write masks and start select thread (fd_handler).
7549 Start main loop and wait for application defined event.
7550 Inform select thread to stop selecting after main loop is exited.
7551 (ns_term_init): Create selfds pipe and set non-blocking.
fc0c31f8 7552 Initialize select_mutex. Start the select thread (fd_handler).
ddee6515
JD
7553 (fd_handler:): Loop forever, wait for info from the main thread
7554 to either start or stop selecting. When select returns, send
7555 and appdefined event.
7556 (sendScrollEventAtLoc:fromEvent:): Check if q_event_ptr is set.
7557 If not call kbd_buffer_store_event.
7558
7559 * nsterm.h (EmacsApp): fd_handler takes id argument.
7560 (EmacsDialogPanel): Add timer_fired and timeout_handler.
7561
ac4845a6
JD
7562 * gtkutil.c (xg_mark_data): Use FRAME_X_P.
7563
eb424fe3
EZ
75642012-08-15 Eli Zaretskii <eliz@gnu.org>
7565
7566 * region-cache.c (move_cache_gap): Update gap_len using the actual
7567 growth of the boundaries array. Do not change cache_len.
7568 (Bug#12196)
7569
4e6a86c6
DA
75702012-08-15 Dmitry Antipov <dmantipov@yandex.ru>
7571
7572 Generalize and cleanup font subsystem checks.
7573 * font.h (FONT_DEBUG, font_assert): Remove.
8be3a09c
SM
7574 * font.c, fontset.c, w32font.c, xfont.c, xftfont.c:
7575 Change font_assert to eassert. Use eassert where appropriate.
4e6a86c6 7576
5bf192ca
DA
75772012-08-15 Dmitry Antipov <dmantipov@yandex.ru>
7578
7579 * gtkutil.c (xg_get_font): Use pango_units_to_double.
7580
f2045622
CY
75812012-08-15 Chong Yidong <cyd@gnu.org>
7582
8be3a09c
SM
7583 * gtkutil.c (xg_get_font): Rename from xg_get_font_name.
7584 When using the new font chooser, use gtk_font_chooser_get_font_desc to
7585 extract the font descriptor instead of just the font name.
7586 In that case, return a font spec instead of a string.
f2045622
CY
7587 (x_last_font_name): Move to this file from xfns.c.
7588
7589 * xfns.c (Fx_select_font): The return value can also be a font
7590 spec. Move x_last_font_name management to gtkutil.c.
7591
7592 * xfaces.c: Make font weight and style symbols non-static.
7593
7f6feb56
SM
75942012-08-15 Stefan Monnier <monnier@iro.umontreal.ca>
7595
7596 * minibuf.c (read_minibuf): Ignore caller's inhibit-read-only
7597 (bug#12117).
7598
fecbd8ff
SM
75992012-08-14 Stefan Monnier <monnier@iro.umontreal.ca>
7600
7601 * alloc.c (Fgarbage_collect): Use plural form consistently.
7602
9b8d5165
EZ
76032012-08-14 Eli Zaretskii <eliz@gnu.org>
7604
7605 * keyboard.c (command_loop_1): Reset ignore_mouse_drag_p flag each
7606 iteration through the command loop. Fixes a problem whereby mouse
7607 movements are ignored until the first mouse click.
7608
f5d9e83a
PE
76092012-08-14 Paul Eggert <eggert@cs.ucla.edu>
7610
7611 Use bool, not int, for Lisp booleans.
7612 This is more natural, and on my platform (GCC 4.7.1 x86-64) it
7613 makes Emacs a bit smaller and presumably a bit faster.
7614 * lisp.h: Include <stdbool.h>.
7615 (struct Lisp_Boolfwd, defvar_bool):
7616 * lread.c (defvar_bool): Use bool, not int, for Lisp booleans.
7617 * regex.c [!emacs]: Include <stdbool.h>.
7618 (false, true): Remove; <stdbool.h> does this for us now.
7619
55802e4a
CY
76202012-08-14 Chong Yidong <cyd@gnu.org>
7621
4abcdac8
CY
7622 * character.c (Fcharacterp): Doc fix (Bug#12076).
7623
7624 * data.c (Findirect_variable): Doc fix (Bug#11040).
7625
55802e4a
CY
7626 * chartab.c (Fmap_char_table): Doc fix (Bug#12061).
7627
7628 * editfns.c (Fformat): Doc fix (Bug#12059).
4abcdac8 7629 (Fsave_current_buffer): Doc fix (Bug#11542).
55802e4a 7630
8e99d072
BR
76312012-08-14 Barry OReilly <gundaetiapo@gmail.com> (tiny change)
7632
7633 * keyboard.c (access_keymap_keyremap): Accept anonymous functions
7634 (bug#12022).
7635
08908aca
MR
76362012-08-14 Martin Rudalics <rudalics@gmx.at>
7637
7638 * frame.c (make_frame_without_minibuffer, make_minibuffer_frame)
7639 (delete_frame, Fmake_frame_invisible, Ficonify_frame):
7640 * minibuf.c (choose_minibuf_frame, read_minibuf):
7641 * w32fns.c (x_create_tip_frame):
7642 * xfns.c (x_create_tip_frame): Call set_window_buffer instead of
7643 Fset_window_buffer (Bug#11984, Bug#12025, Bug#12026).
7644
56120d6f
PE
76452012-08-14 Paul Eggert <eggert@cs.ucla.edu>
7646
7647 * intervals.c (offset_intervals): Remove obsolete comment.
7648
67b77c0b
AS
76492012-08-14 Andreas Schwab <schwab@linux-m68k.org>
7650
7651 * gtkutil.c (find_rtl_image, update_frame_tool_bar): Use NILP.
7652
f48b82fd
GR
76532012-08-14 Gergely Risko <gergely@risko.hu>
7654
7655 * coding.c (decode_coding): Record buffer modification before
7656 disabling undo_list (Bug#11773).
7657
fd318b54
DA
76582012-08-14 Dmitry Antipov <dmantipov@yandex.ru>
7659
7660 Revert and cleanup some recent overlay changes.
7661 * buffer.h (enum overlay_type): Remove.
7662 (buffer_get_overlays, buffer_set_overlays): Likewise.
7663 (buffer_set_overlays_before, buffer_set_overlays_after):
7664 New function. Adjust users.
7665 (unchain_both): Add eassert.
7666
41a62dd9
DA
76672012-08-14 Dmitry Antipov <dmantipov@yandex.ru>
7668
7669 * gtkutil.c (update_frame_tool_bar): Use EQ where appropriate.
7670
5884c324
PE
76712012-08-14 Paul Eggert <eggert@cs.ucla.edu>
7672
7673 * gtkutil.c (xg_mark_data): Don't assume C99.
7674
ca06f160
JD
76752012-08-13 Jan Djärv <jan.h.d@swipnet.se>
7676
7677 * gtkutil.c (xg_frame_tb_info): New struct.
7678 (TB_INFO_KEY): New define.
7679 (xg_free_frame_widgets): Free xg_frame_tb_info for frame if present.
7680 (xg_mark_data): Mark Lisp_Objects in xg_frame_tb_info.
7681 (xg_create_tool_bar): Allocate and initialize a xg_frame_tb_info
7682 if not present.
7683 (update_frame_tool_bar): Return early if data in xg_frame_tb_info
fc0c31f8 7684 is up to date. Otherwise store new data.
ca06f160
JD
7685 (free_frame_tool_bar): Free xg_frame_tb_info if present.
7686
7864a3f7
DA
76872012-08-13 Dmitry Antipov <dmantipov@yandex.ru>
7688
7689 Use KSET for write access to Lisp_Object members of struct kboard.
7690 * keyboard.h (KSET): New macro.
7691 * callint.c, category.c, frame.c, keyboard.c, keyboard.h, macros.c:
7692 * msdos.c, nsfns.m, nsterm.m, term.c, w32fns.c, w32term.c, xfns.c:
7693 * xterm.c: Adjust users.
7694
4c31be61
DA
76952012-08-13 Dmitry Antipov <dmantipov@yandex.ru>
7696
7697 Use BSET for write access to Lisp_Object members of struct buffer.
7698 * buffer.h (BSET): New macro.
7699 * buffer.c, casetab.c, cmds.c, coding.c, data.c, editfns.c:
7700 * fileio.c, frame.c, indent.c, insdel.c, intervals.c, keymap.c:
7701 * minibuf.c, print.c, process.c, syntax.c, undo.c, w32fns.c:
7702 * window.c, xdisp.c, xfns.c: Adjust users.
7703
14ae4239
BT
77042012-08-11 BT Templeton <bpt@hcoop.net> (tiny change)
7705
7706 * lread.c (syms_of_lread): Initialize Vlexical_binding.
7707
32bcadb4
JD
77082012-08-11 Jan Djärv <jan.h.d@swipnet.se>
7709
3d29b2ce 7710 * nsterm.m (not_in_argv): New function.
fc0c31f8 7711 (application:openFile, application:openTempFile:):
3d29b2ce
JD
7712 (application:openFileWithoutUI:, application:openFiles:): Open file
7713 if not_in_argv returns non-zero (bug#12171).
7714
32bcadb4 7715 * gtkutil.c (gtk_font_chooser_dialog_new, GTK_FONT_CHOOSER)
14ae4239
BT
7716 (gtk_font_chooser_set_font, gtk_font_chooser_get_font):
7717 Define for Gtk+ versions less than 3.2.
32bcadb4
JD
7718 (xg_get_font_name): Use those functions/macros here.
7719 Reported by Frans Oilinki <moilinki@gmail.com>.
7720
9ff9402d 77212012-08-11 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
8ccd072a
YM
7722
7723 * unexmacosx.c (copy_data_segment): Copy initialized data in
7724 statically linked libraries from input file rather than memory.
7725
db74a5fc
YM
7726 * unexmacosx.c (print_load_command_name): Add cases LC_MAIN,
7727 LC_SOURCE_VERSION, and LC_DYLIB_CODE_SIGN_DRS.
7728 (dump_it) [LC_DYLIB_CODE_SIGN_DRS]: Call copy_linkedit_data.
7729
25e65510
GM
77302012-08-10 Glenn Morris <rgm@gnu.org>
7731
7732 * conf_post.h (IF_LINT, lint_assume): Move here from lisp.h.
7733 * lisp.h (IF_LINT, lint_assume): Move to conf_post.h.
7734
7961135c
DA
77352012-08-10 Dmitry Antipov <dmantipov@yandex.ru>
7736
7737 Fix last change to allow compilation with low optimization levels.
7738 * intervals.c (INTERVALS_INLINE): Define to EXTERN_INLINE.
7739 Reported by Jan Djärv <jan.h.d@swipnet.se>.
7740
42b3a444
DA
77412012-08-10 Dmitry Antipov <dmantipov@yandex.ru>
7742
7743 Use common inline syntax in intervals.h.
7744 * intervals.h (INTERVALS_INLINE): New macro.
7745 Change all users from LISP_INLINE.
7746
9fb0c957
DA
77472012-08-10 Dmitry Antipov <dmantipov@yandex.ru>
7748
7749 Define Qnone once for all platforms.
7750 * frame.c (Qnone): Define here.
7751 (syms_of_frame): DEFSYM it.
7752 * lisp.h (Qnone): New declaration.
7753 * nsfns.m, nsterm.h, nsterm.m, w32fns.c, w32font.c:
7754 * xfns.c: Remove duplication. Adjust users.
7755
65e8ee52
DA
77562012-08-10 Dmitry Antipov <dmantipov@yandex.ru>
7757
7758 Remove unused macros from intervals.h.
7759 * intervals.h (MERGE_INSERTIONS, DISPLAY_INVISIBLE_GLYPH): Remove.
7760 * intervals.c: Adjust comment.
7761
9b855fd6
EZ
77622012-08-10 Eli Zaretskii <eliz@gnu.org>
7763
7764 * w32fns.c <w32_unicode_gui>: New static variable.
7765 (globals_of_w32fns): Initialize it according to os_subtype.
7766 (w32_init_class, w32_msg_pump, w32_wnd_proc): Use it instead of
7767 testing os_subtype.
7768
39cb9e56 77692012-08-10 Joakim Hårsman <joakim.harsman@gmail.com> (tiny change)
d30be705
EZ
7770 Eli Zaretskii <eliz@gnu.org>
7771
7772 Fix bug #10299 with Unicode characters sent by customized
7773 keyboards created by MSKLC.
7774 * w32fns.c (INIT_WINDOW_CLASS): New macro.
7775 (w32_init_class): Use it to initialize the Emacs class with either
7776 ANSI or Unicode API calls.
7777 (w32_msg_pump): Call GetMessageW and DispatchMessageW on NT and
7778 later.
7779 (w32_wnd_proc): If the character code sent by WM_CHAR or
7780 WM_SYSCHAR is above 255, post a WM_UNICHAR message, not the
7781 original message. Call DefWindowProcW on NT and later.
7782
9374581a
GM
77832012-08-10 Glenn Morris <rgm@gnu.org>
7784
4b94e8cf
GM
7785 * Makefile.in (config_h): Fix conf_post.h out-of-tree build location.
7786
9374581a
GM
7787 * lisp.h (DIRECTORY_SEP): Let configure set it.
7788
a2752828
DA
77892012-08-09 Dmitry Antipov <dmantipov@yandex.ru>
7790
7791 Use TSET for write access to Lisp_Object slots of struct terminal.
7792 * termhooks.h (TSET): New macro.
7793 * coding.c, terminal.c, xselect.c: Adjust users.
7794
cc92c454
SM
77952012-08-08 Stefan Monnier <monnier@iro.umontreal.ca>
7796
7797 * xdisp.c (safe_eval_handler): Remove prototype. Receive args describing
7798 the failing expression, include them in the error message.
7799 * eval.c (internal_condition_case_n): Pass nargs and args to hfun.
7800 * lisp.h (internal_condition_case_n): Update declaration.
7801
4cb3e6b3
DA
78022012-08-08 Dmitry Antipov <dmantipov@yandex.ru>
7803
7804 Inline functions to examine and change buffer overlays.
7805 * buffer.c (unchain_both): New function.
7806 * buffer.h (buffer_get_overlays, buffer_set_overlays):
7807 (buffer_has_overlays): New function.
7808 (enum overlay_type): New enum.
7809 * alloc.c, buffer.c, editfns.c, fileio.c, indent.c:
7810 * insdel.c, intervals.c, print.c, xdisp.c: Adjust users.
7811
8707c1e5
DA
78122012-08-08 Dmitry Antipov <dmantipov@yandex.ru>
7813
7814 Inline functions to examine and change buffer intervals.
7815 * alloc.c (mark_interval_tree): Remove.
7816 (MARK_INTERVAL_TREE): Simplify.
7817 (UNMARK_BALANCE_INTERVALS): Remove. Adjust users.
7818 * intervals.c (buffer_balance_intervals): New function.
7819 (graft_intervals_into_buffer): Adjust indentation.
7820 (set_intervals_multibyte): Simplify.
7821 * buffer.h (BUF_INTERVALS): Remove.
7822 (buffer_get_intervals, buffer_set_intervals): New function.
7823 * alloc.c, buffer.c, editfns.c, fileio.c, indent.c, insdel.c:
7824 * intervals.c, textprop.c: Adjust users.
7825
ad8c997f
DA
78262012-08-08 Dmitry Antipov <dmantipov@yandex.ru>
7827
7828 Inline functions to examine and change string intervals.
7829 * lisp.h (STRING_INTERVALS, STRING_SET_INTERVALS): Remove.
7830 (string_get_intervals, string_set_intervals): New function.
7831 * alloc.c, buffer.c, editfns.c, fns.c, insdel.c, intervals.c:
7832 * lread.c, print.c, textprop.c: Adjust users.
7833
32ac3a6b
GM
78342012-08-08 Glenn Morris <rgm@gnu.org>
7835
7836 * lisp.mk (lisp): Remove language/persian.elc.
7837
77c7bcb1
DA
78382012-08-08 Dmitry Antipov <dmantipov@yandex.ru>
7839
7840 Cleanup intervals.
7841 * intervals.h (NULL_INTERVAL, DEFAULT_INTERVAL): Remove.
7842 (NULL_INTERVAL_P): Likewise. Adjust users.
14ae4239
BT
7843 (FRONT_STICKY_P, END_NONSTICKY_P, FRONT_NONSTICKY_P):
7844 Adjust comment. Move under #if 0.
77c7bcb1
DA
7845 * alloc.c, buffer.c, editfns.c, fns.c, insdel.c, intervals.c:
7846 * print.c, syntax.c, textprop.c, xdisp.c: Adjust users.
7847
9c08a8d4
DA
78482012-08-08 Dmitry Antipov <dmantipov@yandex.ru>
7849
7850 Check total length of intervals with eassert.
7851 * intervals.h (CHECK_TOTAL_LENGTH): Remove.
7852 * intervals.c: Change all users to eassert.
7853
26d16b35
EZ
78542012-08-07 Eli Zaretskii <eliz@gnu.org>
7855
14ae4239
BT
7856 * .gdbinit (xframe, xwindow, nextcons, xcar, xcdr, xlist):
7857 Rename fields to match removal of FGET and WGET and disuse of
26d16b35
EZ
7858 INTERNAL_FIELD in Lisp_Cons.
7859
c644523b
DA
78602012-08-07 Dmitry Antipov <dmantipov@yandex.ru>
7861
7862 Revert and cleanup Lisp_Cons, Lisp_Misc and Lisp_Symbol things.
7863 * lisp.h (struct Lisp_Symbol): Change xname to meaningful
7864 name since all xname users are fixed long time ago. Do not
7865 use INTERNAL_FIELD.
7866 (set_symbol_name, set_symbol_function, set_symbol_plist):
7867 (set_symbol_next, set_overlay_plist): New function.
7868 (struct Lisp_Cons): Do not use INTERNAL_FIELD.
7869 (struct Lisp_Overlay): Likewise.
7870 (CVAR, MVAR, SVAR): Remove.
7871 * alloc.c, buffer.c, buffer.h, bytecode.c, cmds.c, data.c:
7872 * doc.c, eval.c, fns.c, keyboard.c, lread.c, nsselect.m:
7873 * xterm.c: Adjust users.
7874 * .gdbinit: Change to use name field of struct Lisp_Symbol
7875 where appropriate.
7876
6a3d20cc
DA
78772012-08-07 Dmitry Antipov <dmantipov@yandex.ru>
7878
7879 Basic functions to set Lisp_Object and pointer slots of intervals.
7880 * intervals.h (interval_set_parent, interval_set_object):
7881 (interval_set_left, interval_set_right, interval_set_plist):
7882 (interval_copy_parent): New function.
7883 (SET_INTERVAL_OBJECT, SET_INTERVAL_PARENT, INTERVAL_PTR_SIZE): Remove.
14ae4239
BT
7884 (RESET_INTERVAL, COPY_INTERVAL_CACHE, MERGE_INTERVAL_CACHE):
7885 Adjust indentation.
6a3d20cc
DA
7886 (INTERVAL_SIZE): Remove. Adjust users.
7887 * alloc.c, intervals.c, lread.c, textprop.c: Use new functions.
7888
4d2b044c
DA
78892012-08-07 Dmitry Antipov <dmantipov@yandex.ru>
7890
7891 Drop PGET and revert read access to Lisp_Objects slots of Lisp_Process.
7892 * process.h (PGET): Remove.
7893 (struct Lisp_Process): Do not use INTERNAL_FIELD.
7894 * gnutls.c, print.c, process.c, sysdep.c, w32.c, xdisp.c: Adjust users.
7895
d3d50620
DA
78962012-08-07 Dmitry Antipov <dmantipov@yandex.ru>
7897
7898 Drop WGET and revert read access to Lisp_Objects slots of struct window.
7899 * window.h (WGET): Remove.
7900 (struct window): Do not use INTERNAL_FIELD.
7901 * alloc.c, buffer.c, composite.c, dispextern.h, dispnew.c, editfns.c:
7902 * fileio.c, font.c, fontset.c, frame.c, frame.h, fringe.c, indent.c:
7903 * insdel.c, keyboard.c, keymap.c, lisp.h, minibuf.c, msdos.c, nsfns.m:
7904 * nsmenu.m, nsterm.m, print.c, textprop.c, w32fns.c, w32menu.c:
7905 * w32term.c, window.c, xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c:
7906 Adjust users.
7907
d10a51dc
CY
79082012-08-07 Chong Yidong <cyd@gnu.org>
7909
7910 * window.c (Fwindow_edges, Fwindow_pixel_edges)
7911 (Fwindow_absolute_pixel_edges, Fdelete_other_windows_internal)
7912 (Fdelete_window_internal): Signal an error if the window is not on
7913 a live frame (Bug#12025).
7914
e69b0960
DA
79152012-08-07 Dmitry Antipov <dmantipov@yandex.ru>
7916
7917 Drop FGET and revert read access to Lisp_Objects slots of struct frame.
7918 * frame.h (FGET): Remove.
7919 (struct frame): Do not use INTERNAL_FIELD.
7920 * buffer.c, data.c, dispnew.c, dosfns.c, eval.c, fontset.c, frame.c:
7921 * fringe.c, gtkutil.c, minibuf.c, msdos.c, nsfns.m, nsmenu.m, nsterm.m:
7922 * print.c, term.c, w32fns.c, w32menu.c, w32term.c, window.c, window.h:
7923 * xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c: Adjust users.
7924
25a20a3a
JB
79252012-08-06 Juanma Barranquero <lekktu@gmail.com>
7926
7927 * w32.c: Silence compiler warnings.
7928 (map_w32_filename): Remove unused variable `is_fat'.
7929 (chase_symlinks): Add parentheses around expression.
7930
1c6f11f4
GM
79312012-08-06 Glenn Morris <rgm@gnu.org>
7932
1db4583a
GM
7933 * sysdep.c: Respect BROKEN_GETWD.
7934
1c6f11f4
GM
7935 * dispnew.c (GNU_LIBRARY_PENDING_OUTPUT_COUNT, PENDING_OUTPUT_COUNT):
7936 Let configure handle it.
7937 (stdio_ext.h) [DISPNEW_NEEDS_STDIO_EXT]: Include it.
7938
2b90362b
DA
79392012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
7940
7941 Use GCALIGNMENT where appropriate.
7942 * alloc.c (XMALLOC_HEADER_ALIGNMENT, roundup_size):
7943 (union aligned_Lisp_Symbol, union aligned_Lisp_Misc):
7944 (mark_maybe_pointer, pure_alloc): Change to use GCALIGNMENT.
7945
5f50daf2
EZ
79462012-08-06 Eli Zaretskii <eliz@gnu.org>
7947
14ae4239
BT
7948 * w32menu.c (set_frame_menubar, initialize_frame_menubar):
7949 Don't use FRAME_MENU_BAR_ITEMS as an lvalue.
5f50daf2 7950
cbcc7007
SM
79512012-08-06 Stefan Monnier <monnier@iro.umontreal.ca>
7952
7953 * buffer.h (struct buffer): Revert `indirections' to a simple int;
7954 that should be sufficient for everyone.
7955
4d365fa4
JD
79562012-08-06 Jan Djärv <jan.h.d@swipnet.se>
7957
7958 * keyboard.c (timer_check_2): Add break so timer_check returns next
7959 timeout.
7960
dd86bd82
DA
79612012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
7962
7963 Fix Windows build errors introduced after converting to WGET and WSET.
7964 * w32term.c (w32_set_vertical_scroll_bar): Change to use WSET.
7965 Reported by Andy Moreton <andrewjmoreton@gmail.com>.
7966
054e1668
JD
79672012-08-06 Jan Djärv <jan.h.d@swipnet.se>
7968
7969 * nsterm.m (ns_frame_rehighlight): Use FSET.
7970
7971 * nsmenu.m (ns_update_menubar): Use FSET.
7972
21238f11
DA
79732012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
7974
7975 Separate read and write access to Lisp_Object slots of Lisp_Process.
7976 * process.h (PGET, PSET): New macros similar to AREF and ASET.
7977 * gnutls.c, print.c, process.c, sysdep.c, w32.c, xdisp.c: Adjust users.
7978
077288cf
DA
79792012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
7980
7981 Separate read and write access to Lisp_Object slots of struct window.
7982 * window.h (WGET, WSET): New macros similar to AREF and ASET.
7983 * alloc.c, buffer.c, composite.c, dispextern.h, dispnew.c, editfns.c:
7984 * fileio.c, font.c, fontset.c, frame.c, frame.h, fringe.c, indent.c:
7985 * insdel.c, keyboard.c, keymap.c, lisp.h, minibuf.c, msdos.c, nsfns.m:
7986 * nsmenu.m, nsterm.m, print.c, textprop.c, w32fns.c, w32menu.c:
7987 * w32term.c, window.c, xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c:
7988 Adjust users.
7989
71688bd7
DA
79902012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
7991
7992 Fix Windows build errors introduced after converting to FGET and FSET.
7993 * w32term.c (x_frame_rehighlight, x_scroll_bar_create):
7994 (w32_condemn_scroll_bars, w32_redeem_scroll_bar):
7995 (w32_judge_scroll_bars): Change to use FSET.
7996 Reported by Andy Moreton <andrewjmoreton@gmail.com>.
7997
f99bac93
DA
79982012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
7999
8000 Fix replacement typo.
8001 * window.c (replace_window): Set root_window instead of
8002 selected_window. This fixes a total window subsystem
8003 malfunction reported by Bastien Guerry <bzg@gnu.org>.
8004
8c2a0f2d
GM
80052012-08-06 Glenn Morris <rgm@gnu.org>
8006
8007 * lisp.mk (lisp): Add language/persian.elc.
8008
edd74c35
DA
80092012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
8010
8011 Separate read and write access to Lisp_Object slots of struct frame.
8012 * frame.h (FGET, FSET): New macros similar to AREF and ASET.
8013 * buffer.c, data.c, dispnew.c, dosfns.c, eval.c, fontset.c, frame.c:
8014 * fringe.c, gtkutil.c, minibuf.c, msdos.c, nsfns.m, nsmenu.m, nsterm.m:
8015 * print.c, term.c, w32fns.c, w32menu.c, w32term.c, window.c, window.h:
8016 * xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c: Adjust users.
8017
8671676c
AS
80182012-08-05 Andreas Schwab <schwab@linux-m68k.org>
8019
8020 * emacs.c (decode_env_path): Only use defaulted if WINDOWSNT.
8021
663e2b3f
DA
80222012-08-05 Dmitry Antipov <dmantipov@yandex.ru>
8023
8024 Generalize common compile-time constants.
8025 * lisp.h (header_size, bool_header_size, word_size): Now here.
8026 (struct Lisp_Vector): Add comment.
8027 (struct Lisp_Bool_Vector): Move up to define handy constants.
8028 (VECSIZE, PSEUDOVECSIZE): Simplify.
8029 (SAFE_ALLOCA_LISP): Use new constant. Adjust indentation.
8030 * buffer.c, buffer.h, bytecode.c, callint.c, eval.c, fns.c:
8031 * font.c, fontset.c, keyboard.c, keymap.c, macros.c, menu.c:
8032 * msdos.c, w32menu.c, w32term.h, window.c, xdisp.c, xfaces.c:
8033 * xfont.c, xmenu.c: Use word_size where appropriate.
8034
d32e47af
LM
80352012-08-05 Lawrence Mitchell <wence@gmx.li>
8036
8037 * search.c (Freplace_match): Treat \? in the replacement text
8038 literally (Bug#8161).
8039
e5d9c0d1
CY
80402012-08-05 Chong Yidong <cyd@gnu.org>
8041
8042 * term.c (Vsuspend_tty_functions, Vresume_tty_functions):
8043 * frame.c (Vdelete_frame_functions):
8044 * emacs.c (Vkill_emacs_hook): Doc fix.
8045
8da0576b
EZ
80462012-08-04 Eli Zaretskii <eliz@gnu.org>
8047
8048 * xfns.c (x_set_menu_bar_lines): Fix compilation error in
8049 --with-x-toolkit=no builds.
8050 Reported by Carsten Mattner <carstenmattner@gmail.com>.
8051
02676e5d
CY
80522012-08-04 Chong Yidong <cyd@gnu.org>
8053
8054 * syntax.c (Fmodify_syntax_entry): Doc fix.
8055
97147da9
EZ
80562012-08-04 Eli Zaretskii <eliz@gnu.org>
8057
76151e2c
EZ
8058 Fix startup warnings about ../site-lisp on MS-Windows. (Bug#11959)
8059 * w32.c (init_environment): Change the default values of many
8060 environment variables in dflt_envvars[] to NULL, to avoid pushing
14ae4239
BT
8061 them into environment when they were not already defined.
8062 Remove the code that deletes site-lisp subdirectories from the default
76151e2c 8063 value of EMACSLOADPATH, as it is no longer needed.
14ae4239
BT
8064 (check_windows_init_file): Now external, not static.
8065 Use Vload_path as is, without adding anything, as this function is now
76151e2c
EZ
8066 called when Vload_path is already set up.
8067
8068 * w32.h (check_windows_init_file): Add prototype.
8069
8070 * emacs.c (init_cmdargs) [WINDOWSNT]: When running from the build
8071 directory, ignore the /*/i386/ tail in Vinvocation_directory, for
8072 compatibility with Posix platforms.
8073 (main): Move the call to check_windows_init_file to here from
8074 w32.c.
8075 (decode_env_path) [WINDOWSNT]: Expand the %emacs_dir%/ prefix, if
8076 any, in the DEFALT argument into the root of the Emacs build or
8077 installation tree, as appropriate.
8078
8079 * callproc.c (init_callproc_1): Call decode_env_path instead of
8080 doing its equivalent by hand.
8081 (init_callproc): Replace DOS_NT condition with MSDOS, thus letting
8082 the code that sets Vexec_path run on MS-Windows.
8083
8084 * lread.c (init_lread): Add comments to #ifdef's.
8085
97147da9
EZ
8086 * msdos.c (dos_set_window_size, IT_update_begin)
8087 (IT_frame_up_to_date, IT_set_frame_parameters): Use FVAR and WVAR
8088 instead of direct references.
8089
185ee146
PE
80902012-08-04 Paul Eggert <eggert@cs.ucla.edu>
8091
8092 Export DEFAULT_REHASH_* to GDB.
8093 * lisp.h (DEFAULT_REHASH_THRESHOLD, DEFAULT_REHASH_SIZE):
8094 Now constants, not macros.
8095
8834c57a
PE
80962012-08-03 Paul Eggert <eggert@cs.ucla.edu>
8097
98c6f1e3
PE
8098 Remove unnecessary casts involving pointers.
8099 These casts are no longer needed now that we assume C89 or later,
8100 since they involve casting to or from void *.
8101 * alloc.c (make_pure_string, make_pure_c_string, pure_cons)
8102 (make_pure_float, make_pure_vector):
8103 * lisp.h (SAFE_ALLOCA, SAFE_ALLOCA_LISP):
8104 * macros.c (Fstart_kbd_macro):
8105 * menu.c (find_and_return_menu_selection):
8106 * minibuf.c (read_minibuf_noninteractive):
8107 * sysdep.c (closedir):
8108 * xdisp.c (x_produce_glyphs):
8109 * xfaces.c (compare_fonts_by_sort_order):
8110 * xfns.c (x_real_positions, select_visual):
8111 * xselect.c (x_stop_queuing_selection_requests)
8112 (x_get_window_property, x_get_window_property_as_lisp_data):
8113 * xterm.c (x_set_frame_alpha, x_find_modifier_meanings):
8114 Remove unnecessary pointer casts.
8115 * alloc.c (record_xmalloc): New function.
8116 * lisp.h (record_xmalloc): New decl.
8117 (SAFE_ALLOCA): Now takes just one arg -- the size -- and acts
8118 more like a function. This is because the pointer cast is not
8119 needed. All uses changed.
8120 * print.c (print_string, print_error_message): Avoid length recalc.
8121
8834c57a
PE
8122 Improve fix for macroexp crash with debugging (Bug#12118).
8123 * lisp.h (ASET) [ENABLE_CHECKING]: Pay attention to
8124 ARRAY_MARK_FLAG when checking subscripts, because ASET is
8125 not supposed to be invoked from the garbage collector.
8126 See Andreas Schwab in <http://bugs.gnu.org/12118#25>.
8127 (gc_aset): New function, which is like ASET but can be
8128 used in the garbage collector.
8129 (set_hash_key, set_hash_value, set_hash_next, set_hash_hash)
8130 (set_hash_index): Use it instead of ASET.
8131
6dad7178
EZ
81322012-08-03 Eli Zaretskii <eliz@gnu.org>
8133
8134 Support symlinks on latest versions of MS-Windows.
8135 * w32.c: Include winioctl.h and aclapi.h.
8136 (is_symlink, chase_symlinks, enable_privilege, restore_privilege)
8137 (revert_to_self): Forward declarations of static functions.
8138 <static BOOL g_b_init_get_security_info>:
8139 <g_b_init_create_symbolic_link>: New static flags.
8140 (globals_of_w32): Initialize them to zero.
8141 (GetSecurityInfo_Proc, CreateSymbolicLink_Proc): New typedefs.
8142 (map_w32_filename): Improve commentary. Simplify switch.
8143 (SYMBOLIC_LINK_FLAG_DIRECTORY): Define if not defined in system
8144 headers (most versions of MinGW w32api don't).
8145 (get_security_info, create_symbolic_link)
8146 (get_file_security_desc_by_handle, is_symlink, chase_symlinks):
8147 New functions.
8148 (sys_access, sys_chmod): Call 'chase_symlinks' to resolve symlinks
8149 in the argument file name.
8150 (sys_access): Call unc_volume_file_attributes only if
8151 GetFileAttributes fails with network-related error codes.
8152 (sys_rename): Diagnose renaming of a symlink when the user doesn't
8153 have the required privileges.
14ae4239 8154 (get_file_security_desc_by_name): Rename from
6dad7178
EZ
8155 get_file_security_desc.
8156 (stat_worker): New function, with most of the guts of 'stat', and
14ae4239
BT
8157 with addition of handling of symlinks and support for 'lstat'.
8158 If possible, get file's attributes and security information by
6dad7178
EZ
8159 handle, not by name. Produce S_IFLNK bit for symlinks, when
8160 called from 'lstat'.
8161 (stat, lstat): New functions, call 'stat_worker'.
8162 (symlink, readlink, careadlinkat): Rewritten to create and resolve
8163 symlinks when the underlying filesystem supports them.
8164
f162bcc3
PE
81652012-08-02 Paul Eggert <eggert@cs.ucla.edu>
8166
79ea6c20
PE
8167 Fix macroexp crash on Windows with debugging (Bug#12118).
8168 * lisp.h (ASET) [ENABLE_CHECKING]: Ignore ARRAY_MARK_FLAG when
8169 checking subscripts; problem introduced with the recent
8170 "ASET (a, i, v)" rather than "AREF (a, i) = v" patch.
8171 (ARRAY_MARK_FLAG): Now a macro as well as a constant,
8172 since it's used in non-static inline functions now.
8173
c0ce93fd
PE
8174 * xfaces.c (face_at_buffer_position, face_for_overlay_string):
8175 Don't assume buffer size fits in 'int'. Remove unused local.
c71f5156 8176
f162bcc3
PE
8177 Use C99-style 'extern inline' if available.
8178 * buffer.h (BUFFER_INLINE):
8179 * category.h (CATEGORY_INLINE):
8180 * character.h (CHARACTER_INLINE):
8181 * charset.h (CHARSET_INLINE):
8182 * composite.h (COMPOSITE_INLINE):
8183 * dispextern.h (DISPEXTERN_INLINE):
8184 * lisp.h (LISP_INLINE):
8185 * systime.h (SYSTIME_INLINE):
8186 New macro, replacing 'static inline' in this header.
8187 * buffer.h, category.h, character.h, charset.h, composite.h:
8188 * dispextern.h, lisp.h, systime.h:
8189 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
8190 * alloc.c (LISP_INLINE):
8191 * buffer.c (BUFFER_INLINE):
8192 * category.c (CATEGORY_INLINE):
8193 * character.c (CHARACTER_INLINE):
8194 * charset.c (CHARSET_INLINE):
8195 * composite.c (COMPOSITE_INLINE):
8196 * dispnew.c (DISPEXTERN_INLINE):
8197 * sysdep.c (SYSTIME_INLINE):
8198 Define to EXTERN_INLINE, so that the corresponding functions
8199 are compiled into code.
8200 * conf_post.h (INLINE, EXTERN_INLINE, INLINE_HEADER_BEGIN)
8201 (INLINE_HEADER_END): New macros.
8202 * lisp.h (PSEUDOVECTOR_FLAG): Now a macro as well as a constant,
8203 since it's used in non-static inline functions now.
a8333d03 8204 (VALMASK) [!USE_LSB_TAG]: Likewise.
f162bcc3 8205
837b365b
GM
82062012-08-02 Glenn Morris <rgm@gnu.org>
8207
d66b744d
GM
8208 * s/: Remove empty directory.
8209
837b365b
GM
8210 * s/ms-w32.h: Move to ../nt/inc.
8211 * makefile.w32-in (TAGS, TAGS-gmake, MS_W32_H):
8212 Update for new ms-w32.h location.
8213
13294f95
PE
82142012-08-02 Paul Eggert <eggert@cs.ucla.edu>
8215
8216 Port to Solaris 8.
8217 * syswait.h (WRETCODE): Remove, consistently with ../configure.ac.
8218
90df0db3
GM
82192012-08-02 Glenn Morris <rgm@gnu.org>
8220
8221 * nsterm.m (ns_exec_path, ns_load_path): Use SEPCHAR rather than
8222 hard-coding the path separator.
8223
4939150c
PE
82242012-08-01 Paul Eggert <eggert@cs.ucla.edu>
8225
8226 Use "ASET (a, i, v)" rather than "AREF (a, i) = v".
8227 This how ASET and AREF are supposed to work, and makes
8228 it easier to think about future improvements. See
8229 <http://lists.gnu.org/archive/html/emacs-devel/2012-08/msg00026.html>.
8230 * charset.h (set_charset_attr): New function.
8231 All lvalue-style uses of CHARSET_DECODER etc. changed to use it.
8232 * lisp.h (ASET): Rewrite so as not to use AREF in an lvalue style.
8233 (aref_addr): New function. All uses of &AREF(...) changed.
8234 (set_hash_key, set_hash_value, set_hash_next, set_hash_hash)
8235 (set_hash_index): New functions. All lvalue-style uses of
8236 HASH_KEY etc. changed.
8237 * keyboard.c (set_prop): New function. All lvalue-style uses
8238 of PROP changed.
8239
947b2afd
AA
82402012-08-01 Alp Aker <alp.tekin.aker@gmail.com>
8241
8242 * nsterm.m (ns_set_vertical_scroll_bar, ns_redeem_scroll_bar)
8243 (EmacsWindow-accessibilityAttributeValue, EmacsScroller-initFrame:)
1f9f395d 8244 (EmacsScroller-dealloc): Adjust to use WVAR. (Bug#12114)
947b2afd
AA
8245 * nsfns.m (ns_set_name_as_filename): Likewise.
8246 * nsmenu.m (ns_update_menubar): Likewise.
8247 * nsselect.m (symbol_to_nsstring): Adjust to use SVAR.
8248
4f5d0325
EZ
82492012-08-01 Eli Zaretskii <eliz@gnu.org>
8250
2008beae
EZ
8251 * .gdbinit (xcar, xcdr, xlist, xwindow, nextcons, xprintsym):
8252 Adapt to latest changes in field names of the corresponding Lisp
288479f6 8253 objects.
2008beae 8254
4f5d0325
EZ
8255 * xdisp.c (try_window_id): Use WVAR in IF_DEBUG code.
8256
fe3cc771
GM
82572012-08-01 Glenn Morris <rgm@gnu.org>
8258
8259 * s/msdos.h: Remove file.
8260 * conf_post.h [MSDOS]: New section, moved from s/msdos.h.
8261 * Makefile.in (S_FILE): Remove.
8262 (config_h): Remove S_FILE.
8263
c90acc54
JB
82642012-08-01 Juanma Barranquero <lekktu@gmail.com>
8265
8266 * s/ms-w32.h (DEVICE_SEP, IS_DIRECTORY_SEP, IS_ANY_SEP):
8267 Remove; moved to nt/config.nt.
8268
d8a05828
DA
82692012-08-01 Dmitry Antipov <dmantipov@yandex.ru>
8270
8271 Use INTERNAL_FIELD for conses and overlays.
8272 * lisp.h (struct Lisp_Cons): Use INTERNAL_FIELD.
8273 Remove obsolete comment.
8274 (MVAR): New macro.
8275 (struct Lisp_Overlay): Use INTERNAL_FIELD.
8276 * alloc.c, buffer.c, buffer.h, fns.c: Adjust users.
8277
8271d590
DA
82782012-08-01 Dmitry Antipov <dmantipov@yandex.ru>
8279
8280 Use INTERNAL_FIELD for symbols.
8281 * lisp.h (SVAR): New macro. Adjust users.
8282 * alloc.c, bytecode.c, cmds.c, data.c, doc.c, eval.c:
8283 * fns.c, keyboard.c, lread.c, xterm.c: Users changed.
8284
3193acd2
DA
82852012-08-01 Dmitry Antipov <dmantipov@yandex.ru>
8286
8287 Use INTERNAL_FIELD for processes.
8288 * process.h (PVAR): New macro. Adjust style.
8289 (struct Lisp_Process): Change Lisp_Object members to INTERNAL_FIELD.
8290 * print.c, process.c, sysdep.c, w32.c, xdisp.c: Users changed.
8291
3a45383a
DA
82922012-08-01 Dmitry Antipov <dmantipov@yandex.ru>
8293
8294 Use INTERNAL_FIELD for windows.
8295 * window.h (WVAR): New macro.
8296 (struct window): Change Lisp_Object members to INTERNAL_FIELD.
8297 * alloc.c, buffer.c, composite.c, dispextern.h, dispnew.c, editfns.c:
8298 * fileio.c, font.c, fontset.c, frame.c, frame.h, fringe.c, indent.c:
8299 * insdel.c, keyboard.c, keymap.c, lisp.h, minibuf.c, nsterm.m, print.c:
8300 * textprop.c, w32fns.c, w32menu.c, w32term.c, window.c, xdisp.c:
8301 * xfaces.c, xfns.c, xmenu.c, xterm.c: Users changed.
8302
c1dbc63c
PE
83032012-08-01 Paul Eggert <eggert@cs.ucla.edu>
8304
8305 * coding.h (CODING_ATTR_FLUSHING): Remove; unused and wouldn't work.
8306
5c0c0e8a
GM
83072012-08-01 Glenn Morris <rgm@gnu.org>
8308
8309 * lisp.h (IS_DIRECTORY_SEP, IS_DEVICE_SEP, IS_ANY_SEP):
8310 Move to configure.ac.
8311
552a99b4
JB
83122012-08-01 Juanma Barranquero <lekktu@gmail.com>
8313
8314 * makefile.w32-in (CONFIG_H): Update dependencies.
8315 (CONF_POST_H): New macro.
8316
8317 * s/ms-w32.h (SEPCHAR, NULL_DEVICE): Remove; moved to nt/config.nt.
8318
8d8e2dfe
GM
83192012-07-31 Glenn Morris <rgm@gnu.org>
8320
bc96620a
GM
8321 * Makefile.in (S_FILE): No longer set by configure.
8322
476b1b2d
GM
8323 * conf_post.h (config_opsysfile): Move earlier, so that WINDOWSNT
8324 is available.
8325 (alloca.h) [WINDOWSNT]: Don't include it on MS Windows.
8326
b2c7a106
GM
8327 * process.h (NULL_DEVICE):
8328 * emacs.c (SEPCHAR):
8329 * editfns.c (USER_FULL_NAME): Let configure set them.
8330
d53d062a
GM
8331 * s/README, s/template.h: Remove files.
8332
4515017f
GM
8333 * conf_post.h [HPUX]: Undefine HAVE_RANDOM and HAVE_RINT.
8334
8d8e2dfe
GM
8335 * conf_post.h (AMPERSAND_FULL_NAME, subprocesses):
8336 Move to configure.ac.
8337
5b20b3cc
EZ
83382012-07-31 Eli Zaretskii <eliz@gnu.org>
8339
1e0afd9a
EZ
8340 * .gdbinit (xframe): Adapt to introduction of FVAR and the
8341 resulting renaming of 'struct frame' members.
8342
5b20b3cc
EZ
8343 * w32menu.c (w32_menu_show): Revert bogus introduction of FVAR.
8344
8345 * fontset.c (dump_fontset): Fix compilation with ENABLE_CHECKING
8346 after introduction of FVAR.
8347
f1310128
JD
83482012-07-31 Jan Djärv <jan.h.d@swipnet.se>
8349
79e721e0
JD
8350 * nsmenu.m (update_frame_tool_bar): Change key from NSObject* to id.
8351
8352 * nsterm.m (ns_draw_fringe_bitmap, ns_dumpglyphs_image): Use drawInRect
8353 instead of compositeToPoint.
8354 (applicationShouldTerminate): Pass NS String literal to NSRunAlertPanel.
8355
8d7c7eed 8356 * nsfns.m, nsmenu.m, nsterm.m: Adopt to struct frame/FVAR changes.
f1310128 8357
e34f7f79
DA
83582012-07-31 Dmitry Antipov <dmantipov@yandex.ru>
8359
8360 Generalize INTERNAL_FIELD between buffers, keyboards and frames.
8361 * lisp.h (INTERNAL_FIELD): New macro.
14ae4239 8362 * buffer.h (BUFFER_INTERNAL_FIELD): Remove.
e34f7f79
DA
8363 (BVAR): Change to use INTERNAL_FIELD.
8364 * keyboard.h (KBOARD_INTERNAL_FIELD): Likewise.
8365 (KVAR): Change to use INTERNAL_FIELD.
8366 * frame.h (FVAR): New macro.
8367 (struct frame): Use INTERNAL_FIELD for all Lisp_Object fields.
3a45383a
DA
8368 * alloc.c, buffer.c, data.c, dispnew.c, dosfns.c, eval.c, frame.c:
8369 * fringe.c, gtkutil.c, minibuf.c, nsfns.m, nsterm.m, print.c:
8370 * term.c, w32fns.c, w32menu.c, w32term.c, window.c, window.h:
e34f7f79
DA
8371 * xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c: Users changed.
8372
c09bfb2f
DA
83732012-07-31 Dmitry Antipov <dmantipov@yandex.ru>
8374
8375 Miscellaneous fixes for non-default X toolkits.
8376 * xfns.c (Fx_file_dialog): Change to SSDATA to avoid warnings.
8377 * xterm.c (x_frame_of_widget): Remove redundant prototype.
8378 Move under #ifdef USE_LUCID.
8379 (x_create_toolkit_scroll_bar): Adjust scroll_bar_name
8380 definition and usage to avoid warnings.
8381
14c114ae
JD
83822012-07-31 Jan Djärv <jan.h.d@swipnet.se>
8383
8384 * nsterm.m (openFiles): Fix previous checkin.
8385
3bd21e82
PE
83862012-07-31 Paul Eggert <eggert@cs.ucla.edu>
8387
8388 * indent.c (compute_motion): Remove unused local.
8389
c1529ded
GM
83902012-07-31 Glenn Morris <rgm@gnu.org>
8391
400d5621
GM
8392 * s/usg5-4-common.h (wait3, WRETCODE): Let configure set them.
8393
268e2432
GM
8394 * conf_post.h [USG5_4]:
8395 Move remaining contents of s/usg5-4-common.h here.
8396 * s/usg5-4-common.h: Remove file.
8397
7552f3ee
GM
8398 * conf_post.h [IRIX6_5]: Move remaining contents of s/irix6-5.h here.
8399 * s/irix6-5.h: Remove file.
8400
6a381852
GM
8401 * conf_post.h [DARWIN_OS]: Move remaining contents of s/darwin.h here.
8402 * s/darwin.h: Remove file.
8403
c1529ded
GM
8404 * conf_post.h [HPUX]: Move random, srandom here from s/hpux10-20.h.
8405 * s/hpux10-20.h: Remove file, which is now empty.
8406
b429a4ee
GM
84072012-07-30 Glenn Morris <rgm@gnu.org>
8408
8409 * conf_post.h: New, split from configure.ac's AH_BOTTOM.
8410 * Makefile.in (config_h): Add conf_post.h.
8411 * makefile.w32-in (CONFIG_H): Add conf_post.h.
8412
adff3182
JD
84132012-07-30 Jan Djärv <jan.h.d@swipnet.se>
8414
8415 * nsterm.m (ns_do_open_file): New variable.
b9031d69 8416 (ns_term_init): Set ns_do_open_file to YES after run returns.
14ae4239
BT
8417 (openFile, openTempFile, openFileWithoutUI, openFiles):
8418 Open files only if ns_do_open_file.
adff3182 8419
c32af1e4
PE
84202012-07-30 Paul Eggert <eggert@cs.ucla.edu>
8421
7393bcbb
PE
8422 * lisp.h (SWITCH_ENUM_CAST): Remove. All uses removed.
8423 This no-op macro hasn't been needed for many years.
8424 * src/regex.c (SWITCH_ENUM_CAST) [!emacs]: Likewise.
8425
c32af1e4
PE
8426 Export DIRECTORY_SEP, TYPEMASK, VALMASK to GDB.
8427 * alloc.c (gdb_make_enums_visible) [USE_LSB_TAG]: Add lsb_bits.
8428 * lisp.h (enum lsb_bits) [USE_LSB_TAG]: New enum, for
8429 gdb_make_enums_visible.
8430 (TYPEMASK, VALMASK) [USE_LSB_TAGS]: Now enum constants, not macros.
8431 (DIRECTORY_SEP): Now a constant, not a macro.
8432
302fc036
EZ
84332012-07-30 Eli Zaretskii <eliz@gnu.org>
8434
8435 * w32fns.c (w32_wnd_proc): Pass w32_keyboard_codepage to
8436 w32_kbd_patch_key as the 2nd arg. (Bug#12082)
8437
8438 * w32term.c <w32_keyboard_codepage>: Renamed from
8439 keyboard_codepage and now external. All users changed.
8440
8441 * w32term.h: Add declaration of w32_keyboard_codepage.
8442
8443 * w32inevt.c (w32_kbd_patch_key): Accept an additional argument --
8444 the codepage to translate keys to Unicode. If this argument is
8445 -1, use the value returned by GetConsoleCP. All callers changed.
8446
88fb40b4
PE
84472012-07-30 Paul Eggert <eggert@cs.ucla.edu>
8448
0aee6912
PE
8449 Update .PHONY listings in makefiles.
8450 * Makefile.in (.PHONY): Add all, mostlyclean, clean,
8451 bootstrap-clean, distclean, maintainer-clean, versioclean,
8452 extraclean, frc.
8453
88fb40b4
PE
8454 * lisp.h (STRING_BYTES_BOUND): Cast entire result to ptrdiff_t.
8455 This is a bit clearer. Fix some commentary typos.
8456
0a763bd1
GM
84572012-07-30 Glenn Morris <rgm@gnu.org>
8458
32bac6d6
GM
8459 * s/netbsd.h: Let configure include signal.h if needed.
8460 Remove file, which is now empty.
8461
b65e7c46
GM
8462 * s/usg5-4-common.h (_longjmp, _setjmp, TIOCSIGSEND):
8463 Let configure set them.
8464 * s/irix6-5.h (_longjmp, _setjmp, TIOCSIGSEND):
8465 No more need to undefine.
0a763bd1 8466
169304bd
AS
84672012-07-30 Andreas Schwab <schwab@linux-m68k.org>
8468
8469 * keymap.c (Fkey_description): Don't remove 0x80 bit from
8470 non-single-byte char when adding meta modifier. (Bug#12090)
8471
6cd7a139
DA
84722012-07-30 Dmitry Antipov <dmantipov@yandex.ru>
8473
8474 Convert safe_call to use variable number of arguments.
8475 * xdisp.c (safe_call): Convert to use varargs. Adjust users.
8476 (safe_call2): Fix comment.
8477 * lisp.h (safe_call): Adjust prototype.
8478 * coding.c (encode_coding_object): Change to use safe_call2.
8479 * xfaces.c (merge_face_heights): Change to use safe_call1.
8480
d34d6ffc
GM
84812012-07-30 Glenn Morris <rgm@gnu.org>
8482
7b8a48e4 8483 * s/aix4-2.h (sigmask): No need to undefine it, since syssignal.h
227f5bd0 8484 does that unconditionally. Remove file, which is now empty.
7b8a48e4 8485
d34d6ffc
GM
8486 * s/freebsd.h, s/gnu-linux.h, s/sol2-6.h, s/unixware.h:
8487 Remove empty files.
8488
03a660a6
PE
84892012-07-30 Paul Eggert <eggert@cs.ucla.edu>
8490
8491 Export to GDB most of lisp.h's remaining object-like macros.
8492 * lisp.h (min, max): Move earlier, because they're used earlier now.
8493 (INTMASK, ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK)
8494 (CHAR_TABLE_STANDARD_SLOTS, CHARTAB_SIZE_BITS_0)
8495 (CHARTAB_SIZE_BITS_1, CHARTAB_SIZE_BITS_2, CHARTAB_SIZE_BITS_3)
8496 (DEFAULT_HASH_SIZE, COMPILED_ARGLIST, COMPILED_BYTECODE)
8497 (COMPILED_CONSTANTS, COMPILED_STACK_DEPTH, COMPILED_DOC_STRING)
8498 (COMPILED_INTERACTIVE, CHAR_ALT, CHAR_SUPER, CHAR_HYPER, CHAR_SHIFT)
8499 (CHAR_CTL, CHAR_META, CHAR_MODIFIER_MASK, CHARACTERBITS)
8500 (MANY, UNEVALLED, FLOAT_TO_STRING_BUFSIZE, MAX_ALLOCA):
8501 Now constants, for GDB. They need not be macros.
8502 (MOST_POSITIVE_FIXNUM, MOST_NEGATIVE_FIXNUM, STRING_BYTES_BOUND):
8503 Now constants, for GDB, as well as macros, for static initializers.
8504 (CHAR_TABLE_STANDARD_SLOTS, CHAR_TABLE_EXTRA_SLOTS):
8505 Move to after the definition of struct Lisp_Char_Table,
8506 since the former now needs that type defined.
8507 (enum CHARTAB_SIZE_BITS, enum CHAR_TABLE_STANDARD_SLOTS)
8508 (enum DEFAULT_HASH_SIZE, enum Lisp_Compiled, enum char_bits)
8509 (enum maxargs, enum FLOAT_TO_STRING_BUFSIZE, enum MAX_ALLOCA):
8510 New enums, for gdb_make_enums_visible.
8511 (GLYPH_MODE_LINE_FACE): Remove; unused.
88fb40b4 8512 * alloc.c (STRING_BYTES_MAX): Now a constant, not a macro.
03a660a6
PE
8513 (gdb_make_enums_visible): Add enum CHARTAB_SIZE_BITS, enum
8514 CHAR_TABLE_STANDARD_SLOTS, enum char_bits, enum DEFAULT_HASH_SIZE,
8515 enum FLOAT_TO_STRING_BUFSIZE, enum Lisp_Bits, enum Lisp_Compiled,
8516 enum maxargs, enum MAX_ALLOCA.
8517 (ARRAY_MARK_FLAG_VAL, PSEUDOVECTOR_FLAG_VAL, VALMASK_VAL): Remove.
8518 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Remove;
8519 no longer needed, now that they are done in lisp.h.
8520
e499d0ee
DA
85212012-07-30 Dmitry Antipov <dmantipov@yandex.ru>
8522
8523 Cleanup string bytes checking.
8524 * alloc.c (GC_STRING_BYTES, CHECK_STRING_BYTES): Remove. Convert
8525 all users to STRING_BYTES or string_bytes if GC_CHECK_STRING_BYTES.
8526 (check_string_bytes): Define to empty if not GC_CHECK_STRING_BYTES.
8527 (check_sblock, compact_small_strings): Simplify.
8528
d5040d2d
PE
85292012-07-29 Paul Eggert <eggert@cs.ucla.edu>
8530
8531 * lisp.h (LISP_INT_TAG, LISP_INT1_TAG, LISP_STRING_TAG): Remove.
8532 These macros are confusing and no longer need to be defined, as
8533 the enum values now suffice. All uses replaced with definiens.
8534 (Lisp_Int1, Lisp_String): Define directly; this is clearer.
8535
7f259ae6
JB
85362012-07-29 Juanma Barranquero <lekktu@gmail.com>
8537
8538 * makefile.w32-in (LISP_H, $(BLD)/emacs.$(O), $(BLD)/w32inevt.$(O))
8539 ($(BLD)/w32console.$(O)): Update dependencies.
8540
7e63e0c3
DA
85412012-07-29 Dmitry Antipov <dmantipov@yandex.ru>
8542
8543 Remove HIDE_LISP_IMPLEMENTATION and cleanup cons free list check.
8544 * lisp.h (HIDE_LISP_IMPLEMENTATION): Remove as useless for a long
8545 time. Adjust users.
8546 (CHECK_CONS_LIST): Remove. Convert all users to check_cons_list.
8547
ffd817eb
JD
85482012-07-29 Jan Djärv <jan.h.d@swipnet.se>
8549
8550 * lread.c (init_lread): Remove if-statement in ifdef HAVE_NS before
8551 setting sitelisp (Bug#12010).
8552
417a7a0e
EZ
85532012-07-29 Eli Zaretskii <eliz@gnu.org>
8554
14ae4239 8555 * w32heap.h (OS_9X): Rename from OS_WINDOWS_95.
417a7a0e
EZ
8556
8557 * w32heap.c (cache_system_info):
8558 * w32.c (sys_rename):
8559 * w32proc.c (find_child_console, sys_kill): All users changed.
8560
387d4d92
PE
85612012-07-29 Paul Eggert <eggert@cs.ucla.edu>
8562
8563 * alloc.c (Fgarbage_collect): Indent as per usual Emacs style.
8564
55a6cca6
EZ
85652012-07-29 Eli Zaretskii <eliz@gnu.org>
8566
8567 * makefile.w32-in (LISP_H): Add $(NT_INC)/stdalign.h.
8568
dbcf001c
DA
85692012-07-29 Dmitry Antipov <dmantipov@yandex.ru>
8570
8571 Cleanup statistics calculation in Fgarbage_collect.
14ae4239
BT
8572 * alloc.c (Fgarbage_collect): Rename t1 to meaningful start.
8573 Fix zombies percentage calculation. Simplify elapsed time calculation.
dbcf001c 8574
e2688e4a
DA
85752012-07-29 Dmitry Antipov <dmantipov@yandex.ru>
8576
8577 Generalize marker debugging code under MARKER_DEBUG and use eassert.
8578 * insdel.c (CHECK_MARKERS, check_markers_debug_flag): Remove.
8579 (gap_left, gap_right, adjust_markers_for_delete, insert_1_both)
8580 (insert_from_string_1, insert_from_gap, insert_from_buffer_1)
8581 (replace_range, replace_range_2, del_range_2): Change to eassert.
8582 * marker.c (byte_char_debug_check): Adjust style.
8583
b46a6a83
PE
85842012-07-29 Paul Eggert <eggert@cs.ucla.edu>
8585
8586 Don't use the abbreviation "win" to refer to Windows (Bug#10421).
8587 * regex.c (MAX_BUF_SIZE): Remove some incorrect and
8588 long-ago-commented-out code that talks about "WIN32".
8589 * w32heap.h (OS_WINDOWS_95): Rename from OS_WIN95.
8590 All uses changed.
8591
e32a5799
PE
85922012-07-28 Paul Eggert <eggert@cs.ucla.edu>
8593
8594 Use Gnulib stdalign module (Bug#9772, Bug#9960).
8595 * alloc.c (XMALLOC_BASE_ALIGNMENT, GC_POINTER_ALIGNMENT, pure_alloc):
8596 Simplify by using alignof.
8597 (pure_alloc) [! USE_LSB_TAG]: Don't over-align EMACS_INT values.
8598 * lisp.h: Include <stdalign.h>.
8599 (GCALIGNMENT): New macro and constant.
8600 (DECL_ALIGN): Remove. All uses replaced by alignas (GCALIGNMENT).
8601 (USE_LSB_TAG): ifdef on alignas, not on DECL_ALIGN.
8602 (stdalign): New macro, if not already defined.
8603
df81cd29
EZ
86042012-07-28 Eli Zaretskii <eliz@gnu.org>
8605
01bd1b0d
EZ
8606 Fix non-ASCII input in non-GUI frames on MS-Windows. (Bug#12055)
8607 * w32inevt.c: Include w32inevt.h.
8608 (w32_read_console_input): New inline function, calls either
8609 ReadConsoleInputA or ReadConsoleInputW, depending on the value of
8610 w32_console_unicode_input.
8611 (fill_queue): Call w32_read_console_input instead of ReadConsoleInput.
8612 (w32_kbd_patch_key, key_event): Use the codepage returned by
8613 GetConsoleCP, rather than the ANSI codepage returned by GetLocaleInfo.
8614 (key_event): use uChar.UnicodeChar only if
8615 w32_console_unicode_input is non-zero.
8616
8617 * w32console.c: Include w32heap.h.
8618 <w32_console_unicode_input>: New global variable.
8619 (initialize_w32_display): Set w32_console_unicode_input to 1 on NT
8620 family of Windows, zero otherwise.
8621
8622 * w32inevt.h: Declare w32_console_unicode_input.
8623
df81cd29
EZ
8624 * xdisp.c (init_iterator): Don't reference tip_frame in a build
8625 --without-x. (Bug#11742)
8626
c20fdd9e
PE
86272012-07-27 Paul Eggert <eggert@cs.ucla.edu>
8628
8629 Adjust GDB to reflect pvec_type changes (Bug#12036).
8630 * .gdbinit (xvectype, xpr, xbacktrace): Adjust to reflect the
14ae4239
BT
8631 2012-07-04 changes to pseudovector representation.
8632 Problem reported by Eli Zaretskii in <http://bugs.gnu.org/12036#30>.
c20fdd9e 8633
32770973 86342012-07-27 Michael Albinus <michael.albinus@gmx.de>
e518bc71
MA
8635
8636 * dbusbind.c (XD_DBUS_VALIDATE_BUS_ADDRESS): Canonicalize session
8637 bus address.
8638 (xd_close_bus, Fdbus_init_bus): Handle reference counter properly.
8639
3438fe21
EZ
86402012-07-27 Eli Zaretskii <eliz@gnu.org>
8641
bcfbc9de
EZ
8642 * alloc.c (listn): Fix the order the arguments are consed onto the
8643 list.
8644
3438fe21
EZ
8645 * lisp.h (enum constype): Use CONSTYPE_HEAP and CONSTYPE_PURE for
8646 enumeration constants, as PURE and HEAP are too general, and clash
8647 with other headers and sources, such as gmalloc.c and the
8648 MS-Windows system headers. All users changed.
8649
eeaea515
DA
86502012-07-27 Dmitry Antipov <dmantipov@yandex.ru>
8651
8652 Revert last save_excursion_save and save_excursion_restore changes.
8653 * alloc.c, editfns.c, marker.c, lisp.h: Revert.
8654 Lots of crashes reported by Chong Yidong <cyd@gnu.org>.
8655
073c88c2
DA
86562012-07-27 Dmitry Antipov <dmantipov@yandex.ru>
8657
8658 Fix recently-introduced typos in Windows port.
8659 Reported by Martin Rudalics <rudalics@gmx.at>.
8660 * w32.c (init_environment): Replace comma with semicolon.
eeaea515 8661 * w32fns.c (syms_of_w32fns): Add missing parenthesis.
073c88c2 8662
4706125e
PE
86632012-07-27 Paul Eggert <eggert@cs.ucla.edu>
8664
8665 Improve GDB symbol export (Bug#12036).
8666 * .gdbinit (xgetptr, xgetint, xgettype): Set $bugfix in different
8667 arms of an 'if', not using conditional expressions; otherwise GDB
8668 complains about the types in the unevaluated arm when the argument
8669 is an integer literal.
8670 (xgetint): Simplify expression.
8671 * alloc.c (gdb_make_enums_visible): New constant. This ports to
8672 GCC 3.4.2 the export of symbols to GDB. Problem reported by Eli
8673 Zaretskii in <http://bugs.gnu.org/12036#13>.
8674 * lisp.h (PUBLISH_TO_GDB): Remove. All uses removed. No longer
8675 needed now that we have gdb_make_enums_visible.
8676 (enum CHECK_LISP_OBJECT_TYPE, enum Lisp_Bits, enum More_Lisp_Bits)
8677 (enum enum_USE_LSB_TAG):
8678 New enum types, packaging up enums that need to be exported to GDB.
8679
694b6c97
DA
86802012-07-27 Dmitry Antipov <dmantipov@yandex.ru>
8681
8682 Utility function to make a list from specified amount of objects.
8683 * lisp.h (enum constype): New datatype.
8684 (listn): New prototype.
8685 * alloc.c (listn): New function.
8686 (Fmemory_use_count, syms_of_alloc): Use it.
8687 * buffer.c (syms_of_buffer): Likewise.
8688 * callint.c (syms_of_callint): Likewise.
8689 * charset.c (define_charset_internal): Likewise.
8690 * coding.c (syms_of_coding): Likewise.
8691 * keymap.c (syms_of_keymap): Likewise.
8692 * search.c (syms_of_search): Likewise.
8693 * syntax.c (syms_of_syntax): Likewise.
8694 * w32.c (init_environment): Likewise.
8695 * w32fns.c (Fw32_battery_status, syms_of_w32fns): Likewise.
8696 * xdisp.c (syms_of_xdisp): Likewise.
8697 * xfns.c (syms_of_xfns): Likewise.
8698
6195f384
DA
86992012-07-27 Dmitry Antipov <dmantipov@yandex.ru>
8700
8701 Fast save_excursion_save and save_excursion_restore.
8702 * lisp.h (struct Lisp_Excursion): New data type.
8703 (PVEC_EXCURSION): New pseudovector type.
8704 (XEXCURSION, XSETEXCURSION, EXCURSIONP): Convenient macros
8705 to deal with it. Adjust comments.
8706 (init_marker, attach_marker): New prototype.
8707 (unchain_marker): Adjust prototype.
8708 * marker.c (attach_marker): Change to global.
8709 (init_marker): New function.
8710 * alloc.c (Fmake_marker, build_marker): Use it.
8711 (build_marker): More easserts.
8712 (mark_object): Handle struct Lisp_Excursion.
8713 * editfns.c (save_excursion_save, save_excursion_restore):
8714 Reimplement to use struct Lisp_Excursion. Add comments.
8715
5eceb8fb
PE
87162012-07-26 Paul Eggert <eggert@cs.ucla.edu>
8717
8718 Fix export of symbols to GDB (Bug#12036).
8719 * alloc.c (ARRAY_MARK_FLAG_VAL, PSEUDOVECTOR_FLAG_VAL, VALMASK_VAL)
8720 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Move these here from
8721 emacs.c, as this is a more-suitable home. Had this been done earlier
8722 the fix for 12036 would have avoided some of the problems noted in
8723 <http://bugs.gnu.org/12036#13> by Eli Zaretskii, as the scope problems
8724 would have been more obvious.
562157c8
PE
8725 * emacs.c: Do not include <verify.h>; no longer needed.
8726 (gdb_CHECK_LISP_OBJECT_TYPE, gdb_DATA_SEG_BITS)
5eceb8fb
PE
8727 (gdb_GCTYPEBITS, gdb_USE_LSB_TAG)
8728 (CHECK_LISP_OBJECT_TYPE, DATA_SEG_BITS, GCTYPEBITS, USE_LSB_TAG):
8729 Remove; now done in lisp.h.
8730 * lisp.h (PUBLISH_TO_GDB): New macro.
8731 (GCTYPEBITS, USE_LSB_TAG, CHECK_LISP_OBJECT_TYPE, enum pvec_type)
8732 (DATA_SEG_BITS): Use it.
8733 (GCTYPEBITS, USE_LSB_TAG): Now also an enum, for GDB.
8734 (CHECK_LISP_OBJECT_TYPE, DATA_SEG_BITS): Now just an enum, for GDB.
8735 * mem-limits.h (EXCEEDS_LISP_PTR): Redo so that DATA_SEG_BITS need
8736 not be usable in #if. This simplifies things.
8737
d6749401
JB
87382012-07-26 Juanma Barranquero <lekktu@gmail.com>
8739
8740 * makefile.w32-in ($(BLD)/emacs.$(O)): Update dependencies.
8741
1781b9e9
PE
87422012-07-26 Paul Eggert <eggert@cs.ucla.edu>
8743
d89518db 8744 Simplify export of symbols to GDB (Bug#12036).
1781b9e9
PE
8745 * .gdbinit (xgetptr, xgetint, xgettype): Don't use "set $bugfix =
8746 $bugfix.i", as this doesn't work (with GDB 7.4.1, anyway).
8747 (xgetptr, xgetint, xgettype, xcoding, xcharset, xprintbytestr):
8748 Adjust to changes in lisp.h and emacs.c, by using
8749 CHECK_LISP_OBJECT_TYPE rather than gdb_use_struct, VALMASK instead
8750 of $valmask, DATA_SEG_BITS instead of gdb_data_seg_bits,
8751 INTTYPEBITS instead of gdb_gctypebits - 1, USE_LSB_TAG instead of
8752 gdb_use_lsb, (1 << GCTYPEBITS) - 1 instead of $tagmask, VALBITS
8753 instead of gdb_valbits.
8754 (xvectype, xvector, xpr, xprintstr, xbacktrace): Similarly, use
8755 PSEUDOVECTOR_FLAG instead of PVEC_FLAG, and ARRAY_MARK_FLAG
8756 instead of gdb_array_mark_flag.
8757 (xboolvector): Get size from $->size, not $->header.size.
8758 Use BOOL_VECTOR_BITS_PER_CHAR rather than mystery constants.
8759 (xreload, hook-run, hookpost-run): Remove.
8760 * emacs.c: Include <verify.h>.
8761 (gdb_use_lsb, gdb_use_struct, gdb_valbits, gdb_gctypebits)
8762 (gdb_data_seg_bits, PVEC_FLAG, gdb_array_mark_flag, gdb_pvec_type):
8763 Remove.
8764 (gdb_CHECK_LISP_OBJECT_TYPE, gdb_DATA_SEG_BITS, gdb_GCTYPEBITS)
8765 (gdb_USE_LSB_TAG): New enum constants.
8766 (CHECK_LISP_OBJECT_TYPE, DATA_SEG_BITS, GCTYPEBITS, USE_LSB_TAG):
8767 Also define these as enum constants, so they're visible to GDB.
8768 (ARRAY_MARK_FLAG_VAL, PSEUDOVECTOR_FLAG_VAL, VALMASK_VAL): New macros.
8769 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Also define these
8770 as constants, so they're visible to GDB.
8771 * lisp.h (VALBITS, INTTYPEBITS, FIXNUM_BITS, PSEUDOVECTOR_SIZE_BITS)
8772 (PSEUDOVECTOR_SIZE_MASK, PVEC_TYPE_MASK, BOOL_VECTOR_BITS_PER_CHAR):
8773 Now enum constants, not macros, so they're visible to GDB.
8774 (CHECK_LISP_OBJECT_TYPE, DATA_SEG_BITS): Default to 0, as this is
8775 more convenient now. All uses changed.
8776 (VALMASK) [USE_LSB_TAG]: Also define in this case.
8777 * mem-limits.h (EXCEEDS_LISP_PTR): Adjust to DATA_SEG_BITS change.
8778
3628596a
DA
87792012-07-26 Dmitry Antipov <dmantipov@yandex.ru>
8780
8781 Explicitly free restriction data that are not needed anymore.
8782 * editfns.c (save_restriction_restore): Free restriction data.
8783
7abaf5cc
SM
87842012-07-26 Stefan Monnier <monnier@iro.umontreal.ca>
8785
8786 * eval.c (Fautoload_do_load): Rename from do_autoload, export to Lisp,
8787 add argument, tune behavior, and adjust all callers.
8788
71f88e00
PE
87892012-07-25 Paul Eggert <eggert@cs.ucla.edu>
8790
8791 Use typedef for EMACS_INT, EMACS_UINT.
8792 * lisp.h, s/ms-w32.h (EMACS_INT, EMACS_UINT): Use typedefs rather
8793 than macros. This simplifies debugging in the usual case, since
8794 it lets GDB show addresses as 'EMACS_INT *' rather than 'long int *'
8795 and it allows expressions involving EMACS_INT casts.
8796 * .gdbinit (xreload): Simplify by using EMACS_INT cast.
8797
57ec3034
JD
87982012-07-25 Jan Djärv <jan.h.d@swipnet.se>
8799
8800 * nsterm.m (ns_read_socket): Return early if there is a modal
8801 window (Bug#12043).
8802
8137e7b3
MR
88032012-07-25 Martin Rudalics <rudalics@gmx.at>
8804
8805 * frame.c (Fredirect_frame_focus): In doc-string don't mention
8806 that FOCUS-FRAME can be omitted.
8807
04e9897c
DA
88082012-07-25 Dmitry Antipov <dmantipov@yandex.ru>
8809
8810 Adjust buffer text indirection counters at the end of Fkill_buffer.
8811 * buffer.c (Fkill_buffer): Adjust indirection counters when the
8812 buffer is definitely dead. This should really fix an issue reported
8813 by Christoph Scholtes again. (Bug#12007).
8814 (init_buffer_once): Initialize indirection counters of
8815 buffer_defaults and buffer_local_symbols (for sanity and safety).
8816
8a0484e1
EZ
88172012-07-24 Eli Zaretskii <eliz@gnu.org>
8818
8819 * xdisp.c (init_iterator): Don't compute dimensions of truncation
8820 and continuation glyphs on tooltip frames, leave them at zero.
8821 Avoids continued lines in tooltips. (Bug#11832)
8822
fa691a83
DA
88232012-07-24 Dmitry Antipov <dmantipov@yandex.ru>
8824
8825 Simplify copy_overlay.
04e9897c 8826 * buffer.c (copy_overlay): Simplify. Use build_marker.
fa691a83
DA
8827 * lisp.h (struct Lisp_Overlay): Restore comment with minor tweaks.
8828
436bc8e0
EZ
88292012-07-23 Eli Zaretskii <eliz@gnu.org>
8830
8831 * print.c (print_object): Don't crash when a frame's name is nil
8832 or invalid. (Bug#12025)
8833
8834 * window.c (decode_any_window): Disable CHECK_LIVE_FRAME test, as
8835 it signals an error when a tooltip frame is being created.
8836
d7a7fda3
DA
88372012-07-23 Dmitry Antipov <dmantipov@yandex.ru>
8838
8839 Cleanup miscellaneous objects allocation and initialization.
8840 * alloc.c (allocate_misc): Change to static. Add argument to
8841 specify the subtype. Adjust comment and users.
8842 (build_overlay): New function.
8843 * buffer.c (copy_overlays, Fmake_overlay): Use it.
8844 * lisp.h (struct Lisp_Overlay): Remove obsolete comment.
8845 (allocate_misc): Remove prototype.
8846 (build_overlay): Add prototype.
8847
88482012-07-23 Dmitry Antipov <dmantipov@yandex.ru>
372f8ffc
DA
8849
8850 Swap buffer text indirection counters in Fbuffer_swap_text.
8851 * buffer.c (Fbuffer_swap_text): Swap indirections too.
8852 This avoids crash reported by Christoph Scholtes at
8853 http://lists.gnu.org/archive/html/bug-gnu-emacs/2012-07/msg00785.html.
8854
9d7fa573
JD
88552012-07-22 Jan Djärv <jan.h.d@swipnet.se>
8856
8857 * nsmenu.m (Popdown_data): New struct.
8858 (pop_down_menu): p->pointer is Popdown_data. Release the pool and
8859 free Popdown_data.
8860 (ns_popup_dialog): Use NSAutoreleasePool and pass it to pop_down_menu.
8861 (initWithContentRect): Make imgView and contentView non-static
8862 and autorelease them. Also autorelease img and matrix (Bug#12005).
8863 (dealloc): Remove (Bug#12005).
8864
0dd6d66d
DA
88652012-07-22 Dmitry Antipov <dmantipov@yandex.ru>
8866
8867 Adjust consing_since_gc when objects are explicitly freed.
8868 * alloc.c (GC_DEFAULT_THRESHOLD): New macro.
8869 (Fgarbage_collect): Use it. Change minimum to 1/10 of default.
8870 (free_cons, free_misc): Subtract object size from consing_since_gc.
8871
d36d71df
DA
88722012-07-22 Dmitry Antipov <dmantipov@yandex.ru>
8873
8874 Simplify and cleanup markers positioning code.
8875 * marker.c (attach_marker): More useful eassert.
8876 (live_buffer, set_marker_internal): New function.
8877 (Fset_marker, set_marker_restricted): Use set_marker_internal.
8878 (set_marker_both, set_marker_restricted_both): Use live_buffer.
8879
fb9ea40f
PE
88802012-07-22 Paul Eggert <eggert@cs.ucla.edu>
8881
8882 * buffer.h (struct buffer.indirections): Now ptrdiff_t, not int,
8883 as it's limited by the amount of memory, not by INT_MAX.
8884
2d5c5f7d
EZ
88852012-07-21 Eli Zaretskii <eliz@gnu.org>
8886
07fb592e
EZ
8887 * keyboard.c (keys_of_keyboard): Bind language-change to 'ignore'
8888 in special-event-map. See the discussion at
8889 http://lists.gnu.org/archive/html/emacs-devel/2012-06/msg00417.html
8890 for the reasons.
8891
37a9eac8 8892 * w32menu.c (add_menu_item): Cast to ULONG_PTR when assigning
14ae4239
BT
8893 info.dwItemData. Fixes crashes on 64-bit Windows.
8894 Suggested by Fabrice Popineau <fabrice.popineau@supelec.fr>.
2d5c5f7d 8895
c4328746
JD
88962012-07-21 Jan Djärv <jan.h.d@swipnet.se>
8897
fc0c31f8 8898 * nsterm.m (accessibilityAttributeValue): New function. (Bug#11134).
4b17afa7 8899 (conversationIdentifier): Return value is NSInteger.
784051c4 8900 * nsterm.m (accessibilityAttributeValue): Surround with NS_IMPL_COCOA.
c4328746 8901
6e5d1c12
CY
89022012-07-21 Chong Yidong <cyd@gnu.org>
8903
8904 * window.c (decode_any_window): Signal an error if the window is
8905 on a dead frame (Bug#11984).
8906
9928463d
DA
89072012-07-20 Dmitry Antipov <dmantipov@yandex.ru>
8908
8909 Add indirection counting to speed up Fkill_buffer.
8910 * buffer.h (struct buffer): New member.
8911 * buffer.c (Fget_buffer_create): Set indirection counter to 0.
8912 (Fmake_indirect_buffer): Set indirection counter to -1, increment
8913 base buffer indirection counter.
8914 (compact_buffer): If ENABLE_CHECKING, verify indirection counters.
8915 (Fkill_buffer): Adjust indirection counters as needed, don't walk
8916 through buffer list if indirection counter is 0.
8917
f8643a6b
DA
89182012-07-20 Dmitry Antipov <dmantipov@yandex.ru>
8919
8920 Extend the value returned by Fgarbage_collect with heap statistics.
8921 * alloc.c (Qheap): New symbol.
8922 (syms_of_alloc): DEFSYM it.
8923 (Fgarbage_collect): If DOUG_LEA_MALLOC, add mallinfo data.
8924 (Fmemory_free): Remove.
8925 (syms_of_alloc): Don't defsubr it.
8926 * buffer.c (Fcompact_buffer): Remove.
8927 (syms_of_buffer): Don't defsubr it.
8928
dac616ff
DA
89292012-07-20 Dmitry Antipov <dmantipov@yandex.ru>
8930
8931 Make maybe_gc inline.
8932 Verify that inlining is always possible (GCC 4.7.1, -O3 -Winline).
8933 * lisp.h (consing_since_gc, gc_relative_threshold)
8934 (memory_full_cons_threshold): Revert declaration.
8935 (maybe_gc): Remove prototype, define as inline.
8936 * alloc.c: Remove old commented-out code.
8937 (consing_since_gc, gc_relative_threshold)
8938 (memory_full_cons_threshold): Revert to global.
8939 (maybe_gc): Remove.
8940
d7ea76b4
DA
89412012-07-20 Dmitry Antipov <dmantipov@yandex.ru>
8942
8943 Simple wrapper for make_unibyte_string, adjust font_open_by_name.
8944 * lisp.h (build_unibyte_string): New function.
8945 * dosfns.c, fileio.c, fns.c, ftfont.c, process.c:
8946 * sysdep.c, w32fns.c, xfns.c: Use it.
8947 * font.c (font_open_by_name): Change 2nd and 3rd args to the only arg
8948 of type Lisp_Object to avoid redundant calls to make_unibyte_string.
8949 Adjust users accordingly.
8950 * font.h (font_open_by_name): Adjust prototype.
8951
765e61e3
DA
89522012-07-20 Dmitry Antipov <dmantipov@yandex.ru>
8953
8954 Cleanup calls to Fgarbage_collect.
8955 * lisp.h (maybe_gc): New prototype.
8956 (consing_since_gc, gc_relative_threshold, memory_full_cons_threshold):
8957 Remove declarations.
8958 * alloc.c (maybe_gc): New function.
8959 (consing_since_gc, gc_relative_threshold, memory_full_cons_threshold):
8960 Make them static.
8961 * bytecode.c (MAYBE_GC): Use maybe_gc.
8962 * eval.c (eval_sub, Ffuncall): Likewise.
8963 * keyboard.c (read_char): Likewise. Adjust call to maybe_gc
8964 to avoid dependency from auto-save feature.
8965
52b852c7
PE
89662012-07-19 Paul Eggert <eggert@cs.ucla.edu>
8967
8968 * buffer.h (FOR_EACH_BUFFER): Rename from 'for_each_buffer'.
8969 (FOR_EACH_PER_BUFFER_OBJECT_AT): Rename from
8970 'for_each_per_buffer_object_at'.
8971 All uses changed. It's better to use upper-case for macros that
8972 cannot be implemented as functions, to give the reader a clue
8973 that they're special.
8974
5db81e33
SM
89752012-07-19 Stefan Monnier <monnier@iro.umontreal.ca>
8976
8977 * alloc.c (Fgarbage_collect): Tweak docstring.
8978
5b835e1d
DA
89792012-07-19 Dmitry Antipov <dmantipov@yandex.ru>
8980
8981 Tweak the value returned from Fgarbage_collect again.
8982 * alloc.c (Fgarbage_collect): New return value, as confirmed in
8983 http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00418.html.
8984 Adjust documentation.
8985 (total_vector_bytes): Rename to total_vector_slots, adjust
8986 accounting.
8987 (total_free_vector_bytes): Rename to total_free_vector_slots,
8988 adjust accounting.
8989 (Qstring_bytes, Qvector_slots): New symbols.
8990 (syms_of_alloc): DEFSYM them.
8991
9cd47b72
DA
89922012-07-19 Dmitry Antipov <dmantipov@yandex.ru>
8993
8994 Buffer compaction primitive which may be used from Lisp.
8995 * buffer.c (compact_buffer, Fcompact_buffer): New function.
8996 (syms_of_buffer): Register Fcompact_buffer.
8997 * alloc.c (Fgarbage_collect): Use compact_buffer.
8998 * buffer.h (compact_buffer): New prototype.
8999 (struct buffer_text): New member.
9000
d17337e5
DA
90012012-07-19 Dmitry Antipov <dmantipov@yandex.ru>
9002
9003 New macro to iterate over all buffers, miscellaneous cleanups.
9004 * lisp.h (all_buffers): Remove declaration.
9005 * buffer.h (all_buffers): Add declaration, with comment.
9006 (for_each_buffer): New macro.
9007 * alloc.c (Fgarbage_collect, mark_object): Use it.
9008 * buffer.c (Fkill_buffer, Fbuffer_swap_text, Fset_buffer_multibyte)
9009 (init_buffer): Likewise.
9010 * data.c (Fset_default): Likewise.
9011 * coding.c (code_conversion_restore): Remove redundant check
9012 for dead buffer.
9013 * buffer.c (Fkill_buffer): Likewise. Remove obsolete comment.
9014
60cfd278
AS
90152012-07-18 Andreas Schwab <schwab@linux-m68k.org>
9016
9017 Fix bug that created negative-length intervals.
9018 * intervals.c (merge_interval_right, merge_interval_left):
9019 Do not zero out this interval if it is absorbed by its children,
9020 as this interval's total length doesn't change in that case. See
9021 <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00403.html>.
9022
d06714cb
PE
90232012-07-18 Paul Eggert <eggert@cs.ucla.edu>
9024
83713154
PE
9025 * alloc.c (Fmake_bool_vector): Fix off-by-8 bug
9026 when invoking (make-bool-vector N t) and N is a positive
9027 multiple of 8 -- the last 8 bits were mistakenly cleared.
9028
d06714cb
PE
9029 Remove some struct layout assumptions in bool vectors.
9030 * alloc.c (bool_header_size): New constant.
9031 (header_size, word_size): Move earlier, as they're now used earlier.
9032 Use 'word_size' in a few more places, where it's appropriate.
9033 (Fmake_bool_vector, sweep_vectors): Don't assume that there is no
9034 padding before the data member of a bool vector.
9035 (sweep_vectors): Use PSEUDOVECTOR_TYPEP, in an eassert, rather
9036 than doing the check by hand with an abort ().
9037
464d5a5e
SM
90382012-07-18 Stefan Monnier <monnier@iro.umontreal.ca>
9039
5fbc0409
SM
9040 * eval.c (Fdefvar): Don't check constants since we only set the var if
9041 it's not yet defined anyway (bug#11904).
9042
464d5a5e
SM
9043 * lisp.h (last_undo_boundary): Declare new var.
9044 * keyboard.c (command_loop_1): Set it.
9045 * cmds.c (Fself_insert_command): Use it to only remove boundaries that
9046 were auto-added by the command loop (bug#11774).
9047
8dc2e44a
AS
90482012-07-18 Andreas Schwab <schwab@linux-m68k.org>
9049
9050 * w32font.c (Qsymbol): Remove local definition.
9051 (syms_of_w32font): Don't DEFSYM it.
9052
169925ec
DA
90532012-07-18 Dmitry Antipov <dmantipov@yandex.ru>
9054
9055 Fix sweep_vectors to handle large bool vectors correctly.
9056 * alloc.c (sweep_vectors): Account total_vector_bytes for
9057 bool vectors larger than VBLOCK_BYTES_MAX.
9058
5fbfb018
CY
90592012-07-18 Chong Yidong <cyd@gnu.org>
9060
9061 * frame.c (x_set_frame_parameters): Revert bogus change introduced
9062 in 2012-05-25 commit by Paul Eggert (Bug#11738).
9063
3ab6e069
DA
90642012-07-18 Dmitry Antipov <dmantipov@yandex.ru>
9065
9066 Return more descriptive data from Fgarbage_collect.
9067 Suggested by Stefan Monnier in
9068 http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00369.html.
9069 * alloc.c (bounded_number): New function.
9070 (total_buffers, total_vectors): New variable.
9071 (total_string_size): Rename to total_string_bytes, adjust users.
9072 (total_vector_size): Rename to total_vector_bytes, adjust users.
9073 (sweep_vectors): Account total_vectors and total_vector_bytes.
9074 (Fgarbage_collect): New return value. Adjust documentation.
9075 (gc_sweep): Account total_buffers.
9076 (Fmemory_free, Fmemory_use_counts): Use bounded_number.
9077 (VECTOR_SIZE): Remove.
9078 * data.c (Qfloat, Qvector, Qsymbol, Qstring, Qcons): Make global.
9079 (Qinterval, Qmisc): New symbols.
9080 (syms_of_data): Initialize them.
9081 * lisp.h (Qinterval, Qsymbol, Qstring, Qmisc, Qvector, Qfloat)
9082 (Qcons, Qbuffer): New declarations.
9083
6d02fe5b
PE
90842012-07-17 Paul Eggert <eggert@cs.ucla.edu>
9085
9086 * alloc.c (Fmemory_free): Account for memory-free's own storage.
9087 Round up, not down. Improve doc.
9088
b7ffe040
DA
90892012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
9090
9091 Restore old code in allocate_string_data to avoid Faset breakage.
9092 Reported by Julien Danjou <julien@danjou.info> in
9093 http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00371.html.
9094 * alloc.c (allocate_string_data): Restore old code with minor
9095 adjustments, fix comment to explain this subtle issue.
9096
4dc7c8d5
SM
90972012-07-17 Eli Zaretskii <eliz@gnu.org>
9098
9099 Remove FILE_SYSTEM_CASE.
9100 * s/msdos.h (FILE_SYSTEM_CASE): Don't define.
9101
9102 * fileio.c (FILE_SYSTEM_CASE): Don't define.
9103 (Ffile_name_directory, Fexpand_file_name): Don't use FILE_SYSTEM_CASE.
9104 Fixes problems on MS-DOS with Vtemp_file_name_pattern when
9105 call-process-region passes it through expand-file-name.
9106
9107 * dired.c (file_name_completion): Don't use FILE_SYSTEM_CASE.
9108
91092012-07-17 Andreas Schwab <schwab@linux-m68k.org>
9110
9111 Fix crash when creating indirect buffer (Bug#11917)
9112 * buffer.c (buffer_lisp_local_variables): Add argument CLONE.
9113 Don't handle unbound variables specially if non-zero.
9114 (Fbuffer_local_variables): Pass zero.
9115 (clone_per_buffer_values): Pass non-zero.
9116
91172012-07-17 Andreas Schwab <schwab@linux-m68k.org>
9118
9119 * gnutls.c (emacs_gnutls_handshake): Revert last change. Add QUIT
9120 to make the loop interruptible.
9121
91222012-07-17 Andreas Schwab <schwab@linux-m68k.org>
9123
9124 * gnutls.c (emacs_gnutls_handshake): Only retry if
9125 GNUTLS_E_INTERRUPTED.
9126
cce7fefc
DA
91272012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
9128
9129 Cleanup and convert miscellaneous checks to eassert.
9130 * alloc.c (mark_interval): Fix comment, partially rephrase
9131 old comment from intervals.h (see below).
9132 * intervals.c (find_interval, adjust_intervals_for_insertion)
9133 (delete_interval, adjust_intervals_for_deletion)
9134 (graft_intervals_into_buffer, temp_set_point_both, copy_intervals):
9135 Convert to eassert.
9136 (adjust_intervals_for_insertion, make_new_interval):
9137 Remove obsolete and unused code.
9138 * intervals.h (struct interval): Remove obsolete comment.
9139 * textprotp.c (erase_properties): Remove unused code.
9140 (Fadd_text_properties, set_text_properties_1, Fremove_text_properties)
9141 (Fremove_list_of_text_properties): Convert to eassert.
9142
9ea10cc3
CY
91432012-07-17 Chong Yidong <cyd@gnu.org>
9144
9145 * editfns.c (Finsert_char): Doc fix.
9146
3900d5de
DA
91472012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
9148
9149 Fix previous change to make Fmemory_free always accurate.
9150 * alloc.c (make_interval): Update total_free_intervals.
9151 (make_float): Likewise for total_free_floats.
9152 (free_cons, Fcons): Likewise for total_free_conses.
9153 (SETUP_ON_FREE_LIST, allocate_vector_from_block):
9154 Likewise for total_free_vector_bytes.
9155 (Fmake_symbol): Likewise for total_free_symbols.
9156 (bytes_free): Remove.
9157
7098646f
DA
91582012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
9159
9160 Simple free memory accounting feature.
9161 * alloc.c (bytes_free, total_free_vector_bytes): New variable.
9162 (sweep_vectors): Accumulate size of free vectors.
9163 (Fgarbage_collect): Setup bytes_free.
9164 (Fmemory_free): New function.
9165 (syms_of_alloc): Register it.
9166
22657b40
DA
91672012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
9168
9169 Cleanup overlays checking.
9170 * buffer.h (OVERLAY_VALID): Remove as useless synonym of OVERLAYP.
9171 * buffer.c (overlay_touches_p, recenter_overlay_lists): Change to
9172 eassert and OVERLAYP.
9173 (sort_overlays): Change to use OVERLAYP.
9174
ddfc8813
RK
91752012-07-16 René Kyllingstad <Rene@Kyllingstad.com> (tiny change)
9176
9177 * editfns.c (Finsert_char): Make it interactive, and make the
9178 second arg optional. Copy interactive spec and docstring from
9179 ucs-insert.
9180
7c26cf3c
PE
91812012-07-17 Paul Eggert <eggert@cs.ucla.edu>
9182
9183 * floatfns.c (Fabs): Do not wrap fabs inside IN_FLOAT (Bug#11913).
9184 Unlike the other wrapped functions, fabs has an unspecified
9185 effect on errno.
9186
5d127af9
JD
91872012-07-16 Jan Djärv <jan.h.d@swipnet.se>
9188
9189 * nsterm.m (keyDown): Interpret flags without left/right bits
9190 as the left key (Bug#11670).
9191
6a0dd1d7
DA
91922012-07-16 Dmitry Antipov <dmantipov@yandex.ru>
9193
9194 Remove empty and useless init functions.
9195 * lisp.h (init_character_once, init_fns, init_image)
9196 (init_filelock, init_sound): Remove prototype.
9197 * character.c (init_character_once): Remove.
9198 * filelock.c (init_filelock): Likewise.
9199 * fns.c (init_fns): Likewise.
9200 * image.c (init_image): Likewise.
9201 * sound.c (init_sound): Likewise.
9202 * emacs.c (main): Adjust accordingly.
9203
7a6136fd
DA
92042012-07-16 Dmitry Antipov <dmantipov@yandex.ru>
9205
9206 * gtkutil.h: Tiny cleanups.
9207 (use_old_gtk_file_dialog): Remove useless declaration.
9208 (xg_uses_old_file_dialog): Add suggested const attribute.
9209
ce811ad9
EZ
92102012-07-15 Eli Zaretskii <eliz@gnu.org>
9211
9212 * bidi.c (MAX_STRONG_CHAR_SEARCH): New macro.
9213 (bidi_paragraph_init): Use it to limit search forward for a strong
9214 directional character in abnormally large paragraphs full of
9215 neutral or weak characters. (Bug#11943)
9216
c9adfeaa
SF
92172012-07-15 Stefano Facchini <stefano.facchini@gmail.com> (tiny change)
9218
9219 * gtkutil.c (xg_create_tool_bar): Apply "primary-toolbar" style to
9220 the toolbar (Bug#9451).
9221 (xg_make_tool_item): Give the widget event box a transparent
9222 background.
9223
fff62aa9
DA
92242012-07-15 Dmitry Antipov <dmantipov@yandex.ru>
9225
9226 Cleanup basic allocation variables and functions.
9227 * alloc.c (ignore_warnings, init_intervals, init_float)
9228 (init_cons, init_symbol, init_marker): Remove.
9229 (interval_block_index): Initialize to INTERVAL_BLOCK_SIZE.
9230 (float_block_index): Initialize to FLOAT_BLOCK_SIZE.
9231 (cons_block_index): Initialize to CONS_BLOCK_SIZE.
9232 (symbol_block_size): Initialize to SYMBOL_BLOCK_SIZE.
9233 (marker_block_index): Initialize to MARKER_BLOCK_SIZE.
9234 (staticidx, init_alloc_once, init_strings, free_ablock):
9235 Remove redundant initialization.
9236 * fns.c (init_weak_hash_tables): Remove.
9237 * lisp.h (init_weak_hash_tables): Remove prototype.
9238
9730daca
DA
92392012-07-15 Dmitry Antipov <dmantipov@yandex.ru>
9240
9241 Use zero_vector where appropriate.
9242 * alloc.c (zero_vector): Define as Lisp_Object. Adjust users
9243 accordingly.
9244 * lisp.h (zero_vector): New declaration.
9245 * font.c (null_vector): Remove.
9246 (syms_of_font): Remove initialization and staticpro.
9247 (font_list_entities, font_find_for_lface): Change to use zero_vector.
9248 * keymap.c (Faccessible_keymaps): Likewise.
9249
2e2d2a13
LL
92502012-07-15 Leo Liu <sdl.web@gmail.com>
9251
9252 * fringe.c: Fix typo in comments.
9253
cd276f6e
LL
92542012-07-14 Leo Liu <sdl.web@gmail.com>
9255
9256 * fringe.c: Add a new bitmap exclamation-mark.
9257
5a1131d9
EZ
92582012-07-14 Eli Zaretskii <eliz@gnu.org>
9259
9260 * gmalloc.c (GMALLOC_INHIBIT_VALLOC): Don't reference.
9261
9262 * s/msdos.h (BSD_SYSTEM, DATA_START, GC_SETJMP_WORKS, HAVE_MOUSE)
9263 (HAVE_MENUS): Don't define, defined by editing config.in with
9264 msdos/sed2v2.inp.
9265 (GMALLOC_INHIBIT_VALLOC): Don't define.
9266 (MODE_LINE_BINARY_TEXT): Remove, not used anymore.
9267
22e983b7
JB
92682012-07-14 Juanma Barranquero <lekktu@gmail.com>
9269
9270 * s/ms-w32.h (GC_SETJMP_WORKS, GC_MARK_STACK): Set in nt/config.nt.
9271
5b3f250f
GM
92722012-07-14 Glenn Morris <rgm@gnu.org>
9273
9274 * s/aix4-2.h, s/freebsd.h, s/gnu-linux.h, s/hpux10-20.h:
9275 * s/irix6-5.h, s/netbsd.h, s/sol2-6.h, s/unixware.h:
9276 Let configure set GC_SETJMP_WORKS, GC_MARK_STACK.
9277
33d63ff4
GM
92782012-07-13 Glenn Morris <rgm@gnu.org>
9279
5b633342
GM
9280 * s/gnu-linux.h (GC_MARK_SECONDARY_STACK): Let configure set it.
9281
33d63ff4
GM
9282 * s/usg5-4-common.h (SETUP_SLAVE_PTY): Let configure set it.
9283 * s/irix6-5.h (SETUP_SLAVE_PTY): No more need to unset it.
9284
b55b9f85
JD
92852012-07-13 Jan Djärv <jan.h.d@swipnet.se>
9286
0dc8cf50
JD
9287 * nsterm.m (uRect): Only define if NS_IMPL_GNUSTEP.
9288 (x_free_frame_resources): Pass x_free_frame_resources to NSTRACE.
9289 (ns_lisp_to_color, ns_string_to_lispmod, ns_term_init)
9290 (ns_term_shutdown, requestService, initFrameFromEmacs): Use SSDATA
9291 where appropriate.
9292 (ns_exec_path, ns_load_path, changeFont): Put () around assignment used
9293 as boolean expression.
9294 (x_set_window_size): Remove unused variable toolbar.
9295 (ns_get_color_default, ns_mod_to_lisp): Remove.
9296 (ns_mouse_position): Remove unused variables xchar and ychar.
9297 (ns_compute_glyph_string_overhangs): Remove unused variable face.
9298 (ns_set_vertical_scroll_bar): Remove unused variable count.
9299 (ns_delete_terminal): Remove unused variable i.
9300 (ns_term_init): Remove unused variables r, g and b.
9301 (mouseDown): Remove unused variable window.
9302 (windowDidResize): Move definition of theWindow inside NS_IMPL_GNUSTEP.
9303 (initFrameFromEmacs): Remove unused variable vbextra.
9304 (mouseEntered): Remove unused variables p and dpyinfo.
9305 (mouseExited): Remove unused variables p and r.
9306 (ns_define_frame_cursor, ns_clear_frame_area)
9307 (ns_draw_window_cursor, ns_initialize_display_info): Make static.
9308 (menuDown): Assign [sender tag] to variable and cast the variable.
9309
9310 * nsterm.h (menuDown): Add id as type to argument sender.
9311 (ns_display_info_for_name): Add Lisp_Object argument.
9312 (ns_term_init): Add Lisp_Object argument.
9313 (ns_map_event_to_object): Add void argument.
9314 (ns_string_from_pasteboard, ns_string_to_pasteboard): Add correct
9315 prototype with arguments and only declare if __OBJC__.
9316 (nxatoms_of_nsselect): Add void argument.
9317 (ns_lisp_to_cursor_type): Add Lisp_Object argument.
9318 (ns_alloc_autorelease_pool): Add void argument.
9319 (ns_release_autorelease_pool): Add void* argument.
9320 (ns_get_defaults_value): Add const char* argument.
9321
9322 * nsmenu.m (ns_update_menubar, ns_menu_show, process_dialog)
9323 (initFromContents): Use SSDATA where appropriate.
9324 (ns_update_menubar): Add braces to ambigous if-else.
9325 (initWithTitle): Put () around assignment in if statement.
9326 (ns_menu_show): Remove unused variables window and keymap.
9327 (update_frame_tool_bar): Remove unused variable selected_p.
9328 (initWithContentRect): Remove unused variable this_cmd_name.
9329
9330 * nsimage.m (ns_load_image, allocInitFromFile): Use SSDATA where
9331 appropriate.
9332 (setXBMColor): Remove unused variable len.
9333 (setPixmapData): Put () around assignment in loop statement.
9334
9335 * nsfont.m (ns_get_family, ns_lang_to_script, ns_otf_to_script)
9336 (ns_registry_to_script, ns_get_req_script, nsfont_open): Use SSDATA
9337 where appropriate.
9338 (ns_get_covering_families, ns_findfonts, nsfont_list_family): Put ()
9339 around assignment in loop statement.
9340 (nsfont_open): Remove unused variable i.
9341 (nsfont_open): Remove unused variable len.
9342 (nsfont_draw): Remove unused variable cs.
9343
9344 * nsfns.m (x_set_icon_name, ns_set_name_internal)
9345 (ns_set_name_as_filename, ns_implicitly_set_icon_type)
9346 (x_set_icon_type, ns_lisp_to_cursor_type, Fns_read_file_name)
9347 (Fns_get_resource, Fns_set_resource, Fx_open_connection)
9348 (Fns_font_name, Fns_perform_service)
9349 (Fns_convert_utf8_nfd_to_nfc, ns_do_applescript)
9350 (Fns_do_applescript, Fx_show_tip): Use SSDATA where appropriate.
9351 (ns_set_name): Remove unused variable view.
9352 (x_set_menu_bar_lines): Remove unused variable olines.
9353 (x_set_tool_bar_lines): Remove unused variable root_window.
9354 (Fns_list_colors): Put () around assignment in while statement.
9355 (Fns_perform_service): Remove unused variable len.
9356 (Fns_display_usable_bounds): Remove unused variable top.
9357 (syms_of_nsfns): Remove unused variable i.
9358
b55b9f85
JD
9359 * nsmenu.m (ns_update_menubar): Exchange place of argument 2 and 3 to
9360 memcpy (Bug#11907).
9361
ed9265fc 93622012-07-13 Kalle Kankare <kalle.kankare@iki.fi> (tiny change)
2277de02
JD
9363
9364 * image.c (Fimagemagick_types): Initialize ex with GetExceptionInfo
9365 and free it with DestroyExceptionInfo (Bug#11558).
9366
ef099b57
JB
93672012-07-13 Juanma Barranquero <lekktu@gmail.com>
9368
9369 * s/ms-w32.h (FIRST_PTY_LETTER, HAVE_SOCKETS): Move to nt/config.nt.
9370 (HAVE_ATTRIBUTE_ALIGNED, HAVE_C99_STRTOLD, HAVE___BUILTIN_UNWIND_INIT):
9371 Set here, not in nt/config.nt.
9372
ea814a5d
EZ
93732012-07-13 Eli Zaretskii <eliz@gnu.org>
9374
9375 * xdisp.c (move_it_in_display_line_to): On GUI terminals, allow
9376 cursor overflow into the last glyph on display line when the right
9377 fringe is off. (Bug#11832)
9378
1a952767
PE
93792012-07-13 Paul Eggert <eggert@cs.ucla.edu>
9380
9381 * xdisp.c (produce_special_glyphs): Now static.
9382 * dispextern.h (produce_special_glyphs): Remove decl.
9383
983188fd
GM
93842012-07-13 Glenn Morris <rgm@gnu.org>
9385
8d7c7eed 9386 * s/bsd-common.h, s/cygwin.h: Remove empty files.
32fb4bb6
GM
9387 * s/freebsd.h, s/netbsd.h: Do not include bsd-common.h.
9388
983188fd
GM
9389 * s/usg5-4-common.h (USG, USG5):
9390 * s/template.h (USG5, USG, HPUX, BSD4_2, BSD_SYSTEM):
9391 * s/sol2-6.h (SOLARIS2):
9392 * s/irix6-5.h (IRIX6_5):
9393 * s/hpux10-20.h (USG, USG5, HPUX):
9394 * s/gnu-linux.h (USG, GNU_LINUX):
9395 * s/freebsd.h (BSD_SYSTEM):
9396 * s/darwin.h (BSD4_2, BSD_SYSTEM, DARWIN_OS):
9397 * s/cygwin.h (CYGWIN):
9398 * s/bsd-common.h (BSD_SYSTEM, BSD4_2):
9399 * s/aix4-2.h (USG, USG5, _AIX): Move "system type" macros to configure.
9400
d1e68667 94012012-07-13 BT Templeton <bpt@hcoop.net> (tiny change)
24ef80ae
PE
9402
9403 * nsfont.m (ns_charset_covers): Don't abort if no bitmap (Bug#11853).
24ef80ae 9404
6de0e799
GM
94052012-07-13 Glenn Morris <rgm@gnu.org>
9406
739ae010
GM
9407 * s/usg5-4-common.h (NSIG_MINIMUM): Let configure set it.
9408
dbee5793
GM
9409 * s/gnu-linux.h, s/irix6-5.h: Let configure set ULIMIT_BREAK_VALUE.
9410
6de0e799
GM
9411 * process.c (init_process_emacs): Replace MIN_PTY_KERNEL_VERSION.
9412 * s/darwin.h (MIN_PTY_KERNEL_VERSION): Remove single-use macro.
9413
b82da769
GM
94142012-07-12 Glenn Morris <rgm@gnu.org>
9415
4fae5a7a 9416 * s/darwin.h (SYSTEM_PURESIZE_EXTRA): Move to configure.
b82da769
GM
9417
9418 * process.c (init_process_emacs): Rename from init_process.
9419 The old name is also the name of a Mach system call.
9420 * lisp.h, emacs.c: Update for this name change.
9421 * nsgui.h, sysselect.h, s/darwin.h: Remove workaround that is no
9422 longer needed.
9423
5a979817
EZ
94242012-07-12 Eli Zaretskii <eliz@gnu.org>
9425
9426 * xdisp.c (insert_left_trunc_glyphs): Fix incorrect size in
9427 memmove call that removes glyphs covered by the left truncation
9428 glyph. Improve commentary.
9429 (display_line): Fix display of continuation glyphs on GUI frames
9430 when the right fringe is turned off and variable-size fonts are
9431 used in the window. Move the code that appends a stretch glyph to
9432 produce_special_glyphs, so that it could be used for truncation
9433 and continuation glyphs alike.
9434 (produce_special_glyphs) [HAVE_WINDOW_SYSTEM]: Produce a stretch
9435 glyph of a suitably computed width, to align the special glyphs at
9436 the window margin. Code moved from display_line. (Bug#11832)
9437
3e91a053
GM
94382012-07-12 Glenn Morris <rgm@gnu.org>
9439
ba9e4b84
GM
9440 * s/aix4-2.h, s/hpux10-20.h: Let configure set NO_EDITRES.
9441
9442 * s/gnu-linux.h, s/hpux10-20.h:
9443 Do not unconditionally define HAVE_XRMSETDATABASE.
9444
3e91a053
GM
9445 * s/gnu-linux.h (UNIX98_PTYS): Let configure set it.
9446
b300b1f4
PE
94472012-07-12 Paul Eggert <eggert@cs.ucla.edu>
9448
9449 Fix typos that broke OS X build.
9450 Reported by Randal L. Schwartz in
9451 <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00225.html>.
9452 * nsterm.m (ns_timeout): Add missing local decl.
9453 (ns_get_color): snprintf -> sprintf, to fix typo.
9454
6e777848
GM
94552012-07-12 Glenn Morris <rgm@gnu.org>
9456
3f922c37
GM
9457 * src/s/aix4-2.h, src/s/cygwin.h, src/s/darwin.h:
9458 * src/s/gnu-linux.h, src/s/hpux10-20.h, src/s/irix6-5.h:
9459 * src/s/sol2-6.h, src/s/unixware.h, src/s/usg5-4-common.h:
9460 Move PTY_NAME_SPRINTF, PTY_TTY_NAME_SPRINTF to configure.
9461
0ab7b23a
GM
9462 * s/cygwin.h, s/darwin.h, s/gnu-linux.h, s/irix6-5.h:
9463 Move PTY_OPEN to configure.
9464
6e777848
GM
9465 * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/darwin.h:
9466 * s/gnu-linux.h, s/hpux10-20.h, s/irix6-5.h, s/template.h:
9467 * s/usg5-4-common.h: Move FIRST_PTY_LETTER, PTY_ITERATION to configure.
9468
4a7edc24
DA
94692012-07-12 Dmitry Antipov <dmantipov@yandex.ru>
9470
9471 Use empty_unibyte_string where applicable.
9472 * keyboard.c (parse_tool_bar_item): Use empty_unibyte_string.
9473 * lread.c (read1): Likewise.
9474 * xsettings.c (syms_of_xsettings): Likewise.
9475
308aab79
GM
94762012-07-12 Glenn Morris <rgm@gnu.org>
9477
42bd1719
GM
9478 * s/cygwin.h (G_SLICE_ALWAYS_MALLOC):
9479 * s/freebsd.h (BROKEN_PTY_READ_AFTER_EAGAIN):
7ccad002
GM
9480 * s/irix6-5.h (SETPGRP_RELEASES_CTTY, PREFER_VSUSP):
9481 * s/hpux10-20.h (RUN_TIME_REMAP):
9482 * s/bsd-common.h (TABDLY): Move to configure.
9483
9484 * s/hpux10-20.h, s/sol2-6.h: Move XOS_NEEDS_TIME_H to configure.
9485
9486 * s/bsd-common.h, s/darwin.h: Move TAB3 to configure.
9487
ea0bbd17 9488 * s/aix4-2.h (BROKEN_FIONREAD, BROKEN_SIGAIO, BROKEN_SIGPTY)
42bd1719 9489 (BROKEN_SIGPOLL, BROKEN_GET_CURRENT_DIR_NAME): Let configure set them.
ea0bbd17
GM
9490
9491 * s/darwin.h (NO_ABORT, NO_MATHERR): Let configure set them.
51c3b9b4 9492
308aab79
GM
9493 * s/bsd-common.h, s/cygwin.h, s/gnu-linux.h, s/irix6-5.h:
9494 * s/template.h: Move NARROWPROTO to configure.
9495
ee1cf5cf
GM
94962012-07-11 Glenn Morris <rgm@gnu.org>
9497
30fe9bf4
GM
9498 * s/gnu-linux.h, s/sol2-6.h: No longer define POSIX,
9499 unused since 2011-01-17 change to systty.h.
9500
ee1cf5cf
GM
9501 * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/darwin.h, s/gnu-linux.h:
9502 * s/hpux10-20.h, s/template.h, s/usg5-4-common.h:
9503 Move HAVE_PTYS and HAVE_SOCKETS to configure.
9504
63e47e07
PE
95052012-07-11 Paul Eggert <eggert@cs.ucla.edu>
9506
9507 * s/sol2-6.h (HAVE_LIBKSTAT): Remove. (Bug#11914)
9508
c43fb4c3
GM
95092012-07-11 Glenn Morris <rgm@gnu.org>
9510
9511 * s/darwin.h, s/gnu-linux.h, s/template.h:
9512 Move INTERRUPT_INPUT to configure.
9513
e8df9267
DA
95142012-07-11 Dmitry Antipov <dmantipov@yandex.ru>
9515
9516 Minor adjustments to interning code.
9517 * lisp.h (intern, intern_c_string): Redefine as static inline
9518 wrappers for intern_1 and intern_c_string_1, respectively.
9519 (intern_1, intern_c_string_1): Rename prototypes.
14ae4239
BT
9520 * lread.c (intern_1, intern_c_string_1, oblookup):
9521 Simplify Vobarray checking.
e8df9267
DA
9522 * font.c (font_intern_prop): Likewise. Adjust comment.
9523 * w32font.c (intern_font_name): Likewise.
9524
34348bd4
AS
95252012-07-11 Andreas Schwab <schwab@linux-m68k.org>
9526
d96a1e0c
AS
9527 * gnutls.c (Fgnutls_boot): Properly parse :keylist argument.
9528
34348bd4
AS
9529 * coding.c (Fdefine_coding_system_internal): Use XCAR/XCDR instead
9530 of Fcar/Fcdr if possible.
9531 * font.c (check_otf_features): Likewise.
9532 * fontset.c (Fnew_fontset): Likewise.
9533 * gnutls.c (Fgnutls_boot): Likewise.
9534 * minibuf.c (read_minibuf): Likewise.
9535 * msdos.c (IT_set_frame_parameters): Likewise.
9536 * xmenu.c (Fx_popup_dialog): Likewise.
9537 * w32menu.c (Fx_popup_dialog): Likewise.
9538
c8add24e
GM
95392012-07-11 Glenn Morris <rgm@gnu.org>
9540
4b575b3c
GM
9541 * s/bsd-common.h, s/cygwin.h: No need to undefine INTERRUPT_INPUT,
9542 since nothing has defined it on these platforms.
9543
09f4e3b0
GM
9544 * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/gnu-linux.h:
9545 * s/irix6-5.h: Move SIGNALS_VIA_CHARACTERS to configure.
9546
172bedef
GM
9547 * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/darwin.h:
9548 * s/gnu-linux.h, s/hpux10-20.h, s/template.h, s/usg5-4-common.h:
9549 Move CLASH_DETECTION to configure.
9550
249685df
GM
9551 * s/gnu.h: Remove file, which is now empty.
9552
c8add24e
GM
9553 * s/gnu.h, s/gnu-linux.h:
9554 Move GNU_LIBRARY_PENDING_OUTPUT_COUNT to configure.
9555
b41253a3
JW
95562012-07-11 John Wiegley <johnw@newartisans.com>
9557
9558 * alloc.c (mark_memory): Guard the "no_address_safety_analysis"
9559 function attribute, so we only use it if it exists in the
9560 compiler.
9561
d923b542
DA
95622012-07-11 Dmitry Antipov <dmantipov@yandex.ru>
9563
9564 Avoid call to strlen in fast_c_string_match_ignore_case.
9565 * search.c (fast_c_string_match_ignore_case): Change to use
9566 length argument. Adjust users accordingly.
9567 * lisp.h (fast_c_string_match_ignore_case): Adjust prototype.
9568
5ebbef1d
PE
95692012-07-11 Paul Eggert <eggert@cs.ucla.edu>
9570
bb352260
PE
9571 Assume mkdir, rmdir.
9572 * sysdep.c (mkdir) [!HAVE_MKDIR]: Remove.
9573 * sysdep.c (rmdir) [!HAVE_RMDIR]: Remove.
9574
57054ddd
PE
9575 Assume rename.
9576 * sysdep.c (rename) [!HAVE_RENAME]: Remove.
9577
b747d3f7
PE
9578 Assume perror.
9579 * s/hpux10-20.h (HAVE_PERROR): Remove.
9580 * sysdep.c (perror) [HPUX && !HAVE_PERROR]:
9581 Remove dummy definition, as this problem was obsolete long ago.
9582
5ebbef1d
PE
9583 Assume strerror.
9584 * sysdep.c (strerror) [!HAVE_STRERROR && !WINDOWSNT]: Remove.
9585
984e7f30
DA
95862012-07-11 Dmitry Antipov <dmantipov@yandex.ru>
9587
9588 Avoid calls to strlen in font processing functions.
9589 * font.c (font_parse_name, font_parse_xlfd, font_parse_fcname)
14ae4239
BT
9590 (font_open_by_name): Change to use length argument.
9591 Adjust users accordingly.
d923b542
DA
9592 * font.h (font_open_by_name, font_parse_xlfd, font_unparse_xlfd):
9593 Adjust prototypes.
9594 * xfont.c (xfont_decode_coding_xlfd, font_unparse_xlfd):
9595 Change to return ptrdiff_t.
984e7f30
DA
9596 (xfont_list_pattern, xfont_match): Use length returned by
9597 xfont_decode_coding_xlfd.
9598 * xfns.c (x_default_font_parameter): Omit useless xstrdup.
9599
20e94fdd
GM
96002012-07-11 Glenn Morris <rgm@gnu.org>
9601
9d596af3
GM
9602 * s/darwin.h, s/freebsd.h, s/netbsd.h:
9603 Move DONT_REOPEN_PTY to configure.
9604
20e94fdd
GM
9605 * sound.c (DEFAULT_SOUND_DEVICE) [!WINDOWSNT]:
9606 * s/netbsd.h (DEFAULT_SOUND_DEVICE): Let configure set it.
9607
e99a530f
PE
96082012-07-10 Paul Eggert <eggert@cs.ucla.edu>
9609
22ffb973
PE
9610 Remove "#define unix" that is no longer needed (Bug#11905).
9611 * s/aix4-2.h (unix): Remove; no longer needed.
9612
e9a9ae03
PE
9613 EMACS_TIME simplification (Bug#11875).
9614 This replaces macros (which typically do not work in GDB)
9615 with functions, typedefs and enums, making the code easier to debug.
9616 The functional style also makes code easier to read and maintain.
9617 * systime.h: Include <sys/time.h> on all hosts, not just if
9618 WINDOWSNT, since 'struct timeval' is needed in general.
9619 (EMACS_TIME): Now a typedef, not a macro.
9620 (EMACS_TIME_RESOLUTION, LOG10_EMACS_TIME_RESOLUTION): Now constants,
9621 not macros.
9622 (EMACS_SECS, EMACS_NSECS, EMACS_TIME_SIGN, EMACS_TIME_VALID_P)
9623 (EMACS_TIME_FROM_DOUBLE, EMACS_TIME_TO_DOUBLE, EMACS_TIME_EQ)
9624 (EMACS_TIME_NE, EMACS_TIME_GT, EMACS_TIME_GE, EMACS_TIME_LT)
9625 (EMACS_TIME_LE): Now functions, not macros.
9626 (EMACS_SET_SECS, EMACS_SET_NSECS, EMACS_SET_SECS_NSECS)
9627 (EMACS_SET_USECS, EMACS_SET_SECS_USECS): Remove these macros,
9628 which are not functions. All uses rewritten to use:
9629 (make_emacs_time): New function.
9630 (EMACS_SECS_ADDR, EMACS_SET_INVALID_TIME, EMACS_GET_TIME)
9631 (EMACS_ADD_TIME, EMACS_SUB_TIME): Remove these macros, which are
9632 not functions. All uses rewritten to use the following, respectively:
9633 (emacs_secs_addr, invalid_emacs_time, get_emacs_time)
9634 (add_emacs_time, sub_emacs_time): New functions.
ed9265fc 9635 * atimer.c: Don't include <sys/time.h>, as "systime.h" does this.
e9a9ae03
PE
9636 * fileio.c (Fcopy_file):
9637 * xterm.c (XTflash): Get the current time closer to when it's used.
9638 * makefile.w32-in ($(BLD)/atimer.$(O)): Update dependencies.
9639
ffacb126
PE
9640 * bytecode.c (targets): Suppress -Woverride-init warnings.
9641
e99a530f
PE
9642 Simplify by avoiding confusing use of strncpy etc.
9643 * doc.c (Fsnarf_documentation):
9644 * fileio.c (Ffile_name_directory, Fsubstitute_in_file_name):
9645 * frame.c (Fmake_terminal_frame):
9646 * gtkutil.c (get_utf8_string):
9647 * lread.c (openp):
9648 * nsmenu.m (ns_update_menubar):
9649 * regex.c (regerror):
9650 Prefer memcpy to strncpy and strncat when either will do.
9651 * fileio.c (Fsubstitute_in_file_name):
9652 * keyboard.c (MULTI_LETTER_MOD, parse_modifiers_uncached)
9653 (menu_separator_name_p):
9654 * nsmenu.m (ns_update_menubar):
9655 Prefer memcmp to strncmp when either will do.
9656 * nsterm.m: Include <ftoastr.h>.
9657 (ns_get_color):
9658 * s/gnu-linux.h, s/sol2-6.h, s/unixware.h (PTY_TTY_NAME_SPRINTF):
9659 Prefer snprintf to strncpy.
9660 * nsterm.m (ns_term_init):
9661 * widget.c (set_frame_size) [0]: Prefer xstrdup to xmalloc + strncpy.
9662 * nsterm.m (ns_term_init):
9663 Avoid the need for strncpy, by using build_string or
9664 make_unibyte_string directly. Use dtoastr, not snprintf.
9665 * process.c (Fmake_network_process): Diagnose service names that
9666 are too long, rather than silently truncating them or creating
9667 non-null-terminated names.
9668 (Fnetwork_interface_info): Likewise, for interface names.
9669 * sysdep.c (system_process_attributes) [GNU_LINUX]:
9670 Prefer sprintf to strncat.
9671 * xdisp.c (debug_method_add) [GLYPH_DEBUG]:
9672 Prefer vsnprintf to vsprintf + strncpy.
9673
c59592b3
GM
96742012-07-10 Glenn Morris <rgm@gnu.org>
9675
9676 * dispnew.c (PENDING_OUTPUT_COUNT) [!__GNU_LIBRARY__]:
9677 Clarify fallback case.
9678
7d7bbefd
DA
96792012-07-10 Dmitry Antipov <dmantipov@yandex.ru>
9680
9681 Use XCAR and XCDR instead of Fcar and Fcdr where possible.
9682 * callint.c, coding.c, doc.c, editfns.c, eval.c, font.c, fontset.c,
9683 * frame.c, gnutls.c, minibuf.c, msdos.c, textprop.c, w32fns.c,
d923b542 9684 * w32menu.c, window.c, xmenu.c: Change to use XCAR and XCDR
7d7bbefd
DA
9685 where argument type is known to be a Lisp_Cons.
9686
3a4c8000
TT
96872012-07-10 Tom Tromey <tromey@redhat.com>
9688
9689 * bytecode.c (BYTE_CODE_THREADED): New macro.
9690 (BYTE_CODES): New macro. Replaces all old byte-code defines.
9691 (enum byte_code_op): New type.
9692 (CASE, NEXT, FIRST, CASE_DEFAULT, CASE_ABORT): New macros.
9693 (exec_byte_code): Use them. Use token threading when applicable.
9694
2a0213a6
DA
96952012-07-10 Dmitry Antipov <dmantipov@yandex.ru>
9696
9697 Optimize pure C strings initialization.
9698 * lisp.h (make_pure_string): Fix prototype.
9699 (build_pure_c_string): New function, defined as static inline. This
9700 provides a better opportunity to optimize away calls to strlen when
9701 the function is called with compile-time constant argument.
9702 * alloc.c (make_pure_c_string): Fix comment. Change to add nchars
9703 argument, adjust users accordingly. Use build_pure_c_string where
9704 appropriate.
9705 * buffer.c, coding.c, data.c, dbusbind.c, fileio.c, fontset.c, frame.c,
9706 * keyboard.c, keymap.c, lread.c, search.c, syntax.c, w32fns.c, xdisp.c,
9707 * xfaces.c, xfns.c, xterm.c: Use build_pure_c_string where appropriate.
9708
cb1caeaf
DA
97092012-07-10 Dmitry Antipov <dmantipov@yandex.ru>
9710
9711 Avoid calls to strlen in miscellaneous functions.
9712 * buffer.c (init_buffer): Use precalculated len, adjust if needed.
9713 * font.c (Ffont_xlfd_name): Likewise. Change to call make_string.
9714 * lread.c (openp): Likewise.
9715
c293e30c
DA
97162012-07-10 Dmitry Antipov <dmantipov@yandex.ru>
9717
9718 Avoid calls to strlen in path processing functions.
9719 * fileio.c (file_name_as_directory): Add comment. Change to add
9720 srclen argument and return the length of result. Adjust users
9721 accordingly.
9722 (directory_file_name): Fix comment. Change to add srclen argument,
14ae4239
BT
9723 swap 1st and 2nd arguments to obey the common convention.
9724 Adjust users accordingly.
c293e30c
DA
9725 * filelock.c (fill_in_lock_file_name): Avoid calls to strlen.
9726
9e059e3f
GM
97272012-07-10 Glenn Morris <rgm@gnu.org>
9728
d02eb359
GM
9729 * s/cygwin.h, s/darwin.h, s/freebsd.h, s/netbsd.h, s/unixware.h:
9730 Move PENDING_OUTPUT_COUNT definition to configure.
9731
882cf227
GM
9732 * s/irix6-5.h (DATA_START, DATA_SEG_BITS):
9733 * s/hpux10-20.h (DATA_SEG_BITS, DATA_START):
9734 * s/gnu.h (DATA_START): Move definitions to configure.
9735
af6e839f
GM
9736 * s/irix6-5.h (SETUP_SLAVE_PTY, PTY_NAME_SPRINTF): Drop ifdef guards.
9737 We include usg5-4-common.h, which defines them both.
9738
40289a12
GM
9739 * s/gnu.h: Don't include fcntl.h (every file in Emacs that uses
9740 O_RDONLY already includes it).
9741
9e059e3f
GM
9742 Stop ns builds setting the EMACSLOADPATH environment variable.
9743 * nsterm.m (ns_load_path): Rename from ns_init_paths.
9744 Now it does not set EMACSLOADPATH, just returns the load-path string.
9745 * nsterm.h: Update accordingly.
9746 * lread.c [HAVE_NS]: Include nsterm.h.
9747 (init_lread) [HAVE_NS]: Use ns_load_path.
9748 * emacs.c (main) [HAVE_NS]: No longer call ns_init_paths.
9749
7c4e8ec0
GM
97502012-07-09 Glenn Morris <rgm@gnu.org>
9751
d4f600ff
GM
9752 * s/gnu.h (SIGNALS_VIA_CHARACTERS): No need to define it here,
9753 since the included bsd-common.h does so.
9754
cbb31951
GM
9755 Stop ns builds setting the EMACSPATH environment variable.
9756 * nsterm.m (ns_exec_path): New function, split from ns_init_paths.
9757 (ns_init_paths): Do not set EMACSPATH.
9758 * nsterm.h (ns_exec_path): Add it.
9759 * callproc.c (init_callproc_1, init_callproc) [HAVE_NS]:
9760 Use ns_exec_path.
9761
7c4e8ec0
GM
9762 * nsterm.m, nsterm.h (ns_etc_directory): Fix type, empty return.
9763
26bccfae
PE
97642012-07-09 Paul Eggert <eggert@cs.ucla.edu>
9765
a0bee46f
PE
9766 * process.c (wait_reading_process_output): 'waitchannels' was unset
9767 when read_kbd || !NILP (wait_for_cell); fix this.
9768
5994c183
PE
9769 Add GCC-style 'const' attribute to functions that can use it.
9770 * character.h (char_resolve_modifier_mask):
9771 * keyboard.h (make_ctrl_char):
9772 * lisp.h (multibyte_char_to_unibyte, multibyte_char_to_unibyte_safe)
9773 (init_character_once, next_almost_prime, init_fns, init_image)
9774 (flush_pending_output, init_sound):
9775 * mem-limits.h (start_of_data):
9776 * menu.h (finish_menu_items):
9777 Add ATTRIBUTE_CONST.
9778 * emacs.c (DEFINE_DUMMY_FUNCTION):
9779 Declare the dummy function with ATTRIBUTE_CONST.
9780 * lisp.h (Fbyteorder, Fmax_char, Fidentity):
9781 Add decls with ATTRIBUTE_CONST.
9782
26bccfae
PE
9783 Minor improvements to make_formatted_string.
9784 * alloc.c (make_formatted_string): Prefer int to ptrdiff_t
9785 where int is good enough, as vsprintf returns an int.
9786 * lisp.h (make_formatted_string): Add ATTRIBUTE_FORMAT_PRINTF.
9787
a8290ec3
DA
97882012-07-09 Dmitry Antipov <dmantipov@yandex.ru>
9789
9790 Use make_formatted_string to avoid double length calculation.
9791 * lisp.h (make_formatted_string): New prototype.
9792 * alloc.c (make_formatted_string): New function.
9793 * buffer.c (Fgenerate_new_buffer_name): Use it.
220cb2bd 9794 * dbusbind.c (syms_of_dbusbind): Likewise.
a8290ec3
DA
9795 * editfns.c (Fcurrent_time_zone): Likewise.
9796 * filelock.c (get_boot_time): Likewise.
9797 * frame.c (make_terminal_frame, set_term_frame_name)
9798 (x_report_frame_params): Likewise.
9799 * image.c (gs_load): Likewise.
9800 * minibuf.c (get_minibuffer): Likewise.
9801 * msdos.c (dos_set_window_size): Likewise.
9802 * process.c (make_process): Likewise.
9803 * xdisp.c (ensure_echo_area_buffers): Likewise.
9804 * xsettings.c (apply_xft_settings): Likewise.
9805
d01ba2f1
GM
98062012-07-09 Glenn Morris <rgm@gnu.org>
9807
9808 Stop ns builds polluting the environment with EMACSDATA, EMACSDOC.
9809 * nsterm.m (ns_etc_directory): New function, split from ns_init_paths.
9810 (ns_init_paths): Do not set EMACSDATA, EMACSDOC.
9811 * nsterm.h (ns_etc_directory): Add it.
9812 * callproc.c [HAVE_NS]: Include nsterm.h.
9813 (init_callproc_1, init_callproc) [HAVE_NS]: Use ns_etc_directory.
9814
f1f924b6
DA
98152012-07-09 Dmitry Antipov <dmantipov@yandex.ru>
9816
9817 Move marker debugging code under MARKER_DEBUG.
9818 * marker.c (MARKER_DEBUG): Move marker debugging code under
9819 #ifdef MARKER_DEBUG because byte_char_debug_check is too slow
9820 for bootstrap with --enable-checking (~3x slowdown reported
9821 by Juanma Barranquero <lekktu@gmail.com>).
9822 (verify_bytepos): Move under #ifdef MARKER_DEBUG.
9823
ab531b66
PE
98242012-07-08 Paul Eggert <eggert@cs.ucla.edu>
9825
9826 * systime.h (EMACS_SUB_TIME): Clarify behavior with unsigned time_t.
9827 See <http://bugs.gnu.org/11825#29>.
9828
c4b3bc8a
EZ
98292012-07-08 Eli Zaretskii <eliz@gnu.org>
9830
9831 * xdisp.c (fill_glyphless_glyph_string): If the face of the glyph
9832 has no font, use the frame's font. (Bug#11813)
3434fe8a
EZ
9833 (display_line): Add commentary about displaying truncation glyphs
9834 on GUI frames.
9835 (produce_special_glyphs): Move here from term.c.
9836
9837 * term.c (produce_special_glyphs): Move to xdisp.c.
9838
9839 * dispextern.h (produce_special_glyphs): Move prototype to xdisp.c
9840 section.
c4b3bc8a 9841
b676b881
AS
98422012-07-07 Andreas Schwab <schwab@linux-m68k.org>
9843
f17c5273
AS
9844 * xdisp.c (display_line): Avoid warning about implicit declaration
9845 of FRAME_FONT.
9846
298819b9
AS
9847 * frame.c (get_frame_param): Define only if HAVE_WINDOW_SYSTEM.
9848
b676b881
AS
9849 * lisp.h: Remove empty conditional.
9850
6045c4fd
PE
98512012-07-07 Paul Eggert <eggert@cs.ucla.edu>
9852
b3350bf9
PE
9853 * lread.c (load_path_check): Now static.
9854
6045c4fd
PE
9855 Fix some minor --with-ns problems found by static checking.
9856 * frame.c (Ftool_bar_pixel_width) [!FRAME_TOOLBAR_WIDTH]:
9857 (x_set_font) [!HAVE_X_WINDOWS]:
9858 * image.c (xpm_load_image) [HAVE_NS]:
9859 (x_to_xcolors) [!HAVE_X_WINDOWS && !HAVE_NTGUI]:
9860 (x_disable_image) [!HAVE_NS && !HAVE_NTGUI]:
9861 Remove unused local.
9862 (Fx_parse_geometry) [HAVE_NS]: Don't return garbage.
9863 (xpm_load_image) [HAVE_NS && !HAVE_XPM]: Remove unused label.
9864 * image.c (x_create_bitmap_from_file) [HAVE_NS]:
9865 (xpm_load_image, xpm_load) [HAVE_NS && !HAVE_XPM]:
9866 * nsselect.m (symbol_to_nsstring, ns_string_to_pasteboard_internal):
9867 * xfaces.c (Fx_load_color_file) [!HAVE_X_WINDOWS]:
9868 Fix pointer signedness problem.
9869 * xfaces.c (FRAME_X_FONT_TABLE):
9870 * xterm.h (FRAME_X_FONT_TABLE): Remove unused, incompatible macros.
9871
929e7845
GM
98722012-07-07 Glenn Morris <rgm@gnu.org>
9873
9874 * lread.c (load_path_check): New function, split from init_lread.
9875 (init_lread): Reorganize. Motivation:
9876 If EMACSLOADPATH is set, check/warn about that rather than the
9877 defaults, which we are not going to use. Hence we can remove
9878 the turn_off_warning and WINDOWSNT || HAVE_NS tests.
9879 Don't warn if site-lisp directories are missing.
9880 If not installed, start from a blank load-path, since
9881 PATH_LOADSEARCH refers to the eventual installation directories.
9882
58dd0aa4
EZ
98832012-07-07 Eli Zaretskii <eliz@gnu.org>
9884
9885 Support truncation and continuation glyphs on GUI frames, when
9886 fringes are disabled. (Bug#11832)
9887 * xdisp.c (init_iterator): Get dimensions of truncation and
14ae4239
BT
9888 continuation glyphs even if on GUI frames.
9889 Adjust it->last_visible_x on GUI frames when the left or right fringes,
58dd0aa4
EZ
9890 or both, are absent.
9891 (start_display, move_it_in_display_line_to): Handle the case of a
9892 GUI frame without a fringe to display continuation or truncation
9893 glyphs.
9894 (insert_left_trunc_glyphs): Support GUI frames: make sure
9895 truncation glyphs overwrite enough glyphs from the current line to
9896 have sufficient space in pixels.
9897 (display_line): Support truncation and continuation glyphs on GUI
9898 frames. If some spare pixels are left on the line after inserting
9899 the truncation glyphs, fill that space with a stretch glyph of a
9900 suitably computed width.
9901
9902 * term.c (produce_special_glyphs): Call PRODUCE_GLYPHS, not
9903 produce_glyphs, to support GUI sessions.
9904
31571fd7
PE
99052012-07-07 Paul Eggert <eggert@cs.ucla.edu>
9906
5a16b9bc
PE
9907 * sysdep.c (ULLONG_MAX): Define if not already defined (Bug#11781).
9908
f3047c75
PE
9909 * sysdep.c (list_system_processes): Port to NetBSD-current (Bug#11797).
9910
31571fd7
PE
9911 Do not require float-time's arg to fit in time_t (Bug#11825).
9912 This works better on hosts where time_t is unsigned, and where
9913 float-time is applied to the (negative) difference between two times.
9914 * editfns.c (decode_time_components): Last arg is now double *,
9915 not int *, and means to store all the result as a double, without
9916 worrying about whether the seconds part fits in time_t.
9917 All callers changed.
9918 (lisp_time_argument): Remove last int * arg, as it's no longer needed.
9919 All callers changed.
9920 (Ffloat_time): Do not fail merely because the specified time falls
9921 outside of time_t range.
9922
4516fbef
GM
99232012-07-07 Glenn Morris <rgm@gnu.org>
9924
9925 * s/darwin.h (HAVE_RES_INIT, HAVE_LIBRESOLV):
9926 * s/hpux10-20.h (HAVE_RINT, HAVE_RANDOM):
9927 * s/unixware.h (HAVE_GETWD): Move undefs to configure (effectively).
9928
07adc2c6
JB
99292012-07-07 Juanma Barranquero <lekktu@gmail.com>
9930
9931 * makefile.w32-in (DISPEXTERN_H, $(BLD)/regex.$(O)):
9932 Update dependencies.
9933
9934 * s/ms-w32.h [_MSC_VER]: Remove strcasecmp, strncasecmp.
9935
fd573f31
PE
99362012-07-06 Paul Eggert <eggert@cs.ucla.edu>
9937
fee5959d
PE
9938 Use c_strcasecmp for ASCII case-insensitive comparison (Bug#11786).
9939 * dispextern.h, nsfns.m, nsterm.m: Include <c-strcase.h>.
9940 * dispextern.h (xstrcasecmp): Rewrite using c_strcasecmp.
9941 * nsfns.m (x_get_string_resource): Use c_strncasecmp, not strncasecmp.
9942 * nsterm.m (ns_default): Use c_strcasecmp, not strcasecmp.
9943 * xfaces.c (xstrcasecmp) [!HAVE_STRCASECMP]: Remove.
9944
fd573f31
PE
9945 * xfont.c (compare_font_names): Redo to omit the need for casts.
9946
ddadbc0e
AS
99472012-07-06 Andreas Schwab <schwab@linux-m68k.org>
9948
fca8d6b6
AS
9949 * xfns.c (Fx_change_window_property): Doc fix.
9950 * w32fns.c (Fx_change_window_property): Doc fix.
9951
ddadbc0e
AS
9952 * w32fns.c (Fx_window_property): Accept the same arguments as the
9953 X Windows version. Doc fix.
9954 * xfns.c (Fx_window_property): Doc fix. (Bug#11870)
9955
ed9265fc 99562012-07-06 Juanma Barranquero <lekktu@gmail.com>
f247498e
JB
9957 Eli Zaretskii <eliz@gnu.org>
9958
9959 * s/ms-w32.h: Settings not specific to Windows moved to nt/config.nt.
9960 Windows-specific code from nt/config.nt moved here.
9961 Obsolete settings removed.
9962
216ee680
PE
99632012-07-06 Paul Eggert <eggert@cs.ucla.edu>
9964
9965 * process.c: Avoid unnecessary calls to gettime.
9966 (wait_reading_process_output): Don't get the time of day
9967 when gobbling data immediately and not waiting, as there's no need
9968 for it in that case. This removes a FIXME.
9969
bdd091e4
JD
99702012-07-06 Jan Djärv <jan.h.d@swipnet.se>
9971
9972 * gtkutil.c (xg_event_is_for_scrollbar): Assign gwin when HAVE_GTK3
9973 is defined (Bug#11768).
9974
9d44f8ce
DA
99752012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
9976
9977 Fix marker debugging code.
9978 * marker.c (byte_char_debug_check): Do not perform the check
9979 if buffer is not multibyte.
090bd7cb
JB
9980 (buf_charpos_to_bytepos, buf_bytepos_to_charpos):
9981 Call byte_char_debug_check with correct arguments.
9d44f8ce 9982
90fc4786
DA
99832012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
9984
9985 Compile marker debugging code only if ENABLE_CHECKING is defined.
090bd7cb
JB
9986 * marker.c (byte_char_debug_check, count_markers):
9987 Use only if ENABLE_CHECKING is defined.
90fc4786
DA
9988 (byte_debug_flag): Remove.
9989 (CONSIDER, buf_charpos_to_bytepos, buf_bytepos_to_charpos):
9990 Always call byte_char_debug_check if ENABLE_CHECKING is defined.
9991
7b7ae965
DA
99922012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
9993
4e57b342
DA
9994 Avoid code repetition in marker-related functions.
9995 * marker.c (attach_marker): New function.
9996 (Fset_marker, set_marker_restricted, set_marker_both)
9997 (set_marker_restricted_both): Use it.
9998 (Fset_marker, set_marker_restricted, Fbuffer_has_markers_at):
9999 Consistently rename charno to charpos.
10000 (marker_position): Add eassert.
10001 (marker_byte_position): Convert to eassert.
10002
100032012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
10004
10005 Simplify list operations in unchain_overlay and unchain_marker.
7b7ae965 10006 * buffer.c (unchain_overlay): Simplify. Add comment.
4e57b342 10007 * marker.c (unchain_marker): Simplify. Fix comments.
7b7ae965 10008
657924ff
DA
100092012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
10010
10011 Introduce fast path for the widely used marker operation.
10012 * alloc.c (build_marker): New function.
10013 * lisp.h (build_marker): New prototype.
10014 * buffer.c (clone_per_buffer_values, Fmake_indirect_buffer): Use it.
10015 * composite.c (autocmp_chars): Likewise.
10016 * editfns.c (buildmark): Remove.
10017 (Fpoint_marker, Fpoint_min_marker, Fpoint_max_marker)
10018 (save_restriction_save): Use build_marker.
10019 * marker.c (buf_charpos_to_bytepos, buf_bytepos_to_charpos): Likewise.
10020 * window.c (save_window_save): Likewise.
10021
041a49a6
DA
100222012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
10023
10024 Do not use Fdelete_overlay in delete_all_overlays
10025 to avoid redundant calls to unchain_overlay.
10026 * buffer.c (drop_overlay): New function.
10027 (delete_all_overlays, Fdelete_overlay): Use it.
10028 * minibuf.c (get_minibuffer): Fix comment.
10029
7dca65a4
PE
100302012-07-06 Paul Eggert <eggert@cs.ucla.edu>
10031
10032 Port to OpenBSD 5.1 amd64.
10033 * sysdep.c [BSD_SYSTEM]: Include <sys/param.h> before <sys/sysctl.h>.
10034 This is needed for OpenBSD, and should be harmless on all BSD systems.
10035 Also, include <sys/sysctl.h>, as it should be available on all
10036 BSD_SYSTEM hosts given that we're already calling sysctl in that case.
10037 (list_system_processes) [__OpenBSD__]: Use DARWIN_OS style mib, but
10038 use p_pid member, not kp_proc.pid.
10039
8eb876e2
GM
100402012-07-06 Glenn Morris <rgm@gnu.org>
10041
10042 * Makefile.in (emacs$(EXEEXT)): Don't check for load-path shadows.
10043
38182d90
PE
100442012-07-05 Paul Eggert <eggert@cs.ucla.edu>
10045
10046 More xmalloc and related cleanup.
10047 * alloc.c, bidi.c, buffer.c, buffer.h, bytecode.c, callint.c:
10048 * callproc.c, charset.c, coding.c, composite.c, data.c, dispnew.c:
10049 * doc.c, editfns.c, emacs.c, eval.c, fileio.c, filelock.c, fns.c:
10050 * font.c, fontset.c, frame.c, fringe.c, ftfont.c, ftxfont.c, gmalloc.c:
10051 * gtkutil.c, image.c, keyboard.c, keymap.c, lread.c, macros.c, menu.c:
10052 * nsfns.m, nsfont.m, nsmenu.m, nsterm.m, print.c, process.c, ralloc.c:
10053 * regex.c, region-cache.c, scroll.c, search.c, sound.c, syntax.c:
10054 * sysdep.c, term.c, termcap.c, unexmacosx.c, window.c, xdisp.c:
10055 * xfaces.c, xfns.c, xftfont.c, xgselect.c, xmenu.c, xrdb.c, xselect.c:
10056 * xterm.c:
10057 Omit needless casts involving void * pointers and allocation.
10058 Prefer "P = xmalloc (sizeof *P)" to "P = xmalloc (sizeof (TYPE_OF_P))",
10059 as the former is more robust if P's type is changed.
10060 Prefer xzalloc to xmalloc + memset 0.
10061 Simplify malloc-or-realloc to realloc.
10062 Don't worry about xmalloc returning a null pointer.
10063 Prefer xstrdup to xmalloc + strcpy.
10064 * editfns.c (Fmessage_box): Grow message_text by at least 80 when
10065 growing it.
10066 * keyboard.c (apply_modifiers_uncached): Prefer local array to
10067 alloca of a constant.
10068
6dd5a677
EZ
100692012-07-05 Eli Zaretskii <eliz@gnu.org>
10070
10071 * xdisp.c (display_line): Fix horizontal pixel coordinates when
10072 hscroll is larger than the line width. Fixes long and futile
10073 looping inside extend_face_to_end_of_line (on a TTY) producing
10074 glyphs that are not needed and thrown away.
10075
6b312f0f
DA
100762012-07-05 Dmitry Antipov <dmantipov@yandex.ru>
10077
10078 * marker.c (set_marker_restricted_both): Simplify by using
10079 clip_to_bounds.
10080
f520ef9b
PE
100812012-07-05 Paul Eggert <eggert@cs.ucla.edu>
10082
10083 * editfns.c (region_limit): Simplify by using clip_to_bounds.
10084
383b7c95
JD
100852012-07-05 Jan Djärv <jan.h.d@swipnet.se>
10086
10087 * gtkutil.c (gtk_scrollbar_new, gtk_box_new): Define when HAVE_GTK3 is
10088 not defined (Bug#11768).
10089 (xg_create_frame_widgets): Use gtk_plug_new_for_display (Bug#11768).
10090 (xg_create_frame_widgets, create_dialog, xg_get_file_with_chooser)
10091 (make_widget_for_menu_item, xg_make_tool_item): Use gtk_box_new
10092 followed by gtk_box_set_homogeneous (Bug#11768).
10093 (xg_update_menu_item): Use GTK_IS_BOX (Bug#11768).
090bd7cb
JB
10094 (update_theme_scrollbar_width, xg_create_scroll_bar):
10095 Use gtk_scrollbar_new (Bug#11768).
383b7c95
JD
10096 (xg_event_is_for_scrollbar): Use Gdk Device functions for HAVE_GTK3.
10097 (is_box_type): New function (Bug#11768).
10098 (xg_tool_item_stale_p): Call is_box_type.
5293d758 10099 (xg_initialize): Get settings by calling gtk_settings_get_for_screen
383b7c95
JD
10100 with default display (Bug#11768).
10101
d6e7bf45
EZ
101022012-07-05 Eli Zaretskii <eliz@gnu.org>
10103
10104 * xdisp.c (window_hscroll_limited): New function.
10105 (pos_visible_p, init_iterator): Use it to avoid overflow of pixel
10106 coordinates when window's hscroll is set to insanely large
10107 values. (Bug#11857)
10108
431391ec
JB
101092012-07-05 Juanma Barranquero <lekktu@gmail.com>
10110
10111 * makefile.w32-in ($(BLD)/dired.$(O), $(BLD)/fileio.$(O)): Fix typo.
10112 ($(BLD)/terminal.$(O), $(BLD)/syntax.$(O)): Update dependencies.
10113
23f86fce
DA
101142012-07-05 Dmitry Antipov <dmantipov@yandex.ru>
10115
10116 Cleanup xmalloc.
10117 * lisp.h (xzalloc): New prototype. Omit needless casts.
10118 * alloc.c (xzalloc): New function. Omit needless casts.
10119 * charset.c: Omit needless casts. Convert all calls to
10120 xmalloc with following memset to xzalloc.
10121 * dispnew.c: Likewise.
10122 * fringe.c: Likewise.
10123 * image.c: Likewise.
10124 * sound.c: Likewise.
10125 * term.c: Likewise.
10126 * w32fns.c: Likewise.
10127 * w32font.c: Likewise.
10128 * w32term.c: Likewise.
10129 * xfaces.c: Likewise.
10130 * xfns.c: Likewise.
10131 * xterm.c: Likewise.
10132 * atimer.c: Omit needless casts.
10133 * buffer.c: Likewise.
10134 * callproc.c: Likewise.
10135 * ccl.c: Likewise.
10136 * coding.c: Likewise.
10137 * composite.c: Likewise.
10138 * doc.c: Likewise.
10139 * doprnt.c: Likewise.
10140 * editfns.c: Likewise.
10141 * emacs.c: Likewise.
10142 * eval.c: Likewise.
10143 * filelock.c: Likewise.
10144 * fns.c: Likewise.
10145 * gtkutil.c: Likewise.
10146 * keyboard.c: Likewise.
10147 * lisp.h: Likewise.
10148 * lread.c: Likewise.
10149 * minibuf.c: Likewise.
10150 * msdos.c: Likewise.
10151 * print.c: Likewise.
10152 * process.c: Likewise.
10153 * region-cache.c: Likewise.
10154 * search.c: Likewise.
10155 * sysdep.c: Likewise.
10156 * termcap.c: Likewise.
10157 * terminal.c: Likewise.
10158 * tparam.c: Likewise.
10159 * w16select.c: Likewise.
10160 * w32.c: Likewise.
10161 * w32reg.c: Likewise.
10162 * w32select.c: Likewise.
10163 * w32uniscribe.c: Likewise.
10164 * widget.c: Likewise.
10165 * xdisp.c: Likewise.
10166 * xmenu.c: Likewise.
10167 * xrdb.c: Likewise.
10168 * xselect.c: Likewise.
10169
0497dc44
PE
101702012-07-05 Paul Eggert <eggert@cs.ucla.edu>
10171
10172 * fileio.c (time_error_value): Check the right error number.
10173 Problem reported by Troels Nielsen in
10174 <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00095.html>.
10175
356e7178
PE
101762012-07-04 Paul Eggert <eggert@cs.ucla.edu>
10177
4e71fd89
PE
10178 * window.c (set_window_hscroll): Revert the 100000 hscroll limit.
10179 This should be fixed in a better way; see Eli Zaretskii in
10180 <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00088.html>.
10181 (HSCROLL_MAX): Remove; this is now internal to set_window_hscroll.
10182
f0941253
PE
10183 * fileio.c (time_error_value): Rename from special_mtime.
10184 The old name's problems were noted by Eli Zaretskii in
10185 <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00087.html>.
10186
065c9eb4
PE
10187 * emacs.c (gdb_pvec_type): Change it back to enum pvec_type.
10188 This variable's comment says Emacs needs at least one GDB-visible
10189 symbol of type enum pvec_type, to work around GDB problems.
10190 The symbol's value doesn't matter.
10191
356e7178
PE
10192 * alloc.c (PSEUDOVECTOR_NBYTES): Remove stray ';'
10193 that causes compilation to fail on pre-C99 compilers.
10194
ed9265fc 101952012-07-04 Juanma Barranquero <lekktu@gmail.com>
95f61aa2
JB
10196
10197 * s/ms-w32.h (LISP_FLOAT_TYPE, HAVE_MEMCMP, HAVE_MEMCPY)
10198 (HAVE_MEMMOVE, HAVE_MEMSET): Don't set, obsolete.
10199
3884d954
DA
102002012-07-04 Dmitry Antipov <dmantipov@yandex.ru>
10201
d209e2fb 10202 * buffer.c (init_buffer_once): Fix initialization of
3884d954
DA
10203 headers for buffer_defaults and buffer_local_symbols.
10204 Reported by Juanma Barranquero <lekktu@gmail.com>.
10205
ee28be33
SM
102062012-07-04 Stefan Monnier <monnier@iro.umontreal.ca>
10207
10208 Turn VECTOR_FREE_LIST_FLAG into PVEC_FREE.
10209 * lisp.h (enum pvec_type): Use fewer bits.
10210 (PSEUDOVECTOR_SIZE_BITS): New constant.
10211 (PSEUDOVECTOR_SIZE_MASK, PVEC_TYPE_MASK): Use it.
10212 (XSETPVECTYPESIZE, XSETTYPED_PSEUDOVECTOR, DEFUN): Adapt code to
10213 change in pvec_type.
10214 (PSEUDOVECTOR_TYPEP): New macro.
10215 (TYPED_PSEUDOVECTORP): Use it.
10216 * fns.c (internal_equal): Adapt code to extract pvectype.
10217 * emacs.c (gdb_pvec_type): Update type.
10218 * alloc.c (PSEUDOVECTOR_NBYTES): New macro.
10219 (VECTOR_FREE_LIST_SIZE_MASK): Remove (=> PSEUDOVECTOR_SIZE_MASK).
10220 (VECTOR_FREE_LIST_FLAG): Remove (=> PVEC_FREE).
10221 (SETUP_ON_FREE_LIST): Use XSETPVECTYPESIZE.
10222 (sweep_vectors): Use it. Use local var `total_bytes' instead of
10223 abusing vector->header.next.nbytes.
10224 (live_vector_p): Use PVEC_TYPE.
10225 (mark_object): Adapt code to extract pvectype. Use switch.
10226
c7f2cd7f
PE
102272012-07-04 Paul Eggert <eggert@cs.ucla.edu>
10228
10229 * doprnt.c (doprnt): Don't assume string length fits in 'int'.
10230 Tighten new eassert a bit.
10231
8ce70ed2
DA
102322012-07-04 Dmitry Antipov <dmantipov@yandex.ru>
10233
10234 Fix compilation with --enable-gcc-warnings and -O1
10235 optimization level.
10236 * doprnt.c (doprnt): Change type of tem to int, initialize
10237 to avoid compiler warning. Add eassert.
10238 * search.c (simple_search): Initialize match_byte to avoid
10239 compiler warning. Add eassert.
10240
dea7f1e5
PE
102412012-07-04 Paul Eggert <eggert@cs.ucla.edu>
10242
24a212eb
PE
10243 Avoid weird behavior with large horizontal scrolls.
10244 Without this change, for example, large hscroll values would
10245 mess up Emacs's display on Fedora 15 x86, presumably due to
10246 overflows in int calculations in the display code.
10247 Also, if buffers had long lines, Emacs would freeze.
10248 * window.c (HSCROLL_MAX): Reduce to 100000, and make it visible to GDB.
10249 (set_window_hscroll): New function, containing the old guts of
10250 Fset_window_hscroll. Return the clipped value.
10251 (Fset_window_hscroll, Fscroll_left, Fscroll_right): Use it.
10252 This avoids the need to check against PTRDIFF_MAX.
10253
dea7f1e5
PE
10254 * buffer.c (Fgenerate_new_buffer_name): Fix sprintf format mismatch.
10255
76046526
DA
102562012-07-04 Dmitry Antipov <dmantipov@yandex.ru>
10257
10258 * buffer.c (Fgenerate_new_buffer_name): Fix type mismatch.
10259
39adff0d
PE
102602012-07-04 Paul Eggert <eggert@cs.ucla.edu>
10261
63807d47
PE
10262 * regex.c: Suppress GCC warning on RHEL 6. (Bug#11207)
10263 Conditionalize the pragmas on GCC 4.5 or later, not GCC 4.3 or later,
10264 since GCC 4.4.6 issues a bogus warning for them.
10265
39adff0d
PE
10266 Fix bugs in file timestamp newness comparisons.
10267 * fileio.c (Ffile_newer_than_file_p):
10268 * lread.c (Fload): Use full timestamp resolution of files,
10269 not just the 1-second resolution, so that files that are only
10270 slightly newer still count as newer.
10271 * fileio.c (Ffile_newer_than_file_p): Don't assume file
10272 timestamps fit in 'int'; this fixes a Y2038 bug on most hosts.
10273
dbeed9a6
PE
102742012-07-03 Paul Eggert <eggert@cs.ucla.edu>
10275
10276 * fileio.c: Improve handling of file time marker. (Bug#11852)
10277 (special_mtime): New function.
10278 (Finsert_file_contents, Fverify_visited_file_modtime):
10279 Use it to set special mtime values consistently.
10280
636334d6
AS
102812012-07-03 Andreas Schwab <schwab@linux-m68k.org>
10282
10283 * fileio.c (Finsert_file_contents): Properly handle st_mtime
10284 marker for non-existing file. (Bug#11852)
10285
e2017fe2
GM
102862012-07-03 Glenn Morris <rgm@gnu.org>
10287
10288 * lisp.h (Fread_file_name): Restore EXFUN (it's not a normal DEFUN
10289 and did not make it into globals.h).
10290
404dbd37
TT
102912012-07-03 Tom Tromey <tromey@redhat.com>
10292
10293 * window.c (Fset_window_margins, Fset_window_fringes)
10294 (Fset_window_scroll_bars, Fset_window_vscroll): No longer static.
10295 * textprop.c (Fprevious_property_change): No longer static.
10296 * syntax.c (Fsyntax_table_p): No longer static.
10297 * process.c (Fget_process, Fprocess_datagram_address): No longer
10298 static.
10299 * keymap.c (Flookup_key, Fcopy_keymap): No longer static.
10300 * keyboard.c (Fcommand_execute): No longer static.
10301 Remove EXFUN.
10302 * insdel.c (Fcombine_after_change_execute): No longer static.
10303 * image.c (Finit_image_library): No longer static.
10304 * fileio.c (Fmake_symbolic_link): No longer static.
10305 * eval.c (Ffetch_bytecode): No longer static.
10306 * editfns.c (Fuser_full_name): No longer static.
d209e2fb
JB
10307 * doc.c (Fdocumentation_property, Fsnarf_documentation):
10308 No longer static.
404dbd37
TT
10309 * buffer.c (Fset_buffer_major_mode, Fdelete_overlay): No longer
10310 static.
10311 * dired.c (Ffile_attributes): No longer static.
10312 * composite.c (Fcomposition_get_gstring): No longer static.
10313 * callproc.c (Fgetenv_internal): No longer static.
10314
10315 * ccl.h: Remove EXFUNs.
10316 * buffer.h: Remove EXFUNs.
10317 * dispextern.h: Remove EXFUNs.
10318 * intervals.h: Remove EXFUNs.
10319 * fontset.h: Remove EXFUN.
10320 * font.h: Remove EXFUNs.
10321 * dosfns.c (system_process_attributes): Remove EXFUN.
10322 * keymap.h: Remove EXFUNs.
10323 * lisp.h: Remove EXFUNs.
10324 * w32term.h: Remove EXFUNs.
10325 * window.h: Remove EXFUNs.
10326 * xsettings.h: Remove EXFUN.
10327 * xterm.h: Remove EXFUN.
10328
8e4fd1e1
GM
103292012-07-03 Glenn Morris <rgm@gnu.org>
10330
10331 * lisp.h (Frandom): Make it visible to C.
10332 * buffer.c (Fgenerate_new_buffer_name): Speed up finding a new
10333 buffer for invisible buffers. (Bug#1229)
10334
ca95b3eb
DA
103352012-07-03 Dmitry Antipov <dmantipov@yandex.ru>
10336
10337 Fix block vector allocation code to allow VECTOR_BLOCK_SIZE
10338 values which aren't power of 2.
14ae4239 10339 * alloc.c (VECTOR_FREE_LIST_SIZE_MASK): New macro.
1f9f395d 10340 Verify its value and the value of VECTOR_BLOCK_SIZE. Adjust users
ca95b3eb
DA
10341 accordingly.
10342
7555c33f
SM
103432012-07-03 Stefan Monnier <monnier@iro.umontreal.ca>
10344
10345 * lisp.h (Lisp_Misc, Lisp_Fwd): Move around to group better.
10346
10347 * alloc.c (mark_object): Revert part of last patch to use `switch'.
10348
d12e8f5a
DA
103492012-07-03 Dmitry Antipov <dmantipov@yandex.ru>
10350
10351 * alloc.c (allocate_vector_block): Remove redundant
10352 calls to mallopt if DOUG_LEA_MALLOC is defined.
10353 (allocate_vectorlike): If DOUG_LEA_MALLOC is defined,
10354 avoid calls to mallopt if zero_vector is returned.
10355
296094c3
DA
103562012-07-03 Dmitry Antipov <dmantipov@yandex.ru>
10357
10358 * alloc.c (check_string_bytes): If GC_CHECK_STRING_BYTES
10359 is enabled, avoid dereferencing NULL current_sblock if
10360 running undumped.
10361
36429c89
DA
103622012-07-03 Dmitry Antipov <dmantipov@yandex.ru>
10363
10364 Cleanup basic buffer management.
10365 * buffer.h (struct buffer): Change layout to use generic vector
10366 marking code. Fix some comments. Change type of 'clip_changed'
10367 to bitfield. Remove unused #ifndef old.
10368 (FIRST_FIELD_PER_BUFFER, LAST_FIELD_PER_BUFFER): Remove.
10369 (GET_OVERLAYS_AT): Fix indentation.
10370 (for_each_per_buffer_object_at): New macro.
10371 * buffer.c (clone_per_buffer_values, reset_buffer_local_variables)
10372 (Fbuffer_local_variables): Use it.
10373 (init_buffer_once, syms_of_buffer): Remove unused #ifndef old.
10374 * alloc.c (allocate_buffer): Adjust to match new layout of
10375 struct buffer. Fix comment.
10376 (mark_overlay): New function.
10377 (mark_buffer): Use it. Use mark_vectorlike to mark normal
10378 Lisp area of struct buffer.
10379 (mark_object): Use it. Adjust marking of misc objects
10380 and related comments.
10381
3b3e4cac
PE
103822012-07-02 Paul Eggert <eggert@cs.ucla.edu>
10383
10384 * alloc.c (mark_object): Remove "#ifdef GC_CHECK_MARKED_OBJECTS"
10385 wrapper that is not needed because the wrapped code is a no-op (zero
10386 machine instructions) when GC_CHECK_MARKED_OBJECTS is not defined.
10387 This avoids a -Wunused-macros diagnostic with GCC 4.7.1 x86-64.
10388
cf5c0175
DA
103892012-07-02 Dmitry Antipov <dmantipov@yandex.ru>
10390
10391 * alloc.c (mark_buffer): Simplify. Remove prototype.
10392 (mark_object): Add comment. Reorganize marking of vector-like
faf611c7 10393 objects. Use CHECK_LIVE for all vector-like objects except buffers
14ae4239
BT
10394 and subroutines when GC_CHECK_MARKED_OBJECTS is defined.
10395 Avoid redundant calls to mark_vectorlike for bool vectors.
cf5c0175 10396
ca26824c
GM
103972012-06-30 Glenn Morris <rgm@gnu.org>
10398
2e4c5312
GM
10399 * nsterm.m (ns_init_paths): Ignore site-lisp if --no-site-lisp.
10400
ca26824c
GM
10401 * epaths.in (PATH_SITELOADSEARCH): New.
10402 * lread.c (init_lread): Use PATH_SITELOADSEARCH.
10403 This is rather than relying on --enable-locallisppath elements
10404 having "site-lisp" in their names. (Bug#10208#25, 11658)
10405
0d23c240
EZ
104062012-06-30 Eli Zaretskii <eliz@gnu.org>
10407
c9240d7a
EZ
10408 * w32proc.c (sys_select): Accept and ignore one more argument.
10409
10410 * w32.c (emacs_gnutls_pull): Call select with one more argument.
10411
0d23c240 10412 * sysselect.h [DOS_NT]: Don't include sys/select.h.
9ff8f76b 10413 (pselect) [!MS_DOS]: Redirect to sys_select.
0d23c240
EZ
10414
10415 * sysdep.c: Don't include dos.h and dosfns.h.
10416
10417 * process.c (sys_select):
10418 * msdos.c (sys_select): Accept one more argument and ignore it.
10419
10420 * msdos.c (event_timestamp, sys_select): Use gnulib's gettime;
10421 adapt data types and code to that.
10422
10423 * dosfns.c:
10424 * msdos.c (gettime, settime): Define away the prototypes in dos.h,
10425 which clashes with the gnulib function of the same name.
10426
af5a5a98
AS
104272012-06-30 Andreas Schwab <schwab@linux-m68k.org>
10428
c5e4379c
AS
10429 * font.c (font_style_to_value, font_style_symbolic)
10430 (font_prop_validate_style): Add type checks for values in
10431 font_style_table.
10432
af5a5a98
AS
10433 * lisp.h (CHECK_RANGED_INTEGER): Make value to check the first
10434 argument.
10435 * character.c, charset.c, menu.c, process.c, window.c: Adjust all
10436 uses.
10437
8d38f461
EZ
104382012-06-29 Eli Zaretskii <eliz@gnu.org>
10439
2e5a6631
EZ
10440 * xdisp.c (try_window_id): Undo last change.
10441
8d38f461
EZ
10442 * w32.c (getwd): Adjust commentary about startup_dir.
10443 (init_environment): Always call sys_access, even in non-MSVC
10444 builds. Don't chdir to the directory of the Emacs executable.
10445 This undoes code from 1997 which was justified by the need to
10446 "avoid conflicts when removing and renaming directories". But its
10447 downside was that every relative file name was being interpreted
10448 relative to the directory of the Emacs executable, which can never
10449 be TRT. In particular, it broke sys_access when called with
10450 relative file names.
10451 (sys_access): Map GetLastError to errno.
10452
2af3565e
DA
104532012-06-29 Dmitry Antipov <dmantipov@yandex.ru>
10454
10455 * window.h (struct window): Change type of 'fringes_outside_margins'
10456 to bitfield. Fix comment. Adjust users accordingly.
cf5c0175 10457 (struct window): Change type of 'window_end_bytepos' to ptrdiff_t.
2af3565e
DA
10458 Adjust comment.
10459 * xdisp.c (try_window_id): Change type of 'first_vpos' and 'vpos'
10460 to ptrdiff_t.
10461
c8d3a25c 104622012-06-29 Andreas Schwab <schwab@linux-m68k.org>
57570cd3 10463
c8d3a25c
GM
10464 * gnutls.c (emacs_gnutls_handshake):
10465 Add QUIT to make the loop interruptible.
57570cd3 10466
c8d3a25c 104672012-06-29 Glenn Morris <rgm@gnu.org>
d01fd55f 10468
c8d3a25c
GM
10469 * charset.c (init_charset): Make lack of etc/charsets fatal.
10470
3e984ee8
DA
104712012-06-29 Dmitry Antipov <dmantipov@yandex.ru>
10472
10473 * editfns.c (region_limit): Fix type mismatch.
10474
ef884f23
DA
104752012-06-29 Dmitry Antipov <dmantipov@yandex.ru>
10476
10477 * nsfns.m: Fix GLYPH_DEBUG usage assuming that it may be
10478 undefined. Convert from xassert to eassert.
10479 * nsmenu.m: Convert from xassert to eassert.
10480 * nsterm.m: Likewise.
10481
7d7e0027
SM
104822012-06-28 Stefan Monnier <monnier@iro.umontreal.ca>
10483
10484 * editfns.c (region_limit): Clip to narrowing (bug#11770).
10485
aa754e6a
PE
104862012-06-28 Paul Eggert <eggert@cs.ucla.edu>
10487
10488 Avoid integer overflow on scroll-left and scroll-right.
10489 * window.c (HSCROLL_MAX): New macro.
10490 (Fscroll_left, Fscroll_right): Avoid undefined behavior on integer
10491 overflow when requested scroll falls outside ptrdiff_t range.
10492
80b00b08
DA
104932012-06-28 Dmitry Antipov <dmantipov@yandex.ru>
10494
10495 * window.h (struct window): Change type of 'hscroll',
10496 'min_hscroll' and 'last_point' from Lisp_Object to ptrdiff_t,
10497 'last_modified' and 'last_overlay_modified' to EMACS_INT.
10498 Adjust users accordingly.
10499 * xdisp.c (try_cursor_movement): Replace type check with eassert.
10500 * window.c (Fscroll_left, Fscroll_right): Change type of 'hscroll'
10501 from EMACS_INT to ptrdiff_t.
10502 (make_window): Omit redundant initialization.
10503
62b2bcf6
JB
105042012-06-28 Juanma Barranquero <lekktu@gmail.com>
10505
10506 * makefile.w32-in ($(BLD)/regex.$(O)): Update dependencies.
10507
45942c7d
DA
105082012-06-28 Dmitry Antipov <dmantipov@yandex.ru>
10509
10510 * window.h (struct window): Change type of 'use_time' and
10511 'sequence_number' from Lisp_Object to int.
10512 * frame.c (make_frame): Adjust users accordingly.
10513 * print.c (print_object): Likewise.
10514 * window.c (select_window, Fwindow_use_time, make_parent_window)
10515 (make_window): Likewise.
10516
e509cfa6
DA
105172012-06-28 Dmitry Antipov <dmantipov@yandex.ru>
10518
10519 * dispextern.h (GLYPH_DEBUG): Now defined in config.h if
10520 enabled with --enable-checking=[all,glyphs] configure option.
10521 Fix GLYPH_DEBUG usage assuming that it may be undefined,
10522 adjust comments accordingly.
10523 * dispnew.c: Fix GLYPH_DEBUG usage assuming that it may be
10524 undefined, adjust comments accordingly.
10525 * image.c: Likewise.
10526 * scroll.c: Likewise.
10527 * w32fns.c: Likewise.
10528 * w32term.c: Likewise.
10529 * xdisp.c: Likewise.
10530 * xfaces.c: Likewise.
10531 * xfns.c: Likewise.
10532 * xterm.c: Likewise.
10533
a54e2c05
DA
105342012-06-28 Dmitry Antipov <dmantipov@yandex.ru>
10535
10536 Generalize run-time debugging checks.
10537 * dispextern.h (XASSERTS): Remove.
10538 * fontset.c (xassert): Remove.
10539 Convert from xassert to eassert.
10540 * alloc.c: Convert from xassert to eassert.
10541 * bidi.c: Likewise.
10542 * dispnew.c: Likewise.
10543 * fns.c: Likewise.
10544 * fringe.c: Likewise.
10545 * ftfont.c: Likewise.
10546 * gtkutil.c: Likewise.
10547 * image.c: Likewise.
10548 * keyboard.c: Likewise.
10549 * menu.c: Likewise.
10550 * process.c: Likewise.
10551 * scroll.c: Likewise.
10552 * sound.c: Likewise.
10553 * term.c: Likewise.
10554 * w32console.c: Likewise.
10555 * w32fns.c: Likewise.
10556 * w32term.c: Likewise.
10557 * window.c: Likewise.
10558 * xdisp.c: Likewise.
10559 * xfaces.c: Likewise.
10560 * xfns.c: Likewise.
10561 * xselect.c: Likewise.
10562 * xterm.c: Likewise.
10563
1ec4b7b2
SM
105642012-06-27 Stefan Monnier <monnier@iro.umontreal.ca>
10565
10566 * fns.c (maybe_resize_hash_table): Output message when growing the
10567 purify-hashtable.
10568
2014308a
DA
105692012-06-27 Dmitry Antipov <dmantipov@yandex.ru>
10570
10571 * alloc.c (allocate_string_data): Remove dead code.
10572 * xsettings.c (XSETTINGS_FONT_NAME): Move under HAVE_XFT to
10573 avoid GCC warning about unused macro.
10574
246155eb
DA
105752012-06-27 Dmitry Antipov <dmantipov@yandex.ru>
10576
10577 * alloc.c (allocate_string): Omit intervals initialization.
10578 * alloc.c (make_uninit_multibyte_string): Initialize intervals
10579 as in make_pure_string and make_pure_c_string.
10580
43184b7b
DA
105812012-06-27 Dmitry Antipov <dmantipov@yandex.ru>
10582
d209e2fb 10583 * alloc.c (allocate_string): Fix last change.
43184b7b 10584
3fe6dd74
DA
105852012-06-27 Dmitry Antipov <dmantipov@yandex.ru>
10586
d209e2fb 10587 * alloc.c (allocate_string): Remove two redundant calls
3fe6dd74
DA
10588 to memset, add explicit initialization where appropriate.
10589
1ba6038a
GM
105902012-06-27 Glenn Morris <rgm@gnu.org>
10591
10592 * lisp.mk (lisp): Remove paths.elc.
10593
c89926a5
CY
105942012-06-27 Chong Yidong <cyd@gnu.org>
10595
10596 * doc.c (Fsubstitute_command_keys): Fix punctuation.
10597
ed6b3510
JW
105982012-06-26 John Wiegley <johnw@newartisans.com>
10599
1ec4b7b2 10600 * unexmacosx.c (copy_data_segment): Add two section names used
157e99e4
JW
10601 on Mac OS X Lion: __mod_init_func and __mod_term_func.
10602
ed6b3510
JW
10603 * alloc.c (mark_memory): Do not check with -faddress-sanitizer
10604 when building with Clang.
10605
8edd4a2b
SM
106062012-06-26 Stefan Monnier <monnier@iro.umontreal.ca>
10607
10608 * eval.c (Fapply): Allow calling it with a single argument.
10609
f6f62d1b
EZ
106102012-06-26 Eli Zaretskii <eliz@gnu.org>
10611
10612 * s/ms-w32.h (strcasecmp, strncasecmp) [_MSC_VER]: Redirect to
10613 _stricmp and _strnicmp.
10614 (HAVE_STRCASECMP, HAVE_STRNCASECMP): Define to 1.
10615
62efea5e
DA
106162012-06-26 Dmitry Antipov <dmantipov@yandex.ru>
10617
10618 * alloc.c (allocate_window): Zero out non-Lisp part of newly
10619 allocated window.
10620 (allocate_process): Likewise for new process.
8edd4a2b 10621 (allocate_terminal): Change to use offsetof.
62efea5e
DA
10622 (allocate_frame): Likewise.
10623 * frame.c (make_frame): Omit redundant initialization.
10624 * window.c (make_parent_window): Use memset.
10625 (make_window): Omit redundant initialization.
10626 * process.c (make_process): Omit redundant initialization.
10627 * terminal.c (create_terminal): Likewise.
10628
42997f4d
DA
106292012-06-26 Dmitry Antipov <dmantipov@yandex.ru>
10630
10631 * term.c (delete_tty): Remove redundant call to memset.
10632
1130ecfc
DA
106332012-06-26 Dmitry Antipov <dmantipov@yandex.ru>
10634
10635 * alloc.c: Remove build_string.
10636 * lisp.h: Define build_string as static inline. This provides
10637 a better opportunity to optimize away calls to strlen when the
10638 function is called with compile-time constant argument.
10639 * image.c (imagemagick_error): Convert to build_string.
10640 * w32proc.c (sys_spawnve): Likewise.
10641 * xterm.c (x_term_init): Likewise.
10642
cf38a720
PE
106432012-06-26 Paul Eggert <eggert@cs.ucla.edu>
10644
99027bdd
PE
10645 Use sprintf return value instead of invoking strlen on result.
10646 In the old days this wasn't portable, since some sprintf
10647 implementations returned char *. But they died out years ago and
10648 Emacs already assumes sprintf returns int.
10649 Similarly for float_to_string.
10650 This patch speeds up (number-to-string 1000) by 3% on Fedora 15 x86-64.
10651 * ccl.c (ccl_driver):
10652 * character.c (string_escape_byte8):
10653 * data.c (Fnumber_to_string):
10654 * doprnt.c (doprnt):
10655 * print.c (print_object):
10656 * xdisp.c (message_dolog):
10657 * xfns.c (syms_of_xfns):
10658 Use sprintf or float_to_string result to avoid need to call strlen.
10659 * data.c (Fnumber_to_string):
10660 Use make_unibyte_string, since the string must be ASCII.
10661 * lisp.h, print.c (float_to_string): Now returns int length.
10662 * term.c (produce_glyphless_glyph):
10663 Use sprintf result rather than recomputing it.
10664
cf38a720
PE
10665 Clean out last vestiges of the old HAVE_CONFIG_H stuff.
10666 * Makefile.in (ALL_CFLAGS):
10667 * makefile.w32-in (LOCAL_FLAGS): Remove -DHAVE_CONFIG_H.
10668 * gmalloc.c, regex.c: Include <config.h> unconditionally.
10669
3511c784
DA
106702012-06-25 Dmitry Antipov <dmantipov@yandex.ru>
10671
0a08eb21 10672 * dispextern.h (xstrcasecmp): Define to library function
3511c784
DA
10673 strcasecmp if available.
10674 * xfaces.c: Do not use xstrcasecmp if strcasecmp is available.
10675
fb7da12e
AS
106762012-06-25 Andreas Schwab <schwab@linux-m68k.org>
10677
10678 * keyboard.c (menu_bar_items, menu_bar_item, read_key_sequence):
10679 Avoid comma operator.
10680 * menu.c (push_submenu_start, push_submenu_end)
10681 (push_left_right_boundary, push_menu_pane): Likewise.
10682 * msdos.c (dos_rawgetc): Likewise.
10683
afa2ffd8
DA
106842012-06-25 Dmitry Antipov <dmantipov@yandex.ru>
10685
10686 * xfns.c (xic_create_fontsetname): Remove redundant calls
10687 to memset.
10688
b3b4476b
PE
106892012-06-25 Paul Eggert <eggert@cs.ucla.edu>
10690
4495ff38
PE
10691 * gtkutil.c (get_utf8_string): Remove redundant assignment.
10692 sprintf already null-terminates its output.
10693
b3b4476b
PE
10694 * xfns.c (x_window): Remove redundant cast.
10695
b00876c9
DA
106962012-06-25 Dmitry Antipov <dmantipov@yandex.ru>
10697
10698 * xmenu.c (xmenu_show, xdialog_show): Explicit cast from
10699 `const char *' to `char *' to avoid compiler warning.
10700
d188e26b
PE
107012012-06-24 Paul Eggert <eggert@cs.ucla.edu>
10702
885d1d74
PE
10703 * xterm.c (x_term_init): Build proper-sized _XSETTINGS_Snnn string
10704 instead of truncating it to 63 (admittedly a generous limit).
10705
d188e26b
PE
10706 * process.c: Fix spelling and caps in comments.
10707
e2f560b1
DN
107082012-06-24 Dan Nicolaescu <dann@ics.uci.edu>
10709
e86db54b 10710 * emacs.c (setpgrp): Remove definition, unused.
e2f560b1
DN
10711 * sysdep.c (setpgrp): Remove definition, not used in this file.
10712
7583a3a1
JB
107132012-06-24 Juanma Barranquero <lekktu@gmail.com>
10714
10715 * makefile.w32-in: Update dependencies.
10716
696056c2
EZ
107172012-06-24 Eli Zaretskii <eliz@gnu.org>
10718
10719 * makefile.w32-in (TIMESPEC_H): Remove nt/inc/sys/time.h.
10720 (SYSTIME_H): Add nt/inc/sys/time.h.
10721
10722 * systime.h [WINDOWSNT]: Include sys/time.h.
10723
10724 * s/ms-w32.h (struct timespec): Definition moved from
10725 nt/inc/sys/time.h. Suggested by Paul Eggert <eggert@cs.ucla.edu>.
10726
845ca893
PE
107272012-06-24 Paul Eggert <eggert@cs.ucla.edu>
10728
10729 Switch from NO_RETURN to C11's _Noreturn (Bug#11750).
10730 * buffer.h (buffer_slot_type_mismatch):
10731 * data.c (arith_error) [!FORWARD_SIGNAL_TO_MAIN_THREAD]:
10732 * eval.c (unwind_to_catch):
10733 * image.c (my_png_error, my_error_exit):
10734 * keyboard.c (quit_throw_to_read_char, user_error)
10735 (Fexit_recursive_edit, Fabort_recursive_edit):
10736 * lisp.h (die, args_out_of_range, args_out_of_range_3)
10737 (wrong_type_argument, buffer_overflow, __executable_start)
10738 (memory_full, buffer_memory_full, string_overflow, Fthrow)
10739 (xsignal, xsignal0, xsignal1, xsignal2, xsignal3, signal_error)
10740 (error, verror, nsberror, report_file_error, Ftop_level, Fkill_emacs)
10741 (fatal):
10742 (child_setup) [!DOS_NT]:
10743 * lread.c (end_of_file_error, invalid_syntax):
10744 * process.c (send_process_trap) [!FORWARD_SIGNAL_TO_MAIN_THREAD]:
10745 * puresize.h (pure_write_error):
10746 * search.c (matcher_overflow):
10747 * sound.c (sound_perror, alsa_sound_perror):
10748 * sysdep.c, syssignal.h (croak):
10749 * term.c (maybe_fatal, vfatal):
10750 * textprop.c (text_read_only):
10751 * undo.c (user_error):
10752 * unexmacosx.c (unexec_error):
10753 * xterm.c (x_ins_del_lines, x_delete_glyphs):
10754 Use _Noreturn rather than NO_RETURN.
10755 No need for separate decl merely because of _Noreturn.
10756 * sound.c (sound_warning, parse_sound):
10757 Remove unnecessary forward decls.
10758
f1dd8073
PE
107592012-06-24 Paul Eggert <eggert@cs.ucla.edu>
10760
10761 Fix bug when time_t is unsigned and as wide as intmax_t (Bug#9000).
10762 * lisp.h (WAIT_READING_MAX): New macro.
10763 * dispnew.c (Fsleep_for, sit_for):
10764 * keyboard.c (kbd_buffer_get_event):
10765 * process.c (Faccept_process_output):
10766 Use it to avoid bogus compiler warnings with obsolescent GCC versions.
10767 This improves on the previous patch, which introduced a bug
10768 when time_t is unsigned and as wide as intmax_t.
10769 See <http://bugs.gnu.org/9000#51>.
10770
b82c1755
EZ
107712012-06-23 Eli Zaretskii <eliz@gnu.org>
10772
10773 * dispnew.c (sit_for, Fsleep_for):
10774 * keyboard.c (kbd_buffer_get_event):
10775 * process.c (Faccept_process_output): Avoid compiler warnings when
10776 comparing a 32-bit time_t with a 64-bit INTMAX_MAX.
10777
ca300656
JB
107782012-06-23 Juanma Barranquero <lekktu@gmail.com>
10779
049ec95b
JB
10780 * makefile.w32-in: Update dependencies.
10781
ca300656
JB
10782 * w32.c (ltime): Add return type and declare static.
10783 (w32_get_internal_run_time): Remove usused variable `time_100ns'.
10784
db7b8d06
PE
107852012-06-23 Paul Eggert <eggert@cs.ucla.edu>
10786
10787 * sysdep.c [__FreeBSD__]: Fix more recently-introduced typos.
10788 Privately reported by Herbert J. Skuhra.
10789 (make_lisp_timeval) [__FreeBSD__]: Rename from TIMELIST.
10790 All uses changed.
10791 (system_process_attributes) [__FreeBSD__]: Invoke make_lisp_time,
10792 not make_lisp_timeval, when the argument is of type EMACS_TIME.
10793
0bd8297f
EZ
107942012-06-23 Eli Zaretskii <eliz@gnu.org>
10795
96512555
EZ
10796 * w32proc.c (Fw32_get_locale_info): Fix an off-by-one error in
10797 last argument of make_unibyte_string.
10798
0bd8297f
EZ
10799 * keyboard.c (kbd_buffer_get_event): Include the codepage and the
10800 language ID in the event parameters.
10801
10802 * w32term.c (w32_read_socket): Put the new keyboard codepage into
10803 event.code, not the obscure "character set ID".
10804
63def6b6
CY
108052012-06-23 Chong Yidong <cyd@gnu.org>
10806
10807 * xmenu.c (x_menu_wait_for_event): Adapt GTK3 to new xg_select.
10808
e8a02204
EZ
108092012-06-23 Eli Zaretskii <eliz@gnu.org>
10810
388cdec0
EZ
10811 Fix the MS-Windows build broken by 2012-06-22T21:17:42Z!eggert@cs.ucla.edu.
10812 * w32.c (fdutimens): New function.
10813
10814 * w32proc.c (sys_select): Adapt to change in the EMACS_TIME type.
10815
10816 * s/ms-w32.h (pselect): Redirect to sys_select.
10817
10818 * sysselect.h [WINDOWSNT]: Don't include sys/select.h.
10819
e8a02204
EZ
10820 * ralloc.c (r_alloc_inhibit_buffer_relocation): Fix stupid thinko
10821 in the logic of incrementing and decrementing the value of
10822 use_relocatable_buffers.
10823
d054f3fb
PE
108242012-06-23 Paul Eggert <eggert@cs.ucla.edu>
10825
10826 * sysdep.c [__FreeBSD__]: Fix recently-introduced typos.
10827 Privately reported by Herbert J. Skuhra.
10828 [__FreeBSD__]: Remove "*/" typo after "#include".
10829 (timeval_to_EMACS_TIME) [__FreeBSD__]: New static function.
10830 (TIMEVAL) [__FreeBSD__]: Now a static function rather than a macro.
10831 (TIMEVAL, system_process_attributes) [__FreeBSD__]:
10832 Don't assume EMACS_TIME and struct timeval are the same type.
10833
d35af63c
PE
108342012-06-22 Paul Eggert <eggert@cs.ucla.edu>
10835
10836 Support higher-resolution time stamps (Bug#9000).
10837 The time stamps are only nanosecond-resolution at the C level,
10838 since that's the best that any real-world system supports now.
10839 But they are picosecond-resolution at the Lisp level, as that's
10840 easy, and leaves room for future OS improvements.
10841
10842 * Makefile.in (LIB_CLOCK_GETTIME): New macro.
10843 (LIBES): Use it.
10844
10845 * alloc.c (Fgarbage_collect): Port to higher-res time stamps.
10846 Don't get current time unless it's needed.
10847
10848 * atimer.c: Include <sys/time.h> unconditionally, since gnulib
10849 now provides it if it's absent.
10850 (start_atimer): Port to higher-res time stamps.
10851 Check for time stamp overflow. Don't get current time more
10852 often than is needed.
10853
10854 * buffer.h (struct buffer): Buffer modtime now has high resolution.
10855 Include systime.h, not time.h.
10856 (NONEXISTENT_MODTIME_NSECS, UNKNOWN_MODTIME_NSECS): New macros.
10857
10858 * dired.c: Include stat-time.h.
10859 (Ffile-attributes): File times now have higher resolution.
10860
10861 * dispextern.h [HAVE_WINDOW_SYSTEM]: Include systime.h.
10862 (struct image): Timestamp now has higher resolution.
10863
10864 * dispnew.c (PERIODIC_PREEMPTION_CHECKING): Remove, as Emacs always
10865 has at least microseconds now. All uses removed.
10866 (update_frame, update_single_window, update_window, update_frame_1)
10867 (Fsleep_for, sit_for): Port to higher-resolution time stamps.
927c7216 10868 (duration_to_sec_usec): Remove; no longer needed.
d35af63c
PE
10869
10870 * editfns.c (time_overflow): Now extern.
10871 (Fcurrent_time, Fget_internal_run_time, make_time, lisp_time_argument)
10872 (float-time, Fformat_time_string, Fcurrent_time_string)
10873 (Fcurrent_time_zone): Accept and generate higher-resolution
10874 time stamps.
10875 (make_time_tail, make_lisp_time, dissassemble_lisp_time)
10876 (decode_time_components, lisp_seconds_argument): New functions.
10877 (make_time): Now static.
10878 (lisp_time_argument): Now returns EMACS_TIME. New arg ppsec.
10879 Report an error if the time is invalid, rather than having the caller
10880 do that.
10881
10882 * fileio.c: Include <stat-time.h>
10883 (Fcopy_file): Copy higher-resolution time stamps.
10884 Prefer to set the time stamp via a file descriptor if that works.
10885 (Fset_file_times, Finsert_file_contents, Fwrite_region)
10886 (Fverify_visited_file_modtime, Fclear_visited_file_modtime)
10887 (Fvisited_file_modtime, Fset_visited_file_modtime):
10888 Support higher-resolution time stamps.
10889
10890 * fns.c (Frandom): Use nanoseconds, not microseconds, for seed.
10891
10892 * gtkutil.c (xg_maybe_add_timer): Port to higher-res time stamps.
10893
10894 * image.c (prepare_image_for_display, clear_image_cache)
10895 (lookup_image): Port to higer-resolution time stamps.
10896
10897 * keyboard.c (start_polling, bind_polling_period):
10898 Check for time stamp overflow.
10899 (read_char, kbd_buffer_get_event, timer_start_idle)
10900 (timer_stop_idle, timer_resume_idle, timer_check_2, timer_check)
10901 (Fcurrent_idle_time, init_keyboard, set_waiting_for_input):
10902 Port to higher-resolution time stamps. Do not assume time_t is signed.
10903 (decode_timer): New function. Timers are now vectors of length 9,
10904 not 8, to accommodate the picosecond component.
10905 (timer_check_2): Use it.
10906
10907 * nsterm.m (select_timeout, timeval_subtract): Remove.
10908 (ns_timeout): Use Emacs's facilities for time stamp arithmetic,
10909 as they're a bit more accurate and handle overflow better.
10910 (ns_select): Change prototype to be compatible with pselect.
10911 (ns_select, ns_term_shutdown): Port to ns-resolution time stamps.
10912 * nsterm.h (ns_select): Adjust prototype.
10913
10914 * msdos.c (EMACS_TIME_ZERO_OR_NEG_P): Remove, as it assumes
10915 us-resolution time stamps.
10916 (sys_select): Use the new EMACS_TIME_SIGN macro instead.
10917
10918 * lread.c (read_filtered_event): Port to ns-resolution time stamps.
10919
10920 * lisp.h (time_overflow): New decl.
10921 (wait_reading_process_output): First arg is now intmax_t, not int,
10922 to accommodate larger waits.
10923
10924 * process.h (struct Lisp_Process.read_output_delay):
10925 Now counts nanoseconds, not microseconds.
10926 * process.c (ADAPTIVE_READ_BUFFERING): Don't worry about
10927 EMACS_HAS_USECS.
10928 (READ_OUTPUT_DELAY_INCREMENT, Faccept_process_output)
10929 (wait_reading_process_output):
10930 Port to ns-resolution time stamps.
10931 (Faccept_process_output, wait_reading_process_output):
10932 Check for time stamp overflow. Do not assume time_t is signed.
10933 (select_wrapper): Remove; we now use pselect.
10934 (Fprocess_attributes): Now generates ns-resolution time stamps.
10935
10936 * sysdep.c: Include utimens.h. Don't include utime.h
10937 or worry about struct utimbuf; gnulib does that for us now.
10938 (gettimeofday): Remove; gnulib provides a substitute.
10939 (make_timeval): New function.
10940 (set_file_times): Now sets ns-resolution time stamps.
10941 New arg FD; all uses changed.
10942 (time_from_jiffies, ltime_from_jiffies, get_up_time)
10943 (system_process_attributes):
10944 Now returns ns-resolution time stamp. All uses changed.
10945 Check for time stamp overflow.
10946
10947 * sysselect.h: Don't depend on HAVE_SYS_SELECT_H; gnulib
10948 provides a substitute now.
10949
10950 * systime.h: Include timespec.h rather than sys/time.h and time.h,
10951 since it guarantees struct timespec.
10952 (EMACS_TIME): Now struct timespec, so that we can support
10953 ns-resolution time stamps.
10954 (EMACS_TIME_RESOLUTION, LOG10_EMACS_TIME_RESOLUTION): New macros.
10955 (EMACS_HAS_USECS): Remove; Emacs always has sub-second time stamps now.
10956 (EMACS_USECS): Remove.
10957 (EMACS_SET_USECS): The underlying time stamp now has ns resolution,
10958 so multiply the arg by 1000 before storing it.
10959 (EMACS_NSECS, EMACS_SECS_ADDR, EMACS_SET_NSECS, EMACS_SET_SECS_NSECS):
10960 New macros.
10961 (EMACS_GET_TIME, EMACS_ADD_TIME, EMACS_SUB_TIME):
10962 Port to ns-resolution time stamps.
10963 (EMACS_TIME_NEG_P): Remove; replaced by....
10964 (EMACS_TIME_SIGN): New macro.
10965 (EMACS_SET_INVALID_TIME, EMACS_TIME_VALID_P)
10966 (EMACS_TIME_FROM_DOUBLE, EMACS_TIME_TO_DOUBLE): New macros.
10967 (set_file_times, make_time, lisp_time_argument): Adjust signature.
10968 (make_timeval, make_lisp_time, decode_time_components): New decls.
10969 (EMACS_TIME_CMP): Remove; no longer used. Plus, it was buggy, in
10970 that it mishandled time_t overflow. You can't compare by subtracting!
10971 (EMACS_TIME_EQ, EMACS_TIME_NE, EMACS_TIME_GT, EMACS_TIME_GE)
10972 (EMACS_TIME_LT, EMACS_TIME_LE): Rewrite in terms of timespec_cmp.
10973
10974 * term.c: Include <sys/time.h>.
10975 (timeval_to_Time): New function, for proper overflow wraparound.
10976 (term_mouse_position, term_mouse_click): Use it.
10977
10978 * undo.c (record_first_change): Support higher-resolution time stamps
10979 in the undo buffer.
10980 (Fprimitive_undo): Use them when restoring time stamps.
10981
10982 * w32.c (ltime, U64_TO_LISP_TIME, process_times, emacs_gnutls_pull)
10983 (w32_get_internal_run_time):
10984 Port to higher-resolution Emacs time stamps.
10985 (ltime): Now accepts single 64-bit integer, as that's more convenient
10986 for callers.
10987
10988 * xdisp.c (start_hourglass): Port to ns-resolution time stamps.
10989
10990 * xgselect.c, xgselect.h (xg_select): Add sigmask argument,
10991 for compatibility with pselect. Support ns-resolution time stamps.
10992
10993 * xmenu.c (x_menu_wait_for_event): Support ns-resolution time stamps.
10994
10995 * xselect.c (wait_for_property_change, x_get_foreign_selection):
10996 Check for time stamp overflow, and support ns-resolution time stamps.
10997
10998 * xterm.c: Don't include sys/time.h; gnulib does that for us now.
10999 Don't worry about whether HAVE_TIMEVAL and HAVE_SELECT are set.
11000 (timeval_subtract): Remove; no longer needed.
11001 (XTflash, XTring_bell, x_wait_for_event):
11002 Port to ns-resolution time stamps. Don't assume time_t is signed.
11003
b6a92dfe
CY
110042012-06-22 Chong Yidong <cyd@gnu.org>
11005
11006 * xdisp.c (x_consider_frame_title): Revert last change.
11007
d251c37c
EZ
110082012-06-22 Eli Zaretskii <eliz@gnu.org>
11009
11010 * alloc.c (NSTATICS): Enlarge to 0x650. Otherwise, Emacs compiled
11011 with -DENABLE_CHECKING -DXASSERTS -DGLYPH_DEBUG=1 -DBYTE_CODE_METER
11012 aborts in staticpro during startup. (Without -DBYTE_CODE_METER,
11013 staticidx goes up to 1597 out of 1600 = 0x640.)
11014
f10deafb
PE
110152012-06-20 Paul Eggert <eggert@cs.ucla.edu>
11016
11017 * fileio.c (Fdefault_file_modes): Block input while fiddling with umask.
11018 Otherwise, the umask might be mistakenly 0 while handling input signals.
11019
ec6de1e2
SM
110202012-06-19 Stefan Monnier <monnier@iro.umontreal.ca>
11021
11022 * minibuf.c (Fread_string): Bind minibuffer-completion-table.
11023
28be1ada
DA
110242012-06-19 Dmitry Antipov <dmantipov@yandex.ru>
11025
11026 * alloc.c, bytecode.c, ccl.c, coding.c, composite.c, data.c, dosfns.c:
11027 * font.c, image.c, keyboard.c, lread.c, menu.c, minibuf.c, msdos.c:
11028 * print.c, syntax.c, window.c, xmenu.c, xselect.c: Replace direct
11029 access to `contents' member of Lisp_Vector objects with AREF and ASET
11030 where appropriate.
11031
c6bf3022
CY
110322012-06-19 Chong Yidong <cyd@gnu.org>
11033
11034 * frame.c (delete_frame): When selecting a frame on a different
11035 text terminal, do not alter the terminal's top-frame.
11036
11037 * xdisp.c (format_mode_line_unwind_data): Record the target
11038 frame's selected window and its terminal's top-frame.
11039 (unwind_format_mode_line): Restore them.
11040 (x_consider_frame_title, display_mode_line, Fformat_mode_line):
11041 Callers changed.
11042 (x_consider_frame_title): Do not condition on HAVE_WINDOW_SYSTEM,
11043 since tty frames can be explicitly named.
11044 (prepare_menu_bars): Likewise.
11045
11046 * term.c (Ftty_top_frame): New function.
11047
defd4196
PE
110482012-06-18 Paul Eggert <eggert@cs.ucla.edu>
11049
11050 Port byte-code-meter to modern targets.
11051 * bytecode.c (METER_CODE) [BYTE_CODE_METER]: Don't assume
11052 !CHECK_LISP_OBJECT_TYPE && !USE_LSB_TAG. Problem with
8b5257e1 11053 CHECK_LISP_OBJECT_TYPE reported by Dmitry Antipov in
defd4196
PE
11054 <http://lists.gnu.org/archive/html/emacs-devel/2012-06/msg00282.html>.
11055 (METER_1, METER_2): Simplify.
11056
1053a871
SM
110572012-06-18 Stefan Monnier <monnier@iro.umontreal.ca>
11058
11059 * data.c (Fdefalias): Return `symbol' (bug#11686).
11060
b7e8d081
MR
110612012-06-18 Martin Rudalics <rudalics@gmx.at>
11062
11063 * buffer.c (Fkill_buffer): Don't throw an error when the buffer
1053a871
SM
11064 gets killed during executing of this function (Bug#11665).
11065 Try to always return Qt when the buffer has been actually killed.
b7e8d081
MR
11066 (Vkill_buffer_query_functions): In doc-string say that functions
11067 run by this hook should not change the current buffer.
11068
7ea2b339
PE
110692012-06-18 Paul Eggert <eggert@cs.ucla.edu>
11070
11071 Fix recently-introduced process.c problems found by static checking.
11072 * process.c (write_queue_push, write_queue_pop, send_process):
11073 Use ptrdiff_t, not int or EMACS_INT, for buffer lengths and offsets.
11074 (write_queue_pop): Fix pointer signedness problem.
11075 (send_process): Remove unused local.
11076
96a313a1
CY
110772012-06-17 Chong Yidong <cyd@gnu.org>
11078
11079 * xdisp.c (redisplay_internal): No need to redisplay terminal
11080 frames that are not on top.
11081
20ca2e94
TN
110822012-06-17 Troels Nielsen <bn.troels@gmail.com>
11083
11084 * process.c (make_process): Initialize write_queue.
11085 (write_queue_push, write_queue_pop): New functions.
11086 (send_process): Use them to maintain correct ordering of process
11087 writes (Bug#10815).
11088
9a900ca9
PE
110892012-06-17 Paul Eggert <eggert@cs.ucla.edu>
11090
310fbfa8
PE
11091 * lisp.h (eassert): Assume C89 or later.
11092 This removes the need for CHECK.
11093 (CHECK): Remove. Its comments about always evaluating its
11094 argument were confusing, as 'eassert' typically does not evaluate
11095 its argument.
11096
27bb1ca4
PE
11097 * coding.c (produce_chars): Use ptrdiff_t, not int.
11098
9a900ca9
PE
11099 * xterm.c (x_draw_underwave): Check for integer overflow.
11100 This pacifies gcc 4.7.0 -Wunsafe-loop-optimizations on x86-64.
11101
41b7f8bc 111022012-06-17 Jan Djärv <jan.h.d@swipnet.se>
50a93863
JD
11103
11104 * nsterm.m (x_free_frame_resources): Move xfree so freed memory isn't
11105 referenced (Bug#11583).
11106
9b0e3eba
AA
111072012-06-16 Aurelien Aptel <aurelien.aptel@gmail.com>
11108
11109 Implement wave-style variant of underlining.
11110 * dispextern.h (face_underline_type): New enum.
11111 (face): Add field for underline type.
11112 * nsterm.m (ns_draw_underwave): New function.
11113 (ns_draw_text_decoration): Use it.
11114 * w32term.c (w32_restore_glyph_string_clip, w32_draw_underwave):
11115 New functions.
11116 (x_draw_glyph_string): Use them.
11117 * xfaces.c (Qline, Qwave): New Lisp objects.
11118 (check_lface_attrs, merge_face_ref)
1053a871
SM
11119 (Finternal_set_lisp_face_attribute, realize_x_face):
11120 Handle wave-style underline face attributes.
9b0e3eba
AA
11121 * xterm.c (x_draw_underwave): New function.
11122 (x_draw_glyph_string): Use it.
11123
0fb52f11
JB
111242012-06-16 Juanma Barranquero <lekktu@gmail.com>
11125
11126 * makefile.w32-in ($(BLD)/emacs.$(O), $(BLD)/fringe.$(O))
11127 ($(BLD)/xml.$(O), $(BLD)/intervals.$(O), $(BLD)/macros.$(O))
11128 ($(BLD)/minibuf.$(O), $(BLD)/regex.$(O), $(BLD)/region-cache.$(O))
11129 ($(BLD)/textprop.$(O), $(BLD)/undo.$(O), $(BLD)/window.$(O))
11130 ($(BLD)/w32select.$(O)): Update dependencies.
11131
e5560ff7
AS
111322012-06-16 Andreas Schwab <schwab@linux-m68k.org>
11133
11134 * buffer.h (FETCH_MULTIBYTE_CHAR): Define as inline.
11135 (BUF_FETCH_MULTIBYTE_CHAR): Likewise.
11136 * character.c (_fetch_multibyte_char_p): Remove.
11137 * alloc.c: Include "character.h" before "buffer.h".
11138 * bidi.c: Likewise.
11139 * buffer.c: Likewise.
11140 * bytecode.c: Likewise.
11141 * callint.c: Likewise.
11142 * callproc.c: Likewise.
11143 * casefiddle.c: Likewise.
11144 * casetab.c: Likewise.
11145 * category.c: Likewise.
11146 * cmds.c: Likewise.
11147 * coding.c: Likewise.
11148 * composite.c: Likewise.
11149 * dired.c: Likewise.
11150 * dispnew.c: Likewise.
11151 * doc.c: Likewise.
11152 * dosfns.c: Likewise.
11153 * editfns.c: Likewise.
11154 * emacs.c: Likewise.
11155 * fileio.c: Likewise.
11156 * filelock.c: Likewise.
11157 * font.c: Likewise.
11158 * fontset.c: Likewise.
11159 * fringe.c: Likewise.
11160 * indent.c: Likewise.
11161 * insdel.c: Likewise.
11162 * intervals.c: Likewise.
11163 * keyboard.c: Likewise.
11164 * keymap.c: Likewise.
11165 * lread.c: Likewise.
11166 * macros.c: Likewise.
11167 * marker.c: Likewise.
11168 * minibuf.c: Likewise.
11169 * nsfns.m: Likewise.
11170 * nsmenu.m: Likewise.
11171 * print.c: Likewise.
11172 * process.c: Likewise.
11173 * regex.c: Likewise.
11174 * region-cache.c: Likewise.
11175 * search.c: Likewise.
11176 * syntax.c: Likewise.
11177 * term.c: Likewise.
11178 * textprop.c: Likewise.
11179 * undo.c: Likewise.
11180 * unexsol.c: Likewise.
11181 * w16select.c: Likewise.
11182 * w32fns.c: Likewise.
11183 * w32menu.c: Likewise.
11184 * window.c: Likewise.
11185 * xdisp.c: Likewise.
11186 * xfns.c: Likewise.
11187 * xmenu.c: Likewise.
11188 * xml.c: Likewise.
11189 * xselect.c: Likewise.
11190
2f07e6af
EZ
111912012-06-16 Eli Zaretskii <eliz@gnu.org>
11192
1053a871
SM
11193 * xdisp.c (set_cursor_from_row): Don't dereference glyphs_end.
11194 If all the glyphs of the glyph row came from strings, and we have no
2f07e6af 11195 cursor positioning clues, put the cursor on the first glyph of the
1097afe4
EZ
11196 row.
11197 (handle_face_prop): Use chunk-relative overlay string index when
11198 indexing into it->string_overlays array. (Bug#11653)
946fdb73
EZ
11199 (set_cursor_from_row): Use the leftmost glyph as GLYPH_BEFORE, not
11200 the rightmost. (Bug#11720)
2f07e6af 11201
29b83cec
AS
112022012-06-16 Andreas Schwab <schwab@linux-m68k.org>
11203
11204 * category.h (CHAR_HAS_CATEGORY): Define as inline.
11205 (CATEGORY_MEMBER): Enforce 1/0 value.
11206 * category.c (_temp_category_set): Remove.
11207
4c5501e9
EZ
112082012-06-16 Eli Zaretskii <eliz@gnu.org>
11209
11210 * window.c (Fdelete_other_windows_internal)
11211 (Fdelete_window_internal): Don't access frame's mouse highlight
11212 info of the initial frame. (Bug#11677)
11213
2b570124
PE
112142012-06-14 Paul Eggert <eggert@cs.ucla.edu>
11215
e93864f9
PE
11216 * .gdbinit (xgetint): Fix recently-introduced paren typo.
11217 Assume USE_2_TAGS_FOR_INTS.
11218 (xreload): Adjust $tagmask width to match recent lisp.h change.
11219
2b570124
PE
11220 Simplify lisp.h in minor ways that should not affect code.
11221 * lisp.h (USE_2_TAGS_FOR_INTS): Remove, as it was always defined.
11222 (LISP_INT_TAG, case_Lisp_Int, LISP_STRING_TAG, LISP_INT_TAG_P)
11223 (LISP_INT1_TAG, enum Lisp_Type, XINT, XUINT, make_number):
11224 Simplify under the assumption that USE_2_TAGS_FOR_INTS is defined.
11225 (INTTYPEBITS): New macro, for clarity.
11226 (INTMASK, MOST_POSITIVE_FIXNUM): Use it.
1053a871
SM
11227 (LISP_INT1_TAG, LISP_STRING_TAG, LISP_INT_TAG_P):
11228 Simplify now that USE_LSB_TAG is always defined.
2b570124
PE
11229 (TYPEMASK, XINT) [USE_LSB_TAG]: Remove unnecessary cast.
11230 (make_number) [!USE_LSB_TAG]: Use INTMASK; that's simpler.
11231
81755f69
JB
112322012-06-13 Juanma Barranquero <lekktu@gmail.com>
11233
11234 * makefile.w32-in ($(BLD)/data.$(O)): Update dependencies.
11235
16192a57
GM
112362012-06-13 Glenn Morris <rgm@gnu.org>
11237
11238 * s/bsd-common.h (BSD4_3):
11239 * s/usg5-4-common.h (USG5_4): No longer define; unused.
11240
646b5f55
AS
112412012-06-13 Andreas Schwab <schwab@linux-m68k.org>
11242
11243 * lisp.h (Lisp_Object) [CHECK_LISP_OBJECT_TYPE]: Define as struct
11244 instead of union.
11245 (XLI, XIL): Define.
1053a871
SM
11246 (XHASH, XTYPE, XINT, XUINT, make_number, XSET, XPNTR, XUNTAG):
11247 Use them.
11248 * emacs.c (gdb_use_struct): Rename from gdb_use_union.
646b5f55 11249 * .gdbinit: Check gdb_use_struct instead of gdb_use_union.
1053a871 11250 * alloc.c (widen_to_Lisp_Object): Remove.
646b5f55
AS
11251 (mark_memory): Use XIL instead of widen_to_Lisp_Object.
11252 * frame.c (delete_frame): Remove outdated comment.
11253 * w32fns.c (Fw32_register_hot_key): Use XLI instead of checking
11254 USE_LISP_UNION_TYPE.
11255 (Fw32_unregister_hot_key): Likewise.
11256 (Fw32_toggle_lock_key): Likewise.
11257 * w32menu.c (add_menu_item): Likewise.
11258 (w32_menu_display_help): Use XIL instead of checking
11259 USE_LISP_UNION_TYPE.
11260 * w32heap.c (allocate_heap): Don't check USE_LISP_UNION_TYPE.
11261 (init_heap): Likewise.
11262 * w32term.c (w32_read_socket): Update comment.
11263
1d3823c9
GM
112642012-06-13 Glenn Morris <rgm@gnu.org>
11265
c62ff706
GM
11266 * s/usg5-4-common.h, src/s/unixware.h:
11267 Remove define/undef of HAVE_SYSV_SIGPAUSE (not used since 2010-05-04).
11268
1d3823c9
GM
11269 * s/gnu.h (POSIX_SIGNALS): Remove (not used since 2010-05-04).
11270
bfe3e0a2
PE
112712012-06-13 Paul Eggert <eggert@cs.ucla.edu>
11272
11273 USE_LISP_UNION_TYPE + USE_LSB_TAG cleanup (Bug#11604)
11274 * alloc.c (make_number) [!defined make_number]:
11275 Remove, as lisp.h always defines this now.
11276 (mark_maybe_pointer): Simplify since USE_LSB_TAG is always defined now.
11277 (roundup_size): Verify that it is a power of 2.
11278 * data.c (Fmake_variable_buffer_local, Fmake_local_variable):
11279 * ftfont.c (ftfont_driver): Use LISP_INITIALLY_ZERO.
11280 * lisp.h (USE_LSB_TAG): Allow the builder to compile with
11281 -DUSE_LSB_TAG=0, to override the automatically-selected default.
11282 USE_LSB_TAG now is always defined to be either 0 or 1.
11283 All uses changed.
11284 (union Lisp_Object): Don't worry about WORDS_BIGENDIAN; the
11285 code works fine either way, and efficiency is not a concern here,
11286 as the union type is for debugging, not for production.
11287 (LISP_MAKE_RVALUE, make_number) [USE_LISP_UNION_TYPE]:
11288 Use an inline function on all platforms when using the union type,
11289 since this is simpler and 'static inline' can be used portably
11290 within Emacs now.
11291 (LISP_INITIALLY_ZERO): New macro.
11292 (XFASTINT, XSETFASTINT) [USE_LISP_UNION_TYPE]: Remove.
11293 (XSET) [USE_LISP_UNION_TYPE]: Don't overparenthesize.
11294
45fa9c0f
GM
112952012-06-12 Glenn Morris <rgm@gnu.org>
11296
b4492cba
GM
11297 * s/gnu-kfreebsd.h, s/hpux11.h, s/openbsd.h, s/sol2-10.h: Remove files.
11298
11299 * s/gnu-linux.h (HAVE_PROCFS): Move to configure.
0d369729 11300
45fa9c0f
GM
11301 * s/hpux10-20.h, s/openbsd.h, s/usg5-4-common.h:
11302 Move BROKEN_SIGIO to configure.
11303
11304 * s/bsd-common.h, s/darwin.h, s/gnu-kfreebsd.h, s/hpux10-20.h:
11305 Move NO_TERMIO to configure.
11306
0e25d334
CY
113072012-06-12 Chong Yidong <cyd@gnu.org>
11308
11309 * image.c (imagemagick_load_image): Use MagickFlattenImage if
11310 MagickMergeImageLayers is undefined. Use pixel pusher loop if
11311 MagickExportImagePixels is undefined.
11312
43682bb6
PE
113132012-06-12 Paul Eggert <eggert@cs.ucla.edu>
11314
11315 * image.c (imagemagick_load_image): Remove unused label.
11316
a9be7d2b
GM
113172012-06-11 Glenn Morris <rgm@gnu.org>
11318
11319 * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/darwin.h:
11320 * s/gnu-kfreebsd.h, s/gnu-linux.h, s/gnu.h, s/hpux10-20.h:
11321 * s/irix6-5.h, s/ms-w32.h, s/msdos.h, s/template.h:
11322 * s/usg5-4-common.h: Move SYSTEM_TYPE to configure.
11323
3017f87f
SM
113242012-06-11 Stefan Monnier <monnier@iro.umontreal.ca>
11325
11326 * alloc.c (make_byte_code): New function.
11327 (Fmake_byte_code): Use it. Don't purify here.
11328 * lread.c (read1): Use it as well to avoid extra allocation.
11329
1b9b4cf4
CY
113302012-06-11 Chong Yidong <cyd@gnu.org>
11331
11332 * image.c (imagemagick_load_image): Implement transparency.
11333
95988fcf
AS
113342012-06-10 Andreas Schwab <schwab@linux-m68k.org>
11335
11336 * regex.c (at_begline_loc_p): Also recognize `(?N:' and correctly
11337 account for preceding backslashes. (Bug#11663)
11338
cd4eb164
CY
113392012-06-09 Chong Yidong <cyd@gnu.org>
11340
11341 * term.c: Support italics in capable terminals (Bug#9652).
11342 (no_color_bit): Replace unused NC_BLINK with NC_ITALIC.
11343 (turn_on_face): Output using TS_enter_italic_mode if available.
11344 Don't handle unused blinking and alt-charset cases.
11345 (turn_off_face): Handle italic case; discard unused tty_blinking_p
11346 and tty_alt_charset_p cases.
11347 (tty_capable_p, init_tty): Support italics.
11348
11349 * termchar.h (struct tty_display_info): Add field for italics.
11350 Remove unused blink field.
11351
11352 * xfaces.c (tty_supports_face_attributes_p, realize_tty_face):
11353 Handle slant.
11354
11355 * dispextern.h: Replace unused TTY_CAP_BLINK with TTY_CAP_ITALIC.
11356 (struct face): Remove unused fields tty_dim_p, tty_blinking_p, and
11357 tty_alt_charset_p. Add tty_italic_p.
11358
ff88beb8
MA
113592012-06-09 Michael Albinus <michael.albinus@gmx.de>
11360
11361 * dbusbind.c (XD_BASIC_DBUS_TYPE): Use dbus_type_is_valid and
11362 dbus_type_is_basic if available.
11363 (xd_extract_signed, xd_extract_unsigned): Rename from
11364 extract_signed and extract_unsigned, respectively. Adapt callers.
11365
44286096
CY
113662012-06-09 Chong Yidong <cyd@gnu.org>
11367
1682701f
CY
11368 * xfaces.c (face_for_overlay_string): Handle face remapping (Bug#2066).
11369
44286096
CY
11370 * fringe.c (Fset_fringe_bitmap_face): Handle the noninteractive
11371 case (Bug#9752).
11372
d86feb17
PE
113732012-06-08 Paul Eggert <eggert@cs.ucla.edu>
11374
11375 * xdisp.c (vmessage): Treat frame message as multibyte.
11376 Without this change, (let ((§ 1)) (make-variable-buffer-local '§))
11377 would generate the diagnostic "Making \302\247 buffer-local while
11378 let-bound!".
11379
d5c20fe8
EZ
113802012-06-08 Eli Zaretskii <eliz@gnu.org>
11381
11382 * dispnew.c (showing_window_margins_p): Undo last change, which
11383 was done due to an inadvertent commit.
11384 (adjust_frame_glyphs_for_frame_redisplay): Do call
11385 showing_window_margins_p.
11386
513749ee
SM
113872012-06-08 Stefan Monnier <monnier@iro.umontreal.ca>
11388
11389 * eval.c (Fmake_var_non_special): New primitive.
11390 (syms_of_eval): Defsubr it.
11391 * lread.c (syms_of_lread): Mark `values' as lexically scoped.
11392
d4a8f5c1
JB
113932012-06-08 Juanma Barranquero <lekktu@gmail.com>
11394
11395 * dispnew.c (showing_window_margins_p): Wrap in #if 0 to prevent unused
11396 function warning (the only call is inside #if 0 since 2012-06-08T08:44:45Z!eliz@gnu.org).
11397
8bbbc977
EZ
113982012-06-08 Eli Zaretskii <eliz@gnu.org>
11399
11400 * alloc.c (allocate_vectorlike): Fix last change.
11401
f3372c87
DA
114022012-06-08 Dmitry Antipov <dmantipov@yandex.ru>
11403
11404 Block-based vector allocation of small vectors.
11405 * lisp.h (struct vectorlike_header): New field `nbytes',
11406 adjust comment accordingly.
11407 * alloc.c (enum mem_type): New type `MEM_TYPE_VECTOR_BLOCK'
fc0c31f8 11408 to denote vector blocks. Adjust users (live_vector_p,
f3372c87
DA
11409 mark_maybe_pointer, valid_lisp_object_p) accordingly.
11410 (COMMON_MULTIPLE): Move outside #if USE_LSB_TAG.
11411 (VECTOR_BLOCK_SIZE, vroundup, VECTOR_BLOCK_BYTES),
11412 (VBLOCK_BYTES_MIN, VBLOCK_BYTES_MAX, VECTOR_MAX_FREE_LIST_INDEX),
11413 (VECTOR_FREE_LIST_FLAG, ADVANCE, VINDEX, SETUP_ON_FREE_LIST),
11414 (VECTOR_SIZE, VECTOR_IN_BLOCK): New macros.
11415 (roundup_size): New constant.
11416 (struct vector_block): New data type.
11417 (vector_blocks, vector_free_lists, zero_vector): New variables.
513749ee 11418 (all_vectors): Rename to `large_vectors'.
f3372c87
DA
11419 (allocate_vector_from_block, init_vectors, allocate_vector_from_block)
11420 (sweep_vectors): New functions.
11421 (allocate_vectorlike): Return `zero_vector' as the only vector of
fc0c31f8 11422 0 items. Allocate new vector from block if vector size is less than
f3372c87
DA
11423 or equal to VBLOCK_BYTES_MAX.
11424 (Fgarbage_collect): Move all vector sweeping code to sweep_vectors.
11425 (init_alloc_once): Add call to init_vectors.
11426
4f18a4ed
SM
114272012-06-08 Stefan Monnier <monnier@iro.umontreal.ca>
11428
11429 * eval.c (Fmacroexpand): Stop if the macro returns the same form.
11430
86f158bc
PE
114312012-06-07 Paul Eggert <eggert@cs.ucla.edu>
11432
11433 * doprnt.c (doprnt): Truncate multibyte char correctly.
11434 Without this change, doprnt (buf, 2, "%s", FORMAT_END, AP)
11435 would mishandle a string argument "Xc" if X was a multibyte
11436 character of length 2: it would truncate after X's first byte
11437 rather than including all of X.
11438
c5cfcbe0
CY
114392012-06-06 Chong Yidong <cyd@gnu.org>
11440
11441 * buffer.c (word_wrap): Doc fix.
11442
c05cf390
PE
114432012-06-04 Paul Eggert <eggert@cs.ucla.edu>
11444
11445 * xdisp.c (note_mode_line_or_margin_highlight): Pacify gcc -Wall.
11446
0c3461de
GM
114472012-06-03 Glenn Morris <rgm@gnu.org>
11448
11449 * xdisp.c (tool-bar-style): Doc fix.
11450
c71232db
UM
114512012-06-03 Ulrich Müller <ulm@gentoo.org>
11452
11453 * Makefile.in (PAXCTL): Define.
11454 (temacs$(EXEEXT)): Disable memory randomization for the temacs
11455 binary via PaX flags if the paxctl utility is available.
11456 (emacs$(EXEEXT), bootstrap-emacs$(EXEEXT)):
11457 Restore PaX flags to their default. (Bug#11398)
11458
383f7350
CY
114592012-06-03 Chong Yidong <cyd@gnu.org>
11460
11461 * xdisp.c (decode_mode_spec_coding): Display a space for a unibyte
11462 buffer (Bug#11226).
11463
5f2c76c6
CY
114642012-06-03 Chong Yidong <cyd@gnu.org>
11465
11466 * xdisp.c (calc_pixel_width_or_height): Use Fbuffer_local_value.
11467 (note_mode_line_or_margin_highlight): If there is no help echo,
11468 use mode-line-default-help-echo. Handle the case where the mouse
11469 position is past the end of the mode line string.
11470
11471 * buffer.c (buffer_local_value_1): New function, split from
11472 Fbuffer_local_value; can return Qunbound.
11473 (Fbuffer_local_value): Use it.
11474 (Vmode_line_format): Docstring tweaks.
11475
773d47f6
PE
114762012-06-02 Paul Eggert <eggert@cs.ucla.edu>
11477
11478 * sysdep.c (system_process_attributes): Improve comment.
11479
f2d6a3df
SM
114802012-06-02 Stefan Monnier <monnier@iro.umontreal.ca>
11481
11482 * keyboard.c: Export real-this-command to Elisp.
11483 (syms_of_keyboard): Rename real_this_command to Vreal_this_command
11484 and DEFVAR it. Update all users.
11485
63810350
PE
114862012-06-02 Paul Eggert <eggert@cs.ucla.edu>
11487
7bd5c1f4
PE
11488 * minibuf.c (Fassoc_string): Remove duplicate declaration.
11489
63810350
PE
11490 * sysdep.c (system_process_attributes) [SOLARIS2 && HAVE_PROCFS]:
11491 Convert pctcpu and pctmem to Lisp float properly.
11492 Let the compiler fold better, as 100.0/0x8000 is exact.
11493
a2821611
AS
114942012-06-02 Andreas Schwab <schwab@linux-m68k.org>
11495
11496 * alloc.c (CONS_BLOCK_SIZE): Account for padding at the end of
11497 cons_block.
11498
5fceba1d
PE
114992012-06-01 Paul Eggert <eggert@cs.ucla.edu>
11500
11501 * xfns.c (x_set_tool_bar_lines) [USE_GTK]: Adjust to bitfield change.
11502
c98ff5dd
DA
115032012-06-01 Dmitry Antipov <dmantipov@yandex.ru>
11504
11505 For a 'struct window', replace some Lisp_Object fields to
11506 bitfields where appropriate, remove unused fields.
11507 * window.h (struct window): Remove unused 'last_mark_x' and
11508 'last_mark_y' fields. Rename 'mini_p' field to 'mini',
1f9f395d 11509 change its type from Lisp_Object to bitfield.
c98ff5dd
DA
11510 Change type of 'force_start', 'optional_new_start',
11511 'last_had_star', 'update_mode_line' and 'start_at_line_beg'
fc0c31f8 11512 fields from Lisp_Object to bitfield. Adjust users accordingly.
c98ff5dd 11513
ca34e0be
PE
115142012-05-31 Paul Eggert <eggert@cs.ucla.edu>
11515
11516 Pacify gcc -Wdouble-precision when using Xaw.
11517 * xterm.c (xaw_jump_callback, x_set_toolkit_scroll_bar_thumb)
11518 [HAVE_X_WINDOWS && USE_TOOLKIT_SCROLL_BARS && !USE_MOTIF && !USE_GTK]:
11519 Use 'float' consistently, rather than 'float' in most places
11520 and 'double' in a couple of places.
11521
efc00ab1 115222012-05-31 Eli Zaretskii <eliz@gnu.org>
d5fd2c54
EZ
11523
11524 * xdisp.c (handle_stop): Detect whether we have overlay strings
11525 loaded by testing it->current.overlay_string_index to be
11526 non-negative, instead of checking whether n_overlay_strings is
11527 positive. (Bug#11587)
11528
efc00ab1 115292012-05-31 Chong Yidong <cyd@gnu.org>
353c87f6
CY
11530
11531 * keymap.c (describe_map_tree): Revert 2011-07-07 change (Bug#1169).
11532
11533 * doc.c (Fsubstitute_command_keys): Doc fix.
11534
efc00ab1 115352012-05-31 Eli Zaretskii <eliz@gnu.org>
a02ae4e5
EZ
11536
11537 * search.c (search_buffer): Remove calls to
11538 r_alloc_inhibit_buffer_relocation, as it is now called by
11539 maybe_unify_char, which was the cause of relocation of buffer text
11540 in bug#11519.
11541
efc00ab1 115422012-05-31 Eli Zaretskii <eliz@gnu.org>
291d430f
EZ
11543
11544 * charset.c (maybe_unify_char): Inhibit relocation of buffer text
11545 for the duration of call to load_charset, to avoid problems with
11546 callers of maybe_unify_char that access buffer text through C
11547 pointers.
11548
11549 * ralloc.c (r_alloc_inhibit_buffer_relocation): Increment and
11550 decrement the inhibition flag, instead of just setting or
11551 resetting it.
11552
ba93a187
PE
115532012-05-31 Paul Eggert <eggert@cs.ucla.edu>
11554
11555 Remove obsolete '#define static' cruft.
11556 * s/hpux10-20.h (_FILE_OFFSET_BITS): Don't #undef.
11557 This #undef was "temporary" in 2000; it is no longer needed
11558 now that '#define static' has gone away.
11559 * xfns.c, xterm.h (gray_bitmap_width, gray_bitmap_height)
11560 (gray_bitmap_bits): Remove; no longer needed.
11561 All uses replaced with definiens.
11562 * xterm.c: Include "bitmaps/gray.xbm".
11563
9e4bf381
PE
115642012-05-30 Paul Eggert <eggert@cs.ucla.edu>
11565
11566 Clean up __executable_start, monstartup when --enable-profiling.
11567 The following changes affect the code only when profiling.
11568 * dispnew.c (__executable_start): Rename from safe_bcopy.
11569 Define only on platforms that need it.
11570 * emacs.c: Include <sys/gmon.h> when profiling.
11571 (_mcleanup): Remove decl, since <sys/gmon.h> does it now.
11572 (__executable_start): Remove decl, since lisp.h does it now.
11573 (safe_bcopy): Remove decl; no longer has that name.
11574 (main): Coalesce #if into single bit of code, for simplicity.
11575 Cast pointers to uintptr_t, since standard libraries want integers
11576 and not pointers.
11577 * lisp.h (__executable_start): New decl.
11578
32d72c2f
GM
115792012-05-31 Glenn Morris <rgm@gnu.org>
11580
11581 * image.c (Fimagemagick_types): Doc fix.
11582
baac5bc7
JM
115832012-05-30 Jim Meyering <meyering@redhat.com>
11584
11585 * callproc.c (Fcall_process_region): Include directory component
11586 in mkstemp error message (Bug#11586).
11587
72cb32cf
PE
115882012-05-30 Paul Eggert <eggert@cs.ucla.edu>
11589
11590 * alloc.c, lisp.h (make_pure_vector): Now static.
11591
61b108cc
SM
115922012-05-30 Stefan Monnier <monnier@iro.umontreal.ca>
11593
11594 * eval.c (Fdefun, Fdefmacro, Vmacro_declaration_function):
11595 Move to byte-run.el.
11596 (Fautoload): Do the hash-doc more carefully.
11597 * data.c (Fdefalias): Purify definition, except for keymaps.
11598 (Qdefun): Move from eval.c.
11599 * lisp.h (Qdefun): Remove.
11600 * lread.c (read1): Tiny simplification.
11601
471fe23d
TN
116022012-05-29 Troels Nielsen <bn.troels@gmail.com>
11603
934f3f58 11604 Do not create empty overlays with the evaporate property (Bug#9642).
471fe23d
TN
11605 * buffer.c (Fmove_overlay): Reinstate the earlier fix for
11606 Bug#9642, but explicitly check that the buffer the overlay would
11607 be moved to is live and rearrange lines to make sure that errors
11608 will not put the overlay in an inconsistent state.
11609 (Fdelete_overlay): Cosmetics.
11610
85d0efd1
EZ
116112012-05-28 Eli Zaretskii <eliz@gnu.org>
11612
11613 * w32term.c (my_bring_window_to_top): New function.
11614 (x_raise_frame): Use handle returned by DeferWindowPos, which
61b108cc
SM
11615 could be different from the original one.
11616 Call my_bring_window_to_top instead of my_set_foreground_window.
85d0efd1
EZ
11617 (Bug#11513)
11618
11619 * w32fns.c (w32_wnd_proc): Accept and process WM_EMACS_BRINGTOTOP
11620 by calling BringWindowToTop.
11621
11622 * w32term.h (WM_EMACS_BRINGTOTOP): New message.
11623 (WM_EMACS_END): Increase by one.
11624
da92a98c
PE
116252012-05-28 Paul Eggert <eggert@cs.ucla.edu>
11626
11627 * bidi.c (bidi_mirror_char): Put eassert before conversion to int.
11628 This avoids undefined behavior that might cause the eassert
11629 to not catch an out-of-range value.
11630
74d1f848
JB
116312012-05-28 Juanma Barranquero <lekktu@gmail.com>
11632
11633 * makefile.w32-in ($(BLD)/w32inevt.$(O), $(BLD)/w32console.$(O)):
11634 Update dependencies.
11635
9e1a06fc
EZ
116362012-05-27 Eli Zaretskii <eliz@gnu.org>
11637
11638 * bidi.c (bidi_mirror_char): Fix last change.
11639
f3dd7312
AS
116402012-05-27 Andreas Schwab <schwab@linux-m68k.org>
11641
11642 * unexmacosx.c (copy_data_segment): Truncate after 16 characters
11643 when referring to sectname field in printf format.
11644
81899c91
PE
116452012-05-27 Paul Eggert <eggert@cs.ucla.edu>
11646
57b81a9f
PE
11647 * lisp.h [REL_ALLOC]: Omit duplicate prototypes.
11648 Only r_alloc_inhibit_buffer_relocation needed to be added;
11649 the others were already declared.
11650
81899c91
PE
11651 * bidi.c (bidi_mirror_char): Don't possibly truncate the integer
11652 before checking whether it's out of range. Put the check inside
11653 eassert. See
11654 <http://lists.gnu.org/archive/html/emacs-devel/2012-05/msg00485.html>.
11655
33017faf 116562012-05-27 Ken Brown <kbrown@cornell.edu>
2f9b9adb
KB
11657
11658 * callproc.c (Fcall_process): Restore a line that was accidentally
11659 commented out in the 2011-02-13 change (bug#11547).
11660
33017faf 116612012-05-27 Eli Zaretskii <eliz@gnu.org>
52c55cc7
EZ
11662
11663 * lisp.h [REL_ALLOC]: Add prototypes for external functions
11664 defined on ralloc.c.
11665
11666 * buffer.c [REL_ALLOC]: Remove prototypes of
11667 r_alloc_reset_variable, r_alloc, r_re_alloc, and r_alloc_free,
11668 they are now on lisp.h.
11669
11670 * ralloc.c (r_alloc_inhibit_buffer_relocation): New function.
11671
11672 * search.c (search_buffer): Use it to inhibit relocation of buffer
11673 text while re_search_2 is doing its job, because re_search_2 is
11674 passed C pointers to buffer text. (Bug#11519)
11675
23415acf
EZ
11676 * msdos.c (internal_terminal_init) <Vwindow_system_version>:
11677 Update value to 24.
11678
44e27368
EZ
11679 * xdisp.c (move_it_to): Under MOVE_TO_Y, when restoring iterator
11680 state after an additional call to move_it_in_display_line_to, keep
11681 the values of it->max_ascent and it->max_descent found for the
11682 entire line.
11683 (pos_visible_p): Revert the comparison against bottom_y to what it
11684 was in revid eliz@gnu.org-20120513182235-4p6386j761ld0nwb.
11685 (Bug#11464)
11686
c1892f11
PE
116872012-05-26 Paul Eggert <eggert@cs.ucla.edu>
11688
11689 Fix coding-related core dumps with gcc -ftrapv.
11690 The code was computing A - B, where A and B are pointers, and B is
11691 random garbage. This can lead to core dumps on platforms that
11692 have special pointer registers, and it also leads to core dumps on
11693 x86-64 when compiled with gcc -ftrapv. The fix is to compute
11694 A - B only when B is initialized properly.
11695 * coding.c (coding_set_source, coding_set_destination): Return void.
11696 (coding_change_source, coding_change_destinations): New functions,
11697 with the old behaviors of coding_set_source and coding_set_destination.
11698 All callers that need an offset changed to use these new functions.
11699
eb7afdad
GM
117002012-05-26 Glenn Morris <rgm@gnu.org>
11701
11702 * nsterm.m (ns_init_paths): Don't mess with INFOPATH. (Bug#2791)
11703
f12fdf02
EZ
117042012-05-26 Eli Zaretskii <eliz@gnu.org>
11705
53a63be6 11706 Extend mouse support on W32 text-mode console.
61b108cc
SM
11707 * xdisp.c (draw_row_with_mouse_face):
11708 Call tty_draw_row_with_mouse_face for WINDOWSNT as well.
eb3f6f01 11709
eb3f6f01 11710 * w32console.c: Include window.h.
61b108cc
SM
11711 (w32con_write_glyphs_with_face, tty_draw_row_with_mouse_face):
11712 New functions.
eb3f6f01
EZ
11713 (initialize_w32_display): Initialize mouse-highlight data.
11714
53a63be6
EZ
11715 * w32inevt.c: Include termchar.h and window.h.
11716 (do_mouse_event): Support mouse-autoselect-window. When the mouse
11717 moves, call note_mouse_highlight. If help_echo changed, call
11718 gen_help_event to produce help-echo message in the echo area.
11719 Call clear_mouse_face if mouse_face_hidden is set in the mouse
11720 highlight info.
11721
4cfd81f6
PE
117222012-05-26 Paul Eggert <eggert@cs.ucla.edu>
11723
11724 * lread.c (read1): Simplify slightly to avoid an overflow warning
11725 with GCC 4.7.0 on x86-64.
11726
4446092a
EZ
117272012-05-26 Eli Zaretskii <eliz@gnu.org>
11728
11729 * bidi.c (bidi_mirror_char): Revert last change: an int is
11730 definitely wide enough here.
11731
42b2a986 117322012-05-25 Paul Eggert <eggert@cs.ucla.edu>
3164aeac 11733
42b2a986 11734 Fix integer width and related bugs (Bug#9874).
eb106a49 11735 * alloc.c (pure_bytes_used_lisp, pure_bytes_used_non_lisp):
d311d28c
PE
11736 (allocate_vectorlike, buffer_memory_full, struct sdata, SDATA_SIZE)
11737 (string_bytes, check_sblock, allocate_string_data):
11738 (compact_small_strings, Fmake_bool_vector, make_string)
11739 (make_unibyte_string, make_multibyte_string)
11740 (make_string_from_bytes, make_specified_string)
11741 (allocate_vectorlike, Fmake_vector, find_string_data_in_pure)
11742 (make_pure_string, make_pure_c_string, make_pure_vector, Fpurecopy)
11743 (mark_vectorlike):
11744 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
11745 (allocate_pseudovector):
11746 Use int, not EMACS_INT, where int is wide enough.
11747 (inhibit_garbage_collection, Fgarbage_collect):
11748 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
11749 * bidi.c (bidi_mirror_char): Use EMACS_INT, not int, where
11750 int might not be wide enough.
11751 (bidi_cache_search, bidi_cache_find, bidi_init_it)
11752 (bidi_count_bytes, bidi_char_at_pos, bidi_fetch_char)
11753 (bidi_at_paragraph_end, bidi_find_paragraph_start)
11754 (bidi_paragraph_init, bidi_resolve_explicit, bidi_resolve_weak)
11755 (bidi_level_of_next_char, bidi_move_to_visually_next):
11756 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
11757 * buffer.c (copy_overlays, Fgenerate_new_buffer_name)
11758 (Fkill_buffer, Fset_buffer_major_mode)
11759 (advance_to_char_boundary, Fbuffer_swap_text)
11760 (Fset_buffer_multibyte, overlays_at, overlays_in)
11761 (overlay_touches_p, struct sortvec, record_overlay_string)
11762 (overlay_strings, recenter_overlay_lists)
11763 (adjust_overlays_for_insert, adjust_overlays_for_delete)
11764 (fix_start_end_in_overlays, fix_overlays_before, modify_overlay)
11765 (Fmove_overlay, Fnext_overlay_change, Fprevious_overlay_change)
11766 (Foverlay_recenter, last_overlay_modification_hooks_used)
11767 (report_overlay_modification, evaporate_overlays, enlarge_buffer_text):
11768 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
977b0e45
PE
11769 (validate_region): Omit unnecessary test for b <= e,
11770 since that's guaranteed by the previous test.
d311d28c
PE
11771 (adjust_overlays_for_delete): Avoid pos + length overflow.
11772 (Fmove_overlay, Fdelete_overlay, add_overlay_mod_hooklist)
11773 (report_overlay_modification):
11774 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
11775 (Foverlays_at, Fnext_overlay_change, Fprevious_overlay_change):
11776 Omit pointer cast, which isn't needed anyway, and doesn't work
11777 after the EMACS_INT -> ptrdiff_t change.
02481186 11778 (Fmove_overlay): Clip BEG and END to ptrdiff_t to avoid overflow.
d311d28c
PE
11779 * buffer.h: Adjust decls to match defn changes elsewhere.
11780 (struct buffer_text, struct buffer):
11781 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
11782 Use EMACS_INT, not int, where int might not be wide enough.
39b5db3b
PE
11783 * bytecode.c (unmark_byte_stack, exec_byte_code): Use ptrdiff_t,
11784 not int, to avoid needless 32-bit limit on 64-bit hosts.
11785 (exec_byte_code): Use tighter memory-full test, one that checks
11786 for alloca overflow. Don't compute the address of the object just
11787 before an array, as that's not portable. Use EMACS_INT, not
11788 ptrdiff_t or int, where ptrdiff_t or int might not be wide enough.
d311d28c
PE
11789 * callint.c (Fcall_interactively):
11790 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
11791 * callproc.c (call_process_kill, Fcall_process):
11792 Don't assume pid_t fits into an Emacs fixnum.
11793 (call_process_cleanup, Fcall_process, child_setup):
11794 Don't assume pid_t fits into int.
11795 (call_process_cleanup, Fcall_process, delete_temp_file)
11796 (Fcall_process_region):
11797 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
11798 (Fcall_process): Simplify handling of volatile integers.
11799 Use int, not EMACS_INT, where int will do.
11800 * casefiddle.c (casify_object, casify_region, operate_on_word)
11801 (Fupcase_word, Fdowncase_word, Fcapitalize_word):
11802 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
11803 (casify_object): Avoid integer overflow when overallocating buffer.
11804 * casetab.c (set_identity, shuffle): Prefer int to unsigned when
45c2afd6 11805 either works. Use lint_assume to convince GCC 4.6.1 that it's OK.
d311d28c
PE
11806 * category.c (Fchar_category_set): Don't assume fixnum fits in int.
11807 * category.h (CATEGORYP): Don't assume arg is nonnegative.
11808 * ccl.c (GET_CCL_INT): Remove; no longer needed, since the
11809 integers are now checked earlier. All uses replaced with XINT.
11810 (ccl_driver):
11811 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
11812 For CCL_MapSingle, check that content and value are in int range.
c801946a
PE
11813 (ccl_driver, Fregister_code_conversion_map):
11814 Check that Vcode_version_map_vector is a vector.
d311d28c
PE
11815 (resolve_symbol_ccl_program): Check that vector header is in range.
11816 Always copy the vector, so that we can check its contents reliably
11817 now rather than having to recheck each instruction as it's being
11818 executed. Check that vector words fit in 'int'.
11819 (ccl_get_compiled_code, Fregister_ccl_program)
11820 (Fregister_code_conversion_map): Use ptrdiff_t, not int, for
11821 program indexes, to avoid needless 32-bit limit on 64-bit hosts.
11822 (Fccl_execute, Fccl_execute_on_string): Check that initial reg
11823 contents are in range.
11824 (Fccl_execute_on_string): Check that status is in range.
11825 * ccl.h (struct ccl_program.idx): Now ptrdiff_t, not int.
11826 * character.c (char_resolve_modifier_mask, Fchar_resolve_modifiers):
11827 Accept and return EMACS_INT, not int, because callers can pass values
11828 out of 'int' range.
11829 (c_string_width, strwidth, lisp_string_width, chars_in_text)
11830 (multibyte_chars_in_text, parse_str_as_multibyte)
11831 (str_as_multibyte, count_size_as_multibyte, str_to_multibyte)
11832 (str_as_unibyte, str_to_unibyte, string_count_byte8)
11833 (string_escape_byte8, Fget_byte):
11834 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
a14e1568 11835 (Funibyte_string): Use CHECK_RANGED_INTEGER, not CHECK_NATNUM, to
d311d28c
PE
11836 avoid mishandling large integers.
11837 * character.h: Adjust decls to match defn changes elsewhere.
11838 * charset.c (load_charset_map_from_file, find_charsets_in_text)
11839 (Ffind_charset_region):
11840 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
11841 (load_charset_map_from_file): Redo idx calculation to avoid overflow.
11842 (load_charset_map_from_vector, Fdefine_charset_internal):
3c7649c1 11843 Don't assume fixnum fits in int.
d311d28c
PE
11844 (load_charset_map_from_vector, Fmap_charset_chars):
11845 Remove now-unnecessary CHECK_NATNUMs.
11846 (Fdefine_charset_internal): Check ranges here, more carefully.
3c7649c1
PE
11847 Don't rely on undefined behavior with signed left shift overflow.
11848 Don't assume unsigned int fits into fixnum, or that fixnum fits
11849 into unsigned int. Don't require max_code to be a valid fixnum;
11850 that's not true for gb10830 4-byte on a 32-bit host. Allow
11851 invalid_code to be a cons, for the same reason. Require code_offset
11852 to be a character. Avoid int overflow if max_char is close
11853 to INT_MAX.
11854 (CODE_POINT_TO_INDEX): On 32-bit hosts, return int, not unsigned;
11855 this is intended anyway and avoids some undefined behavior.
11856 (load_charset_map): Pass unsigned, not int, as 2nd arg of
11857 INDEX_TO_CODE_POINT, as that's what it expects.
11858 (Funify_charset, encode_char): Don't stuff unsigned vals into int vars.
60ad3eab
PE
11859 * charset.h (DECODE_CHAR): Return int, not unsigned;
11860 this is what was intended anyway, and it avoids undefined behavior.
11861 (CHARSET_OFFSET): Remove unused macro, instead of fixing its
11862 integer-overflow issues.
11863 (ENCODE_CHAR): Return unsigned on all hosts, not just on 32-bit hosts.
11864 Formerly, it returned EMACS_INT on 64-bit hosts in the common case
11865 where the argument is EMACS_INT, and this behavior is not intended.
d311d28c
PE
11866 * chartab.c (Fmake_char_table, Fset_char_table_range)
11867 (uniprop_get_decoder, uniprop_get_encoder):
11868 Don't assume fixnum fits in int.
11869 * cmds.c (move_point): New function, that does the gist of
11870 Fforward_char and Fbackward_char, but does so while checking
11871 for integer overflow more accurately.
c96e5d6a 11872 (Fforward_char, Fbackward_char): Use it.
d311d28c
PE
11873 (Fforward_line, Fend_of_line, internal_self_insert)
11874 (internal_self_insert):
11875 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
11876 Fix a FIXME, by checking for integer overflow when calculating
11877 target_clm and actual_clm.
11878 * coding.c (detect_coding_XXX, encode_coding_XXX, CODING_DECODE_CHAR)
8f50130c 11879 (CODING_ENCODE_CHAR, CODING_CHAR_CHARSET, CODING_CHAR_CHARSET_P)
d311d28c
PE
11880 (ASSURE_DESTINATION, coding_alloc_by_realloc)
11881 (coding_alloc_by_making_gap, alloc_destination)
11882 (detect_coding_utf_8, encode_coding_utf_8, decode_coding_utf_16)
11883 (encode_coding_utf_16, detect_coding_emacs_mule)
11884 (decode_coding_emacs_mule, encode_coding_emacs_mule)
11885 (detect_coding_iso_2022, decode_coding_iso_2022)
11886 (encode_invocation_designation, encode_designation_at_bol)
11887 (encode_coding_iso_2022, detect_coding_sjis, detect_coding_big5)
11888 (decode_coding_sjis, decode_coding_big5, encode_coding_sjis)
11889 (encode_coding_big5, detect_coding_ccl, decode_coding_ccl)
11890 (encode_coding_ccl, encode_coding_raw_text)
11891 (detect_coding_charset, decode_coding_charset)
11892 (encode_coding_charset, detect_eol, decode_eol, produce_chars)
11893 (produce_composition, produce_charset, produce_annotation)
11894 (decode_coding, handle_composition_annotation)
11895 (handle_charset_annotation, consume_chars, decode_coding_gap)
11896 (decode_coding_object, encode_coding_object, detect_coding_system)
11897 (Ffind_coding_systems_region_internal, Fcheck_coding_systems_region)
11898 (code_convert_region, code_convert_string)
8f50130c
PE
11899 (Fdefine_coding_system_internal)
11900 (coding_set_source, coding_set_destination):
d311d28c
PE
11901 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
11902 (setup_iso_safe_charsets, consume_chars, Funencodable_char_position)
11903 (Fdefine_coding_system_internal):
11904 Don't assume fixnums fit in int.
11905 (decode_coding_gap, decode_coding_object, encode_coding_object)
5895d7b9 11906 (Fread_coding_system, Fdetect_coding_region)
2c6a9faa
PE
11907 (Funencodable_char_position, Fcheck_coding_systems_region)
11908 (get_translation, handle_composition_annotation, consume_chars):
d311d28c 11909 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
977b0e45 11910 (consume_chars): Rewrite to not calculate an address outside buffer.
d311d28c 11911 (Ffind_operation_coding_system): NATNUMP can eval its arg twice.
7b09a37a 11912 Don't access memory outside of the args array.
d311d28c 11913 (Fdefine_coding_system_internal): Check for charset-id overflow.
47664caa
PE
11914 (ENCODE_ISO_CHARACTER): Use unsigned, not int, to store the unsigned
11915 result of ENCODE_CHAR.
d311d28c
PE
11916 * coding.h: Adjust decls to match defn changes elsewhere.
11917 (struct coding_system):
11918 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
11919 * composite.c (get_composition_id, find_composition)
11920 (run_composition_function, update_compositions)
11921 (compose_text, composition_gstring_put_cache)
11922 (composition_gstring_p, composition_gstring_width)
11923 (fill_gstring_header, fill_gstring_body, autocmp_chars)
11924 (composition_compute_stop_pos, composition_reseat_it)
11925 (composition_update_it, struct position_record)
11926 (find_automatic_composition, composition_adjust_point)
11927 (Fcomposition_get_gstring, Ffind_composition_internal):
11928 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
11929 (update_compositions):
11930 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
11931 * composite.h: Adjust decls to match defn changes elsewhere.
11932 (struct composition):
11933 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
11934 * data.c (let_shadows_buffer_binding_p, let_shadows_global_binding_p):
11935 Do not attempt to compute the address of the object just before a
11936 buffer; this is not portable.
11937 (Faref, Faset):
11938 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
11939 (Faset): Use int, not EMACS_INT, where int is wide enough.
11940 (Fstring_to_number): Don't assume fixnums fit in int.
11941 (Frem): Don't assume arg is nonnegative.
11942 * dbusbind.c (xd_append_arg): Check for integers out of range.
11943 (Fdbus_call_method): Don't overflow the timeout int.
42b2a986 11944 (extract_signed, extract_unsigned): New functions.
243e0530
PE
11945 (XD_CHECK_DBUS_SERIAL): Remove; superseded by extract_unsigned.
11946 (xd_get_connection_references): Return ptrdiff_t, not int.
11947 All uses changed.
11948 (xd_signature, xd_append_arg, xd_retrieve_arg, Fdbus_message_internal)
11949 (xd_read_message_1):
11950 Use int, not unsigned, where the dbus API uses int.
11951 (Fdbus_message_internal): Don't overflow mtype.
11952 (syms_of_dbusbind): Allocate right-sized buffer for integers.
d311d28c
PE
11953 * dired.c (directory_files_internal, file_name_completion, scmp)
11954 (file_name_completion_stat):
11955 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
11956 (file_name_completion): Don't overflow matchcount.
11957 (file_name_completion_stat): Use SAFE_ALLOCA, not alloca.
11958 * dispextern.h: Adjust decls to match defn changes elsewhere.
11959 (struct text_pos, struct glyph, struct bidi_saved_info)
11960 (struct bidi_string_data, struct bidi_it, struct composition_it)
11961 (struct it):
11962 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
11963 (struct display_pos, struct composition_it, struct it):
11964 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
11965 * dispnew.c (increment_matrix_positions)
11966 (increment_row_positions, mode_line_string)
11967 (marginal_area_string):
11968 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
54e1617f 11969 (change_frame_size_1, Fredisplay, Fframe_or_buffer_changed_p):
d311d28c
PE
11970 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
11971 (duration_to_sec_usec): New function, to check for overflow better.
11972 (Fsleep_for, sit_for): Use it.
11973 * doc.c (get_doc_string, store_function_docstring):
11974 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
11975 (get_doc_string, Fsnarf_documentation):
11976 Use int, not EMACS_INT, where int is wide enough.
11977 (get_doc_string):
11978 Use SAFE_ALLOCA, not alloca.
11979 Check for overflow when converting EMACS_INT to off_t.
11980 * doprnt.c (doprnt):
11981 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
11982 * editfns.c (init_editfns, Fuser_uid, Fuser_real_uid):
11983 Don't assume uid_t fits into fixnum.
11984 (buildmark, Fgoto_char, overlays_around, find_field, Fdelete_field)
11985 (Ffield_string, Ffield_string_no_properties, Ffield_beginning)
11986 (Ffield_end, Fconstrain_to_field, Fline_beginning_position)
11987 (Fline_end_position, Fprevious_char, Fchar_after, Fchar_before)
11988 (general_insert_function)
11989 (Finsert_char, make_buffer_string, make_buffer_string_both)
11990 (update_buffer_properties, Fbuffer_substring)
11991 (Fbuffer_substring_no_properties, Fcompare_buffer_substrings)
11992 (Fsubst_char_in_region, check_translation)
11993 (Ftranslate_region_internal, save_restriction_restore, Fformat)
11994 (transpose_markers, Ftranspose_regions):
11995 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
11996 (clip_to_bounds): Move to lisp.h as an inline function).
11997 (Fconstrain_to_field): Don't assume integers are nonnegative.
11998 (Fline_beginning_position, Fsave_excursion, Fsave_current_buffer):
11999 (Fsubst_char_in_region, Fsave_restriction):
12000 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
12001 (Femacs_pid): Don't assume pid_t fits into fixnum.
12002 (lo_time): Use int, not EMACS_INT, when int suffices.
12003 (lisp_time_argument): Check for usec out of range.
12004 (Fencode_time): Don't assume fixnum fits in int.
3f4eabd1
PE
12005 (Fuser_login_name, Fuser_full_name): Signal an error
12006 if a uid argument is out of range, rather than relying on
12007 undefined behavior.
c8d5c857
PE
12008 (Fformat_time_string): Remove now-unnecessary check.
12009 lisp_time_argument checks for out-of-range usec now.
243e0530 12010 Use ptrdiff_t, not size_t, where ptrdiff_t will do.
d311d28c
PE
12011 * emacs.c (gdb_valbits, gdb_gctypebits): Now int, not EMACS_INT.
12012 (gdb_data_seg_bits): Now uintptr_t, not EMACS_INT.
12013 (PVEC_FLAG, gdb_array_mark_flag): Now ptrdiff_t, not EMACS_INT.
12014 (init_cmdargs, Fdump_emacs):
12015 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
12016 (Fkill_emacs): Don't assume fixnum fits in int; instead, take just
12017 the bottom (typically) 32 bits of the fixnum.
12018 * eval.c (specpdl_size, call_debugger):
12019 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
12020 (when_entered_debugger, Fbacktrace_debug):
12021 Don't assume fixnum can fit in int.
12022 (Fdefvaralias, Fdefvar): Do not attempt to compute the address of
12023 the object just before a buffer; this is not portable.
12024 (FletX, Flet, Funwind_protect, do_autoload, Feval, funcall_lambda)
12025 (grow_specpdl, unbind_to):
12026 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
12027 (Fapply, apply_lambda): Don't assume ptrdiff_t can hold fixnum.
12028 (grow_specpdl): Simplify allocation by using xpalloc.
856bbc81 12029 (Fprog1, Fprog2): Don't assume list length fits in int. Simplify.
d311d28c
PE
12030 * fileio.c (Ffind_file_name_handler, Fcopy_file, Frename_file)
12031 (Finsert_file_contents, Fwrite_region, Fdo_auto_save):
12032 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
12033 (Ffind_file_name_handler, non_regular_inserted, Finsert_file_contents)
12034 (a_write, e_write):
12035 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
12036 (Fcopy_file, non_regular_nbytes, read_non_regular)
12037 (Finsert_file_contents):
12038 Use int, not EMACS_INT, where int is wide enough.
12039 (READ_BUF_SIZE): Verify that it fits in int.
12040 (Finsert_file_contents): Check that counts are in proper range,
12041 rather than assuming fixnums fit into ptrdiff_t etc.
12042 Don't assume fixnums fit into int.
125b3835 12043 * floatfns.c (Fexpt): Avoid undefined signed * signed overflow.
5895d7b9
PE
12044 * fns.c (Fcompare_strings, Fstring_lessp, struct textprop_rec, concat)
12045 (string_char_byte_cache_charpos, string_char_byte_cache_bytepos)
d311d28c
PE
12046 (string_char_to_byte, string_byte_to_char)
12047 (string_make_multibyte, string_to_multibyte)
12048 (string_make_unibyte, Fstring_as_unibyte, Fstring_as_multibyte)
12049 (Fstring_to_unibyte, Fsubstring, Fsubstring_no_properties)
12050 (substring_both, Fdelete, internal_equal, Ffillarray)
12051 (Fclear_string, mapcar1)
12052 (Fbase64_encode_region, Fbase64_encode_string, base64_encode_1)
12053 (Fbase64_decode_region, Fbase64_decode_string, base64_decode_1)
12054 (larger_vector, make_hash_table, maybe_resize_hash_table)
12055 (hash_lookup, hash_remove_from_table, hash_clear, sweep_weak_table)
12056 (Fmaphash, secure_hash):
12057 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
12058 (concat): Check for string index and length overflow.
12059 (Fmapconcat): Don't assume fixnums fit into ptrdiff_t.
12060 (Frequire):
12061 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
12062 (larger_vector): New API (vec, incr_min, size_max) replaces old
12063 one (vec, new_size, init). This catches size overflow.
12064 INIT was removed because it was always Qnil.
12065 All callers changed.
12066 (INDEX_SIZE_BOUND): New macro, which calculates more precisely
12067 the upper bound on a hash table index size.
12068 (make_hash_table, maybe_resize_hash_table): Use it.
12069 (secure_hash): Computer start_byte and end_byte only after
12070 they're known to be in ptrdiff_t range.
12071 * font.c (font_intern_prop, font_at, font_range, Ffont_shape_gstring)
12072 (Ffont_get_glyphs, Ffont_at):
12073 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
12074 (font_style_to_value, font_prop_validate_style, font_expand_wildcards)
12075 (Flist_fonts, Fopen_font):
12076 Don't assume fixnum can fit in int.
12077 (check_gstring): Don't assume index can fit in int.
12078 (font_match_p): Check that fixnum is a character, not a nonnegative
12079 fixnum, since the later code needs to stuff it into an int.
12080 (font_find_for_lface): Use SAFE_ALLOCA_LISP, not alloca.
12081 (font_fill_lglyph_metrics): Use unsigned, not EMACS_INT, to avoid
12082 conversion overflow issues.
12083 (Fopen_font): Check for integer out of range.
12084 (Ffont_get_glyphs): Don't assume index can fit in int.
12085 * font.h: Adjust decls to match defn changes elsewhere.
12086 * fontset.c (reorder_font_vector): Redo score calculation to avoid
12087 integer overflow.
12088 (num_auto_fontsets, fontset_from_font): Use ptrdiff_t, not
12089 printmax_t, where ptrdiff_t is wide enough.
12090 (Finternal_char_font):
12091 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
12092 * frame.c (Fset_mouse_position, Fset_mouse_pixel_position)
12093 (Fset_frame_height, Fset_frame_width, Fset_frame_size)
12094 (Fset_frame_position, x_set_frame_parameters)
12095 (x_set_line_spacing, x_set_border_width)
12096 (x_set_internal_border_width, x_set_alpha, x_figure_window_size):
12097 Check that fixnums are in proper range for system types.
12098 (frame_name_fnn_p, Fframe_parameter, Fmodify_frame_parameters):
12099 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
12100 (Fmodify_frame_parameters): Don't assume fixnum fits in int.
12101 Use SAFE_ALLOCA_LISP, not alloca.
12102 * frame.h (struct frame): Use intptr_t, not EMACS_INT, where
12103 intptr_t is wide enough.
12104 * fringe.c (lookup_fringe_bitmap, get_logical_fringe_bitmap)
12105 (Fdefine_fringe_bitmap): Don't assume fixnum fits in int.
12106 (Ffringe_bitmaps_at_pos): Don't assume index fits in int.
12107 Check for fixnum out of range.
12108 * ftfont.c (ftfont_list): Don't assume index fits in int.
12109 Check that fixnums are in proper range for system types.
12110 (ftfont_shape_by_flt):
12111 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
d311d28c
PE
12112 * gnutls.c (emacs_gnutls_write, emacs_gnutls_read):
12113 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
12114 (Fgnutls_error_fatalp, Fgnutls_error_string, Fgnutls_boot):
12115 Check that fixnums are in proper range for system types.
12116 * gnutls.h: Adjust decls to match defn changes elsewhere.
12117 * gtkutil.c (xg_dialog_run):
12118 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
12119 (update_frame_tool_bar):
12120 Check that fixnums are in proper range for system types.
12121 * image.c (parse_image_spec): Redo count calculation to avoid overflow.
5895d7b9 12122 (lookup_image): Check that fixnums are in range for system types.
d311d28c
PE
12123 * indent.c (last_known_column, last_known_column_point):
12124 (current_column_bol_cache):
12125 (skip_invisible, current_column, check_display_width):
12126 (check_display_width, scan_for_column, current_column_1)
12127 (Findent_to, Fcurrent_indentation, position_indentation)
12128 (indented_beyond_p, Fmove_to_column, compute_motion):
12129 (Fcompute_motion, Fvertical_motion):
12130 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
12131 (last_known_column_modified): Use EMACS_INT, not int.
12132 (check_display_width):
12133 (Fcompute_motion):
12134 Check that fixnums and floats are in proper range for system types.
12135 (compute_motion): Don't assume index or fixnum fits in int.
12136 (compute_motion, Fcompute_motion):
12137 Use int, not EMACS_INT, when it is wide enough.
12138 (vmotion): Omit local var start_hpos that is always 0; that way
12139 we don't need to worry about overflow in expressions involving it.
12140 * indent.h: Adjust decls to match defn changes elsewhere.
12141 (struct position):
12142 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
12143 Use int, not EMACS_INT, where int is wide enough.
12144 Remove unused members ovstring_chars_done and tab_offset;
12145 all uses removed.
12146 * insdel.c (move_gap, move_gap_both, gap_left, gap_right)
12147 (adjust_markers_for_delete, adjust_markers_for_insert, adjust_point)
12148 (adjust_markers_for_replace, make_gap_larger, make_gap_smaller)
12149 (make_gap, copy_text, insert, insert_and_inherit)
12150 (insert_before_markers, insert_before_markers_and_inherit)
12151 (insert_1, count_combining_before, count_combining_after)
12152 (insert_1_both, insert_from_string)
12153 (insert_from_string_before_markers, insert_from_string_1)
12154 (insert_from_gap, insert_from_buffer, insert_from_buffer_1)
12155 (adjust_after_replace, adjust_after_insert, replace_range)
12156 (replace_range_2, del_range, del_range_1, del_range_byte)
12157 (del_range_both, del_range_2, modify_region)
12158 (prepare_to_modify_buffer, signal_before_change)
12159 (signal_after_change, Fcombine_after_change_execute):
12160 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
12161 * intervals.c (traverse_intervals, rotate_right, rotate_left)
12162 (balance_an_interval, split_interval_right, split_interval_left)
12163 (find_interval, next_interval, update_interval)
12164 (adjust_intervals_for_insertion, delete_node, delete_interval)
12165 (interval_deletion_adjustment, adjust_intervals_for_deletion)
12166 (static_offset_intervals, offset_intervals)
12167 (merge_interval_right, merge_interval_left, make_new_interval)
12168 (graft_intervals_into_buffer, temp_set_point_both)
12169 (temp_set_point, set_point, adjust_for_invis_intang)
12170 (set_point_both, move_if_not_intangible, get_property_and_range)
12171 (get_local_map, copy_intervals, copy_intervals_to_string)
12172 (compare_string_intervals, set_intervals_multibyte_1):
12173 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
12174 * intervals.h: Adjust decls to match defn changes elsewhere.
12175 (struct interval):
12176 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
12177 * keyboard.c (this_command_key_count, this_single_command_key_start)
12178 (before_command_key_count, before_command_echo_length, echo_now)
12179 (echo_length, recursive_edit_1, Frecursive_edit, Ftrack_mouse)
12180 (command_loop_1, safe_run_hooks, read_char, timer_check_2)
12181 (menu_item_eval_property, read_key_sequence, Fread_key_sequence)
12182 (Fread_key_sequence_vector, Fexecute_extended_command, Fsuspend_emacs):
12183 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
12184 (last_non_minibuf_size, last_point_position, echo_truncate)
12185 (command_loop_1, adjust_point_for_property, read_char, gen_help_event)
12186 (make_lispy_position, make_lispy_event, parse_modifiers_uncached)
12187 (parse_modifiers, modify_event_symbol, Fexecute_extended_command)
12188 (stuff_buffered_input):
12189 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
12190 (last_auto_save, command_loop_1, read_char):
12191 Use EMACS_INT, not int, to avoid integer overflow.
12192 (record_char): Avoid overflow in total_keys computation.
12193 (parse_modifiers_uncached): Redo index calculation to avoid overflow.
12194 * keyboard.h: Adjust decls to match defn changes elsewhere.
12195 * keymap.c (Fdefine_key, Fcurrent_active_maps, accessible_keymaps_1)
12196 (Fkey_description, Fdescribe_vector, Flookup_key):
12197 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
12198 (click_position): New function, to check that positions are in range.
12199 (Fcurrent_active_maps):
12200 (describe_command):
12201 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
12202 (Faccessible_keymaps, Fkey_description):
12203 (preferred_sequence_p):
12204 Don't assume fixnum can fit into int.
12205 (Fkey_description): Use SAFE_ALLOCA_LISP, not alloca.
12206 Check for integer overflow in size calculations.
12207 (Ftext_char_description): Use CHECK_CHARACTER, not CHECK_NUMBER, to
12208 avoid mishandling large integers.
12209 * lisp.h: Adjust decls to match defn changes elsewhere.
12210 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, struct Lisp_String)
12211 (struct vectorlike_header, struct Lisp_Subr, struct Lisp_Hash_Table)
12212 (struct Lisp_Marker):
12213 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
12214 (clip_to_bounds): Now an inline function, moved here from editfns.c.
d311d28c
PE
12215 (GLYPH_CODE_P): Check for overflow in system types, subsuming the
12216 need for GLYPH_CODE_CHAR_VALID_P and doing proper checking ourselves.
12217 All callers changed.
12218 (GLYPH_CODE_CHAR, GLYPH_CODE_FACE):
12219 Assume the arg has valid form, since it always does.
12220 (TYPE_RANGED_INTEGERP): Avoid bug when checking against a wide
12221 unsigned integer system type.
12222 (CHECK_RANGED_INTEGER, CHECK_TYPE_RANGED_INTEGER): New macros.
12223 (struct catchtag, specpdl_size, SPECPDL_INDEX, USE_SAFE_ALLOCA):
12224 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
12225 (struct catchtag): Use EMACS_INT, not int, since it may be a fixnum.
12226 (duration_to_sec_usec): New decl.
12227 * lread.c (read_from_string_index, read_from_string_index_byte)
12228 (read_from_string_limit, readchar, unreadchar, openp)
12229 (read_internal_start, read1, oblookup):
12230 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
12231 (Fload, readevalloop, Feval_buffer, Feval_region):
12232 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
12233 (openp): Check for out-of-range argument to 'access'.
12234 (read1): Use int, not EMACS_INT, where int is wide enough.
12235 Don't assume fixnum fits into int.
6efdadfd 12236 Fix off-by-one error that can read outside a buffer.
1ab7b8ac
PE
12237 (read_filtered_event): Use duration_to_sec_usec
12238 to do proper overflow checking on durations.
d311d28c
PE
12239 * macros.c (Fstart_kbd_macro): Use xpalloc to check for overflow
12240 in size calculation.
12241 (Fexecute_kbd_macro):
12242 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
12243 * marker.c (cached_charpos, cached_bytepos, CONSIDER)
12244 (byte_char_debug_check, buf_charpos_to_bytepos, verify_bytepos)
12245 (buf_bytepos_to_charpos, Fset_marker, set_marker_restricted)
12246 (set_marker_both, set_marker_restricted_both, marker_position)
12247 (marker_byte_position, Fbuffer_has_markers_at):
12248 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
12249 (Fset_marker, set_marker_restricted): Don't assume fixnum fits in int.
61b108cc 12250 * menu.c (ensure_menu_items): Rename from grow_menu_items.
d311d28c
PE
12251 It now merely ensures that the menu is large enough, without
12252 necessarily growing it, as this avoids some integer overflow issues.
12253 All callers changed.
12254 (keymap_panes, parse_single_submenu, Fx_popup_menu):
12255 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
12256 (parse_single_submenu, Fx_popup_menu): Don't assume fixnum fits in int.
12257 Use SAFE_ALLOCA_LISP, not alloca.
12258 (find_and_return_menu_selection): Avoid unnecessary casts of pointers
12259 to EMACS_INT. Check that fixnums are in proper range for system types.
12260 * minibuf.c (minibuf_prompt_width, string_to_object)
12261 (Fminibuffer_contents, Fminibuffer_contents_no_properties)
12262 (Fminibuffer_completion_contents, Ftry_completion, Fall_completions):
12263 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
12264 (get_minibuffer, read_minibuf_unwind):
12265 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
12266 (read_minibuf): Omit unnecessary arg BACKUP_N, which is always nil;
12267 this simplifies overflow checking. All callers changed.
12268 (read_minibuf, Fread_buffer, Ftry_completion, Fall_completions)
12269 (Ftest_completion):
12270 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
12271 * nsfns.m (check_ns_display_info): Don't assume fixnum fits in long.
12272 (x_set_menu_bar_lines, x_set_tool_bar_lines, Fx_create_frame):
12273 Check that fixnums are in proper range for system types.
12274 (Fx_create_frame, Fx_show_tip):
12275 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
12276 * nsfont.m (ns_findfonts, nsfont_list_family):
12277 Don't assume fixnum fits in long.
12278 * nsmenu.m (ns_update_menubar, ns_menu_show, ns_popup_dialog):
12279 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
12280 (ns_update_menubar): Use intptr_t, not EMACS_INT, when intptr_t is
12281 wide enough.
17fdb222 12282 * nsselect.m (ns_get_local_selection, clean_local_selection_data):
d311d28c
PE
12283 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
12284 * print.c (print_buffer_size, print_buffer_pos, print_buffer_pos_byte)
12285 (PRINTDECLARE, PRINTPREPARE):
12286 (strout, print_string):
12287 (print, print_preprocess, print_check_string_charset_prop)
12288 (print_object):
12289 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
12290 (PRINTDECLARE):
12291 (temp_output_buffer_setup, Fprin1_to_string, print_object):
12292 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
12293 (PRINTPREPARE): Use int, not ptrdiff_t, where int is wide enough.
d311d28c 12294 (printchar, strout): Use xpalloc to catch size calculation overflow.
0fd11aa5 12295 (Fexternal_debugging_output): Don't overflow EMACS_INT->int conversion.
d311d28c
PE
12296 (print_error_message): Use SAFE_ALLOCA, not alloca.
12297 (print_object): Use int, not EMACS_INT, where int is wide enough.
a8b7caa3
PE
12298 (print_depth, new_backquote_output, print_number_index):
12299 Use ptrdiff_t, not int, where int might not be wide enough.
d311d28c
PE
12300 * process.c (Fdelete_process): Don't assume pid fits into EMACS_INT.
12301 (Fset_process_window_size, Fformat_network_address)
12302 (get_lisp_to_sockaddr_size, set_socket_option, Fmake_network_process)
d44287d4 12303 (sigchld_handler):
d311d28c 12304 Check that fixnums are in proper range for system types.
d44287d4 12305 (Fsignal_process): Simplify by avoiding a goto.
d83cf4cc
PE
12306 Check for process-ids out of pid_t range rather than relying on
12307 undefined behavior.
e4d81efc 12308 (process_tick, update_tick): Use EMACS_INT, not int.
d311d28c
PE
12309 (Fformat_network_address, read_process_output, send_process)
12310 (Fprocess_send_region, status_notify):
12311 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
12312 (Fformat_network_address, Fmake_serial_process, Fmake_network_process)
12313 (wait_reading_process_output, read_process_output, exec_sentinel):
12314 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
12315 (conv_lisp_to_sockaddr): Don't assume fixnums fit into int.
12316 (Faccept_process_output): Use duration_to_sec_usec to do proper
12317 overflow checking on durations.
dde14581
PE
12318 (emacs_get_tty_pgrp, Fprocess_running_child_p, process_send_signal):
12319 Don't assume pid_t fits in int.
02481186
PE
12320 * process.h (struct Lisp_Process): Members tick and update_tick
12321 are now of type EMACS_INT, not int.
b62b53e8
PE
12322 * puresize.h (PURESIZE_RATIO): Shrink this to 8/6 on 32-bit hosts
12323 configured --with-wide-int.
d311d28c
PE
12324 * scroll.c (calculate_scrolling, calculate_direct_scrolling)
12325 (line_ins_del): Use int, not EMACS_INT, where int is wide enough.
12326 * search.c (looking_at_1, string_match_1):
12327 (fast_string_match, fast_c_string_match_ignore_case)
12328 (fast_string_match_ignore_case, fast_looking_at, scan_buffer)
12329 (scan_newline, find_before_next_newline, search_command)
12330 (trivial_regexp_p, search_buffer, simple_search, boyer_moore)
12331 (set_search_regs, wordify):
12332 (Freplace_match):
12333 (Fmatch_data):
12334 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
12335 (string_match_1, search_buffer, set_search_regs):
12336 (Fmatch_data):
12337 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
12338 (wordify): Check for overflow in size calculation.
12339 (Freplace_match): Avoid potential buffer overflow in search_regs.start.
12340 (Fset_match_data): Don't assume fixnum fits in ptrdiff_t.
12341 Check that fixnums are in proper range for system types.
12342 * sound.c (struct sound_device)
12343 (wav_play, au_play, vox_write, alsa_period_size, alsa_write):
12344 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
12345 (Fplay_sound_internal):
12346 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
eacd378d 12347 * syntax.c (struct lisp_parse_state, find_start_modiff)
d311d28c
PE
12348 (Finternal_describe_syntax_value, scan_lists, scan_sexps_forward):
12349 (Fparse_partial_sexp):
12350 Don't assume fixnums can fit in int.
12351 (struct lisp_parse_state, find_start_pos, find_start_value)
12352 (find_start_value_byte, find_start_begv)
12353 (update_syntax_table, char_quoted, dec_bytepos)
12354 (find_defun_start, prev_char_comend_first, back_comment):
12355 (scan_words, skip_chars, skip_syntaxes, forw_comment, Fforward_comment)
12356 (scan_lists, Fbackward_prefix_chars, scan_sexps_forward):
12357 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
12358 (Finternal_describe_syntax_value): Check that match_lisp is a
12359 character, not an integer, since the code stuffs it into int.
12360 (scan_words, scan_sexps_forward):
12361 Check that fixnums are in proper range for system types.
12362 (Fforward_word):
12363 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
12364 (scan_sexps_forward):
12365 Use CHARACTERP, not INTEGERP, since the value must fit into int.
12366 (Fparse_partial_sexp): Fix doc; element 8 is not ignored.
12367 * syntax.h: Adjust decls to match defn changes elsewhere.
12368 (struct gl_state_s):
12369 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
e4ecdc9c
PE
12370 (SETUP_SYNTAX_TABLE_FOR_OBJECT): Use PTRDIFF_MAX, not
12371 MOST_POSITIVE_FIXNUM.
d311d28c
PE
12372 * sysdep.c (wait_for_termination_1, wait_for_termination)
12373 (interruptible_wait_for_termination, mkdir):
12374 Don't assume pid_t fits in int; on 64-bit AIX pid_t is 64-bit.
12375 (emacs_read, emacs_write):
12376 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
225a2cff
PE
12377 (system_process_attributes): Don't assume uid_t, gid_t, EMACS_INT,
12378 and double all fit in int.
d311d28c
PE
12379 * term.c (set_tty_color_mode):
12380 Check that fixnums are in proper range for system types.
12381 * termhooks.h (struct input_event):
12382 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
12383 * textprop.c (validate_interval_range, interval_of)
12384 (Fadd_text_properties, set_text_properties_1)
12385 (Fremove_text_properties, Fremove_list_of_text_properties)
12386 (Ftext_property_any, Ftext_property_not_all)
12387 (copy_text_properties, text_property_list, extend_property_ranges)
12388 (verify_interval_modification):
12389 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
12390 (Fnext_single_char_property_change)
12391 (Fprevious_single_char_property_change):
12392 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
5895d7b9
PE
12393 (copy_text_properties):
12394 Check for integer overflow in index calculation.
d311d28c
PE
12395 * undo.c (last_boundary_position, record_point, record_insert)
12396 (record_delete, record_marker_adjustment, record_change)
12397 (record_property_change):
12398 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
12399 (truncate_undo_list, Fprimitive_undo): Don't assume fixnum fits in int.
12400 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
12401 * w32fns.c (Fx_create_frame, x_create_tip_frame, Fx_show_tip)
12402 (Fx_hide_tip, Fx_file_dialog):
12403 * w32menu.c (set_frame_menubar):
12404 Use ptrdiff_t, not int, for consistency with rest of code.
12405 * window.c (window_scroll_preserve_hpos, window_scroll_preserve_vpos)
12406 (select_window, Fdelete_other_windows_internal)
12407 (window_scroll_pixel_based, window_scroll_line_based)
12408 (Frecenter, Fset_window_configuration):
12409 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
12410 (Fset_window_hscroll, run_window_configuration_change_hook)
12411 (set_window_buffer, temp_output_buffer_show, scroll_command)
5895d7b9 12412 (Fscroll_other_window, Frecenter):
d311d28c
PE
12413 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
12414 (Fwindow_line_height, window_scroll, Fscroll_left, Fscroll_right):
12415 Don't assume fixnum fits in int.
12416 (Fset_window_scroll_bars):
12417 Check that fixnums are in proper range for system types.
12418 * xdisp.c (help_echo_pos, pos_visible_p, string_pos_nchars_ahead)
12419 (string_pos, c_string_pos, number_of_chars, init_iterator)
12420 (in_ellipses_for_invisible_text_p, init_from_display_pos)
12421 (compute_stop_pos, next_overlay_change, compute_display_string_pos)
12422 (compute_display_string_end, handle_face_prop)
5895d7b9
PE
12423 (face_before_or_after_it_pos, handle_invisible_prop)
12424 (handle_display_prop, handle_display_spec, handle_single_display_spec)
d311d28c
PE
12425 (display_prop_intangible_p, string_buffer_position_lim)
12426 (string_buffer_position, handle_composition_prop, load_overlay_strings)
12427 (get_overlay_strings_1, get_overlay_strings)
12428 (iterate_out_of_display_property, forward_to_next_line_start)
12429 (back_to_previous_visible_line_start, reseat, reseat_to_string)
12430 (get_next_display_element, set_iterator_to_next)
12431 (get_visually_first_element, compute_stop_pos_backwards)
12432 (handle_stop_backwards, next_element_from_buffer)
12433 (move_it_in_display_line_to, move_it_in_display_line)
12434 (move_it_to, move_it_vertically_backward, move_it_by_lines)
12435 (add_to_log, message_dolog, message_log_check_duplicate)
12436 (message2, message2_nolog, message3, message3_nolog
12437 (with_echo_area_buffer, display_echo_area_1, resize_mini_window_1)
12438 (current_message_1, truncate_echo_area, truncate_message_1)
12439 (set_message, set_message_1, store_mode_line_noprop)
12440 (hscroll_window_tree, debug_delta, debug_delta_bytes, debug_end_vpos)
12441 (text_outside_line_unchanged_p, check_point_in_composition)
12442 (reconsider_clip_changes)
12443 (redisplay_internal, set_cursor_from_row, try_scrolling)
12444 (try_cursor_movement, set_vertical_scroll_bar, redisplay_window)
12445 (redisplay_window, find_last_unchanged_at_beg_row)
12446 (find_first_unchanged_at_end_row, row_containing_pos, try_window_id)
12447 (trailing_whitespace_p, find_row_edges, display_line)
12448 (RECORD_MAX_MIN_POS, Fcurrent_bidi_paragraph_direction)
12449 (display_mode_element, store_mode_line_string)
12450 (pint2str, pint2hrstr, decode_mode_spec)
12451 (display_count_lines, display_string, draw_glyphs)
12452 (x_produce_glyphs, x_insert_glyphs)
12453 (rows_from_pos_range, mouse_face_from_buffer_pos)
12454 (fast_find_string_pos, mouse_face_from_string_pos)
12455 (note_mode_line_or_margin_highlight, note_mouse_highlight):
12456 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
12457 (safe_call, init_from_display_pos, handle_fontified_prop)
12458 (handle_single_display_spec, load_overlay_strings)
12459 (with_echo_area_buffer, setup_echo_area_for_printing)
12460 (display_echo_area, echo_area_display)
12461 (x_consider_frame_title, prepare_menu_bars, update_menu_bar)
12462 (update_tool_bar, hscroll_window_tree, redisplay_internal)
5895d7b9
PE
12463 (redisplay_window, dump_glyph_row, display_mode_line)
12464 (Fformat_mode_line, decode_mode_spec, on_hot_spot_p):
43ad2e9a 12465 (handle_display_spec, display_prop_string_p):
d311d28c
PE
12466 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
12467 (handle_single_display_spec, build_desired_tool_bar_string)
12468 (redisplay_tool_bar, scroll_window_tree, Fdump_glyph_matrix)
12469 (get_specified_cursor_type):
12470 Check that fixnums are in proper range for system types.
12471 (struct overlay_entry, resize_mini_window, Fdump_glyph_row)
12472 (Flookup_image_map):
12473 Don't assume fixnums fit in int.
12474 (compare_overlay_entries):
12475 Avoid mishandling comparisons due to subtraction overflow.
12476 (load_overlay_strings): Use SAFE_NALLOCA, not alloca.
12477 (last_escape_glyph_face_id, last_glyphless_glyph_face_id):
12478 (handle_tool_bar_click):
12479 Use int, not unsigned, since we prefer signed and the signedness
12480 doesn't matter here.
12481 (get_next_display_element, next_element_from_display_vector):
12482 Use int, not EMACS_INT, when int is wide enough.
12483 (start_hourglass): Use duration_to_sec_usec to do proper
12484 overflow checking on durations.
12485 * xfaces.c (Fbitmap_spec_p):
12486 Check that fixnums are in proper range for system types.
12487 (compare_fonts_by_sort_order):
12488 Avoid mishandling comparisons due to subtraction overflow.
12489 (Fx_family_fonts, realize_basic_faces):
12490 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
12491 (Fx_family_fonts):
12492 Don't assume fixnum fits in int.
12493 Use SAFE_ALLOCA_LISP, not alloca.
12494 (merge_face_heights): Remove unnecessary cast to EMACS_INT.
12495 (Finternal_make_lisp_face): Don't allocate more than MAX_FACE_ID.
12496 (face_at_buffer_position, face_for_overlay_string)
12497 (face_at_string_position):
12498 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
12499 (merge_faces): Use int, not EMACS_INT, where int is wide enough.
12500 * xfns.c (x_set_menu_bar_lines, x_set_tool_bar_lines, x_icon_verify)
12501 (Fx_show_tip):
12502 Check that fixnums are in proper range for system types.
12503 (Fx_create_frame, x_create_tip_frame, Fx_show_tip)
12504 (Fx_hide_tip, Fx_file_dialog, Fx_select_font):
12505 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
12506 (Fx_change_window_property): Don't assume fixnums fit in int.
12507 * xfont.c (xfont_chars_supported):
12508 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
12509 * xmenu.c (Fx_popup_dialog, set_frame_menubar)
12510 (create_and_show_popup_menu, create_and_show_dialog, xmenu_show):
12511 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
12512 * xml.c (parse_region):
12513 * xrdb.c (magic_file_p):
12514 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
12515 * xselect.c (TRACE1): Don't assume pid_t promotes to int.
12516 (x_get_local_selection, x_reply_selection_request)
12517 (x_handle_selection_request, wait_for_property_change):
12518 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
12519 (selection_data_to_lisp_data): Use short, not EMACS_INT, where
12520 short is wide enough.
12521 (x_send_client_event): Don't assume fixnum fits in int.
12522 * xterm.c (x_x_to_emacs_modifiers):
12523 Don't assume EMACS_INT overflows nicely into int.
12524 (x_emacs_to_x_modifiers): Use EMACS_INT, not int, because values
12525 may come from Lisp.
12526 (handle_one_xevent): NATNUMP can eval its arg twice.
12527 (x_connection_closed):
12528 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
12529 * xterm.h: Adjust decls to match defn changes elsewhere.
12530 (struct scroll_bar): Use struct vectorlike_header
12531 rather than rolling our own approximation.
12532 (SCROLL_BAR_VEC_SIZE): Remove; not used.
12533
c6574eb5
GM
125342012-05-25 Glenn Morris <rgm@gnu.org>
12535
12536 * lisp.mk (lisp): Update for more files being compiled now.
12537
e8d32c7e
SM
125382012-05-25 Stefan Monnier <monnier@iro.umontreal.ca>
12539
48def666
SM
12540 * lread.c: Remove `read_pure' which makes no difference.
12541 (read_pure): Remove var.
12542 (unreadpure): Remove function.
12543 (readevalloop): Don't call read_list with -1 flag.
12544 (read1, read_vector): Don't test read_pure any more.
12545 (read_list): Simplify.
12546
e8d32c7e
SM
12547 * fileio.c, character.h: Minor style tweaks.
12548
4b2addb7
DA
125492012-05-24 Dmitry Antipov <dmantipov@yandex.ru>
12550
12551 * window.h (clip_changed): Remove useless declaration.
12552
584461b2
JB
125532012-05-22 Juanma Barranquero <lekktu@gmail.com>
12554
12555 * makefile.w32-in: Follow-up to 2012-05-22T16:20:27Z!eggert@cs.ucla.edu.
12556 (TAGS, TAGS-gmake, CONFIG_H): Remove further references to m/intel386.h.
12557
34374650
PE
125582012-05-22 Paul Eggert <eggert@cs.ucla.edu>
12559
12560 Remove src/m/*.
12561 This directory predates autoconf and is no longer needed nowadays.
12562 Move its few remaining bits of functionality to where they're needed.
12563 * m/README, m/alpha.h, m/amdx86-64.h, m/ia64.h, m/ibmrs6000.h:
12564 * m/ibms390x.h, m/intel386.h, m/m68k.h, m/macppc.h, m/sparc.h:
12565 * m/template.h: Remove.
12566 * Makefile.in (M_FILE): Remove. All uses removed.
12567 * alloc.c (POINTERS_MIGHT_HIDE_IN_OBJECTS):
12568 * lisp.h (USE_LSB_TAG):
12569 * mem-limits.h (EXCEEDS_LISP_PTR):
12570 Use VAL_MAX, not VALBITS, in #if.
12571 * lisp.h (EMACS_INT_MAX): New macro, useful in #if.
12572 (EMACS_UINT): Define unconditionally now.
12573 (BITS_PER_CHAR, BITS_PER_SHORT, BITS_PER_INT, BITS_PER_LONG)
12574 (BITS_PER_EMACS_INT): New constants, replacing
12575 what used to be in config.h, but not useful in #if.
12576 (GCTYPEBITS, VALBITS): Define unconditionally, since m/* files don't
12577 define them any more.
12578 (VAL_MAX): New macro.
12579 (VALMASK): Use it.
12580 * puresize.h (PURESIZE_RATIO): Use EMACS_INT_MAX, not
12581 BITS_PER_EMACS_INT, in #if.
12582 * s/aix4-2.h (BROKEN_FIONREAD, BROKEN_SIGAIO, BROKEN_SIGPTY)
12583 (BROKEN_SIGPOLL): Move here from m/ibmrs6000.h, which was removed.
12584 * s/gnu-linux.h (ULIMIT_BREAK_VALUE) [__i386__]:
12585 * s/ms-w32.h (DATA_START):
12586 Move here from removed file m/intel386.h.
12587 * s/gnu.h (NLIST_STRUCT): Remove undef; 'configure' does this.
12588 * s/irix6-5.h (_LP64): Remove; lisp.h no longer needs this.
12589
261cb4bb
PE
125902012-05-21 Paul Eggert <eggert@cs.ucla.edu>
12591
12592 Assume C89 or later.
12593 * alloc.c, buffer.c, lisp.h: Replace POINTER_TYPE with void.
12594 * alloc.c (overrun_check_malloc, overrun_check_realloc, xmalloc)
12595 (xrealloc):
12596 * buffer.c (mmap_free_1, mmap_enlarge): Omit needless casts.
12597 * editfns.c, fns.c, gmalloc.c, insdel.c, sysdep.c, termcap.c (NULL):
12598 * textprop.c, tparam.c (NULL): Remove.
12599 * ralloc.c, vm-limit.c (POINTER): Assume void * works.
12600 * regex.c (SIGN_EXTEND_CHAR): Assume signed char works.
12601 * regex.h (_RE_ARGS): Remove. All uses rewritten to use prototypes.
12602 * unexelf.c (ElfBitsW): Assume c89 preprocessor or better.
12603 * xterm.c (input_signal_count): Assume volatile works.
12604
ff23cd9f
KB
126052012-05-21 Ken Brown <kbrown@cornell.edu>
12606
12607 * xgselect.c (xg_select): Fix first argument in call to 'select'
12608 (bug#11508).
12609
1b170bc6
KB
126102012-05-20 Ken Brown <kbrown@cornell.edu>
12611
12612 * gmalloc.c (_free_internal_nolock, _realloc_internal_nolock)
bd7239f5 12613 [CYGWIN]: Cast ptr to (char *) before comparing to _heapbase.
1b170bc6 12614
b2f4d39f
KB
126152012-05-19 Ken Brown <kbrown@cornell.edu>
12616
12617 * xfns.c (x_in_use): Remove `static' qualifier.
12618 * xterm.h (x_in_use): Declare.
12619 * xgselect.c: Include xterm.h.
12620 (xg_select): Test `x_in_use' instead of `inhibit_window_system'
12621 and `display_arg' (bug#9754).
12622
003fdae2
PE
126232012-05-19 Paul Eggert <eggert@cs.ucla.edu>
12624
9232a6d9
PE
12625 * s/ms-w32.h (HAVE_GETDOMAINNAME): Remove; not needed.
12626
003fdae2
PE
12627 * m/vax.h: Remove; no longer needed since HAVE_FTIME is being removed.
12628 * s/ms-w32.h (HAVE_FTIME): Remove; not needed.
12629
784b56e2
EZ
126302012-05-18 Eli Zaretskii <eliz@gnu.org>
12631
12632 Fix compilation with -DGLYPH_DEBUG=1 on MS-Windows.
12633
12634 * w32term.c [GLYPH_DEBUG]: Add prototype for x_check_font.
090bd7cb 12635 (x_check_font) [GLYPH_DEBUG]: New function, copied from xterm.c.
784b56e2
EZ
12636
12637 * w32fns.c (unwind_create_frame) [GLYPH_DEBUG]: Fix broken
12638 reference to image_cache->refcount.
12639 (x_create_tip_frame): Fix broken use of FRAME_IMAGE_CACHE.
12640
a0a79cde
JL
126412012-05-17 Juri Linkov <juri@jurta.org>
12642
12643 * search.c (Fword_search_regexp, Fword_search_backward)
12644 (Fword_search_forward, Fword_search_backward_lax)
12645 (Fword_search_forward_lax): Move functions to isearch.el
12646 (bug#10145, bug#11381).
12647
b0572523
PE
126482012-05-16 Paul Eggert <eggert@cs.ucla.edu>
12649
12650 * xgselect.c (xg_select): Just invoke 'select' if -nw (Bug#9754).
12651
9660f5fc
SM
126522012-05-15 Stefan Monnier <monnier@iro.umontreal.ca>
12653
12654 * lread.c (init_obarray): Declare Qt and Qnil as special.
12655
4374de83
GM
126562012-05-14 Glenn Morris <rgm@gnu.org>
12657
12658 * nsterm.m (ns_init_paths): Fix typo ("libexec" not "lib-exec").
985584ae 12659 Put "libexec" before "bin", for the sake of init_callproc_1.
4374de83 12660
dc44c39a
PE
126612012-05-14 Paul Eggert <eggert@cs.ucla.edu>
12662
078c97cb
PE
12663 * keyboard.c (kbd_buffer_get_event) [!HAVE_DBUS]: Omit unused local.
12664
dc44c39a
PE
12665 * unexaix.c: Port to more-recent AIX compilers.
12666 (report_error, report_error_1, make_hdr, copy_sym)
12667 (mark_x, adjust_lnnoptrs, unrelocate_symbols):
12668 Make arguments const char *, not char *, to avoid violations of C
12669 standard and to fix some AIX warnings reported by Gilles Pion.
12670
e18afed7 126712012-05-14 Eli Zaretskii <eliz@gnu.org>
ac268e67
EZ
12672
12673 * xdisp.c (handle_stop): Don't call get_overlay_strings_1 if we
12674 already have overlays loaded.
12675 (handle_single_display_spec): Before returning without displaying
12676 fringe bitmap, synchronize the bidi iterator with the main display
12677 iterator, by calling iterate_out_of_display_property.
12678 (iterate_out_of_display_property): Detect buffer iteration by
12679 testing that it->string is a Lisp string.
12680 (get_next_display_element): When the current object is exhausted,
12681 and there's something on it->stack, call set_iterator_to_next to
12682 proceed with what's on the stack, instead of returning zero.
12683 (set_iterator_to_next): If called at the end of a Lisp string,
12684 proceed to consider_string_end without incrementing string
12685 position. Don't increment display vector index past the end of
12686 the display vector. (Bug#11417)
c8fb9dc6
EZ
12687 (pos_visible_p): Don't report a position visible when move_it_to
12688 stopped at the last line of window, which happens to be scanned
12689 backwards by the bidi iteration. (Bug#11464)
ac268e67 12690
e18afed7 126912012-05-14 Eli Zaretskii <eliz@gnu.org>
82f9b393
EZ
12692
12693 * xdisp.c (handle_single_display_spec): Return 1 for left-margin
12694 and right-margin display specs even if the spec is invalid or we
61b108cc
SM
12695 are on a TTY, and thus unable to display on the fringes.
12696 That's because the text with the property will not be displayed anyway,
82f9b393
EZ
12697 so we need to signal to the caller that this is a "replacing"
12698 display spec. This fixes display when the spec is invalid or we
12699 are on a TTY.
12700
e18afed7 127012012-05-14 Paul Eggert <eggert@cs.ucla.edu>
297834cd
PE
12702
12703 * unexaix.c (make_hdr): Fix typo in prototype.
12704 This bug broke the build on AIX. Problem reported by Gilles Pion.
12705
9d0a235a
MA
127062012-05-14 Michael Albinus <michael.albinus@gmx.de>
12707
12708 * keyboard.c (kbd_buffer_get_event): Read special events also in
12709 batch mode. (Bug#11415)
12710
9e6b06ed
GM
127112012-05-12 Glenn Morris <rgm@gnu.org>
12712
12713 * ns.mk: Update for ns_appbindir no longer having trailing "/".
12714
c1a1d7a3
EZ
127152012-05-12 Eli Zaretskii <eliz@gnu.org>
12716
12717 * lisp.mk (lisp): Add newcomment.elc.
12718
3fe7cdc8
GM
127192012-05-12 Glenn Morris <rgm@gnu.org>
12720
12721 * Makefile.in (MKDIR_P): New, set by configure.
12722 * ns.mk (${ns_appdir}, ${ns_appbindir}Emacs): Use $MKDIR_P.
12723
53f7d2c0
PE
127242012-05-11 Paul Eggert <eggert@cs.ucla.edu>
12725
12726 Remove unused function hourglass_started.
12727 * dispextern.h (hourglass_started):
12728 * w32fns.c (hourglass_started):
12729 * xdisp.c (hourglass_started): Remove.
12730
75aafb17
JB
127312012-05-10 Juanma Barranquero <lekktu@gmail.com>
12732
12733 * makefile.w32-in ($(BLD)/gmalloc.$(O), $(BLD)/w32menu.$(O)):
12734 Update dependencies.
12735
12959e8e
PE
127362012-05-10 Paul Eggert <eggert@cs.ucla.edu>
12737
97107e2e
PE
12738 * xgselect.c (xg_select): Put maxfds+1 into a var.
12739 This is slightly clearer, and pacifies Ubuntu 12.04 gcc.
12740
12959e8e
PE
12741 * sound.c (DEFAULT_ALSA_SOUND_DEVICE): Define only if HAVE_ALSA.
12742
836d29b3
DA
127432012-05-10 Dave Abrahams <dave@boostpro.com>
12744
12745 * filelock.c (syms_of_filelock): New boolean create-lockfiles.
12746 (lock_file): If create_lockfiles is 0, do nothing. (Bug#11227)
12747
5cb67954
MA
127482012-05-09 Michael Albinus <michael.albinus@gmx.de>
12749
12750 * dbusbind.c (xd_registered_buses): New internal Lisp object.
cccaebd2 12751 Rename all occurrences of Vdbus_registered_buses to xd_registered_buses.
5cb67954
MA
12752 (syms_of_dbusbind): Remove declaration of Vdbus_registered_buses.
12753 Initialize xd_registered_buses.
12754
3478ec45
PE
127552012-05-09 Paul Eggert <eggert@cs.ucla.edu>
12756
b263a6b0
PE
12757 Untag more efficiently if USE_LSB_TAG.
12758 This is based on a proposal by YAMAMOTO Mitsuharu in
12759 <http://lists.gnu.org/archive/html/emacs-devel/2008-01/msg01876.html>.
12760 For an admittedly artificial (nth 8000 longlist) benchmark on
12761 Fedora 15 x86-64, this yields a 25% CPU speedup. Also, it shrinks
12762 Emacs's overall text size by 1%.
12763 * lisp.h (XUNTAG): New macro.
12764 (XCONS, XVECTOR, XSTRING, XSYMBOL, XFLOAT, XMISC, XPROCESS, XWINDOW)
12765 (XTERMINAL, XSUBR, XBUFFER, XCHAR_TABLE, XSUB_CHAR_TABLE, XBOOL_VECTOR)
12766 (XSETTYPED_PSEUDOVECTOR, XHASH_TABLE, TYPED_PSEUDOVECTORP): Use it.
12767 * eval.c (Fautoload):
12768 * font.h (XFONT_SPEC, XFONT_ENTITY, XFONT_OBJECT):
12769 * frame.h (XFRAME): Use XUNTAG.
12770
3478ec45
PE
12771 Port recent dbusbind.c changes to 32-bit --with-wide-int.
12772 * dbusbind.c (xd_append_arg, xd_retrieve_arg, Fdbus_message_internal):
12773 Remove unportable assumptions about print widths of types like
12774 dbus_uint32_t.
12775 (xd_get_connection_address, Fdbus_init_bus): Cast Emacs integer to
12776 intptr_t when converting between pointer and integer, to avoid GCC
12777 warnings about wrong width.
12778
666b903b 127792012-05-09 Eli Zaretskii <eliz@gnu.org>
0d887c7d
EZ
12780
12781 * w32proc.c (new_child): Force Windows to reserve only 64KB of
12782 stack for each reader_thread, instead of defaulting to 8MB
12783 determined by the linker. This avoids failures in creating
12784 subprocesses on Windows 7, see the discussion in this thread:
12785 http://lists.gnu.org/archive/html/emacs-devel/2012-03/msg00119.html.
12786
b120cc17
JC
127872012-05-07 Jérémy Compostella <jeremy.compostella@gmail.com>
12788
12789 Fix up display of the *Minibuf-0* buffer in the mini window.
12790 * keyboard.c (read_char): Don't clear the echo area if there's no
12791 message to clear.
12792 * xdisp.c (redisplay_internal): Redisplay the mini window (with the
2fed2689 12793 contents of *Minibuf-0*) if there's no message displayed in its stead.
b120cc17 12794
9a4b36f8
MA
127952012-05-07 Michael Albinus <michael.albinus@gmx.de>
12796
12797 * dbusbind.c (XD_DEBUG_MESSAGE): Don't print message twice in
12798 batch mode.
12799
e5f9458f
CY
128002012-05-06 Chong Yidong <cyd@gnu.org>
12801
12802 * lisp.mk (lisp): Update.
12803
eceeb5fc 128042012-05-05 Jim Meyering <meyering@redhat.com>
bf98199c
JM
12805
12806 * w32font.c (fill_in_logfont): NUL-terminate a string (Bug#11372).
12807
71873e2b
SM
128082012-05-04 Stefan Monnier <monnier@iro.umontreal.ca>
12809
12810 * data.c (PUT_ERROR): New macro.
12811 (syms_of_data): Use it. Add new error type `user-error'.
12812 * undo.c (user_error): New function.
12813 (Fprimitive_undo): Use it.
12814 * print.c (print_error_message): Adjust print style for `user-error'.
12815 * keyboard.c (user_error): New function.
12816 (Fexit_recursive_edit, Fabort_recursive_edit): Use it.
12817
ab0fa4e4
PE
128182012-05-03 Paul Eggert <eggert@cs.ucla.edu>
12819
12820 Do not limit current-time-string to years 1000..9999.
12821 * editfns.c (TM_YEAR_IN_ASCTIME_RANGE): Remove.
12822 (Fcurrent_time_string): Support any year that is supported by the
12823 underlying localtime representation. Don't use asctime, as it
12824 has undefined behavior for years outside the range -999..9999.
12825
7ed806a7
PE
128262012-05-02 Paul Eggert <eggert@cs.ucla.edu>
12827
12828 Fix race conditions involving setenv, gmtime, localtime, asctime.
12829 Without this fix, interrupts could mess up code that uses these
12830 nonreentrant functions, since setting TZ invalidates existing
12831 tm_zone or tzname values, and since most of these functions return
12832 pointers to static storage.
12833 * editfns.c (format_time_string, Fdecode_time, Fencode_time)
12834 (Fcurrent_time_string, Fcurrent_time_zone, Fset_time_zone_rule):
12835 Grow the critical sections to include not just invoking
12836 localtime/gmtime, but also accessing these functions' results
12837 including their tm_zone values if any, and any related TZ setting.
12838 (format_time_string): Last arg is now struct tm *, not struct tm **,
71873e2b
SM
12839 so that the struct tm is saved in the critical section.
12840 All callers changed. Simplify allocation of initial buffer, partly
7ed806a7
PE
12841 motivated by the fact that memory allocation needs to be outside
12842 the critical section.
12843
0c16dfed
DA
128442012-05-02 Dmitry Antipov <dmantipov@yandex.ru>
12845
12846 * intervals.c (adjust_intervals_for_insertion): Initialize `newi'
12847 with RESET_INTERVAL.
12848
12849 * buffer.c (Fget_buffer_create, Fmake_indirect_buffer):
12850 Remove duplicated buffer name initialization.
12851
3f83ace8
JM
128522012-05-02 Jim Meyering <jim@meyering.net>
12853
12854 * xterm.c (x_term_init): Use memcpy instead of strncpy (Bug#11373).
12855
c7b8541e
JM
12856 * xfns.c (x_window): Use xstrdup (Bug#11375).
12857
90207a15 128582012-05-02 Eli Zaretskii <eliz@gnu.org>
2fa85638
EZ
12859
12860 * xdisp.c (pos_visible_p): If already at a newline from the
12861 display string before the 'while' loop, don't walk back the glyphs
12862 from it3.glyph_row. Solves assertion violation when the display
12863 string begins with a newline (egg.el). (Bug#11367)
12864
b593d6a9
AH
128652012-05-01 Stefan Monnier <monnier@iro.umontreal.ca>
12866
12867 * keyboard.c (Fexecute_extended_command, Vsuggest_key_bindings):
12868 Move to simple.el.
12869
4737362e
GM
128702012-05-01 Glenn Morris <rgm@gnu.org>
12871
99cf43f9
GM
12872 * syssignal.h: Remove reference to BROKEN_SIGINFO (last used in
12873 s/ptx4.h), BROKEN_SIGTSTP (last used in m/ustation.h, m/dpx2.h),
12874 and BROKEN_SIGURG (was in s/gnu-linux.h prior to 2008-02-10).
12875 All were removed before 23.1.
12876
9311dcff
GM
12877 * dispnew.c: Remove HAVE_LIBNCURSES test;
12878 it is always true on relevant platforms.
12879
4d5c6349
GM
12880 * Makefile.in (LD_SWITCH_X_SITE_RPATH):
12881 Rename from LD_SWITCH_X_SITE_AUX_RPATH.
12882
4737362e
GM
12883 * Makefile.in (LD_SWITCH_X_SITE_AUX): Remove; no longer used.
12884
74dd3a6b
AS
128852012-04-30 Andreas Schwab <schwab@linux-m68k.org>
12886
12887 * .gdbinit (xpr): Remove checks for no longer existing misc types.
12888 (xintfwd, xboolfwd, xobjfwd, xbufobjfwd, xkbobjfwd, xbuflocal):
12889 Remove.
12890
13c379ee
PE
128912012-04-28 Paul Eggert <eggert@cs.ucla.edu>
12892
12893 Do not avoid creating empty evaporating overlays (Bug#9642).
12894 * buffer.c (Fmove_overlay): Revert the change of 2012-04-23.
12895 That is, do not delete an evaporating overlay if it becomes
12896 empty after its bounds are adjusted to fit within its buffer.
12897 This fix caused other problems, and I'm reverting it until we get
12898 to the bottom of them.
12899
a8e7d6d7 129002012-04-27 Chong Yidong <cyd@gnu.org>
9be2fd9b
CY
12901
12902 * xselect.c (x_convert_selection): Initialize a pointer (Bug#11315).
12903
a8e7d6d7 129042012-04-27 Eli Zaretskii <eliz@gnu.org>
f0ee99a0
EZ
12905
12906 * xdisp.c (pos_visible_p): If the window start position is beyond
12907 ZV, start the display from buffer beginning. Prevents assertion
12908 violation in init_iterator when the minibuffer window is scrolled
12909 via the scroll bar.
12910
12911 * window.c (window_scroll_pixel_based): Likewise.
12912
a8e7d6d7 129132012-04-27 Chong Yidong <cyd@gnu.org>
9ec7751f
CY
12914
12915 * keymap.c (where_is_internal): Doc fix (Bug#10872).
12916
a8e7d6d7 129172012-04-27 Glenn Morris <rgm@gnu.org>
24c51a09
GM
12918
12919 * fileio.c (Fcopy_file, Fset_file_selinux_context):
12920 Ignore ENOTSUP failures from setfilecon functions. (Bug#11245)
12921
a8e7d6d7 129222012-04-27 Eli Zaretskii <eliz@gnu.org>
73055685 12923
b593d6a9
AH
12924 * dispnew.c (swap_glyph_pointers, copy_row_except_pointers):
12925 Don't overrun array limits of glyph row's used[] array. (Bug#11288)
73055685 12926
1c6900d9
EZ
129272012-04-26 Eli Zaretskii <eliz@gnu.org>
12928
4c3fa1d9
EZ
12929 * xdisp.c (IT_DISPLAYING_WHITESPACE): In addition to the loaded
12930 display element, check also the underlying string or buffer
12931 character. (Bug#11341)
12932
1c6900d9
EZ
12933 * w32menu.c: Include w32heap.h.
12934 (add_menu_item): If the call to AppendMenuW (via
12935 unicode_append_menu) fails, disable Unicode menus only if we are
12936 running on Windows 9X/Me.
12937
42bf8205
AS
129382012-04-24 Andreas Schwab <schwab@linux-m68k.org>
12939
12940 * .gdbinit (xpr): Handle USE_2_TAGS_FOR_INTS.
12941 (xgetint): Add missing shift for LSB tags.
12942
b1bac16e
MR
129432012-04-24 Martin Rudalics <rudalics@gmx.at>
12944
12945 * keyboard.c (read_char): Don't wipe echo area for select window
12946 events: These might get delayed via `mouse-autoselect-window'
12947 (Bug#11304).
12948
d69621cc
JB
129492012-04-24 Juanma Barranquero <lekktu@gmail.com>
12950
12951 * gnutls.c (init_gnutls_functions): Protect against (unlikely)
12952 manipulation of :loaded-from data.
12953
02fd101b
JB
129542012-04-23 Juanma Barranquero <lekktu@gmail.com>
12955
12956 * gnutls.c (init_gnutls_functions): The value of :loaded-from is
12957 now a cons (bug#11311).
12958
888bec30
PE
129592012-04-23 Paul Eggert <eggert@cs.ucla.edu>
12960
89a438bd
PE
12961 Do not create empty overlays with the evaporate property (Bug#9642).
12962 * buffer.c (Fmove_overlay): Delete an evaporating overlay
12963 if it becomes empty after its bounds are adjusted to fit within
12964 its buffer. Without this fix, in a nonempty buffer (let ((o
12965 (make-overlay 1 2))) (overlay-put o 'evaporate t) (move-overlay o 0 1))
12966 yields an empty overlay that has the evaporate property, which is
12967 not supposed to happen.
12968
1068fe4d
PE
12969 Fix minor GTK3 problems found by static checking.
12970 * emacsgtkfixed.c (EMACS_TYPE_FIXED, EMACS_FIXED, EmacsFixed)
12971 (EmacsFixedPrivate, EmacsFixedClass, struct _EmacsFixed)
12972 (struct _EmacsFixedClass, emacs_fixed_get_type):
12973 Move decls here from emacsgtkfixed.h, since they needn't be public.
12974 (emacs_fixed_get_type): Now static.
12975 (emacs_fixed_class_init): Omit unused local.
12976 (emacs_fixed_child_type): Remove; unused.
12977 * emacsgtkfixed.h (EMACS_TYPE_FIXED, EMACS_FIXED, EmacsFixed)
12978 (EmacsFixedPrivate, EmacsFixedClass, struct _EmacsFixed)
12979 (struct _EmacsFixedClass): Move to emacsgtkfixed.c.
12980 (EMACS_FIXED_CLASS, EMACS_IS_FIXED, EMACS_IS_FIXED_CLASS)
12981 (EMACS_FIXED_GET_CLASS): Remove; unused.
12982 * gtkutil.c (xg_create_frame_widgets) [!HAVE_GTK3]: Omit unused local.
12983
888bec30
PE
12984 * keyboard.c (handle_async_input): Define only if SYNC_INPUT || SIGIO.
12985 Problem reported by Juanma Barranquero for Windows -Wunused-function.
12986
de85e130
PE
129872012-04-22 Paul Eggert <eggert@cs.ucla.edu>
12988
d0baac98 12989 Modernize and clean up gmalloc.c to assume C89 (Bug#9119).
bd7239f5 12990 * gmalloc.c (_MALLOC_INTERNAL, _MALLOC_H, _PP, __ptr_t)
d0baac98
PE
12991 (__malloc_size_t, __malloc_ptrdiff_t):
12992 Remove. All uses removed, replaced by the definiens if needed,
12993 since we can assume C89 or better now.
12994 Include <stdint.h>, for PTRDIFF_MAX, uintptr_t.
12995 (protect_malloc_state, align, get_contiguous_space)
12996 (malloc_atfork_handler_prepare, malloc_atfork_handler_parent)
12997 (malloc_atfork_handler_child, malloc_enable_thread)
12998 (malloc_initialize_1, __malloc_initialize, morecore_nolock)
12999 (_malloc_internal_nolock, _malloc_internal, malloc, _malloc)
13000 (_free, _realloc, _free_internal_nolock, _free_internal, free, cfree)
13001 (special_realloc, _realloc_internal_nolock, _realloc_internal)
13002 (realloc, calloc, __default_morecore, memalign, valloc, checkhdr)
13003 (freehook, mallochook, reallochook, mabort, mcheck, mprobe):
13004 Define using prototypes, not old style.
13005 (align, _malloc_internal_nolock, _free_internal_nolock, memalign):
13006 Don't assume ptrdiff_t and uintptr_t are no wider than unsigned long.
13007 (align): Don't assume that signed integer overflow wraps around.
13008 Omit unused local var.
13009 (malloc_initialize_1, morecore_nolock, _malloc_internal_nolock)
13010 (_free_internal_nolock, memalign, mallochook, reallochook):
13011 Omit no-longer-needed casts.
13012 (valloc): Use getpagesize, not __getpagesize.
13013 (MAGICWORD, MAGICFREE): Now randomish size_t values, not 32-bit.
13014 (struct hdr): The 'magic' member is now size_t, not unsigned long.
13015
de85e130
PE
13016 * dbusbind.c (XD_DBUS_VALIDATE_OBJECT): Define only if needed.
13017
dcbf5805
MA
130182012-04-22 Michael Albinus <michael.albinus@gmx.de>
13019
13020 Move functions from C to Lisp. Make non-blocking method calls
13021 the default. Implement further D-Bus standard interfaces.
13022
13023 * dbusbind.c (DBUS_NUM_MESSAGE_TYPES): Declare.
13024 (QCdbus_request_name_allow_replacement)
13025 (QCdbus_request_name_replace_existing)
13026 (QCdbus_request_name_do_not_queue)
13027 (QCdbus_request_name_reply_primary_owner)
13028 (QCdbus_request_name_reply_in_queue)
13029 (QCdbus_request_name_reply_exists)
13030 (QCdbus_request_name_reply_already_owner): Move to dbus.el.
13031 (QCdbus_registered_serial, QCdbus_registered_method)
13032 (QCdbus_registered_signal): New Lisp objects.
13033 (XD_DEBUG_MESSAGE): Use sizeof.
13034 (XD_MESSAGE_TYPE_TO_STRING, XD_OBJECT_TO_STRING)
13035 (XD_DBUS_VALIDATE_BUS_ADDRESS, XD_DBUS_VALIDATE_OBJECT)
13036 (XD_DBUS_VALIDATE_BUS_NAME, XD_DBUS_VALIDATE_PATH)
13037 (XD_DBUS_VALIDATE_INTERFACE, XD_DBUS_VALIDATE_MEMBER): New macros.
13038 (XD_CHECK_DBUS_SERIAL): Rename from CHECK_DBUS_SERIAL_GET_SERIAL.
13039 (xd_signature, xd_append_arg): Allow float for integer types.
13040 (xd_get_connection_references): New function.
b593d6a9
AH
13041 (xd_get_connection_address): Rename from xd_initialize.
13042 Return cached address.
dcbf5805
MA
13043 (xd_remove_watch): Do not unset $DBUS_SESSION_BUS_ADDRESS.
13044 (xd_close_bus): Rename from Fdbus_close_bus. Not needed on Lisp
13045 level.
13046 (Fdbus_init_bus): New optional arg PRIVATE. Cache address.
9a4b36f8 13047 Return number of refcounts.
dcbf5805
MA
13048 (Fdbus_get_unique_name): Make stronger parameter check.
13049 (Fdbus_message_internal): New defun.
13050 (Fdbus_call_method, Fdbus_call_method_asynchronously)
13051 (Fdbus_method_return_internal, Fdbus_method_error_internal)
13052 (Fdbus_send_signal, Fdbus_register_service)
13053 (Fdbus_register_signal, Fdbus_register_method): Move to dbus.el.
13054 (xd_read_message_1): Obey new structure of Vdbus_registered_objects.
13055 (xd_read_queued_messages): Obey new structure of Vdbus_registered_buses.
13056 (Vdbus_compiled_version, Vdbus_runtime_version)
13057 (Vdbus_message_type_invalid, Vdbus_message_type_method_call)
13058 (Vdbus_message_type_method_return, Vdbus_message_type_error)
13059 (Vdbus_message_type_signal): New defvars.
b593d6a9
AH
13060 (Vdbus_registered_buses, Vdbus_registered_objects_table):
13061 Adapt docstring.
dcbf5805 13062
52828e02
PE
130632012-04-22 Paul Eggert <eggert@cs.ucla.edu>
13064
da05bc4c
PE
13065 Fix GC_MALLOC_CHECK debugging output on 64-bit hosts.
13066 * alloc.c (emacs_blocked_malloc) [GC_MALLOC_CHECK]:
13067 Do not assume ptrdiff_t is the same width as 'int'.
13068
52828e02
PE
13069 * alloc.c: Handle unusual debugging option combinations.
13070 (GC_CHECK_MARKED_OBJECTS): Undef if ! GC_MARK_STACK,
13071 since the two debugging options are incompatible.
13072 (GC_MALLOC_CHECK): Similarly, undef if GC_CHECK_MARKED_OBJECTS
13073 is defined.
13074 (mem_init, mem_insert, mem_insert_fixup):
13075 Define if GC_MARK_STACK || GC_MALLOC_CHECK.
13076 (NEED_MEM_INSERT): Remove; no longer needed.
13077
f01769f9
LL
130782012-04-22 Leo Liu <sdl.web@gmail.com>
13079
13080 * sysdep.c (list_system_processes): Support Darwin (Bug#5725).
13081
5790543d
PE
130822012-04-22 Paul Eggert <eggert@cs.ucla.edu>
13083
13084 * sysdep.c [__FreeBSD__]: Minor cleanups.
13085 (list_system_processes, system_process_attributes) [__FreeBSD__]:
13086 Use Emacs indenting style more consistently. Avoid some casts.
13087 Use 'double' consistently rather than mixing 'float' and 'double'.
13088
b91b7e4d
EW
130892012-04-21 Eduard Wiebe <usenet@pusto.de>
13090
b593d6a9
AH
13091 * sysdep.c (list_system_processes, system_process_attributes):
13092 Add implementation for FreeBSD (Bug#5243).
b91b7e4d 13093
6114eb15
AS
130942012-04-21 Andreas Schwab <schwab@linux-m68k.org>
13095
13096 * lisp.mk (lisp): Update.
13097
2f38dff7
PE
130982012-04-20 Paul Eggert <eggert@cs.ucla.edu>
13099
13100 * keyboard.c (process_pending_signals): Define only if SYNC_INPUT.
13101 It is never used otherwise.
13102
4ae29f89
SM
131032012-04-20 Stefan Monnier <monnier@iro.umontreal.ca>
13104
13105 * print.c (print_preprocess): Only check print_depth if print-circle
13106 is nil.
13107 (print_object): Check for cycles even when print-circle is nil and
13108 print-gensym is t, but only check print_depth if print-circle is nil.
13109
f30d612a
CY
131102012-04-20 Chong Yidong <cyd@gnu.org>
13111
13112 * process.c (wait_reading_process_output): If EIO occurs on a pty,
13113 set the status to "failed" and ensure that sentinel is run.
13114
c07a4c0b 131152012-04-20 Glenn Morris <rgm@gnu.org>
016a35df
GM
13116
13117 * process.c (Fset_process_inherit_coding_system_flag)
13118 (Fset_process_query_on_exit_flag): Doc fix (mention return value).
4373fd43 13119 (Fmake_network_process, Fmake_serial_process): Doc fix.
016a35df 13120
c07a4c0b 131212012-04-20 Eli Zaretskii <eliz@gnu.org>
20a68157
EZ
13122
13123 * xdisp.c (string_buffer_position_lim): Limit starting position to
13124 BEGV.
13125 (set_cursor_from_row): If called for a mode-line or header-line
13126 row, return zero immediately.
13127 (try_cursor_movement): If inside continuation line, don't back up
4ae29f89
SM
13128 farther than the first row after the header line, if any.
13129 Don't consider the header-line row as "partially visible", even if
20a68157
EZ
13130 MATRIX_ROW_PARTIALLY_VISIBLE_P returns non-zero. (Bug#11261)
13131
c07a4c0b 131322012-04-20 Atsuo Ohki <ohki@gssm.otsuka.tsukuba.ac.jp> (tiny change)
ad3a2b41 13133
4ae29f89
SM
13134 * lread.c (lisp_file_lexically_bound_p): Fix hang at ";-*-\n"
13135 (bug#11238).
ad3a2b41 13136
c07a4c0b 131372012-04-20 Teodor Zlatanov <tzz@lifelogs.com>
6c94c34f 131382012-04-18 Paul Eggert <eggert@cs.ucla.edu>
ae6e112d
PE
13139
13140 configure: new option --enable-gcc-warnings (Bug#11207)
13141 * Makefile.in (C_WARNINGS_SWITCH): Remove.
13142 (WARN_CFLAGS, WERROR_CFLAGS): New macros.
13143 (ALL_CFLAGS): Use new macros rather than old.
13144 * process.c: Ignore -Wstrict-overflow to work around GCC bug 52904.
13145 * regex.c: Ignore -Wstrict-overflow. If !emacs, also ignore
13146 -Wunused-but-set-variable, -Wunused-function, -Wunused-macros,
13147 -Wunused-result, -Wunused-variable. This should go away once
13148 the Emacs and Gnulib regex code is merged.
13149 (xmalloc, xrealloc): Now static.
13150
aba027e8
PE
131512012-04-17 Paul Eggert <eggert@cs.ucla.edu>
13152
13153 * dired.c (Fsystem_groups): Remove unused local.
13154
e5a36063
GM
131552012-04-17 Glenn Morris <rgm@gnu.org>
13156
13157 * dired.c (Fsystem_users): Doc fix.
13158
316411f0
DA
131592012-04-17 Dmitry Antipov <dmantipov@yandex.ru>
13160
13161 * dired.c (Fsystem_users, Fsystem_groups): New functions. (Bug#7900)
13162 (syms_of_dired): Add them.
13163
9426aba4
PE
131642012-04-16 Paul Eggert <eggert@cs.ucla.edu>
13165
b62a57be
PE
13166 Fix minor alloc.c problems found by static checking.
13167 * alloc.c (_malloc_internal, _free_internal) [!DOUG_LEA_MALLOC]:
13168 New extern decls, to avoid calling undeclared functions.
13169 (dont_register_blocks): Define if ((!SYSTEM_MALLOC && !SYNC_INPUT)
13170 && GC_MALLOC_CHECK), not if ((GC_MARK_STACK || defined
13171 GC_MALLOC_CHECK) && GC_MALLOC_CHECK), to match when it's used.
13172 (NEED_MEM_INSERT): New macro.
13173 (mem_insert, mem_insert_fixup) [!NEED_MEM_INSERT]: Remove; unused.
4b5afbb0 13174 Remove one incorrect comment and fix another.
b62a57be 13175
3539f31f
PE
13176 Fix minor ralloc.c problems found by static checking.
13177 See http://lists.gnu.org/archive/html/emacs-devel/2011-12/msg00720.html
13178 * ralloc.c (ALIGNED, ROUND_TO_PAGE, HEAP_PTR_SIZE)
13179 (r_alloc_size_in_use, r_alloc_freeze, r_alloc_thaw): Remove; unused.
13180 (r_alloc_sbrk): Now static.
13181
a041960a
PE
13182 Improve ralloc.c interface checking.
13183 See http://lists.gnu.org/archive/html/emacs-devel/2011-12/msg00720.html
13184 * buffer.c (ralloc_reset_variable, r_alloc, r_re_alloc)
13185 (r_alloc_free) [REL_ALLOC]: Move decls from here ...
13186 * lisp.h (r_alloc, r_alloc_free, r_re_alloc, r_alloc_reset_variable)
13187 [REL_ALLOC]: ... to here, to check interface.
13188 * m/ia64.h (r_alloc, r_alloc_free) [REL_ALLOC && !_MALLOC_INTERNAL]:
13189 Remove decls. This fixes an "It stinks!".
13190
9426aba4
PE
13191 * alloc.c (which_symbols): Fix alignment issue / type clash.
13192
d55c12ed
AS
131932012-04-15 Andreas Schwab <schwab@linux-m68k.org>
13194
13195 * lisp.h (struct Lisp_Symbol): Remove explicit padding.
13196 (struct Lisp_Misc_Any): Likewise.
13197 (struct Lisp_Free): Likewise.
13198 * alloc.c (union aligned_Lisp_Symbol): Define.
13199 (SYMBOL_BLOCK_SIZE, struct symbol_block): Use union
13200 aligned_Lisp_Symbol instead of struct Lisp_Symbol.
13201 (union aligned_Lisp_Misc): Define.
13202 (MARKER_BLOCK_SIZE, struct marker_block): Use union
13203 aligned_Lisp_Misc instead of union Lisp_Misc.
4ae29f89 13204 (Fmake_symbol, allocate_misc, gc_sweep): Adjust.
d55c12ed 13205
b948ce8b
PE
132062012-04-14 Paul Eggert <eggert@cs.ucla.edu>
13207
13208 Make GC_MAKE_GCPROS_NOOPS the default (Bug#9926).
13209 * lisp.h (GC_MARK_STACK): Default to GC_MAKE_GCPROS_NOOPS.
13210 * s/cygwin.h, s/darwin.h, s/freebsd.h, s/gnu.h, s/irix6-5.h, s/msdos.h:
13211 * s/netbsd.h, s/sol2-6.h:
13212 Remove definition of GC_MARK_STACK, since the default now works.
13213 * s/aix4-2.h, s/hpux10-20.h, s/unixware.h:
13214 Define GC_MARK_STACK to GC_USE_GCPROS_AS_BEFORE, since that's
13215 no longer the default.
13216 * s/gnu-linux.h (GC_MARK_STACK): Adjust to change in default.
13217
35dc09a1 132182012-04-14 Atsuo Ohki <ohki@gssm.otsuka.tsukuba.ac.jp> (tiny change)
ad3a2b41 13219
35dc09a1
GM
13220 * lread.c (lisp_file_lexically_bound_p):
13221 Fix hang at ";-*-\n" (bug#11238).
ad3a2b41 13222
35dc09a1
GM
132232012-04-14 Eli Zaretskii <eliz@gnu.org>
13224
13225 * xdisp.c (find_last_unchanged_at_beg_row): Don't consider a row
13226 "unchanged" if its end.pos is beyond ZV. (Bug#11199)
13227
132282012-04-14 Jan Djärv <jan.h.d@swipnet.se>
13229
13230 * nsterm.m (constrainFrameRect): Always constrain when there is only
13231 one screen (Bug#10962).
13232
bcd86815
KB
132332012-04-13 Ken Brown <kbrown@cornell.edu>
13234
13235 * s/cygwin.h (PTY_OPEN): Don't try to close a bogus file descriptor.
13236
c25df26e
RT
132372012-04-13 Reuben Thomas <rrt@sc3d.org>
13238
13239 * indent.c (Fmove_to_column): Change interactive spec (Bug#739).
13240
0fc59f1e
DC
132412012-04-11 Daniel Colascione <dancol@dancol.org>
13242
13243 * s/cygwin.h: The vfork the #define in cygwin.h was protecting
13244 against is gone. It's better to use vfork now so that when Cygwin
13245 gains a new, working vfork, we use it automatically (bug#10398).
13246
de8c03dc
SM
132472012-04-11 Stefan Monnier <monnier@iro.umontreal.ca>
13248
13249 * window.c (save_window_save): Obey window-point-insertion-type.
13250
2f097256
GM
132512012-04-11 Glenn Morris <rgm@gnu.org>
13252
13253 * Makefile.in (GNUSTEP_CFLAGS): Rename from C_SWITCH_X_SYSTEM.
13254
453b951e
SM
132552012-04-11 Stefan Monnier <monnier@iro.umontreal.ca>
13256
13257 * alloc.c (lisp_align_malloc): Remove unneeded prototype.
13258
75f1671a 132592012-04-10 Jason S. Cornez <jcornez@ravenpack.com> (tiny change)
6bbef4e5
JC
13260
13261 * keyboard.c: Override inhibit-quit after the third C-g (bug#6585).
13262 (force_quit_count): New var.
13263 (handle_interrupt): Use it.
13264
2a8ce227
JB
132652012-04-10 Juanma Barranquero <lekktu@gmail.com>
13266
13267 * w32.c (w32_delayed_load): Record the full path of the library
13268 being loaded (bug#10424).
13269
935396c0
GM
132702012-04-09 Glenn Morris <rgm@gnu.org>
13271
05920a43
GM
13272 * doc.c (Fsnarf_documentation): Check variables, functions are bound,
13273 not just in the obarray, before snarfing them. (Bug#11036)
13274
935396c0
GM
13275 * Makefile.in ($(leimdir)/leim-list.el):
13276 Pass EMACS rather than BUILT_EMACS.
13277
a18ecafa
TZ
132782012-04-09 Teodor Zlatanov <tzz@lifelogs.com>
13279
13280 * process.c (make_process):
13281 * process.h: Add integer `gnutls_handshakes_tried' member to
13282 process struct.
13283
6bbef4e5
JC
13284 * gnutls.h: Add `GNUTLS_EMACS_HANDSHAKES_LIMIT' upper limit.
13285 Add convenience `GNUTLS_LOG2i' macro.
a18ecafa
TZ
13286
13287 * gnutls.c (gnutls_log_function2i): Convenience log function.
13288 (emacs_gnutls_read): Use new log functions,
13289 `gnutls_handshakes_tried' process member, and
13290 `GNUTLS_EMACS_HANDSHAKES_LIMIT' to limit the number of handshake
13291 attempts per process (connection).
13292
b4d3bc10
CY
132932012-04-09 Chong Yidong <cyd@gnu.org>
13294
13295 * eval.c (Fuser_variable_p, user_variable_p_eh)
13296 (lisp_indirect_variable): Functions deleted.
13297 (Fdefvar): Caller changed.
13298
13299 * callint.c (Finteractive, Fcall_interactively):
13300 * minibuf.c (Fread_variable): Callers changed.
13301
70f4d973
EZ
133022012-04-09 Eli Zaretskii <eliz@gnu.org>
13303
13304 * xdisp.c (set_cursor_from_row): If the display string appears in
13305 the buffer at position that is closer to point than the position
13306 after the display string, display the cursor on the first glyph of
13307 the display string. Fixes cursor display when a 'display' text
13308 property immediately follows invisible text. (Bug#11094)
13309
cb3c2e3e
PE
133102012-04-09 Paul Eggert <eggert@cs.ucla.edu>
13311
13312 composite.c: use 'double' consistently
13313 * composite.c (get_composition_id): Use 'double' consistently
13314 instead of converting 'float' to 'double' and vice versa; this is
13315 easier to understand and avoids a GCC warning.
13316
fd06db5d
GM
133172012-04-09 Glenn Morris <rgm@gnu.org>
13318
50fe702a
GM
13319 * Makefile.in: Generate leim-list with bootstrap-emacs, in
13320 preparation for dumping it with emacs. (Bug#4789)
13321 (leimdir): New variable.
13322 ($(leimdir)/leim-list.el): New rule.
13323 (emacs$(EXEEXT)): Depend on leim-list.el.
13324
fd06db5d
GM
13325 * buffer.c (Qucs_set_table_for_input): Remove. (Bug#9821)
13326 (Fget_buffer_create): Don't call Qucs_set_table_for_input.
13327 (init_buffer_once, syms_of_buffer): Remove Qucs_set_table_for_input.
13328
55c131ee
AS
133292012-04-08 Andreas Schwab <schwab@linux-m68k.org>
13330
13331 * lisp.h (struct Lisp_Symbol): Add explicit padding to ensure
13332 proper alignment.
13333
9209588f
JB
133342012-04-07 Juanma Barranquero <lekktu@gmail.com>
13335
13336 * xml.c (init_libxml2_functions) [WINDOWSNT]:
13337 Remove unused local variable.
13338
e3fb2efb
PE
133392012-04-07 Paul Eggert <eggert@cs.ucla.edu>
13340
13341 Avoid unnecessary pointer scanning in garbage collection (Bug#10780).
13342 * alloc.c (POINTERS_MIGHT_HIDE_IN_OBJECTS): New macro.
13343 (mark_memory): Mark Lisp_Objects only if pointers might hide in
13344 objects, as mark_maybe_pointer will catch them otherwise.
13345 (GC_LISP_OBJECT_ALIGNMENT): Remove; no longer needed.
13346 * s/gnu-linux.h (GC_LISP_OBJECT_ALIGNMENT) [__mc68000__]: Likewise.
13347
b5385551
PE
133482012-04-07 Paul Eggert <eggert@cs.ucla.edu>
13349
13350 Fix typo that broke non-Windows builds.
13351 * xml.c (libxml2_loaded_p) [!!WINDOWSNT]: 'inine' -> 'inline'.
13352
9078ead6
EZ
133532012-04-07 Eli Zaretskii <eliz@gnu.org>
13354
13355 Support building on MS-Windows with libxml2.
13356
13357 * makefile.w32-in (OBJ2): Add xml.$(O).
13358 (GLOBAL_SOURCES): Add xml.c.
13359 ($(BLD)/xml.$(O)): New dependency list.
13360
13361 * xml.c (DEF_XML2_FN, LOAD_XML2_FN) [WINDOWSNT]: New macros.
13362 (fn_htmlReadMemory, fn_xmlReadMemory, fn_xmlDocGetRootElement)
13363 (fn_xmlFreeDoc, fn_xmlCleanupParser, fn_xmlCheckVersion)
13364 [!WINDOWSNT]: New macros.
13365 (init_libxml2_functions, libxml2_loaded_p): New functions.
13366 (parse_region): Call fn_xmlCheckVersion instead of using the macro
13367 LIBXML_TEST_VERSION. Call libxml2 functions via the fn_* macros.
13368 (xml_cleanup_parser): New function, export for fn_xmlCleanupParser.
13369 Calls xmlCleanupParser only if libxml2 was loaded (or statically
13370 linked in).
6bbef4e5
JC
13371 (Flibxml_parse_html_region, Flibxml_parse_xml_region):
13372 Call init_libxml2_functions before calling libxml2 functions.
9078ead6
EZ
13373 (syms_of_xml) <Qlibxml2_dll>: DEFSYM it.
13374
13375 * emacs.c: Don't include libxml/parser.h.
13376 (shut_down_emacs): Call xml_cleanup_parser, instead of calling
13377 xmlCleanupParser directly.
13378
13379 * lisp.h [HAVE_LIBXML2]: Add prototype for xml_cleanup_parser.
13380
3811fdf3
EZ
133812012-04-07 Eli Zaretskii <eliz@gnu.org>
13382
13383 * indent.c (Fvertical_motion): If there is a display string at
13384 point, use it.vpos to compute how many lines to backtrack after
13385 move_it_to point. (Bug#11133)
13386
2f8e16b2
EZ
133872012-04-06 Eli Zaretskii <eliz@gnu.org>
13388
13389 * buffer.h (FETCH_CHAR, FETCH_MULTIBYTE_CHAR):
13390 * character.h (STRING_CHAR, STRING_CHAR_AND_LENGTH): Add comments
13391 about subtle differences between FETCH_CHAR* and STRING_CHAR*
13392 macros related to unification of CJK characters. For the details,
13393 see the discussion following the message here:
13394 http://debbugs.gnu.org/cgi/bugreport.cgi?bug=11073#14.
13395
3d439cd1
CY
133962012-04-04 Chong Yidong <cyd@gnu.org>
13397
13398 * keyboard.c (Vdelayed_warnings_list): Doc fix.
13399
8bc53d00
EZ
134002012-04-01 Eli Zaretskii <eliz@gnu.org>
13401
13402 * w32menu.c (simple_dialog_show, add_menu_item): Use SAFE_ALLOCA
13403 instead of alloca. (Bug#11138)
13404
3b0512a3
AS
134052012-04-01 Andreas Schwab <schwab@linux-m68k.org>
13406
13407 * w32menu.c (is_simple_dialog): Properly check lisp types.
13408 (Bug#11141)
13409
8427ddd2
EZ
134102012-03-31 Eli Zaretskii <eliz@gnu.org>
13411
979022ef
EZ
13412 * xdisp.c (move_it_by_lines): When DVPOS is positive, and the
13413 position we get to after a call to move_it_to fails the
13414 IS_POS_VALID_AFTER_MOVE_P test, move to the next buffer position
13415 only if we wind up in a string from display property. (Bug#11063)
13416
a6b1c7cc
EZ
13417 * window.c (Fdelete_other_windows_internal): Invalidate the row
13418 and column information about mouse highlight, so that redisplay
13419 restores it after reallocating the glyph matrices. (Bug#7464)
13420
8427ddd2
EZ
13421 * xdisp.c (set_cursor_from_row): If `cursor' property on a display
13422 string comes from a `display' text property, use the buffer
13423 position of that property as if we actually saw that position in
13424 the row's glyphs.
697ba24b
EZ
13425 (move_it_by_lines): Remove the assertion that
13426 "it->current_x == 0 && it->hpos == 0" which can be legitimately
13427 violated when there's a before-string at the beginning of a line.
13428 (Bug#11063)
8427ddd2 13429
65a0a738
EZ
134302012-03-30 Eli Zaretskii <eliz@gnu.org>
13431
13432 * xdisp.c (append_space_for_newline): If the default face was
13433 remapped, use the remapped face for the appended newline.
13434 (extend_face_to_end_of_line): Use the remapped default face for
13435 extending the face to the end of the line.
13436 (display_line): Call extend_face_to_end_of_line when the default
13437 face was remapped. (Bug#11068)
13438
581355cc
EZ
134392012-03-29 Eli Zaretskii <eliz@gnu.org>
13440
13441 * s/ms-w32.h: Discourage from defining HAVE_GETCWD.
13442
e8fc049f
SM
134432012-03-28 Stefan Monnier <monnier@iro.umontreal.ca>
13444
13445 * keyboard.c (safe_run_hooks_error): Don't unquote strings.
13446
4fb9a543
GM
134472012-03-27 Glenn Morris <rgm@gnu.org>
13448
13449 * search.c (Fword_search_backward_lax, Fword_search_forward_lax):
13450 Doc fixes.
13451
679910f1
KH
134522012-03-26 Kenichi Handa <handa@m17n.org>
13453
13454 * dispextern.h (struct glyph): Fix previous change. Change the
13455 bit length of glyphless.ch to 25 (Bug#11082).
13456
90d49b7f
CY
134572012-03-26 Chong Yidong <cyd@gnu.org>
13458
13459 * keyboard.c (Vselection_inhibit_update_commands): New variable.
13460 (command_loop_1): Use it; inhibit selection update for
13461 handle-select-window too (Bug#8996).
13462
f514f6f0
FP
134632012-03-25 Fabrice Popineau <fabrice.popineau@supelec.fr>
13464
e8fc049f 13465 * w32heap.c (_heap_init, _heap_term): Remove dead MSVC-specific code.
f514f6f0 13466
bf43fa51
KH
134672012-03-25 Kenichi Handa <handa@m17n.org>
13468
13469 * dispextern.h (struct glyph): Change the bit length of
13470 glyphless.ch to 22 to make the member glyphless fit in 32 bits.
13471
8a0c01dd
EZ
134722012-03-24 Eli Zaretskii <eliz@gnu.org>
13473
13474 * s/ms-w32.h (tzname): Include time.h before redirecting to
13475 _tzname. Fixes the MSVC build. (Bug#9960)
13476
7d1c3a76
AS
134772012-03-24 Andreas Schwab <schwab@linux-m68k.org>
13478
8ed79523
AS
13479 * xdisp.c (produce_glyphless_glyph): Limit length of acronym to 6
13480 characters.
13481
7d1c3a76
AS
13482 * xterm.c (XTread_socket): Only modify handling_signal if
13483 !SYNC_INPUT. (Bug#11080)
13484
e99a9b8b
EZ
134852012-03-23 Eli Zaretskii <eliz@gnu.org>
13486
13487 * bidi.c (bidi_fetch_char): Use STRING_CHAR_AND_LENGTH instead of
13488 FETCH_MULTIBYTE_CHAR followed by CHAR_BYTES. Prevents crashes
13489 when fetching a multibyte character consumes more bytes than
13490 CHAR_BYTES returns, due to unification of CJK characters in
13491 string_char. (Bug#11073)
13492
5063c0e1
TN
134932012-03-23 Troels Nielsen <bn.troels@gmail.com> (tiny change)
13494
13495 * process.c (wait_reading_process_output): Handle pty disconnect
13496 by refraining from sending oneself a SIGCHLD (bug#10933).
13497
9f851fbd
CY
134982012-03-22 Chong Yidong <cyd@gnu.org>
13499
13500 * dispextern.h (struct it): New member string_from_prefix_prop_p.
13501
5063c0e1 13502 * xdisp.c (push_prefix_prop): Rename from push_display_prop.
9f851fbd
CY
13503 Mark string as coming from a prefix property.
13504 (handle_face_prop): Use default face for prefix strings (Bug#4281).
13505 (pop_it, reseat_1): Save and restore string_from_prefix_prop_p.
13506
fb5b8aca
CY
135072012-03-21 Chong Yidong <cyd@gnu.org>
13508
13509 * xfaces.c (Vface_remapping_alist): Doc fix.
13510
62356a1b
EZ
135112012-03-20 Eli Zaretskii <eliz@gnu.org>
13512
13513 * w32proc.c (Fw32_set_console_codepage)
5063c0e1
TN
13514 (Fw32_set_console_output_codepage, Fw32_get_codepage_charset):
13515 Doc fixes.
62356a1b 13516
025de85b
CY
135172012-03-20 Chong Yidong <cyd@gnu.org>
13518
13519 * dispnew.c (Fredisplay, Vredisplay_preemption_period): Update doc
13520 to reflect default non-nil value of redisplay-dont-pause.
13521
4827f94e
KH
135222012-03-19 Kenichi Handa <handa@m17n.org>
13523
13524 * ftfont.c (ftfont_drive_otf): Mask bits of character code to make
13525 it fit in a valid range (Bug#11003).
13526
e50a24a2
EZ
135272012-03-18 Eli Zaretskii <eliz@gnu.org>
13528
13529 * xdisp.c (cursor_row_p): Even if the glyph row ends in a string
13530 that is not from display property, accept the row as a "cursor
13531 row" if one of the string's character has a non-nil `cursor'
13532 property. Fixes cursor positioning when there are newlines in
13533 overlay strings, e.g. in icomplete.el. (Bug#11035)
13534
9af5ed87
PE
135352012-03-12 Paul Eggert <eggert@cs.ucla.edu>
13536
13537 * buffer.c (compare_overlays): Don't assume args differ (Bug#6830).
13538
d1f55f16
CY
135392012-03-12 Chong Yidong <cyd@gnu.org>
13540
13541 * eval.c (inhibit_lisp_code): Rename from
13542 inhibit_window_configuration_change_hook; move from window.c.
13543
13544 * xfns.c (unwind_create_frame_1, Fx_create_frame):
13545 * window.c (run_window_configuration_change_hook)
13546 (syms_of_window): Callers changed.
13547
66c5eebd
CY
135482012-03-11 Chong Yidong <cyd@gnu.org>
13549
413df973
CY
13550 * keymap.c (Fkey_description): Doc fix (Bug#9700).
13551
66c5eebd
CY
13552 * editfns.c (Fconstrain_to_field): Doc fix (Bug#9452).
13553
1de11f56
CY
135542012-03-10 Chong Yidong <cyd@gnu.org>
13555
13556 * frame.c (other_visible_frames): Don't assume the selected frame
13557 is visible (Bug#10955).
13558
cae07000
SM
135592012-03-09 Stefan Monnier <monnier@iro.umontreal.ca>
13560
13561 * buffer.c (compare_overlays): Avoid qsort's instability (bug#6830).
13562
89c94350
JD
135632012-03-08 Jan Djärv <jan.h.d@swipnet.se>
13564
13565 * gtkutil.c (x_wm_set_size_hint): Use one row in call to
13566 FRAME_TEXT_LINES_TO_PIXEL_HEIGHT so base_height is greater than
13567 zero (Bug#10954).
13568
999dd333
GM
135692012-03-03 Glenn Morris <rgm@gnu.org>
13570
01a6dcc8 13571 * alloc.c (Fgarbage_collect, misc-objects-consed): Doc fixes.
999dd333 13572
de0100f2
EZ
135732012-03-02 Eli Zaretskii <eliz@gnu.org>
13574
13575 * xdisp.c (try_window_reusing_current_matrix): Don't move cursor
13576 position past the first glyph_row that ends at ZV. (Bug#10902)
b8456c5c
EZ
13577 (redisplay_window, next_element_from_string): Fix typos in
13578 comments.
3e441275
EZ
13579 (redisplay_window): Pass to move_it_vertically the margin in
13580 pixels, not in screen lines.
de0100f2 13581
96a72ee9
GM
135822012-03-02 Glenn Morris <rgm@gnu.org>
13583
13584 * buffer.c (buffer-list-update-hook): Doc fix.
13585
312508d7
EZ
135862012-02-29 Eli Zaretskii <eliz@gnu.org>
13587
13588 * xdisp.c (get_overlay_strings_1): Under bidi redisplay, call
13589 push_it before setting up the iterator for the first overlay
13590 string, even if we have an empty string loaded.
13591 (next_overlay_string): If there's an empty string on the iterator
13592 stack, pop the stack. (Bug#10903)
13593
27f3c637
PE
135942012-02-25 Paul Eggert <eggert@cs.ucla.edu>
13595
13596 Generalize fix for crash due to non-contiguous EMACS_INT (Bug#10780).
13597 Suggested by Stefan Monnier in
13598 <http://lists.gnu.org/archive/html/emacs-devel/2012-02/msg00692.html>.
13599 * alloc.c (widen_to_Lisp_Object): New static function.
13600 (mark_memory): Also mark Lisp_Objects by fetching pointer words
13601 and widening them to Lisp_Objects. This would work even if
13602 USE_LSB_TAG is defined and wide integers are used, which might
13603 happen in a future version of Emacs.
13604
3c9dfce6
CY
136052012-02-25 Chong Yidong <cyd@gnu.org>
13606
fa74b241
CY
13607 * fileio.c (Ffile_selinux_context, Fset_file_selinux_context):
13608 Doc fix.
13609
3c9dfce6
CY
13610 * xselect.c (Fx_selection_exists_p): Doc fix.
13611 (x_clipboard_manager_save_all): Print an informative message
13612 before saving to clipboard manager.
13613
9486df08
CY
136142012-02-24 Chong Yidong <cyd@gnu.org>
13615
13616 * keyboard.c (process_special_events): Handle all X selection
13617 requests in kbd_buffer, not just the next one (Bug#8869).
13618
f01d3321
CY
136192012-02-23 Chong Yidong <cyd@gnu.org>
13620
13621 * xfns.c (Fx_create_frame): Avoid window-configuration-change-hook
13622 call when setting menu-bar-lines and tool-bar-lines parameters.
13623 (unwind_create_frame_1): New helper function.
13624
13625 * window.c (inhibit_window_configuration_change_hook): New var.
13626 (run_window_configuration_change_hook): Obey it.
b2e4ca7d 13627 (syms_of_window): Initialize it.
f01d3321 13628
86b847b6
CY
136292012-02-22 Chong Yidong <cyd@gnu.org>
13630
13631 * xterm.c (x_draw_image_relief): Add missing type check for
13632 Vtool_bar_button_margin (Bug#10743).
13633
a59225b1
CY
136342012-02-21 Chong Yidong <cyd@gnu.org>
13635
13636 * fileio.c (Vfile_name_handler_alist): Doc fix.
13637
13638 * buffer.c (Fget_file_buffer): Protect against invalid file
13639 handler return value.
13640
310f5bd4
PE
136412012-02-20 Paul Eggert <eggert@cs.ucla.edu>
13642
cb3a28cc
PE
13643 * .gdbinit (xreload): Don't assume EMACS_INT fits in 'long'
13644 when computing $valmask.
13645
310f5bd4
PE
13646 Fix crash due to non-contiguous EMACS_INT (Bug#10780).
13647 * lisp.h (VALBITS): Move definition up, so that USE_LSB_TAG can use it.
13648 (USE_LSB_TAG): Do not define if UINTPTR_MAX >> VALBITS == 0.
13649 It's useless in that case, and it can cause problems on hosts
13650 that allocate halves of EMACS_INT values separately.
13651 Reported by Dan Horák. Diagnosed by Andreas Schwab in
13652 <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=10780#30>.
13653 * mem-limits.h (EXCEEDS_LISP_PTR): Define to 0 on hosts where
13654 UINTPTR_MAX >> VALBITS == 0. This is required by the above change;
13655 it avoids undefined behavior on hosts where shifting right by more
13656 than the word width has undefined behavior.
13657
2375c96a
CY
136582012-02-19 Chong Yidong <cyd@gnu.org>
13659
13660 * fileio.c (Ffile_name_directory, Ffile_name_nondirectory)
13661 (Funhandled_file_name_directory, Ffile_name_as_directory)
13662 (Fdirectory_file_name, Fexpand_file_name)
13663 (Fsubstitute_in_file_name): Protect against invalid file handler
13664 return values (Bug#10845).
13665
3eb49e71
EZ
136662012-02-18 Eli Zaretskii <eliz@gnu.org>
13667
13668 * .gdbinit (pitx): Fix incorrect references to fields of the
13669 iterator stack.
13670
7b926f3f
CY
136712012-02-17 Chong Yidong <cyd@gnu.org>
13672
13673 * syntax.c (Fscan_lists): Doc fix (Bug#10833).
13674
11273115
PE
136752012-02-15 Paul Eggert <eggert@cs.ucla.edu>
13676
13677 * image.c (MAX_IMAGE_SIZE): Increase from 6.0 to 10.0; see
13678 <http://lists.gnu.org/archive/html/emacs-devel/2012-02/msg00540.html>.
13679
c3a70e2b
CY
136802012-02-15 Chong Yidong <cyd@gnu.org>
13681
13682 * eval.c (Fdefvar, Fdefconst): Doc fix; note that the variable is
13683 marked as special. Also, starting docstrings with * is obsolete.
13684
0ca43699
AS
136852012-02-13 Andreas Schwab <schwab@linux-m68k.org>
13686
13687 * gnutls.c (emacs_gnutls_write): Fix last change.
13688
2e8f3c56
LI
136892012-02-13 Lars Ingebrigtsen <larsi@gnus.org>
13690
13691 * gnutls.c (emacs_gnutls_write): Set errno appropriately for
13692 send_process.
13693
af70074f
SM
136942012-02-13 Stefan Monnier <monnier@iro.umontreal.ca>
13695
13696 * keymap.c (Fsingle_key_description): Handle char ranges.
13697
95986d52
CY
136982012-02-12 Chong Yidong <cyd@gnu.org>
13699
afd83bd1
CY
13700 * xdisp.c (handle_stop): Avoid assigning -1 to it->face_id here,
13701 as that creates a dangerous corner case.
13702
95986d52
CY
13703 * window.c (Fdelete_window_internal): Invalidate the mouse
13704 highlight (Bug#9904).
13705
bd7da63e
GM
137062012-02-12 Glenn Morris <rgm@gnu.org>
13707
13708 * xselect.c (Fx_own_selection_internal)
13709 (Fx_get_selection_internal, Fx_disown_selection_internal)
13710 (Fx_selection_owner_p, Fx_selection_exists_p): Doc fixes.
13711 * nsselect.m (Fx_own_selection_internal)
13712 (Fx_disown_selection_internal, Fx_selection_exists_p)
13713 (Fx_selection_owner_p, Fx_get_selection_internal):
13714 Sync docs and argument specs with the xselect.c versions.
13715
77abcbc2
LI
137162012-02-11 Lars Ingebrigtsen <larsi@gnus.org>
13717
13718 * gnutls.c (emacs_gnutls_write): Don't infloop if sendto fails.
13719
90b671e2
EZ
137202012-02-11 Eli Zaretskii <eliz@gnu.org>
13721
1c0ca0b7
EZ
13722 * w32select.c (Fx_selection_exists_p): Sync doc string and
13723 argument list with xselect.c. (Bug#10783)
13724
13725 * w16select.c (Fx_selection_exists_p): Sync doc string and
13726 argument list with xselect.c. (Bug#10783)
90b671e2 13727
49241268
GM
137282012-02-10 Glenn Morris <rgm@gnu.org>
13729
13730 * fns.c (Fsecure_hash): Doc fix.
13731
f998bbe7 137322012-02-09 Kenichi Handa <handa@m17n.org>
5c1ca13d
KH
13733
13734 * coding.c (produce_chars): Fix updating of src_end (Bug#10701).
13735
0992bd9c
CY
137362012-02-07 Chong Yidong <cyd@gnu.org>
13737
13738 * buffer.c (Fbuffer_local_variables)
13739 (buffer_lisp_local_variables): Handle unbound vars correctly;
13740 don't let Qunbound leak into Lisp.
13741
af008560
GM
137422012-02-07 Glenn Morris <rgm@gnu.org>
13743
dd605cc4
GM
13744 * image.c (Fimagemagick_types): Doc fix.
13745
af008560
GM
13746 * image.c (imagemagick-render-type): Change it from a lisp object
13747 to an integer. Move the doc here from the lisp manual.
13748 Treat all values not equal to 0 the same.
13749
1449fa1d
CY
137502012-02-06 Chong Yidong <cyd@gnu.org>
13751
13752 * doc.c (store_function_docstring): Avoid applying docstring of
13753 alias to base function (Bug#2603).
13754
3723ec07
AS
137552012-02-04 Andreas Schwab <schwab@linux-m68k.org>
13756
13757 * .gdbinit (pp1, pv1): Remove redundant defines.
13758 (pr): Use pp.
13759
79c1cc1e
CY
137602012-02-04 Chong Yidong <cyd@gnu.org>
13761
13762 * nsterm.m: Declare a global (Bug#10694).
13763
d7f29f8e
EZ
137642012-02-04 Eli Zaretskii <eliz@gnu.org>
13765
cae07000
SM
13766 * w32.c (get_emacs_configuration_options):
13767 Include --enable-checking, if specified, in the return value.
d7f29f8e 13768
3b95a6f9
MR
137692012-02-04 Martin Rudalics <rudalics@gmx.at>
13770
13771 * dispnew.c (change_frame_size_1): Calculate new_frame_total_cols
13772 after rounding frame sizes. (Bug#9723)
13773
d6fa96a6
EZ
137742012-02-04 Eli Zaretskii <eliz@gnu.org>
13775
13776 * keyboard.c (adjust_point_for_property): Don't position point
13777 before BEGV. (Bug#10696)
13778
df0b2940
PE
137792012-02-03 Paul Eggert <eggert@cs.ucla.edu>
13780
13781 Handle overflow when computing char display width (Bug#9496).
13782 * character.c (char_width): Return EMACS_INT, not int.
13783 (char_width, c_string_width): Check for overflow when
13784 computing the width; this is possible now that individual
13785 characters can have unbounded width. Problem introduced
13786 by merge from Emacs 23 on 2012-01-19.
13787
6bee44d6
MA
137882012-02-02 Michael Albinus <michael.albinus@gmx.de>
13789
13790 * dbusbind.c (Fdbus_register_method): Mention the return value
13791 :ignore in the docstring.
13792
44f92739
GM
137932012-02-02 Glenn Morris <rgm@gnu.org>
13794
1b9f60cc
GM
13795 * callproc.c (Fcall_process, Fcall_process_region): Doc fix.
13796
44f92739
GM
13797 * nsterm.m (syms_of_nsterm) <x-toolkit-scroll-bars>:
13798 Unconditionally set to t. (Bug#10673)
13799 * nsterm.m (syms_of_nsterm) <x-toolkit-scroll-bars>:
13800 * w32term.c (syms_of_w32term) <x-toolkit-scroll-bars>:
13801 * xterm.c (syms_of_xterm) <x-toolkit-scroll-bars>: Doc fix.
13802
c5d3843c
KH
138032012-02-02 Kenichi Handa <handa@m17n.org>
13804
13805 (x_produce_glyphs): Cancel previous change. If cmp->glyph_len is
13806 0, do not call append_composite_glyph.
13807
159462d4 138082012-02-02 Kenichi Handa <handa@m17n.org>
d2a51fd7
KH
13809
13810 * xdisp.c (BUILD_COMPOSITE_GLYPH_STRING): Initialize first_s to
13811 NULL (Bug#6988).
13812 (x_produce_glyphs): If the component of a composition is a null
13813 string, set it->pixel_width to 1 to avoid zero-width glyph.
13814
78cef877
EZ
138152012-02-01 Eli Zaretskii <eliz@gnu.org>
13816
13817 * ralloc.c (resize_bloc, r_alloc_sbrk): Don't call memmove if its
13818 first 2 arguments are identical. This makes inserting large
13819 output from a subprocess an order of magnitude faster on
13820 MS-Windows, where all sbrk'ed memory is always contiguous.
13821
97897668
GM
138222012-01-31 Glenn Morris <rgm@gnu.org>
13823
13824 * nsterm.m (syms_of_nsterm) <x-toolkit-scroll-bars>:
c78c6e0b 13825 * w32term.c (syms_of_w32term) <x-toolkit-scroll-bars>:
97897668
GM
13826 * xterm.c (syms_of_xterm) <x-toolkit-scroll-bars>: Sync docs.
13827
31fd3586
GM
138282012-01-29 Glenn Morris <rgm@gnu.org>
13829
13830 * gnutls.c (syms_of_gnutls): More doc (from etc/NEWS).
13831
0e24a8b2
CY
138322012-01-28 Samuel Thibault <sthibault@debian.org> (tiny change)
13833
13834 * s/gnu.h: Define POSIX_SIGNALS (Bug#10552).
13835
cc0adcb0
CY
138362012-01-28 Chong Yidong <cyd@gnu.org>
13837
13838 * minibuf.c (syms_of_minibuf): Doc fix (Bug#10550).
13839
acc28cb9
CY
138402012-01-26 Chong Yidong <cyd@gnu.org>
13841
9c69cfb7
CY
13842 * keyboard.c (Vecho_keystrokes): Document zero value (Bug#10503).
13843
acc28cb9
CY
13844 * search.c (Fsearch_forward, Fsearch_backward): Document negative
13845 repeat counts (Bug#10507).
13846
48da7392
GM
138472012-01-26 Glenn Morris <rgm@gnu.org>
13848
13849 * lread.c (syms_of_lread): Doc fix.
13850
14af5f7f
CY
138512012-01-25 HIROSHI OOTA <nil@mad.dog.cx> (tiny change)
13852
13853 * coding.c (encode_designation_at_bol): Change return value to
13854 EMACS_INT.
13855
0b21c100
CY
138562012-01-25 Chong Yidong <cyd@gnu.org>
13857
13858 * eval.c (Fuser_variable_p): Doc fix; mention custom-variable-p.
13859
3c2907f7
CY
138602012-01-21 Chong Yidong <cyd@gnu.org>
13861
13862 * floatfns.c (Fcopysign): Make the second argument non-optional,
13863 since nil is not allowed anyway.
13864
959ad23f
AS
138652012-01-21 Andreas Schwab <schwab@linux-m68k.org>
13866
13867 * process.c (read_process_output): Use p instead of XPROCESS (proc).
13868 (send_process): Likewise.
13869
34a02f46
MR
138702012-01-19 Martin Rudalics <rudalics@gmx.at>
13871
13872 * window.c (save_window_save, Fcurrent_window_configuration)
cae07000
SM
13873 (Vwindow_persistent_parameters): Do not use Qstate.
13874 Rewrite doc-strings.
34a02f46 13875
1259009a 138762012-01-19 Kenichi Handa <handa@m17n.org>
25ed9e61
KH
13877
13878 * character.c (char_width): New function.
70d4fdf6
GM
13879 (Fchar_width, c_string_width, lisp_string_width):
13880 Use char_width (Bug#9496).
25ed9e61 13881
6a6ee00d
MR
138822012-01-16 Martin Rudalics <rudalics@gmx.at>
13883
13884 * window.c (Vwindow_persistent_parameters): New variable.
13885 (Fset_window_configuration, save_window_save): Handle persistent
13886 window parameters.
13887
c85efaf7
EZ
138882012-01-14 Eli Zaretskii <eliz@gnu.org>
13889
13890 * w32fns.c (signal_user_input): Don't do a QUIT, to avoid
13891 thrashing the stack of the thread. (Bug#9087)
13892
5944709e
PE
138932012-01-12 Paul Eggert <eggert@cs.ucla.edu>
13894
13895 * xdisp.c (rows_from_pos_range): Add parens as per gcc -Wparentheses.
13896
e71f5d99
EZ
138972012-01-11 Eli Zaretskii <eliz@gnu.org>
13898
13899 * xdisp.c (rows_from_pos_range): Handle the case where the
13900 highlight ends on a newline. (Bug#10464)
13901 (mouse_face_from_buffer_pos): Fix off-by-one error in calculating
13902 he end column for display of highlight that ends on a newline
13903 before a R2L line.
13904
ce316182
GM
139052012-01-11 Glenn Morris <rgm@gnu.org>
13906
13907 * lread.c (init_lread): If no-site-lisp, remove site-lisp dirs
13908 from load-path also when installation-directory is nil. (Bug#10208)
13909
5b43da69
GM
139102012-01-10 Glenn Morris <rgm@gnu.org>
13911
74cc8ff9
GM
13912 * emacs.c (syms_of_emacs) <installation-directory>: Doc fix.
13913
7d8d6e4e
GM
13914 * epaths.in (PATH_LOADSEARCH, PATH_EXEC, PATH_DATA, PATH_DOC):
13915 Update template values to be closer to their typical values these days.
5b43da69 13916
a0db8d43
EZ
139172012-01-09 Eli Zaretskii <eliz@gnu.org>
13918
13919 * xdisp.c (rows_from_pos_range): Accept additional argument
13920 DISP_STRING, and accept any glyph in a row whose object is that
13921 string as eligible for mouse highlight. Fixes mouse highlight of
13922 display strings from overlays. (Bug#10464)
13923
9a0115ab 139242012-01-07 Paul Eggert <eggert@cs.ucla.edu>
09450bae 13925
b9110d6a 13926 emacs: fix an auto-save permissions race condition (Bug#10400)
09450bae
PE
13927 * fileio.c (auto_saving_dir_umask): New static var.
13928 (Fmake_directory_internal): Use it.
13929 (do_auto_save_make_dir): Set it, instead of invoking chmod after
13930 creating the directory. The old code temporarily assigns
13931 too-generous permissions to the directory.
13932 (do_auto_save_eh): Clear it.
b9110d6a 13933 (Fdo_auto_save): Catch all errors, not just file errors, so
09450bae
PE
13934 that the var is always cleared.
13935
6c1bd3f3
EZ
139362012-01-07 Eli Zaretskii <eliz@gnu.org>
13937
13938 * search.c (scan_buffer): Pass character positions to
13939 know_region_cache, not byte positions. (Bug#6540)
13940
069d2b50
L
139412012-01-07 LynX <_LynX@bk.ru> (tiny change)
13942
13943 * w32.c (sys_rename): Report EXDEV when rename of a directory
13944 fails because the target is on another logical disk. (Bug#10284)
13945
75bf0d33
DB
139462012-01-07 David Benjamin <davidben@mit.edu> (tiny change)
13947
13948 * xterm.c (x_embed_request_focus): New function.
13949
13950 * xterm.h: Add prototype.
13951
13952 * xfns.c (Fx_focus_frame): Use it for embedded frames (Bug#9977).
13953
1c6e5a32
GM
139542012-01-05 Glenn Morris <rgm@gnu.org>
13955
13956 * emacs.c (emacs_copyright): Update short copyright year to 2012.
13957
651e947e
EZ
139582012-01-01 Eli Zaretskii <eliz@gnu.org>
13959
13960 * gnutls.c (init_gnutls_functions): Load gnutls_check_version.
13961 Load gnutls_transport_set_lowat only if GnuTLS version is below
13962 2.11.1.
13963 (emacs_gnutls_handshake): Call gnutls_transport_set_lowat only for
13964 GnuTLS versions below 2.11.1.
13965
3778cdd8
AL
139662011-12-31 Antoine Levitt <antoine.levitt@gmail.com>
13967
13968 * xdisp.c (syms_of_xdisp) <window-scroll-functions>: Add warning
13969 to the doc string advising against its use for altering the way
13970 windows are scrolled.
13971
0e5317f7
KH
139722011-12-28 Kenichi Handa <handa@m17n.org>
13973
13974 * coding.c (Fdefine_coding_system_internal): Make an utf-8 base
13975 coding-system ASCII compatible only when it does not produce BOM
13976 on encoding (Bug#10383).
13977
93d5ca1f
JD
139782011-12-26 Jan Djärv <jan.h.d@swipnet.se>
13979
13980 * xmenu.c (x_menu_wait_for_event): Use xg_select for Gtk3 so menus
13981 can scroll.
13982 (create_and_show_popup_menu): Always use menu_position_func for
13983 Gtk3 (Bug#10361).
13984
ca22b785
AS
139852011-12-24 Andreas Schwab <schwab@linux-m68k.org>
13986
13987 * callint.c (Fcall_interactively): Don't truncate prompt string.
13988
d048e1e6
EZ
139892011-12-23 Eli Zaretskii <eliz@gnu.org>
13990
13991 * xdisp.c (handle_invisible_prop): Handle correctly an invisible
13992 property that ends at ZV, so that the bidi iteration could be
3ba1a2ad 13993 resumed from there (after widening). (Bug#10360)
d048e1e6 13994
5ccaba1f
JD
139952011-12-22 Jan Djärv <jan.h.d@swipnet.se>
13996
13997 * nsfont.m (ns_spec_to_descriptor): Do not autorelease fdesc.
13998
204ee57f
JD
139992011-12-21 Jan Djärv <jan.h.d@swipnet.se>
14000
b81d40f0
JB
14001 * nsterm.m (x_free_frame_resources):
14002 Release f->output_data.ns->miniimage.
204ee57f
JD
14003 (ns_index_color): Fix indentation. Do not retain
14004 color_table->colors[i].
14005
14006 * nsmenu.m (ns_update_menubar): Call free_menubar_widget_value_tree
14007 before returning.
14008
14009 * nsfns.m (x_set_background_color): Assign return value from
14010 ns_index_color to face-background instead of NSColor*.
14011 (ns_implicitly_set_icon_type): Fix indentation.
14012 Change assignment in for loop to comparison.
14013
14014 * emacs.c (ns_pool): New variable.
14015 (main): Assign ns_pool.
14016 (Fkill_emacs): Call ns_release_autorelease_pool.
14017
14018 * nsfont.m (ns_spec_to_descriptor): Fix indentation,
14019 autorelease fdesc, release fdAttrs and tdict.
14020 (ns_get_covering_families): Release charset.
14021 (ns_findfonts): Release NSFontDescriptor created with new.
14022 (ns_uni_to_glyphs): Fix indentation.
14023 (setString): Release attrStr before assigning new value.
14024
c803b2b7
JD
140252011-12-18 Jan Djärv <jan.h.d@swipnet.se>
14026
678f4426
JD
14027 * nsmenu.m (NSMenuDidBeginTrackingNotification): Declare if OSX < 10.5
14028 and NS_IMPL_COCOA.
14029 (trackingNotification): Surround with ifdef NS_IMPL_COCOA.
14030 (syms_of_nsmenu): Set trackingMenu to 1 if not NS_IMPL_COCOA.
14031
cd394be1 140322011-12-18 David Reitter <reitter@cmu.edu>
678f4426 14033
5fecd5fc
JD
14034 * nsterm.m (ns_term_init): Subscribe for notifications
14035 NSMenuDidBeginTrackingNotification and NSMenuDidEndTrackingNotification
14036 to method trackingNotification in EmacsMenu.
14037
14038 * nsmenu.m (trackingMenu): New variable.
3771cb17 14039 (trackingNotification): New method (from Aquamacs).
5fecd5fc 14040 (menuNeedsUpdate): Expand comment and return if trackingMenu is 0,
3771cb17 14041 from Aquamacs (Bug#7030).
678f4426
JD
14042
140432011-12-18 Jan Djärv <jan.h.d@swipnet.se>
5fecd5fc 14044
c803b2b7
JD
14045 * nsselect.m (CUT_BUFFER_SUPPORT): Remove define.
14046 (symbol_to_nsstring): Fix indentation.
14047 (ns_symbol_to_pb): New function.
cae07000
SM
14048 (Fns_get_selection_internal): Rename from Fns_get_cut_buffer_internal.
14049 (Fns_rotate_cut_buffers_internal): Remove.
14050 (Fns_store_selection_internal): Rename from
c803b2b7
JD
14051 Fns_store_cut_buffer_internal.
14052 (ns_get_foreign_selection, Fx_own_selection_internal)
14053 (Fx_disown_selection_internal, Fx_selection_exists_p)
b81d40f0
JB
14054 (Fns_get_selection_internal, Fns_store_selection_internal):
14055 Use ns_symbol_to_pb and check if return value is nil.
14056 (syms_of_nsselect): Remove ifdef CUT_BUFFER_SUPPORT. Remove defsubr
14057 Sns_rotate_cut_buffers_internal. Sns_get_cut_buffer_internal
c803b2b7
JD
14058 renamed to Sns_get_selection_internal, Sns_store_cut_buffer_internal
14059 renamed to Sns_store_selection_internal.
14060 (ns_handle_selection_request): Move code to Fx_own_selection_internal
14061 and remove this function.
14062 (ns_handle_selection_clear): Remove, never used.
14063 (Fx_own_selection_internal): Move code from ns_handle_selection_request
14064 here.
14065
e1b01a3a
KB
140662011-12-17 Ken Brown <kbrown@cornell.edu>
14067
14068 * fileio.c (check_writable) [CYGWIN]: Return non-zero if UID or
14069 GID is unknown (Bug#10257).
14070
2adb6e85
PE
140712011-12-17 Paul Eggert <eggert@cs.ucla.edu>
14072
14073 * s/gnu-linux.h: Fix mark_memory typo (Bug#10286).
14074 (GC_MARK_SECONDARY_STACK): Omit removed 3rd arg to mark_memory,
14075 which caused a build failure on GNU/Linux IA-64. This problem was
14076 introduced by my 2011-10-07 patch.
14077
d1d7b339
JL
140782011-12-15 Juri Linkov <juri@jurta.org>
14079
14080 * image.c (imagemagick_error): New function. (Bug#10112)
14081 (imagemagick_load_image): Comment out `MagickSetResolution' call.
14082 Use `imagemagick_error' where ImageMagick functions return
14083 `MagickFalse'.
14084 (Fimagemagick_types): Add `Fnreverse' to return the list in the
14085 proper order.
14086
100d5755
KH
140872011-12-15 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
14088
14089 * xftfont.c (xftfont_draw): Use the font metrics of s->font to
14090 fill background (Bug#8992).
14091
454592a6
MR
140922011-12-13 Martin Rudalics <rudalics@gmx.at>
14093
14094 * window.c (Vwindow_combination_resize)
14095 (Vwindow_combination_limit): Use t instead of non-nil in
14096 doc-strings.
61d4b438
MR
14097 (Vrecenter_redisplay): Add first sentence of doc-string on
14098 separate line.
53524d93 14099 (Frecenter): Fix doc-string typo.
454592a6 14100
3633e3aa
KH
141012011-12-11 Kenichi Handa <handa@m17n.org>
14102
14103 * coding.c (Funencodable_char_position): Pay attention to the
14104 buffer text relocation (Bug#9389).
14105
7b9d523a 141062011-12-10 Jan Djärv <jan.h.d@swipnet.se>
61ccba97 14107
7b9d523a
JD
14108 * xterm.c (x_term_init): Move call to gdk_window_add_filter before
14109 gtk_init (Bug#10100).
14110
b73189c6
EZ
141112011-12-10 Eli Zaretskii <eliz@gnu.org>
14112
14113 * xdisp.c (RECORD_MAX_MIN_POS): Use IT->cmp_it.charpos only if
14114 IT->string is nil. (Bug#10263)
14115
f7dfe5d6
JD
141162011-12-10 Jan Djärv <jan.h.d@swipnet.se>
14117
83faebb4
JD
14118 * nsterm.h (x_free_frame_resources): Declare.
14119
f7dfe5d6
JD
14120 * nsfns.m (ns_get_defaults_value): New function (Bug#10103).
14121 (Fns_get_resource, x_get_string_resource): Call ns_get_defaults_value.
14122
14123 * nsterm.h (ns_get_defaults_value): Declare.
14124
14125 * nsterm.m (ns_default): Call ns_get_defaults_value.
14126
7cd4e72c
EZ
141272011-12-09 Eli Zaretskii <eliz@gnu.org>
14128
14129 * xdisp.c (try_scrolling): Don't set scroll_down_p if dy is zero.
14130 (Bug#10170)
14131
b34d7317
YM
141322011-12-09 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
14133
14134 * unexelf.c (unexec) [NS_IMPL_GNUSTEP]: Take account of the case
14135 that where the value of an _OBJC_* symbol points to is in the .bss
14136 section (Bug#10240).
14137
76470ad1
KH
141382011-12-08 Kazuhiro Ito <kzhr@d1.dion.ne.jp> (tiny change)
14139
14140 * coding.c (encode_coding_ccl): Check (charbuf < charbuf_end)
2fac8180 14141 after the loop to call ccl_driver at least once (Bug#8619).
76470ad1 14142
745fff94
KH
141432011-12-08 Kenichi Handa <handa@m17n.org>
14144
14145 * ftfont.c (get_adstyle_property): Fix previous change
14146 (Bug#10233).
14147
6e44397c
JB
141482011-12-07 Juanma Barranquero <lekktu@gmail.com>
14149
14150 * w32.c (init_environment): If no_site_lisp, remove site-lisp
14151 dirs from the default value of EMACSLOADPATH (bug#10208).
14152
7efa6272
GM
141532011-12-07 Glenn Morris <rgm@gnu.org>
14154
14155 * lread.c (init_lread): If no_site_lisp, exclude site-lisp/ in
14156 installation and source directories as well. (Bug#10208)
14157
f6fc4d87
CY
141582011-12-06 Chong Yidong <cyd@gnu.org>
14159
14160 * minibuf.c (Fread_from_minibuffer): Doc fix (Bug#10228).
14161
2bf26180
GM
141622011-12-06 Glenn Morris <rgm@gnu.org>
14163
14164 * process.c (start_process_unwind): Treat any pid <= 0, except -2,
14165 as an error, not just -1. (Bug#10217)
14166
3a6ad4f0
CY
141672011-12-05 Chong Yidong <cyd@gnu.org>
14168
14169 * keyboard.c (process_special_events): New function.
14170 (swallow_events, Finput_pending_p): Use it (Bug#10195).
14171
75a3b399
PE
141722011-12-05 Paul Eggert <eggert@cs.ucla.edu>
14173
14174 * coding.c (encode_designation_at_bol): Don't use uninitialized
14175 local variable (Bug#9318).
14176
c3c9e25e
KH
141772011-12-05 Kenichi Handa <handa@m17n.org>
14178
14179 * ftfont.c (get_adstyle_property): If the font is not BDF nor PCF,
14180 return Qnil (Bug#8046, Bug#10193).
14181
5eb05ea3
KH
141822011-12-05 Kenichi Handa <handa@m17n.org>
14183
14184 * coding.c (encode_designation_at_bol): New args charbuf_end and
14185 dst. Return the number of produced bytes. Callers changed.
a79703f5
KH
14186 (coding_set_source): Return how many bytes coding->source was
14187 relocated.
14188 (coding_set_destination): Return how many bytes
14189 coding->destination was relocated.
14190 (CODING_DECODE_CHAR, CODING_ENCODE_CHAR, CODING_CHAR_CHARSET)
cae07000 14191 (CODING_CHAR_CHARSET_P): Adjust for the avove changes.
5eb05ea3
KH
14192
141932011-12-05 Kazuhiro Ito <kzhr@d1.dion.ne.jp> (tiny change)
14194
14195 * coding.c (CODING_CHAR_CHARSET_P): New macro.
14196 (encode_coding_emacs_mule, encode_coding_iso_2022): Use the above
14197 macro (Bug#9318).
14198
141992011-12-05 Andreas Schwab <schwab@linux-m68k.org>
14200
14201 The following changes are to fix Bug#9318.
14202
a79703f5 14203 * coding.c (CODING_ENCODE_CHAR, CODING_CHAR_CHARSET): New macros.
5eb05ea3
KH
14204 (encode_coding_emacs_mule, ENCODE_ISO_CHARACTER)
14205 (encode_coding_iso_2022, encode_coding_sjis)
a79703f5 14206 (encode_coding_big5, encode_coding_charset): Use the above macros.
5eb05ea3 14207
7dbda6df
JB
142082011-12-05 Juanma Barranquero <lekktu@gmail.com>
14209
14210 * lisp.h (process_quit_flag): Fix external declaration.
14211
6d5eb5b0
SM
142122011-12-04 Stefan Monnier <monnier@iro.umontreal.ca>
14213
14214 Don't macro-inline non-performance-critical code.
14215 * eval.c (process_quit_flag): New function.
14216 * lisp.h (QUIT): Use it.
14217
a0c3fad0
JD
142182011-12-04 Jan Djärv <jan.h.d@swipnet.se>
14219
14220 * nsfns.m (get_geometry_from_preferences): New function.
14221 (Fx_create_frame): Call get_geometry_from_preferences (Bug#10103).
14222
6c07aac2
AS
142232011-12-04 Andreas Schwab <schwab@linux-m68k.org>
14224
14225 * emacs.c (Qkill_emacs): Define.
14226 (syms_of_emacs): Initialize it.
14227 * keyboard.c (interrupt_signal): Don't call Fkill_emacs here, set
14228 Qquit_flag to `kill-emacs' instead.
6d5eb5b0
SM
14229 (quit_throw_to_read_char): Add parameter `from_signal'.
14230 All callers changed. Call Fkill_emacs if requested and safe.
6c07aac2
AS
14231 * lisp.h (QUIT): Call Fkill_emacs if requested.
14232
c052ead4
JD
142332011-12-03 Jan Djärv <jan.h.d@swipnet.se>
14234
14235 * widget.c (update_wm_hints): Return if wmshell is null.
14236 (widget_update_wm_size_hints): New function.
14237
14238 * widget.h (widget_update_wm_size_hints): Declare.
14239
14240 * xterm.c (x_wm_set_size_hint): If USE_X_TOOLKIT, call
14241 widget_update_wm_size_hints (Bug#10104).
14242
9e49252b
EZ
142432011-12-03 Eli Zaretskii <eliz@gnu.org>
14244
14245 * xdisp.c (handle_invisible_prop): If the invisible text ends just
14246 before a newline, prepare the bidi iterator for consuming the
14247 newline, and keep the current paragraph direction. (Bug#10183)
e9a49426 14248 (redisplay_window): Don't let `margin' become negative. (Bug#10192)
9e49252b 14249
02b16839
JL
142502011-12-02 Juri Linkov <juri@jurta.org>
14251
14252 * search.c (Fword_search_regexp): New Lisp function created from
14253 `wordify'. Change type of arg `lax' from `int' to `Lisp_Object'.
14254 (Fword_search_backward, Fword_search_forward)
14255 (Fword_search_backward_lax, Fword_search_forward_lax):
14256 Use `Fword_search_regexp' instead of `wordify'. Doc fix.
14257 (syms_of_search): Define `Sword_search_regexp'. (Bug#10145)
14258
0068070e
SM
142592011-12-01 Stefan Monnier <monnier@iro.umontreal.ca>
14260
14261 * fileio.c (Finsert_file_contents): Move after-change-function call
14262 to before the "handled:" label, since all "goto handled" appear in
14263 cases where the *-change-functions have already been properly called
14264 (bug#10117).
14265
3360a3fc
AS
142662011-12-01 Andreas Schwab <schwab@linux-m68k.org>
14267
14268 * keyboard.c (interrupt_signal): Don't call kill-emacs when
14269 waiting for input. (Bug#10169)
14270
73d6c093
EZ
142712011-11-30 Eli Zaretskii <eliz@gnu.org>
14272
14273 * dispnew.c (adjust_glyph_matrix): Remove the assertion that
14274 verifies glyph row's hash code--we have just reallocated the
14275 glyphs, so their contents can be complete garbage. (Bug#10164)
14276
febe6bea
JB
142772011-11-30 Juanma Barranquero <lekktu@gmail.com>
14278
14279 * dispnew.c (adjust_glyph_matrix) [XASSERTS]: Add missing check.
14280
801a4313
EZ
142812011-11-30 Eli Zaretskii <eliz@gnu.org>
14282
14283 * dispnew.c (adjust_glyph_matrix) [XASSERTS]: Ensure ROW's
14284 attributes are tested _before_ calling verify_row_hash, to protect
14285 against GCC re-ordering of the tests. (Bug#10164)
14286
2b56b87e
JD
142872011-11-29 Jan Djärv <jan.h.d@swipnet.se>
14288
14289 * xterm.h (struct x_output): net_wm_state_hidden_seen is new.
14290
14291 * xterm.c (handle_one_xevent): Only set async_visible and friends
14292 if net_wm_state_hidden_seen is non-zero (Bug#10002)
7dbda6df 14293 (get_current_wm_state): Set net_wm_state_hidden_seen to 1 if
2b56b87e
JD
14294 _NET_WM_STATE_HIDDEN is in NET_WM_STATE.
14295
dbf31225
PE
142962011-11-28 Paul Eggert <eggert@cs.ucla.edu>
14297
14298 Remove GCPRO-related macros that exist only to avoid shadowing locals.
14299 * lisp.h (GCPRO1_VAR, GCPRO2_VAR, GCPRO3_VAR, GCPRO4_VAR, GCPRO5_VAR)
14300 (GCPRO6_VAR, UNGCPRO_VAR): Remove. See
14301 <http://lists.gnu.org/archive/html/emacs-diffs/2011-11/msg00265.html>.
14302 All uses changed to use GCPRO1 etc.
14303 (GCPRO1, GCPRO2, GCPRO3, GCPRO4, GCPRO5, GCPRO6, UNGCPRO):
14304 Revert to old implementation (i.e., before 2011-03-11).
14305
1305621b
YM
143062011-11-28 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
14307
14308 * dispnew.c (scrolling_window): Truncate overlaps in copy destination
14309 of scroll runs so as to avoid assigning disabled bogus rows and
14310 unnecessary graphics copy operations.
14311
8c9afb46
EZ
143122011-11-27 Eli Zaretskii <eliz@gnu.org>
14313
14314 * s/ms-w32.h (utimbuf) [_MSC_VER]: Don't define.
14315 (snprintf) [_MSC_VER]: Redirect to _snprintf.
14316 (strtoll) [_MSC_VER]: Redirect to _strtoi64.
14317 (malloc, free, realloc, calloc): Redirect to e_* only when
14318 compiling Emacs.
14319
14320 * lisp.h (GCTYPEBITS): Move before first use.
14321 (ALIGN_GCTYPEBITS) [_MSC_VER]: Define.
14322 (DECL_ALIGN) [_MSC_VER]: Use it, as MSVC doesn't like bit ops in
14323 this macro definition.
14324
14325 * s/ms-w32.h (tzname): Redirect to _tzname for all values of
14326 _MSC_VER.
14327
54e9e3bf
JD
143282011-11-27 Jan Djärv <jan.h.d@swipnet.se>
14329
6d5eb5b0
SM
14330 * gtkutil.c (xg_create_frame_widgets):
14331 Call gtk_window_set_has_resize_grip (FALSE) if that function is
54e9e3bf
JD
14332 present with Gtk+ 2.0.
14333
83aca1cb
PE
143342011-11-26 Paul Eggert <eggert@cs.ucla.edu>
14335
14336 * fileio.c (Finsert_file_contents): Undo previous change; see
14337 <http://lists.gnu.org/archive/html/emacs-diffs/2011-11/msg00265.html>.
14338
5b76caa4
PE
143392011-11-26 Paul Eggert <eggert@cs.ucla.edu>
14340
14341 Rename locals to avoid shadowing.
14342 * fileio.c (Finsert_file_contents):
14343 Rename inner 'gcpro1' to 'inner_gcpro1' to avoid shadowing.
14344 * process.c (wait_reading_process_output):
14345 Rename inner 'proc' to 'p' to avoid shadowing.
14346 Indent for consistency with usual Emacs style.
14347
8c535114
EZ
143482011-11-25 Eli Zaretskii <eliz@gnu.org>
14349
14350 * xdisp.c (redisplay_window): If cursor row is not fully visible
14351 after recentering, and scroll-conservatively is set to a large
14352 number, scroll window by a few more lines to make the cursor fully
14353 visible and out of scroll-margin. (Bug#10105)
91b4a718
EZ
14354 (start_display): Don't move to the next line if the display should
14355 start at a newline that is part of a display vector or an overlay
14356 string. (Bug#10119)
8c535114 14357
fa4fdb5c
JL
143582011-11-24 Juri Linkov <juri@jurta.org>
14359
14360 * image.c (imagemagick_load_image): Move `MagickSetResolution' down
14361 after the `MagickPingImage' call. (Bug#10112)
14362
90ec88df
CY
143632011-11-23 Chong Yidong <cyd@gnu.org>
14364
14365 * window.c (Fcoordinates_in_window_p): Accept only live windows.
14366
56e2e794
MR
143672011-11-23 Martin Rudalics <rudalics@gmx.at>
14368
14369 * buffer.c (Fkill_buffer): Run replace_buffer_in_windows before
14370 making another buffer current. (Bug#10114)
14371
b6e64c41
GM
143722011-11-23 Glenn Morris <rgm@gnu.org>
14373
14374 * font.c (font_find_for_lface) [HAVE_NS]: Ignore case. (Bug#2526)
14375
6b21de18
CY
143762011-11-23 Chong Yidong <cyd@gnu.org>
14377
14378 * xdisp.c (compute_stop_pos): Check validity of end_charpos before
14379 using it (Bug#5984).
14380
b12cd789
EZ
143812011-11-22 Eli Zaretskii <eliz@gnu.org>
14382
14383 * dispnew.c (adjust_glyph_matrix): Don't verify hash code of mode-
14384 and header-lines, as they don't have one computed for them.
14385 (Bug#10098)
14386
14387 * .gdbinit (prow): Make displayed values more self-explaining.
14388 Add row's hash code.
14389
261b6fd4
LMI
143902011-11-21 Lars Magne Ingebrigtsen <larsi@gnus.org>
14391
14392 * process.c (wait_reading_process_output): Fix asynchrounous
14393 GnuTLS socket handling on some versions of the GnuTLS library.
16c1ad08 14394 (wait_reading_process_output): Add comment and URL.
261b6fd4 14395
e7cfd277
JD
143962011-11-21 Jan Djärv <jan.h.d@swipnet.se>
14397
14398 * xterm.c (x_clear_frame): Reinstate the XClearWindow call.
14399
a9b9b7f5
CY
144002011-11-21 Chong Yidong <cyd@gnu.org>
14401
14402 * window.c (Fnext_window, Fprevious_window): Doc fix.
14403
b0d15b4f
SM
144042011-11-20 Stefan Monnier <monnier@iro.umontreal.ca>
14405
14406 * window.c (get_phys_cursor_glyph): Fix Lisp_Object/int mixup.
14407
fe7a3057
JB
144082011-11-20 Juanma Barranquero <lekktu@gmail.com>
14409
14410 * nsfont.m (syms_of_nsfont) <ns-reg-to-script>: Fix typo.
14411
d2999b1a
MR
144122011-11-20 Martin Rudalics <rudalics@gmx.at>
14413
14414 * window.c (Fset_window_combination_limit): Rename argument
14415 STATUS to LIMIT.
14416 (Vwindow_combination_limit): Remove "status" from doc-string.
14417
d5ff9cd0
AS
144182011-11-20 Andreas Schwab <schwab@linux-m68k.org>
14419
14420 * m/ibms390.h: Remove.
14421 * m/ibms390x.h: Don't include "ibms390.h".
14422
a5bb9bd3
SM
144232011-11-20 Stefan Monnier <monnier@iro.umontreal.ca>
14424
14425 * fileio.c (Finsert_file_contents): Add missing gcpro1 variable.
14426 Suggested by Dmitry Antipov <dmantipov@yandex.ru>.
14427
cd1181db
JB
144282011-11-20 Juanma Barranquero <lekktu@gmail.com>
14429
14430 * casetab.c (Fset_case_table):
14431 * charset.c (Fcharset_after): Fix typos.
14432
615a3b8d 144332011-11-20 Paul Eggert <eggert@cs.ucla.edu>
6a0bf43d 14434
17e845af
PE
14435 Standardize on VIRT_ADDR_VARIES behavior (Bug#10042).
14436 Otherwise, valgrind does not work on some platforms.
14437 Problem reported by Andreas Schwab in
6a0bf43d
PE
14438 <http://lists.gnu.org/archive/html/emacs-devel/2011-11/msg00081.html>.
14439 * puresize.h (pure, PURE_P): Always behave as if VIRT_ADDR_VARIES
14440 is set, removing the need for VIRT_ADDRESS_VARIES.
14441 (PURE_P): Use a more-efficient implementation that needs just one
14442 comparison, not two: on x86-64 with GCC 4.6.2, this cut down the
14443 number of instructions from 6 (xorl, cmpq, jge, xorl, cmpq, setge)
14444 to 4 (xorl, subq, cmpq, setbe).
14445 * alloc.c (pure): Always extern now, since that's the
14446 VIRT_ADDR_VARIES behavior.
14447 (PURE_POINTER_P): Use a single comparison, not two, for
14448 consistency with the new puresize.h.
14449 * lisp.h (PNTR_COMPARISON_TYPE): Remove; no longer needed.
14450 * m/ibms390.h, m/intel386.h, m/template.h, s/cygwin.h, s/hpux10-20.h:
14451 Remove VIRT_ADDR_VARIES no longer needed.
14452
f8fe6f96
EZ
144532011-11-19 Eli Zaretskii <eliz@gnu.org>
14454
14455 * xdisp.c (x_write_glyphs, draw_phys_cursor_glyph)
14456 (erase_phys_cursor, update_window_cursor, show_mouse_face)
14457 (cursor_in_mouse_face_p): If the cursor position is out of bounds,
14458 behave as if the cursor position were at the window margin.
14459
14460 * window.c (get_phys_cursor_glyph): If the window is hscrolled,
14461 and the cursor position is out of bounds, behave as if the cursor
14462 position were at the window margin. (Bug#10075)
14463
df05a53c
CY
144642011-11-18 Chong Yidong <cyd@gnu.org>
14465
14466 * window.c (Fwindow_combination_limit): Make first argument
14467 non-optional, since it is meaningless for live windows like the
14468 selected window.
61ccba97 14469
2071918e
DA
144702011-11-18 Dmitry Antipov <dmantipov@yandex.ru>
14471
14472 * keymap.c (Fwhere_is_internal): Add missing RETURN_UNGCPROs.
14473
b50a28de
SM
144742011-11-18 Stefan Monnier <monnier@iro.umontreal.ca>
14475
14476 * intervals.c: Fix grafting over the whole buffer (bug#10071).
14477 (graft_intervals_into_buffer): Simplify.
14478
015137db
EZ
144792011-11-18 Eli Zaretskii <eliz@gnu.org>
14480
14481 * dispnew.c (swap_glyph_pointers): Swap the used[] arrays and the
14482 hash values of the two rows.
14483 (copy_row_except_pointers): Preserve the used[] arrays and the
14484 hash values of the two rows. (Bug#10035)
68c95424 14485 (add_row_entry): Add xassert to verify that ROW's hash code is valid.
015137db
EZ
14486
14487 * xdisp.c (row_hash): New function, body extracted from
14488 compute_line_metrics.
14489 (compute_line_metrics): Call row_hash, instead of computing the
14490 hash code inline.
14491
14492 * dispnew.c (verify_row_hash): Call row_hash for computing the
14493 hash code of a row, instead of duplicating code from xdisp.c.
14494
14495 * dispextern.h (row_hash): Add prototype.
14496
a2addb04
TH
144972011-11-18 Tassilo Horn <tassilo@member.fsf.org>
14498
14499 * frame.c (delete_frame): Don't delete the terminal when the last
14500 X frame is closed if emacs is built with GTK toolkit.
14501
df85d315
JB
145022011-11-17 Juanma Barranquero <lekktu@gmail.com>
14503
14504 * window.c (syms_of_window) <window-combination-resize>: Fix typo.
14505
a0c2d0ae
MR
145062011-11-17 Martin Rudalics <rudalics@gmx.at>
14507
14508 * window.c (Vwindow_splits): Rename to
14509 Vwindow_combination_resize. Suggested by Juri Linkov.
14510 (Fsplit_window_internal): Use Vwindow_combination_resize instead
14511 of Vwindow_splits.
14512
58179cce
JB
145132011-11-16 Juanma Barranquero <lekktu@gmail.com>
14514
7877f373
JB
14515 * nsfns.m (Fns_font_name):
14516 * window.c (syms_of_window) <window-combination-limit>: Fix typos.
58179cce 14517
b6f67890
MR
145182011-11-16 Martin Rudalics <rudalics@gmx.at>
14519
14520 * window.h (window): Rename slot "nest" to "combination_limit".
14521 * window.c (Fwindow_nest): Rename to Fwindow_combination_limit.
14522 (Fset_window_nest): Rename to Fset_window_combination_limit.
14523 (Vwindow_nest): Rename to Vwindow_combination_limit.
14524 (recombine_windows, make_parent_window, make_window)
14525 (Fsplit_window_internal, saved_window)
14526 (Fset_window_configuration, save_window_save): Rename all
14527 occurrences of window_nest to window_combination_limit.
14528
c7015153
JB
145292011-11-15 Juanma Barranquero <lekktu@gmail.com>
14530
14531 * image.c (imagemagick_load_image): Fix typo.
14532
322ad6ec
EZ
145332011-11-14 Eli Zaretskii <eliz@gnu.org>
14534
14535 * xdisp.c (display_line): Move the call to
14536 highlight_trailing_whitespace before the call to
14537 compute_line_metrics, since the latter needs to see the final
6d5eb5b0
SM
14538 faces of all the glyphs to compute ROW's hash value.
14539 Fixes assertion violations in row_equal_p. (Bug#10035)
322ad6ec 14540
f067b8ec
JB
145412011-11-14 Juanma Barranquero <lekktu@gmail.com>
14542
14543 * w32proc.c (reader_thread): Don't check pending input if cp->fd < 0,
14544 just return (bug#10044).
14545
1e5b2111
EZ
145462011-11-12 Eli Zaretskii <eliz@gnu.org>
14547
7ef3cbd5
EZ
14548 * makefile.w32-in (HEAPSIZE): New variable, allows to build temacs
14549 with user-defined heap size. Bump the default size of the temacs
14550 heap to 27MB, to avoid memory warning when running temacs.
14551 ($(TEMACS)): Use HEAPSIZE instead of a hardcoded value.
14552
1e5b2111
EZ
14553 * dispnew.c (scrolling_window): Fix incorrect indices in accessing
14554 current_matrix and desired_matrix. (Bug#9990)
7a7270dd
EZ
14555 (verify_row_hash) [XASSERTS]: New function.
14556 (adjust_glyph_matrix, row_equal_p): Use it in xassert to verify
14557 that the hash value of glyph rows is correct.
1e5b2111 14558
89d61221
MR
145592011-11-12 Martin Rudalics <rudalics@gmx.at>
14560
14561 * window.h (window): Remove splits slot.
14562 * window.c (Fwindow_splits, Fset_window_splits): Remove.
14563 (Fdelete_other_windows_internal, make_parent_window)
14564 (make_window, Fsplit_window_internal, Fdelete_window_internal)
14565 (Fset_window_configuration, save_window_save): Don't deal with
14566 split status of windows.
14567 (saved_window): Remove splits slot.
14568 (Vwindow_splits): Rewrite doc-string.
14569
97f18cc8
JD
145702011-11-11 Jan Djärv <jan.h.d@swipnet.se>
14571
14572 * xfns.c (unwind_create_frame):
14573 * nsfns.m (unwind_create_frame):
14574 * w32fns.c (unwind_create_frame): Use Fmemq to check if frame is in
14575 Vframe_list (Bug#9999).
14576
22a648b4
DA
145772011-11-11 Dmitry Antipov <dmantipov@yandex.ru>
14578
0b381c7e 14579 * xdisp.c (syms_of_xdisp): Remove duplicated definition of Qtext.
22a648b4 14580
659afede
KH
145812011-11-11 Kenichi Handa <handa@m17n.org>
14582
14583 * callproc.c (Fcall_process): Set the member dst_multibyte of
14584 process_coding.
14585
9ac0394b
KH
145862011-11-11 Johan Bockgård <bojohan@gnu.org>
14587
14588 * xdisp.c (fill_composite_glyph_string): Always set s->face, to
14589 avoid a crash (bug#9496).
14590
2fbdc249
CY
145912011-11-09 Chong Yidong <cyd@gnu.org>
14592
14593 * window.c (Fwindow_inside_edges, Fwindow_inside_pixel_edges)
14594 (Fwindow_inside_absolute_pixel_edges): Only allow live windows.
14595
ac6b1f81
PE
145962011-11-08 Paul Eggert <eggert@cs.ucla.edu>
14597
14598 * s/gnu.h (GC_MARK_STACK): Define to GC_MAKE_GCPROS_NOOPS (Bug#9926).
14599
09db192c
PE
146002011-11-08 Paul Eggert <eggert@cs.ucla.edu>
14601
14602 Avoid some portability problems by eschewing 'extern inline' functions.
14603 The trivial performance wins aren't worth the portability hassles; see
14604 <http://lists.gnu.org/archive/html/emacs-devel/2011-11/msg00084.html>
14605 et seq.
14606 * dispextern.h (window_box, window_box_height, window_text_bottom_y)
14607 (window_box_width, window_box_left, window_box_left_offset)
14608 (window_box_right, window_box_right_offset): Undo previous change,
14609 by removing the "extern"s.
14610 * intervals.c (adjust_intervals_for_insertion)
14611 (adjust_intervals_for_deletion): Undo previous change,
14612 making these static again.
14613 (offset_intervals, temp_set_point_both, temp_set_point)
14614 (copy_intervals_to_string): No longer inline.
14615 * xdisp.c (window_text_bottom_y, window_box_width)
14616 (window_box_height, window_box_left_offset)
14617 (window_box_right_offset, window_box_left, window_box_right)
14618 (window_box): No longer inline.
14619
105216ed
CY
146202011-11-08 Chong Yidong <cyd@gnu.org>
14621
14622 * window.c (Fwindow_left_column, Fwindow_top_line): Doc fix.
6d5eb5b0
SM
14623 (Fwindow_body_height, Fwindow_body_width): Move from Lisp.
14624 Signal an error if not a live window.
105216ed
CY
14625 (Fwindow_total_width, Fwindow_total_height): Move from Lisp.
14626 (Fwindow_total_size, Fwindow_body_size): Move to Lisp.
14627
ae9e237f
JB
146282011-11-07 Juanma Barranquero <lekktu@gmail.com>
14629
14630 * lisp.h (syms_of_abbrev): Remove declaration.
14631 Reported by CHENG Gao <chenggao@royau.me>.
14632
c7aa8333
EZ
146332011-11-07 Eli Zaretskii <eliz@gnu.org>
14634
14635 * w32.c (check_windows_init_file): Don't look for term/w32-win.el
14636 if Vpurify_flag is non-nil. Fixes a crash when running w32 build
14637 of temacs in GUI mode.
14638
be7f5545
MR
146392011-11-07 Martin Rudalics <rudalics@gmx.at>
14640
14641 * window.h: Declare delete_all_child_windows instead of
14642 delete_all_subwindows.
14643 * window.c (Fwindow_nest, Fset_window_nest)
14644 (Fset_window_new_total, Fset_window_new_normal)
14645 (Fwindow_resize_apply): Don't use term subwindow in doc-strings.
14646 (delete_all_subwindows): Rename to delete_all_child_windows.
14647 (Fdelete_other_windows_internal, Fset_window_configuration):
14648 Call delete_all_child_windows instead of delete_all_subwindows.
14649 * frame.c (delete_frame): Call delete_all_child_windows instead
14650 of delete_all_subwindows.
14651
ca78dc43
PE
146522011-11-07 Paul Eggert <eggert@cs.ucla.edu>
14653
14654 * alloc.c (DEADP): New macro, for porting to GNU/Hurd (Bug#9926).
14655 This is also needed for porting to any host where GC_MARK_STACK is
14656 not GC_MAKE_GCPROS_NOOPS.
14657 (which_symbols): Use it.
14658
a0241d01
KH
146592011-11-07 Kenichi Handa <handa@m17n.org>
14660
14661 * coding.c (coding_set_destination): Check coding->src_pos only
14662 when coding->src_object is a buffer (bug#9910).
14663
14664 * process.c (send_process): Set the member src_multibyte of coding
14665 to 0 (bug#9911) when sending a unibyte text.
14666
14667 * callproc.c (Fcall_process): Set the member src_multibyte of
14668 process_coding to 0 (bug#9912).
14669
a64bfdfa 146702011-11-06 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
ba24cea2
YM
14671
14672 * xmenu.c (cleanup_widget_value_tree): New function.
14673 (xmenu_show, xdialog_show): Use it in record_unwind_protect instead of
14674 calling free_menubar_widget_value_tree directly (Bug#9830).
14675
cb41b32a
PE
146762011-11-06 Paul Eggert <eggert@cs.ucla.edu>
14677
14678 Fix some portability problems with 'inline'.
14679 * dispextern.h (window_box, window_box_height, window_text_bottom_y)
14680 (window_box_width, window_box_left, window_box_left_offset)
14681 (window_box_right, window_box_right_offset): Declare extern.
14682 Otherwise, these inline functions do not conform to C99 and
14683 are miscompiled by Microsoft compilers. Reported by Eli Zaretskii in
14684 <http://lists.gnu.org/archive/html/emacs-devel/2011-11/msg00084.html>.
14685 * intervals.c (adjust_intervals_for_insertion)
14686 (adjust_intervals_for_deletion): Now extern, because otherwise the
14687 extern inline functions 'offset_intervals' couldn't refer to it.
14688 (static_offset_intervals): Remove.
14689 (offset_intervals): Rewrite using the old contents of
14690 static_offset_intervals. The old version didn't conform to C99
14691 because an extern inline function contained a reference to an
14692 identifier with static linkage.
14693
b7041366
AS
146942011-11-06 Andreas Schwab <schwab@linux-m68k.org>
14695
14696 * keyboard.c (interrupt_signal): Don't call kill-emacs while in
14697 GC.
14698
88a37c4d
EZ
146992011-11-06 Eli Zaretskii <eliz@gnu.org>
14700
14701 * xdisp.c (init_iterator, reseat_to_string): Don't set the
14702 iterator's bidi_p flag if Vpurify_flag is non-nil. (Bug#9963)
14703 (Fcurrent_bidi_paragraph_direction): If Vpurify_flag is non-nil,
14704 return Qleft_to_right.
14705
49745b39
CY
147062011-11-06 Chong Yidong <cyd@gnu.org>
14707
14708 * window.c (Fwindow_live_p, Fwindow_frame, Fframe_root_window)
14709 (Fminibuffer_window, Fwindow_buffer, Fwindow_splits)
14710 (Fset_window_splits, Fwindow_nest, Fset_window_nest)
14711 (Fwindow_use_time, Fwindow_total_size, Fwindow_normal_size)
14712 (Fwindow_new_normal, Fwindow_left_column, Fwindow_top_line)
14713 (Fwindow_margins, Fwindow_fringes, Fwindow_scroll_bars)
14714 (Fwindow_vscroll): Doc fix.
14715 (Fwindow_top_child, Fwindow_left_child): Eliminate a nil default
14716 argument, since it makes no sense to pass a live window and for
14717 consistency with window-child.
14718
1f05cd82
CS
147192011-11-05 Christoph Scholtes <cschol2112@googlemail.com>
14720
14721 * makefile.w32-in ($(TEMACS), (gl-stamp)): Use $(THISDIR) to
14722 support MSVC.
14723
22610910
JR
147242011-11-05 Jason Rumney <jasonr@gnu.org>
14725
14726 * w32font.c (font_matches_spec): Filter out non-Japanese kana fonts.
14727 (add_font_entity_to_list): Filter out non-Japanese Shift-JIS
14728 fonts (Bug#6029).
14729 (add_font_entity_to_list): Fix logic errors in mixed boolean and
14730 bitwise arithmetic preventing use of unicode-sip and non-truetype
14731 opentype fonts.
14732
a06776b2
EZ
147332011-11-05 Eli Zaretskii <eliz@gnu.org>
14734
3ad924ba
EZ
14735 * s/ms-w32.h (fstat, stat, utime): Move redirections to
14736 "emacs"-only part.
14737
a06776b2
EZ
14738 * w32fns.c (x_create_tip_frame, Fx_create_frame): Rearrange
14739 initialization code to keep similarity to xfns.c after changes
14740 from 2011-11-05.
14741
c9e7db78
JD
147422011-11-05 Jan Djärv <jan.h.d@swipnet.se>
14743
a97f8f3f
JD
14744 * nsfns.m: Declare image_cache_refcount if GLYPH_DEBUG.
14745 (unwind_create_frame): New function (Bug#9943).
14746 (Fx_create_frame): Restructure code to be more similar to the one in
14747 xfns.c. Call record_unwind_protect with unwind_create_frame (Bug#9943).
14748 Initialize image_cache_refcount if GLYPH_DEBUG (Bug#9943).
14749 Move terminal->reference_count++ just before making the frame official
14750 (Bug#9943).
14751
14752 * nsterm.m (x_free_frame_resources): New function.
14753 (x_destroy_window): Move code to x_free_frame_resources.
14754
c9e7db78 14755 * xfns.c (unwind_create_frame): Fix comment.
6d5eb5b0
SM
14756 (Fx_create_frame, x_create_tip_frame):
14757 Move terminal->reference_count++ just before making the frame
75f1671a 14758 official. Move initialization of image_cache_refcount and
c9e7db78
JD
14759 dpyinfo_refcount before calling init_frame_faces (Bug#9943).
14760
a6fc3b5c
EZ
147612011-11-05 Eli Zaretskii <eliz@gnu.org>
14762
14763 Support MSVC build with newer versions of Visual Studio.
14764 * makefile.w32-in (TAGS-gmake): Don't use $(patsubst ...), as
14765 Nmake barfs on that. Use $(OBJ*_c) variables instead, defined on
14766 nt/gmake.defs.
14767
14768 * lisp.h (ENUM_BF): New macro, for enumerated types in bitfields,
14769 which are not supported by MSVC.
14770 (Lisp_Symbol, Lisp_Misc_Any, Lisp_Marker, Lisp_Misc_Overlay)
14771 (Lisp_Save_Value, Lisp_Free): Use ENUM_BF for enumerated types in
14772 bitfields.
14773 (Lisp_Object) [USE_LISP_UNION_TYPE]: Use ENUM_BF for enumerated
14774 types in bitfields.
14775 (DEFUN) [_MSC_VER]: Define in a different way for MSVC.
14776
14777 * w32fns.c [_MSC_VER]: DECLARE_HANDLE for any MSVC version.
14778
58179cce 147792011-11-05 Fabrice Popineau <fabrice.popineau@supelec.fr> (tiny change)
a6fc3b5c
EZ
14780
14781 Support MSVC build with newer versions of Visual Studio.
14782 * w32.c: Don't include w32api.h for MSVC.
14783 (init_environment) [_MSC_VER]: Call sys_access, not _access.
14784
14785 * s/ms-w32.h <sigset_t, ssize_t> [_MSC_VER]: Typedefs for MSVC.
14786 [_MSC_VER]: Include sys/timeb.h, sys/stat.h, and signal.h.
14787 (fstat, stat, utime) [_MSC_VER]: Redirect to their sys_* cousins.
14788 (malloc, free, realloc, calloc) [_MSC_VER]: Always redirect to the
14789 e_* cousins.
14790 (alloca) [_MSC_VER]: Define to _alloca.
14791
14792 * lisp.h (DECL_ALIGN) [_MSC_VER]: Define for MSVC.
14793
14794 * regex.c <re_char> [_MSC_VER]: A separate definition for MSVC.
14795
a58c13ed
EZ
147962011-11-04 Eli Zaretskii <eliz@gnu.org>
14797
14798 * xdisp.c (note_mouse_highlight): If either of
14799 previous/next-single-property-change returns nil, treat that as
14800 the beginning or the end of the buffer. (Bug#9955)
14801
fe0b6370
JD
148022011-11-04 Jan Djärv <jan.h.d@swipnet.se>
14803
a58c13ed 14804 * gtkutil.c (xg_make_tool_item): Add callbacks if one of wimage or
fe0b6370
JD
14805 label is not null (Bug#9951).
14806 (xg_tool_item_stale_p): Handle the fact that wimage and/or wlbl
14807 may be NULL.
14808
89bd5ee1
EZ
148092011-11-04 Eli Zaretskii <eliz@gnu.org>
14810
14811 * window.c (Fwindow_body_size): Mention in the doc string that the
14812 return value is in frame's canonical units. (Bug#9949)
14813
84c3edb9
EZ
148142011-11-03 Eli Zaretskii <eliz@gnu.org>
14815
4e2fb5c7
EZ
14816 * xdisp.c (note_mouse_highlight): Initialize `area'. (Bug#9947)
14817
84c3edb9 14818 * w32fns.c (unwind_create_frame): If needed, free the glyph
3ab15fd6 14819 matrices of the partially constructed frame. (Bug#9943)
2a58bbc1 14820 * xfns.c (unwind_create_frame): Likewise.
84c3edb9 14821
bc17a887
EZ
148222011-11-01 Eli Zaretskii <eliz@gnu.org>
14823
14824 * xdisp.c (mouse_face_from_buffer_pos): Fix a typo in a comment.
14825 Don't stop backward scan on the continuation glyph, even though
14826 its CHARPOS is positive.
6d5eb5b0
SM
14827 (mouse_face_from_buffer_pos, note_mouse_highlight):
14828 Rename cover_string to disp_string.
bc17a887 14829
4ee88440
MR
148302011-11-01 Martin Rudalics <rudalics@gmx.at>
14831
14832 * window.c (temp_output_buffer_show): Don't use
14833 Vtemp_buffer_show_specifiers.
14834 (Vtemp_buffer_show_specifiers): Remove unused variable.
14835
c2ff3c02
EZ
148362011-10-30 Eli Zaretskii <eliz@gnu.org>
14837
14838 * xdisp.c (try_cursor_movement): Make sure ROW isn't decremented
14839 past the beginning of the current glyph matrix.
14840
58179cce 148412011-10-30 Adam Sjøgren <asjo@koldfront.dk> (tiny change)
6e56383b
JD
14842
14843 * xterm.c: Include X11/Xproto.h if HAVE_GTK3.
14844 (x_error_handler): Ignore BadMatch for X_SetInputFocus for
14845 HAVE_GTK3 (Bug#9869).
b77a6a7f 14846
3b574623
JD
14847 * gtkutil.c (xg_win_to_widget, xg_event_is_for_menubar): Initialize
14848 type to GDK_NOTHING so valgrind does not complain (Bug#9901).
14849
b77a6a7f
JD
14850 * xterm.h (x_display_info): Add Xatom_net_wm_state_hidden (Bug#9893).
14851
14852 * xterm.c: Declare x_handle_net_wm_state to return int.
14853 (handle_one_xevent): Check if we are iconified but don't have
14854 _NET_WM_STATE_HIDDEN. If do, treat as deiconify (Bug#9893).
14855 (get_current_wm_state): Return non-zero if not hidden,
14856 check for _NET_WM_STATE_HIDDEN (Bug#9893).
14857 (do_ewmh_fullscreen): Ignore return value from get_current_wm_state.
14858 (x_handle_net_wm_state): Return what get_current_wm_state returns.
14859 (x_term_init): Initialize dpyinfo->Xatom_net_wm_state_hidden.
14860
196e41e4
PE
148612011-10-29 Paul Eggert <eggert@cs.ucla.edu>
14862
14863 * alloc.c (which_symbols): Declare EXTERNALLY_VISIBLE,
14864 so that this new function doesn't get optimized away by a
14865 whole-program optimizer. Make the 2nd arg EMACS_INT, not int.
14866
021f2e1a
AS
148672011-10-29 Andreas Schwab <schwab@linux-m68k.org>
14868
14869 * frame.h (MOUSE_HL_INFO): Remove excess parens.
14870
8b058d44
EZ
148712011-10-29 Eli Zaretskii <eliz@gnu.org>
14872
14873 Fix the `xbytecode' command.
14874 * .gdbinit (xprintbytestr): New command.
b50a28de 14875 (xwhichsymbols): Rename from `which'; all callers changed.
8b058d44
EZ
14876 (xbytecode): Print the byte-code string as well.
14877
4452fb80
EZ
148782011-10-29 Kim Storm <storm@cua.dk>
14879
8b058d44
EZ
14880 * alloc.c (which_symbols): New function.
14881
21b72067
AS
148822011-10-29 Andreas Schwab <schwab@linux-m68k.org>
14883
14884 * minibuf.c (read_minibuf_noninteractive): Allow reading empty
14885 line. (Bug#9903)
14886
83ed7b5c
GM
148872011-10-29 Glenn Morris <rgm@gnu.org>
14888
14889 * process.c (wait_reading_process_output): Revert 2009-08-30 change.
14890 Not clear what it was for, and it causes various bugs. (Bug#9839)
14891
5a7a728b
EZ
148922011-10-28 Eli Zaretskii <eliz@gnu.org>
14893
14894 * xdisp.c (note_mouse_highlight): Initialize `part', to avoid a
14895 possible random value that matches one of those tested as
14896 condition to clear the mouse face.
14897
d3d0842f
CY
148982011-10-28 Chong Yidong <cyd@gnu.org>
14899
14900 * xdisp.c (note_mouse_highlight): Fix use of uninitialized var.
14901
31b39d13
DN
149022011-10-28 Dan Nicolaescu <dann@ics.uci.edu>
14903
14904 * window.c (make_window): Initialize phys_cursor_on_p.
14905
9aba6043
SM
149062011-10-28 Stefan Monnier <monnier@iro.umontreal.ca>
14907
14908 * lisp.h (struct Lisp_Symbol): Update comments.
14909
c20992f4
JB
149102011-10-28 Juanma Barranquero <lekktu@gmail.com>
14911
14912 * w32font.c (w32_load_unicows_or_gdi32): Add missing return.
14913
db4f02f2
EZ
149142011-10-28 Eli Zaretskii <eliz@gnu.org>
14915
14916 Fix Emacs on Windows 9X (bug#8562). Thanks to oslsachem
14917 <oslsachem@gmail.com> for helping to debug this.
14918
14919 * w32font.c (g_b_init_is_w9x, g_b_init_get_outline_metrics_w)
14920 (g_b_init_get_text_metrics_w, g_b_init_get_glyph_outline_w)
14921 (g_b_init_get_glyph_outline_w): New static variables.
14922 (GetOutlineTextMetricsW_Proc, GetTextMetricsW_Proc)
14923 (GetGlyphOutlineW_Proc): New typedefs.
14924 (w32_load_unicows_or_gdi32, get_outline_metrics_w)
9aba6043
SM
14925 (get_text_metrics_w, get_glyph_outline_w, globals_of_w32font):
14926 New functions.
14927 (w32font_open_internal, compute_metrics):
14928 Call get_outline_metrics_w, get_text_metrics_w, and get_glyph_outline_w
db4f02f2
EZ
14929 instead of calling the "wide" APIs directly.
14930
14931 * emacs.c (main) [HAVE_NTGUI]: Call globals_of_w32font.
14932
14933 * w32.h (syms_of_w32font): Add prototype.
14934
87e68db4
JB
149352011-10-27 Juanma Barranquero <lekktu@gmail.com>
14936
14937 * window.c (Fframe_root_window, Fframe_first_window, Fwindow_end)
14938 (Fframe_selected_window, Ftemp_output_buffer_show, Fnext_window)
14939 (Fdelete_window_internal, Fwindow_parameters): Fix typos in docstrings.
14940 (Fmove_to_window_line): Doc fix.
14941
435c1d67
CY
149422011-10-27 Chong Yidong <cyd@gnu.org>
14943
14944 * process.c (make_process): Set gnutls_state to NULL.
14945
14946 * gnutls.c (emacs_gnutls_deinit): Deinit the gnutls_state if it is
14947 non-NULL, regardless of GNUTLS_INITSTAGE.
14948 (Fgnutls_boot): Cleanups. Call emacs_gnutls_deinit if we signal
14949 an error. Set process slots as soon as we allocate them.
14950
14951 * gnutls.h (GNUTLS_LOG, GNUTLS_LOG2): Fix macros.
14952
9c6c6f49
CY
149532011-10-27 Chong Yidong <cyd@gnu.org>
14954
9aba6043
SM
14955 * gnutls.c (emacs_gnutls_deinit): New function.
14956 Deallocate credentials structures as well as calling gnutls_deinit.
9c6c6f49
CY
14957 (Fgnutls_deinit, Fgnutls_boot): Use it.
14958
14959 * process.c (make_process): Initialize GnuTLS credentials to NULL.
14960 (deactivate_process): Call emacs_gnutls_deinit.
14961
657d08d3
JB
149622011-10-27 Juanma Barranquero <lekktu@gmail.com>
14963
14964 * image.c (x_create_x_image_and_pixmap):
14965 * w32.c (sys_rename, w32_delayed_load):
14966 * w32font.c (fill_in_logfont):
14967 * w32reg.c (x_get_string_resource): Silence compiler warnings.
14968
5430d399
JB
149692011-10-26 Juanma Barranquero <lekktu@gmail.com>
14970
14971 * w32fns.c (w32_default_color_map): New function,
14972 extracted from Fw32_default_color_map.
a7ef684b 14973 (Fw32_default_color_map, Fx_open_connection): Use it. (Bug#9785)
5430d399 14974
fe0055fa
PE
149752011-10-25 Paul Eggert <eggert@cs.ucla.edu>
14976
14977 * dispextern.h (Fcontrolling_tty_p): New decl (Bug#6649 part 2).
14978
e6346438
SM
149792011-10-25 Stefan Monnier <monnier@iro.umontreal.ca>
14980
14981 * keyboard.c (test_undefined): New function (bug#9751).
14982 (read_key_sequence): Use it to detect when a key is bound to `undefined'.
14983
e112cc37
ET
149842011-10-25 Enami Tsugutomo <tsugutomo.enami@jp.sony.com>
14985
14986 * sysdep.c (init_sys_modes): Fix the check for the controlling
14987 terminal (Bug#6649).
14988
7b5d6677
EZ
149892011-10-20 Eli Zaretskii <eliz@gnu.org>
14990
14991 * dispextern.h (struct bidi_it): New member next_en_type.
14992
14993 * bidi.c (bidi_line_init): Initialize the next_en_type member.
14994 (bidi_resolve_explicit_1): When next_en_pos is valid for the
14995 current character, check also for next_en_type being WEAK_EN.
14996 (bidi_resolve_weak): Don't enter the expensive loop if the current
14997 position is before next_en_pos. Record the bidi type of the first
14998 non-ET, non-BN character we find, in addition to its position.
14999 (bidi_level_of_next_char): Invalidate next_en_type when
15000 next_en_pos is over-stepped.
15001
7da0b018
PE
150022011-10-20 Paul Eggert <eggert@cs.ucla.edu>
15003
15004 Time zone name fixes for non-ASCII locales (Bug#641, Bug#9794)
15005 * editfns.c: Rewrite current-time-zone so that it invokes
15006 the equivalent of (format-time-string "%Z") to get the time zone name.
15007 This fixes a bug when the time zone name contains characters that
15008 need converting from the system time locale to Emacs internal format.
15009 This fixes a shortcoming that I introduced in my 1999-10-19 patch:
15010 that patch fixed format-time-string to do the conversion, but
15011 I forgot to fix current-time-zone.
15012 (format_time_string): New function, containing most of
15013 what Fformat_time_string used to contain.
15014 (Fformat_time_string): Rewrite in terms of format_time_string.
15015 This doesn't change this function's behavior.
15016 (current-time-zone): Rewrite to use format_time_string.
15017 This fixes the bug reported by Michael Schierl in
15018 <http://lists.gnu.org/archive/html/emacs-devel/2007-06/msg00334.html>.
15019 Jason Rumney's 2007-06-07 change worked around this bug, but
15020 didn't fix it.
15021 * systime.h (tzname, timezone): Remove no-longer-used declarations.
15022
8547b010
EZ
150232011-10-19 Eli Zaretskii <eliz@gnu.org>
15024
15025 * xdisp.c (start_display): If the character at POS is displayed
15026 via a display vector, reset IT->current.dpvec_index to zero.
12b32963
EZ
15027 (try_window_reusing_current_matrix): If a line ends in a display
15028 vector or the next line starts in a display vector, continue
15029 redrawing the window even though the character position of
15030 start_row was reached.
8547b010
EZ
15031 (Bug#9771, part 2)
15032
4e948d15
CY
150332011-10-18 Chong Yidong <cyd@gnu.org>
15034
15035 * xdisp.c (get_next_display_element): Handle U+2010 and U+2011
15036 with nobreak-char-display too.
15037
4787455f
EZ
150382011-10-18 Eli Zaretskii <eliz@gnu.org>
15039
15040 Fix part 3 of bug#9771.
15041 * bidi.c (bidi_line_init): Initialize next_en_pos to zero, not -1.
15042 (bidi_resolve_neutral): Don't enter the expensive loop looking for
15043 non-neutral characters if the current character is a paragraph
15044 separator (a.k.a. Newline). This avoids running the same
15045 expensive loop twice, once when we consume the preceding newline
15046 and the other time when the line actually needs to be displayed.
15047 Avoid the loop when we see neutrals on the base embedding level
15048 following a character whose directionality is the same as the
15049 paragraph's. This avoids running the expensive loop when a line
15050 ends in a long sequence of neutrals, like control characters.
15051 Add assertion against STRONG_AL type. Slightly rearrange code
15052 that determines the type of a neutral given the first non-neutral
15053 that follows it.
15054 (bidi_level_of_next_char): Set next_en_pos to zero when
15055 invalidating its info.
15056
2c91f553
EZ
150572011-10-17 Eli Zaretskii <eliz@gnu.org>
15058
15059 * xdisp.c (push_display_prop): Determine whether to record string
15060 or buffer position by IT->string, not by IT->method. Allow
15061 GET_FROM_DISPLAY_VECTOR as IT->method on entry. (Bug#9771, part 4)
f2ff9e88
EZ
15062 (move_it_vertically_backward): Don't look for character position
15063 immediately after the newline when in a continuation line.
15064 (Bug#9771, part 1)
2c91f553 15065
c7b08b0d
MR
150662011-10-15 Martin Rudalics <rudalics@gmx.at>
15067
15068 * window.c (coordinates_in_window): Rewrite and delabelize
15069 vertical border check. (Bug#5357) (Bug#9618)
15070
6b02f655
SM
150712011-10-14 Stefan Monnier <monnier@iro.umontreal.ca>
15072
15073 * xterm.c (frame_highlight, frame_unhighlight): Ignore unexplained
15074 errors in XSetWindowBorder (bug#9310).
15075
81d40c92
DA
150762011-10-13 Dmitry Antipov <dmantipov@yandex.ru>
15077
15078 * editfns.c (Fset_time_zone_rule): Replace free with xfree to
15079 avoid crash when xmalloc overrun checking is enabled.
15080
d4172c3b
EZ
150812011-10-13 Eli Zaretskii <eliz@gnu.org>
15082
15083 * xdisp.c (Fcurrent_bidi_paragraph_direction): Initialize
15084 itb.paragraph_dir to NEUTRAL_DIR. Fixes an occasional incorrect
15085 cursor motion with <left> and <right> arrow keys.
15086
15087 * bidi.c (bidi_init_it): Don't initialize paragraph_dir here, as
15088 some callers set that themselves.
15089
b00eea75
EZ
150902011-10-12 Eli Zaretskii <eliz@gnu.org>
15091
15092 * xdisp.c (find_row_edges): Handle the case where ROW comes from a
15093 display string and the previous row comes from the same string and
15094 is empty. (Bug#9739) (Bug#9738)
15095
8fe012c4
SM
150962011-10-12 Stefan Monnier <monnier@iro.umontreal.ca>
15097
15098 * doc.c (get_doc_string): Encode file name (bug#9735).
15099
0074aef2
EZ
151002011-10-12 Eli Zaretskii <eliz@gnu.org>
15101
79beb178
EZ
15102 * bidi.c (bidi_level_of_next_char):
15103 * xdisp.c (get_visually_first_element): Remove old incorrect
15104 comments regarding the Unicode Line Separator character.
15105
0074aef2
EZ
15106 * bidi.c (bidi_init_it): Initialize paragraph_dir to NEUTRAL_DIR.
15107
6e4b3fbe
DA
151082011-10-12 Dmitry Antipov <dmantipov@yandex.ru>
15109
15110 * alloc.c (Fgc_status): Do not access beyond zombies array
15111 boundary if nzombies > MAX_ZOMBIES.
15112 * alloc.c (dump_zombies): Add missing format specifier.
15113
0324f3af
PE
151142011-10-12 Paul Eggert <eggert@cs.ucla.edu>
15115
b5525cac
PE
15116 * xdisp.c (set_cursor_from_row): Simplify conditionals,
15117 to pacify GCC 4.6.1 x86-64 with -O2 -Wstrict-overflow.
15118
0324f3af
PE
15119 * lread.c (read_escape): Allow hex escapes as large as ?\xfffffff.
15120 Some packages use them to denote characters with modifiers.
15121
e9b5f888
AS
151222011-10-11 Andreas Schwab <schwab@linux-m68k.org>
15123
15124 * lisp.h (GCPRO1_VAR, GCPRO2_VAR, GCPRO3_VAR, GCPRO4_VAR)
15125 (GCPRO5_VAR, GCPRO6_VAR, UNGCPRO_VAR): Add whitespace to avoid
15126 matching a pp-number. Rename parameter var to var1.
15127
127827c0
SM
151282011-10-11 Stefan Monnier <monnier@iro.umontreal.ca>
15129
15130 * minibuf.c (Finternal_complete_buffer): Fix last change (bug#9709).
15131
c8fd3bd0
GM
151322011-10-08 Glenn Morris <rgm@gnu.org>
15133
15134 * callint.c (Fcall_interactively): Give a more explicit error for the
15135 'c' case with a non-character input. (Bug#8479)
15136
352ec8ff
EZ
151372011-10-08 Eli Zaretskii <eliz@gnu.org>
15138
03669ccb
EZ
15139 * xdisp.c (hscroll_window_tree): Support hscroll in right-to-left
15140 lines.
7061c986
EZ
15141 (set_cursor_from_row): Fix cursor positioning in mixed L2R+R2L
15142 lines that are hscrolled on the left.
03669ccb 15143
352ec8ff
EZ
15144 * dispnew.c (buffer_posn_from_coords): Account for a possible
15145 presence of header-line. (Bug#4426)
15146
a66cfb1c
SM
151472011-10-07 Stefan Monnier <monnier@iro.umontreal.ca>
15148
6b02f655
SM
15149 * buffer.c (syms_of_buffer) <enable-multibyte-characters>:
15150 Don't advertise functionality which we discourage or doesn't work.
a66cfb1c 15151
7c5ee88e
PE
151522011-10-07 Paul Eggert <eggert@cs.ucla.edu>
15153
15154 * alloc.c (GC_LISP_OBJECT_ALIGNMENT): Use offsetof, not __alignof__
15155 or sizeof. __alignof__ gives the wrong answer on Fedora x86-64
15156 with GCC 4.6.1 when configured with CC='gcc -m32' --with-wide-int;
15157 this makes Emacs dump core during garbage collection on rare
15158 occasions. sizeof is obviously inferior to offsetof here, so
15159 stick with offsetof.
15160 (GC_POINTER_ALIGNMENT): New macro.
15161 (mark_memory): Omit 3rd (offset) arg; caller changed.
15162 Don't assume EMACS_INT alignment is the same as pointer alignment.
15163
df1bbe5b
SM
151642011-10-03 Stefan Monnier <monnier@iro.umontreal.ca>
15165
15166 * keyboard.c (read_key_sequence_remapped): New var.
15167 (read_key_sequence): Compute remapping in the right buffer.
15168 (command_loop_1): Use read_key_sequence's remapping directly.
15169
51553db6
SM
151702011-10-02 Stefan Monnier <monnier@iro.umontreal.ca>
15171
32c1fffd
SM
15172 * dired.c (file_name_completion): Don't expand file name.
15173 (Ffile_name_completion, Ffile_name_all_completions): Expand file name
15174 before checking file name handler.
15175
51553db6
SM
15176 * minibuf.c (Finternal_complete_buffer): Only show internal buffers if
15177 they've been requested explicitly (bug#9591).
15178
b6bd1599 151792011-10-01 Andreas Schwab <schwab@linux-m68k.org>
fa2ec41f
AS
15180
15181 * keymap.c (Fsingle_key_description): Use make_specified_string
15182 instead of build_string to build string from push_key_description.
15183 (Bug#5193)
15184
f701dc2a
PE
151852011-09-30 Paul Eggert <eggert@cs.ucla.edu>
15186
4222c55d
PE
15187 * buffer.h (struct buffer): Use time_t, not int, for a time stamp.
15188 This fixes a Y2038 bug on 64-bit hosts.
15189 * buffer.c (reset_buffer):
15190 * fileio.c (Fdo_auto_save, Fset_buffer_auto_saved)
15191 (Fclear_buffer_auto_save_failure):
15192 Use 0, not -1, to represent an unset failure time, since time_t
15193 might not be signed.
15194
f701dc2a
PE
15195 Remove dependency on glibc malloc internals.
15196 * alloc.c (XMALLOC_OVERRUN_CHECK_OVERHEAD, XMALLOC_OVERRUN_CHECK_SIZE):
15197 Move back here from lisp.h, but with their new implementations.
15198 (XMALLOC_BASE_ALIGNMENT, COMMON_MULTIPLE, XMALLOC_HEADER_ALIGNMENT)
15199 (XMALLOC_OVERRUN_SIZE_SIZE): Move these new lisp.h macros here.
15200 * charset.c (charset_table_init): New static var.
15201 (syms_of_charset): Use it instead of xmalloc. This removes a
15202 dependency on glibc malloc internals. See Eli Zaretskii's comment in
15203 <http://lists.gnu.org/archive/html/emacs-devel/2011-09/msg00815.html>.
15204 * lisp.h (XMALLOC_OVERRUN_CHECK_OVERHEAD, XMALLOC_OVERRUN_CHECK_SIZE):
15205 Move back to alloc.c.
15206 (XMALLOC_BASE_ALIGNMENT, COMMON_MULTIPLE, XMALLOC_HEADER_ALIGNMENT)
15207 (XMALLOC_OVERRUN_SIZE_SIZE): Move to alloc.c.
15208
9ceebf39
JD
152092011-09-30 Jan Djärv <jan.h.d@swipnet.se>
15210
15211 * nsterm.m (windowDidResize): Call x_set_window_size only when
15212 ns_in_resize is true. Otherwise set pixelwidth/height and
15213 call change_frame_size (Bug#9628).
15214
cb993c58
PE
152152011-09-30 Paul Eggert <eggert@cs.ucla.edu>
15216
3930c88b
PE
15217 Port --enable-checking=all to Fedora 14 x86-64.
15218 * charset.c (syms_of_charset): Also account for glibc malloc's
15219 internal overhead when calculating the initial malloc maximum.
15220
cb993c58
PE
15221 Port --enable-checking=all to Fedora 14 x86.
15222 * alloc.c (XMALLOC_OVERRUN_CHECK_OVERHEAD, XMALLOC_OVERRUN_CHECK_SIZE):
15223 Move to lisp.h.
15224 (xmalloc_put_size, xmalloc_get_size, overrun_check_malloc)
15225 (overrun_check_realloc, overrun_check_free):
15226 Use XMALLOC_OVERRUN_SIZE_SIZE, not sizeof (size_t).
15227 That way, xmalloc returns a properly-aligned pointer even if
15228 XMALLOC_OVERRUN_CHECK is defined. The old debugging code happened
15229 to align OK on typical 64-bit hosts, but not on Fedora 14 x86.
15230 * charset.c (syms_of_charset): Take XMALLOC_OVERRUN_CHECK_OVERHEAD
15231 into account when calculating the initial malloc maximum.
15232 * lisp.h (XMALLOC_OVERRUN_CHECK_OVERHEAD, XMALLOC_OVERRUN_CHECK_SIZE):
15233 Move here from alloc.c, so that charset.c can use it too.
15234 Properly align; the old code wasn't right for common 32-bit hosts
15235 when configured with --enable-checking=all.
15236 (XMALLOC_BASE_ALIGNMENT, COMMON_MULTIPLE, XMALLOC_HEADER_ALIGNMENT)
15237 (XMALLOC_OVERRUN_SIZE_SIZE): New macros.
15238
31bed486
EZ
152392011-09-29 Eli Zaretskii <eliz@gnu.org>
15240
04c70788 15241 * sysdep.c (snprintf) [!EOVERFLOW]: If EOVERFLOW is not defined,
31bed486
EZ
15242 use EDOM.
15243
fbcaa2f3
EZ
152442011-09-28 Eli Zaretskii <eliz@gnu.org>
15245
15246 * xdisp.c (compute_display_string_end): If there's no display
15247 string at CHARPOS, return -1.
15248
15249 * bidi.c (bidi_fetch_char): When compute_display_string_end
15250 returns a negative value, treat the character as a normal
15251 character not covered by a display string. (Bug#9624)
15252
a239d4e9
JB
152532011-09-28 Juanma Barranquero <lekktu@gmail.com>
15254
15255 * lread.c (Fread_from_string): Fix typo in docstring.
15256
88652fd5
EZ
152572011-09-27 Eli Zaretskii <eliz@gnu.org>
15258
15259 * xdisp.c (handle_invisible_prop): If invisible text ends on a
15260 newline, reseat the iterator instead of bidi-iterating there one
15261 character at a time. (Bug#9610)
32c1fffd
SM
15262 (BUFFER_POS_REACHED_P, move_it_in_display_line_to): Bail when past
15263 TO_CHARPOS if the bidi iterator is at base embedding level.
88652fd5 15264
ed497dd4
AS
152652011-09-27 Andreas Schwab <schwab@linux-m68k.org>
15266
15267 * lread.c (readevalloop): Use correct code for NBSP.
15268 (read1): Likewise. (Bug#9608)
15269
b2bf61aa
MA
152702011-09-25 Michael Albinus <michael.albinus@gmx.de>
15271
15272 * dbusbind.c (Fdbus_register_signal): When service is not
15273 registered, use nil in Vdbus_registered_objects_table. (Bug#9581)
15274
32bbb17c
GM
152752011-09-25 Glenn Morris <rgm@gnu.org>
15276
15277 * buffer.c (truncate-lines): Doc fix.
15278
94e0933e
CY
152792011-09-24 Chong Yidong <cyd@stupidchicken.com>
15280
15281 * window.c (Fwindow_prev_buffers, Fset_window_prev_buffers)
15282 (Fset_window_next_buffers): Doc fix.
15283
cddde921
GM
152842011-09-24 Glenn Morris <rgm@gnu.org>
15285
15286 * minibuf.c (read_minibuf): Disable line truncation. (Bug#5715)
15287
1260aef1
PE
152882011-09-24 Paul Eggert <eggert@cs.ucla.edu>
15289
25b4bfa0
PE
15290 Fix minor problems found by static checking.
15291 * xdisp.c (string_from_display_spec): Don't assume vecsize fits in int.
1260aef1
PE
15292 * indent.c (Fvertical_motion): Fix == vs = typo.
15293
e3cbd34b
EZ
152942011-09-24 Eli Zaretskii <eliz@gnu.org>
15295
a66cfb1c
SM
15296 * dispnew.c (syms_of_display) <redisplay-dont-pause>:
15297 Default value is now t. Doc fix.
6bf7006f 15298
e3cbd34b 15299 * indent.c (Fvertical_motion): Compute and apply the overshoot
32c1fffd 15300 logic when moving up, not only when moving down. Fix the
e3cbd34b 15301 confusing name and values of the it_overshoot_expected variable;
32c1fffd 15302 logic changes accordingly. (Bug#9254) (Bug#9549)
e3cbd34b
EZ
15303
15304 * xdisp.c (pos_visible_p): Produce correct pixel coordinates when
15305 CHARPOS is covered by a display string which includes newlines.
15306 (move_it_vertically_backward): Avoid inflooping when START_CHARPOS
15307 is covered by a display string with embedded newlines.
15308
a3de0cbd
MA
153092011-09-24 Michael Albinus <michael.albinus@gmx.de>
15310
15311 * dbusbind.c (Fdbus_register_signal): Add match rule to
15312 Vdbus_registered_objects_table. (Bug#9581)
a66cfb1c
SM
15313 (Fdbus_register_method, Vdbus_registered_objects_table):
15314 Fix docstring.
a3de0cbd 15315
b260039d
JM
153162011-09-24 Jim Meyering <meyering@redhat.com>
15317
32c1fffd 15318 do not ignore write error for any output size
b260039d
JM
15319 The previous change was incomplete.
15320 While it makes emacs --batch detect the vast majority of stdout
15321 write failures, errors were still ignored whenever the output size is
15322 k * (BUFSIZ+1) - 4. E.g., on a system with BUFSIZ of 4096,
15323 $ emacs --batch --eval '(print (format "%4093d" 0))' > /dev/full \
15324 && echo FAIL: ignored write error
15325 FAIL: ignored write error
15326 $ emacs --batch --eval '(print (format "%20481d" 0))' > /dev/full \
15327 && echo FAIL: ignored write error
15328 FAIL: ignored write error
15329 * emacs.c (Fkill_emacs): Also test ferror. (Bug#9574)
15330
8eca8a7c
AS
153312011-09-23 Andreas Schwab <schwab@linux-m68k.org>
15332
15333 * emacs.c (Fkill_emacs): In noninteractive mode exit
15334 non-successfully if a write error occurred on stdout. (Bug#9574)
15335
3341db62
EZ
153362011-09-21 Eli Zaretskii <eliz@gnu.org>
15337
15338 * xdisp.c (pop_it): Allow it->object that is a cons cell to pass
15339 the xassert test.
15340
15341 * dispextern.h (struct it): Update the comment documenting what
15342 can it->OBJECT be.
15343
8c203dbf
EZ
153442011-09-20 Eli Zaretskii <eliz@gnu.org>
15345
15346 * xdisp.c (set_cursor_from_row): If the row ends in a newline from
15347 a display string, extend search for cursor position to end of row.
15348 (find_row_edges): If the row ends in a newline from a display
15349 string, increment its MATRIX_ROW_END_CHARPOS by one. (Bug#9549)
15350 Handle the case of a display string with multiple newlines.
fd317ddf
EZ
15351 (Fcurrent_bidi_paragraph_direction): Fix search for previous
15352 non-empty line. Fixes confusing cursor motion with arrow keys at
15353 the beginning of a line that starts with whitespace.
8c203dbf 15354
a4824228
LMI
153552011-09-19 Lars Magne Ingebrigtsen <larsi@gnus.org>
15356
15357 * lread.c (Fread_from_string): Document what FINAL-STRING-INDEX is
15358 (bug#9493).
15359
33ed493b
CY
153602011-09-18 Chong Yidong <cyd@stupidchicken.com>
15361
15362 * xfns.c (Fx_create_frame): Handle the bitmapIcon resource as
15363 boolean (Bug#9154).
15364
56cd55c8
EZ
153652011-09-18 Eli Zaretskii <eliz@gnu.org>
15366
15367 * xdisp.c (display_line): Record maximum and minimum buffer
15368 positions even if no glyphs were produced (e.g., by a zero-width
15369 stretch). Fixes bug#9530 on a TTY. Under word-wrap, don't record
15370 buffer positions that will be removed from the glyph row because
15371 they don't fit.
c02dcedf
EZ
15372 (produce_stretch_glyph): Fix a bug in :align-to on a TTY when the
15373 column is beyond frame width: don't subtract 1 "pixel" when
15374 computing width of the stretch.
3e62b7e0
EZ
15375 (reseat_at_next_visible_line_start): Undo the change made on
15376 2011-09-17 that saved paragraph information and restored it after
15377 the call to `reseat'. (Bug#9545)
56cd55c8 15378
5ed99d36 153792011-09-18 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
3390454c
YM
15380
15381 * xdisp.c (expose_window): Save original value of phys_cursor_on_p
15382 and turn window cursor on if cleared (Bug#9415).
15383
5ed99d36 153842011-09-18 Andreas Schwab <schwab@linux-m68k.org>
edb7b4dc
AS
15385
15386 * search.c (boyer_moore): Take unibyte characters from pattern
15387 literally. (Bug#9458)
15388
9bade7b2
EZ
153892011-09-18 Eli Zaretskii <eliz@gnu.org>
15390
15391 * xdisp.c (reseat_at_next_visible_line_start): Fix last change.
15392
e5e9d610
PE
153932011-09-18 Paul Eggert <eggert@cs.ucla.edu>
15394
87e4427a
PE
15395 Fix minor problem found by static checking.
15396 * xdisp.c (reseat_at_next_visible_line_start): Mark locals as
15397 initialized, to pacify gcc -Wuninitialized.
15398
e5e9d610
PE
15399 * fileio.c: Report proper errno when syscall falls.
15400 (Finsert_file_contents): Save and restore errno,
15401 so that report_file_error outputs the correct diagnostic.
15402 (Fwrite_region) [CLASH_DETECTION]: Likewise.
15403
a1674f0b
EZ
154042011-09-18 Eli Zaretskii <eliz@gnu.org>
15405
15406 * .gdbinit (pgx): Fix references to fields of `struct glyph'.
15407
fbfb6dd4
EZ
154082011-09-17 Eli Zaretskii <eliz@gnu.org>
15409
15410 * xdisp.c (produce_stretch_glyph): Another fix for changes made on
15411 2011-08-30T17:32:44Z!eliz@gnu.org. (Bug#9530)
15412
bb187662
EZ
154132011-09-17 Eli Zaretskii <eliz@gnu.org>
15414
1137e8b8 15415 * xdisp.c (reseat_at_next_visible_line_start): Keep information
6b02f655 15416 about the current paragraph and restore it after the call to reseat.
1137e8b8
EZ
15417
15418 * bidi.c (MAX_PARAGRAPH_SEARCH): New macro.
15419 (bidi_find_paragraph_start): Search back for paragraph beginning
15420 at most MAX_PARAGRAPH_SEARCH lines; if not found, return BEGV_BYTE.
15421 (bidi_move_to_visually_next): Only trigger paragraph-related
15422 computations when the last character is a newline or at EOB, not
15423 just any NEUTRAL_B. (Bug#9470)
15424
bb187662
EZ
15425 * xdisp.c (set_cursor_from_row): Don't invoke special treatment of
15426 truncated lines if point is covered by a display string. (Bug#9524)
15427
2e621251
PE
154282011-09-16 Paul Eggert <eggert@cs.ucla.edu>
15429
15430 * xselect.c: Relax test for outgoing X longs (Bug#9498).
15431 (cons_to_x_long): New function.
15432 (lisp_data_to_selection_data): Use it. Correct the test for
15433 short-versus-long data; it was negated. Break out of vector
15434 loop, for efficiency, when a long datum is discovered.
15435
91a15bc6
SM
154362011-09-16 Stefan Monnier <monnier@iro.umontreal.ca>
15437
15438 * eval.c (Fquote): Document its non-consing behavior (bug#9482).
15439
b41c3a35
EZ
154402011-09-16 Eli Zaretskii <eliz@gnu.org>
15441
15442 * image.c (tiff_handler): Work around a bug in MinGW GCC 3.x (see
15443 GCC PR/17406) by declaring this function with external scope.
15444
7812ba2d
PE
154452011-09-15 Paul Eggert <eggert@cs.ucla.edu>
15446
15447 * editfns.c (Fformat): Fix bug in text-property fix (Bug#9514).
15448 Don't mishandle (length (format "%%")) and (format "%4000s%%" "").
15449
cf7edc2a
AS
154502011-09-15 Andreas Schwab <schwab@linux-m68k.org>
15451
15452 * editfns.c (Fformat): Correctly handle text properties on "%%".
15453
bd01620e
EZ
154542011-09-15 Eli Zaretskii <eliz@gnu.org>
15455
15456 * xterm.c (x_draw_composite_glyph_string_foreground):
15457 * w32term.c (x_draw_composite_glyph_string_foreground):
15458 * term.c (encode_terminal_code):
15459 * composite.c (composition_update_it, get_composition_id):
15460 * xdisp.c (get_next_display_element)
15461 (fill_composite_glyph_string): Add comments about special meaning
15462 of TAB characters in a composition.
15463
a02719a3
PE
154642011-09-15 Paul Eggert <eggert@cs.ucla.edu>
15465
15466 * editfns.c (Fformat): Fix off-by-1 bug for "%%b" (Bug#9514).
4c122725
PE
15467 This occurs when processing a multibyte format.
15468 Problem reported by Wolfgang Jenker.
a02719a3 15469
72589a3c
JB
154702011-09-15 Johan Bockgård <bojohan@gnu.org>
15471
15472 * xdisp.c (try_cursor_movement): Only check for exact match if
15473 cursor hpos found by set_cursor_from_row is valid. (Bug#9495)
15474
1c14176c
PE
154752011-09-14 Paul Eggert <eggert@cs.ucla.edu>
15476
15477 Remove unused external symbols.
15478 * dispextern.h (calc_pixel_width_or_height): Remove decl.
15479 * xdisp.c (calc_pixel_width_or_height): Now static.
15480 * doprnt.c (exprintf) [! (HAVE_X_WINDOWS && USE_X_TOOLKIT)]: Remove.
15481 * indent.c (check_display_width):
15482 * w32term.c: Fix comment to match code.
15483 * xterm.c, xterm.h (x_catching_errors): Remove.
15484
d2eea5b5
PE
154852011-09-14 Paul Eggert <eggert@cs.ucla.edu>
15486
15487 * xselect.c: Use signed conversions more consistently (Bug#9498).
15488 (selection_data_to_lisp_data): Assume incoming selection data are
15489 signed integers, not unsigned. This is to be consistent with
15490 outgoing selection data, which was modified to use signed integers
15491 in as part of the fix to Bug#9196 in response to Jan D.'s comment
15492 in <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9196#32> that X11
15493 expects long, not unsigned long.
15494
46888499
EZ
154952011-09-14 Eli Zaretskii <eliz@gnu.org>
15496
15497 * xdisp.c (try_window_reusing_current_matrix): Fix incorrect
15498 computation of loop end. Reported by Johan Bockgård
15499 <bojohan@gnu.org>.
15500
ef8ef9fb
CY
155012011-09-13 Chong Yidong <cyd@stupidchicken.com>
15502
15503 * frame.c (Fother_visible_frames_p): Function deleted.
15504
fa819fed
EZ
155052011-09-12 Eli Zaretskii <eliz@gnu.org>
15506
15507 * indent.c (compute_motion): Process display vector front to back
15508 rather than the other way around. (Bug#2496)
15509
2ba8e008
SM
155102011-09-12 Stefan Monnier <monnier@iro.umontreal.ca>
15511
15512 * fileio.c (Finsert_file_contents): Don't assume beg_offset is 0.
15513
20f53c69
CY
155142011-09-11 Chong Yidong <cyd@stupidchicken.com>
15515
15516 * minibuf.c (Fread_from_minibuffer): Doc fix.
15517
d562d7a4
EZ
155182011-09-11 Eli Zaretskii <eliz@gnu.org>
15519
15520 * xdisp.c (produce_stretch_glyph): Fix a typo made in changes from
15521 2011-08-30T17:32:44Z!eliz@gnu.org. (Bug#9475)
15522
1c4d7f3d
LMI
155232011-09-11 Lars Magne Ingebrigtsen <larsi@gnus.org>
15524
15525 * fileio.c (Fvisited_file_modtime): Document `(-1 65535)' as a
15526 value for non-existent files.
15527
b885bf36
EZ
155282011-09-11 Eli Zaretskii <eliz@gnu.org>
15529
15530 * fileio.c (Finsert_file_contents): If the file cannot be opened,
15531 set its "size" to -1. This will set the modtime_size field of
15532 the corresponding buffer to -1, which is what
15533 verify-visited-file-modtime expects for files that do not exist.
15534 (Bug#9139)
15535
6612f0bf
PE
155362011-09-11 Paul Eggert <eggert@cs.ucla.edu>
15537
15538 * keymap.h (KEY_DESCRIPTION_SIZE, push_key_description): Move decls
15539 here ...
15540 * lisp.h: ... from here. push_key_description is no longer
15541 defined in keyboard.c, so its declaration should not be in
15542 lisp.h's "Defined in keyboard.c" section, and KEY_DESCRIPTION_SIZE
15543 logically belongs with push_key_description.
15544
dfb3f755
PE
155452011-09-10 Paul Eggert <eggert@cs.ucla.edu>
15546
15547 * buffer.h: Include <sys/types.h> instead of <time.h>.
15548 Otherwise, off_t wasn't defined on FreeBSD 9.0-BETA2 i386.
15549 Problem reported by Herbert J. Skuhra.
15550
3134906c
LMI
155512011-09-10 Lars Magne Ingebrigtsen <larsi@gnus.org>
15552
15553 * xml.c (parse_region): Make the parsing work for
15554 non-comment-starting XML files again (bug#9144).
15555
8d903f4e
AS
155562011-09-10 Andreas Schwab <schwab@linux-m68k.org>
15557
15558 * image.c (gif_load): Fix calculation of bottom and right corner.
15559 (Bug#9468)
15560
80ad64f4
EZ
155612011-09-10 Eli Zaretskii <eliz@gnu.org>
15562
15563 * xdisp.c (MAX_DISP_SCAN): Decrease to 250. Prevents sluggish
15564 redisplay in small windows.
15565
208a048d
EZ
155662011-09-09 Eli Zaretskii <eliz@gnu.org>
15567
15568 * frame.c (x_report_frame_params): Cast to avoid compiler warnings.
15569
9b1c252e
MR
155702011-09-08 Martin Rudalics <rudalics@gmx.at>
15571
15572 * window.c (Fset_window_prev_buffers, Fset_window_next_buffers):
15573 Operate on live windows only.
15574
2949f33b
JB
155752011-09-08 Juanma Barranquero <lekktu@gmail.com>
15576
15577 * emacs.c (my_heap_start): #ifdef to avoid warnings when unused.
15578
e08dcafd
EZ
155792011-09-07 Eli Zaretskii <eliz@gnu.org>
15580
15581 * xdisp.c (move_it_in_display_line_to): Call RESTORE_IT on ppos_it
15582 only under bidi iteration.
15583
115b96bd
JD
155842011-09-07 Jan Djärv <jan.h.d@swipnet.se>
15585
15586 * gtkutil.c (xg_make_tool_item): Insert comment about eventbox.
15587
c8199d0f
PE
155882011-09-06 Paul Eggert <eggert@cs.ucla.edu>
15589
15590 isnan: Fix porting problem to Solaris 10 with bundled gcc.
15591 Without this fix, the command to link temacs failed due to an
15592 undefined symbol __builtin_isnan. This is because
15593 /usr/include/iso/math_c99.h #defines isnan(x) to
15594 __builtin_isnan(x), but the bundled gcc, which identifies itself
15595 as gcc 3.4.3 (csl-sol210-3_4-branch+sol_rpath), does not have
15596 a __builtin_isnan.
15597 * floatfns.c (isnan): #undef, and then #define to a clone of
15598 what's in data.c.
15599 (Fisnan): Always define, since it's always available now.
15600 (syms_of_floatfns): Always define isnan at the Lisp level.
15601
e39b275c 156022011-09-06 Paul Eggert <eggert@cs.ucla.edu>
1c262cae
PE
15603
15604 * Makefile.in (gl-stamp): move-if-change now in build-aux (Bug#9169).
15605
b2db44d9 156062011-09-06 Paul Eggert <eggert@cs.ucla.edu>
728f8f0a 15607
f4af5137 15608 * fileio.c: Fix bugs with large file offsets (Bug#9428).
728f8f0a
PE
15609 The previous code assumed that file offsets (off_t values) fit in
15610 EMACS_INT variables, which is not true on typical 32-bit hosts.
15611 The code messed up by falsely reporting buffer overflow in cases
15612 such as (insert-file-contents "big" nil 1 2) into an empty buffer
15613 when "big" contains more than 2**29 bytes, even though this
15614 inserts just one byte and does not overflow the buffer.
15615 (Finsert_file_contents): Store file offsets as off_t
15616 values, not as EMACS_INT values. Check for overflow when
15617 converting between EMACS_INT and off_t. When checking for
15618 buffer overflow or for overlap, take the offsets into account.
15619 Don't use EMACS_INT for small values where int suffices.
15620 When checking for overlap, fix a typo: ZV was used where
15621 ZV_BYTE was intended.
15622 (Fwrite_region): Don't assume off_t fits into 'long'.
15623 * buffer.h (struct buffer.modtime_size): Now off_t, not EMACS_INT.
15624
ecfc0a49
MA
156252011-09-05 Michael Albinus <michael.albinus@gmx.de>
15626
15627 * dbusbind.c (xd_signature_cat): Rename from signature_cat.
15628
6511acf2 156292011-09-04 Paul Eggert <eggert@cs.ucla.edu>
61bfeeb7 15630
0999621a 15631 sprintf-related integer and memory overflow issues (Bug#9412).
62f19c19
PE
15632
15633 * doprnt.c (doprnt): Support printing ptrdiff_t and intmax_t values.
8666506e 15634 (esprintf, exprintf, evxprintf): New functions.
62f19c19 15635 * keyboard.c (command_loop_level): Now EMACS_INT, not int.
6b02f655 15636 (cmd_error): Kbd macro iterations count is now EMACS_INT, not int.
62f19c19
PE
15637 (modify_event_symbol): Do not assume that the length of
15638 name_alist_or_stem is safe to alloca and fits in int.
15639 (Fexecute_extended_command): Likewise for function name and binding.
15640 (Frecursion_depth): Wrap around reliably on integer overflow.
15641 * keymap.c (push_key_description): First arg is now EMACS_INT, not int,
15642 since some callers pass EMACS_INT values.
15643 (Fsingle_key_description): Don't crash if symbol name contains more
15644 than MAX_ALLOCA bytes.
15645 * minibuf.c (minibuf_level): Now EMACS_INT, not int.
15646 (get_minibuffer): Arg is now EMACS_INT, not int.
15647 * lisp.h (get_minibuffer, push_key_description): Reflect API changes.
8666506e 15648 (esprintf, exprintf, evxprintf): New decls.
62f19c19
PE
15649 * window.h (command_loop_level, minibuf_level): Reflect API changes.
15650
2be7d702
PE
15651 * dbusbind.c (signature_cat): New function.
15652 (xd_signature, Fdbus_register_signal):
2ea16b89
PE
15653 Do not overrun buffer; instead, report string overflow.
15654
9d1df220
PE
15655 * dispnew.c (add_window_display_history): Don't overrun buffer.
15656 Truncate instead; this is OK since it's just a log.
15657
33ef5c64
PE
15658 * editfns.c (Fcurrent_time_zone): Don't overrun buffer
15659 even if the time zone offset is outlandishly large.
15660 Don't mishandle offset == INT_MIN.
15661
66c6fdd5
PE
15662 * emacs.c (main) [NS_IMPL_COCOA]: Don't overrun buffer
15663 when creating daemon; the previous buffer-overflow check was incorrect.
15664
d749b01b
PE
15665 * eval.c (verror): Simplify by rewriting in terms of evxprintf,
15666 which has the guts of the old verror function.
15667
b5cd1905
PE
15668 * filelock.c (lock_file_1, lock_file): Don't blindly alloca long name;
15669 use SAFE_ALLOCA instead. Use esprintf to avoid int-overflow issues.
15670
6e1a67fb
PE
15671 * font.c: Include <float.h>, for DBL_MAX_10_EXP.
15672 (font_unparse_xlfd): Don't blindly alloca long strings.
c21721cc 15673 Don't assume XINT result fits in int, or that XFLOAT_DATA * 10
8666506e 15674 fits in int, when using sprintf. Use single snprintf to count
c21721cc
PE
15675 length of string rather than counting it via multiple sprintfs;
15676 that's simpler and more reliable.
c21721cc
PE
15677 (font_unparse_fcname): Use it to avoid sprintf buffer overrun.
15678 (generate_otf_features) [0 && HAVE_LIBOTF]: Use esprintf, not
15679 sprintf, in case result does not fit in int.
15680
c57b67fc
PE
15681 * fontset.c (num_auto_fontsets): Now printmax_t, not int.
15682 (fontset_from_font): Print it.
15683
8a401434
PE
15684 * frame.c (tty_frame_count): Now printmax_t, not int.
15685 (make_terminal_frame, set_term_frame_name): Print it.
15686 (x_report_frame_params): In X, window IDs are unsigned long,
15687 not signed long, so print them as unsigned.
15688 (validate_x_resource_name): Check for implausibly long names,
15689 and don't assume name length fits in 'int'.
15690 (x_get_resource_string): Don't blindly alloca invocation name;
15691 use SAFE_ALLOCA. Use esprintf, not sprintf, in case result does
15692 not fit in int.
15693
6e1a67fb
PE
15694 * gtkutil.c: Include <float.h>, for DBL_MAX_10_EXP.
15695 (xg_check_special_colors, xg_set_geometry):
84722b3d
PE
15696 Make sprintf buffers a bit bigger, to avoid potential buffer overrun.
15697
0df02bf3
PE
15698 * lread.c (dir_warning): Don't blindly alloca buffer; use SAFE_ALLOCA.
15699 Use esprintf, not sprintf, in case result does not fit in int.
15700
48e30793
PE
15701 * macros.c (executing_kbd_macro_iterations): Now EMACS_INT, not int.
15702 (Fend_kbd_macro): Don't mishandle MOST_NEGATIVE_FIXNUM by treating
15703 it as a large positive number.
15704 (Fexecute_kbd_macro): Don't assume repeat count fits in int.
15705 * macros.h (executing_kbd_macro_iterations): Now EMACS_INT, not int.
15706
a66ff6d8
PE
15707 * nsterm.m ((NSSize)windowWillResize): Use esprintf, not sprintf,
15708 in case result does not fit in int.
15709
aca216ff
PE
15710 * print.c (float_to_string): Detect width overflow more reliably.
15711 (print_object): Make sprintf buffer a bit bigger, to avoid potential
15712 buffer overrun. Don't assume list length fits in 'int'. Treat
15713 print length of 0 as 0, not as infinity; to be consistent with other
15714 uses of print length in this function. Don't overflow print length
15715 index. Don't assume hash table size fits in 'long', or that
15716 vectorlike size fits in 'unsigned long'.
15717
31c286f7
PE
15718 * process.c (make_process): Use printmax_t, not int, to format
15719 process-name gensyms.
15720
55e5faa1
PE
15721 * sysdep.c (snprintf) [! HAVE_SNPRINTF]: New function.
15722
80f2e268
PE
15723 * term.c (produce_glyphless_glyph): Make sprintf buffer a bit bigger
15724 to avoid potential buffer overrun.
15725
670741ab
PE
15726 * xfaces.c (x_update_menu_appearance): Don't overrun buffer
15727 if X resource line is longer than 512 bytes.
15728
b7163a50
PE
15729 * xfns.c (x_window): Make sprintf buffer a bit bigger
15730 to avoid potential buffer overrun.
15731
ae58ff1f
PE
15732 * xterm.c (x_io_error_quitter): Don't overrun sprintf buffer.
15733
c43c8a6a
PE
15734 * xterm.h (x_check_errors): Add ATTRIBUTE_FORMAT_PRINTF.
15735
3f8236f4
PE
157362011-09-04 Paul Eggert <eggert@cs.ucla.edu>
15737
53e9fe90 15738 Integer overflow fixes for scrolling, etc.
6511acf2
PE
15739 Without these, Emacs silently mishandles large integers sometimes.
15740 For example, "C-u 4294967297 M-x recenter" was treated as if
53e9fe90
PE
15741 it were "C-u 1 M-x recenter" on a typical 64-bit host.
15742
6511acf2
PE
15743 * xdisp.c (try_window_id): Check Emacs fixnum range before
15744 converting to 'int'.
806add1d 15745
6511acf2 15746 * window.c (window_scroll_line_based, Frecenter):
71f02bc5
PE
15747 Check that an Emacs fixnum is in range before assigning it to 'int'.
15748 (Frecenter, Fmove_to_window_line): Use EMACS_INT, not int, for
15749 values converted from Emacs fixnums.
15750 (Frecenter): Don't wrap around a line count if it is out of 'int'
15751 range; instead, treat it as an extreme value.
15752 (Fset_window_configuration, compare_window_configurations):
15753 Use ptrdiff_t, not int, for index that might exceed 2 GiB.
15754
6511acf2
PE
15755 * search.c (Freplace_match): Use ptrdiff_t, not int, for indexes
15756 that can exceed INT_MAX. Check that EMACS_INT value is in range
15757 before assigning it to the (possibly-narrower) index.
a0efffc8
PE
15758 (match_limit): Don't assume that a fixnum can fit in 'int'.
15759
6511acf2 15760 * print.c (print_object): Use ptrdiff_t, not int, for index that can
29ebea3b
PE
15761 exceed INT_MAX.
15762
6511acf2 15763 * indent.c (position_indentation): Now takes ptrdiff_t, not int.
3f8236f4
PE
15764 (Fvertical_motion): Don't wrap around LINES values that don't fit
15765 in 'int'. Instead, treat them as extreme values. This is good
15766 enough for windows, which can't have more than INT_MAX lines anyway.
15767
fcb901a7
LMI
157682011-09-03 Lars Magne Ingebrigtsen <larsi@gnus.org>
15769
0f2f6b6d
LMI
15770 * Require libxml/parser.h to avoid compilation warning.
15771
fcb901a7
LMI
15772 * emacs.c (shut_down_emacs): Call xmlCleanupParser on shutdown.
15773
15774 * xml.c (parse_region): Don't call xmlCleanupParser after parsing,
15775 since this reportedly can destroy thread storage.
15776
6e20a0d4
CY
157772011-08-30 Chong Yidong <cyd@stupidchicken.com>
15778
15779 * syntax.c (find_defun_start): Update all cache variables if
15780 exiting early (Bug#9401).
15781
148ae00e
EZ
157822011-08-30 Eli Zaretskii <eliz@gnu.org>
15783
f6cfbd8f
EZ
15784 * image.c (x_bitmap_pixmap): Cast to int to avoid compiler warnings.
15785
148ae00e
EZ
15786 * xdisp.c (produce_stretch_glyph): No longer static, compiled also
15787 when HAVE_WINDOW_SYSTEM is not defined. Support both GUI and TTY
15788 frames. Call tty_append_glyph in the TTY case. (Bug#9402)
15789
15790 * term.c (tty_append_glyph): New function.
15791 (produce_stretch_glyph): Static function and its prototype deleted.
15792
a66cfb1c
SM
15793 * dispextern.h (produce_stretch_glyph, tty_append_glyph):
15794 Add prototypes.
148ae00e 15795
c4a07a4c
PE
157962011-08-29 Paul Eggert <eggert@cs.ucla.edu>
15797
15798 * image.c (parse_image_spec): Check for nonnegative, not for positive,
15799 when checking :margin (Bug#9390).
15800 (IMAGE_NON_NEGATIVE_INTEGER_VALUE_OR_PAIR):
a66cfb1c 15801 Rename from IMAGE_POSITIVE_INTEGER_VALUE_OR_PAIR,
c4a07a4c
PE
15802 so that the name doesn't mislead. All uses changed.
15803
6bc8cd65
JB
158042011-08-28 Johan Bockgård <bojohan@gnu.org>
15805
15806 * term.c (init_tty) [HAVE_GPM]: Move mouse settings after
15807 set_tty_hooks.
15808
dca4927e
EZ
158092011-08-27 Eli Zaretskii <eliz@gnu.org>
15810
15811 * xdisp.c (move_it_to): Don't bail out early when reaching
15812 position beyond to_charpos, if we are scanning backwards.
15813 (move_it_vertically_backward): When DY == 0, make sure we get to
15814 the first character in the line after the newline.
15815
f2cad773
PE
158162011-08-27 Paul Eggert <eggert@cs.ucla.edu>
15817
15818 * ccl.c: Improve and simplify overflow checking (Bug#9196).
15819 (ccl_driver): Do not generate an out-of-range pointer.
15820 (Fccl_execute_on_string): Remove unnecessary check for
15821 integer overflow, noted by Stefan Monnier in
15822 <http://lists.gnu.org/archive/html/emacs-devel/2011-08/msg00979.html>.
15823 Remove a FIXME that didn't need fixing.
15824 Simplify the newly-introduced buffer reallocation code.
15825
0cae2cdb
JB
158262011-08-27 Juanma Barranquero <lekktu@gmail.com>
15827
15828 * makefile.w32-in ($(BLD)/alloc.$(O)): Depend on lib/verify.h.
15829
5fc295a4 158302011-08-26 Paul Eggert <eggert@cs.ucla.edu>
ddff3151 15831
70c60eb2 15832 Integer and memory overflow issues (Bug#9196).
726e0ab1 15833
d31850da
PE
15834 * doc.c (get_doc_string): Rework so that
15835 get_doc_string_buffer_size is the actual buffer size, rather than
15836 being 1 less than the actual buffer size; this makes xpalloc more
15837 convenient.
15838
a69fbedb
PE
15839 * image.c (x_allocate_bitmap_record, cache_image):
15840 * xselect.c (Fx_register_dnd_atom):
15841 Simplify previous changes by using xpalloc.
15842
fe5c5d37
PE
15843 * buffer.c (overlay_str_len): Now ptrdiff_t, not EMACS_INT,
15844 since either will do and ptrdiff_t is convenient with xpalloc.
15845
0065d054
PE
15846 * charset.c (charset_table_size)
15847 (struct charset_sort_data.priority): Now ptrdiff_t.
15848 (charset_compare): Don't overflow if priorities differ greatly.
15849 (Fsort_charsets): Don't assume list length fits in int.
15850 Check for size-calculation overflow when allocating sort data.
15851 (syms_of_charset): Allocate an initial charset table that is
15852 just under 64 KiB, to avoid problems with glibc malloc and mmap.
15853
15854 * cmds.c (internal_self_insert): Check for size-calculation overflow.
15855
15856 * composite.h (struct composition.glyph_len): Now int, not unsigned.
15857 The actual value is always <= INT_MAX, and leaving it unsigned made
15858 overflow checking harder.
15859
15860 * dispextern.h (struct glyph_matrix.rows_allocated)
15861 (struct face_cache.size): Now ptrdiff_t, for convenience in use
15862 with xpalloc. The values are still always <= INT_MAX.
15863
15864 * indent.c (compute_motion): Adjust to region_cache_forward sig change.
15865
15866 * lisp.h (xnmalloc, xnrealloc, xpalloc): New decls.
15867 (SAFE_NALLOCA): New macro.
15868
15869 * region-cache.c (struct boundary.pos, find_cache_boundary)
15870 (move_cache_gap, insert_cache_boundary, delete_cache_boundaries)
15871 (set_cache_region, invalidate_region_cache)
15872 (revalidate_region_cache, know_region_cache, region_cache_forward)
15873 (region_cache_backward, pp_cache):
15874 Use ptrdiff_t, not EMACS_INT, since either will do. This is needed
15875 so that ptrdiff_t * can be passed to xpalloc.
15876 (struct region_cache): Similarly, for gap_start, gap_len, cache_len,
15877 beg_unchanged, end_unchanged, buffer_beg, buffer_end members.
15878 (pp_cache): Don't assume cache_len fits in int.
15879 * region-cache.h: Adjust extern decls to match.
15880
15881 * search.c (scan_buffer, Freplace_match): Use ptrdiff_t, not
15882 EMACS_INT, since either will do, for xpalloc.
15883
15884 * alloc.c: Include verify.h, and check that int fits in ptrdiff_t.
15885 (xnmalloc, xnrealloc, xpalloc): New functions.
15886
726e0ab1
PE
15887 * bidi.c (bidi_shelve_header_size): New constant.
15888 (bidi_cache_ensure_space, bidi_shelve_cache): Use it.
15889 (bidi_cache_ensure_space): Avoid integer overflow when allocating.
15890
51f30bc5 15891 * bidi.c (bidi_cache_shrink):
726e0ab1
PE
15892 * buffer.c (overlays_at, overlays_in, record_overlay_string)
15893 (overlay_strings):
15894 Don't update size of array until after memory allocation succeeds,
15895 because xmalloc/xrealloc may not return.
0065d054
PE
15896 (struct sortstrlist.bytes): Now ptrdiff_t, as EMACS_INT doesn't help
15897 now that we have proper integer overflow checking.
15898 (record_overlay_string, overlay_strings): Catch overflows when
15899 calculating size of overlay_str_buf.
726e0ab1 15900
0065d054
PE
15901 * callproc.c (Fcall_process): Check for size overflow when
15902 calculating size of args2.
15903 (child_setup): Avoid overflow by using size_t rather than ptrdiff_t.
15904 Normally we prefer signed values, but sticking with ptrdiff_t would
15905 require adding more-complicated checks.
726e0ab1
PE
15906
15907 * ccl.c (Fccl_execute_on_string): Check for memory overflow.
15908 Use ptrdiff_t rather than EMACS_INT where ptrdiff_t will do.
15909 Redo buffer-overflow calculations to avoid integer overflow.
0065d054 15910 Add a FIXME comment where memory seems to be over-allocated.
726e0ab1
PE
15911
15912 * character.c (Fstring): Check for size-calculation overflow.
15913
15914 * coding.c (produce_chars): Redo buffer-overflow calculations to avoid
15915 unnecessary integer overflow. Check for size overflow.
15916 (encode_coding_object): Don't update size until xmalloc succeeds.
15917
15918 * composite.c (get_composition_id): Check for overflow in glyph
15919 length calculations.
15920
15921 Integer and memory overflow fixes for display code.
15922 * dispextern.h (struct glyph_pool.nglyphs): Now ptrdiff_t, not int.
15923 * dispnew.c (adjust_glyph_matrix, realloc_glyph_pool)
15924 (scrolling_window): Check for overflow in size calculations.
15925 (line_draw_cost, realloc_glyph_pool, add_row_entry):
15926 Don't assume glyph table len fits in int.
15927 (struct row_entry.bucket, row_entry_pool_size, row_entry_idx)
15928 (row_table_size): Now ptrdiff_t, not int.
15929 (scrolling_window): Avoid overflow in size calculations.
15930 Don't update size until allocation succeeds.
15931 * fns.c (concat): Check for overflow in size calculations.
15932 (next_almost_prime): Verify NEXT_ALMOST_PRIME_LIMIT.
15933 * lisp.h (RANGED_INTEGERP, TYPE_RANGED_INTEGERP): New macros.
15934 (NEXT_ALMOST_PRIME_LIMIT): New constant.
15935
15936 * doc.c (get_doc_string_buffer_size): Now ptrdiff_t, not int.
15937 (get_doc_string): Check for size calculation overflow.
15938 Don't update size until allocation succeeds.
15939 (get_doc_string, Fsubstitute_command_keys): Use ptrdiff_t, not
15940 EMACS_INT, where ptrdiff_t will do.
15941 (Fsubstitute_command_keys): Check for string overflow.
15942
15943 * editfns.c (set_time_zone_rule): Don't assume environment length
15944 fits in int.
15945 (message_length): Now ptrdiff_t, not int.
15946 (Fmessage_box): Don't update size until allocation succeeds.
15947 Don't assume message length fits in int.
15948 (Fformat): Use ptrdiff_t, not EMACS_INT, where ptrdiff_t will do.
15949
0065d054
PE
15950 * emacs.c (main): Do not reallocate argv, since there is a null at
15951 the end that can be overwritten, and this way there's no need to
15952 worry about size-calculation overflow.
15953 (sort_args): Check for size-calculation overflow.
726e0ab1
PE
15954
15955 * eval.c (init_eval_once, grow_specpdl): Don't update size until
15956 alloc succeeds.
15957 (call_debugger, grow_specpdl): Redo calculations to avoid overflow.
15958
15959 * frame.c (set_menu_bar_lines, x_set_frame_parameters)
15960 (x_set_scroll_bar_width, x_figure_window_size):
15961 Check for integer overflow.
15962 (x_set_alpha): Do not assume XINT fits in int.
15963
15964 * frame.h (struct frame): Use int, not EMACS_INT, where int works.
15965 This is for the members text_lines, text_cols, total_lines, total_cols,
15966 where the system imposes an 'int' limit.
15967
15968 * fringe.c (Fdefine_fringe_bitmap):
15969 Don't update size until alloc works.
15970
15971 * ftfont.c (ftfont_get_open_type_spec, setup_otf_gstring)
15972 (ftfont_shape_by_flt): Check for integer overflow in size calculations.
15973
15974 * gtkutil.c (get_utf8_string, xg_store_widget_in_map):
15975 Check for size-calculation overflow.
15976 (get_utf8_string): Use ptrdiff_t, not size_t, where either will
15977 do, as we prefer signed integers.
15978 (id_to_widget.max_size, id_to_widget.used)
15979 (xg_store_widget_in_map, xg_remove_widget_from_map)
15980 (xg_get_widget_from_map, xg_get_scroll_id_for_window)
15981 (xg_remove_scroll_bar, xg_update_scrollbar_pos):
15982 Use and return ptrdiff_t, not int.
15983 (xg_gtk_scroll_destroy): Don't assume ptrdiff_t fits in int.
15984 * gtkutil.h: Change prototypes to match the above.
15985
15986 * image.c (RANGED_INTEGERP, TYPE_RANGED_INTEGERP): Remove; these
15987 are duplicate now that they've been promoted to lisp.h.
15988 (x_allocate_bitmap_record, x_alloc_image_color)
15989 (make_image_cache, cache_image, xpm_load):
15990 Don't update size until alloc is done.
15991 (xpm_load, lookup_rgb_color, lookup_pixel_color, x_to_xcolors)
15992 (x_detect_edges):
3256efce 15993 Check for size calculation overflow.
726e0ab1
PE
15994 (ct_colors_allocated_max): New constant.
15995 (x_to_xcolors, x_detect_edges): Reorder multiplicands to avoid
15996 overflow.
3256efce 15997
726e0ab1
PE
15998 * keyboard.c (read_char, menu_bar_items, tool_bar_items)
15999 (read_char_x_menu_prompt, read_char_minibuf_menu_width)
16000 (read_char_minibuf_menu_prompt, follow_key, read_key_sequence):
16001 Use ptrdiff_t, not int, to count maps.
16002 (read_char_minibuf_menu_prompt): Check for overflow in size
a66cfb1c
SM
16003 calculations. Don't update size until allocation succeeds.
16004 Redo calculations to avoid overflow.
726e0ab1
PE
16005 * keyboard.h: Change prototypes to match the above.
16006
16007 * keymap.c (cmm_size, current_minor_maps): Use ptrdiff_t, not int,
16008 to count maps.
16009 (current_minor_maps): Check for size calculation overflow.
16010 * keymap.h: Change prototypes to match the above.
16011
16012 * lread.c (read1, init_obarray): Don't update size until alloc done.
16013
16014 * macros.c (Fstart_kbd_macro): Don't update size until alloc done.
16015 (store_kbd_macro_char): Reorder multiplicands to avoid overflow.
16016
726e0ab1
PE
16017 * nsterm.h (struct ns_color_table.size, struct ns_color_table.avail):
16018 Now ptrdiff_t, not int.
16019 * nsterm.m (ns_index_color): Use ptrdiff_t, not int, for table indexes.
16020 (ns_draw_fringe_bitmap): Rewrite to avoid overflow.
16021
16022 * process.c (Fnetwork_interface_list): Check for overflow
16023 in size calculation.
16024
16025 * region-cache.c (move_cache_gap): Check for size calculation overflow.
16026
16027 * scroll.c (do_line_insertion_deletion_costs): Check for size calc
16028 overflow. Don't bother calling xmalloc when xrealloc will do.
16029
16030 * search.c (Freplace_match): Check for size calculation overflow.
16031 (Fset_match_data): Don't assume list lengths fit in 'int'.
16032
16033 * sysdep.c (system_process_attributes): Use ptrdiff_t, not int,
16034 for command line length. Do not attempt to address one before the
16035 beginning of an array, as that's not portable.
16036
16037 * term.c (max_frame_lines): Remove; unused.
16038 (encode_terminal_src_size, encode_terminal_dst_size): Now ptrdiff_t,
16039 not int.
16040 (encode_terminal_code, calculate_costs): Check for size
16041 calculation overflow.
16042 (encode_terminal_code): Use ptrdiff_t, not int, to record glyph
16043 table lengths and related sizes. Don't update size until alloc
16044 done. Redo calculations to avoid overflow.
16045 (calculate_costs): Don't bother calling xmalloc when xrealloc will do.
16046
16047 * termcap.c (tgetent): Use ptrdiff_t, not int, to record results of
16048 subtracting pointers.
16049 (gobble_line): Check for overflow more carefully. Don't update size
16050 until alloc done.
16051
16052 * tparam.c (tparam1): Use ptrdiff_t, not int, for sizes.
16053 Don't update size until alloc done.
16054 Redo size calculations to avoid overflow.
16055 Check for size calculation overflow.
0065d054 16056 (main) [DEBUG]: Fix typo in invoking tparam1.
726e0ab1
PE
16057
16058 * xdisp.c (store_mode_line_noprop_char, x_consider_frame_title):
16059 Use ptrdiff_t, not int, for sizes.
16060 (store_mode_line_noprop_char): Don't update size until alloc done.
16061
0065d054
PE
16062 * xfaces.c (lface_id_to_name_size, Finternal_make_lisp_face):
16063 Use ptrdiff_t, not int, for sizes.
16064 (Finternal_make_lisp_face, cache_face):
16065 Check for size calculation overflow.
16066 (cache_face): Treat size calculation overflows as if they were
16067 memory exhaustion (the usual treatment), rather than aborting.
726e0ab1
PE
16068
16069 * xfns.c (x_encode_text, x_set_name_internal)
16070 (Fx_change_window_property): Use ptrdiff_t, not int, to count
16071 sizes, since they can exceed INT_MAX in size. Check for size
16072 calculation overflow.
16073
0065d054
PE
16074 * xgselect.c (gfds_size): Now ptrdiff_t, for convenience with xpalloc.
16075 (xg_select): Check for size calculation overflow.
726e0ab1
PE
16076 Don't update size until alloc done.
16077
0065d054 16078 * xrdb.c (get_environ_db): Don't assume path length fits in int,
726e0ab1 16079 as sprintf is limited to int lengths.
1d526e2f 16080
252c5ee1
PE
16081 * xselect.c (X_LONG_SIZE, X_SHRT_MAX, X_SHRT_MIN, X_LONG_MAX)
16082 (X_LONG_MIN): New macros.
864d7ce7
PE
16083 Use them to make the following changes clearer.
16084 (MAX_SELECTION_QUANTUM): Make the other bounds on this value clearer.
16085 This change doesn't affect the value now, but it may help remind
16086 future maintainers not to raise the value too much later.
16087 (SELECTION_QUANTUM): Remove, replacing with ...
16088 (selection_quantum): ... new function, which avoids overflow.
16089 All uses changed.
16090 (struct selection_data.size): Now ptrdiff_t, not int, to avoid
16091 assumption that selection length fits in 'int'.
16092 (x_reply_selection_request, x_handle_selection_request)
16093 (x_get_window_property, receive_incremental_selection)
16094 (x_get_window_property_as_lisp_data, selection_data_to_lisp_data)
16095 (lisp_data_to_selection_data, clean_local_selection_data):
16096 Use ptrdiff_t, not int, to record length of selection.
16097 (x_reply_selection_request, x_get_window_property)
16098 (receive_incremental_selection, x_property_data_to_lisp):
16099 Redo calculations to avoid overflow.
16100 (x_reply_selection_request): When sending hint, ceiling it at
252c5ee1 16101 X_LONG_MAX rather than relying on wraparound overflow to send
864d7ce7
PE
16102 something.
16103 (x_get_window_property, receive_incremental_selection)
16104 (lisp_data_to_selection_data, x_property_data_to_lisp):
16105 Check for size-calculation overflow.
16106 (x_get_window_property, receive_incremental_selection)
16107 (lisp_data_to_selection_data, Fx_register_dnd_atom):
16108 Don't store size until memory allocation succeeds.
16109 (x_get_window_property): Plug memory leak on memory exhaustion.
16110 Don't double-block input; malloc is safe here. Don't assume 2**34
16111 - 4 fits in unsigned long. Add an xassert to check
16112 XGetWindowProperty overflow. Be more careful about overflow
16113 calculations, and distinguish size from memory overflow better.
16114 (receive_incremental_selection): When tracing, don't assume
16115 unsigned int is less than INT_MAX.
16116 (x_selection_data_to_lisp_data): Remove unnecessary (and in theory
16117 harmful) conversions of unsigned short to int.
16118 (lisp_data_to_selection_data): Don't assume that integers
16119 in the range -65535 through -1 fit in an X unsigned short.
16120 Don't assume that ULONG_MAX == X_ULONG_MAX. Don't store into
16121 result parameters unless successful. Rely on cons_to_unsigned
16122 to report problems with elements; the old code wasn't right anyway.
16123 (x_check_property_data): Check for int overflow; we cannot use
16124 a wider type due to X limits.
16125 (x_handle_dnd_message): Use unsigned int, to avoid int overflow.
16126
726e0ab1 16127 * xsmfns.c (smc_save_yourself_CB): Check for size calc overflow.
34db673b 16128
0065d054
PE
16129 * xterm.c (x_color_cells, x_send_scrollbar_event, handle_one_xevent)
16130 (x_term_init): Check for size calculation overflow.
726e0ab1
PE
16131 (x_color_cells): Don't store size until memory allocation succeeds.
16132 (handle_one_xevent): Use ptrdiff_t, not int, for byte counts.
0065d054 16133 Don't assume alloca size is less than MAX_ALLOCA.
726e0ab1
PE
16134 (x_term_init): Don't assume length fits in int (sprintf is limited
16135 to int size).
bc18e09d 16136
ebfa62c0
PE
16137 Use ptrdiff_t for composition IDs.
16138 * character.c (lisp_string_width):
16139 * composite.c (composition_table_size, n_compositions)
16140 (get_composition_id, composition_gstring_from_id):
16141 * dispextern.h (struct glyph_string.cmp_id, struct composition_it.id):
16142 * xdisp.c (BUILD_COMPOSITE_GLYPH_STRING):
16143 * window.c (Frecenter):
16144 Use ptrdiff_t, not int, for composition IDs.
16145 * composite.c (get_composition_id): Check for integer overflow.
16146 * composite.h: Adjust prototypes to match the above changes.
16147
d3411f89
PE
16148 Use ptrdiff_t for hash table indexes.
16149 * category.c (hash_get_category_set):
16150 * ccl.c (ccl_driver):
16151 * charset.h (struct charset.hash_index, CHECK_CHARSET_GET_ID):
16152 * coding.c (coding_system_charset_list, detect_coding_system):
16153 * coding.h (struct coding_system.id):
16154 * composite.c (get_composition_id, gstring_lookup_cache):
16155 * fns.c (hash_lookup, hash_put, Fgethash, Fputhash):
16156 * image.c (xpm_get_color_table_h):
16157 * lisp.h (hash_lookup, hash_put):
16158 * minibuf.c (Ftest_completion):
16159 Use ptrdiff_t for hash table indexes, not int (which is too
16160 narrow, on 64-bit hosts) or EMACS_INT (which is too wide, on
16161 32-bit --with-wide-int hosts).
16162
e097a6fa
PE
16163 * charset.c (Fdefine_charset_internal): Check for integer overflow.
16164 Add a FIXME comment about memory leaks.
16165 (syms_of_charset): Don't assume xmalloc returns.
16166
5637687f
PE
16167 Don't assume that stated character widths fit in int.
16168 * character.c (Fchar_width, c_string_width, lisp_string_width):
16169 * character.h (CHAR_WIDTH):
16170 * indent.c (MULTIBYTE_BYTES_WIDTH):
16171 Use sanitize_char_width to avoid undefined and/or bad behavior
16172 with outlandish widths.
a66cfb1c 16173 * character.h (sanitize_tab_width): Rename from sanitize_width,
5637687f
PE
16174 now that we have two such functions. All uses changed.
16175 (sanitize_char_width): New inline function.
16176
a2271ba2
PE
16177 Don't assume that tab-width fits in int.
16178 * character.h (sanitize_width): New inline function.
16179 (SANE_TAB_WIDTH): New macro.
16180 (ASCII_CHAR_WIDTH): Use it.
16181 * indent.c (sane_tab_width): Remove. All uses replaced by
16182 SANE_TAB_WIDTH (current_buffer).
16183 * xdisp.c (init_iterator): Use SANE_TAB_WIDTH.
16184
18c52557
PE
16185 * fileio.c: Integer overflow issues with file modes.
16186 (Fset_file_modes, auto_save_1): Don't assume EMACS_INT fits in int.
16187
caeeedc1
PE
16188 * charset.c (read_hex): New arg OVERFLOW. All uses changed.
16189 Remove unreachable code.
16190 (read_hex, load_charset_map_from_file): Check for integer overflow.
16191
6df6ae42 16192 * xterm.c: Don't go over XClientMessageEvent limit.
50849c52
PE
16193 (scroll_bar_windows_size): Now ptrdiff_t, as we prefer signed.
16194 (x_send_scroll_bar_event): Likewise. Check that the size does not
16195 exceed limits imposed by XClientMessageEvent, as well as the usual
16196 ptrdiff_t and size_t limits.
16197
b13995db
PE
16198 * keyboard.c: Overflow, signedness and related fixes.
16199 (make_lispy_movement): Use same integer type in forward decl
16200 that is used in the definition.
16201 (read_key_sequence, keyremap_step):
16202 Change bufsize argument back to int, undoing my 2011-03-30 change.
16203 We prefer signed types, and int is wide enough here.
16204 (parse_tool_bar_item): Don't assume tool_bar_max_label_size is less
16205 than TYPE_MAXIMUM (EMACS_INT) / 2. Don't let the label size grow
16206 larger than STRING_BYTES_BOUND. Use ptrdiff_t for Emacs string
16207 length, not size_t. Use ptrdiff_t for index, not int.
16208 (keyremap_step, read_key_sequence): Redo bufsize check to avoid
16209 possibility of integer overflow.
16210
13464394
PE
16211 Overflow, signedness and related fixes for images.
16212
16213 * dispextern.h (struct it.stack[0].u.image.image_id)
16214 (struct_it.image_id, struct image.id, struct image_cache.size)
16215 (struct image_cache.used, struct image_cache.ref_count):
16216 * gtkutil.c (update_frame_tool_bar):
16217 * image.c (x_reference_bitmap, Fimage_size, Fimage_mask_p)
16218 (Fimage_metadata, free_image_cache, clear_image_cache, lookup_image)
16219 (cache_image, mark_image_cache, x_kill_gs_process, Flookup_image):
16220 * nsmenu.m (update_frame_tool_bar):
16221 * xdisp.c (calc_pixel_width_or_height):
16222 * xfns.c (image_cache_refcount):
16223 Image IDs are now ptrdiff_t, not int, to avoid arbitrary limits
16224 on typical 64-bit hosts.
16225
16226 * image.c (RANGED_INTEGERP, TYPE_RANGED_INTEGERP): New macros.
16227 (x_bitmap_pixmap, x_create_x_image_and_pixmap):
16228 Omit unnecessary casts to int.
16229 (parse_image_spec): Check that integers fall into 'int' range
16230 when the callers expect that.
16231 (image_ascent): Redo ascent calculation to avoid int overflow.
16232 (clear_image_cache): Avoid overflow when sqrt (INT_MAX) < nimages.
16233 (lookup_image): Remove unnecessary tests.
16234 (xbm_image_p): Locals are now of int, not EMACS_INT,
16235 since parse_image_check makes sure they fit into int.
16236 (png_load, gif_load, svg_load_image):
16237 Prefer int to unsigned where either will do.
16238 (tiff_handler): New function, combining the cores of the
a66cfb1c
SM
16239 old tiff_error_handler and tiff_warning_handler.
16240 This function is rewritten to use vsnprintf and thereby avoid
13464394
PE
16241 stack buffer overflows. It uses only the features of vsnprintf
16242 that are common to both POSIX and native Microsoft.
16243 (tiff_error_handler, tiff_warning_handler): Use it.
16244 (tiff_load, gif_load, imagemagick_load_image):
16245 Don't assume :index value fits in 'int'.
16246 (gif_load): Omit unnecessary cast to double, and avoid double-rounding.
16247 (imagemagick_load_image): Check that crop parameters fit into
16248 the integer types that MagickCropImage accepts. Don't assume
16249 Vimagemagick_render_type has a nonnegative value. Don't assume
16250 size_t fits in 'long'.
16251 (gs_load): Use printmax_t to print the widest integers possible.
16252 Check for integer overflow when computing image height and width.
16253
c11821d4
EZ
162542011-08-26 Eli Zaretskii <eliz@gnu.org>
16255
16256 * xdisp.c (redisplay_window): Don't force window start if point
16257 will be invisible in the resulting window. (Bug#9324)
16258
0c95fcf7
EZ
162592011-08-25 Eli Zaretskii <eliz@gnu.org>
16260
16261 * xdisp.c (compute_display_string_pos): Return 2 in DISP_PROP when
16262 the display spec is of the form `(space ...)'.
16263 (handle_display_spec): Return the value returned by
16264 handle_single_display_spec, not just 1 or zero.
16265 (handle_single_display_spec): If the display spec is of the form
16266 `(space ...)', and specifies display in the text area, return 2
16267 rather than 1.
fee65a97 16268 (try_cursor_movement): Check for the need to scroll more
a66cfb1c
SM
16269 accurately, and prefer exact match for point under bidi.
16270 Don't advance `row' beyond the last row of the window.
0c95fcf7
EZ
16271
16272 * dispextern.h (struct bidi_it): Rename the disp_prop_p member
16273 into disp_prop; all users changed.
16274
16275 * bidi.c (bidi_fetch_char): If compute_display_string_pos returns
16276 DISP_PROP = 2, substitute the u+2029 PARAGRAPH SEPARATOR character
16277 for the text covered by the display property.
16278
e4ed06f1
CY
162792011-08-25 Chong Yidong <cyd@stupidchicken.com>
16280
16281 * buffer.c (Fbury_buffer_internal): Rename from Funrecord_buffer.
16282 Change return value to nil.
16283 (Frecord_buffer): Delete unused function.
16284
f67cdd7f
EZ
162852011-08-24 Eli Zaretskii <eliz@gnu.org>
16286
5980d4c6
EZ
16287 * xdisp.c (Fcurrent_bidi_paragraph_direction): For unibyte
16288 buffers, return left-to-right.
8610fe8b
EZ
16289 (set_cursor_from_row): Consider candidate row a win if its glyph
16290 represents a newline and point is on that newline. Fixes cursor
16291 positioning on the newline at EOL of R2L text within L2R
16292 paragraph, and vice versa.
16293 (try_cursor_movement): Check continued rows, in addition to
16294 continuation rows. Fixes unwarranted scroll when point enters a
16295 continued line of R2L text within an L2R paragraph, or vice versa.
16296 (cursor_row_p): Consider the case of point being equal to
16297 MATRIX_ROW_END_CHARPOS. Prevents cursor being stuck when moving
16298 from the end of a short line to the beginning of a continued line
16299 of R2L text within L2R paragraph.
16300 (RECORD_MAX_MIN_POS): For max_pos, use IT_CHARPOS even for
16301 composed characters.
5980d4c6 16302
f67cdd7f
EZ
16303 * bidi.c (bidi_check_type): Use xassert.
16304 (bidi_cache_iterator_state): Update the disp_pos and disp_prop_p
16305 members.
16306
bca633fb
EZ
163072011-08-23 Eli Zaretskii <eliz@gnu.org>
16308
16309 * bidi.c (bidi_get_type): Abort if we get zero as the bidi type of
16310 a character.
16311
4a5885a7
CY
163122011-08-23 Chong Yidong <cyd@stupidchicken.com>
16313
16314 * nsfont.m (ns_otf_to_script): Fix typo.
16315
0902a04e
KH
163162011-08-22 Kenichi Handa <handa@m17n.org>
16317
16318 * chartab.c (Fset_char_table_extra_slot): Do not inhibit setting a
16319 extra slot even if the purpose is char-code-property-table.
16320
1a2e6670
EZ
163212011-08-23 Eli Zaretskii <eliz@gnu.org>
16322
8ddde651
EZ
16323 * xdisp.c (redisplay_window): When computing centering_position,
16324 account for the height of the header line. (Bug#8874)
16325
425cc014
EZ
16326 * dispnew.c (buffer_posn_from_coords): Use buf_charpos_to_bytepos
16327 instead of CHAR_TO_BYTE. Fixes a crash when a completion
16328 candidate is selected by the mouse, and that candidate has a
16329 composed character under the mouse.
16330
1a2e6670
EZ
16331 * xdisp.c (x_produce_glyphs): Set it->nglyphs to 1. Fixes pixel
16332 coordinates reported by pos-visible-in-window-p for a composed
16333 character in column zero.
16334
8b76d6f8
SM
163352011-08-23 Stefan Monnier <monnier@iro.umontreal.ca>
16336
16337 * cmds.c (Fself_insert_command): Mention post-self-insert-hook.
16338
dac347dd
EZ
163392011-08-22 Eli Zaretskii <eliz@gnu.org>
16340
16341 * xdisp.c (BUFFER_POS_REACHED_P): If this is a composition,
16342 consider it a hit if to_charpos is anywhere in the range of the
16343 composed buffer positions.
16344
e013fb34
CY
163452011-08-22 Chong Yidong <cyd@stupidchicken.com>
16346
16347 * image.c (gif_load): Don't assume that each subimage has the same
16348 dimensions as the base image. Handle disposal method that is
16349 "undefined" by the gif spec (Bug#9335).
16350
bd1ba3e8
CY
163512011-08-20 Chong Yidong <cyd@stupidchicken.com>
16352
16353 * eval.c (Fsignal): Handle `debug' symbol in error handler (Bug#9329).
024a2d76 16354 (Fcondition_case): Document `debug' symbol in error handler.
bd1ba3e8 16355
54a1215b
EZ
163562011-08-19 Eli Zaretskii <eliz@gnu.org>
16357
823564e5
EZ
16358 * xfaces.c (face_at_buffer_position): Avoid repeated evaluation of
16359 face ID by FACE_FROM_ID, and avoid a crash when mouse is moved
16360 from an Org mode buffer to a Speedbar frame.
16361
54a1215b
EZ
16362 * xdisp.c (RECORD_MAX_MIN_POS): If the display element comes from
16363 a composition, take its buffer position from IT->cmp_it.charpos.
16364 Fixes cursor positioning at the beginning of a line that begins
16365 with a composed character.
16366
9778ebcc
EZ
163672011-08-18 Eli Zaretskii <eliz@gnu.org>
16368
0be6ee06
EZ
16369 * bidi.c (bidi_get_type): If bidi_type_table reports zero as the
16370 character bidirectional type, use STRONG_L instead. Fixes crashes
16371 in a buffer produced by `describe-categories'.
16372
9778ebcc
EZ
16373 * dispextern.h (struct bidi_it): Move disp_pos and disp_prop_p
16374 members before the level stack, so they would be saved and
16375 restored when copying iterator state. Fixes incorrect reordering
16376 around TABs covered by display properties.
16377
156bffbe
AS
163782011-08-18 Andreas Schwab <schwab@linux-m68k.org>
16379
6b02f655 16380 * process.c (Fnetwork_interface_list): Correctly determine buffer size.
156bffbe 16381
72ad093b
CY
163822011-08-17 Chong Yidong <cyd@stupidchicken.com>
16383
16384 * eval.c (internal_condition_case, internal_condition_case_1)
8b76d6f8
SM
16385 (internal_condition_case_2, internal_condition_case_n):
16386 Remove unnecessary aborts (Bug#9081).
72ad093b 16387
35774242
EZ
163882011-08-17 Eli Zaretskii <eliz@gnu.org>
16389
16390 * lread.c (Fload) [DOS_NT]: If `openp' returns -2, but the file
16391 has no `load' handler, try opening the file locally. (Bug#9311)
16392
db76dd85
KB
163932011-08-16 Ken Brown <kbrown@cornell.edu>
16394
16395 * gmalloc.c: Expand comment.
16396
b215eee5
EZ
163972011-08-16 Eli Zaretskii <eliz@gnu.org>
16398
16399 * xdisp.c (set_cursor_from_row): Don't accept a previous candidate
16400 if it fails the cursor_row_p test. Fixes cursor positioning at ZV.
16401
a4579d33
KB
164022011-08-16 Ken Brown <kbrown@cornell.edu>
16403
16404 Fix memory allocation problems in Cygwin build (Bug#9273).
16405
16406 * unexcw.c ( __malloc_initialized): Declare external variable.
16407 (fixup_executable): Force the dumped emacs to reinitialize malloc.
16408
8b76d6f8
SM
16409 * gmalloc.c [CYGWIN] (bss_sbrk_heapbase, bss_sbrk_heapinfo):
16410 New variables.
a4579d33
KB
16411 (malloc_initialize_1) [CYGWIN]: Prepare for reinitializing the
16412 dumped emacs.
16413 (_free_internal_nolock) [CYGWIN]: Ignore requests to free storage
16414 in the static heap.
16415 [CYGWIN] (special_realloc): New function.
16416 (_realloc_internal_nolock) [CYGWIN]: Use the new function on
16417 requests to realloc storage in the static heap.
16418
3ebec551
PE
164192011-08-15 Paul Eggert <eggert@cs.ucla.edu>
16420
16421 * bidi.c (bidi_initialize): Remove unused local.
16422
9fd8be00
EZ
164232011-08-15 Eli Zaretskii <eliz@gnu.org>
16424
6b02f655
SM
16425 * bidimirror.h:
16426 * biditype.h: Remove file.
16427 * makefile.w32-in ($(BLD)/bidi.$(O)):
16428 * deps.mk (bidi.o): Remove biditype.h and bidimirror.h.
474a8465
EZ
16429
16430 * dispextern.h: Fix a typo in the comment to bidi_type_t.
16431
16432 * chartab.c: Improve commentary for the uniprop_table API.
16433
32413314
EZ
16434 * bidi.c (bidi_paragraph_init): Support zero value of
16435 bidi_ignore_explicit_marks_for_paragraph_level.
474a8465
EZ
16436 (bidi_initialize): Use uniprop_table instead of including
16437 biditype.h and bidimirror.h.
32413314 16438
9fd8be00
EZ
16439 * xdisp.c (move_it_in_display_line_to): Don't reset pixel
16440 coordinates of the iterator when restoring from ppos_it.
16441 (Bug#9296)
16442
5cf2b69b
KH
164432011-08-14 Kenichi Handa <handa@m17n.org>
16444
16445 * process.c (create_process): Call setup_process_coding_systems
72ad093b 16446 after the pid of the process is set to -1 (Bug#8162).
5cf2b69b 16447
daf17d00
EZ
164482011-08-14 Eli Zaretskii <eliz@gnu.org>
16449
16450 * xdisp.c (move_it_in_display_line_to): Don't invoke
16451 IT_RESET_X_ASCENT_DESCENT when iterator position was restored from
16452 ppos_it. Fixes vertical cursor motion when line beginning is
16453 covered by an image. (Bug#9296)
16454
08e3161a
JD
164552011-08-14 Jan Djärv <jan.h.d@swipnet.se>
16456
16457 * nsterm.h (ns_run_ascript): Declare.
16458 (NSAPP_DATA2_RUNASSCRIPT): Define.
16459
16460 * nsfns.m (as_script, as_result, as_status): New static variables.
16461 (ns_run_ascript): New function.
5e617bc2 16462 (Fns_do_applescript): Set variables as_*. Make an NSApplicationDefined
08e3161a
JD
16463 event with data2 set to NSAPP_DATA2_RUNASSCRIPT, post it and then start
16464 the event loop. Get status from as_status (Bug#7276).
16465
16466 * nsterm.m (sendEvent): If event is NSApplicationDefined and
16467 data2 is NSAPP_DATA2_RUNASSCRIPT, call ns_run_ascript and then exit
16468 the event loop (Bug#7276).
16469
a3720aa2
AS
164702011-08-14 Andreas Schwab <schwab@linux-m68k.org>
16471
16472 * gnutls.c (QCgnutls_bootprop_priority)
16473 (QCgnutls_bootprop_trustfiles, QCgnutls_bootprop_keylist)
16474 (QCgnutls_bootprop_crlfiles, QCgnutls_bootprop_callbacks)
16475 (QCgnutls_bootprop_loglevel, QCgnutls_bootprop_hostname)
16476 (QCgnutls_bootprop_min_prime_bits, QCgnutls_bootprop_verify_flags)
16477 (QCgnutls_bootprop_verify_hostname_error)
16478 (QCgnutls_bootprop_callbacks_verify): Rename from
16479 Qgnutls_bootprop_..., all uses changed.
16480
16481 * xfaces.c (QCignore_defface): Rename from Qignore_defface, all
16482 uses changed.
16483
0a0d27fb
PE
164842011-08-14 Paul Eggert <eggert@cs.ucla.edu>
16485
19d5c50c
PE
16486 * xfaces.c (Qframe_set_background_mode): Now static.
16487 * dispextern.h (Qframe_set_background_mode): Remove decl.
16488
0a0d27fb
PE
16489 * process.c (Fnetwork_interface_info): Declare local only if needed.
16490
377538cb
JD
164912011-08-13 Jan Djärv <jan.h.d@swipnet.se>
16492
16493 * process.c: Include ifaddrs.h and net/if_dl.h if available (Bug#8477).
16494 (Fnetwork_interface_list): Allocate in increments of bytes instead
16495 of sizeof (struct ifreq). Iterate over ifconf.ifc_req by counting
16496 bytes (Bug#8477). Count bytes correctly when ifr_addr is a struct
16497 sockaddr.
16498 (struct ifflag_def): notrailers is smart on OSX.
16499 (Fnetwork_interface_info): Handle case when ifr_flags is negative.
16500 Get hardware address with getifaddrs if available.
16501
08fff70c
EZ
165022011-08-12 Eli Zaretskii <eliz@gnu.org>
16503
16504 * xdisp.c (iterate_out_of_display_property): xassert that
16505 IT->position is set to within IT->object's boundaries. Break from
16506 the loop as soon as EOB is reached; avoids infloops in redisplay
8b76d6f8
SM
16507 when IT->position is set up wrongly due to some bug.
16508 Set IT->current to match the bidi iterator unconditionally.
08fff70c
EZ
16509 (push_display_prop): Allow GET_FROM_STRING as IT->method on
16510 entry. Force push_it to save on the stack the current
16511 buffer/string position, to be restored by pop_it. Fix flags in
16512 the iterator structure wrt the object coming from a display
16513 property, as `line-prefix' and `wrap-prefix' are not ``replacing''
16514 properties. (Bug#9284)
16515
7be1c708 165162011-08-09 Andreas Schwab <schwab@linux-m68k.org>
aac0c6e3 16517
7be1c708
CY
16518 * fontset.c (fontset_get_font_group): Add proper type checks.
16519 (Bug#9172)
aac0c6e3 16520
7be1c708 165212011-08-09 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
aac0c6e3 16522
7be1c708
CY
16523 * unexmacosx.c (print_load_command_name): Add cases LC_FUNCTION_STARTS
16524 and LC_VERSION_MIN_MACOSX.
16525 (copy_linkedit_data) [LC_FUNCTION_STARTS]: New function.
16526 (dump_it) [LC_FUNCTION_STARTS]: Use it.
aac0c6e3 16527
97bb72a6
EZ
165282011-08-08 Eli Zaretskii <eliz@gnu.org>
16529
16530 * xdisp.c (forward_to_next_line_start): Allow to use the
8b76d6f8
SM
16531 no-display-properties-and-no-overlays under bidi display.
16532 Set disp_pos in the bidi iterator to avoid searches for display
757664a4 16533 properties and overlays.
97bb72a6 16534
d5617611
CY
165352011-08-08 Chong Yidong <cyd@stupidchicken.com>
16536
37e11a63
CY
16537 * editfns.c (Fset_time_zone_rule): Document relationship with the
16538 setenv function.
16539
d5617611
CY
16540 * ftfont.c (ftfont_pattern_entity): Copy the extras argument to
16541 the font entity extracted from the cache (Bug#8109).
16542
58872834
CY
165432011-08-07 Chong Yidong <cyd@stupidchicken.com>
16544
16545 * composite.c (autocmp_chars): Don't reset point. That is done by
16546 restore_point_unwind (Bug#5984).
16547
75bfc667
JL
165482011-08-07 Juri Linkov <juri@jurta.org>
16549
16550 * editfns.c (Fformat_time_string): Doc fix, add tag `usage:'
16551 to show the arg `TIME' instead of `TIMEVAL'.
16552
d1410150
EZ
165532011-08-06 Eli Zaretskii <eliz@gnu.org>
16554
16555 * xdisp.c (set_cursor_from_row): Fix cursor positioning when a
16556 display property strides EOL and includes a newline, as in
16557 longlines-mode. (Bug#9254)
75b771e4
EZ
16558 (move_it_in_display_line_to): Fix vertical-motion in a buffer with
16559 word-wrap under bidirectional display. (Bug#9224)
d1410150
EZ
16560
16561 * bidi.c (bidi_unshelve_cache): Don't reset the cache if JUST_FREE
16562 is non-zero, even if the data buffer is NULL. Fixes a crash in
16563 vertical-motion with longlines-mode. (Bug#9254)
16564
35928349
EZ
165652011-08-05 Eli Zaretskii <eliz@gnu.org>
16566
ec7cc85b
EZ
16567 * bidi.c <bidi_cache_total_alloc>: Now static.
16568 (bidi_initialize): Initialize bidi_cache_total_alloc.
16569
8b76d6f8 16570 * xdisp.c (display_line): Release buffer allocated for shelved bidi
35928349
EZ
16571 cache. (Bug#9221)
16572
16573 * bidi.c (bidi_shelve_cache, bidi_unshelve_cache): Track total
16574 amount allocated this far in `bidi_cache_total_alloc'.
16575 (bidi_unshelve_cache): Accept an additional argument JUST_FREE; if
16576 non-zero, only free the data buffer without restoring the cache
16577 contents. All callers changed.
16578
16579 * dispextern.h (bidi_unshelve_cache): Update prototype.
16580
16581 * xdisp.c (SAVE_IT, pos_visible_p, move_it_in_display_line_to)
16582 (move_it_in_display_line, move_it_to)
16583 (move_it_vertically_backward, move_it_by_lines): Replace the call
16584 to xfree to an equivalent call to bidi_unshelve_cache.
16585 (move_it_in_display_line_to): Fix logic of returning
412b6358 16586 MOVE_POS_MATCH_OR_ZV in the bidi case. (Bug#9224)
35928349 16587
e2e2423b
EZ
165882011-08-05 Eli Zaretskii <eliz@gnu.org>
16589
16590 * xdisp.c (set_cursor_from_row): Prefer the candidate glyph that
16591 came from a string character with a `cursor' property. (Bug#9229)
16592
ae9e757a
JD
165932011-08-04 Jan Djärv <jan.h.d@swipnet.se>
16594
16595 * Makefile.in (LIB_PTHREAD): New variable.
16596 (LIBES): Add LIB_PTHREAD (Bug#9216).
16597
16598 * alloc.c, emacs.c, gmalloc.c, gtkutil.c, keyboard.c, syssignal.h:
16599 Rename HAVE_GTK_AND_PTHREAD to HAVE_PTHREAD (Bug#9216).
16600
213bd7f2
AS
166012011-08-04 Andreas Schwab <schwab@linux-m68k.org>
16602
6b02f655 16603 * regex.c (re_iswctype): Remove some redundant boolean conversions.
213bd7f2 16604
99aaf75f
JD
166052011-08-04 Jan Djärv <jan.h.d@swipnet.se>
16606
16607 * xterm.c (x_find_topmost_parent): New function.
16608 (x_set_frame_alpha): Find topmost parent window with
16609 x_find_topmost_parent and set the property there also (bug#9181).
16610 (handle_one_xevent): Call x_set_frame_alpha on ReparentNotify.
16611
c74e9d86
PE
166122011-08-04 Paul Eggert <eggert@cs.ucla.edu>
16613
16614 * callproc.c (Fcall_process): Avoid vfork clobbering
16615 the local vars buffer, coding_systems, current_dir.
16616
640c8776
SM
166172011-08-03 Stefan Monnier <monnier@iro.umontreal.ca>
16618
16619 * keymap.c (Fmake_composed_keymap): Move to subr.el.
16620
f26d0e4c
PE
166212011-08-03 Paul Eggert <eggert@cs.ucla.edu>
16622
8a10d76c
PE
16623 * fontset.c (dump_fontset) [FONTSET_DEBUG]: Declare EXTERNALLY_VISIBLE
16624 so that it is not optimized away.
16625
f26d0e4c
PE
16626 * xdisp.c (compute_display_string_pos): Remove unused local.
16627
55439c61
EZ
166282011-08-02 Eli Zaretskii <eliz@gnu.org>
16629
16630 Fix slow cursor motion and scrolling in large buffers with
16631 selective display, like Org Mode buffers. (Bug#9218)
16632
16633 * dispextern.h (struct bidi_it): New member disp_prop_p.
16634
16635 * xdisp.c: Remove one-slot cache of display string positions.
16636 (compute_display_string_pos): Accept an additional argument
5e617bc2 16637 DISP_PROP_P; callers changed. Scan at most 5K characters forward
55439c61
EZ
16638 for a display string or property. If found, set DISP_PROP_P
16639 non-zero.
16640
16641 * bidi.c (bidi_fetch_char): Accept an additional argument
640c8776
SM
16642 DISP_PROP_P, and pass it to compute_display_string_pos.
16643 Only handle text covered by a display string if DISP_PROP_P is returned
55439c61
EZ
16644 non-zero. All callers of bidi_fetch_char changed.
16645
fb33fa43
SM
166462011-08-02 Stefan Monnier <monnier@iro.umontreal.ca>
16647
16648 * keymap.c (Fdefine_key): Fix Lisp_Object/int mixup; apply some CSE.
16649
b099e063
DM
166502010-12-03 Don March <don@ohspite.net>
16651
16652 * keymap.c (Fdefine_key): Fix non-prefix key error message when
16653 last character M-[char] is translated to ESC [char] (bug#7541).
16654
5cc7f7af
KH
166552011-08-02 Kenichi Handa <handa@m17n.org>
16656
d0fffa3f 16657 * lisp.h (uniprop_table): Extern it.
5cc7f7af
KH
16658
16659 * chartab.c (uniprop_table): Make it non-static.
16660
525d5e6e
EZ
166612011-08-01 Eli Zaretskii <eliz@gnu.org>
16662
16663 * xdisp.c (forward_to_next_line_start): Accept additional argument
16664 BIDI_IT_PREV, and store into it the state of the bidi iterator had
16665 on the newline.
16666 (reseat_at_next_visible_line_start): Use the bidi iterator state
16667 returned by forward_to_next_line_start to restore the state of
16668 it->bidi_it after backing up to previous newline. (Bug#9212)
16669
31011111
AS
166702011-07-30 Andreas Schwab <schwab@linux-m68k.org>
16671
16672 * regex.c (re_comp): Protoize.
16673 (re_exec): Fix return type.
16674 (regexec): Fix type of `ret'. (Bug#9203)
16675
476371c4
PE
166762011-07-28 Paul Eggert <eggert@cs.ucla.edu>
16677
e5d76069
PE
16678 * image.c (check_image_size): Use 1024x1024 if unknown frame (Bug#9189).
16679 This is needed if max-image-size is a floating-point number.
16680
9a79b20c
AS
166812011-07-28 Andreas Schwab <schwab@linux-m68k.org>
16682
16683 * print.c (print_object): Print empty symbol as ##.
16684
16685 * lread.c (read1): Read ## as empty symbol.
16686
d8c2fa78
AA
166872011-07-28 Alp Aker <alp.tekin.aker@gmail.com>
16688
16689 * nsfns.m (x_set_foreground_color): Set f->foreground_pixel when
16690 setting frame foreground color (Bug#9175).
16691 (x_set_background_color): Likewise.
16692
ffe57a7a
AA
16693 * nsmenu.m (-setText): Size tooltip dimensions precisely to
16694 contents (Bug#9176).
16695 (EmacsTooltip -init): Remove bezels and add shadows to
16696 tooltip windows.
16697
bf3492a5
AA
16698 * nsterm.m (ns_dumpglyphs_stretch): Avoid overwriting left fringe
16699 or scroll bar (Bug#8470).
16700
d55e9c53
AA
16701 * nsfont.m (nsfont_open): Remove assignment to voffset and
16702 unnecessary vars hshink, expand, hd, full_height, min_height.
16703 (nsfont_draw): Use s->ybase as baseline for glyph drawing (Bug#8913).
16704
16705 * nsterm.h (nsfont_info): Remove voffset field.
16706
d8c2fa78 167072011-07-28 Alp Aker <alp.tekin.aker@gmail.com>
4843aac3
AA
16708
16709 Implement strike-through and overline on NextStep (Bug#8863).
16710
16711 * nsfont.m (nsfont_open): Use underline position provided by font,
16712 instead of hard-coded value of 2.
16713 (nsfont_draw): Call ns_draw_text_decoration instead.
16714
16715 * nsterm.h: Add declaration for ns_draw_text_decoration.
16716
16717 * nsterm.m (ns_draw_text_decoration): New function for drawing
16718 underline, overline, and strike-through.
16719 (ns_dumpglyphs_image, ns_dumpglyphs_stretch): Add call to
16720 ns_draw_text_decoration. Change treatment of cursor drawing to
8d5ed899 16721 accommodate underlining, etc.
4843aac3 16722
4cc60b9b
EZ
167232011-07-28 Eli Zaretskii <eliz@gnu.org>
16724
bc7ece87
EZ
16725 * buffer.c (init_buffer_once): Set bidi-display-reordering to t by
16726 default.
4cc60b9b 16727
476371c4
PE
167282011-07-28 Paul Eggert <eggert@cs.ucla.edu>
16729
66606eea
PE
16730 * alloc.c (memory_full) [!SYNC_INPUT]: Fix signal-related race.
16731 Without this fix, if a signal arrives just after memory fills up,
16732 'malloc' might be invoked reentrantly.
16733
476371c4
PE
16734 * image.c (x_check_image_size) [!HAVE_X_WINDOWS]: Return 1.
16735 In other words, assume that every image size is allowed, on non-X
16736 hosts. This assumption is probably wrong, but it lets Emacs compile.
16737
f3fcc40d
AS
167382011-07-28 Andreas Schwab <schwab@linux-m68k.org>
16739
16740 * regex.c (re_iswctype): Convert return values to boolean.
16741
350c992f
EZ
167422011-07-28 Eli Zaretskii <eliz@fencepost.gnu.org>
16743
16744 * xdisp.c (compute_display_string_pos): Don't use cached display
16745 string position if the buffer had its restriction changed.
16746 (Bug#9184)
16747
5266b4bb
PE
167482011-07-28 Paul Eggert <eggert@cs.ucla.edu>
16749
16750 * callproc.c (Fcall_process): Use 'volatile' to avoid vfork clobbering.
16751
2573a837 167522011-07-28 Paul Eggert <eggert@cs.ucla.edu>
ca4aa935 16753
41f55ccd 16754 Integer signedness and overflow and related fixes. (Bug#9079)
cf950e6b 16755
39e378da
PE
16756 * bidi.c: Integer size and overflow fixes.
16757 (bidi_cache_size, bidi_cache_idx, bidi_cache_last_idx)
16758 (bidi_cache_start, bidi_cache_fetch_state, bidi_cache_search)
16759 (bidi_cache_find_level_change, bidi_cache_ensure_space)
16760 (bidi_cache_iterator_state, bidi_cache_find, bidi_cache_start_stack)
16761 (bidi_find_other_level_edge):
16762 Use ptrdiff_t instead of EMACS_INT where either will do.
16763 This works better on 32-bit hosts configured --with-wide-int.
16764 (bidi_cache_ensure_space): Check for size-calculation overflow.
16765 Use % rather than repeated addition, for better worst-case speed.
16766 Don't set bidi_cache_size until after xrealloc returns, because it
16767 might not return.
16768 (bidi_dump_cached_states): Use ptrdiff_t, not int, to avoid overflow.
f0eb61e9
PE
16769 (bidi_cache_ensure_space): Also check that the bidi cache size
16770 does not exceed that of the largest Lisp string or buffer. See Eli
16771 Zaretskii in <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9079#29>.
39e378da 16772
5e927815
PE
16773 * alloc.c (__malloc_size_t): Remove.
16774 All uses replaced by size_t. See Andreas Schwab's note
16775 <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9079#8>.
16776
ca4aa935
PE
16777 * image.c: Improve checking for integer overflow.
16778 (check_image_size): Assume that f is nonnull, since
16779 it is always nonnull in practice. This is one less thing to
16780 worry about when checking for integer overflow later.
16781 (x_check_image_size): New function, which checks for integer
16782 overflow issues inside X.
16783 (x_create_x_image_and_pixmap, xbm_read_bitmap_data): Use it.
16784 This removes the need for a memory_full check.
16785 (xbm_image_p): Rewrite to avoid integer multiplication overflow.
16786 (Create_Pixmap_From_Bitmap_Data, xbm_load): Use x_check_image_size.
16787 (xbm_read_bitmap_data): Change locals back to 'int', since
16788 their values must fit in 'int'.
16789 (xpm_load_image, png_load, tiff_load):
16790 Invoke x_create_x_image_and_pixmap earlier,
16791 to avoid much needless work if the image is too large.
16792 (tiff_load): Treat overly large images as if
16793 x_create_x_image_and_pixmap failed, not as malloc failures.
16794 (gs_load): Use x_check_image_size.
16795
5f8f9cc2
PE
16796 * gtkutil.c: Omit integer casts.
16797 (xg_get_pixbuf_from_pixmap): Remove unnecessary cast.
16798 (xg_set_toolkit_scroll_bar_thumb): Rewrite to avoid need for cast.
16799
5adf60bc
PE
16800 * image.c (png_load): Don't assume height * row_bytes fits in 'int'.
16801
c8907a93
PE
16802 * xfaces.c (Fbitmap_spec_p): Fix integer overflow bug.
16803 Without this fix, (bitmap-spec-p '(34359738368 1 "x"))
16804 would wrongly return t on a 64-bit host.
16805
e3c25c68
PE
16806 * dispnew.c (init_display): Use *_RANGE_OVERFLOW macros.
16807 The plain *_OVERFLOW macros run afoul of GCC bug 49705
16808 <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49705>
16809 and therefore cause GCC to emit a bogus diagnostic in some cases.
16810
3f791afe
PE
16811 * image.c: Integer signedness and overflow and related fixes.
16812 This is not an exhaustive set of fixes, but it's time to
16813 record what I've got.
16814 (lookup_pixel_color, check_image_size): Remove redundant decls.
16815 (check_image_size): Don't assume that arbitrary EMACS_INT values
16816 fit in 'int', or that arbitrary 'double' values fit in 'int'.
16817 (x_alloc_image_color, x_create_x_image_and_pixmap, png_load)
16818 (tiff_load, imagemagick_load_image):
16819 Check for overflow in size calculations.
16820 (x_create_x_image_and_pixmap): Remove unnecessary test for
16821 xmalloc returning NULL; that can't happen.
16822 (xbm_read_bitmap_data): Don't assume sizes fit into 'int'.
16823 (xpm_color_bucket): Use better integer hashing function.
16824 (xpm_cache_color): Don't possibly over-allocate memory.
16825 (struct png_memory_storage, tiff_memory_source, tiff_seek_in_memory)
16826 (gif_memory_source):
16827 Use ptrdiff_t, not int or size_t, to record sizes.
16828 (png_load): Don't assume values greater than 2**31 fit in 'int'.
16829 (our_stdio_fill_input_buffer): Prefer ptrdiff_t to size_t when
16830 either works, as we prefer signed integers.
16831 (tiff_read_from_memory, tiff_write_from_memory):
16832 Return tsize_t, not size_t, since that's what the TIFF API wants.
16833 (tiff_read_from_memory): Don't fail simply because the read would
16834 go past EOF; instead, return a short read.
16835 (tiff_load): Omit no-longer-needed casts.
16836 (Fimagemagick_types): Don't assume size fits into 'int'.
16837
3cc5a532
PE
16838 Improve hashing quality when configured --with-wide-int.
16839 * fns.c (hash_string): New function, taken from sxhash_string.
16840 Do not discard information about ASCII character case; this
16841 discarding is no longer needed.
16842 (sxhash-string): Use it. Change sig to match it. Caller changed.
16843 * lisp.h: Declare it.
16844 * lread.c (hash_string): Remove, since we now use fns.c's version.
16845 The fns.c version returns a wider integer if --with-wide-int is
16846 specified, so this should help the quality of the hashing a bit.
16847
b312a492
PE
16848 * emacs.c: Integer overflow minor fix.
16849 (heap_bss_diff): Now uprintmax_t, not unsigned long. All used changed.
16850 Define only if GNU_LINUX.
16851 (main, Fdump_emacs): Set and use heap_bss_diff only if GNU_LINUX.
16852
dfd153ae
PE
16853 * dispnew.c: Integer signedness and overflow fixes.
16854 Remove unnecessary forward decls, that were a maintenance hassle.
16855 (history_tick): Now uprintmax_t, so it's more likely to avoid overflow.
16856 All uses changed.
16857 (adjust_glyph_matrix, realloc_glyph_pool, adjust_frame_message_buffer)
16858 (scrolling_window): Use ptrdiff_t, not int, for byte count.
16859 (prepare_desired_row, line_draw_cost):
16860 Use int, not unsigned, where either works.
16861 (save_current_matrix, restore_current_matrix):
16862 Use ptrdiff_t, not size_t, where either works.
16863 (init_display): Check for overflow more accurately, and without
16864 relying on undefined behavior.
16865
a81d11a3
PE
16866 * editfns.c (pWIDE, pWIDElen, signed_wide, unsigned_wide):
16867 Remove, replacing with the new symbols in lisp.h. All uses changed.
16868 * fileio.c (make_temp_name):
16869 * filelock.c (lock_file_1, lock_file):
16870 * xdisp.c (message_dolog):
16871 Don't assume PRIdMAX etc. works; this isn't portable to pre-C99 hosts.
16872 Use pMd etc. instead.
16873 * lisp.h (printmax_t, uprintmax_t, pMd, pMu): New types and macros,
16874 replacing the pWIDE etc. symbols removed from editfns.c.
16875
3300e6fd
PE
16876 * keyboard.h (num_input_events): Now uintmax_t.
16877 This is (very slightly) less likely to mess up due to wraparound.
16878 All uses changed.
16879
fd05c7e9
PE
16880 * buffer.c: Integer signedness fixes.
16881 (alloc_buffer_text, enlarge_buffer_text):
16882 Use ptrdiff_t rather than size_t when either will do, as we prefer
16883 signed integers.
16884
903fe15d
PE
16885 * alloc.c: Integer signedness and overflow fixes.
16886 Do not impose an arbitrary 32-bit limit on malloc sizes when debugging.
16887 (__malloc_size_t): Default to size_t, not to int.
16888 (pure_size, pure_bytes_used_before_overflow, stack_copy_size)
16889 (Fgarbage_collect, mark_object_loop_halt, mark_object):
16890 Prefer ptrdiff_t to size_t when either would do, as we prefer
16891 signed integers.
16892 (XMALLOC_OVERRUN_CHECK_OVERHEAD): New macro.
16893 (xmalloc_overrun_check_header, xmalloc_overrun_check_trailer):
16894 Now const. Initialize with values that are in range even if char
16895 is signed.
16896 (XMALLOC_PUT_SIZE, XMALLOC_GET_SIZE): Remove, replacing with ...
16897 (xmalloc_put_size, xmalloc_get_size): New functions. All uses changed.
16898 These functions do the right thing with sizes > 2**32.
16899 (check_depth): Now ptrdiff_t, not int.
16900 (overrun_check_malloc, overrun_check_realloc, overrun_check_free):
16901 Adjust to new way of storing sizes. Check for size overflow bugs
16902 in rest of code.
16903 (STRING_BYTES_MAX): Adjust to new overheads. The old code was
16904 slightly wrong anyway, as it missed one instance of
16905 XMALLOC_OVERRUN_CHECK_OVERHEAD.
16906 (refill_memory_reserve): Omit needless cast to size_t.
16907 (mark_object_loop_halt): Mark as externally visible.
16908
ac82cc6a
PE
16909 * xselect.c: Integer signedness and overflow fixes.
16910 (Fx_register_dnd_atom, x_handle_dnd_message):
16911 Use ptrdiff_t, not size_t, since we prefer signed.
16912 (Fx_register_dnd_atom): Check for ptrdiff_t (and size_t) overflow.
16913 * xterm.h (struct x_display_info): Use ptrdiff_t, not size_t, for
16914 x_dnd_atoms_size and x_dnd_atoms_length.
16915
c2d1e36d
PE
16916 * doprnt.c: Prefer signed to unsigned when either works.
16917 * eval.c (verror):
16918 * doprnt.c (doprnt):
16919 * lisp.h (doprnt):
16920 * xdisp.c (vmessage):
16921 Use ptrdiff_t, not size_t, when using or implementing doprnt,
16922 since the sizes cannot exceed ptrdiff_t bounds anyway, and we
16923 prefer signed arithmetic to avoid comparison confusion.
16924 * doprnt.c (doprnt): Avoid a "+ 1" that can't overflow,
16925 but is a bit tricky.
16926
0e926e56
PE
16927 Assume freestanding C89 headers, string.h, stdlib.h.
16928 * data.c, doprnt.c, floatfns.c, print.c:
16929 Include float.h unconditionally.
16930 * gmalloc.c: Assume C89-at-least behavior for preprocessor,
16931 limits.h, stddef.h, string.h. Use memset instead of 'flood'.
16932 * regex.c: Likewise for stddef.h, string.h.
16933 (ISASCII): Remove; can assume it returns 1 now. All uses removed.
16934 * s/aix4-2.h (HAVE_STRING_H): Remove obsolete undef.
16935 * s/ms-w32.h (HAVE_LIMITS_H, HAVE_STRING_H, HAVE_STDLIB_H)
16936 (STDC_HEADERS): Remove obsolete defines.
16937 * sysdep.c: Include limits.h unconditionally.
16938
9cfdb3ec
PE
16939 Assume support for memcmp, memcpy, memmove, memset.
16940 * lisp.h, sysdep.c (memcmp, memcpy, memmove, memset):
16941 * regex.c (memcmp, memcpy):
16942 Remove; we assume C89 now.
16943
16944 * gmalloc.c (memcpy, memset, memmove): Remove; we assume C89 now.
16945 (__malloc_safe_bcopy): Remove; no longer needed.
16946
cf950e6b 16947 * lisp.h (struct vectorlike_header, struct Lisp_Subr): Signed sizes.
6089c567
PE
16948 Use EMACS_INT, not EMACS_UINT, for sizes. The code works equally
16949 well either way, and we prefer signed to unsigned.
16950
dbf38e02
LMI
169512011-07-27 Lars Magne Ingebrigtsen <larsi@gnus.org>
16952
16953 * gnutls.c (emacs_gnutls_read): Don't message anything if the peer
16954 closes the connection while we're reading (bug#9182).
16955
d6f0886c 169562011-07-25 Jan Djärv <jan.h.d@swipnet.se>
24e0f6b1 16957
d6f0886c
JD
16958 * nsmenu.m (ns_popup_dialog): Add an "ok" button if no buttons
16959 are specified (Bug#9168).
24e0f6b1 16960
2eb1f9e6
PE
169612011-07-25 Paul Eggert <eggert@cs.ucla.edu>
16962
16963 * bidi.c (bidi_dump_cached_states): Fix printf format mismatch.
16964 Found by GCC static checking and --with-wide-int on a 32-bit host.
16965
22381272 169662011-07-25 Eli Zaretskii <eliz@gnu.org>
7daee910
EZ
16967
16968 * xdisp.c (compute_display_string_pos): Fix logic of caching
16969 previous display string position. Initialize cached_prev_pos to
16970 -1. Fixes slow-down at the beginning of a buffer.
16971
f25e39b4
EZ
169722011-07-24 Eli Zaretskii <eliz@gnu.org>
16973
16974 * xfaces.c (check_lface_attrs) [HAVE_WINDOW_SYSTEM]: Allow `nil'
16975 for attrs[LFACE_FONTSET_INDEX].
16976
04c4b52e
PE
169772011-07-23 Paul Eggert <eggert@cs.ucla.edu>
16978
16979 * xml.c (parse_region): Remove unused local
16980 that was recently introduced.
16981
c1734fbd
EZ
169822011-07-23 Eli Zaretskii <eliz@gnu.org>
16983
be18c5a5
EZ
16984 * xfns.c (unwind_create_frame) [GLYPH_DEBUG]: Adapt to changes in
16985 2008-02-22T17:42:09Z!monnier@iro.umontreal.ca.
16986
c1734fbd
EZ
16987 * xdisp.c (move_it_in_display_line_to): Record the best matching
16988 position for TO_CHARPOS while scanning the line, and restore it on
640c8776
SM
16989 exit if none of the characters scanned was an exact match.
16990 Fixes vertical-motion and pos-visible-in-window-p under bidi redisplay
a9269c18
EZ
16991 when exact match is impossible due to invisible text, and the
16992 lines are truncated.
16993
a258d627
JD
169942011-07-23 Jan Djärv <jan.h.d@swipnet.se>
16995
16996 * nsterm.m (initFrameFromEmacs): Set NSTitledWindowMask in styleMask
16997 for OSX >= 10.7.
16998
b6d5a689
EZ
169992011-07-22 Eli Zaretskii <eliz@gnu.org>
17000
0f74f785
EZ
17001 Fix a significant slow-down of cursor motion with C-n, C-p,
17002 C-f/C-b, and C-v/M-v that couldn't keep up with keyboard
17003 auto-repeat under bidi redisplay in fontified buffers.
b6d5a689 17004 * xdisp.c (compute_stop_pos_backwards): New function.
b6d5a689
EZ
17005 (next_element_from_buffer): Call compute_stop_pos_backwards to
17006 find a suitable prev_stop when we find ourselves before
0f74f785
EZ
17007 base_level_stop.
17008 (reseat): Don't look for prev_stop, as that could mean a very long
17009 run.
17010 <cached_disp_pos, cached_disp_buffer, cached_disp_modiff>
17011 <cached_disp_overlay_modiff>: Cache for last found display string
17012 position.
551918c1 17013 (compute_display_string_pos): Return the cached position if asked
0f74f785
EZ
17014 about the same buffer in the same area of character positions, and
17015 the buffer wasn't changed since the time the display string
17016 position was cached.
551918c1 17017
b2d0c91a
EZ
170182011-07-22 Eli Zaretskii <eliz@gnu.org>
17019
17020 * xdisp.c (rows_from_pos_range): Don't ignore glyphs whose object
17021 is an integer, which is important for empty lines. (Bug#9149)
17022
043604ee
CY
170232011-07-22 Chong Yidong <cyd@stupidchicken.com>
17024
17025 * frame.c (Fmodify_frame_parameters): In tty case, update the
17026 default face if necessary (Bug#4238).
17027
da4adb04
CY
170282011-07-21 Chong Yidong <cyd@stupidchicken.com>
17029
17030 * editfns.c (Fstring_to_char): No need to explain what a character
17031 is in the docstring (Bug#6576).
17032
9abd0532
LMI
170332011-07-20 Lars Magne Ingebrigtsen <larsi@gnus.org>
17034
17035 * xml.c (parse_region): Make sure we always return a tree.
17036
36881d16
HK
170372011-07-20 HAMANO Kiyoto <khiker.mail@gmail.com>
17038
17039 * xml.c (parse_region): If a document contains only comments,
17040 return that, too.
17041
1e98674d
LMI
170422011-07-20 Lars Magne Ingebrigtsen <larsi@gnus.org>
17043
17044 * xml.c (make_dom): Return comments, too.
17045
590bd467
PE
170462011-07-19 Paul Eggert <eggert@cs.ucla.edu>
17047
17048 Port to OpenBSD.
17049 See http://lists.gnu.org/archive/html/emacs-devel/2011-07/msg00688.html
17050 and the surrounding thread.
17051 * minibuf.c (read_minibuf_noninteractive): Rewrite to use getchar
17052 rather than fgets, and retry after EINTR. Otherwise, 'emacs
17053 --batch -f byte-compile-file' fails on OpenBSD if an inactivity
17054 timer goes off.
17055 * s/openbsd.h (BROKEN_SIGIO): Define.
17056 * unexelf.c (unexec) [__OpenBSD__]:
17057 Don't update the .mdebug section of the Alpha COFF symbol table.
17058
f41628b2
LMI
170592011-07-19 Lars Magne Ingebrigtsen <larsi@gnus.org>
17060
17061 * lread.c (syms_of_lread): Clarify when `lexical-binding' is used
17062 (bug#8460).
17063
b59b67c5
PE
170642011-07-18 Paul Eggert <eggert@cs.ucla.edu>
17065
15e3a074
PE
17066 * fileio.c (Fcopy_file) [!MSDOS]: Tighten created file's mask.
17067 This fixes some race conditions on the permissions of any newly
17068 created file.
17069
41bed37d
PE
17070 * alloc.c (valid_pointer_p): Use pipe, not open.
17071 This fixes some permissions issues when debugging.
17072
b59b67c5
PE
17073 * fileio.c (Fcopy_file): Adjust mode if fchown fails. (Bug#9002)
17074 If fchown fails to set both uid and gid, try to set just gid,
17075 as that is sometimes allowed. Adjust the file's mode to eliminate
17076 setuid or setgid bits that are inappropriate if fchown fails.
17077
925a6be7
SM
170782011-07-18 Stefan Monnier <monnier@iro.umontreal.ca>
17079
17080 * xdisp.c (next_element_from_string, next_element_from_buffer): Use EQ
17081 to compare Lisp_Objects.
17082 * gnutls.c (syms_of_gnutls): Rename Vgnutls_log_level to
17083 global_gnutls_log_level, don't mistake it for a Lisp_Object.
17084 (init_gnutls_functions, emacs_gnutls_handle_error): Fix up uses.
17085
52968808
AS
170862011-07-17 Andreas Schwab <schwab@linux-m68k.org>
17087
0a6a104b
AS
17088 * lread.c (read_integer): Unread even EOF character.
17089 (read1): Likewise. Properly record start position of symbol.
17090
52968808
AS
17091 * lread.c (read1): Read `#:' as empty uninterned symbol if no
17092 symbol character follows.
17093
9e381cdd
PE
170942011-07-17 Paul Eggert <eggert@cs.ucla.edu>
17095
17096 * fileio.c (Fcopy_file): Pacify gcc re fchown. (Bug#9002)
17097 This works around a problem with the previous change to Fcopy_file.
17098 Recent glibc declares fchown with __attribute__((warn_unused_result)),
17099 and without this change, GCC might complain about discarding
17100 fchown's return value.
17101
b5641435
JB
171022011-07-16 Juanma Barranquero <lekktu@gmail.com>
17103
17104 * makefile.w32-in (GLOBAL_SOURCES): Add gnutls.c (followup to bug#9059).
17105
a8031457
PE
171062011-07-16 Paul Eggert <eggert@cs.ucla.edu>
17107
17108 * fileio.c (Fcopy_file): Don't diagnose fchown failures. (Bug#9002)
17109
dd889327
LMI
171102011-07-16 Lars Magne Ingebrigtsen <larsi@gnus.org>
17111
750c33f7
LMI
17112 * gnutls.c (syms_of_gnutls): Define `gnutls-log-level' here, since
17113 it's used from the C level.
17114
dd889327
LMI
17115 * process.c: Use the same condition for POLL_FOR_INPUT in both
17116 keyboard.c and process.c (bug#1858).
17117
87e86684
LM
171182011-07-09 Lawrence Mitchell <wence@gmx.li>
17119
17120 * gnutls.c (Qgnutls_bootprop_min_prime_bits): New variable.
17121 (Fgnutls_boot): Use it.
17122
64348f40
AS
171232011-07-15 Andreas Schwab <schwab@linux-m68k.org>
17124
17125 * doc.c (Fsubstitute_command_keys): Revert last change.
17126
1d698799
LMI
171272011-07-15 Lars Magne Ingebrigtsen <larsi@gnus.org>
17128
f863868c
LMI
17129 * doc.c (Fsubstitute_command_keys): Clarify that \= really only
17130 quotes the next character, and doesn't affect other longer
17131 sequences (bug#8935).
17132
1d698799
LMI
17133 * lread.c (syms_of_lread): Clarify that is isn't only
17134 `eval-buffer' and `eval-defun' that's affected by
17135 `lexical-binding' (bug#8460).
17136
aa4b6df6
EZ
171372011-07-15 Eli Zaretskii <eliz@gnu.org>
17138
17139 * xdisp.c (move_it_in_display_line_to): Fix vertical motion with
6b02f655 17140 bidi redisplay when a line includes both an image and is truncated.
aa4b6df6 17141
5d856da6
PE
171422011-07-14 Paul Eggert <eggert@cs.ucla.edu>
17143
ad6042bb
PE
17144 Fix minor problems found by static checking.
17145 * bidi.c (bidi_cache_size): Now EMACS_INT, not size_t.
17146 (elsz): Now a signed constant, not a size_t var. We prefer signed
17147 types to unsigned, to avoid integer comparison confusion. Without
17148 this change, GCC 4.6.1 with -Wunsafe-loop-optimizations complains
17149 "cannot optimize loop, the loop counter may overflow", a symptom
17150 of the confusion.
f00bbb22 17151 * indent.c (Fvertical_motion): Mark locals as initialized.
5d856da6
PE
17152 * xdisp.c (reseat_to_string): Fix pointer signedness issue.
17153
6468f31c
LMI
171542011-07-14 Lars Magne Ingebrigtsen <larsi@gnus.org>
17155
49080b10
LMI
17156 * search.c (Fre_search_backward): Mention `case-fold-search' in
17157 all the re_search_* functions (bug#8138).
17158
6468f31c
LMI
17159 * keyboard.c (Fopen_dribble_file): Document when the file is
17160 closed (bug#8056).
17161
c965adc5
EZ
171622011-07-14 Eli Zaretskii <eliz@gnu.org>
17163
df9733bf
EZ
17164 * bidi.c (bidi_dump_cached_states): Fix format of displaying
17165 bidi_cache_idx.
17166
0bb23927
EZ
17167 Support bidi reordering of display and overlay strings.
17168 * xdisp.c (compute_display_string_pos)
17169 (compute_display_string_end): Accept additional argument STRING.
17170 (init_iterator, reseat_1): Initialize bidi_it->string.s to NULL.
17171 (reseat_to_string): Initialize bidi_it->string.s and
17172 bidi_it->string.schars.
17173 (Fcurrent_bidi_paragraph_direction): Initialize itb.string.s to
640c8776
SM
17174 NULL (avoids a crash in bidi_paragraph_init).
17175 Initialize itb.string.lstring.
0bb23927
EZ
17176 (init_iterator): Call bidi_init_it only of a valid
17177 buffer position was specified. Initialize paragraph_embedding to
17178 L2R.
17179 (reseat_to_string): Initialize the bidi iterator.
17180 (display_string): If we need to ignore text properties of
17181 LISP_STRING, set IT->stop_charpos to IT->end_charpos. (The
17182 original value of -1 will not work with bidi.)
17183 (compute_display_string_pos): First arg is now struct
17184 `text_pos *'; all callers changed. Support display properties on
17185 Lisp strings.
17186 (compute_display_string_end): Support display properties on Lisp
17187 strings.
17188 (init_iterator, reseat_1, reseat_to_string): Initialize the
17189 string.bufpos member to 0 (zero, for compatibility with IT_CHARPOS
17190 when iterating on a string not from display properties).
640c8776
SM
17191 (compute_display_string_pos, compute_display_string_end):
17192 Fix calculation of the object to scan. Fixes an error when using
0bb23927
EZ
17193 arrow keys.
17194 (next_element_from_buffer): Don't abort when IT_CHARPOS is before
640c8776
SM
17195 base_level_stop; instead, set base_level_stop to BEGV.
17196 Fixes crashes in vertical-motion.
0bb23927
EZ
17197 (next_element_from_buffer): Improve commentary for when
17198 the iterator is before prev_stop.
17199 (init_iterator): Initialize bidi_p from the default value of
17200 bidi-display-reordering, not from buffer-local value. Use the
17201 buffer-local value only if initializing for buffer iteration.
17202 (handle_invisible_prop): Support invisible properties on strings
17203 that are being bidi-reordered.
17204 (set_iterator_to_next): Support bidi reordering of C strings and
17205 Lisp strings.
17206 (next_element_from_string): Support bidi reordering of Lisp
17207 strings.
17208 (handle_stop_backwards): Support Lisp strings as well.
640c8776
SM
17209 (display_string): Support display of R2L glyph rows.
17210 Use IT_STRING_CHARPOS when displaying from a Lisp string.
0bb23927
EZ
17211 (init_iterator): Don't initialize it->bidi_p for strings
17212 here.
17213 (reseat_to_string): Initialize it->bidi_p for strings here.
17214 (next_element_from_string, next_element_from_c_string)
17215 (next_element_from_buffer): Add xassert's for correspondence
17216 between IT's object being iterated and it->bidi_it.string
17217 structure.
17218 (face_before_or_after_it_pos): Support bidi iteration.
17219 (next_element_from_c_string): Handle the case of the first string
17220 character that is not the first one in the visual order.
17221 (get_visually_first_element): New function, refactored from common
17222 parts of next_element_from_buffer, next_element_from_string, and
17223 next_element_from_c_string.
17224 (tool_bar_lines_needed, redisplay_tool_bar)
17225 (display_menu_bar): Force left-to-right direction. Add a FIXME
17226 comment for making that be controlled by a user option.
17227 (push_it, pop_it): Save and restore the state of the
17228 bidi iterator. Save and restore the bidi_p flag.
17229 (pop_it): Iterate out of display property for string iteration as
17230 well.
17231 (iterate_out_of_display_property): Support iteration over strings.
17232 (handle_single_display_spec): Set up it->bidi_it for iteration
17233 over a display string, and call bidi_init_it.
17234 (handle_single_display_spec, next_overlay_string)
17235 (get_overlay_strings_1, push_display_prop): Set up the bidi
17236 iterator for displaying display or overlay strings.
17237 (forward_to_next_line_start): Don't use the shortcut if
17238 bidi-iterating.
17239 (back_to_previous_visible_line_start): If handle_display_prop
17240 pushed the iterator stack, restore the internal state of the bidi
17241 iterator by calling bidi_pop_it same number of times.
17242 (reseat_at_next_visible_line_start): If ON_NEWLINE_P is non-zero,
17243 and we are bidi-iterating, don't decrement the iterator position;
17244 instead, set the first_elt flag in the bidi iterator, to produce
17245 the same effect.
17246 (reseat_1): Remove redundant setting of string_from_display_prop_p.
17247 (push_display_prop): xassert that we are iterating a buffer.
17248 (push_it, pop_it): Save and restore paragraph_embedding member.
17249 (handle_single_display_spec, next_overlay_string)
17250 (get_overlay_strings_1, reseat_1, reseat_to_string)
17251 (push_display_prop): Set up the `unibyte' member of bidi_it.string
17252 correctly. Don't assume unibyte strings are not bidi-reordered.
17253 (compute_display_string_pos)
17254 (compute_display_string_end): Fix handling the case of C string.
17255 (push_it, pop_it): Save and restore from_disp_prop_p.
17256 (handle_single_display_spec, push_display_prop): Set the
17257 from_disp_prop_p flag.
17258 (get_overlay_strings_1): Reset the from_disp_prop_p flag.
17259 (pop_it): Call iterate_out_of_display_property only if we are
17260 popping after iteration over a string that came from a display
17261 property. Fix a typo in popping stretch info. Add an assertion
17262 for verifying that the iterator position is in sync with the bidi
17263 iterator.
17264 (handle_single_display_spec, get_overlay_strings_1)
17265 (push_display_prop): Fix initialization of paragraph direction for
17266 string when that of the parent object is not yet determined.
17267 (reseat_1): Call bidi_init_it to resync the bidi
17268 iterator with IT's position. (Bug#7616)
17269 (find_row_edges): If ROW->start.pos gives position
17270 smaller than min_pos, use it as ROW->minpos. (Bug#7616)
17271 (handle_stop, back_to_previous_visible_line_start, reseat_1):
17272 Reset the from_disp_prop_p flag.
17273 (SAVE_IT, RESTORE_IT): New macros.
17274 (pos_visible_p, face_before_or_after_it_pos)
17275 (back_to_previous_visible_line_start)
17276 (move_it_in_display_line_to, move_it_in_display_line)
17277 (move_it_to, move_it_vertically_backward, move_it_by_lines)
17278 (try_scrolling, redisplay_window, display_line): Use them when
17279 saving a temporary copy of the iterator and restoring it back.
17280 (back_to_previous_visible_line_start, reseat_1)
17281 (init_iterator): Empty the bidi cache "stack".
17282 (move_it_in_display_line_to): If iterator ended up at
17283 EOL, but we never saw any buffer positions smaller than
17284 to_charpos, return MOVE_POS_MATCH_OR_ZV. Fixes vertical cursor
17285 motion in bidi-reordered lines.
17286 (move_it_in_display_line_to): Record prev_method and prev_pos
17287 immediately before the call to set_iterator_to_next. Fixes cursor
17288 motion in bidi-reordered lines with stretch glyphs and strings
17289 displayed in margins. (Bug#8133) (Bug#8867)
17290 Return MOVE_POS_MATCH_OR_ZV only if iterator position is past
17291 TO_CHARPOS.
640c8776
SM
17292 (pos_visible_p): Support positions in bidi-reordered lines.
17293 Save and restore bidi cache.
0bb23927
EZ
17294
17295 * bidi.c (bidi_level_of_next_char): clen should be EMACS_NT, not int.
17296 (bidi_paragraph_info): Delete unused struct.
17297 (bidi_cache_idx, bidi_cache_last_idx): Declare EMACS_INT.
17298 (bidi_cache_start): New variable.
17299 (bidi_cache_reset): Reset bidi_cache_idx to bidi_cache_start, not
17300 to zero.
17301 (bidi_cache_fetch_state, bidi_cache_search)
17302 (bidi_cache_find_level_change, bidi_cache_iterator_state)
17303 (bidi_cache_find, bidi_peek_at_next_level)
17304 (bidi_level_of_next_char, bidi_find_other_level_edge)
17305 (bidi_move_to_visually_next): Compare cache index with
17306 bidi_cache_start rather than with zero.
17307 (bidi_fetch_char): Accept new argument STRING; all callers
17308 changed. Support iteration over a string. Support strings with
17309 display properties. Support unibyte strings. Fix the type of
17310 `len' according to what STRING_CHAR_AND_LENGTH expects.
17311 (bidi_paragraph_init, bidi_resolve_explicit_1)
17312 (bidi_resolve_explicit, bidi_resolve_weak)
640c8776
SM
17313 (bidi_level_of_next_char, bidi_move_to_visually_next):
17314 Support iteration over a string.
0bb23927
EZ
17315 (bidi_set_sor_type, bidi_resolve_explicit_1)
17316 (bidi_resolve_explicit, bidi_type_of_next_char): ignore_bn_limit
17317 can now be zero (for strings); special values 0 and -1 were
17318 changed to -1 and -2, respectively.
17319 (bidi_char_at_pos): New function.
17320 (bidi_paragraph_init, bidi_resolve_explicit, bidi_resolve_weak):
17321 Call it instead of FETCH_MULTIBYTE_CHAR.
17322 (bidi_move_to_visually_next): Abort if charpos or bytepos were not
17323 initialized to valid values.
17324 (bidi_init_it): Don't initialize charpos and bytepos with invalid
17325 values.
17326 (bidi_level_of_next_char): Allow the sentinel "position" to pass
17327 the test for valid cached positions. Fix the logic for looking up
17328 the sentinel state in the cache. GCPRO the Lisp string we are
17329 iterating.
17330 (bidi_push_it, bidi_pop_it): New functions.
17331 (bidi_initialize): Initialize the bidi cache start stack pointer.
17332 (bidi_cache_ensure_space): New function, refactored from part of
17333 bidi_cache_iterator_state. Don't assume the required size is just
17334 one BIDI_CACHE_CHUNK away.
17335 (bidi_cache_start_stack, bidi_push_it): Use IT_STACK_SIZE.
17336 (bidi_count_bytes, bidi_char_at_pos): New functions.
17337 (bidi_cache_search): Don't assume bidi_cache_last_idx is
17338 always valid if bidi_cache_idx is valid.
17339 (bidi_cache_find_level_change): xassert that bidi_cache_last_idx
17340 is valid if it's going to be used.
17341 (bidi_shelve_cache, bidi_unshelve_cache): New functions.
17342 (bidi_cache_fetch_state, bidi_cache_search)
c965adc5
EZ
17343 (bidi_cache_find_level_change, bidi_cache_ensure_space)
17344 (bidi_cache_iterator_state, bidi_cache_find)
640c8776
SM
17345 (bidi_find_other_level_edge, bidi_cache_start_stack):
17346 All variables related to cache indices are now EMACS_INT.
c965adc5 17347
0bb23927
EZ
17348 * dispextern.h (struct bidi_string_data): New structure.
17349 (struct bidi_it): New member `string'. Make flag members be 1-bit
17350 fields, and put them last in the struct.
640c8776
SM
17351 (compute_display_string_pos, compute_display_string_end):
17352 Update prototypes.
0bb23927
EZ
17353 (bidi_push_it, bidi_pop_it): Add prototypes.
17354 (struct iterator_stack_entry): New members bidi_p,
17355 paragraph_embedding, and from_disp_prop_p.
17356 (struct it): Member bidi_p is now a bit field 1 bit wide.
640c8776
SM
17357 (bidi_shelve_cache, bidi_unshelve_cache):
17358 Declare prototypes.
0bb23927
EZ
17359
17360 * .gdbinit (xvectype, xvector, xcompiled, xchartable, xboolvector)
17361 (xpr, xfont, xbacktrace): Use "header.size" when accessing vectors
17362 and vector-like objects.
17363
17364 * dispnew.c (buffer_posn_from_coords): Save and restore the bidi
17365 cache around display iteration.
17366
17367 * window.c (Fwindow_end, window_scroll_pixel_based)
17368 (displayed_window_lines, Frecenter): Save and restore the bidi
17369 cache around display iteration.
17370
3bbd2265
LMI
173712011-07-14 Lars Magne Ingebrigtsen <larsi@gnus.org>
17372
17373 * editfns.c (Fdelete_region): Clarify the use of the named
17374 parameters (bug#6788).
17375
adc47434
MR
173762011-07-14 Martin Rudalics <rudalics@gmx.at>
17377
17378 * indent.c (Fvertical_motion): Set and restore w->pointm when
17379 saving and restoring the window's buffer (Bug#9006).
17380
837c31f8
LMI
173812011-07-13 Lars Magne Ingebrigtsen <larsi@gnus.org>
17382
17383 * editfns.c (Fstring_to_char): Clarify just what is returned
17384 (bug#6576). Text by Eli Zaretskii.
17385
ac389d0c
JB
173862011-07-13 Juanma Barranquero <lekktu@gmail.com>
17387
17388 * gnutls.c (init_gnutls_functions): Honor gnutls_log_level (bug#9059).
17389
0be0ce47
EZ
173902011-07-13 Eli Zaretskii <eliz@gnu.org>
17391
17392 * buffer.c (mmap_find): Fix a typo.
17393
cd18e7e3
JB
173942011-07-13 Johan Bockgård <bojohan@gnu.org>
17395
17396 Fix execution of x selection hooks.
17397 * xselect.c (Qx_lost_selection_functions)
17398 (Qx_sent_selection_functions): New vars.
17399 (syms_of_xselect): DEFSYM them.
17400 (x_handle_selection_request): Pass Qx_sent_selection_functions
17401 rather than Vx_sent_selection_functions to Frun_hook_with_args.
17402 (x_handle_selection_clear,x_clear_frame_selections):
17403 Pass Qx_lost_selection_functions rather than
17404 Vx_lost_selection_functions to Frun_hook_with_args.
17405
47ea7f44
PE
174062011-07-13 Paul Eggert <eggert@cs.ucla.edu>
17407
ac389d0c 17408 * buffer.c (Fget_buffer_create): Initialize inhibit_shrinking.
2941c447
PE
17409 The old code sometimes used this field without initializing it.
17410
47ea7f44
PE
17411 * alloc.c (gc_sweep): Don't read past end of array.
17412 In theory, the old code could also have corrupted Emacs internals,
17413 though it'd be very unlikely.
17414
bc985c87
AS
174152011-07-12 Andreas Schwab <schwab@linux-m68k.org>
17416
17417 * character.c (Fcharacterp): Don't advertise optional ignored
ac389d0c 17418 argument. (Bug#4026)
bc985c87 17419
0cf34688
LMI
174202011-07-12 Lars Magne Ingebrigtsen <larsi@gnus.org>
17421
b3dadd76
LMI
17422 * keymap.c (syms_of_keymap): Clarify that "modifier" is "modifier
17423 key" (bug#4257).
17424
0cf34688
LMI
17425 * window.c (Fset_window_start): Doc fix (bug#4199).
17426 (Fset_window_hscroll): Ditto.
17427
270768cd
PE
174282011-07-12 Paul Eggert <eggert@cs.ucla.edu>
17429
077e3dda 17430 Fix minor new problems caught by GCC 4.6.1.
270768cd 17431 * term.c (init_tty): Remove unused local.
490011a6 17432 * xsettings.c (store_monospaced_changed): Define this function only
077e3dda 17433 if (defined HAVE_GSETTINGS || defined HAVE_GCONF), as it's
490011a6 17434 not used otherwise.
270768cd 17435
b1f58454
CY
174362011-07-12 Chong Yidong <cyd@stupidchicken.com>
17437
17438 * xdisp.c (Vresize_mini_windows): Minor doc fix (Bug#3300).
17439
22b9578d
LMI
174402011-07-11 Lars Magne Ingebrigtsen <larsi@gnus.org>
17441
6e70ab07
LMI
17442 * xdisp.c (syms_of_xdisp): Make it explicit that the mini-windows
17443 are the mini-buffer and the echo area (bug#3320).
17444
22b9578d
LMI
17445 * term.c (init_tty): Remove support for supdup, c10 and perq
17446 terminals, which are no longer supported (bug#1482).
17447
8974cc9f
JB
174482011-07-10 Johan Bockgård <bojohan@gnu.org>
17449
17450 * xdisp.c (Ftool_bar_lines_needed): Fix WINDOWP check.
17451
a560d974
JD
174522011-07-10 Jan Djärv <jan.h.d@swipnet.se>
17453
17454 * xmenu.c (menu_highlight_callback): Only pass frame to show_help_event
17455 for non-popups (Bug#3642).
17456
1dae0f0a
AS
174572011-07-10 Andreas Schwab <schwab@linux-m68k.org>
17458
268c2c36 17459 * alloc.c (reset_malloc_hooks): Protoize.
1dae0f0a 17460 * buffer.c (mmap_init, mmap_find, mmap_free_1, mmap_enlarge)
268c2c36
AS
17461 (mmap_set_vars, mmap_alloc, mmap_free, mmap_realloc): Likewise.
17462 * cm.c (losecursor): Likewise.
1dae0f0a
AS
17463 * data.c (fmod): Likewise.
17464 * dispnew.c (swap_glyphs_in_rows): Likewise.
17465 * emacs.c (memory_warning_signal): Likewise.
17466 * floatfns.c (float_error): Likewise.
17467 * font.c (check_gstring, check_otf_features, otf_tag_symbol)
17468 (otf_open, font_otf_capability, generate_otf_features)
17469 (font_otf_DeviceTable, font_otf_ValueRecord, font_otf_Anchor):
17470 Likewise.
17471 * image.c (pbm_read_file): Likewise.
17472 * indent.c (string_display_width): Likewise.
17473 * intervals.c (check_for_interval, search_for_interval)
17474 (inc_interval_count, count_intervals, root_interval)
17475 (adjust_intervals_for_insertion, make_new_interval): Likewise.
17476 * lread.c (defalias): Likewise.
268c2c36 17477 * ralloc.c (r_alloc_check): Likewise.
1dae0f0a
AS
17478 * regex.c (set_image_of_range_1, set_image_of_range)
17479 (regex_grow_registers): Likewise.
17480 * sysdep.c (strerror): Likewise.
17481 * termcap.c (valid_filename_p, tprint, main): Likewise.
17482 * tparam.c (main): Likewise.
17483 * unexhp9k800.c (run_time_remap, save_data_space)
17484 (update_file_ptrs, read_header, write_header, calculate_checksum)
17485 (copy_file, copy_rest, display_header): Likewise.
17486 * widget.c (mark_shell_size_user_specified, create_frame_gcs):
17487 Likewise.
17488 * xdisp.c (check_it): Likewise.
17489 * xfaces.c (register_color, unregister_color, unregister_colors):
17490 Likewise.
17491 * xfns.c (print_fontset_result): Likewise.
17492 * xrdb.c (member, fatal, main): Likewise.
17493
99033785
PE
174942011-07-10 Paul Eggert <eggert@cs.ucla.edu>
17495
17496 Fix minor problems found by static checking (Bug#9031).
17497 * chartab.c (char_table_set_range, map_sub_char_table):
17498 Remove unused locals.
17499 (uniprop_table): Now static.
17500 * composite.c (_work_char): Remove unused static var.
17501
9cb2ac56
JB
175022011-07-09 Juanma Barranquero <lekktu@gmail.com>
17503
17504 * chartab.c (uniprop_table_uncompress): Remove unused local variable.
17505
f25661f0
JD
175062011-07-09 Jan Djärv <jan.h.d@swipnet.se>
17507
17508 * gtkutil.c (qttip_cb): Remove code without function.
17509
8278c4fe
EZ
175102011-07-09 Eli Zaretskii <eliz@gnu.org>
17511
17512 * w32.c (pthread_sigmask): New stub.
17513
1692ae2d 175142011-07-08 Paul Eggert <eggert@cs.ucla.edu>
123403e4 17515
8a6ebd58 17516 Use pthread_sigmask, not sigprocmask (Bug#9010).
123403e4
PE
17517 sigprocmask is portable only for single-threaded applications, and
17518 Emacs can be multi-threaded when it uses GTK.
1301ac26
PE
17519 * Makefile.in (LIB_PTHREAD_SIGMASK): New macro.
17520 (LIBES): Use it.
17521 * callproc.c (Fcall_process):
17522 * process.c (create_process):
17523 * sysdep.c (sys_sigblock, sys_sigunblock, sys_sigsetmask):
17524 Use pthread_sigmask, not sigprocmask.
123403e4 17525
1b854618
JD
175262011-07-08 Jan Djärv <jan.h.d@swipnet.se>
17527
17528 * gtkutil.c (qttip_cb): Set line wrap to FALSE for tooltip widget.
17529 (xg_prepare_tooltip): Revert text in x->ttip_lbl, margins was
17530 wrong (Bug#8591).
17531
3fe4b549
JD
175322011-07-08 Jan Djärv <jan.h.d@swipnet.se>
17533
0ce7e563
JD
17534 * gtkutil.c (xg_prepare_tooltip): Fix indentation and comment.
17535 Put text in x->ttip_lbl instead of gtk_tooltip_set_text (Bug#8591).
17536 (xg_hide_tooltip): Fix comment.
17537
3fe4b549
JD
17538 * nsterm.m (initFrameFromEmacs): Don't use ns_return_types
17539 in registerServicesMenuSendTypes.
17540 (validRequestorForSendType): Don't check ns_return_types.
17541
17542 * nsfns.m (Fx_open_connection): Put NSStringPboardType into
17543 ns_return_type.
17544
5df75e47
JR
175452011-07-08 Jason Rumney <jasonr@gnu.org>
17546
22610910
JR
17547 * w32term.c (x_make_frame_visible): Use SH_SHOWNORMAL rather than
17548 SH_SHOW for hidden windows (Bug#5482).
17549
5df75e47
JR
17550 * w32fns.c (w32_wnd_proc) [WM_TIMER, WM_SET_CURSOR]: Avoid using
17551 frame struct members of non-existent frames (Bug#6284).
17552
699c10bd
JD
175532011-07-08 Jan Djärv <jan.h.d@swipnet.se>
17554
4393663b
JD
17555 * nsterm.m (keyDown): Call to wantsToDelayTextChangeNotifications and
17556 variable firstTime not needed on OSX >= 10.6.
17557 (setPosition): setFloatValue:knobProportion: is deprecated on OSX
17558 >= 10.5. Use setKnobProportion, setDoubleValue.
17559
17560 * nsterm.h (MAC_OS_X_VERSION_10_3, MAC_OS_X_VERSION_10_4)
17561 (MAC_OS_X_VERSION_10_5): Define if not defined.
17562 (EmacsView, EmacsTooltip): Implements NSWindowDelegate on OSX >= 10.6.
17563 (EmacsMenu): Implements NSMenuDelegate on OSX >= 10.6.
17564 (EmacsToolbar): Implements NSToolbarDelegate on OSX >= 10.6.
17565
17566 * nsselect.m (ns_string_from_pasteboard): Don't use deprecated methods
090bd7cb 17567 cString and lossyCString on OSX >= 10.4.
4393663b 17568
58179cce 17569 * nsmenu.m (fillWithWidgetValue): Don't use deprecated method
4393663b
JD
17570 sizeToFit on OSX >= 10.2.
17571
17572 * nsimage.m (allocInitFromFile): Don't use deprecated method
17573 bestRepresentationForDevice on OSX >= 10.6.
17574
17575 * nsfns.m (check_ns_display_info): Cast to long and use %ld in error
17576 to avoid warning.
17577
17578 * emacs.c: Declare unexec_init_emacs_zone.
17579
a63e0781
JD
17580 * nsgui.h: Fix compiler warning about gnulib redefining verify.
17581
699c10bd
JD
17582 * nsselect.m (ns_get_local_selection): Change to extern (Bug#8842).
17583
17584 * nsmenu.m (ns_update_menubar): Remove useless setDelegate call
17585 on svcsMenu (Bug#8842).
17586
17587 * nsfns.m (Fx_open_connection): Remove NSStringPboardType from
17588 ns_return_types.
17589 (Fns_list_services): Just return Qnil on 10.6, code not working there.
17590
17591 * nsterm.m (QUTF8_STRING): Declare.
17592 (initFrameFromEmacs): Call registerServicesMenuSendTypes.
17593 (validRequestorForSendType): Return type is (id).
17594 Change indexOfObjectIdenticalTo to indexOfObject.
17595 Check if we have local selection before returning self (Bug#8842).
17596 (writeSelectionToPasteboard): Put local selection into paste board
17597 if we have a local selection (Bug#8842).
17598 (syms_of_nsterm): DEFSYM QUTF8_STRING.
17599
17600 * nsterm.h (MAC_OS_X_VERSION_10_6): Define here instead of nsterm.m.
17601 (ns_get_local_selection): Declare.
17602
54e10184
LMI
176032011-07-07 Lars Magne Ingebrigtsen <larsi@gnus.org>
17604
9888ff71
LMI
17605 * keymap.c (describe_map_tree): Don't insert a double newline at
17606 the end of the buffer (bug#1169) and return whether we inserted
17607 something.
17608
54e10184
LMI
17609 * callint.c (Fcall_interactively): Change "reading args" to
17610 "providing args" to try to clarify what it does (bug#1010).
17611
15fa4783
KH
176122011-07-07 Kenichi Handa <handa@m17n.org>
17613
17614 * composite.c (composition_compute_stop_pos): Ignore a static
17615 composition starting before CHARPOS (Bug#8915).
17616
17617 * xdisp.c (handle_composition_prop): Likewise.
17618
a8815b00
EZ
176192011-07-07 Eli Zaretskii <eliz@gnu.org>
17620
17621 * term.c (produce_glyphs) <xassert>: Allow IT_GLYPHLESS in it->what.
17622 (Bug#9015)
17623
ef7b981d 176242011-07-07 Kenichi Handa <handa@m17n.org>
c805dec0
KH
17625
17626 * character.h (unicode_category_t): New enum type.
17627
17628 * chartab.c (uniprop_decoder_t, uniprop_encoder_t): New types.
17629 (Qchar_code_property_table): New variable.
17630 (UNIPROP_TABLE_P, UNIPROP_GET_DECODER)
17631 (UNIPROP_COMPRESSED_FORM_P): New macros.
17632 (char_table_ascii): Uncompress the compressed values.
17633 (sub_char_table_ref): New arg is_uniprop. Callers changed.
17634 Uncompress the compressed values.
ac389d0c 17635 (sub_char_table_ref_and_range): Likewise.
c805dec0
KH
17636 (char_table_ref_and_range): Uncompress the compressed values.
17637 (sub_char_table_set): New arg is_uniprop. Callers changed.
17638 Uncompress the compressed values.
17639 (sub_char_table_set_range): Args changed. Callers changed.
17640 (char_table_set_range): Adjuted for the above change.
17641 (map_sub_char_table): Delete args default_val and parent. Add arg
17642 top. Give decoded values to a Lisp function.
640c8776 17643 (map_char_table): Adjust for the above change. Give decoded
c805dec0
KH
17644 values to a Lisp function. Gcpro more variables.
17645 (uniprop_table_uncompress)
17646 (uniprop_decode_value_run_length): New functions.
17647 (uniprop_decoder, uniprop_decoder_count): New variables.
17648 (uniprop_get_decoder, uniprop_encode_value_character)
17649 (uniprop_encode_value_run_length, uniprop_encode_value_numeric):
17650 New functions.
17651 (uniprop_encoder, uniprop_encoder_count): New variables.
17652 (uniprop_get_encoder, uniprop_table)
17653 (Funicode_property_table_internal, Fget_unicode_property_internal)
17654 (Fput_unicode_property_internal): New functions.
17655 (syms_of_chartab): DEFSYM Qchar_code_property_table, defsubr
17656 Sunicode_property_table_internal, Sget_unicode_property_internal,
5e617bc2 17657 and Sput_unicode_property_internal. Defvar_lisp
c805dec0
KH
17658 char-code-property-alist.
17659
640c8776 17660 * composite.c (CHAR_COMPOSABLE_P): Adjust for the change of
c805dec0
KH
17661 Vunicode_category_table.
17662
640c8776 17663 * font.c (font_range): Adjust for the change of
c805dec0
KH
17664 Vunicode_category_table.
17665
76b397fb
DN
176662011-07-07 Dan Nicolaescu <dann@ics.uci.edu>
17667
17668 * m/iris4d.h: Remove file, move contents ...
17669 * s/irix6-5.h: ... here.
17670
22b4128e
PE
176712011-07-06 Paul Eggert <eggert@cs.ucla.edu>
17672
17673 Remove unportable assumption about struct layout (Bug#8884).
8a5c77bb
PE
17674 * alloc.c (mark_buffer):
17675 * buffer.c (reset_buffer_local_variables, Fbuffer_local_variables)
17676 (clone_per_buffer_values): Don't assume that
22b4128e
PE
17677 sizeof (struct buffer) is a multiple of sizeof (Lisp_Object).
17678 This isn't true in general, and it's particularly not true
17679 if Emacs is configured with --with-wide-int.
17680 * buffer.h (FIRST_FIELD_PER_BUFFER, LAST_FIELD_PER_BUFFER):
17681 New macros, used in the buffer.c change.
17682
869795d6
JD
176832011-07-05 Jan Djärv <jan.h.d@swipnet.se>
17684
17685 * xsettings.c: Use both GConf and GSettings if both are available.
17686 (store_config_changed_event): Add comment.
17687 (dpyinfo_valid, store_font_name_changed, map_tool_bar_style)
17688 (store_tool_bar_style_changed): New functions.
5e617bc2 17689 (store_monospaced_changed): Add comment. Call dpyinfo_valid.
869795d6
JD
17690 (struct xsettings): Move font inside HAVE_XFT.
17691 (GSETTINGS_TOOL_BAR_STYLE, GSETTINGS_FONT_NAME): New defines.
640c8776 17692 (GSETTINGS_MONO_FONT): Rename from SYSTEM_MONO_FONT.
869795d6 17693 Move inside HAVE_XFT.
640c8776 17694 (something_changed_gsettingsCB): Rename from something_changedCB.
869795d6
JD
17695 Check for changes in GSETTINGS_TOOL_BAR_STYLE and GSETTINGS_FONT_NAME
17696 also.
17697 (GCONF_TOOL_BAR_STYLE, GCONF_FONT_NAME): New defines.
5e617bc2 17698 (GCONF_MONO_FONT): Rename from SYSTEM_MONO_FONT. Move inside HAVE_XFT.
640c8776 17699 (something_changed_gconfCB): Rename from something_changedCB.
869795d6
JD
17700 Check for changes in GCONF_TOOL_BAR_STYLE and GCONF_FONT_NAME also.
17701 (parse_settings): Move check for font inside HAVE_XFT.
17702 (read_settings, apply_xft_settings): Add comment.
17703 (read_and_apply_settings): Add comment. Call map_tool_bar_style and
17704 store_tool_bar_style_changed. Move check for font inside HAVE_XFT and
17705 call store_font_name_changed.
17706 (xft_settings_event): Add comment.
17707 (init_gsettings): Add comment. Get values for GSETTINGS_TOOL_BAR_STYLE
17708 and GSETTINGS_FONT_NAME. Move check for fonts within HAVE_XFT.
17709 (init_gconf): Add comment. Get values for GCONF_TOOL_BAR_STYLE
17710 and GCONF_FONT_NAME. Move check for fonts within HAVE_XFT.
17711 (xsettings_initialize): Call init_gsettings last.
640c8776
SM
17712 (xsettings_get_system_font, xsettings_get_system_normal_font):
17713 Add comment.
869795d6 17714
d8ed26bd
PE
177152011-07-05 Paul Eggert <eggert@cs.ucla.edu>
17716
17717 Random fixes. E.g., (random) never returned negative values.
17718 * fns.c (Frandom): Use GET_EMACS_TIME for random seed, and add the
17719 subseconds part to the entropy, as that's a bit more random.
17720 Prefer signed to unsigned, since the signedness doesn't matter and
17721 in general we prefer signed. When given a limit, use a
17722 denominator equal to INTMASK + 1, not to VALMASK + 1, because the
17723 latter isn't right if USE_2_TAGS_FOR_INTS.
17724 * sysdep.c (get_random): Return a value in the range 0..INTMASK,
17725 not 0..VALMASK. Don't discard "excess" bits that random () returns.
17726
cabf1cac
SM
177272011-07-04 Stefan Monnier <monnier@iro.umontreal.ca>
17728
17729 * textprop.c (text_property_stickiness):
17730 Obey Vtext_property_default_nonsticky.
17731 (syms_of_textprop): Add `display' to Vtext_property_default_nonsticky.
17732 * w32fns.c (syms_of_w32fns):
17733 * xfns.c (syms_of_xfns): Don't Add `display' since it's there by default.
17734
6e9b2be9
PE
177352011-07-04 Paul Eggert <eggert@cs.ucla.edu>
17736
17737 * fileio.c (barf_or_query_if_file_exists): Use S_ISDIR.
17738 This is more efficient than Ffile_directory_p and avoids a minor race.
17739
90186c68
LMI
177402011-07-04 Lars Magne Ingebrigtsen <larsi@gnus.org>
17741
7c301272
LMI
17742 * buffer.c (Foverlay_put): Say what the return value is
17743 (bug#7835).
17744
c4f2d8d4
LMI
17745 * fileio.c (barf_or_query_if_file_exists): Check first if the file
17746 is a directory before asking whether to use the file name
17747 (bug#7564).
ad637907
LMI
17748 (barf_or_query_if_file_exists): Make the "File is a directory"
17749 error be more correct.
c4f2d8d4 17750
90186c68
LMI
17751 * fns.c (Frequire): Remove the mention of the .gz files, since
17752 that's installation-specific, but keep the mention of
17753 `get-load-suffixes'.
17754
da64016e
PE
177552011-07-04 Paul Eggert <eggert@cs.ucla.edu>
17756
17757 * editfns.c (Fformat_time_string): Don't assume strlen fits in int.
17758 Report string overflow if the output is too long.
17759
7d47b580
JB
177602011-07-04 Juanma Barranquero <lekktu@gmail.com>
17761
a555cb87
JB
17762 * gnutls.c (Fgnutls_boot): Don't mention :verify-error.
17763 (syms_of_gnutls): Remove duplicate DEFSYM for
17764 Qgnutls_bootprop_verify_hostname_error, an error for
17765 Qgnutls_bootprop_verify_error (which is no longer used).
17766
7d47b580
JB
17767 * eval.c (find_handler_clause): Remove parameters `sig' and `data',
17768 unused since 2011-01-26T20:02:07Z!monnier@iro.umontreal.ca. All callers changed.
17769 Also (re)move comments that are misplaced or no longer relevant.
17770
1e49bfab
LMI
177712011-07-03 Lars Magne Ingebrigtsen <larsi@gnus.org>
17772
17773 * callint.c (Finteractive): Clarify the meaning of "@" (bug#8813).
17774
1485f4c0
CY
177752011-07-03 Chong Yidong <cyd@stupidchicken.com>
17776
17777 * xfaces.c (Finternal_merge_in_global_face): Modify the foreground
17778 and background color parameters if they have been changed.
17779
a9ab721e
LMI
177802011-07-03 Lars Magne Ingebrigtsen <larsi@gnus.org>
17781
17782 * editfns.c (Fformat): Clarify the - and 0 flags (bug#6659).
17783
cf7cff57
PE
177842011-07-03 Paul Eggert <eggert@cs.ucla.edu>
17785
2e13213d
PE
17786 * xsettings.c (SYSTEM_FONT): Define only when used.
17787 No need to define when HAVE_GSETTINGS || !HAVE_XFT.
17788
cf7cff57
PE
17789 * keymap.c (access_keymap_1): Now static.
17790
7a8e04f7
CY
177912011-07-02 Chong Yidong <cyd@stupidchicken.com>
17792
17793 * keyboard.c (command_loop_1): If a down-mouse event is unbound,
17794 leave any prefix arg for the up event (Bug#1586).
17795
61352f62
LMI
177962011-07-02 Lars Magne Ingebrigtsen <larsi@gnus.org>
17797
69bb1ef7
LMI
17798 * lread.c (syms_of_lread): Mention single symbols defined by
17799 `defvar' or `defconst' (bug#7154).
17800
61352f62 17801 * fns.c (Frequire): Mention .el.gz files (bug#7314).
7b3747f9 17802 (Frequire): Mention get-load-suffixes.
61352f62 17803
28545e04
MR
178042011-07-02 Martin Rudalics <rudalics@gmx.at>
17805
17806 * window.h (window): Remove clone_number slot.
17807 * window.c (Fwindow_clone_number, Fset_window_clone_number):
17808 Remove.
17809 (make_parent_window, make_window, saved_window)
17810 (Fset_window_configuration, save_window_save): Don't deal with
17811 clone numbers.
17812 * buffer.c (Qclone_number): Remove declaration.
17813 (sort_overlays, overlay_strings): Don't deal with clone numbers.
17814
3349e122
SM
178152011-07-02 Stefan Monnier <monnier@iro.umontreal.ca>
17816
17817 Add multiple inheritance to keymaps.
17818 * keymap.c (Fmake_composed_keymap): New function.
17819 (Fset_keymap_parent): Simplify.
17820 (fix_submap_inheritance): Remove.
17821 (access_keymap_1): New function extracted from access_keymap to handle
17822 embedded parents and handle lists of maps.
17823 (access_keymap): Use it.
17824 (Fkeymap_prompt, map_keymap_internal, map_keymap, store_in_keymap)
17825 (Fcopy_keymap): Handle embedded parents.
17826 (Fcommand_remapping, define_as_prefix): Simplify.
17827 (Fkey_binding): Simplify.
17828 (syms_of_keymap): Move minibuffer-local-completion-map,
17829 minibuffer-local-filename-completion-map,
17830 minibuffer-local-must-match-map, and
17831 minibuffer-local-filename-must-match-map to Elisp.
17832 (syms_of_keymap): Defsubr make-composed-keymap.
17833 * keyboard.c (menu_bar_items): Use map_keymap_canonical.
17834 (parse_menu_item): Trivial simplification.
17835
3279eb87
GM
178362011-07-01 Glenn Morris <rgm@gnu.org>
17837
17838 * Makefile.in (SETTINGS_LIBS): Fix typo.
17839
39cb9e56 178402011-07-01 Kazuhiro Ito <kzhr@d1.dion.ne.jp> (tiny change)
4550efdf
KI
17841
17842 * coding.c (Fencode_coding_string): Record the last coding system
17843 used, as the function doc string says (bug#8738).
17844
0949d2b6
JD
178452011-07-01 Jan Djärv <jan.h.d@swipnet.se>
17846
17847 * xsettings.c (store_monospaced_changed): Take new font as arg and
17848 check for change against current_mono_font.
17849 (EMACS_TYPE_SETTINGS): Remove this and related defines.
17850 (emacs_settings_constructor, emacs_settings_get_property)
17851 (emacs_settings_set_property, emacs_settings_class_init)
17852 (emacs_settings_init, gsettings_obj): Remove.
17853 (something_changedCB): New function for HAVE_GSETTINGS.
17854 (something_changedCB): HAVE_GCONF: Call store_monospaced_changed
17855 with value as argument.
17856 (init_gsettings): Check that GSETTINGS_SCHEMA exists before calling
17857 g_settings_new (Bug#8967). Do not create gsettings_obj.
9173deec 17858 Remove calls to g_settings_bind. Connect something_changedCB to
0949d2b6
JD
17859 "changed".
17860
17861 * xgselect.c: Add defined (HAVE_GSETTINGS).
17862 (xgselect_initialize): Ditto.
17863
17864 * process.c: Add defined (HAVE_GSETTINGS) for xgselect.h
17865 (wait_reading_process_output): Add defined (HAVE_GSETTINGS) for
17866 xg_select.
17867
bbc6b304
PE
178682011-07-01 Paul Eggert <eggert@cs.ucla.edu>
17869
17870 * eval.c (struct backtrace): Simplify and port the data structure.
17871 Do not assume that "int nargs : BITS_PER_INT - 2;" produces a
17872 signed bit field, as this assumption is not portable and it makes
17873 Emacs crash when compiled with Sun C 5.8 on sparc. Do not use
17874 "char debug_on_exit : 1" as this is not portable either; instead,
17875 use the portable "unsigned int debug_on_exit : 1". Remove unused
17876 member evalargs. Remove obsolete comments about cc bombing out.
17877
9851bfc5
JD
178782011-06-30 Jan Djärv <jan.h.d@swipnet.se>
17879
51bb811f 17880 * xsettings.c: Include glib-object.h, gio/gio.h if HAVE_GSETTINGS.
9851bfc5
JD
17881 Let HAVE_GSETTINGS override HAVE_GCONF.
17882 (store_monospaced_changed): New function.
17883 (EMACS_SETTINGS): A new type derived from GObject to handle
17884 GSettings notifications.
17885 (emacs_settings_constructor, emacs_settings_get_property)
17886 (emacs_settings_set_property, emacs_settings_class_init):
17887 New functions.
17888 (gsettings_client, gsettings_obj): New variables.
17889 (GSETTINGS_SCHEMA): New define.
17890 (something_changedCB): Call store_monospaced_changed.
17891 (init_gsettings): New function.
17892 (xsettings_initialize): Call init_gsettings.
17893 (syms_of_xsettings): Initialize gsettings_client, gsettings_obj
17894 to NULL.
17895
640c8776 17896 * Makefile.in (SETTINGS_CFLAGS, SETTINGS_LIBS): Rename from
9851bfc5
JD
17897 GCONF_CFLAGS/LIBS.
17898
5386012d
MR
178992011-06-29 Martin Rudalics <rudalics@gmx.at>
17900
17901 * window.c (resize_root_window, grow_mini_window)
17902 (shrink_mini_window): Rename Qresize_root_window to
17903 Qwindow_resize_root_window and Qresize_root_window_vertically to
17904 Qwindow_resize_root_window_vertically.
17905
f13e0b08
PE
179062011-06-28 Paul Eggert <eggert@cs.ucla.edu>
17907
17908 * gnutls.c (Qgnutls_bootprop_verify_error): Remove unused var.
17909
94515237
JB
179102011-06-27 Juanma Barranquero <lekktu@gmail.com>
17911
17912 * makefile.w32-in: Redesign dependencies so they reflect more
17913 clearly which files are directly included by each source file,
17914 and not through other includes.
17915
e43b6e43
MR
179162011-06-27 Martin Rudalics <rudalics@gmx.at>
17917
17918 * buffer.c (Qclone_number): Declare static and DEFSYM it.
17919 (sort_overlays, overlay_strings): When an overlay's clone number
17920 matches the window's clone number process the overlay even if
17921 the overlay's window property doesn't match the current window.
17922
d68443dc
MR
17923 * window.c (Fwindow_vchild): Rename to Fwindow_top_child.
17924 (Fwindow_hchild): Rename to Fwindow_left_child.
17925 (Fwindow_next): Rename to Fwindow_next_sibling.
17926 (Fwindow_prev): Rename to Fwindow_prev_sibling.
d615d6d2
MR
17927 (resize_window_check): Rename to window_resize_check.
17928 (resize_window_apply): Rename to window_resize_apply.
17929 (Fresize_window_apply): Rename to Fwindow_resize_apply.
17930 (Fdelete_other_windows_internal, resize_frame_windows)
17931 (Fsplit_window_internal, Fdelete_window_internal)
17932 (grow_mini_window, shrink_mini_window)
17933 (Fresize_mini_window_internal): Fix callers accordingly.
d68443dc 17934
c7e73be5
JD
179352011-06-26 Jan Djärv <jan.h.d@swipnet.se>
17936
17937 * emacsgtkfixed.h: State that this is only used with Gtk+3.
17938 (emacs_fixed_set_min_size): Remove.
17939 (emacs_fixed_new): Take frame as argument.
17940
17941 * emacsgtkfixed.c: State that this is only used with Gtk+3.
17942 (_EmacsFixedPrivate): Remove minwidth/height.
17943 Add struct frame *f.
17944 (emacs_fixed_init): Initialize priv->f.
17945 (get_parent_class, emacs_fixed_set_min_size): Remove.
17946 (emacs_fixed_new): Set priv->f to argument.
17947 (emacs_fixed_get_preferred_width)
17948 (emacs_fixed_get_preferred_height): Use min_width/height from
17949 frames size_hint to set minimum and natural (Bug#8919).
17950 (XSetWMSizeHints, XSetWMNormalHints): Override these functions
17951 and use min_width/height from frames size_hint to set
17952 min_width/height (Bug#8919).
17953
17954 * gtkutil.c (xg_create_frame_widgets): Pass f to emacs_fixed_new.
9173deec
JB
17955 (x_wm_set_size_hint): Remove call to emacs_fixed_set_min_size.
17956 Fix indentation.
c7e73be5 17957
cf99dcf8
EZ
179582011-06-26 Eli Zaretskii <eliz@gnu.org>
17959
17960 * bidi.c (bidi_paragraph_init): Test for ZV_BYTE before calling
17961 bidi_at_paragraph_end, since fast_looking_at doesn't like to be
17962 called at ZV.
17963
029529ac
CY
179642011-06-26 Chong Yidong <cyd@stupidchicken.com>
17965
17966 * process.c (wait_reading_process_output): Bypass select if
17967 waiting for a cell while ignoring keyboard input, and input is
17968 pending. Suggested by Jan Djärv (Bug#8869).
17969
7a7ef429
PE
179702011-06-25 Paul Eggert <eggert@cs.ucla.edu>
17971
17972 Use gnulib's dup2 module instead of rolling our own.
17973 * sysdep.c (dup2) [!HAVE_DUP2]: Remove; gnulib now does this.
17974
11fdef7d 179752011-06-25 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
989b42d2
YM
17976
17977 * dispnew.c (scrolling_window): Before scrolling, turn off a
17978 mouse-highlight in the window being scrolled.
17979
cd3520a4
JB
179802011-06-24 Juanma Barranquero <lekktu@gmail.com>
17981
17982 Move DEFSYM to lisp.h and use everywhere.
17983
17984 * character.h (DEFSYM): Move declaration...
17985 * lisp.h (DEFSYM): ...here.
17986
17987 * gnutls.c:
17988 * minibuf.c:
17989 * w32menu.c:
17990 * w32proc.c:
17991 * w32select.c: Don't include character.h.
17992
17993 * alloc.c (syms_of_alloc):
17994 * buffer.c (syms_of_buffer):
17995 * bytecode.c (syms_of_bytecode):
17996 * callint.c (syms_of_callint):
17997 * casefiddle.c (syms_of_casefiddle):
17998 * casetab.c (init_casetab_once):
17999 * category.c (init_category_once, syms_of_category):
18000 * ccl.c (syms_of_ccl):
18001 * cmds.c (syms_of_cmds):
18002 * composite.c (syms_of_composite):
18003 * dbusbind.c (syms_of_dbusbind):
18004 * dired.c (syms_of_dired):
18005 * dispnew.c (syms_of_display):
18006 * doc.c (syms_of_doc):
18007 * editfns.c (syms_of_editfns):
18008 * emacs.c (syms_of_emacs):
18009 * eval.c (syms_of_eval):
18010 * fileio.c (syms_of_fileio):
18011 * fns.c (syms_of_fns):
18012 * frame.c (syms_of_frame):
18013 * fringe.c (syms_of_fringe):
18014 * insdel.c (syms_of_insdel):
18015 * keymap.c (syms_of_keymap):
18016 * lread.c (init_obarray, syms_of_lread):
18017 * macros.c (syms_of_macros):
18018 * msdos.c (syms_of_msdos):
18019 * print.c (syms_of_print):
18020 * process.c (syms_of_process):
18021 * search.c (syms_of_search):
18022 * sound.c (syms_of_sound):
18023 * syntax.c (init_syntax_once, syms_of_syntax):
18024 * terminal.c (syms_of_terminal):
18025 * textprop.c (syms_of_textprop):
18026 * undo.c (syms_of_undo):
18027 * w32.c (globals_of_w32):
18028 * window.c (syms_of_window):
18029 * xdisp.c (syms_of_xdisp):
18030 * xfaces.c (syms_of_xfaces):
18031 * xfns.c (syms_of_xfns):
18032 * xmenu.c (syms_of_xmenu):
18033 * xsettings.c (syms_of_xsettings):
18034 * xterm.c (syms_of_xterm): Use DEFSYM.
18035
4228cf16
TZ
180362011-06-24 Teodor Zlatanov <tzz@lifelogs.com>
18037
cd3520a4 18038 * gnutls.c (syms_of_gnutls): Use the DEFSYM macro from character.h.
4228cf16 18039
7fcccf1e
PE
180402011-06-23 Paul Eggert <eggert@cs.ucla.edu>
18041
7efb4e0e
PE
18042 Integer and buffer overflow fixes (Bug#8873).
18043
ff5844ad
PE
18044 * print.c (printchar, strout): Check for string overflow.
18045 (PRINTPREPARE, printchar, strout):
18046 Don't set size unless allocation succeeds.
18047
90532f02
PE
18048 * minibuf.c (read_minibuf_noninteractive): Use ptrdiff_t, not int,
18049 for sizes. Check for string overflow more accurately.
18050 Simplify newline removal at end; this suppresses a GCC 4.6.0 warning.
18051
6d84508d
PE
18052 * macros.c: Integer and buffer overflow fixes.
18053 * keyboard.h (struct keyboard.kbd_macro_bufsize):
18054 * macros.c (Fstart_kbd_macro, store_kbd_macro_char):
18055 Use ptrdiff_t, not int, for sizes.
18056 Don't increment bufsize until after realloc succeeds.
18057 Check for size-calculation overflow.
18058 (Fstart_kbd_macro): Use EMACS_INT, not int, for XINT result.
18059
437b2cb4
PE
18060 * lisp.h (DEFVAR_KBOARD): Use offsetof instead of char * finagling.
18061
8b9ac8b4
PE
18062 * lread.c: Integer overflow fixes.
18063 (read_integer): Radix is now EMACS_INT, not int,
18064 to improve quality of diagnostics for out-of-range radices.
18065 Calculate buffer size correctly for out-of-range radices.
18066 (read1): Check for integer overflow in radices, and in
18067 read-circle numbers.
82cb60d3
PE
18068 (read_escape): Avoid int overflow.
18069 (Fload, openp, read_buffer_size, read1)
18070 (substitute_object_recurse, read_vector, read_list, map_obarray):
18071 Use ptrdiff_t, not int, for sizes.
18072 (read1): Use EMACS_INT, not int, for sizes.
20270765 18073 Check for size overflow.
8b9ac8b4 18074
7fcccf1e
PE
18075 * image.c (cache_image): Check for size arithmetic overflow.
18076
bfbbd7e7
PE
18077 * lread.c: Integer overflow issues.
18078 (saved_doc_string_size, saved_doc_string_length)
18079 (prev_saved_doc_string_size, prev_saved_doc_string_length):
18080 Now ptrdiff_t, not int.
18081 (read1): Don't assume doc string length fits in int. Check for
18082 out-of-range doc string lengths.
18083 (read_list): Don't assume file position fits in int.
39019e54 18084 (read_escape): Check for hex character overflow.
bfbbd7e7 18085
4e323265
LL
180862011-06-22 Leo Liu <sdl.web@gmail.com>
18087
18088 * minibuf.c (Fcompleting_read_default, Vcompleting_read_function):
18089 Move to minibuffer.el.
18090
85fece3e
PE
180912011-06-22 Paul Eggert <eggert@cs.ucla.edu>
18092
20b84ce9 18093 Fixes for GLYPH_DEBUG found by GCC 4.6.0 static checking.
85fece3e
PE
18094 The following patches are for when GLYPH_DEBUG && !XASSERT.
18095 * dispextern.h (trace_redisplay_p, dump_glyph_string):
18096 * dispnew.c (flush_stdout):
18097 * xdisp.c (dump_glyph_row, dump_glyph_matrix, dump_glyph):
18098 Mark as externally visible.
18099 * dispnew.c (check_window_matrix_pointers): Now static.
18100 * dispnew.c (window_to_frame_vpos):
18101 * xfns.c (unwind_create_frame):
18102 * xterm.c (x_check_font): Remove unused local.
18103 * scroll.c (CHECK_BOUNDS):
18104 * xfaces.c (cache_fache): Rename local to avoid shadowing.
18105 * xfns.c, w32fns.c (image_cache_refcount, dpyinfo_refcount): Now static.
18106 * xdisp.c (check_window_end): Now a no-op if !XASSERTS.
18107 (debug_first_unchanged_at_end_vpos, debug_last_unchanged_at_beg_vpos)
18108 (debug_dvpos, debug_dy, debug_delta, debug_delta_bytes, debug_end_vpos):
18109 Now static.
18110 (debug_method_add): Use va_list and vsprintf rather than relying
18111 on undefined behavior with wrong number of arguments.
18112 (dump_glyph, dump_glyph_row, Fdump_glyph_matrix):
18113 Don't assume ptrdiff_t and EMACS_INT are the same width as int.
18114 In this code, it's OK to assume C99 behavior for ptrdiff_t formats
18115 since we're not interested in debugging glyphs with old libraries.
18116 * xfaces.c (cache_face): Move debugging code earlier; this pacifies
18117 GCC 4.6.0's static checking.
18118
0766b489
PE
181192011-06-22 Paul Eggert <eggert@cs.ucla.edu>
18120
31fd4b32
PE
18121 Integer overflow and signedness fixes (Bug#8873).
18122 A few related buffer overrun fixes, too.
18123
b79e8648
PE
18124 * font.c (font_score): Use EMACS_INT, not int, to store XINT value.
18125
0766b489
PE
18126 * dispextern.h (struct face.stipple):
18127 * image.c (x_bitmap_height, x_bitmap_width, x_bitmap_pixmap)
18128 (x_bitmap_mask, x_allocate_bitmap_record)
18129 (x_create_bitmap_from_data, x_create_bitmap_from_file)
18130 (x_destroy_bitmap, x_destroy_all_bitmaps, x_create_bitmap_mask)
18131 (x_create_bitmap_from_xpm_data):
18132 * nsterm.h (struct ns_display_info.bitmaps_size, .bitmaps_last):
18133 * w32term.h (struct w32_display_info.icon_bitmap_id, .bitmaps_size)
18134 (.bitmaps_last):
18135 * xfaces.c (load_pixmap):
18136 * xterm.c (x_bitmap_icon, x_wm_set_icon_pixmap):
18137 * xterm.h (struct x_display_info.icon_bitmap_id, .bitmaps_size)
18138 (.bitmaps_last, struct x_output.icon_bitmap):
18139 Use ptrdiff_t, not int, for bitmap indexes.
18140 (x_allocate_bitmap_record): Check for size overflow.
18141 * dispextern.h, lisp.h: Adjust to API changes elsewhere.
18142
b081724f
PE
18143 Use ptrdiff_t, not int, for overlay counts.
18144 * buffer.h (overlays_at, sort_overlays, GET_OVERLAYS_AT):
18145 * editfns.c (overlays_around, get_pos_property):
18146 * textprop.c (get_char_property_and_overlay):
18147 * xdisp.c (next_overlay_change, note_mouse_highlight):
18148 * xfaces.c (face_at_buffer_position):
21514da7
PE
18149 * buffer.c (OVERLAY_COUNT_MAX): New macro.
18150 (overlays_at, overlays_in, sort_overlays, Foverlays_at)
18151 (Fnext_overlay_change, Fprevious_overlay_change)
18152 (mouse_face_overlay_overlaps, Foverlays_in):
b081724f 18153 Use ptrdiff_t, not int, for sizes.
21514da7 18154 (overlays_at, overlays_in): Check for size-calculation overflow.
b081724f 18155
3de73e5e
PE
18156 * xterm.c (xim_initialize, same_x_server): Strlen may not fit in int.
18157
2606c57b
PE
18158 * xsmfns.c (smc_save_yourself_CB, x_session_initialize): Avoid strlen.
18159 (x_session_initialize): Do not assume string length fits in int.
18160
aaafe47a
PE
18161 * xsettings.c (apply_xft_settings): Fix potential buffer overrun.
18162 This is unlikely, but can occur if DPI is outlandish.
18163
2674ddc8 18164 * xsettings.c (Ffont_get_system_normal_font, Ffont_get_system_font):
3a5077c5
PE
18165 * xselect.c (Fx_get_atom_name): Avoid need for strlen.
18166
28154962
PE
18167 * xrdb.c: Don't assume strlen fits in int; avoid some strlens.
18168 * xrdb.c (magic_file_p, search_magic_path):
18169 Omit last arg SUFFIX; it was always 0. All callers changed.
18170 (magic_file_p): Use ptrdiff_t, not int. Check for size overflow.
18171
7de51af5
PE
18172 * xfont.c (xfont_match): Avoid need for strlen.
18173
25ed6cc3
PE
18174 * xfns.c: Don't assume strlen fits in int.
18175 (xic_create_fontsetname, x_window): Use ptrdiff_t, not int.
18176
4eab31dd
PE
18177 * xdisp.c (message_log_check_duplicate): Return intmax_t,
18178 not unsigned long, as we prefer signed integers. All callers changed.
18179 Detect integer overflow in repeat count.
18180 (message_dolog): Don't assume print length fits in 39 bytes.
df1f27af 18181 (display_mode_element): Don't assume strlen fits in int.
4eab31dd 18182
171e2a58
PE
18183 * termcap.c: Don't assume sizes fit in int and never overflow.
18184 (struct termcap_buffer, tgetent): Use ptrdiff_t, not int, for sizes.
18185 (gobble_line): Check for size-calculation overflow.
18186
ad39faca 18187 * minibuf.c (Fread_buffer):
6e5bb2dc 18188 * lread.c (intern, intern_c_string):
74ca2eb3
PE
18189 * image.c (xpm_scan) [HAVE_NS && !HAVE_XPM]:
18190 Don't assume string length fits in int.
18191
52c61c22 18192 * keyboard.c (parse_tool_bar_item):
9bda3520
PE
18193 * gtkutil.c (style_changed_cb): Avoid need for strlen.
18194
b5b8c9e5
PE
18195 * font.c: Don't assume string length fits in int.
18196 (font_parse_xlfd, font_parse_fcname, font_unparse_fcname):
18197 Use ptrdiff_t, not int.
ccd6111c
PE
18198 (font_intern_prop): Don't assume string length fits in int.
18199 Don't assume integer property fits in fixnum.
18200 * font.h (font_intern_prop): 2nd arg is now ptrdiff_t, not int.
b5b8c9e5 18201
882f0d81 18202 * filelock.c: Fix some buffer overrun and integer overflow issues.
51cab52b 18203 (get_boot_time): Don't assume gzip command string fits in 100 bytes.
882f0d81
PE
18204 Reformulate so as not to need the command string.
18205 Invoke gzip -cd rather than gunzip, as it's more portable.
18206 (lock_info_type, lock_file_1, lock_file):
18207 Don't assume pid_t and time_t fit in unsigned long.
18208 (LOCK_PID_MAX): Remove; we now use more-reliable bounds.
18209 (current_lock_owner): Prefer signed type for sizes.
18210 Use memcpy, not strncpy, where memcpy is what is really wanted.
18211 Don't assume (via atoi) that time_t and pid_t fit in int.
18212 Check for time_t and/or pid_t out of range, e.g., via a network share.
18213 Don't alloca where an auto var works fine.
18214
93f4cf88
PE
18215 * fileio.c: Fix some integer overflow issues.
18216 (file_name_as_directory, Fexpand_file_name, Fsubstitute_in_file_name):
18217 Don't assume string length fits in int.
18218 (directory_file_name): Don't assume string length fits in long.
18219 (make_temp_name): Don't assume pid fits in int, or that its print
18220 length is less than 20.
18221
f3e92b69
PE
18222 * data.c (Fsubr_name): Rewrite to avoid a strlen call.
18223
1bfdaf10
PE
18224 * coding.c (make_subsidiaries): Don't assume string length fits in int.
18225
35016e9a
PE
18226 * callproc.c (child_setup): Rewrite to avoid two strlen calls.
18227
3d1e65a1
PE
18228 * process.c (Fformat_network_address): Use EMACS_INT, not EMACS_UINT.
18229 We prefer signed integers, even for size calculations.
18230
0b963a93
PE
18231 * emacs.c: Don't assume string length fits in 'int'.
18232 (DEFINE_DUMMY_FUNCTION, sort_args): Use ptrdiff_t, not int.
18233 (main): Don't invoke strlen when not needed.
18234
573f4b54
PE
18235 * dbusbind.c (XD_ERROR): Don't arbitrarily truncate string.
18236 (XD_DEBUG_MESSAGE): Don't waste a byte.
18237
989f33ba
PE
18238 * callproc.c (getenv_internal_1, getenv_internal)
18239 (Fgetenv_internal):
965d34eb
PE
18240 * buffer.c (init_buffer): Don't assume string length fits in 'int'.
18241
e4d29b33
PE
18242 * lread.c (invalid_syntax): Omit length argument.
18243 All uses changed. This doesn't fix a bug, but it simplifies the
18244 code away from its former Hollerith-constant appearance, and it's
18245 one less 'int' to worry about when looking at integer-overflow issues.
51cab52b 18246 (string_to_number): Simplify 2011-04-26 change by invoking xsignal1.
e4d29b33 18247
eb49b136
PE
18248 * lisp.h (DEFUN): Remove bogus use of sizeof (struct Lisp_Subr).
18249 This didn't break anything, but it didn't help either.
18250 It's confusing to put a bogus integer in a place where the actual
18251 value does not matter.
9f62aeb1 18252 (LIST_END_P): Remove unused macro and its bogus comment.
cbeff735 18253 (make_fixnum_or_float): Remove unnecessary cast to EMACS_INT.
eb49b136 18254
15375a22
PE
18255 * lisp.h (union Lisp_Object.i): EMACS_INT, not EMACS_UINT.
18256 This is for consistency with the ordinary, non-USE_LISP_UNION_TYPE,
18257 implementation.
b61cc01c
PE
18258 (struct Lisp_Bool_Vector.size): EMACS_INT, not EMACS_UINT.
18259 We prefer signed types, and the value cannot exceed the EMACS_INT
18260 range anyway (because otherwise the length would not be representable).
9a8e8d9b
PE
18261 (XSET) [USE_LISP_UNION_TYPE]: Use uintptr_t and intptr_t,
18262 not EMACS_UINT and EMACS_INT, when converting pointer to integer.
18263 This avoids a GCC warning when WIDE_EMACS_INT.
15375a22 18264
53b2623d
PE
18265 * indent.c (sane_tab_width): New function.
18266 (current_column, scan_for_column, Findent_to, position_indentation)
18267 (compute_motion): Use it. This is just for clarity.
8fcaf9cc 18268 (Fcompute_motion): Don't assume hscroll and tab offset fit in int.
53b2623d 18269
51cab52b 18270 * image.c (xbm_image_p): Don't assume stated width, height fit in int.
45aebb64 18271
f2ed8a70
PE
18272 * lisp.h (lint_assume): New macro.
18273 * composite.c (composition_gstring_put_cache):
18274 * ftfont.c (ftfont_shape_by_flt): Use it to pacify GCC 4.6.0.
18275
abe80cc6
PE
18276 * editfns.c, insdel.c:
18277 Omit unnecessary forward decls, to simplify future changes.
a9e860e1 18278
b02c740e
PE
18279 * ftfont.c (ftfont_shape_by_flt): Use signed integers for lengths.
18280
ebc96716
PE
18281 * font.c (Ffont_shape_gstring): Don't assume glyph len fits in 'int'.
18282
b4e50fa0 18283 * fns.c (Ffillarray): Don't assume bool vector size fits in 'int'.
f03dc6ef 18284 Use much-faster test for byte-length change.
311d5d7c 18285 Don't assume string byte-length fits in 'int'.
a4cf38e4 18286 Check that character arg fits in 'int'.
85461888 18287 (mapcar1): Declare byte as byte, for clarity.
b4e50fa0 18288
c0c1ee9f
PE
18289 * alloc.c (Fmake_bool_vector): Avoid unnecessary multiplication.
18290
a498d7f4
PE
18291 * fns.c (concat): Catch string overflow earlier.
18292 Do not rely on integer wraparound.
18293
51cab52b
PE
18294 * dispextern.h (struct it.overlay_strings_charpos)
18295 (struct it.selective): Now EMACS_INT, not int.
87830974
PE
18296 * xdisp.c (forward_to_next_line_start)
18297 (back_to_previous_visible_line_start)
18298 (reseat_at_next_visible_line_start, next_element_from_buffer):
18299 Don't arbitrarily truncate the value of 'selective' to int.
18300
76031fad
PE
18301 * xdisp.c (init_iterator): Use XINT, not XFASTINT; it might be < 0.
18302
5eb55db9
PE
18303 * composite.c: Don't truncate sizes to 'int'.
18304 (composition_gstring_p, composition_reseat_it)
18305 (composition_adjust_point): Use EMACS_INT, not int.
7d100a81
PE
18306 (get_composition_id, composition_gstring_put_cache): Use EMACS_INT,
18307 not EMACS_UINT, for indexes.
5eb55db9 18308
0703a717
PE
18309 * category.h (CATEGORY_SET_P): Remove unnecessary cast to EMACS_INT.
18310
d6202519
PE
18311 * buffer.c: Include <verify.h>.
18312 (struct sortvec.priority, struct sortstr.priority):
8961a454 18313 Now EMACS_INT, not int.
c20998a7 18314 (compare_overlays, cmp_for_strings): Avoid subtraction overflow.
67c36fce
PE
18315 (struct sortstr.size, record_overlay_string)
18316 (struct sortstrlist.size, struct sortlist.used):
18317 Don't truncate size to int.
18318 (record_overlay_string): Check for size-calculation overflow.
d6202519 18319 (init_buffer_once): Check at compile-time, not run-time.
fadf4e30 18320
d5a19415
JM
183212011-06-22 Jim Meyering <meyering@redhat.com>
18322
029529ac 18323 Don't leak an XBM-image-sized buffer
d5a19415
JM
18324 * image.c (xbm_load): Free the image buffer after using it.
18325
a9041e6c
PE
183262011-06-21 Paul Eggert <eggert@cs.ucla.edu>
18327
18328 Port to Sun C.
18329 * composite.c (find_automatic_composition): Omit needless 'return 0;'
18330 that Sun C diagnosed.
18331 * fns.c (secure_hash): Fix pointer signedness issue.
18332 * intervals.c (static_offset_intervals): New function.
18333 (offset_intervals): Use it.
18334
7f3f739f
LL
183352011-06-21 Leo Liu <sdl.web@gmail.com>
18336
18337 * deps.mk (fns.o):
18338 * makefile.w32-in ($(BLD)/fns.$(O)): Include sha256.h and
18339 sha512.h.
18340
18341 * fns.c (secure_hash): Rename from crypto_hash_function and change
18342 the first arg to accept symbols.
5b66d427 18343 (Fsecure_hash): New primitive.
7f3f739f
LL
18344 (syms_of_fns): New symbols.
18345
76147d94
DD
183462011-06-20 Deniz Dogan <deniz@dogan.se>
18347
18348 * process.c (Fset_process_buffer): Clarify return value in
18349 docstring.
18350
7d7d0045
CY
183512011-06-18 Chong Yidong <cyd@stupidchicken.com>
18352
18353 * dispnew.c (add_window_display_history): Use BVAR.
18354
18355 * xdisp.c (debug_method_add): Use BVAR.
18356 (check_window_end, dump_glyph_matrix, dump_glyph)
18357 (dump_glyph_row, dump_glyph_string): Convert arglist to ANSI C.
18358
18359 * xfaces.c (check_lface_attrs, check_lface, dump_realized_face):
18360 Likewise.
18361
18362 * xfns.c (Fx_create_frame, x_create_tip_frame): Delay image cache
18363 check till after the cache is created in init_frame_faces.
18364
ff2bc410
SM
183652011-06-17 Stefan Monnier <monnier@iro.umontreal.ca>
18366
18367 * fns.c (Fsafe_length): Yet another int/Lisp_Object mixup.
18368
28177add
PE
183692011-06-16 Paul Eggert <eggert@cs.ucla.edu>
18370
dd3482fe
PE
18371 * lisp.h: Include <limits.h>, for INT_MAX, LONG_MAX, LLONG_MAX.
18372 Without this, prin1 mishandles Lisp_Misc_Save_Value printing on
18373 hosts with pre-C99 libraries, because pD is wrongly defined to "t".
18374
393d71f3 18375 Improve buffer-overflow checking (Bug#8873).
1c8e352f
PE
18376 * fileio.c (Finsert_file_contents):
18377 * insdel.c (insert_from_buffer_1, replace_range, replace_range_2):
18378 Remove the old (too-loose) buffer overflow checks.
18379 They weren't needed, since make_gap checks for buffer overflow.
18380 * insdel.c (make_gap_larger): Catch buffer overflows that were missed.
18381 The old code merely checked for Emacs fixnum overflow, and relied
18382 on undefined (wraparound) behavior. The new code avoids undefined
18383 behavior, and also checks for ptrdiff_t and/or size_t overflow.
18384
2e6813b0 18385 * editfns.c (Finsert_char): Don't dump core with very negative counts.
21d890a4
PE
18386 Tune. Don't use wider integers than needed. Don't use alloca.
18387 Use a bigger 'string' buffer. Rewrite to avoid 'n > 0' test.
2e6813b0 18388
599a9e4f
PE
18389 * insdel.c (replace_range): Fix buf overflow when insbytes < outgoing.
18390
99561444
PE
18391 * insdel.c, lisp.h (buffer_overflow): New function.
18392 (insert_from_buffer_1, replace_range, replace_range_2):
18393 * insdel.c (make_gap_larger):
18394 * editfns.c (Finsert_char):
18395 * fileio.c (Finsert_file_contents): Use it, to normalize wording.
18396
28177add
PE
18397 * buffer.h (BUF_BYTES_MAX): Cast to ptrdiff_t so that it's signed.
18398
e69dafad
PE
183992011-06-15 Paul Eggert <eggert@cs.ucla.edu>
18400
4baa020d 18401 Integer overflow and signedness fixes (Bug#8873, Bug#8828).
ff672d2c 18402
b1c46f02
PE
18403 * ccl.c (ASCENDING_ORDER): New macro, to work around GCC bug 43772.
18404 (GET_CCL_RANGE, IN_INT_RANGE): Use it.
18405
e69dafad
PE
18406 * fileio.c: Don't assume EMACS_INT fits in off_t.
18407 (emacs_lseek): New static function.
18408 (Finsert_file_contents, Fwrite_region): Use it.
18409 Use SEEK_SET, SEEK_CUR, SEEK_END as appropriate.
18410
566684ea
PE
18411 * fns.c (Fload_average): Don't assume 100 * load average fits in int.
18412
e6966cd6
PE
18413 * fns.c: Don't overflow int when computing a list length.
18414 * fns.c (QUIT_COUNT_HEURISTIC): New constant.
18415 (Flength, Fsafe_length): Use EMACS_INT, not int, to avoid unwanted
18416 truncation on 64-bit hosts. Check for QUIT every
18417 QUIT_COUNT_HEURISTIC entries rather than every other entry; that's
18418 faster and is responsive enough.
18419 (Flength): Report an error instead of overflowing an integer.
18420 (Fsafe_length): Return a float if the value is not representable
18421 as a fixnum. This shouldn't happen except in contrived situations.
6346d301 18422 (Fnthcdr, Fsort): Don't assume list length fits in int.
de41a810 18423 (Fcopy_sequence): Don't assume vector length fits in int.
00c604f2 18424
dd0b0efb
PE
18425 * alloc.c: Check that resized vectors' lengths fit in fixnums.
18426 (header_size, word_size): New constants.
18427 (allocate_vectorlike): Don't check size overflow here.
18428 (allocate_vector): Check it here instead, since this is the only
18429 caller of allocate_vectorlike that could cause overflow.
18430 Check that the new vector's length is representable as a fixnum.
18431
86fe5cfe
PE
18432 * fns.c (next_almost_prime): Don't return a multiple of 3 or 5.
18433 The previous code was bogus. For example, next_almost_prime (32)
18434 returned 39, which is undesirable as it is a multiple of 3; and
18435 next_almost_prime (24) returned 25, which is a multiple of 5 so
18436 why was the code bothering to check for multiples of 7?
18437
80e88859
PE
18438 * bytecode.c (exec_byte_code): Use ptrdiff_t, not int, for vector length.
18439
4a2f0ad6
PE
18440 * eval.c, doprnt.c (SIZE_MAX): Remove; inttypes.h defines this now.
18441
f66c7cf8
PE
18442 Variadic C functions now count arguments with ptrdiff_t.
18443 This partly undoes my 2011-03-30 change, which replaced int with size_t.
18444 Back then I didn't know that the Emacs coding style prefers signed int.
18445 Also, in the meantime I found a few more instances where arguments
4a2f0ad6
PE
18446 were being counted with int, which may truncate counts on 64-bit
18447 machines, or EMACS_INT, which may be unnecessarily wide.
f66c7cf8
PE
18448 * lisp.h (struct Lisp_Subr.function.aMANY)
18449 (DEFUN_ARGS_MANY, internal_condition_case_n, safe_call):
18450 Arg counts are now ptrdiff_t, not size_t.
18451 All variadic functions and their callers changed accordingly.
18452 (struct gcpro.nvars): Now size_t, not size_t. All uses changed.
18453 * bytecode.c (exec_byte_code): Check maxdepth for overflow,
18454 to avoid potential buffer overrun. Don't assume arg counts fit in 'int'.
18455 * callint.c (Fcall_interactively): Check arg count for overflow,
18456 to avoid potential buffer overrun. Use signed char, not 'int',
18457 for 'varies' array, so that we needn't bother to check its size
18458 calculation for overflow.
18459 * editfns.c (Fformat): Use ptrdiff_t, not EMACS_INT, to count args.
18460 * eval.c (apply_lambda):
18461 * fns.c (Fmapconcat): Use XFASTINT, not XINT, to get args length.
18462 (struct textprop_rec.argnum): Now ptrdiff_t, not int. All uses changed.
18463 (mapconcat): Use ptrdiff_t, not int and EMACS_INT, to count args.
18464
a1759b76
PE
18465 * callint.c (Fcall_interactively): Don't use index var as event count.
18466
d96be9fc
PE
18467 * vm-limit.c (check_memory_limits): Fix incorrect extern function decls.
18468 * mem-limits.h (SIZE): Remove; no longer used.
18469
a690a978 18470 * xterm.c (x_alloc_nearest_color_1): Prefer int to long when int works.
5efd304b 18471
578c21e6
PE
18472 Remove unnecessary casts.
18473 * xterm.c (x_term_init):
18474 * xfns.c (x_set_border_pixel):
18475 * widget.c (create_frame_gcs): Remove casts to unsigned long etc.
18476 These aren't needed now that we assume ANSI C.
18477
96f53c6c
PE
18478 * sound.c (Fplay_sound_internal): Remove cast to unsigned long.
18479 It's more likely to cause problems (due to unsigned overflow)
18480 than to cure them.
18481
83c77d31
PE
18482 * dired.c (Ffile_attributes): Don't use 32-bit hack on 64-bit hosts.
18483
ee2079f1
PE
18484 * unexelf.c (unexec): Don't assume BSS addr fits in unsigned.
18485
6da65536
PE
18486 * xterm.c (handle_one_xevent): Omit unnecessary casts to unsigned.
18487
7147c4a4
PE
18488 * keyboard.c (modify_event_symbol): Don't limit alist len to UINT_MAX.
18489
193e32d9
PE
18490 * lisp.h (CHAR_TABLE_SET): Omit now-redundant test.
18491
e5533da6
PE
18492 * lread.c (Fload): Don't compare a possibly-garbage time_t value.
18493
9910e595
PE
18494 GLYPH_CODE_FACE returns EMACS_INT, not int.
18495 * dispextern.h (merge_faces):
18496 * xfaces.c (merge_faces):
01103c44
PE
18497 * xdisp.c (get_next_display_element, next_element_from_display_vector):
18498 Don't assume EMACS_INT fits in int.
9910e595 18499
2638320e
PE
18500 * character.h (CHAR_VALID_P): Remove unused parameter.
18501 * fontset.c, lisp.h, xdisp.c: All uses changed.
18502
045eb8d9
PE
18503 * editfns.c (Ftranslate_region_internal): Omit redundant test.
18504
c1f134b5
PE
18505 * fns.c (concat): Minor tuning based on overflow analysis.
18506 This doesn't fix any bugs. Use int to hold character, instead
18507 of constantly refetching from Emacs object. Use XFASTINT, not
18508 XINT, for value known to be a character. Don't bother comparing
18509 a single byte to 0400, as it's always less.
18510
395fcb93 18511 * floatfns.c (Fexpt):
327eeec8
PE
18512 * fileio.c (make_temp_name): Omit unnecessary cast to unsigned.
18513
abbd3d23
PE
18514 * editfns.c (Ftranslate_region_internal): Use int, not EMACS_INT
18515 for characters.
18516
684a03ef
PE
18517 * doc.c (get_doc_string): Omit (unsigned)c that mishandled negatives.
18518
0fed43f3
PE
18519 * data.c (Faset): If ARRAY is a string, check that NEWELT is a char.
18520 Without this fix, on a 64-bit host (aset S 0 4294967386) would
18521 incorrectly succeed when S was a string, because 4294967386 was
18522 truncated before it was used.
18523
8fd02eb7
PE
18524 * chartab.c (Fchar_table_range): Use CHARACTERP to check range.
18525 Otherwise, an out-of-range integer could cause undefined behavior
18526 on a 64-bit host.
18527
f8c86b69
PE
18528 * composite.c: Use int, not EMACS_INT, for characters.
18529 (fill_gstring_body, composition_compute_stop_pos): Use int, not
18530 EMACS_INT, for values that are known to be in character range.
18531 This doesn't fix any bugs but is the usual style inside Emacs and
18532 may generate better code on 32-bit machines.
18533
34206dd2
PE
18534 Make sure a 64-bit char is never passed to ENCODE_CHAR.
18535 This is for reasons similar to the recent CHAR_STRING fix.
18536 * charset.c (Fencode_char): Check that character arg is actually
18537 a character. Pass an int to ENCODE_CHAR.
18538 * charset.h (ENCODE_CHAR): Verify that the character argument is no
18539 wider than 'int', as a compile-time check to prevent future regressions
18540 in this area.
18541
c5958d4c 18542 * character.c (char_string): Remove unnecessary casts.
13bdea59
PE
18543
18544 Make sure a 64-bit char is never passed to CHAR_STRING.
18545 Otherwise, CHAR_STRING would do the wrong thing on a 64-bit platform,
18546 by silently ignoring the top 32 bits, allowing some values
18547 that were far too large to be valid characters.
18548 * character.h: Include <verify.h>.
18549 (CHAR_STRING, CHAR_STRING_ADVANCE): Verify that the character
18550 arguments are no wider than unsigned, as a compile-time check
18551 to prevent future regressions in this area.
18552 * data.c (Faset):
01103c44 18553 * editfns.c (Fchar_to_string, general_insert_function, Finsert_char)
13bdea59
PE
18554 (Fsubst_char_in_region):
18555 * fns.c (concat):
18556 * xdisp.c (decode_mode_spec_coding):
18557 Adjust to CHAR_STRING's new requirement.
18558 * editfns.c (Finsert_char, Fsubst_char_in_region):
18559 * fns.c (concat): Check that character args are actually
18560 characters. Without this test, these functions did the wrong
18561 thing with wildly out-of-range values on 64-bit hosts.
18562
d37ca623
PE
18563 Remove incorrect casts to 'unsigned' that lose info on 64-bit hosts.
18564 These casts should not be needed on 32-bit hosts, either.
18565 * keyboard.c (read_char):
18566 * lread.c (Fload): Remove casts to unsigned.
18567
ea204efb
PE
18568 * lisp.h (UNSIGNED_CMP): New macro.
18569 This fixes comparison bugs on 64-bit hosts.
18570 (ASCII_CHAR_P): Use it.
18571 * casefiddle.c (casify_object):
01103c44 18572 * character.h (ASCII_BYTE_P, CHAR_VALID_P)
ea204efb
PE
18573 (SINGLE_BYTE_CHAR_P, CHAR_STRING):
18574 * composite.h (COMPOSITION_ENCODE_RULE_VALID):
18575 * dispextern.h (FACE_FROM_ID):
18576 * keyboard.c (read_char): Use UNSIGNED_CMP.
18577
41cb286c
PE
18578 * xmenu.c (dialog_selection_callback) [!USE_GTK]: Cast to intptr_t,
18579 not to EMACS_INT, to avoid GCC warning.
18580
4a1b9832
PE
18581 * xfns.c (x_set_scroll_bar_default_width): Remove unused 'int' locals.
18582
55daad71
PE
18583 * buffer.h (PTR_BYTE_POS, BUF_PTR_BYTE_POS): Remove harmful cast.
18584 The cast incorrectly truncated 64-bit byte offsets to 32 bits, and
18585 isn't needed on 32-bit machines.
8f95c75c 18586
01103c44
PE
18587 * buffer.c (Fgenerate_new_buffer_name):
18588 Use EMACS_INT for count, not int.
0ceccced 18589 (advance_to_char_boundary): Return EMACS_INT, not int.
e762cafe
PE
18590
18591 * data.c (Qcompiled_function): Now static.
18592
c6f072e7
PE
18593 * window.c (window_body_lines): Now static.
18594
20ce5912
PE
18595 * image.c (gif_load): Rename local to avoid shadowing.
18596
9c4c5f81
PE
18597 * lisp.h (SAFE_ALLOCA_LISP): Check for integer overflow.
18598 (struct Lisp_Save_Value): Use ptrdiff_t, not int, for 'integer' member.
18599 * alloc.c (make_save_value): Integer argument is now of type
18600 ptrdiff_t, not int.
18601 (mark_object): Use ptrdiff_t, not int.
18602 * lisp.h (pD): New macro.
18603 * print.c (print_object): Use it.
18604
c0c5c8ae
PE
18605 * alloc.c: Use EMACS_INT, not int, to count objects.
18606 (total_conses, total_markers, total_symbols, total_vector_size)
18607 (total_free_conses, total_free_markers, total_free_symbols)
01103c44
PE
18608 (total_free_floats, total_floats, total_free_intervals)
18609 (total_intervals, total_strings, total_free_strings):
c0c5c8ae
PE
18610 Now EMACS_INT, not int. All uses changed.
18611 (Fgarbage_collect): Compute overall total using a double, so that
18612 integer overflow is less likely to be a problem. Check for overflow
18613 when converting back to an integer.
5a25e253
PE
18614 (n_interval_blocks, n_string_blocks, n_float_blocks, n_cons_blocks)
18615 (n_vectors, n_symbol_blocks, n_marker_blocks): Remove.
18616 These were 'int' variables that could overflow on 64-bit hosts;
18617 they were never used, so remove them instead of repairing them.
211a0b2a 18618 (nzombies, ngcs, max_live, max_zombies): Now EMACS_INT, not 'int'.
6349ae4d
PE
18619 (inhibit_garbage_collection): Set gc_cons_threshold to max value.
18620 Previously, this ceilinged at INT_MAX, but that doesn't work on
18621 64-bit machines.
e46bb31a 18622 (allocate_pseudovector): Don't use EMACS_INT when int would do.
c0c5c8ae 18623
c78baabf 18624 * alloc.c (Fmake_bool_vector): Don't assume vector size fits in int.
86f61a15 18625 (allocate_vectorlike): Check for ptrdiff_t overflow.
b6439961
PE
18626 (mark_vectorlike, mark_char_table, mark_object): Avoid EMACS_UINT
18627 when a (possibly-narrower) signed value would do just as well.
18628 We prefer using signed arithmetic, to avoid comparison confusion.
c78baabf 18629
c9d624c6
PE
18630 * alloc.c: Catch some string size overflows that we were missing.
18631 (XMALLOC_OVERRUN_CHECK_SIZE) [!XMALLOC_OVERRUN_CHECK]: Define to 0,
18632 for convenience in STRING_BYTES_MAX.
18633 (STRING_BYTES_MAX): New macro, superseding the old one in lisp.h.
18634 The definition here is exact; the one in lisp.h was approximate.
18635 (allocate_string_data): Check for string overflow. This catches
18636 some instances we weren't catching before. Also, it catches
18637 size_t overflow on (unusual) hosts where SIZE_MAX <= min
18638 (PTRDIFF_MAX, MOST_POSITIVE_FIXNUM), e.g., when size_t is 32 bits
18639 and ptrdiff_t and EMACS_INT are both 64 bits.
c78baabf 18640
c9d624c6
PE
18641 * character.c, coding.c, doprnt.c, editfns.c, eval.c:
18642 All uses of STRING_BYTES_MAX replaced by STRING_BYTES_BOUND.
640c8776 18643 * lisp.h (STRING_BYTES_BOUND): Rename from STRING_BYTES_MAX.
c9d624c6 18644
353032ce
PE
18645 * character.c (string_escape_byte8): Fix nbytes/nchars typo.
18646
2bccce07
PE
18647 * alloc.c (Fmake_string): Check for out-of-range init.
18648
0ac30604
SM
186492011-06-15 Stefan Monnier <monnier@iro.umontreal.ca>
18650
18651 * eval.c (Fdefvaralias): Also mark the target as variable-special-p.
18652
c195f2de
JD
186532011-06-14 Jan Djärv <jan.h.d@swipnet.se>
18654
18655 * xfns.c (x_set_scroll_bar_default_width): Remove argument to
18656 xg_get_default_scrollbar_width.
18657
18658 * gtkutil.c: Include emacsgtkfixed.h if HAVE_GTK3.
18659 (int_gtk_range_get_value): Move to the scroll bar part of the file.
18660 (style_changed_cb): Call update_theme_scrollbar_width and call
18661 x_set_scroll_bar_default_width and xg_frame_set_char_size for
18662 all frames (Bug#8505).
18663 (xg_create_frame_widgets): Call emacs_fixed_new if HAVE_GTK3 (Bug#8505).
18664 Call gtk_window_set_resizable if HAVE_GTK3.
18665 (x_wm_set_size_hint): Call emacs_fixed_set_min_size with min width
18666 and height if HAVE_GTK3 (Bug#8505).
18667 (scroll_bar_width_for_theme): New variable.
18668 (update_theme_scrollbar_width): New function.
18669 (xg_get_default_scrollbar_width): Move code to
18670 update_theme_scrollbar_width, just return scroll_bar_width_for_theme.
18671 (xg_initialize): Call update_theme_scrollbar_width.
18672
18673 * gtkutil.h (xg_get_default_scrollbar_width): Remove argument.
18674
18675 * emacsgtkfixed.c, emacsgtkfixed.h: New files.
18676
e10ac9f1
MR
186772011-06-12 Martin Rudalics <rudalics@gmx.at>
18678
18679 * frame.c (make_frame): Call other_buffer_safely instead of
18680 other_buffer.
18681
18682 * window.c (temp_output_buffer_show): Call display_buffer with
18683 second argument Vtemp_buffer_show_specifiers and reset latter
18684 immediately after the call.
18685 (Vtemp_buffer_show_specifiers): New variable.
18686 (auto_window_vscroll_p, next_screen_context_lines)
18687 (Vscroll_preserve_screen_position): Remove leading asterisks from
18688 doc-strings.
18689
2d3c217e 186902011-06-12 Paul Eggert <eggert@cs.ucla.edu>
4475bec4 18691
7b7f97e8 18692 Fix minor problems found by GCC 4.6.0 static checking.
4475bec4
PE
18693 * buffer.c (Qclone_number): Remove for now, as it's unused.
18694 (record_buffer, Funrecord_buffer): Rename local to avoid shadowing.
18695 (record_buffer): Remove unused local.
18696 * frame.c (other_visible_frames, frame_buffer_list): Now static.
18697 (set_frame_buffer_list): Remove; unused.
18698 * frame.h (other_visible_frames): Remove decl.
18699 * keyboard.h (menu_items_inuse): Declare only if USE_GTK || USE_MOTIF.
18700 * lisp.h (frame_buffer_list, set_frame_buffer_list): Remove decls.
18701 (add_gpm_wait_descriptor, delete_gpm_wait_descriptor): Declare only
18702 if HAVE_GPM.
18703 * menu.c (menu_items_inuse): Now static unless USE_GTK || USE_MOTIF.
18704 * process.c (add_gpm_wait_descriptor, delete_gpm_wait_descriptor):
18705 Define only if HAVE_GPM.
18706 * widget.c (EmacsFrameResize, emacsFrameClassRec): Now static.
18707 (update_hints_inhibit): Remove; never set. All uses removed.
18708 * widgetprv.h (emacsFrameClassRec): Remove decl.
18709 * window.c (delete_deletable_window): Now returns void, since it
18710 wasn't returning anything.
18711 (compare_window_configurations): Remove unused locals.
18712 * xfns.c (x_set_scroll_bar_default_width): Remove unused locals.
18713 * xmenu.c (x_menu_set_in_use): Define only if USE_GTK || USE_MOTIF.
4475bec4
PE
18714 (dialog_selection_callback) [!USE_GTK]: Prefer intptr_t for integers
18715 the same widths as pointers. This follows up on the 2011-05-06 patch.
18716 * xterm.c (x_alloc_lighter_color_for_widget): Define only if USE_LUCID.
18717 * xterm.h: Likewise.
18718 (x_menu_set_in_use): Declare only if USE_GTK || USE_MOTIF.
18719
1384b89e
JB
187202011-06-12 Juanma Barranquero <lekktu@gmail.com>
18721
18722 * makefile.w32-in: Update dependencies.
18723 (LISP_H): Add lib/intprops.h.
18724
1100a63c
CY
187252011-06-11 Chong Yidong <cyd@stupidchicken.com>
18726
18727 * image.c (gif_load): Add animation frame delay to the metadata.
18728 (syms_of_image): Use DEFSYM. New symbol `delay'.
18729
6198ccd0
MR
187302011-06-11 Martin Rudalics <rudalics@gmx.at>
18731
18732 * window.c (delete_deletable_window): Re-add.
18733 (Fset_window_configuration): Rewrite to handle dead buffers and
18734 consequently deletable windows.
18735 (window_tree, Fwindow_tree): Remove. Supply functionality in
18736 window.el.
18737 (compare_window_configurations): Simplify code.
18738
b6e3633c
AS
187392011-06-11 Andreas Schwab <schwab@linux-m68k.org>
18740
1ab0dee5
AS
18741 * image.c (imagemagick_load_image): Fix type mismatch.
18742 (Fimagemagick_types): Likewise.
18743
b6e3633c
AS
18744 * window.h (replace_buffer_in_windows): Declare.
18745
9397e56f
MR
187462011-06-11 Martin Rudalics <rudalics@gmx.at>
18747
18748 * buffer.c: New Lisp objects Qbuffer_list_update_hook and
18749 Qclone_number. Remove external declaration of Qdelete_window.
18750 (Fbuffer_list): Rewrite doc-string. Minor restructuring of
18751 code.
640c8776
SM
18752 (Fget_buffer_create, Fmake_indirect_buffer, Frename_buffer):
18753 Run Qbuffer_list_update_hook if allowed.
9397e56f
MR
18754 (Fother_buffer): Rewrite doc-string. Major rewrite for new
18755 buffer list implementation.
18756 (other_buffer_safely): New function.
18757 (Fkill_buffer): Replace call to replace_buffer_in_all_windows by
18758 calls to replace_buffer_in_windows and
18759 replace_buffer_in_windows_safely. Run Qbuffer_list_update_hook
18760 if allowed.
18761 (record_buffer): Inhibit quitting and rewrite using quittable
18762 functions. Run Qbuffer_list_update_hook if allowed.
18763 (Frecord_buffer, Funrecord_buffer): New functions.
640c8776
SM
18764 (switch_to_buffer_1, Fswitch_to_buffer): Remove.
18765 Move switch-to-buffer to window.el.
9397e56f
MR
18766 (bury-buffer): Move to window.el.
18767 (Vbuffer_list_update_hook): New variable.
18768
18769 * lisp.h (other_buffer_safely): Add prototype in buffer.c
18770 section.
18771
18772 * window.h (resize_frame_windows): Move up in code.
18773 (Fwindow_frame): Remove EXFUN.
18774 (replace_buffer_in_all_windows): Remove prototype.
18775 (replace_buffer_in_windows_safely): Add prototype.
18776
18777 * window.c: Declare Qdelete_window static again. Move down
18778 declaration of select_count.
18779 (Fnext_window, Fprevious_window): Rewrite doc-strings.
18780 (Fother_window): Move to window.el.
18781 (window_loop): Remove DELETE_BUFFER_WINDOWS and UNSHOW_BUFFER
18782 cases. Add REPLACE_BUFFER_IN_WINDOWS_SAFELY case.
18783 (Fdelete_windows_on, Freplace_buffer_in_windows): Move to
18784 window.el.
18785 (replace_buffer_in_windows): Implement by calling
18786 Qreplace_buffer_in_windows.
18787 (replace_buffer_in_all_windows): Remove with some functionality
18788 moved into replace_buffer_in_windows_safely.
18789 (replace_buffer_in_windows_safely): New function.
18790 (select_window_norecord, select_frame_norecord): Move in front
18791 of run_window_configuration_change_hook. Remove now obsolete
18792 declarations.
640c8776
SM
18793 (Fset_window_buffer): Rewrite doc-string.
18794 Call Qrecord_window_buffer.
9397e56f
MR
18795 (keys_of_window): Move binding for other-window to window.el.
18796
b50691aa
CY
187972011-06-11 Chong Yidong <cyd@stupidchicken.com>
18798
18799 * dispextern.h (struct image): Replace data member, whose int_val
18800 and ptr_val fields were not used by anything, with a single
18801 lisp_val object.
18802
18803 * image.c (Fimage_metadata, make_image, mark_image, tiff_load)
18804 (gif_clear_image, gif_load, imagemagick_load_image)
18805 (gs_clear_image, gs_load): Callers changed.
18806
3f754b86
PE
188072011-06-10 Paul Eggert <eggert@cs.ucla.edu>
18808
cca69397
PE
18809 * buffer.h: Include <time.h>, for time_t.
18810 Needed to build on FreeBSD 8.2. Problem reported by Herbert J. Skuhra.
18811
109e28d0
PE
18812 Fix minor problems found by static checking.
18813
60737f02
PE
18814 * image.c (PixelGetMagickColor): Declare if ImageMagick headers don't.
18815
4b66faf3
PE
18816 Make identifiers static if they are not used in other modules.
18817 * data.c (Qcompiled_function, Qframe, Qvector):
18818 * image.c (QimageMagick, Qsvg):
18819 * minibuf.c (Qmetadata):
18820 * window.c (resize_window_check, resize_root_window): Now static.
18821 * window.h (resize_window_check, resize_root_window): Remove decls.
18822
109e28d0
PE
18823 * window.c (window_deletion_count, delete_deletable_window):
18824 Remove; unused.
46a4ce9e
PE
18825 (window_body_lines): Now static.
18826 (Fdelete_other_windows_internal): Mark vars as initialized.
18827 Make sure 'resize_failed' is initialized.
18828 (run_window_configuration_change_hook): Rename local to avoid shadowing.
18829 (resize_window_apply): Remove unused local.
18830 * window.h (delete_deletable_window): Remove decl.
18831
109e28d0 18832 * image.c (gif_load, svg_load_image): Rename locals to avoid shadowing.
33290528
PE
18833 (imagemagick_load_image): Fix pointer signedness problem by changing
18834 last arg from unsigned char * to char *. All uses changed.
18835 Also, fix a local for similar reasons.
18836 Remove unused locals. Remove locals to avoid shadowing.
18837 (fn_rsvg_handle_free): Remove; unused.
18838 (svg_load, svg_load_image): Fix pointer signedness problem.
f7e13da3 18839 (imagemagick_load_image): Don't use garbage pointer image_wand.
33290528 18840
3f754b86
PE
18841 * ftfont.c (ftfont_get_metrics, ftfont_drive_otf): Remove unused locals.
18842
2547adb1
CY
188432011-06-10 Chong Yidong <cyd@stupidchicken.com>
18844
18845 * image.c (gif_load): Fix omitted cast error introduced by
18846 2011-06-06 change.
18847
2c8e37d4
MR
188482011-06-10 Martin Rudalics <rudalics@gmx.at>
18849
18850 * window.h (resize_proportionally, orig_total_lines)
18851 (orig_top_line): Remove from window structure.
18852 (set_window_height, set_window_width, change_window_heights)
18853 (Fdelete_window): Remove prototypes.
18854 (resize_frame_windows): Remove duplicate declaration.
18855
440a42e3
EZ
188562011-06-10 Eli Zaretskii <eliz@gnu.org>
18857
18858 * window.h (resize_frame_windows, resize_window_check)
18859 (delete_deletable_window, resize_root_window)
18860 (resize_frame_windows): Declare prototypes.
18861
18862 * window.c (resize_window_apply): Make definition be "static" to
18863 match the prototype.
18864
562dd5e9
MR
188652011-06-10 Martin Rudalics <rudalics@gmx.at>
18866
18867 * window.c: Remove declarations of Qwindow_size_fixed,
18868 window_min_size_1, window_min_size_2, window_min_size,
18869 size_window, window_fixed_size_p, enlarge_window, delete_window.
18870 Remove static from declaration of Qdelete_window, it's
18871 temporarily needed by Fbury_buffer.
18872 (replace_window): Don't assign orig_top_line and
18873 orig_total_lines.
18874 (Fdelete_window, delete_window): Remove. Window deletion is
18875 handled by window.el.
640c8776
SM
18876 (window_loop): Remove DELETE_OTHER_WINDOWS case.
18877 Replace Fdelete_window calls with calls to Qdelete_window.
562dd5e9
MR
18878 (Fdelete_other_windows): Remove. Deleting other windows is
18879 handled by window.el.
18880 (window_fixed_size_p): Remove. Fixed-sizeness of windows is
18881 handled in window.el.
18882 (window_min_size_2, window_min_size_1, window_min_size): Remove.
18883 Window minimum sizes are handled in window.el.
18884 (shrink_windows, size_window, set_window_height)
18885 (set_window_width, change_window_heights, window_height)
18886 (window_width, CURBEG, CURSIZE, enlarge_window)
18887 (adjust_window_trailing_edge, Fadjust_window_trailing_edge)
18888 (Fenlarge_window, Fshrink_window): Remove. Window resizing is
18889 handled in window.el.
18890 (make_dummy_parent): Rename to make_parent_window and give it a
18891 second argument horflag.
18892 (make_window): Don't set resize_proportionally any more.
18893 (Fsplit_window): Remove. Windows are split in window.el.
18894 (save_restore_action, save_restore_orig_size)
18895 (shrink_window_lowest_first, save_restore_orig_size): Remove.
18896 Resize mini windows in window.el.
18897 (grow_mini_window, shrink_mini_window): Implement by calling
18898 Qresize_root_window_vertically, resize_window_check and
18899 resize_window_apply.
640c8776
SM
18900 (saved_window, Fset_window_configuration, save_window_save):
18901 Do not handle orig_top_line, orig_total_lines, and
562dd5e9
MR
18902 resize_proportionally.
18903 (window_min_height, window_min_width): Move to window.el.
18904 (keys_of_window): Move bindings for delete-other-windows,
18905 split-window, delete-window and enlarge-window to window.el.
18906
18907 * buffer.c: Temporarily extern Qdelete_window.
18908 (Fbury_buffer): Temporarily call Qdelete_window instead of
18909 Fdelete_window (Fbury_buffer will move to window.el soon).
18910
18911 * frame.c (set_menu_bar_lines_1): Remove code handling
18912 orig_top_line and orig_total_lines.
18913
18914 * dispnew.c (adjust_frame_glyphs_initially): Don't use
18915 set_window_height but set heights directly.
18916 (change_frame_size_1): Use resize_frame_windows.
18917
18918 * xdisp.c (init_xdisp): Don't use set_window_height but set
18919 heights directly.
18920
640c8776
SM
18921 * xfns.c (x_set_menu_bar_lines, x_set_tool_bar_lines):
18922 Use resize_frame_windows instead of change_window_heights and run
562dd5e9
MR
18923 run_window_configuration_change_hook.
18924
18925 * w32fns.c (x_set_tool_bar_lines): Use resize_frame_windows
18926 instead of change_window_heights and run
18927 run_window_configuration_change_hook.
18928
1a13852e
MR
189292011-06-09 Martin Rudalics <rudalics@gmx.at>
18930
18931 * window.c (replace_window): Rename second argument REPLACEMENT to
18932 NEW. New third argument SETFLAG. Rewrite.
18933 (delete_window, make_dummy_parent): Call replace_window with
18934 third argument 1.
18935 (window_list_1): Move down in code.
18936 (run_window_configuration_change_hook): Move set_buffer part
18937 before select_frame_norecord part in order to unwind correctly.
18938 Rename count1 to count.
18939 (recombine_windows, delete_deletable_window, resize_root_window)
18940 (Fdelete_other_windows_internal)
18941 (Frun_window_configuration_change_hook, make_parent_window)
18942 (resize_window_check, resize_window_apply, Fresize_window_apply)
18943 (resize_frame_windows, Fsplit_window_internal)
640c8776
SM
18944 (Fdelete_window_internal, Fresize_mini_window_internal):
18945 New functions.
1a13852e
MR
18946 (syms_of_window): New variables Vwindow_splits and Vwindow_nest.
18947
f3d1777e
MR
189482011-06-08 Martin Rudalics <rudalics@gmx.at>
18949
496e208e
MR
18950 * window.h (window): Add some new members to window structure -
18951 normal_lines, normal_cols, new_total, new_normal, clone_number,
18952 splits, nest, prev_buffers, next_buffers.
18953 (WINDOW_TOTAL_SIZE): Move here from window.c.
b9e809c2 18954 (MIN_SAFE_WINDOW_WIDTH, MIN_SAFE_WINDOW_HEIGHT): Define here.
496e208e 18955
f3d1777e
MR
18956 * window.c (Fwindow_height, Fwindow_width, Fwindow_full_width_p):
18957 Remove.
496e208e
MR
18958 (make_dummy_parent): Set new members of windows structure.
18959 (make_window): Move down in code. Handle new members of window
18960 structure.
18961 (Fwindow_clone_number, Fwindow_splits, Fset_window_splits)
18962 (Fwindow_nest, Fset_window_nest, Fwindow_new_total)
18963 (Fwindow_normal_size, Fwindow_new_normal, Fwindow_prev_buffers)
18964 (Fset_window_prev_buffers, Fwindow_next_buffers)
640c8776
SM
18965 (Fset_window_next_buffers, Fset_window_clone_number):
18966 New functions.
496e208e
MR
18967 (Fwindow_hscroll, Fwindow_at, Fwindow_point, Fwindow_start)
18968 (Fwindow_end, Fwindow_line_height, Fset_window_dedicated_p):
18969 Doc-string fixes.
18970 (Fwindow_parameters, Fwindow_parameter, Fset_window_parameter):
18971 Argument WINDOW can be now internal window too.
18972 (Fwindow_use_time): Move up in code.
18973 (Fget_buffer_window): Rename argument FRAME to ALL-FRAMES.
18974 Rewrite doc-string.
18975 (Fset_window_configuration, saved_window)
18976 (Fcurrent_window_configuration, save_window_save): Handle new
18977 members of window structure.
b9e809c2
MR
18978 (WINDOW_TOTAL_SIZE, MIN_SAFE_WINDOW_WIDTH)
18979 (MIN_SAFE_WINDOW_HEIGHT): Move to window.h.
18980 (syms_of_window): New Lisp objects Qrecord_window_buffer,
18981 Qwindow_deletable_p, Qdelete_window, Qreplace_buffer_in_windows,
18982 Qget_mru_window, Qresize_root_window,
18983 Qresize_root_window_vertically, Qsafe, Qabove, Qbelow,
18984 Qauto_buffer_name; staticpro them.
f3d1777e 18985
abde8f8c
MR
189862011-06-07 Martin Rudalics <rudalics@gmx.at>
18987
18988 * window.c (Fwindow_total_size, Fwindow_left_column)
18989 (Fwindow_top_line, window_body_lines, Fwindow_body_size)
18990 (Fwindow_list_1): New functions.
18991 (window_box_text_cols): Replace with window_body_cols.
640c8776
SM
18992 (Fwindow_width, Fscroll_left, Fscroll_right):
18993 Use window_body_cols instead of window_box_text_cols.
18994 (delete_window, Fset_window_configuration):
18995 Call delete_all_subwindows with window as argument.
fa8a67e6
MR
18996 (delete_all_subwindows): Take a window as argument and not a
18997 structure. Rewrite.
190b47e6
MR
18998 (window_loop): Remove handling of GET_LRU_WINDOW and
18999 GET_LARGEST_WINDOW.
19000 (Fget_lru_window, Fget_largest_window): Move to window.el.
abde8f8c
MR
19001
19002 * window.h: Extern window_body_cols instead of
fa8a67e6
MR
19003 window_box_text_cols. delete_all_subwindows now takes a
19004 Lisp_Object as argument.
abde8f8c 19005
640c8776
SM
19006 * indent.c (compute_motion, Fcompute_motion):
19007 Use window_body_cols instead of window_box_text_cols.
abde8f8c 19008
fa8a67e6
MR
19009 * frame.c (delete_frame): Call delete_all_subwindows with root
19010 window as argument.
19011
a54e3482
DC
190122011-06-07 Daniel Colascione <dan.colascione@gmail.com>
19013
19014 * fns.c (Fputhash): Document return value.
19015
60002bf5
CY
190162011-06-06 Chong Yidong <cyd@stupidchicken.com>
19017
19018 * image.c (gif_load): Implement gif89a spec "no disposal" method.
19019
0c671da6 190202011-06-06 Paul Eggert <eggert@cs.ucla.edu>
ccd9a01a 19021
b862a52a 19022 Cons<->int and similar integer overflow fixes (Bug#8794).
77984278 19023
be44ca6c
PE
19024 Check for overflow when converting integer to cons and back.
19025 * charset.c (Fdefine_charset_internal, Fdecode_char):
19026 Use cons_to_unsigned to catch overflow.
19027 (Fencode_char): Use INTEGER_TO_CONS.
19028 * composite.h (LGLYPH_CODE): Use cons_to_unsigned.
19029 (LGLYPH_SET_CODE): Use INTEGER_TO_CONS.
19030 * data.c (long_to_cons, cons_to_long): Remove.
19031 (cons_to_unsigned, cons_to_signed): New functions.
19032 These signal an error for invalid or out-of-range values.
19033 * dired.c (Ffile_attributes): Use INTEGER_TO_CONS.
19034 * fileio.c (Fset_visited_file_modtime): Use CONS_TO_INTEGER.
19035 * font.c (Ffont_variation_glyphs):
19036 * fontset.c (Finternal_char_font): Use INTEGER_TO_CONS.
19037 * lisp.h: Include <intprops.h>.
19038 (INTEGER_TO_CONS, CONS_TO_INTEGER): New macros.
19039 (cons_to_signed, cons_to_unsigned): New decls.
19040 (long_to_cons, cons_to_long): Remove decls.
19041 * undo.c (record_first_change): Use INTEGER_TO_CONS.
19042 (Fprimitive_undo): Use CONS_TO_INTEGER.
19043 * xfns.c (Fx_window_property): Likewise.
19044 * xselect.c: Include <limits.h>.
19045 (x_own_selection, selection_data_to_lisp_data):
19046 Use INTEGER_TO_CONS.
19047 (x_handle_selection_request, x_handle_selection_clear)
19048 (x_get_foreign_selection, Fx_disown_selection_internal)
19049 (Fx_get_atom_name, x_send_client_event): Use CONS_TO_INTEGER.
19050 (lisp_data_to_selection_data): Use cons_to_unsigned.
19051 (x_fill_property_data): Use cons_to_signed.
19052 Report values out of range.
19053
d1f3d2af
PE
19054 Check for buffer and string overflow more precisely.
19055 * buffer.h (BUF_BYTES_MAX): New macro.
19056 * lisp.h (STRING_BYTES_MAX): New macro.
19057 * alloc.c (Fmake_string):
19058 * character.c (string_escape_byte8):
19059 * coding.c (coding_alloc_by_realloc):
19060 * doprnt.c (doprnt):
19061 * editfns.c (Fformat):
19062 * eval.c (verror):
19063 Use STRING_BYTES_MAX, not MOST_POSITIVE_FIXNUM,
19064 since they may not be the same number.
19065 * editfns.c (Finsert_char):
19066 * fileio.c (Finsert_file_contents):
19067 Likewise for BUF_BYTES_MAX.
19068
dd52fcea
PE
19069 * image.c: Use ptrdiff_t, not int, for sizes.
19070 (slurp_file): Switch from int to ptrdiff_t.
19071 All uses changed.
19072 (slurp_file): Check that file size fits in both size_t (for
19073 malloc) and ptrdiff_t (for sanity and safety).
19074
7f9bbdbb
PE
19075 * fileio.c (Fverify_visited_file_modtime): Avoid time overflow
19076 if b->modtime has its maximal value.
19077
dfe18f82
PE
19078 * dired.c (Ffile_attributes): Don't assume EMACS_INT has >32 bits.
19079
84acfcf0
PE
19080 Don't assume time_t can fit into int.
19081 * buffer.h (struct buffer.modtime): Now time_t, not int.
19082 * fileio.c (Fvisited_file_modtime): No need for time_t cast now.
19083 * undo.c (Fprimitive_undo): Use time_t, not int, for time_t value.
19084
ccd9a01a
PE
19085 Minor fixes for signed vs unsigned integers.
19086 * character.h (MAYBE_UNIFY_CHAR):
19087 * charset.c (maybe_unify_char):
19088 * keyboard.c (read_char, reorder_modifiers):
19089 XINT -> XFASTINT, since the integer must be nonnegative.
19090 * ftfont.c (ftfont_spec_pattern):
19091 * keymap.c (access_keymap, silly_event_symbol_error):
19092 XUINT -> XFASTINT, since the integer must be nonnegative.
19093 (Fsingle_key_description, preferred_sequence_p): XUINT -> XINT,
19094 since it makes no difference and we prefer signed.
19095 * keyboard.c (record_char): Use XUINT when all the neighbors do.
19096 (access_keymap): NATNUMP -> INTEGERP, since the integer must be
19097 nonnegative.
19098
d6d100dd
SM
190992011-06-06 Stefan Monnier <monnier@iro.umontreal.ca>
19100
19101 * window.h (Fwindow_frame): Declare.
19102
2b6148e4
PE
191032011-06-06 Paul Eggert <eggert@cs.ucla.edu>
19104
19105 * alloc.c: Simplify handling of large-request failures (Bug#8800).
19106 (SPARE_MEMORY): Always define.
19107 (LARGE_REQUEST): Remove.
19108 (memory_full): Use SPARE_MEMORY rather than LARGE_REQUEST.
19109
f230ecc9
MR
191102011-06-06 Martin Rudalics <rudalics@gmx.at>
19111
727e958e
MR
19112 * lisp.h: Move EXFUNS for Fframe_root_window,
19113 Fframe_first_window and Fset_frame_selected_window to window.h.
19114
19115 * window.h: Move EXFUNS for Fframe_root_window,
19116 Fframe_first_window and Fset_frame_selected_window here from
19117 lisp.h.
19118
19119 * frame.c (Fwindow_frame, Fframe_first_window)
19120 (Fframe_root_window, Fframe_selected_window)
19121 (Fset_frame_selected_window): Move to window.c.
19122 (Factive_minibuffer_window): Move to minibuf.c.
19123 (Fother_visible_frames_p): New function.
19124
19125 * minibuf.c (Factive_minibuffer_window): Move here from frame.c.
19126
f230ecc9
MR
19127 * window.c (decode_window, decode_any_window): Move up in code.
19128 (Fwindowp, Fwindow_live_p): Rewrite doc-strings.
19129 (inhibit_frame_unsplittable): Remove unused variable.
bf60a96b
MR
19130 (Fwindow_buffer): Move up and rewrite doc-string.
19131 (Fwindow_parent, Fwindow_vchild, Fwindow_hchild, Fwindow_next)
19132 (Fwindow_prev): New functions.
727e958e
MR
19133 (Fwindow_frame): Move here from frame.c. Accept any window as
19134 argument.
19135 (Fframe_root_window, Fframe_first_window)
19136 (Fframe_selected_window): Move here from frame.c. Accept frame
19137 or arbitrary window as argument. Update doc-strings.
19138 (Fminibuffer_window): Move up in code.
19139 (Fwindow_minibuffer_p): Move up in code and simplify.
d6d100dd
SM
19140 (Fset_frame_selected_window): Move here from frame.c.
19141 Marginal rewrite.
727e958e
MR
19142 (Fselected_window, select_window, Fselect_window): Move up in
19143 code. Minor doc-string fixes.
f230ecc9 19144
4d09bcf6
PE
191452011-06-06 Paul Eggert <eggert@cs.ucla.edu>
19146
19147 * alloc.c (memory_full) [SYSTEM_MALLOC]: Port to MacOS (Bug#8800).
19148 Do not assume that spare memory exists; that assumption is valid
19149 only if SYSTEM_MALLOC.
19150 (LARGE_REQUEST): New macro, so that the issue of large requests
19151 is separated from the issue of spare memory.
19152
810928a2
AS
191532011-06-05 Andreas Schwab <schwab@linux-m68k.org>
19154
172418ad
AS
19155 * editfns.c (Fformat): Correctly handle zero flag with hexadecimal
19156 format. (Bug#8806)
19157
43f862f7
AS
19158 * gtkutil.c (xg_get_default_scrollbar_width): Avoid warning.
19159
810928a2
AS
19160 * xfns.c (x_set_scroll_bar_default_width): Move declarations
19161 before statements.
19162
a059fe24
JD
191632011-06-05 Jan Djärv <jan.h.d@swipnet.se>
19164
19165 * gtkutil.c (xg_get_default_scrollbar_width): New function.
19166
19167 * gtkutil.h: Declare xg_get_default_scrollbar_width.
19168
19169 * xfns.c (x_set_scroll_bar_default_width): If USE_GTK, get
19170 min width by calling x_set_scroll_bar_default_width (Bug#8505).
19171
989bf368
JB
191722011-06-05 Juanma Barranquero <lekktu@gmail.com>
19173
19174 * xdisp.c (single_display_spec_intangible_p): Remove declaration.
19175
4b80f674
CY
191762011-06-04 Chong Yidong <cyd@stupidchicken.com>
19177
19178 * xselect.c (x_clipboard_manager_save): Remove redundant arg.
19179 (x_clipboard_manager_save): Add return value.
d6d100dd
SM
19180 (x_clipboard_manager_error_1, x_clipboard_manager_error_2):
19181 New error handlers.
4b80f674
CY
19182 (x_clipboard_manager_save_frame, x_clipboard_manager_save_all):
19183 Obey Vx_select_enable_clipboard_manager. Catch errors in
19184 x_clipboard_manager_save (Bug#8779).
19185 (Vx_select_enable_clipboard_manager): New variable.
de65b42c 19186 (x_get_foreign_selection): Reduce scope of x_catch_errors (Bug#8790).
4b80f674 19187
99a33b77 191882011-06-04 Dan Nicolaescu <dann@ics.uci.edu>
8b3115e7
DN
19189
19190 * emacs.c (main): Warn when starting a GTK emacs in daemon mode.
19191
99a33b77 191922011-06-04 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
14eca62f
YM
19193
19194 * fringe.c (update_window_fringes): Don't update overlay arrow bitmap
19195 in the current matrix if keep_current_p is non-zero.
19196
8264569d
EZ
191972011-06-04 Eli Zaretskii <eliz@gnu.org>
19198
19199 * bidi.c (bidi_level_of_next_char): Fix last change.
19200
57f97249
EZ
192012011-06-03 Eli Zaretskii <eliz@gnu.org>
19202
fec2107c 19203 Support bidi reordering of text covered by display properties.
57f97249 19204
fec2107c
EZ
19205 * bidi.c (bidi_copy_it): Use offsetof instead of emulating it.
19206 (bidi_fetch_char, bidi_fetch_char_advance): New functions.
19207 (bidi_cache_search, bidi_cache_iterator_state)
19208 (bidi_paragraph_init, bidi_resolve_explicit, bidi_resolve_weak)
d6d100dd
SM
19209 (bidi_level_of_next_char, bidi_move_to_visually_next):
19210 Support character positions inside a run of characters covered by a
fec2107c
EZ
19211 display string.
19212 (bidi_paragraph_init, bidi_resolve_explicit_1)
19213 (bidi_level_of_next_char): Call bidi_fetch_char and
19214 bidi_fetch_char_advance instead of FETCH_CHAR and
19215 FETCH_CHAR_ADVANCE.
19216 (bidi_init_it): Initialize new members.
19217 (LRE_CHAR, RLE_CHAR, PDF_CHAR, LRO_CHAR, RLO_CHAR): Remove macro
19218 definitions.
19219 (bidi_explicit_dir_char): Lookup character type in bidi_type_table,
19220 instead of using explicit *_CHAR codes.
d6d100dd
SM
19221 (bidi_resolve_explicit, bidi_resolve_weak):
19222 Use FETCH_MULTIBYTE_CHAR instead of FETCH_CHAR, as reordering of
fec2107c
EZ
19223 bidirectional text is supported only in multibyte buffers.
19224 (bidi_init_it): Accept additional argument FRAME_WINDOW_P and use
19225 it to initialize the frame_window_p member of struct bidi_it.
19226 (bidi_cache_iterator_state, bidi_resolve_explicit_1)
19227 (bidi_resolve_explicit, bidi_resolve_weak)
19228 (bidi_level_of_next_char, bidi_move_to_visually_next): Abort if
19229 bidi_it->nchars is non-positive.
19230 (bidi_level_of_next_char): Don't try to lookup the cache for the
19231 next/previous character if nothing is cached there yet, or if we
19232 were just reseat()'ed to a new position.
c40e2fb2 19233
0e14fe90
EZ
19234 * xdisp.c (set_cursor_from_row): Set start and stop points
19235 according to the row's direction when priming the loop that looks
19236 for the glyph on which to display cursor.
19237 (single_display_spec_intangible_p): Function deleted.
19238 (display_prop_intangible_p): Reimplement to call
19239 handle_display_spec instead of single_display_spec_intangible_p.
d6d100dd
SM
19240 Accept 3 additional arguments needed by handle_display_spec.
19241 This fixes incorrect cursor motion across display property with complex
0e14fe90
EZ
19242 values: lists, `(when COND...)' forms, etc.
19243 (single_display_spec_string_p): Support property values that are
19244 lists with the argument STRING its top-level element.
19245 (display_prop_string_p): Fix the condition for processing a
19246 property that is a list to be consistent with handle_display_spec.
fec2107c 19247 (handle_display_spec): New function, refactored from the
fc6f18ce
EZ
19248 last portion of handle_display_prop.
19249 (compute_display_string_pos): Accept additional argument
19250 FRAME_WINDOW_P. Call handle_display_spec to determine whether the
19251 value of a `display' property is a "replacing spec".
19252 (handle_single_display_spec): Accept 2 additional arguments BUFPOS
19253 and FRAME_WINDOW_P. If IT is NULL, don't set up the iterator from
19254 the display property, but just return a value indicating whether
19255 the display property will replace the characters it covers.
19256 (Fcurrent_bidi_paragraph_direction): Initialize the nchars and
19257 frame_window_p members of struct bidi_it.
d6d100dd
SM
19258 (compute_display_string_pos, compute_display_string_end):
19259 New functions.
fec2107c
EZ
19260 (push_it): Accept second argument POSITION, where pop_it should
19261 jump to continue iteration.
19262 (reseat_1): Initialize bidi_it.disp_pos.
fc6f18ce 19263
fec2107c
EZ
19264 * keyboard.c (adjust_point_for_property): Adjust the call to
19265 display_prop_intangible_p to its new signature.
fc6f18ce
EZ
19266
19267 * dispextern.h (struct bidi_it): New member frame_window_p.
fec2107c
EZ
19268 (bidi_init_it): Update prototypes.
19269 (display_prop_intangible_p): Update prototype.
d6d100dd
SM
19270 (compute_display_string_pos, compute_display_string_end):
19271 Declare prototypes.
fec2107c
EZ
19272 (struct bidi_it): New members nchars and disp_pos. ch_len is now
19273 EMACS_INT.
fc6f18ce 19274
40087514 192752011-06-02 Paul Eggert <eggert@cs.ucla.edu>
0de4bb68 19276
57f53182
PE
19277 Malloc failure behavior now depends on size of allocation.
19278 * alloc.c (buffer_memory_full, memory_full): New arg NBYTES.
19279 * lisp.h: Change signatures accordingly.
19280 * alloc.c, buffer.c, editfns.c, menu.c, minibuf.c, xterm.c:
19281 All callers changed. (Bug#8762)
19282
19283 * gnutls.c: Use Emacs's memory allocators.
19284 Without this change, the gnutls library would invoke malloc etc.
19285 directly, which causes problems on non-SYNC_INPUT hosts, and which
19286 runs afoul of improving memory_full behavior. (Bug#8761)
19287 (fn_gnutls_global_set_mem_functions): New macro or function pointer.
19288 (emacs_gnutls_global_init): Use it to specify xmalloc, xrealloc,
19289 xfree instead of the default malloc, realloc, free.
19290 (Fgnutls_boot): No need to check for memory allocation failure,
19291 since xmalloc does that for us.
19292
ac32cd99 19293 Remove arbitrary limit of 2**31 entries in hash tables. (Bug#8771)
3870d916
PE
19294 * category.c (hash_get_category_set):
19295 * ccl.c (ccl_driver):
19296 * charset.c (Fdefine_charset_internal):
19297 * charset.h (struct charset.hash_index):
19298 * composite.c (get_composition_id, gstring_lookup_cache)
19299 (composition_gstring_put_cache):
19300 * composite.h (struct composition.hash_index):
19301 * dispextern.h (struct image.hash):
19302 * fns.c (next_almost_prime, larger_vector, cmpfn_eql)
19303 (cmpfn_equal, cmpfn_user_defined, hashfn_eq, hashfn_eql)
19304 (hashfn_equal, hashfn_user_defined, make_hash_table)
19305 (maybe_resize_hash_table, hash_lookup, hash_put)
19306 (hash_remove_from_table, hash_clear, sweep_weak_table, SXHASH_COMBINE)
19307 (sxhash_string, sxhash_list, sxhash_vector, sxhash_bool_vector)
19308 (Fsxhash, Fgethash, Fputhash, Fmaphash):
19309 * image.c (make_image, search_image_cache, lookup_image)
19310 (xpm_put_color_table_h):
19311 * lisp.h (struct Lisp_Hash_Table):
0de4bb68 19312 * minibuf.c (Ftry_completion, Fall_completions, Ftest_completion):
ac389d0c 19313 * print.c (print): Use 'EMACS_UINT' and 'EMACS_INT'
3870d916 19314 for hashes and hash indexes, instead of 'unsigned' and 'int'.
40087514
PE
19315 * alloc.c (allocate_vectorlike):
19316 Check for overflow in vector size calculations.
19317 * ccl.c (ccl_driver):
19318 Check for overflow when converting EMACS_INT to int.
0de4bb68
PE
19319 * fns.c, image.c: Remove unnecessary static decls that would otherwise
19320 need to be updated by these changes.
40087514
PE
19321 * fns.c (make_hash_table, maybe_resize_hash_table):
19322 Check for integer overflow with large hash tables.
0de4bb68
PE
19323 (make_hash_table, maybe_resize_hash_table, Fmake_hash_table):
19324 Prefer the faster XFLOAT_DATA to XFLOATINT where either will do.
19325 (SXHASH_REDUCE): New macro.
19326 (sxhash_string, sxhash_list, sxhash_vector, sxhash_bool_vector):
19327 Use it instead of discarding useful hash info with large hash values.
19328 (sxhash_float): New function.
19329 (sxhash): Use it. No more need for "& INTMASK" due to above changes.
19330 * lisp.h (FIXNUM_BITS): New macro, useful for SXHASH_REDUCE etc.
40087514
PE
19331 (MOST_NEGATIVE_FIXNUM, MOST_POSITIVE_FIXNUM, INTMASK):
19332 Rewrite to use FIXNUM_BITS, as this simplifies things.
0de4bb68
PE
19333 (next_almost_prime, larger_vector, sxhash, hash_lookup, hash_put):
19334 Adjust signatures to match updated version of code.
19335 (consing_since_gc): Now EMACS_INT, since a single hash table can
19336 use more than INT_MAX bytes.
19337
698d32e2
DN
193382011-06-01 Dan Nicolaescu <dann@ics.uci.edu>
19339
19340 Make it possible to build with GCC-4.6+ -O2 -flto.
19341
19342 * emacs.c (__malloc_initialize_hook): Mark as EXTERNALLY_VISIBLE.
19343
fd6fa53f
SM
193442011-06-01 Stefan Monnier <monnier@iro.umontreal.ca>
19345
19346 * minibuf.c (get_minibuffer, read_minibuf_unwind):
19347 Call minibuffer-inactive-mode.
19348
864db017
JB
193492011-05-31 Juanma Barranquero <lekktu@gmail.com>
19350
19351 * makefile.w32-in ($(BLD)/data.$(O), $(BLD)/editfns.$(O)):
19352 Update dependencies.
19353
2ad0baf4
DN
193542011-05-31 Dan Nicolaescu <dann@ics.uci.edu>
19355
19356 * data.c (init_data): Remove code for UTS, this system is not
19357 supported anymore.
19358
4fcc2638
DN
193592011-05-31 Dan Nicolaescu <dann@ics.uci.edu>
19360
19361 Don't force ./temacs to start in terminal mode.
19362
19363 * frame.c (make_initial_frame): Initialize faces in all cases, not
19364 only when CANNOT_DUMP is defined.
19365 * dispnew.c (init_display): Remove CANNOT_DUMP condition.
19366
c56e0fd5
DN
193672011-05-31 Dan Nicolaescu <dann@ics.uci.edu>
19368
19369 * dispnew.c (add_window_display_history): Use const for the string
19370 pointer. Remove declaration, not needed.
19371
333d54da 193722011-05-31 Paul Eggert <eggert@cs.ucla.edu>
9cf9f756 19373
55d4c1b2 19374 Use 'inline', not 'INLINE'.
333d54da 19375 <http://lists.gnu.org/archive/html/emacs-devel/2011-05/msg00914.html>
55d4c1b2
PE
19376 * alloc.c, fontset.c (INLINE): Remove.
19377 * alloc.c, bidi.c, charset.c, coding.c, dispnew.c, fns.c, image.c:
19378 * intervals.c, keyboard.c, process.c, syntax.c, textprop.c, w32term.c:
19379 * xdisp.c, xfaces.c, xterm.c: Replace all uses of INLINE with inline.
19380 * gmalloc.c (register_heapinfo): Use inline unconditionally.
19381 * lisp.h (LISP_MAKE_RVALUE): Use inline, not __inline__.
19382
738db178
DN
193832011-05-31 Dan Nicolaescu <dann@ics.uci.edu>
19384
19385 Make it possible to run ./temacs.
19386
19387 * callproc.c (set_initial_environment): Remove CANNOT_DUMP code,
19388 syms_of_callproc does the same thing. Remove test for
19389 "initialized", do it in the caller.
19390 * emacs.c (main): Avoid calling set_initial_environment when dumping.
19391
620c53a6
SM
193922011-05-31 Stefan Monnier <monnier@iro.umontreal.ca>
19393
19394 * minibuf.c (Finternal_complete_buffer): Return `category' metadata.
19395 (read_minibuf): Use get_minibuffer.
19396 (syms_of_minibuf): Use DEFSYM.
19397 (Qmetadata): New var.
19398 * data.c (Qbuffer): Don't make it static.
19399 (syms_of_data): Use DEFSYM.
19400
e003a292
PE
194012011-05-31 Paul Eggert <eggert@cs.ucla.edu>
19402
19403 * ccl.c (CCL_CODE_RANGE): Allow negative numbers. (Bug#8751)
19404 (CCL_CODE_MIN): New macro.
19405
ed008a6d
PE
194062011-05-30 Paul Eggert <eggert@cs.ucla.edu>
19407
3687c2ef
PE
19408 * alloc.c (lisp_align_malloc): Omit unnecessary val==NULL tests.
19409
ed008a6d
PE
19410 * eval.c (Qdebug): Now static.
19411 * lisp.h (Qdebug): Remove decl. This reverts a part of the
19412 2011-04-26T11:26:05Z!dan.colascione@gmail.com that inadvertently undid part of
19413 2011-04-14T06:48:41Z!eggert@cs.ucla.edu.
19414
d66c4c7c
CY
194152011-05-29 Chong Yidong <cyd@stupidchicken.com>
19416
19417 * image.c: Various fixes to ImageMagick code comments.
19418 (Fimagemagick_types): Doc fix.
19419
5fbc2025
PE
194202011-05-29 Paul Eggert <eggert@cs.ucla.edu>
19421
0196f88a
PE
19422 Minor fixes prompted by GCC 4.6.0 warnings.
19423
19424 * xselect.c (converted_selections, conversion_fail_tag): Now static.
19425
5fbc2025
PE
19426 * emacs.c [HAVE_X_WINDOWS]: Include "xterm.h".
19427 (x_clipboard_manager_save_all): Move extern decl to ...
19428 * xterm.h: ... here, so that it can be checked for consistency.
19429
1dd3c2d9
CY
194302011-05-29 Chong Yidong <cyd@stupidchicken.com>
19431
19432 * xselect.c (x_clipboard_manager_save_frame)
19433 (x_clipboard_manager_save_all): New functions.
19434 (Fx_clipboard_manager_save): Lisp function deleted.
19435
19436 * emacs.c (Fkill_emacs): Call x_clipboard_manager_save_all.
19437 * frame.c (delete_frame): Call x_clipboard_manager_save_frame.
19438
19439 * xterm.h: Update prototype.
19440
5ba6571d
WX
194412011-05-28 William Xu <william.xwl@gmail.com>
19442
19443 * nsterm.m (ns_term_shutdown): Synchronize user defaults before
19444 exiting (Bug#8239).
19445
3eaff834
JM
194462011-05-28 Jim Meyering <meyering@redhat.com>
19447
e1900994 19448 Avoid a sign-extension bug in crypto_hash_function.
3eaff834
JM
19449 * fns.c (to_uchar): Define.
19450 (crypto_hash_function): Use it to convert some newly-signed
19451 variables to unsigned, to avoid sign-extension bugs. For example,
19452 without this change, (md5 "truc") would evaluate to
19453 45723a2aff78ff4fff7fff1114760e62 rather than the expected
19454 45723a2af3788c4ff17f8d1114760e62. Reported by Antoine Levitt in
e1900994 19455 https://lists.gnu.org/archive/html/emacs-devel/2011-05/msg00883.html.
3eaff834 19456
0f6990a7
PE
194572011-05-27 Paul Eggert <eggert@cs.ucla.edu>
19458
19459 Integer overflow fixes.
c8a9ca5a 19460
08686060
PE
19461 * dbusbind.c: Serial number integer overflow fixes.
19462 (CHECK_DBUS_SERIAL_GET_SERIAL): New macro.
08686060
PE
19463 (Fdbus_call_method_asynchronously, xd_read_message_1): Use a float
19464 to hold a serial number that is too large for a fixnum.
19465 (Fdbus_method_return_internal, Fdbus_method_error_internal):
19466 Check for serial numbers out of range. Decode any serial number
59568bf0 19467 that was so large that it became a float. (Bug#8722)
08686060 19468
2d1fc3c7
PE
19469 * dbusbind.c: Use XFASTINT rather than XUINT, and check for nonneg.
19470 (Fdbus_call_method, Fdbus_call_method_asynchronously):
19471 Use XFASTINT rather than XUINT when numbers are nonnegative.
19472 (xd_append_arg, Fdbus_method_return_internal):
19473 (Fdbus_method_error_internal): Likewise. Also, for unsigned
19474 arguments, check that Lisp number is nonnegative, rather than
59568bf0 19475 silently wrapping negative numbers around. (Bug#8722)
30217ff0 19476 (xd_read_message_1): Don't assume dbus_uint32_t can fit in int.
59568bf0 19477 (Bug#8722)
2d1fc3c7 19478
c8a9ca5a
PE
19479 * data.c (arith_driver, Flsh): Avoid unnecessary casts to EMACS_UINT.
19480
519e1d69
PE
19481 * ccl.c (ccl_driver): Redo slightly to avoid the need for 'unsigned'.
19482
6df6ae42 19483 ccl: Add integer overflow checks.
30569699
PE
19484 * ccl.c (CCL_CODE_MAX, GET_CCL_RANGE, GET_CCL_CODE, GET_CCL_INT):
19485 (IN_INT_RANGE): New macros.
19486 (ccl_driver): Use them to check for integer overflow when
19487 decoding a CCL program. Many of the new checks are whether XINT (x)
19488 fits in int; it doesn't always, on 64-bit hosts. The new version
19489 doesn't catch all possible integer overflows, but it's an
847044ea 19490 improvement. (Bug#8719)
30569699 19491
c11285dc
PE
19492 * alloc.c (make_event_array): Use XINT, not XUINT.
19493 There's no need for unsigned here.
19494
fdccd48e
PE
19495 * mem-limits.h (EXCEEDS_LISP_PTR) [!USE_LSB_TAG]: EMACS_UINT -> uintptr_t
19496 This follows up to the 2011-05-06 change that substituted uintptr_t
19497 for EMACS_INT. This case wasn't caught back then.
19498
37910ab2
PE
19499 Rework Fformat to avoid integer overflow issues.
19500 * editfns.c: Include <float.h> unconditionally, as it's everywhere
19501 now (part of C89). Include <verify.h>.
19502 (MAX_10_EXP, CONVERTED_BYTE_SIZE): Remove; no longer needed.
19503 (pWIDE, pWIDElen, signed_wide, unsigned_wide): New defns.
19504 (Fformat): Avoid the prepass trying to compute sizes; it was only
19505 approximate and thus did not catch overflow reliably. Instead, walk
19506 through the format just once, formatting and computing sizes as we go,
19507 checking for integer overflow at every step, and allocating a larger
19508 buffer as needed. Keep track separately whether the format is
19509 multibyte. Keep only the most-recently calculated precision, rather
19510 than them all. Record whether each argument has been converted to
19511 string. Use EMACS_INT, not int, for byte and char and arg counts.
19512 Support field widths and precisions larger than INT_MAX. Avoid
19513 sprintf's undefined behavior with conversion specifications such as %#d
19514 and %.0c. Fix bug with strchr succeeding on '\0' when looking for
19515 flags. Fix bug with (format "%c" 256.0). Avoid integer overflow when
19516 formatting out-of-range floating point numbers with int
9173deec 19517 formats. (Bug#8668)
37910ab2 19518
2e6578fb
PE
19519 * lisp.h (FIXNUM_OVERFLOW_P): Work even if arg is a NaN.
19520
0ae6bdee
PE
19521 * data.c: Avoid integer truncation in expressions involving floats.
19522 * data.c: Include <intprops.h>.
19523 (arith_driver): When there's an integer overflow in an expression
19524 involving floating point, convert the integers to floating point
19525 so that the resulting value does not suffer from catastrophic
19526 integer truncation. For example, on a 64-bit host (* 4
19527 most-negative-fixnum 0.5) should yield about -4.6e+18, not zero.
19528 Do not rely on undefined behavior after integer overflow.
19529
de883a70
PE
19530 merge count_size_as_multibyte, parse_str_to_multibyte
19531 * character.c, character.h (count_size_as_multibyte):
fd6fa53f 19532 Rename from parse_str_to_multibyte; all uses changed.
de883a70
PE
19533 Check for integer overflow.
19534 * insdel.c, lisp.h (count_size_as_multibyte): Remove,
19535 since it's now a duplicate of the other. This is more of
19536 a character than a buffer op, so better that it's in character.c.
19537 * fns.c, print.c: Adjust to above changes.
19538
2ff916cb
PE
195392011-05-27 Stefan Monnier <monnier@iro.umontreal.ca>
19540
19541 * xselect.c (x_convert_selection): Yet another int/Lisp_Object mixup.
19542
f1b54466
PE
195432011-05-27 Paul Eggert <eggert@cs.ucla.edu>
19544
fb1ac845
PE
19545 * xselect.c: Fix minor problems prompted by GCC 4.6.0 warnings.
19546 (x_handle_selection_request, frame_for_x_selection): Remove unused vars.
19547 (x_clipboard_manager_save): Now static.
19548 (Fx_clipboard_manager_save): Rename local to avoid shadowing.
19549
f1b54466
PE
19550 * fns.c: Fix minor problems prompted by GCC 4.6.0 warnings.
19551 (crypto_hash_function): Now static.
19552 Fix pointer signedness problems. Avoid unnecessary initializations.
19553
a9f737ee
CY
195542011-05-27 Chong Yidong <cyd@stupidchicken.com>
19555
19556 * termhooks.h (Vselection_alist): Make it terminal-local.
19557
19558 * terminal.c (create_terminal): Initialize it.
19559
19560 * xselect.c: Support for clipboard managers.
19561 (Vselection_alist): Move to termhooks.h as terminal-local var.
19562 (LOCAL_SELECTION): New macro.
19563 (x_atom_to_symbol): Handle x_display_info_for_display fail case.
19564 (symbol_to_x_atom): Remove gratuitous arg.
19565 (x_handle_selection_request, lisp_data_to_selection_data)
19566 (x_get_foreign_selection, Fx_register_dnd_atom): Callers changed.
620c53a6
SM
19567 (x_own_selection, x_get_local_selection, x_convert_selection):
19568 New arg, specifying work frame. Use terminal-local Vselection_alist.
a9f737ee
CY
19569 (some_frame_on_display): Delete unused function.
19570 (Fx_own_selection_internal, Fx_get_selection_internal)
19571 (Fx_disown_selection_internal, Fx_selection_owner_p)
19572 (Fx_selection_exists_p): New optional frame arg.
19573 (frame_for_x_selection, Fx_clipboard_manager_save): New functions.
19574 (x_handle_selection_clear): Don't treat other terminals with the
19575 same keyboard specially. Use the terminal-local Vselection_alist.
19576 (x_clear_frame_selections): Use Frun_hook_with_args.
19577
19578 * xterm.c (x_term_init): Intern ATOM and CLIPBOARD_MANAGER atoms.
19579
19580 * xterm.h: Add support for those atoms.
19581
e067f0c1
CY
195822011-05-26 Chong Yidong <cyd@stupidchicken.com>
19583
19584 * xselect.c: ICCCM-compliant handling of MULTIPLE targets.
19585 (converted_selections, conversion_fail_tag): New global variables.
19586 (x_selection_request_lisp_error): Free the above.
19587 (x_get_local_selection): Remove unnecessary code.
19588 (x_reply_selection_request): Args changed; handle arbitrary array
620c53a6
SM
19589 of converted selections stored in converted_selections.
19590 Separate the XChangeProperty and SelectionNotify steps.
e067f0c1
CY
19591 (x_handle_selection_request): Rewrite to handle MULTIPLE target.
19592 (x_convert_selection): New function.
19593 (x_handle_selection_event): Simplify.
19594 (x_get_foreign_selection): Don't ignore incoming requests while
19595 waiting for an answer; this will fail when we implement
19596 SAVE_TARGETS, and seems unnecessary anyway.
19597 (selection_data_to_lisp_data): Recognize ATOM_PAIR type.
19598 (Vx_sent_selection_functions): Doc fix.
19599
0f4aebc0
LL
196002011-05-26 Leo Liu <sdl.web@gmail.com>
19601
19602 * editfns.c (Ftranspose_regions): Allow empty regions. (Bug#8699)
19603
e61124cd
YM
196042011-05-25 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
19605
19606 * dispextern.h (struct glyph_row): New member fringe_bitmap_periodic_p.
19607
19608 * dispnew.c (shift_glyph_matrix, scrolling_window): Mark scrolled row
19609 for fringe update if it has periodic bitmap.
ac389d0c 19610 (row_equal_p): Also compare left_fringe_offset, right_fringe_offset,
e61124cd
YM
19611 and fringe_bitmap_periodic_p.
19612
19613 * fringe.c (get_fringe_bitmap_data): New function.
19614 (draw_fringe_bitmap_1, update_window_fringes): Use it.
19615 (update_window_fringes): Record periodicity of fringe bitmap in glyph
19616 row. Mark glyph row for fringe update if periodicity changed.
19617
19618 * xdisp.c (try_window_reusing_current_matrix): Don't mark scrolled row
19619 for fringe update unless it has periodic bitmap.
19620
f16d9837
KH
196212011-05-25 Kenichi Handa <handa@m17n.org>
19622
19623 * xdisp.c (get_next_display_element): Set correct it->face_id for
19624 a static composition.
19625
e1b90ef6
LL
196262011-05-24 Leo Liu <sdl.web@gmail.com>
19627
19628 * deps.mk (fns.o):
19629 * makefile.w32-in ($(BLD)/fns.$(O)): Include sha1.h.
19630
19631 * fns.c (crypto_hash_function, Fsha1): New function.
19632 (Fmd5): Use crypto_hash_function.
19633 (syms_of_fns): Add Ssha1.
19634
7400048f
PE
196352011-05-22 Paul Eggert <eggert@cs.ucla.edu>
19636
19637 * gnutls.c: Remove unused macros.
19638 (fn_gnutls_transport_set_lowat, fn_gnutls_transport_set_pull_function):
19639 (fn_gnutls_transport_set_push_function) [!WINDOWSNT]:
19640 Remove macros that are defined and never used.
19641 Caught by gcc -Wunused-macros (GCC 4.6.0, Fedora 14).
19642
abb71cf4
CY
196432011-05-22 Chong Yidong <cyd@stupidchicken.com>
19644
19645 * xselect.c (syms_of_xselect): Remove unused symbol SAVE_TARGETS.
19646 (Fx_get_selection_internal): Minor cleanup.
19647 (Fx_own_selection_internal): Rename arguments for consistency with
19648 select.el.
19649
6307db39
PE
196502011-05-22 Paul Eggert <eggert@cs.ucla.edu>
19651
19652 * xselect.c (QSAVE_TARGETS): New static var, to fix build failure.
19653
f3d4e0a4
CY
196542011-05-22 Chong Yidong <cyd@stupidchicken.com>
19655
19656 * xselect.c (syms_of_xselect): Include character.h; use DEFSYM.
19657
4d8ade89
YM
196582011-05-21 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
19659
19660 * dispnew.c (scrolling_window): Don't exclude the case that the
19661 last enabled row in the desired matrix touches the bottom boundary.
19662
32078c8d
GM
196632011-05-21 Glenn Morris <rgm@gnu.org>
19664
19665 * Makefile.in ($(etc)/DOC): Make second command line even shorter.
33cf345f
GM
19666 (SOME_MACHINE_OBJECTS): Replace FONT_OBJ by its maximal expansion,
19667 and add some more files.
32078c8d 19668
7285dc67
EZ
196692011-05-20 Eli Zaretskii <eliz@gnu.org>
19670
19671 * callproc.c (Fcall_process) [MSDOS]: Fix arguments to
19672 report_file_error introduced by the change from 2011-05-07.
19673
89d1bd22
PE
196742011-05-20 Paul Eggert <eggert@cs.ucla.edu>
19675
19676 * systime.h (Time): Define only if emacs is defined.
19677 This is to allow ../lib-src/profile.c to be compiled on FreeBSD,
19678 where the include path doesn't have X11/X.h by default. See
19679 <http://lists.gnu.org/archive/html/emacs-devel/2011-05/msg00561.html>.
19680
cd394be1 196812011-05-20 Kenichi Handa <handa@m17n.org>
31bfc35c
KH
19682
19683 * composite.c (find_automatic_composition): Fix previous change.
19684
b9704ad9
GM
196852011-05-20 Glenn Morris <rgm@gnu.org>
19686
19687 * lisp.mk: New file, split from Makefile.in.
19688 * Makefile.in (lisp): Move to separate file, inserted by @lisp_frag@.
19689 (shortlisp): Remove.
19690 ($(etc)/DOC): Edit lisp.mk rather than using $shortlisp.
19691
4a720484
GM
196922011-05-19 Glenn Morris <rgm@gnu.org>
19693
19694 * Makefile.in (MSDOS_SUPPORT_REAL, MSDOS_SUPPORT, NS_SUPPORT)
19695 (REAL_MOUSE_SUPPORT, GPM_MOUSE_SUPPORT, MOUSE_SUPPORT, TOOLTIP_SUPPORT)
19696 (BASE_WINDOW_SUPPORT, X_WINDOW_SUPPORT, WINDOW_SUPPORT): Remove.
19697 (lisp): Set the order to that of loadup.el.
19698 (shortlisp): Make it a copy of $lisp.
19699 (SOME_MACHINE_LISP): Remove.
19700 ($(etc)/DOC): Depend just on $lisp, not $SOME_MACHINE_LISP too.
19701 Use just $shortlisp, not $SOME_MACHINE_LISP too.
19702
a28d4396
KH
197032011-05-18 Kenichi Handa <handa@m17n.org>
19704
19705 * composite.c (CHAR_COMPOSABLE_P): Add more check for efficiency.
19706 (BACKWARD_CHAR): Wrap the arg STOP by parenthesis.
19707 (find_automatic_composition): Mostly rewrite for efficiency.
19708
a2b1fa8e
JB
197092011-05-18 Juanma Barranquero <lekktu@gmail.com>
19710
19711 * makefile.w32-in: Update dependencies.
19712
8e1f5610
CS
197132011-05-18 Christoph Scholtes <cschol2112@googlemail.com>
19714
19715 * menu.c: Include limits.h (fixes the MS-Windows build broken by
7d7d0045 19716 2011-06-18T18:49:19Z!cyd@stupidchicken.com).
8e1f5610 19717
7025ee00 197182011-05-18 Paul Eggert <eggert@cs.ucla.edu>
cb93f9be 19719
cdfa6eab
PE
19720 Fix some integer overflow issues, such as string length overflow.
19721
06d6db33
PE
19722 * insdel.c (count_size_as_multibyte): Check for string overflow.
19723
2b4560a8
PE
19724 * character.c (lisp_string_width): Check for string overflow.
19725 Use EMACS_INT, not int, for string indexes and lengths; in
19726 particular, 2nd arg is now EMACS_INT, not int. Do not crash if
19727 the resulting string length overflows an EMACS_INT; instead,
19728 report a string overflow if no precision given. When checking for
19729 precision exhaustion, use a check that cannot possibly have
19730 integer overflow. (Bug#8675)
19731 * character.h (lisp_string_width): Adjust to new signature.
19732
cb93f9be
PE
19733 * alloc.c (string_overflow): New function.
19734 (Fmake_string): Use it. This doesn't change behavior, but saves
19735 a few bytes and will simplify future changes.
19736 * character.c (string_escape_byte8): Likewise.
19737 * lisp.h (string_overflow): New decl.
19738
1a1f3366
PE
19739 Fixups, following up to the user-interface timestamp change.
19740 * nsterm.m (last_mouse_movement_time, ns_mouse_position): Use Time
19741 for UI timestamps, instead of unsigned long.
9fbd6841
PE
19742 * msdos.c (mouse_get_pos): Likewise.
19743 * w32inevt.c (movement_time, w32_console_mouse_position): Likewise.
1a1f3366
PE
19744 * w32gui.h (Time): Define by including "systime.h" rather than by
19745 declaring it ourselves. (Bug#8664)
19746
d4e3e4d3
PE
19747 * dispextern.h (struct image): Don't assume time_t <= unsigned long.
19748 * image.c (clear_image_cache): Likewise.
19749
f6a24d19
PE
19750 * term.c (term_mouse_position): Don't assume time_t wraparound.
19751
08dc5ae6
PE
19752 Be more systematic about user-interface timestamps.
19753 Before, the code sometimes used 'Time', sometimes 'unsigned long',
620c53a6
SM
19754 and sometimes 'EMACS_UINT', to represent these timestamps.
19755 This change causes it to use 'Time' uniformly, as that's what X uses.
08dc5ae6
PE
19756 This makes the code easier to follow, and makes it easier to catch
19757 integer overflow bugs such as Bug#8664.
19758 * frame.c (Fmouse_position, Fmouse_pixel_position):
19759 Use Time, not unsigned long, for user-interface timestamps.
19760 * keyboard.c (last_event_timestamp, kbd_buffer_get_event): Likewise.
19761 (button_down_time, make_lispy_position, make_lispy_movement): Likewise.
19762 * keyboard.h (last_event_timestamp): Likewise.
19763 * menu.c (Fx_popup_menu) [!HAVE_X_WINDOWS]: Likewise.
19764 * menu.h (xmenu_show): Likewise.
19765 * term.c (term_mouse_position): Likewise.
19766 * termhooks.h (struct input_event.timestamp): Likewise.
19767 (struct terminal.mouse_position_hook): Likewise.
19768 * xmenu.c (create_and_show_popup_menu, xmenu_show): Likewise.
19769 * xterm.c (XTmouse_position, x_scroll_bar_report_motion): Likewise.
19770 * systime.h (Time): New decl. Pull it in from <X11/X.h> if
19771 HAVE_X_WINDOWS, otherwise define it as unsigned long, which is
19772 what it was before.
19773 * menu.h, termhooks.h: Include "systime.h", for Time.
19774
8e55734a
PE
19775 * keyboard.c (make_lispy_event): Fix problem in integer overflow.
19776 Don't assume that the difference between two unsigned long values
19777 can fit into an integer. At this point, we know button_down_time
19778 <= event->timestamp, so the difference must be nonnegative, so
19779 there's no need to cast the result if double-click-time is
19780 nonnegative, as it should be; check that it's nonnegative, just in
19781 case. This bug is triggered when events are more than 2**31 ms
86db42d2 19782 apart (about 25 days). (Bug#8664)
8e55734a 19783
841f1b75 19784 * xselect.c (last_event_timestamp): Remove duplicate decl.
6434756c 19785 (x_own_selection): Remove needless cast to unsigned long.
841f1b75 19786
3e26f69c
PE
19787 * xmenu.c (set_frame_menubar): Use int, not EMACS_UINT, for indexes
19788 that always fit in int. Use a sentinel instead of a counter, to
19789 avoid a temp and to allay GCC's concerns about possible int overflow.
d230cb74
PE
19790 * frame.h (struct frame): Use int for menu_bar_items_used
19791 instead of EMACS_INT, since it always fits in int.
3e26f69c 19792
5cc152c0
PE
19793 * menu.c (grow_menu_items): Check for int overflow.
19794
d89eb65e
PE
19795 * xmenu.c (set_frame_menubar): Don't mishandle vectors with no nils.
19796
5235bd3e
PE
19797 * xterm.c: Use EMACS_INT for Emacs modifiers, and int for X modifiers.
19798 Before, the code was not consistent. These values cannot exceed
19799 2**31 - 1 so there's no need to make them unsigned.
19800 (x_x_to_emacs_modifiers): Accept int and return EMACS_INT.
19801 (x_emacs_to_x_modifiers): Accept EMACS_INT and return int.
19802 (x_x_to_emacs_modifiers, x_emacs_to_x_modifiers): Reject non-integers
19803 as modifiers.
19804 * xterm.h (x_x_to_emacs_modifiers): Adjust to signature change.
19805
bc827e23
PE
19806 * lisp.h (XINT) [USE_LISP_UNION_TYPE]: Cast to EMACS_INT.
19807 (XUINT) [USE_LISP_UNION_TYPE]: Cast to EMACS_UINT.
19808 Otherwise, GCC 4.6.0 warns about printf (pI, XINT (...)),
19809 presumably because the widths might not match.
19810
78eb494e
PE
19811 * window.c (size_window): Avoid needless test at loop start.
19812
04f2d78b
CB
198132011-05-18 Courtney Bane <emacs-bugs-7626@cbane.org> (tiny change)
19814
19815 * term.c (Fresume_tty): Restore hooks before reinitializing (bug#8687).
19816
d2fc7e3d 198172011-05-12 Drew Adams <drew.adams@oracle.com>
e531bdff
DA
19818
19819 * textprop.c (Fprevious_single_char_property_change): Doc fix (bug#8655).
19820
d2fc7e3d 198212011-05-12 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
7db47798
YM
19822
19823 * w32term.c (w32_draw_fringe_bitmap): Rename local vars `left' and
19824 `width' to `bar_area_x' and `bar_area_width', respectively.
19825 (x_scroll_run): Take account of fringe background extension.
19826
04f2d78b
CB
19827 * xterm.c (x_draw_fringe_bitmap) [USE_TOOLKIT_SCROLL_BARS]:
19828 Rename local vars `left' and `width' to `bar_area_x' and
7db47798
YM
19829 `bar_area_width', respectively.
19830 (x_scroll_run) [USE_TOOLKIT_SCROLL_BARS]: Take account of fringe
19831 background extension.
19832
79b70037
GM
198332011-05-10 Jim Meyering <meyering@redhat.com>
19834
19835 * xdisp.c (x_intersect_rectangles): Fix typo "the the -> the".
19836
2f142cc5
JB
198372011-05-10 Juanma Barranquero <lekktu@gmail.com>
19838
19839 * image.c (Finit_image_library): Return t for built-in image types,
19840 like pbm and xbm. (Bug#8640)
19841
57679c86
AS
198422011-05-09 Andreas Schwab <schwab@linux-m68k.org>
19843
19844 * w32menu.c (set_frame_menubar): Fix submenu allocation.
19845
888c9e86
EZ
198462011-05-07 Eli Zaretskii <eliz@gnu.org>
19847
b0512a1d
EZ
19848 * w32console.c (Fset_screen_color): Doc fix.
19849 (Fget_screen_color): New function.
19850 (syms_of_ntterm): Defsubr it.
19851
7285dc67
EZ
19852 * callproc.c (call_process_cleanup) [MSDOS]: Don't close and
19853 unlink the temporary file if Fcall_process didn't create it in the
19854 first place.
19855 (Fcall_process) [MSDOS]: Don't create tempfile if stdout of the
19856 child process will be redirected to a file specified with `:file'.
888c9e86
EZ
19857 Don't try to re-open tempfile in that case, and set fd[0] to -1 as
19858 cue to call_process_cleanup not to close that handle.
19859
4d3fcc8e
BK
198602011-05-07 Ben Key <bkey76@gmail.com>
19861
19862 * makefile.w32-in: The bootstrap-temacs rule now makes use of
19863 one of two shell specific rules, either bootstrap-temacs-CMD or
19864 bootstrap-temacs-SH. The bootstrap-temacs-SH rule is identical
19865 to the previous implementation of the bootstrap-temacs rule.
19866 The bootstrap-temacs-CMD rule is similar to the previous
19867 implementation of the bootstrap-temacs rule except that it
19868 makes use of the ESC_CFLAGS variable instead of the CFLAGS
19869 variable.
19870
19871 These changes, along with some changes to nt/configure.bat,
19872 nt/gmake.defs, and nt/nmake.defs, are required to extend my
19873 earlier fix to add support for --cflags and --ldflags options
19874 that include quotes so that it works whether make uses cmd or
19875 sh as the shell.
19876
b4289b64
MA
198772011-05-06 Michael Albinus <michael.albinus@gmx.de>
19878
19879 * dbusbind.c (QCdbus_type_unix_fd): Declare static.
19880 (xd_remove_watch): Don't check QCdbus_type_unix_fd for SYMBOLP, it
19881 is a constant.
19882 (Fdbus_init_bus, xd_read_queued_messages): Bus can be a symbol or
19883 a string. Handle both cases.
19884 (Fdbus_call_method_asynchronously, Fdbus_register_signal)
19885 (Fdbus_register_method): Use Qinvalid_function.
19886
af4c0e28
JB
198872011-05-06 Juanma Barranquero <lekktu@gmail.com>
19888
19889 * makefile.w32-in: Update dependencies.
19890 (LISP_H): Add inttypes.h and stdin.h.
19891 (PROCESS_H): Add unistd.h.
19892
c51453d9
EZ
198932011-05-06 Eli Zaretskii <eliz@gnu.org>
19894
19895 * lread.c: Include limits.h (fixes the MS-Windows build broken by
19896 2011-05-06T07:13:19Z!eggert@cs.ucla.edu).
19897
8ff0ac3c 198982011-05-06 Paul Eggert <eggert@cs.ucla.edu>
c032b5f8 19899
4c4b566b
PE
19900 * image.c (Finit_image_library) [!HAVE_NTGUI]: Omit unused local.
19901
aab2b9b5
PE
19902 * term.c (vfatal): Remove stray call to va_end.
19903 It's not needed and the C Standard doesn't allow it here anyway.
19904
c378da0b
PE
19905 Use C99's va_copy to avoid undefined behavior on x86-64 GNU/Linux.
19906 * eval.c (verror): doprnt a copy of ap, not the original. (Bug#8545)
19907
288b08c7
PE
19908 * eval.c (verror): OK to create a string of up to MOST_POSITIVE_FIXNUM
19909 bytes.
19910
e3601888
PE
19911 * term.c: Don't include <stdarg.h>, as <lisp.h> does that.
19912
db6c0e74
PE
19913 * callproc.c (Fcall_process): Use 'volatile' to avoid vfork clobbering.
19914
dd5963ea
PE
19915 * process.c (Fformat_network_address): Fix typo: args2 -> *args2.
19916
88c9450f
PE
19917 * xmenu.c (set_frame_menubar): Fix typo: int * -> int (3 times).
19918
2f9442b8
PE
19919 * coding.c (detect_coding_charset): Fix typo: * 2 -> *4 (Bug#8601).
19920
c032b5f8
PE
19921 * charset.h (struct charset.code_space): Now has 15 elements, not 16.
19922 * charset.c (Fdefine_charset_internal): Don't initialize
19923 charset.code_space[15]. The value was garbage, on hosts with
2d38271b 19924 32-bit int (Bug#8600).
a108c10b
PE
19925
19926 * lread.c (read_integer): Be more consistent with string-to-number.
19927 Use string_to_number to do the actual conversion; this avoids
19928 rounding errors and fixes some other screwups. Without this fix,
19929 for example, #x1fffffffffffffff was misread as -2305843009213693952.
19930 (digit_to_number): Move earlier, for benefit of read_integer.
19931 Return -1 if the digit is out of range for the base, -2 if it is
48e400f0 19932 not a digit in any supported base. (Bug#8602)
a108c10b 19933
ad5f9eea
PE
19934 * doprnt.c (doprnt): Support arbitrary pI values, such as "I64".
19935
aec1708a
PE
19936 * dispnew.c (scrolling_window): Return 1 if we scrolled,
19937 to match comment at start of function. This also removes a
19938 GCC warning about overflow in a 32+64-bit port.
19939
47be4ab5
PE
19940 * lisp.h (EMACS_INT, EMACS_UINT, BITS_PER_EMACS_INT, pI): Simplify.
19941
371cac43
PE
19942 * dbusbind.c: Do not use XPNTR on a value that may be an integer.
19943 Reported by Stefan Monnier in
19944 <http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00919.html>.
04f2d78b
CB
19945 (xd_remove_watch, Fdbus_init_bus, xd_read_queued_messages):
19946 Use SYMBOLP-guarded XSYMBOL, not XPNTR.
371cac43 19947
d01a7826
PE
19948 * lisp.h (EMACS_INTPTR): Remove. All uses changed to intptr_t.
19949 (EMACS_UINTPTR): Likewise, with uintptr_t.
19950
7fd47d5c
PE
19951 * lisp.h: Prefer 64-bit EMACS_INT if available.
19952 (EMACS_INT, EMACS_UINT, BITS_PER_EMACS_INT, pI): Define to 64-bit
19953 on 32-bit hosts that have 64-bit int, so that they can access
19954 large files.
122b0c86
PE
19955 However, temporarily disable this change unless the temporary
19956 symbol WIDE_EMACS_INT is defined.
7fd47d5c 19957
8727937b
PE
19958 * lread.c, process.c: Do not include <inttypes.h>; lisp.h does it now.
19959
8ac068ac
PE
19960 Prefer intptr_t/uintptr_t for integers the same widths as pointers.
19961 This removes an assumption that EMACS_INT and long are the same
19962 width as pointers. The assumption is true for Emacs porting targets
19963 now, but we want to make other targets possible.
19964 * lisp.h: Include <inttypes.h>, for INTPTR_MAX, UINTPTR_MAX.
19965 (EMACS_INTPTR, EMACS_UINTPTR): New macros.
19966 In the rest of the code, change types of integers that hold casted
19967 pointers to EMACS_INTPTR and EMACS_UINTPTR, systematically
19968 replacing EMACS_INT, long, EMACS_UINT, and unsigned long.
19969 (XTYPE): Don't cast arg to EMACS_UINT; normally is not needed.
19970 (XSET): Cast type of XTYPE arg to EMACS_INTPTR; it is needed here.
19971 No need to cast type when ORing.
19972 (XPNTR): Return a value of type EMACS_INTPTR or EMACS_UINTPTR.
19973 * alloc.c (lisp_align_malloc): Remove a no-longer-needed cast.
19974 * doc.c (store_function_docstring): Use EMACS_INTPTR, so as not to
19975 assume EMACS_INT is the same width as char *.
19976 * gtkutil.c (xg_gtk_scroll_destroy, xg_tool_bar_button_cb):
19977 (xg_tool_bar_callback, xg_tool_bar_help_callback, xg_make_tool_item):
19978 Remove no-longer-needed casts.
19979 (xg_create_scroll_bar, xg_tool_bar_button_cb, xg_tool_bar_callback):
19980 (xg_tool_bar_help_callback, xg_make_tool_item):
19981 Use EMACS_INTPTR to hold an integer
19982 that will be cast to void *; this can avoid a GCC warning
19983 if EMACS_INT is not the same width as void *.
19984 * menu.c (find_and_call_menu_selection): Remove no-longer-needed cast.
19985 * xdisp.c (display_echo_area_1, resize_mini_window_1):
19986 (current_message_1, set_message_1):
19987 Use a local to convert to proper width without a cast.
19988 * xmenu.c (dialog_selection_callback): Likewise.
19989
ede49d71
PE
19990 * sysdep.c (get_random): Don't assume EMACS_INT is no wider than long.
19991 Also, don't assume VALBITS / RAND_BITS is less than 5,
19992 and don't rely on undefined behavior when shifting a 1 left into
19993 the sign bit.
19994 * lisp.h (get_random): Change signature to match.
19995
2f30ecd0
PE
19996 * lread.c (hash_string): Use size_t, not int, for hash computation.
19997 Normally we prefer signed values; but hashing is special, because
19998 it's better to use unsigned division on hash table sizes so that
19999 the remainder is nonnegative. Also, size_t is the natural width
20000 for hashing into memory. The previous code used 'int', which doesn't
20001 retain enough info to hash well into very large tables.
20002 (oblookup, oblookup_last_bucket_number, Funintern): Likewise.
20003
2a866e7b
PE
20004 * dbusbind.c: Don't possibly lose pointer info when converting.
20005 (xd_remove_watch, Fdbus_init_bus, xd_read_queued_messages):
20006 Use XPNTR rather than XHASH, so that the high-order bits of
20007 the pointer aren't lost when converting through void *.
20008
51639eac
PE
20009 * eval.c (Fautoload): Don't double-shift a pointer.
20010
92394119
PE
20011 * fns.c (Frandom): Let EMACS_UINT be wider than unsigned long.
20012
dbdb9a7c
JB
200132011-05-06 Juanma Barranquero <lekktu@gmail.com>
20014
20015 * gnutls.c (DEF_GNUTLS_FN):
20016 * image.c (DEF_IMGLIB_FN): Make function pointers static.
20017
db7a0b4f
AS
200182011-05-05 Andreas Schwab <schwab@linux-m68k.org>
20019
20020 * lread.c (lisp_file_lexically_bound_p): Stop scanning at end
20021 marker. (Bug#8610)
20022
cd394be1 200232011-05-05 Eli Zaretskii <eliz@gnu.org>
fab624aa
EZ
20024
20025 * w32heap.c (allocate_heap) [USE_LISP_UNION_TYPE || USE_LSB_TAG]:
20026 New version that can reserve upto 2GB of heap space.
20027
f7ff1b0f 200282011-05-05 Chong Yidong <cyd@stupidchicken.com>
45cb8994
CY
20029
20030 * nsfns.m (Fns_read_file_name): Doc fix (Bug#8534).
20031
639c109b
TZ
200322011-05-05 Teodor Zlatanov <tzz@lifelogs.com>
20033
20034 * gnutls.c (fn_gnutls_certificate_set_x509_key_file): Add alias to
20035 `gnutls_certificate_set_x509_key_file'.
20036
d2127135
JB
200372011-05-05 Juanma Barranquero <lekktu@gmail.com>
20038
20039 * makefile.w32-in ($(BLD)/image.$(O), $(BLD)/process.$(O)):
20040 Update dependencies.
20041
e968f4f3
JB
200422011-05-04 Juanma Barranquero <lekktu@gmail.com>
20043
20044 * gnutls.h (emacs_gnutls_write, emacs_gnutls_read):
20045 * gnutls.c (emacs_gnutls_write, emacs_gnutls_read):
20046 Remove unused parameter `fildes'.
20047 * process.c (read_process_output, send_process): Don't pass it.
20048
84d358f0
JB
200492011-05-04 Juanma Barranquero <lekktu@gmail.com>
20050
20051 Fix previous change: the library cache is defined in w32.c.
20052 * image.c (CACHE_IMAGE_TYPE) [!HAVE_NTGUI]: Define to noop.
20053 (Finit_image_library): Wrap Vlibrary_cache on "#ifdef HAVE_NTGUI".
20054
0898ca10
JB
200552011-05-04 Juanma Barranquero <lekktu@gmail.com>
20056
20057 Implement dynamic loading of GnuTLS on Windows.
20058
20059 * gnutls.h (GNUTLS_EMACS_ERROR_NOT_LOADED): New macro.
20060 (emacs_gnutls_write, emacs_gnutls_read): Mark as extern.
20061 (emacs_gnutls_record_check_pending, emacs_gnutls_transport_set_errno):
20062 Declare.
20063
20064 * gnutls.c (Qgnutls_dll): Define.
20065 (DEF_GNUTLS_FN, LOAD_GNUTLS_FN): New macros.
20066 (gnutls_*): Declare function pointers.
20067 (init_gnutls_functions): New function to initialize function pointers.
20068 (emacs_gnutls_handshake, Fgnutls_error_string, Fgnutls_deinit)
20069 (emacs_gnutls_global_init, Fgnutls_bye): Use function pointers.
20070 (emacs_gnutls_record_check_pending, emacs_gnutls_transport_set_errno):
20071 Wrappers for gnutls_record_check_pending and gnutls_transport_set_errno.
20072 (emacs_gnutls_write, emacs_gnutls_read)
20073 (emacs_gnutls_handle_error, Fgnutls_error_fatalp)
20074 (Fgnutls_available_p): New function.
20075 (Fgnutls_boot): Call Fgnutls_available_p. Use function pointers.
20076 (syms_of_gnutls) <Qgnutls_dll>: Initialize and staticpro it.
20077 (syms_of_gnutls) <Sgnutls_available_p>: defsubr it.
20078
20079 * image.c: Include w32.h.
20080 (Vimage_type_cache): Delete.
20081 (syms_of_image) <Vimage_type_cache>: Don't initialize and staticpro it.
20082 (CACHE_IMAGE_TYPE, Finit_image_library): Use Vlibrary_cache instead.
20083 (w32_delayed_load): Move to w32.c.
20084
20085 * w32.h (VlibraryCache, QCloaded_from, w32_delayed_load): Declare.
20086
20087 * w32.c (QCloaded_from, Vlibrary_cache): Define.
20088 (w32_delayed_load): Move from image.c. When loading a library, record
20089 its filename in the :loaded-from property of the library id.
20090 (globals_of_w32) <QCloaded_from, Vlibrary_cache>:
20091 Initialize and staticpro them.
20092 (emacs_gnutls_pull, emacs_gnutls_push): Call emacs_gnutls_* functions.
20093
20094 * process.c: Include lisp.h before w32.h, not after.
20095 (wait_reading_process_output): Call emacs_gnutls_record_check_pending
20096 instead of gnutls_record_check_pending.
20097
20098 * callproc.c, emacs.c: Include lisp.h before w32.h, not after.
20099
ff4de4aa
TZ
201002011-05-04 Teodor Zlatanov <tzz@lifelogs.com>
20101
20102 * gnutls.c (Fgnutls_boot): Support :keylist and :crlfiles options
20103 instead of :keyfiles. Give GnuTLS the keylist and the CRL lists
20104 as passed in.
20105
abe95abb
JD
201062011-05-03 Jan Djärv <jan.h.d@swipnet.se>
20107
20108 * xterm.c (x_set_frame_alpha): Do not set property on anything
20109 else than FRAME_X_OUTER_WINDOW (Bug#8608).
20110
e16e55d4
JB
201112011-05-02 Juanma Barranquero <lekktu@gmail.com>
20112
20113 * sysdep.c (get_tty_size) [WINDOWSNT]: Implement. (Bug#8596)
20114
bafcf6a5
JB
201152011-05-02 Juanma Barranquero <lekktu@gmail.com>
20116
20117 * gnutls.c (Qgnutls_log_level, Qgnutls_code, Qgnutls_anon)
20118 (Qgnutls_x509pki, Qgnutls_e_interrupted, Qgnutls_e_again)
20119 (Qgnutls_e_invalid_session, Qgnutls_e_not_ready_for_handshake)
20120 (gnutls_global_initialized, Qgnutls_bootprop_priority)
20121 (Qgnutls_bootprop_trustfiles, Qgnutls_bootprop_keyfiles)
20122 (Qgnutls_bootprop_callbacks, Qgnutls_bootprop_loglevel)
20123 (Qgnutls_bootprop_hostname, Qgnutls_bootprop_verify_flags)
20124 (Qgnutls_bootprop_verify_error, Qgnutls_bootprop_verify_hostname_error)
20125 (Qgnutls_bootprop_callbacks_verify): Make static.
20126
e7a6747f
AS
201272011-05-01 Andreas Schwab <schwab@linux-m68k.org>
20128
19ed11ba
AS
20129 * callproc.c: Indentation fixup.
20130
e7a6747f 20131 * sysdep.c (wait_for_termination_1): Make static.
04f2d78b
CB
20132 (wait_for_termination, interruptible_wait_for_termination):
20133 Move after wait_for_termination_1.
e7a6747f 20134
1ef14cb4
LMI
201352011-05-01 Lars Magne Ingebrigtsen <larsi@gnus.org>
20136
20137 * sysdep.c (interruptible_wait_for_termination): New function
20138 which is like wait_for_termination, but allows keyboard
20139 interruptions.
20140
20141 * callproc.c (Fcall_process): Add (:file "file") as an option for
20142 the STDOUT buffer.
20143 (Fcall_process_region): Ditto.
20144
330d880c
EZ
201452011-04-30 Eli Zaretskii <eliz@gnu.org>
20146
8db90b73
EZ
20147 * dosfns.c (Fint86, Fdos_memget, Fdos_memput): Use `ASIZE (FOO)'
20148 rather than `XVECTOR (FOO)->size'.
20149
330d880c
EZ
20150 * process.c: Remove HAVE_INTTYPES_H condition from inclusion of
20151 inttypes.h, as a gnulib replacement is used if it not available in
20152 system headers.
20153
15cbd324
EZ
201542011-04-21 Eli Zaretskii <eliz@gnu.org>
20155
20156 Lift the MOST_POSITIVE_FIXNUM/4 limitation on visited files.
20157 * fileio.c (Finsert_file_contents): Don't limit file size to 1/4
20158 of MOST_POSITIVE_FIXNUM. (Bug#8528)
20159
20160 * coding.c (coding_alloc_by_realloc): Error out if destination
20161 will grow beyond MOST_POSITIVE_FIXNUM.
20162 (decode_coding_emacs_mule): Abort if there isn't enough place in
20163 charbuf for the composition carryover bytes. Reserve an extra
20164 space for up to 2 characters produced in a loop.
20165 (decode_coding_iso_2022): Abort if there isn't enough place in
20166 charbuf for the composition carryover bytes.
20167
201682011-04-21 Eli Zaretskii <eliz@gnu.org>
afda1437 20169
ae940cca
EZ
20170 * doprnt.c (doprnt) [!HAVE_LONG_LONG_INT]: Error out instead of
20171 aborting when %lld or %lll format is passed.
20172 [!HAVE_UNSIGNED_LONG_LONG_INT]: Error out instead of aborting when
20173 %llo or %llx format is passed. (Bug#8545)
20174
03ab8921
EZ
20175 * window.c (window_scroll_line_based): Use a marker instead of
20176 simple variables to record original value of point. (Bug#7952)
20177
afda1437
EZ
20178 * doprnt.c (doprnt): Fix the case where a multibyte sequence
20179 produced by %s or %c overflows available buffer space. (Bug#8545)
20180
f76dee0c
PE
201812011-04-28 Paul Eggert <eggert@cs.ucla.edu>
20182
20183 * doprnt.c (doprnt): Omit useless test; int overflow check (Bug#8545).
283cdbef 20184 (SIZE_MAX): Move defn after all includes, as they might #define it.
f76dee0c 20185
fdc5744d
JB
201862011-04-28 Juanma Barranquero <lekktu@gmail.com>
20187
20188 * w32.c (init_environment): Warn about defaulting HOME to C:\.
20189
638f053a
JB
201902011-04-28 Juanma Barranquero <lekktu@gmail.com>
20191
20192 * keyboard.c (Qdelayed_warnings_hook): Define.
20193 (command_loop_1): Run `delayed-warnings-hook'
20194 if Vdelayed_warnings_list is non-nil.
20195 (syms_of_keyboard) <delayed-warnings-hook>: DEFSYM it.
20196 (syms_of_keyboard) <delayed-warnings-list>: DEFVAR_LISP it.
20197
d178f871
EZ
201982011-04-28 Eli Zaretskii <eliz@gnu.org>
20199
20200 * doprnt.c (doprnt): Don't return value smaller than the buffer
20201 size if the message was truncated. (Bug#8545).
20202
b124fd93
JB
202032011-04-28 Juanma Barranquero <lekktu@gmail.com>
20204
20205 * w32fns.c (Fx_change_window_property, Fx_delete_window_property)
20206 (Fx_window_property): #if-0 the whole functions, not just the bodies.
20207
e810457d
PE
202082011-04-27 Paul Eggert <eggert@cs.ucla.edu>
20209
20210 * doprnt.c (doprnt): Support "ll" length modifier, for long long.
20211
ea51cceb
JB
202122011-04-27 Juanma Barranquero <lekktu@gmail.com>
20213
20214 * makefile.w32-in: Update dependencies.
20215
94dcfacf
EZ
202162011-04-27 Eli Zaretskii <eliz@gnu.org>
20217
20218 Improve `doprnt' and its usage. (Bug#8545)
20219 * doprnt.c (doprnt): Make sure `format' is never accessed beyond
20220 `format_end'. Remove support for %l as a conversion specifier.
20221 Don't use xrealloc. Improve diagnostics when the %l size modifier
20222 is used. Update the commentary.
20223
20224 * eval.c (verror): Simplify calculation of size_t.
20225
20226 * coding.c (Ffind_operation_coding_system): Fix diagnostic error
20227 messages.
20228
f61f41d7
PE
202292011-04-27 Yoshiaki Kasahara <kasahara@nc.kyushu-u.ac.jp> (tiny change)
20230
20231 * buffer.c (init_buffer) [USE_MMAP_FOR_BUFFERS]: Adjust to aliasing
20232 change.
20233
96fb4434
PE
202342011-04-27 Paul Eggert <eggert@cs.ucla.edu>
20235
20236 * nsmenu.m: Replace all uses of XVECTOR with ASIZE and AREF.
20237 This makes this file independent of the recent pseudovector change.
20238
671875da 202392011-04-26 Paul Eggert <eggert@cs.ucla.edu>
eab3844f 20240
69e9b5a3
PE
20241 * keyboard.c (handle_user_signal): Fix pointer signedness problem.
20242
b5f869a7 20243 * gnutls.c (emacs_gnutls_handle_error): Remove unused local.
7754e151 20244 (Fgnutls_boot): gnutls_certificate_verify_peers2 wants unsigned *.
8d4c3955 20245 Remove unused local.
c8926152 20246 (emacs_gnutls_write): Don't use uninitialized rtnval if nbyte <= 0.
080e5a8d 20247
841a1577 20248 * lisp.h: Fix a problem with aliasing and vector headers. (Bug#8546)
04f2d78b
CB
20249 GCC 4.6.0 optimizes based on type-based alias analysis.
20250 For example, if b is of type struct buffer * and v of type struct
eab3844f
PE
20251 Lisp_Vector *, then gcc -O2 was incorrectly assuming that &b->size
20252 != &v->size, and therefore "v->size = 1; b->size = 2; return
20253 v->size;" must therefore return 1. This assumption is incorrect
20254 for Emacs, since it type-puns struct Lisp_Vector * with many other
20255 types. To fix this problem, this patch adds a new type struct
f904488f 20256 vectorlike_header that documents the constraints on layout of vectors
eab3844f
PE
20257 and pseudovectors, and helps optimizing compilers not get fooled
20258 by Emacs's type punning. It also adds the macros XSETTYPED_PVECTYPE
20259 XSETTYPED_PSEUDOVECTOR, TYPED_PSEUDOVECTORP, for similar reasons.
f904488f
PE
20260 * lisp.h (XSETTYPED_PVECTYPE): New macro, specifying the name of
20261 the size member.
eab3844f
PE
20262 (XSETPVECTYPE): Rewrite in terms of new macro.
20263 (XSETPVECTYPESIZE): New macro, specifying both type and size.
20264 This is a bit clearer, and further avoids the possibility of
20265 undesirable aliasing.
20266 (XSETTYPED_PSEUDOVECTOR): New macro, specifying the size.
f904488f 20267 (XSETPSEUDOVECTOR): Rewrite in terms of XSETTYPED_PSEUDOVECTOR.
eab3844f
PE
20268 (XSETSUBR): Rewrite in terms of XSETTYPED_PSEUDOVECTOR and XSIZE,
20269 since Lisp_Subr is a special case (no "next" field).
04f2d78b
CB
20270 (ASIZE): Now uses header.size rather than size.
20271 All previous uses of XVECTOR (foo)->size replaced to use this macro,
f904488f
PE
20272 to avoid the hassle of writing XVECTOR (foo)->header.size.
20273 (struct vectorlike_header): New type.
eab3844f
PE
20274 (TYPED_PSEUDOVECTORP): New macro, also specifying the C type of the
20275 object, to help avoid aliasing.
20276 (PSEUDOVECTORP): Rewrite in terms of TYPED_PSEUDOVECTORP.
20277 (SUBRP): Likewise, since Lisp_Subr is a special case.
20278 * lisp.h (struct Lisp_Vector, struct Lisp_Char_Table):
20279 (struct Lisp_Sub_Char_Table, struct Lisp_Bool_Vector):
20280 (struct Lisp_Hash_Table): Combine first two members into a single
f904488f 20281 struct vectorlike_header member. All uses of "size" and "next" members
eab3844f
PE
20282 changed to be "header.size" and "header.next".
20283 * buffer.h (struct buffer): Likewise.
20284 * font.h (struct font_spec, struct font_entity, struct font): Likewise.
20285 * frame.h (struct frame): Likewise.
20286 * process.h (struct Lisp_Process): Likewise.
20287 * termhooks.h (struct terminal): Likewise.
20288 * window.c (struct save_window_data, struct saved_window): Likewise.
20289 * window.h (struct window): Likewise.
20290 * alloc.c (allocate_buffer, Fmake_bool_vector, allocate_pseudovector):
20291 Use XSETPVECTYPESIZE, not XSETPVECTYPE, to avoid aliasing problems.
20292 * buffer.c (init_buffer_once): Likewise.
20293 * lread.c (defsubr): Use XSETTYPED_PVECTYPE, since Lisp_Subr is a
20294 special case.
20295 * process.c (Fformat_network_address): Use local var for size,
20296 for brevity.
20297
0df1eac5
PE
20298 * bytecode.c (exec_byte_code): Don't use XVECTOR before CHECK_VECTOR.
20299
847ab9d1 20300 Make the Lisp reader and string-to-float more consistent (Bug#8525)
452f4150
PE
20301 * data.c (atof): Remove decl; no longer used or needed.
20302 (digit_to_number): Move to lread.c.
20303 (Fstring_to_number): Use new string_to_number function, to be
20304 consistent with how the Lisp reader treats infinities and NaNs.
20305 Do not assume that floating-point numbers represent EMACS_INT
20306 without losing information; this is not true on most 64-bit hosts.
20307 Avoid double-rounding errors, by insisting on integers when
20308 parsing non-base-10 numbers, as the documentation specifies.
20309 * lisp.h (string_to_number): New decl, replacing ...
20310 (isfloat_string): Remove.
bc0a5c13 20311 * lread.c: Include <inttypes.h>, for uintmax_t and strtoumax.
d78050d6 20312 (read1): Do not accept +. and -. as integers; this
452f4150
PE
20313 appears to have been a coding error. Similarly, do not accept
20314 strings like +-1e0 as floating point numbers. Do not report
20315 overflow for integer overflows unless the base is not 10 which
20316 means we have no simple and reliable way to continue.
20317 Break out the floating-point parsing into a new
20318 function string_to_number, so that Fstring_to_number parses
20319 floating point numbers consistently with the Lisp reader.
04f2d78b 20320 (digit_to_number): Move here from data.c. Make it static inline.
452f4150
PE
20321 (E_CHAR, EXP_INT): Remove, replacing with ...
20322 (E_EXP): New macro, to solve the "1.0e+" problem mentioned below.
20323 (string_to_number): New function, replacing isfloat_string.
20324 This function checks for valid syntax and produces the resulting
20325 Lisp float number too. Rework it so that string-to-number
bc0a5c13 20326 no longer mishandles examples like "1.0e+". Use strtoumax,
d78050d6
PE
20327 so that overflow for non-base-10 numbers is reported only when
20328 there's no portable and simple way to convert to floating point.
452f4150 20329
67769ffc
PE
20330 * textprop.c (set_text_properties_1): Rewrite for clarity,
20331 and to avoid GCC warning about integer overflow.
20332
c20db43f
PE
20333 * intervals.h (struct interval): Use EMACS_INT for members
20334 where EMACS_UINT might cause problems. See
20335 <http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00514.html>.
20336 (CHECK_TOTAL_LENGTH): Remove cast to EMACS_INT; no longer needed.
20337 * intervals.c (interval_deletion_adjustment): Now returns EMACS_INT.
20338 All uses changed.
37aa2f85
PE
20339 (offset_intervals): Tell GCC not to worry about length overflow
20340 when negating a negative length.
c20db43f 20341
2538aa2f
PE
20342 * alloc.c (overrun_check_malloc, overrun_check_realloc): Now static.
20343 (overrun_check_free): Likewise.
20344
f2d3008d
PE
20345 * alloc.c (SDATA_SIZE) [!GC_CHECK_STRING_BYTES]: Avoid runtime check
20346 in the common case where SDATA_DATA_OFFSET is a multiple of Emacs
20347 word size.
20348
ec8df744
PE
20349 * gnutls.c: Fix problems found by GCC 4.6.0 on Ubuntu 10.10.
20350 (gnutls_make_error): Rename local to avoid shadowing.
20351 (gnutls_emacs_global_deinit): ifdef out; not used.
20352 (Fgnutls_boot): Use const for pointer to readonly storage.
20353 Comment out unused local. Fix pointer signedness problems.
20354
640ee02d
PE
20355 * lread.c (openp): Don't stuff size_t into an 'int'.
20356 Use <= on length, not < on length + 1, to avoid GCC 4.6.0 warning
20357 about possible signed overflow.
20358
6048fb2a
PE
20359 * gtkutil.c: Fix problems found by GCC 4.6.0 on Ubuntu 10.10.
20360 (GDK_KEY_g): Don't define if already defined.
20361 (xg_prepare_tooltip): Avoid pointer signedness problem.
20362 (xg_set_toolkit_scroll_bar_thumb): Redo to avoid two casts.
20363
fa3c87e1
PE
20364 * process.c (Fnetwork_interface_info): Avoid left-shift undefined
20365 behavior with 1 << 31. GCC 4.6.0 warns about this on 32-bit hosts.
20366
2172544b
PE
20367 * xfns.c (Fx_window_property): Simplify a bit,
20368 to make a bit faster and to avoid GCC 4.6.0 warning.
20369 * xselect.c (x_get_window_property, x_handle_dnd_message): Likewise.
20370
9b821a21
PE
20371 * fns.c (internal_equal): Don't assume size_t fits in int.
20372
3c616cfa
PE
20373 * alloc.c (compact_small_strings): Tighten assertion a little.
20374
c2982e87
PE
20375 Replace pEd with more-general pI, and fix some printf arg casts.
20376 * lisp.h (pI): New macro, generalizing old pEd macro to other
20377 conversion specifiers. For example, use "...%"pI"d..." rather
20378 than "...%"pEd"...".
20379 (pEd): Remove. All uses replaced with similar uses of pI.
61bdb816 20380 * m/amdx86-64.h, m/ia64.h, m/ibms390x.h: Likewise.
c2982e87
PE
20381 * alloc.c (check_pure_size): Don't overflow by converting size to int.
20382 * bidi.c (bidi_dump_cached_states): Use pI to avoid cast.
20383 * data.c (Fnumber_to_string): Use pI instead of if-then-else-abort.
20384 * dbusbind.c (xd_append_arg): Use pI to avoid cast.
20385 (Fdbus_method_return_internal, Fdbus_method_error_internal): Likewise.
20386 * font.c (font_unparse_xlfd): Avoid potential buffer overrun on
20387 64-bit hosts.
20388 (font_unparse_xlfd, font_unparse_fcname): Use pI to avoid casts.
20389 * keyboard.c (record_char, modify_event_symbol): Use pI to avoid casts.
20390 * print.c (safe_debug_print, print_object): Likewise.
20391 (print_object): Don't overflow by converting EMACS_INT or EMACS_UINT
20392 to int.
6f04d126
PE
20393 Use pI instead of if-then-else-abort. Use %p to avoid casts,
20394 avoiding the 0 flag, which is not portable.
c2982e87
PE
20395 * process.c (Fmake_network_process): Use pI to avoid cast.
20396 * region-cache.c (pp_cache): Likewise.
20397 * xdisp.c (decode_mode_spec): Likewise.
20398 * xrdb.c (x_load_resources) [USE_MOTIF]: Use pI to avoid undefined
20399 behavior on 64-bit hosts with printf arg.
6f04d126 20400 * xselect.c (x_queue_event): Use %p to avoid casts, avoiding 0 flag.
c2982e87
PE
20401 (x_stop_queuing_selection_requests): Likewise.
20402 (x_get_window_property): Don't truncate byte count to an 'int'
20403 when tracing.
0b432f21 20404
5e073ec7
PE
20405 * frame.c (frame_name_fnn_p): Get rid of strtol, which isn't right
20406 here, since it parses constructs like leading '-' and spaces,
20407 which are not wanted; and it overflows with large numbers.
20408 Instead, simply match F[0-9]+, which is what is wanted anyway.
20409
36372bf9
PE
20410 * alloc.c: Remove unportable assumptions about struct layout.
20411 (SDATA_SELECTOR, SDATA_DATA_OFFSET): New macros.
20412 (SDATA_OF_STRING, SDATA_SIZE, allocate_string_data):
20413 (allocate_vectorlike, make_pure_vector): Use the new macros,
20414 plus offsetof, to remove unportable assumptions about struct layout.
20415 These assumptions hold on all porting targets that I know of, but
20416 they are not guaranteed, they're easy to remove, and removing them
20417 makes further changes easier.
20418
0b432f21
PE
20419 * alloc.c (BLOCK BYTES): Fix typo by changing "ablock" to "ablocks".
20420 This doesn't fix a bug but makes the code clearer.
bfd1c781
PE
20421 (string_overrun_cookie): Now const. Use initializers that
20422 don't formally overflow signed char, to avoid warnings.
000098c1
PE
20423 (allocate_string_data) [GC_CHECK_STRING_OVERRUN]: Fix typo that
20424 can cause Emacs to crash when string overrun checking is enabled.
c7bda33c
PE
20425 (allocate_buffer): Don't assume sizeof (struct buffer) is a
20426 multiple of sizeof (EMACS_INT); it need not be, if
20427 alignof(EMACS_INT) < sizeof (EMACS_INT).
d0f4e1f5 20428 (check_sblock, check_string_bytes, check_string_free_list): Protoize.
0b432f21 20429
895009e1
JB
204302011-04-26 Juanma Barranquero <lekktu@gmail.com>
20431
20432 * keyboard.c (QCrtl): Rename from Qrtl. All uses changed.
20433
6a7a1b0b
TZ
204342011-04-26 Teodor Zlatanov <tzz@lifelogs.com>
20435
20436 * gnutls.c (emacs_gnutls_handshake): Return an error if we're not
b5f869a7 20437 supposed to be handshaking. (Bug#8556)
6a7a1b0b
TZ
20438 Reported by Paul Eggert <eggert@cs.ucla.edu>.
20439
841a1577 204402011-04-26 Daniel Colascione <dan.colascione@gmail.com>
0438ce91
DC
20441
20442 * lisp.h (Qdebug): List symbol.
895009e1 20443 * eval.c (Qdebug): Restore global linkage.
0438ce91
DC
20444 * keyboard.c (debug-on-event): New variable.
20445 (handle_user_signal): Break into debugger when debug-on-event
20446 matches the current signal symbol.
20447
f2d3ba6f
DN
204482011-04-25 Dan Nicolaescu <dann@ics.uci.edu>
20449
20450 * alloc.c (check_sblock, check_string_bytes)
20451 (check_string_free_list): Convert to standard C.
20452
42ce4c63
TZ
204532011-04-25 Teodor Zlatanov <tzz@lifelogs.com>
20454
20455 * w32.c (emacs_gnutls_push): Fix typo.
20456
825cd63c
EZ
204572011-04-25 Eli Zaretskii <eliz@gnu.org>
20458
fb11d64d
EZ
20459 * gnutls.c (emacs_gnutls_handshake): Avoid compiler warnings about
20460 "cast to pointer from integer of different size".
20461
825cd63c
EZ
20462 Improve doprnt and its use in verror. (Bug#8545)
20463 * doprnt.c (doprnt): Document the set of format control sequences
20464 supported by the function. Use SAFE_ALLOCA instead of always
20465 using `alloca'.
20466
20467 * eval.c (verror): Don't limit the buffer size at size_max-1, that
20468 is one byte too soon. Don't use xrealloc; instead xfree and
20469 xmalloc anew.
20470
e061a11b
TZ
204712011-04-24 Teodor Zlatanov <tzz@lifelogs.com>
20472
20473 * gnutls.h: Add GNUTLS_STAGE_CALLBACKS enum to denote we're in the
20474 callbacks stage.
20475
20476 * gnutls.c: Renamed global_initialized to
20477 gnutls_global_initialized. Added internals for the
20478 :verify-hostname-error, :verify-error, and :verify-flags
20479 parameters of `gnutls-boot' and documented those parameters in the
20480 docstring. Start callback support.
9173deec
JB
20481 (emacs_gnutls_handshake): Add Woe32 support. Retry handshake
20482 unless a fatal error occurred. Call gnutls_alert_send_appropriate
20483 on error. Return error code.
e061a11b
TZ
20484 (emacs_gnutls_write): Call emacs_gnutls_handle_error.
20485 (emacs_gnutls_read): Likewise.
20486 (Fgnutls_boot): Return handshake error code.
20487 (emacs_gnutls_handle_error): New function.
20488 (wsaerror_to_errno): Likewise.
20489
20490 * w32.h (emacs_gnutls_pull): Add prototype.
20491 (emacs_gnutls_push): Likewise.
20492
20493 * w32.c (emacs_gnutls_pull): New function for GnuTLS on Woe32.
20494 (emacs_gnutls_push): Likewise.
20495
204962011-04-24 Claudio Bley <claudio.bley@gmail.com> (tiny change)
20497
20498 * process.c (wait_reading_process_output): Check if GnuTLS
20499 buffered some data internally if no FDs are set for TLS
20500 connections.
20501
20502 * makefile.w32-in (OBJ2): Add gnutls.$(O).
20503 (LIBS): Link to USER_LIBS.
20504 ($(BLD)/gnutls.$(0)): New target.
20505
fa6996bc
EZ
205062011-04-24 Eli Zaretskii <eliz@gnu.org>
20507
eb35682e
EZ
20508 * xdisp.c (handle_single_display_spec): Rename the
20509 display_replaced_before_p argument into display_replaced_p, to
20510 make it consistent with the commentary. Fix typos in the
20511 commentary.
20512
e2ad650c
EZ
20513 * textprop.c (syms_of_textprop): Remove dead code.
20514 (copy_text_properties): Delete obsolete commentary about an
20515 interface that was deleted long ago. Fix typos in the description
20516 of arguments.
20517
1b2de274
EZ
20518 * msdos.c (XMenuActivate, XMenuAddSelection): Adjust argument list
20519 to changes in oldXMenu/XMenu.h from 2011-04-16.
20520 <menu_help_message, prev_menu_help_message>: Constify.
20521 (IT_menu_make_room): menu->help_text is now `const char **';
20522 adjust.
20523
20524 * msdos.h (XMenuActivate, XMenuAddSelection): Adjust prototypes
20525 to changes in oldXMenu/XMenu.h from 2011-04-16.
20526 (struct XMenu): Declare `help_text' `const char **'.
20527
20528 * xfaces.c <Qunspecified>: Make extern again.
20529
20530 * syntax.c: Include sys/types.h before including regex.h, as
75f1671a 20531 required by POSIX.
1b2de274 20532
762b15be
EZ
20533 * doc.c (get_doc_string): Improve the format passed to `error'.
20534
20535 * doprnt.c (doprnt): Improve commentary.
20536
20537 * term.c (init_tty) [MSDOS]: Fix 1st argument to maybe_fatal.
20538
20539 * Makefile.in (TAGS): Depend on $(M_FILE) and $(S_FILE), and scan
20540 them with etags.
20541
f1052e5d
EZ
20542 * makefile.w32-in (globals.h): Add a dummy recipe, to make any
20543 changes in globals.h immediately force recompilation.
762b15be
EZ
20544 (TAGS): Depend on $(CURDIR)/m/intel386.h and
20545 $(CURDIR)/s/ms-w32.h.
20546 (TAGS-gmake): Scan $(CURDIR)/m/intel386.h and $(CURDIR)/s/ms-w32.h.
f1052e5d 20547
fa6996bc
EZ
20548 * character.c (Fchar_direction): Function deleted.
20549 (syms_of_character): Don't defsubr it.
20550 <char-direction-table>: Deleted.
20551
e6c3da20
EZ
205522011-04-23 Eli Zaretskii <eliz@gnu.org>
20553
20554 Fix doprnt so it could be used again safely in `verror'. (Bug#8435)
20555 * doprnt.c: Include limits.h.
20556 (SIZE_MAX): New macro.
04f2d78b
CB
20557 (doprnt): Return a size_t value. 2nd arg is now size_t.
20558 Many local variables are now size_t instead of int or unsigned.
e6c3da20
EZ
20559 Improve overflow protection. Support `l' modifier for integer
20560 conversions. Support %l conversion. Don't assume an EMACS_INT
20561 argument for integer conversions and for %c.
20562
20563 * lisp.h (doprnt): Restore prototype.
20564
20565 * makefile.w32-in ($(BLD)/callint.$(O)): Depend on
20566 $(SRC)/character.h.
20567
20568 * Makefile.in (base_obj): Add back doprnt.o.
20569
20570 * deps.mk (doprnt.o): Add back prerequisites.
20571 (callint.o): Depend on character.h.
20572
20573 * eval.c (internal_lisp_condition_case): Include the handler
20574 representation in the error message.
20575 (verror): Call doprnt instead of vsnprintf. Fix an off-by-one bug
20576 when breaking from the loop.
20577
20578 * xdisp.c (vmessage): Call doprnt instead of vsnprintf.
20579
20580 * callint.c (Fcall_interactively): When displaying error message
20581 about invalid control letter, pass the character's codepoint, not
20582 a pointer to its multibyte form. Improve display of the character
20583 in octal and display also its hex code.
20584
20585 * character.c (char_string): Use %x to display the (unsigned)
20586 codepoint of an invalid character, to avoid displaying a bogus
20587 negative value.
20588
20589 * font.c (check_otf_features): Pass SDATA of SYMBOL_NAME to
20590 `error', not SYMBOL_NAME itself.
20591
20592 * coding.c (Fencode_sjis_char, Fencode_big5_char): Use %c for
20593 character arguments to `error'.
20594
20595 * charset.c (check_iso_charset_parameter): Fix incorrect argument
20596 to `error' in error message about FINAL_CHAR argument. Make sure
20597 FINAL_CHAR is a character, and use %c when it is passed as
20598 argument to `error'.
20599
4ffd0d6b 206002011-04-23 Eli Zaretskii <eliz@gnu.org>
97a93095
EZ
20601
20602 * s/ms-w32.h (localtime): Redirect to sys_localtime.
20603
20604 * w32.c: Include <time.h>.
20605 (sys_localtime): New function.
20606
4ffd0d6b 206072011-04-23 Chong Yidong <cyd@stupidchicken.com>
c17819f4
CY
20608
20609 * xdisp.c (init_xdisp): Initialize echo_area_window (Bug#6451).
20610
4ffd0d6b 20611 * buffer.c (syms_of_buffer): Doc fix (Bug#6902).
aac0c6e3 20612
4ffd0d6b 206132011-04-23 Samuel Thibault <sthibault@debian.org> (tiny change)
aac0c6e3 20614
4ffd0d6b
GM
20615 * sysdep.c (wait_for_termination): On GNU Hurd, kill returns -1 on
20616 zombies (Bug#8467).
aac0c6e3 20617
04c56954
EZ
206182011-04-19 Eli Zaretskii <eliz@gnu.org>
20619
20620 * syntax.h (SETUP_SYNTAX_TABLE_FOR_OBJECT): Fix setting of
20621 gl_state.e_property when gl_state.object is Qt.
20622
20623 * insdel.c (make_gap_larger): Remove limitation of buffer size
20624 to <= INT_MAX.
20625
16a43933
CY
206262011-04-18 Chong Yidong <cyd@stupidchicken.com>
20627
20628 * xdisp.c (lookup_glyphless_char_display)
20629 (produce_glyphless_glyph): Handle cons cell entry in
20630 glyphless-char-display.
20631 (Vglyphless_char_display): Document it.
20632
20633 * term.c (produce_glyphless_glyph): Handle cons cell entry in
20634 glyphless-char-display.
20635
4581706e
CY
206362011-04-17 Chong Yidong <cyd@stupidchicken.com>
20637
20638 * xdisp.c (get_next_display_element): Remove unnecessary ifdefs.
20639
20640 * termhooks.h (FRAME_WINDOW_P): Remove duplicated definitions.
20641
20642 * dispextern.h (FACE_SUITABLE_FOR_ASCII_CHAR_P): Add missing
20643 definition for no-X builds.
20644
4887c6e2 206452011-04-16 Paul Eggert <eggert@cs.ucla.edu>
764430a3 20646
fd35b6f9
PE
20647 Static checks with GCC 4.6.0 and non-default toolkits.
20648
5c1ccb01
PE
20649 * s/sol2-6.h, s/unixware.h (PTY_TTY_NAME_SPRINTF): Protoize decl.
20650
006c5daa
PE
20651 * process.c (keyboard_bit_set): Define only if SIGIO.
20652 (send_process_trap): Mark it with NO_RETURN if it doesn't return.
20653 (send_process): Repair possible setjmp clobbering.
20654
efc736d3
PE
20655 * s/usg5-4-common.h (SETUP_SLAVE_PTY): Don't pass extra arg to 'fatal'.
20656
4e2fe2e6
PE
20657 * eval.c: Include <stdio.h>, for vsnprintf on non-GNU/Linux hosts.
20658
f97334a2
PE
20659 * data.c (arith_error): Mark with NO_RETURN if it doesn't return.
20660
4e75f29d
PE
20661 * alloc.c (bytes_used_when_full, SPARE_MEMORY, BYTES_USED):
20662 Define only if needed.
20663
90efadd1
PE
20664 * sysdep.c (_FILE_OFFSET_BITS): Make this hack even uglier
20665 by pacifying GCC about it. Maybe it's time to retire it?
875975e9 20666 * xfaces.c (USG, __TIMEVAL__): Likewise.
90efadd1 20667
3c647824
PE
20668 * dispextern.h (struct redisplay_interface): Rename param
20669 to avoid shadowing.
e264f262 20670 * termhooks.h (struct terminal): Likewise.
761383f4 20671 * xterm.c (xembed_send_message): Likewise.
3c647824 20672
b58c5c4a
PE
20673 * insdel.c (make_gap_smaller): Define only if
20674 USE_MMAP_FOR_BUFFERS || REL_ALLOC || DOUG_LEA_MALLOC.
20675
cad59032
PE
20676 * keyboard.c (read_char): Make a var volatile so longjmp won't clobber
20677 it.
20678
c339dc2e
PE
20679 * emacs.c (MAX_HEAP_BSS_DIFF, my_edata): Move to where they're used,
20680 so that we aren't warned about unused symbols.
20681
91a3e27b
PE
20682 * xfns.c (Fx_file_dialog): Rename local to avoid shadowing.
20683
399c71d3 20684 * xdisp.c (x_produce_glyphs): Mark var as initialized (Bug#8512).
7a3fb125 20685
8ffc96f5
PE
20686 * xfns.c (x_real_positions): Mark locals as initialized.
20687
eef9bc79
PE
20688 * xmenu.c (xmenu_show): Don't use uninitialized vars.
20689
098db9dd
PE
20690 * xterm.c: Fix problems found by static analysis with other toolkits.
20691 (toolkit_scroll_bar_interaction): Define and use only if USE_X_TOOLKIT.
dda3aedd
PE
20692 (x_dispatch_event): Declare static if USE_GTK, and
20693 define if USE_GTK || USE_X_TOOLKIT.
098db9dd 20694 (SET_SAVED_BUTTON_EVENT): Define only if USE_X_TOOLKIT || USE_GTK.
dda3aedd 20695 * xterm.h (x_dispatch_event): Extern only if USE_X_TOOLKIT.
841a1577
JB
20696 * xterm.c, xterm.h (x_mouse_leave): Bring this function back, but only
20697 if defined HAVE_MENUS && !defined USE_X_TOOLKIT && !defined USE_GTK.
098db9dd 20698
eb18f6cc
PE
20699 * xmenu.c (menu_help_callback): Pointer type fixes.
20700 Use const pointers when pointing at readonly data. Avoid pointer
20701 signedness clashes.
20702 (FALSE): Remove unused macro.
20703 (update_frame_menubar): Remove unused decl.
20704
1fe72bf8
PE
20705 * xfns.c (Fx_hide_tip): Move locals to avoid shadowing.
20706
60d9e1db
PE
20707 * menu.c (push_submenu_start, push_submenu_end): Do not define unless
20708 USE_X_TOOLKIT || USE_GTK || HAVE_NS || defined HAVE_NTGUI.
20709 (single_menu_item): Rename local to avoid shadowing.
20710
39261c26
PE
20711 * keyboard.c (make_lispy_event): Remove unused local var.
20712
018c5e19
PE
20713 * frame.c, frame.h (x_get_resource_string): Bring this back, but
20714 only if HAVE_X_WINDOWS && !USE_X_TOOLKIT.
20715
63d2b86e
PE
20716 * bitmaps: Change bitmaps from unsigned char back to the X11
20717 compatible char. Avoid the old compiler warnings about
20718 out-of-range initializers by using, for example, '\xab' rather
20719 than 0xab.
20720
aefd87e1
PE
20721 * xgselect.c (xgselect_initialize): Check vs interface
20722 even if ! (defined (USE_GTK) || defined (HAVE_GCONF)).
20723
bf501fb9
PE
20724 * xmenu.c (xmenu_show): Rename parm to avoid shadowing.
20725
e9829fdf
PE
20726 * xterm.c (x_create_toolkit_scroll_bar): Use const * for pointers
20727 to read-only memory.
20728
1086c095
PE
20729 * fns.c (vector): Remove; this old hack is no longer needed.
20730
2baccd04 20731 * xsmfns.c (create_client_leader_window): Rename shadowing arg.
401f10cb 20732 Remove unused var.
dde42981 20733 (gdk_x11_set_sm_client_id) [!USE_GTK]: Don't define.
2baccd04 20734
72391843 20735 * xrdb.c (x_load_resources): Omit unused local.
3565b346 20736
436c16df 20737 * xfns.c (free_frame_menubar, atof): Remove duplicate decls.
8a94ea33 20738 (x_window): Rename locals to avoid shadowing.
dc5ddd85 20739 (USG): Use the kludged USG macro, to pacify gcc.
436c16df 20740
92bb796d 20741 * xterm.c (x_alloc_nearest_color_for_widget): Remove; unused.
bbbef9e1 20742 (x_term_init): Remove local to avoid shadowing.
92bb796d 20743
764430a3 20744 * xfns.c, xterm.c (_XEditResCheckMessages): Protoize decl.
4887c6e2
PE
20745
20746 * xdisp.c, dispextern.h (set_vertical_scroll_bar): Now extern if
20747 USE_TOOLKIT_SCROLL_BARS && !USE_GTK, as xterm.c needs it then.
20748
d1dfb56c
EZ
207492011-04-16 Eli Zaretskii <eliz@gnu.org>
20750
c4354cb4
EZ
20751 * gnutls.c (Fgnutls_boot): Don't pass Lisp_Object to `error'.
20752
d1dfb56c
EZ
20753 Fix regex.c, syntax.c and friends for buffers > 2GB.
20754 * syntax.h (struct gl_state_s): Declare character position members
20755 EMACS_INT.
20756
20757 * syntax.c (update_syntax_table): Declare 2nd argument EMACS_INT.
20758
04f2d78b
CB
20759 * textprop.c (verify_interval_modification, interval_of):
20760 Declare arguments EMACS_INT.
d1dfb56c
EZ
20761
20762 * intervals.c (adjust_intervals_for_insertion): Declare arguments
20763 EMACS_INT.
20764
20765 * intervals.h (CHECK_TOTAL_LENGTH): Cast to EMACS_INT, not `int'.
20766
20767 * indent.c (Fvertical_motion): Local variable it_start is now
20768 EMACS_INT.
20769
20770 * regex.c (re_match, re_match_2, re_match_2_internal)
20771 (bcmp_translate, regcomp, regexec, print_double_string)
20772 (group_in_compile_stack, re_search, re_search_2, regex_compile)
20773 (re_compile_pattern, re_exec): Declare arguments and local
20774 variables `size_t' and `ssize_t' and return values `regoff_t', as
20775 appropriate.
20776 (POP_FAILURE_REG_OR_COUNT) <pfreg>: Declare `long'.
20777 (CHECK_INFINITE_LOOP) <failure>: Declare `ssize_t'.
20778 <compile_stack_type>: `size' and `avail' are now `size_t'.
20779
20780 * regex.h <regoff_t>: Use ssize_t, not int.
20781 (re_search, re_search_2, re_match, re_match_2): Arguments that
20782 specify buffer/string position and length are now ssize_t and
20783 size_t. Return type is regoff_t.
20784
613052cd
BK
207852011-04-16 Ben Key <bkey76@gmail.com>
20786
20787 * nsfont.m: Fixed bugs in ns_get_family and
20788 ns_descriptor_to_entity that were caused by using free to
20789 deallocate memory blocks that were allocated by xmalloc (via
20790 xstrdup). This caused Emacs to crash when compiled with
20791 XMALLOC_OVERRUN_CHECK defined (when Emacs was configured with
20792 --enable-checking=xmallocoverrun). xfree is now used to
20793 deallocate these memory blocks.
20794
4170f62f 207952011-04-15 Paul Eggert <eggert@cs.ucla.edu>
3e047f51 20796
71b41406
PE
20797 * sysdep.c (emacs_read): Remove unnecessary check vs MAX_RW_COUNT.
20798
9587a89d
PE
20799 emacs_write: Accept and return EMACS_INT for sizes.
20800 See http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00514.html
20801 et seq.
20802 * gnutls.c, gnutls.h (emacs_gnutls_read, emacs_gnutls_write):
20803 Accept and return EMACS_INT.
20804 (emacs_gnutls_write): Return the number of bytes written on
20805 partial writes.
20806 * sysdep.c, lisp.h (emacs_read, emacs_write): Likewise.
273a5f82
PE
20807 (emacs_read, emacs_write): Remove check for negative size, as the
20808 Emacs source code has been audited now.
9587a89d
PE
20809 * sysdep.c (MAX_RW_COUNT): New macro, to work around kernel bugs.
20810 (emacs_read, emacs_write): Use it.
273a5f82
PE
20811 * process.c (send_process): Adjust to the new signatures of
20812 emacs_write and emacs_gnutls_write. Do not attempt to store
20813 a byte offset into an 'int'; it might overflow.
9587a89d 20814 See http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00483.html
273a5f82 20815
3e047f51
PE
20816 * sound.c: Don't assume sizes fit in 'int'.
20817 (struct sound_device.period_size, alsa_period_size):
9c3c56a7 20818 Return EMACS_INT, not int.
3e047f51 20819 (struct sound_device.write, vox_write, alsa_write):
9c3c56a7
PE
20820 Accept EMACS_INT, not int.
20821 (wav_play, au_play): Use EMACS_INT to store sizes and to
3e047f51
PE
20822 record read return values.
20823
cc39a9db
BK
208242011-04-15 Ben Key <bkey76@gmail.com>
20825
c9d0ec6d
JB
20826 * keyboard.c (Qundefined): Don't declare static since it is used
20827 in nsfns.m.
20828 * xfaces.c (Qbold, Qexpanded, Qitalic, Qcondensed): Don't declare
20829 static since they are used in nsfont.m.
cc39a9db 20830
6c60eb9f
SM
208312011-04-15 Stefan Monnier <monnier@iro.umontreal.ca>
20832
20833 * process.c (Qprocessp): Don't declare static.
20834 * lisp.h (Qprocessp): Declare again.
20835
7990b61a
JB
208362011-04-15 Juanma Barranquero <lekktu@gmail.com>
20837
20838 * font.c (Qopentype): Don't make static (used from w32uniscribe.c).
20839
5d4cb038
PE
208402011-04-14 Paul Eggert <eggert@cs.ucla.edu>
20841
8bd7b830 20842 Improve C-level modularity by making more things 'static'.
cd64ea1d 20843
e3b27b31
PE
20844 Don't publish debugger-only interfaces to other modules.
20845 * lisp.h (safe_debug_print, debug_output_compilation_hack):
20846 (verify_bytepos, count_markers): Move decls to the only modules
20847 that need them.
20848 * region-cache.h (pp_cache): Likewise.
20849 * window.h (check_all_windows): Likewise.
20850 * marker.c, print.c, region-cache.c, window.c: Decls moved here.
20851
5d4cb038
PE
20852 * sysdep.c (croak): Now static, if
20853 defined TIOCNOTTY || defined USG5 || defined CYGWIN.
20854 * syssignal.h (croak): Declare only if not static.
69003fd8
PE
20855
20856 * alloc.c (refill_memory_reserve): Now static if
20857 !defined REL_ALLOC || defined SYSTEM_MALLOC.
20858 * lisp.h (refill_memory_reserve): Declare only if not static.
93ea6e8f 20859
e87b6180
PE
20860 * xsettings.c, xsettings.h (xsettings_get_system_normal_font):
20861 Define only if USE_LUCID.
20862
ac64929e
PE
20863 * xrdb.c (x_customization_string, x_rm_string): Now static.
20864
6f37259d
PE
20865 * xmenu.c (x_menu_wait_for_event): Export only if USE_MOTIF.
20866 * xterm.h (x_menu_wait_for_event): Declare only if USE_MOTIF.
20867
1683e3ab
PE
20868 * xdisp.c (draw_row_with_mouse_face): Now static.
20869 * dispextern.h (draw_row_with_mouse_fave): Remove decl.
20870
de9c2632
PE
20871 * window.h (check_all_windows): Mark externally visible.
20872
2b96acb7
PE
20873 * window.c (window_deletion_count): Now static.
20874
20875 * undo.c: Make symbols static if they're not exported.
20876 (last_undo_buffer, last_boundary_position, pending_boundary):
20877 Now static.
20878
50436f33
PE
20879 * textprop.c (interval_insert_behind_hooks): Now static.
20880 (interval_insert_in_front_hooks): Likewise.
20881
64520e5c
PE
20882 * term.c: Make symbols static if they're not exported.
20883 (tty_turn_off_highlight, get_tty_terminal, max_frame_cols):
20884 (max_frame_lines, tty_set_terminal_modes):
20885 (tty_reset_terminal_modes, tty_turn_off_highlight):
20886 (get_tty_terminal): Now static.
20887 (term_mouse_moveto): Do not define if HAVE_WINDOW_SYSTEM.
20888 * termhooks.h (term_mouse_moveto): Do not declare if
8bd7b830 20889 HAVE_WINDOW_SYSTEM.
64520e5c
PE
20890 * dispextern.h (tty_set_terminal_modes, tty_reset_terminal_modes):
20891 (tty_turn_off_highlight, get_tty_terminal): Remove decls.
20892
1fa53021
PE
20893 * sysdep.c: Make symbols static if they're not exported.
20894 (emacs_get_tty, emacs_set_tty, old_fcntl_flags, old_fcntl_owner):
20895 Now static.
20896 (sigprocmask_set, full_mask): Remove; unused.
20897 (wait_debugging): Mark as visible.
20898 * syssignal.h (SIGFULLMASK, full_mask): Remove decls.
20899 * systty.h (emacs_get_tty, emacs_set_tty): Remove decls.
20900
d4b43b22
PE
20901 * syntax.c (syntax_temp): Define only if !__GNUC__.
20902
b7c513d0
PE
20903 * sound.c (current_sound_device, current_sound): Now static.
20904
989b29ad
PE
20905 * search.c (searchbufs, searchbuf_head): Now static.
20906
13a55a78
PE
20907 * scroll.c (scroll_cost): Remove; unused.
20908 * dispextern.h (scroll_cost): Remove decl.
20909
de68a1fc
PE
20910 * region-cache.h (pp_cache): Mark as externally visible.
20911
40ccffa6
PE
20912 * process.c: Make symbols static if they're not exported.
20913 (process_tick, update_tick, create_process, chan_process):
20914 (Vprocess_alist, proc_buffered_char, datagram_access):
20915 (fd_callback_data, send_process_frame, process_sent_to): Now static.
20916 (deactivate_process): Mark defn as static, as well as decl.
20917 * lisp.h (create_process): Remove decl.
20918 * process.h (chan_process, Vprocess_alist): Remove decls.
20919
ad64fc97
PE
20920 * print.c: Make symbols static if they're not exported.
20921 (print_depth, new_backquote_output, being_printed, print_buffer):
20922 (print_buffer_size, print_buffer_pos, print_buffer_pos_byte):
20923 (print_interval, print_number_index, initial_stderr_stream):
20924 Now static.
20925 * lisp.h (Fprinc): Remove decl.
20926 (debug_output_compilation_hack): Mark as externally visible.
20927
adddb265
PE
20928 * sysdep.c (croak): Move decl from here to syssignal.h.
20929 * syssignal.h (croak): Put it here, so the API can be checked when
20930 'croak' is called from dissociate_if_controlling_tty.
20931
1717ede2
PE
20932 * minibuf.c: Make symbols static if they're not exported.
20933 (minibuf_save_list, choose_minibuf_frame): Now static.
20934 * lisp.h (choose_minibuf_frame): Remove decl.
20935
fa5fb2bc
PE
20936 * lisp.h (verify_bytepos, count_markers): Mark as externally visible.
20937
1e3890d1
PE
20938 * lread.c: Make symbols static if they're not exported.
20939 (read_objects, initial_obarray, oblookup_last_bucket_number):
20940 Now static.
20941 (make_symbol): Remove; unused.
20942 * lisp.h (initial_obarray, make_symbol): Remove decls.
20943
8a1414fa
PE
20944 * keyboard.c: Make symbols static if they're not exported.
20945 (single_kboard, recent_keys_index, total_keys, recent_keys):
20946 (this_command_key_count_reset, raw_keybuf, raw_keybuf_count):
20947 (this_single_command_key_start, echoing, last_auto_save):
20948 (read_key_sequence_cmd, dribble, recursive_edit_unwind):
20949 (command_loop, echo_now, keyboard_init_hook, help_char_p):
20950 (quit_throw_to_read_char, command_loop_2, top_level_1, poll_timer):
20951 (Vlispy_mouse_stem, double_click_count):
20952 Now static.
20953 (force_auto_save_soon): Define only if SIGDANGER.
20954 (ignore_mouse_drag_p): Now static if
20955 !defined HAVE_WINDOW_SYSTEM || defined USE_GTK || defined HAVE_NS.
20956 (print_help): Remove; unused.
20957 (stop_character, last_timer_event): Mark as externally visible.
20958 * keyboard.h (ignore_mouse_drag_p): Declare only if
20959 defined HAVE_WINDOW_SYSTEM && !defined USE_GTK && !defined HAVE_NS.
20960 (echo_now, help_char_p, quit_throw_to_read_char): Remove decls.
20961 * lisp.h (echoing): Remove decl.
20962 (force_auto_save_soon): Declare only if SIGDANGER.
20963 * xdisp.c (redisplay_window): Simplify code, to make it more
20964 obvious that ignore_mouse_drag_p is not accessed if !defined
20965 USE_GTK && !defined HAVE_NS.
20966
93ea6e8f
PE
20967 * intervals.c: Make symbols static if they're not exported.
20968 (merge_properties_sticky, merge_interval_right, delete_interval):
20969 Now static.
20970 * intervals.h (merge_interval_right, delete_interval): Remove decls.
20971
77382fcc
PE
20972 * insdel.c: Make symbols static if they're not exported.
20973 However, leave prepare_to_modify_buffer alone. It's never
20974 called from outside this function, but that appears to be a bug.
20975 (combine_after_change_list, combine_after_change_buffer):
4889fc82 20976 (adjust_after_replace, signal_before_change): Now static.
77382fcc
PE
20977 (adjust_after_replace_noundo): Remove; unused.
20978 * lisp.h (adjust_after_replace, adjust_after_replace_noundo):
4889fc82 20979 (signal_before_change): Remove decls.
77382fcc 20980
9306c32e
PE
20981 * indent.c (val_compute_motion, val_vmotion): Now static.
20982
cd44d2eb
PE
20983 * image.c: Make symbols static if they're not exported.
20984 * dispextern.h (x_create_bitmap_from_xpm_data): Do not declare
20985 if USE_GTK.
20986 * image.c (x_create_bitmap_from_xpm_data): Do not define if USE_GTK.
20987 (xpm_color_cache, ct_table, ct_colors_allocated): Now static.
20988
ad9a7a06
PE
20989 * fringe.c (standard_bitmaps): Now static.
20990 (max_used_fringe_bitmap): Now static, unless HAVE_NS.
20991
81626931
PE
20992 * frame.c: Make symbols static if they're not exported.
20993 (x_report_frame_params, make_terminal_frame): Now static.
20994 (get_frame_param): Now static, unless HAVE_NS.
20995 (x_fullscreen_adjust): Define if WINDOWSNT, not if HAVE_WINDOW_SYSTEM.
20996 (x_get_resource_string): Remove; not used.
20997 * frame.h (make_terminal_frame, x_report_frame_params):
20998 (x_get_resource_string); Remove decls.
20999 (x_fullscreen_adjust): Declare only if WINDOWSNT.
21000 * lisp.h (get_frame_param): Declare only if HAVE_NS.
21001
239f9db9
PE
21002 * font.c, fontset.c: Make symbols static if they're not exported.
21003 * dispextern.h (FACE_SUITABLE_FOR_ASCII_CHAR_P): New macro.
21004 (FACE_SUITABLE_FOR_CHAR_P): Use it.
21005 * font.c (font_close_object): Now static.
21006 * font.h (font_close_object): Remove.
21007 * fontset.c (FONTSET_OBJLIST): Remove.
21008 (free_realized_fontset) #if-0 the body, which does nothing.
21009 (face_suitable_for_char_p): #if-0, as it's never called.
21010 * fontset.h (face_suitable_for_char_p): Remove decl.
04f2d78b
CB
21011 * xfaces.c (face_at_string_position):
21012 Use FACE_SUITABLE_FOR_ASCII_CHAR_P, not FACE_SUITABLE_FOR_CHAR_P,
239f9db9
PE
21013 since 0 is always ASCII.
21014
dfcf3579
PE
21015 * fns.c (weak_hash_tables): Now static.
21016
5045092b
PE
21017 * fileio.c: Make symbols static if they're not exported.
21018 (auto_saving, auto_save_mode_bits, auto_save_error_occurred):
21019 (Vwrite_region_annotation_buffers): Now static.
21020
57a96f5c
PE
21021 * eval.c: Make symbols static if they're not exported.
21022 (backtrace_list, lisp_eval_depth, when_entered_debugger): Now static.
21023 * lisp.h (backtrace_list): Remove decl.
21024
35f08c38
PE
21025 * emacs.c: Make symbols static if they're not exported.
21026 (malloc_state_ptr, malloc_using_checking, syms_of_emacs):
21027 (fatal_error_code, fatal_error_signal_hook, standard_args):
21028 Now static.
21029 (fatal_error_signal): Now static, unless FLOAT_CATCH_SIGKILL.
21030 (DEFINE_DUMMY_FUNCTION): Mark function as externally visible.
21031 (__CTOR_LIST__, __DTOR_LIST__): Now externally visible.
21032 * lisp.h (fatal_error_signal_hook): Remove decl.
21033 (fatal_error_signal): Declare only if FLOAT_CATCH_SIGKILL.
21034
f44bd759
PE
21035 * editfns.c: Move a (normally-unused) function to its only use.
21036 * editfns.c, lisp.h (get_operating_system_release): Remove.
21037 * process.c (init_process) [DARWIN_OS]: Do it inline, as it is not
21038 worth the hassle of breaking this out.
21039
b532497d
PE
21040 * xterm.c: Make symbols static if they're not exported.
21041 (x_raise_frame, x_lower_frame, x_wm_set_window_state):
21042 (x_wm_set_icon_pixmap, x_initialize, XTread_socket_fake_io_error):
21043 (x_destroy_window, x_delete_display):
21044 Now static.
21045 (x_dispatch_event): Now static if ! (USE_MOTIF || USE_X_TOOLKIT).
21046 (x_mouse_leave): Remove; unused.
21047 * xterm.h (x_display_info_for_name, x_raise_frame, x_lower_frame):
21048 (x_destroy_window, x_wm_set_window_state, x_wm_set_icon_pixmap):
21049 (x_delete_display, x_initialize, x_set_border_pixel, x_screen_planes):
21050 Remove decls.
21051 (x_mouse_leave): Declare only if WINDOWSNT.
21052 (x_dispatch_event): Declare only if USE_MOTIF or USE_X_TOOLKIT.
21053 (xic_create_fontsetname): Declare only if HAVE_X_WINDOWS &&
21054 USE_X_TOOLKIT.
21055
1675728f
PE
21056 * ftxfont.c: Make symbols static if they're not exported.
21057 (ftxfont_driver): Export only if !defined HAVE_XFT && def8ined
21058 HAVE_FREETYPE.
21059 * font.h (ftxfont_driver): Likewise.
21060
e4cebfca
PE
21061 * xfns.c: Make symbols static if they're not exported.
21062 (x_last_font_name, x_display_info_for_name):
21063 (x_set_foreground_color, x_set_background_color, x_set_mouse_color):
21064 (x_set_cursor_color, x_set_border_pixel, x_set_border_color):
21065 (x_set_cursor_type, x_set_icon_type, x_set_icon_name):
21066 (x_set_scroll_bar_foreground, x_set_scroll_bar_background):
21067 (x_explicitly_set_name, x_set_title, xic_defaut_fontset, tip_timer):
21068 (last_show_tip_args): Now static.
21069 (xic_defaut_fontset, xic_create_fontsetname): Define only if
21070 defined HAVE_X_WINDOWS && defined USE_X_TOOLKIT
21071 (x_screen_planes): Remove; unused.
21072 * dispextern.h (x_screen_planes): Remove decl.
21073
5bf46f05
PE
21074 * dispnew.c: Make symbols static if they're not exported.
21075 * dispextern.h (redraw_garbaged_frames, scrolling):
21076 (increment_row_positions): Remove.
21077 * dispnew.c (new_glyph_matrix, increment_row_positions, scrolling):
21078 (delayed_size_change, glyph_matrix_count, glyph_pool_count):
21079 Now static.
21080 (redraw_garbaged_frames): Remove; unused.
21081
435f4c28
PE
21082 * xfaces.c: Make symbols static if they're not exported.
21083 * dispextern.h (ascii_face_of_lisp_face, free_realized_face):
21084 Remove decls.
21085 * xterm.h (defined_color): Remove decls.
21086 (x_free_dpy_colors): Declare only if USE_X_TOOLKIT.
21087 * xfaces.c (tty_suppress_bold_inverse_default_colors_p):
21088 (menu_face_changed_default, defined_color, free_realized_face):
21089 (x_free_dpy_colors): Define only if USE_X_TOOLKIT.
21090 (ascii_face_of_lisp_face): Remove; unused.
21091
8524aef3
PE
21092 * xdisp.c: Make symbols static if they're not exported.
21093 * dispextern.h (scratch_glyph_row, window_box_edges):
21094 (glyph_to_pixel_coords, set_cursor_from_row):
21095 (get_next_display_element, set_iterator_to_next):
21096 (highlight_trailing_whitespace, frame_to_window_pixel_xy):
21097 (show_mouse_face): Remove decls
21098 * frame.h (message_buf_print): Likewise.
21099 * lisp.h (pop_message, set_message, check_point_in_composition):
21100 Likewise.
21101 * xterm.h (set_vertical_scroll_bar): Likewise.
21102 * xdisp.c (list_of_error, Vmessage_stack, line_number_displayed):
21103 (message_buf_print, scratch_glyph_row, displayed_buffer):
21104 (set_iterator_to_next, pop_message, set_message, set_cursor_from_row):
21105 (get_next_display_element, show_mouse_face, window_box_edges):
21106 (frame_to_window_pixel_xy, check_point_in_composition):
21107 (set_vertical_scroll_bar, highlight_trailing_whitespace): Now static.
21108 (glyph_to_pixel_coords): Remove; unused.
21109
16390cd2
PE
21110 * dired.c (file_name_completion): Now static.
21111
21112 * dbusbind.c (xd_in_read_queued_messages): Now static.
21113
a25f4dfa
PE
21114 * lisp.h (circular_list_error, FOREACH): Remove; unused.
21115 * data.c (circular_list_error): Remove.
21116
14a9c8df
PE
21117 * commands.h (last_point_position, last_point_position_buffer):
21118 (last_point_position_window): Remove decls.
21119 * keyboard.c: Make these variables static.
21120
04f2d78b
CB
21121 * coding.h (coding, code_convert_region, encode_coding_gap):
21122 Remove decls.
74ab6df5
PE
21123 * coding.c (Vsjis_coding_system, Vbig5_coding_system):
21124 (iso_code_class, detect_coding, code_convert_region): Now static.
21125 (encode_coding_gap): Remove; unused.
21126
38dfbee1
PE
21127 * chartab.c (chartab_chars, chartab_bits): Now static.
21128
a2cb4e63
PE
21129 * charset.h (charset_iso_8859_1): Remove decl.
21130 * charset.c (charset_iso_8859_1, charset_emacs, map_charset_for_dump):
21131 Now static.
21132
127198fd
PE
21133 * ccl.h (check_ccl_update, Vccl_program_table): Remove decls.
21134 * ccl.c (Vccl_program_table): Now static.
21135 (check_ccl_update): Remove; unused.
21136
d85b608f
PE
21137 * category.c (SET_CATEGORY_SET, set_category_set): Move here.
21138 * category.h: ... from here.
21139 * category.c (check_category_table, set_category_set): Now static.
21140
31cd66f3
PE
21141 * casetab.c (Vascii_upcase_table, Vascii_eqv_table): Now static.
21142 * lisp.h: Remove these decls.
21143
c358e587
PE
21144 * buffer.c (buffer_count): Remove unused var.
21145
e78aecca
PE
21146 * bidi.c (bidi_dump_cached_states): Mark as externally visible,
21147 so that it's not optimized away.
21148 (bidi_ignore_explicit_marks_for_paragraph_level): Likewise.
21149 * dispextern.h (bidi_dump_cached_states): Remove, since it's
21150 exported only to the debugger.
21151
e192d7d3 21152 * atimer.c (alarm_signal_handler, run_all_atimers): Now static.
04f2d78b 21153 * atimer.h (run_all_atimers): Remove; not exported.
e192d7d3 21154
92470028
PE
21155 font.c: Make copy_font_spec and merge_font_spec ordinary C functions.
21156 * font.c (copy_font_spec): Rename from Fcopy_font_spec, since it
21157 was inaccessible from Lisp.
21158 (merge_font_spec): Likewise, renaming from Fmerge_font_spec.
21159 * font.c, font.h, fontset.c, xfaces.c, xfont.c: Change all uses.
21160
244ed907
PE
21161 alloc.c: Import and export fewer symbols, and remove unused items.
21162 * lisp.h (suppress_checking, die): Declare only if ENABLE_CHECKING
21163 is defined.
21164 (suppress_checking): Add EXTERNALLY_VISIBLE attribute, so that
21165 it's not optimized away by whole-program optimization.
21166 (message_enable_multibyte, free_misc): Remove.
21167 (catchlist, handlerlist, mark_backtrace):
21168 Declare only if BYTE_MARK_STACK.
21169 (mark_byte_stack): Likewise, fixing a ifdef-vs-if typo.
21170 * alloc.c (pure): Export only if VIRT_ADDR_VARIES is defined.
21171 (message_enable_multibyte): Remove decl.
21172 (free_misc, interval_free_list, float_block, float_block_index):
21173 (n_float_blocks, float_free_list, cons_block, cons_block_index):
21174 (cons_free_list, last_marked_index):
21175 Now static.
21176 (suppress_checking, die): Define only if ENABLE_CHECKING is defined.
21177 * eval.c (catchlist, handlerlist): Export only if BYTE_MARK_STACK.
21178 (mark_backtrace): Define only if BYTE_MARK_STACK.
21179 * xdisp.c (message_enable_multibyte): Now static.
21180
61c2b50e 21181 Declare Lisp_Object Q* variables to be 'static' if not exported.
955cbe7b
PE
21182 This makes it easier for human readers (and static analyzers)
21183 to see whether these variables are used from other modules.
21184 * alloc.c, buffer.c, bytecode.c, callint.c, casetab.c, category.c:
21185 * ccl.c, character.c, charset.c, cmds.c, coding.c, composite.c:
21186 * data.c, dbusbind.c, dired.c, editfns.c, eval.c, fileio.c, fns.c:
21187 * font.c, frame.c, fringe.c, ftfont.c, image.c, keyboard.c, keymap.c:
21188 * lread.c, macros.c, minibuf.c, print.c, process.c, search.c:
21189 * sound.c, syntax.c, textprop.c, window.c, xdisp.c, xfaces.c, xfns.c:
21190 * xmenu.c, xselect.c:
21191 Declare Q* vars static if they are not used in other modules.
21192 * ccl.h, character.h, charset.h, coding.h, composite.h, font.h:
21193 * frame.h, intervals.h, keyboard.h, lisp.h, process.h, syntax.h:
21194 Remove decls of unexported vars.
21195 * keyboard.h (EVENT_HEAD_UNMODIFIED): Remove now-unused macro.
21196
95c82688
PE
21197 * lisp.h (DEFINE_FUNC): Make sname 'static'.
21198
16a97296
PE
21199 Make Emacs functions such as Fatom 'static' by default.
21200 This makes it easier for human readers (and static analyzers)
21201 to see whether these functions can be called from other modules.
21202 DEFUN now defines a static function. To make the function external
21203 so that it can be used in other C modules, use the new macro DEFUE.
8bd7b830
PE
21204 * lisp.h (Funibyte_char_to_multibyte, Fsyntax_table_p):
21205 (Finit_image_library):
16a97296
PE
21206 (Feval_region, Fbacktrace, Ffetch_bytecode, Fswitch_to_buffer):
21207 (Ffile_executable_p, Fmake_symbolic_link, Fcommand_execute):
21208 (Fget_process, Fdocumentation_property, Fbyte_code, Ffile_attributes):
21209 Remove decls, since these functions are now static.
21210 (Funintern, Fget_internal_run_time): New decls, since these functions
21211 were already external.
95c82688 21212
16a97296
PE
21213 * alloc.c, buffer.c, callint.c, callproc.c, casefiddle.c, casetab.c:
21214 * ccl.c, character.c, chartab.c, cmds.c, coding.c, data.c, dispnew.c:
21215 * doc.c, editfns.c, emacs.c, eval.c, fileio.c, filelock.c, floatfns.c:
21216 * fns.c, font.c, fontset.c, frame.c, image.c, indent.c:
21217 * keyboard.c, keymap.c, lread.c:
21218 * macros.c, marker.c, menu.c, minibuf.c, print.c, process.c, search.c:
21219 * syntax.c, term.c, terminal.c, textprop.c, undo.c:
21220 * window.c, xdisp.c, xfaces.c, xfns.c, xmenu.c, xsettings.c:
21221 Mark functions with DEFUE instead of DEFUN,
21222 if they are used in other modules.
21223 * buffer.c (Fset_buffer_major_mode, Fdelete_overlay): New forward
21224 decls for now-static functions.
21225 * buffer.h (Fdelete_overlay): Remove decl.
21226 * callproc.c (Fgetenv_internal): Mark as internal.
21227 * composite.c (Fremove_list_of_text_properties): Remove decl.
21228 (Fcomposition_get_gstring): New forward static decl.
21229 * composite.h (Fcomposite_get_gstring): Remove decl.
21230 * dired.c (Ffile_attributes): New forward static decl.
21231 * doc.c (Fdocumntation_property): New forward static decl.
21232 * eval.c (Ffetch_bytecode): New forward static decl.
21233 (Funintern): Remove extern decl; now in .h file where it belongs.
21234 * fileio.c (Fmake_symbolic_link): New forward static decl.
21235 * image.c (Finit_image_library): New forward static decl.
21236 * insdel.c (Fcombine_after_change_execute): Make forward decl static.
21237 * intervals.h (Fprevious_property_change):
21238 (Fremove_list_of_text_properties): Remove decls.
21239 * keyboard.c (Fthis_command_keys): Remove decl.
21240 (Fcommand_execute): New forward static decl.
21241 * keymap.c (Flookup_key): New forward static decl.
21242 (Fcopy_keymap): Now static.
21243 * keymap.h (Flookup_key): Remove decl.
21244 * process.c (Fget_process): New forward static decl.
21245 (Fprocess_datagram_address): Mark as internal.
21246 * syntax.c (Fsyntax_table_p): New forward static decl.
21247 (skip_chars): Remove duplicate decl.
21248 * textprop.c (Fprevious_property_change): New forward static decl.
21249 * window.c (Fset_window_fringes, Fset_window_scroll_bars):
21250 Now internal.
21251 (Fset_window_margins, Fset_window_vscroll): New forward static decls.
21252 * window.h (Fset_window_vscroll, Fset_window_margins): Remove decls.
21253
785bbd42
PE
21254 * editfns.c (Fformat): Remove unreachable code.
21255
8b913b57
AS
212562011-04-14 Andreas Schwab <schwab@linux-m68k.org>
21257
21258 * fileio.c (Finsert_file_contents): Fix typo in 2005-05-13
21259 change. (Bug#8496)
21260
a6744a35
EZ
212612011-04-13 Eli Zaretskii <eliz@gnu.org>
21262
21263 * xdisp.c (handle_invisible_prop): Don't call bidi_paragraph_init
21264 when at ZV. (Bug#8487)
21265
e7974947
AS
212662011-04-12 Andreas Schwab <schwab@linux-m68k.org>
21267
baad03f0
AS
21268 * charset.c (Fclear_charset_maps): Use xfree instead of free.
21269 (Bug#8437)
21270 * keyboard.c (parse_tool_bar_item): Likewise.
21271 * sound.c (sound_cleanup, alsa_close): Likewise.
21272 * termcap.c (tgetent): Likewise.
21273 * xfns.c (x_default_font_parameter): Likewise.
21274 * xsettings.c (read_and_apply_settings): Likewise.
21275
e7974947
AS
21276 * alloc.c (overrun_check_malloc, overrun_check_realloc)
21277 (overrun_check_free): Protoize.
21278
28272684
PE
212792011-04-12 Paul Eggert <eggert@cs.ucla.edu>
21280
21281 * sysdep.c (emacs_read, emacs_write): Check for negative sizes
21282 since callers should never pass a negative size.
21283 Change the signature to match that of plain 'read' and 'write'; see
21284 <http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00397.html>.
21285 * lisp.h: Update prototypes of emacs_write and emacs_read.
21286
11997c76
EZ
212872011-04-11 Eli Zaretskii <eliz@gnu.org>
21288
21289 * xdisp.c (redisplay_window): Don't try to determine the character
21290 position of the scroll margin if the window start point w->startp
e896f03c 21291 is outside the buffer's accessible region. (Bug#8468)
11997c76 21292
8a2cbd72
EZ
212932011-04-10 Eli Zaretskii <eliz@gnu.org>
21294
21295 Fix write-region and its subroutines for buffers > 2GB.
21296 * fileio.c (a_write, e_write): Modify declaration of arguments and
21297 local variables to support buffers larger than 2GB.
21298 (Fcopy_file): Use EMACS_INT for return value of emacs_read.
21299
21300 * sysdep.c (emacs_write, emacs_read): Use ssize_t for last
21301 argument, local variables, and return value.
21302
21303 * lisp.h: Update prototypes of emacs_write and emacs_read.
21304
21305 * sound.c (vox_write): Use ssize_t for return value of emacs_write.
21306
4073e537 213072011-04-10 Paul Eggert <eggert@cs.ucla.edu>
eb3f1cc8 21308
1ebfdcb6
PE
21309 * xdisp.c (vmessage): Use memchr, not strnlen, which some hosts lack.
21310
b2ded58d
PE
21311 Fix more problems found by GCC 4.6.0's static checks.
21312
7d66342c
PE
21313 * xdisp.c (vmessage): Use a better test for character truncation.
21314
bbf47d44
PE
21315 * charset.c (load_charset_map): <, not <=, for optimization,
21316 and to avoid potential problems with integer overflow.
9248994d 21317 * chartab.c (sub_char_table_set_range, char_table_set_range): Likewise.
f9a68bc5 21318 * casetab.c (set_identity, shuffle): Likewise.
3ab1c7ce 21319 * editfns.c (Fformat): Likewise.
1e69125e 21320 * syntax.c (skip_chars): Likewise.
3befa583 21321
e3019616
PE
21322 * xmenu.c (set_frame_menubar): Allocate smaller local vectors.
21323 This also lets GCC 4.6.0 generate slightly better loop code.
21324
becfa255
PE
21325 * callint.c (Fcall_interactively): <, not <=, for optimization.
21326 (Fcall_interactively): Count the number of arguments produced,
21327 not the number of arguments given. This is simpler and lets GCC
21328 4.6.0 generate slightly better code.
21329
dae0cd48
PE
21330 * ftfont.c: Distingish more carefully between FcChar8 and char.
21331 The previous code passed unsigned char * to a functions like
21332 strlen and xstrcasecmp that expect char *, which does not
21333 conform to the C standard.
21334 (get_adstyle_property, ftfont_pattern_entity): Use FcChar8 for
21335 arguments to FcPatternGetString, and explicitly cast FcChar8 * to
21336 char * when the C standard requires it.
21337
76032d70
PE
21338 * keyboard.c (read_char): Remove unused var.
21339
eb3f1cc8
PE
21340 * eval.c: Port to Windows vsnprintf (Bug#8435).
21341 Include <limits.h>.
21342 (SIZE_MAX): Define if the headers do not.
21343 (verror): Do not give up if vsnprintf returns a negative count.
21344 Instead, grow the buffer. This ports to Windows vsnprintf, which
21345 does not conform to C99. Problem reported by Eli Zaretskii.
21346 Also, simplify the allocation scheme, by avoiding the need for
21347 calling realloc, and removing the ALLOCATED variable.
21348
70476b54
PE
21349 * eval.c (verror): Initial buffer size is 4000 (not 200) bytes.
21350
12020a9e
PE
21351 Remove invocations of doprnt, as Emacs now uses vsnprintf.
21352 But keep the doprint source code for now, as we might revamp it
21353 and use it again (Bug#8435).
ea6c7ae6
PE
21354 * lisp.h (doprnt): Remove.
21355 * Makefile.in (base_obj): Remove doprnt.o.
21356 * deps.mk (doprnt.o): Remove.
21357
5fdb398c
PE
21358 error: Print 32- and 64-bit integers portably (Bug#8435).
21359 Without this change, on typical 64-bit hosts error ("...%d...", N)
21360 was used to print both 32- and 64-bit integers N, which relied on
21361 undefined behavior.
61bdb816 21362 * lisp.h, m/amdx86-64.h, m/ia64.h, m/ibms390x.h (pEd): New macro.
5fdb398c
PE
21363 * lisp.h (error, verror): Mark as printf-like functions.
21364 * eval.c (verror): Use vsnprintf, not doprnt, to do the real work.
21365 Report overflow in size calculations when allocating printf buffer.
21366 Do not truncate output string at its first null byte.
21367 * xdisp.c (vmessage): Use vsnprintf, not doprnt, to do the real work.
21368 Truncate the output at a character boundary, since vsnprintf does not
21369 do that.
21370 * charset.c (check_iso_charset_parameter): Convert internal
21371 character to string before calling 'error', since %c now has the
21372 printf meaning.
21373 * coding.c (Fdecode_sjis_char, Fdecode_big5_char): Avoid int
21374 overflow when computing char to be passed to 'error'. Do not
21375 pass Lisp_Object to 'error'; pass the integer instead.
21376 * nsfns.m (Fns_do_applescript): Use int, not long, since it's
21377 formatted with plain %d.
21378
b189fa66
PE
21379 * eval.c (internal_lisp_condition_case): Don't pass spurious arg.
21380
bff87ef0
PE
21381 * keyboard.c (access_keymap_keyremap): Print func name, not garbage.
21382
7e2cac20
PE
21383 * coding.c (Fdecode_sjis_char): Don't assume CODE fits in int.
21384
ce4d90b5
PE
21385 * xterm.c (x_catch_errors): Remove duplicate declaration.
21386
266c9547
PE
21387 * term.c (maybe_fatal): Mark its 3rd arg as a printf format, too.
21388
79c49ad2
PE
21389 * xdisp.c, lisp.h (message_nolog): Remove; unused.
21390
368f4090
JM
213912011-04-10 Jim Meyering <meyering@redhat.com>
21392
21393 use ssize_t and size_t for read- and write-like emacs_gnutls_* functions
21394 * gnutls.c (emacs_gnutls_read): Adjust signature to be more read-like:
21395 return ssize_t not "int", and use size_t as the buffer length.
21396 (emacs_gnutls_write): Likewise, and make the buffer pointer "const".
21397 * gnutls.h: Update declarations.
21398 * process.c (read_process_output): Use ssize_t, to match.
21399 (send_process): Likewise.
21400
a32d4040
CY
214012011-04-09 Chong Yidong <cyd@stupidchicken.com>
21402
21403 * image.c (Fimagemagick_types): Doc fix, and comment cleanup.
21404
8546720e 214052011-04-09 Chong Yidong <cyd@stupidchicken.com>
aac0c6e3 21406
04f2d78b
CB
21407 * ftfont.c (get_adstyle_property, ftfont_pattern_entity):
21408 Use unsigned char, to match FcChar8 type definition.
aac0c6e3 21409
8546720e
GM
21410 * xterm.c (handle_one_xevent):
21411 * xmenu.c (create_and_show_popup_menu):
21412 * xselect.c (x_decline_selection_request)
21413 (x_reply_selection_request): Avoid type-punned deref of X events.
aac0c6e3 21414
0a2f5c1a 214152011-04-09 Eli Zaretskii <eliz@gnu.org>
a53e2e89
EZ
21416
21417 Fix some uses of `int' instead of EMACS_INT.
21418 * search.c (string_match_1, fast_string_match)
21419 (fast_c_string_match_ignore_case, fast_string_match_ignore_case)
21420 (scan_buffer, find_next_newline_no_quit)
21421 (find_before_next_newline, search_command, Freplace_match)
21422 (Fmatch_data): Make some `int' variables be EMACS_INT.
21423
21424 * xdisp.c (display_count_lines): 3rd argument and return value now
21425 EMACS_INT. All callers changed.
21426 (pint2hrstr): Last argument is now EMACS_INT.
21427
21428 * coding.c (detect_coding_utf_8, detect_coding_emacs_mule)
21429 (detect_coding_iso_2022, detect_coding_sjis, detect_coding_big5)
21430 (detect_coding_ccl, detect_coding_charset, decode_coding_utf_8)
21431 (decode_coding_utf_16, decode_coding_emacs_mule)
21432 (decode_coding_iso_2022, decode_coding_sjis, decode_coding_big5)
21433 (decode_coding_ccl, decode_coding_charset)
21434 <consumed_chars, consumed_chars_base>: Declare EMACS_INT.
21435 (decode_coding_iso_2022, decode_coding_emacs_mule)
21436 (decode_coding_sjis, decode_coding_big5, decode_coding_charset)
21437 <char_offset, last_offset>: Declare EMACS_INT.
21438 (encode_coding_utf_8, encode_coding_utf_16)
21439 (encode_coding_emacs_mule, encode_invocation_designation)
21440 (encode_designation_at_bol, encode_coding_iso_2022)
21441 (encode_coding_sjis, encode_coding_big5, encode_coding_ccl)
21442 (encode_coding_raw_text, encode_coding_charset) <produced_chars>:
21443 Declare EMACS_INT.
21444 (ASSURE_DESTINATION): Declare more_bytes EMACS_INT.
21445 (encode_invocation_designation): Last argument P_NCHARS is now
21446 EMACS_INT.
21447 (decode_eol): Declare pos_byte, pos, and pos_end EMACS_INT.
21448 (produce_chars): from_nchars and to_nchars are now EMACS_INT.
21449
21450 * coding.h (struct coding_system) <head_ascii>: Declare EMACS_INT.
21451 All users changed.
21452
21453 * ccl.c (Fccl_execute_on_string): Declare some variables
21454 EMACS_INT.
21455
8546720e 214562011-04-08 Samuel Thibault <sthibault@debian.org> (tiny change)
0080dc6b
SS
21457
21458 * term.c (init_tty): Fix incorrect ifdef placement (Bug#8450).
21459
4e19a977
CS
214602011-03-19 Christoph Scholtes <cschol2112@googlemail.com>
21461
21462 * process.c (Fformat_network_address): Doc fix.
21463
87302331
R
214642011-04-08 T.V. Raman <tv.raman.tv@gmail.com> (tiny change)
21465
ee7683eb 21466 * xml.c (parse_region): Avoid creating spurious whitespace nodes.
87302331 21467
cbb59342
CY
214682011-04-08 Chong Yidong <cyd@stupidchicken.com>
21469
21470 * keyboard.c (read_char): Call Lisp function help-form-show,
21471 instead of using internal_with_output_to_temp_buffer.
21472 (Qhelp_form_show): New var.
e0d38eeb 21473 (syms_of_keyboard): Use DEFSYM macro.
cbb59342
CY
21474
21475 * print.c (internal_with_output_to_temp_buffer): Function deleted.
21476
21477 * lisp.h (internal_with_output_to_temp_buffer): Remove prototype.
21478
e67a13ab
CY
214792011-04-06 Chong Yidong <cyd@stupidchicken.com>
21480
04f2d78b
CB
21481 * process.c (Flist_processes): Remove to Lisp.
21482 (list_processes_1): Delete.
e67a13ab 21483
973f782d
EZ
214842011-04-06 Eli Zaretskii <eliz@gnu.org>
21485
7c106b1e
EZ
21486 * msdos.c (careadlinkat, careadlinkatcwd): MS-DOS replacements.
21487
973f782d
EZ
21488 * w32.c (careadlinkat, careadlinkatcwd): New always-fail stubs.
21489
41cf7d1a 214902011-04-06 Paul Eggert <eggert@cs.ucla.edu>
27ccc379 21491
ca23cc88
PE
21492 Fix more problems found by GCC 4.6.0's static checks.
21493
f390e2d5
PE
21494 * xmenu.c (Fx_popup_dialog): Don't assume string is free of formats.
21495
42eea0d0
PE
21496 * menu.c (Fx_popup_menu): Don't assume error_name lacks printf formats.
21497
b69769da 21498 * lisp.h (message, message_nolog, fatal): Mark as printf-like.
1e973bc7 21499
f9541e84
PE
21500 * xdisp.c (vmessage): Mark as a printf-like function.
21501
13841b55
PE
21502 * term.c (vfatal, maybe_fatal): Mark as printf-like functions.
21503
c136c10f
PE
21504 * sound.c (sound_warning): Don't crash if arg contains a printf format.
21505
5e2d4a30
PE
21506 * image.c (tiff_error_handler, tiff_warning_handler): Mark as
21507 printf-like functions.
21508 (tiff_load): Add casts to remove these marks before passing them
21509 to system-supplied API.
21510
583f48b9
PE
21511 * eval.c (Fsignal): Remove excess argument to 'fatal'.
21512
b25d760e
PE
21513 * coding.c (EMIT_ONE_BYTE, EMIT_TWO_BYTES): Use unsigned, not int.
21514 This avoids several warnings with gcc -Wstrict-overflow.
d5efd1d1
PE
21515 (DECODE_COMPOSITION_RULE): If the rule is invalid, goto invalid_code
21516 directly, rather than having caller test rule sign. This avoids
21517 some unnecessary tests.
21518 * composite.h (COMPOSITION_ENCODE_RULE_VALID): New macro.
21519 (COMPOSITION_ENCODE_RULE): Arguments now must be valid. This
21520 affects only one use, in DECODE_COMPOSITION_RULE, which is changed.
b25d760e 21521
bc7b6697 21522 * xfont.c (xfont_text_extents): Remove var that was set but not used.
625a3eb1 21523 (xfont_open): Avoid unnecessary tests.
bc7b6697 21524
27ccc379
PE
21525 * composite.c (composition_gstring_put_cache): Use unsigned integer.
21526
dcd5c89a
PE
21527 * composite.h, composite.c (composition_gstring_put_cache):
21528 Use EMACS_INT, not int, for length.
21529
b13a45c6
PE
21530 * composite.h (COMPOSITION_DECODE_REFS): New macro,
21531 breaking out part of COMPOSITION_DECODE_RULE.
21532 (COMPOSITION_DECODE_RULE): Use it.
21533 * composite.c (get_composition_id): Remove unused local vars,
21534 by using the new macro.
21535
1e792e4d
PE
21536 * textprop.c (set_text_properties_1): Change while to do-while,
21537 since the condition is always true at first.
21538
dc6c6455 21539 * intervals.c (graft_intervals_into_buffer): Mark var as used.
aa86731f
PE
21540 (interval_deletion_adjustment): Return unsigned value.
21541 All uses changed.
dc6c6455 21542
aba7731a
PE
21543 * process.c (list_processes_1, create_pty, read_process_output):
21544 (exec_sentinel): Remove vars that were set but not used.
afd4052b 21545 (create_pty): Remove unnecessary "volatile"s.
bc57d757 21546 (Fnetwork_interface_info): Avoid possibility of int overflow.
82eaa333 21547 (read_process_output): Do adaptive read buffering even if carryover.
fe07cdfa 21548 (read_process_output): Simplify nbytes computation if buffered.
aba7731a 21549
fdfc4bf3
PE
21550 * bytecode.c (exec_byte_code): Rename local to avoid shadowing.
21551
fca8fe46 21552 * syntax.c (scan_words): Remove var that was set but not used.
12cbf13f 21553 (update_syntax_table): Use unsigned instead of int.
fca8fe46 21554
06a0259a 21555 * lread.c (lisp_file_lexically_bound_p): Use ints rather than endptrs.
3c346cc3 21556 (lisp_file_lexically_bound_p, read1): Use unsigned instead of int.
e6eb4e9e 21557 (safe_to_load_p): Make the end-of-loop test the inverse of the in-loop.
06a0259a 21558
e7b9e80f
PE
21559 * print.c (print_error_message): Avoid int overflow.
21560
56201685
PE
21561 * font.c (font_list_entities): Redo for clarity,
21562 so that reader need not know FONT_DPI_INDEX + 1 == FONT_SPACING_INDEX.
21563
78834453 21564 * font.c (font_find_for_lface, Ffont_get_glyphs): Remove unused vars.
790771b1 21565 (font_score): Avoid potential overflow in diff calculation.
78834453 21566
0bc0b309 21567 * fns.c (substring_both): Remove var that is set but not used.
8cd55cb4 21568 (sxhash): Redo loop for clarity and to avoid wraparound warning.
0bc0b309 21569
e610eaca
PE
21570 * eval.c (funcall_lambda): Rename local to avoid shadowing.
21571
b895abce
PE
21572 * alloc.c (mark_object_loop_halt, mark_object): Use size_t, not int.
21573 Otherwise, GCC 4.6.0 optimizes the loop check away since the check
21574 can always succeed if overflow has undefined behavior.
21575
1f1d9321 21576 * search.c (boyer_moore, wordify): Remove vars set but not used.
6f076cc7 21577 (wordify): Omit three unnecessary tests.
1f1d9321 21578
c59478bc
PE
21579 * indent.c (MULTIBYTE_BYTES_WIDTH): Don't compute wide_column.
21580 All callers changed. This avoids the need for an unused var.
21581
79b73827
PE
21582 * casefiddle.c (casify_region): Remove var that is set but not used.
21583
a4db5dfe
PE
21584 * dired.c (file_name_completion): Remove var that is set but not used.
21585
43aae36e
PE
21586 * fileio.c (Finsert_file_contents): Make EOF condition clearer.
21587
2a47c44d 21588 * fileio.c (Finsert_file_contents): Avoid signed integer overflow.
163c5f32 21589 (Finsert_file_contents): Remove unnecessary code checking fd.
2a47c44d 21590
a37c69bf
PE
21591 * minibuf.c (read_minibuf_noninteractive): Use size_t for sizes.
21592 Check for integer overflow on size calculations.
21593
328ab8e7
PE
21594 * buffer.c (Fprevious_overlay_change): Remove var that is set
21595 but not used.
21596
e5a2a5cb
PE
21597 * keyboard.c (menu_bar_items, read_char_minibuf_menu_prompt):
21598 Remove vars that are set but not used.
8d84a6eb 21599 (timer_check_2): Don't assume timer-list and idle-timer-list are lists.
6b043475 21600 (timer_check_2): Mark vars as initialized.
e5a2a5cb 21601
a60e5f68
PE
21602 * gtkutil.c (xg_get_file_with_chooser): Mark var as initialized.
21603
f661cb61 21604 * image.c (lookup_image): Remove var that is set but not used.
35fa624f 21605 (xbm_load): Use parse_p, for gcc -Werror=unused-but-set-variable.
f661cb61 21606
f0397f5a
PE
21607 * fontset.c (Finternal_char_font, Ffontset_info): Remove vars
21608 that are set but not used.
21609
8664db06 21610 * xfns.c (make_invisible_cursor): Don't return garbage
03733ee7 21611 if XCreateBitmapFromData fails (Bug#8410).
8664db06 21612
6abdaa4a
PE
21613 * xselect.c (x_get_local_selection, x_handle_property_notify):
21614 Remove vars that are set but not used.
21615
0ce7538d 21616 * xfns.c (x_create_tip_frame): Remove var that is set but not used.
6abdaa4a 21617 (make_invisible_cursor): Initialize a possibly-uninitialized variable.
0ce7538d 21618
9ae848fc
PE
21619 * xterm.c (x_scroll_bar_to_input_event) [!USE_GTK]:
21620 Remove var that is set but not used.
0b918413
PE
21621 (scroll_bar_windows_size): Now size_t, not int.
21622 (x_send_scroll_bar_event): Use size_t, not int, for sizes.
21623 Check for overflow.
9ae848fc 21624
a5a62657
PE
21625 * xfaces.c (realize_named_face): Remove vars that are set but not used.
21626 (map_tty_color) [!defined MSDOS]: Likewise.
21627
5c5cdd39
PE
21628 * term.c (tty_write_glyphs): Use size_t; this avoids overflow warning.
21629
66ebf983
PE
21630 * coding.c: Remove vars that are set but not used.
21631 (DECODE_COMPOSITION_RULE): Remove 2nd arg, which is unused.
21632 All callers changed.
21633 (decode_coding_utf_8, decode_coding_utf_16 decode_coding_emacs_mule):
21634 (decode_coding_iso_2022, encode_coding_sjis, encode_coding_big5):
21635 (decode_coding_charset): Remove vars that are set but not used.
21636
1be4d761
PE
21637 * bytecode.c (Fbyte_code) [!defined BYTE_CODE_SAFE]: Remove var
21638 that is set but not used.
21639
47553fa8
PE
21640 * print.c (print_object): Remove var that is set but not used.
21641
1f7196bf 21642 Replace 2 copies of readlink code with 1 gnulib version (Bug#8401).
d1fdcab7
PE
21643 The gnulib version avoids calling malloc in the usual case,
21644 and on 64-bit hosts doesn't have some arbitrary 32-bit limits.
21645 * fileio.c (Ffile_symlink_p): Use emacs_readlink.
21646 * filelock.c (current_lock_owner): Likewise.
21647 * lisp.h (READLINK_BUFSIZE, emacs_readlink): New function.
21648 * sysdep.c: Include allocator.h, careadlinkat.h.
21649 (emacs_no_realloc_allocator): New static constant.
21650 (emacs_readlink): New function.
fdb61804
PE
21651 * deps.mk (sysdep.o): Depend on ../lib/allocator.h and on
21652 ../lib/careadlinkat.h.
d1fdcab7 21653
f84c17c7
SM
216542011-04-04 Stefan Monnier <monnier@iro.umontreal.ca>
21655
21656 * keyboard.c (safe_run_hook_funcall): Fix last change (don't stop at the
21657 first non-nil return value).
21658
ef3862ad
JD
216592011-04-03 Jan Djärv <jan.h.d@swipnet.se>
21660
21661 * nsterm.m (ns_update_auto_hide_menu_bar): Define MAC_OS_X_VERSION_10_6
21662 if not defined (Bug#8403).
21663
376a7006
JB
216642011-04-02 Juanma Barranquero <lekktu@gmail.com>
21665
21666 * xdisp.c (display_count_lines): Remove parameter `start',
21667 unused since 1998-01-01T02:27:27Z!rms@gnu.org. All callers changed.
21668 (get_char_face_and_encoding): Remove parameter `multibyte_p',
21669 unused since 2008-05-14T01:40:23Z!handa@m17n.org. All callers changed.
21670 (fill_stretch_glyph_string): Remove parameters `row' and `area',
21671 unused at least since Kim's GUI unification at 2003-03-16T20:45:46Z!storm@cua.dk
21672 and thereabouts. All callers changed.
21673 (get_per_char_metric): Remove parameter `f', unused since
21674 2008-05-14T01:40:23Z!handa@m17n.org. All callers changed.
21675
6ca3801d
JM
216762011-04-02 Jim Meyering <meyering@redhat.com>
21677
21678 do not dereference NULL upon failed strdup
21679 * nsfont.m (ns_descriptor_to_entity): Use xstrdup, not strdup.
21680 (ns_get_family): Likewise.
21681
d8e2b5ba
JB
216822011-04-02 Juanma Barranquero <lekktu@gmail.com>
21683
21684 * eval.c (unwind_to_catch) [DEBUG_GCPRO]: Remove redundant assignment.
21685
8c74fcbd
JD
216862011-04-02 Jan Djärv <jan.h.d@swipnet.se>
21687
21688 * nsterm.m (ns_update_auto_hide_menu_bar): Only for OSX 10.6 or
21689 later (Bug#8403).
21690
7200d79c
SM
216912011-04-01 Stefan Monnier <monnier@iro.umontreal.ca>
21692
03408648 21693 Add lexical binding.
7200d79c 21694
03408648
SM
21695 * window.c (Ftemp_output_buffer_show): New fun.
21696 (Fsave_window_excursion):
21697 * print.c (Fwith_output_to_temp_buffer): Move to subr.el.
21698
21699 * lread.c (lisp_file_lexically_bound_p): New function.
21700 (Fload): Bind Qlexical_binding.
21701 (readevalloop): Remove `evalfun' arg.
21702 Bind Qinternal_interpreter_environment.
21703 (Feval_buffer): Bind Qlexical_binding.
21704 (defvar_int, defvar_bool, defvar_lisp_nopro, defvar_kboard):
21705 Mark as dynamic.
21706 (syms_of_lread): Declare `lexical-binding'.
21707
21708 * lisp.h (struct Lisp_Symbol): New field `declared_special'.
21709
21710 * keyboard.c (eval_dyn): New fun.
21711 (menu_item_eval_property): Use it.
ca105506
SM
21712
21713 * image.c (parse_image_spec): Use Ffunctionp.
ca105506 21714
03408648
SM
21715 * fns.c (concat, mapcar1): Accept byte-code-functions.
21716
21717 * eval.c (Fsetq): Handle lexical vars.
21718 (Fdefun, Fdefmacro, Ffunction): Make closures when needed.
21719 (Fdefconst, Fdefvaralias, Fdefvar): Mark as dynamic.
21720 (FletX, Flet): Obey lexical binding.
21721 (Fcommandp): Handle closures.
21722 (Feval): New `lexical' arg.
21723 (eval_sub): New function extracted from Feval. Use it almost
21724 everywhere where Feval was used. Look up vars in lexical env.
21725 Handle closures.
21726 (Ffunctionp): Move from subr.el.
21727 (Ffuncall): Handle closures.
21728 (apply_lambda): Remove `eval_flags'.
21729 (funcall_lambda): Handle closures and new byte-code-functions.
21730 (Fspecial_variable_p): New function.
21731 (syms_of_eval): Initialize the Vinternal_interpreter_environment var,
21732 but without exporting it to Lisp.
23aba0ea 21733
23aba0ea 21734 * doc.c (Fdocumentation, store_function_docstring):
03408648 21735 * data.c (Finteractive_form): Handle closures.
23aba0ea 21736
03408648
SM
21737 * callint.c (Fcall_interactively): Preserve lexical-binding mode for
21738 interactive spec.
ba83908c 21739
04f2d78b
CB
21740 * bytecode.c (Bstack_ref, Bstack_set, Bstack_set2, BdiscardN):
21741 New byte-codes.
03408648
SM
21742 (exec_byte_code): New function extracted from Fbyte_code to handle new
21743 calling convention for byte-code-functions. Add new byte-codes.
ba83908c 21744
03408648 21745 * buffer.c (defvar_per_buffer): Set new `declared_special' field.
e2abe5a1 21746
03408648 21747 * alloc.c (Fmake_symbol): Init new `declared_special' field.
e2abe5a1 21748
e2abce01
JB
217492011-03-31 Juanma Barranquero <lekktu@gmail.com>
21750
21751 * xdisp.c (redisplay_internal): Fix prototype.
21752
63696a73 217532011-03-31 Eli Zaretskii <eliz@gnu.org>
09725d26 21754
63696a73 21755 * xdisp.c (SCROLL_LIMIT): New macro.
04f2d78b
CB
21756 (try_scrolling): Use it when setting scroll_limit.
21757 Limit scrolling to 100 screen lines.
63696a73
EZ
21758 (redisplay_window): Even when falling back on "recentering",
21759 position point in the window according to scroll-conservatively,
21760 scroll-margin, and scroll-*-aggressively variables. (Bug#6671)
21761
21762 (try_scrolling): When point is above the window, allow searching
21763 as far as scroll_max, or one screenful, to compute vertical
21764 distance from PT to the scroll margin position. This prevents
21765 try_scrolling from unnecessarily failing when
21766 scroll-conservatively is set to a value slightly larger than the
21767 window height. Clean up the case of PT below the margin at bottom
21768 of window: scroll_max can no longer be INT_MAX. When aggressive
21769 scrolling is in use, don't let point enter the opposite scroll
21770 margin as result of the scroll.
21771 (syms_of_xdisp) <scroll-conservatively>: Document the
09725d26
EZ
21772 threshold of 100 lines for never-recentering scrolling.
21773
e4cc2dfc
JB
217742011-03-31 Juanma Barranquero <lekktu@gmail.com>
21775
21776 * dispextern.h (move_it_by_lines):
21777 * xdisp.c (move_it_by_lines): Remove parameter `need_y_p', unused
21778 since 2000-12-29T14:24:09Z!gerd@gnu.org. All callers changed.
21779 (message_log_check_duplicate): Remove parameters `prev_bol' and
21780 `this_bol', unused since 1998-01-01T02:27:27Z!rms@gnu.org. All callers changed.
21781 (redisplay_internal): Remove parameter `preserve_echo_area',
21782 unused since 1999-07-21T21:43:52Z!gerd@gnu.org. All callers changed.
21783
21784 * indent.c (Fvertical_motion):
21785 * window.c (window_scroll_pixel_based, Frecenter):
21786 Don't pass `need_y_p' to `move_it_by_lines'.
21787
1c470562
SM
217882011-03-30 Stefan Monnier <monnier@iro.umontreal.ca>
21789
44f230aa
SM
21790 * eval.c (struct backtrace): Don't cheat with negative numbers, but do
21791 steal a few bits to be more compact.
21792 (interactive_p, Fbacktrace, Fbacktrace_frame, mark_backtrace):
21793 Remove unneeded casts.
21794
1c470562
SM
21795 * bytecode.c (Fbyte_code): CAR and CDR can GC.
21796
888adce9
ZK
217972011-03-30 Zachary Kanfer <zkanfer@gmail.com> (tiny change)
21798
21799 * keyboard.c (Fexecute_extended_command): Do log the "suggest key
21800 binding" message (bug#7967).
21801
f838ed7b
PE
218022011-03-30 Paul Eggert <eggert@cs.ucla.edu>
21803
77861b95
PE
21804 Fix more problems found by GCC 4.6.0's static checks.
21805
de6dbc14
PE
21806 * unexelf.c (unexec) [! (defined _SYSTYPE_SYSV || defined __sgi)]:
21807 Remove unused local var.
21808
f838ed7b
PE
21809 * editfns.c (Fmessage_box): Remove unused local var.
21810
792c7b2b
PE
21811 * xdisp.c (try_window_reusing_current_matrix, x_produce_glyphs):
21812 (note_mode_line_or_margin_highlight, note_mouse_highlight):
21813 Omit unused local vars.
c499e557 21814 * window.c (shrink_windows): Omit unused local var.
b01a1c29 21815 * menu.c (digest_single_submenu): Omit unused local var.
0bc32927
PE
21816 * dispnew.c (update_window) [PERIODIC_PREEMPTION_CHECKING]:
21817 Omit unused local var.
21818
ba0165e1
PE
21819 * keyboard.c (parse_modifiers_uncached, parse_modifiers):
21820 Don't assume string length fits in int.
32ad8845 21821 (keyremap_step, read_key_sequence): Use size_t for sizes.
48011560 21822 (read_key_sequence): Don't check last_real_key_start redundantly.
ba0165e1 21823
3c59b4c9
PE
21824 * callproc.c (Fcall_process, Fcall_process_region): Use SAFE_ALLOCA
21825 instead of alloca (Bug#8344).
21826
a3eed478 21827 * eval.c (Fbacktrace): Don't assume nargs fits in int.
5d5d959d 21828 (Fbacktrace_frame): Don't assume nframes fits in int.
a3eed478 21829
eb4d412d
PE
21830 * syntax.c (scan_sexps_forward): Avoid pointer wraparound.
21831
1658b401
PE
21832 * xterm.c (x_make_frame_visible, same_x_server): Redo to avoid overflow
21833 concerns.
21834
21835 * term.c (produce_glyphless_glyph): Remove unnecessary test.
21836
21837 * cm.c (calccost): Turn while-do into do-while, for clarity.
44f730c8 21838
9a2c6e05
PE
21839 * keyboard.c (syms_of_keyboard): Use the same style as later
21840 in this function when indexing through an array. This also
21841 works around GCC bug 48267.
21842
03d0a109
PE
21843 * image.c (tiff_load): Fix off-by-one image count (Bug#8336).
21844
44f730c8
PE
21845 * xselect.c (x_check_property_data): Return correct size (Bug#8335).
21846
fe75f926
PE
21847 * chartab.c (sub_char_table_ref_and_range): Redo for slight
21848 efficiency gain, and to bypass a gcc -Wstrict-overflow warning.
21849
ffa8c828
PE
21850 * keyboard.c, keyboard.h (num_input_events): Now size_t.
21851 This avoids undefined behavior on integer overflow, and is a bit
21852 more convenient anyway since it is compared to a size_t variable.
21853
c5101a77
PE
21854 Variadic C functions now count arguments with size_t, not int.
21855 This avoids an unnecessary limitation on 64-bit machines, which
21856 caused (substring ...) to crash on large vectors (Bug#8344).
21857 * lisp.h (struct Lisp_Subr.function.aMANY): Now takes size_t, not int.
21858 (DEFUN_ARGS_MANY, internal_condition_case_n, safe_call): Likewise.
77861b95 21859 All variadic functions and their callers changed accordingly.
c5101a77
PE
21860 (struct gcpro.nvars): Now size_t, not int. All uses changed.
21861 * data.c (arith_driver, float_arith_driver): Likewise.
21862 * editfns.c (general_insert_function): Likewise.
21863 * eval.c (struct backtrace.nargs, interactive_p)
21864 (internal_condition_case_n, run_hook_with_args, apply_lambda)
21865 (funcall_lambda, mark_backtrace): Likewise.
21866 * fns.c (concat): Likewise.
21867 * frame.c (x_set_frame_parameters): Likewise.
21868 * fns.c (get_key_arg): Now accepts and returns size_t, and returns
21869 0 if not found, not -1. All callers changed.
21870
dd3f25f7
PE
21871 * alloc.c (garbage_collect): Don't assume stack size fits in int.
21872 (stack_copy_size): Now size_t, not int.
21873 (stack_copy, stack_copy_size): Define only if MAX_SAVE_STACK > 0.
21874
461c2ab9
JB
218752011-03-28 Juanma Barranquero <lekktu@gmail.com>
21876
21877 * coding.c (encode_designation_at_bol): Remove parameter `charbuf_end',
21878 unused since 2002-03-01T01:17:24Z!handa@m17n.org and 2008-02-01T16:01:31Z!miles@gnu.org.
21879 All callers changed.
21880
21881 * lisp.h (multibyte_char_to_unibyte):
21882 * character.c (multibyte_char_to_unibyte): Remove parameter `rev_tbl',
21883 unused since 2002-03-01T01:16:34Z!handa@m17n.org and 2008-02-01T16:01:31Z!miles@gnu.org.
21884 * character.h (CHAR_TO_BYTE8):
21885 * cmds.c (internal_self_insert):
21886 * editfns.c (general_insert_function):
21887 * keymap.c (push_key_description):
21888 * search.c (Freplace_match):
21889 * xdisp.c (message_dolog, set_message_1): All callers changed.
21890
f6d62986
SM
218912011-03-28 Stefan Monnier <monnier@iro.umontreal.ca>
21892
21893 * keyboard.c (safe_run_hook_funcall): New function.
21894 (safe_run_hooks_1, safe_run_hooks_error, safe_run_hooks): On error,
21895 don't set the hook to nil, but remove the offending function instead.
21896 (Qcommand_hook_internal): Remove, unused.
21897 (syms_of_keyboard): Don't initialize Qcommand_hook_internal nor define
21898 Vcommand_hook_internal.
21899
21900 * eval.c (enum run_hooks_condition): Remove.
21901 (funcall_nil, funcall_not): New functions.
21902 (run_hook_with_args): Call each function through a `funcall' argument.
21903 Remove `cond' argument, now redundant.
21904 (Frun_hooks, Frun_hook_with_args, Frun_hook_with_args_until_success)
21905 (Frun_hook_with_args_until_failure): Adjust accordingly.
21906 (run_hook_wrapped_funcall, Frun_hook_wrapped): New functions.
21907
1db5b1ad
JB
219082011-03-28 Juanma Barranquero <lekktu@gmail.com>
21909
21910 * dispextern.h (string_buffer_position): Remove declaration.
21911
21912 * print.c (strout): Remove parameter `multibyte', unused since
21913 1999-08-21T19:30:21Z!gerd@gnu.org. All callers changed.
21914
21915 * search.c (boyer_moore): Remove parameters `len', `pos' and `lim',
21916 never used since function introduction in 1998-02-08T21:33:56Z!rms@gnu.org.
21917 All callers changed.
21918
21919 * w32.c (_wsa_errlist): Use braces for struct initializers.
21920
21921 * xdisp.c (string_buffer_position_lim): Remove parameter `w',
21922 never used since function introduction in 2001-03-09T18:41:50Z!gerd@gnu.org.
21923 All callers changed.
21924 (string_buffer_position): Likewise. Also, make static (it's never
21925 used outside xdisp.c).
21926 (cursor_row_p): Remove parameter `w', unused since
21927 2000-10-17T16:08:57Z!gerd@gnu.org. All callers changed.
21928 (decode_mode_spec): Remove parameter `precision', introduced during
21929 Gerd Moellmann's rewrite at 1999-07-21T21:43:52Z!gerd@gnu.org, but never used.
21930 All callers changed.
21931
5ffb62aa
JD
219322011-03-27 Jan Djärv <jan.h.d@swipnet.se>
21933
21934 * nsterm.m (syms_of_nsterm): Use doc: for ns-auto-hide-menu-bar.
21935
461c2ab9 219362011-03-27 Anders Lindgren <andlind@gmail.com>
f0a1382a
JD
21937
21938 * nsterm.m (ns_menu_bar_is_hidden): New variable.
21939 (ns_constrain_all_frames, ns_menu_bar_should_be_hidden)
21940 (ns_update_auto_hide_menu_bar): New functions.
21941 (ns_update_begin): Call ns_update_auto_hide_menu_bar.
21942 (applicationDidBecomeActive): Call ns_update_auto_hide_menu_bar and
21943 ns_constrain_all_frames.
21944 (constrainFrameRect): Return at once if ns_menu_bar_should_be_hidden.
21945 (syms_of_nsterm): DEFVAR ns-auto-hide-menu-bar, init to Qnil.
21946
5c380ffb
JD
219472011-03-27 Jan Djärv <jan.h.d@swipnet.se>
21948
21949 * nsmenu.m (runDialogAt): Remove argument to timer_check.
21950
9af30bdf
GM
219512011-03-27 Glenn Morris <rgm@gnu.org>
21952
21953 * syssignal.h: Replace RETSIGTYPE with void.
21954 * atimer.c, data.c, dispnew.c, emacs.c, floatfns.c, keyboard.c:
21955 * keyboard.h, lisp.h, process.c, sysdep.c, xterm.c:
21956 Replace SIGTYPE with void everywhere.
21957 * s/usg5-4-common.h (SIGTYPE): Remove definition.
21958 * s/template.h (SIGTYPE): Remove commented out definition.
21959
e2abce01
JB
219602011-03-26 Eli Zaretskii <eliz@gnu.org>
21961
21962 * xdisp.c (redisplay_window): Don't check buffer's clip_changed
21963 flag as a prerequisite for invoking try_scrolling. (Bug#6671)
21964
f868cd8a
JB
219652011-03-26 Juanma Barranquero <lekktu@gmail.com>
21966
59eb0929
JB
21967 * w32.c (read_unc_volume): Use parameter `henum', instead of
21968 global variable `wget_enum_handle'.
21969
21970 * keymap.c (describe_vector): Remove parameters `indices' and
21971 `char_table_depth', unused since 2002-03-01T01:43:26Z!handa@m17n.org.
21972 (describe_map, Fdescribe_vector): Adjust calls to `describe_vector'.
21973
f868cd8a
JB
21974 * keyboard.h (timer_check, show_help_echo): Remove unused parameters.
21975
21976 * keyboard.c (timer_check): Remove parameter `do_it_now',
21977 unused since 1996-04-12T06:01:29Z!rms@gnu.org.
21978 (show_help_echo): Remove parameter `ok_to_overwrite_keystroke_echo',
21979 unused since 2008-04-19T19:30:53Z!monnier@iro.umontreal.ca.
21980
21981 * keyboard.c (read_char):
21982 * w32menu.c (w32_menu_display_help):
21983 * xmenu.c (show_help_event, menu_help_callback):
21984 Adjust calls to `show_help_echo'.
21985
21986 * gtkutil.c (xg_maybe_add_timer):
21987 * keyboard.c (readable_events):
21988 * process.c (wait_reading_process_output):
21989 * xmenu.c (x_menu_wait_for_event): Adjust calls to `timer_check'.
21990
21991 * insdel.c (adjust_markers_gap_motion):
21992 Remove; no-op since 1998-01-02T21:29:48Z!rms@gnu.org.
21993 (gap_left, gap_right): Don't call it.
21994
2ecf6fdb
CY
219952011-03-25 Chong Yidong <cyd@stupidchicken.com>
21996
21997 * xdisp.c (handle_fontified_prop): Discard changes to clip_changed
21998 incurred during fontification.
21999
6b1f9ba4
JB
220002011-03-25 Juanma Barranquero <lekktu@gmail.com>
22001
22002 * buffer.c (defvar_per_buffer): Remove unused parameter `doc'.
22003 (DEFVAR_PER_BUFFER): Don't pass it.
22004
22005 * dispnew.c (row_equal_p, add_row_entry): Remove unused parameter `w'.
22006 (scrolling_window): Don't pass it.
22007
0f4a96b5
JB
220082011-03-25 Juanma Barranquero <lekktu@gmail.com>
22009
22010 * dispextern.h (glyph_matric): Use #if GLYPH_DEBUG, not #ifdef.
22011
22012 * fileio.c (check_executable) [DOS_NT]: Remove unused variables `len'
22013 and `suffix'.
22014 (Fset_file_selinux_context) [HAVE_LIBSELINUX]: Move here declaration
22015 of variables specific to SELinux and computation of `encoded_absname'.
22016
22017 * image.c (XPutPixel): Remove unused variable `height'.
22018
22019 * keyboard.c (make_lispy_event): Remove unused variable `hpos'.
22020
22021 * unexw32.c (get_section_info): Remove unused variable `section'.
22022
22023 * w32.c (stat): Remove unused variables `drive_root' and `devtype'.
22024 (system_process_attributes): Remove unused variable `sess'.
22025 (sys_read): Remove unused variable `err'.
22026
22027 * w32fns.c (top): Wrap variables with #if GLYPH_DEBUG, not #ifdef.
22028 (w32_wnd_proc): Remove unused variable `isdead'.
22029 (unwind_create_frame): Use #if GLYPH_DEBUG, not #ifdef.
22030 (Fx_server_max_request_size): Remove unused variable `dpyinfo'.
22031 (x_create_tip_frame): Remove unused variable `tem'.
22032
22033 * w32inevt.c (w32_console_read_socket):
22034 Remove unused variable `no_events'.
22035
22036 * w32term.c (x_draw_composite_glyph_string_foreground):
22037 Remove unused variable `width'.
22038
1149507c
JB
220392011-03-24 Juanma Barranquero <lekktu@gmail.com>
22040
22041 * w32term.c (x_set_glyph_string_clipping):
22042 Don't pass uninitialized region to CombineRgn.
22043
9c88f339
JB
220442011-03-23 Juanma Barranquero <lekktu@gmail.com>
22045
22046 * w32fns.c (x_set_menu_bar_lines): Remove unused variable `olines'.
22047 (w32_wnd_proc): Pass NULL to Windows API, not uninitialized buffer.
22048 (Fx_close_connection): Remove unused variable `i'.
22049
22050 * w32font.c (w32font_draw): Return number of glyphs.
22051 (w32font_open_internal): Remove unused variable `i'.
22052 (w32font_driver): Add missing initializer.
22053
22054 * w32menu.c (utf8to16): Remove unused variable `utf16'.
22055 (fill_in_menu): Remove unused variable `items_added'.
22056
22057 * w32term.c (last_mouse_press_frame): Remove static global variable.
22058 (w32_clip_to_row): Remove unused variable `f'.
22059 (x_delete_terminal): Remove unused variable `i'.
22060
22061 * w32uniscribe.c (uniscribe_shape): Remove unused variable `nclusters'.
22062 (NOTHING): Remove unused static global variable.
22063 (uniscribe_check_otf): Remove unused variable `table'.
22064 (uniscribe_font_driver): Add missing initializers.
22065
dee091a3
JD
220662011-03-23 Julien Danjou <julien@danjou.info>
22067
22068 * term.c (Fsuspend_tty, Fresume_tty):
22069 * minibuf.c (read_minibuf, run_exit_minibuf_hook):
22070 * window.c (temp_output_buffer_show):
22071 * insdel.c (signal_before_change):
22072 * frame.c (Fhandle_switch_frame):
22073 * fileio.c (Fdo_auto_save):
22074 * emacs.c (Fkill_emacs):
22075 * editfns.c (save_excursion_restore):
22076 * cmds.c (internal_self_insert):
22077 * callint.c (Fcall_interactively):
22078 * buffer.c (Fkill_all_local_variables):
22079 * keyboard.c (Fcommand_execute, Fsuspend_emacs, safe_run_hooks_1):
22080 Use Frun_hooks.
0f4a96b5 22081 (command_loop_1): Use Frun_hooks. Call safe_run_hooks
e9fce1ac 22082 unconditionally since it does the check itself.
dee091a3 22083
2c520ab5 220842011-03-23 Paul Eggert <eggert@cs.ucla.edu>
f0641eff 22085
c9c49752
PE
22086 Fix more problems found by GCC 4.5.2's static checks.
22087
8abc3f12
PE
22088 * coding.c (encode_coding_raw_text): Avoid unnecessary test
22089 the first time through the loop, since we know p0 < p1 then.
22090 This also avoids a gcc -Wstrict-overflow warning.
22091
a2d26660
PE
22092 * lisp.h (SAFE_ALLOCA, SAFE_ALLOCA_LISP): Avoid 'int' overflow
22093 leading to a memory leak, possible in functions like
22094 load_charset_map_from_file that can allocate an unbounded number
b12ef411 22095 of objects (Bug#8318).
a2d26660 22096
916c72e9
PE
22097 * xmenu.c (set_frame_menubar): Use EMACS_UINT, not int, for indexes
22098 that could (at least in theory) be that large.
22099
19ab8a18
PE
22100 * xdisp.c (message_log_check_duplicate): Return unsigned long, not int.
22101 This is less likely to overflow, and avoids undefined behavior if
22102 overflow does occur. All callers changed. Use strtoul to scan
22103 for the unsigned long integer.
b7cbbd6f
PE
22104 (pint2hrstr): Simplify and tune code slightly.
22105 This also avoids a (bogus) GCC warning with gcc -Wstrict-overflow.
19ab8a18 22106
f0641eff
PE
22107 * scroll.c (do_scrolling): Work around GCC bug 48228.
22108 See <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48228>.
22109
7f650bb9
PE
22110 * frame.c (Fmodify_frame_parameters): Simplify loop counter.
22111 This also avoids a warning with gcc -Wstrict-overflow.
39f5e519
PE
22112 (validate_x_resource_name): Simplify count usage.
22113 This also avoids a warning with gcc -Wstrict-overflow.
7f650bb9 22114
37dd57d1
PE
22115 * fileio.c (Fcopy_file): Report error if fchown or fchmod
22116 fail (Bug#8306).
81e56e61 22117
699979fc 22118 * emacs.c (Fdaemon_initialized): Do not ignore I/O errors (Bug#8303).
dc1ca6a8 22119
401bf9b4
PE
22120 * process.c (Fmake_network_process): Use socklen_t, not int,
22121 where POSIX says socklen_t is required in portable programs.
22122 This fixes a porting bug on hosts like 64-bit HP-UX, where
591b2973 22123 socklen_t is wider than int (Bug#8277).
401bf9b4
PE
22124 (Fmake_network_process, server_accept_connection):
22125 (wait_reading_process_output, read_process_output):
22126 Likewise.
22127
b93aacde
PE
22128 * process.c: Rename or move locals to avoid shadowing.
22129 (list_processes_1, Fmake_network_process):
22130 (read_process_output_error_handler, exec_sentinel_error_handler):
22131 Rename or move locals.
4dc343ee 22132 (Fmake_network_process): Define label "retry_connect" only if needed.
0da49335 22133 (Fnetwork_interface_info): Fix pointer signedness.
f990b4e5 22134 (process_send_signal): Add cast to avoid pointer signedness problem.
7b808126 22135 (FIRST_PROC_DESC, IF_NON_BLOCKING_CONNECT): Remove unused macros.
c939f91b 22136 (create_process): Use 'volatile' to avoid vfork clobbering (Bug#8298).
b93aacde 22137
af8a867c 22138 Make tparam.h and terminfo.c consistent.
44f230aa
SM
22139 * cm.c (tputs, tgoto, BC, UP): Remove extern decls.
22140 Include tparam.h instead, since it declares them.
af8a867c
PE
22141 * cm.h (PC): Remove extern decl; tparam.h now does this.
22142 * deps.mk (cm.o, terminfo.o): Depend on tparam.h.
22143 * terminfo.c: Include tparam.h, to check interfaces.
22144 (tparm): Make 1st arg a const pointer in decl. Put it at top level.
22145 (tparam): Adjust signature to match interface in tparam.h;
22146 this removes some undefined behavior. Check that outstring and len
22147 are zero, which they always are with Emacs.
22148 * tparam.h (PC, BC, UP): New extern decls.
22149
0248044d 22150 * xftfont.c (xftfont_shape): Now static, and defined only if needed.
001a7ab4 22151 (xftfont_open): Rename locals to avoid shadowing.
0248044d 22152
8ff096c1 22153 * ftfont.c (ftfont_resolve_generic_family): Fix pointer signedness.
a00924bb
PE
22154 (ftfont_otf_capability, ftfont_shape): Omit decls if not needed.
22155 (OTF_TAG_SYM): Omit macro if not needed.
e932860f 22156 (ftfont_list): Remove unused local.
49eaafba
PE
22157 (get_adstyle_property, ftfont_pattern_entity):
22158 (ftfont_lookup_cache, ftfont_open, ftfont_anchor_point):
22159 Rename locals to avoid shadowing.
8ff096c1 22160
e2be39f6
PE
22161 * xfont.c (xfont_list_family): Mark var as initialized.
22162
c9735e30
PE
22163 * xml.c (make_dom): Now static.
22164
8f5201ae
PE
22165 * composite.c (composition_compute_stop_pos): Rename local to
22166 avoid shadowing.
b246f932
PE
22167 (composition_reseat_it): Remove unused locals.
22168 (find_automatic_composition, composition_adjust_point): Likewise.
80e079b2 22169 (composition_update_it): Mark var as initialized.
11b61122
PE
22170 (find_automatic_composition): Mark vars as initialized,
22171 with a FIXME (Bug#8290).
8f5201ae 22172
760fbc2c
PE
22173 character.h: Rename locals to avoid shadowing.
22174 * character.h (PREV_CHAR_BOUNDARY, FETCH_STRING_CHAR_ADVANCE):
22175 (FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE, FETCH_CHAR_ADVANCE):
22176 (FETCH_CHAR_ADVANCE_NO_CHECK, INC_POS, DEC_POS, BUF_INC_POS):
22177 (BUF_DEC_POS): Be more systematic about renaming local temporaries
22178 to avoid shadowing.
22179
ff08eb85
PE
22180 * textprop.c (property_change_between_p): Remove; unused.
22181
fc7bf025
PE
22182 * intervals.c (interval_start_pos): Now static.
22183
235d7abc
PE
22184 * intervals.h (CHECK_TOTAL_LENGTH): Avoid empty "else".
22185
44f230aa
SM
22186 * atimer.c (start_atimer, append_atimer_lists, set_alarm):
22187 Rename locals to avoid shadowing.
3e7d6594 22188
50060332
PE
22189 * sound.c (wav_play, au_play, Fplay_sound_internal):
22190 Fix pointer signedness.
d01f234b 22191 (alsa_choose_format): Remove unused local var.
c83b8872
PE
22192 (wav_play): Initialize a variable to 0, to prevent undefined
22193 behavior (Bug#8278).
50060332 22194
c4fc4e30
PE
22195 * region-cache.c (insert_cache_boundary): Redo var to avoid shadowing.
22196
918436ed
PE
22197 * region-cache.h (pp_cache): New decl, for gcc -Wmissing-prototypes.
22198
c939f91b
PE
22199 * callproc.c (Fcall_process): Use 'volatile' to avoid vfork
22200 clobbering (Bug#8298).
b9c7f648
PE
22201 * sysdep.c (sys_subshell): Likewise.
22202 Previously, the sys_subshell 'volatile' was incorrectly IF_LINTted out.
7e9123a2 22203
6bd8c144
PE
22204 * lisp.h (child_setup): Now NO_RETURN unless DOS_NT.
22205 This should get cleaned up, so that child_setup has the
22206 same signature on all platforms.
22207
7710357c 22208 * callproc.c (call_process_cleanup): Now static.
cb1d0ef7 22209 (relocate_fd): Rename locals to avoid shadowing.
7710357c 22210
c59da222
CY
222112011-03-22 Chong Yidong <cyd@stupidchicken.com>
22212
22213 * xterm.c (x_clear_frame): Remove XClearWindow call. This appears
22214 not to be necessary, and produces flickering.
22215
66b87493
GM
222162011-03-20 Glenn Morris <rgm@gnu.org>
22217
22218 * config.in: Remove file.
22219
45b6f6d5
JB
222202011-03-20 Juanma Barranquero <lekktu@gmail.com>
22221
22222 * minibuf.c (Vcompleting_read_function): Don't declare, global variables
22223 are now in src/globals.h.
22224 (syms_of_minibuf): Remove spurious & from previous change.
22225
cd394be1 222262011-03-20 Leo Liu <sdl.web@gmail.com>
3ec03f7e
LL
22227
22228 * minibuf.c (completing-read-function): New variable.
22229 (completing-read-default): Rename from completing-read.
22230 (completing-read): Call completing-read-function.
22231
b14e3e21
CY
222322011-03-19 Juanma Barranquero <lekktu@gmail.com>
22233
22234 * xfaces.c (Fx_load_color_file):
22235 Read color file from absolute filename (bug#8250).
22236
f2b726e6
JB
222372011-03-19 Juanma Barranquero <lekktu@gmail.com>
22238
22239 * makefile.w32-in: Update dependencies.
22240
09f6ff02
EZ
222412011-03-17 Eli Zaretskii <eliz@gnu.org>
22242
22243 * makefile.w32-in ($(BLD)/unexw32.$(O)): Depend on $(SRC)/unexec.h.
22244
29a6015a
PE
222452011-03-17 Paul Eggert <eggert@cs.ucla.edu>
22246
a3a6c54e
PE
22247 Fix more problems found by GCC 4.5.2's static checks.
22248
b766f867
PE
22249 * process.c (make_serial_process_unwind, send_process_trap):
22250 (sigchld_handler): Now static.
22251
be02381c
PE
22252 * process.c (allocate_pty): Let PTY_ITERATION declare iteration vars.
22253 That way, the code declares only the vars that it needs.
22254 * s/aix4-2.h (PTY_ITERATION): Declare iteration vars.
22255 * s/cygwin.h (PTY_ITERATION): Likewise.
22256 * s/darwin.h (PTY_ITERATION): Likewise.
22257 * s/gnu-linux.h (PTY_ITERATION): Likewise.
22258
57048744
PE
22259 * s/irix6-5.h (PTY_OPEN): Declare stb, to loosen coupling.
22260 * process.c (allocate_pty): Don't declare stb unless it's needed.
22261
7914961c 22262 * bytecode.c (MAYBE_GC): Rewrite so as not to use empty "else".
615f2d59
PE
22263 (CONSTANTLIM): Remove; unused.
22264 (METER_CODE, Bscan_buffer, Bread_char, Bset_mark):
22265 Define only if needed.
7914961c 22266
b3967b18
PE
22267 * unexelf.c (unexec): Name an expression,
22268 to avoid gcc -Wbad-function-cast warning.
9ae71512
PE
22269 Use a different way to cause a compilation error if anyone uses
22270 n rather than nn, a way that does not involve shadowing.
73366a00 22271 (ELF_BSS_SECTION_NAME, OLD_PROGRAM_H): Remove; unused.
b3967b18 22272
29a6015a
PE
22273 * deps.mk (unexalpha.o): Remove; unused.
22274
43cfc33e 22275 New file unexec.h, the (simple) interface for unexec (Bug#8267).
7feda0d2 22276 * unexec.h: New file.
ce701a33
PE
22277 * deps.mk (emacs.o, unexaix.o, unexcw.o, unexcoff.o, unexelf.o):
22278 (unexhp9k800.o, unexmacosx.o, unexsol.o, unexw32.o):
22279 Depend on unexec.h.
22280 * emacs.c [!defined CANNOT_DUMP]: Include unexec.h.
22281 * unexaix.c, unexcoff.c, unexcw.c, unexelf.c, unexhp9k800.c:
22282 * unexmacosx.c, unexsol.c, unexw32.c: Include unexec.h.
381259ef 22283 Change as necessary to match prototype in unexec.h.
ce701a33 22284
01f44d5a
PE
22285 * syntax.c (Fforward_comment, scan_lists): Rename locals to avoid
22286 shadowing.
4f63c6bb 22287 (back_comment, skip_chars): Mark vars as initialized.
01f44d5a 22288
a6670b0b
PE
22289 * character.h (FETCH_STRING_CHAR_ADVANCE_NO_CHECK, BUF_INC_POS):
22290 Rename locals to avoid shadowing.
22291
cef2010d 22292 * lread.c (read1): Rewrite so as not to use empty "else".
0902fe45 22293 (Fload, readevalloop, read1): Rename locals to avoid shadowing.
cef2010d 22294
d4d7173a
PE
22295 * print.c (Fredirect_debugging_output): Fix pointer signedess.
22296
f08b802a
PE
22297 * lisp.h (debug_output_compilation_hack): Add decl here, to avoid
22298 warning when compiling print.c.
22299
3ddb0639
PE
22300 * font.c (font_unparse_fcname): Abort in an "impossible" situation
22301 instead of using an uninitialized var.
5ad03b97 22302 (font_sort_entities): Mark var as initialized.
3ddb0639 22303
170a2692
PE
22304 * character.h (FETCH_CHAR_ADVANCE): Rename locals to avoid shadowing.
22305
e663c700
PE
22306 * font.c (font_unparse_xlfd): Don't mix pointers to variables with
22307 pointers to constants.
89bc529a 22308 (font_parse_fcname): Remove unused vars.
7b81e2d0 22309 (font_delete_unmatched): Now static.
ea838e10 22310 (font_get_spec): Remove; unused.
13a547c6
PE
22311 (font_style_to_value, font_prop_validate_style, font_unparse_fcname):
22312 (font_update_drivers, Ffont_get_glyphs, font_add_log):
22313 Rename or move locals to avoid shadowing.
e663c700 22314
2a80c887 22315 * fns.c (require_nesting_list, require_unwind): Now static.
612f56df 22316 (Ffillarray): Rename locals to avoid shadowing.
2a80c887 22317
1384fa33 22318 * floatfns.c (domain_error2): Define only if needed.
a885e2ed 22319 (Ffrexp, Fldexp): Rename locals to avoid shadowing.
1384fa33 22320
8b2c52e9
PE
22321 * alloc.c (mark_backtrace): Move decl from here ...
22322 * lisp.h: ... to here, so that it can be checked.
22323
475545b5 22324 * eval.c (call_debugger, do_debug_on_call, grow_specpdl): Now static.
d28a2170 22325 (Fdefvar): Rewrite so as not to use empty "else".
cfcbfb1a
PE
22326 (lisp_indirect_variable): Name an expression,
22327 to avoid gcc -Wbad-function-cast warning.
1faed8ae 22328 (Fdefvar): Rename locals to avoid shadowing.
475545b5 22329
b1349114 22330 * callint.c (quotify_arg, quotify_args): Now static.
a3e8cbda 22331 (Fcall_interactively): Rename locals to avoid shadowing.
b0e80955 22332 Use const pointer when appropriate.
b1349114 22333
a2928364
PE
22334 * lisp.h (get_system_name, get_operating_system_release):
22335 Move decls here, to check interfaces.
22336 * process.c (get_operating_system_release): Move decl to lisp.h.
22337 * xrdb.c (get_system_name): Likewise.
63c5d10b
PE
22338 * editfns.c (init_editfns, Fuser_login_name, Fuser_uid):
22339 (Fuser_real_uid, Fuser_full_name): Remove unnecessary casts,
22340 some of which prompt warnings from gcc -Wbad-function-cast.
545b49b4
PE
22341 (Fformat_time_string, Fencode_time, Finsert_char):
22342 (Ftranslate_region_internal, Fformat):
22343 Rename or remove local vars to avoid shadowing.
9710023e 22344 (Ftranslate_region_internal): Mark var as initialized.
63c5d10b 22345
a415e694
PE
22346 * doc.c (Fdocumentation, Fsnarf_documentation): Move locals to
22347 avoid shadowing.
22348
8ef4622d
PE
22349 * lisp.h (eassert): Check that the argument compiles, even if
22350 ENABLE_CHECKING is not defined.
22351
946f9a5b
PE
22352 * data.c (Findirect_variable): Name an expression, to avoid
22353 gcc -Wbad-function-cast warning.
112396d6 22354 (default_value, arithcompare, arith_driver, arith_error): Now static.
b9b84fa9 22355 (store_symval_forwarding): Rename local to avoid shadowing.
44f230aa
SM
22356 (Fmake_variable_buffer_local, Fmake_local_variable):
22357 Mark variables as initialized.
52746918 22358 (do_blv_forwarding, do_symval_forwarding): Remove; unused.
946f9a5b 22359
e5aab7e7 22360 * alloc.c (check_cons_list): Do not define unless GC_CHECK_CONS_LIST.
ae35e756
PE
22361 (Fmake_vector, Fvector, Fmake_byte_code, Fgarbage_collect):
22362 Rename locals to avoid shadowing.
dff45157
PE
22363 (mark_stack): Move local variables into the #ifdef region where
22364 they're used.
7bc26fdb
PE
22365 (BLOCK_INPUT_ALLOC, UNBLOCK_INPUT_ALLOC): Define only if
22366 ! defined SYSTEM_MALLOC && ! defined SYNC_INPUT, as they are not
22367 needed otherwise.
22368 (CHECK_ALLOCATED): Define only if GC_CHECK_MARKED_OBJECTS.
22369 (GC_STRING_CHARS): Remove; not used.
d40d4be1 22370 (Fmemory_limit): Cast sbrk's returned value to char *.
ae35e756 22371
e5aab7e7
PE
22372 * lisp.h (check_cons_list): Declare if GC_CHECK_CONS_LIST; this
22373 avoids undefined behavior in theory.
22374
4da60324
PE
22375 * regex.c (IF_LINT): Add defn, for benefit of ../lib-src.
22376
88043301
PE
22377 Use functions, not macros, for up- and down-casing (Bug#8254).
22378 * buffer.h (DOWNCASE_TABLE, UPCASE_TABLE, DOWNCASE, UPPERCASEP):
22379 (NOCASEP, LOWERCASEP, UPCASE, UPCASE1): Remove. All callers changed
22380 to use the following functions instead of these macros.
22381 (downcase): Adjust to lack of DOWNCASE_TABLE. Return int, not
22382 EMACS_INT, since callers assume the returned value fits in int.
22383 (upcase1): Likewise, for UPCASE_TABLE.
22384 (uppercasep, lowercasep, upcase): New static inline functions.
0da09c43 22385 * editfns.c (Fchar_equal): Remove no-longer-needed workaround for
db69b0cd 22386 the race-condition problem in the old DOWNCASE.
88043301 22387
19ed5445
PE
22388 * regex.c (CHARSET_LOOKUP_RANGE_TABLE_RAW, POP_FAILURE_REG_OR_COUNT):
22389 Rename locals to avoid shadowing.
22390 (regex_compile, re_match_2_internal): Move locals to avoid shadowing.
abbd1bcf
PE
22391 (regex_compile, re_search_2, re_match_2_internal):
22392 Remove unused local vars.
952db0d7
PE
22393 (FREE_VAR): Rewrite so as not to use empty "else",
22394 which gcc can warn about.
da053e48 22395 (regex_compile, re_match_2_internal): Mark locals as initialized.
b313f9d8
PE
22396 (RETALLOC_IF): Define only if needed.
22397 (WORDCHAR_P): Likewise. This one is never needed, but is used
22398 only in a comment talking about a compiler bug, so put inside
22399 the #if 0 of that comment.
22400 (CHARSET_LOOKUP_BITMAP, FAIL_STACK_FULL, RESET_FAIL_STACK):
22401 (PUSH_FAILURE_ELT, BUF_PUSH_3, STOP_ADDR_VSTRING):
22402 Remove; unused.
19ed5445 22403
1f3561e4 22404 * search.c (boyer_moore): Rename locals to avoid shadowing.
76ef09b7
PE
22405 * character.h (FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE):
22406 (PREV_CHAR_BOUNDARY): Likewise.
1f3561e4 22407
ded6f8f7
PE
22408 * search.c (simple_search): Remove unused var.
22409
dbd37a95
PE
22410 * dired.c (compile_pattern): Move decl from here ...
22411 * lisp.h: ... to here, so that it can be checked.
22412 (struct re_registers): New forward decl.
22413
7e47afad
PE
22414 * character.h (INC_POS, DEC_POS): Rename locals to avoid shadowing.
22415
85f24f61
PE
22416 * indent.c (MULTIBYTE_BYTES_WIDTH): New args bytes, width.
22417 All uses changed.
22418 (MULTIBYTE_BYTES_WIDTH, scan_for_column, compute_motion):
22419 Rename locals to avoid shadowing.
5671df8f 22420 (Fvertical_motion): Mark locals as initialized.
85f24f61 22421
181aa2be 22422 * casefiddle.c (casify_object, casify_region): Now static.
e45a141a 22423 (casify_region): Mark local as initialized.
181aa2be 22424
930d429c
PE
22425 * cmds.c (internal_self_insert): Rename local to avoid shadowing.
22426
7082eac6
PE
22427 * lisp.h (GCPRO2_VAR, GCPRO3_VAR, GCPRO4_VAR, GCPRO5_VAR, GCPRO6_VAR):
22428 New macros, so that the caller can use some names other than
22429 gcpro1, gcpro2, etc.
22430 (GCPRO2, GCPRO3, GCPRO4, GCPRO5, GCPRO6): Reimplement in terms
22431 of the new macros.
22432 (GCPRO1_VAR, UNGCPRO_VAR): Change the meaning of the second
22433 argument, for consistency with GCPRO2_VAR, etc: it is now the
22434 prefix of the variable, not the variable itself. All uses
22435 changed.
38b2c076
PE
22436 * dired.c (directory_files_internal, file_name_completion):
22437 Rename locals to avoid shadowing.
22438
15206ed9
PE
22439 Fix a race condition diagnosed by gcc -Wsequence-point (Bug#8254).
22440 An expression of the form (DOWNCASE (x) == DOWNCASE (y)), found in
22441 dired.c's scmp function, had undefined behavior.
22442 * lisp.h (DOWNCASE_TABLE, UPCASE_TABLE, DOWNCASE, UPPERCASEP):
22443 (NOCASEP, LOWERCASEP, UPCASE, UPCASE1): Move from here ...
22444 * buffer.h: ... to here, because these macros use current_buffer,
22445 and the new implementation with inline functions needs to have
22446 current_buffer in scope now, rather than later when the macros
22447 are used.
22448 (downcase, upcase1): New static inline functions.
22449 (DOWNCASE, UPCASE1): Reimplement using these functions.
22450 This avoids undefined behavior in expressions like
22451 DOWNCASE (x) == DOWNCASE (y), which previously suffered
22452 from race conditions in accessing the global variables
22453 case_temp1 and case_temp2.
22454 * casetab.c (case_temp1, case_temp2): Remove; no longer needed.
22455 * lisp.h (case_temp1, case_temp2): Remove their decls.
22456 * character.h (ASCII_CHAR_P): Move from here ...
22457 * lisp.h: ... to here, so that the inline functions mentioned
22458 above can use them.
22459
4a6bea26
PE
22460 * dired.c (directory_files_internal_unwind): Now static.
22461
f14b7e14
PE
22462 * fileio.c (file_name_as_directory, directory_file_name):
22463 (barf_or_query_if_file_exists, auto_save_error, auto_save_1):
22464 Now static.
2893f146
PE
22465 (file_name_as_directory): Use const pointers when appropriate.
22466 (Fexpand_file_name): Likewise. In particular, newdir might
22467 point at constant storage, so make it a const pointer.
fd4ead52 22468 (Fmake_directory_internal, Fread_file_name): Remove unused vars.
b14aac08
PE
22469 (Ffile_selinux_context, Fset_file_selinux_context): Fix pointer
22470 signedness issues.
f839df0c
PE
22471 (Fset_file_times, Finsert_file_contents, auto_save_error):
22472 Rename locals to avoid shadowing.
f14b7e14 22473
5716756e 22474 * minibuf.c (choose_minibuf_frame_1): Now static.
62137a95
PE
22475 (Ftry_completion, Fall_completions): Rename or remove locals
22476 to avoid shadowing.
5716756e 22477
b4c3046a
PE
22478 * marker.c (bytepos_to_charpos): Remove; unused.
22479
b45db522
PE
22480 * lisp.h (verify_bytepos, count_markers): New decls,
22481 so that gcc does not warn that these functions aren't declared.
22482
85876d07
PE
22483 * insdel.c (check_markers, make_gap_larger, make_gap_smaller):
22484 (reset_var_on_error, Fcombine_after_change_execute_1): Now static.
f0cb4a60 22485 (CHECK_MARKERS): Redo to avoid gcc -Wempty-body diagnostic.
40ef059e 22486 (copy_text): Remove unused local var.
85876d07 22487
03d78a21 22488 * filelock.c (within_one_second): Now static.
b3dd38ab 22489 (lock_file_1): Rename local to avoid shadowing.
03d78a21 22490
5df8f01b
PE
22491 * buffer.c (fix_overlays_before): Mark locals as initialized.
22492 (fix_start_end_in_overlays): Likewise. This function should be
22493 simplified by using pointers-to-pointers, but that's a different
22494 matter.
b1d876f1 22495 (switch_to_buffer_1): Now static.
8f54f30a
PE
22496 (Fkill_buffer, record_buffer, Fbury_buffer, Fset_buffer_multibyte):
22497 (report_overlay_modification): Rename locals to avoid shadowing.
c3bd59b5 22498
a70072c9 22499 * sysdep.c (system_process_attributes): Rename vars to avoid shadowing.
fbd02d7b 22500 Fix pointer signedness issue.
edced198
PE
22501 (sys_subshell): Mark local as volatile if checking for lint,
22502 to suppress a gcc -Wclobbered warning that does not seem to be right.
15dfd3d9 22503 (MAXPATHLEN): Define only if needed.
a70072c9 22504
a0977c44
PE
22505 * process.c (serial_open, serial_configure): Move decls from here ...
22506 * systty.h: ... to here, so that they can be checked.
22507
a884fdcc
PE
22508 * fns.c (get_random, seed_random): Move extern decls from here ...
22509 * lisp.h: ... to here, so that they can be checked.
22510
604efe86 22511 * sysdep.c (reset_io): Now static.
b8950c94 22512 (wait_for_termination_signal): Remove; unused.
604efe86 22513
38fc62d9
PE
22514 * keymap.c (keymap_parent, keymap_memberp, map_keymap_internal):
22515 (copy_keymap_item, append_key, push_text_char_description):
22516 Now static.
1004a21a 22517 (Fwhere_is_internal): Don't test CONSP (sequences) unnecessarily.
dbbb8427 22518 (DENSE_TABLE_SIZE): Remove; unused.
c1141155
PE
22519 (get_keymap, access_keymap, Fdefine_key, Fwhere_is_internal):
22520 (describe_map_tree):
22521 Rename locals to avoid shadowing.
38fc62d9 22522
2f2650da
PE
22523 * keyboard.c: Declare functions static if they are not used elsewhere.
22524 (echo_char, echo_dash, cmd_error, top_level_2):
22525 (poll_for_input, handle_async_input): Now static.
69a058fa
PE
22526 (read_char, kbd_buffer_get_event, make_lispy_position):
22527 (make_lispy_event, make_lispy_movement, apply_modifiers):
22528 (decode_keyboard_code, tty_read_avail_input, menu_bar_items):
22529 (parse_tool_bar_item, read_key_sequence, Fread_key_sequence):
22530 (Fread_key_sequence_vector): Rename locals to avoid shadowing.
c8a06054 22531 (read_key_sequence, read_char): Mark locals as initialized.
3ac94672 22532 (Fexit_recursive_edit, Fabort_recursive_edit): Mark with NO_RETURN.
2f2650da 22533
a053e86c 22534 * keyboard.h (make_ctrl_char): New decl.
da2f2dd9
PE
22535 (mark_kboards): Move decl here ...
22536 * alloc.c (mark_kboards): ... from here.
a053e86c 22537
4752793e
PE
22538 * lisp.h (force_auto_save_soon): New decl.
22539
74f10ca7 22540 * emacs.c (init_cmdargs): Rename local to avoid shadowing.
244fc23d
PE
22541 (DEFINE_DUMMY_FUNCTION): New macro.
22542 (__do_global_ctors, __do_global_ctors_aux, __do_global_dtors, __main):
22543 Use it.
c03cd23f
PE
22544 (main): Add casts to avoid warnings
22545 if GCC considers string literals to be constants.
74f10ca7 22546
022e70d4
PE
22547 * lisp.h (fatal_error_signal): Add decl, since it's exported.
22548
59d6fe83
PE
22549 * dbusbind.c: Pointer signedness fixes.
22550 (xd_signature, xd_append_arg, xd_initialize):
22551 (Fdbus_call_method, Fdbus_call_method_asynchronously):
22552 (Fdbus_method_return_internal, Fdbus_method_error_internal):
22553 (Fdbus_send_signal, xd_read_message_1, Fdbus_register_service):
22554 (Fdbus_register_signal): Use SSDATA when the context wants char *.
22555
78320123
PE
22556 * dbusbind.c (Fdbus_init_bus): Add cast to avoid warning
22557 if GCC considers string literals to be constants.
49cebcca 22558 (Fdbus_register_service, Fdbus_register_method): Remove unused vars.
78320123 22559
35ac2a97
SM
225602011-03-16 Stefan Monnier <monnier@iro.umontreal.ca>
22561
fb103ca9
SM
22562 * print.c (PRINT_CIRCLE_CANDIDATE_P): New macro.
22563 (print_preprocess, print_object): New macro to fix last change.
22564
35ac2a97
SM
22565 * print.c (print_preprocess): Don't forget font objects.
22566
62973b41
JB
225672011-03-16 Juanma Barranquero <lekktu@gmail.com>
22568
22569 * emacs.c (USAGE3): Doc fixes.
22570
0e48bb22
AS
225712011-03-15 Andreas Schwab <schwab@linux-m68k.org>
22572
22573 * coding.c (detect_coding_iso_2022): Reorganize code to clarify
22574 structure.
22575
7684e57b
JB
225762011-03-14 Juanma Barranquero <lekktu@gmail.com>
22577
22578 * lisp.h (VWindow_system, Qfile_name_history):
22579 * keyboard.h (lispy_function_keys) [WINDOWSNT]:
22580 * w32term.h (w32_system_caret_hwnd, w32_system_caret_height)
22581 (w32_system_caret_x, w32_system_caret_y): Declare extern.
22582
22583 * w32select.c: Don't #include "keyboard.h".
c96bbc66 22584 (run_protected): Add extern declaration for waiting_for_input.
7684e57b
JB
22585
22586 * w32.c (Qlocal, noninteractive1, inhibit_window_system):
22587 * w32console.c (detect_input_pending, read_input_pending)
22588 (encode_terminal_code):
22589 * w32fns.c (quit_char, lispy_function_keys, Qtooltip)
22590 (w32_system_caret_hwnd, w32_system_caret_height, w32_system_caret_x)
22591 (w32_system_caret_y, Qfile_name_history):
22592 * w32font.c (w32font_driver, QCantialias, QCotf, QClang):
22593 * w32inevt.c (reinvoke_input_signal, lispy_function_keys):
22594 * w32menu.c (Qmenu_bar, QCtoggle, QCradio, Qoverriding_local_map)
22595 (Qoverriding_terminal_local_map, Qmenu_bar_update_hook):
22596 * w32proc.c (Qlocal, report_file_error):
22597 * w32term.c (Vwindow_system, updating_frame):
22598 * w32uniscribe.c (initialized, uniscribe_font_driver):
22599 Remove unneeded extern declarations.
22600
2aa46d6c
CY
226012011-03-14 Chong Yidong <cyd@stupidchicken.com>
22602
c96bbc66 22603 * buffer.c (Fmake_indirect_buffer): Fix incorrect assertions.
2aa46d6c 22604
cffc6f3b
CY
226052011-03-13 Chong Yidong <cyd@stupidchicken.com>
22606
22607 * buffer.h (BUF_BEGV, BUF_BEGV_BYTE, BUF_ZV, BUF_ZV_BYTE, BUF_PT)
22608 (BUF_PT_BYTE): Rewrite to handle indirect buffers (Bug#8219).
22609 These macros can no longer be used for assignment.
22610
44f230aa
SM
22611 * buffer.c (Fget_buffer_create, Fmake_indirect_buffer):
22612 Assign struct members directly, instead of using BUF_BEGV etc.
cffc6f3b
CY
22613 (record_buffer_markers, fetch_buffer_markers): New functions for
22614 recording and fetching special buffer markers.
22615 (set_buffer_internal_1, set_buffer_temp): Use them.
22616
22617 * lread.c (unreadchar): Use SET_BUF_PT_BOTH.
22618
22619 * insdel.c (adjust_point): Use SET_BUF_PT_BOTH.
22620
22621 * intervals.c (temp_set_point_both): Use SET_BUF_PT_BOTH.
22622 (get_local_map): Use SET_BUF_BEGV_BOTH and SET_BUF_ZV_BOTH.
22623
22624 * xdisp.c (hscroll_window_tree):
22625 (reconsider_clip_changes): Use PT instead of BUF_PT.
22626
d251f04b
EZ
226272011-03-13 Eli Zaretskii <eliz@gnu.org>
22628
22629 * makefile.w32-in ($(BLD)/editfns.$(O)): Depend on
22630 $(EMACS_ROOT)/lib/intprops.h.
22631
f0c77cd1
PE
226322011-03-13 Paul Eggert <eggert@cs.ucla.edu>
22633
3eca4629
PE
22634 Fix more problems found by GCC 4.5.2's static checks.
22635
7c86ee98
PE
22636 * gtkutil.c (xg_get_pixbuf_from_pixmap): Add cast from char *
22637 to unsigned char * to avoid compiler diagnostic.
b0afc268
PE
22638 (xg_free_frame_widgets): Make it clear that a local variable is
22639 needed only if USE_GTK_TOOLTIP.
01e0b5ad
PE
22640 (gdk_window_get_screen): Make it clear that this macro is needed
22641 only if USE_GTK_TOOLTIP.
1e5524e7
PE
22642 (int_gtk_range_get_value): New function, which avoids a diagnostic
22643 from gcc -Wbad-function-cast.
22644 (xg_set_toolkit_scroll_bar_thumb): Use it.
22645 (xg_tool_bar_callback, xg_tool_item_stale_p): Rewrite to avoid
22646 diagnostic from gcc -Wbad-function-cast.
65dc836c
PE
22647 (get_utf8_string, xg_get_file_with_chooser):
22648 Rename locals to avoid shadowing.
22649 (create_dialog): Move locals to avoid shadowing.
7c86ee98 22650
41729b81
PE
22651 * xgselect.c (xg_select): Remove unused var.
22652
f0c77cd1
PE
22653 * image.c (four_corners_best): Mark locals as initialized.
22654 (gif_load): Initialize transparent_p to zero (Bug#8238).
22655 Mark another local as initialized.
ec6cf4c6 22656 (my_png_error, my_error_exit): Mark with NO_RETURN.
f0c77cd1 22657
ce0ad53d 22658 * image.c (clear_image_cache): Now static.
d5d5a617 22659 (DIM, HAVE_STDLIB_H_1): Remove unused macros.
e22cffbc 22660 (xpm_load): Redo to avoid "discards qualifiers" gcc warning.
77a765fd
PE
22661 (x_edge_detection): Remove unnecessary cast that
22662 gcc -Wbad-function-cast diagnoses.
2037898d 22663 (gif_load): Fix pointer signedness.
6ae141d6
PE
22664 (clear_image_cache, xbm_read_bitmap_data, x_detect_edges):
22665 (jpeg_load, gif_load): Rename locals to avoid shadowing.
ce0ad53d 22666
33383987 226672011-03-12 Paul Eggert <eggert@cs.ucla.edu>
3eca4629 22668
d32df629
PE
22669 Improve quality of tests for time stamp overflow.
22670 For example, without this patch (encode-time 0 0 0 1 1
22671 1152921504606846976) returns the obviously-bogus value (-948597
22672 62170) on my RHEL 5.5 x86-64 host. With the patch, it correctly
22673 reports time overflow. See
22674 <http://lists.gnu.org/archive/html/emacs-devel/2011-03/msg00470.html>.
b8d9bd41
PE
22675 * deps.mk (editfns.o): Depend on ../lib/intprops.h.
22676 * editfns.c: Include limits.h and intprops.h.
22677 (TIME_T_MIN, TIME_T_MAX): New macros.
22678 (time_overflow): Move earlier, to before first use.
22679 (hi_time, lo_time): New functions, for an accurate test for
22680 out-of-range times.
22681 (Fcurrent_time, Fget_internal_run_time, make_time): Use them.
22682 (Fget_internal_run_time): Don't assume time_t fits in int.
22683 (make_time): Use list2 instead of Fcons twice.
22684 (Fdecode_time): More accurate test for out-of-range times.
22685 (check_tm_member): New function.
22686 (Fencode_time): Use it, to test for out-of-range times.
d32df629
PE
22687 (lisp_time_argument): Don't rely on undefined left-shift and
22688 right-shift behavior when checking for time stamp overflow.
8be6f318 22689
fe31d94c
PE
22690 * editfns.c (time_overflow): New function, refactoring common code.
22691 (Fformat_time_string, Fdecode_time, Fencode_time):
22692 (Fcurrent_time_string): Use it.
22693
8be6f318
PE
22694 Move 'make_time' to be next to its inverse 'lisp_time_argument'.
22695 * dired.c (make_time): Move to ...
22696 * editfns.c (make_time): ... here.
22697 * systime.h: Note the move.
22698
09d9db2c 226992011-03-12 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
c47cbdfd 22700
126bc0dc
YM
22701 * fringe.c (update_window_fringes): Remove unused variables.
22702
c47cbdfd
YM
22703 * unexmacosx.c (copy_data_segment): Also copy __got section.
22704 (Bug#8223)
22705
7ac80be9
EZ
227062011-03-12 Eli Zaretskii <eliz@gnu.org>
22707
c96bbc66 22708 * termcap.c [MSDOS]: Include "msdos.h".
058e5dad
EZ
22709 (find_capability, tgetnum, tgetflag, tgetstr, tputs, tgetent):
22710 Constify `char *' arguments and their references according to
22711 prototypes in tparam.h.
22712
ecb0f94d 22713 * deps.mk (termcap.o): Depend on tparam.h and msdos.h.
058e5dad 22714
7ac80be9
EZ
22715 * msdos.c (XMenuAddPane): 3rd argument is `const char *' now.
22716 Adapt all references accordingly.
22717
22718 * msdos.h (XMenuAddPane): 3rd argument is `const char *' now.
22719
ef1fd07e
TT
227202011-03-11 Tom Tromey <tromey@redhat.com>
22721
22722 * buffer.c (syms_of_buffer): Remove obsolete comment.
22723
7ef4b50c
EZ
227242011-03-11 Eli Zaretskii <eliz@gnu.org>
22725
22726 * termhooks.h (encode_terminal_code): Declare prototype.
22727
22728 * msdos.c (encode_terminal_code): Don't declare prototype.
22729
22730 * term.c (encode_terminal_code): Now external again, used by
22731 w32console.c and msdos.c.
22732
44f230aa
SM
22733 * makefile.w32-in ($(BLD)/term.$(O), ($(BLD)/tparam.$(O)):
22734 Depend on $(SRC)/tparam.h, see 2011-03-11T07:24:21Z!eggert@cs.ucla.edu.
7ef4b50c 22735
4b1ec863 227362011-03-11 Paul Eggert <eggert@cs.ucla.edu>
f78faa98 22737
1714f52b 22738 Fix some minor problems found by GCC 4.5.2's static checks.
83316bf4 22739
4b1ec863
PE
22740 * fringe.c (update_window_fringes): Mark locals as initialized
22741 (Bug#8227).
22742 (destroy_fringe_bitmap, init_fringe_bitmap): Now static.
bf60f616 22743
524c7aa6
PE
22744 * alloc.c (mark_fringe_data): Move decl from here ...
22745 * lisp.h (mark_fringe_data) [HAVE_WINDOW_SYSTEM]: ... to here,
22746 to check its interface.
22747 (init_fringe_once): Do not declare unless HAVE_WINDOW_SYSTEM.
22748
a5c0af81 22749 * fontset.c (free_realized_fontset): Now static.
7519b8cd 22750 (Fset_fontset_font): Rename local to avoid shadowing.
cc6e5db1 22751 (fontset_font): Mark local as initialized.
a9a06e0b 22752 (FONTSET_SPEC, FONTSET_REPERTORY, RFONT_DEF_REPERTORY): Remove; unused.
a5c0af81 22753
b4716021
PE
22754 * xrdb.c: Include "xterm.h", to check x_load_resources's interface.
22755
811e9bac 22756 * xselect.c (x_disown_buffer_selections): Remove; not used.
7b83e2f1 22757 (TRACE3) [!defined TRACE_SELECTION]: Remove; not used.
aa0daa9f
PE
22758 (x_own_selection, Fx_disown_selection_internal): Rename locals
22759 to avoid shadowing.
22760 (x_handle_dnd_message): Remove local to avoid shadowing.
811e9bac 22761
7e3ab302
PE
22762 * lisp.h (GCPRO1_VAR, UNGCPRO_VAR): New macros,
22763 so that the caller can use some name other than gcpro1.
22764 (GCPRO1, UNGCPRO): Reimplement in terms of the new macros.
58d2d479
PE
22765 * xfns.c (Fx_create_frame, x_create_tip_frame, Fx_show_tip):
22766 (Fx_backspace_delete_keys_p):
22767 Use them to avoid shadowing, and rename vars to avoid shadowing.
22768 (x_decode_color, x_set_name, x_window): Now static.
6b437900 22769 (Fx_create_frame): Add braces to silence GCC warning.
c0951e53 22770 (Fx_file_dialog, Fx_select_font): Fix pointer signedness.
06b0c8a0
PE
22771 (x_real_positions, xg_set_icon_from_xpm_data, x_create_tip_frame):
22772 Remove unused locals.
7e3ab302
PE
22773 (Fx_create_frame, x_create_tip_frame, Fx_show_tip):
22774 (Fx_backspace_delete_keys_p): Rename locals to avoid shadowing.
22775 Some of these renamings use the new GCPRO1_VAR and UNGCPRO_VAR
22776 macros.
f78faa98 22777
e2b13473
PE
22778 * xterm.h (x_mouse_leave): New decl.
22779
77f23912
PE
22780 * xterm.c (x_copy_dpy_color, x_focus_on_frame, x_unfocus_frame):
22781 Remove unused functions.
cdf4ba58
PE
22782 (x_shift_glyphs_for_insert, XTflash, XTring_bell):
22783 (x_calc_absolute_position): Now static.
7411c686 22784 (XTread_socket): Don't define label "out" unless it's used.
2b07bcff 22785 Don't declare local "event" unless it's used.
ed7bf3a5
PE
22786 (x_iconify_frame, x_free_frame_resources): Don't declare locals
22787 unless they are used.
38d0b34a
PE
22788 (XEMBED_VERSION, xembed_set_info): Don't define unless needed.
22789 (x_fatal_error_signal): Remove; not used.
a6067996
PE
22790 (x_draw_image_foreground, redo_mouse_highlight, XTmouse_position):
22791 (x_scroll_bar_report_motion, handle_one_xevent, x_draw_bar_cursor):
22792 (x_error_catcher, x_connection_closed, x_error_handler):
22793 (x_error_quitter, xembed_send_message, x_iconify_frame):
22794 (my_log_handler): Rename locals to avoid shadowing.
28f1c698 22795 (x_delete_glyphs, x_ins_del_lines): Mark with NO_RETURN.
2a8fade0 22796 (x_connection_closed): Tell GCC not to suggest NO_RETURN.
77f23912 22797
44f230aa
SM
22798 * xfaces.c (clear_face_cache, Fx_list_fonts, Fface_font):
22799 Rename or move locals to avoid shadowing.
6b463e58 22800 (tty_defined_color, merge_face_heights): Now static.
5967d051 22801 (free_realized_faces_for_fontset): Remove; not used.
1e9966ea
PE
22802 (Fx_list_fonts): Mark variable that gcc -Wuninitialized
22803 does not deduce is never used uninitialized.
73719eba
PE
22804 (STRDUPA, LSTRDUPA, FONT_POINT_SIZE_QUANTUM): Remove; not used.
22805 (LFACEP): Define only if XASSERTS, as it's not needed otherwise.
071048a3 22806
426994c3 22807 * terminal.c (store_terminal_param): Now static.
5489860b 22808
032f1620 22809 * xmenu.c (menu_highlight_callback): Now static.
9d66f88e 22810 (set_frame_menubar): Remove unused local.
d4323972 22811 (xmenu_show): Rename parameter to avoid shadowing.
6d1f7fee
PE
22812 (xmenu_show, xdialog_show, xmenu_show): Make local pointers "const"
22813 since they might point to immutable storage.
281585b0
PE
22814 (next_menubar_widget_id): Declare only if USE_X_TOOLKIT,
22815 since it's unused otherwise.
032f1620 22816
367c19e5 22817 * xdisp.c (produce_glyphless_glyph): Initialize lower_xoff.
53df7c11 22818 Add a FIXME, since the code still doesn't look right. (Bug#8215)
9f36b9fd
PE
22819 (Fcurrent_bidi_paragraph_direction): Simplify slightly; this
22820 avoids a gcc -Wuninitialized diagnostic.
0e086e8f 22821 (display_line, BUILD_COMPOSITE_GLYPH_STRING, draw_glyphs):
44a3a108
PE
22822 (note_mouse_highlight): Mark variables that gcc -Wuninitialized
22823 does not deduce are never used uninitialized.
70739cbe 22824
07b48fa9
PE
22825 * lisp.h (IF_LINT): New macro, copied from ../lib-src/emacsclient.c.
22826
8868a238 22827 * xdisp.c (redisplay_window): Rename local to avoid shadowing.
4554d213
PE
22828 * window.c (window_loop, size_window):
22829 (run_window_configuration_change_hook, enlarge_window): Likewise.
8868a238 22830
7e5cf297 22831 * window.c (display_buffer): Now static.
d6550a9f
PE
22832 (size_window): Mark variables that gcc -Wuninitialized
22833 does not deduce are never used uninitialized.
a586633d
PE
22834 * window.h (check_all_windows): New decl, to forestall
22835 gcc -Wmissing-prototypes diagnostic.
5b555da1 22836 * dispextern.h (bidi_dump_cached_states): Likewise.
7e5cf297 22837
f6095868
PE
22838 * charset.h (CHECK_CHARSET_GET_CHARSET): Rename locals to avoid
22839 shadowing.
22840 * charset.c (map_charset_for_dump, Fchar_charset): Likewise.
726929c4
PE
22841 Include <limits.h>.
22842 (Fsort_charsets): Redo min/max calculation to shorten the code a bit
22843 and to avoid gcc -Wuninitialized warning.
89ef49df
PE
22844 (load_charset_map): Mark variables that gcc -Wuninitialized
22845 does not deduce are never used uninitialized.
53df7c11 22846 (load_charset): Abort instead of using uninitialized var (Bug#8229).
f6095868 22847
f38b440c
PE
22848 * coding.c (coding_set_source, coding_set_destination):
22849 Use "else { /* comment */ }" rather than "else /* comment */;"
22850 for clarity, and to avoid gcc -Wempty-body warning.
2735d060
PE
22851 (Fdefine_coding_system_internal): Don't redeclare 'i' inside
22852 a block, when the outer 'i' will do.
22853 (decode_coding_utf_8, decode_coding_utf_16, detect_coding_emacs_mule):
22854 (emacs_mule_char, decode_coding_emacs_mule, detect_coding_iso_2022):
22855 (decode_coding_iso_2022, decode_coding_sjis, decode_coding_big5):
22856 (decode_coding_raw_text, decode_coding_charset, get_translation_table):
22857 (Fdecode_sjis_char, Fdefine_coding_system_internal):
22858 Rename locals to avoid shadowing.
22859 * character.h (FETCH_STRING_CHAR_ADVANCE): Likewise.
e2f1bab9
PE
22860 * coding.c (emacs_mule_char, encode_invocation_designation):
22861 Now static, since they're not used elsewhere.
413bb2db 22862 (decode_coding_iso_2022): Add "default: abort ();" as a safety check.
c4a63b12 22863 (decode_coding_object, encode_coding_object, detect_coding_system):
ee05f961
PE
22864 (decode_coding_emacs_mule): Mark variables that gcc
22865 -Wuninitialized does not deduce are never used uninitialized.
160b01f6
PE
22866 (detect_coding_iso_2022): Initialize a local variable that might
22867 be used uninitialized. Leave a FIXME because it's not clear that
53df7c11 22868 this initialization is needed. (Bug#8211)
5f58e762
PE
22869 (ISO_CODE_LF, ISO_CODE_CR, CODING_ISO_FLAG_EUC_TW_SHIFT):
22870 (ONE_MORE_BYTE_NO_CHECK, UTF_BOM, UTF_16_INVALID_P):
22871 (SHIFT_OUT_OK, ENCODE_CONTROL_SEQUENCE_INTRODUCER):
22872 (ENCODE_DIRECTION_R2L, ENCODE_DIRECTION_L2R):
22873 Remove unused macros.
f38b440c 22874
232b38b9 22875 * category.c (hash_get_category_set): Remove unused local var.
9f3b5e69 22876 (copy_category_table): Now static, since it's not used elsewhere.
d0891610 22877 * character.c (string_count_byte8): Likewise.
232b38b9 22878
fb90da1b
PE
22879 * ccl.c (CCL_WRITE_STRING, CCL_ENCODE_CHAR, Fccl_execute_on_string):
22880 (Fregister_code_conversion_map): Rename locals to avoid shadowing.
22881
fb93dbc2
PE
22882 * chartab.c (copy_sub_char_table): Now static, since it's not used
22883 elsewhere.
5c156ace
PE
22884 (sub_char_table_ref_and_range, char_table_ref_and_range):
22885 Rename locals to avoid shadowing.
bbcd0949 22886 (ASET_RANGE, GET_SUB_CHAR_TABLE): Remove unused macros.
fb93dbc2 22887
7d3b3862 22888 * bidi.c (bidi_check_type): Now static, since it's not used elsewhere.
630d6892 22889 (BIDI_BOB): Remove unused macro.
7d3b3862 22890
6be7d3da
PE
22891 * cm.c (cmgoto): Mark variables that gcc -Wuninitialized does not
22892 deduce are never used uninitialized.
c2ed9c8b 22893 * term.c (encode_terminal_code): Likewise.
6be7d3da 22894
75f8807f 22895 * term.c (encode_terminal_code): Now static. Remove unused local.
72abad34 22896
50938595
PE
22897 * tparam.h: New file.
22898 * term.c, tparam.h: Include it.
22899 * deps.mk (term.o, tparam.o): Depend on tparam.h.
22900 * term.c (tputs, tgetent, tgetflag, tgetnum, tparam, tgetstr):
22901 Move these decls to tparam.h, and make them agree with what
22902 is actually in tparam.c. The previous trick of using incompatible
22903 decls in different modules does not conform to the C standard.
22904 All callers of tparam changed to use tparam's actual API.
22905 * tparam.c (tparam1, tparam, tgoto):
22906 Use const pointers where appropriate.
22907
fbceeba2
PE
22908 * cm.c (calccost, cmgoto): Use const pointers where appropriate.
22909 * cm.h (struct cm): Likewise.
22910 * dispextern.h (do_line_insertion_deletion_costs): Likewise.
22911 * scroll.c (ins_del_costs, do_line_insertion_deletion_costs): Likewise.
22912 * term.c (tty_ins_del_lines, calculate_costs, struct fkey_table):
22913 (term_get_fkeys_1, append_glyphless_glyph, produce_glyphless_glyph):
22914 (turn_on_face, init_tty): Likewise.
22915 * termchar.h (struct tty_display_info): Likewise.
fbceeba2 22916
7f3f1250
PE
22917 * term.c (term_mouse_position): Rename local to avoid shadowing.
22918
e6ca6543
PE
22919 * alloc.c (mark_ttys): Move decl from here ...
22920 * lisp.h (mark_ttys): ... to here, so that it's checked against defn.
22921
c40f8d15
AS
229222011-03-11 Andreas Schwab <schwab@linux-m68k.org>
22923
22924 * .gdbinit (pwinx, xbuffer): Fix access to buffer name.
22925
cfe0661d
JB
229262011-03-09 Juanma Barranquero <lekktu@gmail.com>
22927
22928 * search.c (compile_pattern_1): Remove argument regp, unused since
22929 revid:rms@gnu.org-19941211082627-3x1g1wyqkjmwloig.
22930 (compile_pattern): Don't pass it.
22931
0afb4571
J
229322011-03-08 Jan Djärv <jan.h.d@swipnet.se>
22933
22934 * xterm.h (DEFAULT_GDK_DISPLAY): New define.
22935 (GDK_WINDOW_XID, gtk_widget_get_preferred_size): New defines
22936 for ! HAVE_GTK3.
22937 (GTK_WIDGET_TO_X_WIN): Use GDK_WINDOW_XID.
22938
22939 * xmenu.c (menu_position_func): Call gtk_widget_get_preferred_size.
22940
22941 * gtkutil.c: Include gtkx.h if HAVE_GTK3. If ! HAVE_GTK3, define
22942 gdk_window_get_screen, gdk_window_get_geometry,
22943 gdk_x11_window_lookup_for_display and GDK_KEY_g.
22944 (xg_set_screen): Use DEFAULT_GDK_DISPLAY.
22945 (xg_get_pixbuf_from_pixmap): New function.
22946 (xg_get_pixbuf_from_pix_and_mask): Change parameters from GdkPixmap
22947 to Pixmap, take frame as parameter, remove GdkColormap parameter.
22948 Call xg_get_pixbuf_from_pixmap instead of
22949 gdk_pixbuf_get_from_drawable.
22950 (xg_get_image_for_pixmap): Do not make GdkPixmaps, call
22951 xg_get_pixbuf_from_pix_and_mask with Pixmap parameters instead.
22952 (xg_check_special_colors): Use GtkStyleContext and its functions
22953 for HAVE_GTK3.
22954 (xg_prepare_tooltip, xg_hide_tooltip): Call gdk_window_get_screen.
22955 (xg_prepare_tooltip, create_dialog, menubar_map_cb)
22956 (xg_update_frame_menubar, xg_tool_bar_detach_callback)
44f230aa
SM
22957 (xg_tool_bar_attach_callback, xg_update_tool_bar_sizes):
22958 Call gtk_widget_get_preferred_size.
0afb4571
J
22959 (xg_frame_resized): gdk_window_get_geometry only takes 5
22960 parameters.
44f230aa
SM
22961 (xg_win_to_widget, xg_event_is_for_menubar):
22962 Call gdk_x11_window_lookup_for_display.
0afb4571
J
22963 (xg_set_widget_bg): New function.
22964 (delete_cb): New function.
895009e1 22965 (xg_create_frame_widgets): Connect delete-event to delete_cb.
5c32d3f2 22966 Call xg_set_widget_bg. Only set background pixmap for ! HAVE_GTK3
0afb4571
J
22967 (xg_set_background_color): Call xg_set_widget_bg.
22968 (xg_set_frame_icon): Call xg_get_pixbuf_from_pix_and_mask.
22969 (xg_create_scroll_bar): vadj is a GtkAdjustment for HAVE_GTK3.
22970 Only call gtk_range_set_update_policy if ! HAVE_GTK3.
22971 (xg_make_tool_item): Only connect xg_tool_bar_item_expose_callback
22972 if ! HAVE_GTK3.
22973 (update_frame_tool_bar): Call gtk_widget_hide.
22974 (xg_initialize): Use GDK_KEY_g.
22975
22976 * xsmfns.c (gdk_set_sm_client_id): Define to gdk_set_sm_client_id
22977 if ! HAVE_GTK3
22978 (x_session_initialize): Call gdk_x11_set_sm_client_id.
22979
22980 * xterm.c (XFillRectangle): Use cairo routines for HAVE_GTK3.
22981 (x_term_init): Disable Xinput(2) with GDK_CORE_DEVICE_EVENTS.
22982 Load ~/emacs.d/gtkrc only for ! HAVE_GTK3.
22983
1c2cc4ef
JB
229842011-03-08 Juanma Barranquero <lekktu@gmail.com>
22985
22986 * w32xfns.c (select_palette): Check success of RealizePalette against
22987 GDI_ERROR, not zero.
22988
33383987 22989See ChangeLog.11 for earlier changes.
aac0c6e3
MR
22990
22991;; Local Variables:
22992;; coding: utf-8
aac0c6e3
MR
22993;; End:
22994
ab422c4d 22995 Copyright (C) 2011-2013 Free Software Foundation, Inc.
aac0c6e3
MR
22996
22997 This file is part of GNU Emacs.
22998
22999 GNU Emacs is free software: you can redistribute it and/or modify
23000 it under the terms of the GNU General Public License as published by
23001 the Free Software Foundation, either version 3 of the License, or
23002 (at your option) any later version.
23003
23004 GNU Emacs is distributed in the hope that it will be useful,
23005 but WITHOUT ANY WARRANTY; without even the implied warranty of
23006 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23007 GNU General Public License for more details.
23008
23009 You should have received a copy of the GNU General Public License
23010 along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.