(install-etc): Fix previous change
[bpt/emacs.git] / src / ChangeLog
CommitLineData
9520f2f2
DC
12012-10-15 Daniel Colascione <dancol@dancol.org>
2
3 * dbusbind.c: Add comment explaining reason for previous change.
4
dca778d5
MR
52012-10-15 Martin Rudalics <rudalics@gmx.at>
6
7 * window.c (Fwindow_end): Rewrite check whether cached position
8 can be used (Bug#12600).
9 (resize_frame_windows, grow_mini_window, shrink_mini_window):
10 Set windows_or_buffers_changed.
11
3e0341b0
DC
122012-10-15 Daniel Colascione <dancol@dancol.org>
13
14 * dbusbind.c: Fix cygw32 build break when compiling with dbus
15 enabled by undefining the symbol "interface", which the platform
16 headers define to something incompatible.
17
33d4113c
DC
182012-10-14 Daniel Colascione <dancol@dancol.org>
19
20 * image.c (init_tiff_functions, init_imagemagick_functions)
21 (init_svg_functions): Fix cygw32 build break by using these
22 functions only when WINDOWSNT _and_ HAVE_NTGUI.
23
a36fb15e
JD
242012-10-14 Jan Djärv <jan.h.d@swipnet.se>
25
26 * nsterm.m (ns_select): Count fd:s in writefs also (Bug#12422).
27
537f336d
JD
282012-10-13 Jan Djärv <jan.h.d@swipnet.se>
29
30 * gtkutil.c (xg_set_widget_bg): Divide by 65535 (Bug#12612).
31
0ba06a77
KH
322012-10-13 HANATAKA, Shinya <bogytech@gmail.com> (tiny change)
33
34 * coding.c (detect_coding): Set coding->id before calling
35 this->detector.
36
ce2fe65a
AS
372012-10-13 Andreas Schwab <schwab@linux-m68k.org>
38
39 * fileio.c: Formatting fixes.
40
d6453ce4
PE
412012-10-13 Paul Eggert <eggert@cs.ucla.edu>
42
43 Fix some stat-related races.
44 * fileio.c (Fwrite_region): Avoid race condition if a file is
45 removed or renamed by some other process immediately after Emacs
46 writes it but before Emacs stats it. Do not assume that stat (or
47 fstat) succeeds.
48 * image.c (slurp_file): Resolve the file name with fopen + fstat
49 rather than stat + fopen.
50 (pbm_read_file) [0]: Remove unused code with stat race.
51 * process.c (allocate_pty) [HAVE_PTYS && !PTY_ITERATION && !PTY_OPEN]:
52 Remove ineffective code with stat race.
53
06485aa8
SM
542012-10-12 Stefan Monnier <monnier@iro.umontreal.ca>
55
56 * doc.c (get_doc_string): Don't signal an error if the file is missing.
57
167e3640
JD
582012-10-12 Jan Djärv <jan.h.d@swipnet.se>
59
60 * nsterm.m (hold_event_q): New static variable.
61 (EV_TRAILER, sendScrollEventAtLoc:fromEvent:): Call hold_event if
62 ! q_event_ptr.
63 (hold_event): New function.
64 (ns_read_socket): If hold_event_q have events, store them and
65 return (Bug#12384).
66 (setPosition:portion:whole:): Send SIGIO to ourselves if apploopnr
67 is zero (Bug#12384).
68
c40239df
JB
692012-10-12 Juanma Barranquero <lekktu@gmail.com>
70
71 * makefile.w32-in ($(BLD)/w32select.$(O)): Update dependencies.
72
bb385a92
EZ
732012-10-12 Eli Zaretskii <eliz@gnu.org>
74
2a9f1099
EZ
75 * makefile.w32-in ($(BLD)/fileio.$(O)): Add sys/file.h.
76
bb385a92
EZ
77 * fileio.c (check_existing): New function.
78 (make_temp_name, Ffile_exists_p, Ffile_writable_p): Call it
79 instead of calling 'stat', when what's needed is to check whether
80 a file exists. This avoids expensive system calls on MS-Windows.
81 (Bug#12587)
82
8599b23a 83 * w32.c (init_environment): Call 'check_existing' instead of 'stat'.
bb385a92
EZ
84
85 * lread.c (openp) [WINDOWSNT]: Call 'access' instead of 'stat' to
86 determine whether a file exists and is not a directory.
87
88 * lisp.h (check_existing): Add prototype.
89
2b9c2e68
JD
902012-10-12 Jan Djärv <jan.h.d@swipnet.se>
91
92 * nsfont.m (nsfont_open): Remove font cache, it is not GC correct.
93
81749a23
GM
942012-10-12 Glenn Morris <rgm@gnu.org>
95
96 * buffer.c (Fset_buffer): Doc fix. (Bug#12624)
97
5253a5fd
SM
982012-10-11 Stefan Monnier <monnier@iro.umontreal.ca>
99
389a94a5
SM
100 * buffer.c (Fkill_buffer): Null out the overlay list(s) as well.
101
5253a5fd
SM
102 * eval.c (Fautoload): Remember previous autoload status in load-history.
103
7cded46f
PE
1042012-10-11 Paul Eggert <eggert@cs.ucla.edu>
105
106 lread.c, macros.c, marker.c, menu.c, minibuf.c: Use bool for booleans.
107 * lread.c (load_each_byte, new_backquote_flag, readchar)
108 (read_filtered_event, lisp_file_lexically_bound_p)
109 (safe_to_load_version, Fload, complete_filename_p, openp)
110 (build_load_history, readevalloop, read_escape, read1)
111 (string_to_number, read_vector, read_list):
112 * macros.c (Fstart_kbd_macro):
113 * marker.c (CONSIDER):
114 * menu.c (parse_single_submenu, digest_single_submenu)
115 (find_and_return_menu_selection, Fx_popup_menu):
116 * minibuf.c (read_minibuf_noninteractive, read_minibuf)
117 (Ftry_completion):
118 * nsmenu.m (ns_update_menubar, runMenuAt:forFrame:keymaps:):
119 (ns_menu_show):
120 * xmenu.c (set_frame_menubar, create_and_show_popup_menu)
121 (xmenu_show, xdialog_show):
122 Use bool for booleans.
123 * lread.c (safe_to_load_version): Rename from safe_to_load_p,
124 as it's not a predicate. All uses changed. Omit unnecessary
125 buffer termination.
126
549c3414
DA
1272012-10-11 Dmitry Antipov <dmantipov@yandex.ru>
128
129 * editfns.c (save_excursion_save): Use nil if mark points to nowhere.
130 (save_excursion_restore): Do not restore mark if it was not saved.
131
e85aafe7
PE
1322012-10-11 Paul Eggert <eggert@cs.ucla.edu>
133
fd2f90cf
PE
134 * marker.c (cached_modiff): EMACS_INT, not int.
135
c1af190b
PE
136 * w32select.c (waiting_for_input): Declare by including "keyboard.h"
137 instead of having a wrong decl.
e85aafe7
PE
138 * nsmenu.m (waiting_for_input): Remove wrong decl.
139
e738ca56
PE
1402012-10-10 Paul Eggert <eggert@cs.ucla.edu>
141
9fa1de30
PE
142 keyboard.c, keymap.c: Use bool for booleans.
143 * dispnew.c (sit_for): Distinguish between 3-way display_option
144 and boolean do_display.
145 * keyboard.c (single_kboard, this_command_key_count_reset)
146 (waiting_for_input, echoing, immediate_quit, input_pending)
147 (interrupt_input, interrupts_deferred, pop_kboard)
148 (temporarily_switch_to_single_kboard, ignore_mouse_drag_p)
149 (command_loop_1, adjust_point_for_property)
150 (safe_run_hooks_error, input_polling_used, read_char):
151 (help_char_p, readable_events, kbd_buffer_events_waiting)
152 (kbd_buffer_get_event, timer_check_2, make_lispy_event)
153 (lucid_event_type_list_p, get_input_pending):
154 (gobble_input, menu_separator_name_p, menu_bar_item)
155 (parse_menu_item, parse_tool_bar_item, read_char_x_menu_prompt)
156 (read_char_minibuf_menu_prompt, access_keymap_keyremap)
157 (keyremap_step, test_undefined, read_key_sequence)
158 (detect_input_pending, detect_input_pending_ignore_squeezables)
159 (detect_input_pending_run_timers, requeued_events_pending_p)
160 (quit_throw_to_read_char, Fset_input_interrupt_mode):
161 * keymap.c (get_keymap, keymap_parent, keymap_memberp)
162 (access_keymap_1, access_keymap, map_keymap, get_keyelt)
163 (Fdefine_key, Flookup_key, struct accessible_keymaps_data)
164 (accessible_keymaps_1, Fkey_description, push_key_description):
165 (shadow_lookup, struct where_is_internal_data)
166 (where_is_internal, Fwhere_is_internal, where_is_internal_1)
167 (Fdescribe_buffer_bindings, describe_map_tree, struct describe_map_elt)
168 (describe_map, describe_vector):
169 * menu.c (single_menu_item):
170 * nsmenu.m (ns_update_menubar):
171 * process.c (wait_reading_process_output):
172 * search.c (scan_buffer, scan_newline):
173 Use bool for boolean.
174 * keyboard.c (timers_run, swallow_events)
175 (detect_input_pending_run_timers):
176 * process.c (wait_reading_process_output):
177 Use unsigned for counter where wraparound-on-overflow is desired,
178 since unsigned is guaranteed to have that behavior and signed is not.
179 (read_char): Use ptrdiff_t for string length.
180 (get_input_pending): Remove first argument, since it was always
181 the same pointer-to-int (now pointer-to-boolean) &input_pending,
182 and behave as if it had that value. Return new value of
183 input_pending. All callers changed.
184 * keyboard.h (struct kboard): Use unsigned : 1 for boolean member
185 immediate_echo. Use ptrdiff_t for echo_after_prompt, since it's
186 a string length.
187 * keymap.c (push_key_description): Omit last arg, which was always 1.
188 All callers changed.
189
e738ca56
PE
190 * regex.c (immediate_quit) [emacs]: Remove duplicate decl.
191
29f21cdf
JB
1922012-10-10 Juanma Barranquero <lekktu@gmail.com>
193
194 * makefile.w32-in ($(BLD)/dispnew.$(O), $(BLD)/indent.$(O))
195 ($(BLD)/term.$(O)): Update dependencies.
196
6aea7528
DA
1972012-10-10 Dmitry Antipov <dmantipov@yandex.ru>
198
199 * alloc.c (mark_object): Use meaningful PVEC_NORMAL_VECTOR.
200 * lisp.h (enum pvec_type): Adjust comments and omit explicit
201 initializer for PVEC_NORMAL_VECTOR.
202
5f3f57be
PE
2032012-10-10 Paul Eggert <eggert@cs.ucla.edu>
204
205 Clean out old termopts cruft.
206 * termopts.h (flow_control, meta_key): Remove unused decls.
207 * dispnew.c, indent.c, nsterm.m, term.c, xsettings.c, xsmfns.c:
208 Don't include termopts.h.
209
3e98c68e
DA
2102012-10-10 Dmitry Antipov <dmantipov@yandex.ru>
211
212 * alloc.c (gc_sweep): Use pointer-to-a-pointer loop for buffers.
213
77e344e5
PE
2142012-10-10 Paul Eggert <eggert@cs.ucla.edu>
215
216 * commands.h (immediate_quit): Remove duplicate decl.
217
5683d7cd
JD
2182012-10-09 Jan Djärv <jan.h.d@swipnet.se>
219
220 * nsfont.m (Vfonts_in_cache): Remove, not needed as font.c handles
221 caching.
222 (nsfont_open): Remove setting of Vfonts_in_cache.
223 (syms_of_nsfont): Remove initialization of Vfonts_in_cache
224
cf5fc6db
EZ
2252012-10-09 Eli Zaretskii <eliz@gnu.org>
226
b15736e6
EZ
227 * w32fns.c (w32_last_error): Change the return value to DWORD, to
228 match what GetLastError returns. Explain why the function is
229 needed.
230
cf5fc6db
EZ
231 * frame.c (delete_frame): Rename local variable 'tooltip_frame' to
232 'is_tooltip_frame', to avoid confusion with its global namesake.
233
f99714ce
DC
2342012-10-08 Daniel Colascione <dancol@dancol.org>
235
236 * xdisp.c (start_hourglass): Call w32_note_current_window when
2b1f11ed
EZ
237 HAVE_NTGUI, not just WINDOWSNT, resolving a problem in the cygw32
238 build that caused Emacs to display the hourglass cursor forever.
f99714ce 239
fd59cb29
GM
240 * w32fns.c (Fx_display_color_cells): Instead of using NCOLORS,
241 which is broken under remote desktop, calculate the number of
242 colors available for a display based on the display's number of
243 planes and number of bits per pixel per plane. (bug#10397).
244
62c480c9 2452012-10-08 Jan Djärv <jan.h.d@swipnet.se>
fd59cb29 246
62c480c9
JD
247 * nsfont.m (Vfonts_in_cache): New variable.
248 (nsfont_open): Use unsignedLongLongValue for cache in case wide ints
249 are used. Add cached fonts to Vfonts_in_cache.
250 (syms_of_nsfont): Initialize and staticpro Vfonts_in_cache.
251
607446ba
JB
2522012-10-08 Juanma Barranquero <lekktu@gmail.com>
253
fd5125ad
JB
254 * makefile.w32-in (LOCAL_FLAGS): Don't define HAVE_NTGUI, it's now
255 in nt/config.nt.
46979e0b
JB
256 (FONT_H): Define after FRAME_H.
257 ($(BLD)/emacs.$(O), $(BLD)/process.$(O), $(BLD)/w32heap.$(O)):
258 Update dependencies.
fd5125ad 259
607446ba
JB
260 * w32term.c: Remove leftover declaration of keyboard_codepage.
261
b6f4e300
EZ
2622012-10-08 Eli Zaretskii <eliz@gnu.org>
263
c54ebba4
EZ
264 * makefile.w32-in (FONT_H): Add $(FRAME_H).
265 (W32TERM_H): Add $(ATIMER_H) and $(FRAME_H).
266 ($(BLD)/emacs.$(O), $(BLD)/w32console.$(O)): Update dependencies.
267 (GLOBAL_SOURCES): Add cygw32.c.
fd59cb29
GM
268 ($(BLD)/unexw32.$(O)):
269 ($(BLD)/w32.$(O)):
270 ($(BLD)/w32console.$(O)):
271 ($(BLD)/w32fns.$(O)):
272 ($(BLD)/w32heap.$(O)):
273 ($(BLD)/w32menu.$(O)):
15c720a3 274 ($(BLD)/w32proc.$(O)): Add w32common.h.
c54ebba4 275
b6f4e300
EZ
276 * w32fns.c (w32_color_map_lookup, x_to_w32_color): Argument is now
277 'const char *'.
278 (x_to_w32_color): Don't modify the argument, modify a copy instead.
279
501199a3
DC
2802012-10-08 Daniel Colascione <dancol@dancol.org>
281
282 * w32term.h (WM_EMACS_BRINGTOTOP, WM_EMACS_INPUT_READY)
283 (WM_EMACS_END): Change WM_EMACS_BRINGTOTOP from 22 to 21 to close
284 accidental message numbering hole. Change other messages to
285 match.
286
287 * w32select.h (HAVE_W32SELECT): Remove.
288
289 * w32select.c, w32proc.c, w32menu.c, w32console.c, w32.c: Include
290 w32common.h instead of w32heap.h
291
292 * w32heap.h (ROUND_UP, ROUND_DOWN, get_page_size)
293 (get_allocation_unit, get_processor_type, get_w32_major_version)
294 (get_w32_minor_version, sysinfo_cache, osinfo_cache)
295 (w32_major_version, w32_minor_version, w32_build_number, OS_9X)
296 (OS_NT, os_subtype, cache_system_info): Move declarations to
297 w32common.
298
299 * w32heap.c: Include w32common.h.
300 (sysinfo_cache, syspage_mask, osinfo_cache, w32_major_version)
8599b23a
SM
301 (w32_minor_version, w32_build_number, w32_subtype):
302 Remove duplicate definitions.
501199a3
DC
303
304 * w32fns.c: Include w32common.h; include w32heap.h only in
305 WINDOWSNT.
306
307 (Fx_file_dialog): Clarify comment on GetOpenFileName structure.
308 Use `report_file_error' instead of `error' in order to better
309 inform users of what went wrong. Increase NTGUI_UNICODE file
310 dialog box file name length to 32k, the maximum allowed by the NT
311 kernel.
312
313 * w32common.h: New file.
314 (ROUND_UP, ROUND_DOWN, get_page_size)
315 (get_allocation_unit, get_processor_type, get_w32_major_version)
316 (get_w32_minor_version, sysinfo_cache, osinfo_cache)
317 (w32_major_version, w32_minor_version, w32_build_number, OS_9X)
318 (OS_NT, os_subtype, cache_system_info): Move here.
319
320 * unexw32.c, unexcw.c: Include w32common.h.
321
322 * emacs.c (main): Use (defined (WINDOWSNT) || defined
323 HAVE_NTGUI) instead of removed HAVE_W32SELECT to decide whether
324 to call syms_of_w32select.
325
326 * cygw32.h: Remove obsolete EXFUN declarations.
327
328 * cygw32.c (Qutf_16_le): Rename to Qutf_16le.
329
330 * Makefile.in (SOME_MACHINE_OBJECTS): Reverse accidental removal
331 of w32inevt.o from SOME_MACHINE_OBJECTS.
332
93aa5c81
DC
3332012-10-08 Daniel Colascione <dancol@dancol.org>
334
335 * image.c: Permanent fix for JPEG compilation issue --- limit
336 jpeglib `boolean' redefinition to Cygwin builds.
337
d424f3d8
EZ
3382012-10-08 Eli Zaretskii <eliz@gnu.org>
339
8ee4c6ce
EZ
340 * image.c (CHECK_LIB_AVAILABLE): Remove, no longer used.
341
d424f3d8
EZ
342 * emacs.c (DAEMON_MUST_EXEC) [HAVE_NTGUI]: Define this only on
343 Cygwin.
344
e08348a0
DC
3452012-10-08 Daniel Colascione <dancol@dancol.org>
346
347 * xfaces.c, xdisp.c, window.c, w32xfns.c, w32term.h, w32term.c,
348 w32select.h w32select.c, w32proc.c, w32menu.c, w32inevt.c,
349 w32help.c, w32font.c, w32font.c, w32fns.c, w32console.c, w32.h,
350 w32.c, unexw32.c, termhooks.h, process.c, menu.c, keyboard.h,
351 keyboard.c, image.c, frame.h, frame.c, fontset.c, font.h, font.c,
352 emacs.c, dispextern.h, cygw32.h, cygw32.c, conf_post.h,
353 Makefile.in: use HAVE_NTGUI for W32 GUI and WINDOWSNT for the
354 operating system. defined(HAVE_NTGUI) && !defined(WINDOWSNT) is
355 now a supported configuration.
356
357 * Makefile.in: consolidate image variables into LIBIMAGE; add
358 W32_OBJ and W32_LIBS. Compile new files.
359
360 * conf_post.h:
361 (_DebPrint) declare tracing facility for W32 debugging. We need
362 to unify tracing later.
363
364 (NTGUI_UNICODE) Define when compiling for Cygwin to allow the
365 unconditional use of W32 Unicode functions. Cygwin runs only on
366 100% Unicode operating systems.
367
368 * cygw32.c: New file. Define Cygwin-specific facilities.
369 (Fcygwin_convert_path_to_windows)
370 (Fcygwin_convert_path_from_windows): New user functions for
371 accessing Cygwin path-munging routines.
372
373 * cygw32.h: New file.
374 (WCSDATA, to_unicode, from_unicode): Define facilities for storing
375 UTF-16LE strings temporarily inside non-Lisp-visible string
376 objects.
377
378 (w32_strerror): Just what it says on the tin.
379
380 * emacs.c: Make the NS fork-then-exec code for daemon-launching
381 also run for Cygwin; both systems have the same problem with using
382 GUI facilities in a forked child. Also call syms_of_cygw32,
383 syms_of_w32select in correct places.
384
385 (DAEMON_MUST_EXEC): new macro defined to signal that a platform
386 needs fork-then-exec for daemon launching.
387
388 * font.h: Include frame.h.
389
390 * image.c: Use the image library cache machinery only when we're
391 compiling for native WINDOWSNT; Cygwin can use shared libraries
392 like any other Unixlike system.
393
394 * keyboard.c: Clarify a comment regarding the input loop.
395
396 * menu.c: When NTGUI_UNICODE is defined, use Unicode menu
397 functions directly instead of trying to detect at runtime that our
398 host operating system supports them. We make this change for two
399 reasons: Cygwin lacks support for the multibyte character
400 conversion functions used by the legacy menu code, and Cygwin
401 never needs to rely on non-Unicode APIs.
402
403 * unexw32.c (hinst): Declare extern.
404
405 * w32.c: Change header order;
406 (w32_strerror): Move to w32fns.c because we need it for
407 non-WINDOWSNT builds.
408
409 * w32.h: Add #error macro to make sure we don't include w32.h for
410 Cygwin builds. Remove w32select declarations.
411
412 * w32console.c (w32_sys_ring_bell, Fset_message_beep): Move to
413 w32fns.c. w32console.c is WINDOWSNT-only.
414
415 * w32fns.c: Include cygw32.h or w32.h depending on CYGWIN; more
416 NTGUI_UNICODE tweaks. (See above.) Change _snprintf to the more
417 POSIXy alternative.
418 (faked_key, sysinfo_cache, osinfo_cahce, syspage_mask)
419 (w32_major_version, w32_minor_version, w32_build_number)
420 (os_subtype, sound_type): Define here
421 (w32_defined_color): Make color parameter const for consistency
422 with other _defined_color functions.
423 (w32_createwindow): Unconditionally call w32_init_class instead of
424 doing so only when hprevinst is non-NULL. Plumbing hprevinst
425 through the code is complex and unnecessary because class
426 registration is practically free.
427 (w32_name_of_message): New EMACSDEBUG-only function.
428 (Fset_message_beep): Move here
429 (Fx_open_connection): Require that the display name for Windows be
430 "w32" for consistency, emacsclient disambiguation, and maybe, one
431 day, multi-window-system support.
432 (file_dialog_callback): NTGUI_UNICODE changes; encode and decode
433 Cygwin files for W32 GUI facilities, since these clearly don't
434 expect Cygwin names.
435 (_DebPrint): Define.
436 (w32_strerror, w32_console_toggle_lock_key, w32_kbd_mods_to_emacs)
437 (w32_kbd_patch_key, w32_sys_ring_bell): Move here.
438 (Ssystem_move_file_to_trash): Define only for native WINDOWSNT.
439 (w32_last_error): Remove.
440
441 * w32font.c: Define _strlwr to strlwr for non-WINDOWSNT builds.
442
443 * w32heap.c (syspage_mask): Declare here.
444 (cache_system_info): Remove.
445
446 * w32inevt.c (faked_key): Define globally, not statically.
447 (w32_kbd_mods_to_emacs, w32_kbd_patch_key, faked_key)
448 (w32_console_toggle_lock_key): Move to w32fns.c.
449
450 * w32menu.c: Include setjmp.h. NTGUI_UNICODE changes throughout.
451
452 * w32proc.c (_DebPrint): Move to w32fns.c.
453 * w32select.c: Include string.h, stdio.h for Cygwin.
454 * w32select.h: New File.
455
456 * w32term.c: Include io.h for non-CYGWIN builds; needed for
457 get_osfhandle.
458 (w32_message_fd): New variable. Under Cygwin, holds the file
459 descriptor the system used to tell us about pending thread
460 messages.
461
462 (w32_init_term): Remove incorrect calls to fcntl and init_sigio
463 that prevented compilation under non-WINDOWSNT systems.
464
465 (w32_initialize): Open /dev/windows and assign it to
466 w32_message_fd. Provide w32 feature.
467
468 * w32term.h: Include frame.h, atimer.h. Declare various frame functions.
469 (WM_EMACS_INPUT_READY): add.
470 (prepend_msg, w32_message_fd): Declare globally.
471
472 * w32xfns.c:
473 (keyboard_handle): Use only when WINDOWSNT.
474 (notify_msg_ready): New function. Posts a message to the main
475 thread's message queue under CYGWIN, which wakes up the main
476 thread from select(2) by making the /dev/windows file descriptor
477 ready. Under WINDOWSNT, it sets an event the same way the old
478 code did.
479
480 (post, prepend_msg): Actually call notify_msg_ready instead of
481 setting the input event directly.
482
98daa893
EZ
4832012-10-07 Eli Zaretskii <eliz@gnu.org>
484
485 * ralloc.c (relinquish): If a heap is ready to be relinquished,
486 but it still has blocs in it, don't return it to the system,
487 instead of aborting. (Bug#12402)
488
3bc0a2f7
JD
4892012-10-07 Jan Djärv <jan.h.d@swipnet.se>
490
8ad5b73b 491 * nsterm.m (ns_dumpglyphs_image): Only draw slice of image (Bug#12506).
493b5b1c 492
335f5ae4
JD
493 * nsterm.m (ns_update_auto_hide_menu_bar): Remove defintion of
494 MAC_OS_X_VERSION_10_6.
8ad5b73b
JD
495 (syms_of_nsterm): Remove comment about Panther and above for
496 ns-antialias-text.
335f5ae4
JD
497 * nsterm.h (MAC_OS_X_VERSION_10_3, onTiger): Remove.
498 (EmacsApp): Remove check for >= MAC_OS_X_VERSION_10_4.
499 (struct nsfont_info): Remove check for >= MAC_OS_X_VERSION_10_3.
500
501 * nsselect.m (ns_string_from_pasteboard): Remove check for >=
502 MAC_OS_X_VERSION_10_4.
503
8ad5b73b
JD
504 * nsmenu.m (fillWithWidgetValue:): Remove code for <
505 MAC_OS_X_VERSION_10_2.
335f5ae4
JD
506
507 * nsimage.m (setPixmapData, getPixelAtX, setAlphaAtX): Remove onTiger.
508
509 * nsfns.m (Fns_list_services): Remove comment and check for OSX < 10.4.
510 (ns_do_applescript): Remove check for >= MAC_OS_X_VERSION_10_4.
511
3bc0a2f7
JD
512 * nsterm.m (ns_in_resize): Remove (Bug#12479).
513 (ns_resize_handle_rect, mouseDown, mouseUp, mouseDragged): Remove.
8599b23a
SM
514 (ns_clear_frame, sendEvent, windowDidResize, drawRect:):
515 Remove ns_in_resize check.
3bc0a2f7
JD
516 (ns_clear_frame_area): Remove resize handle code.
517
518 * nsfns.m (ns_in_resize): Remove.
8ad5b73b
JD
519 (x_set_icon_name, ns_set_name, ns_set_name_as_filename): Remove
520 ns_in_resize check.
3bc0a2f7 521
c622b48f
PE
5222012-10-07 Paul Eggert <eggert@cs.ucla.edu>
523
524 Improve sys_siglist detection.
525 * sysdep.c (sys_siglist, init_signals): Use _sys_siglist if it's
526 defined as a macro, as is done in Solaris.
527 (sys_siglist_entries): New macro.
528 (save_strsignal): Use it.
529 * syssignal.h (safe_strsignal): Now ATTRIBUTE_CONST, to pacify
530 GCC 4.7.2 on Fedora 17 with the fixed sys_siglist detection.
531
04fafa46
JD
5322012-10-06 Jan Djärv <jan.h.d@swipnet.se>
533
534 * nsfns.m (Fx_create_frame): Call x_default_parameter with
535 fullscreen/Fullscreen.
536
537 * nsterm.h (EmacsView): Rename tbar_height to tibar_height.
538 tobar_height is new.
539
540 * nsterm.m (x_make_frame_visible): Check for fullscreen.
541 (ns_fullscreen_hook): Activate old style fullscreen with a timer.
542 (ns_term_init): Set activateIgnoringOtherApps if old style fullscreen.
543 (windowDidResize:): Check for correct window if old style fullscreen.
544 Capitalize word in comment. Remove incorrect comment.
545 (initFrameFromEmacs:): tbar_height renamed tibar_height.
546 (windowDidEnterFullScreen:): Toggle toolbar for fullscreen to fix
547 error in drawing background.
548 (toggleFullScreen:): Remove comment. Rearrange calls.
549 Set toolbar values to zero, save old height in tobar_height.
550 Restore tool bar height when leaving fullscreen.
551 (canBecomeMainWindow): New function.
552
c6e21c03
PE
5532012-10-06 Paul Eggert <eggert@cs.ucla.edu>
554
555 * keyboard.c (read_char): Remove unnecessary 'volatile's and label.
556
0d9f584b
EZ
5572012-10-05 Eli Zaretskii <eliz@gnu.org>
558
a65fbb5f
EZ
559 * w32proc.c (stop_timer_thread): Fix declaration of 'err'.
560
0d9f584b 561 * w32.c (utime): Open the file with FILE_FLAG_BACKUP_SEMANTICS, so
8599b23a
SM
562 that time stamps of directories could also be changed.
563 Don't request the too broad GENERIC_WRITE, only the more restrictive
0d9f584b
EZ
564 FILE_WRITE_ATTRIBUTES access rights.
565
566 * fileio.c (Fset_file_times): Special-case ignoring errors for
567 directories only on MSDOS, not on MS-Windows.
568
e8757f09 5692012-10-05 Ikumi Keita <ikumi@ikumi.que.jp> (tiny change)
ca347e3d
IK
570
571 * minibuf.c (Fcompleting_read): Doc fix. (Bug#12555)
572
7604f298
EZ
5732012-10-04 Eli Zaretskii <eliz@gnu.org>
574
575 * w32.c (utime): Test for INVALID_HANDLE_VALUE, not for NULL, to
576 see whether CreateFile failed.
577
88d69b7d
PE
5782012-10-04 Paul Eggert <eggert@cs.ucla.edu>
579
580 * profiler.c (handle_profiler_signal): Inhibit pending signals too,
581 to avoid similar races.
582 * keyboard.c (pending_signals): Now bool, not int.
583
7509f454
PE
584 Port timers to OpenBSD, plus check for timer failures.
585 OpenBSD problem reported by Han Boetes.
586 * profiler.c (setup_cpu_timer): Check for failure of timer_settime
587 and/or setitimer.
588 (Fprofiler_cpu_stop): Don't assume HAVE_SETITIMER.
589 * syssignal.h (HAVE_ITIMERSPEC): New macro. This is for platforms
590 like OpenBSD, which has timer_settime but does not declare it.
591 OpenBSD does not define SIGEV_SIGNAL, so use that when deciding
592 whether to use itimerspec-related primitives. All uses of
593 HAVE_TIMER_SETTIME replaced with HAVE_ITIMERSPEC.
594
a3c5c0c5
PE
5952012-10-02 Paul Eggert <eggert@cs.ucla.edu>
596
597 * profiler.c (handle_profiler_signal): Fix a malloc race
598 that caused Emacs to hang on Fedora 17 when profiling Lisp.
599
914e743b
JD
6002012-10-02 Jan Djärv <jan.h.d@swipnet.se>
601
602 * nsterm.m (windowDidEnterFullScreen): Remove fprintf.
603
d8ab37a8
EZ
6042012-10-02 Eli Zaretskii <eliz@gnu.org>
605
606 * w32proc.c (sys_wait): Declare 'signame' 'const char *', to be
607 consistent with the change in return value of 'safe_strsignal'.
608
b3ecad33
PE
6092012-10-02 Paul Eggert <eggert@cs.ucla.edu>
610
0a99eee1
PE
611 Prefer plain 'static' to 'static inline' (Bug#12541).
612 * bidi.c (bidi_get_type, bidi_check_type, bidi_get_category)
613 (bidi_set_sor_type, bidi_push_embedding_level)
614 (bidi_pop_embedding_level, bidi_remember_char, bidi_copy_it)
615 (bidi_cache_reset, bidi_cache_shrink, bidi_cache_fetch_state)
616 (bidi_cache_search, bidi_cache_ensure_space)
617 (bidi_cache_iterator_state, bidi_cache_find)
618 (bidi_peek_at_next_level, bidi_set_paragraph_end)
619 (bidi_count_bytes, bidi_char_at_pos, bidi_fetch_char)
620 (bidi_explicit_dir_char, bidi_resolve_neutral_1):
621 Now 'static', not 'static inline'.
622
b3ecad33
PE
623 Count overruns when profiling; change units to ns.
624 * profiler.c (handle_profiler_signal): Count sampling intervals, not ms.
625 Give extra weight to samples after overruns, to attempt to count
626 the time more accurately.
627 (setup_cpu_timer): Change sampling interval units from ms to ns, since
628 the underlying primitives nominally do ns.
629 (Fprofiler_cpu_start): Document the change. Mention that
630 the sampling intervals are only approximate.
631
090cf9db
SM
6322012-10-02 Stefan Monnier <monnier@iro.umontreal.ca>
633
634 * frame.c (Fmake_terminal_frame): Prefer safer CONSP over !NILP.
635
636 * coding.h (ENCODE_FILE, DECODE_FILE, DECODE_SYSTEM): Remove special
637 case for the special 0 coding-system.
638
639 * buffer.c (Fset_buffer_multibyte): Signal an error instead of widening.
640 (Fmake_overlay): Remove redundant tests.
64edc777 641 (fix_start_end_in_overlays): Remove redundant recentering.
090cf9db 642
81550bf4
JB
6432012-10-02 Juanma Barranquero <lekktu@gmail.com>
644
645 * makefile.w32-in ($(BLD)/alloc.$(O), $(BLD)/gmalloc.$(O)):
646 Update dependencies.
647
aa1ba90e
PE
6482012-10-01 Paul Eggert <eggert@cs.ucla.edu>
649
650 Fix a malloc race condition involving strsignal.
651 A signal can arrive in the middle of a malloc, and Emacs's signal
652 handler can invoke strsignal, which can invoke malloc, which is
653 not portable. This race condition bug makes Emacs hang on GNU/Linux.
654 Fix it by altering the signal handler so that it does not invoke
655 strsignal.
656 * emacs.c (shut_down_emacs): Use safe_strsignal, not strsignal.
657 * process.c (status_message): Use const pointer, in case strsignal
658 is #defined to safe_strsignal.
659 * sysdep.c (sys_siglist, init_signals): Always define and
660 initialize a substitute sys_siglist if the system does not define
661 one, even if HAVE_STRSIGNAL.
662 (safe_strsignal): Rename from strsignal. Always define,
663 using sys_siglist. Return a const pointer.
664 * syssignal.h (safe_strsignal): New decl.
665 (strsignal) [!HAVE_STRSIGNAL]: Define in terms of safe_strsignal.
666
ace917bd
EZ
6672012-10-01 Eli Zaretskii <eliz@gnu.org>
668
669 * w32proc.c (timer_loop): Fix code that waits for timer
670 expiration, to avoid high CPU usage.
671
9eb71b9c
SM
6722012-10-01 Stefan Monnier <monnier@iro.umontreal.ca>
673
674 * fns.c (check_hash_table, get_key_arg, maybe_resize_hash_table)
675 (sweep_weak_table): Remove redundant prototypes.
676
b3317662
FP
6772012-10-01 Fabrice Popineau <fabrice.popineau@gmail.com>
678
679 * emacs.c: Move the inclusion of TERM_HEADER after including
680 windows.h on WINDOWSNT. This avoids compilation problems with
681 MSVC.
682
f0e5f225
EZ
6832012-10-01 Eli Zaretskii <eliz@gnu.org>
684
2d7d1608
EZ
685 * unexw32.c (OFFSET_TO_RVA, RVA_TO_OFFSET)
686 (RVA_TO_SECTION_OFFSET): Encode all macro arguments in parentheses.
687 (RVA_TO_PTR): Cast the result of RVA_TO_OFFSET to 'unsigned char *',
688 as the previous version used 'void *'.
689
690 * ralloc.c (ROUNDUP): Fix last change.
691 (MEM_ROUNDUP): Don't cast MEM_ALIGN, it is already of type
692 'size_t'.
693
f0e5f225
EZ
694 * w32proc.c <disable_itimers>: New static flag.
695 (init_timers): Initialize it to zero, after creating the critical
696 sections used by the timer threads.
697 (term_timers): Set to 1 before deleting the critical sections.
698 (getitimer, setitimer): If disable_itimers is non-zero, return an
699 error indication without doing anything. Reported by Fabrice
700 Popineau <fabrice.popineau@supelec.fr> as part of bug#12544.
4cdfbb89
EZ
701 (alarm) [HAVE_SETITIMER]: Be more conformant to the expected
702 return results.
703 [!HAVE_SETITIMER]: Behave as the previous version that didn't
704 support timers.
f0e5f225
EZ
705
706 * emacs.c (shut_down_emacs) [WINDOWSNT]: Move the call to
707 term_ntproc after all the other bookkeeping, to get timers working
708 as long as possible.
709
82ef37c1
PE
7102012-10-01 Paul Eggert <eggert@cs.ucla.edu>
711
b3a4c387
PE
712 * xdisp.c (syms_of_xdisp): Default message-log-max to 1000, not 100.
713 Suggested by Juri Linkov in
714 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00821.html>.
715
b0ab8123
PE
716 Prefer plain 'static' to 'static inline' (Bug#12541).
717 With static functions, modern compilers inline pretty well by
718 themselves; advice from programmers often hurts as much as it helps.
719 On my host (x86-64, Fedora 17, GCC 4.7.2, default 'configure'),
720 this change shrinks the text size of the Emacs executable by 1.1%
721 without affecting CPU significantly in my benchmark.
722 * alloc.c (mem_find, live_string_p, live_cons_p, live_symbol_p)
723 (live_float_p, live_misc_p, live_vector_p, live_buffer_p)
724 (mark_maybe_object, mark_maybe_pointer, bounded_number):
725 * buffer.c (bset_abbrev_mode, bset_abbrev_table)
726 (bset_auto_fill_function, bset_auto_save_file_format)
727 (bset_auto_save_file_name, bset_backed_up, bset_begv_marker)
728 (bset_bidi_display_reordering, bset_buffer_file_coding_system)
729 (bset_cache_long_line_scans, bset_case_fold_search)
730 (bset_ctl_arrow, bset_cursor_in_non_selected_windows)
731 (bset_cursor_type, bset_display_table, bset_extra_line_spacing)
732 (bset_file_format, bset_file_truename, bset_fringe_cursor_alist)
733 (bset_fringe_indicator_alist, bset_fringes_outside_margins)
734 (bset_header_line_format, bset_indicate_buffer_boundaries)
735 (bset_indicate_empty_lines, bset_invisibility_spec)
736 (bset_left_fringe_width, bset_major_mode, bset_mark)
737 (bset_minor_modes, bset_mode_line_format, bset_mode_name)
738 (bset_name, bset_overwrite_mode, bset_pt_marker)
739 (bset_right_fringe_width, bset_save_length)
740 (bset_scroll_bar_width, bset_scroll_down_aggressively)
741 (bset_scroll_up_aggressively, bset_selective_display)
742 (bset_selective_display_ellipses, bset_vertical_scroll_bar_type)
743 (bset_word_wrap, bset_zv_marker, set_buffer_overlays_before)
744 (set_buffer_overlays_after):
745 * category.c (bset_category_table):
746 * charset.c (read_hex):
747 * coding.c (produce_composition, produce_charset)
748 (handle_composition_annotation, handle_charset_annotation)
749 (char_encodable_p):
750 * dispnew.c (swap_glyph_pointers, copy_row_except_pointers)
751 (assign_row, set_frame_matrix_frame, make_current)
752 (add_row_entry):
753 * eval.c (set_specpdl_symbol, set_specpdl_old_value):
754 * fns.c (maybe_resize_hash_table):
755 * frame.c (fset_buffer_predicate, fset_minibuffer_window):
756 * gmalloc.c (register_heapinfo):
757 * image.c (lookup_image_type):
758 * intervals.c (set_interval_object, set_interval_left)
759 (set_interval_right, copy_interval_parent, rotate_right)
760 (rotate_left, balance_possible_root_interval):
761 * keyboard.c (kset_echo_string, kset_kbd_queue)
762 (kset_keyboard_translate_table, kset_last_prefix_arg)
763 (kset_last_repeatable_command, kset_local_function_key_map)
764 (kset_overriding_terminal_local_map, kset_real_last_command)
765 (kset_system_key_syms, clear_event, set_prop):
766 * lread.c (digit_to_number):
767 * marker.c (attach_marker, live_buffer, set_marker_internal):
768 * nsterm.m (ns_compute_glyph_string_overhangs):
769 * process.c (pset_buffer, pset_command)
770 (pset_decode_coding_system, pset_decoding_buf)
771 (pset_encode_coding_system, pset_encoding_buf, pset_filter)
772 (pset_log, pset_mark, pset_name, pset_plist, pset_sentinel)
773 (pset_status, pset_tty_name, pset_type, pset_write_queue):
774 * syntax.c (bset_syntax_table, dec_bytepos):
775 * terminal.c (tset_param_alist):
776 * textprop.c (interval_has_some_properties)
777 (interval_has_some_properties_list):
778 * window.c (wset_combination_limit, wset_dedicated)
779 (wset_display_table, wset_hchild, wset_left_fringe_width)
780 (wset_left_margin_cols, wset_new_normal, wset_new_total)
781 (wset_normal_cols, wset_normal_lines, wset_parent, wset_pointm)
782 (wset_right_fringe_width, wset_right_margin_cols)
783 (wset_scroll_bar_width, wset_start, wset_temslot, wset_vchild)
784 (wset_vertical_scroll_bar_type, wset_window_parameters):
785 * xdisp.c (wset_base_line_number, wset_base_line_pos)
786 (wset_column_number_displayed, wset_region_showing)
787 (window_box_edges, run_window_scroll_functions)
788 (append_glyph_string_lists, prepend_glyph_string_lists)
789 (append_glyph_string, set_glyph_string_background_width)
790 (append_glyph, append_composite_glyph)
791 (take_vertical_position_into_account):
792 * xfaces.c (x_create_gc, x_free_gc, merge_face_vectors)
793 (face_attr_equal_p, lface_equal_p, hash_string_case_insensitive)
794 (lface_hash, lface_same_font_attributes_p, lookup_face):
795 * xml.c (libxml2_loaded_p):
796 * xterm.c (x_set_mode_line_face_gc, x_set_glyph_string_gc)
797 (x_set_glyph_string_clipping, x_clear_glyph_string_rect):
798 Now 'static', not 'static inline'.
799
05584c31
PE
800 * bidi.c: Tune.
801 (bidi_copy_it): Do the whole copy with a single memcpy.
802 (bidi_char_at_pos): Merge the two STRING_CHAR calls into one.
803
86ec63ba
PE
804 Revert the FOLLOW-SYMLINKS change for file-attributes.
805 Doing it right would require several changes to Tramp, and there's
806 not enough time to get that tested before the freeze today.
807 * dired.c (directory_files_internal, Ffile_attributes):
808 Undo last change.
809
82ef37c1
PE
810 * frame.c (x_report_frame_params): Port better to wider ints.
811 Do not assume that EMACS_UINT is the same width as uprintmax_t,
812 or that pointers can be printed in 15 decimal digits.
813 Avoid GCC warnings if EMACS_UINT is wider than a pointer.
814
62aba0d4
FP
8152012-09-30 Fabrice Popineau <fabrice.popineau@supelec.fr>
816
817 Support x64 build on MS-Windows.
818 * w32term.h (SCROLL_BAR_PACK, SCROLL_BAR_UNPACK): Define for x64.
819 (SET_SCROLL_BAR_W32_WINDOW): Cast ID to intptr_t, for
820 compatibility with x64.
5e4daaf3 821 (x_get_focus_frame): Add prototype.
62aba0d4
FP
822
823 * w32term.c (w32_draw_underwave): Don't use GCC extensions for
824 defining an XRectangle structure.
825
826 * w32proc.c (RVA_TO_PTR, w32_executable_type): Fix pointer
827 arithmetics for compatibility with x64.
828
829 * w32menu.c (add_menu_item): Use UINT_PTR instead of UINT, for
830 compatibility with x64.
831
832 * w32heap.h: Adjust prototypes and declarations.
833
834 * w32heap.c (RVA_TO_PTR, allocate_heap, sbrk, init_heap)
835 (round_heap): Use DWORD_PTR, ptrdiff_t and size_t instead of
836 DWORD, long, and unsigned long, for compatibility with x64.
837 (allocate_heap) [_WIN64]: Reserve 32GB of memory.
838 (sbrk): Argument is now of type ptrdiff_t.
839
840 * w32fns.c (HMONITOR): Condition declaration on _WIN32_WINNT being
841 less than 0x0500.
842 (w32_msg_pump): Use WPARAM type for 'result'.
843
844 * w32.c (init_environment, get_emacs_configuration): Support AMD64
845 architecture.
846 (init_ntproc): Cast arguments of _open_osfhandle to intptr_t, for
847 compatibility with x64.
848
849 * vm-limit.c (lim_data): Now size_t.
850 (check_memory_limits): Adjust prototypes of real_morecore and
851 __morecore to receive argument of type ptrdiff_t. Use size_t for
852 five_percent and data_size.
853
854 * unexw32.c: Use DWORD_PTR instead of DWORD for file-scope
855 variables, for compatibility with x64.
856 (rva_to_section, offset_to_section, relocate_offset)
857 (OFFSET_TO_RVA, RVA_TO_OFFSET, RVA_TO_SECTION_OFFSET)
858 (PTR_TO_RVA, RVA_TO_PTR, OFFSET_TO_PTR, get_section_info)
859 (copy_executable_and_dump_data): Use DWORD_PTR instead of DWORD
860 for compatibility with x64.
861
862 * sysdep.c (STDERR_FILENO): Define if not already defined.
863
864 * ralloc.c (real_morecore): Argument type is now ptrdiff_t.
865 (__morecore): Argument type is now ptrdiff_t.
866 (ROUNDUP, MEM_ROUNDUP): Use size_t instead of 'unsigned long'.
867 (relinquish): Use ptrdiff_t type for 'excess'.
868 (r_alloc_sbrk): Argument type is now ptrdiff_t.
869
870 * makefile.w32-in (HEAPSIZE): Get value from EMACS_HEAPSIZE.
871 (bootstrap-temacs-CMD, bootstrap-temacs-SH): Use $(EMACS_PURESIZE)
872 instead of a literal number.
873
874 * gmalloc.c [WINDOWSNT]: Include w32heap.h.
875 (min): Define only if not already defined.
876
877 * frame.c (x_report_frame_params): Use EMACS_UINT for the return
878 value of FRAME_X_WINDOW, to fit a 64-bit pointer on 64-bit Windows
879 hosts.
880
881 * image.c (x_bitmap_pixmap): Return ptrdiff_t, not int, since
882 'bitmaps' is a pointer.
883
884 * dispextern.h (x_bitmap_pixmap): Adjust prototype.
885
886 * alloc.c (gdb_make_enums_visible): Now conditional on __GNUC__.
887
e7a2937b
PE
8882012-09-30 Paul Eggert <eggert@cs.ucla.edu>
889
890 file-attributes has a new optional arg FOLLOW-SYMLINKS.
891 * dired.c (directory_files_internal, Ffile_attributes):
892 New arg follow_symlinks. All uses changed.
893
b43d62ae
SM
8942012-09-30 Stefan Monnier <monnier@iro.umontreal.ca>
895
896 * .gdbinit (xbacktrace): Adjust to recent "struct backtrace" change.
897
c06c382a
EZ
8982012-09-30 Eli Zaretskii <eliz@gnu.org>
899
900 Support atimers and CPU profiler via profile.c on MS-Windows.
901 * w32proc.c (sig_mask, crit_sig): New static variables.
902 (sys_signal): Support SIGALRM and SIGPROF.
903 (sigemptyset, sigaddset, sigfillset, sigprocmask)
b43d62ae 904 (pthread_sigmask, setpgrp): Move here from w32.c. sigaddset,
c06c382a
EZ
905 sigfillset, and sigprocmask are no longer no-ops.
906 (sigismember): New function.
907 (struct itimer_data): New definition.
908 (ticks_now, real_itimer, prof_itimer, clocks_min, crit_real)
909 (crit_prof): New static variables.
910 (MAX_SINGLE_SLEEP): New definition.
911 (timer_loop, stop_timer_thread, term_timers, init_timers)
912 (start_timer_thread, getitimer, setitimer): New functions.
913 (alarm): No longer a no-op, calls setitimer.
914
915 * w32.c (term_ntproc): Call term_timers.
916 (init_ntproc): Make sure all signals are unblocked at startup, to
917 erase any traces of dumping. Call init_timers.
918
919 * w32fns.c (hourglass_timer, HOURGLASS_ID): Remove.
920 Windows-specific code to display the hourglass mouse pointer is no
921 longer used.
922 (w32_wnd_proc): Remove code that handled the WM_TIMER message due
923 to hourglass timer expiration.
924 (start_hourglass, cancel_hourglass, DEFAULT_HOURGLASS_DELAY):
925 Remove, no longer used.
b43d62ae
SM
926 (w32_note_current_window, show_hourglass, hide_hourglass):
927 New functions, in support of hourglass cursor display similar to other
c06c382a
EZ
928 window systems.
929 (syms_of_w32fns): Don't initialize hourglass_timer.
930
931 * xdisp.c (start_hourglass, cancel_hourglass): Now used on
932 WINDOWSNT as well.
933 (start_hourglass) [WINDOWSNT]: Call w32_note_current_window.
934
935 * w32.h (init_timers, term_timers): Add prototypes.
936
95402d5f
KH
9372012-09-30 Kenichi Handa <handa@gnu.org>
938
939 * coding.c (decode_coding_ccl, encode_coding_ccl): Pay attention
940 to the buffer relocation which may be caused by ccl_driver.
941
dd946752
JD
9422012-09-30 Jan Djärv <jan.h.d@swipnet.se>
943
d7e642cc
JD
944 * xfns.c (Fx_file_dialog): Update comment.
945
946 * w32fns.c (Fx_file_dialog): Update comment.
947
948 * nsfns.m (Fns_read_file_name): Add argument DIR_ONLY_P.
949 Initialize panel name field if OSX >= 10.6.
950
951 * fileio.c (Fnext_read_file_uses_dialog_p): Add HAVE_NS.
952
dd946752
JD
953 * nsfns.m (ns_frame_parm_handlers): Add x_set_fullscreen.
954
955 * nsterm.m (NEW_STYLE_FS): New define.
956 (ns_fullscreen_hook, windowWillEnterFullScreen)
957 (windowDidEnterFullScreen, windowWillExitFullScreen)
958 (windowDidExitFullScreen, toggleFullScreen, handleFS)
959 (setFSValue): New functions.
960 (EmacsFSWindow): New implementation.
961 (canBecomeKeyWindow): New function for EmacsFSWindow.
962 (ns_create_terminal): Set fullscreen_hook to ns_fullscreen_hook.
963 (dealloc): Release nonfs_window if in fullscreen.
964 (updateFrameSize:): Call windowDidMove to update top/left.
965 (windowWillResize:toSize:): Check if frame is still maximized.
966 (initFrameFromEmacs:): Initialize fs_state, fs_before_fs,
967 next_maximized, maximized_width, maximized_height and nonfs_window.
968 Call setCollectionBehavior if NEW_STYLE_FS. Initialize bwidth and
969 tbar_height.
970 (windowWillUseStandardFrame:defaultFrame:): Update frame parameter
971 fullscreen. Set maximized_width/height. Act on next_maximized.
972
973 * nsterm.h (MAC_OS_X_VERSION_10_7, MAC_OS_X_VERSION_10_8): New.
974 (EmacsView): Add variables for fullscreen.
975 (handleFS, setFSValue, toggleFullScreen): New in EmacsView.
976 (EmacsFSWindow): New interface for fullscreen.
977
427730eb
JB
9782012-09-30 Juanma Barranquero <lekktu@gmail.com>
979
980 * makefile.w32-in ($(BLD)/profiler.$(O)): Update dependencies.
981
48de8b12
CY
9822012-09-30 Chong Yidong <cyd@gnu.org>
983
984 * fns.c (Frandom): Doc fix.
985
5938d519
MR
9862012-09-30 Martin Rudalics <rudalics@gmx.at>
987
988 * window.c (Vwindow_combination_limit): New default value.
989 (Qwindow_size): New symbol replacing Qtemp_buffer_resize.
990
cb5b0266
PE
9912012-09-30 Paul Eggert <eggert@cs.ucla.edu>
992
993 * syssignal.h (PROFILER_CPU_SUPPORT): Don't define if PROFILING.
994 Suggested by Eli Zaretskii in
995 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00811.html>.
996
84f72efd
EZ
9972012-09-30 Eli Zaretskii <eliz@gnu.org>
998
999 * profiler.c (Fprofiler_cpu_stop): Use timer_settime only if
1000 HAVE_TIMER_SETTIME is defined.
1001
9d4dcdc9
PE
10022012-09-30 Paul Eggert <eggert@cs.ucla.edu>
1003
d89460ed
PE
1004 Profiler improvements: more-accurate timers, overflow checks.
1005 * profiler.c: Don't include stdio.h, limits.h, sys/time.h,
1006 signal.h, setjmp.h. Include systime.h instead.
1007 (saturated_add): New function.
1008 (record_backtrace, current_sample_interval): Use EMACS_INT, not size_t.
1009 (record_backtrace, handle_profiler_signal): Saturate on fixnum overflow.
1010 (profiler_timer, profiler_timer_ok) [HAVE_TIMER_SETTIME]:
1011 New static vars.
84f72efd 1012 (enum profiler_cpu_running): New enum.
d89460ed
PE
1013 (profiler_cpu_running): Now of that enum type, not bool.
1014 All uses changed to store the new value.
1015 (handle_profiler_signal): Rename from sigprof_handler_1,
1016 for consistency with other handlers. Do not check whether
1017 cpu_log is a hash-table if garbage collecting, since it
1018 doesn't matter in that case.
1019 (deliver_profiler_signal): Rename from sigprof_handler,
1020 for consistency with other handlers.
1021 (setup_cpu_timer): New function, with much of what used to be in
1022 Fprofiler_cpu_start. Check for out-of-range argument.
1023 Prefer timer_settime if available, and prefer
1024 thread cputime clocks, then process cputime clocks, then
1025 monotonic clocks, to the old realtime clock. Use make_timeval
1026 to round more-correctly when falling back to setitimer.
1027 (Fprofiler_cpu_start): Use it.
1028 (Fprofiler_cpu_stop): Prefer timer_settime if available.
1029 Don't assume that passing NULL as the 2nd argument of setitimer
1030 is the same as passing a pointer to all-zero storage.
1031 Ignore SIGPROF afterwards.
1032 (malloc_probe): Saturate at MOST_POSITIVE_FIXNUM.
1033 * sysdep.c (emacs_sigaction_init): Also mask out SIGPROF in
1034 non-fatal signal handlers. Ignore SIGPROF on startup.
1035 * syssignal.h (PROFILER_CPU_SUPPORT): Define this macro here, not
1036 in profiler.c, since sysdep.c now uses it.
1037
9d4dcdc9
PE
1038 * sysdep.c (handle_fatal_signal): Bump backtrace size to 40.
1039 Suggested by Eli Zaretskii in
1040 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00796.html>.
1041
8e5691a0
JB
10422012-09-29 Juanma Barranquero <lekktu@gmail.com>
1043
1044 * makefile.w32-in ($(BLD)/profiler.$(O)): Update dependencies.
1045
e7c1b6ef
SM
10462012-09-29 Stefan Monnier <monnier@iro.umontreal.ca>
1047
1048 * lisp.h (struct backtrace): Remove indirection for `function' field.
1049 * xdisp.c (redisplay_internal):
1050 * profiler.c (record_backtrace, sigprof_handler_1):
1051 * alloc.c (Fgarbage_collect):
1052 * eval.c (interactive_p, Fsignal, eval_sub, Ffuncall, Fbacktrace)
1053 (Fbacktrace_frame): Adjust accordingly.
1054
e61d39cd 10552012-09-28 Glenn Morris <rgm@gnu.org>
d393cefb
GM
1056
1057 * eval.c (Frun_hook_with_args, Frun_hook_with_args_until_success)
1058 (Frun_hook_with_args_until_failure): Doc fixes.
1059
404043ea
EZ
10602012-09-28 Eli Zaretskii <eliz@gnu.org>
1061
1062 * xdisp.c (syms_of_xdisp) <Qredisplay_internal>: Rename from
1063 Qautomatic_redisplay and change the symbol name. All users changed.
1064
704d3f45
TM
10652012-09-28 Tomohiro Matsuyama <tomo@cx4a.org>
1066
1067 * profiler.c (sigprof_handler): Fix race condition.
1068
757140ff
GM
10692012-09-28 Glenn Morris <rgm@gnu.org>
1070
1071 * lread.c (lisp_file_lexically_bound_p): Handle #! lines. (Bug#12528)
1072
a615a3ae
PE
10732012-09-27 Paul Eggert <eggert@cs.ucla.edu>
1074
1075 Check more robustly for timer_settime.
89d17fd0
PE
1076 * Makefile.in (LIB_TIMER_TIME): New macro.
1077 (LIBES): Add it.
a615a3ae
PE
1078 * atimer.c (alarm_timer, alarm_timer_ok, set_alarm, init_atimer):
1079 Use HAVE_TIMER_SETTIME, not SIGEV_SIGNAL, to decide whether to
1080 call timer_settime.
1081
3670daf7
TM
10822012-09-26 Tomohiro Matsuyama <tomo@cx4a.org>
1083
1084 * profiler.c (Fprofiler_cpu_start): Remove unnecessary flag SA_SIGINFO.
1085
6a586b7f
JB
10862012-09-26 Juanma Barranquero <lekktu@gmail.com>
1087
1088 * makefile.w32-in ($(BLD)/profiler.$(O)): Update dependencies.
1089
41c8bfcf
PE
10902012-09-26 Paul Eggert <eggert@cs.ucla.edu>
1091
1092 * character.h (MAYBE_UNIFY_CHAR): Remove.
1093 * charset.c, charset.h (maybe_unify_char): Now static.
1094 * charset.c (decode_char): Use maybe_unify_char, not MAYBE_UNIFY_CHAR.
1095 Since this stuff is now private to charset.c, there's no need for
1096 a public macro and no need to inline by hand.
1097
3a880af4
SM
10982012-09-26 Tomohiro Matsuyama <tomo@cx4a.org>
1099 Stefan Monnier <monnier@iro.umontreal.ca>
1100 Juanma Barranquero <lekktu@gmail.com>
611b7507 1101
3a880af4
SM
1102 * profiler.c: New file.
1103 * Makefile.in (base_obj): Add profiler.o.
611b7507
JB
1104 * makefile.w32-in (OBJ2, GLOBAL_SOURCES): Add profiler.c.
1105 ($(BLD)/profiler.$(O)): New target.
3a880af4
SM
1106 * emacs.c (main): Call syms_of_profiler.
1107 * alloc.c (Qautomatic_gc): New constant.
1108 (MALLOC_PROBE): New macro.
1109 (xmalloc, xzalloc, xrealloc, lisp_malloc, lisp_align_malloc): Use it.
1110 (total_bytes_of_live_objects): New function.
1111 (Fgarbage_collect): Use it. Record itself in backtrace_list.
1112 Call malloc_probe for the memory profiler.
1113 (syms_of_alloc): Define Qautomatic_gc.
1114 * eval.c (eval_sub, Ffuncall): Reorder assignments to avoid
1115 race condition.
1116 (struct backtrace): Move definition...
1117 * lisp.h (struct backtrace): ..here.
1118 (Qautomatic_gc, profiler_memory_running): Declare vars.
1119 (malloc_probe, syms_of_profiler): Declare functions.
1120 * xdisp.c (Qautomatic_redisplay): New constant.
1121 (redisplay_internal): Record itself in backtrace_list.
1122 (syms_of_xdisp): Define Qautomatic_redisplay.
611b7507 1123
5938d519 11242012-09-25 Eli Zaretskii <eliz@gnu.org>
b67238c2
JB
11252012-09-25 Juanma Barranquero <lekktu@gmail.com>
1126
1127 * makefile.w32-in ($(BLD)/callproc.$(O)): Update dependencies.
1128
e26fd2e4
PE
11292012-09-25 Paul Eggert <eggert@cs.ucla.edu>
1130
1131 Prefer POSIX timers if available.
1132 They avoid a race if the timer is too close to the current time.
1133 * atimer.c (alarm_timer, alarm_timer_ok) [SIGEV_SIGNAL]: New static vars.
1134 (set_alarm) [SIGEV_SIGNAL]: Use POSIX timers if available.
9180598c 1135 (init_atimer) [SIGEV_SIGNAL]: Initialize them.
e26fd2e4 1136
eedec3ee
EZ
11372012-09-25 Eli Zaretskii <eliz@gnu.org>
1138
1139 * coding.c (CHAR_STRING_ADVANCE_NO_UNIFY): Make it an alias of
1140 CHAR_STRING_ADVANCE.
1141 (STRING_CHAR_ADVANCE_NO_UNIFY): Make it an alias of
1142 STRING_CHAR_ADVANCE.
1143
aa15c6bb
JB
11442012-09-25 Juanma Barranquero <lekktu@gmail.com>
1145
1146 Move Vlibrary_cache to emacs.c and reset before dumping.
1147
1148 * lisp.h (reset_image_types): Declare.
1149 [WINDOWSNT] (Vlibrary_cache): Declare.
1150
1151 * image.c (reset_image_types): New function.
1152
1153 * emacs.c [WINDOWSNT] (Vlibrary_cache): Move from w32.c.
1154 (syms_of_emacs) [WINDOWSNT] <Vlibrary_cache>: Initialize and staticpro.
1155 (Fdump_emacs): Reset Vlibrary_cache and image_types.
1156
1157 * w32.c (Vlibrary_cache): Do not define; moved to emacs.c
1158 (globals_of_w32) <Vlibrary_cache>: Do not initialize.
1159
1160 * w32.h (Vlibrary_cache): Do not declare.
1161
54d629be
EZ
11622012-09-25 Eli Zaretskii <eliz@gnu.org>
1163
16b22fef
EZ
1164 * w32proc.c (sys_signal): Handle all signals defined by the
1165 MS-Windows runtime, not just SIGCHLD. Actually install the signal
1166 handlers for signals supported by Windows. Don't override
1167 term_ntproc as the handler for SIGABRT.
1168 (sigaction): Rewrite to call sys_signal instead of duplicating its
1169 code.
1170 (sys_kill): Improve commentary.
1171
1172 * w32.c (term_ntproc): Accept (and ignore) one argument, for
1173 consistency with a signature of a signal handler. All callers
1174 changed.
1175 (init_ntproc): Accept an argument DUMPING. If dumping, don't
1176 install term_ntproc as a signal handler for SIGABRT, as that
1177 should be done by the dumped Emacs.
1178
1179 * w32.h (init_ntproc, term_ntproc): Adjust prototypes.
1180
1181 * w32select.c (term_w32select): Protect against repeated
1182 invocation by setting clipboard_owner to NULL after calling
1183 DestroyWindow.
1184
1185 * emacs.c (shut_down_emacs, main): Adapt the calls to init_ntproc
1186 and term_ntproc to their modified signatures.
1187
54d629be
EZ
1188 * character.c (char_string, string_char): Remove calls to
1189 MAYBE_UNIFY_CHAR. See the discussion starting at
1190 http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00433.html
1191 for the details.
1192
59f7af81
CY
11932012-09-25 Chong Yidong <cyd@gnu.org>
1194
1195 * xdisp.c (mode_line_inverse_video): Delete obsolete variable.
1196
22e8cf4a
SM
11972012-09-24 Stefan Monnier <monnier@iro.umontreal.ca>
1198
1199 * bytecode.c (exec_byte_code): Signal an error instead of aborting,
1200 when encountering an unknown bytecode.
1201
578098f3
PE
12022012-09-24 Paul Eggert <eggert@cs.ucla.edu>
1203
1204 image.c, indent.c: Use bool for booleans.
1205 * dispextern.h (struct image_type): Members valid_p, load, init
1206 now return bool, not int. All uses changed.
1207 * image.c: Omit unnecessary static decls.
1208 (x_create_bitmap_mask, x_build_heuristic_mask):
1209 Return void, not int, since callers don't care about the return value.
1210 (x_create_bitmap_mask, define_image_type, valid_image_p)
1211 (struct image_keyword, parse_image_spec, image_spec_value)
1212 (check_image_size, image_background)
1213 (image_background_transparent, x_clear_image_1)
1214 (postprocess_image, lookup_image, x_check_image_size)
1215 (x_create_x_image_and_pixmap, xbm_image_p)
1216 (Create_Pixmap_From_Bitmap_Data, xbm_read_bitmap_data)
1217 (xbm_load_image, xbm_file_p, xbm_load, xpm_lookup_color)
1218 (init_xpm_functions, xpm_valid_color_symbols_p, xpm_image_p)
1219 (xpm_load, xpm_load_image, lookup_rgb_color, lookup_pixel_color)
1220 (x_to_xcolors, x_build_heuristic_mask, pbm_image_p, pbm_load)
1221 (png_image_p, init_png_functions, png_load_body, png_load)
1222 (jpeg_image_p, init_jpeg_functions, jpeg_load_body, jpeg_load)
1223 (tiff_image_p, init_tiff_functions, tiff_load, gif_image_p)
1224 (init_gif_functions, gif_load, imagemagick_image_p)
1225 (imagemagick_load_image, imagemagick_load, svg_image_p)
1226 (init_svg_functions, svg_load, svg_load_image, gs_image_p)
1227 (gs_load):
1228 * nsimage.m (ns_load_image):
1229 * nsterm.m (ns_defined_color):
1230 * xfaces.c (tty_lookup_color, tty_defined_color, defined_color):
1231 * xfns.c (x_defined_color):
1232 * xterm.c (x_alloc_lighter_color_for_widget)
1233 (x_alloc_nearest_color_1, x_alloc_nearest_color)
1234 (x_alloc_lighter_color):
1235 * indent.c (disptab_matches_widthtab, current_column)
1236 (scan_for_column, string_display_width, indented_beyond_p)
1237 (compute_motion, vmotion, Fvertical_motion):
1238 Use bool for booleans.
1239
a5f2b6ec
CY
12402012-09-24 Chong Yidong <cyd@gnu.org>
1241
1242 * chartab.c (Fset_char_table_default): Obsolete function removed.
1243
18e27ea8
PE
12442012-09-23 Paul Eggert <eggert@cs.ucla.edu>
1245
afea8a8a
PE
1246 Move pid_t related decls out of lisp.h.
1247 * lisp.h, syswait.h (record_child_status_change, wait_for_termination)
1248 (interruptible_wait_for_termination):
1249 Move these decls from lisp.h to syswait.h, since they use pid_t.
1250 Needed on FreeBSD; see Herbert J. Skuhra in
1251 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00571.html>.
1252 * callproc.c: Include syswait.h.
1253
18e27ea8
PE
1254 gnutls.c, gtkutil.c: Use bool for boolean.
1255 * gnutls.c (gnutls_global_initialized, init_gnutls_functions)
1256 (emacs_gnutls_handle_error):
1257 * gtkutil.c (xg_check_special_colors, xg_prepare_tooltip)
1258 (xg_hide_tooltip, xg_create_frame_widgets)
1259 (create_dialog, xg_uses_old_file_dialog)
1260 (xg_get_file_with_chooser, xg_get_file_with_selection)
1261 (xg_get_file_name, xg_have_tear_offs, create_menus, xg_create_widget)
1262 (xg_item_label_same_p, xg_update_menubar)
1263 (xg_modify_menubar_widgets, xg_event_is_for_menubar)
1264 (xg_ignore_gtk_scrollbar, xg_set_toolkit_scroll_bar_thumb)
1265 (xg_event_is_for_scrollbar, xg_pack_tool_bar, xg_make_tool_item)
1266 (is_box_type, xg_tool_item_stale_p, xg_update_tool_bar_sizes)
1267 (update_frame_tool_bar, free_frame_tool_bar):
1268 * gtkutil.c, w32term.c, xterm.c (x_wm_set_size_hint):
1269 * nsmenu.m (ns_update_menubar):
1270 * nsmenu.m, w32menu.c, xmenu.c (set_frame_menubar):
1271 * xfns.c (Fx_show_tip) [USE_GTK]:
1272 Use bool for boolean.
1273 * gtkutil.c (xg_update_frame_menubar):
1274 * xmenu.c (update_frame_menubar):
1275 Return void, not int, since caller ignores return value.
1276 * gtkutil.c (xg_change_toolbar_position):
1277 Return void, not 1.
1278
af0e9f75
JB
12792012-09-23 Juanma Barranquero <lekktu@gmail.com>
1280
1281 * makefile.w32-in (BLOCKINPUT_H): Remove.
1282 (SYSSIGNAL_H): New macro.
1283 ($(BLD)/alloc.$(O), $(BLD)/atimer.$(O), $(BLD)/buffer.$(O))
1284 ($(BLD)/callproc.$(O), $(BLD)/data.$(O), $(BLD)/dired.$(O))
1285 ($(BLD)/dispnew.$(O), $(BLD)/editfns.$(O), $(BLD)/emacs.$(O))
1286 ($(BLD)/eval.$(O), $(BLD)/fileio.$(O), $(BLD)/floatfns.$(O))
1287 ($(BLD)/fns.$(O), $(BLD)/fontset.$(O), $(BLD)/frame.$(O))
1288 ($(BLD)/fringe.$(O), $(BLD)/image.$(O), $(BLD)/insdel.$(O))
1289 ($(BLD)/keyboard.$(O), $(BLD)/keymap.$(O), $(BLD)/lread.$(O))
1290 ($(BLD)/menu.$(O), $(BLD)/w32inevt.$(O), $(BLD)/w32proc.$(O))
1291 ($(BLD)/print.$(O), $(BLD)/process.$(O), $(BLD)/ralloc.$(O))
1292 ($(BLD)/search.$(O), $(BLD)/sound.$(O), $(BLD)/sysdep.$(O))
1293 ($(BLD)/term.$(O), $(BLD)/window.$(O), $(BLD)/xdisp.$(O))
1294 ($(BLD)/xfaces.$(O), $(BLD)/w32fns.$(O), $(BLD)/w32menu.$(O))
1295 ($(BLD)/w32term.$(O), $(BLD)/w32select.$(O), $(BLD)/w32reg.$(O))
1296 ($(BLD)/w32xfns.$(O)): Update dependencies.
1297
5101529e
EZ
12982012-09-23 Eli Zaretskii <eliz@gnu.org>
1299
1300 * .gdbinit: Set breakpoint on terminate_due_to_signal, not on
1301 fatal_error_backtrace.
1302
1303 * w32proc.c (sys_kill): Undo last change: don't do anything when
1304 invoked to deliver SIGABRT to our own process. This is now
1305 handled by emacs_raise.
1306
2c3ee0ad
JB
13072012-09-23 Juanma Barranquero <lekktu@gmail.com>
1308
1309 * w32term.c (w32_read_socket): Remove leftover reference to
1310 interrupt_input_pending.
1311
62a1d661
PE
13122012-09-23 Paul Eggert <eggert@cs.ucla.edu>
1313
1314 Do not use SA_NODEFER.
1315 Problem reported by Dani Moncayo in
1316 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00557.html>.
1317 * alloc.c (die):
1318 * sysdep.c (emacs_abort): Do not reset signal handler.
1319 * emacs.c (terminate_due_to_signal): Reset signal handler here.
1320 * sysdep.c (init_signals): Do not use SA_NODEFER. It wasn't
1321 wanted even on POSIXish hosts, and it doesn't work on Windows.
1322
a0942b9a
JD
13232012-09-23 Jan Djärv <jan.h.d@swipnet.se>
1324
1325 * xterm.c (x_term_init): Call fixup_locale before and after calling
1326 gtk_init (Bug#12392).
1327
d07ff9db
CY
13282012-09-23 Chong Yidong <cyd@gnu.org>
1329
1330 * w32.c (w32_delayed_load): Remove LIBRARIES argument; always use
1331 Vdynamic_library_alist.
1332
1333 * gnutls.c (init_gnutls_functions): Caller changed; remove arg.
1334 (Fgnutls_available_p): Caller changed.
1335
1336 * xml.c (init_libxml2_functions, Flibxml_parse_html_region)
1337 (Flibxml_parse_xml_region): Likewise.
1338
1339 * dispextern.h (struct image_type): Remove arg from init function.
1340
1341 * image.c (Finit_image_library, lookup_image_type)
1342 (define_image_type): Remove now-unneeded second arg.
1343 (init_xpm_functions, init_png_functions, init_jpeg_functions)
1344 (init_tiff_functions, init_gif_functions, init_svg_functions):
1345 Arglist and w32_delayed_load calling convention changed.
1346 (gs_type): Remove init_gs_functions; there is no such function.
641cfd14 1347 (valid_image_p, make_image): Fix caller to lookup_image_type.
d07ff9db 1348
4d7e6e51
PE
13492012-09-23 Paul Eggert <eggert@cs.ucla.edu>
1350
1351 Simplify and avoid signal-handling races (Bug#12471).
1352 * alloc.c (die):
1353 * sysdep.c (emacs_abort) [HAVE_NTGUI]:
1354 Avoid recursive loop if there's a fatal error in the function itself.
1355 * atimer.c (pending_atimers):
1356 * blockinput.h: Don't include "atimer.h"; no longer needed.
1357 (interrupt_input_pending): Remove. All uses removed.
1358 pending_signals now counts both atimers and ordinary interrupts.
1359 This is less racy than having three separate pending-signal flags.
1360 (block_input, unblock_input, totally_unblock_input, unblock_input_to)
1361 (input_blocked_p):
1362 Rename from their upper-case counterparts BLOCK_INPUT,
1363 UNBLOCK_INPUT, TOTALLY_UNBLOCK_INPUT, UNBLOCK_INPUT_TO,
1364 INPUT_BLOCKED_P, and turn into functions. All uses changed.
1365 This makes it easier to access volatile variables more accurately.
1366 (BLOCK_INPUT_RESIGNAL): Remove. All uses replaced by unblock_input ().
1367 (input_blocked_p): Prefer this to 'interrupt_input_blocked', as
1368 that's more reliable if the code is buggy and sets
1369 interrupt_input_blocked to a negative value. All uses changed.
1370 * atimer.c (deliver_alarm_signal):
1371 Remove. No need to deliver this to the parent; any thread can
1372 handle this signal now. All uses replaced by underlying handler.
1373 * atimer.c (turn_on_atimers):
1374 * dispnew.c (handle_window_change_signal):
1375 * emacs.c (handle_danger_signal):
1376 * keyboard.c (kbd_buffer_get_event):
1377 Don't reestablish signal handler; not needed with sigaction.
1378 * blockinput.h (UNBLOCK_INPUT_TO, TOTALLY_UNBLOCK_INPUT)
1379 (UNBLOCK_INPUT_TO):
1380 Rework to avoid unnecessary accesses to volatile variables.
1381 (UNBLOCK_INPUT_TO): Now a function.
1382 (totally_unblock_input, unblock_input): New decls.
1383 * data.c (handle_arith_signal, deliver_arith_signal): Move to sysdep.c
1384 (init_data): Remove. Necessary stuff now done in init_signal.
1385 * emacs.c, xdisp.c: Include "atimer.h", since we invoke atimer functions.
1386 * emacs.c (handle_fatal_signal, deliver_fatal_signal): Move to sysdep.c.
1387 (fatal_error_code): Remove; no longer needed.
1388 (terminate_due_to_signal): Rename from fatal_error_backtrace, since
1389 it doesn't always backtrace. All uses changed. No need to reset
1390 signal to default, since sigaction and/or die does that for us now.
1391 Use emacs_raise (FOO), not kill (getpid (), FOO).
1392 (main): Check more-accurately whether we're dumping.
1393 Move fatal-error setup to sysdep.c
1394 * floatfns.c: Do not include "syssignal.h"; no longer needed.
1395 * gtkutil.c (xg_get_file_name, xg_get_font):
1396 Remove no-longer-needed signal-mask manipulation.
1397 * keyboard.c, process.c (POLL_FOR_INPUT):
1398 Don't depend on USE_ASYNC_EVENTS, a symbol that is never defined.
1399 * keyboard.c (read_avail_input): Remove.
1400 All uses replaced by gobble_input.
1401 (Ftop_level): Use TOTALLY_UNBLOCK_INPUT rather than open code.
1402 (kbd_buffer_store_event_hold, gobble_input):
1403 (record_asynch_buffer_change) [USABLE_SIGIO]:
1404 (store_user_signal_events):
1405 No need to mess with signal mask.
1406 (gobble_input): If blocking input and there are terminals, simply
1407 set pending_signals to 1 and return. All hooks changed to not
1408 worry about whether input is blocked.
1409 (process_pending_signals): Clear pending_signals before processing
1410 them, in case a signal comes in while we're processing.
1411 By convention callers now test pending_signals before calling us.
1412 (UNBLOCK_INPUT_TO, unblock_input, totally_unblock_input):
1413 New functions, to support changes to blockinput.h.
1414 (handle_input_available_signal): Now extern.
1415 (reinvoke_input_signal): Remove. All uses replaced by
1416 handle_async_input.
1417 (quit_count): Now volatile, since a signal handler uses it.
3a880af4
SM
1418 (handle_interrupt): Now takes bool IN_SIGNAL_HANDLER as arg.
1419 All callers changed. Block SIGINT only if not already blocked.
4d7e6e51
PE
1420 Clear sigmask reliably, even if Fsignal returns, which it can.
1421 Omit unnecessary accesses to volatile var.
1422 (quit_throw_to_read_char): No need to restore sigmask.
1423 * keyboard.c (gobble_input, handle_user_signal):
1424 * process.c (wait_reading_process_output):
1425 Call signal-handling code rather than killing ourselves.
1426 * lisp.h: Include <float.h>, for...
1427 (IEEE_FLOATING_POINT): New macro, moved here to avoid duplication.
1428 (pending_signals): Now volatile.
1429 (syms_of_data): Now const if IEEE floating point.
1430 (handle_input_available_signal) [USABLE_SIGIO]:
1431 (terminate_due_to_signal, record_child_status_change): New decls.
1432 * process.c (create_process): Avoid disaster if memory is exhausted
1433 while we're processing a vfork, by tightening the critical section
1434 around the vfork.
1435 (send_process_frame, process_sent_to, handle_pipe_signal)
1436 (deliver_pipe_signal): Remove. No longer needed, as Emacs now
1437 ignores SIGPIPE.
1438 (send_process): No need for setjmp/longjmp any more, since the
1439 SIGPIPE stuff is now gone. Instead, report an error if errno
1440 is EPIPE.
1441 (record_child_status_change): Now extern. PID and W are now args.
1442 Return void, not bool. All callers changed.
1443 * sysdep.c (wait_debugging) [(BSD_SYSTEM || HPUX) && !defined (__GNU__)]:
1444 Remove. All uses removed. This bug should be fixed now in a
1445 different way.
1446 (wait_for_termination_1): Use waitpid rather than sigsuspend,
1447 and record the child status change directly. This avoids the
1448 need to futz with the signal mask.
1449 (process_fatal_action): Move here from emacs.c.
1450 (emacs_sigaction_flags): New function, containing
1451 much of what used to be in emacs_sigaction_init.
1452 (emacs_sigaction_init): Use it. Block nonfatal system signals that are
1453 caught by emacs, to make races less likely.
1454 (deliver_process_signal): Rename from handle_on_main_thread.
1455 All uses changed.
1456 (BACKTRACE_LIMIT_MAX): Now at top level.
1457 (thread_backtrace_buffer, threadback_backtrace_pointers):
1458 New static vars.
1459 (deliver_thread_signal, deliver_fatal_thread_signal):
1460 New functions, for more-accurate delivery of thread-specific signals.
1461 (handle_fatal_signal, deliver_fatal_signal): Move here from emacs.c.
1462 (deliver_arith_signal): Handle in this thread, not
1463 in the main thread, since it's triggered by this thread.
1464 (maybe_fatal_sig): New function.
1465 (init_signals): New arg DUMPING so that we can be more accurate
1466 about whether we're dumping. Caller changed.
1467 Treat thread-specific signals differently from process-general signals.
1468 Block all signals while handling fatal error; that's safer.
1469 xsignal from SIGFPE only on non-IEEE hosts, treating it as fatal
1470 on IEEE hosts.
1471 When batch, ignore SIGHUP, SIGINT, SIGTERM if they were already ignored.
1472 Ignore SIGPIPE unless batch.
1473 (emacs_backtrace): Output backtrace for the appropriate thread,
1474 which is not necessarily the main thread.
1475 * syssignal.h: Include <stdbool.h>.
1476 (emacs_raise): New macro.
1477 * xterm.c (x_connection_signal): Remove; no longer needed
1478 now that we use sigaction.
1479 (x_connection_closed): No need to mess with sigmask now.
1480 (x_initialize): No need to reset SIGPIPE handler here, since
1481 init_signals does this for us now.
1482
8f4635e9
JD
14832012-09-23 Jan Djärv <jan.h.d@swipnet.se>
1484
1485 * nsterm.m (ns_dumpglyphs_image): dr is a new rect to draw image into,
fb39b937 1486 background rect may be larger (Bug#12245).
8f4635e9 1487
3296976d
CY
14882012-09-23 Chong Yidong <cyd@gnu.org>
1489
1490 * keyboard.c (timer_check): Avoid quitting during Fcopy_sequence.
1491
d41e491e
PE
14922012-09-22 Paul Eggert <eggert@cs.ucla.edu>
1493
1494 * .gdbinit: Just stop at fatal_error_backtrace.
1495 See Stefan Monnier's request in
1496 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00549.html>.
1497 Remove no-longer-used query of system type.
1498
c88b867f
CY
14992012-09-22 Chong Yidong <cyd@gnu.org>
1500
1501 * search.c (Freplace_match): Doc fix (Bug#12325).
1502
1503 * minibuf.c (Finternal_complete_buffer): Doc fix (Bug#12391).
1504
1505 * editfns.c (Fline_beginning_position): Doc fix (Bug#12416).
1506 (Fline_end_position): Doc fix.
1507
1508 * cmds.c (Fforward_char, Fbackward_char): Doc fix (Bug#12414).
1509
bb4d86b4
CY
15102012-09-22 Chong Yidong <cyd@gnu.org>
1511
1512 * dispextern.h (struct image_type): Add new slot, storing a type
1513 initialization function.
1514
1515 * image.c (define_image_type): Call the image initializer function
1516 if it is defined. Arguments and return value changed.
1517 (valid_image_p, make_image): Callers changed.
1518 (xbm_type, xpm_type, pbm_type, png_type, jpeg_type, tiff_type)
3a880af4
SM
1519 (gif_type, imagemagick_type, svg_type, gs_type):
1520 Add initialization functions.
bb4d86b4
CY
1521 (Finit_image_library): Call lookup_image_type.
1522 (CHECK_LIB_AVAILABLE): Macro deleted.
1523 (lookup_image_type): Call define_image_type here, rather than via
1524 Finit_image_library, and without using CHECK_LIB_AVAILABLE.
1525 (syms_of_image): Move define_image_type calls for xbm_type and
1526 pbm_type to lookup_image_type.
1527
df9685f3
EZ
15282012-09-22 Eli Zaretskii <eliz@gnu.org>
1529
1530 * keyboard.c (timer_check_2): Move calculation of 'timers' and
1531 'idle_timers' from here ...
1532 (timer_check): ... to here. Use Fcopy_sequence to copy the timer
1533 lists, to avoid infloops when the timer does something stupid,
1534 like reinvoke itself with the same or smaller time-out.
1535 (Bug#12447)
1536
8e17c9ba
MR
15372012-09-22 Martin Rudalics <rudalics@gmx.at>
1538
1539 * window.c (Fsplit_window_internal): Handle only Qt value of
1540 Vwindow_combination_limit separately.
1541 (Qtemp_buffer_resize): New symbol.
3a880af4
SM
1542 (Vwindow_combination_limit): New default value.
1543 Rewrite doc-string.
8e17c9ba 1544
589bd69b
EZ
15452012-09-22 Eli Zaretskii <eliz@gnu.org>
1546
1547 * xdisp.c (next_overlay_string): Initialize it->end_charpos for
1548 the new overlay string. (Bug#10159)
1549
01108e3f
PE
15502012-09-22 Paul Eggert <eggert@cs.ucla.edu>
1551
1552 * emacs.c (shut_down_emacs): Don't assume stderr is buffered,
1553 or that fprintf is async-signal-safe. POSIX doesn't require
1554 either assumption.
1555
82f8cd94
CY
15562012-09-22 Chong Yidong <cyd@gnu.org>
1557
1558 * buffer.c (Fset_buffer_modified_p): Handle indirect buffers
1559 (Bug#8207).
1560
3cccbd87
KH
15612012-09-22 Kenichi Handa <handa@gnu.org>
1562
1563 * composite.c (composition_reseat_it): Handle the case that a
1564 grapheme cluster is not covered by a single font (Bug#12352).
1565
09c01941
CY
15662012-09-21 Chong Yidong <cyd@gnu.org>
1567
1568 * image.c (define_image_type): Avoid adding duplicate types to
1569 image_types (Bug#12463). Suggested by Jörg Walter.
1570
acfa068f 15712012-09-21 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
e25c1a30
YM
1572
1573 * unexmacosx.c: Define LC_DATA_IN_CODE if not defined.
1574 (print_load_command_name): Add case LC_DATA_IN_CODE.
1575 (dump_it) [LC_DATA_IN_CODE]: Call copy_linkedit_data.
1576
acfa068f 15772012-09-21 Glenn Morris <rgm@gnu.org>
1e9bbf47
GM
1578
1579 * eval.c (Frun_hook_with_args_until_success)
1580 (Frun_hook_with_args_until_failure): Doc fixes. (Bug#12393)
1581
acfa068f 15822012-09-21 Andreas Schwab <schwab@linux-m68k.org>
c6ba4138
AS
1583
1584 * fileio.c (Ffile_selinux_context): Only call freecon when
1585 lgetfilecon succeeded.
1586 (Fset_file_selinux_context): Likewise. (Bug#12444)
1587
acfa068f 15882012-09-21 Eli Zaretskii <eliz@gnu.org>
aa36e4d2
EZ
1589
1590 * xdisp.c (try_window_reusing_current_matrix): Under bidi
1591 reordering, locate the cursor by calling set_cursor_from_row; if
1592 that fails, clear the desired glyph matrix before returning a
1593 failure indication to the caller. Fixes leaving garbled display
1594 when fast scrolling with a down-key. (Bug#12403)
f2016bea
EZ
1595 (compute_stop_pos_backwards): Fix a typo that caused crashes while
1596 scrolling through multibyte text.
aa36e4d2 1597
e99f70c8
SM
15982012-09-20 Stefan Monnier <monnier@iro.umontreal.ca>
1599
1600 * alloc.c (mark_object) <PVEC_WINDOW>: Mark prev/next_buffers *after*
1601 calling mark_vectorlike since that's the one that marks the window.
1602 (mark_discard_killed_buffers): Mark the final cdr.
1603 * window.h (struct window): Move prev/next_buffers to the
1604 non-standard fields.
1605 * window.c (make_window): Initialize prev/next_buffers manually.
1606
f75beb47
PE
16072012-09-20 Paul Eggert <eggert@cs.ucla.edu>
1608
1609 Omit unused arg EXPECTED from socket hooks.
1610 * keyboard.c (gobble_input, read_avail_input, tty_read_avail_input):
1611 * nsterm.m (ns_term_init):
1612 * termhooks.h (struct terminal.read_socket_hook):
1613 * w32inevt.c (w32_console_read_socket):
1614 * w32term.c (w32_read_socket):
1615 * xterm.c (XTread_socket):
1616 Omit unused arg EXPECTED. All callers changed.
1617 (store_user_signal_events): Return void, not int, since callers no
1618 longer care about the return value. All uses changed.
1619
b019b76a
JB
16202012-09-20 Juanma Barranquero <lekktu@gmail.com>
1621
1622 * w32gui.h (XParseGeometry): Do not declare.
1623
05642592
PE
16242012-09-19 Paul Eggert <eggert@cs.ucla.edu>
1625
e4bce92a
PE
1626 * w32inevt.c (w32_console_read_socket): Return -1 on failure, not 0.
1627 Ignore 'expected'. See Eli Zaretskii in
1628 <http://bugs.gnu.org/12471#8> (last line).
1629
05642592
PE
1630 * frame.c (read_integer): Remove. All uses replaced by strtol/strtoul.
1631 (XParseGeometry): Now static. Substitute extremal values for
1632 values that are out of range.
1633
e543ae91
JD
16342012-09-19 Jan Djärv <jan.h.d@swipnet.se>
1635
1636 * w32xfns.c (read_integer, XParseGeometry): Move to frame.c.
1637
1638 * nsfns.m (XParseGeometry): Remove.
1639 (Fx_create_frame): Call x_set_offset to correctly interpret
1640 top_pos in geometry.
1641
3a880af4 1642 * frame.c (read_integer, XParseGeometry): Move from w32xfns.c.
e543ae91
JD
1643 (Fx_parse_geometry): If there is a space in string, call
1644 Qns_parse_geometry, otherwise do as on other terms (Bug#12368).
1645
45ba16c7
EZ
16462012-09-17 Eli Zaretskii <eliz@gnu.org>
1647
c8b9f1bc
EZ
1648 * search.c (scan_buffer): Use character positions in calls to
1649 region_cache_forward and region_cache_backward, not byte
1650 positions. (Bug#12196)
1651
b4c932a2
EZ
1652 * w32term.c (w32_read_socket): Set pending_signals to 1, like
1653 xterm.c does. Reported by Daniel Colascione <dancol@dancol.org>.
1654
45ba16c7
EZ
1655 * ralloc.c (r_alloc_init) [!SYSTEM_MALLOC]: Initialize
1656 __malloc_extra_blocks to 32 instead of 64, like alloc.c did in
1657 emacs_blocked_malloc, now deleted.
1658
eeceac93
PE
16592012-09-17 Paul Eggert <eggert@cs.ucla.edu>
1660
1661 Remove no-longer-needed Solaris 2.4 vfork bug workaround.
1662 The workaround was for improving performance on Solaris 2.4, but
1663 is getting in the way now. Emacs will still work if someone is
1664 still running Solaris 2.4 in a museum somewhere; Sun dropped
1665 support for Solaris 2.4 in 2003.
1666 * callproc.c (Fcall_process) [HAVE_WORKING_VFORK]:
1667 * process.c (create_process) [HAVE_WORKING_VFORK]:
1668 Omit now-unnecessary workaround for the Solaris 2.4 vfork bug,
1669 since Emacs no longer uses vfork on that platform.
1670
78f83752
GM
16712012-09-17 Glenn Morris <rgm@gnu.org>
1672
1673 * emacs.c: Use COPYRIGHT.
1674
634b8cac
PE
16752012-09-16 Paul Eggert <eggert@cs.ucla.edu>
1676
0caaedb1
PE
1677 Remove configure's --without-sync-input option (Bug#12450).
1678 When auditing signal-handling in preparation for cleaning it up,
1679 I found that SYNC_INPUT has race conditions and would be a real
1680 pain to fix. Since it's an undocumented and deprecated
1681 configure-time option, now seems like a good time to remove it.
1682 Also see <http://bugs.gnu.org/11080#16>.
1683 * alloc.c (_bytes_used, __malloc_extra_blocks, _malloc_internal)
1684 (_free_internal) [!DOUG_LEA_MALLOC]: Remove decls.
1685 (alloc_mutex) [!SYSTEM_MALLOC && !SYNC_INPUT && HAVE_PTHREAD]:
1686 (malloc_hysteresis):
1687 (check_depth) [XMALLOC_OVERRUN_CHECK]:
1688 (MALLOC_BLOCK_INPUT, MALLOC_UNBLOCK_INPUT):
1689 (__malloc_hook, __realloc_hook, __free_hook, BYTES_USED)
1690 (dont_register_blocks, bytes_used_when_reconsidered)
1691 (bytes_used_when_full, emacs_blocked_free, emacs_blocked_malloc)
1692 (emacs_blocked_realloc, reset_malloc_hooks, uninterrupt_malloc):
1693 [!SYSTEM_MALLOC && !SYNC_INPUT]:
1694 Remove. All uses removed.
1695 (MALLOC_BLOCK_INPUT, MALLOC_UNBLOCK_INPUT): Use a different
1696 implementation, one that depends on whether the new macro
1697 XMALLOC_BLOCK_INPUT_CHECK is defined, not on whether SYNC_INPUT
1698 is defined.
1699 * atimer.c (run_timers, handle_alarm_signal):
1700 * keyboard.c (pending_signal, poll_for_input_1, poll_for_input)
1701 (handle_async_input, process_pending_signals)
1702 (handle_input_available_signal, init_keyboard):
1703 * nsterm.m (ns_read_socket):
1704 * process.c (wait_reading_process_output):
1705 * regex.c (immediate_quit, IMMEDIATE_QUIT_CHECK):
1706 * sysdep.c (emacs_sigaction_init) [SA_RESTART]:
1707 (emacs_write):
1708 * xterm.c (XTread_socket):
1709 Assume SYNC_INPUT.
1710 * conf_post.h (SA_RESTART) [IRIX6_5]: Do not #undef.
1711 * eval.c (handling_signal): Remove. All uses removed.
1712 * lisp.h (ELSE_PENDING_SIGNALS): Remove.
1713 All uses replaced with the SYNC_INPUT version.
1714 (reset_malloc_hooks, uninterrupt_malloc, handling_signal):
1715 Remove decls.
1716 * sysdep.c, syssignal.h (main_thread) [FORWARD_SIGNAL_TO_MAIN_THREAD]:
1717 Now static.
1718
634b8cac
PE
1719 * font.c (Ffont_shape_gstring): Remove unused local.
1720
83da1b55
GM
17212012-09-16 Glenn Morris <rgm@gnu.org>
1722
518650a5
GM
1723 * Makefile.in (clean): No longer run nextstep's clean.
1724
83da1b55
GM
1725 * Makefile.in (ns_appdir, ns_appbindir, ns_appsrc): Remove variables.
1726 (ns_frag): Remove.
1727 (ns-app): Move here from ns.mk, and simplify.
1728 (clean): Simplify nextstep entry.
1729 * ns.mk: Remove file.
1730
85a43e2e
KH
17312012-09-17 Kenichi Handa <handa@gnu.org>
1732
1733 * font.c (Ffont_shape_gstring): Fix previous change; GLYPHs may
1734 not covert the last few charactes.
1735
ba13e616 17362012-09-16 Kenichi Handa <handa@gnu.org>
ea964864
KH
1737
1738 * font.c (Ffont_shape_gstring): Don't adjust grapheme cluster
1739 here, but just check the validity of glyphs in the glyph-string.
1740
a8c729af
MR
17412012-09-16 Martin Rudalics <rudalics@gmx.at>
1742
3a880af4
SM
1743 * window.c (Fwindow_parameter, Fset_window_parameter):
1744 Accept any window as argument (Bug#12452).
a8c729af 1745
c077c059
JD
17462012-09-16 Jan Djärv <jan.h.d@swipnet.se>
1747
1748 * nsfns.m (Fx_open_connection): Move initialization of ns_*_types
1749 to ns_term_init to avoid memory leak.
1750
1751 * nsterm.m (ns_update_begin): Initialize bp after lcokFocus, use
1752 explicit retain/release.
1753 (ns_term_init): Only allow one display. Initialize outerpool and
1754 ns_*_types.
1755
39a57ad0
PE
17562012-09-15 Paul Eggert <eggert@cs.ucla.edu>
1757
1758 Port _setjmp fix to POSIXish hosts as well as Microsoft.
1759 * image.c (_setjmp) [!HAVE__SETJMP]: Restore definition, as
1760 it's needed on POSIXish hosts that lack _setjmp. Attempt to solve
1761 the Microsoft problem in a different way, by altering ../nt/config.nt.
1762
7105c8cb
EZ
17632012-09-15 Eli Zaretskii <eliz@gnu.org>
1764
1765 * w32xfns.c:
1766 * w32uniscribe.c:
1767 * w32term.c:
1768 * w32select.c:
1769 * w32reg.c:
1770 * w32proc.c:
1771 * w32menu.c:
1772 * w32inevt.c:
1773 * w32heap.c:
1774 * w32font.c:
1775 * w32fns.c:
1776 * w32console.c:
1777 * w32.c:
1778 * w16select.c: Remove inclusion of setjmp.h, as it is now included
1779 by lisp.h. This completes removal of setjmp.h inclusion
1780 erroneously announced in the previous commit. (Bug#12446)
1781
1782 * lisp.h [!HAVE__SETJMP, !HAVE_SIGSETJMP]: Make the commentary
1783 more accurate.
1784
1785 * image.c (_setjmp) [!HAVE__SETJMP]: Define only if 'setjmp' is
1786 not defined as a macro. The latter happens on MS-Windows.
1787 (Bug#12446)
1788
0328b6de
PE
17892012-09-15 Paul Eggert <eggert@cs.ucla.edu>
1790
1791 Port better to POSIX hosts lacking _setjmp (Bug#12446).
1792 * lisp.h: Include <setjmp.h> here, since we use its symbols here.
7105c8cb 1793 Some instances of '#include <setjmp.h>' removed, if the
0328b6de
PE
1794 only reason for the instance was because "lisp.h" was included.
1795 (sys_jmp_buf, sys_setjmp, sys_longjmp): New symbols.
1796 Unless otherwise specified, replace all uses of jmp_buf, _setjmp,
1797 and _longjmp with the new symbols. Emacs already uses _setjmp if
1798 available, so this change affects only POSIXish hosts that have
1799 sigsetjmp but not _setjmp, such as some versions of Solaris and
1800 Unixware. (Also, POSIX-2008 marks _setjmp as obsolescent.)
1801 * image.c (_setjmp, _longjmp) [HAVE_PNG && !HAVE__SETJMP]: New macros.
1802 (png_load_body) [HAVE_PNG]:
1803 (PNG_LONGJMP) [HAVE_PNG && PNG_LIBPNG_VER < 10500]:
1804 (PNG_JMPBUF) [HAVE_PNG && PNG_LIBPNG_VER >= 10500]:
1805 Use _setjmp and _longjmp rather than sys_setjmp and sys_longjmp,
1806 since PNG requires jmp_buf. This is the only exception to the
1807 general rule that we now use sys_setjmp and sys_longjmp.
1808 This exception is OK since this code does not change the signal
1809 mask or longjmp out of a signal handler.
1810
2af03429
PE
18112012-09-14 Paul Eggert <eggert@cs.ucla.edu>
1812
1813 * alloc.c [!SYSTEM_MALLOC && !SYNC_INPUT && HAVE_PTHREAD]:
1814 Include "syssignal.h", for 'main_thread'.
1815
2f294edf
DA
18162012-09-14 Dmitry Antipov <dmantipov@yandex.ru>
1817
1818 Avoid out-of-range marker position (Bug#12426).
3a880af4
SM
1819 * insdel.c (replace_range, replace_range_2):
1820 Adjust markers before overlays, as suggested by comments.
2f294edf
DA
1821 (insert_1_both, insert_from_buffer_1, adjust_after_replace):
1822 Remove redundant check before calling offset_intervals.
1823
6b533e9c
MR
18242012-09-14 Martin Rudalics <rudalics@gmx.at>
1825
1826 * xdisp.c (Fformat_mode_line): Unconditionally save/restore
1827 current buffer (Bug#12387).
1828
2a7931e3
JB
18292012-09-14 Juanma Barranquero <lekktu@gmail.com>
1830
1831 * makefile.w32-in ($(BLD)/alloc.$(O)): Update dependencies.
1832
c18e885b
PE
18332012-09-13 Paul Eggert <eggert@cs.ucla.edu>
1834
1835 Use a more backwards-compatible timer format (Bug#12430).
1836 * keyboard.c (decode_timer): Get PSECS from the 8th (origin-0)
1837 vector element, not from the 4th, since PSECS is now at the end.
1838 (Fcurrent_idle_time): Doc fix.
1839
d59a1afb
DA
18402012-09-13 Dmitry Antipov <dmantipov@yandex.ru>
1841
1842 Function to mark objects and remove killed buffers at once.
1843 * alloc.c (discard_killed_buffers): Rename to ...
1844 (mark_discard_killed buffers) ... new name. Add marking
1845 of remaining objects. Fix comment. Adjust users.
1846 (mark_object): Do not touch frame buffer lists here.
1847 * frame.c (delete_frame): Reset frame buffer lists here.
1848
5f0cb45a
PE
18492012-09-13 Paul Eggert <eggert@cs.ucla.edu>
1850
8ea47e3a
PE
1851 Better workaround for GNOME bug when --enable-gcc-warnings.
1852 * emacsgtkfixed.c (G_STATIC_ASSERT): Remove, undoing last change.
1853 Instead, disable -Wunused-local-typedefs. See Dmitry Antipov in
1854 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00335.html>.
1855
4a4bbad2
PE
1856 Simplify SIGIO usage (Bug#12408).
1857 The code that dealt with SIGIO was crufty and confusing, e.g., it
1858 played tricks like "#undef SIGIO" but these tricks were not used
1859 consistently. Simplify mostly by not #undeffing standard symbols,
1860 e.g., use "defined USABLE_SIGIO" (our symbol, which we can define
1861 or not as we please) rather than "defined SIGIO" (standard symbol
1862 that we probably shouldn't #undef).
1863 * conf_post.h [USG5_4]: Do not include <sys/wait.h> here.
1864 Modules that need it can include it.
1865 [USG5_4 && emacs]: Likewise, do not include the streams stuff here.
1866 * dispextern.h (ignore_sigio): New decl.
1867 * emacs.c (shut_down_emacs): Invoke unrequest_sigio
1868 unconditionally, since it's now a no-op if !USABLE_SIGIO.
1869 * emacs.c (shut_down_emacs):
1870 * keyboard.c (kbd_buffer_store_event_hold):
1871 Use ignore_sigio rather than invoking 'signal' directly.
1872 * keyboard.c (USABLE_FIONREAD && USG5_4): Include <sys/filio.h>,
1873 for FIONREAD.
1874 (FIONREAD, SIGIO): Do not #undef.
1875 (tty_read_avail_input): Use #error rather than a syntax error.
1876 * process.c [USG5_4]: Include <sys/stream.h> and <sys/stropts.h>,
1877 for I_PIPE, used by SETUP_SLAVE_PTY.
1878 (DATAGRAM_SOCKETS): Simplify defn, based on USABLE_FIONREAD.
1879 * sysdep.c (croak): Remove; no longer needed. This bit of
1880 temporary code, with Fred N. Fish's comment that it's temporary,
1881 has been in Emacs since at least 1992!
1882 (init_sigio, reset_sigio, request_sigio, unrequest_sigio):
1883 Arrange for them to be no-ops in all cases when ! USABLE_SIGIO.
1884 * syssignal.h (croak): Remove decl.
1885 (SIGIO, SIGPOO, SIGAIO, SIGPTY): Do not #undef; that's too fragile.
1886 * systty.h [!NO_TERMIO]: Do not include <termio.h>; no longer needed
1887 now that we're termios-only.
1888 (FIONREAD, ASYNC) [BROKEN_FIONREAD]: Do not #undef.
1889 * term.c (dissociate_if_controlling_tty): Use #error rather than
1890 a run-time error.
1891
5f0cb45a
PE
1892 Work around GCC and GNOME bugs when --enable-gcc-warnings.
1893 * emacsgtkfixed.c (G_STATIC_ASSERT): Redefine to use 'verify',
1894 to work around GNOME bug 683906.
1895 * image.c (jpeg_load_body) [HAVE_JPEG && lint]: Pacify gcc -Wclobber.
1896 (struct my_jpeg_error_mgr) [HAVE_JPEG && lint]: New member fp.
1897 This works around GCC bug 54561.
1898
40bce90b
PE
18992012-09-12 Paul Eggert <eggert@cs.ucla.edu>
1900
1901 More fixes for 'volatile' and setjmp/longjmp.
1902 * eval.c (Fdefvar, Fcondition_case): Remove unnecessary 'volatile's.
1903 * image.c (struct png_load_context) [HAVE_PNG]: New type.
1904 (png_load_body) [HAVE_PNG]:
1905 (jpeg_load_body) [HAVE_JPEG]:
1906 New function, with most of the old parent function's body.
1907 (png_load) [HAVE_PNG]:
1908 (jpeg_load) [HAVE_JPEG]:
1909 Invoke the new function, to avoid longjmp munging our locals.
1910 (struct my_jpeg_error_mgr) [HAVE_JPEG]: New members cinfo, failure_code.
1911 (my_error_exit) [HAVE_JPEG]: Don't trust 'setjmp' to return 2 when
1912 longjmp is passed 2, as the C standard doesn't guarantee this.
1913 Instead, store the failure code into mgr->failure_code.
1914
bfeae2cf
SM
19152012-09-12 Stefan Monnier <monnier@iro.umontreal.ca>
1916
1917 * keyboard.c (read_char, requeued_events_pending_p, Finput_pending_p)
1918 (Fdiscard_input, quit_throw_to_read_char, init_keyboard)
1919 (syms_of_keyboard): Remove support for unread-command-char.
1920
8099e36b
EZ
19212012-09-12 Eli Zaretskii <eliz@gnu.org>
1922
1923 * w32proc.c (sys_kill): If PID is our process ID and the signal is
1924 SIGABRT, call emacs_abort. Avoids silently exiting upon assertion
1925 violation. (Bug#12426)
1926
92547ff9
PE
19272012-09-12 Paul Eggert <eggert@cs.ucla.edu>
1928
1929 * image.c (jpeg_memory_src): Don't assume string len fits in unsigned.
1930
45b82ad0
SM
19312012-09-12 Stefan Monnier <monnier@iro.umontreal.ca>
1932
1933 * eval.c: Add `inhibit-debugger'.
1934 (Qinhibit_debugger): New symbol.
1935 (call_debugger): Bind it instead of Qdebug_on_error.
1936 (maybe_call_debugger): Test Vinhibit_debugger.
1937 (syms_of_eval): Define inhibit-debugger.
1938 * xdisp.c (set_message): Don't bind Qinhibit_debug_on_message.
1939 (syms_of_xdisp): Remove inhibit-debug-on-message.
1940
5779a1dc
PE
19412012-09-11 Paul Eggert <eggert@cs.ucla.edu>
1942
50f2e553
PE
1943 Avoid _setjmp/_longjmp problems with local nonvolatile variables.
1944 If a nonvolatile local variable is written before a _longjmp to
1945 the frame containing the variable, and is read after the _longjmp,
1946 the value read is indeterminate. Some local variables of type
1947 'struct handler' and 'struct catchtag' are used in this way, so
1948 mark each of their slots as volatile if the slot can be set before
1949 _longjmp and read afterwards.
1950 * lisp.h (struct handler): var and chosen_clause are now volatile.
1951 (struct catchtag): val, next, and pdlcount are now volatile.
1952
ae1d87e2
PE
1953 * bidi.c (bidi_push_it, bidi_pop_it):
1954 * fns.c (copy_hash_table):
1955 * image.c (define_image_type):
1956 * keyboard.c (kbd_buffer_store_event_hold):
1957 * process.c (Fprocess_send_eof):
1958 * xfaces.c (x_create_gc) [HAVE_NS]:
1959 * xgselect.c (xg_select):
1960 Prefer assignment to memcpy when either will do.
1961
5779a1dc
PE
1962 * alloc.c (discard_killed_buffers): Tune and simplify a bit.
1963 Use pointer-to-a-pointer to simplify and avoid a NILP check each
1964 time an item is removed. No need to mark this function 'inline';
1965 the compiler knows better than we do.
1966
c4c9756b
JD
19672012-09-11 Jan Djärv <jan.h.d@swipnet.se>
1968
1969 * nsterm.m (ns_judge_scroll_bars): Pass NO to updateFrameSize.
1970 (updateFrameSize:): Add delay parameter to updateFrameSize, send it
1971 to change_frame_size (Bug#12388).
1972 (windowDidResize:): Pass YES to updateFrameSize.
1973
1974 * nsterm.h: Add delay parameter to updateFrameSize.
1975
d73e321c
DA
19762012-09-11 Dmitry Antipov <dmantipov@yandex.ru>
1977
1978 Discard killed buffers from deleted window and frame objects.
1979 This reduces an amount of references to killed buffers and
1980 helps GC to reclaim them faster.
1981 * alloc.c (discard_killed_buffers): New function.
1982 (mark_object): Use it for deleted windows and frames.
1983 (mark_object): If symbol's value is set up for a killed buffer
1984 or deleted frame, restore it's global binding.
1985 * data.c (swap_in_global_binding): Add GC notice.
1986 (swap_in_symval_forwarding): Use convenient set_blv_where.
1987 * window.c (wset_next_buffers, wset_prev_buffers): Move ...
1988 * window.h: ... to here.
1989
e578f381
DA
19902012-09-11 Dmitry Antipov <dmantipov@yandex.ru>
1991
1992 Convenient macro to check whether the buffer is live.
1993 * buffer.h (BUFFER_LIVE_P): New macro.
1994 * alloc.c, buffer.c, editfns.c, insdel.c, lread.c, marker.c:
1995 * minibuf.c, print.c, process.c, window.c, xdisp.c: Use it.
1996
3057e615
YM
19972012-09-11 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
1998
1999 * xdisp.c (right_overwritten, right_overwriting): Also handle gstring
2000 composition cases (Bug#12364).
2001
2002 * xterm.c (x_draw_glyph_string): Avoid overwriting inverted left
2003 overhang of succeeding glyphs overlapping box cursor.
2004
2005 * w32term.c (x_draw_glyph_string): Likewise.
2006
6fda35f2
PE
20072012-09-11 Paul Eggert <eggert@cs.ucla.edu>
2008
c990426a
PE
2009 Simplify, document, and port floating-point (Bug#12381).
2010 The porting part of this patch fixes bugs on non-IEEE platforms
2011 with frexp, ldexp, logb.
2012 * data.c, lisp.h (Qdomain_error, Qsingularity_error, Qunderflow_error):
2013 Now static.
2014 * floatfns.c: Simplify discussion of functions that Emacs doesn't
2015 support, by removing commented-out code and briefly listing the
2016 C89 functions excluded. The commented-out stuff was confusing
2017 maintenance, e.g., we thought we needed cbrt but it was commented out.
2018 (logb): Remove decl; no longer needed.
2019 (isfinite): New macro, if not already supplied.
2020 (isnan): Don't replace any existing macro.
2021 (Ffrexp, Fldexp): Define even if !HAVE_COPYSIGN, as frexp and ldexp
2022 are present on all C89 platforms.
2023 (Ffrexp): Do not special-case zero, as frexp does the right thing
2024 for that case.
2025 (Flogb): Do not use logb, as it doesn't have the desired meaning
2026 on hosts that use non-base-2 floating point. Instead, stick with
2027 frexp, which is C89 anyway. Do not pass an infinity or a NaN to
2028 frexp, to avoid getting an unspecified result.
2029
6fda35f2
PE
2030 * xdisp.c (Qinhibit_debug_on_message): Now static.
2031
16130a58
JD
20322012-09-10 Jan Djärv <jan.h.d@swipnet.se>
2033
2034 * nsterm.m (ns_update_begin): Set clip path to whole view by using
2035 NSBezierPath (Bug#12131).
2036
d105a573
CY
20372012-09-10 Chong Yidong <cyd@gnu.org>
2038
2039 * fns.c (Fdelq, Fdelete): Doc fix.
2040
ff55dfe8
PE
20412012-09-10 Paul Eggert <eggert@cs.ucla.edu>
2042
2043 * lisp.h (XSETINT, XSETCONS, XSETVECTOR, XSETSTRING, XSETSYMBOL)
2044 (XSETFLOAT, XSETMISC): Parenthesize macro bodies.
2045
e7032e7c
SM
20462012-09-09 Stefan Monnier <monnier@iro.umontreal.ca>
2047
2048 * lisp.h (make_lisp_ptr): New macro to replace XSET.
2049 (XSETCONS, XSETVECTOR, XSETSTRING, XSETSYMBOL, XSETFLOAT, XSETMISC):
2050 Use it.
2051
e9957956
EZ
20522012-09-09 Eli Zaretskii <eliz@gnu.org>
2053
aba05ce9
EZ
2054 * fringe.c (draw_fringe_bitmap_1): Don't reduce the width of the
2055 left fringe if the window has a left margin. This avoids leaving
2056 traces of the cursor because its leftmost pixel is not drawn over.
2057
e9957956
EZ
2058 * dispnew.c (update_window_line): When the left margin area of a
2059 screen line is updated, set the redraw_fringe_bitmaps_p flag of
2060 that screen line. (Bug#12277)
2061
f6196b87
PE
20622012-09-09 Paul Eggert <eggert@cs.ucla.edu>
2063
2064 Assume C89 or later for math functions (Bug#12381).
2065 This simplifies the code, and makes it a bit smaller and faster,
2066 and (most important) makes it easier to clean up signal handling
2067 since we can stop worring about floating-point exceptions in
2068 library code. That was a problem before C89, but the problem
2069 went away many years ago on all practical Emacs targets.
2070 * data.c, image.c, lread.c, print.c:
2071 Don't include <math.h>; no longer needed.
2072 * data.c, floatfns.c (IEEE_FLOATING_POINT): Don't worry that it
2073 might be autoconfigured, as that never happens.
2074 * data.c (fmod):
2075 * doprnt.c (DBL_MAX_10_EXP):
2076 * print.c (DBL_DIG):
2077 Remove. C89 or later always defines these.
2078 * floatfns.c (HAVE_MATHERR, FLOAT_CHECK_ERRNO, FLOAT_CHECK_DOMAIN)
2079 (in_float, float_error_arg, float_error_arg2, float_error_fn_name)
2080 (arith_error, domain_error, domain_error2):
2081 Remove all this pre-C89 cruft. Do not include <errno.h> as that's
2082 no longer needed -- we simply return what C returns. All uses removed.
2083 (IN_FLOAT, IN_FLOAT2): Remove. All uses replaced with
2084 the wrapped code.
2085 (FLOAT_TO_INT, FLOAT_TO_INT2, range_error, range_error2):
2086 Remove. All uses expanded, as these macros are no longer used
2087 more than once and are now more trouble than they're worth.
2088 (Ftan): Use tan, not sin / cos.
2089 (Flogb): Assume C89 frexp.
2090 (fmod_float): Assume C89 fmod.
2091 (matherr) [HAVE_MATHERR]: Remove; no longer needed.
2092 (init_floatfns): Remove. All uses removed.
2093
9d7f1863
JD
20942012-09-08 Jan Djärv <jan.h.d@swipnet.se>
2095
2096 * nsterm.m (ns_draw_fringe_bitmap, ns_dumpglyphs_image): Take back
2097 compositeToPoint for OSX < 10.6 (Bug#12390).
2098
eabf0404
PE
20992012-09-08 Paul Eggert <eggert@cs.ucla.edu>
2100
2101 * floatfns.c (Ftan): Use tan (x), not (sin (x) / cos (x)).
2102 This produces more-accurate results.
2103
0b3b1d23
JD
21042012-09-08 Jan Djärv <jan.h.d@swipnet.se>
2105
2106 * nsterm.m (updateFrameSize): Call setFrame: on the view when size
2107 changes (Bug#12088).
2108
6dcef6ec
CY
21092012-09-08 Chong Yidong <cyd@gnu.org>
2110
2111 * syntax.c (Fstring_to_syntax): Doc fix.
2112
aa7d57c5
JD
21132012-09-08 Jan Djärv <jan.h.d@swipnet.se>
2114
2115 * nsterm.m (ns_clip_to_row): Remove code that deals with drawing fringe
2116 in the internal border.
2117 (x_set_window_size): Remove static variables and their usage.
2118 (ns_redraw_scroll_bars): Fix NSTRACE arg.
3a880af4
SM
2119 (ns_after_update_window_line, ns_draw_fringe_bitmap):
2120 Remove fringe/internal border adjustment (Bug#11052).
aa7d57c5
JD
2121 (ns_draw_fringe_bitmap): Make code more like other terms (xterm.c).
2122 (ns_draw_window_cursor): Remove fringe/internal border adjustment.
2123 (ns_fix_rect_ibw): Remove.
2124 (ns_get_glyph_string_clip_rect): Remove call to ns_fix_rect_ibw.
2125 (ns_dumpglyphs_box_or_relief): Ditto.
2126 (ns_maybe_dumpglyphs_background): Remove fringe/internal border
2127 adjustment.
2128 (ns_dumpglyphs_image): Ditto.
fc0c31f8 2129 (ns_dumpglyphs_stretch): Fix coding style. Remove fringe/internal
aa7d57c5
JD
2130 border adjustment.
2131 (ns_set_vertical_scroll_bar): Remove variables barOnVeryLeft/Right and
2132 their usage. Add fringe_extended_p and its use as in other terms.
2133 (ns_judge_scroll_bars): Code style fix. Call updateFrameSize if
2134 scroll bar was removed.
2135 (updateFrameSize): New function.
2136 (windowDidResize): Move code to updateFrameSize and call it.
2137
2138 * nsterm.h (EmacsView): Add updateFrameSize.
2139
1a5432bc
CY
21402012-09-07 Chong Yidong <cyd@gnu.org>
2141
b4f5313e
CY
2142 * textprop.c (Fget_text_property): Minor doc fix (Bug#12323).
2143
1a5432bc
CY
2144 * data.c (Flocal_variable_if_set_p): Doc fix (Bug#10713).
2145
1a4f1e9b
PE
21462012-09-07 Paul Eggert <eggert@cs.ucla.edu>
2147
2148 More signal-handler cleanup (Bug#12327).
eddb36a7
PE
2149 * emacs.c (main): Convert three 'signal' calls to 'sigaction' calls.
2150 Problem introduced when merging patches. Noted by Eli Zaretskii in
2151 <http://bugs.gnu.org/12327#67>.
1a4f1e9b
PE
2152 * floatfns.c: Comment fix.
2153 * lisp.h (force_auto_save_soon): Declare regardless of SIGDANGER.
2154 SIGDANGER might not be in scope so "#ifdef SIGDANGER" is not right,
2155 and anyway the declaration is harmless even if SIGDANGER is not defined.
2156 * syssignal.h (SIGIO): Also #undef if (! defined FIONREAD ||
2157 defined BROKEN_FIONREAD). systty.h formerly did this, but other
2158 source files not surprisingly expected syssignal.h to define, or
2159 not define, SIGIO, and it's cleaner to do it that way, for consistency.
2160 Include <sys/ioctl.h>, for FIONREAD.
2161 * systty.h (SIGIO): Do not #undef here; it's now syssignal.h's job.
2162 This eliminates a problem whereby other files mysteriously had
2163 to include "syssignal.h" before including "systty.h" if they
2164 wanted to use "#ifdef SIGIO".
2165
bc8000ff
EZ
21662012-09-07 Eli Zaretskii <eliz@gnu.org>
2167
3e6d6928
EZ
2168 * w32proc.c (sigaction): New function, emulates Posix 'sigaction'.
2169
2170 * w32.c (sigemptyset): Empty the set.
2171 (sigsetmask, sigmask, sigblock, sigunblock): Remove unused functions.
2172
bc8000ff
EZ
2173 * alloc.c [ENABLE_CHECKING]: Include signal.h, since we need SIGABRT.
2174
b4fa72f2
DA
21752012-09-07 Dmitry Antipov <dmantipov@yandex.ru>
2176
2177 * alloc.c (mark_buffer): Revert unsafe marking optimization.
2178 (mark_object): Likewise for frame objects.
2179
30730c93
PE
21802012-09-07 Paul Eggert <eggert@cs.ucla.edu>
2181
2182 * syssignal.h (handle_on_main_thread): Always declare,
2183 even if FORWARD_SIGNAL_TO_MAIN_THREAD is not defined.
2184 This ports to platforms without HAVE_PTHREAD.
2185
2fe28299
PE
21862012-09-06 Paul Eggert <eggert@cs.ucla.edu>
2187
2188 Signal-handler cleanup (Bug#12327).
2189 Emacs's signal handlers were written in the old 4.2BSD style with
2190 sigblock and sigmask and so forth, and this led to some
2191 inefficiencies and confusion. Rewrite these to use
2192 pthread_sigmask etc. without copying signal sets around. Also,
2193 get rid of the confusing macros 'SIGNAL_THREAD_CHECK' and
2194 'signal', and instead use functions that do not attempt to take
2195 over the system name space. This patch causes Emacs's text
2196 segment to shrink by 0.7% on my platform, Fedora 17 x86-64.
2197 * alloc.c, emacsgtkfixed.c, nsfns.m, widget.c, xmenu.c:
2198 Do not include <signal.h> or "syssignal.h", as these
2199 modules do not use signals.
2200 * atimer.c, callproc.c, data.c, dispnew.c, emacs.c, floatfns.c:
2201 * gtkutil.c, keyboard.c, process.c, sound.c, sysdep.c, term.c, xterm.c:
2202 Do not include <signal.h>, as "syssignal.h" does that for us now.
2203 * atimer.c (sigmask_atimers): New function.
2204 (block_atimers, unblock_atimers): New functions,
2205 replacing the old macros BLOCK_ATIMERS and UNBLOCK_ATIMERS.
2206 All uses replaced.
2207 * conf_post.h [SIGNAL_H_AHB]: Do not include <signal.h>;
2208 no longer needed here.
2209 * emacs.c (main): Inspect existing signal handler with sigaction,
fc0c31f8 2210 so that there's no need to block and unblock SIGHUP.
2fe28299
PE
2211 * sysdep.c (struct save_signal): New member 'action', replacing
2212 old member 'handler'.
2213 (save_signal_handlers, restore_signal_handlers):
2214 Use sigaction instead of 'signal' to save and restore.
2215 (get_set_sighandler, set_sighandler) [!WINDOWSNT]:
2216 New function. All users of 'signal' modified to use set_sighandler
2217 if they're writeonly, and to use sys_signal if they're read+write.
2218 (emacs_sigaction_init, forwarded_signal): New functions.
2219 (sys_signal): Remove. All uses replaced by calls to sigaction
2220 and emacs_sigaction_init, or by direct calls to 'signal'.
2221 (sys_sigmask) [!__GNUC__]: Remove; no longer needed.
2222 (sys_sigblock, sys_sigunblock, sys_sigsetmask): Remove;
2223 all uses replaced by pthread_sigmask etc. calls.
2224 * syssignal.h: Include <signal.h>.
2225 (emacs_sigaction_init, forwarded_signal): New decls.
2226 (SIGMASKTYPE): Remove. All uses replaced by its definiens, sigset_t.
2227 (SIGEMPTYMASK): Remove; all uses replaced by its definiens, empty_mask.
2228 (sigmask, sys_sigmask): Remove; no longer needed.
2229 (sigpause): Remove. All uses replaced by its definiens, sigsuspend.
2230 (sigblock, sigunblock, sigfree):
2231 (sigsetmask) [!defined sigsetmask]:
2232 Remove. All uses replaced by pthread_sigmask.
2233 (signal): Remove. Its remaining uses (with SIG_DFL and SIG_IGN)
2234 no longer need to be replaced, and its typical old uses
2235 are now done via emacs_sigaction_init and sigaction.
2236 (sys_sigblock, sys_sigunblock, sys_sigsetmask): Remove decls.
2237 (sys_sigdel): Remove; unused.
2238 (NSIG): Remove a FIXME; the code's fine. Remove an unnecessary ifdef.
2239
0216c128
EZ
22402012-09-06 Eli Zaretskii <eliz@gnu.org>
2241
2242 * process.c (CAN_HANDLE_MULTIPLE_CHILDREN): Fix a typo that broke
2243 SIGCHLD handling on systems that don't have WNOHANG. (Bug#12327)
2244
c752cfa9
DA
22452012-09-06 Dmitry Antipov <dmantipov@yandex.ru>
2246
2247 Explicitly mark buffer_defaults and buffer_local_symbols.
2248 * alloc.c (Fgarbage_collect): Mark buffer_defaults and
2249 mark_local_symbols here.
2250 (mark_object): If GC_CHECK_MARKED_OBJECTS, simplify checking
2251 since special buffers aren't marked here any more.
2252 (allocate_buffer): Chain new buffer with all_buffers here...
2253 * buffer.c (Fget_buffer_create, Fmake_indirect_buffer): ...and
2254 not here.
2255 (Vbuffer_defaults, Vbuffer_local_symbols): Remove.
2256 (syms_of_buffer): Remove staticpro of the above.
2257 (init_buffer_once): Set names for buffer_defaults and
2258 buffer_local_symbols.
2259
a864ef14
PE
22602012-09-06 Paul Eggert <eggert@cs.ucla.edu>
2261
2262 Use bool for booleans in font-related modules.
2263 * font.c (font_intern_prop, font_style_to_value)
2264 (font_style_symbolic, font_parse_xlfd, font_parse_fcname)
2265 (generate_otf_features, font_check_otf_features, font_check_otf)
2266 (font_match_p, font_list_entities, font_at):
2267 * fontset.c (fontset_id_valid_p, reorder_font_vector
2268 (fontset_find_font, Fset_fontset_font)
2269 (face_suitable_for_char_p) [0]:
2270 * ftfont.c (fc_initialized, ftfont_get_open_type_spec)
2271 (ftfont_open, ftfont_text_extents, ftfont_check_otf):
2272 (m17n_flt_initialized, ftfont_shape_by_flt):
2273 * ftxfont.c (ftxfont_draw_bitmap, ftxfont_draw):
2274 * nsfont.m (nsfont_draw):
2275 * w32font.c (w32font_draw):
2276 * w32term.c (x_draw_glyphless_glyph_string_foreground):
2277 Use bool for booleans.
2278 * font.h: Adjust to above API changes.
2279 (struct font, struct font_driver, struct font_driver_list):
2280 Use bool for booleans.
2281 (struct font): Remove useless member encoding_type.
2282 All users removed.
2283 * fontset.c, xftfont.c: Omit unnecessary static decls.
2284
0699fc18
DA
22852012-09-06 Dmitry Antipov <dmantipov@yandex.ru>
2286
2287 * alloc.c (mark_object): Revert window marking code
2288 since it's unsafe for the Fset_window_configuration.
2289
20ef56db
PE
22902012-09-05 Paul Eggert <eggert@cs.ucla.edu>
2291
2fe28299 2292 Fix race conditions with signal handlers and errno (Bug#12327).
20ef56db
PE
2293 Be more systematic about preserving errno whenever a signal
2294 handler returns, even if it's not in the main thread. Do this by
2295 renaming signal handlers to distinguish between signal delivery
2296 and signal handling. All uses changed.
2297 * atimer.c (deliver_alarm_signal): Rename from alarm_signal_handler.
2298 * data.c (deliver_arith_signal): Rename from arith_error.
2299 * dispnew.c (deliver_window_change_signal): Rename from
2300 window_change_signal.
2301 * emacs.c (deliver_error_signal): Rename from fatal_error_signal.
2302 (deliver_danger_signal) [SIGDANGER]: Rename from memory_warning_signal.
2303 * keyboard.c (deliver_input_available_signal): Rename from
2304 input_available_signal.
2305 (deliver_user_signal): Rename from handle_user_signal.
2306 (deliver_interrupt_signal): Rename from interrupt_signal.
2307 * process.c (deliver_pipe_signal): Rename from send_process_trap.
2308 (deliver_child_signal): Rename from sigchld_handler.
2309 * atimer.c (handle_alarm_signal):
2310 * data.c (handle_arith_signal):
2311 * dispnew.c (handle_window_change_signal):
2312 * emacs.c (handle_fatal_signal, handle_danger_signal):
2313 * keyboard.c (handle_input_available_signal):
2314 * keyboard.c (handle_user_signal, handle_interrupt_signal):
2315 * process.c (handle_pipe_signal, handle_child_signal):
2316 New functions, with the actual signal-handling code taken from the
2317 original respective signal handlers, sans the sporadic attempts to
2318 preserve errno, since that's now done by handle_on_main_thread.
2319 * atimer.c (alarm_signal_handler): Remove unnecessary decl.
2320 * emacs.c, floatfns.c, lisp.h: Remove unused FLOAT_CATCH_SIGKILL cruft.
2321 * emacs.c (main_thread) [FORWARD_SIGNAL_TO_MAIN_THREAD]:
2322 Move to sysdep.c.
2323 (main) [FORWARD_SIGNAL_TO_MAIN_THREAD]:
2324 Move initialization of main_thread to sysdep.c's init_signals.
2325 * process.c (waitpid) [!WNOHANG]: #define to wait; that's good enough for
2326 our usage, and simplifies the mainline code.
2327 (record_child_status_change): New static function, as a helper
2328 for handle_child_signal, and with most of the old child handler's
2329 contents.
2330 (CAN_HANDLE_MULTIPLE_CHILDREN): New constant.
2331 (handle_child_signal): Use the above.
2332 * sysdep.c (main_thread) [FORWARD_SIGNAL_TO_MAIN_THREAD]:
2333 Moved here from emacs.c.
2334 (init_signals) [FORWARD_SIGNAL_TO_MAIN_THREAD]: Initialize it;
2335 code moved here from emacs.c's main function.
2336 * sysdep.c, syssignal.h (handle_on_main_thread): New function,
3a880af4
SM
2337 replacing the old SIGNAL_THREAD_CHECK. All uses changed.
2338 This lets callers save and restore errno properly.
20ef56db 2339
e3ccf108
DA
23402012-09-05 Dmitry Antipov <dmantipov@yandex.ru>
2341
2342 Remove redundant or unused things here and there.
2343 * lisp.h (CYCLE_CHECK, CHAR_TABLE_TRANSLATE): Remove.
2344 * conf_post.h (RE_TRANSLATE): Use char_table_translate.
2345 * editfns.c (Fcompare_buffer_substrings): Likewise.
2346 * frame.h (struct terminal, struct font_driver_list):
2347 Remove redundant declarations.
2348 * window.h (Qleft, Qright): Likewise.
2349
697e1e39
DA
23502012-09-05 Dmitry Antipov <dmantipov@yandex.ru>
2351
2352 Do not mark objects from deleted buffers, windows and frames.
2353 * alloc.c (mark_buffer): Mark just the buffer if it is dead.
2354 (mark_object): Likewise for windows and frames.
2355
c1ca42ca
DA
23562012-09-05 Dmitry Antipov <dmantipov@yandex.ru>
2357
2358 * alloc.c (valid_lisp_object_p): Treat killed buffers,
2359 buffer_defaults and buffer_local_symbols as valid objects.
2360 Return special value to denote them.
2361
014d93be
PE
23622012-09-05 Paul Eggert <eggert@cs.ucla.edu>
2363
f75d7a91
PE
2364 * fileio.c, filelock.c, floatfns.c, fns.c: Use bool for boolean.
2365 * fileio.c (auto_saving, auto_save_error_occurred, make_temp_name)
2366 (Fexpand_file_name, barf_or_query_if_file_exists, Fcopy_file)
2367 (file_name_absolute_p, Fsubstitute_in_file_name):
2368 (check_executable, check_writable, Ffile_accessible_directory_p)
2369 (Fset_file_selinux_context, Fdefault_file_modes)
2370 (Finsert_file_contents, choose_write_coding_system)
2371 (Fwrite_region, build_annotations, a_write, e_write)
2372 (Fdo_auto_save):
2373 * filelock.c (boot_time_initialized, get_boot_time)
2374 (get_boot_time_1, lock_file_1, within_one_second):
2375 * floatfns.c (in_float):
2376 * fns.c (concat, internal_equal, Frequire, base64_encode_1)
2377 (base64_decode_1, cmpfn_eql, cmpfn_user_defined)
2378 (sweep_weak_table, sweep_weak_hash_tables, secure_hash):
2379 * lisp.h (struct Lisp_Hash_Table.cmpfn):
2380 * window.c (compare_window_configurations):
2381 Use bool for booleans.
2382 * fileio.c (auto_saving_dir_umask, auto_saving_mode_bits)
2383 (Fdefault_file_modes): Now mode_t, not int, for modes.
2384 (Fdo_auto_save): Set a boolean to 1 rather than using ++.
2385 (internal_delete_file): Now returns void, not a (boolean) int,
2386 since nobody was looking at the return value.
2387 * lisp.h, window.h: Adjust to above API changes.
2388
014d93be
PE
2389 * xdisp.c (set_message): Simplify and reindent last change.
2390
776f29e1
JB
23912012-09-05 Juanma Barranquero <lekktu@gmail.com>
2392
2393 * makefile.w32-in ($(BLD)/sysdep.$(O)): Update dependencies.
2394
7f7e0167
LI
23952012-09-04 Lars Ingebrigtsen <larsi@gnus.org>
2396
2397 * eval.c (call_debugger): Make the function non-static so that we
2398 can call it from set_message.
2399
2400 * xdisp.c (set_message): Implement the new variable `debug-on-message'.
2401 (syms_of_xdisp): Defvar it and `inhibit-debug-on-message'.
2402
cf29dd84
PE
24032012-09-04 Paul Eggert <eggert@cs.ucla.edu>
2404
2405 Give more-useful info on a fatal error (Bug#12328).
2406 * alloc.c [ENABLE_CHECKING]: Do not include <execinfo.h>.
2407 (die) [ENABLE_CHECKING]: Call fatal_error_backtrace instead
2408 of doing the work ourselves.
2409 * emacs.c (fatal_error_signal): Let fatal_error_backtrace
2410 do most of the work.
2411 (fatal_error_backtrace): New function, taken from the guts
2412 of the old fatal_error_signal, but with a new option to output
2413 a backtrace.
2414 (shut_down_emacs) [!DOS_NT]: Use strsignal to give more-useful
2415 info about the signal than just its number.
2416 * lisp.h (fatal_error_backtrace, emacs_backtrace): New decls.
2417 * sysdep.c: Include <execinfo.h>
2418 (emacs_backtrace): New function, taken partly from the previous
2419 code of the 'die' function.
2420 (emacs_abort): Call fatal_error_backtrace rather than abort.
2421
972debf2
SM
24222012-09-04 Stefan Monnier <monnier@iro.umontreal.ca>
2423
2424 * lread.c (readevalloop): Call internal-macroexpand-for-load to perform
2425 eager (load-time) macro-expansion.
2426 * lisp.mk (lisp): Add macroexp.
2427
1088b922
PE
24282012-09-04 Paul Eggert <eggert@cs.ucla.edu>
2429
2430 Simplify redefinition of 'abort' (Bug#12316).
2431 Do not try to redefine the 'abort' function. Instead, redo
2432 the code so that it calls 'emacs_abort' rather than 'abort'.
2433 This removes the need for the NO_ABORT configure-time macro
2434 and makes it easier to change the abort code to do a backtrace.
2435 * .gdbinit: Just stop at emacs_abort, not at w32_abort or abort.
2436 * emacs.c (abort) [!DOS_NT && !NO_ABORT]:
2437 Remove; sysdep.c's emacs_abort now takes its place.
2438 * lisp.h (emacs_abort): New decl. All calls from Emacs code to
2439 'abort' changed to use 'emacs_abort'.
2440 * msdos.c (dos_abort) [defined abort]: Remove; not used.
2441 (abort) [!defined abort]: Rename to ...
2442 (emacs_abort): ... new name.
2443 * sysdep.c (emacs_abort) [!HAVE_NTGUI]: New function, taking
2444 the place of the old 'abort' in emacs.c.
2445 * w32.c, w32fns.c (abort): Do not #undef.
2446 * w32.c (emacs_abort): Rename from w32_abort.
2447
30934d33
EZ
24482012-09-04 Eli Zaretskii <eliz@gnu.org>
2449
2450 * w32uniscribe.c (uniscribe_shape): Reverse the sign of
2451 offsets[j].dv, since the y axis of the screen coordinates points
2452 down, while the y axis of the font definition coordinates points
2453 up. This fixes display of Arabic diacritics such as KASRA and
2454 KASRATAN. (Bug#11860)
2455
af26b72c
PE
24562012-09-04 Paul Eggert <eggert@cs.ucla.edu>
2457
2458 Be more systematic about _setjmp vs setjmp.
2459 * alloc.c (test_setjmp, mark_stack):
2460 * image.c (PNG_LONGJMP) [PNG_LIBPNG_VER < 10500]:
2461 (PNG_JMPBUF) [! (PNG_LIBPNG_VER < 10500)]:
2462 (png_load, my_error_exit, jpeg_load):
2463 * process.c (send_process_trap, send_process):
2464 Uniformly prefer _setjmp and _longjmp to setjmp and longjmp.
2465 The underscored versions are up to 30x faster on some hosts.
2466 Formerly, the code used setjmp+longjmp sometimes and
2467 _setjmp+_longjmp at other times, with no particular reason to
2468 prefer setjmp+longjmp.
2469
26d4541d
PE
24702012-09-03 Paul Eggert <eggert@cs.ucla.edu>
2471
d42f4f0f 2472 Fix minor problem found by static checking.
26d4541d 2473 * buffer.c (Fdelete_all_overlays): Return nil.
26d4541d 2474
c5e28e39
MR
24752012-09-03 Martin Rudalics <rudalics@gmx.at>
2476
2477 * buffer.c (Fdelete_all_overlays): New function.
2478
3eab3ca9
CY
24792012-09-03 Chong Yidong <cyd@gnu.org>
2480
2481 * gtkutil.c: Add extern decl for Qxft.
2482
c04889f8
PE
24832012-09-02 Paul Eggert <eggert@cs.ucla.edu>
2484
1882aa38
PE
2485 * emacs.c, eval.c: Use bool for boolean.
2486 * emacs.c (initialized, inhibit_window_system, running_asynch_code):
2487 (malloc_using_checking) [DOUG_LEA_MALLOC]:
2488 (display_arg) [HAVE_X_WINDOWS || HAVE_NS]:
2489 (noninteractive, no_site_lisp, fatal_error_in_progress, argmatch)
2490 (main, decode_env_path, Fdaemon_initialized):
2491 * eval.c (call_debugger, Finteractive_p, interactive_p):
2492 (unwind_to_catch, Fsignal, wants_debugger, skip_debugger)
2493 (maybe_call_debugger, Fbacktrace):
2494 * process.c (read_process_output, exec_sentinel):
2495 Use bool for booleans.
2496 * emacs.c (shut_down_emacs): Omit unused boolean argument NO_X.
2497 All callers changed.
2498 * eval.c (interactive_p): Omit always-true boolean argument
2499 EXCLUDE_SUBRS_P. All callers changed.
2500 * dispextern.h, lisp.h: Reflect above API changes.
2501 * firstfile.c (dummy): Use the address of 'main', whose signature
2502 won't change, instead of the address of 'initialize', whose
2503 signature just changed from int to bool.
2504 * lisp.h (fatal_error_in_progress): New decl of boolean, moved here ...
2505 * msdos.c (fatal_error_in_progress): ... from here.
2506 * xdisp.c (redisplaying_p): Now a boolean. Set it to 1 instead
2507 of incrementing it.
2508 (redisplay_internal, unwind_redisplay): Simply clear
2509 REDISPLAYING_P when unwinding, instead of saving its previous,
2510 always-false value and then restoring it.
2511
a411ac43
PE
2512 Clean up some extern decls.
2513 Mostly, this hoists extern decls out of .c files and into .h files.
2514 That way, we're more likely to catch errors if the interfaces change.
2515 * alloc.c [USE_GTK]: Include "gtkutil.h" so that we need not
2516 declare xg_mark_data.
2517 * dispextern.h (x_frame_parm_handlers):
2518 * font.h (Qxft):
2519 * lisp.h (Qlexical_binding, Qinternal_interpreter_environment)
2520 (Qextra_light, Qlight, Qsemi_light, Qsemi_bold, Qbold, Qextra_bold)
2521 (Qultra_bold, Qoblique, Qitalic):
2522 Move extern decl here from .c file.
2523 * alloc.c (xg_mark_data) [USE_GTK]:
2524 * doc.c (Qclosure):
2525 * eval.c (Qlexical_binding):
2526 * fns.c (time) [!HAVE_UNISTD_H]:
2527 * gtkutil.c (Qxft, Qnormal, Qextra_light, Qlight, Qsemi_light)
2528 (Qsemi_bold, Qbold, Qextra_bold, Qultra_bold, Qoblique, Qitalic):
2529 * image.c (Vlibrary_cache, QCloaded_from) [HAVE_NTGUI]:
2530 * lread.c (Qinternal_interpreter_environment):
2531 * minibuf.c (Qbuffer):
2532 * process.c (QCfamily, QCfilter):
2533 * widget.c (free_frame_faces):
2534 * xfaces.c (free_frame_menubar) [USE_X_TOOLKIT]:
2535 * xfont.c (x_clear_errors):
2536 * xterm.c (x_frame_parm_handlers):
2537 Remove now-redundant extern decls.
2538 * keyboard.c, keyboard.h (ignore_mouse_drag_p) [USE_GTK || HAVE_NS]:
2539 * xfaces.c (Qultra_light, Qreverse_oblique, Qreverse_italic):
2540 Now static.
2541 * xfaces.c: Remove unnecessary static decls.
2542 * xterm.c (updating_frame): Remove decl of nonexistent object.
2543
c04889f8
PE
2544 * Makefile.in (gl-stamp): Don't scan $(SOME_MACHINE_OBJECTS)
2545 when building globals.h, as the objects that are not built on
2546 this host are not needed to compile C files on this host.
2547
8b339673
JD
25482012-09-02 Jan Djärv <jan.h.d@swipnet.se>
2549
2550 * gtkutil.h: Remove prototype for x_wm_set_size_hint.
2551
2552 * frame.h: Add missing prototype for x_wm_set_size_hint.
2553
a08d4ba7
PE
25542012-09-02 Paul Eggert <eggert@cs.ucla.edu>
2555
2556 * doc.c, editfns.c, insdel.c, intervals.c: Use bool for boolean.
2557 * doc.c (read_bytecode_char, get_doc_string, reread_doc_file)
2558 (Fdocumentation, Fdocumentation_property, Fsnarf_documentation)
2559 (Fsubstitute_command_keys):
2560 * editfns.c (region_limit, find_field, Fconstrain_to_field)
2561 (save_excursion_save, save_excursion_restore)
2562 (disassemble_lisp_time, decode_time_components, emacs_nmemftime)
2563 (format_time_string, general_insert_function)
2564 (make_buffer_string, make_buffer_string_both)
2565 (Fsubst_char_in_region, Ftranslate_region_internal, Fformat):
2566 * insdel.c (check_markers, gap_left, adjust_markers_for_insert)
2567 (copy_text, insert_1, insert_1_both, insert_from_string)
2568 (insert_from_string_before_markers, insert_from_string_1)
2569 (insert_from_buffer, insert_from_buffer_1, replace_range)
2570 (replace_range_2, del_range_1, del_range_byte, del_range_both)
2571 (del_range_2, modify_region):
2572 * intervals.c (intervals_equal, balance_possible_root_interval)
2573 (adjust_intervals_for_insertion, merge_properties_sticky)
2574 (graft_intervals_into_buffer, lookup_char_property)
2575 (adjust_for_invis_intang, set_point_both)
2576 (get_property_and_range, compare_string_intervals)
2577 (set_intervals_multibyte_1, set_intervals_multibyte):
2578 * keyboard.c (decode_timer):
2579 Use bool for boolean.
2580 * intervals.h, lisp.h, systime.h: Reflect above API changes.
2581 * editfns.c (struct info): Use 1-bit unsigned bitfields for booleans.
2582
48c948de
CY
25832012-09-02 Chong Yidong <cyd@gnu.org>
2584
2585 * keymap.c (push_key_description): Print M-TAB as C-M-i
2586 (Bug#11758).
2587
6c49a40b
JB
25882012-09-02 Juanma Barranquero <lekktu@gmail.com>
2589
2590 * makefile.w32-in (CCL_H, W32FONT_H): New macros.
2591 (ATIMER_H, FONT_H, $(BLD)/alloc.$(O), $(BLD)/callproc.$(O))
2592 ($(BLD)/editfns.$(O), $(BLD)/ccl.$(O), $(BLD)/chartab.$(O))
2593 ($(BLD)/coding.$(O), $(BLD)/sysdep.$(O), $(BLD)/fontset.$(O))
2594 ($(BLD)/sysdep.$(O), $(BLD)/w32fns.$(O), $(BLD)/keyboard.$(O))
2595 ($(BLD)/w32term.$(O), $(BLD)/w32menu.$(O), $(BLD)/process.$(O))
2596 ($(BLD)/w32font.$(O), $(BLD)/w32uniscribe.$(O)): Update dependencies.
2597
4dfbd238
EZ
25982012-09-01 Eli Zaretskii <eliz@gnu.org>
2599
7e510e28
EZ
2600 * w32uniscribe.c (uniscribe_shape): Handle correctly the case of
2601 more than one grapheme cluster passed to the shaper: compute the
2602 offset adjustment values separately for each cluster. (Bug#11860)
2603
4dfbd238
EZ
2604 * image.c: Restore mistakenly removed inclusion of w32.h. Without
2605 it, GCC doesn't see prototypes of w32_delayed_load, and complains
2606 about implicit conversions from integer to pointer.
2607
86571ae0
DC
26082012-09-01 Daniel Colascione <dancol@dancol.org>
2609
2610 * w32fns.c (x_display_info_for_name): Prevent crash if w32 window
2611 system used too early.
2612
0e23ef9d
PE
26132012-09-01 Paul Eggert <eggert@cs.ucla.edu>
2614
2615 Better seed support for (random).
2616 * emacs.c (main): Call init_random.
2617 * fns.c (Frandom): Set the seed from a string argument, if given.
2618 Remove long-obsolete Gentzel cruft.
2619 * lisp.h, sysdep.c (seed_random): Now takes address and size, not long.
2620 (init_random): New function.
2621
17a2cbbd
DC
26222012-09-01 Daniel Colascione <dancol@dancol.org>
2623
2624 * xterm.h: Add header guards. Declare x_menubar_window_to_frame.
2625 Remove x_set_frame_alpha, x_bitmap_icon, x_make_frame_visible,
2626 x_make_frame_invisible, x_iconify_frame, x_free_frame_resources,
2627 x_wm_set_size_hint, x_query_colors, x_real_positions,
2628 x_set_menu_bar_lines, x_char_width, x_char_height, x_sync,
2629 x_set_tool_bar_lines, x_activate_menubar, and free_frame_menubar,
2630 all of which have been moved to common code.
2631
2632 * xfaces.c: Include TERM_HEADER instead of listing all possible
2633 window-system headers.
2634
2635 * w32xfns.c (x_sync): Correct definition of x_sync (a no-op here)
2636 to match header.
2637
2638 * w32term.h (FRAME_X_WINDOW): Use FRAME_W32_WINDOW instead of
2639 directly accessing frame internals.
2640
f18cbb28 2641 * w32font.h: Include font.h. Define syms_of_w32font and
17a2cbbd
DC
2642 globals_of_w32font.
2643
2644 * process.c: Include TERM_HEADER instead of listing all possible
2645 window-system headers.
2646
3a880af4
SM
2647 * nsterm.h: Remove declarations now in frame.h.
2648 Define FRAME_X_SCREEN, FRAME_X_VISUAL.
17a2cbbd
DC
2649
2650 * menu.c: Include TERM_HEADER instead of listing all possible
2651 window-system headers.
2652
2653 * keyboard.h: Declare ignore_mouse_drag_p whenever we have a
2654 window system.
2655
2656 * keyboard.c: Include TERM_HEADER instead of listing all possible
2657 window-system headers.
2658
2659 * image.c: Include TERM_HEADER instead of listing all possible
2660 window-system headers. Declare Vlibrary_cache when compiling for
2661 Windows.
2662
2663 * gtkutil.h (xg_list_node_): Include xterm.h to pick up needed
2664 window system declarations.
2665
2666 * frame.h: Move common functions here: set_frame_menubar,
2667 x_set_window_size, x_sync, x_get_focus_frame,
2668 x_set_mouse_position, x_set_mouse_pixel_position,
2669 x_make_frame_visible, x_make_frame_invisible, x_iconify_frame,
2670 x_char_width, x_char_height, x_pixel_width, x_pixel_height,
2671 x_set_frame_alpha, x_set_menu_bar_lines, x_set_tool_bar_lines,
2672 x_activate_menubar, x_real_positions, x_bitmap_icon,
2673 x_set_menu_bar_lines, free_frame_menubar, x_free_frame_resources,
2674 and x_query_colors.
2675
2676 * frame.c: Include TERM_HEADER instead of listing all possible
2677 window-system headers.
2678
2679 * font.c: Include TERM_HEADER instead of listing all possible
2680 window-system headers.
2681
2682 * emacs.c: Include TERM_HEADER.
2683
f18cbb28
EZ
2684 * dispnew.c: Include TERM_HEADER instead of listing all possible
2685 window-system headers.
17a2cbbd 2686
f18cbb28 2687 * ccl.h: Include character.h.
17a2cbbd
DC
2688
2689 * Makefile.in: Define WINDOW_SYSTEM_OBJ to hold objects needed for
2690 the current window system; include in list of objects to link into
2691 Emacs.
2692
c650a5de
DA
26932012-08-31 Dmitry Antipov <dmantipov@yandex.ru>
2694
2695 Remove mark_ttys function and fix tty_display_info initialization.
2696 * lisp.h (mark_ttys): Remove prototype.
2697 * alloc.c (Fgarbage_collect): Remove redundant (and the only) call
2698 to mark_ttys because all possible values of 'top_frame' slot are
2699 the frames which are reachable from Vframe_list.
2700 * term.c (mark_ttys): Remove.
2701 (init_tty): Safely initialize 'top_frame' slot with Qnil.
2702
4e0f6479
DA
27032012-08-31 Dmitry Antipov <dmantipov@yandex.ru>
2704
2705 Change struct frame bitfields from unsigned char to unsigned.
2706 * frame.h (struct frame): Change type of 'display_preempted',
2707 'visible', 'iconified', 'has_minibuffer', 'wants_modeline',
2708 'auto_raise', 'auto_lower', 'no_split', 'explicit_name',
2709 'window_sizes_changed', 'mouse_moved' and 'pointer_invisible'
2710 bitfields from unsigned char to unsigned.
2711
8b96a52c
DA
27122012-08-31 Dmitry Antipov <dmantipov@yandex.ru>
2713
2714 Remove unused member of struct x_output and struct w32_output.
2715 * xterm.h (struct x_output): Remove unused field 'needs_exposure'.
2716 * w32term.h (struct w32_output): Likewise.
2717
b4444c8a
JD
27182012-08-30 Jan Djärv <jan.h.d@swipnet.se>
2719
2720 * gtkutil.c (x_wm_set_size_hint): Use 1 col for base_width so it
2721 does not become zero (Bug#12234).
2722
b98521db
PE
27232012-08-30 Paul Eggert <eggert@cs.ucla.edu>
2724
2725 * dispnew.c (update_frame_1): Pacify gcc -Wstrict-overflow
2726 for GCC 4.7.1 x86-64.
2727
31d02438
GM
27282012-08-30 Glenn Morris <rgm@gnu.org>
2729
2730 * lread.c (init_lread): For out-of-tree builds, only add the
2731 source directory's site-lisp dir to the load-path if it exists,
2732 consistent with in-tree builds. (Bug#12302)
2733
7f8941d8
JD
27342012-08-28 Jan Djärv <jan.h.d@swipnet.se>
2735
2736 * nsmenu.m (initWithContentRect:styleMask:backing:defer:): Initialize
fc0c31f8 2737 button_values to NULL. Call setStykeMask so dialogs get a close button.
7f8941d8
JD
2738 (windowShouldClose:): Set window_closed.
2739 (dealloc): New member, free button_values.
fc0c31f8
JB
2740 (process_dialog:): Make member function. Remove window argument,
2741 replace window with self. Count buttons and allocate and store values
7f8941d8
JD
2742 in button_values.
2743 (addButton:value:row:): value is int with the name tag. Call setTag
fc0c31f8 2744 with tag. Remove return self, declare return value as void.
7f8941d8
JD
2745 (addString:row:): Remove return self, declare return value as void.
2746 (addSplit): Remove return self, declare return value as void.
2747 (clicked:): Remove return self, declare return value as void.
fc0c31f8 2748 Set dialog_return to button_values[seltag]. Code formatting change.
7f8941d8
JD
2749 (initFromContents:isQuestion:): Adjust call to process_dialog.
2750 Code formatting change.
2751 (timeout_handler:): Set timer_fired to YES.
2752 (runDialogAt:): Set timer_fired to NO.
2753 Handle click on close button as quit.
2754
2755 * nsterm.h (EmacsDialogPanel): Make timer_fired BOOL.
2756 Add window_closed and button_values. Add void as return value for
2757 add(Button|String|Split). addButton takes int instead of Lisp_Object.
2758 Add process_dialog as new member.
2759
eada0861 27602012-08-28 Eli Zaretskii <eliz@gnu.org>
19c17fc1 2761
eada0861
GM
2762 * ralloc.c (free_bloc): Don't dereference a 'heap' structure if it
2763 is not one of the heaps we manage. (Bug#12242)
2764
27652012-08-28 Glenn Morris <rgm@gnu.org>
2766
2767 * eval.c (Fcalled_interactively_p): Doc fix. (Bug#11747)
2768
457294dd
MR
27692012-08-28 Martin Rudalics <rudalics@gmx.at>
2770
2771 * window.c (Fset_window_configuration): Remove handling of
37b9743e
MR
2772 auto-buffer-name window parameter. Install revision of reverted
2773 fix.
457294dd 2774
4f2daf31
DA
27752012-08-28 Dmitry Antipov <dmantipov@yandex.ru>
2776
2777 Do not allow to set major mode for a dead buffer.
2778 * buffer.c (Fset_buffer_major_mode): Signal an error
2779 if the buffer is dead.
2780 (Fother_buffer, other_buffer_safely): Remove redundant
2781 nested declaration.
2782
66322887
DA
27832012-08-28 Dmitry Antipov <dmantipov@yandex.ru>
2784
2785 Always use set_buffer_if_live to restore original buffer at unwind.
2786 * buffer.h (record_unwind_current_buffer): New function.
2787 * bytecode.c, dispnew.c, editfns.c, fileio.c, fns.c, insdel.c:
2788 * keyboard.c, keymap.c, minibuf.c, print.c, process.c, textprop.c:
2789 * undo.c, window.c: Adjust users.
2790 * buffer.c (set_buffer_if_live): Fix comment.
2791
a3d794a1
DA
27922012-08-28 Dmitry Antipov <dmantipov@yandex.ru>
2793
2794 Fix usage of set_buffer_internal.
2795 * buffer.h (set_buffer_internal): Make it BUFFER_INLINE.
2796 * buffer.c (set_buffer_if_live): Use set_buffer_internal.
2797 * coding.c (decode_coding): Omit redundant test.
2798 * fileio.c (decide_coding_unwind): Likewise.
2799 * fns.c (secure_hash): Likewise.
2800 * insdel.c (modify_region): Likewise.
2801 * keyboard.c (command_loop_1): Likewise.
2802 * print.c (PRINTFINISH): Likewise.
2803 * xdisp.c (run_window_scroll_functions): Use set_buffer_internal.
2804
59ea14cd
PE
28052012-08-27 Paul Eggert <eggert@cs.ucla.edu>
2806
2807 * dispnew.c: Use bool for boolean.
2808 (frame_garbaged, display_completed, delayed_size_change)
2809 (fonts_changed_p, add_window_display_history)
2810 (add_frame_display_history, verify_row_hash)
2811 (adjust_glyph_matrix, clear_window_matrices, glyph_row_slice_p)
2812 (row_equal_p, realloc_glyph_pool)
2813 (allocate_matrices_for_frame_redisplay)
2814 (showing_window_margins_p)
2815 (adjust_frame_glyphs_for_frame_redisplay)
2816 (build_frame_matrix_from_leaf_window, make_current)
2817 (mirrored_line_dance, mirror_line_dance, update_frame)
2818 (update_window_tree, update_single_window)
2819 (check_current_matrix_flags, update_window, update_text_area)
2820 (update_window_line, set_window_update_flags, scrolling_window)
2821 (update_frame_1, scrolling, buffer_posn_from_coords)
2822 (do_pending_window_change, change_frame_size)
2823 (change_frame_size_1, sit_for):
2824 Use bool for boolean.
2825 (clear_glyph_matrix_rows): Rename from enable_glyph_matrix_rows,
2826 and remove last int (actually boolean) argument, which was always 0.
2827 All callers changed.
2828 * dispextern.h, frame.h, lisp.h: Reflect above API changes.
2829 * dispextern.h (struct composition_it): Use bool for boolean.
2830 (struct glyph_matrix): Don't assume buffer sizes can fit in 'int'.
2831 (struct bidi_it): Use unsigned:1, not int, for boolean prev_was_pdf.
2832 * dired.c (file_name_completion):
2833 Use bool for boolean. (This was missed in an earlier change.)
2834
95072a94
MR
28352012-08-27 Martin Rudalics <rudalics@gmx.at>
2836
2837 * window.c (Fset_window_configuration): Revert first part of
2838 last change.
2839
0f19feff
JD
28402012-08-27 Jan Djärv <jan.h.d@swipnet.se>
2841
2842 * nsterm.h (NSPanel): New class variable dialog_return.
2843
3a880af4
SM
2844 * nsmenu.m (initWithContentRect:styleMask:backing:defer:):
2845 Initialize dialog_return.
0f19feff
JD
2846 (windowShouldClose:): Use stop instead of stopModalWithCode.
2847 (clicked:): Ditto, and also set dialog_return (Bug#12258).
2848 (timeout_handler:): Use stop instead of abortModal. Send a dummy
2849 event.
2850 (runDialogAt:): Make ret Lisp_Object. Set it from dialog_return when
2851 modal loop returns.
2852
f10fe38f
PE
28532012-08-27 Paul Eggert <eggert@cs.ucla.edu>
2854
de1339b0
PE
2855 * composite.c, data.c, dbusbind.c, dired.c: Use bool for booleans.
2856 * composite.c (find_composition, composition_gstring_p)
2857 (composition_reseat_it, find_automatic_composition):
2858 * data.c (let_shadows_buffer_binding_p)
2859 (let_shadows_global_binding_p, set_internal, make_blv)
2860 (Fmake_variable_buffer_local, Fmake_local_variable)
2861 (Fmake_variable_frame_local, arithcompare, cons_to_unsigned)
2862 (cons_to_signed, arith_driver):
2863 * dbusbind.c (xd_in_read_queued_messages):
2864 * dired.c (directory_files_internal, file_name_completion):
2865 Use bool for booleans.
2866 * dired.c (file_name_completion):
2867 * process.h (fd_callback):
2868 Omit int (actually boolean) argument. It wasn't being used.
2869 All uses changed.
2870 * composite.h, lisp.h: Reflect above API changes.
2871
f10fe38f
PE
2872 * cmds.c, coding.c: Use bool for booleans.
2873 * cmds.c (move_point, Fself_insert_command):
2874 * coding.h (struct composition status, struct coding_system):
2875 * coding.c (detect_coding_utf_8, encode_coding_utf_8)
2876 (detect_coding_utf_16, encode_coding_utf_16, detect_coding_emacs_mule)
2877 (emacs_mule_char, decode_coding_emacs_mule)
2878 (encode_coding_emacs_mule, detect_coding_iso_2022)
2879 (decode_coding_iso_2022, encode_invocation_designation)
2880 (encode_designation_at_bol, encode_coding_iso_2022)
2881 (detect_coding_sjis, detect_coding_big5, decode_coding_sjis)
2882 (decode_coding_big5, encode_coding_sjis, encode_coding_big5)
2883 (detect_coding_ccl, encode_coding_ccl, decode_coding_raw_text)
2884 (encode_coding_raw_text, detect_coding_charset)
2885 (decode_coding_charset, encode_coding_charset, detect_eol)
2886 (detect_coding, get_translation_table, produce_chars)
2887 (consume_chars, reused_workbuf_in_use)
2888 (make_conversion_work_buffer, code_conversion_save)
2889 (decode_coding_object, encode_coding_object)
2890 (detect_coding_system, char_encodable_p)
2891 (Funencodable_char_position, code_convert_region)
2892 (code_convert_string, code_convert_string_norecord)
2893 (Fset_coding_system_priority):
2894 * fileio.c (Finsert_file_contents):
2895 Use bool for booleans.
2896 * coding.h, lisp.h: Reflect above API changes.
2897 * coding.c: Remove unnecessary static function decls.
2898 (detect_coding): Use unsigned, not signed, to copy an unsigned field.
2899 (decode_coding, encode_coding, decode_coding_gap): Return 'void',
2900 not a boolean 'int', since callers never look at the return value.
2901 (ALLOC_CONVERSION_WORK_AREA): Assume caller returns 'void', not 'int'.
2902 * coding.h (decoding_buffer_size, encoding_buffer_size)
2903 (emacs_mule_string_char): Remove unused extern decls.
2904 (struct iso_2022_spec, struct coding_system):
2905 Use 'unsigned int : 1' for boolean fields, since there's more than one.
2906 (struct emacs_mule_spec): Remove unused field 'full_support'.
2907 All initializations removed.
2908 * cmds.c (internal_self_insert): Don't assume EMACS_INT fits in 'int'.
2909
5474c384
DA
29102012-08-27 Dmitry Antipov <dmantipov@yandex.ru>
2911
f10fe38f 2912 Fix spare memory change (Bug#12286).
5474c384
DA
2913 * alloc.c (mark_maybe_pointer): Handle MEM_TYPE_SPARE.
2914 (valid_lisp_object_p): Likewise.
2915
c4b6914d
MR
29162012-08-27 Martin Rudalics <rudalics@gmx.at>
2917
2918 * window.c (Fset_window_configuration): Record any window's old
2919 buffer if it's replaced (see Bug#8789). If the new current
2920 buffer doesn't appear in the selected window, go to its old
2921 point (Bug#12208).
2922
35aaa1ea
DA
29232012-08-27 Dmitry Antipov <dmantipov@yandex.ru>
2924
2925 Special MEM_TYPE_SPARE to denote reserved memory.
2926 * alloc.c (enum mem_type): New memory type.
2927 (refill_memory_reserve): Use new type for spare memory.
2928 This prevents live_cons_p and live_string_p from incorrect
2929 detection of uninitialized objects from spare memory as live.
2930
6af64513
PE
29312012-08-26 Paul Eggert <eggert@cs.ucla.edu>
2932
8b2e00a3
PE
2933 Spelling fixes.
2934 * Makefile.in (.PHONY): versioclean -> versionclean.
2935
b52d6985
PE
2936 Remove unused external symbols.
2937 * data.c (Qcons, Qfloat, Qmisc, Qstring, Qvector):
2938 * window.c (Qwindow_valid_p, decode_valid_window):
2939 Now static, not extern.
2940 * data.c (Qinterval): Remove; unused.
2941 (syms_of_data): Do not define 'interval'.
2942 * lisp.h (Qinteger, Qstring, Qmisc, Qvector, Qfloat, Qcons):
2943 * window.h (decode_valid_window):
2944 Remove decls.
2945
d5172d4f
PE
2946 * character.c, charset.c, chartab.c: Use bool for booleans.
2947 * character.c (lisp_string_width, string_count_byte8)
2948 (string_escape_byte8):
2949 * charset.c (charset_map_loaded, load_charset_map, read_hex):
2950 (load_charset_map_from_file, map_charset_chars)
2951 (Fdefine_charset_internal, define_charset_internal)
2952 (Fdeclare_equiv_charset, find_charsets_in_text)
2953 (Ffind_charset_region, char_charset, Fiso_charset):
2954 * chartab.c (sub_char_table_ref, sub_char_table_ref_and_range)
2955 (sub_char_table_set, sub_char_table_set_range)
2956 (char_table_set_range, optimize_sub_char_table)
2957 (map_sub_char_table):
2958 Use bool for boolean.
2959 * character.c (str_to_unibyte): Omit last boolean argument; it was
2960 always 0. All callers changed.
2961 * character.h, charset.h: Adjust to match previous changes.
2962 * character.h (char_printable_p): Remove decl of nonexistent function.
2963 * charset.h (struct charset): Members code_linear_p, iso_chars_96,
2964 ascii_compatible_p, supplementary_p, compact_codes_p, unified_p
2965 are all boolean, so make them single-bit bitfields.
2966
6af64513
PE
2967 * lisp.h (ASET): Remove attempt to detect side effects.
2968 It was meant to be temporary and it often doesn't work,
2969 because when IDX has side effects the behavior of IDX==IDX
2970 is undefined. See Stefan Monnier in
2971 <http://lists.gnu.org/archive/html/emacs-devel/2012-08/msg00762.html>.
2972
e1f29348
BR
29732012-08-26 Barry OReilly <gundaetiapo@gmail.com> (tiny change)
2974
2975 * lisp.h (functionp): New function (extracted from Ffunctionp).
2976 (FUNCTIONP): Use it.
2977 * eval.c (Ffunctionp): Use it.
2978
17c05d74
PE
29792012-08-25 Paul Eggert <eggert@cs.ucla.edu>
2980
0f46bc75
PE
2981 * xgselect.c (xg_select): Use auto storage for the GPollFD buffer
2982 as that's faster and simpler than static storage. Don't bother
2983 with the g_main_context_query overhead if g_main_context_pending
2984 says no events are pending.
2985 (gfds, gfds_size): Remove these static vars.
2986 (xgselect_initialize): Remove; no longer needed.
2987 All uses and decls removed.
2988
ee4c0f69
PE
2989 * emacs.c (fatal_error_signal_hook): Remove.
2990 All uses removed. This leftover from old code was always 0.
2991
17c05d74
PE
2992 * casefiddle.c, casetab.c, category.c: Use bool for boolean.
2993 * casefiddle.c (casify_object, casify_region):
2994 * casetab.c (set_case_table):
2995 * category.c, category.h (word_boundary_p):
2996 * category.h (CHAR_HAS_CATEGORY):
2997 Use bool for booleans, instead of int.
2998
391ceac5
EZ
29992012-08-25 Eli Zaretskii <eliz@gnu.org>
3000
3001 * makefile.w32-in ($(BLD)/alloc.$(O)): Depend on $(GNU_LIB)/execinfo.h.
3002
2f221583
PE
30032012-08-25 Paul Eggert <eggert@cs.ucla.edu>
3004
f4a681b0
PE
3005 On assertion failure, print backtrace if available.
3006 * alloc.c [ENABLE_CHECKING]: Include <execinfo.h>.
3007 (die) [ENABLE_CHECKING]: Print a backtrace if available.
3008 * Makefile.in (LIB_EXECINFO): New macro.
3009 (LIBES): Use it.
3010
2f221583
PE
3011 * bytecode.c, callint.c, callproc.c: Use bool for boolean.
3012 * bytecode.c (exec_byte_code):
3013 * callint.c (check_mark, Fcall_interactively):
3014 * callproc.c (Fcall_process, add_env, child_setup, getenv_internal_1)
3015 (getenv_internal, sync_process_alive, call_process_exited):
3016 * lisp.h (USE_SAFE_ALLOCA):
3017 Use bool for booleans, instead of int.
3018 * lisp.h, process.h: Adjust prototypes to match above changes.
3019 * callint.c (Fcall_interactively): Don't assume the mark's
3020 offset fits in 'int'.
3021
37ef52bb
PE
30222012-08-24 Paul Eggert <eggert@cs.ucla.edu>
3023
3024 * buffer.c, buffer.h: Use bool for boolean.
3025 * buffer.c (reset_buffer_local_variables)
3026 (buffer_lisp_local_variables, Fset_buffer_modified_p)
3027 (Frestore_buffer_modified_p, Fset_buffer_multibyte):
3028 (overlays_at, overlays_in, mouse_face_overlay_overlaps)
3029 (overlay_touches_p, overlay_strings, Foverlay_put)
3030 (report_overlay_modification, call_overlay_mod_hooks):
3031 (mmap_enlarge, mmap_set_vars):
3032 * buffer.h (buffer_has_overlays, uppercasep, lowercasep):
3033 Use bool for booleans, instead of int.
3034 * buffer.c (compact_buffer, mmap_free_1): Return void, not int,
3035 since the 1-or-0 return value is always ignored anyway.
3036 (mmap_initialized_p):
3037 * buffer.h (struct buffer_text.inhibit_shrinking): Now bool, not int.
3038 * buffer.h, lisp.h: Adjust prototypes to match above changes.
3039
2cc21167
PE
30402012-08-23 Paul Eggert <eggert@cs.ucla.edu>
3041
3042 * bidi.c: Use bool for boolean.
3043 This is a bit more readable, and makes the text segment of bidi.o
3044 0.4% smaller on my platform (GCC 4.7.1 x86-64, Fedora 15).
3045 Presumably it's faster too.
3046 (bidi_initialized, bidi_ignore_explicit_marks_for_paragraph_level):
3047 Now bool.
3048 (bidi_cache_find_level_change, bidi_cache_iterator_state)
3049 (bidi_unshelve_cache, bidi_init_it, bidi_count_bytes)
3050 (bidi_char_at_pos, bidi_fetch_char, bidi_paragraph_init)
3051 (bidi_explicit_dir_char, bidi_level_of_next_char)
3052 (bidi_find_other_level_edge, bidi_move_to_visually_next):
3053 Use bool for booleans, instead of int.
3054 * dispextern.h (bidi_init_it, bidi_paragraph_init)
3055 (bidi_unshelve_cache): Adjust decls to match code.
3056
7db4ddf4
MR
30572012-08-23 Martin Rudalics <rudalics@gmx.at>
3058
3059 * keyboard.c (Fposn_at_x_y): Do not allow internal window as
3060 argument.
3061
b1bb8011
PE
30622012-08-23 Paul Eggert <eggert@cs.ucla.edu>
3063
3064 * atimer.c, atimer.h (turn_on_atimers): Use bool for boolean.
3065 * atimer.h: Include <stdbool.h>.
3066
ff687885
DN
30672012-08-22 Dan Nicolaescu <dann@gnu.org>
3068
3069 * frame.h (FRAME_W32_P, FRAME_MSDOS_P, FRAME_NS_P): Change to
3070 compile time tests instead of run time tests on systems that do
3071 not use them.
3072 (FRAME_MAC_P): Remove leftover from deleted code.
3073 * frame.c (syms_of_frame): Remove leftover from deleted code.
3074
4ce7a138
JD
30752012-08-22 Jan Djärv <jan.h.d@swipnet.se>
3076
3077 * nsterm.m (insertText:): Don't clear modifiers if code is space.
3078
d733ec6d
PE
30792012-08-22 Paul Eggert <eggert@cs.ucla.edu>
3080
3081 * fontset.c (FONTSET_ADD): Return void, not Lisp_Object.
3082 Otherwise, the compiler complains about (A?B:C) where B is void
fc0c31f8 3083 and C is Lisp_Object. This fixes an incompatibility with Sun C 5.12.
d733ec6d
PE
3084 (fontset_add): Return void, for FONTSET_ADD.
3085
d0d2d26f
PE
30862012-08-21 Paul Eggert <eggert@cs.ucla.edu>
3087
fce31d69
PE
3088 * alloc.c: Use bool for booleans.
3089 (gc_in_progress, abort_on_gc)
3090 (setjmp_tested_p) [!GC_SAVE_REGISTERS_ON_STACK && !GC_SETJMP_WORKS]:
3091 (dont_register_blocks) [GC_MALLOC_CHECK]:
3092 (suppress_checking) [ENABLE_CHECKING]: Now bool, not int.
3093 (check_string_bytes, make_specified_string, memory_full)
3094 (live_string_p, live_cons_p, live_symbol_p, live_float_p)
3095 (live_misc_p, live_vector_p, live_buffer_p, mark_maybe_object)
3096 (mark_stack, valid_pointer_p, make_pure_string)
3097 (Fgarbage_collect, survives_gc_p, gc_sweep):
3098 Use bool for booleans, instead of int.
3099 (test_setjmp) [!GC_SAVE_REGISTERS_ON_STACK && !GC_SETJMP_WORKS]:
3100 Remove unused local.
3101 * alloc.c (PURE_POINTER_P):
3102 * lisp.h (STRING_MULTIBYTE): Document that it returns a boolean.
3103 * editfns.c (Fformat):
3104 * fileio.c (Fexpand_file_name, Fsubstitute_in_file_name)
3105 (Fdo_auto_save):
3106 * fns.c (sweep_weak_table):
3107 * lisp.h (suppress_checking, push_message, survives_gc_p)
3108 (make_pure_string, gc_in_progress, abort_on_gc):
3109 * lread.c (readchar, read1):
3110 * print.c (Fprin1_to_string):
3111 * xdisp.c (push_message):
3112 Use bool for booleans affected directly or indirectly by
3113 alloc.c's changes.
3114
d0d2d26f
PE
3115 Make recently-introduced setters macros.
3116 * fontset.c (set_fontset_id, set_fontset_name, set_fontset_ascii)
3117 (set_fontset_base, set_fontset_frame, set_fontset_nofont_face)
3118 (set_fontset_default, set_fontset_fallback): Rename from their
3119 upper-case counterparts, and make them functions rather than macros.
3120 This is more consistent with the other recently-introduced setters.
3121 These don't need to be inline, since they're local.
3122
d18e2bb6
JD
31232012-08-21 Jan Djärv <jan.h.d@swipnet.se>
3124
3125 * nsterm.m (fd_handler:): Alloc and release a NSAutoreleasePool in
3126 the loop (Bug#12247).
3127
1b9d9d16
PE
31282012-08-21 Paul Eggert <eggert@cs.ucla.edu>
3129
3130 * lisp.h (vcopy): Use memcpy rather than our own loop.
3131 This fixes a performance regression introduced by the recent
3132 addition of vcopy. This means 'vcopy' will need to be modified
3133 for a copying collector, but that's OK. Also, tighten the
3134 checking in the assertion.
3135
b2f09701
EZ
31362012-08-21 Eli Zaretskii <eliz@gnu.org>
3137
3138 * w32uniscribe.c (uniscribe_shape): Fix producing gstring
3139 components for RTL text (Bug#11860). Adjust X-OFFSET of each
3140 non-base glyph for the width of the base character, according to
e1f29348
BR
3141 what x_draw_composite_glyph_string_foreground expects.
3142 Generate WADJUST value according to composition_gstring_width's
b2f09701
EZ
3143 expectations, to produce correct width of the composed character.
3144 Reverse the sign of the DU offset produced by ScriptPlace.
3145
9b994fed
PE
31462012-08-21 Paul Eggert <eggert@cs.ucla.edu>
3147
3148 * dbusbind.c (xd_remove_watch): Do not assume C99 comments.
3149
086ca913
DA
31502012-08-21 Dmitry Antipov <dmantipov@yandex.ru>
3151
3152 Avoid direct writes to contents member of struct Lisp_Vector.
3153 * lisp.h (vcopy): New function to copy data into vector.
3154 * dispnew.c (Fframe_or_buffer_changed_p): Use AREF and ASET.
3155 * fns.c (Ffillarray): Use ASET.
3156 * keyboard.c (timer_check_2): Use AREF and ASET.
3157 (append_tool_bar_item, Frecent_keys): Use vcopy.
3158 * lread.c (read_vector): Use ASET.
3159 * msdos.c (Frecent_doskeys): Use vcopy.
3160 * xface.c (Finternal_copy_lisp_face): Use vcopy.
3161 (Finternal_merge_in_global_face): Use ASET and vcopy.
3162 * xfont.c (xfont_list_pattern): Likewise.
3163
5481664a
MR
31642012-08-21 Martin Rudalics <rudalics@gmx.at>
3165
3166 * window.c (Fwindow_point): For the selected window always return
3167 the position of its buffer's point.
3168 (Fset_window_point): For the selected window always go in its
3169 buffer to the specified position.
3170
6d470bdd
DA
31712012-08-21 Dmitry Antipov <dmantipov@yandex.ru>
3172
3173 Setter macros for fontsets.
3174 * fontset.c (SET_FONTSET_ID, SET_FONTSET_NAME, SET_FONTSET_ASCII)
3175 (SET_FONTSET_BASE, SET_FONTSET_FRAME, SET_FONTSET_NOFONT_FACE)
3176 (SET_FONTSET_DEFAULT, SET_FONTSET_FALLBACK): New macros.
3177 Adjust users.
3178
24564fe1
GM
31792012-08-20 Glenn Morris <rgm@gnu.org>
3180
3181 * Makefile.in (emacs$(EXEEXT), bootstrap-emacs$(EXEEXT)):
3182 Don't assume that `ln -f' works.
3183
0a05a035
EZ
31842012-08-20 Eli Zaretskii <eliz@gnu.org>
3185
3186 * .gdbinit: Use "set $dummy = ..." to avoid warnings from GDB 7.5
3187 and later about non-assignments with no effect. See discussion at
3188 http://sourceware.org/ml/gdb-patches/2012-08/msg00518.html for
3189 details.
3190
e46f2325
DA
31912012-08-20 Dmitry Antipov <dmantipov@yandex.ru>
3192
3193 Inline setter functions for Lisp_Objects slots of struct specbinding.
3194 * eval.c (set_specpdl_symbol, set_specpdl_old_value): New functions.
3195 Adjust users.
3196
734fbd86
MR
31972012-08-20 Martin Rudalics <rudalics@gmx.at>
3198
3199 * window.c (select_window): Always make selected window's buffer
3200 current.
3201
f1a95992
DA
32022012-08-20 Dmitry Antipov <dmantipov@yandex.ru>
3203
3204 Use AREF and ASET for docstrings of category tables.
3205 * category.h (CATEGORY_DOCSTRING): Use AREF.
3206 (SET_CATEGORY_DOCSTRING): Use ASET.
3207 * category.c (Fdefine_category): Use SET_CATEGORY_DOCSTRING.
3208
e83064be
DA
32092012-08-20 Dmitry Antipov <dmantipov@yandex.ru>
3210
3211 Inline setter functions for hash table members.
3212 * lisp.h (set_hash_key, set_hash_value, set_hash_next)
3213 (set_hash_hash, set_hash_index): Rename with _slot suffix.
3214 (set_hash_key_and_value, set_hash_index, set_hash_next)
3215 (set_hash_hash): New functions.
3216 * charset.c, fns.c: Adjust users.
3217
4ce60d2e
DA
32182012-08-20 Dmitry Antipov <dmantipov@yandex.ru>
3219
3220 Inline getter and setter functions for per-buffer values.
3221 * buffer.h (per_buffer_default, set_per_buffer_default)
3222 (per_buffer_value, set_per_buffer_value): New functions.
3223 (PER_BUFFER_VALUE, PER_BUFFER_DEFAULT): Remove.
3224 * buffer.c, data.c: Adjust users.
3225
c06c9690
JB
32262012-08-20 Juanma Barranquero <lekktu@gmail.com>
3227
3228 * makefile.w32-in ($(BLD)/vm-limit.$(O)): Update dependencies.
3229
32bd4250
PE
32302012-08-19 Paul Eggert <eggert@cs.ucla.edu>
3231
bad03192 3232 Rely on <config.h> + <unistd.h> to declare 'environ',
b69a6d22
PE
3233 as gnulib does this if the system doesn't.
3234 * callproc.c, editfns.c, process.c (environ) [!USE_CRT_DLL]:
72279493
EZ
3235 Remove declaration. MS-Windows declares it on stdlib.h which is
3236 included by conf_post.h.
b69a6d22
PE
3237 * emacs.c (environ) [DOUG_LEA_MALLOC]:
3238 * vm-limit.c (environ) [ORDINARY_LINK]: Remove decl.
3239 * vm-limit.c: Include <unistd.h>, for 'environ'.
3240
22d7feb2
PE
3241 * unexaix.c, unexcoff.c: Include "mem-limits.h".
3242 (start_of_data): Remove decl; mem-limits.h provides it.
3243
32bd4250
PE
3244 * xdisp.c (handle_invisible_prop): Make it a bit faster
3245 and avoid a gcc -Wmaybe-uninitialized diagnostic.
3246
450809af
CY
32472012-08-19 Chong Yidong <cyd@gnu.org>
3248
3249 * xdisp.c (handle_invisible_prop): Fix ellipses at overlay string
3250 ends (Bug#3874).
3251
9e677988
AS
32522012-08-19 Andreas Schwab <schwab@linux-m68k.org>
3253
6b1319ce
AS
3254 * .gdbinit: Use call instead of set when calling a function in the
3255 inferior.
3256
9e677988
AS
3257 * data.c (set_internal): Don't use set_blv_found.
3258 (Fkill_local_variable): Likewise.
3259
d7191076
AA
32602012-08-18 Alp Aker <alp.tekin.aker@gmail.com>
3261
3262 * nsfont.m (ns_ascii_average_width): Ensure the string
3263 ascii_printable is initialized with a null-terminated character
3264 array. Otherwise, it can contain undesired extra characters.
3265
e757f1c6
PE
32662012-08-18 Paul Eggert <eggert@cs.ucla.edu>
3267
3268 port new setting code to Sun C 5.8 2005/10/13
3269 * chartab.c, lisp.h (char_table_set, char_table_set_range):
3270 Return void, not Lisp_Object. Otherwise, the compiler
3271 complains about (A?B:C) where B is void and C is Lisp_Object
3272 when compiling CHAR_TABLE_SET, due to the recent change to
3273 the API of sub_char_table_set_contents.
3274
a999ce26
CY
32752012-08-18 Chong Yidong <cyd@gnu.org>
3276
3277 * xdisp.c (handle_invisible_prop): Obey TEXT_PROP_MEANS_INVISIBLE
3278 for the string case (Bug#3874).
3279
3f22b86f
PE
32802012-08-18 Paul Eggert <eggert@cs.ucla.edu>
3281
39eb03f1
PE
3282 * buffer.h (BSET): Remove (Bug#12215).
3283 Replace all uses with calls to new setter functions.
3284 (bset_bidi_paragraph_direction, bset_case_canon_table)
3285 (bset_case_eqv_table, bset_directory, bset_display_count)
3286 (bset_display_time, bset_downcase_table)
3287 (bset_enable_multibyte_characters, bset_filename, bset_keymap)
3288 (bset_last_selected_window, bset_local_var_alist)
3289 (bset_mark_active, bset_point_before_scroll, bset_read_only)
3290 (bset_truncate_lines, bset_undo_list, bset_upcase_table)
3291 (bset_width_table):
3292 * buffer.c (bset_abbrev_mode, bset_abbrev_table)
3293 (bset_auto_fill_function, bset_auto_save_file_format)
3294 (bset_auto_save_file_name, bset_backed_up, bset_begv_marker)
3295 (bset_bidi_display_reordering, bset_buffer_file_coding_system)
3296 (bset_cache_long_line_scans, bset_case_fold_search)
3297 (bset_ctl_arrow, bset_cursor_in_non_selected_windows)
3298 (bset_cursor_type, bset_display_table, bset_extra_line_spacing)
3299 (bset_file_format, bset_file_truename, bset_fringe_cursor_alist)
3300 (bset_fringe_indicator_alist, bset_fringes_outside_margins)
3301 (bset_header_line_format, bset_indicate_buffer_boundaries)
3302 (bset_indicate_empty_lines, bset_invisibility_spec)
3303 (bset_left_fringe_width, bset_major_mode, bset_mark)
3304 (bset_minor_modes, bset_mode_line_format, bset_mode_name)
3305 (bset_name, bset_overwrite_mode, bset_pt_marker)
3306 (bset_right_fringe_width, bset_save_length)
3307 (bset_scroll_bar_width, bset_scroll_down_aggressively)
3308 (bset_scroll_up_aggressively, bset_selective_display)
3309 (bset_selective_display_ellipses, bset_vertical_scroll_bar_type)
3310 (bset_word_wrap, bset_zv_marker):
3311 * category.c (bset_category_table):
3312 * syntax.c (bset_syntax_table):
3313 New setter functions.
3314
6a09a33b
PE
3315 * process.h (PSET): Remove (Bug#12215).
3316 Replace all uses with calls to new setter functions.
3317 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
3318 (PROCESS_INLINE): New macro.
3319 (pset_childp): New setter function.
3320 (pset_gnutls_cred_type) [HAVE_GNUTLS]: New setter function.
3321 * process.c (PROCESS_INLINE):
3322 Define to EXTERN_INLINE, so that the corresponding functions
3323 are compiled into code.
3324 (pset_buffer, pset_command, pset_decode_coding_system)
3325 (pset_decoding_buf, pset_encode_coding_system)
3326 (pset_encoding_buf, pset_filter, pset_log, pset_mark, pset_name)
3327 (pset_plist, pset_sentinel, pset_status, pset_tty_name)
3328 (pset_type, pset_write_queue): New setter functions.
3329
e8c17b81
PE
3330 * window.h (WSET): Remove (Bug#12215).
3331 Replace all uses with calls to new setter functions.
3332 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
3333 (WINDOW_INLINE): New macro.
3334 (wset_buffer, wset_frame, wset_left_col, wset_next, wset_prev)
3335 (wset_redisplay_end_trigger, wset_top_line, wset_total_cols)
3336 (wset_total_lines, wset_vertical_scroll_bar)
3337 (wset_window_end_pos, wset_window_end_valid)
3338 (wset_window_end_vpos): New setter functions.
3339 * window.c (WINDOW_INLINE):
3340 Define to EXTERN_INLINE, so that the corresponding functions
3341 are compiled into code.
3342 (wset_combination_limit, wset_dedicated, wset_display_table)
3343 (wset_hchild, wset_left_fringe_width, wset_left_margin_cols)
3344 (wset_new_normal, wset_new_total, wset_next_buffers)
3345 (wset_normal_cols, wset_normal_lines, wset_parent, wset_pointm)
3346 (wset_prev_buffers, wset_right_fringe_width)
3347 (wset_right_margin_cols, wset_scroll_bar_width, wset_start)
3348 (wset_temslot, wset_vchild, wset_vertical_scroll_bar_type)
3349 (wset_window_parameters):
3350 * xdisp.c (wset_base_line_number, wset_base_line_pos)
3351 (wset_column_number_displayed, wset_region_showing):
3352 New setter functions.
3353
3f22b86f
PE
3354 * termhooks.h (TSET): Remove (Bug#12215).
3355 Replace all uses with calls to new setter functions.
3356 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
3357 (TERMHOOKS_INLINE): New macro.
3358 (tset_charset_list, tset_selection_alist): New setter functions.
3359 * terminal.c (TERMHOOKS_INLINE):
3360 Define to EXTERN_INLINE, so that the corresponding functions
3361 are compiled into code.
3362 (tset_param_alist): New setter function.
3363
742af32f
PE
33642012-08-17 Paul Eggert <eggert@cs.ucla.edu>
3365
15dbb4d6
PE
3366 * keyboard.h (KSET): Remove (Bug#12215).
3367 Replace all uses with calls to new setter functions.
3368 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
3369 (KEYBOARD_INLINE): New macro.
3370 (kset_default_minibuffer_frame, kset_defining_kbd_macro)
3371 (kset_input_decode_map, kset_last_command, kset_last_kbd_macro)
3372 (kset_prefix_arg, kset_system_key_alist, kset_window_system):
3373 New setter functions.
3374 * keyboard.c (KEYBOARD_INLINE):
3375 Define to EXTERN_INLINE, so that the corresponding functions
3376 are compiled into code.
3377 (kset_echo_string, kset_kbd_queue)
3378 (kset_keyboard_translate_table, kset_last_prefix_arg)
3379 (kset_last_repeatable_command, kset_local_function_key_map)
3380 (kset_overriding_terminal_local_map, kset_real_last_command)
3381 (kset_system_key_syms): New setter functions.
3382
f00af5b1
PE
3383 * frame.h (FSET): Remove (Bug#12215).
3384 Replace all uses with calls to new setter functions.
3385 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
3386 (FRAME_INLINE): New macro.
3387 (fset_buffer_list, fset_buried_buffer_list, fset_condemned_scroll_bars)
3388 (fset_current_tool_bar_string, fset_desired_tool_bar_string)
3389 (fset_face_alist, fset_focus_frame, fset_icon_name, fset_menu_bar_items)
3390 (fset_menu_bar_vector, fset_menu_bar_window, fset_name)
3391 (fset_param_alist, fset_root_window, fset_scroll_bars)
3392 (fset_selected_window, fset_title, fset_tool_bar_items)
3393 (fset_tool_bar_position, fset_tool_bar_window): New functions.
3394 * frame.c (FRAME_INLINE):
3395 Define to EXTERN_INLINE, so that the corresponding functions
3396 are compiled into code.
3397 (fset_buffer_predicate, fset_minibuffer_window): New setter functions.
3398
0c94c8d6
PE
3399 A few more naming-convention fixes for getters and setters.
3400 * buffer.c (set_buffer_overlays_before): Move here from buffer.h,
3401 and rename from buffer_overlays_set_before.
3402 (set_buffer_overlays_after): Move here from buffer.h, and rename
3403 from buffer_overlays_set_after.
3404 * buffer.h (buffer_intervals): Rename from buffer_get_intervals.
3405 All uses changed.
3406 (set_buffer_intervals): Rename from buffer_set_intervals.
3407 * intervals.c (set_interval_object): Move here from intervals.h,
3408 and rename from interval_set_object.
3409 (set_interval_left): Move here from intervals.h, and rename from
3410 interval_set_left.
3411 (set_interval_right): Move here from intervals.h, and rename from
3412 interval_set_right.
3413 (copy_interval_parent): Move here from intervals.h, and rename from
3414 interval_copy_parent.
3415 * intervals.h (set_interval_parent): Rename from interval_set_parent.
3416 (set_interval_plist): Rename from interval_set_plist.
3417 Return void, not Lisp_Object, since no caller uses the result.
3418 * lisp.h (string_intervals): Rename from string_get_intervals.
3419 (set_string_intervals): Rename from string_set_intervals.
3420
34dabdb7
PE
3421 * lisp.h (set_char_table_extras): Rename from char_table_set_extras.
3422 (set_char_table_contents): Rename from char_table_set_contents.
0b390a9d 3423 (set_sub_char_table_contents): Rename from sub_char_table_set_contents.
34dabdb7
PE
3424 All uses changed. See the end of
3425 <http://lists.gnu.org/archive/html/emacs-devel/2012-08/msg00549.html>.
3426
742af32f
PE
3427 * lisp.h (CSET): Remove (Bug#12215).
3428 (set_char_table_ascii, set_char_table_defalt, set_char_table_parent)
3429 (set_char_table_purpose): New functions,
3430 replacing CSET. All uses changed. For example, replace
3431 "CSET (XCHAR_TABLE (char_table), parent, parent);" with
c24eb18a 3432 "set_char_table_parent (char_table, parent);".
742af32f
PE
3433 The old version was confusing because it used the same name
3434 'parent' for two different things.
3435
a04e2c62
DA
34362012-08-17 Dmitry Antipov <dmantipov@yandex.ru>
3437
3438 Functions to get and set Lisp_Object fields of buffer-local variables.
3439 * lisp.h (blv_found, set_blv_found, blv_value, set_blv_value)
3440 (set_blv_where, set_blv_defcell, set_blv_valcell): New functions.
3441 (BLV_FOUND, SET_BLV_FOUND, BLV_VALUE, SET_BLV_VALUE): Remove.
3442 * data.c, eval.c, frame.c: Adjust users.
3443
383dcbf9
CY
34442012-08-17 Chong Yidong <cyd@gnu.org>
3445
3446 * xfaces.c (merge_face_vectors): If the target font specfies a
3447 font spec, make the font's attributes take precedence over
3448 directly-specified attributes.
3449 (merge_face_ref): Recognize :font.
3450
44386687
DA
34512012-08-17 Dmitry Antipov <dmantipov@yandex.ru>
3452
3453 Do not use memcpy for copying intervals.
3454 * intervals.c (reproduce_interval): New function.
3455 (reproduce_tree, reproduce_tree_obj): Use it.
3456 (reproduce_tree_obj): Remove prototype.
3457
927c7216
PE
34582012-08-17 Paul Eggert <eggert@cs.ucla.edu>
3459
3460 * lisp.h (duration_to_sec_usec): Remove unused decl.
3461
93044f7b
AA
34622012-08-17 Alp Aker <alp.tekin.aker@gmail.com>
3463
3464 * nsfont.m (ns_ascii_average_width): Send initWithFormat selector
3465 to an allocated instance of NSString, not to the class itself.
3466
9851e4a5
JB
34672012-08-17 Juanma Barranquero <lekktu@gmail.com>
3468
3469 * makefile.w32-in (C_CTYPE_H): New macro.
3470 (LISP_H, $(BLD)/ccl.$(O), $(BLD)/doc.$(O), $(BLD)/w32console.$(O)):
3471 ($(BLD)/fontset.$(O), $(BLD)/frame.$(O), $(BLD)/composite.$(O)):
3472 ($(BLD)/sysdep.$(O), $(BLD)/w32uniscribe.$(O)): Update dependencies.
3473
620f13b0
PE
34742012-08-16 Paul Eggert <eggert@cs.ucla.edu>
3475
3476 Use ASCII tests for character types.
3477 * category.c, dispnew.c, doprnt.c, editfns.c, syntax.c, term.c:
3478 * xfns.c, xterm.c:
3479 Don't include <ctype.h>; was not needed.
3480 * charset.c, doc.c, fileio.c, font.c, frame.c, gtkutil.c, image.c:
3481 * sysdep.c, xfaces.c:
3482 Include <c-ctype.h> instead of <ctype.h>.
3483 * nsterm.m: Include <c-ctype.h>.
3484 * charset.c (read_hex):
3485 * doc.c (Fsnarf_documentation):
3486 * fileio.c (IS_DRIVE) [WINDOWSNT]:
3487 (DRIVE_LETTER) [DOS_NT]:
3488 (Ffile_name_directory, Fexpand_file_name)
3489 (Fsubstitute_in_file_name):
3490 * font.c (font_parse_xlfd, font_parse_fcname):
3491 * frame.c (x_set_font_backend):
3492 * gtkutil.c (xg_get_font):
3493 * image.c (xbm_scan, xpm_scan, pbm_scan_number):
3494 * nsimage.m (hexchar):
3495 * nsterm.m (ns_xlfd_to_fontname):
3496 * sysdep.c (system_process_attributes):
3497 * xfaces.c (hash_string_case_insensitive):
3498 Use C-locale tests instead of locale-specific tests for character
3499 types, since we want the ASCII interpretation here, not the
3500 interpretation suitable for whatever happens to be the current locale.
3501
52162052
MR
35022012-08-16 Martin Rudalics <rudalics@gmx.at>
3503
3504 Consistently check windows for validity/liveness
3505 (Bug#11984, Bug#12025, Bug#12026).
3506 * lisp.h (CHECK_VALID_WINDOW): New macro.
3507 * window.c (decode_window): Rename to decode_live_window.
3508 (decode_valid_window, Fwindow_valid_p): New functions.
3509 (Fwindow_frame, Fframe_root_window, Fwindow_minibuffer_p)
3510 (Fframe_first_window, Fframe_selected_window, Fwindow_parent)
3511 (Fwindow_top_child, Fwindow_left_child, Fwindow_next_sibling)
3512 (Fwindow_prev_sibling, Fwindow_combination_limit)
3513 (Fset_window_combination_limit, Fwindow_use_time)
3514 (Fwindow_total_height, Fwindow_total_width, Fwindow_new_total)
3515 (Fwindow_normal_size, Fwindow_new_normal, Fwindow_left_column)
3516 (Fwindow_top_line, Fwindow_body_height, Fwindow_body_width)
3517 (Fwindow_hscroll, Fset_window_hscroll)
3518 (Fwindow_redisplay_end_trigger)
3519 (Fset_window_redisplay_end_trigger, Fwindow_edges)
3520 (Fwindow_pixel_edges, Fwindow_absolute_pixel_edges)
3521 (Fwindow_inside_edges, Fwindow_inside_pixel_edges)
3522 (Fcoordinates_in_window_p, Fwindow_point, Fwindow_start)
3523 (Fwindow_end, Fset_window_point, Fset_window_start)
3524 (Fpos_visible_in_window_p, Fwindow_line_height)
3525 (Fwindow_dedicated_p, Fset_window_dedicated_p)
3526 (Fwindow_prev_buffers, Fset_window_prev_buffers)
3527 (Fwindow_next_buffers, Fwindow_parameters, Fwindow_parameter)
3528 (Fset_window_parameter, Fwindow_display_table)
3529 (Fset_window_display_table, Fdelete_other_windows_internal)
3530 (Fset_window_buffer, Fset_window_new_total)
3531 (Fset_window_new_normal, Fdelete_window_internal)
3532 (Fwindow_text_height, Fset_window_margins, Fwindow_margins)
3533 (Fset_window_fringes, Fwindow_fringes, Fset_window_scroll_bars)
3534 (Fwindow_scroll_bars): Check whether argument window is a valid or
3535 live window. Update doc-strings.
3536 (syms_of_window): New symbol Qwindow_valid_p.
3537 * keyboard.c (Fposn_at_x_y): Check whether argument
3538 frame_or_window denotes a valid window.
3539
2751c80f
DA
35402012-08-16 Dmitry Antipov <dmantipov@yandex.ru>
3541
3542 Fix previous char table change.
3543 * lisp.h (CHAR_TABLE_SET): Use sub_char_table_set_contents.
3544 * chartab.c (optimize_sub_char_table): Likewise.
3545
032a42c8
CY
35462012-08-16 Chong Yidong <cyd@gnu.org>
3547
a2d19368
CY
3548 * gtkutil.c (xg_get_font): Demand an Xft font (Bug#3228).
3549
032a42c8
CY
3550 * xfont.c (xfont_open):
3551 * xftfont.c (xftfont_open): Set the font's max_width field.
3552
3553 * nsfont.m (nsfont_open): Similar to the Xft backend, set
3554 min_width to space_width and average_width to the average over
3555 printable ASCII characters.
3556 (ns_char_width): Code cleanup.
3557 (ns_ascii_average_width): New utility function.
3558
3559 * font.h (struct font): Update comments.
3560
a098c930
DA
35612012-08-16 Dmitry Antipov <dmantipov@yandex.ru>
3562
032a42c8 3563 Simple interface to set Lisp_Object fields of character tables.
a098c930
DA
3564 * lisp.h (CSET): New macro.
3565 (char_table_set_extras, char_table_set_contents)
3566 (sub_char_table_set_contents): New function.
3567 * casetab.c, category.c, chartab.c, fns.c, fontset.c, search.c:
3568 * syntax.c: Adjust users.
3569
8be3a09c
SM
35702012-08-16 Stefan Monnier <monnier@iro.umontreal.ca>
3571
3572 * eval.c (eval_sub): Bind lexical-binding.
3573 * lread.c (Qlexical_binding): Make non-static.
3574
ac4845a6
JD
35752012-08-15 Jan Djärv <jan.h.d@swipnet.se>
3576
ddee6515
JD
3577 * nsmenu.m (popupSession): Remove.
3578 (pop_down_menu): Remove endModalSession.
3579 (timeout_handler:): New method.
3580 (runDialogAt:): Get next timeout. Start a NSTimer with that timeout.
3581 Call runModalForWindow. Check timer_fired when it returns.
3582 If not set, cancel timer and break out of loop.
3583 Otherwise loop again, with a new timeout.
3584
3585 * nsterm.m: Include fcntl.h if present.
3586 (fd_entry, t_readfds, inNsSelect): Remove.
3587 (select_writefds, select_valid, select_timeout, selfds)
3588 (select_mutex, apploopnr): Add.
3589 (EV_TRAILER): Call kbd_buffer_store_event_hold only if q_event_ptr.
3590 Otherwise call kbd_buffer_store_event.
3591 (ns_send_appdefined): Remove release of fd_entry.
3592 (ns_read_socket): Always send appdefined. Remove inNsSelect check.
3593 Increment and decrement apploopnr.
3594 (ns_select): If no file descriptors, just do a NSTimer.
3595 Otherwise copy read/write masks and start select thread (fd_handler).
3596 Start main loop and wait for application defined event.
3597 Inform select thread to stop selecting after main loop is exited.
3598 (ns_term_init): Create selfds pipe and set non-blocking.
fc0c31f8 3599 Initialize select_mutex. Start the select thread (fd_handler).
ddee6515
JD
3600 (fd_handler:): Loop forever, wait for info from the main thread
3601 to either start or stop selecting. When select returns, send
3602 and appdefined event.
3603 (sendScrollEventAtLoc:fromEvent:): Check if q_event_ptr is set.
3604 If not call kbd_buffer_store_event.
3605
3606 * nsterm.h (EmacsApp): fd_handler takes id argument.
3607 (EmacsDialogPanel): Add timer_fired and timeout_handler.
3608
ac4845a6
JD
3609 * gtkutil.c (xg_mark_data): Use FRAME_X_P.
3610
eb424fe3
EZ
36112012-08-15 Eli Zaretskii <eliz@gnu.org>
3612
3613 * region-cache.c (move_cache_gap): Update gap_len using the actual
3614 growth of the boundaries array. Do not change cache_len.
3615 (Bug#12196)
3616
4e6a86c6
DA
36172012-08-15 Dmitry Antipov <dmantipov@yandex.ru>
3618
3619 Generalize and cleanup font subsystem checks.
3620 * font.h (FONT_DEBUG, font_assert): Remove.
8be3a09c
SM
3621 * font.c, fontset.c, w32font.c, xfont.c, xftfont.c:
3622 Change font_assert to eassert. Use eassert where appropriate.
4e6a86c6 3623
5bf192ca
DA
36242012-08-15 Dmitry Antipov <dmantipov@yandex.ru>
3625
3626 * gtkutil.c (xg_get_font): Use pango_units_to_double.
3627
f2045622
CY
36282012-08-15 Chong Yidong <cyd@gnu.org>
3629
8be3a09c
SM
3630 * gtkutil.c (xg_get_font): Rename from xg_get_font_name.
3631 When using the new font chooser, use gtk_font_chooser_get_font_desc to
3632 extract the font descriptor instead of just the font name.
3633 In that case, return a font spec instead of a string.
f2045622
CY
3634 (x_last_font_name): Move to this file from xfns.c.
3635
3636 * xfns.c (Fx_select_font): The return value can also be a font
3637 spec. Move x_last_font_name management to gtkutil.c.
3638
3639 * xfaces.c: Make font weight and style symbols non-static.
3640
7f6feb56
SM
36412012-08-15 Stefan Monnier <monnier@iro.umontreal.ca>
3642
3643 * minibuf.c (read_minibuf): Ignore caller's inhibit-read-only
3644 (bug#12117).
3645
fecbd8ff
SM
36462012-08-14 Stefan Monnier <monnier@iro.umontreal.ca>
3647
3648 * alloc.c (Fgarbage_collect): Use plural form consistently.
3649
9b8d5165
EZ
36502012-08-14 Eli Zaretskii <eliz@gnu.org>
3651
3652 * keyboard.c (command_loop_1): Reset ignore_mouse_drag_p flag each
3653 iteration through the command loop. Fixes a problem whereby mouse
3654 movements are ignored until the first mouse click.
3655
f5d9e83a
PE
36562012-08-14 Paul Eggert <eggert@cs.ucla.edu>
3657
3658 Use bool, not int, for Lisp booleans.
3659 This is more natural, and on my platform (GCC 4.7.1 x86-64) it
3660 makes Emacs a bit smaller and presumably a bit faster.
3661 * lisp.h: Include <stdbool.h>.
3662 (struct Lisp_Boolfwd, defvar_bool):
3663 * lread.c (defvar_bool): Use bool, not int, for Lisp booleans.
3664 * regex.c [!emacs]: Include <stdbool.h>.
3665 (false, true): Remove; <stdbool.h> does this for us now.
3666
55802e4a
CY
36672012-08-14 Chong Yidong <cyd@gnu.org>
3668
4abcdac8
CY
3669 * character.c (Fcharacterp): Doc fix (Bug#12076).
3670
3671 * data.c (Findirect_variable): Doc fix (Bug#11040).
3672
55802e4a
CY
3673 * chartab.c (Fmap_char_table): Doc fix (Bug#12061).
3674
3675 * editfns.c (Fformat): Doc fix (Bug#12059).
4abcdac8 3676 (Fsave_current_buffer): Doc fix (Bug#11542).
55802e4a 3677
8e99d072
BR
36782012-08-14 Barry OReilly <gundaetiapo@gmail.com> (tiny change)
3679
3680 * keyboard.c (access_keymap_keyremap): Accept anonymous functions
3681 (bug#12022).
3682
08908aca
MR
36832012-08-14 Martin Rudalics <rudalics@gmx.at>
3684
3685 * frame.c (make_frame_without_minibuffer, make_minibuffer_frame)
3686 (delete_frame, Fmake_frame_invisible, Ficonify_frame):
3687 * minibuf.c (choose_minibuf_frame, read_minibuf):
3688 * w32fns.c (x_create_tip_frame):
3689 * xfns.c (x_create_tip_frame): Call set_window_buffer instead of
3690 Fset_window_buffer (Bug#11984, Bug#12025, Bug#12026).
3691
56120d6f
PE
36922012-08-14 Paul Eggert <eggert@cs.ucla.edu>
3693
3694 * intervals.c (offset_intervals): Remove obsolete comment.
3695
67b77c0b
AS
36962012-08-14 Andreas Schwab <schwab@linux-m68k.org>
3697
3698 * gtkutil.c (find_rtl_image, update_frame_tool_bar): Use NILP.
3699
f48b82fd
GR
37002012-08-14 Gergely Risko <gergely@risko.hu>
3701
3702 * coding.c (decode_coding): Record buffer modification before
3703 disabling undo_list (Bug#11773).
3704
fd318b54
DA
37052012-08-14 Dmitry Antipov <dmantipov@yandex.ru>
3706
3707 Revert and cleanup some recent overlay changes.
3708 * buffer.h (enum overlay_type): Remove.
3709 (buffer_get_overlays, buffer_set_overlays): Likewise.
3710 (buffer_set_overlays_before, buffer_set_overlays_after):
3711 New function. Adjust users.
3712 (unchain_both): Add eassert.
3713
41a62dd9
DA
37142012-08-14 Dmitry Antipov <dmantipov@yandex.ru>
3715
3716 * gtkutil.c (update_frame_tool_bar): Use EQ where appropriate.
3717
5884c324
PE
37182012-08-14 Paul Eggert <eggert@cs.ucla.edu>
3719
3720 * gtkutil.c (xg_mark_data): Don't assume C99.
3721
ca06f160
JD
37222012-08-13 Jan Djärv <jan.h.d@swipnet.se>
3723
3724 * gtkutil.c (xg_frame_tb_info): New struct.
3725 (TB_INFO_KEY): New define.
3726 (xg_free_frame_widgets): Free xg_frame_tb_info for frame if present.
3727 (xg_mark_data): Mark Lisp_Objects in xg_frame_tb_info.
3728 (xg_create_tool_bar): Allocate and initialize a xg_frame_tb_info
3729 if not present.
3730 (update_frame_tool_bar): Return early if data in xg_frame_tb_info
fc0c31f8 3731 is up to date. Otherwise store new data.
ca06f160
JD
3732 (free_frame_tool_bar): Free xg_frame_tb_info if present.
3733
7864a3f7
DA
37342012-08-13 Dmitry Antipov <dmantipov@yandex.ru>
3735
3736 Use KSET for write access to Lisp_Object members of struct kboard.
3737 * keyboard.h (KSET): New macro.
3738 * callint.c, category.c, frame.c, keyboard.c, keyboard.h, macros.c:
3739 * msdos.c, nsfns.m, nsterm.m, term.c, w32fns.c, w32term.c, xfns.c:
3740 * xterm.c: Adjust users.
3741
4c31be61
DA
37422012-08-13 Dmitry Antipov <dmantipov@yandex.ru>
3743
3744 Use BSET for write access to Lisp_Object members of struct buffer.
3745 * buffer.h (BSET): New macro.
3746 * buffer.c, casetab.c, cmds.c, coding.c, data.c, editfns.c:
3747 * fileio.c, frame.c, indent.c, insdel.c, intervals.c, keymap.c:
3748 * minibuf.c, print.c, process.c, syntax.c, undo.c, w32fns.c:
3749 * window.c, xdisp.c, xfns.c: Adjust users.
3750
14ae4239
BT
37512012-08-11 BT Templeton <bpt@hcoop.net> (tiny change)
3752
3753 * lread.c (syms_of_lread): Initialize Vlexical_binding.
3754
32bcadb4
JD
37552012-08-11 Jan Djärv <jan.h.d@swipnet.se>
3756
3d29b2ce 3757 * nsterm.m (not_in_argv): New function.
fc0c31f8 3758 (application:openFile, application:openTempFile:):
3d29b2ce
JD
3759 (application:openFileWithoutUI:, application:openFiles:): Open file
3760 if not_in_argv returns non-zero (bug#12171).
3761
32bcadb4 3762 * gtkutil.c (gtk_font_chooser_dialog_new, GTK_FONT_CHOOSER)
14ae4239
BT
3763 (gtk_font_chooser_set_font, gtk_font_chooser_get_font):
3764 Define for Gtk+ versions less than 3.2.
32bcadb4
JD
3765 (xg_get_font_name): Use those functions/macros here.
3766 Reported by Frans Oilinki <moilinki@gmail.com>.
3767
9ff9402d 37682012-08-11 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
8ccd072a
YM
3769
3770 * unexmacosx.c (copy_data_segment): Copy initialized data in
3771 statically linked libraries from input file rather than memory.
3772
db74a5fc
YM
3773 * unexmacosx.c (print_load_command_name): Add cases LC_MAIN,
3774 LC_SOURCE_VERSION, and LC_DYLIB_CODE_SIGN_DRS.
3775 (dump_it) [LC_DYLIB_CODE_SIGN_DRS]: Call copy_linkedit_data.
3776
25e65510
GM
37772012-08-10 Glenn Morris <rgm@gnu.org>
3778
3779 * conf_post.h (IF_LINT, lint_assume): Move here from lisp.h.
3780 * lisp.h (IF_LINT, lint_assume): Move to conf_post.h.
3781
7961135c
DA
37822012-08-10 Dmitry Antipov <dmantipov@yandex.ru>
3783
3784 Fix last change to allow compilation with low optimization levels.
3785 * intervals.c (INTERVALS_INLINE): Define to EXTERN_INLINE.
3786 Reported by Jan Djärv <jan.h.d@swipnet.se>.
3787
42b3a444
DA
37882012-08-10 Dmitry Antipov <dmantipov@yandex.ru>
3789
3790 Use common inline syntax in intervals.h.
3791 * intervals.h (INTERVALS_INLINE): New macro.
3792 Change all users from LISP_INLINE.
3793
9fb0c957
DA
37942012-08-10 Dmitry Antipov <dmantipov@yandex.ru>
3795
3796 Define Qnone once for all platforms.
3797 * frame.c (Qnone): Define here.
3798 (syms_of_frame): DEFSYM it.
3799 * lisp.h (Qnone): New declaration.
3800 * nsfns.m, nsterm.h, nsterm.m, w32fns.c, w32font.c:
3801 * xfns.c: Remove duplication. Adjust users.
3802
65e8ee52
DA
38032012-08-10 Dmitry Antipov <dmantipov@yandex.ru>
3804
3805 Remove unused macros from intervals.h.
3806 * intervals.h (MERGE_INSERTIONS, DISPLAY_INVISIBLE_GLYPH): Remove.
3807 * intervals.c: Adjust comment.
3808
9b855fd6
EZ
38092012-08-10 Eli Zaretskii <eliz@gnu.org>
3810
3811 * w32fns.c <w32_unicode_gui>: New static variable.
3812 (globals_of_w32fns): Initialize it according to os_subtype.
3813 (w32_init_class, w32_msg_pump, w32_wnd_proc): Use it instead of
3814 testing os_subtype.
3815
39cb9e56 38162012-08-10 Joakim Hårsman <joakim.harsman@gmail.com> (tiny change)
d30be705
EZ
3817 Eli Zaretskii <eliz@gnu.org>
3818
3819 Fix bug #10299 with Unicode characters sent by customized
3820 keyboards created by MSKLC.
3821 * w32fns.c (INIT_WINDOW_CLASS): New macro.
3822 (w32_init_class): Use it to initialize the Emacs class with either
3823 ANSI or Unicode API calls.
3824 (w32_msg_pump): Call GetMessageW and DispatchMessageW on NT and
3825 later.
3826 (w32_wnd_proc): If the character code sent by WM_CHAR or
3827 WM_SYSCHAR is above 255, post a WM_UNICHAR message, not the
3828 original message. Call DefWindowProcW on NT and later.
3829
9374581a
GM
38302012-08-10 Glenn Morris <rgm@gnu.org>
3831
4b94e8cf
GM
3832 * Makefile.in (config_h): Fix conf_post.h out-of-tree build location.
3833
9374581a
GM
3834 * lisp.h (DIRECTORY_SEP): Let configure set it.
3835
a2752828
DA
38362012-08-09 Dmitry Antipov <dmantipov@yandex.ru>
3837
3838 Use TSET for write access to Lisp_Object slots of struct terminal.
3839 * termhooks.h (TSET): New macro.
3840 * coding.c, terminal.c, xselect.c: Adjust users.
3841
cc92c454
SM
38422012-08-08 Stefan Monnier <monnier@iro.umontreal.ca>
3843
3844 * xdisp.c (safe_eval_handler): Remove prototype. Receive args describing
3845 the failing expression, include them in the error message.
3846 * eval.c (internal_condition_case_n): Pass nargs and args to hfun.
3847 * lisp.h (internal_condition_case_n): Update declaration.
3848
4cb3e6b3
DA
38492012-08-08 Dmitry Antipov <dmantipov@yandex.ru>
3850
3851 Inline functions to examine and change buffer overlays.
3852 * buffer.c (unchain_both): New function.
3853 * buffer.h (buffer_get_overlays, buffer_set_overlays):
3854 (buffer_has_overlays): New function.
3855 (enum overlay_type): New enum.
3856 * alloc.c, buffer.c, editfns.c, fileio.c, indent.c:
3857 * insdel.c, intervals.c, print.c, xdisp.c: Adjust users.
3858
8707c1e5
DA
38592012-08-08 Dmitry Antipov <dmantipov@yandex.ru>
3860
3861 Inline functions to examine and change buffer intervals.
3862 * alloc.c (mark_interval_tree): Remove.
3863 (MARK_INTERVAL_TREE): Simplify.
3864 (UNMARK_BALANCE_INTERVALS): Remove. Adjust users.
3865 * intervals.c (buffer_balance_intervals): New function.
3866 (graft_intervals_into_buffer): Adjust indentation.
3867 (set_intervals_multibyte): Simplify.
3868 * buffer.h (BUF_INTERVALS): Remove.
3869 (buffer_get_intervals, buffer_set_intervals): New function.
3870 * alloc.c, buffer.c, editfns.c, fileio.c, indent.c, insdel.c:
3871 * intervals.c, textprop.c: Adjust users.
3872
ad8c997f
DA
38732012-08-08 Dmitry Antipov <dmantipov@yandex.ru>
3874
3875 Inline functions to examine and change string intervals.
3876 * lisp.h (STRING_INTERVALS, STRING_SET_INTERVALS): Remove.
3877 (string_get_intervals, string_set_intervals): New function.
3878 * alloc.c, buffer.c, editfns.c, fns.c, insdel.c, intervals.c:
3879 * lread.c, print.c, textprop.c: Adjust users.
3880
32ac3a6b
GM
38812012-08-08 Glenn Morris <rgm@gnu.org>
3882
3883 * lisp.mk (lisp): Remove language/persian.elc.
3884
77c7bcb1
DA
38852012-08-08 Dmitry Antipov <dmantipov@yandex.ru>
3886
3887 Cleanup intervals.
3888 * intervals.h (NULL_INTERVAL, DEFAULT_INTERVAL): Remove.
3889 (NULL_INTERVAL_P): Likewise. Adjust users.
14ae4239
BT
3890 (FRONT_STICKY_P, END_NONSTICKY_P, FRONT_NONSTICKY_P):
3891 Adjust comment. Move under #if 0.
77c7bcb1
DA
3892 * alloc.c, buffer.c, editfns.c, fns.c, insdel.c, intervals.c:
3893 * print.c, syntax.c, textprop.c, xdisp.c: Adjust users.
3894
9c08a8d4
DA
38952012-08-08 Dmitry Antipov <dmantipov@yandex.ru>
3896
3897 Check total length of intervals with eassert.
3898 * intervals.h (CHECK_TOTAL_LENGTH): Remove.
3899 * intervals.c: Change all users to eassert.
3900
26d16b35
EZ
39012012-08-07 Eli Zaretskii <eliz@gnu.org>
3902
14ae4239
BT
3903 * .gdbinit (xframe, xwindow, nextcons, xcar, xcdr, xlist):
3904 Rename fields to match removal of FGET and WGET and disuse of
26d16b35
EZ
3905 INTERNAL_FIELD in Lisp_Cons.
3906
c644523b
DA
39072012-08-07 Dmitry Antipov <dmantipov@yandex.ru>
3908
3909 Revert and cleanup Lisp_Cons, Lisp_Misc and Lisp_Symbol things.
3910 * lisp.h (struct Lisp_Symbol): Change xname to meaningful
3911 name since all xname users are fixed long time ago. Do not
3912 use INTERNAL_FIELD.
3913 (set_symbol_name, set_symbol_function, set_symbol_plist):
3914 (set_symbol_next, set_overlay_plist): New function.
3915 (struct Lisp_Cons): Do not use INTERNAL_FIELD.
3916 (struct Lisp_Overlay): Likewise.
3917 (CVAR, MVAR, SVAR): Remove.
3918 * alloc.c, buffer.c, buffer.h, bytecode.c, cmds.c, data.c:
3919 * doc.c, eval.c, fns.c, keyboard.c, lread.c, nsselect.m:
3920 * xterm.c: Adjust users.
3921 * .gdbinit: Change to use name field of struct Lisp_Symbol
3922 where appropriate.
3923
6a3d20cc
DA
39242012-08-07 Dmitry Antipov <dmantipov@yandex.ru>
3925
3926 Basic functions to set Lisp_Object and pointer slots of intervals.
3927 * intervals.h (interval_set_parent, interval_set_object):
3928 (interval_set_left, interval_set_right, interval_set_plist):
3929 (interval_copy_parent): New function.
3930 (SET_INTERVAL_OBJECT, SET_INTERVAL_PARENT, INTERVAL_PTR_SIZE): Remove.
14ae4239
BT
3931 (RESET_INTERVAL, COPY_INTERVAL_CACHE, MERGE_INTERVAL_CACHE):
3932 Adjust indentation.
6a3d20cc
DA
3933 (INTERVAL_SIZE): Remove. Adjust users.
3934 * alloc.c, intervals.c, lread.c, textprop.c: Use new functions.
3935
4d2b044c
DA
39362012-08-07 Dmitry Antipov <dmantipov@yandex.ru>
3937
3938 Drop PGET and revert read access to Lisp_Objects slots of Lisp_Process.
3939 * process.h (PGET): Remove.
3940 (struct Lisp_Process): Do not use INTERNAL_FIELD.
3941 * gnutls.c, print.c, process.c, sysdep.c, w32.c, xdisp.c: Adjust users.
3942
d3d50620
DA
39432012-08-07 Dmitry Antipov <dmantipov@yandex.ru>
3944
3945 Drop WGET and revert read access to Lisp_Objects slots of struct window.
3946 * window.h (WGET): Remove.
3947 (struct window): Do not use INTERNAL_FIELD.
3948 * alloc.c, buffer.c, composite.c, dispextern.h, dispnew.c, editfns.c:
3949 * fileio.c, font.c, fontset.c, frame.c, frame.h, fringe.c, indent.c:
3950 * insdel.c, keyboard.c, keymap.c, lisp.h, minibuf.c, msdos.c, nsfns.m:
3951 * nsmenu.m, nsterm.m, print.c, textprop.c, w32fns.c, w32menu.c:
3952 * w32term.c, window.c, xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c:
3953 Adjust users.
3954
d10a51dc
CY
39552012-08-07 Chong Yidong <cyd@gnu.org>
3956
3957 * window.c (Fwindow_edges, Fwindow_pixel_edges)
3958 (Fwindow_absolute_pixel_edges, Fdelete_other_windows_internal)
3959 (Fdelete_window_internal): Signal an error if the window is not on
3960 a live frame (Bug#12025).
3961
e69b0960
DA
39622012-08-07 Dmitry Antipov <dmantipov@yandex.ru>
3963
3964 Drop FGET and revert read access to Lisp_Objects slots of struct frame.
3965 * frame.h (FGET): Remove.
3966 (struct frame): Do not use INTERNAL_FIELD.
3967 * buffer.c, data.c, dispnew.c, dosfns.c, eval.c, fontset.c, frame.c:
3968 * fringe.c, gtkutil.c, minibuf.c, msdos.c, nsfns.m, nsmenu.m, nsterm.m:
3969 * print.c, term.c, w32fns.c, w32menu.c, w32term.c, window.c, window.h:
3970 * xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c: Adjust users.
3971
25a20a3a
JB
39722012-08-06 Juanma Barranquero <lekktu@gmail.com>
3973
3974 * w32.c: Silence compiler warnings.
3975 (map_w32_filename): Remove unused variable `is_fat'.
3976 (chase_symlinks): Add parentheses around expression.
3977
1c6f11f4
GM
39782012-08-06 Glenn Morris <rgm@gnu.org>
3979
1db4583a
GM
3980 * sysdep.c: Respect BROKEN_GETWD.
3981
1c6f11f4
GM
3982 * dispnew.c (GNU_LIBRARY_PENDING_OUTPUT_COUNT, PENDING_OUTPUT_COUNT):
3983 Let configure handle it.
3984 (stdio_ext.h) [DISPNEW_NEEDS_STDIO_EXT]: Include it.
3985
2b90362b
DA
39862012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
3987
3988 Use GCALIGNMENT where appropriate.
3989 * alloc.c (XMALLOC_HEADER_ALIGNMENT, roundup_size):
3990 (union aligned_Lisp_Symbol, union aligned_Lisp_Misc):
3991 (mark_maybe_pointer, pure_alloc): Change to use GCALIGNMENT.
3992
5f50daf2
EZ
39932012-08-06 Eli Zaretskii <eliz@gnu.org>
3994
14ae4239
BT
3995 * w32menu.c (set_frame_menubar, initialize_frame_menubar):
3996 Don't use FRAME_MENU_BAR_ITEMS as an lvalue.
5f50daf2 3997
cbcc7007
SM
39982012-08-06 Stefan Monnier <monnier@iro.umontreal.ca>
3999
4000 * buffer.h (struct buffer): Revert `indirections' to a simple int;
4001 that should be sufficient for everyone.
4002
4d365fa4
JD
40032012-08-06 Jan Djärv <jan.h.d@swipnet.se>
4004
4005 * keyboard.c (timer_check_2): Add break so timer_check returns next
4006 timeout.
4007
dd86bd82
DA
40082012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
4009
4010 Fix Windows build errors introduced after converting to WGET and WSET.
4011 * w32term.c (w32_set_vertical_scroll_bar): Change to use WSET.
4012 Reported by Andy Moreton <andrewjmoreton@gmail.com>.
4013
054e1668
JD
40142012-08-06 Jan Djärv <jan.h.d@swipnet.se>
4015
4016 * nsterm.m (ns_frame_rehighlight): Use FSET.
4017
4018 * nsmenu.m (ns_update_menubar): Use FSET.
4019
21238f11
DA
40202012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
4021
4022 Separate read and write access to Lisp_Object slots of Lisp_Process.
4023 * process.h (PGET, PSET): New macros similar to AREF and ASET.
4024 * gnutls.c, print.c, process.c, sysdep.c, w32.c, xdisp.c: Adjust users.
4025
077288cf
DA
40262012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
4027
4028 Separate read and write access to Lisp_Object slots of struct window.
4029 * window.h (WGET, WSET): New macros similar to AREF and ASET.
4030 * alloc.c, buffer.c, composite.c, dispextern.h, dispnew.c, editfns.c:
4031 * fileio.c, font.c, fontset.c, frame.c, frame.h, fringe.c, indent.c:
4032 * insdel.c, keyboard.c, keymap.c, lisp.h, minibuf.c, msdos.c, nsfns.m:
4033 * nsmenu.m, nsterm.m, print.c, textprop.c, w32fns.c, w32menu.c:
4034 * w32term.c, window.c, xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c:
4035 Adjust users.
4036
71688bd7
DA
40372012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
4038
4039 Fix Windows build errors introduced after converting to FGET and FSET.
4040 * w32term.c (x_frame_rehighlight, x_scroll_bar_create):
4041 (w32_condemn_scroll_bars, w32_redeem_scroll_bar):
4042 (w32_judge_scroll_bars): Change to use FSET.
4043 Reported by Andy Moreton <andrewjmoreton@gmail.com>.
4044
f99bac93
DA
40452012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
4046
4047 Fix replacement typo.
4048 * window.c (replace_window): Set root_window instead of
4049 selected_window. This fixes a total window subsystem
4050 malfunction reported by Bastien Guerry <bzg@gnu.org>.
4051
8c2a0f2d
GM
40522012-08-06 Glenn Morris <rgm@gnu.org>
4053
4054 * lisp.mk (lisp): Add language/persian.elc.
4055
edd74c35
DA
40562012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
4057
4058 Separate read and write access to Lisp_Object slots of struct frame.
4059 * frame.h (FGET, FSET): New macros similar to AREF and ASET.
4060 * buffer.c, data.c, dispnew.c, dosfns.c, eval.c, fontset.c, frame.c:
4061 * fringe.c, gtkutil.c, minibuf.c, msdos.c, nsfns.m, nsmenu.m, nsterm.m:
4062 * print.c, term.c, w32fns.c, w32menu.c, w32term.c, window.c, window.h:
4063 * xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c: Adjust users.
4064
8671676c
AS
40652012-08-05 Andreas Schwab <schwab@linux-m68k.org>
4066
4067 * emacs.c (decode_env_path): Only use defaulted if WINDOWSNT.
4068
663e2b3f
DA
40692012-08-05 Dmitry Antipov <dmantipov@yandex.ru>
4070
4071 Generalize common compile-time constants.
4072 * lisp.h (header_size, bool_header_size, word_size): Now here.
4073 (struct Lisp_Vector): Add comment.
4074 (struct Lisp_Bool_Vector): Move up to define handy constants.
4075 (VECSIZE, PSEUDOVECSIZE): Simplify.
4076 (SAFE_ALLOCA_LISP): Use new constant. Adjust indentation.
4077 * buffer.c, buffer.h, bytecode.c, callint.c, eval.c, fns.c:
4078 * font.c, fontset.c, keyboard.c, keymap.c, macros.c, menu.c:
4079 * msdos.c, w32menu.c, w32term.h, window.c, xdisp.c, xfaces.c:
4080 * xfont.c, xmenu.c: Use word_size where appropriate.
4081
d32e47af
LM
40822012-08-05 Lawrence Mitchell <wence@gmx.li>
4083
4084 * search.c (Freplace_match): Treat \? in the replacement text
4085 literally (Bug#8161).
4086
e5d9c0d1
CY
40872012-08-05 Chong Yidong <cyd@gnu.org>
4088
4089 * term.c (Vsuspend_tty_functions, Vresume_tty_functions):
4090 * frame.c (Vdelete_frame_functions):
4091 * emacs.c (Vkill_emacs_hook): Doc fix.
4092
8da0576b
EZ
40932012-08-04 Eli Zaretskii <eliz@gnu.org>
4094
4095 * xfns.c (x_set_menu_bar_lines): Fix compilation error in
4096 --with-x-toolkit=no builds.
4097 Reported by Carsten Mattner <carstenmattner@gmail.com>.
4098
02676e5d
CY
40992012-08-04 Chong Yidong <cyd@gnu.org>
4100
4101 * syntax.c (Fmodify_syntax_entry): Doc fix.
4102
97147da9
EZ
41032012-08-04 Eli Zaretskii <eliz@gnu.org>
4104
76151e2c
EZ
4105 Fix startup warnings about ../site-lisp on MS-Windows. (Bug#11959)
4106 * w32.c (init_environment): Change the default values of many
4107 environment variables in dflt_envvars[] to NULL, to avoid pushing
14ae4239
BT
4108 them into environment when they were not already defined.
4109 Remove the code that deletes site-lisp subdirectories from the default
76151e2c 4110 value of EMACSLOADPATH, as it is no longer needed.
14ae4239
BT
4111 (check_windows_init_file): Now external, not static.
4112 Use Vload_path as is, without adding anything, as this function is now
76151e2c
EZ
4113 called when Vload_path is already set up.
4114
4115 * w32.h (check_windows_init_file): Add prototype.
4116
4117 * emacs.c (init_cmdargs) [WINDOWSNT]: When running from the build
4118 directory, ignore the /*/i386/ tail in Vinvocation_directory, for
4119 compatibility with Posix platforms.
4120 (main): Move the call to check_windows_init_file to here from
4121 w32.c.
4122 (decode_env_path) [WINDOWSNT]: Expand the %emacs_dir%/ prefix, if
4123 any, in the DEFALT argument into the root of the Emacs build or
4124 installation tree, as appropriate.
4125
4126 * callproc.c (init_callproc_1): Call decode_env_path instead of
4127 doing its equivalent by hand.
4128 (init_callproc): Replace DOS_NT condition with MSDOS, thus letting
4129 the code that sets Vexec_path run on MS-Windows.
4130
4131 * lread.c (init_lread): Add comments to #ifdef's.
4132
97147da9
EZ
4133 * msdos.c (dos_set_window_size, IT_update_begin)
4134 (IT_frame_up_to_date, IT_set_frame_parameters): Use FVAR and WVAR
4135 instead of direct references.
4136
185ee146
PE
41372012-08-04 Paul Eggert <eggert@cs.ucla.edu>
4138
4139 Export DEFAULT_REHASH_* to GDB.
4140 * lisp.h (DEFAULT_REHASH_THRESHOLD, DEFAULT_REHASH_SIZE):
4141 Now constants, not macros.
4142
8834c57a
PE
41432012-08-03 Paul Eggert <eggert@cs.ucla.edu>
4144
98c6f1e3
PE
4145 Remove unnecessary casts involving pointers.
4146 These casts are no longer needed now that we assume C89 or later,
4147 since they involve casting to or from void *.
4148 * alloc.c (make_pure_string, make_pure_c_string, pure_cons)
4149 (make_pure_float, make_pure_vector):
4150 * lisp.h (SAFE_ALLOCA, SAFE_ALLOCA_LISP):
4151 * macros.c (Fstart_kbd_macro):
4152 * menu.c (find_and_return_menu_selection):
4153 * minibuf.c (read_minibuf_noninteractive):
4154 * sysdep.c (closedir):
4155 * xdisp.c (x_produce_glyphs):
4156 * xfaces.c (compare_fonts_by_sort_order):
4157 * xfns.c (x_real_positions, select_visual):
4158 * xselect.c (x_stop_queuing_selection_requests)
4159 (x_get_window_property, x_get_window_property_as_lisp_data):
4160 * xterm.c (x_set_frame_alpha, x_find_modifier_meanings):
4161 Remove unnecessary pointer casts.
4162 * alloc.c (record_xmalloc): New function.
4163 * lisp.h (record_xmalloc): New decl.
4164 (SAFE_ALLOCA): Now takes just one arg -- the size -- and acts
4165 more like a function. This is because the pointer cast is not
4166 needed. All uses changed.
4167 * print.c (print_string, print_error_message): Avoid length recalc.
4168
8834c57a
PE
4169 Improve fix for macroexp crash with debugging (Bug#12118).
4170 * lisp.h (ASET) [ENABLE_CHECKING]: Pay attention to
4171 ARRAY_MARK_FLAG when checking subscripts, because ASET is
4172 not supposed to be invoked from the garbage collector.
4173 See Andreas Schwab in <http://bugs.gnu.org/12118#25>.
4174 (gc_aset): New function, which is like ASET but can be
4175 used in the garbage collector.
4176 (set_hash_key, set_hash_value, set_hash_next, set_hash_hash)
4177 (set_hash_index): Use it instead of ASET.
4178
6dad7178
EZ
41792012-08-03 Eli Zaretskii <eliz@gnu.org>
4180
4181 Support symlinks on latest versions of MS-Windows.
4182 * w32.c: Include winioctl.h and aclapi.h.
4183 (is_symlink, chase_symlinks, enable_privilege, restore_privilege)
4184 (revert_to_self): Forward declarations of static functions.
4185 <static BOOL g_b_init_get_security_info>:
4186 <g_b_init_create_symbolic_link>: New static flags.
4187 (globals_of_w32): Initialize them to zero.
4188 (GetSecurityInfo_Proc, CreateSymbolicLink_Proc): New typedefs.
4189 (map_w32_filename): Improve commentary. Simplify switch.
4190 (SYMBOLIC_LINK_FLAG_DIRECTORY): Define if not defined in system
4191 headers (most versions of MinGW w32api don't).
4192 (get_security_info, create_symbolic_link)
4193 (get_file_security_desc_by_handle, is_symlink, chase_symlinks):
4194 New functions.
4195 (sys_access, sys_chmod): Call 'chase_symlinks' to resolve symlinks
4196 in the argument file name.
4197 (sys_access): Call unc_volume_file_attributes only if
4198 GetFileAttributes fails with network-related error codes.
4199 (sys_rename): Diagnose renaming of a symlink when the user doesn't
4200 have the required privileges.
14ae4239 4201 (get_file_security_desc_by_name): Rename from
6dad7178
EZ
4202 get_file_security_desc.
4203 (stat_worker): New function, with most of the guts of 'stat', and
14ae4239
BT
4204 with addition of handling of symlinks and support for 'lstat'.
4205 If possible, get file's attributes and security information by
6dad7178
EZ
4206 handle, not by name. Produce S_IFLNK bit for symlinks, when
4207 called from 'lstat'.
4208 (stat, lstat): New functions, call 'stat_worker'.
4209 (symlink, readlink, careadlinkat): Rewritten to create and resolve
4210 symlinks when the underlying filesystem supports them.
4211
f162bcc3
PE
42122012-08-02 Paul Eggert <eggert@cs.ucla.edu>
4213
79ea6c20
PE
4214 Fix macroexp crash on Windows with debugging (Bug#12118).
4215 * lisp.h (ASET) [ENABLE_CHECKING]: Ignore ARRAY_MARK_FLAG when
4216 checking subscripts; problem introduced with the recent
4217 "ASET (a, i, v)" rather than "AREF (a, i) = v" patch.
4218 (ARRAY_MARK_FLAG): Now a macro as well as a constant,
4219 since it's used in non-static inline functions now.
4220
c0ce93fd
PE
4221 * xfaces.c (face_at_buffer_position, face_for_overlay_string):
4222 Don't assume buffer size fits in 'int'. Remove unused local.
c71f5156 4223
f162bcc3
PE
4224 Use C99-style 'extern inline' if available.
4225 * buffer.h (BUFFER_INLINE):
4226 * category.h (CATEGORY_INLINE):
4227 * character.h (CHARACTER_INLINE):
4228 * charset.h (CHARSET_INLINE):
4229 * composite.h (COMPOSITE_INLINE):
4230 * dispextern.h (DISPEXTERN_INLINE):
4231 * lisp.h (LISP_INLINE):
4232 * systime.h (SYSTIME_INLINE):
4233 New macro, replacing 'static inline' in this header.
4234 * buffer.h, category.h, character.h, charset.h, composite.h:
4235 * dispextern.h, lisp.h, systime.h:
4236 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
4237 * alloc.c (LISP_INLINE):
4238 * buffer.c (BUFFER_INLINE):
4239 * category.c (CATEGORY_INLINE):
4240 * character.c (CHARACTER_INLINE):
4241 * charset.c (CHARSET_INLINE):
4242 * composite.c (COMPOSITE_INLINE):
4243 * dispnew.c (DISPEXTERN_INLINE):
4244 * sysdep.c (SYSTIME_INLINE):
4245 Define to EXTERN_INLINE, so that the corresponding functions
4246 are compiled into code.
4247 * conf_post.h (INLINE, EXTERN_INLINE, INLINE_HEADER_BEGIN)
4248 (INLINE_HEADER_END): New macros.
4249 * lisp.h (PSEUDOVECTOR_FLAG): Now a macro as well as a constant,
4250 since it's used in non-static inline functions now.
a8333d03 4251 (VALMASK) [!USE_LSB_TAG]: Likewise.
f162bcc3 4252
837b365b
GM
42532012-08-02 Glenn Morris <rgm@gnu.org>
4254
d66b744d
GM
4255 * s/: Remove empty directory.
4256
837b365b
GM
4257 * s/ms-w32.h: Move to ../nt/inc.
4258 * makefile.w32-in (TAGS, TAGS-gmake, MS_W32_H):
4259 Update for new ms-w32.h location.
4260
13294f95
PE
42612012-08-02 Paul Eggert <eggert@cs.ucla.edu>
4262
4263 Port to Solaris 8.
4264 * syswait.h (WRETCODE): Remove, consistently with ../configure.ac.
4265
90df0db3
GM
42662012-08-02 Glenn Morris <rgm@gnu.org>
4267
4268 * nsterm.m (ns_exec_path, ns_load_path): Use SEPCHAR rather than
4269 hard-coding the path separator.
4270
4939150c
PE
42712012-08-01 Paul Eggert <eggert@cs.ucla.edu>
4272
4273 Use "ASET (a, i, v)" rather than "AREF (a, i) = v".
4274 This how ASET and AREF are supposed to work, and makes
4275 it easier to think about future improvements. See
4276 <http://lists.gnu.org/archive/html/emacs-devel/2012-08/msg00026.html>.
4277 * charset.h (set_charset_attr): New function.
4278 All lvalue-style uses of CHARSET_DECODER etc. changed to use it.
4279 * lisp.h (ASET): Rewrite so as not to use AREF in an lvalue style.
4280 (aref_addr): New function. All uses of &AREF(...) changed.
4281 (set_hash_key, set_hash_value, set_hash_next, set_hash_hash)
4282 (set_hash_index): New functions. All lvalue-style uses of
4283 HASH_KEY etc. changed.
4284 * keyboard.c (set_prop): New function. All lvalue-style uses
4285 of PROP changed.
4286
947b2afd
AA
42872012-08-01 Alp Aker <alp.tekin.aker@gmail.com>
4288
4289 * nsterm.m (ns_set_vertical_scroll_bar, ns_redeem_scroll_bar)
4290 (EmacsWindow-accessibilityAttributeValue, EmacsScroller-initFrame:)
4291 (EmacsScroller-dealloc): Adjust to use WVAR. (Bug#12114)
4292 * nsfns.m (ns_set_name_as_filename): Likewise.
4293 * nsmenu.m (ns_update_menubar): Likewise.
4294 * nsselect.m (symbol_to_nsstring): Adjust to use SVAR.
4295
4f5d0325
EZ
42962012-08-01 Eli Zaretskii <eliz@gnu.org>
4297
2008beae
EZ
4298 * .gdbinit (xcar, xcdr, xlist, xwindow, nextcons, xprintsym):
4299 Adapt to latest changes in field names of the corresponding Lisp
288479f6 4300 objects.
2008beae 4301
4f5d0325
EZ
4302 * xdisp.c (try_window_id): Use WVAR in IF_DEBUG code.
4303
fe3cc771
GM
43042012-08-01 Glenn Morris <rgm@gnu.org>
4305
4306 * s/msdos.h: Remove file.
4307 * conf_post.h [MSDOS]: New section, moved from s/msdos.h.
4308 * Makefile.in (S_FILE): Remove.
4309 (config_h): Remove S_FILE.
4310
c90acc54
JB
43112012-08-01 Juanma Barranquero <lekktu@gmail.com>
4312
4313 * s/ms-w32.h (DEVICE_SEP, IS_DIRECTORY_SEP, IS_ANY_SEP):
4314 Remove; moved to nt/config.nt.
4315
d8a05828
DA
43162012-08-01 Dmitry Antipov <dmantipov@yandex.ru>
4317
4318 Use INTERNAL_FIELD for conses and overlays.
4319 * lisp.h (struct Lisp_Cons): Use INTERNAL_FIELD.
4320 Remove obsolete comment.
4321 (MVAR): New macro.
4322 (struct Lisp_Overlay): Use INTERNAL_FIELD.
4323 * alloc.c, buffer.c, buffer.h, fns.c: Adjust users.
4324
8271d590
DA
43252012-08-01 Dmitry Antipov <dmantipov@yandex.ru>
4326
4327 Use INTERNAL_FIELD for symbols.
4328 * lisp.h (SVAR): New macro. Adjust users.
4329 * alloc.c, bytecode.c, cmds.c, data.c, doc.c, eval.c:
4330 * fns.c, keyboard.c, lread.c, xterm.c: Users changed.
4331
3193acd2
DA
43322012-08-01 Dmitry Antipov <dmantipov@yandex.ru>
4333
4334 Use INTERNAL_FIELD for processes.
4335 * process.h (PVAR): New macro. Adjust style.
4336 (struct Lisp_Process): Change Lisp_Object members to INTERNAL_FIELD.
4337 * print.c, process.c, sysdep.c, w32.c, xdisp.c: Users changed.
4338
3a45383a
DA
43392012-08-01 Dmitry Antipov <dmantipov@yandex.ru>
4340
4341 Use INTERNAL_FIELD for windows.
4342 * window.h (WVAR): New macro.
4343 (struct window): Change Lisp_Object members to INTERNAL_FIELD.
4344 * alloc.c, buffer.c, composite.c, dispextern.h, dispnew.c, editfns.c:
4345 * fileio.c, font.c, fontset.c, frame.c, frame.h, fringe.c, indent.c:
4346 * insdel.c, keyboard.c, keymap.c, lisp.h, minibuf.c, nsterm.m, print.c:
4347 * textprop.c, w32fns.c, w32menu.c, w32term.c, window.c, xdisp.c:
4348 * xfaces.c, xfns.c, xmenu.c, xterm.c: Users changed.
4349
c1dbc63c
PE
43502012-08-01 Paul Eggert <eggert@cs.ucla.edu>
4351
4352 * coding.h (CODING_ATTR_FLUSHING): Remove; unused and wouldn't work.
4353
5c0c0e8a
GM
43542012-08-01 Glenn Morris <rgm@gnu.org>
4355
4356 * lisp.h (IS_DIRECTORY_SEP, IS_DEVICE_SEP, IS_ANY_SEP):
4357 Move to configure.ac.
4358
552a99b4
JB
43592012-08-01 Juanma Barranquero <lekktu@gmail.com>
4360
4361 * makefile.w32-in (CONFIG_H): Update dependencies.
4362 (CONF_POST_H): New macro.
4363
4364 * s/ms-w32.h (SEPCHAR, NULL_DEVICE): Remove; moved to nt/config.nt.
4365
8d8e2dfe
GM
43662012-07-31 Glenn Morris <rgm@gnu.org>
4367
bc96620a
GM
4368 * Makefile.in (S_FILE): No longer set by configure.
4369
476b1b2d
GM
4370 * conf_post.h (config_opsysfile): Move earlier, so that WINDOWSNT
4371 is available.
4372 (alloca.h) [WINDOWSNT]: Don't include it on MS Windows.
4373
b2c7a106
GM
4374 * process.h (NULL_DEVICE):
4375 * emacs.c (SEPCHAR):
4376 * editfns.c (USER_FULL_NAME): Let configure set them.
4377
d53d062a
GM
4378 * s/README, s/template.h: Remove files.
4379
4515017f
GM
4380 * conf_post.h [HPUX]: Undefine HAVE_RANDOM and HAVE_RINT.
4381
8d8e2dfe
GM
4382 * conf_post.h (AMPERSAND_FULL_NAME, subprocesses):
4383 Move to configure.ac.
4384
5b20b3cc
EZ
43852012-07-31 Eli Zaretskii <eliz@gnu.org>
4386
1e0afd9a
EZ
4387 * .gdbinit (xframe): Adapt to introduction of FVAR and the
4388 resulting renaming of 'struct frame' members.
4389
5b20b3cc
EZ
4390 * w32menu.c (w32_menu_show): Revert bogus introduction of FVAR.
4391
4392 * fontset.c (dump_fontset): Fix compilation with ENABLE_CHECKING
4393 after introduction of FVAR.
4394
f1310128
JD
43952012-07-31 Jan Djärv <jan.h.d@swipnet.se>
4396
79e721e0
JD
4397 * nsmenu.m (update_frame_tool_bar): Change key from NSObject* to id.
4398
4399 * nsterm.m (ns_draw_fringe_bitmap, ns_dumpglyphs_image): Use drawInRect
4400 instead of compositeToPoint.
4401 (applicationShouldTerminate): Pass NS String literal to NSRunAlertPanel.
4402
8d7c7eed 4403 * nsfns.m, nsmenu.m, nsterm.m: Adopt to struct frame/FVAR changes.
f1310128 4404
e34f7f79
DA
44052012-07-31 Dmitry Antipov <dmantipov@yandex.ru>
4406
4407 Generalize INTERNAL_FIELD between buffers, keyboards and frames.
4408 * lisp.h (INTERNAL_FIELD): New macro.
14ae4239 4409 * buffer.h (BUFFER_INTERNAL_FIELD): Remove.
e34f7f79
DA
4410 (BVAR): Change to use INTERNAL_FIELD.
4411 * keyboard.h (KBOARD_INTERNAL_FIELD): Likewise.
4412 (KVAR): Change to use INTERNAL_FIELD.
4413 * frame.h (FVAR): New macro.
4414 (struct frame): Use INTERNAL_FIELD for all Lisp_Object fields.
3a45383a
DA
4415 * alloc.c, buffer.c, data.c, dispnew.c, dosfns.c, eval.c, frame.c:
4416 * fringe.c, gtkutil.c, minibuf.c, nsfns.m, nsterm.m, print.c:
4417 * term.c, w32fns.c, w32menu.c, w32term.c, window.c, window.h:
e34f7f79
DA
4418 * xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c: Users changed.
4419
c09bfb2f
DA
44202012-07-31 Dmitry Antipov <dmantipov@yandex.ru>
4421
4422 Miscellaneous fixes for non-default X toolkits.
4423 * xfns.c (Fx_file_dialog): Change to SSDATA to avoid warnings.
4424 * xterm.c (x_frame_of_widget): Remove redundant prototype.
4425 Move under #ifdef USE_LUCID.
4426 (x_create_toolkit_scroll_bar): Adjust scroll_bar_name
4427 definition and usage to avoid warnings.
4428
14c114ae
JD
44292012-07-31 Jan Djärv <jan.h.d@swipnet.se>
4430
4431 * nsterm.m (openFiles): Fix previous checkin.
4432
3bd21e82
PE
44332012-07-31 Paul Eggert <eggert@cs.ucla.edu>
4434
4435 * indent.c (compute_motion): Remove unused local.
4436
c1529ded
GM
44372012-07-31 Glenn Morris <rgm@gnu.org>
4438
400d5621
GM
4439 * s/usg5-4-common.h (wait3, WRETCODE): Let configure set them.
4440
268e2432
GM
4441 * conf_post.h [USG5_4]:
4442 Move remaining contents of s/usg5-4-common.h here.
4443 * s/usg5-4-common.h: Remove file.
4444
7552f3ee
GM
4445 * conf_post.h [IRIX6_5]: Move remaining contents of s/irix6-5.h here.
4446 * s/irix6-5.h: Remove file.
4447
6a381852
GM
4448 * conf_post.h [DARWIN_OS]: Move remaining contents of s/darwin.h here.
4449 * s/darwin.h: Remove file.
4450
c1529ded
GM
4451 * conf_post.h [HPUX]: Move random, srandom here from s/hpux10-20.h.
4452 * s/hpux10-20.h: Remove file, which is now empty.
4453
b429a4ee
GM
44542012-07-30 Glenn Morris <rgm@gnu.org>
4455
4456 * conf_post.h: New, split from configure.ac's AH_BOTTOM.
4457 * Makefile.in (config_h): Add conf_post.h.
4458 * makefile.w32-in (CONFIG_H): Add conf_post.h.
4459
adff3182
JD
44602012-07-30 Jan Djärv <jan.h.d@swipnet.se>
4461
4462 * nsterm.m (ns_do_open_file): New variable.
b9031d69 4463 (ns_term_init): Set ns_do_open_file to YES after run returns.
14ae4239
BT
4464 (openFile, openTempFile, openFileWithoutUI, openFiles):
4465 Open files only if ns_do_open_file.
adff3182 4466
c32af1e4
PE
44672012-07-30 Paul Eggert <eggert@cs.ucla.edu>
4468
7393bcbb
PE
4469 * lisp.h (SWITCH_ENUM_CAST): Remove. All uses removed.
4470 This no-op macro hasn't been needed for many years.
4471 * src/regex.c (SWITCH_ENUM_CAST) [!emacs]: Likewise.
4472
c32af1e4
PE
4473 Export DIRECTORY_SEP, TYPEMASK, VALMASK to GDB.
4474 * alloc.c (gdb_make_enums_visible) [USE_LSB_TAG]: Add lsb_bits.
4475 * lisp.h (enum lsb_bits) [USE_LSB_TAG]: New enum, for
4476 gdb_make_enums_visible.
4477 (TYPEMASK, VALMASK) [USE_LSB_TAGS]: Now enum constants, not macros.
4478 (DIRECTORY_SEP): Now a constant, not a macro.
4479
302fc036
EZ
44802012-07-30 Eli Zaretskii <eliz@gnu.org>
4481
4482 * w32fns.c (w32_wnd_proc): Pass w32_keyboard_codepage to
4483 w32_kbd_patch_key as the 2nd arg. (Bug#12082)
4484
4485 * w32term.c <w32_keyboard_codepage>: Renamed from
4486 keyboard_codepage and now external. All users changed.
4487
4488 * w32term.h: Add declaration of w32_keyboard_codepage.
4489
4490 * w32inevt.c (w32_kbd_patch_key): Accept an additional argument --
4491 the codepage to translate keys to Unicode. If this argument is
4492 -1, use the value returned by GetConsoleCP. All callers changed.
4493
88fb40b4
PE
44942012-07-30 Paul Eggert <eggert@cs.ucla.edu>
4495
0aee6912
PE
4496 Update .PHONY listings in makefiles.
4497 * Makefile.in (.PHONY): Add all, mostlyclean, clean,
4498 bootstrap-clean, distclean, maintainer-clean, versioclean,
4499 extraclean, frc.
4500
88fb40b4
PE
4501 * lisp.h (STRING_BYTES_BOUND): Cast entire result to ptrdiff_t.
4502 This is a bit clearer. Fix some commentary typos.
4503
0a763bd1
GM
45042012-07-30 Glenn Morris <rgm@gnu.org>
4505
32bac6d6
GM
4506 * s/netbsd.h: Let configure include signal.h if needed.
4507 Remove file, which is now empty.
4508
b65e7c46
GM
4509 * s/usg5-4-common.h (_longjmp, _setjmp, TIOCSIGSEND):
4510 Let configure set them.
4511 * s/irix6-5.h (_longjmp, _setjmp, TIOCSIGSEND):
4512 No more need to undefine.
0a763bd1 4513
169304bd
AS
45142012-07-30 Andreas Schwab <schwab@linux-m68k.org>
4515
4516 * keymap.c (Fkey_description): Don't remove 0x80 bit from
4517 non-single-byte char when adding meta modifier. (Bug#12090)
4518
6cd7a139
DA
45192012-07-30 Dmitry Antipov <dmantipov@yandex.ru>
4520
4521 Convert safe_call to use variable number of arguments.
4522 * xdisp.c (safe_call): Convert to use varargs. Adjust users.
4523 (safe_call2): Fix comment.
4524 * lisp.h (safe_call): Adjust prototype.
4525 * coding.c (encode_coding_object): Change to use safe_call2.
4526 * xfaces.c (merge_face_heights): Change to use safe_call1.
4527
d34d6ffc
GM
45282012-07-30 Glenn Morris <rgm@gnu.org>
4529
7b8a48e4 4530 * s/aix4-2.h (sigmask): No need to undefine it, since syssignal.h
227f5bd0 4531 does that unconditionally. Remove file, which is now empty.
7b8a48e4 4532
d34d6ffc
GM
4533 * s/freebsd.h, s/gnu-linux.h, s/sol2-6.h, s/unixware.h:
4534 Remove empty files.
4535
03a660a6
PE
45362012-07-30 Paul Eggert <eggert@cs.ucla.edu>
4537
4538 Export to GDB most of lisp.h's remaining object-like macros.
4539 * lisp.h (min, max): Move earlier, because they're used earlier now.
4540 (INTMASK, ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK)
4541 (CHAR_TABLE_STANDARD_SLOTS, CHARTAB_SIZE_BITS_0)
4542 (CHARTAB_SIZE_BITS_1, CHARTAB_SIZE_BITS_2, CHARTAB_SIZE_BITS_3)
4543 (DEFAULT_HASH_SIZE, COMPILED_ARGLIST, COMPILED_BYTECODE)
4544 (COMPILED_CONSTANTS, COMPILED_STACK_DEPTH, COMPILED_DOC_STRING)
4545 (COMPILED_INTERACTIVE, CHAR_ALT, CHAR_SUPER, CHAR_HYPER, CHAR_SHIFT)
4546 (CHAR_CTL, CHAR_META, CHAR_MODIFIER_MASK, CHARACTERBITS)
4547 (MANY, UNEVALLED, FLOAT_TO_STRING_BUFSIZE, MAX_ALLOCA):
4548 Now constants, for GDB. They need not be macros.
4549 (MOST_POSITIVE_FIXNUM, MOST_NEGATIVE_FIXNUM, STRING_BYTES_BOUND):
4550 Now constants, for GDB, as well as macros, for static initializers.
4551 (CHAR_TABLE_STANDARD_SLOTS, CHAR_TABLE_EXTRA_SLOTS):
4552 Move to after the definition of struct Lisp_Char_Table,
4553 since the former now needs that type defined.
4554 (enum CHARTAB_SIZE_BITS, enum CHAR_TABLE_STANDARD_SLOTS)
4555 (enum DEFAULT_HASH_SIZE, enum Lisp_Compiled, enum char_bits)
4556 (enum maxargs, enum FLOAT_TO_STRING_BUFSIZE, enum MAX_ALLOCA):
4557 New enums, for gdb_make_enums_visible.
4558 (GLYPH_MODE_LINE_FACE): Remove; unused.
88fb40b4 4559 * alloc.c (STRING_BYTES_MAX): Now a constant, not a macro.
03a660a6
PE
4560 (gdb_make_enums_visible): Add enum CHARTAB_SIZE_BITS, enum
4561 CHAR_TABLE_STANDARD_SLOTS, enum char_bits, enum DEFAULT_HASH_SIZE,
4562 enum FLOAT_TO_STRING_BUFSIZE, enum Lisp_Bits, enum Lisp_Compiled,
4563 enum maxargs, enum MAX_ALLOCA.
4564 (ARRAY_MARK_FLAG_VAL, PSEUDOVECTOR_FLAG_VAL, VALMASK_VAL): Remove.
4565 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Remove;
4566 no longer needed, now that they are done in lisp.h.
4567
e499d0ee
DA
45682012-07-30 Dmitry Antipov <dmantipov@yandex.ru>
4569
4570 Cleanup string bytes checking.
4571 * alloc.c (GC_STRING_BYTES, CHECK_STRING_BYTES): Remove. Convert
4572 all users to STRING_BYTES or string_bytes if GC_CHECK_STRING_BYTES.
4573 (check_string_bytes): Define to empty if not GC_CHECK_STRING_BYTES.
4574 (check_sblock, compact_small_strings): Simplify.
4575
d5040d2d
PE
45762012-07-29 Paul Eggert <eggert@cs.ucla.edu>
4577
4578 * lisp.h (LISP_INT_TAG, LISP_INT1_TAG, LISP_STRING_TAG): Remove.
4579 These macros are confusing and no longer need to be defined, as
4580 the enum values now suffice. All uses replaced with definiens.
4581 (Lisp_Int1, Lisp_String): Define directly; this is clearer.
4582
7f259ae6
JB
45832012-07-29 Juanma Barranquero <lekktu@gmail.com>
4584
4585 * makefile.w32-in (LISP_H, $(BLD)/emacs.$(O), $(BLD)/w32inevt.$(O))
4586 ($(BLD)/w32console.$(O)): Update dependencies.
4587
7e63e0c3
DA
45882012-07-29 Dmitry Antipov <dmantipov@yandex.ru>
4589
4590 Remove HIDE_LISP_IMPLEMENTATION and cleanup cons free list check.
4591 * lisp.h (HIDE_LISP_IMPLEMENTATION): Remove as useless for a long
4592 time. Adjust users.
4593 (CHECK_CONS_LIST): Remove. Convert all users to check_cons_list.
4594
ffd817eb
JD
45952012-07-29 Jan Djärv <jan.h.d@swipnet.se>
4596
4597 * lread.c (init_lread): Remove if-statement in ifdef HAVE_NS before
4598 setting sitelisp (Bug#12010).
4599
417a7a0e
EZ
46002012-07-29 Eli Zaretskii <eliz@gnu.org>
4601
14ae4239 4602 * w32heap.h (OS_9X): Rename from OS_WINDOWS_95.
417a7a0e
EZ
4603
4604 * w32heap.c (cache_system_info):
4605 * w32.c (sys_rename):
4606 * w32proc.c (find_child_console, sys_kill): All users changed.
4607
387d4d92
PE
46082012-07-29 Paul Eggert <eggert@cs.ucla.edu>
4609
4610 * alloc.c (Fgarbage_collect): Indent as per usual Emacs style.
4611
55a6cca6
EZ
46122012-07-29 Eli Zaretskii <eliz@gnu.org>
4613
4614 * makefile.w32-in (LISP_H): Add $(NT_INC)/stdalign.h.
4615
dbcf001c
DA
46162012-07-29 Dmitry Antipov <dmantipov@yandex.ru>
4617
4618 Cleanup statistics calculation in Fgarbage_collect.
14ae4239
BT
4619 * alloc.c (Fgarbage_collect): Rename t1 to meaningful start.
4620 Fix zombies percentage calculation. Simplify elapsed time calculation.
dbcf001c 4621
e2688e4a
DA
46222012-07-29 Dmitry Antipov <dmantipov@yandex.ru>
4623
4624 Generalize marker debugging code under MARKER_DEBUG and use eassert.
4625 * insdel.c (CHECK_MARKERS, check_markers_debug_flag): Remove.
4626 (gap_left, gap_right, adjust_markers_for_delete, insert_1_both)
4627 (insert_from_string_1, insert_from_gap, insert_from_buffer_1)
4628 (replace_range, replace_range_2, del_range_2): Change to eassert.
4629 * marker.c (byte_char_debug_check): Adjust style.
4630
b46a6a83
PE
46312012-07-29 Paul Eggert <eggert@cs.ucla.edu>
4632
4633 Don't use the abbreviation "win" to refer to Windows (Bug#10421).
4634 * regex.c (MAX_BUF_SIZE): Remove some incorrect and
4635 long-ago-commented-out code that talks about "WIN32".
4636 * w32heap.h (OS_WINDOWS_95): Rename from OS_WIN95.
4637 All uses changed.
4638
e32a5799
PE
46392012-07-28 Paul Eggert <eggert@cs.ucla.edu>
4640
4641 Use Gnulib stdalign module (Bug#9772, Bug#9960).
4642 * alloc.c (XMALLOC_BASE_ALIGNMENT, GC_POINTER_ALIGNMENT, pure_alloc):
4643 Simplify by using alignof.
4644 (pure_alloc) [! USE_LSB_TAG]: Don't over-align EMACS_INT values.
4645 * lisp.h: Include <stdalign.h>.
4646 (GCALIGNMENT): New macro and constant.
4647 (DECL_ALIGN): Remove. All uses replaced by alignas (GCALIGNMENT).
4648 (USE_LSB_TAG): ifdef on alignas, not on DECL_ALIGN.
4649 (stdalign): New macro, if not already defined.
4650
df81cd29
EZ
46512012-07-28 Eli Zaretskii <eliz@gnu.org>
4652
01bd1b0d
EZ
4653 Fix non-ASCII input in non-GUI frames on MS-Windows. (Bug#12055)
4654 * w32inevt.c: Include w32inevt.h.
4655 (w32_read_console_input): New inline function, calls either
4656 ReadConsoleInputA or ReadConsoleInputW, depending on the value of
4657 w32_console_unicode_input.
4658 (fill_queue): Call w32_read_console_input instead of ReadConsoleInput.
4659 (w32_kbd_patch_key, key_event): Use the codepage returned by
4660 GetConsoleCP, rather than the ANSI codepage returned by GetLocaleInfo.
4661 (key_event): use uChar.UnicodeChar only if
4662 w32_console_unicode_input is non-zero.
4663
4664 * w32console.c: Include w32heap.h.
4665 <w32_console_unicode_input>: New global variable.
4666 (initialize_w32_display): Set w32_console_unicode_input to 1 on NT
4667 family of Windows, zero otherwise.
4668
4669 * w32inevt.h: Declare w32_console_unicode_input.
4670
df81cd29
EZ
4671 * xdisp.c (init_iterator): Don't reference tip_frame in a build
4672 --without-x. (Bug#11742)
4673
c20fdd9e
PE
46742012-07-27 Paul Eggert <eggert@cs.ucla.edu>
4675
4676 Adjust GDB to reflect pvec_type changes (Bug#12036).
4677 * .gdbinit (xvectype, xpr, xbacktrace): Adjust to reflect the
14ae4239
BT
4678 2012-07-04 changes to pseudovector representation.
4679 Problem reported by Eli Zaretskii in <http://bugs.gnu.org/12036#30>.
c20fdd9e 4680
32770973 46812012-07-27 Michael Albinus <michael.albinus@gmx.de>
e518bc71
MA
4682
4683 * dbusbind.c (XD_DBUS_VALIDATE_BUS_ADDRESS): Canonicalize session
4684 bus address.
4685 (xd_close_bus, Fdbus_init_bus): Handle reference counter properly.
4686
3438fe21
EZ
46872012-07-27 Eli Zaretskii <eliz@gnu.org>
4688
bcfbc9de
EZ
4689 * alloc.c (listn): Fix the order the arguments are consed onto the
4690 list.
4691
3438fe21
EZ
4692 * lisp.h (enum constype): Use CONSTYPE_HEAP and CONSTYPE_PURE for
4693 enumeration constants, as PURE and HEAP are too general, and clash
4694 with other headers and sources, such as gmalloc.c and the
4695 MS-Windows system headers. All users changed.
4696
eeaea515
DA
46972012-07-27 Dmitry Antipov <dmantipov@yandex.ru>
4698
4699 Revert last save_excursion_save and save_excursion_restore changes.
4700 * alloc.c, editfns.c, marker.c, lisp.h: Revert.
4701 Lots of crashes reported by Chong Yidong <cyd@gnu.org>.
4702
073c88c2
DA
47032012-07-27 Dmitry Antipov <dmantipov@yandex.ru>
4704
4705 Fix recently-introduced typos in Windows port.
4706 Reported by Martin Rudalics <rudalics@gmx.at>.
4707 * w32.c (init_environment): Replace comma with semicolon.
eeaea515 4708 * w32fns.c (syms_of_w32fns): Add missing parenthesis.
073c88c2 4709
4706125e
PE
47102012-07-27 Paul Eggert <eggert@cs.ucla.edu>
4711
4712 Improve GDB symbol export (Bug#12036).
4713 * .gdbinit (xgetptr, xgetint, xgettype): Set $bugfix in different
4714 arms of an 'if', not using conditional expressions; otherwise GDB
4715 complains about the types in the unevaluated arm when the argument
4716 is an integer literal.
4717 (xgetint): Simplify expression.
4718 * alloc.c (gdb_make_enums_visible): New constant. This ports to
4719 GCC 3.4.2 the export of symbols to GDB. Problem reported by Eli
4720 Zaretskii in <http://bugs.gnu.org/12036#13>.
4721 * lisp.h (PUBLISH_TO_GDB): Remove. All uses removed. No longer
4722 needed now that we have gdb_make_enums_visible.
4723 (enum CHECK_LISP_OBJECT_TYPE, enum Lisp_Bits, enum More_Lisp_Bits)
4724 (enum enum_USE_LSB_TAG):
4725 New enum types, packaging up enums that need to be exported to GDB.
4726
694b6c97
DA
47272012-07-27 Dmitry Antipov <dmantipov@yandex.ru>
4728
4729 Utility function to make a list from specified amount of objects.
4730 * lisp.h (enum constype): New datatype.
4731 (listn): New prototype.
4732 * alloc.c (listn): New function.
4733 (Fmemory_use_count, syms_of_alloc): Use it.
4734 * buffer.c (syms_of_buffer): Likewise.
4735 * callint.c (syms_of_callint): Likewise.
4736 * charset.c (define_charset_internal): Likewise.
4737 * coding.c (syms_of_coding): Likewise.
4738 * keymap.c (syms_of_keymap): Likewise.
4739 * search.c (syms_of_search): Likewise.
4740 * syntax.c (syms_of_syntax): Likewise.
4741 * w32.c (init_environment): Likewise.
4742 * w32fns.c (Fw32_battery_status, syms_of_w32fns): Likewise.
4743 * xdisp.c (syms_of_xdisp): Likewise.
4744 * xfns.c (syms_of_xfns): Likewise.
4745
6195f384
DA
47462012-07-27 Dmitry Antipov <dmantipov@yandex.ru>
4747
4748 Fast save_excursion_save and save_excursion_restore.
4749 * lisp.h (struct Lisp_Excursion): New data type.
4750 (PVEC_EXCURSION): New pseudovector type.
4751 (XEXCURSION, XSETEXCURSION, EXCURSIONP): Convenient macros
4752 to deal with it. Adjust comments.
4753 (init_marker, attach_marker): New prototype.
4754 (unchain_marker): Adjust prototype.
4755 * marker.c (attach_marker): Change to global.
4756 (init_marker): New function.
4757 * alloc.c (Fmake_marker, build_marker): Use it.
4758 (build_marker): More easserts.
4759 (mark_object): Handle struct Lisp_Excursion.
4760 * editfns.c (save_excursion_save, save_excursion_restore):
4761 Reimplement to use struct Lisp_Excursion. Add comments.
4762
5eceb8fb
PE
47632012-07-26 Paul Eggert <eggert@cs.ucla.edu>
4764
4765 Fix export of symbols to GDB (Bug#12036).
4766 * alloc.c (ARRAY_MARK_FLAG_VAL, PSEUDOVECTOR_FLAG_VAL, VALMASK_VAL)
4767 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Move these here from
4768 emacs.c, as this is a more-suitable home. Had this been done earlier
4769 the fix for 12036 would have avoided some of the problems noted in
4770 <http://bugs.gnu.org/12036#13> by Eli Zaretskii, as the scope problems
4771 would have been more obvious.
562157c8
PE
4772 * emacs.c: Do not include <verify.h>; no longer needed.
4773 (gdb_CHECK_LISP_OBJECT_TYPE, gdb_DATA_SEG_BITS)
5eceb8fb
PE
4774 (gdb_GCTYPEBITS, gdb_USE_LSB_TAG)
4775 (CHECK_LISP_OBJECT_TYPE, DATA_SEG_BITS, GCTYPEBITS, USE_LSB_TAG):
4776 Remove; now done in lisp.h.
4777 * lisp.h (PUBLISH_TO_GDB): New macro.
4778 (GCTYPEBITS, USE_LSB_TAG, CHECK_LISP_OBJECT_TYPE, enum pvec_type)
4779 (DATA_SEG_BITS): Use it.
4780 (GCTYPEBITS, USE_LSB_TAG): Now also an enum, for GDB.
4781 (CHECK_LISP_OBJECT_TYPE, DATA_SEG_BITS): Now just an enum, for GDB.
4782 * mem-limits.h (EXCEEDS_LISP_PTR): Redo so that DATA_SEG_BITS need
4783 not be usable in #if. This simplifies things.
4784
d6749401
JB
47852012-07-26 Juanma Barranquero <lekktu@gmail.com>
4786
4787 * makefile.w32-in ($(BLD)/emacs.$(O)): Update dependencies.
4788
1781b9e9
PE
47892012-07-26 Paul Eggert <eggert@cs.ucla.edu>
4790
d89518db 4791 Simplify export of symbols to GDB (Bug#12036).
1781b9e9
PE
4792 * .gdbinit (xgetptr, xgetint, xgettype): Don't use "set $bugfix =
4793 $bugfix.i", as this doesn't work (with GDB 7.4.1, anyway).
4794 (xgetptr, xgetint, xgettype, xcoding, xcharset, xprintbytestr):
4795 Adjust to changes in lisp.h and emacs.c, by using
4796 CHECK_LISP_OBJECT_TYPE rather than gdb_use_struct, VALMASK instead
4797 of $valmask, DATA_SEG_BITS instead of gdb_data_seg_bits,
4798 INTTYPEBITS instead of gdb_gctypebits - 1, USE_LSB_TAG instead of
4799 gdb_use_lsb, (1 << GCTYPEBITS) - 1 instead of $tagmask, VALBITS
4800 instead of gdb_valbits.
4801 (xvectype, xvector, xpr, xprintstr, xbacktrace): Similarly, use
4802 PSEUDOVECTOR_FLAG instead of PVEC_FLAG, and ARRAY_MARK_FLAG
4803 instead of gdb_array_mark_flag.
4804 (xboolvector): Get size from $->size, not $->header.size.
4805 Use BOOL_VECTOR_BITS_PER_CHAR rather than mystery constants.
4806 (xreload, hook-run, hookpost-run): Remove.
4807 * emacs.c: Include <verify.h>.
4808 (gdb_use_lsb, gdb_use_struct, gdb_valbits, gdb_gctypebits)
4809 (gdb_data_seg_bits, PVEC_FLAG, gdb_array_mark_flag, gdb_pvec_type):
4810 Remove.
4811 (gdb_CHECK_LISP_OBJECT_TYPE, gdb_DATA_SEG_BITS, gdb_GCTYPEBITS)
4812 (gdb_USE_LSB_TAG): New enum constants.
4813 (CHECK_LISP_OBJECT_TYPE, DATA_SEG_BITS, GCTYPEBITS, USE_LSB_TAG):
4814 Also define these as enum constants, so they're visible to GDB.
4815 (ARRAY_MARK_FLAG_VAL, PSEUDOVECTOR_FLAG_VAL, VALMASK_VAL): New macros.
4816 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Also define these
4817 as constants, so they're visible to GDB.
4818 * lisp.h (VALBITS, INTTYPEBITS, FIXNUM_BITS, PSEUDOVECTOR_SIZE_BITS)
4819 (PSEUDOVECTOR_SIZE_MASK, PVEC_TYPE_MASK, BOOL_VECTOR_BITS_PER_CHAR):
4820 Now enum constants, not macros, so they're visible to GDB.
4821 (CHECK_LISP_OBJECT_TYPE, DATA_SEG_BITS): Default to 0, as this is
4822 more convenient now. All uses changed.
4823 (VALMASK) [USE_LSB_TAG]: Also define in this case.
4824 * mem-limits.h (EXCEEDS_LISP_PTR): Adjust to DATA_SEG_BITS change.
4825
3628596a
DA
48262012-07-26 Dmitry Antipov <dmantipov@yandex.ru>
4827
4828 Explicitly free restriction data that are not needed anymore.
4829 * editfns.c (save_restriction_restore): Free restriction data.
4830
7abaf5cc
SM
48312012-07-26 Stefan Monnier <monnier@iro.umontreal.ca>
4832
4833 * eval.c (Fautoload_do_load): Rename from do_autoload, export to Lisp,
4834 add argument, tune behavior, and adjust all callers.
4835
71f88e00
PE
48362012-07-25 Paul Eggert <eggert@cs.ucla.edu>
4837
4838 Use typedef for EMACS_INT, EMACS_UINT.
4839 * lisp.h, s/ms-w32.h (EMACS_INT, EMACS_UINT): Use typedefs rather
4840 than macros. This simplifies debugging in the usual case, since
4841 it lets GDB show addresses as 'EMACS_INT *' rather than 'long int *'
4842 and it allows expressions involving EMACS_INT casts.
4843 * .gdbinit (xreload): Simplify by using EMACS_INT cast.
4844
57ec3034
JD
48452012-07-25 Jan Djärv <jan.h.d@swipnet.se>
4846
4847 * nsterm.m (ns_read_socket): Return early if there is a modal
4848 window (Bug#12043).
4849
8137e7b3
MR
48502012-07-25 Martin Rudalics <rudalics@gmx.at>
4851
4852 * frame.c (Fredirect_frame_focus): In doc-string don't mention
4853 that FOCUS-FRAME can be omitted.
4854
04e9897c
DA
48552012-07-25 Dmitry Antipov <dmantipov@yandex.ru>
4856
4857 Adjust buffer text indirection counters at the end of Fkill_buffer.
4858 * buffer.c (Fkill_buffer): Adjust indirection counters when the
4859 buffer is definitely dead. This should really fix an issue reported
4860 by Christoph Scholtes again. (Bug#12007).
4861 (init_buffer_once): Initialize indirection counters of
4862 buffer_defaults and buffer_local_symbols (for sanity and safety).
4863
8a0484e1
EZ
48642012-07-24 Eli Zaretskii <eliz@gnu.org>
4865
4866 * xdisp.c (init_iterator): Don't compute dimensions of truncation
4867 and continuation glyphs on tooltip frames, leave them at zero.
4868 Avoids continued lines in tooltips. (Bug#11832)
4869
fa691a83
DA
48702012-07-24 Dmitry Antipov <dmantipov@yandex.ru>
4871
4872 Simplify copy_overlay.
04e9897c 4873 * buffer.c (copy_overlay): Simplify. Use build_marker.
fa691a83
DA
4874 * lisp.h (struct Lisp_Overlay): Restore comment with minor tweaks.
4875
436bc8e0
EZ
48762012-07-23 Eli Zaretskii <eliz@gnu.org>
4877
4878 * print.c (print_object): Don't crash when a frame's name is nil
4879 or invalid. (Bug#12025)
4880
4881 * window.c (decode_any_window): Disable CHECK_LIVE_FRAME test, as
4882 it signals an error when a tooltip frame is being created.
4883
d7a7fda3
DA
48842012-07-23 Dmitry Antipov <dmantipov@yandex.ru>
4885
4886 Cleanup miscellaneous objects allocation and initialization.
4887 * alloc.c (allocate_misc): Change to static. Add argument to
4888 specify the subtype. Adjust comment and users.
4889 (build_overlay): New function.
4890 * buffer.c (copy_overlays, Fmake_overlay): Use it.
4891 * lisp.h (struct Lisp_Overlay): Remove obsolete comment.
4892 (allocate_misc): Remove prototype.
4893 (build_overlay): Add prototype.
4894
48952012-07-23 Dmitry Antipov <dmantipov@yandex.ru>
372f8ffc
DA
4896
4897 Swap buffer text indirection counters in Fbuffer_swap_text.
4898 * buffer.c (Fbuffer_swap_text): Swap indirections too.
4899 This avoids crash reported by Christoph Scholtes at
4900 http://lists.gnu.org/archive/html/bug-gnu-emacs/2012-07/msg00785.html.
4901
9d7fa573
JD
49022012-07-22 Jan Djärv <jan.h.d@swipnet.se>
4903
4904 * nsmenu.m (Popdown_data): New struct.
4905 (pop_down_menu): p->pointer is Popdown_data. Release the pool and
4906 free Popdown_data.
4907 (ns_popup_dialog): Use NSAutoreleasePool and pass it to pop_down_menu.
4908 (initWithContentRect): Make imgView and contentView non-static
4909 and autorelease them. Also autorelease img and matrix (Bug#12005).
4910 (dealloc): Remove (Bug#12005).
4911
0dd6d66d
DA
49122012-07-22 Dmitry Antipov <dmantipov@yandex.ru>
4913
4914 Adjust consing_since_gc when objects are explicitly freed.
4915 * alloc.c (GC_DEFAULT_THRESHOLD): New macro.
4916 (Fgarbage_collect): Use it. Change minimum to 1/10 of default.
4917 (free_cons, free_misc): Subtract object size from consing_since_gc.
4918
d36d71df
DA
49192012-07-22 Dmitry Antipov <dmantipov@yandex.ru>
4920
4921 Simplify and cleanup markers positioning code.
4922 * marker.c (attach_marker): More useful eassert.
4923 (live_buffer, set_marker_internal): New function.
4924 (Fset_marker, set_marker_restricted): Use set_marker_internal.
4925 (set_marker_both, set_marker_restricted_both): Use live_buffer.
4926
fb9ea40f
PE
49272012-07-22 Paul Eggert <eggert@cs.ucla.edu>
4928
4929 * buffer.h (struct buffer.indirections): Now ptrdiff_t, not int,
4930 as it's limited by the amount of memory, not by INT_MAX.
4931
2d5c5f7d
EZ
49322012-07-21 Eli Zaretskii <eliz@gnu.org>
4933
07fb592e
EZ
4934 * keyboard.c (keys_of_keyboard): Bind language-change to 'ignore'
4935 in special-event-map. See the discussion at
4936 http://lists.gnu.org/archive/html/emacs-devel/2012-06/msg00417.html
4937 for the reasons.
4938
37a9eac8 4939 * w32menu.c (add_menu_item): Cast to ULONG_PTR when assigning
14ae4239
BT
4940 info.dwItemData. Fixes crashes on 64-bit Windows.
4941 Suggested by Fabrice Popineau <fabrice.popineau@supelec.fr>.
2d5c5f7d 4942
c4328746
JD
49432012-07-21 Jan Djärv <jan.h.d@swipnet.se>
4944
fc0c31f8 4945 * nsterm.m (accessibilityAttributeValue): New function. (Bug#11134).
4b17afa7 4946 (conversationIdentifier): Return value is NSInteger.
784051c4 4947 * nsterm.m (accessibilityAttributeValue): Surround with NS_IMPL_COCOA.
c4328746 4948
6e5d1c12
CY
49492012-07-21 Chong Yidong <cyd@gnu.org>
4950
4951 * window.c (decode_any_window): Signal an error if the window is
4952 on a dead frame (Bug#11984).
4953
9928463d
DA
49542012-07-20 Dmitry Antipov <dmantipov@yandex.ru>
4955
4956 Add indirection counting to speed up Fkill_buffer.
4957 * buffer.h (struct buffer): New member.
4958 * buffer.c (Fget_buffer_create): Set indirection counter to 0.
4959 (Fmake_indirect_buffer): Set indirection counter to -1, increment
4960 base buffer indirection counter.
4961 (compact_buffer): If ENABLE_CHECKING, verify indirection counters.
4962 (Fkill_buffer): Adjust indirection counters as needed, don't walk
4963 through buffer list if indirection counter is 0.
4964
f8643a6b
DA
49652012-07-20 Dmitry Antipov <dmantipov@yandex.ru>
4966
4967 Extend the value returned by Fgarbage_collect with heap statistics.
4968 * alloc.c (Qheap): New symbol.
4969 (syms_of_alloc): DEFSYM it.
4970 (Fgarbage_collect): If DOUG_LEA_MALLOC, add mallinfo data.
4971 (Fmemory_free): Remove.
4972 (syms_of_alloc): Don't defsubr it.
4973 * buffer.c (Fcompact_buffer): Remove.
4974 (syms_of_buffer): Don't defsubr it.
4975
dac616ff
DA
49762012-07-20 Dmitry Antipov <dmantipov@yandex.ru>
4977
4978 Make maybe_gc inline.
4979 Verify that inlining is always possible (GCC 4.7.1, -O3 -Winline).
4980 * lisp.h (consing_since_gc, gc_relative_threshold)
4981 (memory_full_cons_threshold): Revert declaration.
4982 (maybe_gc): Remove prototype, define as inline.
4983 * alloc.c: Remove old commented-out code.
4984 (consing_since_gc, gc_relative_threshold)
4985 (memory_full_cons_threshold): Revert to global.
4986 (maybe_gc): Remove.
4987
d7ea76b4
DA
49882012-07-20 Dmitry Antipov <dmantipov@yandex.ru>
4989
4990 Simple wrapper for make_unibyte_string, adjust font_open_by_name.
4991 * lisp.h (build_unibyte_string): New function.
4992 * dosfns.c, fileio.c, fns.c, ftfont.c, process.c:
4993 * sysdep.c, w32fns.c, xfns.c: Use it.
4994 * font.c (font_open_by_name): Change 2nd and 3rd args to the only arg
4995 of type Lisp_Object to avoid redundant calls to make_unibyte_string.
4996 Adjust users accordingly.
4997 * font.h (font_open_by_name): Adjust prototype.
4998
765e61e3
DA
49992012-07-20 Dmitry Antipov <dmantipov@yandex.ru>
5000
5001 Cleanup calls to Fgarbage_collect.
5002 * lisp.h (maybe_gc): New prototype.
5003 (consing_since_gc, gc_relative_threshold, memory_full_cons_threshold):
5004 Remove declarations.
5005 * alloc.c (maybe_gc): New function.
5006 (consing_since_gc, gc_relative_threshold, memory_full_cons_threshold):
5007 Make them static.
5008 * bytecode.c (MAYBE_GC): Use maybe_gc.
5009 * eval.c (eval_sub, Ffuncall): Likewise.
5010 * keyboard.c (read_char): Likewise. Adjust call to maybe_gc
5011 to avoid dependency from auto-save feature.
5012
52b852c7
PE
50132012-07-19 Paul Eggert <eggert@cs.ucla.edu>
5014
5015 * buffer.h (FOR_EACH_BUFFER): Rename from 'for_each_buffer'.
5016 (FOR_EACH_PER_BUFFER_OBJECT_AT): Rename from
5017 'for_each_per_buffer_object_at'.
5018 All uses changed. It's better to use upper-case for macros that
5019 cannot be implemented as functions, to give the reader a clue
5020 that they're special.
5021
5db81e33
SM
50222012-07-19 Stefan Monnier <monnier@iro.umontreal.ca>
5023
5024 * alloc.c (Fgarbage_collect): Tweak docstring.
5025
5b835e1d
DA
50262012-07-19 Dmitry Antipov <dmantipov@yandex.ru>
5027
5028 Tweak the value returned from Fgarbage_collect again.
5029 * alloc.c (Fgarbage_collect): New return value, as confirmed in
5030 http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00418.html.
5031 Adjust documentation.
5032 (total_vector_bytes): Rename to total_vector_slots, adjust
5033 accounting.
5034 (total_free_vector_bytes): Rename to total_free_vector_slots,
5035 adjust accounting.
5036 (Qstring_bytes, Qvector_slots): New symbols.
5037 (syms_of_alloc): DEFSYM them.
5038
9cd47b72
DA
50392012-07-19 Dmitry Antipov <dmantipov@yandex.ru>
5040
5041 Buffer compaction primitive which may be used from Lisp.
5042 * buffer.c (compact_buffer, Fcompact_buffer): New function.
5043 (syms_of_buffer): Register Fcompact_buffer.
5044 * alloc.c (Fgarbage_collect): Use compact_buffer.
5045 * buffer.h (compact_buffer): New prototype.
5046 (struct buffer_text): New member.
5047
d17337e5
DA
50482012-07-19 Dmitry Antipov <dmantipov@yandex.ru>
5049
5050 New macro to iterate over all buffers, miscellaneous cleanups.
5051 * lisp.h (all_buffers): Remove declaration.
5052 * buffer.h (all_buffers): Add declaration, with comment.
5053 (for_each_buffer): New macro.
5054 * alloc.c (Fgarbage_collect, mark_object): Use it.
5055 * buffer.c (Fkill_buffer, Fbuffer_swap_text, Fset_buffer_multibyte)
5056 (init_buffer): Likewise.
5057 * data.c (Fset_default): Likewise.
5058 * coding.c (code_conversion_restore): Remove redundant check
5059 for dead buffer.
5060 * buffer.c (Fkill_buffer): Likewise. Remove obsolete comment.
5061
60cfd278
AS
50622012-07-18 Andreas Schwab <schwab@linux-m68k.org>
5063
5064 Fix bug that created negative-length intervals.
5065 * intervals.c (merge_interval_right, merge_interval_left):
5066 Do not zero out this interval if it is absorbed by its children,
5067 as this interval's total length doesn't change in that case. See
5068 <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00403.html>.
5069
d06714cb
PE
50702012-07-18 Paul Eggert <eggert@cs.ucla.edu>
5071
83713154
PE
5072 * alloc.c (Fmake_bool_vector): Fix off-by-8 bug
5073 when invoking (make-bool-vector N t) and N is a positive
5074 multiple of 8 -- the last 8 bits were mistakenly cleared.
5075
d06714cb
PE
5076 Remove some struct layout assumptions in bool vectors.
5077 * alloc.c (bool_header_size): New constant.
5078 (header_size, word_size): Move earlier, as they're now used earlier.
5079 Use 'word_size' in a few more places, where it's appropriate.
5080 (Fmake_bool_vector, sweep_vectors): Don't assume that there is no
5081 padding before the data member of a bool vector.
5082 (sweep_vectors): Use PSEUDOVECTOR_TYPEP, in an eassert, rather
5083 than doing the check by hand with an abort ().
5084
464d5a5e
SM
50852012-07-18 Stefan Monnier <monnier@iro.umontreal.ca>
5086
5fbc0409
SM
5087 * eval.c (Fdefvar): Don't check constants since we only set the var if
5088 it's not yet defined anyway (bug#11904).
5089
464d5a5e
SM
5090 * lisp.h (last_undo_boundary): Declare new var.
5091 * keyboard.c (command_loop_1): Set it.
5092 * cmds.c (Fself_insert_command): Use it to only remove boundaries that
5093 were auto-added by the command loop (bug#11774).
5094
8dc2e44a
AS
50952012-07-18 Andreas Schwab <schwab@linux-m68k.org>
5096
5097 * w32font.c (Qsymbol): Remove local definition.
5098 (syms_of_w32font): Don't DEFSYM it.
5099
169925ec
DA
51002012-07-18 Dmitry Antipov <dmantipov@yandex.ru>
5101
5102 Fix sweep_vectors to handle large bool vectors correctly.
5103 * alloc.c (sweep_vectors): Account total_vector_bytes for
5104 bool vectors larger than VBLOCK_BYTES_MAX.
5105
5fbfb018
CY
51062012-07-18 Chong Yidong <cyd@gnu.org>
5107
5108 * frame.c (x_set_frame_parameters): Revert bogus change introduced
5109 in 2012-05-25 commit by Paul Eggert (Bug#11738).
5110
3ab6e069
DA
51112012-07-18 Dmitry Antipov <dmantipov@yandex.ru>
5112
5113 Return more descriptive data from Fgarbage_collect.
5114 Suggested by Stefan Monnier in
5115 http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00369.html.
5116 * alloc.c (bounded_number): New function.
5117 (total_buffers, total_vectors): New variable.
5118 (total_string_size): Rename to total_string_bytes, adjust users.
5119 (total_vector_size): Rename to total_vector_bytes, adjust users.
5120 (sweep_vectors): Account total_vectors and total_vector_bytes.
5121 (Fgarbage_collect): New return value. Adjust documentation.
5122 (gc_sweep): Account total_buffers.
5123 (Fmemory_free, Fmemory_use_counts): Use bounded_number.
5124 (VECTOR_SIZE): Remove.
5125 * data.c (Qfloat, Qvector, Qsymbol, Qstring, Qcons): Make global.
5126 (Qinterval, Qmisc): New symbols.
5127 (syms_of_data): Initialize them.
5128 * lisp.h (Qinterval, Qsymbol, Qstring, Qmisc, Qvector, Qfloat)
5129 (Qcons, Qbuffer): New declarations.
5130
6d02fe5b
PE
51312012-07-17 Paul Eggert <eggert@cs.ucla.edu>
5132
5133 * alloc.c (Fmemory_free): Account for memory-free's own storage.
5134 Round up, not down. Improve doc.
5135
b7ffe040
DA
51362012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
5137
5138 Restore old code in allocate_string_data to avoid Faset breakage.
5139 Reported by Julien Danjou <julien@danjou.info> in
5140 http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00371.html.
5141 * alloc.c (allocate_string_data): Restore old code with minor
5142 adjustments, fix comment to explain this subtle issue.
5143
4dc7c8d5
SM
51442012-07-17 Eli Zaretskii <eliz@gnu.org>
5145
5146 Remove FILE_SYSTEM_CASE.
5147 * s/msdos.h (FILE_SYSTEM_CASE): Don't define.
5148
5149 * fileio.c (FILE_SYSTEM_CASE): Don't define.
5150 (Ffile_name_directory, Fexpand_file_name): Don't use FILE_SYSTEM_CASE.
5151 Fixes problems on MS-DOS with Vtemp_file_name_pattern when
5152 call-process-region passes it through expand-file-name.
5153
5154 * dired.c (file_name_completion): Don't use FILE_SYSTEM_CASE.
5155
51562012-07-17 Andreas Schwab <schwab@linux-m68k.org>
5157
5158 Fix crash when creating indirect buffer (Bug#11917)
5159 * buffer.c (buffer_lisp_local_variables): Add argument CLONE.
5160 Don't handle unbound variables specially if non-zero.
5161 (Fbuffer_local_variables): Pass zero.
5162 (clone_per_buffer_values): Pass non-zero.
5163
51642012-07-17 Andreas Schwab <schwab@linux-m68k.org>
5165
5166 * gnutls.c (emacs_gnutls_handshake): Revert last change. Add QUIT
5167 to make the loop interruptible.
5168
51692012-07-17 Andreas Schwab <schwab@linux-m68k.org>
5170
5171 * gnutls.c (emacs_gnutls_handshake): Only retry if
5172 GNUTLS_E_INTERRUPTED.
5173
cce7fefc
DA
51742012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
5175
5176 Cleanup and convert miscellaneous checks to eassert.
5177 * alloc.c (mark_interval): Fix comment, partially rephrase
5178 old comment from intervals.h (see below).
5179 * intervals.c (find_interval, adjust_intervals_for_insertion)
5180 (delete_interval, adjust_intervals_for_deletion)
5181 (graft_intervals_into_buffer, temp_set_point_both, copy_intervals):
5182 Convert to eassert.
5183 (adjust_intervals_for_insertion, make_new_interval):
5184 Remove obsolete and unused code.
5185 * intervals.h (struct interval): Remove obsolete comment.
5186 * textprotp.c (erase_properties): Remove unused code.
5187 (Fadd_text_properties, set_text_properties_1, Fremove_text_properties)
5188 (Fremove_list_of_text_properties): Convert to eassert.
5189
9ea10cc3
CY
51902012-07-17 Chong Yidong <cyd@gnu.org>
5191
5192 * editfns.c (Finsert_char): Doc fix.
5193
3900d5de
DA
51942012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
5195
5196 Fix previous change to make Fmemory_free always accurate.
5197 * alloc.c (make_interval): Update total_free_intervals.
5198 (make_float): Likewise for total_free_floats.
5199 (free_cons, Fcons): Likewise for total_free_conses.
5200 (SETUP_ON_FREE_LIST, allocate_vector_from_block):
5201 Likewise for total_free_vector_bytes.
5202 (Fmake_symbol): Likewise for total_free_symbols.
5203 (bytes_free): Remove.
5204
7098646f
DA
52052012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
5206
5207 Simple free memory accounting feature.
5208 * alloc.c (bytes_free, total_free_vector_bytes): New variable.
5209 (sweep_vectors): Accumulate size of free vectors.
5210 (Fgarbage_collect): Setup bytes_free.
5211 (Fmemory_free): New function.
5212 (syms_of_alloc): Register it.
5213
22657b40
DA
52142012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
5215
5216 Cleanup overlays checking.
5217 * buffer.h (OVERLAY_VALID): Remove as useless synonym of OVERLAYP.
5218 * buffer.c (overlay_touches_p, recenter_overlay_lists): Change to
5219 eassert and OVERLAYP.
5220 (sort_overlays): Change to use OVERLAYP.
5221
ddfc8813
RK
52222012-07-16 René Kyllingstad <Rene@Kyllingstad.com> (tiny change)
5223
5224 * editfns.c (Finsert_char): Make it interactive, and make the
5225 second arg optional. Copy interactive spec and docstring from
5226 ucs-insert.
5227
7c26cf3c
PE
52282012-07-17 Paul Eggert <eggert@cs.ucla.edu>
5229
5230 * floatfns.c (Fabs): Do not wrap fabs inside IN_FLOAT (Bug#11913).
5231 Unlike the other wrapped functions, fabs has an unspecified
5232 effect on errno.
5233
5d127af9
JD
52342012-07-16 Jan Djärv <jan.h.d@swipnet.se>
5235
5236 * nsterm.m (keyDown): Interpret flags without left/right bits
5237 as the left key (Bug#11670).
5238
6a0dd1d7
DA
52392012-07-16 Dmitry Antipov <dmantipov@yandex.ru>
5240
5241 Remove empty and useless init functions.
5242 * lisp.h (init_character_once, init_fns, init_image)
5243 (init_filelock, init_sound): Remove prototype.
5244 * character.c (init_character_once): Remove.
5245 * filelock.c (init_filelock): Likewise.
5246 * fns.c (init_fns): Likewise.
5247 * image.c (init_image): Likewise.
5248 * sound.c (init_sound): Likewise.
5249 * emacs.c (main): Adjust accordingly.
5250
7a6136fd
DA
52512012-07-16 Dmitry Antipov <dmantipov@yandex.ru>
5252
5253 * gtkutil.h: Tiny cleanups.
5254 (use_old_gtk_file_dialog): Remove useless declaration.
5255 (xg_uses_old_file_dialog): Add suggested const attribute.
5256
ce811ad9
EZ
52572012-07-15 Eli Zaretskii <eliz@gnu.org>
5258
5259 * bidi.c (MAX_STRONG_CHAR_SEARCH): New macro.
5260 (bidi_paragraph_init): Use it to limit search forward for a strong
5261 directional character in abnormally large paragraphs full of
5262 neutral or weak characters. (Bug#11943)
5263
c9adfeaa
SF
52642012-07-15 Stefano Facchini <stefano.facchini@gmail.com> (tiny change)
5265
5266 * gtkutil.c (xg_create_tool_bar): Apply "primary-toolbar" style to
5267 the toolbar (Bug#9451).
5268 (xg_make_tool_item): Give the widget event box a transparent
5269 background.
5270
fff62aa9
DA
52712012-07-15 Dmitry Antipov <dmantipov@yandex.ru>
5272
5273 Cleanup basic allocation variables and functions.
5274 * alloc.c (ignore_warnings, init_intervals, init_float)
5275 (init_cons, init_symbol, init_marker): Remove.
5276 (interval_block_index): Initialize to INTERVAL_BLOCK_SIZE.
5277 (float_block_index): Initialize to FLOAT_BLOCK_SIZE.
5278 (cons_block_index): Initialize to CONS_BLOCK_SIZE.
5279 (symbol_block_size): Initialize to SYMBOL_BLOCK_SIZE.
5280 (marker_block_index): Initialize to MARKER_BLOCK_SIZE.
5281 (staticidx, init_alloc_once, init_strings, free_ablock):
5282 Remove redundant initialization.
5283 * fns.c (init_weak_hash_tables): Remove.
5284 * lisp.h (init_weak_hash_tables): Remove prototype.
5285
9730daca
DA
52862012-07-15 Dmitry Antipov <dmantipov@yandex.ru>
5287
5288 Use zero_vector where appropriate.
5289 * alloc.c (zero_vector): Define as Lisp_Object. Adjust users
5290 accordingly.
5291 * lisp.h (zero_vector): New declaration.
5292 * font.c (null_vector): Remove.
5293 (syms_of_font): Remove initialization and staticpro.
5294 (font_list_entities, font_find_for_lface): Change to use zero_vector.
5295 * keymap.c (Faccessible_keymaps): Likewise.
5296
2e2d2a13
LL
52972012-07-15 Leo Liu <sdl.web@gmail.com>
5298
5299 * fringe.c: Fix typo in comments.
5300
cd276f6e
LL
53012012-07-14 Leo Liu <sdl.web@gmail.com>
5302
5303 * fringe.c: Add a new bitmap exclamation-mark.
5304
5a1131d9
EZ
53052012-07-14 Eli Zaretskii <eliz@gnu.org>
5306
5307 * gmalloc.c (GMALLOC_INHIBIT_VALLOC): Don't reference.
5308
5309 * s/msdos.h (BSD_SYSTEM, DATA_START, GC_SETJMP_WORKS, HAVE_MOUSE)
5310 (HAVE_MENUS): Don't define, defined by editing config.in with
5311 msdos/sed2v2.inp.
5312 (GMALLOC_INHIBIT_VALLOC): Don't define.
5313 (MODE_LINE_BINARY_TEXT): Remove, not used anymore.
5314
22e983b7
JB
53152012-07-14 Juanma Barranquero <lekktu@gmail.com>
5316
5317 * s/ms-w32.h (GC_SETJMP_WORKS, GC_MARK_STACK): Set in nt/config.nt.
5318
5b3f250f
GM
53192012-07-14 Glenn Morris <rgm@gnu.org>
5320
5321 * s/aix4-2.h, s/freebsd.h, s/gnu-linux.h, s/hpux10-20.h:
5322 * s/irix6-5.h, s/netbsd.h, s/sol2-6.h, s/unixware.h:
5323 Let configure set GC_SETJMP_WORKS, GC_MARK_STACK.
5324
33d63ff4
GM
53252012-07-13 Glenn Morris <rgm@gnu.org>
5326
5b633342
GM
5327 * s/gnu-linux.h (GC_MARK_SECONDARY_STACK): Let configure set it.
5328
33d63ff4
GM
5329 * s/usg5-4-common.h (SETUP_SLAVE_PTY): Let configure set it.
5330 * s/irix6-5.h (SETUP_SLAVE_PTY): No more need to unset it.
5331
b55b9f85
JD
53322012-07-13 Jan Djärv <jan.h.d@swipnet.se>
5333
0dc8cf50
JD
5334 * nsterm.m (uRect): Only define if NS_IMPL_GNUSTEP.
5335 (x_free_frame_resources): Pass x_free_frame_resources to NSTRACE.
5336 (ns_lisp_to_color, ns_string_to_lispmod, ns_term_init)
5337 (ns_term_shutdown, requestService, initFrameFromEmacs): Use SSDATA
5338 where appropriate.
5339 (ns_exec_path, ns_load_path, changeFont): Put () around assignment used
5340 as boolean expression.
5341 (x_set_window_size): Remove unused variable toolbar.
5342 (ns_get_color_default, ns_mod_to_lisp): Remove.
5343 (ns_mouse_position): Remove unused variables xchar and ychar.
5344 (ns_compute_glyph_string_overhangs): Remove unused variable face.
5345 (ns_set_vertical_scroll_bar): Remove unused variable count.
5346 (ns_delete_terminal): Remove unused variable i.
5347 (ns_term_init): Remove unused variables r, g and b.
5348 (mouseDown): Remove unused variable window.
5349 (windowDidResize): Move definition of theWindow inside NS_IMPL_GNUSTEP.
5350 (initFrameFromEmacs): Remove unused variable vbextra.
5351 (mouseEntered): Remove unused variables p and dpyinfo.
5352 (mouseExited): Remove unused variables p and r.
5353 (ns_define_frame_cursor, ns_clear_frame_area)
5354 (ns_draw_window_cursor, ns_initialize_display_info): Make static.
5355 (menuDown): Assign [sender tag] to variable and cast the variable.
5356
5357 * nsterm.h (menuDown): Add id as type to argument sender.
5358 (ns_display_info_for_name): Add Lisp_Object argument.
5359 (ns_term_init): Add Lisp_Object argument.
5360 (ns_map_event_to_object): Add void argument.
5361 (ns_string_from_pasteboard, ns_string_to_pasteboard): Add correct
5362 prototype with arguments and only declare if __OBJC__.
5363 (nxatoms_of_nsselect): Add void argument.
5364 (ns_lisp_to_cursor_type): Add Lisp_Object argument.
5365 (ns_alloc_autorelease_pool): Add void argument.
5366 (ns_release_autorelease_pool): Add void* argument.
5367 (ns_get_defaults_value): Add const char* argument.
5368
5369 * nsmenu.m (ns_update_menubar, ns_menu_show, process_dialog)
5370 (initFromContents): Use SSDATA where appropriate.
5371 (ns_update_menubar): Add braces to ambigous if-else.
5372 (initWithTitle): Put () around assignment in if statement.
5373 (ns_menu_show): Remove unused variables window and keymap.
5374 (update_frame_tool_bar): Remove unused variable selected_p.
5375 (initWithContentRect): Remove unused variable this_cmd_name.
5376
5377 * nsimage.m (ns_load_image, allocInitFromFile): Use SSDATA where
5378 appropriate.
5379 (setXBMColor): Remove unused variable len.
5380 (setPixmapData): Put () around assignment in loop statement.
5381
5382 * nsfont.m (ns_get_family, ns_lang_to_script, ns_otf_to_script)
5383 (ns_registry_to_script, ns_get_req_script, nsfont_open): Use SSDATA
5384 where appropriate.
5385 (ns_get_covering_families, ns_findfonts, nsfont_list_family): Put ()
5386 around assignment in loop statement.
5387 (nsfont_open): Remove unused variable i.
5388 (nsfont_open): Remove unused variable len.
5389 (nsfont_draw): Remove unused variable cs.
5390
5391 * nsfns.m (x_set_icon_name, ns_set_name_internal)
5392 (ns_set_name_as_filename, ns_implicitly_set_icon_type)
5393 (x_set_icon_type, ns_lisp_to_cursor_type, Fns_read_file_name)
5394 (Fns_get_resource, Fns_set_resource, Fx_open_connection)
5395 (Fns_font_name, Fns_perform_service)
5396 (Fns_convert_utf8_nfd_to_nfc, ns_do_applescript)
5397 (Fns_do_applescript, Fx_show_tip): Use SSDATA where appropriate.
5398 (ns_set_name): Remove unused variable view.
5399 (x_set_menu_bar_lines): Remove unused variable olines.
5400 (x_set_tool_bar_lines): Remove unused variable root_window.
5401 (Fns_list_colors): Put () around assignment in while statement.
5402 (Fns_perform_service): Remove unused variable len.
5403 (Fns_display_usable_bounds): Remove unused variable top.
5404 (syms_of_nsfns): Remove unused variable i.
5405
b55b9f85
JD
5406 * nsmenu.m (ns_update_menubar): Exchange place of argument 2 and 3 to
5407 memcpy (Bug#11907).
5408
ed9265fc 54092012-07-13 Kalle Kankare <kalle.kankare@iki.fi> (tiny change)
2277de02
JD
5410
5411 * image.c (Fimagemagick_types): Initialize ex with GetExceptionInfo
5412 and free it with DestroyExceptionInfo (Bug#11558).
5413
ef099b57
JB
54142012-07-13 Juanma Barranquero <lekktu@gmail.com>
5415
5416 * s/ms-w32.h (FIRST_PTY_LETTER, HAVE_SOCKETS): Move to nt/config.nt.
5417 (HAVE_ATTRIBUTE_ALIGNED, HAVE_C99_STRTOLD, HAVE___BUILTIN_UNWIND_INIT):
5418 Set here, not in nt/config.nt.
5419
ea814a5d
EZ
54202012-07-13 Eli Zaretskii <eliz@gnu.org>
5421
5422 * xdisp.c (move_it_in_display_line_to): On GUI terminals, allow
5423 cursor overflow into the last glyph on display line when the right
5424 fringe is off. (Bug#11832)
5425
1a952767
PE
54262012-07-13 Paul Eggert <eggert@cs.ucla.edu>
5427
5428 * xdisp.c (produce_special_glyphs): Now static.
5429 * dispextern.h (produce_special_glyphs): Remove decl.
5430
983188fd
GM
54312012-07-13 Glenn Morris <rgm@gnu.org>
5432
8d7c7eed 5433 * s/bsd-common.h, s/cygwin.h: Remove empty files.
32fb4bb6
GM
5434 * s/freebsd.h, s/netbsd.h: Do not include bsd-common.h.
5435
983188fd
GM
5436 * s/usg5-4-common.h (USG, USG5):
5437 * s/template.h (USG5, USG, HPUX, BSD4_2, BSD_SYSTEM):
5438 * s/sol2-6.h (SOLARIS2):
5439 * s/irix6-5.h (IRIX6_5):
5440 * s/hpux10-20.h (USG, USG5, HPUX):
5441 * s/gnu-linux.h (USG, GNU_LINUX):
5442 * s/freebsd.h (BSD_SYSTEM):
5443 * s/darwin.h (BSD4_2, BSD_SYSTEM, DARWIN_OS):
5444 * s/cygwin.h (CYGWIN):
5445 * s/bsd-common.h (BSD_SYSTEM, BSD4_2):
5446 * s/aix4-2.h (USG, USG5, _AIX): Move "system type" macros to configure.
5447
d1e68667 54482012-07-13 BT Templeton <bpt@hcoop.net> (tiny change)
24ef80ae
PE
5449
5450 * nsfont.m (ns_charset_covers): Don't abort if no bitmap (Bug#11853).
24ef80ae 5451
6de0e799
GM
54522012-07-13 Glenn Morris <rgm@gnu.org>
5453
739ae010
GM
5454 * s/usg5-4-common.h (NSIG_MINIMUM): Let configure set it.
5455
dbee5793
GM
5456 * s/gnu-linux.h, s/irix6-5.h: Let configure set ULIMIT_BREAK_VALUE.
5457
6de0e799
GM
5458 * process.c (init_process_emacs): Replace MIN_PTY_KERNEL_VERSION.
5459 * s/darwin.h (MIN_PTY_KERNEL_VERSION): Remove single-use macro.
5460
b82da769
GM
54612012-07-12 Glenn Morris <rgm@gnu.org>
5462
4fae5a7a 5463 * s/darwin.h (SYSTEM_PURESIZE_EXTRA): Move to configure.
b82da769
GM
5464
5465 * process.c (init_process_emacs): Rename from init_process.
5466 The old name is also the name of a Mach system call.
5467 * lisp.h, emacs.c: Update for this name change.
5468 * nsgui.h, sysselect.h, s/darwin.h: Remove workaround that is no
5469 longer needed.
5470
5a979817
EZ
54712012-07-12 Eli Zaretskii <eliz@gnu.org>
5472
5473 * xdisp.c (insert_left_trunc_glyphs): Fix incorrect size in
5474 memmove call that removes glyphs covered by the left truncation
5475 glyph. Improve commentary.
5476 (display_line): Fix display of continuation glyphs on GUI frames
5477 when the right fringe is turned off and variable-size fonts are
5478 used in the window. Move the code that appends a stretch glyph to
5479 produce_special_glyphs, so that it could be used for truncation
5480 and continuation glyphs alike.
5481 (produce_special_glyphs) [HAVE_WINDOW_SYSTEM]: Produce a stretch
5482 glyph of a suitably computed width, to align the special glyphs at
5483 the window margin. Code moved from display_line. (Bug#11832)
5484
3e91a053
GM
54852012-07-12 Glenn Morris <rgm@gnu.org>
5486
ba9e4b84
GM
5487 * s/aix4-2.h, s/hpux10-20.h: Let configure set NO_EDITRES.
5488
5489 * s/gnu-linux.h, s/hpux10-20.h:
5490 Do not unconditionally define HAVE_XRMSETDATABASE.
5491
3e91a053
GM
5492 * s/gnu-linux.h (UNIX98_PTYS): Let configure set it.
5493
b300b1f4
PE
54942012-07-12 Paul Eggert <eggert@cs.ucla.edu>
5495
5496 Fix typos that broke OS X build.
5497 Reported by Randal L. Schwartz in
5498 <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00225.html>.
5499 * nsterm.m (ns_timeout): Add missing local decl.
5500 (ns_get_color): snprintf -> sprintf, to fix typo.
5501
6e777848
GM
55022012-07-12 Glenn Morris <rgm@gnu.org>
5503
3f922c37
GM
5504 * src/s/aix4-2.h, src/s/cygwin.h, src/s/darwin.h:
5505 * src/s/gnu-linux.h, src/s/hpux10-20.h, src/s/irix6-5.h:
5506 * src/s/sol2-6.h, src/s/unixware.h, src/s/usg5-4-common.h:
5507 Move PTY_NAME_SPRINTF, PTY_TTY_NAME_SPRINTF to configure.
5508
0ab7b23a
GM
5509 * s/cygwin.h, s/darwin.h, s/gnu-linux.h, s/irix6-5.h:
5510 Move PTY_OPEN to configure.
5511
6e777848
GM
5512 * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/darwin.h:
5513 * s/gnu-linux.h, s/hpux10-20.h, s/irix6-5.h, s/template.h:
5514 * s/usg5-4-common.h: Move FIRST_PTY_LETTER, PTY_ITERATION to configure.
5515
4a7edc24
DA
55162012-07-12 Dmitry Antipov <dmantipov@yandex.ru>
5517
5518 Use empty_unibyte_string where applicable.
5519 * keyboard.c (parse_tool_bar_item): Use empty_unibyte_string.
5520 * lread.c (read1): Likewise.
5521 * xsettings.c (syms_of_xsettings): Likewise.
5522
308aab79
GM
55232012-07-12 Glenn Morris <rgm@gnu.org>
5524
42bd1719
GM
5525 * s/cygwin.h (G_SLICE_ALWAYS_MALLOC):
5526 * s/freebsd.h (BROKEN_PTY_READ_AFTER_EAGAIN):
7ccad002
GM
5527 * s/irix6-5.h (SETPGRP_RELEASES_CTTY, PREFER_VSUSP):
5528 * s/hpux10-20.h (RUN_TIME_REMAP):
5529 * s/bsd-common.h (TABDLY): Move to configure.
5530
5531 * s/hpux10-20.h, s/sol2-6.h: Move XOS_NEEDS_TIME_H to configure.
5532
5533 * s/bsd-common.h, s/darwin.h: Move TAB3 to configure.
5534
ea0bbd17 5535 * s/aix4-2.h (BROKEN_FIONREAD, BROKEN_SIGAIO, BROKEN_SIGPTY)
42bd1719 5536 (BROKEN_SIGPOLL, BROKEN_GET_CURRENT_DIR_NAME): Let configure set them.
ea0bbd17
GM
5537
5538 * s/darwin.h (NO_ABORT, NO_MATHERR): Let configure set them.
51c3b9b4 5539
308aab79
GM
5540 * s/bsd-common.h, s/cygwin.h, s/gnu-linux.h, s/irix6-5.h:
5541 * s/template.h: Move NARROWPROTO to configure.
5542
ee1cf5cf
GM
55432012-07-11 Glenn Morris <rgm@gnu.org>
5544
30fe9bf4
GM
5545 * s/gnu-linux.h, s/sol2-6.h: No longer define POSIX,
5546 unused since 2011-01-17 change to systty.h.
5547
ee1cf5cf
GM
5548 * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/darwin.h, s/gnu-linux.h:
5549 * s/hpux10-20.h, s/template.h, s/usg5-4-common.h:
5550 Move HAVE_PTYS and HAVE_SOCKETS to configure.
5551
63e47e07
PE
55522012-07-11 Paul Eggert <eggert@cs.ucla.edu>
5553
5554 * s/sol2-6.h (HAVE_LIBKSTAT): Remove. (Bug#11914)
5555
c43fb4c3
GM
55562012-07-11 Glenn Morris <rgm@gnu.org>
5557
5558 * s/darwin.h, s/gnu-linux.h, s/template.h:
5559 Move INTERRUPT_INPUT to configure.
5560
e8df9267
DA
55612012-07-11 Dmitry Antipov <dmantipov@yandex.ru>
5562
5563 Minor adjustments to interning code.
5564 * lisp.h (intern, intern_c_string): Redefine as static inline
5565 wrappers for intern_1 and intern_c_string_1, respectively.
5566 (intern_1, intern_c_string_1): Rename prototypes.
14ae4239
BT
5567 * lread.c (intern_1, intern_c_string_1, oblookup):
5568 Simplify Vobarray checking.
e8df9267
DA
5569 * font.c (font_intern_prop): Likewise. Adjust comment.
5570 * w32font.c (intern_font_name): Likewise.
5571
34348bd4
AS
55722012-07-11 Andreas Schwab <schwab@linux-m68k.org>
5573
d96a1e0c
AS
5574 * gnutls.c (Fgnutls_boot): Properly parse :keylist argument.
5575
34348bd4
AS
5576 * coding.c (Fdefine_coding_system_internal): Use XCAR/XCDR instead
5577 of Fcar/Fcdr if possible.
5578 * font.c (check_otf_features): Likewise.
5579 * fontset.c (Fnew_fontset): Likewise.
5580 * gnutls.c (Fgnutls_boot): Likewise.
5581 * minibuf.c (read_minibuf): Likewise.
5582 * msdos.c (IT_set_frame_parameters): Likewise.
5583 * xmenu.c (Fx_popup_dialog): Likewise.
5584 * w32menu.c (Fx_popup_dialog): Likewise.
5585
c8add24e
GM
55862012-07-11 Glenn Morris <rgm@gnu.org>
5587
4b575b3c
GM
5588 * s/bsd-common.h, s/cygwin.h: No need to undefine INTERRUPT_INPUT,
5589 since nothing has defined it on these platforms.
5590
09f4e3b0
GM
5591 * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/gnu-linux.h:
5592 * s/irix6-5.h: Move SIGNALS_VIA_CHARACTERS to configure.
5593
172bedef
GM
5594 * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/darwin.h:
5595 * s/gnu-linux.h, s/hpux10-20.h, s/template.h, s/usg5-4-common.h:
5596 Move CLASH_DETECTION to configure.
5597
249685df
GM
5598 * s/gnu.h: Remove file, which is now empty.
5599
c8add24e
GM
5600 * s/gnu.h, s/gnu-linux.h:
5601 Move GNU_LIBRARY_PENDING_OUTPUT_COUNT to configure.
5602
b41253a3
JW
56032012-07-11 John Wiegley <johnw@newartisans.com>
5604
5605 * alloc.c (mark_memory): Guard the "no_address_safety_analysis"
5606 function attribute, so we only use it if it exists in the
5607 compiler.
5608
d923b542
DA
56092012-07-11 Dmitry Antipov <dmantipov@yandex.ru>
5610
5611 Avoid call to strlen in fast_c_string_match_ignore_case.
5612 * search.c (fast_c_string_match_ignore_case): Change to use
5613 length argument. Adjust users accordingly.
5614 * lisp.h (fast_c_string_match_ignore_case): Adjust prototype.
5615
5ebbef1d
PE
56162012-07-11 Paul Eggert <eggert@cs.ucla.edu>
5617
bb352260
PE
5618 Assume mkdir, rmdir.
5619 * sysdep.c (mkdir) [!HAVE_MKDIR]: Remove.
5620 * sysdep.c (rmdir) [!HAVE_RMDIR]: Remove.
5621
57054ddd
PE
5622 Assume rename.
5623 * sysdep.c (rename) [!HAVE_RENAME]: Remove.
5624
b747d3f7
PE
5625 Assume perror.
5626 * s/hpux10-20.h (HAVE_PERROR): Remove.
5627 * sysdep.c (perror) [HPUX && !HAVE_PERROR]:
5628 Remove dummy definition, as this problem was obsolete long ago.
5629
5ebbef1d
PE
5630 Assume strerror.
5631 * sysdep.c (strerror) [!HAVE_STRERROR && !WINDOWSNT]: Remove.
5632
984e7f30
DA
56332012-07-11 Dmitry Antipov <dmantipov@yandex.ru>
5634
5635 Avoid calls to strlen in font processing functions.
5636 * font.c (font_parse_name, font_parse_xlfd, font_parse_fcname)
14ae4239
BT
5637 (font_open_by_name): Change to use length argument.
5638 Adjust users accordingly.
d923b542
DA
5639 * font.h (font_open_by_name, font_parse_xlfd, font_unparse_xlfd):
5640 Adjust prototypes.
5641 * xfont.c (xfont_decode_coding_xlfd, font_unparse_xlfd):
5642 Change to return ptrdiff_t.
984e7f30
DA
5643 (xfont_list_pattern, xfont_match): Use length returned by
5644 xfont_decode_coding_xlfd.
5645 * xfns.c (x_default_font_parameter): Omit useless xstrdup.
5646
20e94fdd
GM
56472012-07-11 Glenn Morris <rgm@gnu.org>
5648
9d596af3
GM
5649 * s/darwin.h, s/freebsd.h, s/netbsd.h:
5650 Move DONT_REOPEN_PTY to configure.
5651
20e94fdd
GM
5652 * sound.c (DEFAULT_SOUND_DEVICE) [!WINDOWSNT]:
5653 * s/netbsd.h (DEFAULT_SOUND_DEVICE): Let configure set it.
5654
e99a530f
PE
56552012-07-10 Paul Eggert <eggert@cs.ucla.edu>
5656
22ffb973
PE
5657 Remove "#define unix" that is no longer needed (Bug#11905).
5658 * s/aix4-2.h (unix): Remove; no longer needed.
5659
e9a9ae03
PE
5660 EMACS_TIME simplification (Bug#11875).
5661 This replaces macros (which typically do not work in GDB)
5662 with functions, typedefs and enums, making the code easier to debug.
5663 The functional style also makes code easier to read and maintain.
5664 * systime.h: Include <sys/time.h> on all hosts, not just if
5665 WINDOWSNT, since 'struct timeval' is needed in general.
5666 (EMACS_TIME): Now a typedef, not a macro.
5667 (EMACS_TIME_RESOLUTION, LOG10_EMACS_TIME_RESOLUTION): Now constants,
5668 not macros.
5669 (EMACS_SECS, EMACS_NSECS, EMACS_TIME_SIGN, EMACS_TIME_VALID_P)
5670 (EMACS_TIME_FROM_DOUBLE, EMACS_TIME_TO_DOUBLE, EMACS_TIME_EQ)
5671 (EMACS_TIME_NE, EMACS_TIME_GT, EMACS_TIME_GE, EMACS_TIME_LT)
5672 (EMACS_TIME_LE): Now functions, not macros.
5673 (EMACS_SET_SECS, EMACS_SET_NSECS, EMACS_SET_SECS_NSECS)
5674 (EMACS_SET_USECS, EMACS_SET_SECS_USECS): Remove these macros,
5675 which are not functions. All uses rewritten to use:
5676 (make_emacs_time): New function.
5677 (EMACS_SECS_ADDR, EMACS_SET_INVALID_TIME, EMACS_GET_TIME)
5678 (EMACS_ADD_TIME, EMACS_SUB_TIME): Remove these macros, which are
5679 not functions. All uses rewritten to use the following, respectively:
5680 (emacs_secs_addr, invalid_emacs_time, get_emacs_time)
5681 (add_emacs_time, sub_emacs_time): New functions.
ed9265fc 5682 * atimer.c: Don't include <sys/time.h>, as "systime.h" does this.
e9a9ae03
PE
5683 * fileio.c (Fcopy_file):
5684 * xterm.c (XTflash): Get the current time closer to when it's used.
5685 * makefile.w32-in ($(BLD)/atimer.$(O)): Update dependencies.
5686
ffacb126
PE
5687 * bytecode.c (targets): Suppress -Woverride-init warnings.
5688
e99a530f
PE
5689 Simplify by avoiding confusing use of strncpy etc.
5690 * doc.c (Fsnarf_documentation):
5691 * fileio.c (Ffile_name_directory, Fsubstitute_in_file_name):
5692 * frame.c (Fmake_terminal_frame):
5693 * gtkutil.c (get_utf8_string):
5694 * lread.c (openp):
5695 * nsmenu.m (ns_update_menubar):
5696 * regex.c (regerror):
5697 Prefer memcpy to strncpy and strncat when either will do.
5698 * fileio.c (Fsubstitute_in_file_name):
5699 * keyboard.c (MULTI_LETTER_MOD, parse_modifiers_uncached)
5700 (menu_separator_name_p):
5701 * nsmenu.m (ns_update_menubar):
5702 Prefer memcmp to strncmp when either will do.
5703 * nsterm.m: Include <ftoastr.h>.
5704 (ns_get_color):
5705 * s/gnu-linux.h, s/sol2-6.h, s/unixware.h (PTY_TTY_NAME_SPRINTF):
5706 Prefer snprintf to strncpy.
5707 * nsterm.m (ns_term_init):
5708 * widget.c (set_frame_size) [0]: Prefer xstrdup to xmalloc + strncpy.
5709 * nsterm.m (ns_term_init):
5710 Avoid the need for strncpy, by using build_string or
5711 make_unibyte_string directly. Use dtoastr, not snprintf.
5712 * process.c (Fmake_network_process): Diagnose service names that
5713 are too long, rather than silently truncating them or creating
5714 non-null-terminated names.
5715 (Fnetwork_interface_info): Likewise, for interface names.
5716 * sysdep.c (system_process_attributes) [GNU_LINUX]:
5717 Prefer sprintf to strncat.
5718 * xdisp.c (debug_method_add) [GLYPH_DEBUG]:
5719 Prefer vsnprintf to vsprintf + strncpy.
5720
c59592b3
GM
57212012-07-10 Glenn Morris <rgm@gnu.org>
5722
5723 * dispnew.c (PENDING_OUTPUT_COUNT) [!__GNU_LIBRARY__]:
5724 Clarify fallback case.
5725
7d7bbefd
DA
57262012-07-10 Dmitry Antipov <dmantipov@yandex.ru>
5727
5728 Use XCAR and XCDR instead of Fcar and Fcdr where possible.
5729 * callint.c, coding.c, doc.c, editfns.c, eval.c, font.c, fontset.c,
5730 * frame.c, gnutls.c, minibuf.c, msdos.c, textprop.c, w32fns.c,
d923b542 5731 * w32menu.c, window.c, xmenu.c: Change to use XCAR and XCDR
7d7bbefd
DA
5732 where argument type is known to be a Lisp_Cons.
5733
3a4c8000
TT
57342012-07-10 Tom Tromey <tromey@redhat.com>
5735
5736 * bytecode.c (BYTE_CODE_THREADED): New macro.
5737 (BYTE_CODES): New macro. Replaces all old byte-code defines.
5738 (enum byte_code_op): New type.
5739 (CASE, NEXT, FIRST, CASE_DEFAULT, CASE_ABORT): New macros.
5740 (exec_byte_code): Use them. Use token threading when applicable.
5741
2a0213a6
DA
57422012-07-10 Dmitry Antipov <dmantipov@yandex.ru>
5743
5744 Optimize pure C strings initialization.
5745 * lisp.h (make_pure_string): Fix prototype.
5746 (build_pure_c_string): New function, defined as static inline. This
5747 provides a better opportunity to optimize away calls to strlen when
5748 the function is called with compile-time constant argument.
5749 * alloc.c (make_pure_c_string): Fix comment. Change to add nchars
5750 argument, adjust users accordingly. Use build_pure_c_string where
5751 appropriate.
5752 * buffer.c, coding.c, data.c, dbusbind.c, fileio.c, fontset.c, frame.c,
5753 * keyboard.c, keymap.c, lread.c, search.c, syntax.c, w32fns.c, xdisp.c,
5754 * xfaces.c, xfns.c, xterm.c: Use build_pure_c_string where appropriate.
5755
cb1caeaf
DA
57562012-07-10 Dmitry Antipov <dmantipov@yandex.ru>
5757
5758 Avoid calls to strlen in miscellaneous functions.
5759 * buffer.c (init_buffer): Use precalculated len, adjust if needed.
5760 * font.c (Ffont_xlfd_name): Likewise. Change to call make_string.
5761 * lread.c (openp): Likewise.
5762
c293e30c
DA
57632012-07-10 Dmitry Antipov <dmantipov@yandex.ru>
5764
5765 Avoid calls to strlen in path processing functions.
5766 * fileio.c (file_name_as_directory): Add comment. Change to add
5767 srclen argument and return the length of result. Adjust users
5768 accordingly.
5769 (directory_file_name): Fix comment. Change to add srclen argument,
14ae4239
BT
5770 swap 1st and 2nd arguments to obey the common convention.
5771 Adjust users accordingly.
c293e30c
DA
5772 * filelock.c (fill_in_lock_file_name): Avoid calls to strlen.
5773
9e059e3f
GM
57742012-07-10 Glenn Morris <rgm@gnu.org>
5775
d02eb359
GM
5776 * s/cygwin.h, s/darwin.h, s/freebsd.h, s/netbsd.h, s/unixware.h:
5777 Move PENDING_OUTPUT_COUNT definition to configure.
5778
882cf227
GM
5779 * s/irix6-5.h (DATA_START, DATA_SEG_BITS):
5780 * s/hpux10-20.h (DATA_SEG_BITS, DATA_START):
5781 * s/gnu.h (DATA_START): Move definitions to configure.
5782
af6e839f
GM
5783 * s/irix6-5.h (SETUP_SLAVE_PTY, PTY_NAME_SPRINTF): Drop ifdef guards.
5784 We include usg5-4-common.h, which defines them both.
5785
40289a12
GM
5786 * s/gnu.h: Don't include fcntl.h (every file in Emacs that uses
5787 O_RDONLY already includes it).
5788
9e059e3f
GM
5789 Stop ns builds setting the EMACSLOADPATH environment variable.
5790 * nsterm.m (ns_load_path): Rename from ns_init_paths.
5791 Now it does not set EMACSLOADPATH, just returns the load-path string.
5792 * nsterm.h: Update accordingly.
5793 * lread.c [HAVE_NS]: Include nsterm.h.
5794 (init_lread) [HAVE_NS]: Use ns_load_path.
5795 * emacs.c (main) [HAVE_NS]: No longer call ns_init_paths.
5796
7c4e8ec0
GM
57972012-07-09 Glenn Morris <rgm@gnu.org>
5798
d4f600ff
GM
5799 * s/gnu.h (SIGNALS_VIA_CHARACTERS): No need to define it here,
5800 since the included bsd-common.h does so.
5801
cbb31951
GM
5802 Stop ns builds setting the EMACSPATH environment variable.
5803 * nsterm.m (ns_exec_path): New function, split from ns_init_paths.
5804 (ns_init_paths): Do not set EMACSPATH.
5805 * nsterm.h (ns_exec_path): Add it.
5806 * callproc.c (init_callproc_1, init_callproc) [HAVE_NS]:
5807 Use ns_exec_path.
5808
7c4e8ec0
GM
5809 * nsterm.m, nsterm.h (ns_etc_directory): Fix type, empty return.
5810
26bccfae
PE
58112012-07-09 Paul Eggert <eggert@cs.ucla.edu>
5812
a0bee46f
PE
5813 * process.c (wait_reading_process_output): 'waitchannels' was unset
5814 when read_kbd || !NILP (wait_for_cell); fix this.
5815
5994c183
PE
5816 Add GCC-style 'const' attribute to functions that can use it.
5817 * character.h (char_resolve_modifier_mask):
5818 * keyboard.h (make_ctrl_char):
5819 * lisp.h (multibyte_char_to_unibyte, multibyte_char_to_unibyte_safe)
5820 (init_character_once, next_almost_prime, init_fns, init_image)
5821 (flush_pending_output, init_sound):
5822 * mem-limits.h (start_of_data):
5823 * menu.h (finish_menu_items):
5824 Add ATTRIBUTE_CONST.
5825 * emacs.c (DEFINE_DUMMY_FUNCTION):
5826 Declare the dummy function with ATTRIBUTE_CONST.
5827 * lisp.h (Fbyteorder, Fmax_char, Fidentity):
5828 Add decls with ATTRIBUTE_CONST.
5829
26bccfae
PE
5830 Minor improvements to make_formatted_string.
5831 * alloc.c (make_formatted_string): Prefer int to ptrdiff_t
5832 where int is good enough, as vsprintf returns an int.
5833 * lisp.h (make_formatted_string): Add ATTRIBUTE_FORMAT_PRINTF.
5834
a8290ec3
DA
58352012-07-09 Dmitry Antipov <dmantipov@yandex.ru>
5836
5837 Use make_formatted_string to avoid double length calculation.
5838 * lisp.h (make_formatted_string): New prototype.
5839 * alloc.c (make_formatted_string): New function.
5840 * buffer.c (Fgenerate_new_buffer_name): Use it.
5841 * dbus.c (syms_of_dbusbind): Likewise.
5842 * editfns.c (Fcurrent_time_zone): Likewise.
5843 * filelock.c (get_boot_time): Likewise.
5844 * frame.c (make_terminal_frame, set_term_frame_name)
5845 (x_report_frame_params): Likewise.
5846 * image.c (gs_load): Likewise.
5847 * minibuf.c (get_minibuffer): Likewise.
5848 * msdos.c (dos_set_window_size): Likewise.
5849 * process.c (make_process): Likewise.
5850 * xdisp.c (ensure_echo_area_buffers): Likewise.
5851 * xsettings.c (apply_xft_settings): Likewise.
5852
d01ba2f1
GM
58532012-07-09 Glenn Morris <rgm@gnu.org>
5854
5855 Stop ns builds polluting the environment with EMACSDATA, EMACSDOC.
5856 * nsterm.m (ns_etc_directory): New function, split from ns_init_paths.
5857 (ns_init_paths): Do not set EMACSDATA, EMACSDOC.
5858 * nsterm.h (ns_etc_directory): Add it.
5859 * callproc.c [HAVE_NS]: Include nsterm.h.
5860 (init_callproc_1, init_callproc) [HAVE_NS]: Use ns_etc_directory.
5861
f1f924b6
DA
58622012-07-09 Dmitry Antipov <dmantipov@yandex.ru>
5863
5864 Move marker debugging code under MARKER_DEBUG.
5865 * marker.c (MARKER_DEBUG): Move marker debugging code under
5866 #ifdef MARKER_DEBUG because byte_char_debug_check is too slow
5867 for bootstrap with --enable-checking (~3x slowdown reported
5868 by Juanma Barranquero <lekktu@gmail.com>).
5869 (verify_bytepos): Move under #ifdef MARKER_DEBUG.
5870
ab531b66
PE
58712012-07-08 Paul Eggert <eggert@cs.ucla.edu>
5872
5873 * systime.h (EMACS_SUB_TIME): Clarify behavior with unsigned time_t.
5874 See <http://bugs.gnu.org/11825#29>.
5875
c4b3bc8a
EZ
58762012-07-08 Eli Zaretskii <eliz@gnu.org>
5877
5878 * xdisp.c (fill_glyphless_glyph_string): If the face of the glyph
5879 has no font, use the frame's font. (Bug#11813)
3434fe8a
EZ
5880 (display_line): Add commentary about displaying truncation glyphs
5881 on GUI frames.
5882 (produce_special_glyphs): Move here from term.c.
5883
5884 * term.c (produce_special_glyphs): Move to xdisp.c.
5885
5886 * dispextern.h (produce_special_glyphs): Move prototype to xdisp.c
5887 section.
c4b3bc8a 5888
b676b881
AS
58892012-07-07 Andreas Schwab <schwab@linux-m68k.org>
5890
f17c5273
AS
5891 * xdisp.c (display_line): Avoid warning about implicit declaration
5892 of FRAME_FONT.
5893
298819b9
AS
5894 * frame.c (get_frame_param): Define only if HAVE_WINDOW_SYSTEM.
5895
b676b881
AS
5896 * lisp.h: Remove empty conditional.
5897
6045c4fd
PE
58982012-07-07 Paul Eggert <eggert@cs.ucla.edu>
5899
b3350bf9
PE
5900 * lread.c (load_path_check): Now static.
5901
6045c4fd
PE
5902 Fix some minor --with-ns problems found by static checking.
5903 * frame.c (Ftool_bar_pixel_width) [!FRAME_TOOLBAR_WIDTH]:
5904 (x_set_font) [!HAVE_X_WINDOWS]:
5905 * image.c (xpm_load_image) [HAVE_NS]:
5906 (x_to_xcolors) [!HAVE_X_WINDOWS && !HAVE_NTGUI]:
5907 (x_disable_image) [!HAVE_NS && !HAVE_NTGUI]:
5908 Remove unused local.
5909 (Fx_parse_geometry) [HAVE_NS]: Don't return garbage.
5910 (xpm_load_image) [HAVE_NS && !HAVE_XPM]: Remove unused label.
5911 * image.c (x_create_bitmap_from_file) [HAVE_NS]:
5912 (xpm_load_image, xpm_load) [HAVE_NS && !HAVE_XPM]:
5913 * nsselect.m (symbol_to_nsstring, ns_string_to_pasteboard_internal):
5914 * xfaces.c (Fx_load_color_file) [!HAVE_X_WINDOWS]:
5915 Fix pointer signedness problem.
5916 * xfaces.c (FRAME_X_FONT_TABLE):
5917 * xterm.h (FRAME_X_FONT_TABLE): Remove unused, incompatible macros.
5918
929e7845
GM
59192012-07-07 Glenn Morris <rgm@gnu.org>
5920
5921 * lread.c (load_path_check): New function, split from init_lread.
5922 (init_lread): Reorganize. Motivation:
5923 If EMACSLOADPATH is set, check/warn about that rather than the
5924 defaults, which we are not going to use. Hence we can remove
5925 the turn_off_warning and WINDOWSNT || HAVE_NS tests.
5926 Don't warn if site-lisp directories are missing.
5927 If not installed, start from a blank load-path, since
5928 PATH_LOADSEARCH refers to the eventual installation directories.
5929
58dd0aa4
EZ
59302012-07-07 Eli Zaretskii <eliz@gnu.org>
5931
5932 Support truncation and continuation glyphs on GUI frames, when
5933 fringes are disabled. (Bug#11832)
5934 * xdisp.c (init_iterator): Get dimensions of truncation and
14ae4239
BT
5935 continuation glyphs even if on GUI frames.
5936 Adjust it->last_visible_x on GUI frames when the left or right fringes,
58dd0aa4
EZ
5937 or both, are absent.
5938 (start_display, move_it_in_display_line_to): Handle the case of a
5939 GUI frame without a fringe to display continuation or truncation
5940 glyphs.
5941 (insert_left_trunc_glyphs): Support GUI frames: make sure
5942 truncation glyphs overwrite enough glyphs from the current line to
5943 have sufficient space in pixels.
5944 (display_line): Support truncation and continuation glyphs on GUI
5945 frames. If some spare pixels are left on the line after inserting
5946 the truncation glyphs, fill that space with a stretch glyph of a
5947 suitably computed width.
5948
5949 * term.c (produce_special_glyphs): Call PRODUCE_GLYPHS, not
5950 produce_glyphs, to support GUI sessions.
5951
31571fd7
PE
59522012-07-07 Paul Eggert <eggert@cs.ucla.edu>
5953
5a16b9bc
PE
5954 * sysdep.c (ULLONG_MAX): Define if not already defined (Bug#11781).
5955
f3047c75
PE
5956 * sysdep.c (list_system_processes): Port to NetBSD-current (Bug#11797).
5957
31571fd7
PE
5958 Do not require float-time's arg to fit in time_t (Bug#11825).
5959 This works better on hosts where time_t is unsigned, and where
5960 float-time is applied to the (negative) difference between two times.
5961 * editfns.c (decode_time_components): Last arg is now double *,
5962 not int *, and means to store all the result as a double, without
5963 worrying about whether the seconds part fits in time_t.
5964 All callers changed.
5965 (lisp_time_argument): Remove last int * arg, as it's no longer needed.
5966 All callers changed.
5967 (Ffloat_time): Do not fail merely because the specified time falls
5968 outside of time_t range.
5969
4516fbef
GM
59702012-07-07 Glenn Morris <rgm@gnu.org>
5971
5972 * s/darwin.h (HAVE_RES_INIT, HAVE_LIBRESOLV):
5973 * s/hpux10-20.h (HAVE_RINT, HAVE_RANDOM):
5974 * s/unixware.h (HAVE_GETWD): Move undefs to configure (effectively).
5975
07adc2c6
JB
59762012-07-07 Juanma Barranquero <lekktu@gmail.com>
5977
5978 * makefile.w32-in (DISPEXTERN_H, $(BLD)/regex.$(O)):
5979 Update dependencies.
5980
5981 * s/ms-w32.h [_MSC_VER]: Remove strcasecmp, strncasecmp.
5982
fd573f31
PE
59832012-07-06 Paul Eggert <eggert@cs.ucla.edu>
5984
fee5959d
PE
5985 Use c_strcasecmp for ASCII case-insensitive comparison (Bug#11786).
5986 * dispextern.h, nsfns.m, nsterm.m: Include <c-strcase.h>.
5987 * dispextern.h (xstrcasecmp): Rewrite using c_strcasecmp.
5988 * nsfns.m (x_get_string_resource): Use c_strncasecmp, not strncasecmp.
5989 * nsterm.m (ns_default): Use c_strcasecmp, not strcasecmp.
5990 * xfaces.c (xstrcasecmp) [!HAVE_STRCASECMP]: Remove.
5991
fd573f31
PE
5992 * xfont.c (compare_font_names): Redo to omit the need for casts.
5993
ddadbc0e
AS
59942012-07-06 Andreas Schwab <schwab@linux-m68k.org>
5995
fca8d6b6
AS
5996 * xfns.c (Fx_change_window_property): Doc fix.
5997 * w32fns.c (Fx_change_window_property): Doc fix.
5998
ddadbc0e
AS
5999 * w32fns.c (Fx_window_property): Accept the same arguments as the
6000 X Windows version. Doc fix.
6001 * xfns.c (Fx_window_property): Doc fix. (Bug#11870)
6002
ed9265fc 60032012-07-06 Juanma Barranquero <lekktu@gmail.com>
f247498e
JB
6004 Eli Zaretskii <eliz@gnu.org>
6005
6006 * s/ms-w32.h: Settings not specific to Windows moved to nt/config.nt.
6007 Windows-specific code from nt/config.nt moved here.
6008 Obsolete settings removed.
6009
216ee680
PE
60102012-07-06 Paul Eggert <eggert@cs.ucla.edu>
6011
6012 * process.c: Avoid unnecessary calls to gettime.
6013 (wait_reading_process_output): Don't get the time of day
6014 when gobbling data immediately and not waiting, as there's no need
6015 for it in that case. This removes a FIXME.
6016
bdd091e4
JD
60172012-07-06 Jan Djärv <jan.h.d@swipnet.se>
6018
6019 * gtkutil.c (xg_event_is_for_scrollbar): Assign gwin when HAVE_GTK3
6020 is defined (Bug#11768).
6021
9d44f8ce
DA
60222012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
6023
6024 Fix marker debugging code.
6025 * marker.c (byte_char_debug_check): Do not perform the check
6026 if buffer is not multibyte.
090bd7cb
JB
6027 (buf_charpos_to_bytepos, buf_bytepos_to_charpos):
6028 Call byte_char_debug_check with correct arguments.
9d44f8ce 6029
90fc4786
DA
60302012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
6031
6032 Compile marker debugging code only if ENABLE_CHECKING is defined.
090bd7cb
JB
6033 * marker.c (byte_char_debug_check, count_markers):
6034 Use only if ENABLE_CHECKING is defined.
90fc4786
DA
6035 (byte_debug_flag): Remove.
6036 (CONSIDER, buf_charpos_to_bytepos, buf_bytepos_to_charpos):
6037 Always call byte_char_debug_check if ENABLE_CHECKING is defined.
6038
7b7ae965
DA
60392012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
6040
4e57b342
DA
6041 Avoid code repetition in marker-related functions.
6042 * marker.c (attach_marker): New function.
6043 (Fset_marker, set_marker_restricted, set_marker_both)
6044 (set_marker_restricted_both): Use it.
6045 (Fset_marker, set_marker_restricted, Fbuffer_has_markers_at):
6046 Consistently rename charno to charpos.
6047 (marker_position): Add eassert.
6048 (marker_byte_position): Convert to eassert.
6049
60502012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
6051
6052 Simplify list operations in unchain_overlay and unchain_marker.
7b7ae965 6053 * buffer.c (unchain_overlay): Simplify. Add comment.
4e57b342 6054 * marker.c (unchain_marker): Simplify. Fix comments.
7b7ae965 6055
657924ff
DA
60562012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
6057
6058 Introduce fast path for the widely used marker operation.
6059 * alloc.c (build_marker): New function.
6060 * lisp.h (build_marker): New prototype.
6061 * buffer.c (clone_per_buffer_values, Fmake_indirect_buffer): Use it.
6062 * composite.c (autocmp_chars): Likewise.
6063 * editfns.c (buildmark): Remove.
6064 (Fpoint_marker, Fpoint_min_marker, Fpoint_max_marker)
6065 (save_restriction_save): Use build_marker.
6066 * marker.c (buf_charpos_to_bytepos, buf_bytepos_to_charpos): Likewise.
6067 * window.c (save_window_save): Likewise.
6068
041a49a6
DA
60692012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
6070
6071 Do not use Fdelete_overlay in delete_all_overlays
6072 to avoid redundant calls to unchain_overlay.
6073 * buffer.c (drop_overlay): New function.
6074 (delete_all_overlays, Fdelete_overlay): Use it.
6075 * minibuf.c (get_minibuffer): Fix comment.
6076
7dca65a4
PE
60772012-07-06 Paul Eggert <eggert@cs.ucla.edu>
6078
6079 Port to OpenBSD 5.1 amd64.
6080 * sysdep.c [BSD_SYSTEM]: Include <sys/param.h> before <sys/sysctl.h>.
6081 This is needed for OpenBSD, and should be harmless on all BSD systems.
6082 Also, include <sys/sysctl.h>, as it should be available on all
6083 BSD_SYSTEM hosts given that we're already calling sysctl in that case.
6084 (list_system_processes) [__OpenBSD__]: Use DARWIN_OS style mib, but
6085 use p_pid member, not kp_proc.pid.
6086
8eb876e2
GM
60872012-07-06 Glenn Morris <rgm@gnu.org>
6088
6089 * Makefile.in (emacs$(EXEEXT)): Don't check for load-path shadows.
6090
38182d90
PE
60912012-07-05 Paul Eggert <eggert@cs.ucla.edu>
6092
6093 More xmalloc and related cleanup.
6094 * alloc.c, bidi.c, buffer.c, buffer.h, bytecode.c, callint.c:
6095 * callproc.c, charset.c, coding.c, composite.c, data.c, dispnew.c:
6096 * doc.c, editfns.c, emacs.c, eval.c, fileio.c, filelock.c, fns.c:
6097 * font.c, fontset.c, frame.c, fringe.c, ftfont.c, ftxfont.c, gmalloc.c:
6098 * gtkutil.c, image.c, keyboard.c, keymap.c, lread.c, macros.c, menu.c:
6099 * nsfns.m, nsfont.m, nsmenu.m, nsterm.m, print.c, process.c, ralloc.c:
6100 * regex.c, region-cache.c, scroll.c, search.c, sound.c, syntax.c:
6101 * sysdep.c, term.c, termcap.c, unexmacosx.c, window.c, xdisp.c:
6102 * xfaces.c, xfns.c, xftfont.c, xgselect.c, xmenu.c, xrdb.c, xselect.c:
6103 * xterm.c:
6104 Omit needless casts involving void * pointers and allocation.
6105 Prefer "P = xmalloc (sizeof *P)" to "P = xmalloc (sizeof (TYPE_OF_P))",
6106 as the former is more robust if P's type is changed.
6107 Prefer xzalloc to xmalloc + memset 0.
6108 Simplify malloc-or-realloc to realloc.
6109 Don't worry about xmalloc returning a null pointer.
6110 Prefer xstrdup to xmalloc + strcpy.
6111 * editfns.c (Fmessage_box): Grow message_text by at least 80 when
6112 growing it.
6113 * keyboard.c (apply_modifiers_uncached): Prefer local array to
6114 alloca of a constant.
6115
6dd5a677
EZ
61162012-07-05 Eli Zaretskii <eliz@gnu.org>
6117
6118 * xdisp.c (display_line): Fix horizontal pixel coordinates when
6119 hscroll is larger than the line width. Fixes long and futile
6120 looping inside extend_face_to_end_of_line (on a TTY) producing
6121 glyphs that are not needed and thrown away.
6122
6b312f0f
DA
61232012-07-05 Dmitry Antipov <dmantipov@yandex.ru>
6124
6125 * marker.c (set_marker_restricted_both): Simplify by using
6126 clip_to_bounds.
6127
f520ef9b
PE
61282012-07-05 Paul Eggert <eggert@cs.ucla.edu>
6129
6130 * editfns.c (region_limit): Simplify by using clip_to_bounds.
6131
383b7c95
JD
61322012-07-05 Jan Djärv <jan.h.d@swipnet.se>
6133
6134 * gtkutil.c (gtk_scrollbar_new, gtk_box_new): Define when HAVE_GTK3 is
6135 not defined (Bug#11768).
6136 (xg_create_frame_widgets): Use gtk_plug_new_for_display (Bug#11768).
6137 (xg_create_frame_widgets, create_dialog, xg_get_file_with_chooser)
6138 (make_widget_for_menu_item, xg_make_tool_item): Use gtk_box_new
6139 followed by gtk_box_set_homogeneous (Bug#11768).
6140 (xg_update_menu_item): Use GTK_IS_BOX (Bug#11768).
090bd7cb
JB
6141 (update_theme_scrollbar_width, xg_create_scroll_bar):
6142 Use gtk_scrollbar_new (Bug#11768).
383b7c95
JD
6143 (xg_event_is_for_scrollbar): Use Gdk Device functions for HAVE_GTK3.
6144 (is_box_type): New function (Bug#11768).
6145 (xg_tool_item_stale_p): Call is_box_type.
5293d758 6146 (xg_initialize): Get settings by calling gtk_settings_get_for_screen
383b7c95
JD
6147 with default display (Bug#11768).
6148
d6e7bf45
EZ
61492012-07-05 Eli Zaretskii <eliz@gnu.org>
6150
6151 * xdisp.c (window_hscroll_limited): New function.
6152 (pos_visible_p, init_iterator): Use it to avoid overflow of pixel
6153 coordinates when window's hscroll is set to insanely large
6154 values. (Bug#11857)
6155
431391ec
JB
61562012-07-05 Juanma Barranquero <lekktu@gmail.com>
6157
6158 * makefile.w32-in ($(BLD)/dired.$(O), $(BLD)/fileio.$(O)): Fix typo.
6159 ($(BLD)/terminal.$(O), $(BLD)/syntax.$(O)): Update dependencies.
6160
23f86fce
DA
61612012-07-05 Dmitry Antipov <dmantipov@yandex.ru>
6162
6163 Cleanup xmalloc.
6164 * lisp.h (xzalloc): New prototype. Omit needless casts.
6165 * alloc.c (xzalloc): New function. Omit needless casts.
6166 * charset.c: Omit needless casts. Convert all calls to
6167 xmalloc with following memset to xzalloc.
6168 * dispnew.c: Likewise.
6169 * fringe.c: Likewise.
6170 * image.c: Likewise.
6171 * sound.c: Likewise.
6172 * term.c: Likewise.
6173 * w32fns.c: Likewise.
6174 * w32font.c: Likewise.
6175 * w32term.c: Likewise.
6176 * xfaces.c: Likewise.
6177 * xfns.c: Likewise.
6178 * xterm.c: Likewise.
6179 * atimer.c: Omit needless casts.
6180 * buffer.c: Likewise.
6181 * callproc.c: Likewise.
6182 * ccl.c: Likewise.
6183 * coding.c: Likewise.
6184 * composite.c: Likewise.
6185 * doc.c: Likewise.
6186 * doprnt.c: Likewise.
6187 * editfns.c: Likewise.
6188 * emacs.c: Likewise.
6189 * eval.c: Likewise.
6190 * filelock.c: Likewise.
6191 * fns.c: Likewise.
6192 * gtkutil.c: Likewise.
6193 * keyboard.c: Likewise.
6194 * lisp.h: Likewise.
6195 * lread.c: Likewise.
6196 * minibuf.c: Likewise.
6197 * msdos.c: Likewise.
6198 * print.c: Likewise.
6199 * process.c: Likewise.
6200 * region-cache.c: Likewise.
6201 * search.c: Likewise.
6202 * sysdep.c: Likewise.
6203 * termcap.c: Likewise.
6204 * terminal.c: Likewise.
6205 * tparam.c: Likewise.
6206 * w16select.c: Likewise.
6207 * w32.c: Likewise.
6208 * w32reg.c: Likewise.
6209 * w32select.c: Likewise.
6210 * w32uniscribe.c: Likewise.
6211 * widget.c: Likewise.
6212 * xdisp.c: Likewise.
6213 * xmenu.c: Likewise.
6214 * xrdb.c: Likewise.
6215 * xselect.c: Likewise.
6216
0497dc44
PE
62172012-07-05 Paul Eggert <eggert@cs.ucla.edu>
6218
6219 * fileio.c (time_error_value): Check the right error number.
6220 Problem reported by Troels Nielsen in
6221 <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00095.html>.
6222
356e7178
PE
62232012-07-04 Paul Eggert <eggert@cs.ucla.edu>
6224
4e71fd89
PE
6225 * window.c (set_window_hscroll): Revert the 100000 hscroll limit.
6226 This should be fixed in a better way; see Eli Zaretskii in
6227 <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00088.html>.
6228 (HSCROLL_MAX): Remove; this is now internal to set_window_hscroll.
6229
f0941253
PE
6230 * fileio.c (time_error_value): Rename from special_mtime.
6231 The old name's problems were noted by Eli Zaretskii in
6232 <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00087.html>.
6233
065c9eb4
PE
6234 * emacs.c (gdb_pvec_type): Change it back to enum pvec_type.
6235 This variable's comment says Emacs needs at least one GDB-visible
6236 symbol of type enum pvec_type, to work around GDB problems.
6237 The symbol's value doesn't matter.
6238
356e7178
PE
6239 * alloc.c (PSEUDOVECTOR_NBYTES): Remove stray ';'
6240 that causes compilation to fail on pre-C99 compilers.
6241
ed9265fc 62422012-07-04 Juanma Barranquero <lekktu@gmail.com>
95f61aa2
JB
6243
6244 * s/ms-w32.h (LISP_FLOAT_TYPE, HAVE_MEMCMP, HAVE_MEMCPY)
6245 (HAVE_MEMMOVE, HAVE_MEMSET): Don't set, obsolete.
6246
3884d954
DA
62472012-07-04 Dmitry Antipov <dmantipov@yandex.ru>
6248
d209e2fb 6249 * buffer.c (init_buffer_once): Fix initialization of
3884d954
DA
6250 headers for buffer_defaults and buffer_local_symbols.
6251 Reported by Juanma Barranquero <lekktu@gmail.com>.
6252
ee28be33
SM
62532012-07-04 Stefan Monnier <monnier@iro.umontreal.ca>
6254
6255 Turn VECTOR_FREE_LIST_FLAG into PVEC_FREE.
6256 * lisp.h (enum pvec_type): Use fewer bits.
6257 (PSEUDOVECTOR_SIZE_BITS): New constant.
6258 (PSEUDOVECTOR_SIZE_MASK, PVEC_TYPE_MASK): Use it.
6259 (XSETPVECTYPESIZE, XSETTYPED_PSEUDOVECTOR, DEFUN): Adapt code to
6260 change in pvec_type.
6261 (PSEUDOVECTOR_TYPEP): New macro.
6262 (TYPED_PSEUDOVECTORP): Use it.
6263 * fns.c (internal_equal): Adapt code to extract pvectype.
6264 * emacs.c (gdb_pvec_type): Update type.
6265 * alloc.c (PSEUDOVECTOR_NBYTES): New macro.
6266 (VECTOR_FREE_LIST_SIZE_MASK): Remove (=> PSEUDOVECTOR_SIZE_MASK).
6267 (VECTOR_FREE_LIST_FLAG): Remove (=> PVEC_FREE).
6268 (SETUP_ON_FREE_LIST): Use XSETPVECTYPESIZE.
6269 (sweep_vectors): Use it. Use local var `total_bytes' instead of
6270 abusing vector->header.next.nbytes.
6271 (live_vector_p): Use PVEC_TYPE.
6272 (mark_object): Adapt code to extract pvectype. Use switch.
6273
c7f2cd7f
PE
62742012-07-04 Paul Eggert <eggert@cs.ucla.edu>
6275
6276 * doprnt.c (doprnt): Don't assume string length fits in 'int'.
6277 Tighten new eassert a bit.
6278
8ce70ed2
DA
62792012-07-04 Dmitry Antipov <dmantipov@yandex.ru>
6280
6281 Fix compilation with --enable-gcc-warnings and -O1
6282 optimization level.
6283 * doprnt.c (doprnt): Change type of tem to int, initialize
6284 to avoid compiler warning. Add eassert.
6285 * search.c (simple_search): Initialize match_byte to avoid
6286 compiler warning. Add eassert.
6287
dea7f1e5
PE
62882012-07-04 Paul Eggert <eggert@cs.ucla.edu>
6289
24a212eb
PE
6290 Avoid weird behavior with large horizontal scrolls.
6291 Without this change, for example, large hscroll values would
6292 mess up Emacs's display on Fedora 15 x86, presumably due to
6293 overflows in int calculations in the display code.
6294 Also, if buffers had long lines, Emacs would freeze.
6295 * window.c (HSCROLL_MAX): Reduce to 100000, and make it visible to GDB.
6296 (set_window_hscroll): New function, containing the old guts of
6297 Fset_window_hscroll. Return the clipped value.
6298 (Fset_window_hscroll, Fscroll_left, Fscroll_right): Use it.
6299 This avoids the need to check against PTRDIFF_MAX.
6300
dea7f1e5
PE
6301 * buffer.c (Fgenerate_new_buffer_name): Fix sprintf format mismatch.
6302
76046526
DA
63032012-07-04 Dmitry Antipov <dmantipov@yandex.ru>
6304
6305 * buffer.c (Fgenerate_new_buffer_name): Fix type mismatch.
6306
39adff0d
PE
63072012-07-04 Paul Eggert <eggert@cs.ucla.edu>
6308
63807d47
PE
6309 * regex.c: Suppress GCC warning on RHEL 6. (Bug#11207)
6310 Conditionalize the pragmas on GCC 4.5 or later, not GCC 4.3 or later,
6311 since GCC 4.4.6 issues a bogus warning for them.
6312
39adff0d
PE
6313 Fix bugs in file timestamp newness comparisons.
6314 * fileio.c (Ffile_newer_than_file_p):
6315 * lread.c (Fload): Use full timestamp resolution of files,
6316 not just the 1-second resolution, so that files that are only
6317 slightly newer still count as newer.
6318 * fileio.c (Ffile_newer_than_file_p): Don't assume file
6319 timestamps fit in 'int'; this fixes a Y2038 bug on most hosts.
6320
dbeed9a6
PE
63212012-07-03 Paul Eggert <eggert@cs.ucla.edu>
6322
6323 * fileio.c: Improve handling of file time marker. (Bug#11852)
6324 (special_mtime): New function.
6325 (Finsert_file_contents, Fverify_visited_file_modtime):
6326 Use it to set special mtime values consistently.
6327
636334d6
AS
63282012-07-03 Andreas Schwab <schwab@linux-m68k.org>
6329
6330 * fileio.c (Finsert_file_contents): Properly handle st_mtime
6331 marker for non-existing file. (Bug#11852)
6332
e2017fe2
GM
63332012-07-03 Glenn Morris <rgm@gnu.org>
6334
6335 * lisp.h (Fread_file_name): Restore EXFUN (it's not a normal DEFUN
6336 and did not make it into globals.h).
6337
404dbd37
TT
63382012-07-03 Tom Tromey <tromey@redhat.com>
6339
6340 * window.c (Fset_window_margins, Fset_window_fringes)
6341 (Fset_window_scroll_bars, Fset_window_vscroll): No longer static.
6342 * textprop.c (Fprevious_property_change): No longer static.
6343 * syntax.c (Fsyntax_table_p): No longer static.
6344 * process.c (Fget_process, Fprocess_datagram_address): No longer
6345 static.
6346 * keymap.c (Flookup_key, Fcopy_keymap): No longer static.
6347 * keyboard.c (Fcommand_execute): No longer static.
6348 Remove EXFUN.
6349 * insdel.c (Fcombine_after_change_execute): No longer static.
6350 * image.c (Finit_image_library): No longer static.
6351 * fileio.c (Fmake_symbolic_link): No longer static.
6352 * eval.c (Ffetch_bytecode): No longer static.
6353 * editfns.c (Fuser_full_name): No longer static.
d209e2fb
JB
6354 * doc.c (Fdocumentation_property, Fsnarf_documentation):
6355 No longer static.
404dbd37
TT
6356 * buffer.c (Fset_buffer_major_mode, Fdelete_overlay): No longer
6357 static.
6358 * dired.c (Ffile_attributes): No longer static.
6359 * composite.c (Fcomposition_get_gstring): No longer static.
6360 * callproc.c (Fgetenv_internal): No longer static.
6361
6362 * ccl.h: Remove EXFUNs.
6363 * buffer.h: Remove EXFUNs.
6364 * dispextern.h: Remove EXFUNs.
6365 * intervals.h: Remove EXFUNs.
6366 * fontset.h: Remove EXFUN.
6367 * font.h: Remove EXFUNs.
6368 * dosfns.c (system_process_attributes): Remove EXFUN.
6369 * keymap.h: Remove EXFUNs.
6370 * lisp.h: Remove EXFUNs.
6371 * w32term.h: Remove EXFUNs.
6372 * window.h: Remove EXFUNs.
6373 * xsettings.h: Remove EXFUN.
6374 * xterm.h: Remove EXFUN.
6375
8e4fd1e1
GM
63762012-07-03 Glenn Morris <rgm@gnu.org>
6377
6378 * lisp.h (Frandom): Make it visible to C.
6379 * buffer.c (Fgenerate_new_buffer_name): Speed up finding a new
6380 buffer for invisible buffers. (Bug#1229)
6381
ca95b3eb
DA
63822012-07-03 Dmitry Antipov <dmantipov@yandex.ru>
6383
6384 Fix block vector allocation code to allow VECTOR_BLOCK_SIZE
6385 values which aren't power of 2.
14ae4239
BT
6386 * alloc.c (VECTOR_FREE_LIST_SIZE_MASK): New macro.
6387 Verify it's value and the value of VECTOR_BLOCK_SIZE. Adjust users
ca95b3eb
DA
6388 accordingly.
6389
7555c33f
SM
63902012-07-03 Stefan Monnier <monnier@iro.umontreal.ca>
6391
6392 * lisp.h (Lisp_Misc, Lisp_Fwd): Move around to group better.
6393
6394 * alloc.c (mark_object): Revert part of last patch to use `switch'.
6395
d12e8f5a
DA
63962012-07-03 Dmitry Antipov <dmantipov@yandex.ru>
6397
6398 * alloc.c (allocate_vector_block): Remove redundant
6399 calls to mallopt if DOUG_LEA_MALLOC is defined.
6400 (allocate_vectorlike): If DOUG_LEA_MALLOC is defined,
6401 avoid calls to mallopt if zero_vector is returned.
6402
296094c3
DA
64032012-07-03 Dmitry Antipov <dmantipov@yandex.ru>
6404
6405 * alloc.c (check_string_bytes): If GC_CHECK_STRING_BYTES
6406 is enabled, avoid dereferencing NULL current_sblock if
6407 running undumped.
6408
36429c89
DA
64092012-07-03 Dmitry Antipov <dmantipov@yandex.ru>
6410
6411 Cleanup basic buffer management.
6412 * buffer.h (struct buffer): Change layout to use generic vector
6413 marking code. Fix some comments. Change type of 'clip_changed'
6414 to bitfield. Remove unused #ifndef old.
6415 (FIRST_FIELD_PER_BUFFER, LAST_FIELD_PER_BUFFER): Remove.
6416 (GET_OVERLAYS_AT): Fix indentation.
6417 (for_each_per_buffer_object_at): New macro.
6418 * buffer.c (clone_per_buffer_values, reset_buffer_local_variables)
6419 (Fbuffer_local_variables): Use it.
6420 (init_buffer_once, syms_of_buffer): Remove unused #ifndef old.
6421 * alloc.c (allocate_buffer): Adjust to match new layout of
6422 struct buffer. Fix comment.
6423 (mark_overlay): New function.
6424 (mark_buffer): Use it. Use mark_vectorlike to mark normal
6425 Lisp area of struct buffer.
6426 (mark_object): Use it. Adjust marking of misc objects
6427 and related comments.
6428
3b3e4cac
PE
64292012-07-02 Paul Eggert <eggert@cs.ucla.edu>
6430
6431 * alloc.c (mark_object): Remove "#ifdef GC_CHECK_MARKED_OBJECTS"
6432 wrapper that is not needed because the wrapped code is a no-op (zero
6433 machine instructions) when GC_CHECK_MARKED_OBJECTS is not defined.
6434 This avoids a -Wunused-macros diagnostic with GCC 4.7.1 x86-64.
6435
cf5c0175
DA
64362012-07-02 Dmitry Antipov <dmantipov@yandex.ru>
6437
6438 * alloc.c (mark_buffer): Simplify. Remove prototype.
6439 (mark_object): Add comment. Reorganize marking of vector-like
faf611c7 6440 objects. Use CHECK_LIVE for all vector-like objects except buffers
14ae4239
BT
6441 and subroutines when GC_CHECK_MARKED_OBJECTS is defined.
6442 Avoid redundant calls to mark_vectorlike for bool vectors.
cf5c0175 6443
ca26824c
GM
64442012-06-30 Glenn Morris <rgm@gnu.org>
6445
2e4c5312
GM
6446 * nsterm.m (ns_init_paths): Ignore site-lisp if --no-site-lisp.
6447
ca26824c
GM
6448 * epaths.in (PATH_SITELOADSEARCH): New.
6449 * lread.c (init_lread): Use PATH_SITELOADSEARCH.
6450 This is rather than relying on --enable-locallisppath elements
6451 having "site-lisp" in their names. (Bug#10208#25, 11658)
6452
0d23c240
EZ
64532012-06-30 Eli Zaretskii <eliz@gnu.org>
6454
c9240d7a
EZ
6455 * w32proc.c (sys_select): Accept and ignore one more argument.
6456
6457 * w32.c (emacs_gnutls_pull): Call select with one more argument.
6458
0d23c240 6459 * sysselect.h [DOS_NT]: Don't include sys/select.h.
9ff8f76b 6460 (pselect) [!MS_DOS]: Redirect to sys_select.
0d23c240
EZ
6461
6462 * sysdep.c: Don't include dos.h and dosfns.h.
6463
6464 * process.c (sys_select):
6465 * msdos.c (sys_select): Accept one more argument and ignore it.
6466
6467 * msdos.c (event_timestamp, sys_select): Use gnulib's gettime;
6468 adapt data types and code to that.
6469
6470 * dosfns.c:
6471 * msdos.c (gettime, settime): Define away the prototypes in dos.h,
6472 which clashes with the gnulib function of the same name.
6473
af5a5a98
AS
64742012-06-30 Andreas Schwab <schwab@linux-m68k.org>
6475
c5e4379c
AS
6476 * font.c (font_style_to_value, font_style_symbolic)
6477 (font_prop_validate_style): Add type checks for values in
6478 font_style_table.
6479
af5a5a98
AS
6480 * lisp.h (CHECK_RANGED_INTEGER): Make value to check the first
6481 argument.
6482 * character.c, charset.c, menu.c, process.c, window.c: Adjust all
6483 uses.
6484
8d38f461
EZ
64852012-06-29 Eli Zaretskii <eliz@gnu.org>
6486
2e5a6631
EZ
6487 * xdisp.c (try_window_id): Undo last change.
6488
8d38f461
EZ
6489 * w32.c (getwd): Adjust commentary about startup_dir.
6490 (init_environment): Always call sys_access, even in non-MSVC
6491 builds. Don't chdir to the directory of the Emacs executable.
6492 This undoes code from 1997 which was justified by the need to
6493 "avoid conflicts when removing and renaming directories". But its
6494 downside was that every relative file name was being interpreted
6495 relative to the directory of the Emacs executable, which can never
6496 be TRT. In particular, it broke sys_access when called with
6497 relative file names.
6498 (sys_access): Map GetLastError to errno.
6499
2af3565e
DA
65002012-06-29 Dmitry Antipov <dmantipov@yandex.ru>
6501
6502 * window.h (struct window): Change type of 'fringes_outside_margins'
6503 to bitfield. Fix comment. Adjust users accordingly.
cf5c0175 6504 (struct window): Change type of 'window_end_bytepos' to ptrdiff_t.
2af3565e
DA
6505 Adjust comment.
6506 * xdisp.c (try_window_id): Change type of 'first_vpos' and 'vpos'
6507 to ptrdiff_t.
6508
c8d3a25c 65092012-06-29 Andreas Schwab <schwab@linux-m68k.org>
57570cd3 6510
c8d3a25c
GM
6511 * gnutls.c (emacs_gnutls_handshake):
6512 Add QUIT to make the loop interruptible.
57570cd3 6513
c8d3a25c 65142012-06-29 Glenn Morris <rgm@gnu.org>
d01fd55f 6515
c8d3a25c
GM
6516 * charset.c (init_charset): Make lack of etc/charsets fatal.
6517
3e984ee8
DA
65182012-06-29 Dmitry Antipov <dmantipov@yandex.ru>
6519
6520 * editfns.c (region_limit): Fix type mismatch.
6521
ef884f23
DA
65222012-06-29 Dmitry Antipov <dmantipov@yandex.ru>
6523
6524 * nsfns.m: Fix GLYPH_DEBUG usage assuming that it may be
6525 undefined. Convert from xassert to eassert.
6526 * nsmenu.m: Convert from xassert to eassert.
6527 * nsterm.m: Likewise.
6528
7d7e0027
SM
65292012-06-28 Stefan Monnier <monnier@iro.umontreal.ca>
6530
6531 * editfns.c (region_limit): Clip to narrowing (bug#11770).
6532
aa754e6a
PE
65332012-06-28 Paul Eggert <eggert@cs.ucla.edu>
6534
6535 Avoid integer overflow on scroll-left and scroll-right.
6536 * window.c (HSCROLL_MAX): New macro.
6537 (Fscroll_left, Fscroll_right): Avoid undefined behavior on integer
6538 overflow when requested scroll falls outside ptrdiff_t range.
6539
80b00b08
DA
65402012-06-28 Dmitry Antipov <dmantipov@yandex.ru>
6541
6542 * window.h (struct window): Change type of 'hscroll',
6543 'min_hscroll' and 'last_point' from Lisp_Object to ptrdiff_t,
6544 'last_modified' and 'last_overlay_modified' to EMACS_INT.
6545 Adjust users accordingly.
6546 * xdisp.c (try_cursor_movement): Replace type check with eassert.
6547 * window.c (Fscroll_left, Fscroll_right): Change type of 'hscroll'
6548 from EMACS_INT to ptrdiff_t.
6549 (make_window): Omit redundant initialization.
6550
62b2bcf6
JB
65512012-06-28 Juanma Barranquero <lekktu@gmail.com>
6552
6553 * makefile.w32-in ($(BLD)/regex.$(O)): Update dependencies.
6554
45942c7d
DA
65552012-06-28 Dmitry Antipov <dmantipov@yandex.ru>
6556
6557 * window.h (struct window): Change type of 'use_time' and
6558 'sequence_number' from Lisp_Object to int.
6559 * frame.c (make_frame): Adjust users accordingly.
6560 * print.c (print_object): Likewise.
6561 * window.c (select_window, Fwindow_use_time, make_parent_window)
6562 (make_window): Likewise.
6563
e509cfa6
DA
65642012-06-28 Dmitry Antipov <dmantipov@yandex.ru>
6565
6566 * dispextern.h (GLYPH_DEBUG): Now defined in config.h if
6567 enabled with --enable-checking=[all,glyphs] configure option.
6568 Fix GLYPH_DEBUG usage assuming that it may be undefined,
6569 adjust comments accordingly.
6570 * dispnew.c: Fix GLYPH_DEBUG usage assuming that it may be
6571 undefined, adjust comments accordingly.
6572 * image.c: Likewise.
6573 * scroll.c: Likewise.
6574 * w32fns.c: Likewise.
6575 * w32term.c: Likewise.
6576 * xdisp.c: Likewise.
6577 * xfaces.c: Likewise.
6578 * xfns.c: Likewise.
6579 * xterm.c: Likewise.
6580
a54e2c05
DA
65812012-06-28 Dmitry Antipov <dmantipov@yandex.ru>
6582
6583 Generalize run-time debugging checks.
6584 * dispextern.h (XASSERTS): Remove.
6585 * fontset.c (xassert): Remove.
6586 Convert from xassert to eassert.
6587 * alloc.c: Convert from xassert to eassert.
6588 * bidi.c: Likewise.
6589 * dispnew.c: Likewise.
6590 * fns.c: Likewise.
6591 * fringe.c: Likewise.
6592 * ftfont.c: Likewise.
6593 * gtkutil.c: Likewise.
6594 * image.c: Likewise.
6595 * keyboard.c: Likewise.
6596 * menu.c: Likewise.
6597 * process.c: Likewise.
6598 * scroll.c: Likewise.
6599 * sound.c: Likewise.
6600 * term.c: Likewise.
6601 * w32console.c: Likewise.
6602 * w32fns.c: Likewise.
6603 * w32term.c: Likewise.
6604 * window.c: Likewise.
6605 * xdisp.c: Likewise.
6606 * xfaces.c: Likewise.
6607 * xfns.c: Likewise.
6608 * xselect.c: Likewise.
6609 * xterm.c: Likewise.
6610
1ec4b7b2
SM
66112012-06-27 Stefan Monnier <monnier@iro.umontreal.ca>
6612
6613 * fns.c (maybe_resize_hash_table): Output message when growing the
6614 purify-hashtable.
6615
2014308a
DA
66162012-06-27 Dmitry Antipov <dmantipov@yandex.ru>
6617
6618 * alloc.c (allocate_string_data): Remove dead code.
6619 * xsettings.c (XSETTINGS_FONT_NAME): Move under HAVE_XFT to
6620 avoid GCC warning about unused macro.
6621
246155eb
DA
66222012-06-27 Dmitry Antipov <dmantipov@yandex.ru>
6623
6624 * alloc.c (allocate_string): Omit intervals initialization.
6625 * alloc.c (make_uninit_multibyte_string): Initialize intervals
6626 as in make_pure_string and make_pure_c_string.
6627
43184b7b
DA
66282012-06-27 Dmitry Antipov <dmantipov@yandex.ru>
6629
d209e2fb 6630 * alloc.c (allocate_string): Fix last change.
43184b7b 6631
3fe6dd74
DA
66322012-06-27 Dmitry Antipov <dmantipov@yandex.ru>
6633
d209e2fb 6634 * alloc.c (allocate_string): Remove two redundant calls
3fe6dd74
DA
6635 to memset, add explicit initialization where appropriate.
6636
1ba6038a
GM
66372012-06-27 Glenn Morris <rgm@gnu.org>
6638
6639 * lisp.mk (lisp): Remove paths.elc.
6640
c89926a5
CY
66412012-06-27 Chong Yidong <cyd@gnu.org>
6642
6643 * doc.c (Fsubstitute_command_keys): Fix punctuation.
6644
ed6b3510
JW
66452012-06-26 John Wiegley <johnw@newartisans.com>
6646
1ec4b7b2 6647 * unexmacosx.c (copy_data_segment): Add two section names used
157e99e4
JW
6648 on Mac OS X Lion: __mod_init_func and __mod_term_func.
6649
ed6b3510
JW
6650 * alloc.c (mark_memory): Do not check with -faddress-sanitizer
6651 when building with Clang.
6652
8edd4a2b
SM
66532012-06-26 Stefan Monnier <monnier@iro.umontreal.ca>
6654
6655 * eval.c (Fapply): Allow calling it with a single argument.
6656
f6f62d1b
EZ
66572012-06-26 Eli Zaretskii <eliz@gnu.org>
6658
6659 * s/ms-w32.h (strcasecmp, strncasecmp) [_MSC_VER]: Redirect to
6660 _stricmp and _strnicmp.
6661 (HAVE_STRCASECMP, HAVE_STRNCASECMP): Define to 1.
6662
62efea5e
DA
66632012-06-26 Dmitry Antipov <dmantipov@yandex.ru>
6664
6665 * alloc.c (allocate_window): Zero out non-Lisp part of newly
6666 allocated window.
6667 (allocate_process): Likewise for new process.
8edd4a2b 6668 (allocate_terminal): Change to use offsetof.
62efea5e
DA
6669 (allocate_frame): Likewise.
6670 * frame.c (make_frame): Omit redundant initialization.
6671 * window.c (make_parent_window): Use memset.
6672 (make_window): Omit redundant initialization.
6673 * process.c (make_process): Omit redundant initialization.
6674 * terminal.c (create_terminal): Likewise.
6675
42997f4d
DA
66762012-06-26 Dmitry Antipov <dmantipov@yandex.ru>
6677
6678 * term.c (delete_tty): Remove redundant call to memset.
6679
1130ecfc
DA
66802012-06-26 Dmitry Antipov <dmantipov@yandex.ru>
6681
6682 * alloc.c: Remove build_string.
6683 * lisp.h: Define build_string as static inline. This provides
6684 a better opportunity to optimize away calls to strlen when the
6685 function is called with compile-time constant argument.
6686 * image.c (imagemagick_error): Convert to build_string.
6687 * w32proc.c (sys_spawnve): Likewise.
6688 * xterm.c (x_term_init): Likewise.
6689
cf38a720
PE
66902012-06-26 Paul Eggert <eggert@cs.ucla.edu>
6691
99027bdd
PE
6692 Use sprintf return value instead of invoking strlen on result.
6693 In the old days this wasn't portable, since some sprintf
6694 implementations returned char *. But they died out years ago and
6695 Emacs already assumes sprintf returns int.
6696 Similarly for float_to_string.
6697 This patch speeds up (number-to-string 1000) by 3% on Fedora 15 x86-64.
6698 * ccl.c (ccl_driver):
6699 * character.c (string_escape_byte8):
6700 * data.c (Fnumber_to_string):
6701 * doprnt.c (doprnt):
6702 * print.c (print_object):
6703 * xdisp.c (message_dolog):
6704 * xfns.c (syms_of_xfns):
6705 Use sprintf or float_to_string result to avoid need to call strlen.
6706 * data.c (Fnumber_to_string):
6707 Use make_unibyte_string, since the string must be ASCII.
6708 * lisp.h, print.c (float_to_string): Now returns int length.
6709 * term.c (produce_glyphless_glyph):
6710 Use sprintf result rather than recomputing it.
6711
cf38a720
PE
6712 Clean out last vestiges of the old HAVE_CONFIG_H stuff.
6713 * Makefile.in (ALL_CFLAGS):
6714 * makefile.w32-in (LOCAL_FLAGS): Remove -DHAVE_CONFIG_H.
6715 * gmalloc.c, regex.c: Include <config.h> unconditionally.
6716
3511c784
DA
67172012-06-25 Dmitry Antipov <dmantipov@yandex.ru>
6718
0a08eb21 6719 * dispextern.h (xstrcasecmp): Define to library function
3511c784
DA
6720 strcasecmp if available.
6721 * xfaces.c: Do not use xstrcasecmp if strcasecmp is available.
6722
fb7da12e
AS
67232012-06-25 Andreas Schwab <schwab@linux-m68k.org>
6724
6725 * keyboard.c (menu_bar_items, menu_bar_item, read_key_sequence):
6726 Avoid comma operator.
6727 * menu.c (push_submenu_start, push_submenu_end)
6728 (push_left_right_boundary, push_menu_pane): Likewise.
6729 * msdos.c (dos_rawgetc): Likewise.
6730
afa2ffd8
DA
67312012-06-25 Dmitry Antipov <dmantipov@yandex.ru>
6732
6733 * xfns.c (xic_create_fontsetname): Remove redundant calls
6734 to memset.
6735
b3b4476b
PE
67362012-06-25 Paul Eggert <eggert@cs.ucla.edu>
6737
4495ff38
PE
6738 * gtkutil.c (get_utf8_string): Remove redundant assignment.
6739 sprintf already null-terminates its output.
6740
b3b4476b
PE
6741 * xfns.c (x_window): Remove redundant cast.
6742
b00876c9
DA
67432012-06-25 Dmitry Antipov <dmantipov@yandex.ru>
6744
6745 * xmenu.c (xmenu_show, xdialog_show): Explicit cast from
6746 `const char *' to `char *' to avoid compiler warning.
6747
d188e26b
PE
67482012-06-24 Paul Eggert <eggert@cs.ucla.edu>
6749
885d1d74
PE
6750 * xterm.c (x_term_init): Build proper-sized _XSETTINGS_Snnn string
6751 instead of truncating it to 63 (admittedly a generous limit).
6752
d188e26b
PE
6753 * process.c: Fix spelling and caps in comments.
6754
e2f560b1
DN
67552012-06-24 Dan Nicolaescu <dann@ics.uci.edu>
6756
e86db54b 6757 * emacs.c (setpgrp): Remove definition, unused.
e2f560b1
DN
6758 * sysdep.c (setpgrp): Remove definition, not used in this file.
6759
7583a3a1
JB
67602012-06-24 Juanma Barranquero <lekktu@gmail.com>
6761
6762 * makefile.w32-in: Update dependencies.
6763
696056c2
EZ
67642012-06-24 Eli Zaretskii <eliz@gnu.org>
6765
6766 * makefile.w32-in (TIMESPEC_H): Remove nt/inc/sys/time.h.
6767 (SYSTIME_H): Add nt/inc/sys/time.h.
6768
6769 * systime.h [WINDOWSNT]: Include sys/time.h.
6770
6771 * s/ms-w32.h (struct timespec): Definition moved from
6772 nt/inc/sys/time.h. Suggested by Paul Eggert <eggert@cs.ucla.edu>.
6773
845ca893
PE
67742012-06-24 Paul Eggert <eggert@cs.ucla.edu>
6775
6776 Switch from NO_RETURN to C11's _Noreturn (Bug#11750).
6777 * buffer.h (buffer_slot_type_mismatch):
6778 * data.c (arith_error) [!FORWARD_SIGNAL_TO_MAIN_THREAD]:
6779 * eval.c (unwind_to_catch):
6780 * image.c (my_png_error, my_error_exit):
6781 * keyboard.c (quit_throw_to_read_char, user_error)
6782 (Fexit_recursive_edit, Fabort_recursive_edit):
6783 * lisp.h (die, args_out_of_range, args_out_of_range_3)
6784 (wrong_type_argument, buffer_overflow, __executable_start)
6785 (memory_full, buffer_memory_full, string_overflow, Fthrow)
6786 (xsignal, xsignal0, xsignal1, xsignal2, xsignal3, signal_error)
6787 (error, verror, nsberror, report_file_error, Ftop_level, Fkill_emacs)
6788 (fatal):
6789 (child_setup) [!DOS_NT]:
6790 * lread.c (end_of_file_error, invalid_syntax):
6791 * process.c (send_process_trap) [!FORWARD_SIGNAL_TO_MAIN_THREAD]:
6792 * puresize.h (pure_write_error):
6793 * search.c (matcher_overflow):
6794 * sound.c (sound_perror, alsa_sound_perror):
6795 * sysdep.c, syssignal.h (croak):
6796 * term.c (maybe_fatal, vfatal):
6797 * textprop.c (text_read_only):
6798 * undo.c (user_error):
6799 * unexmacosx.c (unexec_error):
6800 * xterm.c (x_ins_del_lines, x_delete_glyphs):
6801 Use _Noreturn rather than NO_RETURN.
6802 No need for separate decl merely because of _Noreturn.
6803 * sound.c (sound_warning, parse_sound):
6804 Remove unnecessary forward decls.
6805
f1dd8073
PE
68062012-06-24 Paul Eggert <eggert@cs.ucla.edu>
6807
6808 Fix bug when time_t is unsigned and as wide as intmax_t (Bug#9000).
6809 * lisp.h (WAIT_READING_MAX): New macro.
6810 * dispnew.c (Fsleep_for, sit_for):
6811 * keyboard.c (kbd_buffer_get_event):
6812 * process.c (Faccept_process_output):
6813 Use it to avoid bogus compiler warnings with obsolescent GCC versions.
6814 This improves on the previous patch, which introduced a bug
6815 when time_t is unsigned and as wide as intmax_t.
6816 See <http://bugs.gnu.org/9000#51>.
6817
b82c1755
EZ
68182012-06-23 Eli Zaretskii <eliz@gnu.org>
6819
6820 * dispnew.c (sit_for, Fsleep_for):
6821 * keyboard.c (kbd_buffer_get_event):
6822 * process.c (Faccept_process_output): Avoid compiler warnings when
6823 comparing a 32-bit time_t with a 64-bit INTMAX_MAX.
6824
ca300656
JB
68252012-06-23 Juanma Barranquero <lekktu@gmail.com>
6826
049ec95b
JB
6827 * makefile.w32-in: Update dependencies.
6828
ca300656
JB
6829 * w32.c (ltime): Add return type and declare static.
6830 (w32_get_internal_run_time): Remove usused variable `time_100ns'.
6831
db7b8d06
PE
68322012-06-23 Paul Eggert <eggert@cs.ucla.edu>
6833
6834 * sysdep.c [__FreeBSD__]: Fix more recently-introduced typos.
6835 Privately reported by Herbert J. Skuhra.
6836 (make_lisp_timeval) [__FreeBSD__]: Rename from TIMELIST.
6837 All uses changed.
6838 (system_process_attributes) [__FreeBSD__]: Invoke make_lisp_time,
6839 not make_lisp_timeval, when the argument is of type EMACS_TIME.
6840
0bd8297f
EZ
68412012-06-23 Eli Zaretskii <eliz@gnu.org>
6842
96512555
EZ
6843 * w32proc.c (Fw32_get_locale_info): Fix an off-by-one error in
6844 last argument of make_unibyte_string.
6845
0bd8297f
EZ
6846 * keyboard.c (kbd_buffer_get_event): Include the codepage and the
6847 language ID in the event parameters.
6848
6849 * w32term.c (w32_read_socket): Put the new keyboard codepage into
6850 event.code, not the obscure "character set ID".
6851
63def6b6
CY
68522012-06-23 Chong Yidong <cyd@gnu.org>
6853
6854 * xmenu.c (x_menu_wait_for_event): Adapt GTK3 to new xg_select.
6855
e8a02204
EZ
68562012-06-23 Eli Zaretskii <eliz@gnu.org>
6857
388cdec0
EZ
6858 Fix the MS-Windows build broken by 2012-06-22T21:17:42Z!eggert@cs.ucla.edu.
6859 * w32.c (fdutimens): New function.
6860
6861 * w32proc.c (sys_select): Adapt to change in the EMACS_TIME type.
6862
6863 * s/ms-w32.h (pselect): Redirect to sys_select.
6864
6865 * sysselect.h [WINDOWSNT]: Don't include sys/select.h.
6866
e8a02204
EZ
6867 * ralloc.c (r_alloc_inhibit_buffer_relocation): Fix stupid thinko
6868 in the logic of incrementing and decrementing the value of
6869 use_relocatable_buffers.
6870
d054f3fb
PE
68712012-06-23 Paul Eggert <eggert@cs.ucla.edu>
6872
6873 * sysdep.c [__FreeBSD__]: Fix recently-introduced typos.
6874 Privately reported by Herbert J. Skuhra.
6875 [__FreeBSD__]: Remove "*/" typo after "#include".
6876 (timeval_to_EMACS_TIME) [__FreeBSD__]: New static function.
6877 (TIMEVAL) [__FreeBSD__]: Now a static function rather than a macro.
6878 (TIMEVAL, system_process_attributes) [__FreeBSD__]:
6879 Don't assume EMACS_TIME and struct timeval are the same type.
6880
d35af63c
PE
68812012-06-22 Paul Eggert <eggert@cs.ucla.edu>
6882
6883 Support higher-resolution time stamps (Bug#9000).
6884 The time stamps are only nanosecond-resolution at the C level,
6885 since that's the best that any real-world system supports now.
6886 But they are picosecond-resolution at the Lisp level, as that's
6887 easy, and leaves room for future OS improvements.
6888
6889 * Makefile.in (LIB_CLOCK_GETTIME): New macro.
6890 (LIBES): Use it.
6891
6892 * alloc.c (Fgarbage_collect): Port to higher-res time stamps.
6893 Don't get current time unless it's needed.
6894
6895 * atimer.c: Include <sys/time.h> unconditionally, since gnulib
6896 now provides it if it's absent.
6897 (start_atimer): Port to higher-res time stamps.
6898 Check for time stamp overflow. Don't get current time more
6899 often than is needed.
6900
6901 * buffer.h (struct buffer): Buffer modtime now has high resolution.
6902 Include systime.h, not time.h.
6903 (NONEXISTENT_MODTIME_NSECS, UNKNOWN_MODTIME_NSECS): New macros.
6904
6905 * dired.c: Include stat-time.h.
6906 (Ffile-attributes): File times now have higher resolution.
6907
6908 * dispextern.h [HAVE_WINDOW_SYSTEM]: Include systime.h.
6909 (struct image): Timestamp now has higher resolution.
6910
6911 * dispnew.c (PERIODIC_PREEMPTION_CHECKING): Remove, as Emacs always
6912 has at least microseconds now. All uses removed.
6913 (update_frame, update_single_window, update_window, update_frame_1)
6914 (Fsleep_for, sit_for): Port to higher-resolution time stamps.
927c7216 6915 (duration_to_sec_usec): Remove; no longer needed.
d35af63c
PE
6916
6917 * editfns.c (time_overflow): Now extern.
6918 (Fcurrent_time, Fget_internal_run_time, make_time, lisp_time_argument)
6919 (float-time, Fformat_time_string, Fcurrent_time_string)
6920 (Fcurrent_time_zone): Accept and generate higher-resolution
6921 time stamps.
6922 (make_time_tail, make_lisp_time, dissassemble_lisp_time)
6923 (decode_time_components, lisp_seconds_argument): New functions.
6924 (make_time): Now static.
6925 (lisp_time_argument): Now returns EMACS_TIME. New arg ppsec.
6926 Report an error if the time is invalid, rather than having the caller
6927 do that.
6928
6929 * fileio.c: Include <stat-time.h>
6930 (Fcopy_file): Copy higher-resolution time stamps.
6931 Prefer to set the time stamp via a file descriptor if that works.
6932 (Fset_file_times, Finsert_file_contents, Fwrite_region)
6933 (Fverify_visited_file_modtime, Fclear_visited_file_modtime)
6934 (Fvisited_file_modtime, Fset_visited_file_modtime):
6935 Support higher-resolution time stamps.
6936
6937 * fns.c (Frandom): Use nanoseconds, not microseconds, for seed.
6938
6939 * gtkutil.c (xg_maybe_add_timer): Port to higher-res time stamps.
6940
6941 * image.c (prepare_image_for_display, clear_image_cache)
6942 (lookup_image): Port to higer-resolution time stamps.
6943
6944 * keyboard.c (start_polling, bind_polling_period):
6945 Check for time stamp overflow.
6946 (read_char, kbd_buffer_get_event, timer_start_idle)
6947 (timer_stop_idle, timer_resume_idle, timer_check_2, timer_check)
6948 (Fcurrent_idle_time, init_keyboard, set_waiting_for_input):
6949 Port to higher-resolution time stamps. Do not assume time_t is signed.
6950 (decode_timer): New function. Timers are now vectors of length 9,
6951 not 8, to accommodate the picosecond component.
6952 (timer_check_2): Use it.
6953
6954 * nsterm.m (select_timeout, timeval_subtract): Remove.
6955 (ns_timeout): Use Emacs's facilities for time stamp arithmetic,
6956 as they're a bit more accurate and handle overflow better.
6957 (ns_select): Change prototype to be compatible with pselect.
6958 (ns_select, ns_term_shutdown): Port to ns-resolution time stamps.
6959 * nsterm.h (ns_select): Adjust prototype.
6960
6961 * msdos.c (EMACS_TIME_ZERO_OR_NEG_P): Remove, as it assumes
6962 us-resolution time stamps.
6963 (sys_select): Use the new EMACS_TIME_SIGN macro instead.
6964
6965 * lread.c (read_filtered_event): Port to ns-resolution time stamps.
6966
6967 * lisp.h (time_overflow): New decl.
6968 (wait_reading_process_output): First arg is now intmax_t, not int,
6969 to accommodate larger waits.
6970
6971 * process.h (struct Lisp_Process.read_output_delay):
6972 Now counts nanoseconds, not microseconds.
6973 * process.c (ADAPTIVE_READ_BUFFERING): Don't worry about
6974 EMACS_HAS_USECS.
6975 (READ_OUTPUT_DELAY_INCREMENT, Faccept_process_output)
6976 (wait_reading_process_output):
6977 Port to ns-resolution time stamps.
6978 (Faccept_process_output, wait_reading_process_output):
6979 Check for time stamp overflow. Do not assume time_t is signed.
6980 (select_wrapper): Remove; we now use pselect.
6981 (Fprocess_attributes): Now generates ns-resolution time stamps.
6982
6983 * sysdep.c: Include utimens.h. Don't include utime.h
6984 or worry about struct utimbuf; gnulib does that for us now.
6985 (gettimeofday): Remove; gnulib provides a substitute.
6986 (make_timeval): New function.
6987 (set_file_times): Now sets ns-resolution time stamps.
6988 New arg FD; all uses changed.
6989 (time_from_jiffies, ltime_from_jiffies, get_up_time)
6990 (system_process_attributes):
6991 Now returns ns-resolution time stamp. All uses changed.
6992 Check for time stamp overflow.
6993
6994 * sysselect.h: Don't depend on HAVE_SYS_SELECT_H; gnulib
6995 provides a substitute now.
6996
6997 * systime.h: Include timespec.h rather than sys/time.h and time.h,
6998 since it guarantees struct timespec.
6999 (EMACS_TIME): Now struct timespec, so that we can support
7000 ns-resolution time stamps.
7001 (EMACS_TIME_RESOLUTION, LOG10_EMACS_TIME_RESOLUTION): New macros.
7002 (EMACS_HAS_USECS): Remove; Emacs always has sub-second time stamps now.
7003 (EMACS_USECS): Remove.
7004 (EMACS_SET_USECS): The underlying time stamp now has ns resolution,
7005 so multiply the arg by 1000 before storing it.
7006 (EMACS_NSECS, EMACS_SECS_ADDR, EMACS_SET_NSECS, EMACS_SET_SECS_NSECS):
7007 New macros.
7008 (EMACS_GET_TIME, EMACS_ADD_TIME, EMACS_SUB_TIME):
7009 Port to ns-resolution time stamps.
7010 (EMACS_TIME_NEG_P): Remove; replaced by....
7011 (EMACS_TIME_SIGN): New macro.
7012 (EMACS_SET_INVALID_TIME, EMACS_TIME_VALID_P)
7013 (EMACS_TIME_FROM_DOUBLE, EMACS_TIME_TO_DOUBLE): New macros.
7014 (set_file_times, make_time, lisp_time_argument): Adjust signature.
7015 (make_timeval, make_lisp_time, decode_time_components): New decls.
7016 (EMACS_TIME_CMP): Remove; no longer used. Plus, it was buggy, in
7017 that it mishandled time_t overflow. You can't compare by subtracting!
7018 (EMACS_TIME_EQ, EMACS_TIME_NE, EMACS_TIME_GT, EMACS_TIME_GE)
7019 (EMACS_TIME_LT, EMACS_TIME_LE): Rewrite in terms of timespec_cmp.
7020
7021 * term.c: Include <sys/time.h>.
7022 (timeval_to_Time): New function, for proper overflow wraparound.
7023 (term_mouse_position, term_mouse_click): Use it.
7024
7025 * undo.c (record_first_change): Support higher-resolution time stamps
7026 in the undo buffer.
7027 (Fprimitive_undo): Use them when restoring time stamps.
7028
7029 * w32.c (ltime, U64_TO_LISP_TIME, process_times, emacs_gnutls_pull)
7030 (w32_get_internal_run_time):
7031 Port to higher-resolution Emacs time stamps.
7032 (ltime): Now accepts single 64-bit integer, as that's more convenient
7033 for callers.
7034
7035 * xdisp.c (start_hourglass): Port to ns-resolution time stamps.
7036
7037 * xgselect.c, xgselect.h (xg_select): Add sigmask argument,
7038 for compatibility with pselect. Support ns-resolution time stamps.
7039
7040 * xmenu.c (x_menu_wait_for_event): Support ns-resolution time stamps.
7041
7042 * xselect.c (wait_for_property_change, x_get_foreign_selection):
7043 Check for time stamp overflow, and support ns-resolution time stamps.
7044
7045 * xterm.c: Don't include sys/time.h; gnulib does that for us now.
7046 Don't worry about whether HAVE_TIMEVAL and HAVE_SELECT are set.
7047 (timeval_subtract): Remove; no longer needed.
7048 (XTflash, XTring_bell, x_wait_for_event):
7049 Port to ns-resolution time stamps. Don't assume time_t is signed.
7050
b6a92dfe
CY
70512012-06-22 Chong Yidong <cyd@gnu.org>
7052
7053 * xdisp.c (x_consider_frame_title): Revert last change.
7054
d251c37c
EZ
70552012-06-22 Eli Zaretskii <eliz@gnu.org>
7056
7057 * alloc.c (NSTATICS): Enlarge to 0x650. Otherwise, Emacs compiled
7058 with -DENABLE_CHECKING -DXASSERTS -DGLYPH_DEBUG=1 -DBYTE_CODE_METER
7059 aborts in staticpro during startup. (Without -DBYTE_CODE_METER,
7060 staticidx goes up to 1597 out of 1600 = 0x640.)
7061
f10deafb
PE
70622012-06-20 Paul Eggert <eggert@cs.ucla.edu>
7063
7064 * fileio.c (Fdefault_file_modes): Block input while fiddling with umask.
7065 Otherwise, the umask might be mistakenly 0 while handling input signals.
7066
ec6de1e2
SM
70672012-06-19 Stefan Monnier <monnier@iro.umontreal.ca>
7068
7069 * minibuf.c (Fread_string): Bind minibuffer-completion-table.
7070
28be1ada
DA
70712012-06-19 Dmitry Antipov <dmantipov@yandex.ru>
7072
7073 * alloc.c, bytecode.c, ccl.c, coding.c, composite.c, data.c, dosfns.c:
7074 * font.c, image.c, keyboard.c, lread.c, menu.c, minibuf.c, msdos.c:
7075 * print.c, syntax.c, window.c, xmenu.c, xselect.c: Replace direct
7076 access to `contents' member of Lisp_Vector objects with AREF and ASET
7077 where appropriate.
7078
c6bf3022
CY
70792012-06-19 Chong Yidong <cyd@gnu.org>
7080
7081 * frame.c (delete_frame): When selecting a frame on a different
7082 text terminal, do not alter the terminal's top-frame.
7083
7084 * xdisp.c (format_mode_line_unwind_data): Record the target
7085 frame's selected window and its terminal's top-frame.
7086 (unwind_format_mode_line): Restore them.
7087 (x_consider_frame_title, display_mode_line, Fformat_mode_line):
7088 Callers changed.
7089 (x_consider_frame_title): Do not condition on HAVE_WINDOW_SYSTEM,
7090 since tty frames can be explicitly named.
7091 (prepare_menu_bars): Likewise.
7092
7093 * term.c (Ftty_top_frame): New function.
7094
defd4196
PE
70952012-06-18 Paul Eggert <eggert@cs.ucla.edu>
7096
7097 Port byte-code-meter to modern targets.
7098 * bytecode.c (METER_CODE) [BYTE_CODE_METER]: Don't assume
7099 !CHECK_LISP_OBJECT_TYPE && !USE_LSB_TAG. Problem with
8b5257e1 7100 CHECK_LISP_OBJECT_TYPE reported by Dmitry Antipov in
defd4196
PE
7101 <http://lists.gnu.org/archive/html/emacs-devel/2012-06/msg00282.html>.
7102 (METER_1, METER_2): Simplify.
7103
1053a871
SM
71042012-06-18 Stefan Monnier <monnier@iro.umontreal.ca>
7105
7106 * data.c (Fdefalias): Return `symbol' (bug#11686).
7107
b7e8d081
MR
71082012-06-18 Martin Rudalics <rudalics@gmx.at>
7109
7110 * buffer.c (Fkill_buffer): Don't throw an error when the buffer
1053a871
SM
7111 gets killed during executing of this function (Bug#11665).
7112 Try to always return Qt when the buffer has been actually killed.
b7e8d081
MR
7113 (Vkill_buffer_query_functions): In doc-string say that functions
7114 run by this hook should not change the current buffer.
7115
7ea2b339
PE
71162012-06-18 Paul Eggert <eggert@cs.ucla.edu>
7117
7118 Fix recently-introduced process.c problems found by static checking.
7119 * process.c (write_queue_push, write_queue_pop, send_process):
7120 Use ptrdiff_t, not int or EMACS_INT, for buffer lengths and offsets.
7121 (write_queue_pop): Fix pointer signedness problem.
7122 (send_process): Remove unused local.
7123
96a313a1
CY
71242012-06-17 Chong Yidong <cyd@gnu.org>
7125
7126 * xdisp.c (redisplay_internal): No need to redisplay terminal
7127 frames that are not on top.
7128
20ca2e94
TN
71292012-06-17 Troels Nielsen <bn.troels@gmail.com>
7130
7131 * process.c (make_process): Initialize write_queue.
7132 (write_queue_push, write_queue_pop): New functions.
7133 (send_process): Use them to maintain correct ordering of process
7134 writes (Bug#10815).
7135
9a900ca9
PE
71362012-06-17 Paul Eggert <eggert@cs.ucla.edu>
7137
310fbfa8
PE
7138 * lisp.h (eassert): Assume C89 or later.
7139 This removes the need for CHECK.
7140 (CHECK): Remove. Its comments about always evaluating its
7141 argument were confusing, as 'eassert' typically does not evaluate
7142 its argument.
7143
27bb1ca4
PE
7144 * coding.c (produce_chars): Use ptrdiff_t, not int.
7145
9a900ca9
PE
7146 * xterm.c (x_draw_underwave): Check for integer overflow.
7147 This pacifies gcc 4.7.0 -Wunsafe-loop-optimizations on x86-64.
7148
41b7f8bc 71492012-06-17 Jan Djärv <jan.h.d@swipnet.se>
50a93863
JD
7150
7151 * nsterm.m (x_free_frame_resources): Move xfree so freed memory isn't
7152 referenced (Bug#11583).
7153
9b0e3eba
AA
71542012-06-16 Aurelien Aptel <aurelien.aptel@gmail.com>
7155
7156 Implement wave-style variant of underlining.
7157 * dispextern.h (face_underline_type): New enum.
7158 (face): Add field for underline type.
7159 * nsterm.m (ns_draw_underwave): New function.
7160 (ns_draw_text_decoration): Use it.
7161 * w32term.c (w32_restore_glyph_string_clip, w32_draw_underwave):
7162 New functions.
7163 (x_draw_glyph_string): Use them.
7164 * xfaces.c (Qline, Qwave): New Lisp objects.
7165 (check_lface_attrs, merge_face_ref)
1053a871
SM
7166 (Finternal_set_lisp_face_attribute, realize_x_face):
7167 Handle wave-style underline face attributes.
9b0e3eba
AA
7168 * xterm.c (x_draw_underwave): New function.
7169 (x_draw_glyph_string): Use it.
7170
0fb52f11
JB
71712012-06-16 Juanma Barranquero <lekktu@gmail.com>
7172
7173 * makefile.w32-in ($(BLD)/emacs.$(O), $(BLD)/fringe.$(O))
7174 ($(BLD)/xml.$(O), $(BLD)/intervals.$(O), $(BLD)/macros.$(O))
7175 ($(BLD)/minibuf.$(O), $(BLD)/regex.$(O), $(BLD)/region-cache.$(O))
7176 ($(BLD)/textprop.$(O), $(BLD)/undo.$(O), $(BLD)/window.$(O))
7177 ($(BLD)/w32select.$(O)): Update dependencies.
7178
e5560ff7
AS
71792012-06-16 Andreas Schwab <schwab@linux-m68k.org>
7180
7181 * buffer.h (FETCH_MULTIBYTE_CHAR): Define as inline.
7182 (BUF_FETCH_MULTIBYTE_CHAR): Likewise.
7183 * character.c (_fetch_multibyte_char_p): Remove.
7184 * alloc.c: Include "character.h" before "buffer.h".
7185 * bidi.c: Likewise.
7186 * buffer.c: Likewise.
7187 * bytecode.c: Likewise.
7188 * callint.c: Likewise.
7189 * callproc.c: Likewise.
7190 * casefiddle.c: Likewise.
7191 * casetab.c: Likewise.
7192 * category.c: Likewise.
7193 * cmds.c: Likewise.
7194 * coding.c: Likewise.
7195 * composite.c: Likewise.
7196 * dired.c: Likewise.
7197 * dispnew.c: Likewise.
7198 * doc.c: Likewise.
7199 * dosfns.c: Likewise.
7200 * editfns.c: Likewise.
7201 * emacs.c: Likewise.
7202 * fileio.c: Likewise.
7203 * filelock.c: Likewise.
7204 * font.c: Likewise.
7205 * fontset.c: Likewise.
7206 * fringe.c: Likewise.
7207 * indent.c: Likewise.
7208 * insdel.c: Likewise.
7209 * intervals.c: Likewise.
7210 * keyboard.c: Likewise.
7211 * keymap.c: Likewise.
7212 * lread.c: Likewise.
7213 * macros.c: Likewise.
7214 * marker.c: Likewise.
7215 * minibuf.c: Likewise.
7216 * nsfns.m: Likewise.
7217 * nsmenu.m: Likewise.
7218 * print.c: Likewise.
7219 * process.c: Likewise.
7220 * regex.c: Likewise.
7221 * region-cache.c: Likewise.
7222 * search.c: Likewise.
7223 * syntax.c: Likewise.
7224 * term.c: Likewise.
7225 * textprop.c: Likewise.
7226 * undo.c: Likewise.
7227 * unexsol.c: Likewise.
7228 * w16select.c: Likewise.
7229 * w32fns.c: Likewise.
7230 * w32menu.c: Likewise.
7231 * window.c: Likewise.
7232 * xdisp.c: Likewise.
7233 * xfns.c: Likewise.
7234 * xmenu.c: Likewise.
7235 * xml.c: Likewise.
7236 * xselect.c: Likewise.
7237
2f07e6af
EZ
72382012-06-16 Eli Zaretskii <eliz@gnu.org>
7239
1053a871
SM
7240 * xdisp.c (set_cursor_from_row): Don't dereference glyphs_end.
7241 If all the glyphs of the glyph row came from strings, and we have no
2f07e6af 7242 cursor positioning clues, put the cursor on the first glyph of the
1097afe4
EZ
7243 row.
7244 (handle_face_prop): Use chunk-relative overlay string index when
7245 indexing into it->string_overlays array. (Bug#11653)
946fdb73
EZ
7246 (set_cursor_from_row): Use the leftmost glyph as GLYPH_BEFORE, not
7247 the rightmost. (Bug#11720)
2f07e6af 7248
29b83cec
AS
72492012-06-16 Andreas Schwab <schwab@linux-m68k.org>
7250
7251 * category.h (CHAR_HAS_CATEGORY): Define as inline.
7252 (CATEGORY_MEMBER): Enforce 1/0 value.
7253 * category.c (_temp_category_set): Remove.
7254
4c5501e9
EZ
72552012-06-16 Eli Zaretskii <eliz@gnu.org>
7256
7257 * window.c (Fdelete_other_windows_internal)
7258 (Fdelete_window_internal): Don't access frame's mouse highlight
7259 info of the initial frame. (Bug#11677)
7260
2b570124
PE
72612012-06-14 Paul Eggert <eggert@cs.ucla.edu>
7262
e93864f9
PE
7263 * .gdbinit (xgetint): Fix recently-introduced paren typo.
7264 Assume USE_2_TAGS_FOR_INTS.
7265 (xreload): Adjust $tagmask width to match recent lisp.h change.
7266
2b570124
PE
7267 Simplify lisp.h in minor ways that should not affect code.
7268 * lisp.h (USE_2_TAGS_FOR_INTS): Remove, as it was always defined.
7269 (LISP_INT_TAG, case_Lisp_Int, LISP_STRING_TAG, LISP_INT_TAG_P)
7270 (LISP_INT1_TAG, enum Lisp_Type, XINT, XUINT, make_number):
7271 Simplify under the assumption that USE_2_TAGS_FOR_INTS is defined.
7272 (INTTYPEBITS): New macro, for clarity.
7273 (INTMASK, MOST_POSITIVE_FIXNUM): Use it.
1053a871
SM
7274 (LISP_INT1_TAG, LISP_STRING_TAG, LISP_INT_TAG_P):
7275 Simplify now that USE_LSB_TAG is always defined.
2b570124
PE
7276 (TYPEMASK, XINT) [USE_LSB_TAG]: Remove unnecessary cast.
7277 (make_number) [!USE_LSB_TAG]: Use INTMASK; that's simpler.
7278
81755f69
JB
72792012-06-13 Juanma Barranquero <lekktu@gmail.com>
7280
7281 * makefile.w32-in ($(BLD)/data.$(O)): Update dependencies.
7282
16192a57
GM
72832012-06-13 Glenn Morris <rgm@gnu.org>
7284
7285 * s/bsd-common.h (BSD4_3):
7286 * s/usg5-4-common.h (USG5_4): No longer define; unused.
7287
646b5f55
AS
72882012-06-13 Andreas Schwab <schwab@linux-m68k.org>
7289
7290 * lisp.h (Lisp_Object) [CHECK_LISP_OBJECT_TYPE]: Define as struct
7291 instead of union.
7292 (XLI, XIL): Define.
1053a871
SM
7293 (XHASH, XTYPE, XINT, XUINT, make_number, XSET, XPNTR, XUNTAG):
7294 Use them.
7295 * emacs.c (gdb_use_struct): Rename from gdb_use_union.
646b5f55 7296 * .gdbinit: Check gdb_use_struct instead of gdb_use_union.
1053a871 7297 * alloc.c (widen_to_Lisp_Object): Remove.
646b5f55
AS
7298 (mark_memory): Use XIL instead of widen_to_Lisp_Object.
7299 * frame.c (delete_frame): Remove outdated comment.
7300 * w32fns.c (Fw32_register_hot_key): Use XLI instead of checking
7301 USE_LISP_UNION_TYPE.
7302 (Fw32_unregister_hot_key): Likewise.
7303 (Fw32_toggle_lock_key): Likewise.
7304 * w32menu.c (add_menu_item): Likewise.
7305 (w32_menu_display_help): Use XIL instead of checking
7306 USE_LISP_UNION_TYPE.
7307 * w32heap.c (allocate_heap): Don't check USE_LISP_UNION_TYPE.
7308 (init_heap): Likewise.
7309 * w32term.c (w32_read_socket): Update comment.
7310
1d3823c9
GM
73112012-06-13 Glenn Morris <rgm@gnu.org>
7312
c62ff706
GM
7313 * s/usg5-4-common.h, src/s/unixware.h:
7314 Remove define/undef of HAVE_SYSV_SIGPAUSE (not used since 2010-05-04).
7315
1d3823c9
GM
7316 * s/gnu.h (POSIX_SIGNALS): Remove (not used since 2010-05-04).
7317
bfe3e0a2
PE
73182012-06-13 Paul Eggert <eggert@cs.ucla.edu>
7319
7320 USE_LISP_UNION_TYPE + USE_LSB_TAG cleanup (Bug#11604)
7321 * alloc.c (make_number) [!defined make_number]:
7322 Remove, as lisp.h always defines this now.
7323 (mark_maybe_pointer): Simplify since USE_LSB_TAG is always defined now.
7324 (roundup_size): Verify that it is a power of 2.
7325 * data.c (Fmake_variable_buffer_local, Fmake_local_variable):
7326 * ftfont.c (ftfont_driver): Use LISP_INITIALLY_ZERO.
7327 * lisp.h (USE_LSB_TAG): Allow the builder to compile with
7328 -DUSE_LSB_TAG=0, to override the automatically-selected default.
7329 USE_LSB_TAG now is always defined to be either 0 or 1.
7330 All uses changed.
7331 (union Lisp_Object): Don't worry about WORDS_BIGENDIAN; the
7332 code works fine either way, and efficiency is not a concern here,
7333 as the union type is for debugging, not for production.
7334 (LISP_MAKE_RVALUE, make_number) [USE_LISP_UNION_TYPE]:
7335 Use an inline function on all platforms when using the union type,
7336 since this is simpler and 'static inline' can be used portably
7337 within Emacs now.
7338 (LISP_INITIALLY_ZERO): New macro.
7339 (XFASTINT, XSETFASTINT) [USE_LISP_UNION_TYPE]: Remove.
7340 (XSET) [USE_LISP_UNION_TYPE]: Don't overparenthesize.
7341
45fa9c0f
GM
73422012-06-12 Glenn Morris <rgm@gnu.org>
7343
b4492cba
GM
7344 * s/gnu-kfreebsd.h, s/hpux11.h, s/openbsd.h, s/sol2-10.h: Remove files.
7345
7346 * s/gnu-linux.h (HAVE_PROCFS): Move to configure.
0d369729 7347
45fa9c0f
GM
7348 * s/hpux10-20.h, s/openbsd.h, s/usg5-4-common.h:
7349 Move BROKEN_SIGIO to configure.
7350
7351 * s/bsd-common.h, s/darwin.h, s/gnu-kfreebsd.h, s/hpux10-20.h:
7352 Move NO_TERMIO to configure.
7353
0e25d334
CY
73542012-06-12 Chong Yidong <cyd@gnu.org>
7355
7356 * image.c (imagemagick_load_image): Use MagickFlattenImage if
7357 MagickMergeImageLayers is undefined. Use pixel pusher loop if
7358 MagickExportImagePixels is undefined.
7359
43682bb6
PE
73602012-06-12 Paul Eggert <eggert@cs.ucla.edu>
7361
7362 * image.c (imagemagick_load_image): Remove unused label.
7363
a9be7d2b
GM
73642012-06-11 Glenn Morris <rgm@gnu.org>
7365
7366 * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/darwin.h:
7367 * s/gnu-kfreebsd.h, s/gnu-linux.h, s/gnu.h, s/hpux10-20.h:
7368 * s/irix6-5.h, s/ms-w32.h, s/msdos.h, s/template.h:
7369 * s/usg5-4-common.h: Move SYSTEM_TYPE to configure.
7370
3017f87f
SM
73712012-06-11 Stefan Monnier <monnier@iro.umontreal.ca>
7372
7373 * alloc.c (make_byte_code): New function.
7374 (Fmake_byte_code): Use it. Don't purify here.
7375 * lread.c (read1): Use it as well to avoid extra allocation.
7376
1b9b4cf4
CY
73772012-06-11 Chong Yidong <cyd@gnu.org>
7378
7379 * image.c (imagemagick_load_image): Implement transparency.
7380
95988fcf
AS
73812012-06-10 Andreas Schwab <schwab@linux-m68k.org>
7382
7383 * regex.c (at_begline_loc_p): Also recognize `(?N:' and correctly
7384 account for preceding backslashes. (Bug#11663)
7385
cd4eb164
CY
73862012-06-09 Chong Yidong <cyd@gnu.org>
7387
7388 * term.c: Support italics in capable terminals (Bug#9652).
7389 (no_color_bit): Replace unused NC_BLINK with NC_ITALIC.
7390 (turn_on_face): Output using TS_enter_italic_mode if available.
7391 Don't handle unused blinking and alt-charset cases.
7392 (turn_off_face): Handle italic case; discard unused tty_blinking_p
7393 and tty_alt_charset_p cases.
7394 (tty_capable_p, init_tty): Support italics.
7395
7396 * termchar.h (struct tty_display_info): Add field for italics.
7397 Remove unused blink field.
7398
7399 * xfaces.c (tty_supports_face_attributes_p, realize_tty_face):
7400 Handle slant.
7401
7402 * dispextern.h: Replace unused TTY_CAP_BLINK with TTY_CAP_ITALIC.
7403 (struct face): Remove unused fields tty_dim_p, tty_blinking_p, and
7404 tty_alt_charset_p. Add tty_italic_p.
7405
ff88beb8
MA
74062012-06-09 Michael Albinus <michael.albinus@gmx.de>
7407
7408 * dbusbind.c (XD_BASIC_DBUS_TYPE): Use dbus_type_is_valid and
7409 dbus_type_is_basic if available.
7410 (xd_extract_signed, xd_extract_unsigned): Rename from
7411 extract_signed and extract_unsigned, respectively. Adapt callers.
7412
44286096
CY
74132012-06-09 Chong Yidong <cyd@gnu.org>
7414
1682701f
CY
7415 * xfaces.c (face_for_overlay_string): Handle face remapping (Bug#2066).
7416
44286096
CY
7417 * fringe.c (Fset_fringe_bitmap_face): Handle the noninteractive
7418 case (Bug#9752).
7419
d86feb17
PE
74202012-06-08 Paul Eggert <eggert@cs.ucla.edu>
7421
7422 * xdisp.c (vmessage): Treat frame message as multibyte.
7423 Without this change, (let ((§ 1)) (make-variable-buffer-local '§))
7424 would generate the diagnostic "Making \302\247 buffer-local while
7425 let-bound!".
7426
d5c20fe8
EZ
74272012-06-08 Eli Zaretskii <eliz@gnu.org>
7428
7429 * dispnew.c (showing_window_margins_p): Undo last change, which
7430 was done due to an inadvertent commit.
7431 (adjust_frame_glyphs_for_frame_redisplay): Do call
7432 showing_window_margins_p.
7433
513749ee
SM
74342012-06-08 Stefan Monnier <monnier@iro.umontreal.ca>
7435
7436 * eval.c (Fmake_var_non_special): New primitive.
7437 (syms_of_eval): Defsubr it.
7438 * lread.c (syms_of_lread): Mark `values' as lexically scoped.
7439
d4a8f5c1
JB
74402012-06-08 Juanma Barranquero <lekktu@gmail.com>
7441
7442 * dispnew.c (showing_window_margins_p): Wrap in #if 0 to prevent unused
7443 function warning (the only call is inside #if 0 since 2012-06-08T08:44:45Z!eliz@gnu.org).
7444
8bbbc977
EZ
74452012-06-08 Eli Zaretskii <eliz@gnu.org>
7446
7447 * alloc.c (allocate_vectorlike): Fix last change.
7448
f3372c87
DA
74492012-06-08 Dmitry Antipov <dmantipov@yandex.ru>
7450
7451 Block-based vector allocation of small vectors.
7452 * lisp.h (struct vectorlike_header): New field `nbytes',
7453 adjust comment accordingly.
7454 * alloc.c (enum mem_type): New type `MEM_TYPE_VECTOR_BLOCK'
fc0c31f8 7455 to denote vector blocks. Adjust users (live_vector_p,
f3372c87
DA
7456 mark_maybe_pointer, valid_lisp_object_p) accordingly.
7457 (COMMON_MULTIPLE): Move outside #if USE_LSB_TAG.
7458 (VECTOR_BLOCK_SIZE, vroundup, VECTOR_BLOCK_BYTES),
7459 (VBLOCK_BYTES_MIN, VBLOCK_BYTES_MAX, VECTOR_MAX_FREE_LIST_INDEX),
7460 (VECTOR_FREE_LIST_FLAG, ADVANCE, VINDEX, SETUP_ON_FREE_LIST),
7461 (VECTOR_SIZE, VECTOR_IN_BLOCK): New macros.
7462 (roundup_size): New constant.
7463 (struct vector_block): New data type.
7464 (vector_blocks, vector_free_lists, zero_vector): New variables.
513749ee 7465 (all_vectors): Rename to `large_vectors'.
f3372c87
DA
7466 (allocate_vector_from_block, init_vectors, allocate_vector_from_block)
7467 (sweep_vectors): New functions.
7468 (allocate_vectorlike): Return `zero_vector' as the only vector of
fc0c31f8 7469 0 items. Allocate new vector from block if vector size is less than
f3372c87
DA
7470 or equal to VBLOCK_BYTES_MAX.
7471 (Fgarbage_collect): Move all vector sweeping code to sweep_vectors.
7472 (init_alloc_once): Add call to init_vectors.
7473
4f18a4ed
SM
74742012-06-08 Stefan Monnier <monnier@iro.umontreal.ca>
7475
7476 * eval.c (Fmacroexpand): Stop if the macro returns the same form.
7477
86f158bc
PE
74782012-06-07 Paul Eggert <eggert@cs.ucla.edu>
7479
7480 * doprnt.c (doprnt): Truncate multibyte char correctly.
7481 Without this change, doprnt (buf, 2, "%s", FORMAT_END, AP)
7482 would mishandle a string argument "Xc" if X was a multibyte
7483 character of length 2: it would truncate after X's first byte
7484 rather than including all of X.
7485
c5cfcbe0
CY
74862012-06-06 Chong Yidong <cyd@gnu.org>
7487
7488 * buffer.c (word_wrap): Doc fix.
7489
c05cf390
PE
74902012-06-04 Paul Eggert <eggert@cs.ucla.edu>
7491
7492 * xdisp.c (note_mode_line_or_margin_highlight): Pacify gcc -Wall.
7493
0c3461de
GM
74942012-06-03 Glenn Morris <rgm@gnu.org>
7495
7496 * xdisp.c (tool-bar-style): Doc fix.
7497
c71232db
UM
74982012-06-03 Ulrich Müller <ulm@gentoo.org>
7499
7500 * Makefile.in (PAXCTL): Define.
7501 (temacs$(EXEEXT)): Disable memory randomization for the temacs
7502 binary via PaX flags if the paxctl utility is available.
7503 (emacs$(EXEEXT), bootstrap-emacs$(EXEEXT)):
7504 Restore PaX flags to their default. (Bug#11398)
7505
383f7350
CY
75062012-06-03 Chong Yidong <cyd@gnu.org>
7507
7508 * xdisp.c (decode_mode_spec_coding): Display a space for a unibyte
7509 buffer (Bug#11226).
7510
5f2c76c6
CY
75112012-06-03 Chong Yidong <cyd@gnu.org>
7512
7513 * xdisp.c (calc_pixel_width_or_height): Use Fbuffer_local_value.
7514 (note_mode_line_or_margin_highlight): If there is no help echo,
7515 use mode-line-default-help-echo. Handle the case where the mouse
7516 position is past the end of the mode line string.
7517
7518 * buffer.c (buffer_local_value_1): New function, split from
7519 Fbuffer_local_value; can return Qunbound.
7520 (Fbuffer_local_value): Use it.
7521 (Vmode_line_format): Docstring tweaks.
7522
773d47f6
PE
75232012-06-02 Paul Eggert <eggert@cs.ucla.edu>
7524
7525 * sysdep.c (system_process_attributes): Improve comment.
7526
f2d6a3df
SM
75272012-06-02 Stefan Monnier <monnier@iro.umontreal.ca>
7528
7529 * keyboard.c: Export real-this-command to Elisp.
7530 (syms_of_keyboard): Rename real_this_command to Vreal_this_command
7531 and DEFVAR it. Update all users.
7532
63810350
PE
75332012-06-02 Paul Eggert <eggert@cs.ucla.edu>
7534
7bd5c1f4
PE
7535 * minibuf.c (Fassoc_string): Remove duplicate declaration.
7536
63810350
PE
7537 * sysdep.c (system_process_attributes) [SOLARIS2 && HAVE_PROCFS]:
7538 Convert pctcpu and pctmem to Lisp float properly.
7539 Let the compiler fold better, as 100.0/0x8000 is exact.
7540
a2821611
AS
75412012-06-02 Andreas Schwab <schwab@linux-m68k.org>
7542
7543 * alloc.c (CONS_BLOCK_SIZE): Account for padding at the end of
7544 cons_block.
7545
5fceba1d
PE
75462012-06-01 Paul Eggert <eggert@cs.ucla.edu>
7547
7548 * xfns.c (x_set_tool_bar_lines) [USE_GTK]: Adjust to bitfield change.
7549
c98ff5dd
DA
75502012-06-01 Dmitry Antipov <dmantipov@yandex.ru>
7551
7552 For a 'struct window', replace some Lisp_Object fields to
7553 bitfields where appropriate, remove unused fields.
7554 * window.h (struct window): Remove unused 'last_mark_x' and
7555 'last_mark_y' fields. Rename 'mini_p' field to 'mini',
7556 change it's type from Lisp_Object to bitfield.
7557 Change type of 'force_start', 'optional_new_start',
7558 'last_had_star', 'update_mode_line' and 'start_at_line_beg'
fc0c31f8 7559 fields from Lisp_Object to bitfield. Adjust users accordingly.
c98ff5dd 7560
ca34e0be
PE
75612012-05-31 Paul Eggert <eggert@cs.ucla.edu>
7562
7563 Pacify gcc -Wdouble-precision when using Xaw.
7564 * xterm.c (xaw_jump_callback, x_set_toolkit_scroll_bar_thumb)
7565 [HAVE_X_WINDOWS && USE_TOOLKIT_SCROLL_BARS && !USE_MOTIF && !USE_GTK]:
7566 Use 'float' consistently, rather than 'float' in most places
7567 and 'double' in a couple of places.
7568
efc00ab1 75692012-05-31 Eli Zaretskii <eliz@gnu.org>
d5fd2c54
EZ
7570
7571 * xdisp.c (handle_stop): Detect whether we have overlay strings
7572 loaded by testing it->current.overlay_string_index to be
7573 non-negative, instead of checking whether n_overlay_strings is
7574 positive. (Bug#11587)
7575
efc00ab1 75762012-05-31 Chong Yidong <cyd@gnu.org>
353c87f6
CY
7577
7578 * keymap.c (describe_map_tree): Revert 2011-07-07 change (Bug#1169).
7579
7580 * doc.c (Fsubstitute_command_keys): Doc fix.
7581
efc00ab1 75822012-05-31 Eli Zaretskii <eliz@gnu.org>
a02ae4e5
EZ
7583
7584 * search.c (search_buffer): Remove calls to
7585 r_alloc_inhibit_buffer_relocation, as it is now called by
7586 maybe_unify_char, which was the cause of relocation of buffer text
7587 in bug#11519.
7588
efc00ab1 75892012-05-31 Eli Zaretskii <eliz@gnu.org>
291d430f
EZ
7590
7591 * charset.c (maybe_unify_char): Inhibit relocation of buffer text
7592 for the duration of call to load_charset, to avoid problems with
7593 callers of maybe_unify_char that access buffer text through C
7594 pointers.
7595
7596 * ralloc.c (r_alloc_inhibit_buffer_relocation): Increment and
7597 decrement the inhibition flag, instead of just setting or
7598 resetting it.
7599
ba93a187
PE
76002012-05-31 Paul Eggert <eggert@cs.ucla.edu>
7601
7602 Remove obsolete '#define static' cruft.
7603 * s/hpux10-20.h (_FILE_OFFSET_BITS): Don't #undef.
7604 This #undef was "temporary" in 2000; it is no longer needed
7605 now that '#define static' has gone away.
7606 * xfns.c, xterm.h (gray_bitmap_width, gray_bitmap_height)
7607 (gray_bitmap_bits): Remove; no longer needed.
7608 All uses replaced with definiens.
7609 * xterm.c: Include "bitmaps/gray.xbm".
7610
9e4bf381
PE
76112012-05-30 Paul Eggert <eggert@cs.ucla.edu>
7612
7613 Clean up __executable_start, monstartup when --enable-profiling.
7614 The following changes affect the code only when profiling.
7615 * dispnew.c (__executable_start): Rename from safe_bcopy.
7616 Define only on platforms that need it.
7617 * emacs.c: Include <sys/gmon.h> when profiling.
7618 (_mcleanup): Remove decl, since <sys/gmon.h> does it now.
7619 (__executable_start): Remove decl, since lisp.h does it now.
7620 (safe_bcopy): Remove decl; no longer has that name.
7621 (main): Coalesce #if into single bit of code, for simplicity.
7622 Cast pointers to uintptr_t, since standard libraries want integers
7623 and not pointers.
7624 * lisp.h (__executable_start): New decl.
7625
32d72c2f
GM
76262012-05-31 Glenn Morris <rgm@gnu.org>
7627
7628 * image.c (Fimagemagick_types): Doc fix.
7629
baac5bc7
JM
76302012-05-30 Jim Meyering <meyering@redhat.com>
7631
7632 * callproc.c (Fcall_process_region): Include directory component
7633 in mkstemp error message (Bug#11586).
7634
72cb32cf
PE
76352012-05-30 Paul Eggert <eggert@cs.ucla.edu>
7636
7637 * alloc.c, lisp.h (make_pure_vector): Now static.
7638
61b108cc
SM
76392012-05-30 Stefan Monnier <monnier@iro.umontreal.ca>
7640
7641 * eval.c (Fdefun, Fdefmacro, Vmacro_declaration_function):
7642 Move to byte-run.el.
7643 (Fautoload): Do the hash-doc more carefully.
7644 * data.c (Fdefalias): Purify definition, except for keymaps.
7645 (Qdefun): Move from eval.c.
7646 * lisp.h (Qdefun): Remove.
7647 * lread.c (read1): Tiny simplification.
7648
471fe23d
TN
76492012-05-29 Troels Nielsen <bn.troels@gmail.com>
7650
934f3f58 7651 Do not create empty overlays with the evaporate property (Bug#9642).
471fe23d
TN
7652 * buffer.c (Fmove_overlay): Reinstate the earlier fix for
7653 Bug#9642, but explicitly check that the buffer the overlay would
7654 be moved to is live and rearrange lines to make sure that errors
7655 will not put the overlay in an inconsistent state.
7656 (Fdelete_overlay): Cosmetics.
7657
85d0efd1
EZ
76582012-05-28 Eli Zaretskii <eliz@gnu.org>
7659
7660 * w32term.c (my_bring_window_to_top): New function.
7661 (x_raise_frame): Use handle returned by DeferWindowPos, which
61b108cc
SM
7662 could be different from the original one.
7663 Call my_bring_window_to_top instead of my_set_foreground_window.
85d0efd1
EZ
7664 (Bug#11513)
7665
7666 * w32fns.c (w32_wnd_proc): Accept and process WM_EMACS_BRINGTOTOP
7667 by calling BringWindowToTop.
7668
7669 * w32term.h (WM_EMACS_BRINGTOTOP): New message.
7670 (WM_EMACS_END): Increase by one.
7671
da92a98c
PE
76722012-05-28 Paul Eggert <eggert@cs.ucla.edu>
7673
7674 * bidi.c (bidi_mirror_char): Put eassert before conversion to int.
7675 This avoids undefined behavior that might cause the eassert
7676 to not catch an out-of-range value.
7677
74d1f848
JB
76782012-05-28 Juanma Barranquero <lekktu@gmail.com>
7679
7680 * makefile.w32-in ($(BLD)/w32inevt.$(O), $(BLD)/w32console.$(O)):
7681 Update dependencies.
7682
9e1a06fc
EZ
76832012-05-27 Eli Zaretskii <eliz@gnu.org>
7684
7685 * bidi.c (bidi_mirror_char): Fix last change.
7686
f3dd7312
AS
76872012-05-27 Andreas Schwab <schwab@linux-m68k.org>
7688
7689 * unexmacosx.c (copy_data_segment): Truncate after 16 characters
7690 when referring to sectname field in printf format.
7691
81899c91
PE
76922012-05-27 Paul Eggert <eggert@cs.ucla.edu>
7693
57b81a9f
PE
7694 * lisp.h [REL_ALLOC]: Omit duplicate prototypes.
7695 Only r_alloc_inhibit_buffer_relocation needed to be added;
7696 the others were already declared.
7697
81899c91
PE
7698 * bidi.c (bidi_mirror_char): Don't possibly truncate the integer
7699 before checking whether it's out of range. Put the check inside
7700 eassert. See
7701 <http://lists.gnu.org/archive/html/emacs-devel/2012-05/msg00485.html>.
7702
33017faf 77032012-05-27 Ken Brown <kbrown@cornell.edu>
2f9b9adb
KB
7704
7705 * callproc.c (Fcall_process): Restore a line that was accidentally
7706 commented out in the 2011-02-13 change (bug#11547).
7707
33017faf 77082012-05-27 Eli Zaretskii <eliz@gnu.org>
52c55cc7
EZ
7709
7710 * lisp.h [REL_ALLOC]: Add prototypes for external functions
7711 defined on ralloc.c.
7712
7713 * buffer.c [REL_ALLOC]: Remove prototypes of
7714 r_alloc_reset_variable, r_alloc, r_re_alloc, and r_alloc_free,
7715 they are now on lisp.h.
7716
7717 * ralloc.c (r_alloc_inhibit_buffer_relocation): New function.
7718
7719 * search.c (search_buffer): Use it to inhibit relocation of buffer
7720 text while re_search_2 is doing its job, because re_search_2 is
7721 passed C pointers to buffer text. (Bug#11519)
7722
23415acf
EZ
7723 * msdos.c (internal_terminal_init) <Vwindow_system_version>:
7724 Update value to 24.
7725
44e27368
EZ
7726 * xdisp.c (move_it_to): Under MOVE_TO_Y, when restoring iterator
7727 state after an additional call to move_it_in_display_line_to, keep
7728 the values of it->max_ascent and it->max_descent found for the
7729 entire line.
7730 (pos_visible_p): Revert the comparison against bottom_y to what it
7731 was in revid eliz@gnu.org-20120513182235-4p6386j761ld0nwb.
7732 (Bug#11464)
7733
c1892f11
PE
77342012-05-26 Paul Eggert <eggert@cs.ucla.edu>
7735
7736 Fix coding-related core dumps with gcc -ftrapv.
7737 The code was computing A - B, where A and B are pointers, and B is
7738 random garbage. This can lead to core dumps on platforms that
7739 have special pointer registers, and it also leads to core dumps on
7740 x86-64 when compiled with gcc -ftrapv. The fix is to compute
7741 A - B only when B is initialized properly.
7742 * coding.c (coding_set_source, coding_set_destination): Return void.
7743 (coding_change_source, coding_change_destinations): New functions,
7744 with the old behaviors of coding_set_source and coding_set_destination.
7745 All callers that need an offset changed to use these new functions.
7746
eb7afdad
GM
77472012-05-26 Glenn Morris <rgm@gnu.org>
7748
7749 * nsterm.m (ns_init_paths): Don't mess with INFOPATH. (Bug#2791)
7750
f12fdf02
EZ
77512012-05-26 Eli Zaretskii <eliz@gnu.org>
7752
53a63be6 7753 Extend mouse support on W32 text-mode console.
61b108cc
SM
7754 * xdisp.c (draw_row_with_mouse_face):
7755 Call tty_draw_row_with_mouse_face for WINDOWSNT as well.
eb3f6f01 7756
eb3f6f01 7757 * w32console.c: Include window.h.
61b108cc
SM
7758 (w32con_write_glyphs_with_face, tty_draw_row_with_mouse_face):
7759 New functions.
eb3f6f01
EZ
7760 (initialize_w32_display): Initialize mouse-highlight data.
7761
53a63be6
EZ
7762 * w32inevt.c: Include termchar.h and window.h.
7763 (do_mouse_event): Support mouse-autoselect-window. When the mouse
7764 moves, call note_mouse_highlight. If help_echo changed, call
7765 gen_help_event to produce help-echo message in the echo area.
7766 Call clear_mouse_face if mouse_face_hidden is set in the mouse
7767 highlight info.
7768
4cfd81f6
PE
77692012-05-26 Paul Eggert <eggert@cs.ucla.edu>
7770
7771 * lread.c (read1): Simplify slightly to avoid an overflow warning
7772 with GCC 4.7.0 on x86-64.
7773
4446092a
EZ
77742012-05-26 Eli Zaretskii <eliz@gnu.org>
7775
7776 * bidi.c (bidi_mirror_char): Revert last change: an int is
7777 definitely wide enough here.
7778
42b2a986 77792012-05-25 Paul Eggert <eggert@cs.ucla.edu>
3164aeac 7780
42b2a986 7781 Fix integer width and related bugs (Bug#9874).
eb106a49 7782 * alloc.c (pure_bytes_used_lisp, pure_bytes_used_non_lisp):
d311d28c
PE
7783 (allocate_vectorlike, buffer_memory_full, struct sdata, SDATA_SIZE)
7784 (string_bytes, check_sblock, allocate_string_data):
7785 (compact_small_strings, Fmake_bool_vector, make_string)
7786 (make_unibyte_string, make_multibyte_string)
7787 (make_string_from_bytes, make_specified_string)
7788 (allocate_vectorlike, Fmake_vector, find_string_data_in_pure)
7789 (make_pure_string, make_pure_c_string, make_pure_vector, Fpurecopy)
7790 (mark_vectorlike):
7791 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
7792 (allocate_pseudovector):
7793 Use int, not EMACS_INT, where int is wide enough.
7794 (inhibit_garbage_collection, Fgarbage_collect):
7795 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
7796 * bidi.c (bidi_mirror_char): Use EMACS_INT, not int, where
7797 int might not be wide enough.
7798 (bidi_cache_search, bidi_cache_find, bidi_init_it)
7799 (bidi_count_bytes, bidi_char_at_pos, bidi_fetch_char)
7800 (bidi_at_paragraph_end, bidi_find_paragraph_start)
7801 (bidi_paragraph_init, bidi_resolve_explicit, bidi_resolve_weak)
7802 (bidi_level_of_next_char, bidi_move_to_visually_next):
7803 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
7804 * buffer.c (copy_overlays, Fgenerate_new_buffer_name)
7805 (Fkill_buffer, Fset_buffer_major_mode)
7806 (advance_to_char_boundary, Fbuffer_swap_text)
7807 (Fset_buffer_multibyte, overlays_at, overlays_in)
7808 (overlay_touches_p, struct sortvec, record_overlay_string)
7809 (overlay_strings, recenter_overlay_lists)
7810 (adjust_overlays_for_insert, adjust_overlays_for_delete)
7811 (fix_start_end_in_overlays, fix_overlays_before, modify_overlay)
7812 (Fmove_overlay, Fnext_overlay_change, Fprevious_overlay_change)
7813 (Foverlay_recenter, last_overlay_modification_hooks_used)
7814 (report_overlay_modification, evaporate_overlays, enlarge_buffer_text):
7815 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
977b0e45
PE
7816 (validate_region): Omit unnecessary test for b <= e,
7817 since that's guaranteed by the previous test.
d311d28c
PE
7818 (adjust_overlays_for_delete): Avoid pos + length overflow.
7819 (Fmove_overlay, Fdelete_overlay, add_overlay_mod_hooklist)
7820 (report_overlay_modification):
7821 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
7822 (Foverlays_at, Fnext_overlay_change, Fprevious_overlay_change):
7823 Omit pointer cast, which isn't needed anyway, and doesn't work
7824 after the EMACS_INT -> ptrdiff_t change.
02481186 7825 (Fmove_overlay): Clip BEG and END to ptrdiff_t to avoid overflow.
d311d28c
PE
7826 * buffer.h: Adjust decls to match defn changes elsewhere.
7827 (struct buffer_text, struct buffer):
7828 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
7829 Use EMACS_INT, not int, where int might not be wide enough.
39b5db3b
PE
7830 * bytecode.c (unmark_byte_stack, exec_byte_code): Use ptrdiff_t,
7831 not int, to avoid needless 32-bit limit on 64-bit hosts.
7832 (exec_byte_code): Use tighter memory-full test, one that checks
7833 for alloca overflow. Don't compute the address of the object just
7834 before an array, as that's not portable. Use EMACS_INT, not
7835 ptrdiff_t or int, where ptrdiff_t or int might not be wide enough.
d311d28c
PE
7836 * callint.c (Fcall_interactively):
7837 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
7838 * callproc.c (call_process_kill, Fcall_process):
7839 Don't assume pid_t fits into an Emacs fixnum.
7840 (call_process_cleanup, Fcall_process, child_setup):
7841 Don't assume pid_t fits into int.
7842 (call_process_cleanup, Fcall_process, delete_temp_file)
7843 (Fcall_process_region):
7844 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
7845 (Fcall_process): Simplify handling of volatile integers.
7846 Use int, not EMACS_INT, where int will do.
7847 * casefiddle.c (casify_object, casify_region, operate_on_word)
7848 (Fupcase_word, Fdowncase_word, Fcapitalize_word):
7849 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
7850 (casify_object): Avoid integer overflow when overallocating buffer.
7851 * casetab.c (set_identity, shuffle): Prefer int to unsigned when
45c2afd6 7852 either works. Use lint_assume to convince GCC 4.6.1 that it's OK.
d311d28c
PE
7853 * category.c (Fchar_category_set): Don't assume fixnum fits in int.
7854 * category.h (CATEGORYP): Don't assume arg is nonnegative.
7855 * ccl.c (GET_CCL_INT): Remove; no longer needed, since the
7856 integers are now checked earlier. All uses replaced with XINT.
7857 (ccl_driver):
7858 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
7859 For CCL_MapSingle, check that content and value are in int range.
c801946a
PE
7860 (ccl_driver, Fregister_code_conversion_map):
7861 Check that Vcode_version_map_vector is a vector.
d311d28c
PE
7862 (resolve_symbol_ccl_program): Check that vector header is in range.
7863 Always copy the vector, so that we can check its contents reliably
7864 now rather than having to recheck each instruction as it's being
7865 executed. Check that vector words fit in 'int'.
7866 (ccl_get_compiled_code, Fregister_ccl_program)
7867 (Fregister_code_conversion_map): Use ptrdiff_t, not int, for
7868 program indexes, to avoid needless 32-bit limit on 64-bit hosts.
7869 (Fccl_execute, Fccl_execute_on_string): Check that initial reg
7870 contents are in range.
7871 (Fccl_execute_on_string): Check that status is in range.
7872 * ccl.h (struct ccl_program.idx): Now ptrdiff_t, not int.
7873 * character.c (char_resolve_modifier_mask, Fchar_resolve_modifiers):
7874 Accept and return EMACS_INT, not int, because callers can pass values
7875 out of 'int' range.
7876 (c_string_width, strwidth, lisp_string_width, chars_in_text)
7877 (multibyte_chars_in_text, parse_str_as_multibyte)
7878 (str_as_multibyte, count_size_as_multibyte, str_to_multibyte)
7879 (str_as_unibyte, str_to_unibyte, string_count_byte8)
7880 (string_escape_byte8, Fget_byte):
7881 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
a14e1568 7882 (Funibyte_string): Use CHECK_RANGED_INTEGER, not CHECK_NATNUM, to
d311d28c
PE
7883 avoid mishandling large integers.
7884 * character.h: Adjust decls to match defn changes elsewhere.
7885 * charset.c (load_charset_map_from_file, find_charsets_in_text)
7886 (Ffind_charset_region):
7887 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
7888 (load_charset_map_from_file): Redo idx calculation to avoid overflow.
7889 (load_charset_map_from_vector, Fdefine_charset_internal):
3c7649c1 7890 Don't assume fixnum fits in int.
d311d28c
PE
7891 (load_charset_map_from_vector, Fmap_charset_chars):
7892 Remove now-unnecessary CHECK_NATNUMs.
7893 (Fdefine_charset_internal): Check ranges here, more carefully.
3c7649c1
PE
7894 Don't rely on undefined behavior with signed left shift overflow.
7895 Don't assume unsigned int fits into fixnum, or that fixnum fits
7896 into unsigned int. Don't require max_code to be a valid fixnum;
7897 that's not true for gb10830 4-byte on a 32-bit host. Allow
7898 invalid_code to be a cons, for the same reason. Require code_offset
7899 to be a character. Avoid int overflow if max_char is close
7900 to INT_MAX.
7901 (CODE_POINT_TO_INDEX): On 32-bit hosts, return int, not unsigned;
7902 this is intended anyway and avoids some undefined behavior.
7903 (load_charset_map): Pass unsigned, not int, as 2nd arg of
7904 INDEX_TO_CODE_POINT, as that's what it expects.
7905 (Funify_charset, encode_char): Don't stuff unsigned vals into int vars.
60ad3eab
PE
7906 * charset.h (DECODE_CHAR): Return int, not unsigned;
7907 this is what was intended anyway, and it avoids undefined behavior.
7908 (CHARSET_OFFSET): Remove unused macro, instead of fixing its
7909 integer-overflow issues.
7910 (ENCODE_CHAR): Return unsigned on all hosts, not just on 32-bit hosts.
7911 Formerly, it returned EMACS_INT on 64-bit hosts in the common case
7912 where the argument is EMACS_INT, and this behavior is not intended.
d311d28c
PE
7913 * chartab.c (Fmake_char_table, Fset_char_table_range)
7914 (uniprop_get_decoder, uniprop_get_encoder):
7915 Don't assume fixnum fits in int.
7916 * cmds.c (move_point): New function, that does the gist of
7917 Fforward_char and Fbackward_char, but does so while checking
7918 for integer overflow more accurately.
c96e5d6a 7919 (Fforward_char, Fbackward_char): Use it.
d311d28c
PE
7920 (Fforward_line, Fend_of_line, internal_self_insert)
7921 (internal_self_insert):
7922 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
7923 Fix a FIXME, by checking for integer overflow when calculating
7924 target_clm and actual_clm.
7925 * coding.c (detect_coding_XXX, encode_coding_XXX, CODING_DECODE_CHAR)
8f50130c 7926 (CODING_ENCODE_CHAR, CODING_CHAR_CHARSET, CODING_CHAR_CHARSET_P)
d311d28c
PE
7927 (ASSURE_DESTINATION, coding_alloc_by_realloc)
7928 (coding_alloc_by_making_gap, alloc_destination)
7929 (detect_coding_utf_8, encode_coding_utf_8, decode_coding_utf_16)
7930 (encode_coding_utf_16, detect_coding_emacs_mule)
7931 (decode_coding_emacs_mule, encode_coding_emacs_mule)
7932 (detect_coding_iso_2022, decode_coding_iso_2022)
7933 (encode_invocation_designation, encode_designation_at_bol)
7934 (encode_coding_iso_2022, detect_coding_sjis, detect_coding_big5)
7935 (decode_coding_sjis, decode_coding_big5, encode_coding_sjis)
7936 (encode_coding_big5, detect_coding_ccl, decode_coding_ccl)
7937 (encode_coding_ccl, encode_coding_raw_text)
7938 (detect_coding_charset, decode_coding_charset)
7939 (encode_coding_charset, detect_eol, decode_eol, produce_chars)
7940 (produce_composition, produce_charset, produce_annotation)
7941 (decode_coding, handle_composition_annotation)
7942 (handle_charset_annotation, consume_chars, decode_coding_gap)
7943 (decode_coding_object, encode_coding_object, detect_coding_system)
7944 (Ffind_coding_systems_region_internal, Fcheck_coding_systems_region)
7945 (code_convert_region, code_convert_string)
8f50130c
PE
7946 (Fdefine_coding_system_internal)
7947 (coding_set_source, coding_set_destination):
d311d28c
PE
7948 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
7949 (setup_iso_safe_charsets, consume_chars, Funencodable_char_position)
7950 (Fdefine_coding_system_internal):
7951 Don't assume fixnums fit in int.
7952 (decode_coding_gap, decode_coding_object, encode_coding_object)
5895d7b9 7953 (Fread_coding_system, Fdetect_coding_region)
2c6a9faa
PE
7954 (Funencodable_char_position, Fcheck_coding_systems_region)
7955 (get_translation, handle_composition_annotation, consume_chars):
d311d28c 7956 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
977b0e45 7957 (consume_chars): Rewrite to not calculate an address outside buffer.
d311d28c 7958 (Ffind_operation_coding_system): NATNUMP can eval its arg twice.
7b09a37a 7959 Don't access memory outside of the args array.
d311d28c 7960 (Fdefine_coding_system_internal): Check for charset-id overflow.
47664caa
PE
7961 (ENCODE_ISO_CHARACTER): Use unsigned, not int, to store the unsigned
7962 result of ENCODE_CHAR.
d311d28c
PE
7963 * coding.h: Adjust decls to match defn changes elsewhere.
7964 (struct coding_system):
7965 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
7966 * composite.c (get_composition_id, find_composition)
7967 (run_composition_function, update_compositions)
7968 (compose_text, composition_gstring_put_cache)
7969 (composition_gstring_p, composition_gstring_width)
7970 (fill_gstring_header, fill_gstring_body, autocmp_chars)
7971 (composition_compute_stop_pos, composition_reseat_it)
7972 (composition_update_it, struct position_record)
7973 (find_automatic_composition, composition_adjust_point)
7974 (Fcomposition_get_gstring, Ffind_composition_internal):
7975 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
7976 (update_compositions):
7977 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
7978 * composite.h: Adjust decls to match defn changes elsewhere.
7979 (struct composition):
7980 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
7981 * data.c (let_shadows_buffer_binding_p, let_shadows_global_binding_p):
7982 Do not attempt to compute the address of the object just before a
7983 buffer; this is not portable.
7984 (Faref, Faset):
7985 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
7986 (Faset): Use int, not EMACS_INT, where int is wide enough.
7987 (Fstring_to_number): Don't assume fixnums fit in int.
7988 (Frem): Don't assume arg is nonnegative.
7989 * dbusbind.c (xd_append_arg): Check for integers out of range.
7990 (Fdbus_call_method): Don't overflow the timeout int.
42b2a986 7991 (extract_signed, extract_unsigned): New functions.
243e0530
PE
7992 (XD_CHECK_DBUS_SERIAL): Remove; superseded by extract_unsigned.
7993 (xd_get_connection_references): Return ptrdiff_t, not int.
7994 All uses changed.
7995 (xd_signature, xd_append_arg, xd_retrieve_arg, Fdbus_message_internal)
7996 (xd_read_message_1):
7997 Use int, not unsigned, where the dbus API uses int.
7998 (Fdbus_message_internal): Don't overflow mtype.
7999 (syms_of_dbusbind): Allocate right-sized buffer for integers.
d311d28c
PE
8000 * dired.c (directory_files_internal, file_name_completion, scmp)
8001 (file_name_completion_stat):
8002 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8003 (file_name_completion): Don't overflow matchcount.
8004 (file_name_completion_stat): Use SAFE_ALLOCA, not alloca.
8005 * dispextern.h: Adjust decls to match defn changes elsewhere.
8006 (struct text_pos, struct glyph, struct bidi_saved_info)
8007 (struct bidi_string_data, struct bidi_it, struct composition_it)
8008 (struct it):
8009 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8010 (struct display_pos, struct composition_it, struct it):
8011 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8012 * dispnew.c (increment_matrix_positions)
8013 (increment_row_positions, mode_line_string)
8014 (marginal_area_string):
8015 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
54e1617f 8016 (change_frame_size_1, Fredisplay, Fframe_or_buffer_changed_p):
d311d28c
PE
8017 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8018 (duration_to_sec_usec): New function, to check for overflow better.
8019 (Fsleep_for, sit_for): Use it.
8020 * doc.c (get_doc_string, store_function_docstring):
8021 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8022 (get_doc_string, Fsnarf_documentation):
8023 Use int, not EMACS_INT, where int is wide enough.
8024 (get_doc_string):
8025 Use SAFE_ALLOCA, not alloca.
8026 Check for overflow when converting EMACS_INT to off_t.
8027 * doprnt.c (doprnt):
8028 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8029 * editfns.c (init_editfns, Fuser_uid, Fuser_real_uid):
8030 Don't assume uid_t fits into fixnum.
8031 (buildmark, Fgoto_char, overlays_around, find_field, Fdelete_field)
8032 (Ffield_string, Ffield_string_no_properties, Ffield_beginning)
8033 (Ffield_end, Fconstrain_to_field, Fline_beginning_position)
8034 (Fline_end_position, Fprevious_char, Fchar_after, Fchar_before)
8035 (general_insert_function)
8036 (Finsert_char, make_buffer_string, make_buffer_string_both)
8037 (update_buffer_properties, Fbuffer_substring)
8038 (Fbuffer_substring_no_properties, Fcompare_buffer_substrings)
8039 (Fsubst_char_in_region, check_translation)
8040 (Ftranslate_region_internal, save_restriction_restore, Fformat)
8041 (transpose_markers, Ftranspose_regions):
8042 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8043 (clip_to_bounds): Move to lisp.h as an inline function).
8044 (Fconstrain_to_field): Don't assume integers are nonnegative.
8045 (Fline_beginning_position, Fsave_excursion, Fsave_current_buffer):
8046 (Fsubst_char_in_region, Fsave_restriction):
8047 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8048 (Femacs_pid): Don't assume pid_t fits into fixnum.
8049 (lo_time): Use int, not EMACS_INT, when int suffices.
8050 (lisp_time_argument): Check for usec out of range.
8051 (Fencode_time): Don't assume fixnum fits in int.
3f4eabd1
PE
8052 (Fuser_login_name, Fuser_full_name): Signal an error
8053 if a uid argument is out of range, rather than relying on
8054 undefined behavior.
c8d5c857
PE
8055 (Fformat_time_string): Remove now-unnecessary check.
8056 lisp_time_argument checks for out-of-range usec now.
243e0530 8057 Use ptrdiff_t, not size_t, where ptrdiff_t will do.
d311d28c
PE
8058 * emacs.c (gdb_valbits, gdb_gctypebits): Now int, not EMACS_INT.
8059 (gdb_data_seg_bits): Now uintptr_t, not EMACS_INT.
8060 (PVEC_FLAG, gdb_array_mark_flag): Now ptrdiff_t, not EMACS_INT.
8061 (init_cmdargs, Fdump_emacs):
8062 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8063 (Fkill_emacs): Don't assume fixnum fits in int; instead, take just
8064 the bottom (typically) 32 bits of the fixnum.
8065 * eval.c (specpdl_size, call_debugger):
8066 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8067 (when_entered_debugger, Fbacktrace_debug):
8068 Don't assume fixnum can fit in int.
8069 (Fdefvaralias, Fdefvar): Do not attempt to compute the address of
8070 the object just before a buffer; this is not portable.
8071 (FletX, Flet, Funwind_protect, do_autoload, Feval, funcall_lambda)
8072 (grow_specpdl, unbind_to):
8073 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8074 (Fapply, apply_lambda): Don't assume ptrdiff_t can hold fixnum.
8075 (grow_specpdl): Simplify allocation by using xpalloc.
856bbc81 8076 (Fprog1, Fprog2): Don't assume list length fits in int. Simplify.
d311d28c
PE
8077 * fileio.c (Ffind_file_name_handler, Fcopy_file, Frename_file)
8078 (Finsert_file_contents, Fwrite_region, Fdo_auto_save):
8079 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8080 (Ffind_file_name_handler, non_regular_inserted, Finsert_file_contents)
8081 (a_write, e_write):
8082 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8083 (Fcopy_file, non_regular_nbytes, read_non_regular)
8084 (Finsert_file_contents):
8085 Use int, not EMACS_INT, where int is wide enough.
8086 (READ_BUF_SIZE): Verify that it fits in int.
8087 (Finsert_file_contents): Check that counts are in proper range,
8088 rather than assuming fixnums fit into ptrdiff_t etc.
8089 Don't assume fixnums fit into int.
125b3835 8090 * floatfns.c (Fexpt): Avoid undefined signed * signed overflow.
5895d7b9
PE
8091 * fns.c (Fcompare_strings, Fstring_lessp, struct textprop_rec, concat)
8092 (string_char_byte_cache_charpos, string_char_byte_cache_bytepos)
d311d28c
PE
8093 (string_char_to_byte, string_byte_to_char)
8094 (string_make_multibyte, string_to_multibyte)
8095 (string_make_unibyte, Fstring_as_unibyte, Fstring_as_multibyte)
8096 (Fstring_to_unibyte, Fsubstring, Fsubstring_no_properties)
8097 (substring_both, Fdelete, internal_equal, Ffillarray)
8098 (Fclear_string, mapcar1)
8099 (Fbase64_encode_region, Fbase64_encode_string, base64_encode_1)
8100 (Fbase64_decode_region, Fbase64_decode_string, base64_decode_1)
8101 (larger_vector, make_hash_table, maybe_resize_hash_table)
8102 (hash_lookup, hash_remove_from_table, hash_clear, sweep_weak_table)
8103 (Fmaphash, secure_hash):
8104 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8105 (concat): Check for string index and length overflow.
8106 (Fmapconcat): Don't assume fixnums fit into ptrdiff_t.
8107 (Frequire):
8108 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8109 (larger_vector): New API (vec, incr_min, size_max) replaces old
8110 one (vec, new_size, init). This catches size overflow.
8111 INIT was removed because it was always Qnil.
8112 All callers changed.
8113 (INDEX_SIZE_BOUND): New macro, which calculates more precisely
8114 the upper bound on a hash table index size.
8115 (make_hash_table, maybe_resize_hash_table): Use it.
8116 (secure_hash): Computer start_byte and end_byte only after
8117 they're known to be in ptrdiff_t range.
8118 * font.c (font_intern_prop, font_at, font_range, Ffont_shape_gstring)
8119 (Ffont_get_glyphs, Ffont_at):
8120 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8121 (font_style_to_value, font_prop_validate_style, font_expand_wildcards)
8122 (Flist_fonts, Fopen_font):
8123 Don't assume fixnum can fit in int.
8124 (check_gstring): Don't assume index can fit in int.
8125 (font_match_p): Check that fixnum is a character, not a nonnegative
8126 fixnum, since the later code needs to stuff it into an int.
8127 (font_find_for_lface): Use SAFE_ALLOCA_LISP, not alloca.
8128 (font_fill_lglyph_metrics): Use unsigned, not EMACS_INT, to avoid
8129 conversion overflow issues.
8130 (Fopen_font): Check for integer out of range.
8131 (Ffont_get_glyphs): Don't assume index can fit in int.
8132 * font.h: Adjust decls to match defn changes elsewhere.
8133 * fontset.c (reorder_font_vector): Redo score calculation to avoid
8134 integer overflow.
8135 (num_auto_fontsets, fontset_from_font): Use ptrdiff_t, not
8136 printmax_t, where ptrdiff_t is wide enough.
8137 (Finternal_char_font):
8138 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8139 * frame.c (Fset_mouse_position, Fset_mouse_pixel_position)
8140 (Fset_frame_height, Fset_frame_width, Fset_frame_size)
8141 (Fset_frame_position, x_set_frame_parameters)
8142 (x_set_line_spacing, x_set_border_width)
8143 (x_set_internal_border_width, x_set_alpha, x_figure_window_size):
8144 Check that fixnums are in proper range for system types.
8145 (frame_name_fnn_p, Fframe_parameter, Fmodify_frame_parameters):
8146 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8147 (Fmodify_frame_parameters): Don't assume fixnum fits in int.
8148 Use SAFE_ALLOCA_LISP, not alloca.
8149 * frame.h (struct frame): Use intptr_t, not EMACS_INT, where
8150 intptr_t is wide enough.
8151 * fringe.c (lookup_fringe_bitmap, get_logical_fringe_bitmap)
8152 (Fdefine_fringe_bitmap): Don't assume fixnum fits in int.
8153 (Ffringe_bitmaps_at_pos): Don't assume index fits in int.
8154 Check for fixnum out of range.
8155 * ftfont.c (ftfont_list): Don't assume index fits in int.
8156 Check that fixnums are in proper range for system types.
8157 (ftfont_shape_by_flt):
8158 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
d311d28c
PE
8159 * gnutls.c (emacs_gnutls_write, emacs_gnutls_read):
8160 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8161 (Fgnutls_error_fatalp, Fgnutls_error_string, Fgnutls_boot):
8162 Check that fixnums are in proper range for system types.
8163 * gnutls.h: Adjust decls to match defn changes elsewhere.
8164 * gtkutil.c (xg_dialog_run):
8165 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8166 (update_frame_tool_bar):
8167 Check that fixnums are in proper range for system types.
8168 * image.c (parse_image_spec): Redo count calculation to avoid overflow.
5895d7b9 8169 (lookup_image): Check that fixnums are in range for system types.
d311d28c
PE
8170 * indent.c (last_known_column, last_known_column_point):
8171 (current_column_bol_cache):
8172 (skip_invisible, current_column, check_display_width):
8173 (check_display_width, scan_for_column, current_column_1)
8174 (Findent_to, Fcurrent_indentation, position_indentation)
8175 (indented_beyond_p, Fmove_to_column, compute_motion):
8176 (Fcompute_motion, Fvertical_motion):
8177 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8178 (last_known_column_modified): Use EMACS_INT, not int.
8179 (check_display_width):
8180 (Fcompute_motion):
8181 Check that fixnums and floats are in proper range for system types.
8182 (compute_motion): Don't assume index or fixnum fits in int.
8183 (compute_motion, Fcompute_motion):
8184 Use int, not EMACS_INT, when it is wide enough.
8185 (vmotion): Omit local var start_hpos that is always 0; that way
8186 we don't need to worry about overflow in expressions involving it.
8187 * indent.h: Adjust decls to match defn changes elsewhere.
8188 (struct position):
8189 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8190 Use int, not EMACS_INT, where int is wide enough.
8191 Remove unused members ovstring_chars_done and tab_offset;
8192 all uses removed.
8193 * insdel.c (move_gap, move_gap_both, gap_left, gap_right)
8194 (adjust_markers_for_delete, adjust_markers_for_insert, adjust_point)
8195 (adjust_markers_for_replace, make_gap_larger, make_gap_smaller)
8196 (make_gap, copy_text, insert, insert_and_inherit)
8197 (insert_before_markers, insert_before_markers_and_inherit)
8198 (insert_1, count_combining_before, count_combining_after)
8199 (insert_1_both, insert_from_string)
8200 (insert_from_string_before_markers, insert_from_string_1)
8201 (insert_from_gap, insert_from_buffer, insert_from_buffer_1)
8202 (adjust_after_replace, adjust_after_insert, replace_range)
8203 (replace_range_2, del_range, del_range_1, del_range_byte)
8204 (del_range_both, del_range_2, modify_region)
8205 (prepare_to_modify_buffer, signal_before_change)
8206 (signal_after_change, Fcombine_after_change_execute):
8207 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8208 * intervals.c (traverse_intervals, rotate_right, rotate_left)
8209 (balance_an_interval, split_interval_right, split_interval_left)
8210 (find_interval, next_interval, update_interval)
8211 (adjust_intervals_for_insertion, delete_node, delete_interval)
8212 (interval_deletion_adjustment, adjust_intervals_for_deletion)
8213 (static_offset_intervals, offset_intervals)
8214 (merge_interval_right, merge_interval_left, make_new_interval)
8215 (graft_intervals_into_buffer, temp_set_point_both)
8216 (temp_set_point, set_point, adjust_for_invis_intang)
8217 (set_point_both, move_if_not_intangible, get_property_and_range)
8218 (get_local_map, copy_intervals, copy_intervals_to_string)
8219 (compare_string_intervals, set_intervals_multibyte_1):
8220 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8221 * intervals.h: Adjust decls to match defn changes elsewhere.
8222 (struct interval):
8223 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8224 * keyboard.c (this_command_key_count, this_single_command_key_start)
8225 (before_command_key_count, before_command_echo_length, echo_now)
8226 (echo_length, recursive_edit_1, Frecursive_edit, Ftrack_mouse)
8227 (command_loop_1, safe_run_hooks, read_char, timer_check_2)
8228 (menu_item_eval_property, read_key_sequence, Fread_key_sequence)
8229 (Fread_key_sequence_vector, Fexecute_extended_command, Fsuspend_emacs):
8230 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8231 (last_non_minibuf_size, last_point_position, echo_truncate)
8232 (command_loop_1, adjust_point_for_property, read_char, gen_help_event)
8233 (make_lispy_position, make_lispy_event, parse_modifiers_uncached)
8234 (parse_modifiers, modify_event_symbol, Fexecute_extended_command)
8235 (stuff_buffered_input):
8236 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8237 (last_auto_save, command_loop_1, read_char):
8238 Use EMACS_INT, not int, to avoid integer overflow.
8239 (record_char): Avoid overflow in total_keys computation.
8240 (parse_modifiers_uncached): Redo index calculation to avoid overflow.
8241 * keyboard.h: Adjust decls to match defn changes elsewhere.
8242 * keymap.c (Fdefine_key, Fcurrent_active_maps, accessible_keymaps_1)
8243 (Fkey_description, Fdescribe_vector, Flookup_key):
8244 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8245 (click_position): New function, to check that positions are in range.
8246 (Fcurrent_active_maps):
8247 (describe_command):
8248 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8249 (Faccessible_keymaps, Fkey_description):
8250 (preferred_sequence_p):
8251 Don't assume fixnum can fit into int.
8252 (Fkey_description): Use SAFE_ALLOCA_LISP, not alloca.
8253 Check for integer overflow in size calculations.
8254 (Ftext_char_description): Use CHECK_CHARACTER, not CHECK_NUMBER, to
8255 avoid mishandling large integers.
8256 * lisp.h: Adjust decls to match defn changes elsewhere.
8257 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, struct Lisp_String)
8258 (struct vectorlike_header, struct Lisp_Subr, struct Lisp_Hash_Table)
8259 (struct Lisp_Marker):
8260 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8261 (clip_to_bounds): Now an inline function, moved here from editfns.c.
d311d28c
PE
8262 (GLYPH_CODE_P): Check for overflow in system types, subsuming the
8263 need for GLYPH_CODE_CHAR_VALID_P and doing proper checking ourselves.
8264 All callers changed.
8265 (GLYPH_CODE_CHAR, GLYPH_CODE_FACE):
8266 Assume the arg has valid form, since it always does.
8267 (TYPE_RANGED_INTEGERP): Avoid bug when checking against a wide
8268 unsigned integer system type.
8269 (CHECK_RANGED_INTEGER, CHECK_TYPE_RANGED_INTEGER): New macros.
8270 (struct catchtag, specpdl_size, SPECPDL_INDEX, USE_SAFE_ALLOCA):
8271 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8272 (struct catchtag): Use EMACS_INT, not int, since it may be a fixnum.
8273 (duration_to_sec_usec): New decl.
8274 * lread.c (read_from_string_index, read_from_string_index_byte)
8275 (read_from_string_limit, readchar, unreadchar, openp)
8276 (read_internal_start, read1, oblookup):
8277 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8278 (Fload, readevalloop, Feval_buffer, Feval_region):
8279 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8280 (openp): Check for out-of-range argument to 'access'.
8281 (read1): Use int, not EMACS_INT, where int is wide enough.
8282 Don't assume fixnum fits into int.
6efdadfd 8283 Fix off-by-one error that can read outside a buffer.
1ab7b8ac
PE
8284 (read_filtered_event): Use duration_to_sec_usec
8285 to do proper overflow checking on durations.
d311d28c
PE
8286 * macros.c (Fstart_kbd_macro): Use xpalloc to check for overflow
8287 in size calculation.
8288 (Fexecute_kbd_macro):
8289 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8290 * marker.c (cached_charpos, cached_bytepos, CONSIDER)
8291 (byte_char_debug_check, buf_charpos_to_bytepos, verify_bytepos)
8292 (buf_bytepos_to_charpos, Fset_marker, set_marker_restricted)
8293 (set_marker_both, set_marker_restricted_both, marker_position)
8294 (marker_byte_position, Fbuffer_has_markers_at):
8295 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8296 (Fset_marker, set_marker_restricted): Don't assume fixnum fits in int.
61b108cc 8297 * menu.c (ensure_menu_items): Rename from grow_menu_items.
d311d28c
PE
8298 It now merely ensures that the menu is large enough, without
8299 necessarily growing it, as this avoids some integer overflow issues.
8300 All callers changed.
8301 (keymap_panes, parse_single_submenu, Fx_popup_menu):
8302 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8303 (parse_single_submenu, Fx_popup_menu): Don't assume fixnum fits in int.
8304 Use SAFE_ALLOCA_LISP, not alloca.
8305 (find_and_return_menu_selection): Avoid unnecessary casts of pointers
8306 to EMACS_INT. Check that fixnums are in proper range for system types.
8307 * minibuf.c (minibuf_prompt_width, string_to_object)
8308 (Fminibuffer_contents, Fminibuffer_contents_no_properties)
8309 (Fminibuffer_completion_contents, Ftry_completion, Fall_completions):
8310 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8311 (get_minibuffer, read_minibuf_unwind):
8312 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8313 (read_minibuf): Omit unnecessary arg BACKUP_N, which is always nil;
8314 this simplifies overflow checking. All callers changed.
8315 (read_minibuf, Fread_buffer, Ftry_completion, Fall_completions)
8316 (Ftest_completion):
8317 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8318 * nsfns.m (check_ns_display_info): Don't assume fixnum fits in long.
8319 (x_set_menu_bar_lines, x_set_tool_bar_lines, Fx_create_frame):
8320 Check that fixnums are in proper range for system types.
8321 (Fx_create_frame, Fx_show_tip):
8322 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8323 * nsfont.m (ns_findfonts, nsfont_list_family):
8324 Don't assume fixnum fits in long.
8325 * nsmenu.m (ns_update_menubar, ns_menu_show, ns_popup_dialog):
8326 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8327 (ns_update_menubar): Use intptr_t, not EMACS_INT, when intptr_t is
8328 wide enough.
17fdb222 8329 * nsselect.m (ns_get_local_selection, clean_local_selection_data):
d311d28c
PE
8330 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8331 * print.c (print_buffer_size, print_buffer_pos, print_buffer_pos_byte)
8332 (PRINTDECLARE, PRINTPREPARE):
8333 (strout, print_string):
8334 (print, print_preprocess, print_check_string_charset_prop)
8335 (print_object):
8336 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8337 (PRINTDECLARE):
8338 (temp_output_buffer_setup, Fprin1_to_string, print_object):
8339 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8340 (PRINTPREPARE): Use int, not ptrdiff_t, where int is wide enough.
d311d28c 8341 (printchar, strout): Use xpalloc to catch size calculation overflow.
0fd11aa5 8342 (Fexternal_debugging_output): Don't overflow EMACS_INT->int conversion.
d311d28c
PE
8343 (print_error_message): Use SAFE_ALLOCA, not alloca.
8344 (print_object): Use int, not EMACS_INT, where int is wide enough.
a8b7caa3
PE
8345 (print_depth, new_backquote_output, print_number_index):
8346 Use ptrdiff_t, not int, where int might not be wide enough.
d311d28c
PE
8347 * process.c (Fdelete_process): Don't assume pid fits into EMACS_INT.
8348 (Fset_process_window_size, Fformat_network_address)
8349 (get_lisp_to_sockaddr_size, set_socket_option, Fmake_network_process)
d44287d4 8350 (sigchld_handler):
d311d28c 8351 Check that fixnums are in proper range for system types.
d44287d4 8352 (Fsignal_process): Simplify by avoiding a goto.
d83cf4cc
PE
8353 Check for process-ids out of pid_t range rather than relying on
8354 undefined behavior.
e4d81efc 8355 (process_tick, update_tick): Use EMACS_INT, not int.
d311d28c
PE
8356 (Fformat_network_address, read_process_output, send_process)
8357 (Fprocess_send_region, status_notify):
8358 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8359 (Fformat_network_address, Fmake_serial_process, Fmake_network_process)
8360 (wait_reading_process_output, read_process_output, exec_sentinel):
8361 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8362 (conv_lisp_to_sockaddr): Don't assume fixnums fit into int.
8363 (Faccept_process_output): Use duration_to_sec_usec to do proper
8364 overflow checking on durations.
dde14581
PE
8365 (emacs_get_tty_pgrp, Fprocess_running_child_p, process_send_signal):
8366 Don't assume pid_t fits in int.
02481186
PE
8367 * process.h (struct Lisp_Process): Members tick and update_tick
8368 are now of type EMACS_INT, not int.
b62b53e8
PE
8369 * puresize.h (PURESIZE_RATIO): Shrink this to 8/6 on 32-bit hosts
8370 configured --with-wide-int.
d311d28c
PE
8371 * scroll.c (calculate_scrolling, calculate_direct_scrolling)
8372 (line_ins_del): Use int, not EMACS_INT, where int is wide enough.
8373 * search.c (looking_at_1, string_match_1):
8374 (fast_string_match, fast_c_string_match_ignore_case)
8375 (fast_string_match_ignore_case, fast_looking_at, scan_buffer)
8376 (scan_newline, find_before_next_newline, search_command)
8377 (trivial_regexp_p, search_buffer, simple_search, boyer_moore)
8378 (set_search_regs, wordify):
8379 (Freplace_match):
8380 (Fmatch_data):
8381 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8382 (string_match_1, search_buffer, set_search_regs):
8383 (Fmatch_data):
8384 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8385 (wordify): Check for overflow in size calculation.
8386 (Freplace_match): Avoid potential buffer overflow in search_regs.start.
8387 (Fset_match_data): Don't assume fixnum fits in ptrdiff_t.
8388 Check that fixnums are in proper range for system types.
8389 * sound.c (struct sound_device)
8390 (wav_play, au_play, vox_write, alsa_period_size, alsa_write):
8391 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8392 (Fplay_sound_internal):
8393 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
eacd378d 8394 * syntax.c (struct lisp_parse_state, find_start_modiff)
d311d28c
PE
8395 (Finternal_describe_syntax_value, scan_lists, scan_sexps_forward):
8396 (Fparse_partial_sexp):
8397 Don't assume fixnums can fit in int.
8398 (struct lisp_parse_state, find_start_pos, find_start_value)
8399 (find_start_value_byte, find_start_begv)
8400 (update_syntax_table, char_quoted, dec_bytepos)
8401 (find_defun_start, prev_char_comend_first, back_comment):
8402 (scan_words, skip_chars, skip_syntaxes, forw_comment, Fforward_comment)
8403 (scan_lists, Fbackward_prefix_chars, scan_sexps_forward):
8404 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8405 (Finternal_describe_syntax_value): Check that match_lisp is a
8406 character, not an integer, since the code stuffs it into int.
8407 (scan_words, scan_sexps_forward):
8408 Check that fixnums are in proper range for system types.
8409 (Fforward_word):
8410 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8411 (scan_sexps_forward):
8412 Use CHARACTERP, not INTEGERP, since the value must fit into int.
8413 (Fparse_partial_sexp): Fix doc; element 8 is not ignored.
8414 * syntax.h: Adjust decls to match defn changes elsewhere.
8415 (struct gl_state_s):
8416 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
e4ecdc9c
PE
8417 (SETUP_SYNTAX_TABLE_FOR_OBJECT): Use PTRDIFF_MAX, not
8418 MOST_POSITIVE_FIXNUM.
d311d28c
PE
8419 * sysdep.c (wait_for_termination_1, wait_for_termination)
8420 (interruptible_wait_for_termination, mkdir):
8421 Don't assume pid_t fits in int; on 64-bit AIX pid_t is 64-bit.
8422 (emacs_read, emacs_write):
8423 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
225a2cff
PE
8424 (system_process_attributes): Don't assume uid_t, gid_t, EMACS_INT,
8425 and double all fit in int.
d311d28c
PE
8426 * term.c (set_tty_color_mode):
8427 Check that fixnums are in proper range for system types.
8428 * termhooks.h (struct input_event):
8429 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8430 * textprop.c (validate_interval_range, interval_of)
8431 (Fadd_text_properties, set_text_properties_1)
8432 (Fremove_text_properties, Fremove_list_of_text_properties)
8433 (Ftext_property_any, Ftext_property_not_all)
8434 (copy_text_properties, text_property_list, extend_property_ranges)
8435 (verify_interval_modification):
8436 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8437 (Fnext_single_char_property_change)
8438 (Fprevious_single_char_property_change):
8439 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
5895d7b9
PE
8440 (copy_text_properties):
8441 Check for integer overflow in index calculation.
d311d28c
PE
8442 * undo.c (last_boundary_position, record_point, record_insert)
8443 (record_delete, record_marker_adjustment, record_change)
8444 (record_property_change):
8445 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8446 (truncate_undo_list, Fprimitive_undo): Don't assume fixnum fits in int.
8447 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8448 * w32fns.c (Fx_create_frame, x_create_tip_frame, Fx_show_tip)
8449 (Fx_hide_tip, Fx_file_dialog):
8450 * w32menu.c (set_frame_menubar):
8451 Use ptrdiff_t, not int, for consistency with rest of code.
8452 * window.c (window_scroll_preserve_hpos, window_scroll_preserve_vpos)
8453 (select_window, Fdelete_other_windows_internal)
8454 (window_scroll_pixel_based, window_scroll_line_based)
8455 (Frecenter, Fset_window_configuration):
8456 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8457 (Fset_window_hscroll, run_window_configuration_change_hook)
8458 (set_window_buffer, temp_output_buffer_show, scroll_command)
5895d7b9 8459 (Fscroll_other_window, Frecenter):
d311d28c
PE
8460 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8461 (Fwindow_line_height, window_scroll, Fscroll_left, Fscroll_right):
8462 Don't assume fixnum fits in int.
8463 (Fset_window_scroll_bars):
8464 Check that fixnums are in proper range for system types.
8465 * xdisp.c (help_echo_pos, pos_visible_p, string_pos_nchars_ahead)
8466 (string_pos, c_string_pos, number_of_chars, init_iterator)
8467 (in_ellipses_for_invisible_text_p, init_from_display_pos)
8468 (compute_stop_pos, next_overlay_change, compute_display_string_pos)
8469 (compute_display_string_end, handle_face_prop)
5895d7b9
PE
8470 (face_before_or_after_it_pos, handle_invisible_prop)
8471 (handle_display_prop, handle_display_spec, handle_single_display_spec)
d311d28c
PE
8472 (display_prop_intangible_p, string_buffer_position_lim)
8473 (string_buffer_position, handle_composition_prop, load_overlay_strings)
8474 (get_overlay_strings_1, get_overlay_strings)
8475 (iterate_out_of_display_property, forward_to_next_line_start)
8476 (back_to_previous_visible_line_start, reseat, reseat_to_string)
8477 (get_next_display_element, set_iterator_to_next)
8478 (get_visually_first_element, compute_stop_pos_backwards)
8479 (handle_stop_backwards, next_element_from_buffer)
8480 (move_it_in_display_line_to, move_it_in_display_line)
8481 (move_it_to, move_it_vertically_backward, move_it_by_lines)
8482 (add_to_log, message_dolog, message_log_check_duplicate)
8483 (message2, message2_nolog, message3, message3_nolog
8484 (with_echo_area_buffer, display_echo_area_1, resize_mini_window_1)
8485 (current_message_1, truncate_echo_area, truncate_message_1)
8486 (set_message, set_message_1, store_mode_line_noprop)
8487 (hscroll_window_tree, debug_delta, debug_delta_bytes, debug_end_vpos)
8488 (text_outside_line_unchanged_p, check_point_in_composition)
8489 (reconsider_clip_changes)
8490 (redisplay_internal, set_cursor_from_row, try_scrolling)
8491 (try_cursor_movement, set_vertical_scroll_bar, redisplay_window)
8492 (redisplay_window, find_last_unchanged_at_beg_row)
8493 (find_first_unchanged_at_end_row, row_containing_pos, try_window_id)
8494 (trailing_whitespace_p, find_row_edges, display_line)
8495 (RECORD_MAX_MIN_POS, Fcurrent_bidi_paragraph_direction)
8496 (display_mode_element, store_mode_line_string)
8497 (pint2str, pint2hrstr, decode_mode_spec)
8498 (display_count_lines, display_string, draw_glyphs)
8499 (x_produce_glyphs, x_insert_glyphs)
8500 (rows_from_pos_range, mouse_face_from_buffer_pos)
8501 (fast_find_string_pos, mouse_face_from_string_pos)
8502 (note_mode_line_or_margin_highlight, note_mouse_highlight):
8503 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8504 (safe_call, init_from_display_pos, handle_fontified_prop)
8505 (handle_single_display_spec, load_overlay_strings)
8506 (with_echo_area_buffer, setup_echo_area_for_printing)
8507 (display_echo_area, echo_area_display)
8508 (x_consider_frame_title, prepare_menu_bars, update_menu_bar)
8509 (update_tool_bar, hscroll_window_tree, redisplay_internal)
5895d7b9
PE
8510 (redisplay_window, dump_glyph_row, display_mode_line)
8511 (Fformat_mode_line, decode_mode_spec, on_hot_spot_p):
43ad2e9a 8512 (handle_display_spec, display_prop_string_p):
d311d28c
PE
8513 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8514 (handle_single_display_spec, build_desired_tool_bar_string)
8515 (redisplay_tool_bar, scroll_window_tree, Fdump_glyph_matrix)
8516 (get_specified_cursor_type):
8517 Check that fixnums are in proper range for system types.
8518 (struct overlay_entry, resize_mini_window, Fdump_glyph_row)
8519 (Flookup_image_map):
8520 Don't assume fixnums fit in int.
8521 (compare_overlay_entries):
8522 Avoid mishandling comparisons due to subtraction overflow.
8523 (load_overlay_strings): Use SAFE_NALLOCA, not alloca.
8524 (last_escape_glyph_face_id, last_glyphless_glyph_face_id):
8525 (handle_tool_bar_click):
8526 Use int, not unsigned, since we prefer signed and the signedness
8527 doesn't matter here.
8528 (get_next_display_element, next_element_from_display_vector):
8529 Use int, not EMACS_INT, when int is wide enough.
8530 (start_hourglass): Use duration_to_sec_usec to do proper
8531 overflow checking on durations.
8532 * xfaces.c (Fbitmap_spec_p):
8533 Check that fixnums are in proper range for system types.
8534 (compare_fonts_by_sort_order):
8535 Avoid mishandling comparisons due to subtraction overflow.
8536 (Fx_family_fonts, realize_basic_faces):
8537 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8538 (Fx_family_fonts):
8539 Don't assume fixnum fits in int.
8540 Use SAFE_ALLOCA_LISP, not alloca.
8541 (merge_face_heights): Remove unnecessary cast to EMACS_INT.
8542 (Finternal_make_lisp_face): Don't allocate more than MAX_FACE_ID.
8543 (face_at_buffer_position, face_for_overlay_string)
8544 (face_at_string_position):
8545 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8546 (merge_faces): Use int, not EMACS_INT, where int is wide enough.
8547 * xfns.c (x_set_menu_bar_lines, x_set_tool_bar_lines, x_icon_verify)
8548 (Fx_show_tip):
8549 Check that fixnums are in proper range for system types.
8550 (Fx_create_frame, x_create_tip_frame, Fx_show_tip)
8551 (Fx_hide_tip, Fx_file_dialog, Fx_select_font):
8552 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8553 (Fx_change_window_property): Don't assume fixnums fit in int.
8554 * xfont.c (xfont_chars_supported):
8555 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8556 * xmenu.c (Fx_popup_dialog, set_frame_menubar)
8557 (create_and_show_popup_menu, create_and_show_dialog, xmenu_show):
8558 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8559 * xml.c (parse_region):
8560 * xrdb.c (magic_file_p):
8561 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8562 * xselect.c (TRACE1): Don't assume pid_t promotes to int.
8563 (x_get_local_selection, x_reply_selection_request)
8564 (x_handle_selection_request, wait_for_property_change):
8565 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8566 (selection_data_to_lisp_data): Use short, not EMACS_INT, where
8567 short is wide enough.
8568 (x_send_client_event): Don't assume fixnum fits in int.
8569 * xterm.c (x_x_to_emacs_modifiers):
8570 Don't assume EMACS_INT overflows nicely into int.
8571 (x_emacs_to_x_modifiers): Use EMACS_INT, not int, because values
8572 may come from Lisp.
8573 (handle_one_xevent): NATNUMP can eval its arg twice.
8574 (x_connection_closed):
8575 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8576 * xterm.h: Adjust decls to match defn changes elsewhere.
8577 (struct scroll_bar): Use struct vectorlike_header
8578 rather than rolling our own approximation.
8579 (SCROLL_BAR_VEC_SIZE): Remove; not used.
8580
c6574eb5
GM
85812012-05-25 Glenn Morris <rgm@gnu.org>
8582
8583 * lisp.mk (lisp): Update for more files being compiled now.
8584
e8d32c7e
SM
85852012-05-25 Stefan Monnier <monnier@iro.umontreal.ca>
8586
48def666
SM
8587 * lread.c: Remove `read_pure' which makes no difference.
8588 (read_pure): Remove var.
8589 (unreadpure): Remove function.
8590 (readevalloop): Don't call read_list with -1 flag.
8591 (read1, read_vector): Don't test read_pure any more.
8592 (read_list): Simplify.
8593
e8d32c7e
SM
8594 * fileio.c, character.h: Minor style tweaks.
8595
4b2addb7
DA
85962012-05-24 Dmitry Antipov <dmantipov@yandex.ru>
8597
8598 * window.h (clip_changed): Remove useless declaration.
8599
584461b2
JB
86002012-05-22 Juanma Barranquero <lekktu@gmail.com>
8601
8602 * makefile.w32-in: Follow-up to 2012-05-22T16:20:27Z!eggert@cs.ucla.edu.
8603 (TAGS, TAGS-gmake, CONFIG_H): Remove further references to m/intel386.h.
8604
34374650
PE
86052012-05-22 Paul Eggert <eggert@cs.ucla.edu>
8606
8607 Remove src/m/*.
8608 This directory predates autoconf and is no longer needed nowadays.
8609 Move its few remaining bits of functionality to where they're needed.
8610 * m/README, m/alpha.h, m/amdx86-64.h, m/ia64.h, m/ibmrs6000.h:
8611 * m/ibms390x.h, m/intel386.h, m/m68k.h, m/macppc.h, m/sparc.h:
8612 * m/template.h: Remove.
8613 * Makefile.in (M_FILE): Remove. All uses removed.
8614 * alloc.c (POINTERS_MIGHT_HIDE_IN_OBJECTS):
8615 * lisp.h (USE_LSB_TAG):
8616 * mem-limits.h (EXCEEDS_LISP_PTR):
8617 Use VAL_MAX, not VALBITS, in #if.
8618 * lisp.h (EMACS_INT_MAX): New macro, useful in #if.
8619 (EMACS_UINT): Define unconditionally now.
8620 (BITS_PER_CHAR, BITS_PER_SHORT, BITS_PER_INT, BITS_PER_LONG)
8621 (BITS_PER_EMACS_INT): New constants, replacing
8622 what used to be in config.h, but not useful in #if.
8623 (GCTYPEBITS, VALBITS): Define unconditionally, since m/* files don't
8624 define them any more.
8625 (VAL_MAX): New macro.
8626 (VALMASK): Use it.
8627 * puresize.h (PURESIZE_RATIO): Use EMACS_INT_MAX, not
8628 BITS_PER_EMACS_INT, in #if.
8629 * s/aix4-2.h (BROKEN_FIONREAD, BROKEN_SIGAIO, BROKEN_SIGPTY)
8630 (BROKEN_SIGPOLL): Move here from m/ibmrs6000.h, which was removed.
8631 * s/gnu-linux.h (ULIMIT_BREAK_VALUE) [__i386__]:
8632 * s/ms-w32.h (DATA_START):
8633 Move here from removed file m/intel386.h.
8634 * s/gnu.h (NLIST_STRUCT): Remove undef; 'configure' does this.
8635 * s/irix6-5.h (_LP64): Remove; lisp.h no longer needs this.
8636
261cb4bb
PE
86372012-05-21 Paul Eggert <eggert@cs.ucla.edu>
8638
8639 Assume C89 or later.
8640 * alloc.c, buffer.c, lisp.h: Replace POINTER_TYPE with void.
8641 * alloc.c (overrun_check_malloc, overrun_check_realloc, xmalloc)
8642 (xrealloc):
8643 * buffer.c (mmap_free_1, mmap_enlarge): Omit needless casts.
8644 * editfns.c, fns.c, gmalloc.c, insdel.c, sysdep.c, termcap.c (NULL):
8645 * textprop.c, tparam.c (NULL): Remove.
8646 * ralloc.c, vm-limit.c (POINTER): Assume void * works.
8647 * regex.c (SIGN_EXTEND_CHAR): Assume signed char works.
8648 * regex.h (_RE_ARGS): Remove. All uses rewritten to use prototypes.
8649 * unexelf.c (ElfBitsW): Assume c89 preprocessor or better.
8650 * xterm.c (input_signal_count): Assume volatile works.
8651
ff23cd9f
KB
86522012-05-21 Ken Brown <kbrown@cornell.edu>
8653
8654 * xgselect.c (xg_select): Fix first argument in call to 'select'
8655 (bug#11508).
8656
1b170bc6
KB
86572012-05-20 Ken Brown <kbrown@cornell.edu>
8658
8659 * gmalloc.c (_free_internal_nolock, _realloc_internal_nolock)
bd7239f5 8660 [CYGWIN]: Cast ptr to (char *) before comparing to _heapbase.
1b170bc6 8661
b2f4d39f
KB
86622012-05-19 Ken Brown <kbrown@cornell.edu>
8663
8664 * xfns.c (x_in_use): Remove `static' qualifier.
8665 * xterm.h (x_in_use): Declare.
8666 * xgselect.c: Include xterm.h.
8667 (xg_select): Test `x_in_use' instead of `inhibit_window_system'
8668 and `display_arg' (bug#9754).
8669
003fdae2
PE
86702012-05-19 Paul Eggert <eggert@cs.ucla.edu>
8671
9232a6d9
PE
8672 * s/ms-w32.h (HAVE_GETDOMAINNAME): Remove; not needed.
8673
003fdae2
PE
8674 * m/vax.h: Remove; no longer needed since HAVE_FTIME is being removed.
8675 * s/ms-w32.h (HAVE_FTIME): Remove; not needed.
8676
784b56e2
EZ
86772012-05-18 Eli Zaretskii <eliz@gnu.org>
8678
8679 Fix compilation with -DGLYPH_DEBUG=1 on MS-Windows.
8680
8681 * w32term.c [GLYPH_DEBUG]: Add prototype for x_check_font.
090bd7cb 8682 (x_check_font) [GLYPH_DEBUG]: New function, copied from xterm.c.
784b56e2
EZ
8683
8684 * w32fns.c (unwind_create_frame) [GLYPH_DEBUG]: Fix broken
8685 reference to image_cache->refcount.
8686 (x_create_tip_frame): Fix broken use of FRAME_IMAGE_CACHE.
8687
a0a79cde
JL
86882012-05-17 Juri Linkov <juri@jurta.org>
8689
8690 * search.c (Fword_search_regexp, Fword_search_backward)
8691 (Fword_search_forward, Fword_search_backward_lax)
8692 (Fword_search_forward_lax): Move functions to isearch.el
8693 (bug#10145, bug#11381).
8694
b0572523
PE
86952012-05-16 Paul Eggert <eggert@cs.ucla.edu>
8696
8697 * xgselect.c (xg_select): Just invoke 'select' if -nw (Bug#9754).
8698
9660f5fc
SM
86992012-05-15 Stefan Monnier <monnier@iro.umontreal.ca>
8700
8701 * lread.c (init_obarray): Declare Qt and Qnil as special.
8702
4374de83
GM
87032012-05-14 Glenn Morris <rgm@gnu.org>
8704
8705 * nsterm.m (ns_init_paths): Fix typo ("libexec" not "lib-exec").
985584ae 8706 Put "libexec" before "bin", for the sake of init_callproc_1.
4374de83 8707
dc44c39a
PE
87082012-05-14 Paul Eggert <eggert@cs.ucla.edu>
8709
078c97cb
PE
8710 * keyboard.c (kbd_buffer_get_event) [!HAVE_DBUS]: Omit unused local.
8711
dc44c39a
PE
8712 * unexaix.c: Port to more-recent AIX compilers.
8713 (report_error, report_error_1, make_hdr, copy_sym)
8714 (mark_x, adjust_lnnoptrs, unrelocate_symbols):
8715 Make arguments const char *, not char *, to avoid violations of C
8716 standard and to fix some AIX warnings reported by Gilles Pion.
8717
e18afed7 87182012-05-14 Eli Zaretskii <eliz@gnu.org>
ac268e67
EZ
8719
8720 * xdisp.c (handle_stop): Don't call get_overlay_strings_1 if we
8721 already have overlays loaded.
8722 (handle_single_display_spec): Before returning without displaying
8723 fringe bitmap, synchronize the bidi iterator with the main display
8724 iterator, by calling iterate_out_of_display_property.
8725 (iterate_out_of_display_property): Detect buffer iteration by
8726 testing that it->string is a Lisp string.
8727 (get_next_display_element): When the current object is exhausted,
8728 and there's something on it->stack, call set_iterator_to_next to
8729 proceed with what's on the stack, instead of returning zero.
8730 (set_iterator_to_next): If called at the end of a Lisp string,
8731 proceed to consider_string_end without incrementing string
8732 position. Don't increment display vector index past the end of
8733 the display vector. (Bug#11417)
c8fb9dc6
EZ
8734 (pos_visible_p): Don't report a position visible when move_it_to
8735 stopped at the last line of window, which happens to be scanned
8736 backwards by the bidi iteration. (Bug#11464)
ac268e67 8737
e18afed7 87382012-05-14 Eli Zaretskii <eliz@gnu.org>
82f9b393
EZ
8739
8740 * xdisp.c (handle_single_display_spec): Return 1 for left-margin
8741 and right-margin display specs even if the spec is invalid or we
61b108cc
SM
8742 are on a TTY, and thus unable to display on the fringes.
8743 That's because the text with the property will not be displayed anyway,
82f9b393
EZ
8744 so we need to signal to the caller that this is a "replacing"
8745 display spec. This fixes display when the spec is invalid or we
8746 are on a TTY.
8747
e18afed7 87482012-05-14 Paul Eggert <eggert@cs.ucla.edu>
297834cd
PE
8749
8750 * unexaix.c (make_hdr): Fix typo in prototype.
8751 This bug broke the build on AIX. Problem reported by Gilles Pion.
8752
9d0a235a
MA
87532012-05-14 Michael Albinus <michael.albinus@gmx.de>
8754
8755 * keyboard.c (kbd_buffer_get_event): Read special events also in
8756 batch mode. (Bug#11415)
8757
9e6b06ed
GM
87582012-05-12 Glenn Morris <rgm@gnu.org>
8759
8760 * ns.mk: Update for ns_appbindir no longer having trailing "/".
8761
c1a1d7a3
EZ
87622012-05-12 Eli Zaretskii <eliz@gnu.org>
8763
8764 * lisp.mk (lisp): Add newcomment.elc.
8765
3fe7cdc8
GM
87662012-05-12 Glenn Morris <rgm@gnu.org>
8767
8768 * Makefile.in (MKDIR_P): New, set by configure.
8769 * ns.mk (${ns_appdir}, ${ns_appbindir}Emacs): Use $MKDIR_P.
8770
53f7d2c0
PE
87712012-05-11 Paul Eggert <eggert@cs.ucla.edu>
8772
8773 Remove unused function hourglass_started.
8774 * dispextern.h (hourglass_started):
8775 * w32fns.c (hourglass_started):
8776 * xdisp.c (hourglass_started): Remove.
8777
75aafb17
JB
87782012-05-10 Juanma Barranquero <lekktu@gmail.com>
8779
8780 * makefile.w32-in ($(BLD)/gmalloc.$(O), $(BLD)/w32menu.$(O)):
8781 Update dependencies.
8782
12959e8e
PE
87832012-05-10 Paul Eggert <eggert@cs.ucla.edu>
8784
97107e2e
PE
8785 * xgselect.c (xg_select): Put maxfds+1 into a var.
8786 This is slightly clearer, and pacifies Ubuntu 12.04 gcc.
8787
12959e8e
PE
8788 * sound.c (DEFAULT_ALSA_SOUND_DEVICE): Define only if HAVE_ALSA.
8789
836d29b3
DA
87902012-05-10 Dave Abrahams <dave@boostpro.com>
8791
8792 * filelock.c (syms_of_filelock): New boolean create-lockfiles.
8793 (lock_file): If create_lockfiles is 0, do nothing. (Bug#11227)
8794
5cb67954
MA
87952012-05-09 Michael Albinus <michael.albinus@gmx.de>
8796
8797 * dbusbind.c (xd_registered_buses): New internal Lisp object.
8798 Rename all occurences of Vdbus_registered_buses to xd_registered_buses.
8799 (syms_of_dbusbind): Remove declaration of Vdbus_registered_buses.
8800 Initialize xd_registered_buses.
8801
3478ec45
PE
88022012-05-09 Paul Eggert <eggert@cs.ucla.edu>
8803
b263a6b0
PE
8804 Untag more efficiently if USE_LSB_TAG.
8805 This is based on a proposal by YAMAMOTO Mitsuharu in
8806 <http://lists.gnu.org/archive/html/emacs-devel/2008-01/msg01876.html>.
8807 For an admittedly artificial (nth 8000 longlist) benchmark on
8808 Fedora 15 x86-64, this yields a 25% CPU speedup. Also, it shrinks
8809 Emacs's overall text size by 1%.
8810 * lisp.h (XUNTAG): New macro.
8811 (XCONS, XVECTOR, XSTRING, XSYMBOL, XFLOAT, XMISC, XPROCESS, XWINDOW)
8812 (XTERMINAL, XSUBR, XBUFFER, XCHAR_TABLE, XSUB_CHAR_TABLE, XBOOL_VECTOR)
8813 (XSETTYPED_PSEUDOVECTOR, XHASH_TABLE, TYPED_PSEUDOVECTORP): Use it.
8814 * eval.c (Fautoload):
8815 * font.h (XFONT_SPEC, XFONT_ENTITY, XFONT_OBJECT):
8816 * frame.h (XFRAME): Use XUNTAG.
8817
3478ec45
PE
8818 Port recent dbusbind.c changes to 32-bit --with-wide-int.
8819 * dbusbind.c (xd_append_arg, xd_retrieve_arg, Fdbus_message_internal):
8820 Remove unportable assumptions about print widths of types like
8821 dbus_uint32_t.
8822 (xd_get_connection_address, Fdbus_init_bus): Cast Emacs integer to
8823 intptr_t when converting between pointer and integer, to avoid GCC
8824 warnings about wrong width.
8825
666b903b 88262012-05-09 Eli Zaretskii <eliz@gnu.org>
0d887c7d
EZ
8827
8828 * w32proc.c (new_child): Force Windows to reserve only 64KB of
8829 stack for each reader_thread, instead of defaulting to 8MB
8830 determined by the linker. This avoids failures in creating
8831 subprocesses on Windows 7, see the discussion in this thread:
8832 http://lists.gnu.org/archive/html/emacs-devel/2012-03/msg00119.html.
8833
b120cc17
JC
88342012-05-07 Jérémy Compostella <jeremy.compostella@gmail.com>
8835
8836 Fix up display of the *Minibuf-0* buffer in the mini window.
8837 * keyboard.c (read_char): Don't clear the echo area if there's no
8838 message to clear.
8839 * xdisp.c (redisplay_internal): Redisplay the mini window (with the
2fed2689 8840 contents of *Minibuf-0*) if there's no message displayed in its stead.
b120cc17 8841
9a4b36f8
MA
88422012-05-07 Michael Albinus <michael.albinus@gmx.de>
8843
8844 * dbusbind.c (XD_DEBUG_MESSAGE): Don't print message twice in
8845 batch mode.
8846
e5f9458f
CY
88472012-05-06 Chong Yidong <cyd@gnu.org>
8848
8849 * lisp.mk (lisp): Update.
8850
eceeb5fc 88512012-05-05 Jim Meyering <meyering@redhat.com>
bf98199c
JM
8852
8853 * w32font.c (fill_in_logfont): NUL-terminate a string (Bug#11372).
8854
71873e2b
SM
88552012-05-04 Stefan Monnier <monnier@iro.umontreal.ca>
8856
8857 * data.c (PUT_ERROR): New macro.
8858 (syms_of_data): Use it. Add new error type `user-error'.
8859 * undo.c (user_error): New function.
8860 (Fprimitive_undo): Use it.
8861 * print.c (print_error_message): Adjust print style for `user-error'.
8862 * keyboard.c (user_error): New function.
8863 (Fexit_recursive_edit, Fabort_recursive_edit): Use it.
8864
ab0fa4e4
PE
88652012-05-03 Paul Eggert <eggert@cs.ucla.edu>
8866
8867 Do not limit current-time-string to years 1000..9999.
8868 * editfns.c (TM_YEAR_IN_ASCTIME_RANGE): Remove.
8869 (Fcurrent_time_string): Support any year that is supported by the
8870 underlying localtime representation. Don't use asctime, as it
8871 has undefined behavior for years outside the range -999..9999.
8872
7ed806a7
PE
88732012-05-02 Paul Eggert <eggert@cs.ucla.edu>
8874
8875 Fix race conditions involving setenv, gmtime, localtime, asctime.
8876 Without this fix, interrupts could mess up code that uses these
8877 nonreentrant functions, since setting TZ invalidates existing
8878 tm_zone or tzname values, and since most of these functions return
8879 pointers to static storage.
8880 * editfns.c (format_time_string, Fdecode_time, Fencode_time)
8881 (Fcurrent_time_string, Fcurrent_time_zone, Fset_time_zone_rule):
8882 Grow the critical sections to include not just invoking
8883 localtime/gmtime, but also accessing these functions' results
8884 including their tm_zone values if any, and any related TZ setting.
8885 (format_time_string): Last arg is now struct tm *, not struct tm **,
71873e2b
SM
8886 so that the struct tm is saved in the critical section.
8887 All callers changed. Simplify allocation of initial buffer, partly
7ed806a7
PE
8888 motivated by the fact that memory allocation needs to be outside
8889 the critical section.
8890
0c16dfed
DA
88912012-05-02 Dmitry Antipov <dmantipov@yandex.ru>
8892
8893 * intervals.c (adjust_intervals_for_insertion): Initialize `newi'
8894 with RESET_INTERVAL.
8895
8896 * buffer.c (Fget_buffer_create, Fmake_indirect_buffer):
8897 Remove duplicated buffer name initialization.
8898
3f83ace8
JM
88992012-05-02 Jim Meyering <jim@meyering.net>
8900
8901 * xterm.c (x_term_init): Use memcpy instead of strncpy (Bug#11373).
8902
c7b8541e
JM
8903 * xfns.c (x_window): Use xstrdup (Bug#11375).
8904
90207a15 89052012-05-02 Eli Zaretskii <eliz@gnu.org>
2fa85638
EZ
8906
8907 * xdisp.c (pos_visible_p): If already at a newline from the
8908 display string before the 'while' loop, don't walk back the glyphs
8909 from it3.glyph_row. Solves assertion violation when the display
8910 string begins with a newline (egg.el). (Bug#11367)
8911
b593d6a9
AH
89122012-05-01 Stefan Monnier <monnier@iro.umontreal.ca>
8913
8914 * keyboard.c (Fexecute_extended_command, Vsuggest_key_bindings):
8915 Move to simple.el.
8916
4737362e
GM
89172012-05-01 Glenn Morris <rgm@gnu.org>
8918
99cf43f9
GM
8919 * syssignal.h: Remove reference to BROKEN_SIGINFO (last used in
8920 s/ptx4.h), BROKEN_SIGTSTP (last used in m/ustation.h, m/dpx2.h),
8921 and BROKEN_SIGURG (was in s/gnu-linux.h prior to 2008-02-10).
8922 All were removed before 23.1.
8923
9311dcff
GM
8924 * dispnew.c: Remove HAVE_LIBNCURSES test;
8925 it is always true on relevant platforms.
8926
4d5c6349
GM
8927 * Makefile.in (LD_SWITCH_X_SITE_RPATH):
8928 Rename from LD_SWITCH_X_SITE_AUX_RPATH.
8929
4737362e
GM
8930 * Makefile.in (LD_SWITCH_X_SITE_AUX): Remove; no longer used.
8931
74dd3a6b
AS
89322012-04-30 Andreas Schwab <schwab@linux-m68k.org>
8933
8934 * .gdbinit (xpr): Remove checks for no longer existing misc types.
8935 (xintfwd, xboolfwd, xobjfwd, xbufobjfwd, xkbobjfwd, xbuflocal):
8936 Remove.
8937
13c379ee
PE
89382012-04-28 Paul Eggert <eggert@cs.ucla.edu>
8939
8940 Do not avoid creating empty evaporating overlays (Bug#9642).
8941 * buffer.c (Fmove_overlay): Revert the change of 2012-04-23.
8942 That is, do not delete an evaporating overlay if it becomes
8943 empty after its bounds are adjusted to fit within its buffer.
8944 This fix caused other problems, and I'm reverting it until we get
8945 to the bottom of them.
8946
a8e7d6d7 89472012-04-27 Chong Yidong <cyd@gnu.org>
9be2fd9b
CY
8948
8949 * xselect.c (x_convert_selection): Initialize a pointer (Bug#11315).
8950
a8e7d6d7 89512012-04-27 Eli Zaretskii <eliz@gnu.org>
f0ee99a0
EZ
8952
8953 * xdisp.c (pos_visible_p): If the window start position is beyond
8954 ZV, start the display from buffer beginning. Prevents assertion
8955 violation in init_iterator when the minibuffer window is scrolled
8956 via the scroll bar.
8957
8958 * window.c (window_scroll_pixel_based): Likewise.
8959
a8e7d6d7 89602012-04-27 Chong Yidong <cyd@gnu.org>
9ec7751f
CY
8961
8962 * keymap.c (where_is_internal): Doc fix (Bug#10872).
8963
a8e7d6d7 89642012-04-27 Glenn Morris <rgm@gnu.org>
24c51a09
GM
8965
8966 * fileio.c (Fcopy_file, Fset_file_selinux_context):
8967 Ignore ENOTSUP failures from setfilecon functions. (Bug#11245)
8968
a8e7d6d7 89692012-04-27 Eli Zaretskii <eliz@gnu.org>
73055685 8970
b593d6a9
AH
8971 * dispnew.c (swap_glyph_pointers, copy_row_except_pointers):
8972 Don't overrun array limits of glyph row's used[] array. (Bug#11288)
73055685 8973
1c6900d9
EZ
89742012-04-26 Eli Zaretskii <eliz@gnu.org>
8975
4c3fa1d9
EZ
8976 * xdisp.c (IT_DISPLAYING_WHITESPACE): In addition to the loaded
8977 display element, check also the underlying string or buffer
8978 character. (Bug#11341)
8979
1c6900d9
EZ
8980 * w32menu.c: Include w32heap.h.
8981 (add_menu_item): If the call to AppendMenuW (via
8982 unicode_append_menu) fails, disable Unicode menus only if we are
8983 running on Windows 9X/Me.
8984
42bf8205
AS
89852012-04-24 Andreas Schwab <schwab@linux-m68k.org>
8986
8987 * .gdbinit (xpr): Handle USE_2_TAGS_FOR_INTS.
8988 (xgetint): Add missing shift for LSB tags.
8989
b1bac16e
MR
89902012-04-24 Martin Rudalics <rudalics@gmx.at>
8991
8992 * keyboard.c (read_char): Don't wipe echo area for select window
8993 events: These might get delayed via `mouse-autoselect-window'
8994 (Bug#11304).
8995
d69621cc
JB
89962012-04-24 Juanma Barranquero <lekktu@gmail.com>
8997
8998 * gnutls.c (init_gnutls_functions): Protect against (unlikely)
8999 manipulation of :loaded-from data.
9000
02fd101b
JB
90012012-04-23 Juanma Barranquero <lekktu@gmail.com>
9002
9003 * gnutls.c (init_gnutls_functions): The value of :loaded-from is
9004 now a cons (bug#11311).
9005
888bec30
PE
90062012-04-23 Paul Eggert <eggert@cs.ucla.edu>
9007
89a438bd
PE
9008 Do not create empty overlays with the evaporate property (Bug#9642).
9009 * buffer.c (Fmove_overlay): Delete an evaporating overlay
9010 if it becomes empty after its bounds are adjusted to fit within
9011 its buffer. Without this fix, in a nonempty buffer (let ((o
9012 (make-overlay 1 2))) (overlay-put o 'evaporate t) (move-overlay o 0 1))
9013 yields an empty overlay that has the evaporate property, which is
9014 not supposed to happen.
9015
1068fe4d
PE
9016 Fix minor GTK3 problems found by static checking.
9017 * emacsgtkfixed.c (EMACS_TYPE_FIXED, EMACS_FIXED, EmacsFixed)
9018 (EmacsFixedPrivate, EmacsFixedClass, struct _EmacsFixed)
9019 (struct _EmacsFixedClass, emacs_fixed_get_type):
9020 Move decls here from emacsgtkfixed.h, since they needn't be public.
9021 (emacs_fixed_get_type): Now static.
9022 (emacs_fixed_class_init): Omit unused local.
9023 (emacs_fixed_child_type): Remove; unused.
9024 * emacsgtkfixed.h (EMACS_TYPE_FIXED, EMACS_FIXED, EmacsFixed)
9025 (EmacsFixedPrivate, EmacsFixedClass, struct _EmacsFixed)
9026 (struct _EmacsFixedClass): Move to emacsgtkfixed.c.
9027 (EMACS_FIXED_CLASS, EMACS_IS_FIXED, EMACS_IS_FIXED_CLASS)
9028 (EMACS_FIXED_GET_CLASS): Remove; unused.
9029 * gtkutil.c (xg_create_frame_widgets) [!HAVE_GTK3]: Omit unused local.
9030
888bec30
PE
9031 * keyboard.c (handle_async_input): Define only if SYNC_INPUT || SIGIO.
9032 Problem reported by Juanma Barranquero for Windows -Wunused-function.
9033
de85e130
PE
90342012-04-22 Paul Eggert <eggert@cs.ucla.edu>
9035
d0baac98 9036 Modernize and clean up gmalloc.c to assume C89 (Bug#9119).
bd7239f5 9037 * gmalloc.c (_MALLOC_INTERNAL, _MALLOC_H, _PP, __ptr_t)
d0baac98
PE
9038 (__malloc_size_t, __malloc_ptrdiff_t):
9039 Remove. All uses removed, replaced by the definiens if needed,
9040 since we can assume C89 or better now.
9041 Include <stdint.h>, for PTRDIFF_MAX, uintptr_t.
9042 (protect_malloc_state, align, get_contiguous_space)
9043 (malloc_atfork_handler_prepare, malloc_atfork_handler_parent)
9044 (malloc_atfork_handler_child, malloc_enable_thread)
9045 (malloc_initialize_1, __malloc_initialize, morecore_nolock)
9046 (_malloc_internal_nolock, _malloc_internal, malloc, _malloc)
9047 (_free, _realloc, _free_internal_nolock, _free_internal, free, cfree)
9048 (special_realloc, _realloc_internal_nolock, _realloc_internal)
9049 (realloc, calloc, __default_morecore, memalign, valloc, checkhdr)
9050 (freehook, mallochook, reallochook, mabort, mcheck, mprobe):
9051 Define using prototypes, not old style.
9052 (align, _malloc_internal_nolock, _free_internal_nolock, memalign):
9053 Don't assume ptrdiff_t and uintptr_t are no wider than unsigned long.
9054 (align): Don't assume that signed integer overflow wraps around.
9055 Omit unused local var.
9056 (malloc_initialize_1, morecore_nolock, _malloc_internal_nolock)
9057 (_free_internal_nolock, memalign, mallochook, reallochook):
9058 Omit no-longer-needed casts.
9059 (valloc): Use getpagesize, not __getpagesize.
9060 (MAGICWORD, MAGICFREE): Now randomish size_t values, not 32-bit.
9061 (struct hdr): The 'magic' member is now size_t, not unsigned long.
9062
de85e130
PE
9063 * dbusbind.c (XD_DBUS_VALIDATE_OBJECT): Define only if needed.
9064
dcbf5805
MA
90652012-04-22 Michael Albinus <michael.albinus@gmx.de>
9066
9067 Move functions from C to Lisp. Make non-blocking method calls
9068 the default. Implement further D-Bus standard interfaces.
9069
9070 * dbusbind.c (DBUS_NUM_MESSAGE_TYPES): Declare.
9071 (QCdbus_request_name_allow_replacement)
9072 (QCdbus_request_name_replace_existing)
9073 (QCdbus_request_name_do_not_queue)
9074 (QCdbus_request_name_reply_primary_owner)
9075 (QCdbus_request_name_reply_in_queue)
9076 (QCdbus_request_name_reply_exists)
9077 (QCdbus_request_name_reply_already_owner): Move to dbus.el.
9078 (QCdbus_registered_serial, QCdbus_registered_method)
9079 (QCdbus_registered_signal): New Lisp objects.
9080 (XD_DEBUG_MESSAGE): Use sizeof.
9081 (XD_MESSAGE_TYPE_TO_STRING, XD_OBJECT_TO_STRING)
9082 (XD_DBUS_VALIDATE_BUS_ADDRESS, XD_DBUS_VALIDATE_OBJECT)
9083 (XD_DBUS_VALIDATE_BUS_NAME, XD_DBUS_VALIDATE_PATH)
9084 (XD_DBUS_VALIDATE_INTERFACE, XD_DBUS_VALIDATE_MEMBER): New macros.
9085 (XD_CHECK_DBUS_SERIAL): Rename from CHECK_DBUS_SERIAL_GET_SERIAL.
9086 (xd_signature, xd_append_arg): Allow float for integer types.
9087 (xd_get_connection_references): New function.
b593d6a9
AH
9088 (xd_get_connection_address): Rename from xd_initialize.
9089 Return cached address.
dcbf5805
MA
9090 (xd_remove_watch): Do not unset $DBUS_SESSION_BUS_ADDRESS.
9091 (xd_close_bus): Rename from Fdbus_close_bus. Not needed on Lisp
9092 level.
9093 (Fdbus_init_bus): New optional arg PRIVATE. Cache address.
9a4b36f8 9094 Return number of refcounts.
dcbf5805
MA
9095 (Fdbus_get_unique_name): Make stronger parameter check.
9096 (Fdbus_message_internal): New defun.
9097 (Fdbus_call_method, Fdbus_call_method_asynchronously)
9098 (Fdbus_method_return_internal, Fdbus_method_error_internal)
9099 (Fdbus_send_signal, Fdbus_register_service)
9100 (Fdbus_register_signal, Fdbus_register_method): Move to dbus.el.
9101 (xd_read_message_1): Obey new structure of Vdbus_registered_objects.
9102 (xd_read_queued_messages): Obey new structure of Vdbus_registered_buses.
9103 (Vdbus_compiled_version, Vdbus_runtime_version)
9104 (Vdbus_message_type_invalid, Vdbus_message_type_method_call)
9105 (Vdbus_message_type_method_return, Vdbus_message_type_error)
9106 (Vdbus_message_type_signal): New defvars.
b593d6a9
AH
9107 (Vdbus_registered_buses, Vdbus_registered_objects_table):
9108 Adapt docstring.
dcbf5805 9109
52828e02
PE
91102012-04-22 Paul Eggert <eggert@cs.ucla.edu>
9111
da05bc4c
PE
9112 Fix GC_MALLOC_CHECK debugging output on 64-bit hosts.
9113 * alloc.c (emacs_blocked_malloc) [GC_MALLOC_CHECK]:
9114 Do not assume ptrdiff_t is the same width as 'int'.
9115
52828e02
PE
9116 * alloc.c: Handle unusual debugging option combinations.
9117 (GC_CHECK_MARKED_OBJECTS): Undef if ! GC_MARK_STACK,
9118 since the two debugging options are incompatible.
9119 (GC_MALLOC_CHECK): Similarly, undef if GC_CHECK_MARKED_OBJECTS
9120 is defined.
9121 (mem_init, mem_insert, mem_insert_fixup):
9122 Define if GC_MARK_STACK || GC_MALLOC_CHECK.
9123 (NEED_MEM_INSERT): Remove; no longer needed.
9124
f01769f9
LL
91252012-04-22 Leo Liu <sdl.web@gmail.com>
9126
9127 * sysdep.c (list_system_processes): Support Darwin (Bug#5725).
9128
5790543d
PE
91292012-04-22 Paul Eggert <eggert@cs.ucla.edu>
9130
9131 * sysdep.c [__FreeBSD__]: Minor cleanups.
9132 (list_system_processes, system_process_attributes) [__FreeBSD__]:
9133 Use Emacs indenting style more consistently. Avoid some casts.
9134 Use 'double' consistently rather than mixing 'float' and 'double'.
9135
b91b7e4d
EW
91362012-04-21 Eduard Wiebe <usenet@pusto.de>
9137
b593d6a9
AH
9138 * sysdep.c (list_system_processes, system_process_attributes):
9139 Add implementation for FreeBSD (Bug#5243).
b91b7e4d 9140
6114eb15
AS
91412012-04-21 Andreas Schwab <schwab@linux-m68k.org>
9142
9143 * lisp.mk (lisp): Update.
9144
2f38dff7
PE
91452012-04-20 Paul Eggert <eggert@cs.ucla.edu>
9146
9147 * keyboard.c (process_pending_signals): Define only if SYNC_INPUT.
9148 It is never used otherwise.
9149
4ae29f89
SM
91502012-04-20 Stefan Monnier <monnier@iro.umontreal.ca>
9151
9152 * print.c (print_preprocess): Only check print_depth if print-circle
9153 is nil.
9154 (print_object): Check for cycles even when print-circle is nil and
9155 print-gensym is t, but only check print_depth if print-circle is nil.
9156
f30d612a
CY
91572012-04-20 Chong Yidong <cyd@gnu.org>
9158
9159 * process.c (wait_reading_process_output): If EIO occurs on a pty,
9160 set the status to "failed" and ensure that sentinel is run.
9161
c07a4c0b 91622012-04-20 Glenn Morris <rgm@gnu.org>
016a35df
GM
9163
9164 * process.c (Fset_process_inherit_coding_system_flag)
9165 (Fset_process_query_on_exit_flag): Doc fix (mention return value).
4373fd43 9166 (Fmake_network_process, Fmake_serial_process): Doc fix.
016a35df 9167
c07a4c0b 91682012-04-20 Eli Zaretskii <eliz@gnu.org>
20a68157
EZ
9169
9170 * xdisp.c (string_buffer_position_lim): Limit starting position to
9171 BEGV.
9172 (set_cursor_from_row): If called for a mode-line or header-line
9173 row, return zero immediately.
9174 (try_cursor_movement): If inside continuation line, don't back up
4ae29f89
SM
9175 farther than the first row after the header line, if any.
9176 Don't consider the header-line row as "partially visible", even if
20a68157
EZ
9177 MATRIX_ROW_PARTIALLY_VISIBLE_P returns non-zero. (Bug#11261)
9178
c07a4c0b 91792012-04-20 Atsuo Ohki <ohki@gssm.otsuka.tsukuba.ac.jp> (tiny change)
ad3a2b41 9180
4ae29f89
SM
9181 * lread.c (lisp_file_lexically_bound_p): Fix hang at ";-*-\n"
9182 (bug#11238).
ad3a2b41 9183
c07a4c0b 91842012-04-20 Teodor Zlatanov <tzz@lifelogs.com>
6c94c34f 91852012-04-18 Paul Eggert <eggert@cs.ucla.edu>
ae6e112d
PE
9186
9187 configure: new option --enable-gcc-warnings (Bug#11207)
9188 * Makefile.in (C_WARNINGS_SWITCH): Remove.
9189 (WARN_CFLAGS, WERROR_CFLAGS): New macros.
9190 (ALL_CFLAGS): Use new macros rather than old.
9191 * process.c: Ignore -Wstrict-overflow to work around GCC bug 52904.
9192 * regex.c: Ignore -Wstrict-overflow. If !emacs, also ignore
9193 -Wunused-but-set-variable, -Wunused-function, -Wunused-macros,
9194 -Wunused-result, -Wunused-variable. This should go away once
9195 the Emacs and Gnulib regex code is merged.
9196 (xmalloc, xrealloc): Now static.
9197
aba027e8
PE
91982012-04-17 Paul Eggert <eggert@cs.ucla.edu>
9199
9200 * dired.c (Fsystem_groups): Remove unused local.
9201
e5a36063
GM
92022012-04-17 Glenn Morris <rgm@gnu.org>
9203
9204 * dired.c (Fsystem_users): Doc fix.
9205
316411f0
DA
92062012-04-17 Dmitry Antipov <dmantipov@yandex.ru>
9207
9208 * dired.c (Fsystem_users, Fsystem_groups): New functions. (Bug#7900)
9209 (syms_of_dired): Add them.
9210
9426aba4
PE
92112012-04-16 Paul Eggert <eggert@cs.ucla.edu>
9212
b62a57be
PE
9213 Fix minor alloc.c problems found by static checking.
9214 * alloc.c (_malloc_internal, _free_internal) [!DOUG_LEA_MALLOC]:
9215 New extern decls, to avoid calling undeclared functions.
9216 (dont_register_blocks): Define if ((!SYSTEM_MALLOC && !SYNC_INPUT)
9217 && GC_MALLOC_CHECK), not if ((GC_MARK_STACK || defined
9218 GC_MALLOC_CHECK) && GC_MALLOC_CHECK), to match when it's used.
9219 (NEED_MEM_INSERT): New macro.
9220 (mem_insert, mem_insert_fixup) [!NEED_MEM_INSERT]: Remove; unused.
4b5afbb0 9221 Remove one incorrect comment and fix another.
b62a57be 9222
3539f31f
PE
9223 Fix minor ralloc.c problems found by static checking.
9224 See http://lists.gnu.org/archive/html/emacs-devel/2011-12/msg00720.html
9225 * ralloc.c (ALIGNED, ROUND_TO_PAGE, HEAP_PTR_SIZE)
9226 (r_alloc_size_in_use, r_alloc_freeze, r_alloc_thaw): Remove; unused.
9227 (r_alloc_sbrk): Now static.
9228
a041960a
PE
9229 Improve ralloc.c interface checking.
9230 See http://lists.gnu.org/archive/html/emacs-devel/2011-12/msg00720.html
9231 * buffer.c (ralloc_reset_variable, r_alloc, r_re_alloc)
9232 (r_alloc_free) [REL_ALLOC]: Move decls from here ...
9233 * lisp.h (r_alloc, r_alloc_free, r_re_alloc, r_alloc_reset_variable)
9234 [REL_ALLOC]: ... to here, to check interface.
9235 * m/ia64.h (r_alloc, r_alloc_free) [REL_ALLOC && !_MALLOC_INTERNAL]:
9236 Remove decls. This fixes an "It stinks!".
9237
9426aba4
PE
9238 * alloc.c (which_symbols): Fix alignment issue / type clash.
9239
d55c12ed
AS
92402012-04-15 Andreas Schwab <schwab@linux-m68k.org>
9241
9242 * lisp.h (struct Lisp_Symbol): Remove explicit padding.
9243 (struct Lisp_Misc_Any): Likewise.
9244 (struct Lisp_Free): Likewise.
9245 * alloc.c (union aligned_Lisp_Symbol): Define.
9246 (SYMBOL_BLOCK_SIZE, struct symbol_block): Use union
9247 aligned_Lisp_Symbol instead of struct Lisp_Symbol.
9248 (union aligned_Lisp_Misc): Define.
9249 (MARKER_BLOCK_SIZE, struct marker_block): Use union
9250 aligned_Lisp_Misc instead of union Lisp_Misc.
4ae29f89 9251 (Fmake_symbol, allocate_misc, gc_sweep): Adjust.
d55c12ed 9252
b948ce8b
PE
92532012-04-14 Paul Eggert <eggert@cs.ucla.edu>
9254
9255 Make GC_MAKE_GCPROS_NOOPS the default (Bug#9926).
9256 * lisp.h (GC_MARK_STACK): Default to GC_MAKE_GCPROS_NOOPS.
9257 * s/cygwin.h, s/darwin.h, s/freebsd.h, s/gnu.h, s/irix6-5.h, s/msdos.h:
9258 * s/netbsd.h, s/sol2-6.h:
9259 Remove definition of GC_MARK_STACK, since the default now works.
9260 * s/aix4-2.h, s/hpux10-20.h, s/unixware.h:
9261 Define GC_MARK_STACK to GC_USE_GCPROS_AS_BEFORE, since that's
9262 no longer the default.
9263 * s/gnu-linux.h (GC_MARK_STACK): Adjust to change in default.
9264
35dc09a1 92652012-04-14 Atsuo Ohki <ohki@gssm.otsuka.tsukuba.ac.jp> (tiny change)
ad3a2b41 9266
35dc09a1
GM
9267 * lread.c (lisp_file_lexically_bound_p):
9268 Fix hang at ";-*-\n" (bug#11238).
ad3a2b41 9269
35dc09a1
GM
92702012-04-14 Eli Zaretskii <eliz@gnu.org>
9271
9272 * xdisp.c (find_last_unchanged_at_beg_row): Don't consider a row
9273 "unchanged" if its end.pos is beyond ZV. (Bug#11199)
9274
92752012-04-14 Jan Djärv <jan.h.d@swipnet.se>
9276
9277 * nsterm.m (constrainFrameRect): Always constrain when there is only
9278 one screen (Bug#10962).
9279
bcd86815
KB
92802012-04-13 Ken Brown <kbrown@cornell.edu>
9281
9282 * s/cygwin.h (PTY_OPEN): Don't try to close a bogus file descriptor.
9283
c25df26e
RT
92842012-04-13 Reuben Thomas <rrt@sc3d.org>
9285
9286 * indent.c (Fmove_to_column): Change interactive spec (Bug#739).
9287
0fc59f1e
DC
92882012-04-11 Daniel Colascione <dancol@dancol.org>
9289
9290 * s/cygwin.h: The vfork the #define in cygwin.h was protecting
9291 against is gone. It's better to use vfork now so that when Cygwin
9292 gains a new, working vfork, we use it automatically (bug#10398).
9293
de8c03dc
SM
92942012-04-11 Stefan Monnier <monnier@iro.umontreal.ca>
9295
9296 * window.c (save_window_save): Obey window-point-insertion-type.
9297
2f097256
GM
92982012-04-11 Glenn Morris <rgm@gnu.org>
9299
9300 * Makefile.in (GNUSTEP_CFLAGS): Rename from C_SWITCH_X_SYSTEM.
9301
453b951e
SM
93022012-04-11 Stefan Monnier <monnier@iro.umontreal.ca>
9303
9304 * alloc.c (lisp_align_malloc): Remove unneeded prototype.
9305
75f1671a 93062012-04-10 Jason S. Cornez <jcornez@ravenpack.com> (tiny change)
6bbef4e5
JC
9307
9308 * keyboard.c: Override inhibit-quit after the third C-g (bug#6585).
9309 (force_quit_count): New var.
9310 (handle_interrupt): Use it.
9311
2a8ce227
JB
93122012-04-10 Juanma Barranquero <lekktu@gmail.com>
9313
9314 * w32.c (w32_delayed_load): Record the full path of the library
9315 being loaded (bug#10424).
9316
935396c0
GM
93172012-04-09 Glenn Morris <rgm@gnu.org>
9318
05920a43
GM
9319 * doc.c (Fsnarf_documentation): Check variables, functions are bound,
9320 not just in the obarray, before snarfing them. (Bug#11036)
9321
935396c0
GM
9322 * Makefile.in ($(leimdir)/leim-list.el):
9323 Pass EMACS rather than BUILT_EMACS.
9324
a18ecafa
TZ
93252012-04-09 Teodor Zlatanov <tzz@lifelogs.com>
9326
9327 * process.c (make_process):
9328 * process.h: Add integer `gnutls_handshakes_tried' member to
9329 process struct.
9330
6bbef4e5
JC
9331 * gnutls.h: Add `GNUTLS_EMACS_HANDSHAKES_LIMIT' upper limit.
9332 Add convenience `GNUTLS_LOG2i' macro.
a18ecafa
TZ
9333
9334 * gnutls.c (gnutls_log_function2i): Convenience log function.
9335 (emacs_gnutls_read): Use new log functions,
9336 `gnutls_handshakes_tried' process member, and
9337 `GNUTLS_EMACS_HANDSHAKES_LIMIT' to limit the number of handshake
9338 attempts per process (connection).
9339
b4d3bc10
CY
93402012-04-09 Chong Yidong <cyd@gnu.org>
9341
9342 * eval.c (Fuser_variable_p, user_variable_p_eh)
9343 (lisp_indirect_variable): Functions deleted.
9344 (Fdefvar): Caller changed.
9345
9346 * callint.c (Finteractive, Fcall_interactively):
9347 * minibuf.c (Fread_variable): Callers changed.
9348
70f4d973
EZ
93492012-04-09 Eli Zaretskii <eliz@gnu.org>
9350
9351 * xdisp.c (set_cursor_from_row): If the display string appears in
9352 the buffer at position that is closer to point than the position
9353 after the display string, display the cursor on the first glyph of
9354 the display string. Fixes cursor display when a 'display' text
9355 property immediately follows invisible text. (Bug#11094)
9356
cb3c2e3e
PE
93572012-04-09 Paul Eggert <eggert@cs.ucla.edu>
9358
9359 composite.c: use 'double' consistently
9360 * composite.c (get_composition_id): Use 'double' consistently
9361 instead of converting 'float' to 'double' and vice versa; this is
9362 easier to understand and avoids a GCC warning.
9363
fd06db5d
GM
93642012-04-09 Glenn Morris <rgm@gnu.org>
9365
50fe702a
GM
9366 * Makefile.in: Generate leim-list with bootstrap-emacs, in
9367 preparation for dumping it with emacs. (Bug#4789)
9368 (leimdir): New variable.
9369 ($(leimdir)/leim-list.el): New rule.
9370 (emacs$(EXEEXT)): Depend on leim-list.el.
9371
fd06db5d
GM
9372 * buffer.c (Qucs_set_table_for_input): Remove. (Bug#9821)
9373 (Fget_buffer_create): Don't call Qucs_set_table_for_input.
9374 (init_buffer_once, syms_of_buffer): Remove Qucs_set_table_for_input.
9375
55c131ee
AS
93762012-04-08 Andreas Schwab <schwab@linux-m68k.org>
9377
9378 * lisp.h (struct Lisp_Symbol): Add explicit padding to ensure
9379 proper alignment.
9380
9209588f
JB
93812012-04-07 Juanma Barranquero <lekktu@gmail.com>
9382
9383 * xml.c (init_libxml2_functions) [WINDOWSNT]:
9384 Remove unused local variable.
9385
e3fb2efb
PE
93862012-04-07 Paul Eggert <eggert@cs.ucla.edu>
9387
9388 Avoid unnecessary pointer scanning in garbage collection (Bug#10780).
9389 * alloc.c (POINTERS_MIGHT_HIDE_IN_OBJECTS): New macro.
9390 (mark_memory): Mark Lisp_Objects only if pointers might hide in
9391 objects, as mark_maybe_pointer will catch them otherwise.
9392 (GC_LISP_OBJECT_ALIGNMENT): Remove; no longer needed.
9393 * s/gnu-linux.h (GC_LISP_OBJECT_ALIGNMENT) [__mc68000__]: Likewise.
9394
b5385551
PE
93952012-04-07 Paul Eggert <eggert@cs.ucla.edu>
9396
9397 Fix typo that broke non-Windows builds.
9398 * xml.c (libxml2_loaded_p) [!!WINDOWSNT]: 'inine' -> 'inline'.
9399
9078ead6
EZ
94002012-04-07 Eli Zaretskii <eliz@gnu.org>
9401
9402 Support building on MS-Windows with libxml2.
9403
9404 * makefile.w32-in (OBJ2): Add xml.$(O).
9405 (GLOBAL_SOURCES): Add xml.c.
9406 ($(BLD)/xml.$(O)): New dependency list.
9407
9408 * xml.c (DEF_XML2_FN, LOAD_XML2_FN) [WINDOWSNT]: New macros.
9409 (fn_htmlReadMemory, fn_xmlReadMemory, fn_xmlDocGetRootElement)
9410 (fn_xmlFreeDoc, fn_xmlCleanupParser, fn_xmlCheckVersion)
9411 [!WINDOWSNT]: New macros.
9412 (init_libxml2_functions, libxml2_loaded_p): New functions.
9413 (parse_region): Call fn_xmlCheckVersion instead of using the macro
9414 LIBXML_TEST_VERSION. Call libxml2 functions via the fn_* macros.
9415 (xml_cleanup_parser): New function, export for fn_xmlCleanupParser.
9416 Calls xmlCleanupParser only if libxml2 was loaded (or statically
9417 linked in).
6bbef4e5
JC
9418 (Flibxml_parse_html_region, Flibxml_parse_xml_region):
9419 Call init_libxml2_functions before calling libxml2 functions.
9078ead6
EZ
9420 (syms_of_xml) <Qlibxml2_dll>: DEFSYM it.
9421
9422 * emacs.c: Don't include libxml/parser.h.
9423 (shut_down_emacs): Call xml_cleanup_parser, instead of calling
9424 xmlCleanupParser directly.
9425
9426 * lisp.h [HAVE_LIBXML2]: Add prototype for xml_cleanup_parser.
9427
3811fdf3
EZ
94282012-04-07 Eli Zaretskii <eliz@gnu.org>
9429
9430 * indent.c (Fvertical_motion): If there is a display string at
9431 point, use it.vpos to compute how many lines to backtrack after
9432 move_it_to point. (Bug#11133)
9433
2f8e16b2
EZ
94342012-04-06 Eli Zaretskii <eliz@gnu.org>
9435
9436 * buffer.h (FETCH_CHAR, FETCH_MULTIBYTE_CHAR):
9437 * character.h (STRING_CHAR, STRING_CHAR_AND_LENGTH): Add comments
9438 about subtle differences between FETCH_CHAR* and STRING_CHAR*
9439 macros related to unification of CJK characters. For the details,
9440 see the discussion following the message here:
9441 http://debbugs.gnu.org/cgi/bugreport.cgi?bug=11073#14.
9442
3d439cd1
CY
94432012-04-04 Chong Yidong <cyd@gnu.org>
9444
9445 * keyboard.c (Vdelayed_warnings_list): Doc fix.
9446
8bc53d00
EZ
94472012-04-01 Eli Zaretskii <eliz@gnu.org>
9448
9449 * w32menu.c (simple_dialog_show, add_menu_item): Use SAFE_ALLOCA
9450 instead of alloca. (Bug#11138)
9451
3b0512a3
AS
94522012-04-01 Andreas Schwab <schwab@linux-m68k.org>
9453
9454 * w32menu.c (is_simple_dialog): Properly check lisp types.
9455 (Bug#11141)
9456
8427ddd2
EZ
94572012-03-31 Eli Zaretskii <eliz@gnu.org>
9458
979022ef
EZ
9459 * xdisp.c (move_it_by_lines): When DVPOS is positive, and the
9460 position we get to after a call to move_it_to fails the
9461 IS_POS_VALID_AFTER_MOVE_P test, move to the next buffer position
9462 only if we wind up in a string from display property. (Bug#11063)
9463
a6b1c7cc
EZ
9464 * window.c (Fdelete_other_windows_internal): Invalidate the row
9465 and column information about mouse highlight, so that redisplay
9466 restores it after reallocating the glyph matrices. (Bug#7464)
9467
8427ddd2
EZ
9468 * xdisp.c (set_cursor_from_row): If `cursor' property on a display
9469 string comes from a `display' text property, use the buffer
9470 position of that property as if we actually saw that position in
9471 the row's glyphs.
697ba24b
EZ
9472 (move_it_by_lines): Remove the assertion that
9473 "it->current_x == 0 && it->hpos == 0" which can be legitimately
9474 violated when there's a before-string at the beginning of a line.
9475 (Bug#11063)
8427ddd2 9476
65a0a738
EZ
94772012-03-30 Eli Zaretskii <eliz@gnu.org>
9478
9479 * xdisp.c (append_space_for_newline): If the default face was
9480 remapped, use the remapped face for the appended newline.
9481 (extend_face_to_end_of_line): Use the remapped default face for
9482 extending the face to the end of the line.
9483 (display_line): Call extend_face_to_end_of_line when the default
9484 face was remapped. (Bug#11068)
9485
581355cc
EZ
94862012-03-29 Eli Zaretskii <eliz@gnu.org>
9487
9488 * s/ms-w32.h: Discourage from defining HAVE_GETCWD.
9489
e8fc049f
SM
94902012-03-28 Stefan Monnier <monnier@iro.umontreal.ca>
9491
9492 * keyboard.c (safe_run_hooks_error): Don't unquote strings.
9493
4fb9a543
GM
94942012-03-27 Glenn Morris <rgm@gnu.org>
9495
9496 * search.c (Fword_search_backward_lax, Fword_search_forward_lax):
9497 Doc fixes.
9498
679910f1
KH
94992012-03-26 Kenichi Handa <handa@m17n.org>
9500
9501 * dispextern.h (struct glyph): Fix previous change. Change the
9502 bit length of glyphless.ch to 25 (Bug#11082).
9503
90d49b7f
CY
95042012-03-26 Chong Yidong <cyd@gnu.org>
9505
9506 * keyboard.c (Vselection_inhibit_update_commands): New variable.
9507 (command_loop_1): Use it; inhibit selection update for
9508 handle-select-window too (Bug#8996).
9509
f514f6f0
FP
95102012-03-25 Fabrice Popineau <fabrice.popineau@supelec.fr>
9511
e8fc049f 9512 * w32heap.c (_heap_init, _heap_term): Remove dead MSVC-specific code.
f514f6f0 9513
bf43fa51
KH
95142012-03-25 Kenichi Handa <handa@m17n.org>
9515
9516 * dispextern.h (struct glyph): Change the bit length of
9517 glyphless.ch to 22 to make the member glyphless fit in 32 bits.
9518
8a0c01dd
EZ
95192012-03-24 Eli Zaretskii <eliz@gnu.org>
9520
9521 * s/ms-w32.h (tzname): Include time.h before redirecting to
9522 _tzname. Fixes the MSVC build. (Bug#9960)
9523
7d1c3a76
AS
95242012-03-24 Andreas Schwab <schwab@linux-m68k.org>
9525
8ed79523
AS
9526 * xdisp.c (produce_glyphless_glyph): Limit length of acronym to 6
9527 characters.
9528
7d1c3a76
AS
9529 * xterm.c (XTread_socket): Only modify handling_signal if
9530 !SYNC_INPUT. (Bug#11080)
9531
e99a9b8b
EZ
95322012-03-23 Eli Zaretskii <eliz@gnu.org>
9533
9534 * bidi.c (bidi_fetch_char): Use STRING_CHAR_AND_LENGTH instead of
9535 FETCH_MULTIBYTE_CHAR followed by CHAR_BYTES. Prevents crashes
9536 when fetching a multibyte character consumes more bytes than
9537 CHAR_BYTES returns, due to unification of CJK characters in
9538 string_char. (Bug#11073)
9539
5063c0e1
TN
95402012-03-23 Troels Nielsen <bn.troels@gmail.com> (tiny change)
9541
9542 * process.c (wait_reading_process_output): Handle pty disconnect
9543 by refraining from sending oneself a SIGCHLD (bug#10933).
9544
9f851fbd
CY
95452012-03-22 Chong Yidong <cyd@gnu.org>
9546
9547 * dispextern.h (struct it): New member string_from_prefix_prop_p.
9548
5063c0e1 9549 * xdisp.c (push_prefix_prop): Rename from push_display_prop.
9f851fbd
CY
9550 Mark string as coming from a prefix property.
9551 (handle_face_prop): Use default face for prefix strings (Bug#4281).
9552 (pop_it, reseat_1): Save and restore string_from_prefix_prop_p.
9553
fb5b8aca
CY
95542012-03-21 Chong Yidong <cyd@gnu.org>
9555
9556 * xfaces.c (Vface_remapping_alist): Doc fix.
9557
62356a1b
EZ
95582012-03-20 Eli Zaretskii <eliz@gnu.org>
9559
9560 * w32proc.c (Fw32_set_console_codepage)
5063c0e1
TN
9561 (Fw32_set_console_output_codepage, Fw32_get_codepage_charset):
9562 Doc fixes.
62356a1b 9563
025de85b
CY
95642012-03-20 Chong Yidong <cyd@gnu.org>
9565
9566 * dispnew.c (Fredisplay, Vredisplay_preemption_period): Update doc
9567 to reflect default non-nil value of redisplay-dont-pause.
9568
4827f94e
KH
95692012-03-19 Kenichi Handa <handa@m17n.org>
9570
9571 * ftfont.c (ftfont_drive_otf): Mask bits of character code to make
9572 it fit in a valid range (Bug#11003).
9573
e50a24a2
EZ
95742012-03-18 Eli Zaretskii <eliz@gnu.org>
9575
9576 * xdisp.c (cursor_row_p): Even if the glyph row ends in a string
9577 that is not from display property, accept the row as a "cursor
9578 row" if one of the string's character has a non-nil `cursor'
9579 property. Fixes cursor positioning when there are newlines in
9580 overlay strings, e.g. in icomplete.el. (Bug#11035)
9581
9af5ed87
PE
95822012-03-12 Paul Eggert <eggert@cs.ucla.edu>
9583
9584 * buffer.c (compare_overlays): Don't assume args differ (Bug#6830).
9585
d1f55f16
CY
95862012-03-12 Chong Yidong <cyd@gnu.org>
9587
9588 * eval.c (inhibit_lisp_code): Rename from
9589 inhibit_window_configuration_change_hook; move from window.c.
9590
9591 * xfns.c (unwind_create_frame_1, Fx_create_frame):
9592 * window.c (run_window_configuration_change_hook)
9593 (syms_of_window): Callers changed.
9594
66c5eebd
CY
95952012-03-11 Chong Yidong <cyd@gnu.org>
9596
413df973
CY
9597 * keymap.c (Fkey_description): Doc fix (Bug#9700).
9598
66c5eebd
CY
9599 * editfns.c (Fconstrain_to_field): Doc fix (Bug#9452).
9600
1de11f56
CY
96012012-03-10 Chong Yidong <cyd@gnu.org>
9602
9603 * frame.c (other_visible_frames): Don't assume the selected frame
9604 is visible (Bug#10955).
9605
cae07000
SM
96062012-03-09 Stefan Monnier <monnier@iro.umontreal.ca>
9607
9608 * buffer.c (compare_overlays): Avoid qsort's instability (bug#6830).
9609
89c94350
JD
96102012-03-08 Jan Djärv <jan.h.d@swipnet.se>
9611
9612 * gtkutil.c (x_wm_set_size_hint): Use one row in call to
9613 FRAME_TEXT_LINES_TO_PIXEL_HEIGHT so base_height is greater than
9614 zero (Bug#10954).
9615
999dd333
GM
96162012-03-03 Glenn Morris <rgm@gnu.org>
9617
01a6dcc8 9618 * alloc.c (Fgarbage_collect, misc-objects-consed): Doc fixes.
999dd333 9619
de0100f2
EZ
96202012-03-02 Eli Zaretskii <eliz@gnu.org>
9621
9622 * xdisp.c (try_window_reusing_current_matrix): Don't move cursor
9623 position past the first glyph_row that ends at ZV. (Bug#10902)
b8456c5c
EZ
9624 (redisplay_window, next_element_from_string): Fix typos in
9625 comments.
3e441275
EZ
9626 (redisplay_window): Pass to move_it_vertically the margin in
9627 pixels, not in screen lines.
de0100f2 9628
96a72ee9
GM
96292012-03-02 Glenn Morris <rgm@gnu.org>
9630
9631 * buffer.c (buffer-list-update-hook): Doc fix.
9632
312508d7
EZ
96332012-02-29 Eli Zaretskii <eliz@gnu.org>
9634
9635 * xdisp.c (get_overlay_strings_1): Under bidi redisplay, call
9636 push_it before setting up the iterator for the first overlay
9637 string, even if we have an empty string loaded.
9638 (next_overlay_string): If there's an empty string on the iterator
9639 stack, pop the stack. (Bug#10903)
9640
27f3c637
PE
96412012-02-25 Paul Eggert <eggert@cs.ucla.edu>
9642
9643 Generalize fix for crash due to non-contiguous EMACS_INT (Bug#10780).
9644 Suggested by Stefan Monnier in
9645 <http://lists.gnu.org/archive/html/emacs-devel/2012-02/msg00692.html>.
9646 * alloc.c (widen_to_Lisp_Object): New static function.
9647 (mark_memory): Also mark Lisp_Objects by fetching pointer words
9648 and widening them to Lisp_Objects. This would work even if
9649 USE_LSB_TAG is defined and wide integers are used, which might
9650 happen in a future version of Emacs.
9651
3c9dfce6
CY
96522012-02-25 Chong Yidong <cyd@gnu.org>
9653
fa74b241
CY
9654 * fileio.c (Ffile_selinux_context, Fset_file_selinux_context):
9655 Doc fix.
9656
3c9dfce6
CY
9657 * xselect.c (Fx_selection_exists_p): Doc fix.
9658 (x_clipboard_manager_save_all): Print an informative message
9659 before saving to clipboard manager.
9660
9486df08
CY
96612012-02-24 Chong Yidong <cyd@gnu.org>
9662
9663 * keyboard.c (process_special_events): Handle all X selection
9664 requests in kbd_buffer, not just the next one (Bug#8869).
9665
f01d3321
CY
96662012-02-23 Chong Yidong <cyd@gnu.org>
9667
9668 * xfns.c (Fx_create_frame): Avoid window-configuration-change-hook
9669 call when setting menu-bar-lines and tool-bar-lines parameters.
9670 (unwind_create_frame_1): New helper function.
9671
9672 * window.c (inhibit_window_configuration_change_hook): New var.
9673 (run_window_configuration_change_hook): Obey it.
b2e4ca7d 9674 (syms_of_window): Initialize it.
f01d3321 9675
86b847b6
CY
96762012-02-22 Chong Yidong <cyd@gnu.org>
9677
9678 * xterm.c (x_draw_image_relief): Add missing type check for
9679 Vtool_bar_button_margin (Bug#10743).
9680
a59225b1
CY
96812012-02-21 Chong Yidong <cyd@gnu.org>
9682
9683 * fileio.c (Vfile_name_handler_alist): Doc fix.
9684
9685 * buffer.c (Fget_file_buffer): Protect against invalid file
9686 handler return value.
9687
310f5bd4
PE
96882012-02-20 Paul Eggert <eggert@cs.ucla.edu>
9689
cb3a28cc
PE
9690 * .gdbinit (xreload): Don't assume EMACS_INT fits in 'long'
9691 when computing $valmask.
9692
310f5bd4
PE
9693 Fix crash due to non-contiguous EMACS_INT (Bug#10780).
9694 * lisp.h (VALBITS): Move definition up, so that USE_LSB_TAG can use it.
9695 (USE_LSB_TAG): Do not define if UINTPTR_MAX >> VALBITS == 0.
9696 It's useless in that case, and it can cause problems on hosts
9697 that allocate halves of EMACS_INT values separately.
9698 Reported by Dan Horák. Diagnosed by Andreas Schwab in
9699 <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=10780#30>.
9700 * mem-limits.h (EXCEEDS_LISP_PTR): Define to 0 on hosts where
9701 UINTPTR_MAX >> VALBITS == 0. This is required by the above change;
9702 it avoids undefined behavior on hosts where shifting right by more
9703 than the word width has undefined behavior.
9704
2375c96a
CY
97052012-02-19 Chong Yidong <cyd@gnu.org>
9706
9707 * fileio.c (Ffile_name_directory, Ffile_name_nondirectory)
9708 (Funhandled_file_name_directory, Ffile_name_as_directory)
9709 (Fdirectory_file_name, Fexpand_file_name)
9710 (Fsubstitute_in_file_name): Protect against invalid file handler
9711 return values (Bug#10845).
9712
3eb49e71
EZ
97132012-02-18 Eli Zaretskii <eliz@gnu.org>
9714
9715 * .gdbinit (pitx): Fix incorrect references to fields of the
9716 iterator stack.
9717
7b926f3f
CY
97182012-02-17 Chong Yidong <cyd@gnu.org>
9719
9720 * syntax.c (Fscan_lists): Doc fix (Bug#10833).
9721
11273115
PE
97222012-02-15 Paul Eggert <eggert@cs.ucla.edu>
9723
9724 * image.c (MAX_IMAGE_SIZE): Increase from 6.0 to 10.0; see
9725 <http://lists.gnu.org/archive/html/emacs-devel/2012-02/msg00540.html>.
9726
c3a70e2b
CY
97272012-02-15 Chong Yidong <cyd@gnu.org>
9728
9729 * eval.c (Fdefvar, Fdefconst): Doc fix; note that the variable is
9730 marked as special. Also, starting docstrings with * is obsolete.
9731
0ca43699
AS
97322012-02-13 Andreas Schwab <schwab@linux-m68k.org>
9733
9734 * gnutls.c (emacs_gnutls_write): Fix last change.
9735
2e8f3c56
LI
97362012-02-13 Lars Ingebrigtsen <larsi@gnus.org>
9737
9738 * gnutls.c (emacs_gnutls_write): Set errno appropriately for
9739 send_process.
9740
af70074f
SM
97412012-02-13 Stefan Monnier <monnier@iro.umontreal.ca>
9742
9743 * keymap.c (Fsingle_key_description): Handle char ranges.
9744
95986d52
CY
97452012-02-12 Chong Yidong <cyd@gnu.org>
9746
afd83bd1
CY
9747 * xdisp.c (handle_stop): Avoid assigning -1 to it->face_id here,
9748 as that creates a dangerous corner case.
9749
95986d52
CY
9750 * window.c (Fdelete_window_internal): Invalidate the mouse
9751 highlight (Bug#9904).
9752
bd7da63e
GM
97532012-02-12 Glenn Morris <rgm@gnu.org>
9754
9755 * xselect.c (Fx_own_selection_internal)
9756 (Fx_get_selection_internal, Fx_disown_selection_internal)
9757 (Fx_selection_owner_p, Fx_selection_exists_p): Doc fixes.
9758 * nsselect.m (Fx_own_selection_internal)
9759 (Fx_disown_selection_internal, Fx_selection_exists_p)
9760 (Fx_selection_owner_p, Fx_get_selection_internal):
9761 Sync docs and argument specs with the xselect.c versions.
9762
77abcbc2
LI
97632012-02-11 Lars Ingebrigtsen <larsi@gnus.org>
9764
9765 * gnutls.c (emacs_gnutls_write): Don't infloop if sendto fails.
9766
90b671e2
EZ
97672012-02-11 Eli Zaretskii <eliz@gnu.org>
9768
1c0ca0b7
EZ
9769 * w32select.c (Fx_selection_exists_p): Sync doc string and
9770 argument list with xselect.c. (Bug#10783)
9771
9772 * w16select.c (Fx_selection_exists_p): Sync doc string and
9773 argument list with xselect.c. (Bug#10783)
90b671e2 9774
49241268
GM
97752012-02-10 Glenn Morris <rgm@gnu.org>
9776
9777 * fns.c (Fsecure_hash): Doc fix.
9778
f998bbe7 97792012-02-09 Kenichi Handa <handa@m17n.org>
5c1ca13d
KH
9780
9781 * coding.c (produce_chars): Fix updating of src_end (Bug#10701).
9782
0992bd9c
CY
97832012-02-07 Chong Yidong <cyd@gnu.org>
9784
9785 * buffer.c (Fbuffer_local_variables)
9786 (buffer_lisp_local_variables): Handle unbound vars correctly;
9787 don't let Qunbound leak into Lisp.
9788
af008560
GM
97892012-02-07 Glenn Morris <rgm@gnu.org>
9790
dd605cc4
GM
9791 * image.c (Fimagemagick_types): Doc fix.
9792
af008560
GM
9793 * image.c (imagemagick-render-type): Change it from a lisp object
9794 to an integer. Move the doc here from the lisp manual.
9795 Treat all values not equal to 0 the same.
9796
1449fa1d
CY
97972012-02-06 Chong Yidong <cyd@gnu.org>
9798
9799 * doc.c (store_function_docstring): Avoid applying docstring of
9800 alias to base function (Bug#2603).
9801
3723ec07
AS
98022012-02-04 Andreas Schwab <schwab@linux-m68k.org>
9803
9804 * .gdbinit (pp1, pv1): Remove redundant defines.
9805 (pr): Use pp.
9806
79c1cc1e
CY
98072012-02-04 Chong Yidong <cyd@gnu.org>
9808
9809 * nsterm.m: Declare a global (Bug#10694).
9810
d7f29f8e
EZ
98112012-02-04 Eli Zaretskii <eliz@gnu.org>
9812
cae07000
SM
9813 * w32.c (get_emacs_configuration_options):
9814 Include --enable-checking, if specified, in the return value.
d7f29f8e 9815
3b95a6f9
MR
98162012-02-04 Martin Rudalics <rudalics@gmx.at>
9817
9818 * dispnew.c (change_frame_size_1): Calculate new_frame_total_cols
9819 after rounding frame sizes. (Bug#9723)
9820
d6fa96a6
EZ
98212012-02-04 Eli Zaretskii <eliz@gnu.org>
9822
9823 * keyboard.c (adjust_point_for_property): Don't position point
9824 before BEGV. (Bug#10696)
9825
df0b2940
PE
98262012-02-03 Paul Eggert <eggert@cs.ucla.edu>
9827
9828 Handle overflow when computing char display width (Bug#9496).
9829 * character.c (char_width): Return EMACS_INT, not int.
9830 (char_width, c_string_width): Check for overflow when
9831 computing the width; this is possible now that individual
9832 characters can have unbounded width. Problem introduced
9833 by merge from Emacs 23 on 2012-01-19.
9834
6bee44d6
MA
98352012-02-02 Michael Albinus <michael.albinus@gmx.de>
9836
9837 * dbusbind.c (Fdbus_register_method): Mention the return value
9838 :ignore in the docstring.
9839
44f92739
GM
98402012-02-02 Glenn Morris <rgm@gnu.org>
9841
1b9f60cc
GM
9842 * callproc.c (Fcall_process, Fcall_process_region): Doc fix.
9843
44f92739
GM
9844 * nsterm.m (syms_of_nsterm) <x-toolkit-scroll-bars>:
9845 Unconditionally set to t. (Bug#10673)
9846 * nsterm.m (syms_of_nsterm) <x-toolkit-scroll-bars>:
9847 * w32term.c (syms_of_w32term) <x-toolkit-scroll-bars>:
9848 * xterm.c (syms_of_xterm) <x-toolkit-scroll-bars>: Doc fix.
9849
c5d3843c
KH
98502012-02-02 Kenichi Handa <handa@m17n.org>
9851
9852 (x_produce_glyphs): Cancel previous change. If cmp->glyph_len is
9853 0, do not call append_composite_glyph.
9854
159462d4 98552012-02-02 Kenichi Handa <handa@m17n.org>
d2a51fd7
KH
9856
9857 * xdisp.c (BUILD_COMPOSITE_GLYPH_STRING): Initialize first_s to
9858 NULL (Bug#6988).
9859 (x_produce_glyphs): If the component of a composition is a null
9860 string, set it->pixel_width to 1 to avoid zero-width glyph.
9861
78cef877
EZ
98622012-02-01 Eli Zaretskii <eliz@gnu.org>
9863
9864 * ralloc.c (resize_bloc, r_alloc_sbrk): Don't call memmove if its
9865 first 2 arguments are identical. This makes inserting large
9866 output from a subprocess an order of magnitude faster on
9867 MS-Windows, where all sbrk'ed memory is always contiguous.
9868
97897668
GM
98692012-01-31 Glenn Morris <rgm@gnu.org>
9870
9871 * nsterm.m (syms_of_nsterm) <x-toolkit-scroll-bars>:
c78c6e0b 9872 * w32term.c (syms_of_w32term) <x-toolkit-scroll-bars>:
97897668
GM
9873 * xterm.c (syms_of_xterm) <x-toolkit-scroll-bars>: Sync docs.
9874
31fd3586
GM
98752012-01-29 Glenn Morris <rgm@gnu.org>
9876
9877 * gnutls.c (syms_of_gnutls): More doc (from etc/NEWS).
9878
0e24a8b2
CY
98792012-01-28 Samuel Thibault <sthibault@debian.org> (tiny change)
9880
9881 * s/gnu.h: Define POSIX_SIGNALS (Bug#10552).
9882
cc0adcb0
CY
98832012-01-28 Chong Yidong <cyd@gnu.org>
9884
9885 * minibuf.c (syms_of_minibuf): Doc fix (Bug#10550).
9886
acc28cb9
CY
98872012-01-26 Chong Yidong <cyd@gnu.org>
9888
9c69cfb7
CY
9889 * keyboard.c (Vecho_keystrokes): Document zero value (Bug#10503).
9890
acc28cb9
CY
9891 * search.c (Fsearch_forward, Fsearch_backward): Document negative
9892 repeat counts (Bug#10507).
9893
48da7392
GM
98942012-01-26 Glenn Morris <rgm@gnu.org>
9895
9896 * lread.c (syms_of_lread): Doc fix.
9897
14af5f7f
CY
98982012-01-25 HIROSHI OOTA <nil@mad.dog.cx> (tiny change)
9899
9900 * coding.c (encode_designation_at_bol): Change return value to
9901 EMACS_INT.
9902
0b21c100
CY
99032012-01-25 Chong Yidong <cyd@gnu.org>
9904
9905 * eval.c (Fuser_variable_p): Doc fix; mention custom-variable-p.
9906
3c2907f7
CY
99072012-01-21 Chong Yidong <cyd@gnu.org>
9908
9909 * floatfns.c (Fcopysign): Make the second argument non-optional,
9910 since nil is not allowed anyway.
9911
959ad23f
AS
99122012-01-21 Andreas Schwab <schwab@linux-m68k.org>
9913
9914 * process.c (read_process_output): Use p instead of XPROCESS (proc).
9915 (send_process): Likewise.
9916
34a02f46
MR
99172012-01-19 Martin Rudalics <rudalics@gmx.at>
9918
9919 * window.c (save_window_save, Fcurrent_window_configuration)
cae07000
SM
9920 (Vwindow_persistent_parameters): Do not use Qstate.
9921 Rewrite doc-strings.
34a02f46 9922
1259009a 99232012-01-19 Kenichi Handa <handa@m17n.org>
25ed9e61
KH
9924
9925 * character.c (char_width): New function.
70d4fdf6
GM
9926 (Fchar_width, c_string_width, lisp_string_width):
9927 Use char_width (Bug#9496).
25ed9e61 9928
6a6ee00d
MR
99292012-01-16 Martin Rudalics <rudalics@gmx.at>
9930
9931 * window.c (Vwindow_persistent_parameters): New variable.
9932 (Fset_window_configuration, save_window_save): Handle persistent
9933 window parameters.
9934
c85efaf7
EZ
99352012-01-14 Eli Zaretskii <eliz@gnu.org>
9936
9937 * w32fns.c (signal_user_input): Don't do a QUIT, to avoid
9938 thrashing the stack of the thread. (Bug#9087)
9939
5944709e
PE
99402012-01-12 Paul Eggert <eggert@cs.ucla.edu>
9941
9942 * xdisp.c (rows_from_pos_range): Add parens as per gcc -Wparentheses.
9943
e71f5d99
EZ
99442012-01-11 Eli Zaretskii <eliz@gnu.org>
9945
9946 * xdisp.c (rows_from_pos_range): Handle the case where the
9947 highlight ends on a newline. (Bug#10464)
9948 (mouse_face_from_buffer_pos): Fix off-by-one error in calculating
9949 he end column for display of highlight that ends on a newline
9950 before a R2L line.
9951
ce316182
GM
99522012-01-11 Glenn Morris <rgm@gnu.org>
9953
9954 * lread.c (init_lread): If no-site-lisp, remove site-lisp dirs
9955 from load-path also when installation-directory is nil. (Bug#10208)
9956
5b43da69
GM
99572012-01-10 Glenn Morris <rgm@gnu.org>
9958
74cc8ff9
GM
9959 * emacs.c (syms_of_emacs) <installation-directory>: Doc fix.
9960
7d8d6e4e
GM
9961 * epaths.in (PATH_LOADSEARCH, PATH_EXEC, PATH_DATA, PATH_DOC):
9962 Update template values to be closer to their typical values these days.
5b43da69 9963
a0db8d43
EZ
99642012-01-09 Eli Zaretskii <eliz@gnu.org>
9965
9966 * xdisp.c (rows_from_pos_range): Accept additional argument
9967 DISP_STRING, and accept any glyph in a row whose object is that
9968 string as eligible for mouse highlight. Fixes mouse highlight of
9969 display strings from overlays. (Bug#10464)
9970
9a0115ab 99712012-01-07 Paul Eggert <eggert@cs.ucla.edu>
09450bae 9972
b9110d6a 9973 emacs: fix an auto-save permissions race condition (Bug#10400)
09450bae
PE
9974 * fileio.c (auto_saving_dir_umask): New static var.
9975 (Fmake_directory_internal): Use it.
9976 (do_auto_save_make_dir): Set it, instead of invoking chmod after
9977 creating the directory. The old code temporarily assigns
9978 too-generous permissions to the directory.
9979 (do_auto_save_eh): Clear it.
b9110d6a 9980 (Fdo_auto_save): Catch all errors, not just file errors, so
09450bae
PE
9981 that the var is always cleared.
9982
6c1bd3f3
EZ
99832012-01-07 Eli Zaretskii <eliz@gnu.org>
9984
9985 * search.c (scan_buffer): Pass character positions to
9986 know_region_cache, not byte positions. (Bug#6540)
9987
069d2b50
L
99882012-01-07 LynX <_LynX@bk.ru> (tiny change)
9989
9990 * w32.c (sys_rename): Report EXDEV when rename of a directory
9991 fails because the target is on another logical disk. (Bug#10284)
9992
75bf0d33
DB
99932012-01-07 David Benjamin <davidben@mit.edu> (tiny change)
9994
9995 * xterm.c (x_embed_request_focus): New function.
9996
9997 * xterm.h: Add prototype.
9998
9999 * xfns.c (Fx_focus_frame): Use it for embedded frames (Bug#9977).
10000
1c6e5a32
GM
100012012-01-05 Glenn Morris <rgm@gnu.org>
10002
10003 * emacs.c (emacs_copyright): Update short copyright year to 2012.
10004
651e947e
EZ
100052012-01-01 Eli Zaretskii <eliz@gnu.org>
10006
10007 * gnutls.c (init_gnutls_functions): Load gnutls_check_version.
10008 Load gnutls_transport_set_lowat only if GnuTLS version is below
10009 2.11.1.
10010 (emacs_gnutls_handshake): Call gnutls_transport_set_lowat only for
10011 GnuTLS versions below 2.11.1.
10012
3778cdd8
AL
100132011-12-31 Antoine Levitt <antoine.levitt@gmail.com>
10014
10015 * xdisp.c (syms_of_xdisp) <window-scroll-functions>: Add warning
10016 to the doc string advising against its use for altering the way
10017 windows are scrolled.
10018
0e5317f7
KH
100192011-12-28 Kenichi Handa <handa@m17n.org>
10020
10021 * coding.c (Fdefine_coding_system_internal): Make an utf-8 base
10022 coding-system ASCII compatible only when it does not produce BOM
10023 on encoding (Bug#10383).
10024
93d5ca1f
JD
100252011-12-26 Jan Djärv <jan.h.d@swipnet.se>
10026
10027 * xmenu.c (x_menu_wait_for_event): Use xg_select for Gtk3 so menus
10028 can scroll.
10029 (create_and_show_popup_menu): Always use menu_position_func for
10030 Gtk3 (Bug#10361).
10031
ca22b785
AS
100322011-12-24 Andreas Schwab <schwab@linux-m68k.org>
10033
10034 * callint.c (Fcall_interactively): Don't truncate prompt string.
10035
d048e1e6
EZ
100362011-12-23 Eli Zaretskii <eliz@gnu.org>
10037
10038 * xdisp.c (handle_invisible_prop): Handle correctly an invisible
10039 property that ends at ZV, so that the bidi iteration could be
3ba1a2ad 10040 resumed from there (after widening). (Bug#10360)
d048e1e6 10041
5ccaba1f
JD
100422011-12-22 Jan Djärv <jan.h.d@swipnet.se>
10043
10044 * nsfont.m (ns_spec_to_descriptor): Do not autorelease fdesc.
10045
204ee57f
JD
100462011-12-21 Jan Djärv <jan.h.d@swipnet.se>
10047
b81d40f0
JB
10048 * nsterm.m (x_free_frame_resources):
10049 Release f->output_data.ns->miniimage.
204ee57f
JD
10050 (ns_index_color): Fix indentation. Do not retain
10051 color_table->colors[i].
10052
10053 * nsmenu.m (ns_update_menubar): Call free_menubar_widget_value_tree
10054 before returning.
10055
10056 * nsfns.m (x_set_background_color): Assign return value from
10057 ns_index_color to face-background instead of NSColor*.
10058 (ns_implicitly_set_icon_type): Fix indentation.
10059 Change assignment in for loop to comparison.
10060
10061 * emacs.c (ns_pool): New variable.
10062 (main): Assign ns_pool.
10063 (Fkill_emacs): Call ns_release_autorelease_pool.
10064
10065 * nsfont.m (ns_spec_to_descriptor): Fix indentation,
10066 autorelease fdesc, release fdAttrs and tdict.
10067 (ns_get_covering_families): Release charset.
10068 (ns_findfonts): Release NSFontDescriptor created with new.
10069 (ns_uni_to_glyphs): Fix indentation.
10070 (setString): Release attrStr before assigning new value.
10071
c803b2b7
JD
100722011-12-18 Jan Djärv <jan.h.d@swipnet.se>
10073
678f4426
JD
10074 * nsmenu.m (NSMenuDidBeginTrackingNotification): Declare if OSX < 10.5
10075 and NS_IMPL_COCOA.
10076 (trackingNotification): Surround with ifdef NS_IMPL_COCOA.
10077 (syms_of_nsmenu): Set trackingMenu to 1 if not NS_IMPL_COCOA.
10078
cd394be1 100792011-12-18 David Reitter <reitter@cmu.edu>
678f4426 10080
5fecd5fc
JD
10081 * nsterm.m (ns_term_init): Subscribe for notifications
10082 NSMenuDidBeginTrackingNotification and NSMenuDidEndTrackingNotification
10083 to method trackingNotification in EmacsMenu.
10084
10085 * nsmenu.m (trackingMenu): New variable.
3771cb17 10086 (trackingNotification): New method (from Aquamacs).
5fecd5fc 10087 (menuNeedsUpdate): Expand comment and return if trackingMenu is 0,
3771cb17 10088 from Aquamacs (Bug#7030).
678f4426
JD
10089
100902011-12-18 Jan Djärv <jan.h.d@swipnet.se>
5fecd5fc 10091
c803b2b7
JD
10092 * nsselect.m (CUT_BUFFER_SUPPORT): Remove define.
10093 (symbol_to_nsstring): Fix indentation.
10094 (ns_symbol_to_pb): New function.
cae07000
SM
10095 (Fns_get_selection_internal): Rename from Fns_get_cut_buffer_internal.
10096 (Fns_rotate_cut_buffers_internal): Remove.
10097 (Fns_store_selection_internal): Rename from
c803b2b7
JD
10098 Fns_store_cut_buffer_internal.
10099 (ns_get_foreign_selection, Fx_own_selection_internal)
10100 (Fx_disown_selection_internal, Fx_selection_exists_p)
b81d40f0
JB
10101 (Fns_get_selection_internal, Fns_store_selection_internal):
10102 Use ns_symbol_to_pb and check if return value is nil.
10103 (syms_of_nsselect): Remove ifdef CUT_BUFFER_SUPPORT. Remove defsubr
10104 Sns_rotate_cut_buffers_internal. Sns_get_cut_buffer_internal
c803b2b7
JD
10105 renamed to Sns_get_selection_internal, Sns_store_cut_buffer_internal
10106 renamed to Sns_store_selection_internal.
10107 (ns_handle_selection_request): Move code to Fx_own_selection_internal
10108 and remove this function.
10109 (ns_handle_selection_clear): Remove, never used.
10110 (Fx_own_selection_internal): Move code from ns_handle_selection_request
10111 here.
10112
e1b01a3a
KB
101132011-12-17 Ken Brown <kbrown@cornell.edu>
10114
10115 * fileio.c (check_writable) [CYGWIN]: Return non-zero if UID or
10116 GID is unknown (Bug#10257).
10117
2adb6e85
PE
101182011-12-17 Paul Eggert <eggert@cs.ucla.edu>
10119
10120 * s/gnu-linux.h: Fix mark_memory typo (Bug#10286).
10121 (GC_MARK_SECONDARY_STACK): Omit removed 3rd arg to mark_memory,
10122 which caused a build failure on GNU/Linux IA-64. This problem was
10123 introduced by my 2011-10-07 patch.
10124
d1d7b339
JL
101252011-12-15 Juri Linkov <juri@jurta.org>
10126
10127 * image.c (imagemagick_error): New function. (Bug#10112)
10128 (imagemagick_load_image): Comment out `MagickSetResolution' call.
10129 Use `imagemagick_error' where ImageMagick functions return
10130 `MagickFalse'.
10131 (Fimagemagick_types): Add `Fnreverse' to return the list in the
10132 proper order.
10133
100d5755
KH
101342011-12-15 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
10135
10136 * xftfont.c (xftfont_draw): Use the font metrics of s->font to
10137 fill background (Bug#8992).
10138
454592a6
MR
101392011-12-13 Martin Rudalics <rudalics@gmx.at>
10140
10141 * window.c (Vwindow_combination_resize)
10142 (Vwindow_combination_limit): Use t instead of non-nil in
10143 doc-strings.
61d4b438
MR
10144 (Vrecenter_redisplay): Add first sentence of doc-string on
10145 separate line.
53524d93 10146 (Frecenter): Fix doc-string typo.
454592a6 10147
3633e3aa
KH
101482011-12-11 Kenichi Handa <handa@m17n.org>
10149
10150 * coding.c (Funencodable_char_position): Pay attention to the
10151 buffer text relocation (Bug#9389).
10152
7b9d523a 101532011-12-10 Jan Djärv <jan.h.d@swipnet.se>
61ccba97 10154
7b9d523a
JD
10155 * xterm.c (x_term_init): Move call to gdk_window_add_filter before
10156 gtk_init (Bug#10100).
10157
b73189c6
EZ
101582011-12-10 Eli Zaretskii <eliz@gnu.org>
10159
10160 * xdisp.c (RECORD_MAX_MIN_POS): Use IT->cmp_it.charpos only if
10161 IT->string is nil. (Bug#10263)
10162
f7dfe5d6
JD
101632011-12-10 Jan Djärv <jan.h.d@swipnet.se>
10164
83faebb4
JD
10165 * nsterm.h (x_free_frame_resources): Declare.
10166
f7dfe5d6
JD
10167 * nsfns.m (ns_get_defaults_value): New function (Bug#10103).
10168 (Fns_get_resource, x_get_string_resource): Call ns_get_defaults_value.
10169
10170 * nsterm.h (ns_get_defaults_value): Declare.
10171
10172 * nsterm.m (ns_default): Call ns_get_defaults_value.
10173
7cd4e72c
EZ
101742011-12-09 Eli Zaretskii <eliz@gnu.org>
10175
10176 * xdisp.c (try_scrolling): Don't set scroll_down_p if dy is zero.
10177 (Bug#10170)
10178
b34d7317
YM
101792011-12-09 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
10180
10181 * unexelf.c (unexec) [NS_IMPL_GNUSTEP]: Take account of the case
10182 that where the value of an _OBJC_* symbol points to is in the .bss
10183 section (Bug#10240).
10184
76470ad1
KH
101852011-12-08 Kazuhiro Ito <kzhr@d1.dion.ne.jp> (tiny change)
10186
10187 * coding.c (encode_coding_ccl): Check (charbuf < charbuf_end)
2fac8180 10188 after the loop to call ccl_driver at least once (Bug#8619).
76470ad1 10189
745fff94
KH
101902011-12-08 Kenichi Handa <handa@m17n.org>
10191
10192 * ftfont.c (get_adstyle_property): Fix previous change
10193 (Bug#10233).
10194
6e44397c
JB
101952011-12-07 Juanma Barranquero <lekktu@gmail.com>
10196
10197 * w32.c (init_environment): If no_site_lisp, remove site-lisp
10198 dirs from the default value of EMACSLOADPATH (bug#10208).
10199
7efa6272
GM
102002011-12-07 Glenn Morris <rgm@gnu.org>
10201
10202 * lread.c (init_lread): If no_site_lisp, exclude site-lisp/ in
10203 installation and source directories as well. (Bug#10208)
10204
f6fc4d87
CY
102052011-12-06 Chong Yidong <cyd@gnu.org>
10206
10207 * minibuf.c (Fread_from_minibuffer): Doc fix (Bug#10228).
10208
2bf26180
GM
102092011-12-06 Glenn Morris <rgm@gnu.org>
10210
10211 * process.c (start_process_unwind): Treat any pid <= 0, except -2,
10212 as an error, not just -1. (Bug#10217)
10213
3a6ad4f0
CY
102142011-12-05 Chong Yidong <cyd@gnu.org>
10215
10216 * keyboard.c (process_special_events): New function.
10217 (swallow_events, Finput_pending_p): Use it (Bug#10195).
10218
75a3b399
PE
102192011-12-05 Paul Eggert <eggert@cs.ucla.edu>
10220
10221 * coding.c (encode_designation_at_bol): Don't use uninitialized
10222 local variable (Bug#9318).
10223
c3c9e25e
KH
102242011-12-05 Kenichi Handa <handa@m17n.org>
10225
10226 * ftfont.c (get_adstyle_property): If the font is not BDF nor PCF,
10227 return Qnil (Bug#8046, Bug#10193).
10228
5eb05ea3
KH
102292011-12-05 Kenichi Handa <handa@m17n.org>
10230
10231 * coding.c (encode_designation_at_bol): New args charbuf_end and
10232 dst. Return the number of produced bytes. Callers changed.
a79703f5
KH
10233 (coding_set_source): Return how many bytes coding->source was
10234 relocated.
10235 (coding_set_destination): Return how many bytes
10236 coding->destination was relocated.
10237 (CODING_DECODE_CHAR, CODING_ENCODE_CHAR, CODING_CHAR_CHARSET)
cae07000 10238 (CODING_CHAR_CHARSET_P): Adjust for the avove changes.
5eb05ea3
KH
10239
102402011-12-05 Kazuhiro Ito <kzhr@d1.dion.ne.jp> (tiny change)
10241
10242 * coding.c (CODING_CHAR_CHARSET_P): New macro.
10243 (encode_coding_emacs_mule, encode_coding_iso_2022): Use the above
10244 macro (Bug#9318).
10245
102462011-12-05 Andreas Schwab <schwab@linux-m68k.org>
10247
10248 The following changes are to fix Bug#9318.
10249
a79703f5 10250 * coding.c (CODING_ENCODE_CHAR, CODING_CHAR_CHARSET): New macros.
5eb05ea3
KH
10251 (encode_coding_emacs_mule, ENCODE_ISO_CHARACTER)
10252 (encode_coding_iso_2022, encode_coding_sjis)
a79703f5 10253 (encode_coding_big5, encode_coding_charset): Use the above macros.
5eb05ea3 10254
7dbda6df
JB
102552011-12-05 Juanma Barranquero <lekktu@gmail.com>
10256
10257 * lisp.h (process_quit_flag): Fix external declaration.
10258
6d5eb5b0
SM
102592011-12-04 Stefan Monnier <monnier@iro.umontreal.ca>
10260
10261 Don't macro-inline non-performance-critical code.
10262 * eval.c (process_quit_flag): New function.
10263 * lisp.h (QUIT): Use it.
10264
a0c3fad0
JD
102652011-12-04 Jan Djärv <jan.h.d@swipnet.se>
10266
10267 * nsfns.m (get_geometry_from_preferences): New function.
10268 (Fx_create_frame): Call get_geometry_from_preferences (Bug#10103).
10269
6c07aac2
AS
102702011-12-04 Andreas Schwab <schwab@linux-m68k.org>
10271
10272 * emacs.c (Qkill_emacs): Define.
10273 (syms_of_emacs): Initialize it.
10274 * keyboard.c (interrupt_signal): Don't call Fkill_emacs here, set
10275 Qquit_flag to `kill-emacs' instead.
6d5eb5b0
SM
10276 (quit_throw_to_read_char): Add parameter `from_signal'.
10277 All callers changed. Call Fkill_emacs if requested and safe.
6c07aac2
AS
10278 * lisp.h (QUIT): Call Fkill_emacs if requested.
10279
c052ead4
JD
102802011-12-03 Jan Djärv <jan.h.d@swipnet.se>
10281
10282 * widget.c (update_wm_hints): Return if wmshell is null.
10283 (widget_update_wm_size_hints): New function.
10284
10285 * widget.h (widget_update_wm_size_hints): Declare.
10286
10287 * xterm.c (x_wm_set_size_hint): If USE_X_TOOLKIT, call
10288 widget_update_wm_size_hints (Bug#10104).
10289
9e49252b
EZ
102902011-12-03 Eli Zaretskii <eliz@gnu.org>
10291
10292 * xdisp.c (handle_invisible_prop): If the invisible text ends just
10293 before a newline, prepare the bidi iterator for consuming the
10294 newline, and keep the current paragraph direction. (Bug#10183)
e9a49426 10295 (redisplay_window): Don't let `margin' become negative. (Bug#10192)
9e49252b 10296
02b16839
JL
102972011-12-02 Juri Linkov <juri@jurta.org>
10298
10299 * search.c (Fword_search_regexp): New Lisp function created from
10300 `wordify'. Change type of arg `lax' from `int' to `Lisp_Object'.
10301 (Fword_search_backward, Fword_search_forward)
10302 (Fword_search_backward_lax, Fword_search_forward_lax):
10303 Use `Fword_search_regexp' instead of `wordify'. Doc fix.
10304 (syms_of_search): Define `Sword_search_regexp'. (Bug#10145)
10305
0068070e
SM
103062011-12-01 Stefan Monnier <monnier@iro.umontreal.ca>
10307
10308 * fileio.c (Finsert_file_contents): Move after-change-function call
10309 to before the "handled:" label, since all "goto handled" appear in
10310 cases where the *-change-functions have already been properly called
10311 (bug#10117).
10312
3360a3fc
AS
103132011-12-01 Andreas Schwab <schwab@linux-m68k.org>
10314
10315 * keyboard.c (interrupt_signal): Don't call kill-emacs when
10316 waiting for input. (Bug#10169)
10317
73d6c093
EZ
103182011-11-30 Eli Zaretskii <eliz@gnu.org>
10319
10320 * dispnew.c (adjust_glyph_matrix): Remove the assertion that
10321 verifies glyph row's hash code--we have just reallocated the
10322 glyphs, so their contents can be complete garbage. (Bug#10164)
10323
febe6bea
JB
103242011-11-30 Juanma Barranquero <lekktu@gmail.com>
10325
10326 * dispnew.c (adjust_glyph_matrix) [XASSERTS]: Add missing check.
10327
801a4313
EZ
103282011-11-30 Eli Zaretskii <eliz@gnu.org>
10329
10330 * dispnew.c (adjust_glyph_matrix) [XASSERTS]: Ensure ROW's
10331 attributes are tested _before_ calling verify_row_hash, to protect
10332 against GCC re-ordering of the tests. (Bug#10164)
10333
2b56b87e
JD
103342011-11-29 Jan Djärv <jan.h.d@swipnet.se>
10335
10336 * xterm.h (struct x_output): net_wm_state_hidden_seen is new.
10337
10338 * xterm.c (handle_one_xevent): Only set async_visible and friends
10339 if net_wm_state_hidden_seen is non-zero (Bug#10002)
7dbda6df 10340 (get_current_wm_state): Set net_wm_state_hidden_seen to 1 if
2b56b87e
JD
10341 _NET_WM_STATE_HIDDEN is in NET_WM_STATE.
10342
dbf31225
PE
103432011-11-28 Paul Eggert <eggert@cs.ucla.edu>
10344
10345 Remove GCPRO-related macros that exist only to avoid shadowing locals.
10346 * lisp.h (GCPRO1_VAR, GCPRO2_VAR, GCPRO3_VAR, GCPRO4_VAR, GCPRO5_VAR)
10347 (GCPRO6_VAR, UNGCPRO_VAR): Remove. See
10348 <http://lists.gnu.org/archive/html/emacs-diffs/2011-11/msg00265.html>.
10349 All uses changed to use GCPRO1 etc.
10350 (GCPRO1, GCPRO2, GCPRO3, GCPRO4, GCPRO5, GCPRO6, UNGCPRO):
10351 Revert to old implementation (i.e., before 2011-03-11).
10352
1305621b
YM
103532011-11-28 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
10354
10355 * dispnew.c (scrolling_window): Truncate overlaps in copy destination
10356 of scroll runs so as to avoid assigning disabled bogus rows and
10357 unnecessary graphics copy operations.
10358
8c9afb46
EZ
103592011-11-27 Eli Zaretskii <eliz@gnu.org>
10360
10361 * s/ms-w32.h (utimbuf) [_MSC_VER]: Don't define.
10362 (snprintf) [_MSC_VER]: Redirect to _snprintf.
10363 (strtoll) [_MSC_VER]: Redirect to _strtoi64.
10364 (malloc, free, realloc, calloc): Redirect to e_* only when
10365 compiling Emacs.
10366
10367 * lisp.h (GCTYPEBITS): Move before first use.
10368 (ALIGN_GCTYPEBITS) [_MSC_VER]: Define.
10369 (DECL_ALIGN) [_MSC_VER]: Use it, as MSVC doesn't like bit ops in
10370 this macro definition.
10371
10372 * s/ms-w32.h (tzname): Redirect to _tzname for all values of
10373 _MSC_VER.
10374
54e9e3bf
JD
103752011-11-27 Jan Djärv <jan.h.d@swipnet.se>
10376
6d5eb5b0
SM
10377 * gtkutil.c (xg_create_frame_widgets):
10378 Call gtk_window_set_has_resize_grip (FALSE) if that function is
54e9e3bf
JD
10379 present with Gtk+ 2.0.
10380
83aca1cb
PE
103812011-11-26 Paul Eggert <eggert@cs.ucla.edu>
10382
10383 * fileio.c (Finsert_file_contents): Undo previous change; see
10384 <http://lists.gnu.org/archive/html/emacs-diffs/2011-11/msg00265.html>.
10385
5b76caa4
PE
103862011-11-26 Paul Eggert <eggert@cs.ucla.edu>
10387
10388 Rename locals to avoid shadowing.
10389 * fileio.c (Finsert_file_contents):
10390 Rename inner 'gcpro1' to 'inner_gcpro1' to avoid shadowing.
10391 * process.c (wait_reading_process_output):
10392 Rename inner 'proc' to 'p' to avoid shadowing.
10393 Indent for consistency with usual Emacs style.
10394
8c535114
EZ
103952011-11-25 Eli Zaretskii <eliz@gnu.org>
10396
10397 * xdisp.c (redisplay_window): If cursor row is not fully visible
10398 after recentering, and scroll-conservatively is set to a large
10399 number, scroll window by a few more lines to make the cursor fully
10400 visible and out of scroll-margin. (Bug#10105)
91b4a718
EZ
10401 (start_display): Don't move to the next line if the display should
10402 start at a newline that is part of a display vector or an overlay
10403 string. (Bug#10119)
8c535114 10404
fa4fdb5c
JL
104052011-11-24 Juri Linkov <juri@jurta.org>
10406
10407 * image.c (imagemagick_load_image): Move `MagickSetResolution' down
10408 after the `MagickPingImage' call. (Bug#10112)
10409
90ec88df
CY
104102011-11-23 Chong Yidong <cyd@gnu.org>
10411
10412 * window.c (Fcoordinates_in_window_p): Accept only live windows.
10413
56e2e794
MR
104142011-11-23 Martin Rudalics <rudalics@gmx.at>
10415
10416 * buffer.c (Fkill_buffer): Run replace_buffer_in_windows before
10417 making another buffer current. (Bug#10114)
10418
b6e64c41
GM
104192011-11-23 Glenn Morris <rgm@gnu.org>
10420
10421 * font.c (font_find_for_lface) [HAVE_NS]: Ignore case. (Bug#2526)
10422
6b21de18
CY
104232011-11-23 Chong Yidong <cyd@gnu.org>
10424
10425 * xdisp.c (compute_stop_pos): Check validity of end_charpos before
10426 using it (Bug#5984).
10427
b12cd789
EZ
104282011-11-22 Eli Zaretskii <eliz@gnu.org>
10429
10430 * dispnew.c (adjust_glyph_matrix): Don't verify hash code of mode-
10431 and header-lines, as they don't have one computed for them.
10432 (Bug#10098)
10433
10434 * .gdbinit (prow): Make displayed values more self-explaining.
10435 Add row's hash code.
10436
261b6fd4
LMI
104372011-11-21 Lars Magne Ingebrigtsen <larsi@gnus.org>
10438
10439 * process.c (wait_reading_process_output): Fix asynchrounous
10440 GnuTLS socket handling on some versions of the GnuTLS library.
16c1ad08 10441 (wait_reading_process_output): Add comment and URL.
261b6fd4 10442
e7cfd277
JD
104432011-11-21 Jan Djärv <jan.h.d@swipnet.se>
10444
10445 * xterm.c (x_clear_frame): Reinstate the XClearWindow call.
10446
a9b9b7f5
CY
104472011-11-21 Chong Yidong <cyd@gnu.org>
10448
10449 * window.c (Fnext_window, Fprevious_window): Doc fix.
10450
b0d15b4f
SM
104512011-11-20 Stefan Monnier <monnier@iro.umontreal.ca>
10452
10453 * window.c (get_phys_cursor_glyph): Fix Lisp_Object/int mixup.
10454
fe7a3057
JB
104552011-11-20 Juanma Barranquero <lekktu@gmail.com>
10456
10457 * nsfont.m (syms_of_nsfont) <ns-reg-to-script>: Fix typo.
10458
d2999b1a
MR
104592011-11-20 Martin Rudalics <rudalics@gmx.at>
10460
10461 * window.c (Fset_window_combination_limit): Rename argument
10462 STATUS to LIMIT.
10463 (Vwindow_combination_limit): Remove "status" from doc-string.
10464
d5ff9cd0
AS
104652011-11-20 Andreas Schwab <schwab@linux-m68k.org>
10466
10467 * m/ibms390.h: Remove.
10468 * m/ibms390x.h: Don't include "ibms390.h".
10469
a5bb9bd3
SM
104702011-11-20 Stefan Monnier <monnier@iro.umontreal.ca>
10471
10472 * fileio.c (Finsert_file_contents): Add missing gcpro1 variable.
10473 Suggested by Dmitry Antipov <dmantipov@yandex.ru>.
10474
cd1181db
JB
104752011-11-20 Juanma Barranquero <lekktu@gmail.com>
10476
10477 * casetab.c (Fset_case_table):
10478 * charset.c (Fcharset_after): Fix typos.
10479
615a3b8d 104802011-11-20 Paul Eggert <eggert@cs.ucla.edu>
6a0bf43d 10481
17e845af
PE
10482 Standardize on VIRT_ADDR_VARIES behavior (Bug#10042).
10483 Otherwise, valgrind does not work on some platforms.
10484 Problem reported by Andreas Schwab in
6a0bf43d
PE
10485 <http://lists.gnu.org/archive/html/emacs-devel/2011-11/msg00081.html>.
10486 * puresize.h (pure, PURE_P): Always behave as if VIRT_ADDR_VARIES
10487 is set, removing the need for VIRT_ADDRESS_VARIES.
10488 (PURE_P): Use a more-efficient implementation that needs just one
10489 comparison, not two: on x86-64 with GCC 4.6.2, this cut down the
10490 number of instructions from 6 (xorl, cmpq, jge, xorl, cmpq, setge)
10491 to 4 (xorl, subq, cmpq, setbe).
10492 * alloc.c (pure): Always extern now, since that's the
10493 VIRT_ADDR_VARIES behavior.
10494 (PURE_POINTER_P): Use a single comparison, not two, for
10495 consistency with the new puresize.h.
10496 * lisp.h (PNTR_COMPARISON_TYPE): Remove; no longer needed.
10497 * m/ibms390.h, m/intel386.h, m/template.h, s/cygwin.h, s/hpux10-20.h:
10498 Remove VIRT_ADDR_VARIES no longer needed.
10499
f8fe6f96
EZ
105002011-11-19 Eli Zaretskii <eliz@gnu.org>
10501
10502 * xdisp.c (x_write_glyphs, draw_phys_cursor_glyph)
10503 (erase_phys_cursor, update_window_cursor, show_mouse_face)
10504 (cursor_in_mouse_face_p): If the cursor position is out of bounds,
10505 behave as if the cursor position were at the window margin.
10506
10507 * window.c (get_phys_cursor_glyph): If the window is hscrolled,
10508 and the cursor position is out of bounds, behave as if the cursor
10509 position were at the window margin. (Bug#10075)
10510
df05a53c
CY
105112011-11-18 Chong Yidong <cyd@gnu.org>
10512
10513 * window.c (Fwindow_combination_limit): Make first argument
10514 non-optional, since it is meaningless for live windows like the
10515 selected window.
61ccba97 10516
2071918e
DA
105172011-11-18 Dmitry Antipov <dmantipov@yandex.ru>
10518
10519 * keymap.c (Fwhere_is_internal): Add missing RETURN_UNGCPROs.
10520
b50a28de
SM
105212011-11-18 Stefan Monnier <monnier@iro.umontreal.ca>
10522
10523 * intervals.c: Fix grafting over the whole buffer (bug#10071).
10524 (graft_intervals_into_buffer): Simplify.
10525
015137db
EZ
105262011-11-18 Eli Zaretskii <eliz@gnu.org>
10527
10528 * dispnew.c (swap_glyph_pointers): Swap the used[] arrays and the
10529 hash values of the two rows.
10530 (copy_row_except_pointers): Preserve the used[] arrays and the
10531 hash values of the two rows. (Bug#10035)
68c95424 10532 (add_row_entry): Add xassert to verify that ROW's hash code is valid.
015137db
EZ
10533
10534 * xdisp.c (row_hash): New function, body extracted from
10535 compute_line_metrics.
10536 (compute_line_metrics): Call row_hash, instead of computing the
10537 hash code inline.
10538
10539 * dispnew.c (verify_row_hash): Call row_hash for computing the
10540 hash code of a row, instead of duplicating code from xdisp.c.
10541
10542 * dispextern.h (row_hash): Add prototype.
10543
a2addb04
TH
105442011-11-18 Tassilo Horn <tassilo@member.fsf.org>
10545
10546 * frame.c (delete_frame): Don't delete the terminal when the last
10547 X frame is closed if emacs is built with GTK toolkit.
10548
df85d315
JB
105492011-11-17 Juanma Barranquero <lekktu@gmail.com>
10550
10551 * window.c (syms_of_window) <window-combination-resize>: Fix typo.
10552
a0c2d0ae
MR
105532011-11-17 Martin Rudalics <rudalics@gmx.at>
10554
10555 * window.c (Vwindow_splits): Rename to
10556 Vwindow_combination_resize. Suggested by Juri Linkov.
10557 (Fsplit_window_internal): Use Vwindow_combination_resize instead
10558 of Vwindow_splits.
10559
58179cce
JB
105602011-11-16 Juanma Barranquero <lekktu@gmail.com>
10561
7877f373
JB
10562 * nsfns.m (Fns_font_name):
10563 * window.c (syms_of_window) <window-combination-limit>: Fix typos.
58179cce 10564
b6f67890
MR
105652011-11-16 Martin Rudalics <rudalics@gmx.at>
10566
10567 * window.h (window): Rename slot "nest" to "combination_limit".
10568 * window.c (Fwindow_nest): Rename to Fwindow_combination_limit.
10569 (Fset_window_nest): Rename to Fset_window_combination_limit.
10570 (Vwindow_nest): Rename to Vwindow_combination_limit.
10571 (recombine_windows, make_parent_window, make_window)
10572 (Fsplit_window_internal, saved_window)
10573 (Fset_window_configuration, save_window_save): Rename all
10574 occurrences of window_nest to window_combination_limit.
10575
c7015153
JB
105762011-11-15 Juanma Barranquero <lekktu@gmail.com>
10577
10578 * image.c (imagemagick_load_image): Fix typo.
10579
322ad6ec
EZ
105802011-11-14 Eli Zaretskii <eliz@gnu.org>
10581
10582 * xdisp.c (display_line): Move the call to
10583 highlight_trailing_whitespace before the call to
10584 compute_line_metrics, since the latter needs to see the final
6d5eb5b0
SM
10585 faces of all the glyphs to compute ROW's hash value.
10586 Fixes assertion violations in row_equal_p. (Bug#10035)
322ad6ec 10587
f067b8ec
JB
105882011-11-14 Juanma Barranquero <lekktu@gmail.com>
10589
10590 * w32proc.c (reader_thread): Don't check pending input if cp->fd < 0,
10591 just return (bug#10044).
10592
1e5b2111
EZ
105932011-11-12 Eli Zaretskii <eliz@gnu.org>
10594
7ef3cbd5
EZ
10595 * makefile.w32-in (HEAPSIZE): New variable, allows to build temacs
10596 with user-defined heap size. Bump the default size of the temacs
10597 heap to 27MB, to avoid memory warning when running temacs.
10598 ($(TEMACS)): Use HEAPSIZE instead of a hardcoded value.
10599
1e5b2111
EZ
10600 * dispnew.c (scrolling_window): Fix incorrect indices in accessing
10601 current_matrix and desired_matrix. (Bug#9990)
7a7270dd
EZ
10602 (verify_row_hash) [XASSERTS]: New function.
10603 (adjust_glyph_matrix, row_equal_p): Use it in xassert to verify
10604 that the hash value of glyph rows is correct.
1e5b2111 10605
89d61221
MR
106062011-11-12 Martin Rudalics <rudalics@gmx.at>
10607
10608 * window.h (window): Remove splits slot.
10609 * window.c (Fwindow_splits, Fset_window_splits): Remove.
10610 (Fdelete_other_windows_internal, make_parent_window)
10611 (make_window, Fsplit_window_internal, Fdelete_window_internal)
10612 (Fset_window_configuration, save_window_save): Don't deal with
10613 split status of windows.
10614 (saved_window): Remove splits slot.
10615 (Vwindow_splits): Rewrite doc-string.
10616
97f18cc8
JD
106172011-11-11 Jan Djärv <jan.h.d@swipnet.se>
10618
10619 * xfns.c (unwind_create_frame):
10620 * nsfns.m (unwind_create_frame):
10621 * w32fns.c (unwind_create_frame): Use Fmemq to check if frame is in
10622 Vframe_list (Bug#9999).
10623
22a648b4
DA
106242011-11-11 Dmitry Antipov <dmantipov@yandex.ru>
10625
0b381c7e 10626 * xdisp.c (syms_of_xdisp): Remove duplicated definition of Qtext.
22a648b4 10627
659afede
KH
106282011-11-11 Kenichi Handa <handa@m17n.org>
10629
10630 * callproc.c (Fcall_process): Set the member dst_multibyte of
10631 process_coding.
10632
9ac0394b
KH
106332011-11-11 Johan Bockgård <bojohan@gnu.org>
10634
10635 * xdisp.c (fill_composite_glyph_string): Always set s->face, to
10636 avoid a crash (bug#9496).
10637
2fbdc249
CY
106382011-11-09 Chong Yidong <cyd@gnu.org>
10639
10640 * window.c (Fwindow_inside_edges, Fwindow_inside_pixel_edges)
10641 (Fwindow_inside_absolute_pixel_edges): Only allow live windows.
10642
ac6b1f81
PE
106432011-11-08 Paul Eggert <eggert@cs.ucla.edu>
10644
10645 * s/gnu.h (GC_MARK_STACK): Define to GC_MAKE_GCPROS_NOOPS (Bug#9926).
10646
09db192c
PE
106472011-11-08 Paul Eggert <eggert@cs.ucla.edu>
10648
10649 Avoid some portability problems by eschewing 'extern inline' functions.
10650 The trivial performance wins aren't worth the portability hassles; see
10651 <http://lists.gnu.org/archive/html/emacs-devel/2011-11/msg00084.html>
10652 et seq.
10653 * dispextern.h (window_box, window_box_height, window_text_bottom_y)
10654 (window_box_width, window_box_left, window_box_left_offset)
10655 (window_box_right, window_box_right_offset): Undo previous change,
10656 by removing the "extern"s.
10657 * intervals.c (adjust_intervals_for_insertion)
10658 (adjust_intervals_for_deletion): Undo previous change,
10659 making these static again.
10660 (offset_intervals, temp_set_point_both, temp_set_point)
10661 (copy_intervals_to_string): No longer inline.
10662 * xdisp.c (window_text_bottom_y, window_box_width)
10663 (window_box_height, window_box_left_offset)
10664 (window_box_right_offset, window_box_left, window_box_right)
10665 (window_box): No longer inline.
10666
105216ed
CY
106672011-11-08 Chong Yidong <cyd@gnu.org>
10668
10669 * window.c (Fwindow_left_column, Fwindow_top_line): Doc fix.
6d5eb5b0
SM
10670 (Fwindow_body_height, Fwindow_body_width): Move from Lisp.
10671 Signal an error if not a live window.
105216ed
CY
10672 (Fwindow_total_width, Fwindow_total_height): Move from Lisp.
10673 (Fwindow_total_size, Fwindow_body_size): Move to Lisp.
10674
ae9e237f
JB
106752011-11-07 Juanma Barranquero <lekktu@gmail.com>
10676
10677 * lisp.h (syms_of_abbrev): Remove declaration.
10678 Reported by CHENG Gao <chenggao@royau.me>.
10679
c7aa8333
EZ
106802011-11-07 Eli Zaretskii <eliz@gnu.org>
10681
10682 * w32.c (check_windows_init_file): Don't look for term/w32-win.el
10683 if Vpurify_flag is non-nil. Fixes a crash when running w32 build
10684 of temacs in GUI mode.
10685
be7f5545
MR
106862011-11-07 Martin Rudalics <rudalics@gmx.at>
10687
10688 * window.h: Declare delete_all_child_windows instead of
10689 delete_all_subwindows.
10690 * window.c (Fwindow_nest, Fset_window_nest)
10691 (Fset_window_new_total, Fset_window_new_normal)
10692 (Fwindow_resize_apply): Don't use term subwindow in doc-strings.
10693 (delete_all_subwindows): Rename to delete_all_child_windows.
10694 (Fdelete_other_windows_internal, Fset_window_configuration):
10695 Call delete_all_child_windows instead of delete_all_subwindows.
10696 * frame.c (delete_frame): Call delete_all_child_windows instead
10697 of delete_all_subwindows.
10698
ca78dc43
PE
106992011-11-07 Paul Eggert <eggert@cs.ucla.edu>
10700
10701 * alloc.c (DEADP): New macro, for porting to GNU/Hurd (Bug#9926).
10702 This is also needed for porting to any host where GC_MARK_STACK is
10703 not GC_MAKE_GCPROS_NOOPS.
10704 (which_symbols): Use it.
10705
a0241d01
KH
107062011-11-07 Kenichi Handa <handa@m17n.org>
10707
10708 * coding.c (coding_set_destination): Check coding->src_pos only
10709 when coding->src_object is a buffer (bug#9910).
10710
10711 * process.c (send_process): Set the member src_multibyte of coding
10712 to 0 (bug#9911) when sending a unibyte text.
10713
10714 * callproc.c (Fcall_process): Set the member src_multibyte of
10715 process_coding to 0 (bug#9912).
10716
a64bfdfa 107172011-11-06 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
ba24cea2
YM
10718
10719 * xmenu.c (cleanup_widget_value_tree): New function.
10720 (xmenu_show, xdialog_show): Use it in record_unwind_protect instead of
10721 calling free_menubar_widget_value_tree directly (Bug#9830).
10722
cb41b32a
PE
107232011-11-06 Paul Eggert <eggert@cs.ucla.edu>
10724
10725 Fix some portability problems with 'inline'.
10726 * dispextern.h (window_box, window_box_height, window_text_bottom_y)
10727 (window_box_width, window_box_left, window_box_left_offset)
10728 (window_box_right, window_box_right_offset): Declare extern.
10729 Otherwise, these inline functions do not conform to C99 and
10730 are miscompiled by Microsoft compilers. Reported by Eli Zaretskii in
10731 <http://lists.gnu.org/archive/html/emacs-devel/2011-11/msg00084.html>.
10732 * intervals.c (adjust_intervals_for_insertion)
10733 (adjust_intervals_for_deletion): Now extern, because otherwise the
10734 extern inline functions 'offset_intervals' couldn't refer to it.
10735 (static_offset_intervals): Remove.
10736 (offset_intervals): Rewrite using the old contents of
10737 static_offset_intervals. The old version didn't conform to C99
10738 because an extern inline function contained a reference to an
10739 identifier with static linkage.
10740
b7041366
AS
107412011-11-06 Andreas Schwab <schwab@linux-m68k.org>
10742
10743 * keyboard.c (interrupt_signal): Don't call kill-emacs while in
10744 GC.
10745
88a37c4d
EZ
107462011-11-06 Eli Zaretskii <eliz@gnu.org>
10747
10748 * xdisp.c (init_iterator, reseat_to_string): Don't set the
10749 iterator's bidi_p flag if Vpurify_flag is non-nil. (Bug#9963)
10750 (Fcurrent_bidi_paragraph_direction): If Vpurify_flag is non-nil,
10751 return Qleft_to_right.
10752
49745b39
CY
107532011-11-06 Chong Yidong <cyd@gnu.org>
10754
10755 * window.c (Fwindow_live_p, Fwindow_frame, Fframe_root_window)
10756 (Fminibuffer_window, Fwindow_buffer, Fwindow_splits)
10757 (Fset_window_splits, Fwindow_nest, Fset_window_nest)
10758 (Fwindow_use_time, Fwindow_total_size, Fwindow_normal_size)
10759 (Fwindow_new_normal, Fwindow_left_column, Fwindow_top_line)
10760 (Fwindow_margins, Fwindow_fringes, Fwindow_scroll_bars)
10761 (Fwindow_vscroll): Doc fix.
10762 (Fwindow_top_child, Fwindow_left_child): Eliminate a nil default
10763 argument, since it makes no sense to pass a live window and for
10764 consistency with window-child.
10765
1f05cd82
CS
107662011-11-05 Christoph Scholtes <cschol2112@googlemail.com>
10767
10768 * makefile.w32-in ($(TEMACS), (gl-stamp)): Use $(THISDIR) to
10769 support MSVC.
10770
22610910
JR
107712011-11-05 Jason Rumney <jasonr@gnu.org>
10772
10773 * w32font.c (font_matches_spec): Filter out non-Japanese kana fonts.
10774 (add_font_entity_to_list): Filter out non-Japanese Shift-JIS
10775 fonts (Bug#6029).
10776 (add_font_entity_to_list): Fix logic errors in mixed boolean and
10777 bitwise arithmetic preventing use of unicode-sip and non-truetype
10778 opentype fonts.
10779
a06776b2
EZ
107802011-11-05 Eli Zaretskii <eliz@gnu.org>
10781
3ad924ba
EZ
10782 * s/ms-w32.h (fstat, stat, utime): Move redirections to
10783 "emacs"-only part.
10784
a06776b2
EZ
10785 * w32fns.c (x_create_tip_frame, Fx_create_frame): Rearrange
10786 initialization code to keep similarity to xfns.c after changes
10787 from 2011-11-05.
10788
c9e7db78
JD
107892011-11-05 Jan Djärv <jan.h.d@swipnet.se>
10790
a97f8f3f
JD
10791 * nsfns.m: Declare image_cache_refcount if GLYPH_DEBUG.
10792 (unwind_create_frame): New function (Bug#9943).
10793 (Fx_create_frame): Restructure code to be more similar to the one in
10794 xfns.c. Call record_unwind_protect with unwind_create_frame (Bug#9943).
10795 Initialize image_cache_refcount if GLYPH_DEBUG (Bug#9943).
10796 Move terminal->reference_count++ just before making the frame official
10797 (Bug#9943).
10798
10799 * nsterm.m (x_free_frame_resources): New function.
10800 (x_destroy_window): Move code to x_free_frame_resources.
10801
c9e7db78 10802 * xfns.c (unwind_create_frame): Fix comment.
6d5eb5b0
SM
10803 (Fx_create_frame, x_create_tip_frame):
10804 Move terminal->reference_count++ just before making the frame
75f1671a 10805 official. Move initialization of image_cache_refcount and
c9e7db78
JD
10806 dpyinfo_refcount before calling init_frame_faces (Bug#9943).
10807
a6fc3b5c
EZ
108082011-11-05 Eli Zaretskii <eliz@gnu.org>
10809
10810 Support MSVC build with newer versions of Visual Studio.
10811 * makefile.w32-in (TAGS-gmake): Don't use $(patsubst ...), as
10812 Nmake barfs on that. Use $(OBJ*_c) variables instead, defined on
10813 nt/gmake.defs.
10814
10815 * lisp.h (ENUM_BF): New macro, for enumerated types in bitfields,
10816 which are not supported by MSVC.
10817 (Lisp_Symbol, Lisp_Misc_Any, Lisp_Marker, Lisp_Misc_Overlay)
10818 (Lisp_Save_Value, Lisp_Free): Use ENUM_BF for enumerated types in
10819 bitfields.
10820 (Lisp_Object) [USE_LISP_UNION_TYPE]: Use ENUM_BF for enumerated
10821 types in bitfields.
10822 (DEFUN) [_MSC_VER]: Define in a different way for MSVC.
10823
10824 * w32fns.c [_MSC_VER]: DECLARE_HANDLE for any MSVC version.
10825
58179cce 108262011-11-05 Fabrice Popineau <fabrice.popineau@supelec.fr> (tiny change)
a6fc3b5c
EZ
10827
10828 Support MSVC build with newer versions of Visual Studio.
10829 * w32.c: Don't include w32api.h for MSVC.
10830 (init_environment) [_MSC_VER]: Call sys_access, not _access.
10831
10832 * s/ms-w32.h <sigset_t, ssize_t> [_MSC_VER]: Typedefs for MSVC.
10833 [_MSC_VER]: Include sys/timeb.h, sys/stat.h, and signal.h.
10834 (fstat, stat, utime) [_MSC_VER]: Redirect to their sys_* cousins.
10835 (malloc, free, realloc, calloc) [_MSC_VER]: Always redirect to the
10836 e_* cousins.
10837 (alloca) [_MSC_VER]: Define to _alloca.
10838
10839 * lisp.h (DECL_ALIGN) [_MSC_VER]: Define for MSVC.
10840
10841 * regex.c <re_char> [_MSC_VER]: A separate definition for MSVC.
10842
a58c13ed
EZ
108432011-11-04 Eli Zaretskii <eliz@gnu.org>
10844
10845 * xdisp.c (note_mouse_highlight): If either of
10846 previous/next-single-property-change returns nil, treat that as
10847 the beginning or the end of the buffer. (Bug#9955)
10848
fe0b6370
JD
108492011-11-04 Jan Djärv <jan.h.d@swipnet.se>
10850
a58c13ed 10851 * gtkutil.c (xg_make_tool_item): Add callbacks if one of wimage or
fe0b6370
JD
10852 label is not null (Bug#9951).
10853 (xg_tool_item_stale_p): Handle the fact that wimage and/or wlbl
10854 may be NULL.
10855
89bd5ee1
EZ
108562011-11-04 Eli Zaretskii <eliz@gnu.org>
10857
10858 * window.c (Fwindow_body_size): Mention in the doc string that the
10859 return value is in frame's canonical units. (Bug#9949)
10860
84c3edb9
EZ
108612011-11-03 Eli Zaretskii <eliz@gnu.org>
10862
4e2fb5c7
EZ
10863 * xdisp.c (note_mouse_highlight): Initialize `area'. (Bug#9947)
10864
84c3edb9 10865 * w32fns.c (unwind_create_frame): If needed, free the glyph
3ab15fd6 10866 matrices of the partially constructed frame. (Bug#9943)
2a58bbc1 10867 * xfns.c (unwind_create_frame): Likewise.
84c3edb9 10868
bc17a887
EZ
108692011-11-01 Eli Zaretskii <eliz@gnu.org>
10870
10871 * xdisp.c (mouse_face_from_buffer_pos): Fix a typo in a comment.
10872 Don't stop backward scan on the continuation glyph, even though
10873 its CHARPOS is positive.
6d5eb5b0
SM
10874 (mouse_face_from_buffer_pos, note_mouse_highlight):
10875 Rename cover_string to disp_string.
bc17a887 10876
4ee88440
MR
108772011-11-01 Martin Rudalics <rudalics@gmx.at>
10878
10879 * window.c (temp_output_buffer_show): Don't use
10880 Vtemp_buffer_show_specifiers.
10881 (Vtemp_buffer_show_specifiers): Remove unused variable.
10882
c2ff3c02
EZ
108832011-10-30 Eli Zaretskii <eliz@gnu.org>
10884
10885 * xdisp.c (try_cursor_movement): Make sure ROW isn't decremented
10886 past the beginning of the current glyph matrix.
10887
58179cce 108882011-10-30 Adam Sjøgren <asjo@koldfront.dk> (tiny change)
6e56383b
JD
10889
10890 * xterm.c: Include X11/Xproto.h if HAVE_GTK3.
10891 (x_error_handler): Ignore BadMatch for X_SetInputFocus for
10892 HAVE_GTK3 (Bug#9869).
b77a6a7f 10893
3b574623
JD
10894 * gtkutil.c (xg_win_to_widget, xg_event_is_for_menubar): Initialize
10895 type to GDK_NOTHING so valgrind does not complain (Bug#9901).
10896
b77a6a7f
JD
10897 * xterm.h (x_display_info): Add Xatom_net_wm_state_hidden (Bug#9893).
10898
10899 * xterm.c: Declare x_handle_net_wm_state to return int.
10900 (handle_one_xevent): Check if we are iconified but don't have
10901 _NET_WM_STATE_HIDDEN. If do, treat as deiconify (Bug#9893).
10902 (get_current_wm_state): Return non-zero if not hidden,
10903 check for _NET_WM_STATE_HIDDEN (Bug#9893).
10904 (do_ewmh_fullscreen): Ignore return value from get_current_wm_state.
10905 (x_handle_net_wm_state): Return what get_current_wm_state returns.
10906 (x_term_init): Initialize dpyinfo->Xatom_net_wm_state_hidden.
10907
196e41e4
PE
109082011-10-29 Paul Eggert <eggert@cs.ucla.edu>
10909
10910 * alloc.c (which_symbols): Declare EXTERNALLY_VISIBLE,
10911 so that this new function doesn't get optimized away by a
10912 whole-program optimizer. Make the 2nd arg EMACS_INT, not int.
10913
021f2e1a
AS
109142011-10-29 Andreas Schwab <schwab@linux-m68k.org>
10915
10916 * frame.h (MOUSE_HL_INFO): Remove excess parens.
10917
8b058d44
EZ
109182011-10-29 Eli Zaretskii <eliz@gnu.org>
10919
10920 Fix the `xbytecode' command.
10921 * .gdbinit (xprintbytestr): New command.
b50a28de 10922 (xwhichsymbols): Rename from `which'; all callers changed.
8b058d44
EZ
10923 (xbytecode): Print the byte-code string as well.
10924
4452fb80
EZ
109252011-10-29 Kim Storm <storm@cua.dk>
10926
8b058d44
EZ
10927 * alloc.c (which_symbols): New function.
10928
21b72067
AS
109292011-10-29 Andreas Schwab <schwab@linux-m68k.org>
10930
10931 * minibuf.c (read_minibuf_noninteractive): Allow reading empty
10932 line. (Bug#9903)
10933
83ed7b5c
GM
109342011-10-29 Glenn Morris <rgm@gnu.org>
10935
10936 * process.c (wait_reading_process_output): Revert 2009-08-30 change.
10937 Not clear what it was for, and it causes various bugs. (Bug#9839)
10938
5a7a728b
EZ
109392011-10-28 Eli Zaretskii <eliz@gnu.org>
10940
10941 * xdisp.c (note_mouse_highlight): Initialize `part', to avoid a
10942 possible random value that matches one of those tested as
10943 condition to clear the mouse face.
10944
d3d0842f
CY
109452011-10-28 Chong Yidong <cyd@gnu.org>
10946
10947 * xdisp.c (note_mouse_highlight): Fix use of uninitialized var.
10948
31b39d13
DN
109492011-10-28 Dan Nicolaescu <dann@ics.uci.edu>
10950
10951 * window.c (make_window): Initialize phys_cursor_on_p.
10952
9aba6043
SM
109532011-10-28 Stefan Monnier <monnier@iro.umontreal.ca>
10954
10955 * lisp.h (struct Lisp_Symbol): Update comments.
10956
c20992f4
JB
109572011-10-28 Juanma Barranquero <lekktu@gmail.com>
10958
10959 * w32font.c (w32_load_unicows_or_gdi32): Add missing return.
10960
db4f02f2
EZ
109612011-10-28 Eli Zaretskii <eliz@gnu.org>
10962
10963 Fix Emacs on Windows 9X (bug#8562). Thanks to oslsachem
10964 <oslsachem@gmail.com> for helping to debug this.
10965
10966 * w32font.c (g_b_init_is_w9x, g_b_init_get_outline_metrics_w)
10967 (g_b_init_get_text_metrics_w, g_b_init_get_glyph_outline_w)
10968 (g_b_init_get_glyph_outline_w): New static variables.
10969 (GetOutlineTextMetricsW_Proc, GetTextMetricsW_Proc)
10970 (GetGlyphOutlineW_Proc): New typedefs.
10971 (w32_load_unicows_or_gdi32, get_outline_metrics_w)
9aba6043
SM
10972 (get_text_metrics_w, get_glyph_outline_w, globals_of_w32font):
10973 New functions.
10974 (w32font_open_internal, compute_metrics):
10975 Call get_outline_metrics_w, get_text_metrics_w, and get_glyph_outline_w
db4f02f2
EZ
10976 instead of calling the "wide" APIs directly.
10977
10978 * emacs.c (main) [HAVE_NTGUI]: Call globals_of_w32font.
10979
10980 * w32.h (syms_of_w32font): Add prototype.
10981
87e68db4
JB
109822011-10-27 Juanma Barranquero <lekktu@gmail.com>
10983
10984 * window.c (Fframe_root_window, Fframe_first_window, Fwindow_end)
10985 (Fframe_selected_window, Ftemp_output_buffer_show, Fnext_window)
10986 (Fdelete_window_internal, Fwindow_parameters): Fix typos in docstrings.
10987 (Fmove_to_window_line): Doc fix.
10988
435c1d67
CY
109892011-10-27 Chong Yidong <cyd@gnu.org>
10990
10991 * process.c (make_process): Set gnutls_state to NULL.
10992
10993 * gnutls.c (emacs_gnutls_deinit): Deinit the gnutls_state if it is
10994 non-NULL, regardless of GNUTLS_INITSTAGE.
10995 (Fgnutls_boot): Cleanups. Call emacs_gnutls_deinit if we signal
10996 an error. Set process slots as soon as we allocate them.
10997
10998 * gnutls.h (GNUTLS_LOG, GNUTLS_LOG2): Fix macros.
10999
9c6c6f49
CY
110002011-10-27 Chong Yidong <cyd@gnu.org>
11001
9aba6043
SM
11002 * gnutls.c (emacs_gnutls_deinit): New function.
11003 Deallocate credentials structures as well as calling gnutls_deinit.
9c6c6f49
CY
11004 (Fgnutls_deinit, Fgnutls_boot): Use it.
11005
11006 * process.c (make_process): Initialize GnuTLS credentials to NULL.
11007 (deactivate_process): Call emacs_gnutls_deinit.
11008
657d08d3
JB
110092011-10-27 Juanma Barranquero <lekktu@gmail.com>
11010
11011 * image.c (x_create_x_image_and_pixmap):
11012 * w32.c (sys_rename, w32_delayed_load):
11013 * w32font.c (fill_in_logfont):
11014 * w32reg.c (x_get_string_resource): Silence compiler warnings.
11015
5430d399
JB
110162011-10-26 Juanma Barranquero <lekktu@gmail.com>
11017
11018 * w32fns.c (w32_default_color_map): New function,
11019 extracted from Fw32_default_color_map.
a7ef684b 11020 (Fw32_default_color_map, Fx_open_connection): Use it. (Bug#9785)
5430d399 11021
fe0055fa
PE
110222011-10-25 Paul Eggert <eggert@cs.ucla.edu>
11023
11024 * dispextern.h (Fcontrolling_tty_p): New decl (Bug#6649 part 2).
11025
e6346438
SM
110262011-10-25 Stefan Monnier <monnier@iro.umontreal.ca>
11027
11028 * keyboard.c (test_undefined): New function (bug#9751).
11029 (read_key_sequence): Use it to detect when a key is bound to `undefined'.
11030
e112cc37
ET
110312011-10-25 Enami Tsugutomo <tsugutomo.enami@jp.sony.com>
11032
11033 * sysdep.c (init_sys_modes): Fix the check for the controlling
11034 terminal (Bug#6649).
11035
7b5d6677
EZ
110362011-10-20 Eli Zaretskii <eliz@gnu.org>
11037
11038 * dispextern.h (struct bidi_it): New member next_en_type.
11039
11040 * bidi.c (bidi_line_init): Initialize the next_en_type member.
11041 (bidi_resolve_explicit_1): When next_en_pos is valid for the
11042 current character, check also for next_en_type being WEAK_EN.
11043 (bidi_resolve_weak): Don't enter the expensive loop if the current
11044 position is before next_en_pos. Record the bidi type of the first
11045 non-ET, non-BN character we find, in addition to its position.
11046 (bidi_level_of_next_char): Invalidate next_en_type when
11047 next_en_pos is over-stepped.
11048
7da0b018
PE
110492011-10-20 Paul Eggert <eggert@cs.ucla.edu>
11050
11051 Time zone name fixes for non-ASCII locales (Bug#641, Bug#9794)
11052 * editfns.c: Rewrite current-time-zone so that it invokes
11053 the equivalent of (format-time-string "%Z") to get the time zone name.
11054 This fixes a bug when the time zone name contains characters that
11055 need converting from the system time locale to Emacs internal format.
11056 This fixes a shortcoming that I introduced in my 1999-10-19 patch:
11057 that patch fixed format-time-string to do the conversion, but
11058 I forgot to fix current-time-zone.
11059 (format_time_string): New function, containing most of
11060 what Fformat_time_string used to contain.
11061 (Fformat_time_string): Rewrite in terms of format_time_string.
11062 This doesn't change this function's behavior.
11063 (current-time-zone): Rewrite to use format_time_string.
11064 This fixes the bug reported by Michael Schierl in
11065 <http://lists.gnu.org/archive/html/emacs-devel/2007-06/msg00334.html>.
11066 Jason Rumney's 2007-06-07 change worked around this bug, but
11067 didn't fix it.
11068 * systime.h (tzname, timezone): Remove no-longer-used declarations.
11069
8547b010
EZ
110702011-10-19 Eli Zaretskii <eliz@gnu.org>
11071
11072 * xdisp.c (start_display): If the character at POS is displayed
11073 via a display vector, reset IT->current.dpvec_index to zero.
12b32963
EZ
11074 (try_window_reusing_current_matrix): If a line ends in a display
11075 vector or the next line starts in a display vector, continue
11076 redrawing the window even though the character position of
11077 start_row was reached.
8547b010
EZ
11078 (Bug#9771, part 2)
11079
4e948d15
CY
110802011-10-18 Chong Yidong <cyd@gnu.org>
11081
11082 * xdisp.c (get_next_display_element): Handle U+2010 and U+2011
11083 with nobreak-char-display too.
11084
4787455f
EZ
110852011-10-18 Eli Zaretskii <eliz@gnu.org>
11086
11087 Fix part 3 of bug#9771.
11088 * bidi.c (bidi_line_init): Initialize next_en_pos to zero, not -1.
11089 (bidi_resolve_neutral): Don't enter the expensive loop looking for
11090 non-neutral characters if the current character is a paragraph
11091 separator (a.k.a. Newline). This avoids running the same
11092 expensive loop twice, once when we consume the preceding newline
11093 and the other time when the line actually needs to be displayed.
11094 Avoid the loop when we see neutrals on the base embedding level
11095 following a character whose directionality is the same as the
11096 paragraph's. This avoids running the expensive loop when a line
11097 ends in a long sequence of neutrals, like control characters.
11098 Add assertion against STRONG_AL type. Slightly rearrange code
11099 that determines the type of a neutral given the first non-neutral
11100 that follows it.
11101 (bidi_level_of_next_char): Set next_en_pos to zero when
11102 invalidating its info.
11103
2c91f553
EZ
111042011-10-17 Eli Zaretskii <eliz@gnu.org>
11105
11106 * xdisp.c (push_display_prop): Determine whether to record string
11107 or buffer position by IT->string, not by IT->method. Allow
11108 GET_FROM_DISPLAY_VECTOR as IT->method on entry. (Bug#9771, part 4)
f2ff9e88
EZ
11109 (move_it_vertically_backward): Don't look for character position
11110 immediately after the newline when in a continuation line.
11111 (Bug#9771, part 1)
2c91f553 11112
c7b08b0d
MR
111132011-10-15 Martin Rudalics <rudalics@gmx.at>
11114
11115 * window.c (coordinates_in_window): Rewrite and delabelize
11116 vertical border check. (Bug#5357) (Bug#9618)
11117
6b02f655
SM
111182011-10-14 Stefan Monnier <monnier@iro.umontreal.ca>
11119
11120 * xterm.c (frame_highlight, frame_unhighlight): Ignore unexplained
11121 errors in XSetWindowBorder (bug#9310).
11122
81d40c92
DA
111232011-10-13 Dmitry Antipov <dmantipov@yandex.ru>
11124
11125 * editfns.c (Fset_time_zone_rule): Replace free with xfree to
11126 avoid crash when xmalloc overrun checking is enabled.
11127
d4172c3b
EZ
111282011-10-13 Eli Zaretskii <eliz@gnu.org>
11129
11130 * xdisp.c (Fcurrent_bidi_paragraph_direction): Initialize
11131 itb.paragraph_dir to NEUTRAL_DIR. Fixes an occasional incorrect
11132 cursor motion with <left> and <right> arrow keys.
11133
11134 * bidi.c (bidi_init_it): Don't initialize paragraph_dir here, as
11135 some callers set that themselves.
11136
b00eea75
EZ
111372011-10-12 Eli Zaretskii <eliz@gnu.org>
11138
11139 * xdisp.c (find_row_edges): Handle the case where ROW comes from a
11140 display string and the previous row comes from the same string and
11141 is empty. (Bug#9739) (Bug#9738)
11142
8fe012c4
SM
111432011-10-12 Stefan Monnier <monnier@iro.umontreal.ca>
11144
11145 * doc.c (get_doc_string): Encode file name (bug#9735).
11146
0074aef2
EZ
111472011-10-12 Eli Zaretskii <eliz@gnu.org>
11148
79beb178
EZ
11149 * bidi.c (bidi_level_of_next_char):
11150 * xdisp.c (get_visually_first_element): Remove old incorrect
11151 comments regarding the Unicode Line Separator character.
11152
0074aef2
EZ
11153 * bidi.c (bidi_init_it): Initialize paragraph_dir to NEUTRAL_DIR.
11154
6e4b3fbe
DA
111552011-10-12 Dmitry Antipov <dmantipov@yandex.ru>
11156
11157 * alloc.c (Fgc_status): Do not access beyond zombies array
11158 boundary if nzombies > MAX_ZOMBIES.
11159 * alloc.c (dump_zombies): Add missing format specifier.
11160
0324f3af
PE
111612011-10-12 Paul Eggert <eggert@cs.ucla.edu>
11162
b5525cac
PE
11163 * xdisp.c (set_cursor_from_row): Simplify conditionals,
11164 to pacify GCC 4.6.1 x86-64 with -O2 -Wstrict-overflow.
11165
0324f3af
PE
11166 * lread.c (read_escape): Allow hex escapes as large as ?\xfffffff.
11167 Some packages use them to denote characters with modifiers.
11168
e9b5f888
AS
111692011-10-11 Andreas Schwab <schwab@linux-m68k.org>
11170
11171 * lisp.h (GCPRO1_VAR, GCPRO2_VAR, GCPRO3_VAR, GCPRO4_VAR)
11172 (GCPRO5_VAR, GCPRO6_VAR, UNGCPRO_VAR): Add whitespace to avoid
11173 matching a pp-number. Rename parameter var to var1.
11174
127827c0
SM
111752011-10-11 Stefan Monnier <monnier@iro.umontreal.ca>
11176
11177 * minibuf.c (Finternal_complete_buffer): Fix last change (bug#9709).
11178
c8fd3bd0
GM
111792011-10-08 Glenn Morris <rgm@gnu.org>
11180
11181 * callint.c (Fcall_interactively): Give a more explicit error for the
11182 'c' case with a non-character input. (Bug#8479)
11183
352ec8ff
EZ
111842011-10-08 Eli Zaretskii <eliz@gnu.org>
11185
03669ccb
EZ
11186 * xdisp.c (hscroll_window_tree): Support hscroll in right-to-left
11187 lines.
7061c986
EZ
11188 (set_cursor_from_row): Fix cursor positioning in mixed L2R+R2L
11189 lines that are hscrolled on the left.
03669ccb 11190
352ec8ff
EZ
11191 * dispnew.c (buffer_posn_from_coords): Account for a possible
11192 presence of header-line. (Bug#4426)
11193
a66cfb1c
SM
111942011-10-07 Stefan Monnier <monnier@iro.umontreal.ca>
11195
6b02f655
SM
11196 * buffer.c (syms_of_buffer) <enable-multibyte-characters>:
11197 Don't advertise functionality which we discourage or doesn't work.
a66cfb1c 11198
7c5ee88e
PE
111992011-10-07 Paul Eggert <eggert@cs.ucla.edu>
11200
11201 * alloc.c (GC_LISP_OBJECT_ALIGNMENT): Use offsetof, not __alignof__
11202 or sizeof. __alignof__ gives the wrong answer on Fedora x86-64
11203 with GCC 4.6.1 when configured with CC='gcc -m32' --with-wide-int;
11204 this makes Emacs dump core during garbage collection on rare
11205 occasions. sizeof is obviously inferior to offsetof here, so
11206 stick with offsetof.
11207 (GC_POINTER_ALIGNMENT): New macro.
11208 (mark_memory): Omit 3rd (offset) arg; caller changed.
11209 Don't assume EMACS_INT alignment is the same as pointer alignment.
11210
df1bbe5b
SM
112112011-10-03 Stefan Monnier <monnier@iro.umontreal.ca>
11212
11213 * keyboard.c (read_key_sequence_remapped): New var.
11214 (read_key_sequence): Compute remapping in the right buffer.
11215 (command_loop_1): Use read_key_sequence's remapping directly.
11216
51553db6
SM
112172011-10-02 Stefan Monnier <monnier@iro.umontreal.ca>
11218
32c1fffd
SM
11219 * dired.c (file_name_completion): Don't expand file name.
11220 (Ffile_name_completion, Ffile_name_all_completions): Expand file name
11221 before checking file name handler.
11222
51553db6
SM
11223 * minibuf.c (Finternal_complete_buffer): Only show internal buffers if
11224 they've been requested explicitly (bug#9591).
11225
b6bd1599 112262011-10-01 Andreas Schwab <schwab@linux-m68k.org>
fa2ec41f
AS
11227
11228 * keymap.c (Fsingle_key_description): Use make_specified_string
11229 instead of build_string to build string from push_key_description.
11230 (Bug#5193)
11231
f701dc2a
PE
112322011-09-30 Paul Eggert <eggert@cs.ucla.edu>
11233
4222c55d
PE
11234 * buffer.h (struct buffer): Use time_t, not int, for a time stamp.
11235 This fixes a Y2038 bug on 64-bit hosts.
11236 * buffer.c (reset_buffer):
11237 * fileio.c (Fdo_auto_save, Fset_buffer_auto_saved)
11238 (Fclear_buffer_auto_save_failure):
11239 Use 0, not -1, to represent an unset failure time, since time_t
11240 might not be signed.
11241
f701dc2a
PE
11242 Remove dependency on glibc malloc internals.
11243 * alloc.c (XMALLOC_OVERRUN_CHECK_OVERHEAD, XMALLOC_OVERRUN_CHECK_SIZE):
11244 Move back here from lisp.h, but with their new implementations.
11245 (XMALLOC_BASE_ALIGNMENT, COMMON_MULTIPLE, XMALLOC_HEADER_ALIGNMENT)
11246 (XMALLOC_OVERRUN_SIZE_SIZE): Move these new lisp.h macros here.
11247 * charset.c (charset_table_init): New static var.
11248 (syms_of_charset): Use it instead of xmalloc. This removes a
11249 dependency on glibc malloc internals. See Eli Zaretskii's comment in
11250 <http://lists.gnu.org/archive/html/emacs-devel/2011-09/msg00815.html>.
11251 * lisp.h (XMALLOC_OVERRUN_CHECK_OVERHEAD, XMALLOC_OVERRUN_CHECK_SIZE):
11252 Move back to alloc.c.
11253 (XMALLOC_BASE_ALIGNMENT, COMMON_MULTIPLE, XMALLOC_HEADER_ALIGNMENT)
11254 (XMALLOC_OVERRUN_SIZE_SIZE): Move to alloc.c.
11255
9ceebf39
JD
112562011-09-30 Jan Djärv <jan.h.d@swipnet.se>
11257
11258 * nsterm.m (windowDidResize): Call x_set_window_size only when
11259 ns_in_resize is true. Otherwise set pixelwidth/height and
11260 call change_frame_size (Bug#9628).
11261
cb993c58
PE
112622011-09-30 Paul Eggert <eggert@cs.ucla.edu>
11263
3930c88b
PE
11264 Port --enable-checking=all to Fedora 14 x86-64.
11265 * charset.c (syms_of_charset): Also account for glibc malloc's
11266 internal overhead when calculating the initial malloc maximum.
11267
cb993c58
PE
11268 Port --enable-checking=all to Fedora 14 x86.
11269 * alloc.c (XMALLOC_OVERRUN_CHECK_OVERHEAD, XMALLOC_OVERRUN_CHECK_SIZE):
11270 Move to lisp.h.
11271 (xmalloc_put_size, xmalloc_get_size, overrun_check_malloc)
11272 (overrun_check_realloc, overrun_check_free):
11273 Use XMALLOC_OVERRUN_SIZE_SIZE, not sizeof (size_t).
11274 That way, xmalloc returns a properly-aligned pointer even if
11275 XMALLOC_OVERRUN_CHECK is defined. The old debugging code happened
11276 to align OK on typical 64-bit hosts, but not on Fedora 14 x86.
11277 * charset.c (syms_of_charset): Take XMALLOC_OVERRUN_CHECK_OVERHEAD
11278 into account when calculating the initial malloc maximum.
11279 * lisp.h (XMALLOC_OVERRUN_CHECK_OVERHEAD, XMALLOC_OVERRUN_CHECK_SIZE):
11280 Move here from alloc.c, so that charset.c can use it too.
11281 Properly align; the old code wasn't right for common 32-bit hosts
11282 when configured with --enable-checking=all.
11283 (XMALLOC_BASE_ALIGNMENT, COMMON_MULTIPLE, XMALLOC_HEADER_ALIGNMENT)
11284 (XMALLOC_OVERRUN_SIZE_SIZE): New macros.
11285
31bed486
EZ
112862011-09-29 Eli Zaretskii <eliz@gnu.org>
11287
04c70788 11288 * sysdep.c (snprintf) [!EOVERFLOW]: If EOVERFLOW is not defined,
31bed486
EZ
11289 use EDOM.
11290
fbcaa2f3
EZ
112912011-09-28 Eli Zaretskii <eliz@gnu.org>
11292
11293 * xdisp.c (compute_display_string_end): If there's no display
11294 string at CHARPOS, return -1.
11295
11296 * bidi.c (bidi_fetch_char): When compute_display_string_end
11297 returns a negative value, treat the character as a normal
11298 character not covered by a display string. (Bug#9624)
11299
a239d4e9
JB
113002011-09-28 Juanma Barranquero <lekktu@gmail.com>
11301
11302 * lread.c (Fread_from_string): Fix typo in docstring.
11303
88652fd5
EZ
113042011-09-27 Eli Zaretskii <eliz@gnu.org>
11305
11306 * xdisp.c (handle_invisible_prop): If invisible text ends on a
11307 newline, reseat the iterator instead of bidi-iterating there one
11308 character at a time. (Bug#9610)
32c1fffd
SM
11309 (BUFFER_POS_REACHED_P, move_it_in_display_line_to): Bail when past
11310 TO_CHARPOS if the bidi iterator is at base embedding level.
88652fd5 11311
ed497dd4
AS
113122011-09-27 Andreas Schwab <schwab@linux-m68k.org>
11313
11314 * lread.c (readevalloop): Use correct code for NBSP.
11315 (read1): Likewise. (Bug#9608)
11316
b2bf61aa
MA
113172011-09-25 Michael Albinus <michael.albinus@gmx.de>
11318
11319 * dbusbind.c (Fdbus_register_signal): When service is not
11320 registered, use nil in Vdbus_registered_objects_table. (Bug#9581)
11321
32bbb17c
GM
113222011-09-25 Glenn Morris <rgm@gnu.org>
11323
11324 * buffer.c (truncate-lines): Doc fix.
11325
94e0933e
CY
113262011-09-24 Chong Yidong <cyd@stupidchicken.com>
11327
11328 * window.c (Fwindow_prev_buffers, Fset_window_prev_buffers)
11329 (Fset_window_next_buffers): Doc fix.
11330
cddde921
GM
113312011-09-24 Glenn Morris <rgm@gnu.org>
11332
11333 * minibuf.c (read_minibuf): Disable line truncation. (Bug#5715)
11334
1260aef1
PE
113352011-09-24 Paul Eggert <eggert@cs.ucla.edu>
11336
25b4bfa0
PE
11337 Fix minor problems found by static checking.
11338 * xdisp.c (string_from_display_spec): Don't assume vecsize fits in int.
1260aef1
PE
11339 * indent.c (Fvertical_motion): Fix == vs = typo.
11340
e3cbd34b
EZ
113412011-09-24 Eli Zaretskii <eliz@gnu.org>
11342
a66cfb1c
SM
11343 * dispnew.c (syms_of_display) <redisplay-dont-pause>:
11344 Default value is now t. Doc fix.
6bf7006f 11345
e3cbd34b 11346 * indent.c (Fvertical_motion): Compute and apply the overshoot
32c1fffd 11347 logic when moving up, not only when moving down. Fix the
e3cbd34b 11348 confusing name and values of the it_overshoot_expected variable;
32c1fffd 11349 logic changes accordingly. (Bug#9254) (Bug#9549)
e3cbd34b
EZ
11350
11351 * xdisp.c (pos_visible_p): Produce correct pixel coordinates when
11352 CHARPOS is covered by a display string which includes newlines.
11353 (move_it_vertically_backward): Avoid inflooping when START_CHARPOS
11354 is covered by a display string with embedded newlines.
11355
a3de0cbd
MA
113562011-09-24 Michael Albinus <michael.albinus@gmx.de>
11357
11358 * dbusbind.c (Fdbus_register_signal): Add match rule to
11359 Vdbus_registered_objects_table. (Bug#9581)
a66cfb1c
SM
11360 (Fdbus_register_method, Vdbus_registered_objects_table):
11361 Fix docstring.
a3de0cbd 11362
b260039d
JM
113632011-09-24 Jim Meyering <meyering@redhat.com>
11364
32c1fffd 11365 do not ignore write error for any output size
b260039d
JM
11366 The previous change was incomplete.
11367 While it makes emacs --batch detect the vast majority of stdout
11368 write failures, errors were still ignored whenever the output size is
11369 k * (BUFSIZ+1) - 4. E.g., on a system with BUFSIZ of 4096,
11370 $ emacs --batch --eval '(print (format "%4093d" 0))' > /dev/full \
11371 && echo FAIL: ignored write error
11372 FAIL: ignored write error
11373 $ emacs --batch --eval '(print (format "%20481d" 0))' > /dev/full \
11374 && echo FAIL: ignored write error
11375 FAIL: ignored write error
11376 * emacs.c (Fkill_emacs): Also test ferror. (Bug#9574)
11377
8eca8a7c
AS
113782011-09-23 Andreas Schwab <schwab@linux-m68k.org>
11379
11380 * emacs.c (Fkill_emacs): In noninteractive mode exit
11381 non-successfully if a write error occurred on stdout. (Bug#9574)
11382
3341db62
EZ
113832011-09-21 Eli Zaretskii <eliz@gnu.org>
11384
11385 * xdisp.c (pop_it): Allow it->object that is a cons cell to pass
11386 the xassert test.
11387
11388 * dispextern.h (struct it): Update the comment documenting what
11389 can it->OBJECT be.
11390
8c203dbf
EZ
113912011-09-20 Eli Zaretskii <eliz@gnu.org>
11392
11393 * xdisp.c (set_cursor_from_row): If the row ends in a newline from
11394 a display string, extend search for cursor position to end of row.
11395 (find_row_edges): If the row ends in a newline from a display
11396 string, increment its MATRIX_ROW_END_CHARPOS by one. (Bug#9549)
11397 Handle the case of a display string with multiple newlines.
fd317ddf
EZ
11398 (Fcurrent_bidi_paragraph_direction): Fix search for previous
11399 non-empty line. Fixes confusing cursor motion with arrow keys at
11400 the beginning of a line that starts with whitespace.
8c203dbf 11401
a4824228
LMI
114022011-09-19 Lars Magne Ingebrigtsen <larsi@gnus.org>
11403
11404 * lread.c (Fread_from_string): Document what FINAL-STRING-INDEX is
11405 (bug#9493).
11406
33ed493b
CY
114072011-09-18 Chong Yidong <cyd@stupidchicken.com>
11408
11409 * xfns.c (Fx_create_frame): Handle the bitmapIcon resource as
11410 boolean (Bug#9154).
11411
56cd55c8
EZ
114122011-09-18 Eli Zaretskii <eliz@gnu.org>
11413
11414 * xdisp.c (display_line): Record maximum and minimum buffer
11415 positions even if no glyphs were produced (e.g., by a zero-width
11416 stretch). Fixes bug#9530 on a TTY. Under word-wrap, don't record
11417 buffer positions that will be removed from the glyph row because
11418 they don't fit.
c02dcedf
EZ
11419 (produce_stretch_glyph): Fix a bug in :align-to on a TTY when the
11420 column is beyond frame width: don't subtract 1 "pixel" when
11421 computing width of the stretch.
3e62b7e0
EZ
11422 (reseat_at_next_visible_line_start): Undo the change made on
11423 2011-09-17 that saved paragraph information and restored it after
11424 the call to `reseat'. (Bug#9545)
56cd55c8 11425
5ed99d36 114262011-09-18 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
3390454c
YM
11427
11428 * xdisp.c (expose_window): Save original value of phys_cursor_on_p
11429 and turn window cursor on if cleared (Bug#9415).
11430
5ed99d36 114312011-09-18 Andreas Schwab <schwab@linux-m68k.org>
edb7b4dc
AS
11432
11433 * search.c (boyer_moore): Take unibyte characters from pattern
11434 literally. (Bug#9458)
11435
9bade7b2
EZ
114362011-09-18 Eli Zaretskii <eliz@gnu.org>
11437
11438 * xdisp.c (reseat_at_next_visible_line_start): Fix last change.
11439
e5e9d610
PE
114402011-09-18 Paul Eggert <eggert@cs.ucla.edu>
11441
87e4427a
PE
11442 Fix minor problem found by static checking.
11443 * xdisp.c (reseat_at_next_visible_line_start): Mark locals as
11444 initialized, to pacify gcc -Wuninitialized.
11445
e5e9d610
PE
11446 * fileio.c: Report proper errno when syscall falls.
11447 (Finsert_file_contents): Save and restore errno,
11448 so that report_file_error outputs the correct diagnostic.
11449 (Fwrite_region) [CLASH_DETECTION]: Likewise.
11450
a1674f0b
EZ
114512011-09-18 Eli Zaretskii <eliz@gnu.org>
11452
11453 * .gdbinit (pgx): Fix references to fields of `struct glyph'.
11454
fbfb6dd4
EZ
114552011-09-17 Eli Zaretskii <eliz@gnu.org>
11456
11457 * xdisp.c (produce_stretch_glyph): Another fix for changes made on
11458 2011-08-30T17:32:44Z!eliz@gnu.org. (Bug#9530)
11459
bb187662
EZ
114602011-09-17 Eli Zaretskii <eliz@gnu.org>
11461
1137e8b8 11462 * xdisp.c (reseat_at_next_visible_line_start): Keep information
6b02f655 11463 about the current paragraph and restore it after the call to reseat.
1137e8b8
EZ
11464
11465 * bidi.c (MAX_PARAGRAPH_SEARCH): New macro.
11466 (bidi_find_paragraph_start): Search back for paragraph beginning
11467 at most MAX_PARAGRAPH_SEARCH lines; if not found, return BEGV_BYTE.
11468 (bidi_move_to_visually_next): Only trigger paragraph-related
11469 computations when the last character is a newline or at EOB, not
11470 just any NEUTRAL_B. (Bug#9470)
11471
bb187662
EZ
11472 * xdisp.c (set_cursor_from_row): Don't invoke special treatment of
11473 truncated lines if point is covered by a display string. (Bug#9524)
11474
2e621251
PE
114752011-09-16 Paul Eggert <eggert@cs.ucla.edu>
11476
11477 * xselect.c: Relax test for outgoing X longs (Bug#9498).
11478 (cons_to_x_long): New function.
11479 (lisp_data_to_selection_data): Use it. Correct the test for
11480 short-versus-long data; it was negated. Break out of vector
11481 loop, for efficiency, when a long datum is discovered.
11482
91a15bc6
SM
114832011-09-16 Stefan Monnier <monnier@iro.umontreal.ca>
11484
11485 * eval.c (Fquote): Document its non-consing behavior (bug#9482).
11486
b41c3a35
EZ
114872011-09-16 Eli Zaretskii <eliz@gnu.org>
11488
11489 * image.c (tiff_handler): Work around a bug in MinGW GCC 3.x (see
11490 GCC PR/17406) by declaring this function with external scope.
11491
7812ba2d
PE
114922011-09-15 Paul Eggert <eggert@cs.ucla.edu>
11493
11494 * editfns.c (Fformat): Fix bug in text-property fix (Bug#9514).
11495 Don't mishandle (length (format "%%")) and (format "%4000s%%" "").
11496
cf7edc2a
AS
114972011-09-15 Andreas Schwab <schwab@linux-m68k.org>
11498
11499 * editfns.c (Fformat): Correctly handle text properties on "%%".
11500
bd01620e
EZ
115012011-09-15 Eli Zaretskii <eliz@gnu.org>
11502
11503 * xterm.c (x_draw_composite_glyph_string_foreground):
11504 * w32term.c (x_draw_composite_glyph_string_foreground):
11505 * term.c (encode_terminal_code):
11506 * composite.c (composition_update_it, get_composition_id):
11507 * xdisp.c (get_next_display_element)
11508 (fill_composite_glyph_string): Add comments about special meaning
11509 of TAB characters in a composition.
11510
a02719a3
PE
115112011-09-15 Paul Eggert <eggert@cs.ucla.edu>
11512
11513 * editfns.c (Fformat): Fix off-by-1 bug for "%%b" (Bug#9514).
4c122725
PE
11514 This occurs when processing a multibyte format.
11515 Problem reported by Wolfgang Jenker.
a02719a3 11516
72589a3c
JB
115172011-09-15 Johan Bockgård <bojohan@gnu.org>
11518
11519 * xdisp.c (try_cursor_movement): Only check for exact match if
11520 cursor hpos found by set_cursor_from_row is valid. (Bug#9495)
11521
1c14176c
PE
115222011-09-14 Paul Eggert <eggert@cs.ucla.edu>
11523
11524 Remove unused external symbols.
11525 * dispextern.h (calc_pixel_width_or_height): Remove decl.
11526 * xdisp.c (calc_pixel_width_or_height): Now static.
11527 * doprnt.c (exprintf) [! (HAVE_X_WINDOWS && USE_X_TOOLKIT)]: Remove.
11528 * indent.c (check_display_width):
11529 * w32term.c: Fix comment to match code.
11530 * xterm.c, xterm.h (x_catching_errors): Remove.
11531
d2eea5b5
PE
115322011-09-14 Paul Eggert <eggert@cs.ucla.edu>
11533
11534 * xselect.c: Use signed conversions more consistently (Bug#9498).
11535 (selection_data_to_lisp_data): Assume incoming selection data are
11536 signed integers, not unsigned. This is to be consistent with
11537 outgoing selection data, which was modified to use signed integers
11538 in as part of the fix to Bug#9196 in response to Jan D.'s comment
11539 in <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9196#32> that X11
11540 expects long, not unsigned long.
11541
46888499
EZ
115422011-09-14 Eli Zaretskii <eliz@gnu.org>
11543
11544 * xdisp.c (try_window_reusing_current_matrix): Fix incorrect
11545 computation of loop end. Reported by Johan Bockgård
11546 <bojohan@gnu.org>.
11547
ef8ef9fb
CY
115482011-09-13 Chong Yidong <cyd@stupidchicken.com>
11549
11550 * frame.c (Fother_visible_frames_p): Function deleted.
11551
fa819fed
EZ
115522011-09-12 Eli Zaretskii <eliz@gnu.org>
11553
11554 * indent.c (compute_motion): Process display vector front to back
11555 rather than the other way around. (Bug#2496)
11556
2ba8e008
SM
115572011-09-12 Stefan Monnier <monnier@iro.umontreal.ca>
11558
11559 * fileio.c (Finsert_file_contents): Don't assume beg_offset is 0.
11560
20f53c69
CY
115612011-09-11 Chong Yidong <cyd@stupidchicken.com>
11562
11563 * minibuf.c (Fread_from_minibuffer): Doc fix.
11564
d562d7a4
EZ
115652011-09-11 Eli Zaretskii <eliz@gnu.org>
11566
11567 * xdisp.c (produce_stretch_glyph): Fix a typo made in changes from
11568 2011-08-30T17:32:44Z!eliz@gnu.org. (Bug#9475)
11569
1c4d7f3d
LMI
115702011-09-11 Lars Magne Ingebrigtsen <larsi@gnus.org>
11571
11572 * fileio.c (Fvisited_file_modtime): Document `(-1 65535)' as a
11573 value for non-existent files.
11574
b885bf36
EZ
115752011-09-11 Eli Zaretskii <eliz@gnu.org>
11576
11577 * fileio.c (Finsert_file_contents): If the file cannot be opened,
11578 set its "size" to -1. This will set the modtime_size field of
11579 the corresponding buffer to -1, which is what
11580 verify-visited-file-modtime expects for files that do not exist.
11581 (Bug#9139)
11582
6612f0bf
PE
115832011-09-11 Paul Eggert <eggert@cs.ucla.edu>
11584
11585 * keymap.h (KEY_DESCRIPTION_SIZE, push_key_description): Move decls
11586 here ...
11587 * lisp.h: ... from here. push_key_description is no longer
11588 defined in keyboard.c, so its declaration should not be in
11589 lisp.h's "Defined in keyboard.c" section, and KEY_DESCRIPTION_SIZE
11590 logically belongs with push_key_description.
11591
dfb3f755
PE
115922011-09-10 Paul Eggert <eggert@cs.ucla.edu>
11593
11594 * buffer.h: Include <sys/types.h> instead of <time.h>.
11595 Otherwise, off_t wasn't defined on FreeBSD 9.0-BETA2 i386.
11596 Problem reported by Herbert J. Skuhra.
11597
3134906c
LMI
115982011-09-10 Lars Magne Ingebrigtsen <larsi@gnus.org>
11599
11600 * xml.c (parse_region): Make the parsing work for
11601 non-comment-starting XML files again (bug#9144).
11602
8d903f4e
AS
116032011-09-10 Andreas Schwab <schwab@linux-m68k.org>
11604
11605 * image.c (gif_load): Fix calculation of bottom and right corner.
11606 (Bug#9468)
11607
80ad64f4
EZ
116082011-09-10 Eli Zaretskii <eliz@gnu.org>
11609
11610 * xdisp.c (MAX_DISP_SCAN): Decrease to 250. Prevents sluggish
11611 redisplay in small windows.
11612
208a048d
EZ
116132011-09-09 Eli Zaretskii <eliz@gnu.org>
11614
11615 * frame.c (x_report_frame_params): Cast to avoid compiler warnings.
11616
9b1c252e
MR
116172011-09-08 Martin Rudalics <rudalics@gmx.at>
11618
11619 * window.c (Fset_window_prev_buffers, Fset_window_next_buffers):
11620 Operate on live windows only.
11621
2949f33b
JB
116222011-09-08 Juanma Barranquero <lekktu@gmail.com>
11623
11624 * emacs.c (my_heap_start): #ifdef to avoid warnings when unused.
11625
e08dcafd
EZ
116262011-09-07 Eli Zaretskii <eliz@gnu.org>
11627
11628 * xdisp.c (move_it_in_display_line_to): Call RESTORE_IT on ppos_it
11629 only under bidi iteration.
11630
115b96bd
JD
116312011-09-07 Jan Djärv <jan.h.d@swipnet.se>
11632
11633 * gtkutil.c (xg_make_tool_item): Insert comment about eventbox.
11634
c8199d0f
PE
116352011-09-06 Paul Eggert <eggert@cs.ucla.edu>
11636
11637 isnan: Fix porting problem to Solaris 10 with bundled gcc.
11638 Without this fix, the command to link temacs failed due to an
11639 undefined symbol __builtin_isnan. This is because
11640 /usr/include/iso/math_c99.h #defines isnan(x) to
11641 __builtin_isnan(x), but the bundled gcc, which identifies itself
11642 as gcc 3.4.3 (csl-sol210-3_4-branch+sol_rpath), does not have
11643 a __builtin_isnan.
11644 * floatfns.c (isnan): #undef, and then #define to a clone of
11645 what's in data.c.
11646 (Fisnan): Always define, since it's always available now.
11647 (syms_of_floatfns): Always define isnan at the Lisp level.
11648
e39b275c 116492011-09-06 Paul Eggert <eggert@cs.ucla.edu>
1c262cae
PE
11650
11651 * Makefile.in (gl-stamp): move-if-change now in build-aux (Bug#9169).
11652
b2db44d9 116532011-09-06 Paul Eggert <eggert@cs.ucla.edu>
728f8f0a 11654
f4af5137 11655 * fileio.c: Fix bugs with large file offsets (Bug#9428).
728f8f0a
PE
11656 The previous code assumed that file offsets (off_t values) fit in
11657 EMACS_INT variables, which is not true on typical 32-bit hosts.
11658 The code messed up by falsely reporting buffer overflow in cases
11659 such as (insert-file-contents "big" nil 1 2) into an empty buffer
11660 when "big" contains more than 2**29 bytes, even though this
11661 inserts just one byte and does not overflow the buffer.
11662 (Finsert_file_contents): Store file offsets as off_t
11663 values, not as EMACS_INT values. Check for overflow when
11664 converting between EMACS_INT and off_t. When checking for
11665 buffer overflow or for overlap, take the offsets into account.
11666 Don't use EMACS_INT for small values where int suffices.
11667 When checking for overlap, fix a typo: ZV was used where
11668 ZV_BYTE was intended.
11669 (Fwrite_region): Don't assume off_t fits into 'long'.
11670 * buffer.h (struct buffer.modtime_size): Now off_t, not EMACS_INT.
11671
ecfc0a49
MA
116722011-09-05 Michael Albinus <michael.albinus@gmx.de>
11673
11674 * dbusbind.c (xd_signature_cat): Rename from signature_cat.
11675
6511acf2 116762011-09-04 Paul Eggert <eggert@cs.ucla.edu>
61bfeeb7 11677
0999621a 11678 sprintf-related integer and memory overflow issues (Bug#9412).
62f19c19
PE
11679
11680 * doprnt.c (doprnt): Support printing ptrdiff_t and intmax_t values.
8666506e 11681 (esprintf, exprintf, evxprintf): New functions.
62f19c19 11682 * keyboard.c (command_loop_level): Now EMACS_INT, not int.
6b02f655 11683 (cmd_error): Kbd macro iterations count is now EMACS_INT, not int.
62f19c19
PE
11684 (modify_event_symbol): Do not assume that the length of
11685 name_alist_or_stem is safe to alloca and fits in int.
11686 (Fexecute_extended_command): Likewise for function name and binding.
11687 (Frecursion_depth): Wrap around reliably on integer overflow.
11688 * keymap.c (push_key_description): First arg is now EMACS_INT, not int,
11689 since some callers pass EMACS_INT values.
11690 (Fsingle_key_description): Don't crash if symbol name contains more
11691 than MAX_ALLOCA bytes.
11692 * minibuf.c (minibuf_level): Now EMACS_INT, not int.
11693 (get_minibuffer): Arg is now EMACS_INT, not int.
11694 * lisp.h (get_minibuffer, push_key_description): Reflect API changes.
8666506e 11695 (esprintf, exprintf, evxprintf): New decls.
62f19c19
PE
11696 * window.h (command_loop_level, minibuf_level): Reflect API changes.
11697
2be7d702
PE
11698 * dbusbind.c (signature_cat): New function.
11699 (xd_signature, Fdbus_register_signal):
2ea16b89
PE
11700 Do not overrun buffer; instead, report string overflow.
11701
9d1df220
PE
11702 * dispnew.c (add_window_display_history): Don't overrun buffer.
11703 Truncate instead; this is OK since it's just a log.
11704
33ef5c64
PE
11705 * editfns.c (Fcurrent_time_zone): Don't overrun buffer
11706 even if the time zone offset is outlandishly large.
11707 Don't mishandle offset == INT_MIN.
11708
66c6fdd5
PE
11709 * emacs.c (main) [NS_IMPL_COCOA]: Don't overrun buffer
11710 when creating daemon; the previous buffer-overflow check was incorrect.
11711
d749b01b
PE
11712 * eval.c (verror): Simplify by rewriting in terms of evxprintf,
11713 which has the guts of the old verror function.
11714
b5cd1905
PE
11715 * filelock.c (lock_file_1, lock_file): Don't blindly alloca long name;
11716 use SAFE_ALLOCA instead. Use esprintf to avoid int-overflow issues.
11717
6e1a67fb
PE
11718 * font.c: Include <float.h>, for DBL_MAX_10_EXP.
11719 (font_unparse_xlfd): Don't blindly alloca long strings.
c21721cc 11720 Don't assume XINT result fits in int, or that XFLOAT_DATA * 10
8666506e 11721 fits in int, when using sprintf. Use single snprintf to count
c21721cc
PE
11722 length of string rather than counting it via multiple sprintfs;
11723 that's simpler and more reliable.
c21721cc
PE
11724 (font_unparse_fcname): Use it to avoid sprintf buffer overrun.
11725 (generate_otf_features) [0 && HAVE_LIBOTF]: Use esprintf, not
11726 sprintf, in case result does not fit in int.
11727
c57b67fc
PE
11728 * fontset.c (num_auto_fontsets): Now printmax_t, not int.
11729 (fontset_from_font): Print it.
11730
8a401434
PE
11731 * frame.c (tty_frame_count): Now printmax_t, not int.
11732 (make_terminal_frame, set_term_frame_name): Print it.
11733 (x_report_frame_params): In X, window IDs are unsigned long,
11734 not signed long, so print them as unsigned.
11735 (validate_x_resource_name): Check for implausibly long names,
11736 and don't assume name length fits in 'int'.
11737 (x_get_resource_string): Don't blindly alloca invocation name;
11738 use SAFE_ALLOCA. Use esprintf, not sprintf, in case result does
11739 not fit in int.
11740
6e1a67fb
PE
11741 * gtkutil.c: Include <float.h>, for DBL_MAX_10_EXP.
11742 (xg_check_special_colors, xg_set_geometry):
84722b3d
PE
11743 Make sprintf buffers a bit bigger, to avoid potential buffer overrun.
11744
0df02bf3
PE
11745 * lread.c (dir_warning): Don't blindly alloca buffer; use SAFE_ALLOCA.
11746 Use esprintf, not sprintf, in case result does not fit in int.
11747
48e30793
PE
11748 * macros.c (executing_kbd_macro_iterations): Now EMACS_INT, not int.
11749 (Fend_kbd_macro): Don't mishandle MOST_NEGATIVE_FIXNUM by treating
11750 it as a large positive number.
11751 (Fexecute_kbd_macro): Don't assume repeat count fits in int.
11752 * macros.h (executing_kbd_macro_iterations): Now EMACS_INT, not int.
11753
a66ff6d8
PE
11754 * nsterm.m ((NSSize)windowWillResize): Use esprintf, not sprintf,
11755 in case result does not fit in int.
11756
aca216ff
PE
11757 * print.c (float_to_string): Detect width overflow more reliably.
11758 (print_object): Make sprintf buffer a bit bigger, to avoid potential
11759 buffer overrun. Don't assume list length fits in 'int'. Treat
11760 print length of 0 as 0, not as infinity; to be consistent with other
11761 uses of print length in this function. Don't overflow print length
11762 index. Don't assume hash table size fits in 'long', or that
11763 vectorlike size fits in 'unsigned long'.
11764
31c286f7
PE
11765 * process.c (make_process): Use printmax_t, not int, to format
11766 process-name gensyms.
11767
55e5faa1
PE
11768 * sysdep.c (snprintf) [! HAVE_SNPRINTF]: New function.
11769
80f2e268
PE
11770 * term.c (produce_glyphless_glyph): Make sprintf buffer a bit bigger
11771 to avoid potential buffer overrun.
11772
670741ab
PE
11773 * xfaces.c (x_update_menu_appearance): Don't overrun buffer
11774 if X resource line is longer than 512 bytes.
11775
b7163a50
PE
11776 * xfns.c (x_window): Make sprintf buffer a bit bigger
11777 to avoid potential buffer overrun.
11778
ae58ff1f
PE
11779 * xterm.c (x_io_error_quitter): Don't overrun sprintf buffer.
11780
c43c8a6a
PE
11781 * xterm.h (x_check_errors): Add ATTRIBUTE_FORMAT_PRINTF.
11782
3f8236f4
PE
117832011-09-04 Paul Eggert <eggert@cs.ucla.edu>
11784
53e9fe90 11785 Integer overflow fixes for scrolling, etc.
6511acf2
PE
11786 Without these, Emacs silently mishandles large integers sometimes.
11787 For example, "C-u 4294967297 M-x recenter" was treated as if
53e9fe90
PE
11788 it were "C-u 1 M-x recenter" on a typical 64-bit host.
11789
6511acf2
PE
11790 * xdisp.c (try_window_id): Check Emacs fixnum range before
11791 converting to 'int'.
806add1d 11792
6511acf2 11793 * window.c (window_scroll_line_based, Frecenter):
71f02bc5
PE
11794 Check that an Emacs fixnum is in range before assigning it to 'int'.
11795 (Frecenter, Fmove_to_window_line): Use EMACS_INT, not int, for
11796 values converted from Emacs fixnums.
11797 (Frecenter): Don't wrap around a line count if it is out of 'int'
11798 range; instead, treat it as an extreme value.
11799 (Fset_window_configuration, compare_window_configurations):
11800 Use ptrdiff_t, not int, for index that might exceed 2 GiB.
11801
6511acf2
PE
11802 * search.c (Freplace_match): Use ptrdiff_t, not int, for indexes
11803 that can exceed INT_MAX. Check that EMACS_INT value is in range
11804 before assigning it to the (possibly-narrower) index.
a0efffc8
PE
11805 (match_limit): Don't assume that a fixnum can fit in 'int'.
11806
6511acf2 11807 * print.c (print_object): Use ptrdiff_t, not int, for index that can
29ebea3b
PE
11808 exceed INT_MAX.
11809
6511acf2 11810 * indent.c (position_indentation): Now takes ptrdiff_t, not int.
3f8236f4
PE
11811 (Fvertical_motion): Don't wrap around LINES values that don't fit
11812 in 'int'. Instead, treat them as extreme values. This is good
11813 enough for windows, which can't have more than INT_MAX lines anyway.
11814
fcb901a7
LMI
118152011-09-03 Lars Magne Ingebrigtsen <larsi@gnus.org>
11816
0f2f6b6d
LMI
11817 * Require libxml/parser.h to avoid compilation warning.
11818
fcb901a7
LMI
11819 * emacs.c (shut_down_emacs): Call xmlCleanupParser on shutdown.
11820
11821 * xml.c (parse_region): Don't call xmlCleanupParser after parsing,
11822 since this reportedly can destroy thread storage.
11823
6e20a0d4
CY
118242011-08-30 Chong Yidong <cyd@stupidchicken.com>
11825
11826 * syntax.c (find_defun_start): Update all cache variables if
11827 exiting early (Bug#9401).
11828
148ae00e
EZ
118292011-08-30 Eli Zaretskii <eliz@gnu.org>
11830
f6cfbd8f
EZ
11831 * image.c (x_bitmap_pixmap): Cast to int to avoid compiler warnings.
11832
148ae00e
EZ
11833 * xdisp.c (produce_stretch_glyph): No longer static, compiled also
11834 when HAVE_WINDOW_SYSTEM is not defined. Support both GUI and TTY
11835 frames. Call tty_append_glyph in the TTY case. (Bug#9402)
11836
11837 * term.c (tty_append_glyph): New function.
11838 (produce_stretch_glyph): Static function and its prototype deleted.
11839
a66cfb1c
SM
11840 * dispextern.h (produce_stretch_glyph, tty_append_glyph):
11841 Add prototypes.
148ae00e 11842
c4a07a4c
PE
118432011-08-29 Paul Eggert <eggert@cs.ucla.edu>
11844
11845 * image.c (parse_image_spec): Check for nonnegative, not for positive,
11846 when checking :margin (Bug#9390).
11847 (IMAGE_NON_NEGATIVE_INTEGER_VALUE_OR_PAIR):
a66cfb1c 11848 Rename from IMAGE_POSITIVE_INTEGER_VALUE_OR_PAIR,
c4a07a4c
PE
11849 so that the name doesn't mislead. All uses changed.
11850
6bc8cd65
JB
118512011-08-28 Johan Bockgård <bojohan@gnu.org>
11852
11853 * term.c (init_tty) [HAVE_GPM]: Move mouse settings after
11854 set_tty_hooks.
11855
dca4927e
EZ
118562011-08-27 Eli Zaretskii <eliz@gnu.org>
11857
11858 * xdisp.c (move_it_to): Don't bail out early when reaching
11859 position beyond to_charpos, if we are scanning backwards.
11860 (move_it_vertically_backward): When DY == 0, make sure we get to
11861 the first character in the line after the newline.
11862
f2cad773
PE
118632011-08-27 Paul Eggert <eggert@cs.ucla.edu>
11864
11865 * ccl.c: Improve and simplify overflow checking (Bug#9196).
11866 (ccl_driver): Do not generate an out-of-range pointer.
11867 (Fccl_execute_on_string): Remove unnecessary check for
11868 integer overflow, noted by Stefan Monnier in
11869 <http://lists.gnu.org/archive/html/emacs-devel/2011-08/msg00979.html>.
11870 Remove a FIXME that didn't need fixing.
11871 Simplify the newly-introduced buffer reallocation code.
11872
0cae2cdb
JB
118732011-08-27 Juanma Barranquero <lekktu@gmail.com>
11874
11875 * makefile.w32-in ($(BLD)/alloc.$(O)): Depend on lib/verify.h.
11876
5fc295a4 118772011-08-26 Paul Eggert <eggert@cs.ucla.edu>
ddff3151 11878
70c60eb2 11879 Integer and memory overflow issues (Bug#9196).
726e0ab1 11880
d31850da
PE
11881 * doc.c (get_doc_string): Rework so that
11882 get_doc_string_buffer_size is the actual buffer size, rather than
11883 being 1 less than the actual buffer size; this makes xpalloc more
11884 convenient.
11885
a69fbedb
PE
11886 * image.c (x_allocate_bitmap_record, cache_image):
11887 * xselect.c (Fx_register_dnd_atom):
11888 Simplify previous changes by using xpalloc.
11889
fe5c5d37
PE
11890 * buffer.c (overlay_str_len): Now ptrdiff_t, not EMACS_INT,
11891 since either will do and ptrdiff_t is convenient with xpalloc.
11892
0065d054
PE
11893 * charset.c (charset_table_size)
11894 (struct charset_sort_data.priority): Now ptrdiff_t.
11895 (charset_compare): Don't overflow if priorities differ greatly.
11896 (Fsort_charsets): Don't assume list length fits in int.
11897 Check for size-calculation overflow when allocating sort data.
11898 (syms_of_charset): Allocate an initial charset table that is
11899 just under 64 KiB, to avoid problems with glibc malloc and mmap.
11900
11901 * cmds.c (internal_self_insert): Check for size-calculation overflow.
11902
11903 * composite.h (struct composition.glyph_len): Now int, not unsigned.
11904 The actual value is always <= INT_MAX, and leaving it unsigned made
11905 overflow checking harder.
11906
11907 * dispextern.h (struct glyph_matrix.rows_allocated)
11908 (struct face_cache.size): Now ptrdiff_t, for convenience in use
11909 with xpalloc. The values are still always <= INT_MAX.
11910
11911 * indent.c (compute_motion): Adjust to region_cache_forward sig change.
11912
11913 * lisp.h (xnmalloc, xnrealloc, xpalloc): New decls.
11914 (SAFE_NALLOCA): New macro.
11915
11916 * region-cache.c (struct boundary.pos, find_cache_boundary)
11917 (move_cache_gap, insert_cache_boundary, delete_cache_boundaries)
11918 (set_cache_region, invalidate_region_cache)
11919 (revalidate_region_cache, know_region_cache, region_cache_forward)
11920 (region_cache_backward, pp_cache):
11921 Use ptrdiff_t, not EMACS_INT, since either will do. This is needed
11922 so that ptrdiff_t * can be passed to xpalloc.
11923 (struct region_cache): Similarly, for gap_start, gap_len, cache_len,
11924 beg_unchanged, end_unchanged, buffer_beg, buffer_end members.
11925 (pp_cache): Don't assume cache_len fits in int.
11926 * region-cache.h: Adjust extern decls to match.
11927
11928 * search.c (scan_buffer, Freplace_match): Use ptrdiff_t, not
11929 EMACS_INT, since either will do, for xpalloc.
11930
11931 * alloc.c: Include verify.h, and check that int fits in ptrdiff_t.
11932 (xnmalloc, xnrealloc, xpalloc): New functions.
11933
726e0ab1
PE
11934 * bidi.c (bidi_shelve_header_size): New constant.
11935 (bidi_cache_ensure_space, bidi_shelve_cache): Use it.
11936 (bidi_cache_ensure_space): Avoid integer overflow when allocating.
11937
51f30bc5 11938 * bidi.c (bidi_cache_shrink):
726e0ab1
PE
11939 * buffer.c (overlays_at, overlays_in, record_overlay_string)
11940 (overlay_strings):
11941 Don't update size of array until after memory allocation succeeds,
11942 because xmalloc/xrealloc may not return.
0065d054
PE
11943 (struct sortstrlist.bytes): Now ptrdiff_t, as EMACS_INT doesn't help
11944 now that we have proper integer overflow checking.
11945 (record_overlay_string, overlay_strings): Catch overflows when
11946 calculating size of overlay_str_buf.
726e0ab1 11947
0065d054
PE
11948 * callproc.c (Fcall_process): Check for size overflow when
11949 calculating size of args2.
11950 (child_setup): Avoid overflow by using size_t rather than ptrdiff_t.
11951 Normally we prefer signed values, but sticking with ptrdiff_t would
11952 require adding more-complicated checks.
726e0ab1
PE
11953
11954 * ccl.c (Fccl_execute_on_string): Check for memory overflow.
11955 Use ptrdiff_t rather than EMACS_INT where ptrdiff_t will do.
11956 Redo buffer-overflow calculations to avoid integer overflow.
0065d054 11957 Add a FIXME comment where memory seems to be over-allocated.
726e0ab1
PE
11958
11959 * character.c (Fstring): Check for size-calculation overflow.
11960
11961 * coding.c (produce_chars): Redo buffer-overflow calculations to avoid
11962 unnecessary integer overflow. Check for size overflow.
11963 (encode_coding_object): Don't update size until xmalloc succeeds.
11964
11965 * composite.c (get_composition_id): Check for overflow in glyph
11966 length calculations.
11967
11968 Integer and memory overflow fixes for display code.
11969 * dispextern.h (struct glyph_pool.nglyphs): Now ptrdiff_t, not int.
11970 * dispnew.c (adjust_glyph_matrix, realloc_glyph_pool)
11971 (scrolling_window): Check for overflow in size calculations.
11972 (line_draw_cost, realloc_glyph_pool, add_row_entry):
11973 Don't assume glyph table len fits in int.
11974 (struct row_entry.bucket, row_entry_pool_size, row_entry_idx)
11975 (row_table_size): Now ptrdiff_t, not int.
11976 (scrolling_window): Avoid overflow in size calculations.
11977 Don't update size until allocation succeeds.
11978 * fns.c (concat): Check for overflow in size calculations.
11979 (next_almost_prime): Verify NEXT_ALMOST_PRIME_LIMIT.
11980 * lisp.h (RANGED_INTEGERP, TYPE_RANGED_INTEGERP): New macros.
11981 (NEXT_ALMOST_PRIME_LIMIT): New constant.
11982
11983 * doc.c (get_doc_string_buffer_size): Now ptrdiff_t, not int.
11984 (get_doc_string): Check for size calculation overflow.
11985 Don't update size until allocation succeeds.
11986 (get_doc_string, Fsubstitute_command_keys): Use ptrdiff_t, not
11987 EMACS_INT, where ptrdiff_t will do.
11988 (Fsubstitute_command_keys): Check for string overflow.
11989
11990 * editfns.c (set_time_zone_rule): Don't assume environment length
11991 fits in int.
11992 (message_length): Now ptrdiff_t, not int.
11993 (Fmessage_box): Don't update size until allocation succeeds.
11994 Don't assume message length fits in int.
11995 (Fformat): Use ptrdiff_t, not EMACS_INT, where ptrdiff_t will do.
11996
0065d054
PE
11997 * emacs.c (main): Do not reallocate argv, since there is a null at
11998 the end that can be overwritten, and this way there's no need to
11999 worry about size-calculation overflow.
12000 (sort_args): Check for size-calculation overflow.
726e0ab1
PE
12001
12002 * eval.c (init_eval_once, grow_specpdl): Don't update size until
12003 alloc succeeds.
12004 (call_debugger, grow_specpdl): Redo calculations to avoid overflow.
12005
12006 * frame.c (set_menu_bar_lines, x_set_frame_parameters)
12007 (x_set_scroll_bar_width, x_figure_window_size):
12008 Check for integer overflow.
12009 (x_set_alpha): Do not assume XINT fits in int.
12010
12011 * frame.h (struct frame): Use int, not EMACS_INT, where int works.
12012 This is for the members text_lines, text_cols, total_lines, total_cols,
12013 where the system imposes an 'int' limit.
12014
12015 * fringe.c (Fdefine_fringe_bitmap):
12016 Don't update size until alloc works.
12017
12018 * ftfont.c (ftfont_get_open_type_spec, setup_otf_gstring)
12019 (ftfont_shape_by_flt): Check for integer overflow in size calculations.
12020
12021 * gtkutil.c (get_utf8_string, xg_store_widget_in_map):
12022 Check for size-calculation overflow.
12023 (get_utf8_string): Use ptrdiff_t, not size_t, where either will
12024 do, as we prefer signed integers.
12025 (id_to_widget.max_size, id_to_widget.used)
12026 (xg_store_widget_in_map, xg_remove_widget_from_map)
12027 (xg_get_widget_from_map, xg_get_scroll_id_for_window)
12028 (xg_remove_scroll_bar, xg_update_scrollbar_pos):
12029 Use and return ptrdiff_t, not int.
12030 (xg_gtk_scroll_destroy): Don't assume ptrdiff_t fits in int.
12031 * gtkutil.h: Change prototypes to match the above.
12032
12033 * image.c (RANGED_INTEGERP, TYPE_RANGED_INTEGERP): Remove; these
12034 are duplicate now that they've been promoted to lisp.h.
12035 (x_allocate_bitmap_record, x_alloc_image_color)
12036 (make_image_cache, cache_image, xpm_load):
12037 Don't update size until alloc is done.
12038 (xpm_load, lookup_rgb_color, lookup_pixel_color, x_to_xcolors)
12039 (x_detect_edges):
3256efce 12040 Check for size calculation overflow.
726e0ab1
PE
12041 (ct_colors_allocated_max): New constant.
12042 (x_to_xcolors, x_detect_edges): Reorder multiplicands to avoid
12043 overflow.
3256efce 12044
726e0ab1
PE
12045 * keyboard.c (read_char, menu_bar_items, tool_bar_items)
12046 (read_char_x_menu_prompt, read_char_minibuf_menu_width)
12047 (read_char_minibuf_menu_prompt, follow_key, read_key_sequence):
12048 Use ptrdiff_t, not int, to count maps.
12049 (read_char_minibuf_menu_prompt): Check for overflow in size
a66cfb1c
SM
12050 calculations. Don't update size until allocation succeeds.
12051 Redo calculations to avoid overflow.
726e0ab1
PE
12052 * keyboard.h: Change prototypes to match the above.
12053
12054 * keymap.c (cmm_size, current_minor_maps): Use ptrdiff_t, not int,
12055 to count maps.
12056 (current_minor_maps): Check for size calculation overflow.
12057 * keymap.h: Change prototypes to match the above.
12058
12059 * lread.c (read1, init_obarray): Don't update size until alloc done.
12060
12061 * macros.c (Fstart_kbd_macro): Don't update size until alloc done.
12062 (store_kbd_macro_char): Reorder multiplicands to avoid overflow.
12063
726e0ab1
PE
12064 * nsterm.h (struct ns_color_table.size, struct ns_color_table.avail):
12065 Now ptrdiff_t, not int.
12066 * nsterm.m (ns_index_color): Use ptrdiff_t, not int, for table indexes.
12067 (ns_draw_fringe_bitmap): Rewrite to avoid overflow.
12068
12069 * process.c (Fnetwork_interface_list): Check for overflow
12070 in size calculation.
12071
12072 * region-cache.c (move_cache_gap): Check for size calculation overflow.
12073
12074 * scroll.c (do_line_insertion_deletion_costs): Check for size calc
12075 overflow. Don't bother calling xmalloc when xrealloc will do.
12076
12077 * search.c (Freplace_match): Check for size calculation overflow.
12078 (Fset_match_data): Don't assume list lengths fit in 'int'.
12079
12080 * sysdep.c (system_process_attributes): Use ptrdiff_t, not int,
12081 for command line length. Do not attempt to address one before the
12082 beginning of an array, as that's not portable.
12083
12084 * term.c (max_frame_lines): Remove; unused.
12085 (encode_terminal_src_size, encode_terminal_dst_size): Now ptrdiff_t,
12086 not int.
12087 (encode_terminal_code, calculate_costs): Check for size
12088 calculation overflow.
12089 (encode_terminal_code): Use ptrdiff_t, not int, to record glyph
12090 table lengths and related sizes. Don't update size until alloc
12091 done. Redo calculations to avoid overflow.
12092 (calculate_costs): Don't bother calling xmalloc when xrealloc will do.
12093
12094 * termcap.c (tgetent): Use ptrdiff_t, not int, to record results of
12095 subtracting pointers.
12096 (gobble_line): Check for overflow more carefully. Don't update size
12097 until alloc done.
12098
12099 * tparam.c (tparam1): Use ptrdiff_t, not int, for sizes.
12100 Don't update size until alloc done.
12101 Redo size calculations to avoid overflow.
12102 Check for size calculation overflow.
0065d054 12103 (main) [DEBUG]: Fix typo in invoking tparam1.
726e0ab1
PE
12104
12105 * xdisp.c (store_mode_line_noprop_char, x_consider_frame_title):
12106 Use ptrdiff_t, not int, for sizes.
12107 (store_mode_line_noprop_char): Don't update size until alloc done.
12108
0065d054
PE
12109 * xfaces.c (lface_id_to_name_size, Finternal_make_lisp_face):
12110 Use ptrdiff_t, not int, for sizes.
12111 (Finternal_make_lisp_face, cache_face):
12112 Check for size calculation overflow.
12113 (cache_face): Treat size calculation overflows as if they were
12114 memory exhaustion (the usual treatment), rather than aborting.
726e0ab1
PE
12115
12116 * xfns.c (x_encode_text, x_set_name_internal)
12117 (Fx_change_window_property): Use ptrdiff_t, not int, to count
12118 sizes, since they can exceed INT_MAX in size. Check for size
12119 calculation overflow.
12120
0065d054
PE
12121 * xgselect.c (gfds_size): Now ptrdiff_t, for convenience with xpalloc.
12122 (xg_select): Check for size calculation overflow.
726e0ab1
PE
12123 Don't update size until alloc done.
12124
0065d054 12125 * xrdb.c (get_environ_db): Don't assume path length fits in int,
726e0ab1 12126 as sprintf is limited to int lengths.
1d526e2f 12127
252c5ee1
PE
12128 * xselect.c (X_LONG_SIZE, X_SHRT_MAX, X_SHRT_MIN, X_LONG_MAX)
12129 (X_LONG_MIN): New macros.
864d7ce7
PE
12130 Use them to make the following changes clearer.
12131 (MAX_SELECTION_QUANTUM): Make the other bounds on this value clearer.
12132 This change doesn't affect the value now, but it may help remind
12133 future maintainers not to raise the value too much later.
12134 (SELECTION_QUANTUM): Remove, replacing with ...
12135 (selection_quantum): ... new function, which avoids overflow.
12136 All uses changed.
12137 (struct selection_data.size): Now ptrdiff_t, not int, to avoid
12138 assumption that selection length fits in 'int'.
12139 (x_reply_selection_request, x_handle_selection_request)
12140 (x_get_window_property, receive_incremental_selection)
12141 (x_get_window_property_as_lisp_data, selection_data_to_lisp_data)
12142 (lisp_data_to_selection_data, clean_local_selection_data):
12143 Use ptrdiff_t, not int, to record length of selection.
12144 (x_reply_selection_request, x_get_window_property)
12145 (receive_incremental_selection, x_property_data_to_lisp):
12146 Redo calculations to avoid overflow.
12147 (x_reply_selection_request): When sending hint, ceiling it at
252c5ee1 12148 X_LONG_MAX rather than relying on wraparound overflow to send
864d7ce7
PE
12149 something.
12150 (x_get_window_property, receive_incremental_selection)
12151 (lisp_data_to_selection_data, x_property_data_to_lisp):
12152 Check for size-calculation overflow.
12153 (x_get_window_property, receive_incremental_selection)
12154 (lisp_data_to_selection_data, Fx_register_dnd_atom):
12155 Don't store size until memory allocation succeeds.
12156 (x_get_window_property): Plug memory leak on memory exhaustion.
12157 Don't double-block input; malloc is safe here. Don't assume 2**34
12158 - 4 fits in unsigned long. Add an xassert to check
12159 XGetWindowProperty overflow. Be more careful about overflow
12160 calculations, and distinguish size from memory overflow better.
12161 (receive_incremental_selection): When tracing, don't assume
12162 unsigned int is less than INT_MAX.
12163 (x_selection_data_to_lisp_data): Remove unnecessary (and in theory
12164 harmful) conversions of unsigned short to int.
12165 (lisp_data_to_selection_data): Don't assume that integers
12166 in the range -65535 through -1 fit in an X unsigned short.
12167 Don't assume that ULONG_MAX == X_ULONG_MAX. Don't store into
12168 result parameters unless successful. Rely on cons_to_unsigned
12169 to report problems with elements; the old code wasn't right anyway.
12170 (x_check_property_data): Check for int overflow; we cannot use
12171 a wider type due to X limits.
12172 (x_handle_dnd_message): Use unsigned int, to avoid int overflow.
12173
726e0ab1 12174 * xsmfns.c (smc_save_yourself_CB): Check for size calc overflow.
34db673b 12175
0065d054
PE
12176 * xterm.c (x_color_cells, x_send_scrollbar_event, handle_one_xevent)
12177 (x_term_init): Check for size calculation overflow.
726e0ab1
PE
12178 (x_color_cells): Don't store size until memory allocation succeeds.
12179 (handle_one_xevent): Use ptrdiff_t, not int, for byte counts.
0065d054 12180 Don't assume alloca size is less than MAX_ALLOCA.
726e0ab1
PE
12181 (x_term_init): Don't assume length fits in int (sprintf is limited
12182 to int size).
bc18e09d 12183
ebfa62c0
PE
12184 Use ptrdiff_t for composition IDs.
12185 * character.c (lisp_string_width):
12186 * composite.c (composition_table_size, n_compositions)
12187 (get_composition_id, composition_gstring_from_id):
12188 * dispextern.h (struct glyph_string.cmp_id, struct composition_it.id):
12189 * xdisp.c (BUILD_COMPOSITE_GLYPH_STRING):
12190 * window.c (Frecenter):
12191 Use ptrdiff_t, not int, for composition IDs.
12192 * composite.c (get_composition_id): Check for integer overflow.
12193 * composite.h: Adjust prototypes to match the above changes.
12194
d3411f89
PE
12195 Use ptrdiff_t for hash table indexes.
12196 * category.c (hash_get_category_set):
12197 * ccl.c (ccl_driver):
12198 * charset.h (struct charset.hash_index, CHECK_CHARSET_GET_ID):
12199 * coding.c (coding_system_charset_list, detect_coding_system):
12200 * coding.h (struct coding_system.id):
12201 * composite.c (get_composition_id, gstring_lookup_cache):
12202 * fns.c (hash_lookup, hash_put, Fgethash, Fputhash):
12203 * image.c (xpm_get_color_table_h):
12204 * lisp.h (hash_lookup, hash_put):
12205 * minibuf.c (Ftest_completion):
12206 Use ptrdiff_t for hash table indexes, not int (which is too
12207 narrow, on 64-bit hosts) or EMACS_INT (which is too wide, on
12208 32-bit --with-wide-int hosts).
12209
e097a6fa
PE
12210 * charset.c (Fdefine_charset_internal): Check for integer overflow.
12211 Add a FIXME comment about memory leaks.
12212 (syms_of_charset): Don't assume xmalloc returns.
12213
5637687f
PE
12214 Don't assume that stated character widths fit in int.
12215 * character.c (Fchar_width, c_string_width, lisp_string_width):
12216 * character.h (CHAR_WIDTH):
12217 * indent.c (MULTIBYTE_BYTES_WIDTH):
12218 Use sanitize_char_width to avoid undefined and/or bad behavior
12219 with outlandish widths.
a66cfb1c 12220 * character.h (sanitize_tab_width): Rename from sanitize_width,
5637687f
PE
12221 now that we have two such functions. All uses changed.
12222 (sanitize_char_width): New inline function.
12223
a2271ba2
PE
12224 Don't assume that tab-width fits in int.
12225 * character.h (sanitize_width): New inline function.
12226 (SANE_TAB_WIDTH): New macro.
12227 (ASCII_CHAR_WIDTH): Use it.
12228 * indent.c (sane_tab_width): Remove. All uses replaced by
12229 SANE_TAB_WIDTH (current_buffer).
12230 * xdisp.c (init_iterator): Use SANE_TAB_WIDTH.
12231
18c52557
PE
12232 * fileio.c: Integer overflow issues with file modes.
12233 (Fset_file_modes, auto_save_1): Don't assume EMACS_INT fits in int.
12234
caeeedc1
PE
12235 * charset.c (read_hex): New arg OVERFLOW. All uses changed.
12236 Remove unreachable code.
12237 (read_hex, load_charset_map_from_file): Check for integer overflow.
12238
6df6ae42 12239 * xterm.c: Don't go over XClientMessageEvent limit.
50849c52
PE
12240 (scroll_bar_windows_size): Now ptrdiff_t, as we prefer signed.
12241 (x_send_scroll_bar_event): Likewise. Check that the size does not
12242 exceed limits imposed by XClientMessageEvent, as well as the usual
12243 ptrdiff_t and size_t limits.
12244
b13995db
PE
12245 * keyboard.c: Overflow, signedness and related fixes.
12246 (make_lispy_movement): Use same integer type in forward decl
12247 that is used in the definition.
12248 (read_key_sequence, keyremap_step):
12249 Change bufsize argument back to int, undoing my 2011-03-30 change.
12250 We prefer signed types, and int is wide enough here.
12251 (parse_tool_bar_item): Don't assume tool_bar_max_label_size is less
12252 than TYPE_MAXIMUM (EMACS_INT) / 2. Don't let the label size grow
12253 larger than STRING_BYTES_BOUND. Use ptrdiff_t for Emacs string
12254 length, not size_t. Use ptrdiff_t for index, not int.
12255 (keyremap_step, read_key_sequence): Redo bufsize check to avoid
12256 possibility of integer overflow.
12257
13464394
PE
12258 Overflow, signedness and related fixes for images.
12259
12260 * dispextern.h (struct it.stack[0].u.image.image_id)
12261 (struct_it.image_id, struct image.id, struct image_cache.size)
12262 (struct image_cache.used, struct image_cache.ref_count):
12263 * gtkutil.c (update_frame_tool_bar):
12264 * image.c (x_reference_bitmap, Fimage_size, Fimage_mask_p)
12265 (Fimage_metadata, free_image_cache, clear_image_cache, lookup_image)
12266 (cache_image, mark_image_cache, x_kill_gs_process, Flookup_image):
12267 * nsmenu.m (update_frame_tool_bar):
12268 * xdisp.c (calc_pixel_width_or_height):
12269 * xfns.c (image_cache_refcount):
12270 Image IDs are now ptrdiff_t, not int, to avoid arbitrary limits
12271 on typical 64-bit hosts.
12272
12273 * image.c (RANGED_INTEGERP, TYPE_RANGED_INTEGERP): New macros.
12274 (x_bitmap_pixmap, x_create_x_image_and_pixmap):
12275 Omit unnecessary casts to int.
12276 (parse_image_spec): Check that integers fall into 'int' range
12277 when the callers expect that.
12278 (image_ascent): Redo ascent calculation to avoid int overflow.
12279 (clear_image_cache): Avoid overflow when sqrt (INT_MAX) < nimages.
12280 (lookup_image): Remove unnecessary tests.
12281 (xbm_image_p): Locals are now of int, not EMACS_INT,
12282 since parse_image_check makes sure they fit into int.
12283 (png_load, gif_load, svg_load_image):
12284 Prefer int to unsigned where either will do.
12285 (tiff_handler): New function, combining the cores of the
a66cfb1c
SM
12286 old tiff_error_handler and tiff_warning_handler.
12287 This function is rewritten to use vsnprintf and thereby avoid
13464394
PE
12288 stack buffer overflows. It uses only the features of vsnprintf
12289 that are common to both POSIX and native Microsoft.
12290 (tiff_error_handler, tiff_warning_handler): Use it.
12291 (tiff_load, gif_load, imagemagick_load_image):
12292 Don't assume :index value fits in 'int'.
12293 (gif_load): Omit unnecessary cast to double, and avoid double-rounding.
12294 (imagemagick_load_image): Check that crop parameters fit into
12295 the integer types that MagickCropImage accepts. Don't assume
12296 Vimagemagick_render_type has a nonnegative value. Don't assume
12297 size_t fits in 'long'.
12298 (gs_load): Use printmax_t to print the widest integers possible.
12299 Check for integer overflow when computing image height and width.
12300
c11821d4
EZ
123012011-08-26 Eli Zaretskii <eliz@gnu.org>
12302
12303 * xdisp.c (redisplay_window): Don't force window start if point
12304 will be invisible in the resulting window. (Bug#9324)
12305
0c95fcf7
EZ
123062011-08-25 Eli Zaretskii <eliz@gnu.org>
12307
12308 * xdisp.c (compute_display_string_pos): Return 2 in DISP_PROP when
12309 the display spec is of the form `(space ...)'.
12310 (handle_display_spec): Return the value returned by
12311 handle_single_display_spec, not just 1 or zero.
12312 (handle_single_display_spec): If the display spec is of the form
12313 `(space ...)', and specifies display in the text area, return 2
12314 rather than 1.
fee65a97 12315 (try_cursor_movement): Check for the need to scroll more
a66cfb1c
SM
12316 accurately, and prefer exact match for point under bidi.
12317 Don't advance `row' beyond the last row of the window.
0c95fcf7
EZ
12318
12319 * dispextern.h (struct bidi_it): Rename the disp_prop_p member
12320 into disp_prop; all users changed.
12321
12322 * bidi.c (bidi_fetch_char): If compute_display_string_pos returns
12323 DISP_PROP = 2, substitute the u+2029 PARAGRAPH SEPARATOR character
12324 for the text covered by the display property.
12325
e4ed06f1
CY
123262011-08-25 Chong Yidong <cyd@stupidchicken.com>
12327
12328 * buffer.c (Fbury_buffer_internal): Rename from Funrecord_buffer.
12329 Change return value to nil.
12330 (Frecord_buffer): Delete unused function.
12331
f67cdd7f
EZ
123322011-08-24 Eli Zaretskii <eliz@gnu.org>
12333
5980d4c6
EZ
12334 * xdisp.c (Fcurrent_bidi_paragraph_direction): For unibyte
12335 buffers, return left-to-right.
8610fe8b
EZ
12336 (set_cursor_from_row): Consider candidate row a win if its glyph
12337 represents a newline and point is on that newline. Fixes cursor
12338 positioning on the newline at EOL of R2L text within L2R
12339 paragraph, and vice versa.
12340 (try_cursor_movement): Check continued rows, in addition to
12341 continuation rows. Fixes unwarranted scroll when point enters a
12342 continued line of R2L text within an L2R paragraph, or vice versa.
12343 (cursor_row_p): Consider the case of point being equal to
12344 MATRIX_ROW_END_CHARPOS. Prevents cursor being stuck when moving
12345 from the end of a short line to the beginning of a continued line
12346 of R2L text within L2R paragraph.
12347 (RECORD_MAX_MIN_POS): For max_pos, use IT_CHARPOS even for
12348 composed characters.
5980d4c6 12349
f67cdd7f
EZ
12350 * bidi.c (bidi_check_type): Use xassert.
12351 (bidi_cache_iterator_state): Update the disp_pos and disp_prop_p
12352 members.
12353
bca633fb
EZ
123542011-08-23 Eli Zaretskii <eliz@gnu.org>
12355
12356 * bidi.c (bidi_get_type): Abort if we get zero as the bidi type of
12357 a character.
12358
4a5885a7
CY
123592011-08-23 Chong Yidong <cyd@stupidchicken.com>
12360
12361 * nsfont.m (ns_otf_to_script): Fix typo.
12362
0902a04e
KH
123632011-08-22 Kenichi Handa <handa@m17n.org>
12364
12365 * chartab.c (Fset_char_table_extra_slot): Do not inhibit setting a
12366 extra slot even if the purpose is char-code-property-table.
12367
1a2e6670
EZ
123682011-08-23 Eli Zaretskii <eliz@gnu.org>
12369
8ddde651
EZ
12370 * xdisp.c (redisplay_window): When computing centering_position,
12371 account for the height of the header line. (Bug#8874)
12372
425cc014
EZ
12373 * dispnew.c (buffer_posn_from_coords): Use buf_charpos_to_bytepos
12374 instead of CHAR_TO_BYTE. Fixes a crash when a completion
12375 candidate is selected by the mouse, and that candidate has a
12376 composed character under the mouse.
12377
1a2e6670
EZ
12378 * xdisp.c (x_produce_glyphs): Set it->nglyphs to 1. Fixes pixel
12379 coordinates reported by pos-visible-in-window-p for a composed
12380 character in column zero.
12381
8b76d6f8
SM
123822011-08-23 Stefan Monnier <monnier@iro.umontreal.ca>
12383
12384 * cmds.c (Fself_insert_command): Mention post-self-insert-hook.
12385
dac347dd
EZ
123862011-08-22 Eli Zaretskii <eliz@gnu.org>
12387
12388 * xdisp.c (BUFFER_POS_REACHED_P): If this is a composition,
12389 consider it a hit if to_charpos is anywhere in the range of the
12390 composed buffer positions.
12391
e013fb34
CY
123922011-08-22 Chong Yidong <cyd@stupidchicken.com>
12393
12394 * image.c (gif_load): Don't assume that each subimage has the same
12395 dimensions as the base image. Handle disposal method that is
12396 "undefined" by the gif spec (Bug#9335).
12397
bd1ba3e8
CY
123982011-08-20 Chong Yidong <cyd@stupidchicken.com>
12399
12400 * eval.c (Fsignal): Handle `debug' symbol in error handler (Bug#9329).
024a2d76 12401 (Fcondition_case): Document `debug' symbol in error handler.
bd1ba3e8 12402
54a1215b
EZ
124032011-08-19 Eli Zaretskii <eliz@gnu.org>
12404
823564e5
EZ
12405 * xfaces.c (face_at_buffer_position): Avoid repeated evaluation of
12406 face ID by FACE_FROM_ID, and avoid a crash when mouse is moved
12407 from an Org mode buffer to a Speedbar frame.
12408
54a1215b
EZ
12409 * xdisp.c (RECORD_MAX_MIN_POS): If the display element comes from
12410 a composition, take its buffer position from IT->cmp_it.charpos.
12411 Fixes cursor positioning at the beginning of a line that begins
12412 with a composed character.
12413
9778ebcc
EZ
124142011-08-18 Eli Zaretskii <eliz@gnu.org>
12415
0be6ee06
EZ
12416 * bidi.c (bidi_get_type): If bidi_type_table reports zero as the
12417 character bidirectional type, use STRONG_L instead. Fixes crashes
12418 in a buffer produced by `describe-categories'.
12419
9778ebcc
EZ
12420 * dispextern.h (struct bidi_it): Move disp_pos and disp_prop_p
12421 members before the level stack, so they would be saved and
12422 restored when copying iterator state. Fixes incorrect reordering
12423 around TABs covered by display properties.
12424
156bffbe
AS
124252011-08-18 Andreas Schwab <schwab@linux-m68k.org>
12426
6b02f655 12427 * process.c (Fnetwork_interface_list): Correctly determine buffer size.
156bffbe 12428
72ad093b
CY
124292011-08-17 Chong Yidong <cyd@stupidchicken.com>
12430
12431 * eval.c (internal_condition_case, internal_condition_case_1)
8b76d6f8
SM
12432 (internal_condition_case_2, internal_condition_case_n):
12433 Remove unnecessary aborts (Bug#9081).
72ad093b 12434
35774242
EZ
124352011-08-17 Eli Zaretskii <eliz@gnu.org>
12436
12437 * lread.c (Fload) [DOS_NT]: If `openp' returns -2, but the file
12438 has no `load' handler, try opening the file locally. (Bug#9311)
12439
db76dd85
KB
124402011-08-16 Ken Brown <kbrown@cornell.edu>
12441
12442 * gmalloc.c: Expand comment.
12443
b215eee5
EZ
124442011-08-16 Eli Zaretskii <eliz@gnu.org>
12445
12446 * xdisp.c (set_cursor_from_row): Don't accept a previous candidate
12447 if it fails the cursor_row_p test. Fixes cursor positioning at ZV.
12448
a4579d33
KB
124492011-08-16 Ken Brown <kbrown@cornell.edu>
12450
12451 Fix memory allocation problems in Cygwin build (Bug#9273).
12452
12453 * unexcw.c ( __malloc_initialized): Declare external variable.
12454 (fixup_executable): Force the dumped emacs to reinitialize malloc.
12455
8b76d6f8
SM
12456 * gmalloc.c [CYGWIN] (bss_sbrk_heapbase, bss_sbrk_heapinfo):
12457 New variables.
a4579d33
KB
12458 (malloc_initialize_1) [CYGWIN]: Prepare for reinitializing the
12459 dumped emacs.
12460 (_free_internal_nolock) [CYGWIN]: Ignore requests to free storage
12461 in the static heap.
12462 [CYGWIN] (special_realloc): New function.
12463 (_realloc_internal_nolock) [CYGWIN]: Use the new function on
12464 requests to realloc storage in the static heap.
12465
3ebec551
PE
124662011-08-15 Paul Eggert <eggert@cs.ucla.edu>
12467
12468 * bidi.c (bidi_initialize): Remove unused local.
12469
9fd8be00
EZ
124702011-08-15 Eli Zaretskii <eliz@gnu.org>
12471
6b02f655
SM
12472 * bidimirror.h:
12473 * biditype.h: Remove file.
12474 * makefile.w32-in ($(BLD)/bidi.$(O)):
12475 * deps.mk (bidi.o): Remove biditype.h and bidimirror.h.
474a8465
EZ
12476
12477 * dispextern.h: Fix a typo in the comment to bidi_type_t.
12478
12479 * chartab.c: Improve commentary for the uniprop_table API.
12480
32413314
EZ
12481 * bidi.c (bidi_paragraph_init): Support zero value of
12482 bidi_ignore_explicit_marks_for_paragraph_level.
474a8465
EZ
12483 (bidi_initialize): Use uniprop_table instead of including
12484 biditype.h and bidimirror.h.
32413314 12485
9fd8be00
EZ
12486 * xdisp.c (move_it_in_display_line_to): Don't reset pixel
12487 coordinates of the iterator when restoring from ppos_it.
12488 (Bug#9296)
12489
5cf2b69b
KH
124902011-08-14 Kenichi Handa <handa@m17n.org>
12491
12492 * process.c (create_process): Call setup_process_coding_systems
72ad093b 12493 after the pid of the process is set to -1 (Bug#8162).
5cf2b69b 12494
daf17d00
EZ
124952011-08-14 Eli Zaretskii <eliz@gnu.org>
12496
12497 * xdisp.c (move_it_in_display_line_to): Don't invoke
12498 IT_RESET_X_ASCENT_DESCENT when iterator position was restored from
12499 ppos_it. Fixes vertical cursor motion when line beginning is
12500 covered by an image. (Bug#9296)
12501
08e3161a
JD
125022011-08-14 Jan Djärv <jan.h.d@swipnet.se>
12503
12504 * nsterm.h (ns_run_ascript): Declare.
12505 (NSAPP_DATA2_RUNASSCRIPT): Define.
12506
12507 * nsfns.m (as_script, as_result, as_status): New static variables.
12508 (ns_run_ascript): New function.
5e617bc2 12509 (Fns_do_applescript): Set variables as_*. Make an NSApplicationDefined
08e3161a
JD
12510 event with data2 set to NSAPP_DATA2_RUNASSCRIPT, post it and then start
12511 the event loop. Get status from as_status (Bug#7276).
12512
12513 * nsterm.m (sendEvent): If event is NSApplicationDefined and
12514 data2 is NSAPP_DATA2_RUNASSCRIPT, call ns_run_ascript and then exit
12515 the event loop (Bug#7276).
12516
a3720aa2
AS
125172011-08-14 Andreas Schwab <schwab@linux-m68k.org>
12518
12519 * gnutls.c (QCgnutls_bootprop_priority)
12520 (QCgnutls_bootprop_trustfiles, QCgnutls_bootprop_keylist)
12521 (QCgnutls_bootprop_crlfiles, QCgnutls_bootprop_callbacks)
12522 (QCgnutls_bootprop_loglevel, QCgnutls_bootprop_hostname)
12523 (QCgnutls_bootprop_min_prime_bits, QCgnutls_bootprop_verify_flags)
12524 (QCgnutls_bootprop_verify_hostname_error)
12525 (QCgnutls_bootprop_callbacks_verify): Rename from
12526 Qgnutls_bootprop_..., all uses changed.
12527
12528 * xfaces.c (QCignore_defface): Rename from Qignore_defface, all
12529 uses changed.
12530
0a0d27fb
PE
125312011-08-14 Paul Eggert <eggert@cs.ucla.edu>
12532
19d5c50c
PE
12533 * xfaces.c (Qframe_set_background_mode): Now static.
12534 * dispextern.h (Qframe_set_background_mode): Remove decl.
12535
0a0d27fb
PE
12536 * process.c (Fnetwork_interface_info): Declare local only if needed.
12537
377538cb
JD
125382011-08-13 Jan Djärv <jan.h.d@swipnet.se>
12539
12540 * process.c: Include ifaddrs.h and net/if_dl.h if available (Bug#8477).
12541 (Fnetwork_interface_list): Allocate in increments of bytes instead
12542 of sizeof (struct ifreq). Iterate over ifconf.ifc_req by counting
12543 bytes (Bug#8477). Count bytes correctly when ifr_addr is a struct
12544 sockaddr.
12545 (struct ifflag_def): notrailers is smart on OSX.
12546 (Fnetwork_interface_info): Handle case when ifr_flags is negative.
12547 Get hardware address with getifaddrs if available.
12548
08fff70c
EZ
125492011-08-12 Eli Zaretskii <eliz@gnu.org>
12550
12551 * xdisp.c (iterate_out_of_display_property): xassert that
12552 IT->position is set to within IT->object's boundaries. Break from
12553 the loop as soon as EOB is reached; avoids infloops in redisplay
8b76d6f8
SM
12554 when IT->position is set up wrongly due to some bug.
12555 Set IT->current to match the bidi iterator unconditionally.
08fff70c
EZ
12556 (push_display_prop): Allow GET_FROM_STRING as IT->method on
12557 entry. Force push_it to save on the stack the current
12558 buffer/string position, to be restored by pop_it. Fix flags in
12559 the iterator structure wrt the object coming from a display
12560 property, as `line-prefix' and `wrap-prefix' are not ``replacing''
12561 properties. (Bug#9284)
12562
7be1c708 125632011-08-09 Andreas Schwab <schwab@linux-m68k.org>
aac0c6e3 12564
7be1c708
CY
12565 * fontset.c (fontset_get_font_group): Add proper type checks.
12566 (Bug#9172)
aac0c6e3 12567
7be1c708 125682011-08-09 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
aac0c6e3 12569
7be1c708
CY
12570 * unexmacosx.c (print_load_command_name): Add cases LC_FUNCTION_STARTS
12571 and LC_VERSION_MIN_MACOSX.
12572 (copy_linkedit_data) [LC_FUNCTION_STARTS]: New function.
12573 (dump_it) [LC_FUNCTION_STARTS]: Use it.
aac0c6e3 12574
97bb72a6
EZ
125752011-08-08 Eli Zaretskii <eliz@gnu.org>
12576
12577 * xdisp.c (forward_to_next_line_start): Allow to use the
8b76d6f8
SM
12578 no-display-properties-and-no-overlays under bidi display.
12579 Set disp_pos in the bidi iterator to avoid searches for display
757664a4 12580 properties and overlays.
97bb72a6 12581
d5617611
CY
125822011-08-08 Chong Yidong <cyd@stupidchicken.com>
12583
37e11a63
CY
12584 * editfns.c (Fset_time_zone_rule): Document relationship with the
12585 setenv function.
12586
d5617611
CY
12587 * ftfont.c (ftfont_pattern_entity): Copy the extras argument to
12588 the font entity extracted from the cache (Bug#8109).
12589
58872834
CY
125902011-08-07 Chong Yidong <cyd@stupidchicken.com>
12591
12592 * composite.c (autocmp_chars): Don't reset point. That is done by
12593 restore_point_unwind (Bug#5984).
12594
75bfc667
JL
125952011-08-07 Juri Linkov <juri@jurta.org>
12596
12597 * editfns.c (Fformat_time_string): Doc fix, add tag `usage:'
12598 to show the arg `TIME' instead of `TIMEVAL'.
12599
d1410150
EZ
126002011-08-06 Eli Zaretskii <eliz@gnu.org>
12601
12602 * xdisp.c (set_cursor_from_row): Fix cursor positioning when a
12603 display property strides EOL and includes a newline, as in
12604 longlines-mode. (Bug#9254)
75b771e4
EZ
12605 (move_it_in_display_line_to): Fix vertical-motion in a buffer with
12606 word-wrap under bidirectional display. (Bug#9224)
d1410150
EZ
12607
12608 * bidi.c (bidi_unshelve_cache): Don't reset the cache if JUST_FREE
12609 is non-zero, even if the data buffer is NULL. Fixes a crash in
12610 vertical-motion with longlines-mode. (Bug#9254)
12611
35928349
EZ
126122011-08-05 Eli Zaretskii <eliz@gnu.org>
12613
ec7cc85b
EZ
12614 * bidi.c <bidi_cache_total_alloc>: Now static.
12615 (bidi_initialize): Initialize bidi_cache_total_alloc.
12616
8b76d6f8 12617 * xdisp.c (display_line): Release buffer allocated for shelved bidi
35928349
EZ
12618 cache. (Bug#9221)
12619
12620 * bidi.c (bidi_shelve_cache, bidi_unshelve_cache): Track total
12621 amount allocated this far in `bidi_cache_total_alloc'.
12622 (bidi_unshelve_cache): Accept an additional argument JUST_FREE; if
12623 non-zero, only free the data buffer without restoring the cache
12624 contents. All callers changed.
12625
12626 * dispextern.h (bidi_unshelve_cache): Update prototype.
12627
12628 * xdisp.c (SAVE_IT, pos_visible_p, move_it_in_display_line_to)
12629 (move_it_in_display_line, move_it_to)
12630 (move_it_vertically_backward, move_it_by_lines): Replace the call
12631 to xfree to an equivalent call to bidi_unshelve_cache.
12632 (move_it_in_display_line_to): Fix logic of returning
412b6358 12633 MOVE_POS_MATCH_OR_ZV in the bidi case. (Bug#9224)
35928349 12634
e2e2423b
EZ
126352011-08-05 Eli Zaretskii <eliz@gnu.org>
12636
12637 * xdisp.c (set_cursor_from_row): Prefer the candidate glyph that
12638 came from a string character with a `cursor' property. (Bug#9229)
12639
ae9e757a
JD
126402011-08-04 Jan Djärv <jan.h.d@swipnet.se>
12641
12642 * Makefile.in (LIB_PTHREAD): New variable.
12643 (LIBES): Add LIB_PTHREAD (Bug#9216).
12644
12645 * alloc.c, emacs.c, gmalloc.c, gtkutil.c, keyboard.c, syssignal.h:
12646 Rename HAVE_GTK_AND_PTHREAD to HAVE_PTHREAD (Bug#9216).
12647
213bd7f2
AS
126482011-08-04 Andreas Schwab <schwab@linux-m68k.org>
12649
6b02f655 12650 * regex.c (re_iswctype): Remove some redundant boolean conversions.
213bd7f2 12651
99aaf75f
JD
126522011-08-04 Jan Djärv <jan.h.d@swipnet.se>
12653
12654 * xterm.c (x_find_topmost_parent): New function.
12655 (x_set_frame_alpha): Find topmost parent window with
12656 x_find_topmost_parent and set the property there also (bug#9181).
12657 (handle_one_xevent): Call x_set_frame_alpha on ReparentNotify.
12658
c74e9d86
PE
126592011-08-04 Paul Eggert <eggert@cs.ucla.edu>
12660
12661 * callproc.c (Fcall_process): Avoid vfork clobbering
12662 the local vars buffer, coding_systems, current_dir.
12663
640c8776
SM
126642011-08-03 Stefan Monnier <monnier@iro.umontreal.ca>
12665
12666 * keymap.c (Fmake_composed_keymap): Move to subr.el.
12667
f26d0e4c
PE
126682011-08-03 Paul Eggert <eggert@cs.ucla.edu>
12669
8a10d76c
PE
12670 * fontset.c (dump_fontset) [FONTSET_DEBUG]: Declare EXTERNALLY_VISIBLE
12671 so that it is not optimized away.
12672
f26d0e4c
PE
12673 * xdisp.c (compute_display_string_pos): Remove unused local.
12674
55439c61
EZ
126752011-08-02 Eli Zaretskii <eliz@gnu.org>
12676
12677 Fix slow cursor motion and scrolling in large buffers with
12678 selective display, like Org Mode buffers. (Bug#9218)
12679
12680 * dispextern.h (struct bidi_it): New member disp_prop_p.
12681
12682 * xdisp.c: Remove one-slot cache of display string positions.
12683 (compute_display_string_pos): Accept an additional argument
5e617bc2 12684 DISP_PROP_P; callers changed. Scan at most 5K characters forward
55439c61
EZ
12685 for a display string or property. If found, set DISP_PROP_P
12686 non-zero.
12687
12688 * bidi.c (bidi_fetch_char): Accept an additional argument
640c8776
SM
12689 DISP_PROP_P, and pass it to compute_display_string_pos.
12690 Only handle text covered by a display string if DISP_PROP_P is returned
55439c61
EZ
12691 non-zero. All callers of bidi_fetch_char changed.
12692
fb33fa43
SM
126932011-08-02 Stefan Monnier <monnier@iro.umontreal.ca>
12694
12695 * keymap.c (Fdefine_key): Fix Lisp_Object/int mixup; apply some CSE.
12696
b099e063
DM
126972010-12-03 Don March <don@ohspite.net>
12698
12699 * keymap.c (Fdefine_key): Fix non-prefix key error message when
12700 last character M-[char] is translated to ESC [char] (bug#7541).
12701
5cc7f7af
KH
127022011-08-02 Kenichi Handa <handa@m17n.org>
12703
d0fffa3f 12704 * lisp.h (uniprop_table): Extern it.
5cc7f7af
KH
12705
12706 * chartab.c (uniprop_table): Make it non-static.
12707
525d5e6e
EZ
127082011-08-01 Eli Zaretskii <eliz@gnu.org>
12709
12710 * xdisp.c (forward_to_next_line_start): Accept additional argument
12711 BIDI_IT_PREV, and store into it the state of the bidi iterator had
12712 on the newline.
12713 (reseat_at_next_visible_line_start): Use the bidi iterator state
12714 returned by forward_to_next_line_start to restore the state of
12715 it->bidi_it after backing up to previous newline. (Bug#9212)
12716
31011111
AS
127172011-07-30 Andreas Schwab <schwab@linux-m68k.org>
12718
12719 * regex.c (re_comp): Protoize.
12720 (re_exec): Fix return type.
12721 (regexec): Fix type of `ret'. (Bug#9203)
12722
476371c4
PE
127232011-07-28 Paul Eggert <eggert@cs.ucla.edu>
12724
e5d76069
PE
12725 * image.c (check_image_size): Use 1024x1024 if unknown frame (Bug#9189).
12726 This is needed if max-image-size is a floating-point number.
12727
9a79b20c
AS
127282011-07-28 Andreas Schwab <schwab@linux-m68k.org>
12729
12730 * print.c (print_object): Print empty symbol as ##.
12731
12732 * lread.c (read1): Read ## as empty symbol.
12733
d8c2fa78
AA
127342011-07-28 Alp Aker <alp.tekin.aker@gmail.com>
12735
12736 * nsfns.m (x_set_foreground_color): Set f->foreground_pixel when
12737 setting frame foreground color (Bug#9175).
12738 (x_set_background_color): Likewise.
12739
ffe57a7a
AA
12740 * nsmenu.m (-setText): Size tooltip dimensions precisely to
12741 contents (Bug#9176).
12742 (EmacsTooltip -init): Remove bezels and add shadows to
12743 tooltip windows.
12744
bf3492a5
AA
12745 * nsterm.m (ns_dumpglyphs_stretch): Avoid overwriting left fringe
12746 or scroll bar (Bug#8470).
12747
d55e9c53
AA
12748 * nsfont.m (nsfont_open): Remove assignment to voffset and
12749 unnecessary vars hshink, expand, hd, full_height, min_height.
12750 (nsfont_draw): Use s->ybase as baseline for glyph drawing (Bug#8913).
12751
12752 * nsterm.h (nsfont_info): Remove voffset field.
12753
d8c2fa78 127542011-07-28 Alp Aker <alp.tekin.aker@gmail.com>
4843aac3
AA
12755
12756 Implement strike-through and overline on NextStep (Bug#8863).
12757
12758 * nsfont.m (nsfont_open): Use underline position provided by font,
12759 instead of hard-coded value of 2.
12760 (nsfont_draw): Call ns_draw_text_decoration instead.
12761
12762 * nsterm.h: Add declaration for ns_draw_text_decoration.
12763
12764 * nsterm.m (ns_draw_text_decoration): New function for drawing
12765 underline, overline, and strike-through.
12766 (ns_dumpglyphs_image, ns_dumpglyphs_stretch): Add call to
12767 ns_draw_text_decoration. Change treatment of cursor drawing to
8d5ed899 12768 accommodate underlining, etc.
4843aac3 12769
4cc60b9b
EZ
127702011-07-28 Eli Zaretskii <eliz@gnu.org>
12771
bc7ece87
EZ
12772 * buffer.c (init_buffer_once): Set bidi-display-reordering to t by
12773 default.
4cc60b9b 12774
476371c4
PE
127752011-07-28 Paul Eggert <eggert@cs.ucla.edu>
12776
66606eea
PE
12777 * alloc.c (memory_full) [!SYNC_INPUT]: Fix signal-related race.
12778 Without this fix, if a signal arrives just after memory fills up,
12779 'malloc' might be invoked reentrantly.
12780
476371c4
PE
12781 * image.c (x_check_image_size) [!HAVE_X_WINDOWS]: Return 1.
12782 In other words, assume that every image size is allowed, on non-X
12783 hosts. This assumption is probably wrong, but it lets Emacs compile.
12784
f3fcc40d
AS
127852011-07-28 Andreas Schwab <schwab@linux-m68k.org>
12786
12787 * regex.c (re_iswctype): Convert return values to boolean.
12788
350c992f
EZ
127892011-07-28 Eli Zaretskii <eliz@fencepost.gnu.org>
12790
12791 * xdisp.c (compute_display_string_pos): Don't use cached display
12792 string position if the buffer had its restriction changed.
12793 (Bug#9184)
12794
5266b4bb
PE
127952011-07-28 Paul Eggert <eggert@cs.ucla.edu>
12796
12797 * callproc.c (Fcall_process): Use 'volatile' to avoid vfork clobbering.
12798
2573a837 127992011-07-28 Paul Eggert <eggert@cs.ucla.edu>
ca4aa935 12800
41f55ccd 12801 Integer signedness and overflow and related fixes. (Bug#9079)
cf950e6b 12802
39e378da
PE
12803 * bidi.c: Integer size and overflow fixes.
12804 (bidi_cache_size, bidi_cache_idx, bidi_cache_last_idx)
12805 (bidi_cache_start, bidi_cache_fetch_state, bidi_cache_search)
12806 (bidi_cache_find_level_change, bidi_cache_ensure_space)
12807 (bidi_cache_iterator_state, bidi_cache_find, bidi_cache_start_stack)
12808 (bidi_find_other_level_edge):
12809 Use ptrdiff_t instead of EMACS_INT where either will do.
12810 This works better on 32-bit hosts configured --with-wide-int.
12811 (bidi_cache_ensure_space): Check for size-calculation overflow.
12812 Use % rather than repeated addition, for better worst-case speed.
12813 Don't set bidi_cache_size until after xrealloc returns, because it
12814 might not return.
12815 (bidi_dump_cached_states): Use ptrdiff_t, not int, to avoid overflow.
f0eb61e9
PE
12816 (bidi_cache_ensure_space): Also check that the bidi cache size
12817 does not exceed that of the largest Lisp string or buffer. See Eli
12818 Zaretskii in <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9079#29>.
39e378da 12819
5e927815
PE
12820 * alloc.c (__malloc_size_t): Remove.
12821 All uses replaced by size_t. See Andreas Schwab's note
12822 <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9079#8>.
12823
ca4aa935
PE
12824 * image.c: Improve checking for integer overflow.
12825 (check_image_size): Assume that f is nonnull, since
12826 it is always nonnull in practice. This is one less thing to
12827 worry about when checking for integer overflow later.
12828 (x_check_image_size): New function, which checks for integer
12829 overflow issues inside X.
12830 (x_create_x_image_and_pixmap, xbm_read_bitmap_data): Use it.
12831 This removes the need for a memory_full check.
12832 (xbm_image_p): Rewrite to avoid integer multiplication overflow.
12833 (Create_Pixmap_From_Bitmap_Data, xbm_load): Use x_check_image_size.
12834 (xbm_read_bitmap_data): Change locals back to 'int', since
12835 their values must fit in 'int'.
12836 (xpm_load_image, png_load, tiff_load):
12837 Invoke x_create_x_image_and_pixmap earlier,
12838 to avoid much needless work if the image is too large.
12839 (tiff_load): Treat overly large images as if
12840 x_create_x_image_and_pixmap failed, not as malloc failures.
12841 (gs_load): Use x_check_image_size.
12842
5f8f9cc2
PE
12843 * gtkutil.c: Omit integer casts.
12844 (xg_get_pixbuf_from_pixmap): Remove unnecessary cast.
12845 (xg_set_toolkit_scroll_bar_thumb): Rewrite to avoid need for cast.
12846
5adf60bc
PE
12847 * image.c (png_load): Don't assume height * row_bytes fits in 'int'.
12848
c8907a93
PE
12849 * xfaces.c (Fbitmap_spec_p): Fix integer overflow bug.
12850 Without this fix, (bitmap-spec-p '(34359738368 1 "x"))
12851 would wrongly return t on a 64-bit host.
12852
e3c25c68
PE
12853 * dispnew.c (init_display): Use *_RANGE_OVERFLOW macros.
12854 The plain *_OVERFLOW macros run afoul of GCC bug 49705
12855 <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49705>
12856 and therefore cause GCC to emit a bogus diagnostic in some cases.
12857
3f791afe
PE
12858 * image.c: Integer signedness and overflow and related fixes.
12859 This is not an exhaustive set of fixes, but it's time to
12860 record what I've got.
12861 (lookup_pixel_color, check_image_size): Remove redundant decls.
12862 (check_image_size): Don't assume that arbitrary EMACS_INT values
12863 fit in 'int', or that arbitrary 'double' values fit in 'int'.
12864 (x_alloc_image_color, x_create_x_image_and_pixmap, png_load)
12865 (tiff_load, imagemagick_load_image):
12866 Check for overflow in size calculations.
12867 (x_create_x_image_and_pixmap): Remove unnecessary test for
12868 xmalloc returning NULL; that can't happen.
12869 (xbm_read_bitmap_data): Don't assume sizes fit into 'int'.
12870 (xpm_color_bucket): Use better integer hashing function.
12871 (xpm_cache_color): Don't possibly over-allocate memory.
12872 (struct png_memory_storage, tiff_memory_source, tiff_seek_in_memory)
12873 (gif_memory_source):
12874 Use ptrdiff_t, not int or size_t, to record sizes.
12875 (png_load): Don't assume values greater than 2**31 fit in 'int'.
12876 (our_stdio_fill_input_buffer): Prefer ptrdiff_t to size_t when
12877 either works, as we prefer signed integers.
12878 (tiff_read_from_memory, tiff_write_from_memory):
12879 Return tsize_t, not size_t, since that's what the TIFF API wants.
12880 (tiff_read_from_memory): Don't fail simply because the read would
12881 go past EOF; instead, return a short read.
12882 (tiff_load): Omit no-longer-needed casts.
12883 (Fimagemagick_types): Don't assume size fits into 'int'.
12884
3cc5a532
PE
12885 Improve hashing quality when configured --with-wide-int.
12886 * fns.c (hash_string): New function, taken from sxhash_string.
12887 Do not discard information about ASCII character case; this
12888 discarding is no longer needed.
12889 (sxhash-string): Use it. Change sig to match it. Caller changed.
12890 * lisp.h: Declare it.
12891 * lread.c (hash_string): Remove, since we now use fns.c's version.
12892 The fns.c version returns a wider integer if --with-wide-int is
12893 specified, so this should help the quality of the hashing a bit.
12894
b312a492
PE
12895 * emacs.c: Integer overflow minor fix.
12896 (heap_bss_diff): Now uprintmax_t, not unsigned long. All used changed.
12897 Define only if GNU_LINUX.
12898 (main, Fdump_emacs): Set and use heap_bss_diff only if GNU_LINUX.
12899
dfd153ae
PE
12900 * dispnew.c: Integer signedness and overflow fixes.
12901 Remove unnecessary forward decls, that were a maintenance hassle.
12902 (history_tick): Now uprintmax_t, so it's more likely to avoid overflow.
12903 All uses changed.
12904 (adjust_glyph_matrix, realloc_glyph_pool, adjust_frame_message_buffer)
12905 (scrolling_window): Use ptrdiff_t, not int, for byte count.
12906 (prepare_desired_row, line_draw_cost):
12907 Use int, not unsigned, where either works.
12908 (save_current_matrix, restore_current_matrix):
12909 Use ptrdiff_t, not size_t, where either works.
12910 (init_display): Check for overflow more accurately, and without
12911 relying on undefined behavior.
12912
a81d11a3
PE
12913 * editfns.c (pWIDE, pWIDElen, signed_wide, unsigned_wide):
12914 Remove, replacing with the new symbols in lisp.h. All uses changed.
12915 * fileio.c (make_temp_name):
12916 * filelock.c (lock_file_1, lock_file):
12917 * xdisp.c (message_dolog):
12918 Don't assume PRIdMAX etc. works; this isn't portable to pre-C99 hosts.
12919 Use pMd etc. instead.
12920 * lisp.h (printmax_t, uprintmax_t, pMd, pMu): New types and macros,
12921 replacing the pWIDE etc. symbols removed from editfns.c.
12922
3300e6fd
PE
12923 * keyboard.h (num_input_events): Now uintmax_t.
12924 This is (very slightly) less likely to mess up due to wraparound.
12925 All uses changed.
12926
fd05c7e9
PE
12927 * buffer.c: Integer signedness fixes.
12928 (alloc_buffer_text, enlarge_buffer_text):
12929 Use ptrdiff_t rather than size_t when either will do, as we prefer
12930 signed integers.
12931
903fe15d
PE
12932 * alloc.c: Integer signedness and overflow fixes.
12933 Do not impose an arbitrary 32-bit limit on malloc sizes when debugging.
12934 (__malloc_size_t): Default to size_t, not to int.
12935 (pure_size, pure_bytes_used_before_overflow, stack_copy_size)
12936 (Fgarbage_collect, mark_object_loop_halt, mark_object):
12937 Prefer ptrdiff_t to size_t when either would do, as we prefer
12938 signed integers.
12939 (XMALLOC_OVERRUN_CHECK_OVERHEAD): New macro.
12940 (xmalloc_overrun_check_header, xmalloc_overrun_check_trailer):
12941 Now const. Initialize with values that are in range even if char
12942 is signed.
12943 (XMALLOC_PUT_SIZE, XMALLOC_GET_SIZE): Remove, replacing with ...
12944 (xmalloc_put_size, xmalloc_get_size): New functions. All uses changed.
12945 These functions do the right thing with sizes > 2**32.
12946 (check_depth): Now ptrdiff_t, not int.
12947 (overrun_check_malloc, overrun_check_realloc, overrun_check_free):
12948 Adjust to new way of storing sizes. Check for size overflow bugs
12949 in rest of code.
12950 (STRING_BYTES_MAX): Adjust to new overheads. The old code was
12951 slightly wrong anyway, as it missed one instance of
12952 XMALLOC_OVERRUN_CHECK_OVERHEAD.
12953 (refill_memory_reserve): Omit needless cast to size_t.
12954 (mark_object_loop_halt): Mark as externally visible.
12955
ac82cc6a
PE
12956 * xselect.c: Integer signedness and overflow fixes.
12957 (Fx_register_dnd_atom, x_handle_dnd_message):
12958 Use ptrdiff_t, not size_t, since we prefer signed.
12959 (Fx_register_dnd_atom): Check for ptrdiff_t (and size_t) overflow.
12960 * xterm.h (struct x_display_info): Use ptrdiff_t, not size_t, for
12961 x_dnd_atoms_size and x_dnd_atoms_length.
12962
c2d1e36d
PE
12963 * doprnt.c: Prefer signed to unsigned when either works.
12964 * eval.c (verror):
12965 * doprnt.c (doprnt):
12966 * lisp.h (doprnt):
12967 * xdisp.c (vmessage):
12968 Use ptrdiff_t, not size_t, when using or implementing doprnt,
12969 since the sizes cannot exceed ptrdiff_t bounds anyway, and we
12970 prefer signed arithmetic to avoid comparison confusion.
12971 * doprnt.c (doprnt): Avoid a "+ 1" that can't overflow,
12972 but is a bit tricky.
12973
0e926e56
PE
12974 Assume freestanding C89 headers, string.h, stdlib.h.
12975 * data.c, doprnt.c, floatfns.c, print.c:
12976 Include float.h unconditionally.
12977 * gmalloc.c: Assume C89-at-least behavior for preprocessor,
12978 limits.h, stddef.h, string.h. Use memset instead of 'flood'.
12979 * regex.c: Likewise for stddef.h, string.h.
12980 (ISASCII): Remove; can assume it returns 1 now. All uses removed.
12981 * s/aix4-2.h (HAVE_STRING_H): Remove obsolete undef.
12982 * s/ms-w32.h (HAVE_LIMITS_H, HAVE_STRING_H, HAVE_STDLIB_H)
12983 (STDC_HEADERS): Remove obsolete defines.
12984 * sysdep.c: Include limits.h unconditionally.
12985
9cfdb3ec
PE
12986 Assume support for memcmp, memcpy, memmove, memset.
12987 * lisp.h, sysdep.c (memcmp, memcpy, memmove, memset):
12988 * regex.c (memcmp, memcpy):
12989 Remove; we assume C89 now.
12990
12991 * gmalloc.c (memcpy, memset, memmove): Remove; we assume C89 now.
12992 (__malloc_safe_bcopy): Remove; no longer needed.
12993
cf950e6b 12994 * lisp.h (struct vectorlike_header, struct Lisp_Subr): Signed sizes.
6089c567
PE
12995 Use EMACS_INT, not EMACS_UINT, for sizes. The code works equally
12996 well either way, and we prefer signed to unsigned.
12997
dbf38e02
LMI
129982011-07-27 Lars Magne Ingebrigtsen <larsi@gnus.org>
12999
13000 * gnutls.c (emacs_gnutls_read): Don't message anything if the peer
13001 closes the connection while we're reading (bug#9182).
13002
d6f0886c 130032011-07-25 Jan Djärv <jan.h.d@swipnet.se>
24e0f6b1 13004
d6f0886c
JD
13005 * nsmenu.m (ns_popup_dialog): Add an "ok" button if no buttons
13006 are specified (Bug#9168).
24e0f6b1 13007
2eb1f9e6
PE
130082011-07-25 Paul Eggert <eggert@cs.ucla.edu>
13009
13010 * bidi.c (bidi_dump_cached_states): Fix printf format mismatch.
13011 Found by GCC static checking and --with-wide-int on a 32-bit host.
13012
22381272 130132011-07-25 Eli Zaretskii <eliz@gnu.org>
7daee910
EZ
13014
13015 * xdisp.c (compute_display_string_pos): Fix logic of caching
13016 previous display string position. Initialize cached_prev_pos to
13017 -1. Fixes slow-down at the beginning of a buffer.
13018
f25e39b4
EZ
130192011-07-24 Eli Zaretskii <eliz@gnu.org>
13020
13021 * xfaces.c (check_lface_attrs) [HAVE_WINDOW_SYSTEM]: Allow `nil'
13022 for attrs[LFACE_FONTSET_INDEX].
13023
04c4b52e
PE
130242011-07-23 Paul Eggert <eggert@cs.ucla.edu>
13025
13026 * xml.c (parse_region): Remove unused local
13027 that was recently introduced.
13028
c1734fbd
EZ
130292011-07-23 Eli Zaretskii <eliz@gnu.org>
13030
be18c5a5
EZ
13031 * xfns.c (unwind_create_frame) [GLYPH_DEBUG]: Adapt to changes in
13032 2008-02-22T17:42:09Z!monnier@iro.umontreal.ca.
13033
c1734fbd
EZ
13034 * xdisp.c (move_it_in_display_line_to): Record the best matching
13035 position for TO_CHARPOS while scanning the line, and restore it on
640c8776
SM
13036 exit if none of the characters scanned was an exact match.
13037 Fixes vertical-motion and pos-visible-in-window-p under bidi redisplay
a9269c18
EZ
13038 when exact match is impossible due to invisible text, and the
13039 lines are truncated.
13040
a258d627
JD
130412011-07-23 Jan Djärv <jan.h.d@swipnet.se>
13042
13043 * nsterm.m (initFrameFromEmacs): Set NSTitledWindowMask in styleMask
13044 for OSX >= 10.7.
13045
b6d5a689
EZ
130462011-07-22 Eli Zaretskii <eliz@gnu.org>
13047
0f74f785
EZ
13048 Fix a significant slow-down of cursor motion with C-n, C-p,
13049 C-f/C-b, and C-v/M-v that couldn't keep up with keyboard
13050 auto-repeat under bidi redisplay in fontified buffers.
b6d5a689 13051 * xdisp.c (compute_stop_pos_backwards): New function.
b6d5a689
EZ
13052 (next_element_from_buffer): Call compute_stop_pos_backwards to
13053 find a suitable prev_stop when we find ourselves before
0f74f785
EZ
13054 base_level_stop.
13055 (reseat): Don't look for prev_stop, as that could mean a very long
13056 run.
13057 <cached_disp_pos, cached_disp_buffer, cached_disp_modiff>
13058 <cached_disp_overlay_modiff>: Cache for last found display string
13059 position.
551918c1 13060 (compute_display_string_pos): Return the cached position if asked
0f74f785
EZ
13061 about the same buffer in the same area of character positions, and
13062 the buffer wasn't changed since the time the display string
13063 position was cached.
551918c1 13064
b2d0c91a
EZ
130652011-07-22 Eli Zaretskii <eliz@gnu.org>
13066
13067 * xdisp.c (rows_from_pos_range): Don't ignore glyphs whose object
13068 is an integer, which is important for empty lines. (Bug#9149)
13069
043604ee
CY
130702011-07-22 Chong Yidong <cyd@stupidchicken.com>
13071
13072 * frame.c (Fmodify_frame_parameters): In tty case, update the
13073 default face if necessary (Bug#4238).
13074
da4adb04
CY
130752011-07-21 Chong Yidong <cyd@stupidchicken.com>
13076
13077 * editfns.c (Fstring_to_char): No need to explain what a character
13078 is in the docstring (Bug#6576).
13079
9abd0532
LMI
130802011-07-20 Lars Magne Ingebrigtsen <larsi@gnus.org>
13081
13082 * xml.c (parse_region): Make sure we always return a tree.
13083
36881d16
HK
130842011-07-20 HAMANO Kiyoto <khiker.mail@gmail.com>
13085
13086 * xml.c (parse_region): If a document contains only comments,
13087 return that, too.
13088
1e98674d
LMI
130892011-07-20 Lars Magne Ingebrigtsen <larsi@gnus.org>
13090
13091 * xml.c (make_dom): Return comments, too.
13092
590bd467
PE
130932011-07-19 Paul Eggert <eggert@cs.ucla.edu>
13094
13095 Port to OpenBSD.
13096 See http://lists.gnu.org/archive/html/emacs-devel/2011-07/msg00688.html
13097 and the surrounding thread.
13098 * minibuf.c (read_minibuf_noninteractive): Rewrite to use getchar
13099 rather than fgets, and retry after EINTR. Otherwise, 'emacs
13100 --batch -f byte-compile-file' fails on OpenBSD if an inactivity
13101 timer goes off.
13102 * s/openbsd.h (BROKEN_SIGIO): Define.
13103 * unexelf.c (unexec) [__OpenBSD__]:
13104 Don't update the .mdebug section of the Alpha COFF symbol table.
13105
f41628b2
LMI
131062011-07-19 Lars Magne Ingebrigtsen <larsi@gnus.org>
13107
13108 * lread.c (syms_of_lread): Clarify when `lexical-binding' is used
13109 (bug#8460).
13110
b59b67c5
PE
131112011-07-18 Paul Eggert <eggert@cs.ucla.edu>
13112
15e3a074
PE
13113 * fileio.c (Fcopy_file) [!MSDOS]: Tighten created file's mask.
13114 This fixes some race conditions on the permissions of any newly
13115 created file.
13116
41bed37d
PE
13117 * alloc.c (valid_pointer_p): Use pipe, not open.
13118 This fixes some permissions issues when debugging.
13119
b59b67c5
PE
13120 * fileio.c (Fcopy_file): Adjust mode if fchown fails. (Bug#9002)
13121 If fchown fails to set both uid and gid, try to set just gid,
13122 as that is sometimes allowed. Adjust the file's mode to eliminate
13123 setuid or setgid bits that are inappropriate if fchown fails.
13124
925a6be7
SM
131252011-07-18 Stefan Monnier <monnier@iro.umontreal.ca>
13126
13127 * xdisp.c (next_element_from_string, next_element_from_buffer): Use EQ
13128 to compare Lisp_Objects.
13129 * gnutls.c (syms_of_gnutls): Rename Vgnutls_log_level to
13130 global_gnutls_log_level, don't mistake it for a Lisp_Object.
13131 (init_gnutls_functions, emacs_gnutls_handle_error): Fix up uses.
13132
52968808
AS
131332011-07-17 Andreas Schwab <schwab@linux-m68k.org>
13134
0a6a104b
AS
13135 * lread.c (read_integer): Unread even EOF character.
13136 (read1): Likewise. Properly record start position of symbol.
13137
52968808
AS
13138 * lread.c (read1): Read `#:' as empty uninterned symbol if no
13139 symbol character follows.
13140
9e381cdd
PE
131412011-07-17 Paul Eggert <eggert@cs.ucla.edu>
13142
13143 * fileio.c (Fcopy_file): Pacify gcc re fchown. (Bug#9002)
13144 This works around a problem with the previous change to Fcopy_file.
13145 Recent glibc declares fchown with __attribute__((warn_unused_result)),
13146 and without this change, GCC might complain about discarding
13147 fchown's return value.
13148
b5641435
JB
131492011-07-16 Juanma Barranquero <lekktu@gmail.com>
13150
13151 * makefile.w32-in (GLOBAL_SOURCES): Add gnutls.c (followup to bug#9059).
13152
a8031457
PE
131532011-07-16 Paul Eggert <eggert@cs.ucla.edu>
13154
13155 * fileio.c (Fcopy_file): Don't diagnose fchown failures. (Bug#9002)
13156
dd889327
LMI
131572011-07-16 Lars Magne Ingebrigtsen <larsi@gnus.org>
13158
750c33f7
LMI
13159 * gnutls.c (syms_of_gnutls): Define `gnutls-log-level' here, since
13160 it's used from the C level.
13161
dd889327
LMI
13162 * process.c: Use the same condition for POLL_FOR_INPUT in both
13163 keyboard.c and process.c (bug#1858).
13164
87e86684
LM
131652011-07-09 Lawrence Mitchell <wence@gmx.li>
13166
13167 * gnutls.c (Qgnutls_bootprop_min_prime_bits): New variable.
13168 (Fgnutls_boot): Use it.
13169
64348f40
AS
131702011-07-15 Andreas Schwab <schwab@linux-m68k.org>
13171
13172 * doc.c (Fsubstitute_command_keys): Revert last change.
13173
1d698799
LMI
131742011-07-15 Lars Magne Ingebrigtsen <larsi@gnus.org>
13175
f863868c
LMI
13176 * doc.c (Fsubstitute_command_keys): Clarify that \= really only
13177 quotes the next character, and doesn't affect other longer
13178 sequences (bug#8935).
13179
1d698799
LMI
13180 * lread.c (syms_of_lread): Clarify that is isn't only
13181 `eval-buffer' and `eval-defun' that's affected by
13182 `lexical-binding' (bug#8460).
13183
aa4b6df6
EZ
131842011-07-15 Eli Zaretskii <eliz@gnu.org>
13185
13186 * xdisp.c (move_it_in_display_line_to): Fix vertical motion with
6b02f655 13187 bidi redisplay when a line includes both an image and is truncated.
aa4b6df6 13188
5d856da6
PE
131892011-07-14 Paul Eggert <eggert@cs.ucla.edu>
13190
ad6042bb
PE
13191 Fix minor problems found by static checking.
13192 * bidi.c (bidi_cache_size): Now EMACS_INT, not size_t.
13193 (elsz): Now a signed constant, not a size_t var. We prefer signed
13194 types to unsigned, to avoid integer comparison confusion. Without
13195 this change, GCC 4.6.1 with -Wunsafe-loop-optimizations complains
13196 "cannot optimize loop, the loop counter may overflow", a symptom
13197 of the confusion.
f00bbb22 13198 * indent.c (Fvertical_motion): Mark locals as initialized.
5d856da6
PE
13199 * xdisp.c (reseat_to_string): Fix pointer signedness issue.
13200
6468f31c
LMI
132012011-07-14 Lars Magne Ingebrigtsen <larsi@gnus.org>
13202
49080b10
LMI
13203 * search.c (Fre_search_backward): Mention `case-fold-search' in
13204 all the re_search_* functions (bug#8138).
13205
6468f31c
LMI
13206 * keyboard.c (Fopen_dribble_file): Document when the file is
13207 closed (bug#8056).
13208
c965adc5
EZ
132092011-07-14 Eli Zaretskii <eliz@gnu.org>
13210
df9733bf
EZ
13211 * bidi.c (bidi_dump_cached_states): Fix format of displaying
13212 bidi_cache_idx.
13213
0bb23927
EZ
13214 Support bidi reordering of display and overlay strings.
13215 * xdisp.c (compute_display_string_pos)
13216 (compute_display_string_end): Accept additional argument STRING.
13217 (init_iterator, reseat_1): Initialize bidi_it->string.s to NULL.
13218 (reseat_to_string): Initialize bidi_it->string.s and
13219 bidi_it->string.schars.
13220 (Fcurrent_bidi_paragraph_direction): Initialize itb.string.s to
640c8776
SM
13221 NULL (avoids a crash in bidi_paragraph_init).
13222 Initialize itb.string.lstring.
0bb23927
EZ
13223 (init_iterator): Call bidi_init_it only of a valid
13224 buffer position was specified. Initialize paragraph_embedding to
13225 L2R.
13226 (reseat_to_string): Initialize the bidi iterator.
13227 (display_string): If we need to ignore text properties of
13228 LISP_STRING, set IT->stop_charpos to IT->end_charpos. (The
13229 original value of -1 will not work with bidi.)
13230 (compute_display_string_pos): First arg is now struct
13231 `text_pos *'; all callers changed. Support display properties on
13232 Lisp strings.
13233 (compute_display_string_end): Support display properties on Lisp
13234 strings.
13235 (init_iterator, reseat_1, reseat_to_string): Initialize the
13236 string.bufpos member to 0 (zero, for compatibility with IT_CHARPOS
13237 when iterating on a string not from display properties).
640c8776
SM
13238 (compute_display_string_pos, compute_display_string_end):
13239 Fix calculation of the object to scan. Fixes an error when using
0bb23927
EZ
13240 arrow keys.
13241 (next_element_from_buffer): Don't abort when IT_CHARPOS is before
640c8776
SM
13242 base_level_stop; instead, set base_level_stop to BEGV.
13243 Fixes crashes in vertical-motion.
0bb23927
EZ
13244 (next_element_from_buffer): Improve commentary for when
13245 the iterator is before prev_stop.
13246 (init_iterator): Initialize bidi_p from the default value of
13247 bidi-display-reordering, not from buffer-local value. Use the
13248 buffer-local value only if initializing for buffer iteration.
13249 (handle_invisible_prop): Support invisible properties on strings
13250 that are being bidi-reordered.
13251 (set_iterator_to_next): Support bidi reordering of C strings and
13252 Lisp strings.
13253 (next_element_from_string): Support bidi reordering of Lisp
13254 strings.
13255 (handle_stop_backwards): Support Lisp strings as well.
640c8776
SM
13256 (display_string): Support display of R2L glyph rows.
13257 Use IT_STRING_CHARPOS when displaying from a Lisp string.
0bb23927
EZ
13258 (init_iterator): Don't initialize it->bidi_p for strings
13259 here.
13260 (reseat_to_string): Initialize it->bidi_p for strings here.
13261 (next_element_from_string, next_element_from_c_string)
13262 (next_element_from_buffer): Add xassert's for correspondence
13263 between IT's object being iterated and it->bidi_it.string
13264 structure.
13265 (face_before_or_after_it_pos): Support bidi iteration.
13266 (next_element_from_c_string): Handle the case of the first string
13267 character that is not the first one in the visual order.
13268 (get_visually_first_element): New function, refactored from common
13269 parts of next_element_from_buffer, next_element_from_string, and
13270 next_element_from_c_string.
13271 (tool_bar_lines_needed, redisplay_tool_bar)
13272 (display_menu_bar): Force left-to-right direction. Add a FIXME
13273 comment for making that be controlled by a user option.
13274 (push_it, pop_it): Save and restore the state of the
13275 bidi iterator. Save and restore the bidi_p flag.
13276 (pop_it): Iterate out of display property for string iteration as
13277 well.
13278 (iterate_out_of_display_property): Support iteration over strings.
13279 (handle_single_display_spec): Set up it->bidi_it for iteration
13280 over a display string, and call bidi_init_it.
13281 (handle_single_display_spec, next_overlay_string)
13282 (get_overlay_strings_1, push_display_prop): Set up the bidi
13283 iterator for displaying display or overlay strings.
13284 (forward_to_next_line_start): Don't use the shortcut if
13285 bidi-iterating.
13286 (back_to_previous_visible_line_start): If handle_display_prop
13287 pushed the iterator stack, restore the internal state of the bidi
13288 iterator by calling bidi_pop_it same number of times.
13289 (reseat_at_next_visible_line_start): If ON_NEWLINE_P is non-zero,
13290 and we are bidi-iterating, don't decrement the iterator position;
13291 instead, set the first_elt flag in the bidi iterator, to produce
13292 the same effect.
13293 (reseat_1): Remove redundant setting of string_from_display_prop_p.
13294 (push_display_prop): xassert that we are iterating a buffer.
13295 (push_it, pop_it): Save and restore paragraph_embedding member.
13296 (handle_single_display_spec, next_overlay_string)
13297 (get_overlay_strings_1, reseat_1, reseat_to_string)
13298 (push_display_prop): Set up the `unibyte' member of bidi_it.string
13299 correctly. Don't assume unibyte strings are not bidi-reordered.
13300 (compute_display_string_pos)
13301 (compute_display_string_end): Fix handling the case of C string.
13302 (push_it, pop_it): Save and restore from_disp_prop_p.
13303 (handle_single_display_spec, push_display_prop): Set the
13304 from_disp_prop_p flag.
13305 (get_overlay_strings_1): Reset the from_disp_prop_p flag.
13306 (pop_it): Call iterate_out_of_display_property only if we are
13307 popping after iteration over a string that came from a display
13308 property. Fix a typo in popping stretch info. Add an assertion
13309 for verifying that the iterator position is in sync with the bidi
13310 iterator.
13311 (handle_single_display_spec, get_overlay_strings_1)
13312 (push_display_prop): Fix initialization of paragraph direction for
13313 string when that of the parent object is not yet determined.
13314 (reseat_1): Call bidi_init_it to resync the bidi
13315 iterator with IT's position. (Bug#7616)
13316 (find_row_edges): If ROW->start.pos gives position
13317 smaller than min_pos, use it as ROW->minpos. (Bug#7616)
13318 (handle_stop, back_to_previous_visible_line_start, reseat_1):
13319 Reset the from_disp_prop_p flag.
13320 (SAVE_IT, RESTORE_IT): New macros.
13321 (pos_visible_p, face_before_or_after_it_pos)
13322 (back_to_previous_visible_line_start)
13323 (move_it_in_display_line_to, move_it_in_display_line)
13324 (move_it_to, move_it_vertically_backward, move_it_by_lines)
13325 (try_scrolling, redisplay_window, display_line): Use them when
13326 saving a temporary copy of the iterator and restoring it back.
13327 (back_to_previous_visible_line_start, reseat_1)
13328 (init_iterator): Empty the bidi cache "stack".
13329 (move_it_in_display_line_to): If iterator ended up at
13330 EOL, but we never saw any buffer positions smaller than
13331 to_charpos, return MOVE_POS_MATCH_OR_ZV. Fixes vertical cursor
13332 motion in bidi-reordered lines.
13333 (move_it_in_display_line_to): Record prev_method and prev_pos
13334 immediately before the call to set_iterator_to_next. Fixes cursor
13335 motion in bidi-reordered lines with stretch glyphs and strings
13336 displayed in margins. (Bug#8133) (Bug#8867)
13337 Return MOVE_POS_MATCH_OR_ZV only if iterator position is past
13338 TO_CHARPOS.
640c8776
SM
13339 (pos_visible_p): Support positions in bidi-reordered lines.
13340 Save and restore bidi cache.
0bb23927
EZ
13341
13342 * bidi.c (bidi_level_of_next_char): clen should be EMACS_NT, not int.
13343 (bidi_paragraph_info): Delete unused struct.
13344 (bidi_cache_idx, bidi_cache_last_idx): Declare EMACS_INT.
13345 (bidi_cache_start): New variable.
13346 (bidi_cache_reset): Reset bidi_cache_idx to bidi_cache_start, not
13347 to zero.
13348 (bidi_cache_fetch_state, bidi_cache_search)
13349 (bidi_cache_find_level_change, bidi_cache_iterator_state)
13350 (bidi_cache_find, bidi_peek_at_next_level)
13351 (bidi_level_of_next_char, bidi_find_other_level_edge)
13352 (bidi_move_to_visually_next): Compare cache index with
13353 bidi_cache_start rather than with zero.
13354 (bidi_fetch_char): Accept new argument STRING; all callers
13355 changed. Support iteration over a string. Support strings with
13356 display properties. Support unibyte strings. Fix the type of
13357 `len' according to what STRING_CHAR_AND_LENGTH expects.
13358 (bidi_paragraph_init, bidi_resolve_explicit_1)
13359 (bidi_resolve_explicit, bidi_resolve_weak)
640c8776
SM
13360 (bidi_level_of_next_char, bidi_move_to_visually_next):
13361 Support iteration over a string.
0bb23927
EZ
13362 (bidi_set_sor_type, bidi_resolve_explicit_1)
13363 (bidi_resolve_explicit, bidi_type_of_next_char): ignore_bn_limit
13364 can now be zero (for strings); special values 0 and -1 were
13365 changed to -1 and -2, respectively.
13366 (bidi_char_at_pos): New function.
13367 (bidi_paragraph_init, bidi_resolve_explicit, bidi_resolve_weak):
13368 Call it instead of FETCH_MULTIBYTE_CHAR.
13369 (bidi_move_to_visually_next): Abort if charpos or bytepos were not
13370 initialized to valid values.
13371 (bidi_init_it): Don't initialize charpos and bytepos with invalid
13372 values.
13373 (bidi_level_of_next_char): Allow the sentinel "position" to pass
13374 the test for valid cached positions. Fix the logic for looking up
13375 the sentinel state in the cache. GCPRO the Lisp string we are
13376 iterating.
13377 (bidi_push_it, bidi_pop_it): New functions.
13378 (bidi_initialize): Initialize the bidi cache start stack pointer.
13379 (bidi_cache_ensure_space): New function, refactored from part of
13380 bidi_cache_iterator_state. Don't assume the required size is just
13381 one BIDI_CACHE_CHUNK away.
13382 (bidi_cache_start_stack, bidi_push_it): Use IT_STACK_SIZE.
13383 (bidi_count_bytes, bidi_char_at_pos): New functions.
13384 (bidi_cache_search): Don't assume bidi_cache_last_idx is
13385 always valid if bidi_cache_idx is valid.
13386 (bidi_cache_find_level_change): xassert that bidi_cache_last_idx
13387 is valid if it's going to be used.
13388 (bidi_shelve_cache, bidi_unshelve_cache): New functions.
13389 (bidi_cache_fetch_state, bidi_cache_search)
c965adc5
EZ
13390 (bidi_cache_find_level_change, bidi_cache_ensure_space)
13391 (bidi_cache_iterator_state, bidi_cache_find)
640c8776
SM
13392 (bidi_find_other_level_edge, bidi_cache_start_stack):
13393 All variables related to cache indices are now EMACS_INT.
c965adc5 13394
0bb23927
EZ
13395 * dispextern.h (struct bidi_string_data): New structure.
13396 (struct bidi_it): New member `string'. Make flag members be 1-bit
13397 fields, and put them last in the struct.
640c8776
SM
13398 (compute_display_string_pos, compute_display_string_end):
13399 Update prototypes.
0bb23927
EZ
13400 (bidi_push_it, bidi_pop_it): Add prototypes.
13401 (struct iterator_stack_entry): New members bidi_p,
13402 paragraph_embedding, and from_disp_prop_p.
13403 (struct it): Member bidi_p is now a bit field 1 bit wide.
640c8776
SM
13404 (bidi_shelve_cache, bidi_unshelve_cache):
13405 Declare prototypes.
0bb23927
EZ
13406
13407 * .gdbinit (xvectype, xvector, xcompiled, xchartable, xboolvector)
13408 (xpr, xfont, xbacktrace): Use "header.size" when accessing vectors
13409 and vector-like objects.
13410
13411 * dispnew.c (buffer_posn_from_coords): Save and restore the bidi
13412 cache around display iteration.
13413
13414 * window.c (Fwindow_end, window_scroll_pixel_based)
13415 (displayed_window_lines, Frecenter): Save and restore the bidi
13416 cache around display iteration.
13417
3bbd2265
LMI
134182011-07-14 Lars Magne Ingebrigtsen <larsi@gnus.org>
13419
13420 * editfns.c (Fdelete_region): Clarify the use of the named
13421 parameters (bug#6788).
13422
adc47434
MR
134232011-07-14 Martin Rudalics <rudalics@gmx.at>
13424
13425 * indent.c (Fvertical_motion): Set and restore w->pointm when
13426 saving and restoring the window's buffer (Bug#9006).
13427
837c31f8
LMI
134282011-07-13 Lars Magne Ingebrigtsen <larsi@gnus.org>
13429
13430 * editfns.c (Fstring_to_char): Clarify just what is returned
13431 (bug#6576). Text by Eli Zaretskii.
13432
ac389d0c
JB
134332011-07-13 Juanma Barranquero <lekktu@gmail.com>
13434
13435 * gnutls.c (init_gnutls_functions): Honor gnutls_log_level (bug#9059).
13436
0be0ce47
EZ
134372011-07-13 Eli Zaretskii <eliz@gnu.org>
13438
13439 * buffer.c (mmap_find): Fix a typo.
13440
cd18e7e3
JB
134412011-07-13 Johan Bockgård <bojohan@gnu.org>
13442
13443 Fix execution of x selection hooks.
13444 * xselect.c (Qx_lost_selection_functions)
13445 (Qx_sent_selection_functions): New vars.
13446 (syms_of_xselect): DEFSYM them.
13447 (x_handle_selection_request): Pass Qx_sent_selection_functions
13448 rather than Vx_sent_selection_functions to Frun_hook_with_args.
13449 (x_handle_selection_clear,x_clear_frame_selections):
13450 Pass Qx_lost_selection_functions rather than
13451 Vx_lost_selection_functions to Frun_hook_with_args.
13452
47ea7f44
PE
134532011-07-13 Paul Eggert <eggert@cs.ucla.edu>
13454
ac389d0c 13455 * buffer.c (Fget_buffer_create): Initialize inhibit_shrinking.
2941c447
PE
13456 The old code sometimes used this field without initializing it.
13457
47ea7f44
PE
13458 * alloc.c (gc_sweep): Don't read past end of array.
13459 In theory, the old code could also have corrupted Emacs internals,
13460 though it'd be very unlikely.
13461
bc985c87
AS
134622011-07-12 Andreas Schwab <schwab@linux-m68k.org>
13463
13464 * character.c (Fcharacterp): Don't advertise optional ignored
ac389d0c 13465 argument. (Bug#4026)
bc985c87 13466
0cf34688
LMI
134672011-07-12 Lars Magne Ingebrigtsen <larsi@gnus.org>
13468
b3dadd76
LMI
13469 * keymap.c (syms_of_keymap): Clarify that "modifier" is "modifier
13470 key" (bug#4257).
13471
0cf34688
LMI
13472 * window.c (Fset_window_start): Doc fix (bug#4199).
13473 (Fset_window_hscroll): Ditto.
13474
270768cd
PE
134752011-07-12 Paul Eggert <eggert@cs.ucla.edu>
13476
077e3dda 13477 Fix minor new problems caught by GCC 4.6.1.
270768cd 13478 * term.c (init_tty): Remove unused local.
490011a6 13479 * xsettings.c (store_monospaced_changed): Define this function only
077e3dda 13480 if (defined HAVE_GSETTINGS || defined HAVE_GCONF), as it's
490011a6 13481 not used otherwise.
270768cd 13482
b1f58454
CY
134832011-07-12 Chong Yidong <cyd@stupidchicken.com>
13484
13485 * xdisp.c (Vresize_mini_windows): Minor doc fix (Bug#3300).
13486
22b9578d
LMI
134872011-07-11 Lars Magne Ingebrigtsen <larsi@gnus.org>
13488
6e70ab07
LMI
13489 * xdisp.c (syms_of_xdisp): Make it explicit that the mini-windows
13490 are the mini-buffer and the echo area (bug#3320).
13491
22b9578d
LMI
13492 * term.c (init_tty): Remove support for supdup, c10 and perq
13493 terminals, which are no longer supported (bug#1482).
13494
8974cc9f
JB
134952011-07-10 Johan Bockgård <bojohan@gnu.org>
13496
13497 * xdisp.c (Ftool_bar_lines_needed): Fix WINDOWP check.
13498
a560d974
JD
134992011-07-10 Jan Djärv <jan.h.d@swipnet.se>
13500
13501 * xmenu.c (menu_highlight_callback): Only pass frame to show_help_event
13502 for non-popups (Bug#3642).
13503
1dae0f0a
AS
135042011-07-10 Andreas Schwab <schwab@linux-m68k.org>
13505
268c2c36 13506 * alloc.c (reset_malloc_hooks): Protoize.
1dae0f0a 13507 * buffer.c (mmap_init, mmap_find, mmap_free_1, mmap_enlarge)
268c2c36
AS
13508 (mmap_set_vars, mmap_alloc, mmap_free, mmap_realloc): Likewise.
13509 * cm.c (losecursor): Likewise.
1dae0f0a
AS
13510 * data.c (fmod): Likewise.
13511 * dispnew.c (swap_glyphs_in_rows): Likewise.
13512 * emacs.c (memory_warning_signal): Likewise.
13513 * floatfns.c (float_error): Likewise.
13514 * font.c (check_gstring, check_otf_features, otf_tag_symbol)
13515 (otf_open, font_otf_capability, generate_otf_features)
13516 (font_otf_DeviceTable, font_otf_ValueRecord, font_otf_Anchor):
13517 Likewise.
13518 * image.c (pbm_read_file): Likewise.
13519 * indent.c (string_display_width): Likewise.
13520 * intervals.c (check_for_interval, search_for_interval)
13521 (inc_interval_count, count_intervals, root_interval)
13522 (adjust_intervals_for_insertion, make_new_interval): Likewise.
13523 * lread.c (defalias): Likewise.
268c2c36 13524 * ralloc.c (r_alloc_check): Likewise.
1dae0f0a
AS
13525 * regex.c (set_image_of_range_1, set_image_of_range)
13526 (regex_grow_registers): Likewise.
13527 * sysdep.c (strerror): Likewise.
13528 * termcap.c (valid_filename_p, tprint, main): Likewise.
13529 * tparam.c (main): Likewise.
13530 * unexhp9k800.c (run_time_remap, save_data_space)
13531 (update_file_ptrs, read_header, write_header, calculate_checksum)
13532 (copy_file, copy_rest, display_header): Likewise.
13533 * widget.c (mark_shell_size_user_specified, create_frame_gcs):
13534 Likewise.
13535 * xdisp.c (check_it): Likewise.
13536 * xfaces.c (register_color, unregister_color, unregister_colors):
13537 Likewise.
13538 * xfns.c (print_fontset_result): Likewise.
13539 * xrdb.c (member, fatal, main): Likewise.
13540
99033785
PE
135412011-07-10 Paul Eggert <eggert@cs.ucla.edu>
13542
13543 Fix minor problems found by static checking (Bug#9031).
13544 * chartab.c (char_table_set_range, map_sub_char_table):
13545 Remove unused locals.
13546 (uniprop_table): Now static.
13547 * composite.c (_work_char): Remove unused static var.
13548
9cb2ac56
JB
135492011-07-09 Juanma Barranquero <lekktu@gmail.com>
13550
13551 * chartab.c (uniprop_table_uncompress): Remove unused local variable.
13552
f25661f0
JD
135532011-07-09 Jan Djärv <jan.h.d@swipnet.se>
13554
13555 * gtkutil.c (qttip_cb): Remove code without function.
13556
8278c4fe
EZ
135572011-07-09 Eli Zaretskii <eliz@gnu.org>
13558
13559 * w32.c (pthread_sigmask): New stub.
13560
1692ae2d 135612011-07-08 Paul Eggert <eggert@cs.ucla.edu>
123403e4 13562
8a6ebd58 13563 Use pthread_sigmask, not sigprocmask (Bug#9010).
123403e4
PE
13564 sigprocmask is portable only for single-threaded applications, and
13565 Emacs can be multi-threaded when it uses GTK.
1301ac26
PE
13566 * Makefile.in (LIB_PTHREAD_SIGMASK): New macro.
13567 (LIBES): Use it.
13568 * callproc.c (Fcall_process):
13569 * process.c (create_process):
13570 * sysdep.c (sys_sigblock, sys_sigunblock, sys_sigsetmask):
13571 Use pthread_sigmask, not sigprocmask.
123403e4 13572
1b854618
JD
135732011-07-08 Jan Djärv <jan.h.d@swipnet.se>
13574
13575 * gtkutil.c (qttip_cb): Set line wrap to FALSE for tooltip widget.
13576 (xg_prepare_tooltip): Revert text in x->ttip_lbl, margins was
13577 wrong (Bug#8591).
13578
3fe4b549
JD
135792011-07-08 Jan Djärv <jan.h.d@swipnet.se>
13580
0ce7e563
JD
13581 * gtkutil.c (xg_prepare_tooltip): Fix indentation and comment.
13582 Put text in x->ttip_lbl instead of gtk_tooltip_set_text (Bug#8591).
13583 (xg_hide_tooltip): Fix comment.
13584
3fe4b549
JD
13585 * nsterm.m (initFrameFromEmacs): Don't use ns_return_types
13586 in registerServicesMenuSendTypes.
13587 (validRequestorForSendType): Don't check ns_return_types.
13588
13589 * nsfns.m (Fx_open_connection): Put NSStringPboardType into
13590 ns_return_type.
13591
5df75e47
JR
135922011-07-08 Jason Rumney <jasonr@gnu.org>
13593
22610910
JR
13594 * w32term.c (x_make_frame_visible): Use SH_SHOWNORMAL rather than
13595 SH_SHOW for hidden windows (Bug#5482).
13596
5df75e47
JR
13597 * w32fns.c (w32_wnd_proc) [WM_TIMER, WM_SET_CURSOR]: Avoid using
13598 frame struct members of non-existent frames (Bug#6284).
13599
699c10bd
JD
136002011-07-08 Jan Djärv <jan.h.d@swipnet.se>
13601
4393663b
JD
13602 * nsterm.m (keyDown): Call to wantsToDelayTextChangeNotifications and
13603 variable firstTime not needed on OSX >= 10.6.
13604 (setPosition): setFloatValue:knobProportion: is deprecated on OSX
13605 >= 10.5. Use setKnobProportion, setDoubleValue.
13606
13607 * nsterm.h (MAC_OS_X_VERSION_10_3, MAC_OS_X_VERSION_10_4)
13608 (MAC_OS_X_VERSION_10_5): Define if not defined.
13609 (EmacsView, EmacsTooltip): Implements NSWindowDelegate on OSX >= 10.6.
13610 (EmacsMenu): Implements NSMenuDelegate on OSX >= 10.6.
13611 (EmacsToolbar): Implements NSToolbarDelegate on OSX >= 10.6.
13612
13613 * nsselect.m (ns_string_from_pasteboard): Don't use deprecated methods
090bd7cb 13614 cString and lossyCString on OSX >= 10.4.
4393663b 13615
58179cce 13616 * nsmenu.m (fillWithWidgetValue): Don't use deprecated method
4393663b
JD
13617 sizeToFit on OSX >= 10.2.
13618
13619 * nsimage.m (allocInitFromFile): Don't use deprecated method
13620 bestRepresentationForDevice on OSX >= 10.6.
13621
13622 * nsfns.m (check_ns_display_info): Cast to long and use %ld in error
13623 to avoid warning.
13624
13625 * emacs.c: Declare unexec_init_emacs_zone.
13626
a63e0781
JD
13627 * nsgui.h: Fix compiler warning about gnulib redefining verify.
13628
699c10bd
JD
13629 * nsselect.m (ns_get_local_selection): Change to extern (Bug#8842).
13630
13631 * nsmenu.m (ns_update_menubar): Remove useless setDelegate call
13632 on svcsMenu (Bug#8842).
13633
13634 * nsfns.m (Fx_open_connection): Remove NSStringPboardType from
13635 ns_return_types.
13636 (Fns_list_services): Just return Qnil on 10.6, code not working there.
13637
13638 * nsterm.m (QUTF8_STRING): Declare.
13639 (initFrameFromEmacs): Call registerServicesMenuSendTypes.
13640 (validRequestorForSendType): Return type is (id).
13641 Change indexOfObjectIdenticalTo to indexOfObject.
13642 Check if we have local selection before returning self (Bug#8842).
13643 (writeSelectionToPasteboard): Put local selection into paste board
13644 if we have a local selection (Bug#8842).
13645 (syms_of_nsterm): DEFSYM QUTF8_STRING.
13646
13647 * nsterm.h (MAC_OS_X_VERSION_10_6): Define here instead of nsterm.m.
13648 (ns_get_local_selection): Declare.
13649
54e10184
LMI
136502011-07-07 Lars Magne Ingebrigtsen <larsi@gnus.org>
13651
9888ff71
LMI
13652 * keymap.c (describe_map_tree): Don't insert a double newline at
13653 the end of the buffer (bug#1169) and return whether we inserted
13654 something.
13655
54e10184
LMI
13656 * callint.c (Fcall_interactively): Change "reading args" to
13657 "providing args" to try to clarify what it does (bug#1010).
13658
15fa4783
KH
136592011-07-07 Kenichi Handa <handa@m17n.org>
13660
13661 * composite.c (composition_compute_stop_pos): Ignore a static
13662 composition starting before CHARPOS (Bug#8915).
13663
13664 * xdisp.c (handle_composition_prop): Likewise.
13665
a8815b00
EZ
136662011-07-07 Eli Zaretskii <eliz@gnu.org>
13667
13668 * term.c (produce_glyphs) <xassert>: Allow IT_GLYPHLESS in it->what.
13669 (Bug#9015)
13670
ef7b981d 136712011-07-07 Kenichi Handa <handa@m17n.org>
c805dec0
KH
13672
13673 * character.h (unicode_category_t): New enum type.
13674
13675 * chartab.c (uniprop_decoder_t, uniprop_encoder_t): New types.
13676 (Qchar_code_property_table): New variable.
13677 (UNIPROP_TABLE_P, UNIPROP_GET_DECODER)
13678 (UNIPROP_COMPRESSED_FORM_P): New macros.
13679 (char_table_ascii): Uncompress the compressed values.
13680 (sub_char_table_ref): New arg is_uniprop. Callers changed.
13681 Uncompress the compressed values.
ac389d0c 13682 (sub_char_table_ref_and_range): Likewise.
c805dec0
KH
13683 (char_table_ref_and_range): Uncompress the compressed values.
13684 (sub_char_table_set): New arg is_uniprop. Callers changed.
13685 Uncompress the compressed values.
13686 (sub_char_table_set_range): Args changed. Callers changed.
13687 (char_table_set_range): Adjuted for the above change.
13688 (map_sub_char_table): Delete args default_val and parent. Add arg
13689 top. Give decoded values to a Lisp function.
640c8776 13690 (map_char_table): Adjust for the above change. Give decoded
c805dec0
KH
13691 values to a Lisp function. Gcpro more variables.
13692 (uniprop_table_uncompress)
13693 (uniprop_decode_value_run_length): New functions.
13694 (uniprop_decoder, uniprop_decoder_count): New variables.
13695 (uniprop_get_decoder, uniprop_encode_value_character)
13696 (uniprop_encode_value_run_length, uniprop_encode_value_numeric):
13697 New functions.
13698 (uniprop_encoder, uniprop_encoder_count): New variables.
13699 (uniprop_get_encoder, uniprop_table)
13700 (Funicode_property_table_internal, Fget_unicode_property_internal)
13701 (Fput_unicode_property_internal): New functions.
13702 (syms_of_chartab): DEFSYM Qchar_code_property_table, defsubr
13703 Sunicode_property_table_internal, Sget_unicode_property_internal,
5e617bc2 13704 and Sput_unicode_property_internal. Defvar_lisp
c805dec0
KH
13705 char-code-property-alist.
13706
640c8776 13707 * composite.c (CHAR_COMPOSABLE_P): Adjust for the change of
c805dec0
KH
13708 Vunicode_category_table.
13709
640c8776 13710 * font.c (font_range): Adjust for the change of
c805dec0
KH
13711 Vunicode_category_table.
13712
76b397fb
DN
137132011-07-07 Dan Nicolaescu <dann@ics.uci.edu>
13714
13715 * m/iris4d.h: Remove file, move contents ...
13716 * s/irix6-5.h: ... here.
13717
22b4128e
PE
137182011-07-06 Paul Eggert <eggert@cs.ucla.edu>
13719
13720 Remove unportable assumption about struct layout (Bug#8884).
8a5c77bb
PE
13721 * alloc.c (mark_buffer):
13722 * buffer.c (reset_buffer_local_variables, Fbuffer_local_variables)
13723 (clone_per_buffer_values): Don't assume that
22b4128e
PE
13724 sizeof (struct buffer) is a multiple of sizeof (Lisp_Object).
13725 This isn't true in general, and it's particularly not true
13726 if Emacs is configured with --with-wide-int.
13727 * buffer.h (FIRST_FIELD_PER_BUFFER, LAST_FIELD_PER_BUFFER):
13728 New macros, used in the buffer.c change.
13729
869795d6
JD
137302011-07-05 Jan Djärv <jan.h.d@swipnet.se>
13731
13732 * xsettings.c: Use both GConf and GSettings if both are available.
13733 (store_config_changed_event): Add comment.
13734 (dpyinfo_valid, store_font_name_changed, map_tool_bar_style)
13735 (store_tool_bar_style_changed): New functions.
5e617bc2 13736 (store_monospaced_changed): Add comment. Call dpyinfo_valid.
869795d6
JD
13737 (struct xsettings): Move font inside HAVE_XFT.
13738 (GSETTINGS_TOOL_BAR_STYLE, GSETTINGS_FONT_NAME): New defines.
640c8776 13739 (GSETTINGS_MONO_FONT): Rename from SYSTEM_MONO_FONT.
869795d6 13740 Move inside HAVE_XFT.
640c8776 13741 (something_changed_gsettingsCB): Rename from something_changedCB.
869795d6
JD
13742 Check for changes in GSETTINGS_TOOL_BAR_STYLE and GSETTINGS_FONT_NAME
13743 also.
13744 (GCONF_TOOL_BAR_STYLE, GCONF_FONT_NAME): New defines.
5e617bc2 13745 (GCONF_MONO_FONT): Rename from SYSTEM_MONO_FONT. Move inside HAVE_XFT.
640c8776 13746 (something_changed_gconfCB): Rename from something_changedCB.
869795d6
JD
13747 Check for changes in GCONF_TOOL_BAR_STYLE and GCONF_FONT_NAME also.
13748 (parse_settings): Move check for font inside HAVE_XFT.
13749 (read_settings, apply_xft_settings): Add comment.
13750 (read_and_apply_settings): Add comment. Call map_tool_bar_style and
13751 store_tool_bar_style_changed. Move check for font inside HAVE_XFT and
13752 call store_font_name_changed.
13753 (xft_settings_event): Add comment.
13754 (init_gsettings): Add comment. Get values for GSETTINGS_TOOL_BAR_STYLE
13755 and GSETTINGS_FONT_NAME. Move check for fonts within HAVE_XFT.
13756 (init_gconf): Add comment. Get values for GCONF_TOOL_BAR_STYLE
13757 and GCONF_FONT_NAME. Move check for fonts within HAVE_XFT.
13758 (xsettings_initialize): Call init_gsettings last.
640c8776
SM
13759 (xsettings_get_system_font, xsettings_get_system_normal_font):
13760 Add comment.
869795d6 13761
d8ed26bd
PE
137622011-07-05 Paul Eggert <eggert@cs.ucla.edu>
13763
13764 Random fixes. E.g., (random) never returned negative values.
13765 * fns.c (Frandom): Use GET_EMACS_TIME for random seed, and add the
13766 subseconds part to the entropy, as that's a bit more random.
13767 Prefer signed to unsigned, since the signedness doesn't matter and
13768 in general we prefer signed. When given a limit, use a
13769 denominator equal to INTMASK + 1, not to VALMASK + 1, because the
13770 latter isn't right if USE_2_TAGS_FOR_INTS.
13771 * sysdep.c (get_random): Return a value in the range 0..INTMASK,
13772 not 0..VALMASK. Don't discard "excess" bits that random () returns.
13773
cabf1cac
SM
137742011-07-04 Stefan Monnier <monnier@iro.umontreal.ca>
13775
13776 * textprop.c (text_property_stickiness):
13777 Obey Vtext_property_default_nonsticky.
13778 (syms_of_textprop): Add `display' to Vtext_property_default_nonsticky.
13779 * w32fns.c (syms_of_w32fns):
13780 * xfns.c (syms_of_xfns): Don't Add `display' since it's there by default.
13781
6e9b2be9
PE
137822011-07-04 Paul Eggert <eggert@cs.ucla.edu>
13783
13784 * fileio.c (barf_or_query_if_file_exists): Use S_ISDIR.
13785 This is more efficient than Ffile_directory_p and avoids a minor race.
13786
90186c68
LMI
137872011-07-04 Lars Magne Ingebrigtsen <larsi@gnus.org>
13788
7c301272
LMI
13789 * buffer.c (Foverlay_put): Say what the return value is
13790 (bug#7835).
13791
c4f2d8d4
LMI
13792 * fileio.c (barf_or_query_if_file_exists): Check first if the file
13793 is a directory before asking whether to use the file name
13794 (bug#7564).
ad637907
LMI
13795 (barf_or_query_if_file_exists): Make the "File is a directory"
13796 error be more correct.
c4f2d8d4 13797
90186c68
LMI
13798 * fns.c (Frequire): Remove the mention of the .gz files, since
13799 that's installation-specific, but keep the mention of
13800 `get-load-suffixes'.
13801
da64016e
PE
138022011-07-04 Paul Eggert <eggert@cs.ucla.edu>
13803
13804 * editfns.c (Fformat_time_string): Don't assume strlen fits in int.
13805 Report string overflow if the output is too long.
13806
7d47b580
JB
138072011-07-04 Juanma Barranquero <lekktu@gmail.com>
13808
a555cb87
JB
13809 * gnutls.c (Fgnutls_boot): Don't mention :verify-error.
13810 (syms_of_gnutls): Remove duplicate DEFSYM for
13811 Qgnutls_bootprop_verify_hostname_error, an error for
13812 Qgnutls_bootprop_verify_error (which is no longer used).
13813
7d47b580
JB
13814 * eval.c (find_handler_clause): Remove parameters `sig' and `data',
13815 unused since 2011-01-26T20:02:07Z!monnier@iro.umontreal.ca. All callers changed.
13816 Also (re)move comments that are misplaced or no longer relevant.
13817
1e49bfab
LMI
138182011-07-03 Lars Magne Ingebrigtsen <larsi@gnus.org>
13819
13820 * callint.c (Finteractive): Clarify the meaning of "@" (bug#8813).
13821
1485f4c0
CY
138222011-07-03 Chong Yidong <cyd@stupidchicken.com>
13823
13824 * xfaces.c (Finternal_merge_in_global_face): Modify the foreground
13825 and background color parameters if they have been changed.
13826
a9ab721e
LMI
138272011-07-03 Lars Magne Ingebrigtsen <larsi@gnus.org>
13828
13829 * editfns.c (Fformat): Clarify the - and 0 flags (bug#6659).
13830
cf7cff57
PE
138312011-07-03 Paul Eggert <eggert@cs.ucla.edu>
13832
2e13213d
PE
13833 * xsettings.c (SYSTEM_FONT): Define only when used.
13834 No need to define when HAVE_GSETTINGS || !HAVE_XFT.
13835
cf7cff57
PE
13836 * keymap.c (access_keymap_1): Now static.
13837
7a8e04f7
CY
138382011-07-02 Chong Yidong <cyd@stupidchicken.com>
13839
13840 * keyboard.c (command_loop_1): If a down-mouse event is unbound,
13841 leave any prefix arg for the up event (Bug#1586).
13842
61352f62
LMI
138432011-07-02 Lars Magne Ingebrigtsen <larsi@gnus.org>
13844
69bb1ef7
LMI
13845 * lread.c (syms_of_lread): Mention single symbols defined by
13846 `defvar' or `defconst' (bug#7154).
13847
61352f62 13848 * fns.c (Frequire): Mention .el.gz files (bug#7314).
7b3747f9 13849 (Frequire): Mention get-load-suffixes.
61352f62 13850
28545e04
MR
138512011-07-02 Martin Rudalics <rudalics@gmx.at>
13852
13853 * window.h (window): Remove clone_number slot.
13854 * window.c (Fwindow_clone_number, Fset_window_clone_number):
13855 Remove.
13856 (make_parent_window, make_window, saved_window)
13857 (Fset_window_configuration, save_window_save): Don't deal with
13858 clone numbers.
13859 * buffer.c (Qclone_number): Remove declaration.
13860 (sort_overlays, overlay_strings): Don't deal with clone numbers.
13861
3349e122
SM
138622011-07-02 Stefan Monnier <monnier@iro.umontreal.ca>
13863
13864 Add multiple inheritance to keymaps.
13865 * keymap.c (Fmake_composed_keymap): New function.
13866 (Fset_keymap_parent): Simplify.
13867 (fix_submap_inheritance): Remove.
13868 (access_keymap_1): New function extracted from access_keymap to handle
13869 embedded parents and handle lists of maps.
13870 (access_keymap): Use it.
13871 (Fkeymap_prompt, map_keymap_internal, map_keymap, store_in_keymap)
13872 (Fcopy_keymap): Handle embedded parents.
13873 (Fcommand_remapping, define_as_prefix): Simplify.
13874 (Fkey_binding): Simplify.
13875 (syms_of_keymap): Move minibuffer-local-completion-map,
13876 minibuffer-local-filename-completion-map,
13877 minibuffer-local-must-match-map, and
13878 minibuffer-local-filename-must-match-map to Elisp.
13879 (syms_of_keymap): Defsubr make-composed-keymap.
13880 * keyboard.c (menu_bar_items): Use map_keymap_canonical.
13881 (parse_menu_item): Trivial simplification.
13882
3279eb87
GM
138832011-07-01 Glenn Morris <rgm@gnu.org>
13884
13885 * Makefile.in (SETTINGS_LIBS): Fix typo.
13886
39cb9e56 138872011-07-01 Kazuhiro Ito <kzhr@d1.dion.ne.jp> (tiny change)
4550efdf
KI
13888
13889 * coding.c (Fencode_coding_string): Record the last coding system
13890 used, as the function doc string says (bug#8738).
13891
0949d2b6
JD
138922011-07-01 Jan Djärv <jan.h.d@swipnet.se>
13893
13894 * xsettings.c (store_monospaced_changed): Take new font as arg and
13895 check for change against current_mono_font.
13896 (EMACS_TYPE_SETTINGS): Remove this and related defines.
13897 (emacs_settings_constructor, emacs_settings_get_property)
13898 (emacs_settings_set_property, emacs_settings_class_init)
13899 (emacs_settings_init, gsettings_obj): Remove.
13900 (something_changedCB): New function for HAVE_GSETTINGS.
13901 (something_changedCB): HAVE_GCONF: Call store_monospaced_changed
13902 with value as argument.
13903 (init_gsettings): Check that GSETTINGS_SCHEMA exists before calling
13904 g_settings_new (Bug#8967). Do not create gsettings_obj.
9173deec 13905 Remove calls to g_settings_bind. Connect something_changedCB to
0949d2b6
JD
13906 "changed".
13907
13908 * xgselect.c: Add defined (HAVE_GSETTINGS).
13909 (xgselect_initialize): Ditto.
13910
13911 * process.c: Add defined (HAVE_GSETTINGS) for xgselect.h
13912 (wait_reading_process_output): Add defined (HAVE_GSETTINGS) for
13913 xg_select.
13914
bbc6b304
PE
139152011-07-01 Paul Eggert <eggert@cs.ucla.edu>
13916
13917 * eval.c (struct backtrace): Simplify and port the data structure.
13918 Do not assume that "int nargs : BITS_PER_INT - 2;" produces a
13919 signed bit field, as this assumption is not portable and it makes
13920 Emacs crash when compiled with Sun C 5.8 on sparc. Do not use
13921 "char debug_on_exit : 1" as this is not portable either; instead,
13922 use the portable "unsigned int debug_on_exit : 1". Remove unused
13923 member evalargs. Remove obsolete comments about cc bombing out.
13924
9851bfc5
JD
139252011-06-30 Jan Djärv <jan.h.d@swipnet.se>
13926
51bb811f 13927 * xsettings.c: Include glib-object.h, gio/gio.h if HAVE_GSETTINGS.
9851bfc5
JD
13928 Let HAVE_GSETTINGS override HAVE_GCONF.
13929 (store_monospaced_changed): New function.
13930 (EMACS_SETTINGS): A new type derived from GObject to handle
13931 GSettings notifications.
13932 (emacs_settings_constructor, emacs_settings_get_property)
13933 (emacs_settings_set_property, emacs_settings_class_init):
13934 New functions.
13935 (gsettings_client, gsettings_obj): New variables.
13936 (GSETTINGS_SCHEMA): New define.
13937 (something_changedCB): Call store_monospaced_changed.
13938 (init_gsettings): New function.
13939 (xsettings_initialize): Call init_gsettings.
13940 (syms_of_xsettings): Initialize gsettings_client, gsettings_obj
13941 to NULL.
13942
640c8776 13943 * Makefile.in (SETTINGS_CFLAGS, SETTINGS_LIBS): Rename from
9851bfc5
JD
13944 GCONF_CFLAGS/LIBS.
13945
5386012d
MR
139462011-06-29 Martin Rudalics <rudalics@gmx.at>
13947
13948 * window.c (resize_root_window, grow_mini_window)
13949 (shrink_mini_window): Rename Qresize_root_window to
13950 Qwindow_resize_root_window and Qresize_root_window_vertically to
13951 Qwindow_resize_root_window_vertically.
13952
f13e0b08
PE
139532011-06-28 Paul Eggert <eggert@cs.ucla.edu>
13954
13955 * gnutls.c (Qgnutls_bootprop_verify_error): Remove unused var.
13956
94515237
JB
139572011-06-27 Juanma Barranquero <lekktu@gmail.com>
13958
13959 * makefile.w32-in: Redesign dependencies so they reflect more
13960 clearly which files are directly included by each source file,
13961 and not through other includes.
13962
e43b6e43
MR
139632011-06-27 Martin Rudalics <rudalics@gmx.at>
13964
13965 * buffer.c (Qclone_number): Declare static and DEFSYM it.
13966 (sort_overlays, overlay_strings): When an overlay's clone number
13967 matches the window's clone number process the overlay even if
13968 the overlay's window property doesn't match the current window.
13969
d68443dc
MR
13970 * window.c (Fwindow_vchild): Rename to Fwindow_top_child.
13971 (Fwindow_hchild): Rename to Fwindow_left_child.
13972 (Fwindow_next): Rename to Fwindow_next_sibling.
13973 (Fwindow_prev): Rename to Fwindow_prev_sibling.
d615d6d2
MR
13974 (resize_window_check): Rename to window_resize_check.
13975 (resize_window_apply): Rename to window_resize_apply.
13976 (Fresize_window_apply): Rename to Fwindow_resize_apply.
13977 (Fdelete_other_windows_internal, resize_frame_windows)
13978 (Fsplit_window_internal, Fdelete_window_internal)
13979 (grow_mini_window, shrink_mini_window)
13980 (Fresize_mini_window_internal): Fix callers accordingly.
d68443dc 13981
c7e73be5
JD
139822011-06-26 Jan Djärv <jan.h.d@swipnet.se>
13983
13984 * emacsgtkfixed.h: State that this is only used with Gtk+3.
13985 (emacs_fixed_set_min_size): Remove.
13986 (emacs_fixed_new): Take frame as argument.
13987
13988 * emacsgtkfixed.c: State that this is only used with Gtk+3.
13989 (_EmacsFixedPrivate): Remove minwidth/height.
13990 Add struct frame *f.
13991 (emacs_fixed_init): Initialize priv->f.
13992 (get_parent_class, emacs_fixed_set_min_size): Remove.
13993 (emacs_fixed_new): Set priv->f to argument.
13994 (emacs_fixed_get_preferred_width)
13995 (emacs_fixed_get_preferred_height): Use min_width/height from
13996 frames size_hint to set minimum and natural (Bug#8919).
13997 (XSetWMSizeHints, XSetWMNormalHints): Override these functions
13998 and use min_width/height from frames size_hint to set
13999 min_width/height (Bug#8919).
14000
14001 * gtkutil.c (xg_create_frame_widgets): Pass f to emacs_fixed_new.
9173deec
JB
14002 (x_wm_set_size_hint): Remove call to emacs_fixed_set_min_size.
14003 Fix indentation.
c7e73be5 14004
cf99dcf8
EZ
140052011-06-26 Eli Zaretskii <eliz@gnu.org>
14006
14007 * bidi.c (bidi_paragraph_init): Test for ZV_BYTE before calling
14008 bidi_at_paragraph_end, since fast_looking_at doesn't like to be
14009 called at ZV.
14010
029529ac
CY
140112011-06-26 Chong Yidong <cyd@stupidchicken.com>
14012
14013 * process.c (wait_reading_process_output): Bypass select if
14014 waiting for a cell while ignoring keyboard input, and input is
14015 pending. Suggested by Jan Djärv (Bug#8869).
14016
7a7ef429
PE
140172011-06-25 Paul Eggert <eggert@cs.ucla.edu>
14018
14019 Use gnulib's dup2 module instead of rolling our own.
14020 * sysdep.c (dup2) [!HAVE_DUP2]: Remove; gnulib now does this.
14021
11fdef7d 140222011-06-25 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
989b42d2
YM
14023
14024 * dispnew.c (scrolling_window): Before scrolling, turn off a
14025 mouse-highlight in the window being scrolled.
14026
cd3520a4
JB
140272011-06-24 Juanma Barranquero <lekktu@gmail.com>
14028
14029 Move DEFSYM to lisp.h and use everywhere.
14030
14031 * character.h (DEFSYM): Move declaration...
14032 * lisp.h (DEFSYM): ...here.
14033
14034 * gnutls.c:
14035 * minibuf.c:
14036 * w32menu.c:
14037 * w32proc.c:
14038 * w32select.c: Don't include character.h.
14039
14040 * alloc.c (syms_of_alloc):
14041 * buffer.c (syms_of_buffer):
14042 * bytecode.c (syms_of_bytecode):
14043 * callint.c (syms_of_callint):
14044 * casefiddle.c (syms_of_casefiddle):
14045 * casetab.c (init_casetab_once):
14046 * category.c (init_category_once, syms_of_category):
14047 * ccl.c (syms_of_ccl):
14048 * cmds.c (syms_of_cmds):
14049 * composite.c (syms_of_composite):
14050 * dbusbind.c (syms_of_dbusbind):
14051 * dired.c (syms_of_dired):
14052 * dispnew.c (syms_of_display):
14053 * doc.c (syms_of_doc):
14054 * editfns.c (syms_of_editfns):
14055 * emacs.c (syms_of_emacs):
14056 * eval.c (syms_of_eval):
14057 * fileio.c (syms_of_fileio):
14058 * fns.c (syms_of_fns):
14059 * frame.c (syms_of_frame):
14060 * fringe.c (syms_of_fringe):
14061 * insdel.c (syms_of_insdel):
14062 * keymap.c (syms_of_keymap):
14063 * lread.c (init_obarray, syms_of_lread):
14064 * macros.c (syms_of_macros):
14065 * msdos.c (syms_of_msdos):
14066 * print.c (syms_of_print):
14067 * process.c (syms_of_process):
14068 * search.c (syms_of_search):
14069 * sound.c (syms_of_sound):
14070 * syntax.c (init_syntax_once, syms_of_syntax):
14071 * terminal.c (syms_of_terminal):
14072 * textprop.c (syms_of_textprop):
14073 * undo.c (syms_of_undo):
14074 * w32.c (globals_of_w32):
14075 * window.c (syms_of_window):
14076 * xdisp.c (syms_of_xdisp):
14077 * xfaces.c (syms_of_xfaces):
14078 * xfns.c (syms_of_xfns):
14079 * xmenu.c (syms_of_xmenu):
14080 * xsettings.c (syms_of_xsettings):
14081 * xterm.c (syms_of_xterm): Use DEFSYM.
14082
4228cf16
TZ
140832011-06-24 Teodor Zlatanov <tzz@lifelogs.com>
14084
cd3520a4 14085 * gnutls.c (syms_of_gnutls): Use the DEFSYM macro from character.h.
4228cf16 14086
7fcccf1e
PE
140872011-06-23 Paul Eggert <eggert@cs.ucla.edu>
14088
7efb4e0e
PE
14089 Integer and buffer overflow fixes (Bug#8873).
14090
ff5844ad
PE
14091 * print.c (printchar, strout): Check for string overflow.
14092 (PRINTPREPARE, printchar, strout):
14093 Don't set size unless allocation succeeds.
14094
90532f02
PE
14095 * minibuf.c (read_minibuf_noninteractive): Use ptrdiff_t, not int,
14096 for sizes. Check for string overflow more accurately.
14097 Simplify newline removal at end; this suppresses a GCC 4.6.0 warning.
14098
6d84508d
PE
14099 * macros.c: Integer and buffer overflow fixes.
14100 * keyboard.h (struct keyboard.kbd_macro_bufsize):
14101 * macros.c (Fstart_kbd_macro, store_kbd_macro_char):
14102 Use ptrdiff_t, not int, for sizes.
14103 Don't increment bufsize until after realloc succeeds.
14104 Check for size-calculation overflow.
14105 (Fstart_kbd_macro): Use EMACS_INT, not int, for XINT result.
14106
437b2cb4
PE
14107 * lisp.h (DEFVAR_KBOARD): Use offsetof instead of char * finagling.
14108
8b9ac8b4
PE
14109 * lread.c: Integer overflow fixes.
14110 (read_integer): Radix is now EMACS_INT, not int,
14111 to improve quality of diagnostics for out-of-range radices.
14112 Calculate buffer size correctly for out-of-range radices.
14113 (read1): Check for integer overflow in radices, and in
14114 read-circle numbers.
82cb60d3
PE
14115 (read_escape): Avoid int overflow.
14116 (Fload, openp, read_buffer_size, read1)
14117 (substitute_object_recurse, read_vector, read_list, map_obarray):
14118 Use ptrdiff_t, not int, for sizes.
14119 (read1): Use EMACS_INT, not int, for sizes.
20270765 14120 Check for size overflow.
8b9ac8b4 14121
7fcccf1e
PE
14122 * image.c (cache_image): Check for size arithmetic overflow.
14123
bfbbd7e7
PE
14124 * lread.c: Integer overflow issues.
14125 (saved_doc_string_size, saved_doc_string_length)
14126 (prev_saved_doc_string_size, prev_saved_doc_string_length):
14127 Now ptrdiff_t, not int.
14128 (read1): Don't assume doc string length fits in int. Check for
14129 out-of-range doc string lengths.
14130 (read_list): Don't assume file position fits in int.
39019e54 14131 (read_escape): Check for hex character overflow.
bfbbd7e7 14132
4e323265
LL
141332011-06-22 Leo Liu <sdl.web@gmail.com>
14134
14135 * minibuf.c (Fcompleting_read_default, Vcompleting_read_function):
14136 Move to minibuffer.el.
14137
85fece3e
PE
141382011-06-22 Paul Eggert <eggert@cs.ucla.edu>
14139
20b84ce9 14140 Fixes for GLYPH_DEBUG found by GCC 4.6.0 static checking.
85fece3e
PE
14141 The following patches are for when GLYPH_DEBUG && !XASSERT.
14142 * dispextern.h (trace_redisplay_p, dump_glyph_string):
14143 * dispnew.c (flush_stdout):
14144 * xdisp.c (dump_glyph_row, dump_glyph_matrix, dump_glyph):
14145 Mark as externally visible.
14146 * dispnew.c (check_window_matrix_pointers): Now static.
14147 * dispnew.c (window_to_frame_vpos):
14148 * xfns.c (unwind_create_frame):
14149 * xterm.c (x_check_font): Remove unused local.
14150 * scroll.c (CHECK_BOUNDS):
14151 * xfaces.c (cache_fache): Rename local to avoid shadowing.
14152 * xfns.c, w32fns.c (image_cache_refcount, dpyinfo_refcount): Now static.
14153 * xdisp.c (check_window_end): Now a no-op if !XASSERTS.
14154 (debug_first_unchanged_at_end_vpos, debug_last_unchanged_at_beg_vpos)
14155 (debug_dvpos, debug_dy, debug_delta, debug_delta_bytes, debug_end_vpos):
14156 Now static.
14157 (debug_method_add): Use va_list and vsprintf rather than relying
14158 on undefined behavior with wrong number of arguments.
14159 (dump_glyph, dump_glyph_row, Fdump_glyph_matrix):
14160 Don't assume ptrdiff_t and EMACS_INT are the same width as int.
14161 In this code, it's OK to assume C99 behavior for ptrdiff_t formats
14162 since we're not interested in debugging glyphs with old libraries.
14163 * xfaces.c (cache_face): Move debugging code earlier; this pacifies
14164 GCC 4.6.0's static checking.
14165
0766b489
PE
141662011-06-22 Paul Eggert <eggert@cs.ucla.edu>
14167
31fd4b32
PE
14168 Integer overflow and signedness fixes (Bug#8873).
14169 A few related buffer overrun fixes, too.
14170
b79e8648
PE
14171 * font.c (font_score): Use EMACS_INT, not int, to store XINT value.
14172
0766b489
PE
14173 * dispextern.h (struct face.stipple):
14174 * image.c (x_bitmap_height, x_bitmap_width, x_bitmap_pixmap)
14175 (x_bitmap_mask, x_allocate_bitmap_record)
14176 (x_create_bitmap_from_data, x_create_bitmap_from_file)
14177 (x_destroy_bitmap, x_destroy_all_bitmaps, x_create_bitmap_mask)
14178 (x_create_bitmap_from_xpm_data):
14179 * nsterm.h (struct ns_display_info.bitmaps_size, .bitmaps_last):
14180 * w32term.h (struct w32_display_info.icon_bitmap_id, .bitmaps_size)
14181 (.bitmaps_last):
14182 * xfaces.c (load_pixmap):
14183 * xterm.c (x_bitmap_icon, x_wm_set_icon_pixmap):
14184 * xterm.h (struct x_display_info.icon_bitmap_id, .bitmaps_size)
14185 (.bitmaps_last, struct x_output.icon_bitmap):
14186 Use ptrdiff_t, not int, for bitmap indexes.
14187 (x_allocate_bitmap_record): Check for size overflow.
14188 * dispextern.h, lisp.h: Adjust to API changes elsewhere.
14189
b081724f
PE
14190 Use ptrdiff_t, not int, for overlay counts.
14191 * buffer.h (overlays_at, sort_overlays, GET_OVERLAYS_AT):
14192 * editfns.c (overlays_around, get_pos_property):
14193 * textprop.c (get_char_property_and_overlay):
14194 * xdisp.c (next_overlay_change, note_mouse_highlight):
14195 * xfaces.c (face_at_buffer_position):
21514da7
PE
14196 * buffer.c (OVERLAY_COUNT_MAX): New macro.
14197 (overlays_at, overlays_in, sort_overlays, Foverlays_at)
14198 (Fnext_overlay_change, Fprevious_overlay_change)
14199 (mouse_face_overlay_overlaps, Foverlays_in):
b081724f 14200 Use ptrdiff_t, not int, for sizes.
21514da7 14201 (overlays_at, overlays_in): Check for size-calculation overflow.
b081724f 14202
3de73e5e
PE
14203 * xterm.c (xim_initialize, same_x_server): Strlen may not fit in int.
14204
2606c57b
PE
14205 * xsmfns.c (smc_save_yourself_CB, x_session_initialize): Avoid strlen.
14206 (x_session_initialize): Do not assume string length fits in int.
14207
aaafe47a
PE
14208 * xsettings.c (apply_xft_settings): Fix potential buffer overrun.
14209 This is unlikely, but can occur if DPI is outlandish.
14210
2674ddc8 14211 * xsettings.c (Ffont_get_system_normal_font, Ffont_get_system_font):
3a5077c5
PE
14212 * xselect.c (Fx_get_atom_name): Avoid need for strlen.
14213
28154962
PE
14214 * xrdb.c: Don't assume strlen fits in int; avoid some strlens.
14215 * xrdb.c (magic_file_p, search_magic_path):
14216 Omit last arg SUFFIX; it was always 0. All callers changed.
14217 (magic_file_p): Use ptrdiff_t, not int. Check for size overflow.
14218
7de51af5
PE
14219 * xfont.c (xfont_match): Avoid need for strlen.
14220
25ed6cc3
PE
14221 * xfns.c: Don't assume strlen fits in int.
14222 (xic_create_fontsetname, x_window): Use ptrdiff_t, not int.
14223
4eab31dd
PE
14224 * xdisp.c (message_log_check_duplicate): Return intmax_t,
14225 not unsigned long, as we prefer signed integers. All callers changed.
14226 Detect integer overflow in repeat count.
14227 (message_dolog): Don't assume print length fits in 39 bytes.
df1f27af 14228 (display_mode_element): Don't assume strlen fits in int.
4eab31dd 14229
171e2a58
PE
14230 * termcap.c: Don't assume sizes fit in int and never overflow.
14231 (struct termcap_buffer, tgetent): Use ptrdiff_t, not int, for sizes.
14232 (gobble_line): Check for size-calculation overflow.
14233
ad39faca 14234 * minibuf.c (Fread_buffer):
6e5bb2dc 14235 * lread.c (intern, intern_c_string):
74ca2eb3
PE
14236 * image.c (xpm_scan) [HAVE_NS && !HAVE_XPM]:
14237 Don't assume string length fits in int.
14238
52c61c22 14239 * keyboard.c (parse_tool_bar_item):
9bda3520
PE
14240 * gtkutil.c (style_changed_cb): Avoid need for strlen.
14241
b5b8c9e5
PE
14242 * font.c: Don't assume string length fits in int.
14243 (font_parse_xlfd, font_parse_fcname, font_unparse_fcname):
14244 Use ptrdiff_t, not int.
ccd6111c
PE
14245 (font_intern_prop): Don't assume string length fits in int.
14246 Don't assume integer property fits in fixnum.
14247 * font.h (font_intern_prop): 2nd arg is now ptrdiff_t, not int.
b5b8c9e5 14248
882f0d81 14249 * filelock.c: Fix some buffer overrun and integer overflow issues.
51cab52b 14250 (get_boot_time): Don't assume gzip command string fits in 100 bytes.
882f0d81
PE
14251 Reformulate so as not to need the command string.
14252 Invoke gzip -cd rather than gunzip, as it's more portable.
14253 (lock_info_type, lock_file_1, lock_file):
14254 Don't assume pid_t and time_t fit in unsigned long.
14255 (LOCK_PID_MAX): Remove; we now use more-reliable bounds.
14256 (current_lock_owner): Prefer signed type for sizes.
14257 Use memcpy, not strncpy, where memcpy is what is really wanted.
14258 Don't assume (via atoi) that time_t and pid_t fit in int.
14259 Check for time_t and/or pid_t out of range, e.g., via a network share.
14260 Don't alloca where an auto var works fine.
14261
93f4cf88
PE
14262 * fileio.c: Fix some integer overflow issues.
14263 (file_name_as_directory, Fexpand_file_name, Fsubstitute_in_file_name):
14264 Don't assume string length fits in int.
14265 (directory_file_name): Don't assume string length fits in long.
14266 (make_temp_name): Don't assume pid fits in int, or that its print
14267 length is less than 20.
14268
f3e92b69
PE
14269 * data.c (Fsubr_name): Rewrite to avoid a strlen call.
14270
1bfdaf10
PE
14271 * coding.c (make_subsidiaries): Don't assume string length fits in int.
14272
35016e9a
PE
14273 * callproc.c (child_setup): Rewrite to avoid two strlen calls.
14274
3d1e65a1
PE
14275 * process.c (Fformat_network_address): Use EMACS_INT, not EMACS_UINT.
14276 We prefer signed integers, even for size calculations.
14277
0b963a93
PE
14278 * emacs.c: Don't assume string length fits in 'int'.
14279 (DEFINE_DUMMY_FUNCTION, sort_args): Use ptrdiff_t, not int.
14280 (main): Don't invoke strlen when not needed.
14281
573f4b54
PE
14282 * dbusbind.c (XD_ERROR): Don't arbitrarily truncate string.
14283 (XD_DEBUG_MESSAGE): Don't waste a byte.
14284
989f33ba
PE
14285 * callproc.c (getenv_internal_1, getenv_internal)
14286 (Fgetenv_internal):
965d34eb
PE
14287 * buffer.c (init_buffer): Don't assume string length fits in 'int'.
14288
e4d29b33
PE
14289 * lread.c (invalid_syntax): Omit length argument.
14290 All uses changed. This doesn't fix a bug, but it simplifies the
14291 code away from its former Hollerith-constant appearance, and it's
14292 one less 'int' to worry about when looking at integer-overflow issues.
51cab52b 14293 (string_to_number): Simplify 2011-04-26 change by invoking xsignal1.
e4d29b33 14294
eb49b136
PE
14295 * lisp.h (DEFUN): Remove bogus use of sizeof (struct Lisp_Subr).
14296 This didn't break anything, but it didn't help either.
14297 It's confusing to put a bogus integer in a place where the actual
14298 value does not matter.
9f62aeb1 14299 (LIST_END_P): Remove unused macro and its bogus comment.
cbeff735 14300 (make_fixnum_or_float): Remove unnecessary cast to EMACS_INT.
eb49b136 14301
15375a22
PE
14302 * lisp.h (union Lisp_Object.i): EMACS_INT, not EMACS_UINT.
14303 This is for consistency with the ordinary, non-USE_LISP_UNION_TYPE,
14304 implementation.
b61cc01c
PE
14305 (struct Lisp_Bool_Vector.size): EMACS_INT, not EMACS_UINT.
14306 We prefer signed types, and the value cannot exceed the EMACS_INT
14307 range anyway (because otherwise the length would not be representable).
9a8e8d9b
PE
14308 (XSET) [USE_LISP_UNION_TYPE]: Use uintptr_t and intptr_t,
14309 not EMACS_UINT and EMACS_INT, when converting pointer to integer.
14310 This avoids a GCC warning when WIDE_EMACS_INT.
15375a22 14311
53b2623d
PE
14312 * indent.c (sane_tab_width): New function.
14313 (current_column, scan_for_column, Findent_to, position_indentation)
14314 (compute_motion): Use it. This is just for clarity.
8fcaf9cc 14315 (Fcompute_motion): Don't assume hscroll and tab offset fit in int.
53b2623d 14316
51cab52b 14317 * image.c (xbm_image_p): Don't assume stated width, height fit in int.
45aebb64 14318
f2ed8a70
PE
14319 * lisp.h (lint_assume): New macro.
14320 * composite.c (composition_gstring_put_cache):
14321 * ftfont.c (ftfont_shape_by_flt): Use it to pacify GCC 4.6.0.
14322
abe80cc6
PE
14323 * editfns.c, insdel.c:
14324 Omit unnecessary forward decls, to simplify future changes.
a9e860e1 14325
b02c740e
PE
14326 * ftfont.c (ftfont_shape_by_flt): Use signed integers for lengths.
14327
ebc96716
PE
14328 * font.c (Ffont_shape_gstring): Don't assume glyph len fits in 'int'.
14329
b4e50fa0 14330 * fns.c (Ffillarray): Don't assume bool vector size fits in 'int'.
f03dc6ef 14331 Use much-faster test for byte-length change.
311d5d7c 14332 Don't assume string byte-length fits in 'int'.
a4cf38e4 14333 Check that character arg fits in 'int'.
85461888 14334 (mapcar1): Declare byte as byte, for clarity.
b4e50fa0 14335
c0c1ee9f
PE
14336 * alloc.c (Fmake_bool_vector): Avoid unnecessary multiplication.
14337
a498d7f4
PE
14338 * fns.c (concat): Catch string overflow earlier.
14339 Do not rely on integer wraparound.
14340
51cab52b
PE
14341 * dispextern.h (struct it.overlay_strings_charpos)
14342 (struct it.selective): Now EMACS_INT, not int.
87830974
PE
14343 * xdisp.c (forward_to_next_line_start)
14344 (back_to_previous_visible_line_start)
14345 (reseat_at_next_visible_line_start, next_element_from_buffer):
14346 Don't arbitrarily truncate the value of 'selective' to int.
14347
76031fad
PE
14348 * xdisp.c (init_iterator): Use XINT, not XFASTINT; it might be < 0.
14349
5eb55db9
PE
14350 * composite.c: Don't truncate sizes to 'int'.
14351 (composition_gstring_p, composition_reseat_it)
14352 (composition_adjust_point): Use EMACS_INT, not int.
7d100a81
PE
14353 (get_composition_id, composition_gstring_put_cache): Use EMACS_INT,
14354 not EMACS_UINT, for indexes.
5eb55db9 14355
0703a717
PE
14356 * category.h (CATEGORY_SET_P): Remove unnecessary cast to EMACS_INT.
14357
d6202519
PE
14358 * buffer.c: Include <verify.h>.
14359 (struct sortvec.priority, struct sortstr.priority):
8961a454 14360 Now EMACS_INT, not int.
c20998a7 14361 (compare_overlays, cmp_for_strings): Avoid subtraction overflow.
67c36fce
PE
14362 (struct sortstr.size, record_overlay_string)
14363 (struct sortstrlist.size, struct sortlist.used):
14364 Don't truncate size to int.
14365 (record_overlay_string): Check for size-calculation overflow.
d6202519 14366 (init_buffer_once): Check at compile-time, not run-time.
fadf4e30 14367
d5a19415
JM
143682011-06-22 Jim Meyering <meyering@redhat.com>
14369
029529ac 14370 Don't leak an XBM-image-sized buffer
d5a19415
JM
14371 * image.c (xbm_load): Free the image buffer after using it.
14372
a9041e6c
PE
143732011-06-21 Paul Eggert <eggert@cs.ucla.edu>
14374
14375 Port to Sun C.
14376 * composite.c (find_automatic_composition): Omit needless 'return 0;'
14377 that Sun C diagnosed.
14378 * fns.c (secure_hash): Fix pointer signedness issue.
14379 * intervals.c (static_offset_intervals): New function.
14380 (offset_intervals): Use it.
14381
7f3f739f
LL
143822011-06-21 Leo Liu <sdl.web@gmail.com>
14383
14384 * deps.mk (fns.o):
14385 * makefile.w32-in ($(BLD)/fns.$(O)): Include sha256.h and
14386 sha512.h.
14387
14388 * fns.c (secure_hash): Rename from crypto_hash_function and change
14389 the first arg to accept symbols.
5b66d427 14390 (Fsecure_hash): New primitive.
7f3f739f
LL
14391 (syms_of_fns): New symbols.
14392
76147d94
DD
143932011-06-20 Deniz Dogan <deniz@dogan.se>
14394
14395 * process.c (Fset_process_buffer): Clarify return value in
14396 docstring.
14397
7d7d0045
CY
143982011-06-18 Chong Yidong <cyd@stupidchicken.com>
14399
14400 * dispnew.c (add_window_display_history): Use BVAR.
14401
14402 * xdisp.c (debug_method_add): Use BVAR.
14403 (check_window_end, dump_glyph_matrix, dump_glyph)
14404 (dump_glyph_row, dump_glyph_string): Convert arglist to ANSI C.
14405
14406 * xfaces.c (check_lface_attrs, check_lface, dump_realized_face):
14407 Likewise.
14408
14409 * xfns.c (Fx_create_frame, x_create_tip_frame): Delay image cache
14410 check till after the cache is created in init_frame_faces.
14411
ff2bc410
SM
144122011-06-17 Stefan Monnier <monnier@iro.umontreal.ca>
14413
14414 * fns.c (Fsafe_length): Yet another int/Lisp_Object mixup.
14415
28177add
PE
144162011-06-16 Paul Eggert <eggert@cs.ucla.edu>
14417
dd3482fe
PE
14418 * lisp.h: Include <limits.h>, for INT_MAX, LONG_MAX, LLONG_MAX.
14419 Without this, prin1 mishandles Lisp_Misc_Save_Value printing on
14420 hosts with pre-C99 libraries, because pD is wrongly defined to "t".
14421
393d71f3 14422 Improve buffer-overflow checking (Bug#8873).
1c8e352f
PE
14423 * fileio.c (Finsert_file_contents):
14424 * insdel.c (insert_from_buffer_1, replace_range, replace_range_2):
14425 Remove the old (too-loose) buffer overflow checks.
14426 They weren't needed, since make_gap checks for buffer overflow.
14427 * insdel.c (make_gap_larger): Catch buffer overflows that were missed.
14428 The old code merely checked for Emacs fixnum overflow, and relied
14429 on undefined (wraparound) behavior. The new code avoids undefined
14430 behavior, and also checks for ptrdiff_t and/or size_t overflow.
14431
2e6813b0 14432 * editfns.c (Finsert_char): Don't dump core with very negative counts.
21d890a4
PE
14433 Tune. Don't use wider integers than needed. Don't use alloca.
14434 Use a bigger 'string' buffer. Rewrite to avoid 'n > 0' test.
2e6813b0 14435
599a9e4f
PE
14436 * insdel.c (replace_range): Fix buf overflow when insbytes < outgoing.
14437
99561444
PE
14438 * insdel.c, lisp.h (buffer_overflow): New function.
14439 (insert_from_buffer_1, replace_range, replace_range_2):
14440 * insdel.c (make_gap_larger):
14441 * editfns.c (Finsert_char):
14442 * fileio.c (Finsert_file_contents): Use it, to normalize wording.
14443
28177add
PE
14444 * buffer.h (BUF_BYTES_MAX): Cast to ptrdiff_t so that it's signed.
14445
e69dafad
PE
144462011-06-15 Paul Eggert <eggert@cs.ucla.edu>
14447
4baa020d 14448 Integer overflow and signedness fixes (Bug#8873, Bug#8828).
ff672d2c 14449
b1c46f02
PE
14450 * ccl.c (ASCENDING_ORDER): New macro, to work around GCC bug 43772.
14451 (GET_CCL_RANGE, IN_INT_RANGE): Use it.
14452
e69dafad
PE
14453 * fileio.c: Don't assume EMACS_INT fits in off_t.
14454 (emacs_lseek): New static function.
14455 (Finsert_file_contents, Fwrite_region): Use it.
14456 Use SEEK_SET, SEEK_CUR, SEEK_END as appropriate.
14457
566684ea
PE
14458 * fns.c (Fload_average): Don't assume 100 * load average fits in int.
14459
e6966cd6
PE
14460 * fns.c: Don't overflow int when computing a list length.
14461 * fns.c (QUIT_COUNT_HEURISTIC): New constant.
14462 (Flength, Fsafe_length): Use EMACS_INT, not int, to avoid unwanted
14463 truncation on 64-bit hosts. Check for QUIT every
14464 QUIT_COUNT_HEURISTIC entries rather than every other entry; that's
14465 faster and is responsive enough.
14466 (Flength): Report an error instead of overflowing an integer.
14467 (Fsafe_length): Return a float if the value is not representable
14468 as a fixnum. This shouldn't happen except in contrived situations.
6346d301 14469 (Fnthcdr, Fsort): Don't assume list length fits in int.
de41a810 14470 (Fcopy_sequence): Don't assume vector length fits in int.
00c604f2 14471
dd0b0efb
PE
14472 * alloc.c: Check that resized vectors' lengths fit in fixnums.
14473 (header_size, word_size): New constants.
14474 (allocate_vectorlike): Don't check size overflow here.
14475 (allocate_vector): Check it here instead, since this is the only
14476 caller of allocate_vectorlike that could cause overflow.
14477 Check that the new vector's length is representable as a fixnum.
14478
86fe5cfe
PE
14479 * fns.c (next_almost_prime): Don't return a multiple of 3 or 5.
14480 The previous code was bogus. For example, next_almost_prime (32)
14481 returned 39, which is undesirable as it is a multiple of 3; and
14482 next_almost_prime (24) returned 25, which is a multiple of 5 so
14483 why was the code bothering to check for multiples of 7?
14484
80e88859
PE
14485 * bytecode.c (exec_byte_code): Use ptrdiff_t, not int, for vector length.
14486
4a2f0ad6
PE
14487 * eval.c, doprnt.c (SIZE_MAX): Remove; inttypes.h defines this now.
14488
f66c7cf8
PE
14489 Variadic C functions now count arguments with ptrdiff_t.
14490 This partly undoes my 2011-03-30 change, which replaced int with size_t.
14491 Back then I didn't know that the Emacs coding style prefers signed int.
14492 Also, in the meantime I found a few more instances where arguments
4a2f0ad6
PE
14493 were being counted with int, which may truncate counts on 64-bit
14494 machines, or EMACS_INT, which may be unnecessarily wide.
f66c7cf8
PE
14495 * lisp.h (struct Lisp_Subr.function.aMANY)
14496 (DEFUN_ARGS_MANY, internal_condition_case_n, safe_call):
14497 Arg counts are now ptrdiff_t, not size_t.
14498 All variadic functions and their callers changed accordingly.
14499 (struct gcpro.nvars): Now size_t, not size_t. All uses changed.
14500 * bytecode.c (exec_byte_code): Check maxdepth for overflow,
14501 to avoid potential buffer overrun. Don't assume arg counts fit in 'int'.
14502 * callint.c (Fcall_interactively): Check arg count for overflow,
14503 to avoid potential buffer overrun. Use signed char, not 'int',
14504 for 'varies' array, so that we needn't bother to check its size
14505 calculation for overflow.
14506 * editfns.c (Fformat): Use ptrdiff_t, not EMACS_INT, to count args.
14507 * eval.c (apply_lambda):
14508 * fns.c (Fmapconcat): Use XFASTINT, not XINT, to get args length.
14509 (struct textprop_rec.argnum): Now ptrdiff_t, not int. All uses changed.
14510 (mapconcat): Use ptrdiff_t, not int and EMACS_INT, to count args.
14511
a1759b76
PE
14512 * callint.c (Fcall_interactively): Don't use index var as event count.
14513
d96be9fc
PE
14514 * vm-limit.c (check_memory_limits): Fix incorrect extern function decls.
14515 * mem-limits.h (SIZE): Remove; no longer used.
14516
a690a978 14517 * xterm.c (x_alloc_nearest_color_1): Prefer int to long when int works.
5efd304b 14518
578c21e6
PE
14519 Remove unnecessary casts.
14520 * xterm.c (x_term_init):
14521 * xfns.c (x_set_border_pixel):
14522 * widget.c (create_frame_gcs): Remove casts to unsigned long etc.
14523 These aren't needed now that we assume ANSI C.
14524
96f53c6c
PE
14525 * sound.c (Fplay_sound_internal): Remove cast to unsigned long.
14526 It's more likely to cause problems (due to unsigned overflow)
14527 than to cure them.
14528
83c77d31
PE
14529 * dired.c (Ffile_attributes): Don't use 32-bit hack on 64-bit hosts.
14530
ee2079f1
PE
14531 * unexelf.c (unexec): Don't assume BSS addr fits in unsigned.
14532
6da65536
PE
14533 * xterm.c (handle_one_xevent): Omit unnecessary casts to unsigned.
14534
7147c4a4
PE
14535 * keyboard.c (modify_event_symbol): Don't limit alist len to UINT_MAX.
14536
193e32d9
PE
14537 * lisp.h (CHAR_TABLE_SET): Omit now-redundant test.
14538
e5533da6
PE
14539 * lread.c (Fload): Don't compare a possibly-garbage time_t value.
14540
9910e595
PE
14541 GLYPH_CODE_FACE returns EMACS_INT, not int.
14542 * dispextern.h (merge_faces):
14543 * xfaces.c (merge_faces):
01103c44
PE
14544 * xdisp.c (get_next_display_element, next_element_from_display_vector):
14545 Don't assume EMACS_INT fits in int.
9910e595 14546
2638320e
PE
14547 * character.h (CHAR_VALID_P): Remove unused parameter.
14548 * fontset.c, lisp.h, xdisp.c: All uses changed.
14549
045eb8d9
PE
14550 * editfns.c (Ftranslate_region_internal): Omit redundant test.
14551
c1f134b5
PE
14552 * fns.c (concat): Minor tuning based on overflow analysis.
14553 This doesn't fix any bugs. Use int to hold character, instead
14554 of constantly refetching from Emacs object. Use XFASTINT, not
14555 XINT, for value known to be a character. Don't bother comparing
14556 a single byte to 0400, as it's always less.
14557
395fcb93 14558 * floatfns.c (Fexpt):
327eeec8
PE
14559 * fileio.c (make_temp_name): Omit unnecessary cast to unsigned.
14560
abbd3d23
PE
14561 * editfns.c (Ftranslate_region_internal): Use int, not EMACS_INT
14562 for characters.
14563
684a03ef
PE
14564 * doc.c (get_doc_string): Omit (unsigned)c that mishandled negatives.
14565
0fed43f3
PE
14566 * data.c (Faset): If ARRAY is a string, check that NEWELT is a char.
14567 Without this fix, on a 64-bit host (aset S 0 4294967386) would
14568 incorrectly succeed when S was a string, because 4294967386 was
14569 truncated before it was used.
14570
8fd02eb7
PE
14571 * chartab.c (Fchar_table_range): Use CHARACTERP to check range.
14572 Otherwise, an out-of-range integer could cause undefined behavior
14573 on a 64-bit host.
14574
f8c86b69
PE
14575 * composite.c: Use int, not EMACS_INT, for characters.
14576 (fill_gstring_body, composition_compute_stop_pos): Use int, not
14577 EMACS_INT, for values that are known to be in character range.
14578 This doesn't fix any bugs but is the usual style inside Emacs and
14579 may generate better code on 32-bit machines.
14580
34206dd2
PE
14581 Make sure a 64-bit char is never passed to ENCODE_CHAR.
14582 This is for reasons similar to the recent CHAR_STRING fix.
14583 * charset.c (Fencode_char): Check that character arg is actually
14584 a character. Pass an int to ENCODE_CHAR.
14585 * charset.h (ENCODE_CHAR): Verify that the character argument is no
14586 wider than 'int', as a compile-time check to prevent future regressions
14587 in this area.
14588
c5958d4c 14589 * character.c (char_string): Remove unnecessary casts.
13bdea59
PE
14590
14591 Make sure a 64-bit char is never passed to CHAR_STRING.
14592 Otherwise, CHAR_STRING would do the wrong thing on a 64-bit platform,
14593 by silently ignoring the top 32 bits, allowing some values
14594 that were far too large to be valid characters.
14595 * character.h: Include <verify.h>.
14596 (CHAR_STRING, CHAR_STRING_ADVANCE): Verify that the character
14597 arguments are no wider than unsigned, as a compile-time check
14598 to prevent future regressions in this area.
14599 * data.c (Faset):
01103c44 14600 * editfns.c (Fchar_to_string, general_insert_function, Finsert_char)
13bdea59
PE
14601 (Fsubst_char_in_region):
14602 * fns.c (concat):
14603 * xdisp.c (decode_mode_spec_coding):
14604 Adjust to CHAR_STRING's new requirement.
14605 * editfns.c (Finsert_char, Fsubst_char_in_region):
14606 * fns.c (concat): Check that character args are actually
14607 characters. Without this test, these functions did the wrong
14608 thing with wildly out-of-range values on 64-bit hosts.
14609
d37ca623
PE
14610 Remove incorrect casts to 'unsigned' that lose info on 64-bit hosts.
14611 These casts should not be needed on 32-bit hosts, either.
14612 * keyboard.c (read_char):
14613 * lread.c (Fload): Remove casts to unsigned.
14614
ea204efb
PE
14615 * lisp.h (UNSIGNED_CMP): New macro.
14616 This fixes comparison bugs on 64-bit hosts.
14617 (ASCII_CHAR_P): Use it.
14618 * casefiddle.c (casify_object):
01103c44 14619 * character.h (ASCII_BYTE_P, CHAR_VALID_P)
ea204efb
PE
14620 (SINGLE_BYTE_CHAR_P, CHAR_STRING):
14621 * composite.h (COMPOSITION_ENCODE_RULE_VALID):
14622 * dispextern.h (FACE_FROM_ID):
14623 * keyboard.c (read_char): Use UNSIGNED_CMP.
14624
41cb286c
PE
14625 * xmenu.c (dialog_selection_callback) [!USE_GTK]: Cast to intptr_t,
14626 not to EMACS_INT, to avoid GCC warning.
14627
4a1b9832
PE
14628 * xfns.c (x_set_scroll_bar_default_width): Remove unused 'int' locals.
14629
55daad71
PE
14630 * buffer.h (PTR_BYTE_POS, BUF_PTR_BYTE_POS): Remove harmful cast.
14631 The cast incorrectly truncated 64-bit byte offsets to 32 bits, and
14632 isn't needed on 32-bit machines.
8f95c75c 14633
01103c44
PE
14634 * buffer.c (Fgenerate_new_buffer_name):
14635 Use EMACS_INT for count, not int.
0ceccced 14636 (advance_to_char_boundary): Return EMACS_INT, not int.
e762cafe
PE
14637
14638 * data.c (Qcompiled_function): Now static.
14639
c6f072e7
PE
14640 * window.c (window_body_lines): Now static.
14641
20ce5912
PE
14642 * image.c (gif_load): Rename local to avoid shadowing.
14643
9c4c5f81
PE
14644 * lisp.h (SAFE_ALLOCA_LISP): Check for integer overflow.
14645 (struct Lisp_Save_Value): Use ptrdiff_t, not int, for 'integer' member.
14646 * alloc.c (make_save_value): Integer argument is now of type
14647 ptrdiff_t, not int.
14648 (mark_object): Use ptrdiff_t, not int.
14649 * lisp.h (pD): New macro.
14650 * print.c (print_object): Use it.
14651
c0c5c8ae
PE
14652 * alloc.c: Use EMACS_INT, not int, to count objects.
14653 (total_conses, total_markers, total_symbols, total_vector_size)
14654 (total_free_conses, total_free_markers, total_free_symbols)
01103c44
PE
14655 (total_free_floats, total_floats, total_free_intervals)
14656 (total_intervals, total_strings, total_free_strings):
c0c5c8ae
PE
14657 Now EMACS_INT, not int. All uses changed.
14658 (Fgarbage_collect): Compute overall total using a double, so that
14659 integer overflow is less likely to be a problem. Check for overflow
14660 when converting back to an integer.
5a25e253
PE
14661 (n_interval_blocks, n_string_blocks, n_float_blocks, n_cons_blocks)
14662 (n_vectors, n_symbol_blocks, n_marker_blocks): Remove.
14663 These were 'int' variables that could overflow on 64-bit hosts;
14664 they were never used, so remove them instead of repairing them.
211a0b2a 14665 (nzombies, ngcs, max_live, max_zombies): Now EMACS_INT, not 'int'.
6349ae4d
PE
14666 (inhibit_garbage_collection): Set gc_cons_threshold to max value.
14667 Previously, this ceilinged at INT_MAX, but that doesn't work on
14668 64-bit machines.
e46bb31a 14669 (allocate_pseudovector): Don't use EMACS_INT when int would do.
c0c5c8ae 14670
c78baabf 14671 * alloc.c (Fmake_bool_vector): Don't assume vector size fits in int.
86f61a15 14672 (allocate_vectorlike): Check for ptrdiff_t overflow.
b6439961
PE
14673 (mark_vectorlike, mark_char_table, mark_object): Avoid EMACS_UINT
14674 when a (possibly-narrower) signed value would do just as well.
14675 We prefer using signed arithmetic, to avoid comparison confusion.
c78baabf 14676
c9d624c6
PE
14677 * alloc.c: Catch some string size overflows that we were missing.
14678 (XMALLOC_OVERRUN_CHECK_SIZE) [!XMALLOC_OVERRUN_CHECK]: Define to 0,
14679 for convenience in STRING_BYTES_MAX.
14680 (STRING_BYTES_MAX): New macro, superseding the old one in lisp.h.
14681 The definition here is exact; the one in lisp.h was approximate.
14682 (allocate_string_data): Check for string overflow. This catches
14683 some instances we weren't catching before. Also, it catches
14684 size_t overflow on (unusual) hosts where SIZE_MAX <= min
14685 (PTRDIFF_MAX, MOST_POSITIVE_FIXNUM), e.g., when size_t is 32 bits
14686 and ptrdiff_t and EMACS_INT are both 64 bits.
c78baabf 14687
c9d624c6
PE
14688 * character.c, coding.c, doprnt.c, editfns.c, eval.c:
14689 All uses of STRING_BYTES_MAX replaced by STRING_BYTES_BOUND.
640c8776 14690 * lisp.h (STRING_BYTES_BOUND): Rename from STRING_BYTES_MAX.
c9d624c6 14691
353032ce
PE
14692 * character.c (string_escape_byte8): Fix nbytes/nchars typo.
14693
2bccce07
PE
14694 * alloc.c (Fmake_string): Check for out-of-range init.
14695
0ac30604
SM
146962011-06-15 Stefan Monnier <monnier@iro.umontreal.ca>
14697
14698 * eval.c (Fdefvaralias): Also mark the target as variable-special-p.
14699
c195f2de
JD
147002011-06-14 Jan Djärv <jan.h.d@swipnet.se>
14701
14702 * xfns.c (x_set_scroll_bar_default_width): Remove argument to
14703 xg_get_default_scrollbar_width.
14704
14705 * gtkutil.c: Include emacsgtkfixed.h if HAVE_GTK3.
14706 (int_gtk_range_get_value): Move to the scroll bar part of the file.
14707 (style_changed_cb): Call update_theme_scrollbar_width and call
14708 x_set_scroll_bar_default_width and xg_frame_set_char_size for
14709 all frames (Bug#8505).
14710 (xg_create_frame_widgets): Call emacs_fixed_new if HAVE_GTK3 (Bug#8505).
14711 Call gtk_window_set_resizable if HAVE_GTK3.
14712 (x_wm_set_size_hint): Call emacs_fixed_set_min_size with min width
14713 and height if HAVE_GTK3 (Bug#8505).
14714 (scroll_bar_width_for_theme): New variable.
14715 (update_theme_scrollbar_width): New function.
14716 (xg_get_default_scrollbar_width): Move code to
14717 update_theme_scrollbar_width, just return scroll_bar_width_for_theme.
14718 (xg_initialize): Call update_theme_scrollbar_width.
14719
14720 * gtkutil.h (xg_get_default_scrollbar_width): Remove argument.
14721
14722 * emacsgtkfixed.c, emacsgtkfixed.h: New files.
14723
e10ac9f1
MR
147242011-06-12 Martin Rudalics <rudalics@gmx.at>
14725
14726 * frame.c (make_frame): Call other_buffer_safely instead of
14727 other_buffer.
14728
14729 * window.c (temp_output_buffer_show): Call display_buffer with
14730 second argument Vtemp_buffer_show_specifiers and reset latter
14731 immediately after the call.
14732 (Vtemp_buffer_show_specifiers): New variable.
14733 (auto_window_vscroll_p, next_screen_context_lines)
14734 (Vscroll_preserve_screen_position): Remove leading asterisks from
14735 doc-strings.
14736
2d3c217e 147372011-06-12 Paul Eggert <eggert@cs.ucla.edu>
4475bec4 14738
7b7f97e8 14739 Fix minor problems found by GCC 4.6.0 static checking.
4475bec4
PE
14740 * buffer.c (Qclone_number): Remove for now, as it's unused.
14741 (record_buffer, Funrecord_buffer): Rename local to avoid shadowing.
14742 (record_buffer): Remove unused local.
14743 * frame.c (other_visible_frames, frame_buffer_list): Now static.
14744 (set_frame_buffer_list): Remove; unused.
14745 * frame.h (other_visible_frames): Remove decl.
14746 * keyboard.h (menu_items_inuse): Declare only if USE_GTK || USE_MOTIF.
14747 * lisp.h (frame_buffer_list, set_frame_buffer_list): Remove decls.
14748 (add_gpm_wait_descriptor, delete_gpm_wait_descriptor): Declare only
14749 if HAVE_GPM.
14750 * menu.c (menu_items_inuse): Now static unless USE_GTK || USE_MOTIF.
14751 * process.c (add_gpm_wait_descriptor, delete_gpm_wait_descriptor):
14752 Define only if HAVE_GPM.
14753 * widget.c (EmacsFrameResize, emacsFrameClassRec): Now static.
14754 (update_hints_inhibit): Remove; never set. All uses removed.
14755 * widgetprv.h (emacsFrameClassRec): Remove decl.
14756 * window.c (delete_deletable_window): Now returns void, since it
14757 wasn't returning anything.
14758 (compare_window_configurations): Remove unused locals.
14759 * xfns.c (x_set_scroll_bar_default_width): Remove unused locals.
14760 * xmenu.c (x_menu_set_in_use): Define only if USE_GTK || USE_MOTIF.
4475bec4
PE
14761 (dialog_selection_callback) [!USE_GTK]: Prefer intptr_t for integers
14762 the same widths as pointers. This follows up on the 2011-05-06 patch.
14763 * xterm.c (x_alloc_lighter_color_for_widget): Define only if USE_LUCID.
14764 * xterm.h: Likewise.
14765 (x_menu_set_in_use): Declare only if USE_GTK || USE_MOTIF.
14766
1384b89e
JB
147672011-06-12 Juanma Barranquero <lekktu@gmail.com>
14768
14769 * makefile.w32-in: Update dependencies.
14770 (LISP_H): Add lib/intprops.h.
14771
1100a63c
CY
147722011-06-11 Chong Yidong <cyd@stupidchicken.com>
14773
14774 * image.c (gif_load): Add animation frame delay to the metadata.
14775 (syms_of_image): Use DEFSYM. New symbol `delay'.
14776
6198ccd0
MR
147772011-06-11 Martin Rudalics <rudalics@gmx.at>
14778
14779 * window.c (delete_deletable_window): Re-add.
14780 (Fset_window_configuration): Rewrite to handle dead buffers and
14781 consequently deletable windows.
14782 (window_tree, Fwindow_tree): Remove. Supply functionality in
14783 window.el.
14784 (compare_window_configurations): Simplify code.
14785
b6e3633c
AS
147862011-06-11 Andreas Schwab <schwab@linux-m68k.org>
14787
1ab0dee5
AS
14788 * image.c (imagemagick_load_image): Fix type mismatch.
14789 (Fimagemagick_types): Likewise.
14790
b6e3633c
AS
14791 * window.h (replace_buffer_in_windows): Declare.
14792
9397e56f
MR
147932011-06-11 Martin Rudalics <rudalics@gmx.at>
14794
14795 * buffer.c: New Lisp objects Qbuffer_list_update_hook and
14796 Qclone_number. Remove external declaration of Qdelete_window.
14797 (Fbuffer_list): Rewrite doc-string. Minor restructuring of
14798 code.
640c8776
SM
14799 (Fget_buffer_create, Fmake_indirect_buffer, Frename_buffer):
14800 Run Qbuffer_list_update_hook if allowed.
9397e56f
MR
14801 (Fother_buffer): Rewrite doc-string. Major rewrite for new
14802 buffer list implementation.
14803 (other_buffer_safely): New function.
14804 (Fkill_buffer): Replace call to replace_buffer_in_all_windows by
14805 calls to replace_buffer_in_windows and
14806 replace_buffer_in_windows_safely. Run Qbuffer_list_update_hook
14807 if allowed.
14808 (record_buffer): Inhibit quitting and rewrite using quittable
14809 functions. Run Qbuffer_list_update_hook if allowed.
14810 (Frecord_buffer, Funrecord_buffer): New functions.
640c8776
SM
14811 (switch_to_buffer_1, Fswitch_to_buffer): Remove.
14812 Move switch-to-buffer to window.el.
9397e56f
MR
14813 (bury-buffer): Move to window.el.
14814 (Vbuffer_list_update_hook): New variable.
14815
14816 * lisp.h (other_buffer_safely): Add prototype in buffer.c
14817 section.
14818
14819 * window.h (resize_frame_windows): Move up in code.
14820 (Fwindow_frame): Remove EXFUN.
14821 (replace_buffer_in_all_windows): Remove prototype.
14822 (replace_buffer_in_windows_safely): Add prototype.
14823
14824 * window.c: Declare Qdelete_window static again. Move down
14825 declaration of select_count.
14826 (Fnext_window, Fprevious_window): Rewrite doc-strings.
14827 (Fother_window): Move to window.el.
14828 (window_loop): Remove DELETE_BUFFER_WINDOWS and UNSHOW_BUFFER
14829 cases. Add REPLACE_BUFFER_IN_WINDOWS_SAFELY case.
14830 (Fdelete_windows_on, Freplace_buffer_in_windows): Move to
14831 window.el.
14832 (replace_buffer_in_windows): Implement by calling
14833 Qreplace_buffer_in_windows.
14834 (replace_buffer_in_all_windows): Remove with some functionality
14835 moved into replace_buffer_in_windows_safely.
14836 (replace_buffer_in_windows_safely): New function.
14837 (select_window_norecord, select_frame_norecord): Move in front
14838 of run_window_configuration_change_hook. Remove now obsolete
14839 declarations.
640c8776
SM
14840 (Fset_window_buffer): Rewrite doc-string.
14841 Call Qrecord_window_buffer.
9397e56f
MR
14842 (keys_of_window): Move binding for other-window to window.el.
14843
b50691aa
CY
148442011-06-11 Chong Yidong <cyd@stupidchicken.com>
14845
14846 * dispextern.h (struct image): Replace data member, whose int_val
14847 and ptr_val fields were not used by anything, with a single
14848 lisp_val object.
14849
14850 * image.c (Fimage_metadata, make_image, mark_image, tiff_load)
14851 (gif_clear_image, gif_load, imagemagick_load_image)
14852 (gs_clear_image, gs_load): Callers changed.
14853
3f754b86
PE
148542011-06-10 Paul Eggert <eggert@cs.ucla.edu>
14855
cca69397
PE
14856 * buffer.h: Include <time.h>, for time_t.
14857 Needed to build on FreeBSD 8.2. Problem reported by Herbert J. Skuhra.
14858
109e28d0
PE
14859 Fix minor problems found by static checking.
14860
60737f02
PE
14861 * image.c (PixelGetMagickColor): Declare if ImageMagick headers don't.
14862
4b66faf3
PE
14863 Make identifiers static if they are not used in other modules.
14864 * data.c (Qcompiled_function, Qframe, Qvector):
14865 * image.c (QimageMagick, Qsvg):
14866 * minibuf.c (Qmetadata):
14867 * window.c (resize_window_check, resize_root_window): Now static.
14868 * window.h (resize_window_check, resize_root_window): Remove decls.
14869
109e28d0
PE
14870 * window.c (window_deletion_count, delete_deletable_window):
14871 Remove; unused.
46a4ce9e
PE
14872 (window_body_lines): Now static.
14873 (Fdelete_other_windows_internal): Mark vars as initialized.
14874 Make sure 'resize_failed' is initialized.
14875 (run_window_configuration_change_hook): Rename local to avoid shadowing.
14876 (resize_window_apply): Remove unused local.
14877 * window.h (delete_deletable_window): Remove decl.
14878
109e28d0 14879 * image.c (gif_load, svg_load_image): Rename locals to avoid shadowing.
33290528
PE
14880 (imagemagick_load_image): Fix pointer signedness problem by changing
14881 last arg from unsigned char * to char *. All uses changed.
14882 Also, fix a local for similar reasons.
14883 Remove unused locals. Remove locals to avoid shadowing.
14884 (fn_rsvg_handle_free): Remove; unused.
14885 (svg_load, svg_load_image): Fix pointer signedness problem.
f7e13da3 14886 (imagemagick_load_image): Don't use garbage pointer image_wand.
33290528 14887
3f754b86
PE
14888 * ftfont.c (ftfont_get_metrics, ftfont_drive_otf): Remove unused locals.
14889
2547adb1
CY
148902011-06-10 Chong Yidong <cyd@stupidchicken.com>
14891
14892 * image.c (gif_load): Fix omitted cast error introduced by
14893 2011-06-06 change.
14894
2c8e37d4
MR
148952011-06-10 Martin Rudalics <rudalics@gmx.at>
14896
14897 * window.h (resize_proportionally, orig_total_lines)
14898 (orig_top_line): Remove from window structure.
14899 (set_window_height, set_window_width, change_window_heights)
14900 (Fdelete_window): Remove prototypes.
14901 (resize_frame_windows): Remove duplicate declaration.
14902
440a42e3
EZ
149032011-06-10 Eli Zaretskii <eliz@gnu.org>
14904
14905 * window.h (resize_frame_windows, resize_window_check)
14906 (delete_deletable_window, resize_root_window)
14907 (resize_frame_windows): Declare prototypes.
14908
14909 * window.c (resize_window_apply): Make definition be "static" to
14910 match the prototype.
14911
562dd5e9
MR
149122011-06-10 Martin Rudalics <rudalics@gmx.at>
14913
14914 * window.c: Remove declarations of Qwindow_size_fixed,
14915 window_min_size_1, window_min_size_2, window_min_size,
14916 size_window, window_fixed_size_p, enlarge_window, delete_window.
14917 Remove static from declaration of Qdelete_window, it's
14918 temporarily needed by Fbury_buffer.
14919 (replace_window): Don't assign orig_top_line and
14920 orig_total_lines.
14921 (Fdelete_window, delete_window): Remove. Window deletion is
14922 handled by window.el.
640c8776
SM
14923 (window_loop): Remove DELETE_OTHER_WINDOWS case.
14924 Replace Fdelete_window calls with calls to Qdelete_window.
562dd5e9
MR
14925 (Fdelete_other_windows): Remove. Deleting other windows is
14926 handled by window.el.
14927 (window_fixed_size_p): Remove. Fixed-sizeness of windows is
14928 handled in window.el.
14929 (window_min_size_2, window_min_size_1, window_min_size): Remove.
14930 Window minimum sizes are handled in window.el.
14931 (shrink_windows, size_window, set_window_height)
14932 (set_window_width, change_window_heights, window_height)
14933 (window_width, CURBEG, CURSIZE, enlarge_window)
14934 (adjust_window_trailing_edge, Fadjust_window_trailing_edge)
14935 (Fenlarge_window, Fshrink_window): Remove. Window resizing is
14936 handled in window.el.
14937 (make_dummy_parent): Rename to make_parent_window and give it a
14938 second argument horflag.
14939 (make_window): Don't set resize_proportionally any more.
14940 (Fsplit_window): Remove. Windows are split in window.el.
14941 (save_restore_action, save_restore_orig_size)
14942 (shrink_window_lowest_first, save_restore_orig_size): Remove.
14943 Resize mini windows in window.el.
14944 (grow_mini_window, shrink_mini_window): Implement by calling
14945 Qresize_root_window_vertically, resize_window_check and
14946 resize_window_apply.
640c8776
SM
14947 (saved_window, Fset_window_configuration, save_window_save):
14948 Do not handle orig_top_line, orig_total_lines, and
562dd5e9
MR
14949 resize_proportionally.
14950 (window_min_height, window_min_width): Move to window.el.
14951 (keys_of_window): Move bindings for delete-other-windows,
14952 split-window, delete-window and enlarge-window to window.el.
14953
14954 * buffer.c: Temporarily extern Qdelete_window.
14955 (Fbury_buffer): Temporarily call Qdelete_window instead of
14956 Fdelete_window (Fbury_buffer will move to window.el soon).
14957
14958 * frame.c (set_menu_bar_lines_1): Remove code handling
14959 orig_top_line and orig_total_lines.
14960
14961 * dispnew.c (adjust_frame_glyphs_initially): Don't use
14962 set_window_height but set heights directly.
14963 (change_frame_size_1): Use resize_frame_windows.
14964
14965 * xdisp.c (init_xdisp): Don't use set_window_height but set
14966 heights directly.
14967
640c8776
SM
14968 * xfns.c (x_set_menu_bar_lines, x_set_tool_bar_lines):
14969 Use resize_frame_windows instead of change_window_heights and run
562dd5e9
MR
14970 run_window_configuration_change_hook.
14971
14972 * w32fns.c (x_set_tool_bar_lines): Use resize_frame_windows
14973 instead of change_window_heights and run
14974 run_window_configuration_change_hook.
14975
1a13852e
MR
149762011-06-09 Martin Rudalics <rudalics@gmx.at>
14977
14978 * window.c (replace_window): Rename second argument REPLACEMENT to
14979 NEW. New third argument SETFLAG. Rewrite.
14980 (delete_window, make_dummy_parent): Call replace_window with
14981 third argument 1.
14982 (window_list_1): Move down in code.
14983 (run_window_configuration_change_hook): Move set_buffer part
14984 before select_frame_norecord part in order to unwind correctly.
14985 Rename count1 to count.
14986 (recombine_windows, delete_deletable_window, resize_root_window)
14987 (Fdelete_other_windows_internal)
14988 (Frun_window_configuration_change_hook, make_parent_window)
14989 (resize_window_check, resize_window_apply, Fresize_window_apply)
14990 (resize_frame_windows, Fsplit_window_internal)
640c8776
SM
14991 (Fdelete_window_internal, Fresize_mini_window_internal):
14992 New functions.
1a13852e
MR
14993 (syms_of_window): New variables Vwindow_splits and Vwindow_nest.
14994
f3d1777e
MR
149952011-06-08 Martin Rudalics <rudalics@gmx.at>
14996
496e208e
MR
14997 * window.h (window): Add some new members to window structure -
14998 normal_lines, normal_cols, new_total, new_normal, clone_number,
14999 splits, nest, prev_buffers, next_buffers.
15000 (WINDOW_TOTAL_SIZE): Move here from window.c.
b9e809c2 15001 (MIN_SAFE_WINDOW_WIDTH, MIN_SAFE_WINDOW_HEIGHT): Define here.
496e208e 15002
f3d1777e
MR
15003 * window.c (Fwindow_height, Fwindow_width, Fwindow_full_width_p):
15004 Remove.
496e208e
MR
15005 (make_dummy_parent): Set new members of windows structure.
15006 (make_window): Move down in code. Handle new members of window
15007 structure.
15008 (Fwindow_clone_number, Fwindow_splits, Fset_window_splits)
15009 (Fwindow_nest, Fset_window_nest, Fwindow_new_total)
15010 (Fwindow_normal_size, Fwindow_new_normal, Fwindow_prev_buffers)
15011 (Fset_window_prev_buffers, Fwindow_next_buffers)
640c8776
SM
15012 (Fset_window_next_buffers, Fset_window_clone_number):
15013 New functions.
496e208e
MR
15014 (Fwindow_hscroll, Fwindow_at, Fwindow_point, Fwindow_start)
15015 (Fwindow_end, Fwindow_line_height, Fset_window_dedicated_p):
15016 Doc-string fixes.
15017 (Fwindow_parameters, Fwindow_parameter, Fset_window_parameter):
15018 Argument WINDOW can be now internal window too.
15019 (Fwindow_use_time): Move up in code.
15020 (Fget_buffer_window): Rename argument FRAME to ALL-FRAMES.
15021 Rewrite doc-string.
15022 (Fset_window_configuration, saved_window)
15023 (Fcurrent_window_configuration, save_window_save): Handle new
15024 members of window structure.
b9e809c2
MR
15025 (WINDOW_TOTAL_SIZE, MIN_SAFE_WINDOW_WIDTH)
15026 (MIN_SAFE_WINDOW_HEIGHT): Move to window.h.
15027 (syms_of_window): New Lisp objects Qrecord_window_buffer,
15028 Qwindow_deletable_p, Qdelete_window, Qreplace_buffer_in_windows,
15029 Qget_mru_window, Qresize_root_window,
15030 Qresize_root_window_vertically, Qsafe, Qabove, Qbelow,
15031 Qauto_buffer_name; staticpro them.
f3d1777e 15032
abde8f8c
MR
150332011-06-07 Martin Rudalics <rudalics@gmx.at>
15034
15035 * window.c (Fwindow_total_size, Fwindow_left_column)
15036 (Fwindow_top_line, window_body_lines, Fwindow_body_size)
15037 (Fwindow_list_1): New functions.
15038 (window_box_text_cols): Replace with window_body_cols.
640c8776
SM
15039 (Fwindow_width, Fscroll_left, Fscroll_right):
15040 Use window_body_cols instead of window_box_text_cols.
15041 (delete_window, Fset_window_configuration):
15042 Call delete_all_subwindows with window as argument.
fa8a67e6
MR
15043 (delete_all_subwindows): Take a window as argument and not a
15044 structure. Rewrite.
190b47e6
MR
15045 (window_loop): Remove handling of GET_LRU_WINDOW and
15046 GET_LARGEST_WINDOW.
15047 (Fget_lru_window, Fget_largest_window): Move to window.el.
abde8f8c
MR
15048
15049 * window.h: Extern window_body_cols instead of
fa8a67e6
MR
15050 window_box_text_cols. delete_all_subwindows now takes a
15051 Lisp_Object as argument.
abde8f8c 15052
640c8776
SM
15053 * indent.c (compute_motion, Fcompute_motion):
15054 Use window_body_cols instead of window_box_text_cols.
abde8f8c 15055
fa8a67e6
MR
15056 * frame.c (delete_frame): Call delete_all_subwindows with root
15057 window as argument.
15058
a54e3482
DC
150592011-06-07 Daniel Colascione <dan.colascione@gmail.com>
15060
15061 * fns.c (Fputhash): Document return value.
15062
60002bf5
CY
150632011-06-06 Chong Yidong <cyd@stupidchicken.com>
15064
15065 * image.c (gif_load): Implement gif89a spec "no disposal" method.
15066
0c671da6 150672011-06-06 Paul Eggert <eggert@cs.ucla.edu>
ccd9a01a 15068
b862a52a 15069 Cons<->int and similar integer overflow fixes (Bug#8794).
77984278 15070
be44ca6c
PE
15071 Check for overflow when converting integer to cons and back.
15072 * charset.c (Fdefine_charset_internal, Fdecode_char):
15073 Use cons_to_unsigned to catch overflow.
15074 (Fencode_char): Use INTEGER_TO_CONS.
15075 * composite.h (LGLYPH_CODE): Use cons_to_unsigned.
15076 (LGLYPH_SET_CODE): Use INTEGER_TO_CONS.
15077 * data.c (long_to_cons, cons_to_long): Remove.
15078 (cons_to_unsigned, cons_to_signed): New functions.
15079 These signal an error for invalid or out-of-range values.
15080 * dired.c (Ffile_attributes): Use INTEGER_TO_CONS.
15081 * fileio.c (Fset_visited_file_modtime): Use CONS_TO_INTEGER.
15082 * font.c (Ffont_variation_glyphs):
15083 * fontset.c (Finternal_char_font): Use INTEGER_TO_CONS.
15084 * lisp.h: Include <intprops.h>.
15085 (INTEGER_TO_CONS, CONS_TO_INTEGER): New macros.
15086 (cons_to_signed, cons_to_unsigned): New decls.
15087 (long_to_cons, cons_to_long): Remove decls.
15088 * undo.c (record_first_change): Use INTEGER_TO_CONS.
15089 (Fprimitive_undo): Use CONS_TO_INTEGER.
15090 * xfns.c (Fx_window_property): Likewise.
15091 * xselect.c: Include <limits.h>.
15092 (x_own_selection, selection_data_to_lisp_data):
15093 Use INTEGER_TO_CONS.
15094 (x_handle_selection_request, x_handle_selection_clear)
15095 (x_get_foreign_selection, Fx_disown_selection_internal)
15096 (Fx_get_atom_name, x_send_client_event): Use CONS_TO_INTEGER.
15097 (lisp_data_to_selection_data): Use cons_to_unsigned.
15098 (x_fill_property_data): Use cons_to_signed.
15099 Report values out of range.
15100
d1f3d2af
PE
15101 Check for buffer and string overflow more precisely.
15102 * buffer.h (BUF_BYTES_MAX): New macro.
15103 * lisp.h (STRING_BYTES_MAX): New macro.
15104 * alloc.c (Fmake_string):
15105 * character.c (string_escape_byte8):
15106 * coding.c (coding_alloc_by_realloc):
15107 * doprnt.c (doprnt):
15108 * editfns.c (Fformat):
15109 * eval.c (verror):
15110 Use STRING_BYTES_MAX, not MOST_POSITIVE_FIXNUM,
15111 since they may not be the same number.
15112 * editfns.c (Finsert_char):
15113 * fileio.c (Finsert_file_contents):
15114 Likewise for BUF_BYTES_MAX.
15115
dd52fcea
PE
15116 * image.c: Use ptrdiff_t, not int, for sizes.
15117 (slurp_file): Switch from int to ptrdiff_t.
15118 All uses changed.
15119 (slurp_file): Check that file size fits in both size_t (for
15120 malloc) and ptrdiff_t (for sanity and safety).
15121
7f9bbdbb
PE
15122 * fileio.c (Fverify_visited_file_modtime): Avoid time overflow
15123 if b->modtime has its maximal value.
15124
dfe18f82
PE
15125 * dired.c (Ffile_attributes): Don't assume EMACS_INT has >32 bits.
15126
84acfcf0
PE
15127 Don't assume time_t can fit into int.
15128 * buffer.h (struct buffer.modtime): Now time_t, not int.
15129 * fileio.c (Fvisited_file_modtime): No need for time_t cast now.
15130 * undo.c (Fprimitive_undo): Use time_t, not int, for time_t value.
15131
ccd9a01a
PE
15132 Minor fixes for signed vs unsigned integers.
15133 * character.h (MAYBE_UNIFY_CHAR):
15134 * charset.c (maybe_unify_char):
15135 * keyboard.c (read_char, reorder_modifiers):
15136 XINT -> XFASTINT, since the integer must be nonnegative.
15137 * ftfont.c (ftfont_spec_pattern):
15138 * keymap.c (access_keymap, silly_event_symbol_error):
15139 XUINT -> XFASTINT, since the integer must be nonnegative.
15140 (Fsingle_key_description, preferred_sequence_p): XUINT -> XINT,
15141 since it makes no difference and we prefer signed.
15142 * keyboard.c (record_char): Use XUINT when all the neighbors do.
15143 (access_keymap): NATNUMP -> INTEGERP, since the integer must be
15144 nonnegative.
15145
d6d100dd
SM
151462011-06-06 Stefan Monnier <monnier@iro.umontreal.ca>
15147
15148 * window.h (Fwindow_frame): Declare.
15149
2b6148e4
PE
151502011-06-06 Paul Eggert <eggert@cs.ucla.edu>
15151
15152 * alloc.c: Simplify handling of large-request failures (Bug#8800).
15153 (SPARE_MEMORY): Always define.
15154 (LARGE_REQUEST): Remove.
15155 (memory_full): Use SPARE_MEMORY rather than LARGE_REQUEST.
15156
f230ecc9
MR
151572011-06-06 Martin Rudalics <rudalics@gmx.at>
15158
727e958e
MR
15159 * lisp.h: Move EXFUNS for Fframe_root_window,
15160 Fframe_first_window and Fset_frame_selected_window to window.h.
15161
15162 * window.h: Move EXFUNS for Fframe_root_window,
15163 Fframe_first_window and Fset_frame_selected_window here from
15164 lisp.h.
15165
15166 * frame.c (Fwindow_frame, Fframe_first_window)
15167 (Fframe_root_window, Fframe_selected_window)
15168 (Fset_frame_selected_window): Move to window.c.
15169 (Factive_minibuffer_window): Move to minibuf.c.
15170 (Fother_visible_frames_p): New function.
15171
15172 * minibuf.c (Factive_minibuffer_window): Move here from frame.c.
15173
f230ecc9
MR
15174 * window.c (decode_window, decode_any_window): Move up in code.
15175 (Fwindowp, Fwindow_live_p): Rewrite doc-strings.
15176 (inhibit_frame_unsplittable): Remove unused variable.
bf60a96b
MR
15177 (Fwindow_buffer): Move up and rewrite doc-string.
15178 (Fwindow_parent, Fwindow_vchild, Fwindow_hchild, Fwindow_next)
15179 (Fwindow_prev): New functions.
727e958e
MR
15180 (Fwindow_frame): Move here from frame.c. Accept any window as
15181 argument.
15182 (Fframe_root_window, Fframe_first_window)
15183 (Fframe_selected_window): Move here from frame.c. Accept frame
15184 or arbitrary window as argument. Update doc-strings.
15185 (Fminibuffer_window): Move up in code.
15186 (Fwindow_minibuffer_p): Move up in code and simplify.
d6d100dd
SM
15187 (Fset_frame_selected_window): Move here from frame.c.
15188 Marginal rewrite.
727e958e
MR
15189 (Fselected_window, select_window, Fselect_window): Move up in
15190 code. Minor doc-string fixes.
f230ecc9 15191
4d09bcf6
PE
151922011-06-06 Paul Eggert <eggert@cs.ucla.edu>
15193
15194 * alloc.c (memory_full) [SYSTEM_MALLOC]: Port to MacOS (Bug#8800).
15195 Do not assume that spare memory exists; that assumption is valid
15196 only if SYSTEM_MALLOC.
15197 (LARGE_REQUEST): New macro, so that the issue of large requests
15198 is separated from the issue of spare memory.
15199
810928a2
AS
152002011-06-05 Andreas Schwab <schwab@linux-m68k.org>
15201
172418ad
AS
15202 * editfns.c (Fformat): Correctly handle zero flag with hexadecimal
15203 format. (Bug#8806)
15204
43f862f7
AS
15205 * gtkutil.c (xg_get_default_scrollbar_width): Avoid warning.
15206
810928a2
AS
15207 * xfns.c (x_set_scroll_bar_default_width): Move declarations
15208 before statements.
15209
a059fe24
JD
152102011-06-05 Jan Djärv <jan.h.d@swipnet.se>
15211
15212 * gtkutil.c (xg_get_default_scrollbar_width): New function.
15213
15214 * gtkutil.h: Declare xg_get_default_scrollbar_width.
15215
15216 * xfns.c (x_set_scroll_bar_default_width): If USE_GTK, get
15217 min width by calling x_set_scroll_bar_default_width (Bug#8505).
15218
989bf368
JB
152192011-06-05 Juanma Barranquero <lekktu@gmail.com>
15220
15221 * xdisp.c (single_display_spec_intangible_p): Remove declaration.
15222
4b80f674
CY
152232011-06-04 Chong Yidong <cyd@stupidchicken.com>
15224
15225 * xselect.c (x_clipboard_manager_save): Remove redundant arg.
15226 (x_clipboard_manager_save): Add return value.
d6d100dd
SM
15227 (x_clipboard_manager_error_1, x_clipboard_manager_error_2):
15228 New error handlers.
4b80f674
CY
15229 (x_clipboard_manager_save_frame, x_clipboard_manager_save_all):
15230 Obey Vx_select_enable_clipboard_manager. Catch errors in
15231 x_clipboard_manager_save (Bug#8779).
15232 (Vx_select_enable_clipboard_manager): New variable.
de65b42c 15233 (x_get_foreign_selection): Reduce scope of x_catch_errors (Bug#8790).
4b80f674 15234
99a33b77 152352011-06-04 Dan Nicolaescu <dann@ics.uci.edu>
8b3115e7
DN
15236
15237 * emacs.c (main): Warn when starting a GTK emacs in daemon mode.
15238
99a33b77 152392011-06-04 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
14eca62f
YM
15240
15241 * fringe.c (update_window_fringes): Don't update overlay arrow bitmap
15242 in the current matrix if keep_current_p is non-zero.
15243
8264569d
EZ
152442011-06-04 Eli Zaretskii <eliz@gnu.org>
15245
15246 * bidi.c (bidi_level_of_next_char): Fix last change.
15247
57f97249
EZ
152482011-06-03 Eli Zaretskii <eliz@gnu.org>
15249
fec2107c 15250 Support bidi reordering of text covered by display properties.
57f97249 15251
fec2107c
EZ
15252 * bidi.c (bidi_copy_it): Use offsetof instead of emulating it.
15253 (bidi_fetch_char, bidi_fetch_char_advance): New functions.
15254 (bidi_cache_search, bidi_cache_iterator_state)
15255 (bidi_paragraph_init, bidi_resolve_explicit, bidi_resolve_weak)
d6d100dd
SM
15256 (bidi_level_of_next_char, bidi_move_to_visually_next):
15257 Support character positions inside a run of characters covered by a
fec2107c
EZ
15258 display string.
15259 (bidi_paragraph_init, bidi_resolve_explicit_1)
15260 (bidi_level_of_next_char): Call bidi_fetch_char and
15261 bidi_fetch_char_advance instead of FETCH_CHAR and
15262 FETCH_CHAR_ADVANCE.
15263 (bidi_init_it): Initialize new members.
15264 (LRE_CHAR, RLE_CHAR, PDF_CHAR, LRO_CHAR, RLO_CHAR): Remove macro
15265 definitions.
15266 (bidi_explicit_dir_char): Lookup character type in bidi_type_table,
15267 instead of using explicit *_CHAR codes.
d6d100dd
SM
15268 (bidi_resolve_explicit, bidi_resolve_weak):
15269 Use FETCH_MULTIBYTE_CHAR instead of FETCH_CHAR, as reordering of
fec2107c
EZ
15270 bidirectional text is supported only in multibyte buffers.
15271 (bidi_init_it): Accept additional argument FRAME_WINDOW_P and use
15272 it to initialize the frame_window_p member of struct bidi_it.
15273 (bidi_cache_iterator_state, bidi_resolve_explicit_1)
15274 (bidi_resolve_explicit, bidi_resolve_weak)
15275 (bidi_level_of_next_char, bidi_move_to_visually_next): Abort if
15276 bidi_it->nchars is non-positive.
15277 (bidi_level_of_next_char): Don't try to lookup the cache for the
15278 next/previous character if nothing is cached there yet, or if we
15279 were just reseat()'ed to a new position.
c40e2fb2 15280
0e14fe90
EZ
15281 * xdisp.c (set_cursor_from_row): Set start and stop points
15282 according to the row's direction when priming the loop that looks
15283 for the glyph on which to display cursor.
15284 (single_display_spec_intangible_p): Function deleted.
15285 (display_prop_intangible_p): Reimplement to call
15286 handle_display_spec instead of single_display_spec_intangible_p.
d6d100dd
SM
15287 Accept 3 additional arguments needed by handle_display_spec.
15288 This fixes incorrect cursor motion across display property with complex
0e14fe90
EZ
15289 values: lists, `(when COND...)' forms, etc.
15290 (single_display_spec_string_p): Support property values that are
15291 lists with the argument STRING its top-level element.
15292 (display_prop_string_p): Fix the condition for processing a
15293 property that is a list to be consistent with handle_display_spec.
fec2107c 15294 (handle_display_spec): New function, refactored from the
fc6f18ce
EZ
15295 last portion of handle_display_prop.
15296 (compute_display_string_pos): Accept additional argument
15297 FRAME_WINDOW_P. Call handle_display_spec to determine whether the
15298 value of a `display' property is a "replacing spec".
15299 (handle_single_display_spec): Accept 2 additional arguments BUFPOS
15300 and FRAME_WINDOW_P. If IT is NULL, don't set up the iterator from
15301 the display property, but just return a value indicating whether
15302 the display property will replace the characters it covers.
15303 (Fcurrent_bidi_paragraph_direction): Initialize the nchars and
15304 frame_window_p members of struct bidi_it.
d6d100dd
SM
15305 (compute_display_string_pos, compute_display_string_end):
15306 New functions.
fec2107c
EZ
15307 (push_it): Accept second argument POSITION, where pop_it should
15308 jump to continue iteration.
15309 (reseat_1): Initialize bidi_it.disp_pos.
fc6f18ce 15310
fec2107c
EZ
15311 * keyboard.c (adjust_point_for_property): Adjust the call to
15312 display_prop_intangible_p to its new signature.
fc6f18ce
EZ
15313
15314 * dispextern.h (struct bidi_it): New member frame_window_p.
fec2107c
EZ
15315 (bidi_init_it): Update prototypes.
15316 (display_prop_intangible_p): Update prototype.
d6d100dd
SM
15317 (compute_display_string_pos, compute_display_string_end):
15318 Declare prototypes.
fec2107c
EZ
15319 (struct bidi_it): New members nchars and disp_pos. ch_len is now
15320 EMACS_INT.
fc6f18ce 15321
40087514 153222011-06-02 Paul Eggert <eggert@cs.ucla.edu>
0de4bb68 15323
57f53182
PE
15324 Malloc failure behavior now depends on size of allocation.
15325 * alloc.c (buffer_memory_full, memory_full): New arg NBYTES.
15326 * lisp.h: Change signatures accordingly.
15327 * alloc.c, buffer.c, editfns.c, menu.c, minibuf.c, xterm.c:
15328 All callers changed. (Bug#8762)
15329
15330 * gnutls.c: Use Emacs's memory allocators.
15331 Without this change, the gnutls library would invoke malloc etc.
15332 directly, which causes problems on non-SYNC_INPUT hosts, and which
15333 runs afoul of improving memory_full behavior. (Bug#8761)
15334 (fn_gnutls_global_set_mem_functions): New macro or function pointer.
15335 (emacs_gnutls_global_init): Use it to specify xmalloc, xrealloc,
15336 xfree instead of the default malloc, realloc, free.
15337 (Fgnutls_boot): No need to check for memory allocation failure,
15338 since xmalloc does that for us.
15339
ac32cd99 15340 Remove arbitrary limit of 2**31 entries in hash tables. (Bug#8771)
3870d916
PE
15341 * category.c (hash_get_category_set):
15342 * ccl.c (ccl_driver):
15343 * charset.c (Fdefine_charset_internal):
15344 * charset.h (struct charset.hash_index):
15345 * composite.c (get_composition_id, gstring_lookup_cache)
15346 (composition_gstring_put_cache):
15347 * composite.h (struct composition.hash_index):
15348 * dispextern.h (struct image.hash):
15349 * fns.c (next_almost_prime, larger_vector, cmpfn_eql)
15350 (cmpfn_equal, cmpfn_user_defined, hashfn_eq, hashfn_eql)
15351 (hashfn_equal, hashfn_user_defined, make_hash_table)
15352 (maybe_resize_hash_table, hash_lookup, hash_put)
15353 (hash_remove_from_table, hash_clear, sweep_weak_table, SXHASH_COMBINE)
15354 (sxhash_string, sxhash_list, sxhash_vector, sxhash_bool_vector)
15355 (Fsxhash, Fgethash, Fputhash, Fmaphash):
15356 * image.c (make_image, search_image_cache, lookup_image)
15357 (xpm_put_color_table_h):
15358 * lisp.h (struct Lisp_Hash_Table):
0de4bb68 15359 * minibuf.c (Ftry_completion, Fall_completions, Ftest_completion):
ac389d0c 15360 * print.c (print): Use 'EMACS_UINT' and 'EMACS_INT'
3870d916 15361 for hashes and hash indexes, instead of 'unsigned' and 'int'.
40087514
PE
15362 * alloc.c (allocate_vectorlike):
15363 Check for overflow in vector size calculations.
15364 * ccl.c (ccl_driver):
15365 Check for overflow when converting EMACS_INT to int.
0de4bb68
PE
15366 * fns.c, image.c: Remove unnecessary static decls that would otherwise
15367 need to be updated by these changes.
40087514
PE
15368 * fns.c (make_hash_table, maybe_resize_hash_table):
15369 Check for integer overflow with large hash tables.
0de4bb68
PE
15370 (make_hash_table, maybe_resize_hash_table, Fmake_hash_table):
15371 Prefer the faster XFLOAT_DATA to XFLOATINT where either will do.
15372 (SXHASH_REDUCE): New macro.
15373 (sxhash_string, sxhash_list, sxhash_vector, sxhash_bool_vector):
15374 Use it instead of discarding useful hash info with large hash values.
15375 (sxhash_float): New function.
15376 (sxhash): Use it. No more need for "& INTMASK" due to above changes.
15377 * lisp.h (FIXNUM_BITS): New macro, useful for SXHASH_REDUCE etc.
40087514
PE
15378 (MOST_NEGATIVE_FIXNUM, MOST_POSITIVE_FIXNUM, INTMASK):
15379 Rewrite to use FIXNUM_BITS, as this simplifies things.
0de4bb68
PE
15380 (next_almost_prime, larger_vector, sxhash, hash_lookup, hash_put):
15381 Adjust signatures to match updated version of code.
15382 (consing_since_gc): Now EMACS_INT, since a single hash table can
15383 use more than INT_MAX bytes.
15384
698d32e2
DN
153852011-06-01 Dan Nicolaescu <dann@ics.uci.edu>
15386
15387 Make it possible to build with GCC-4.6+ -O2 -flto.
15388
15389 * emacs.c (__malloc_initialize_hook): Mark as EXTERNALLY_VISIBLE.
15390
fd6fa53f
SM
153912011-06-01 Stefan Monnier <monnier@iro.umontreal.ca>
15392
15393 * minibuf.c (get_minibuffer, read_minibuf_unwind):
15394 Call minibuffer-inactive-mode.
15395
864db017
JB
153962011-05-31 Juanma Barranquero <lekktu@gmail.com>
15397
15398 * makefile.w32-in ($(BLD)/data.$(O), $(BLD)/editfns.$(O)):
15399 Update dependencies.
15400
2ad0baf4
DN
154012011-05-31 Dan Nicolaescu <dann@ics.uci.edu>
15402
15403 * data.c (init_data): Remove code for UTS, this system is not
15404 supported anymore.
15405
4fcc2638
DN
154062011-05-31 Dan Nicolaescu <dann@ics.uci.edu>
15407
15408 Don't force ./temacs to start in terminal mode.
15409
15410 * frame.c (make_initial_frame): Initialize faces in all cases, not
15411 only when CANNOT_DUMP is defined.
15412 * dispnew.c (init_display): Remove CANNOT_DUMP condition.
15413
c56e0fd5
DN
154142011-05-31 Dan Nicolaescu <dann@ics.uci.edu>
15415
15416 * dispnew.c (add_window_display_history): Use const for the string
15417 pointer. Remove declaration, not needed.
15418
333d54da 154192011-05-31 Paul Eggert <eggert@cs.ucla.edu>
9cf9f756 15420
55d4c1b2 15421 Use 'inline', not 'INLINE'.
333d54da 15422 <http://lists.gnu.org/archive/html/emacs-devel/2011-05/msg00914.html>
55d4c1b2
PE
15423 * alloc.c, fontset.c (INLINE): Remove.
15424 * alloc.c, bidi.c, charset.c, coding.c, dispnew.c, fns.c, image.c:
15425 * intervals.c, keyboard.c, process.c, syntax.c, textprop.c, w32term.c:
15426 * xdisp.c, xfaces.c, xterm.c: Replace all uses of INLINE with inline.
15427 * gmalloc.c (register_heapinfo): Use inline unconditionally.
15428 * lisp.h (LISP_MAKE_RVALUE): Use inline, not __inline__.
15429
738db178
DN
154302011-05-31 Dan Nicolaescu <dann@ics.uci.edu>
15431
15432 Make it possible to run ./temacs.
15433
15434 * callproc.c (set_initial_environment): Remove CANNOT_DUMP code,
15435 syms_of_callproc does the same thing. Remove test for
15436 "initialized", do it in the caller.
15437 * emacs.c (main): Avoid calling set_initial_environment when dumping.
15438
620c53a6
SM
154392011-05-31 Stefan Monnier <monnier@iro.umontreal.ca>
15440
15441 * minibuf.c (Finternal_complete_buffer): Return `category' metadata.
15442 (read_minibuf): Use get_minibuffer.
15443 (syms_of_minibuf): Use DEFSYM.
15444 (Qmetadata): New var.
15445 * data.c (Qbuffer): Don't make it static.
15446 (syms_of_data): Use DEFSYM.
15447
e003a292
PE
154482011-05-31 Paul Eggert <eggert@cs.ucla.edu>
15449
15450 * ccl.c (CCL_CODE_RANGE): Allow negative numbers. (Bug#8751)
15451 (CCL_CODE_MIN): New macro.
15452
ed008a6d
PE
154532011-05-30 Paul Eggert <eggert@cs.ucla.edu>
15454
3687c2ef
PE
15455 * alloc.c (lisp_align_malloc): Omit unnecessary val==NULL tests.
15456
ed008a6d
PE
15457 * eval.c (Qdebug): Now static.
15458 * lisp.h (Qdebug): Remove decl. This reverts a part of the
15459 2011-04-26T11:26:05Z!dan.colascione@gmail.com that inadvertently undid part of
15460 2011-04-14T06:48:41Z!eggert@cs.ucla.edu.
15461
d66c4c7c
CY
154622011-05-29 Chong Yidong <cyd@stupidchicken.com>
15463
15464 * image.c: Various fixes to ImageMagick code comments.
15465 (Fimagemagick_types): Doc fix.
15466
5fbc2025
PE
154672011-05-29 Paul Eggert <eggert@cs.ucla.edu>
15468
0196f88a
PE
15469 Minor fixes prompted by GCC 4.6.0 warnings.
15470
15471 * xselect.c (converted_selections, conversion_fail_tag): Now static.
15472
5fbc2025
PE
15473 * emacs.c [HAVE_X_WINDOWS]: Include "xterm.h".
15474 (x_clipboard_manager_save_all): Move extern decl to ...
15475 * xterm.h: ... here, so that it can be checked for consistency.
15476
1dd3c2d9
CY
154772011-05-29 Chong Yidong <cyd@stupidchicken.com>
15478
15479 * xselect.c (x_clipboard_manager_save_frame)
15480 (x_clipboard_manager_save_all): New functions.
15481 (Fx_clipboard_manager_save): Lisp function deleted.
15482
15483 * emacs.c (Fkill_emacs): Call x_clipboard_manager_save_all.
15484 * frame.c (delete_frame): Call x_clipboard_manager_save_frame.
15485
15486 * xterm.h: Update prototype.
15487
5ba6571d
WX
154882011-05-28 William Xu <william.xwl@gmail.com>
15489
15490 * nsterm.m (ns_term_shutdown): Synchronize user defaults before
15491 exiting (Bug#8239).
15492
3eaff834
JM
154932011-05-28 Jim Meyering <meyering@redhat.com>
15494
e1900994 15495 Avoid a sign-extension bug in crypto_hash_function.
3eaff834
JM
15496 * fns.c (to_uchar): Define.
15497 (crypto_hash_function): Use it to convert some newly-signed
15498 variables to unsigned, to avoid sign-extension bugs. For example,
15499 without this change, (md5 "truc") would evaluate to
15500 45723a2aff78ff4fff7fff1114760e62 rather than the expected
15501 45723a2af3788c4ff17f8d1114760e62. Reported by Antoine Levitt in
e1900994 15502 https://lists.gnu.org/archive/html/emacs-devel/2011-05/msg00883.html.
3eaff834 15503
0f6990a7
PE
155042011-05-27 Paul Eggert <eggert@cs.ucla.edu>
15505
15506 Integer overflow fixes.
c8a9ca5a 15507
08686060
PE
15508 * dbusbind.c: Serial number integer overflow fixes.
15509 (CHECK_DBUS_SERIAL_GET_SERIAL): New macro.
08686060
PE
15510 (Fdbus_call_method_asynchronously, xd_read_message_1): Use a float
15511 to hold a serial number that is too large for a fixnum.
15512 (Fdbus_method_return_internal, Fdbus_method_error_internal):
15513 Check for serial numbers out of range. Decode any serial number
59568bf0 15514 that was so large that it became a float. (Bug#8722)
08686060 15515
2d1fc3c7
PE
15516 * dbusbind.c: Use XFASTINT rather than XUINT, and check for nonneg.
15517 (Fdbus_call_method, Fdbus_call_method_asynchronously):
15518 Use XFASTINT rather than XUINT when numbers are nonnegative.
15519 (xd_append_arg, Fdbus_method_return_internal):
15520 (Fdbus_method_error_internal): Likewise. Also, for unsigned
15521 arguments, check that Lisp number is nonnegative, rather than
59568bf0 15522 silently wrapping negative numbers around. (Bug#8722)
30217ff0 15523 (xd_read_message_1): Don't assume dbus_uint32_t can fit in int.
59568bf0 15524 (Bug#8722)
2d1fc3c7 15525
c8a9ca5a
PE
15526 * data.c (arith_driver, Flsh): Avoid unnecessary casts to EMACS_UINT.
15527
519e1d69
PE
15528 * ccl.c (ccl_driver): Redo slightly to avoid the need for 'unsigned'.
15529
6df6ae42 15530 ccl: Add integer overflow checks.
30569699
PE
15531 * ccl.c (CCL_CODE_MAX, GET_CCL_RANGE, GET_CCL_CODE, GET_CCL_INT):
15532 (IN_INT_RANGE): New macros.
15533 (ccl_driver): Use them to check for integer overflow when
15534 decoding a CCL program. Many of the new checks are whether XINT (x)
15535 fits in int; it doesn't always, on 64-bit hosts. The new version
15536 doesn't catch all possible integer overflows, but it's an
847044ea 15537 improvement. (Bug#8719)
30569699 15538
c11285dc
PE
15539 * alloc.c (make_event_array): Use XINT, not XUINT.
15540 There's no need for unsigned here.
15541
fdccd48e
PE
15542 * mem-limits.h (EXCEEDS_LISP_PTR) [!USE_LSB_TAG]: EMACS_UINT -> uintptr_t
15543 This follows up to the 2011-05-06 change that substituted uintptr_t
15544 for EMACS_INT. This case wasn't caught back then.
15545
37910ab2
PE
15546 Rework Fformat to avoid integer overflow issues.
15547 * editfns.c: Include <float.h> unconditionally, as it's everywhere
15548 now (part of C89). Include <verify.h>.
15549 (MAX_10_EXP, CONVERTED_BYTE_SIZE): Remove; no longer needed.
15550 (pWIDE, pWIDElen, signed_wide, unsigned_wide): New defns.
15551 (Fformat): Avoid the prepass trying to compute sizes; it was only
15552 approximate and thus did not catch overflow reliably. Instead, walk
15553 through the format just once, formatting and computing sizes as we go,
15554 checking for integer overflow at every step, and allocating a larger
15555 buffer as needed. Keep track separately whether the format is
15556 multibyte. Keep only the most-recently calculated precision, rather
15557 than them all. Record whether each argument has been converted to
15558 string. Use EMACS_INT, not int, for byte and char and arg counts.
15559 Support field widths and precisions larger than INT_MAX. Avoid
15560 sprintf's undefined behavior with conversion specifications such as %#d
15561 and %.0c. Fix bug with strchr succeeding on '\0' when looking for
15562 flags. Fix bug with (format "%c" 256.0). Avoid integer overflow when
15563 formatting out-of-range floating point numbers with int
9173deec 15564 formats. (Bug#8668)
37910ab2 15565
2e6578fb
PE
15566 * lisp.h (FIXNUM_OVERFLOW_P): Work even if arg is a NaN.
15567
0ae6bdee
PE
15568 * data.c: Avoid integer truncation in expressions involving floats.
15569 * data.c: Include <intprops.h>.
15570 (arith_driver): When there's an integer overflow in an expression
15571 involving floating point, convert the integers to floating point
15572 so that the resulting value does not suffer from catastrophic
15573 integer truncation. For example, on a 64-bit host (* 4
15574 most-negative-fixnum 0.5) should yield about -4.6e+18, not zero.
15575 Do not rely on undefined behavior after integer overflow.
15576
de883a70
PE
15577 merge count_size_as_multibyte, parse_str_to_multibyte
15578 * character.c, character.h (count_size_as_multibyte):
fd6fa53f 15579 Rename from parse_str_to_multibyte; all uses changed.
de883a70
PE
15580 Check for integer overflow.
15581 * insdel.c, lisp.h (count_size_as_multibyte): Remove,
15582 since it's now a duplicate of the other. This is more of
15583 a character than a buffer op, so better that it's in character.c.
15584 * fns.c, print.c: Adjust to above changes.
15585
2ff916cb
PE
155862011-05-27 Stefan Monnier <monnier@iro.umontreal.ca>
15587
15588 * xselect.c (x_convert_selection): Yet another int/Lisp_Object mixup.
15589
f1b54466
PE
155902011-05-27 Paul Eggert <eggert@cs.ucla.edu>
15591
fb1ac845
PE
15592 * xselect.c: Fix minor problems prompted by GCC 4.6.0 warnings.
15593 (x_handle_selection_request, frame_for_x_selection): Remove unused vars.
15594 (x_clipboard_manager_save): Now static.
15595 (Fx_clipboard_manager_save): Rename local to avoid shadowing.
15596
f1b54466
PE
15597 * fns.c: Fix minor problems prompted by GCC 4.6.0 warnings.
15598 (crypto_hash_function): Now static.
15599 Fix pointer signedness problems. Avoid unnecessary initializations.
15600
a9f737ee
CY
156012011-05-27 Chong Yidong <cyd@stupidchicken.com>
15602
15603 * termhooks.h (Vselection_alist): Make it terminal-local.
15604
15605 * terminal.c (create_terminal): Initialize it.
15606
15607 * xselect.c: Support for clipboard managers.
15608 (Vselection_alist): Move to termhooks.h as terminal-local var.
15609 (LOCAL_SELECTION): New macro.
15610 (x_atom_to_symbol): Handle x_display_info_for_display fail case.
15611 (symbol_to_x_atom): Remove gratuitous arg.
15612 (x_handle_selection_request, lisp_data_to_selection_data)
15613 (x_get_foreign_selection, Fx_register_dnd_atom): Callers changed.
620c53a6
SM
15614 (x_own_selection, x_get_local_selection, x_convert_selection):
15615 New arg, specifying work frame. Use terminal-local Vselection_alist.
a9f737ee
CY
15616 (some_frame_on_display): Delete unused function.
15617 (Fx_own_selection_internal, Fx_get_selection_internal)
15618 (Fx_disown_selection_internal, Fx_selection_owner_p)
15619 (Fx_selection_exists_p): New optional frame arg.
15620 (frame_for_x_selection, Fx_clipboard_manager_save): New functions.
15621 (x_handle_selection_clear): Don't treat other terminals with the
15622 same keyboard specially. Use the terminal-local Vselection_alist.
15623 (x_clear_frame_selections): Use Frun_hook_with_args.
15624
15625 * xterm.c (x_term_init): Intern ATOM and CLIPBOARD_MANAGER atoms.
15626
15627 * xterm.h: Add support for those atoms.
15628
e067f0c1
CY
156292011-05-26 Chong Yidong <cyd@stupidchicken.com>
15630
15631 * xselect.c: ICCCM-compliant handling of MULTIPLE targets.
15632 (converted_selections, conversion_fail_tag): New global variables.
15633 (x_selection_request_lisp_error): Free the above.
15634 (x_get_local_selection): Remove unnecessary code.
15635 (x_reply_selection_request): Args changed; handle arbitrary array
620c53a6
SM
15636 of converted selections stored in converted_selections.
15637 Separate the XChangeProperty and SelectionNotify steps.
e067f0c1
CY
15638 (x_handle_selection_request): Rewrite to handle MULTIPLE target.
15639 (x_convert_selection): New function.
15640 (x_handle_selection_event): Simplify.
15641 (x_get_foreign_selection): Don't ignore incoming requests while
15642 waiting for an answer; this will fail when we implement
15643 SAVE_TARGETS, and seems unnecessary anyway.
15644 (selection_data_to_lisp_data): Recognize ATOM_PAIR type.
15645 (Vx_sent_selection_functions): Doc fix.
15646
0f4aebc0
LL
156472011-05-26 Leo Liu <sdl.web@gmail.com>
15648
15649 * editfns.c (Ftranspose_regions): Allow empty regions. (Bug#8699)
15650
e61124cd
YM
156512011-05-25 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
15652
15653 * dispextern.h (struct glyph_row): New member fringe_bitmap_periodic_p.
15654
15655 * dispnew.c (shift_glyph_matrix, scrolling_window): Mark scrolled row
15656 for fringe update if it has periodic bitmap.
ac389d0c 15657 (row_equal_p): Also compare left_fringe_offset, right_fringe_offset,
e61124cd
YM
15658 and fringe_bitmap_periodic_p.
15659
15660 * fringe.c (get_fringe_bitmap_data): New function.
15661 (draw_fringe_bitmap_1, update_window_fringes): Use it.
15662 (update_window_fringes): Record periodicity of fringe bitmap in glyph
15663 row. Mark glyph row for fringe update if periodicity changed.
15664
15665 * xdisp.c (try_window_reusing_current_matrix): Don't mark scrolled row
15666 for fringe update unless it has periodic bitmap.
15667
f16d9837
KH
156682011-05-25 Kenichi Handa <handa@m17n.org>
15669
15670 * xdisp.c (get_next_display_element): Set correct it->face_id for
15671 a static composition.
15672
e1b90ef6
LL
156732011-05-24 Leo Liu <sdl.web@gmail.com>
15674
15675 * deps.mk (fns.o):
15676 * makefile.w32-in ($(BLD)/fns.$(O)): Include sha1.h.
15677
15678 * fns.c (crypto_hash_function, Fsha1): New function.
15679 (Fmd5): Use crypto_hash_function.
15680 (syms_of_fns): Add Ssha1.
15681
7400048f
PE
156822011-05-22 Paul Eggert <eggert@cs.ucla.edu>
15683
15684 * gnutls.c: Remove unused macros.
15685 (fn_gnutls_transport_set_lowat, fn_gnutls_transport_set_pull_function):
15686 (fn_gnutls_transport_set_push_function) [!WINDOWSNT]:
15687 Remove macros that are defined and never used.
15688 Caught by gcc -Wunused-macros (GCC 4.6.0, Fedora 14).
15689
abb71cf4
CY
156902011-05-22 Chong Yidong <cyd@stupidchicken.com>
15691
15692 * xselect.c (syms_of_xselect): Remove unused symbol SAVE_TARGETS.
15693 (Fx_get_selection_internal): Minor cleanup.
15694 (Fx_own_selection_internal): Rename arguments for consistency with
15695 select.el.
15696
6307db39
PE
156972011-05-22 Paul Eggert <eggert@cs.ucla.edu>
15698
15699 * xselect.c (QSAVE_TARGETS): New static var, to fix build failure.
15700
f3d4e0a4
CY
157012011-05-22 Chong Yidong <cyd@stupidchicken.com>
15702
15703 * xselect.c (syms_of_xselect): Include character.h; use DEFSYM.
15704
4d8ade89
YM
157052011-05-21 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
15706
15707 * dispnew.c (scrolling_window): Don't exclude the case that the
15708 last enabled row in the desired matrix touches the bottom boundary.
15709
32078c8d
GM
157102011-05-21 Glenn Morris <rgm@gnu.org>
15711
15712 * Makefile.in ($(etc)/DOC): Make second command line even shorter.
33cf345f
GM
15713 (SOME_MACHINE_OBJECTS): Replace FONT_OBJ by its maximal expansion,
15714 and add some more files.
32078c8d 15715
7285dc67
EZ
157162011-05-20 Eli Zaretskii <eliz@gnu.org>
15717
15718 * callproc.c (Fcall_process) [MSDOS]: Fix arguments to
15719 report_file_error introduced by the change from 2011-05-07.
15720
89d1bd22
PE
157212011-05-20 Paul Eggert <eggert@cs.ucla.edu>
15722
15723 * systime.h (Time): Define only if emacs is defined.
15724 This is to allow ../lib-src/profile.c to be compiled on FreeBSD,
15725 where the include path doesn't have X11/X.h by default. See
15726 <http://lists.gnu.org/archive/html/emacs-devel/2011-05/msg00561.html>.
15727
cd394be1 157282011-05-20 Kenichi Handa <handa@m17n.org>
31bfc35c
KH
15729
15730 * composite.c (find_automatic_composition): Fix previous change.
15731
b9704ad9
GM
157322011-05-20 Glenn Morris <rgm@gnu.org>
15733
15734 * lisp.mk: New file, split from Makefile.in.
15735 * Makefile.in (lisp): Move to separate file, inserted by @lisp_frag@.
15736 (shortlisp): Remove.
15737 ($(etc)/DOC): Edit lisp.mk rather than using $shortlisp.
15738
4a720484
GM
157392011-05-19 Glenn Morris <rgm@gnu.org>
15740
15741 * Makefile.in (MSDOS_SUPPORT_REAL, MSDOS_SUPPORT, NS_SUPPORT)
15742 (REAL_MOUSE_SUPPORT, GPM_MOUSE_SUPPORT, MOUSE_SUPPORT, TOOLTIP_SUPPORT)
15743 (BASE_WINDOW_SUPPORT, X_WINDOW_SUPPORT, WINDOW_SUPPORT): Remove.
15744 (lisp): Set the order to that of loadup.el.
15745 (shortlisp): Make it a copy of $lisp.
15746 (SOME_MACHINE_LISP): Remove.
15747 ($(etc)/DOC): Depend just on $lisp, not $SOME_MACHINE_LISP too.
15748 Use just $shortlisp, not $SOME_MACHINE_LISP too.
15749
a28d4396
KH
157502011-05-18 Kenichi Handa <handa@m17n.org>
15751
15752 * composite.c (CHAR_COMPOSABLE_P): Add more check for efficiency.
15753 (BACKWARD_CHAR): Wrap the arg STOP by parenthesis.
15754 (find_automatic_composition): Mostly rewrite for efficiency.
15755
a2b1fa8e
JB
157562011-05-18 Juanma Barranquero <lekktu@gmail.com>
15757
15758 * makefile.w32-in: Update dependencies.
15759
8e1f5610
CS
157602011-05-18 Christoph Scholtes <cschol2112@googlemail.com>
15761
15762 * menu.c: Include limits.h (fixes the MS-Windows build broken by
7d7d0045 15763 2011-06-18T18:49:19Z!cyd@stupidchicken.com).
8e1f5610 15764
7025ee00 157652011-05-18 Paul Eggert <eggert@cs.ucla.edu>
cb93f9be 15766
cdfa6eab
PE
15767 Fix some integer overflow issues, such as string length overflow.
15768
06d6db33
PE
15769 * insdel.c (count_size_as_multibyte): Check for string overflow.
15770
2b4560a8
PE
15771 * character.c (lisp_string_width): Check for string overflow.
15772 Use EMACS_INT, not int, for string indexes and lengths; in
15773 particular, 2nd arg is now EMACS_INT, not int. Do not crash if
15774 the resulting string length overflows an EMACS_INT; instead,
15775 report a string overflow if no precision given. When checking for
15776 precision exhaustion, use a check that cannot possibly have
15777 integer overflow. (Bug#8675)
15778 * character.h (lisp_string_width): Adjust to new signature.
15779
cb93f9be
PE
15780 * alloc.c (string_overflow): New function.
15781 (Fmake_string): Use it. This doesn't change behavior, but saves
15782 a few bytes and will simplify future changes.
15783 * character.c (string_escape_byte8): Likewise.
15784 * lisp.h (string_overflow): New decl.
15785
1a1f3366
PE
15786 Fixups, following up to the user-interface timestamp change.
15787 * nsterm.m (last_mouse_movement_time, ns_mouse_position): Use Time
15788 for UI timestamps, instead of unsigned long.
9fbd6841
PE
15789 * msdos.c (mouse_get_pos): Likewise.
15790 * w32inevt.c (movement_time, w32_console_mouse_position): Likewise.
1a1f3366
PE
15791 * w32gui.h (Time): Define by including "systime.h" rather than by
15792 declaring it ourselves. (Bug#8664)
15793
d4e3e4d3
PE
15794 * dispextern.h (struct image): Don't assume time_t <= unsigned long.
15795 * image.c (clear_image_cache): Likewise.
15796
f6a24d19
PE
15797 * term.c (term_mouse_position): Don't assume time_t wraparound.
15798
08dc5ae6
PE
15799 Be more systematic about user-interface timestamps.
15800 Before, the code sometimes used 'Time', sometimes 'unsigned long',
620c53a6
SM
15801 and sometimes 'EMACS_UINT', to represent these timestamps.
15802 This change causes it to use 'Time' uniformly, as that's what X uses.
08dc5ae6
PE
15803 This makes the code easier to follow, and makes it easier to catch
15804 integer overflow bugs such as Bug#8664.
15805 * frame.c (Fmouse_position, Fmouse_pixel_position):
15806 Use Time, not unsigned long, for user-interface timestamps.
15807 * keyboard.c (last_event_timestamp, kbd_buffer_get_event): Likewise.
15808 (button_down_time, make_lispy_position, make_lispy_movement): Likewise.
15809 * keyboard.h (last_event_timestamp): Likewise.
15810 * menu.c (Fx_popup_menu) [!HAVE_X_WINDOWS]: Likewise.
15811 * menu.h (xmenu_show): Likewise.
15812 * term.c (term_mouse_position): Likewise.
15813 * termhooks.h (struct input_event.timestamp): Likewise.
15814 (struct terminal.mouse_position_hook): Likewise.
15815 * xmenu.c (create_and_show_popup_menu, xmenu_show): Likewise.
15816 * xterm.c (XTmouse_position, x_scroll_bar_report_motion): Likewise.
15817 * systime.h (Time): New decl. Pull it in from <X11/X.h> if
15818 HAVE_X_WINDOWS, otherwise define it as unsigned long, which is
15819 what it was before.
15820 * menu.h, termhooks.h: Include "systime.h", for Time.
15821
8e55734a
PE
15822 * keyboard.c (make_lispy_event): Fix problem in integer overflow.
15823 Don't assume that the difference between two unsigned long values
15824 can fit into an integer. At this point, we know button_down_time
15825 <= event->timestamp, so the difference must be nonnegative, so
15826 there's no need to cast the result if double-click-time is
15827 nonnegative, as it should be; check that it's nonnegative, just in
15828 case. This bug is triggered when events are more than 2**31 ms
86db42d2 15829 apart (about 25 days). (Bug#8664)
8e55734a 15830
841f1b75 15831 * xselect.c (last_event_timestamp): Remove duplicate decl.
6434756c 15832 (x_own_selection): Remove needless cast to unsigned long.
841f1b75 15833
3e26f69c
PE
15834 * xmenu.c (set_frame_menubar): Use int, not EMACS_UINT, for indexes
15835 that always fit in int. Use a sentinel instead of a counter, to
15836 avoid a temp and to allay GCC's concerns about possible int overflow.
d230cb74
PE
15837 * frame.h (struct frame): Use int for menu_bar_items_used
15838 instead of EMACS_INT, since it always fits in int.
3e26f69c 15839
5cc152c0
PE
15840 * menu.c (grow_menu_items): Check for int overflow.
15841
d89eb65e
PE
15842 * xmenu.c (set_frame_menubar): Don't mishandle vectors with no nils.
15843
5235bd3e
PE
15844 * xterm.c: Use EMACS_INT for Emacs modifiers, and int for X modifiers.
15845 Before, the code was not consistent. These values cannot exceed
15846 2**31 - 1 so there's no need to make them unsigned.
15847 (x_x_to_emacs_modifiers): Accept int and return EMACS_INT.
15848 (x_emacs_to_x_modifiers): Accept EMACS_INT and return int.
15849 (x_x_to_emacs_modifiers, x_emacs_to_x_modifiers): Reject non-integers
15850 as modifiers.
15851 * xterm.h (x_x_to_emacs_modifiers): Adjust to signature change.
15852
bc827e23
PE
15853 * lisp.h (XINT) [USE_LISP_UNION_TYPE]: Cast to EMACS_INT.
15854 (XUINT) [USE_LISP_UNION_TYPE]: Cast to EMACS_UINT.
15855 Otherwise, GCC 4.6.0 warns about printf (pI, XINT (...)),
15856 presumably because the widths might not match.
15857
78eb494e
PE
15858 * window.c (size_window): Avoid needless test at loop start.
15859
04f2d78b
CB
158602011-05-18 Courtney Bane <emacs-bugs-7626@cbane.org> (tiny change)
15861
15862 * term.c (Fresume_tty): Restore hooks before reinitializing (bug#8687).
15863
d2fc7e3d 158642011-05-12 Drew Adams <drew.adams@oracle.com>
e531bdff
DA
15865
15866 * textprop.c (Fprevious_single_char_property_change): Doc fix (bug#8655).
15867
d2fc7e3d 158682011-05-12 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
7db47798
YM
15869
15870 * w32term.c (w32_draw_fringe_bitmap): Rename local vars `left' and
15871 `width' to `bar_area_x' and `bar_area_width', respectively.
15872 (x_scroll_run): Take account of fringe background extension.
15873
04f2d78b
CB
15874 * xterm.c (x_draw_fringe_bitmap) [USE_TOOLKIT_SCROLL_BARS]:
15875 Rename local vars `left' and `width' to `bar_area_x' and
7db47798
YM
15876 `bar_area_width', respectively.
15877 (x_scroll_run) [USE_TOOLKIT_SCROLL_BARS]: Take account of fringe
15878 background extension.
15879
79b70037
GM
158802011-05-10 Jim Meyering <meyering@redhat.com>
15881
15882 * xdisp.c (x_intersect_rectangles): Fix typo "the the -> the".
15883
2f142cc5
JB
158842011-05-10 Juanma Barranquero <lekktu@gmail.com>
15885
15886 * image.c (Finit_image_library): Return t for built-in image types,
15887 like pbm and xbm. (Bug#8640)
15888
57679c86
AS
158892011-05-09 Andreas Schwab <schwab@linux-m68k.org>
15890
15891 * w32menu.c (set_frame_menubar): Fix submenu allocation.
15892
888c9e86
EZ
158932011-05-07 Eli Zaretskii <eliz@gnu.org>
15894
b0512a1d
EZ
15895 * w32console.c (Fset_screen_color): Doc fix.
15896 (Fget_screen_color): New function.
15897 (syms_of_ntterm): Defsubr it.
15898
7285dc67
EZ
15899 * callproc.c (call_process_cleanup) [MSDOS]: Don't close and
15900 unlink the temporary file if Fcall_process didn't create it in the
15901 first place.
15902 (Fcall_process) [MSDOS]: Don't create tempfile if stdout of the
15903 child process will be redirected to a file specified with `:file'.
888c9e86
EZ
15904 Don't try to re-open tempfile in that case, and set fd[0] to -1 as
15905 cue to call_process_cleanup not to close that handle.
15906
4d3fcc8e
BK
159072011-05-07 Ben Key <bkey76@gmail.com>
15908
15909 * makefile.w32-in: The bootstrap-temacs rule now makes use of
15910 one of two shell specific rules, either bootstrap-temacs-CMD or
15911 bootstrap-temacs-SH. The bootstrap-temacs-SH rule is identical
15912 to the previous implementation of the bootstrap-temacs rule.
15913 The bootstrap-temacs-CMD rule is similar to the previous
15914 implementation of the bootstrap-temacs rule except that it
15915 makes use of the ESC_CFLAGS variable instead of the CFLAGS
15916 variable.
15917
15918 These changes, along with some changes to nt/configure.bat,
15919 nt/gmake.defs, and nt/nmake.defs, are required to extend my
15920 earlier fix to add support for --cflags and --ldflags options
15921 that include quotes so that it works whether make uses cmd or
15922 sh as the shell.
15923
b4289b64
MA
159242011-05-06 Michael Albinus <michael.albinus@gmx.de>
15925
15926 * dbusbind.c (QCdbus_type_unix_fd): Declare static.
15927 (xd_remove_watch): Don't check QCdbus_type_unix_fd for SYMBOLP, it
15928 is a constant.
15929 (Fdbus_init_bus, xd_read_queued_messages): Bus can be a symbol or
15930 a string. Handle both cases.
15931 (Fdbus_call_method_asynchronously, Fdbus_register_signal)
15932 (Fdbus_register_method): Use Qinvalid_function.
15933
af4c0e28
JB
159342011-05-06 Juanma Barranquero <lekktu@gmail.com>
15935
15936 * makefile.w32-in: Update dependencies.
15937 (LISP_H): Add inttypes.h and stdin.h.
15938 (PROCESS_H): Add unistd.h.
15939
c51453d9
EZ
159402011-05-06 Eli Zaretskii <eliz@gnu.org>
15941
15942 * lread.c: Include limits.h (fixes the MS-Windows build broken by
15943 2011-05-06T07:13:19Z!eggert@cs.ucla.edu).
15944
8ff0ac3c 159452011-05-06 Paul Eggert <eggert@cs.ucla.edu>
c032b5f8 15946
4c4b566b
PE
15947 * image.c (Finit_image_library) [!HAVE_NTGUI]: Omit unused local.
15948
aab2b9b5
PE
15949 * term.c (vfatal): Remove stray call to va_end.
15950 It's not needed and the C Standard doesn't allow it here anyway.
15951
c378da0b
PE
15952 Use C99's va_copy to avoid undefined behavior on x86-64 GNU/Linux.
15953 * eval.c (verror): doprnt a copy of ap, not the original. (Bug#8545)
15954
288b08c7
PE
15955 * eval.c (verror): OK to create a string of up to MOST_POSITIVE_FIXNUM
15956 bytes.
15957
e3601888
PE
15958 * term.c: Don't include <stdarg.h>, as <lisp.h> does that.
15959
db6c0e74
PE
15960 * callproc.c (Fcall_process): Use 'volatile' to avoid vfork clobbering.
15961
dd5963ea
PE
15962 * process.c (Fformat_network_address): Fix typo: args2 -> *args2.
15963
88c9450f
PE
15964 * xmenu.c (set_frame_menubar): Fix typo: int * -> int (3 times).
15965
2f9442b8
PE
15966 * coding.c (detect_coding_charset): Fix typo: * 2 -> *4 (Bug#8601).
15967
c032b5f8
PE
15968 * charset.h (struct charset.code_space): Now has 15 elements, not 16.
15969 * charset.c (Fdefine_charset_internal): Don't initialize
15970 charset.code_space[15]. The value was garbage, on hosts with
2d38271b 15971 32-bit int (Bug#8600).
a108c10b
PE
15972
15973 * lread.c (read_integer): Be more consistent with string-to-number.
15974 Use string_to_number to do the actual conversion; this avoids
15975 rounding errors and fixes some other screwups. Without this fix,
15976 for example, #x1fffffffffffffff was misread as -2305843009213693952.
15977 (digit_to_number): Move earlier, for benefit of read_integer.
15978 Return -1 if the digit is out of range for the base, -2 if it is
48e400f0 15979 not a digit in any supported base. (Bug#8602)
a108c10b 15980
ad5f9eea
PE
15981 * doprnt.c (doprnt): Support arbitrary pI values, such as "I64".
15982
aec1708a
PE
15983 * dispnew.c (scrolling_window): Return 1 if we scrolled,
15984 to match comment at start of function. This also removes a
15985 GCC warning about overflow in a 32+64-bit port.
15986
47be4ab5
PE
15987 * lisp.h (EMACS_INT, EMACS_UINT, BITS_PER_EMACS_INT, pI): Simplify.
15988
371cac43
PE
15989 * dbusbind.c: Do not use XPNTR on a value that may be an integer.
15990 Reported by Stefan Monnier in
15991 <http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00919.html>.
04f2d78b
CB
15992 (xd_remove_watch, Fdbus_init_bus, xd_read_queued_messages):
15993 Use SYMBOLP-guarded XSYMBOL, not XPNTR.
371cac43 15994
d01a7826
PE
15995 * lisp.h (EMACS_INTPTR): Remove. All uses changed to intptr_t.
15996 (EMACS_UINTPTR): Likewise, with uintptr_t.
15997
7fd47d5c
PE
15998 * lisp.h: Prefer 64-bit EMACS_INT if available.
15999 (EMACS_INT, EMACS_UINT, BITS_PER_EMACS_INT, pI): Define to 64-bit
16000 on 32-bit hosts that have 64-bit int, so that they can access
16001 large files.
122b0c86
PE
16002 However, temporarily disable this change unless the temporary
16003 symbol WIDE_EMACS_INT is defined.
7fd47d5c 16004
8727937b
PE
16005 * lread.c, process.c: Do not include <inttypes.h>; lisp.h does it now.
16006
8ac068ac
PE
16007 Prefer intptr_t/uintptr_t for integers the same widths as pointers.
16008 This removes an assumption that EMACS_INT and long are the same
16009 width as pointers. The assumption is true for Emacs porting targets
16010 now, but we want to make other targets possible.
16011 * lisp.h: Include <inttypes.h>, for INTPTR_MAX, UINTPTR_MAX.
16012 (EMACS_INTPTR, EMACS_UINTPTR): New macros.
16013 In the rest of the code, change types of integers that hold casted
16014 pointers to EMACS_INTPTR and EMACS_UINTPTR, systematically
16015 replacing EMACS_INT, long, EMACS_UINT, and unsigned long.
16016 (XTYPE): Don't cast arg to EMACS_UINT; normally is not needed.
16017 (XSET): Cast type of XTYPE arg to EMACS_INTPTR; it is needed here.
16018 No need to cast type when ORing.
16019 (XPNTR): Return a value of type EMACS_INTPTR or EMACS_UINTPTR.
16020 * alloc.c (lisp_align_malloc): Remove a no-longer-needed cast.
16021 * doc.c (store_function_docstring): Use EMACS_INTPTR, so as not to
16022 assume EMACS_INT is the same width as char *.
16023 * gtkutil.c (xg_gtk_scroll_destroy, xg_tool_bar_button_cb):
16024 (xg_tool_bar_callback, xg_tool_bar_help_callback, xg_make_tool_item):
16025 Remove no-longer-needed casts.
16026 (xg_create_scroll_bar, xg_tool_bar_button_cb, xg_tool_bar_callback):
16027 (xg_tool_bar_help_callback, xg_make_tool_item):
16028 Use EMACS_INTPTR to hold an integer
16029 that will be cast to void *; this can avoid a GCC warning
16030 if EMACS_INT is not the same width as void *.
16031 * menu.c (find_and_call_menu_selection): Remove no-longer-needed cast.
16032 * xdisp.c (display_echo_area_1, resize_mini_window_1):
16033 (current_message_1, set_message_1):
16034 Use a local to convert to proper width without a cast.
16035 * xmenu.c (dialog_selection_callback): Likewise.
16036
ede49d71
PE
16037 * sysdep.c (get_random): Don't assume EMACS_INT is no wider than long.
16038 Also, don't assume VALBITS / RAND_BITS is less than 5,
16039 and don't rely on undefined behavior when shifting a 1 left into
16040 the sign bit.
16041 * lisp.h (get_random): Change signature to match.
16042
2f30ecd0
PE
16043 * lread.c (hash_string): Use size_t, not int, for hash computation.
16044 Normally we prefer signed values; but hashing is special, because
16045 it's better to use unsigned division on hash table sizes so that
16046 the remainder is nonnegative. Also, size_t is the natural width
16047 for hashing into memory. The previous code used 'int', which doesn't
16048 retain enough info to hash well into very large tables.
16049 (oblookup, oblookup_last_bucket_number, Funintern): Likewise.
16050
2a866e7b
PE
16051 * dbusbind.c: Don't possibly lose pointer info when converting.
16052 (xd_remove_watch, Fdbus_init_bus, xd_read_queued_messages):
16053 Use XPNTR rather than XHASH, so that the high-order bits of
16054 the pointer aren't lost when converting through void *.
16055
51639eac
PE
16056 * eval.c (Fautoload): Don't double-shift a pointer.
16057
92394119
PE
16058 * fns.c (Frandom): Let EMACS_UINT be wider than unsigned long.
16059
dbdb9a7c
JB
160602011-05-06 Juanma Barranquero <lekktu@gmail.com>
16061
16062 * gnutls.c (DEF_GNUTLS_FN):
16063 * image.c (DEF_IMGLIB_FN): Make function pointers static.
16064
db7a0b4f
AS
160652011-05-05 Andreas Schwab <schwab@linux-m68k.org>
16066
16067 * lread.c (lisp_file_lexically_bound_p): Stop scanning at end
16068 marker. (Bug#8610)
16069
cd394be1 160702011-05-05 Eli Zaretskii <eliz@gnu.org>
fab624aa
EZ
16071
16072 * w32heap.c (allocate_heap) [USE_LISP_UNION_TYPE || USE_LSB_TAG]:
16073 New version that can reserve upto 2GB of heap space.
16074
f7ff1b0f 160752011-05-05 Chong Yidong <cyd@stupidchicken.com>
45cb8994
CY
16076
16077 * nsfns.m (Fns_read_file_name): Doc fix (Bug#8534).
16078
639c109b
TZ
160792011-05-05 Teodor Zlatanov <tzz@lifelogs.com>
16080
16081 * gnutls.c (fn_gnutls_certificate_set_x509_key_file): Add alias to
16082 `gnutls_certificate_set_x509_key_file'.
16083
d2127135
JB
160842011-05-05 Juanma Barranquero <lekktu@gmail.com>
16085
16086 * makefile.w32-in ($(BLD)/image.$(O), $(BLD)/process.$(O)):
16087 Update dependencies.
16088
e968f4f3
JB
160892011-05-04 Juanma Barranquero <lekktu@gmail.com>
16090
16091 * gnutls.h (emacs_gnutls_write, emacs_gnutls_read):
16092 * gnutls.c (emacs_gnutls_write, emacs_gnutls_read):
16093 Remove unused parameter `fildes'.
16094 * process.c (read_process_output, send_process): Don't pass it.
16095
84d358f0
JB
160962011-05-04 Juanma Barranquero <lekktu@gmail.com>
16097
16098 Fix previous change: the library cache is defined in w32.c.
16099 * image.c (CACHE_IMAGE_TYPE) [!HAVE_NTGUI]: Define to noop.
16100 (Finit_image_library): Wrap Vlibrary_cache on "#ifdef HAVE_NTGUI".
16101
0898ca10
JB
161022011-05-04 Juanma Barranquero <lekktu@gmail.com>
16103
16104 Implement dynamic loading of GnuTLS on Windows.
16105
16106 * gnutls.h (GNUTLS_EMACS_ERROR_NOT_LOADED): New macro.
16107 (emacs_gnutls_write, emacs_gnutls_read): Mark as extern.
16108 (emacs_gnutls_record_check_pending, emacs_gnutls_transport_set_errno):
16109 Declare.
16110
16111 * gnutls.c (Qgnutls_dll): Define.
16112 (DEF_GNUTLS_FN, LOAD_GNUTLS_FN): New macros.
16113 (gnutls_*): Declare function pointers.
16114 (init_gnutls_functions): New function to initialize function pointers.
16115 (emacs_gnutls_handshake, Fgnutls_error_string, Fgnutls_deinit)
16116 (emacs_gnutls_global_init, Fgnutls_bye): Use function pointers.
16117 (emacs_gnutls_record_check_pending, emacs_gnutls_transport_set_errno):
16118 Wrappers for gnutls_record_check_pending and gnutls_transport_set_errno.
16119 (emacs_gnutls_write, emacs_gnutls_read)
16120 (emacs_gnutls_handle_error, Fgnutls_error_fatalp)
16121 (Fgnutls_available_p): New function.
16122 (Fgnutls_boot): Call Fgnutls_available_p. Use function pointers.
16123 (syms_of_gnutls) <Qgnutls_dll>: Initialize and staticpro it.
16124 (syms_of_gnutls) <Sgnutls_available_p>: defsubr it.
16125
16126 * image.c: Include w32.h.
16127 (Vimage_type_cache): Delete.
16128 (syms_of_image) <Vimage_type_cache>: Don't initialize and staticpro it.
16129 (CACHE_IMAGE_TYPE, Finit_image_library): Use Vlibrary_cache instead.
16130 (w32_delayed_load): Move to w32.c.
16131
16132 * w32.h (VlibraryCache, QCloaded_from, w32_delayed_load): Declare.
16133
16134 * w32.c (QCloaded_from, Vlibrary_cache): Define.
16135 (w32_delayed_load): Move from image.c. When loading a library, record
16136 its filename in the :loaded-from property of the library id.
16137 (globals_of_w32) <QCloaded_from, Vlibrary_cache>:
16138 Initialize and staticpro them.
16139 (emacs_gnutls_pull, emacs_gnutls_push): Call emacs_gnutls_* functions.
16140
16141 * process.c: Include lisp.h before w32.h, not after.
16142 (wait_reading_process_output): Call emacs_gnutls_record_check_pending
16143 instead of gnutls_record_check_pending.
16144
16145 * callproc.c, emacs.c: Include lisp.h before w32.h, not after.
16146
ff4de4aa
TZ
161472011-05-04 Teodor Zlatanov <tzz@lifelogs.com>
16148
16149 * gnutls.c (Fgnutls_boot): Support :keylist and :crlfiles options
16150 instead of :keyfiles. Give GnuTLS the keylist and the CRL lists
16151 as passed in.
16152
abe95abb
JD
161532011-05-03 Jan Djärv <jan.h.d@swipnet.se>
16154
16155 * xterm.c (x_set_frame_alpha): Do not set property on anything
16156 else than FRAME_X_OUTER_WINDOW (Bug#8608).
16157
e16e55d4
JB
161582011-05-02 Juanma Barranquero <lekktu@gmail.com>
16159
16160 * sysdep.c (get_tty_size) [WINDOWSNT]: Implement. (Bug#8596)
16161
bafcf6a5
JB
161622011-05-02 Juanma Barranquero <lekktu@gmail.com>
16163
16164 * gnutls.c (Qgnutls_log_level, Qgnutls_code, Qgnutls_anon)
16165 (Qgnutls_x509pki, Qgnutls_e_interrupted, Qgnutls_e_again)
16166 (Qgnutls_e_invalid_session, Qgnutls_e_not_ready_for_handshake)
16167 (gnutls_global_initialized, Qgnutls_bootprop_priority)
16168 (Qgnutls_bootprop_trustfiles, Qgnutls_bootprop_keyfiles)
16169 (Qgnutls_bootprop_callbacks, Qgnutls_bootprop_loglevel)
16170 (Qgnutls_bootprop_hostname, Qgnutls_bootprop_verify_flags)
16171 (Qgnutls_bootprop_verify_error, Qgnutls_bootprop_verify_hostname_error)
16172 (Qgnutls_bootprop_callbacks_verify): Make static.
16173
e7a6747f
AS
161742011-05-01 Andreas Schwab <schwab@linux-m68k.org>
16175
19ed11ba
AS
16176 * callproc.c: Indentation fixup.
16177
e7a6747f 16178 * sysdep.c (wait_for_termination_1): Make static.
04f2d78b
CB
16179 (wait_for_termination, interruptible_wait_for_termination):
16180 Move after wait_for_termination_1.
e7a6747f 16181
1ef14cb4
LMI
161822011-05-01 Lars Magne Ingebrigtsen <larsi@gnus.org>
16183
16184 * sysdep.c (interruptible_wait_for_termination): New function
16185 which is like wait_for_termination, but allows keyboard
16186 interruptions.
16187
16188 * callproc.c (Fcall_process): Add (:file "file") as an option for
16189 the STDOUT buffer.
16190 (Fcall_process_region): Ditto.
16191
330d880c
EZ
161922011-04-30 Eli Zaretskii <eliz@gnu.org>
16193
8db90b73
EZ
16194 * dosfns.c (Fint86, Fdos_memget, Fdos_memput): Use `ASIZE (FOO)'
16195 rather than `XVECTOR (FOO)->size'.
16196
330d880c
EZ
16197 * process.c: Remove HAVE_INTTYPES_H condition from inclusion of
16198 inttypes.h, as a gnulib replacement is used if it not available in
16199 system headers.
16200
15cbd324
EZ
162012011-04-21 Eli Zaretskii <eliz@gnu.org>
16202
16203 Lift the MOST_POSITIVE_FIXNUM/4 limitation on visited files.
16204 * fileio.c (Finsert_file_contents): Don't limit file size to 1/4
16205 of MOST_POSITIVE_FIXNUM. (Bug#8528)
16206
16207 * coding.c (coding_alloc_by_realloc): Error out if destination
16208 will grow beyond MOST_POSITIVE_FIXNUM.
16209 (decode_coding_emacs_mule): Abort if there isn't enough place in
16210 charbuf for the composition carryover bytes. Reserve an extra
16211 space for up to 2 characters produced in a loop.
16212 (decode_coding_iso_2022): Abort if there isn't enough place in
16213 charbuf for the composition carryover bytes.
16214
162152011-04-21 Eli Zaretskii <eliz@gnu.org>
afda1437 16216
ae940cca
EZ
16217 * doprnt.c (doprnt) [!HAVE_LONG_LONG_INT]: Error out instead of
16218 aborting when %lld or %lll format is passed.
16219 [!HAVE_UNSIGNED_LONG_LONG_INT]: Error out instead of aborting when
16220 %llo or %llx format is passed. (Bug#8545)
16221
03ab8921
EZ
16222 * window.c (window_scroll_line_based): Use a marker instead of
16223 simple variables to record original value of point. (Bug#7952)
16224
afda1437
EZ
16225 * doprnt.c (doprnt): Fix the case where a multibyte sequence
16226 produced by %s or %c overflows available buffer space. (Bug#8545)
16227
f76dee0c
PE
162282011-04-28 Paul Eggert <eggert@cs.ucla.edu>
16229
16230 * doprnt.c (doprnt): Omit useless test; int overflow check (Bug#8545).
283cdbef 16231 (SIZE_MAX): Move defn after all includes, as they might #define it.
f76dee0c 16232
fdc5744d
JB
162332011-04-28 Juanma Barranquero <lekktu@gmail.com>
16234
16235 * w32.c (init_environment): Warn about defaulting HOME to C:\.
16236
638f053a
JB
162372011-04-28 Juanma Barranquero <lekktu@gmail.com>
16238
16239 * keyboard.c (Qdelayed_warnings_hook): Define.
16240 (command_loop_1): Run `delayed-warnings-hook'
16241 if Vdelayed_warnings_list is non-nil.
16242 (syms_of_keyboard) <delayed-warnings-hook>: DEFSYM it.
16243 (syms_of_keyboard) <delayed-warnings-list>: DEFVAR_LISP it.
16244
d178f871
EZ
162452011-04-28 Eli Zaretskii <eliz@gnu.org>
16246
16247 * doprnt.c (doprnt): Don't return value smaller than the buffer
16248 size if the message was truncated. (Bug#8545).
16249
b124fd93
JB
162502011-04-28 Juanma Barranquero <lekktu@gmail.com>
16251
16252 * w32fns.c (Fx_change_window_property, Fx_delete_window_property)
16253 (Fx_window_property): #if-0 the whole functions, not just the bodies.
16254
e810457d
PE
162552011-04-27 Paul Eggert <eggert@cs.ucla.edu>
16256
16257 * doprnt.c (doprnt): Support "ll" length modifier, for long long.
16258
ea51cceb
JB
162592011-04-27 Juanma Barranquero <lekktu@gmail.com>
16260
16261 * makefile.w32-in: Update dependencies.
16262
94dcfacf
EZ
162632011-04-27 Eli Zaretskii <eliz@gnu.org>
16264
16265 Improve `doprnt' and its usage. (Bug#8545)
16266 * doprnt.c (doprnt): Make sure `format' is never accessed beyond
16267 `format_end'. Remove support for %l as a conversion specifier.
16268 Don't use xrealloc. Improve diagnostics when the %l size modifier
16269 is used. Update the commentary.
16270
16271 * eval.c (verror): Simplify calculation of size_t.
16272
16273 * coding.c (Ffind_operation_coding_system): Fix diagnostic error
16274 messages.
16275
f61f41d7
PE
162762011-04-27 Yoshiaki Kasahara <kasahara@nc.kyushu-u.ac.jp> (tiny change)
16277
16278 * buffer.c (init_buffer) [USE_MMAP_FOR_BUFFERS]: Adjust to aliasing
16279 change.
16280
96fb4434
PE
162812011-04-27 Paul Eggert <eggert@cs.ucla.edu>
16282
16283 * nsmenu.m: Replace all uses of XVECTOR with ASIZE and AREF.
16284 This makes this file independent of the recent pseudovector change.
16285
671875da 162862011-04-26 Paul Eggert <eggert@cs.ucla.edu>
eab3844f 16287
69e9b5a3
PE
16288 * keyboard.c (handle_user_signal): Fix pointer signedness problem.
16289
b5f869a7 16290 * gnutls.c (emacs_gnutls_handle_error): Remove unused local.
7754e151 16291 (Fgnutls_boot): gnutls_certificate_verify_peers2 wants unsigned *.
8d4c3955 16292 Remove unused local.
c8926152 16293 (emacs_gnutls_write): Don't use uninitialized rtnval if nbyte <= 0.
080e5a8d 16294
841a1577 16295 * lisp.h: Fix a problem with aliasing and vector headers. (Bug#8546)
04f2d78b
CB
16296 GCC 4.6.0 optimizes based on type-based alias analysis.
16297 For example, if b is of type struct buffer * and v of type struct
eab3844f
PE
16298 Lisp_Vector *, then gcc -O2 was incorrectly assuming that &b->size
16299 != &v->size, and therefore "v->size = 1; b->size = 2; return
16300 v->size;" must therefore return 1. This assumption is incorrect
16301 for Emacs, since it type-puns struct Lisp_Vector * with many other
16302 types. To fix this problem, this patch adds a new type struct
f904488f 16303 vectorlike_header that documents the constraints on layout of vectors
eab3844f
PE
16304 and pseudovectors, and helps optimizing compilers not get fooled
16305 by Emacs's type punning. It also adds the macros XSETTYPED_PVECTYPE
16306 XSETTYPED_PSEUDOVECTOR, TYPED_PSEUDOVECTORP, for similar reasons.
f904488f
PE
16307 * lisp.h (XSETTYPED_PVECTYPE): New macro, specifying the name of
16308 the size member.
eab3844f
PE
16309 (XSETPVECTYPE): Rewrite in terms of new macro.
16310 (XSETPVECTYPESIZE): New macro, specifying both type and size.
16311 This is a bit clearer, and further avoids the possibility of
16312 undesirable aliasing.
16313 (XSETTYPED_PSEUDOVECTOR): New macro, specifying the size.
f904488f 16314 (XSETPSEUDOVECTOR): Rewrite in terms of XSETTYPED_PSEUDOVECTOR.
eab3844f
PE
16315 (XSETSUBR): Rewrite in terms of XSETTYPED_PSEUDOVECTOR and XSIZE,
16316 since Lisp_Subr is a special case (no "next" field).
04f2d78b
CB
16317 (ASIZE): Now uses header.size rather than size.
16318 All previous uses of XVECTOR (foo)->size replaced to use this macro,
f904488f
PE
16319 to avoid the hassle of writing XVECTOR (foo)->header.size.
16320 (struct vectorlike_header): New type.
eab3844f
PE
16321 (TYPED_PSEUDOVECTORP): New macro, also specifying the C type of the
16322 object, to help avoid aliasing.
16323 (PSEUDOVECTORP): Rewrite in terms of TYPED_PSEUDOVECTORP.
16324 (SUBRP): Likewise, since Lisp_Subr is a special case.
16325 * lisp.h (struct Lisp_Vector, struct Lisp_Char_Table):
16326 (struct Lisp_Sub_Char_Table, struct Lisp_Bool_Vector):
16327 (struct Lisp_Hash_Table): Combine first two members into a single
f904488f 16328 struct vectorlike_header member. All uses of "size" and "next" members
eab3844f
PE
16329 changed to be "header.size" and "header.next".
16330 * buffer.h (struct buffer): Likewise.
16331 * font.h (struct font_spec, struct font_entity, struct font): Likewise.
16332 * frame.h (struct frame): Likewise.
16333 * process.h (struct Lisp_Process): Likewise.
16334 * termhooks.h (struct terminal): Likewise.
16335 * window.c (struct save_window_data, struct saved_window): Likewise.
16336 * window.h (struct window): Likewise.
16337 * alloc.c (allocate_buffer, Fmake_bool_vector, allocate_pseudovector):
16338 Use XSETPVECTYPESIZE, not XSETPVECTYPE, to avoid aliasing problems.
16339 * buffer.c (init_buffer_once): Likewise.
16340 * lread.c (defsubr): Use XSETTYPED_PVECTYPE, since Lisp_Subr is a
16341 special case.
16342 * process.c (Fformat_network_address): Use local var for size,
16343 for brevity.
16344
0df1eac5
PE
16345 * bytecode.c (exec_byte_code): Don't use XVECTOR before CHECK_VECTOR.
16346
847ab9d1 16347 Make the Lisp reader and string-to-float more consistent (Bug#8525)
452f4150
PE
16348 * data.c (atof): Remove decl; no longer used or needed.
16349 (digit_to_number): Move to lread.c.
16350 (Fstring_to_number): Use new string_to_number function, to be
16351 consistent with how the Lisp reader treats infinities and NaNs.
16352 Do not assume that floating-point numbers represent EMACS_INT
16353 without losing information; this is not true on most 64-bit hosts.
16354 Avoid double-rounding errors, by insisting on integers when
16355 parsing non-base-10 numbers, as the documentation specifies.
16356 * lisp.h (string_to_number): New decl, replacing ...
16357 (isfloat_string): Remove.
bc0a5c13 16358 * lread.c: Include <inttypes.h>, for uintmax_t and strtoumax.
d78050d6 16359 (read1): Do not accept +. and -. as integers; this
452f4150
PE
16360 appears to have been a coding error. Similarly, do not accept
16361 strings like +-1e0 as floating point numbers. Do not report
16362 overflow for integer overflows unless the base is not 10 which
16363 means we have no simple and reliable way to continue.
16364 Break out the floating-point parsing into a new
16365 function string_to_number, so that Fstring_to_number parses
16366 floating point numbers consistently with the Lisp reader.
04f2d78b 16367 (digit_to_number): Move here from data.c. Make it static inline.
452f4150
PE
16368 (E_CHAR, EXP_INT): Remove, replacing with ...
16369 (E_EXP): New macro, to solve the "1.0e+" problem mentioned below.
16370 (string_to_number): New function, replacing isfloat_string.
16371 This function checks for valid syntax and produces the resulting
16372 Lisp float number too. Rework it so that string-to-number
bc0a5c13 16373 no longer mishandles examples like "1.0e+". Use strtoumax,
d78050d6
PE
16374 so that overflow for non-base-10 numbers is reported only when
16375 there's no portable and simple way to convert to floating point.
452f4150 16376
67769ffc
PE
16377 * textprop.c (set_text_properties_1): Rewrite for clarity,
16378 and to avoid GCC warning about integer overflow.
16379
c20db43f
PE
16380 * intervals.h (struct interval): Use EMACS_INT for members
16381 where EMACS_UINT might cause problems. See
16382 <http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00514.html>.
16383 (CHECK_TOTAL_LENGTH): Remove cast to EMACS_INT; no longer needed.
16384 * intervals.c (interval_deletion_adjustment): Now returns EMACS_INT.
16385 All uses changed.
37aa2f85
PE
16386 (offset_intervals): Tell GCC not to worry about length overflow
16387 when negating a negative length.
c20db43f 16388
2538aa2f
PE
16389 * alloc.c (overrun_check_malloc, overrun_check_realloc): Now static.
16390 (overrun_check_free): Likewise.
16391
f2d3008d
PE
16392 * alloc.c (SDATA_SIZE) [!GC_CHECK_STRING_BYTES]: Avoid runtime check
16393 in the common case where SDATA_DATA_OFFSET is a multiple of Emacs
16394 word size.
16395
ec8df744
PE
16396 * gnutls.c: Fix problems found by GCC 4.6.0 on Ubuntu 10.10.
16397 (gnutls_make_error): Rename local to avoid shadowing.
16398 (gnutls_emacs_global_deinit): ifdef out; not used.
16399 (Fgnutls_boot): Use const for pointer to readonly storage.
16400 Comment out unused local. Fix pointer signedness problems.
16401
640ee02d
PE
16402 * lread.c (openp): Don't stuff size_t into an 'int'.
16403 Use <= on length, not < on length + 1, to avoid GCC 4.6.0 warning
16404 about possible signed overflow.
16405
6048fb2a
PE
16406 * gtkutil.c: Fix problems found by GCC 4.6.0 on Ubuntu 10.10.
16407 (GDK_KEY_g): Don't define if already defined.
16408 (xg_prepare_tooltip): Avoid pointer signedness problem.
16409 (xg_set_toolkit_scroll_bar_thumb): Redo to avoid two casts.
16410
fa3c87e1
PE
16411 * process.c (Fnetwork_interface_info): Avoid left-shift undefined
16412 behavior with 1 << 31. GCC 4.6.0 warns about this on 32-bit hosts.
16413
2172544b
PE
16414 * xfns.c (Fx_window_property): Simplify a bit,
16415 to make a bit faster and to avoid GCC 4.6.0 warning.
16416 * xselect.c (x_get_window_property, x_handle_dnd_message): Likewise.
16417
9b821a21
PE
16418 * fns.c (internal_equal): Don't assume size_t fits in int.
16419
3c616cfa
PE
16420 * alloc.c (compact_small_strings): Tighten assertion a little.
16421
c2982e87
PE
16422 Replace pEd with more-general pI, and fix some printf arg casts.
16423 * lisp.h (pI): New macro, generalizing old pEd macro to other
16424 conversion specifiers. For example, use "...%"pI"d..." rather
16425 than "...%"pEd"...".
16426 (pEd): Remove. All uses replaced with similar uses of pI.
61bdb816 16427 * m/amdx86-64.h, m/ia64.h, m/ibms390x.h: Likewise.
c2982e87
PE
16428 * alloc.c (check_pure_size): Don't overflow by converting size to int.
16429 * bidi.c (bidi_dump_cached_states): Use pI to avoid cast.
16430 * data.c (Fnumber_to_string): Use pI instead of if-then-else-abort.
16431 * dbusbind.c (xd_append_arg): Use pI to avoid cast.
16432 (Fdbus_method_return_internal, Fdbus_method_error_internal): Likewise.
16433 * font.c (font_unparse_xlfd): Avoid potential buffer overrun on
16434 64-bit hosts.
16435 (font_unparse_xlfd, font_unparse_fcname): Use pI to avoid casts.
16436 * keyboard.c (record_char, modify_event_symbol): Use pI to avoid casts.
16437 * print.c (safe_debug_print, print_object): Likewise.
16438 (print_object): Don't overflow by converting EMACS_INT or EMACS_UINT
16439 to int.
6f04d126
PE
16440 Use pI instead of if-then-else-abort. Use %p to avoid casts,
16441 avoiding the 0 flag, which is not portable.
c2982e87
PE
16442 * process.c (Fmake_network_process): Use pI to avoid cast.
16443 * region-cache.c (pp_cache): Likewise.
16444 * xdisp.c (decode_mode_spec): Likewise.
16445 * xrdb.c (x_load_resources) [USE_MOTIF]: Use pI to avoid undefined
16446 behavior on 64-bit hosts with printf arg.
6f04d126 16447 * xselect.c (x_queue_event): Use %p to avoid casts, avoiding 0 flag.
c2982e87
PE
16448 (x_stop_queuing_selection_requests): Likewise.
16449 (x_get_window_property): Don't truncate byte count to an 'int'
16450 when tracing.
0b432f21 16451
5e073ec7
PE
16452 * frame.c (frame_name_fnn_p): Get rid of strtol, which isn't right
16453 here, since it parses constructs like leading '-' and spaces,
16454 which are not wanted; and it overflows with large numbers.
16455 Instead, simply match F[0-9]+, which is what is wanted anyway.
16456
36372bf9
PE
16457 * alloc.c: Remove unportable assumptions about struct layout.
16458 (SDATA_SELECTOR, SDATA_DATA_OFFSET): New macros.
16459 (SDATA_OF_STRING, SDATA_SIZE, allocate_string_data):
16460 (allocate_vectorlike, make_pure_vector): Use the new macros,
16461 plus offsetof, to remove unportable assumptions about struct layout.
16462 These assumptions hold on all porting targets that I know of, but
16463 they are not guaranteed, they're easy to remove, and removing them
16464 makes further changes easier.
16465
0b432f21
PE
16466 * alloc.c (BLOCK BYTES): Fix typo by changing "ablock" to "ablocks".
16467 This doesn't fix a bug but makes the code clearer.
bfd1c781
PE
16468 (string_overrun_cookie): Now const. Use initializers that
16469 don't formally overflow signed char, to avoid warnings.
000098c1
PE
16470 (allocate_string_data) [GC_CHECK_STRING_OVERRUN]: Fix typo that
16471 can cause Emacs to crash when string overrun checking is enabled.
c7bda33c
PE
16472 (allocate_buffer): Don't assume sizeof (struct buffer) is a
16473 multiple of sizeof (EMACS_INT); it need not be, if
16474 alignof(EMACS_INT) < sizeof (EMACS_INT).
d0f4e1f5 16475 (check_sblock, check_string_bytes, check_string_free_list): Protoize.
0b432f21 16476
895009e1
JB
164772011-04-26 Juanma Barranquero <lekktu@gmail.com>
16478
16479 * keyboard.c (QCrtl): Rename from Qrtl. All uses changed.
16480
6a7a1b0b
TZ
164812011-04-26 Teodor Zlatanov <tzz@lifelogs.com>
16482
16483 * gnutls.c (emacs_gnutls_handshake): Return an error if we're not
b5f869a7 16484 supposed to be handshaking. (Bug#8556)
6a7a1b0b
TZ
16485 Reported by Paul Eggert <eggert@cs.ucla.edu>.
16486
841a1577 164872011-04-26 Daniel Colascione <dan.colascione@gmail.com>
0438ce91
DC
16488
16489 * lisp.h (Qdebug): List symbol.
895009e1 16490 * eval.c (Qdebug): Restore global linkage.
0438ce91
DC
16491 * keyboard.c (debug-on-event): New variable.
16492 (handle_user_signal): Break into debugger when debug-on-event
16493 matches the current signal symbol.
16494
f2d3ba6f
DN
164952011-04-25 Dan Nicolaescu <dann@ics.uci.edu>
16496
16497 * alloc.c (check_sblock, check_string_bytes)
16498 (check_string_free_list): Convert to standard C.
16499
42ce4c63
TZ
165002011-04-25 Teodor Zlatanov <tzz@lifelogs.com>
16501
16502 * w32.c (emacs_gnutls_push): Fix typo.
16503
825cd63c
EZ
165042011-04-25 Eli Zaretskii <eliz@gnu.org>
16505
fb11d64d
EZ
16506 * gnutls.c (emacs_gnutls_handshake): Avoid compiler warnings about
16507 "cast to pointer from integer of different size".
16508
825cd63c
EZ
16509 Improve doprnt and its use in verror. (Bug#8545)
16510 * doprnt.c (doprnt): Document the set of format control sequences
16511 supported by the function. Use SAFE_ALLOCA instead of always
16512 using `alloca'.
16513
16514 * eval.c (verror): Don't limit the buffer size at size_max-1, that
16515 is one byte too soon. Don't use xrealloc; instead xfree and
16516 xmalloc anew.
16517
e061a11b
TZ
165182011-04-24 Teodor Zlatanov <tzz@lifelogs.com>
16519
16520 * gnutls.h: Add GNUTLS_STAGE_CALLBACKS enum to denote we're in the
16521 callbacks stage.
16522
16523 * gnutls.c: Renamed global_initialized to
16524 gnutls_global_initialized. Added internals for the
16525 :verify-hostname-error, :verify-error, and :verify-flags
16526 parameters of `gnutls-boot' and documented those parameters in the
16527 docstring. Start callback support.
9173deec
JB
16528 (emacs_gnutls_handshake): Add Woe32 support. Retry handshake
16529 unless a fatal error occurred. Call gnutls_alert_send_appropriate
16530 on error. Return error code.
e061a11b
TZ
16531 (emacs_gnutls_write): Call emacs_gnutls_handle_error.
16532 (emacs_gnutls_read): Likewise.
16533 (Fgnutls_boot): Return handshake error code.
16534 (emacs_gnutls_handle_error): New function.
16535 (wsaerror_to_errno): Likewise.
16536
16537 * w32.h (emacs_gnutls_pull): Add prototype.
16538 (emacs_gnutls_push): Likewise.
16539
16540 * w32.c (emacs_gnutls_pull): New function for GnuTLS on Woe32.
16541 (emacs_gnutls_push): Likewise.
16542
165432011-04-24 Claudio Bley <claudio.bley@gmail.com> (tiny change)
16544
16545 * process.c (wait_reading_process_output): Check if GnuTLS
16546 buffered some data internally if no FDs are set for TLS
16547 connections.
16548
16549 * makefile.w32-in (OBJ2): Add gnutls.$(O).
16550 (LIBS): Link to USER_LIBS.
16551 ($(BLD)/gnutls.$(0)): New target.
16552
fa6996bc
EZ
165532011-04-24 Eli Zaretskii <eliz@gnu.org>
16554
eb35682e
EZ
16555 * xdisp.c (handle_single_display_spec): Rename the
16556 display_replaced_before_p argument into display_replaced_p, to
16557 make it consistent with the commentary. Fix typos in the
16558 commentary.
16559
e2ad650c
EZ
16560 * textprop.c (syms_of_textprop): Remove dead code.
16561 (copy_text_properties): Delete obsolete commentary about an
16562 interface that was deleted long ago. Fix typos in the description
16563 of arguments.
16564
1b2de274
EZ
16565 * msdos.c (XMenuActivate, XMenuAddSelection): Adjust argument list
16566 to changes in oldXMenu/XMenu.h from 2011-04-16.
16567 <menu_help_message, prev_menu_help_message>: Constify.
16568 (IT_menu_make_room): menu->help_text is now `const char **';
16569 adjust.
16570
16571 * msdos.h (XMenuActivate, XMenuAddSelection): Adjust prototypes
16572 to changes in oldXMenu/XMenu.h from 2011-04-16.
16573 (struct XMenu): Declare `help_text' `const char **'.
16574
16575 * xfaces.c <Qunspecified>: Make extern again.
16576
16577 * syntax.c: Include sys/types.h before including regex.h, as
75f1671a 16578 required by POSIX.
1b2de274 16579
762b15be
EZ
16580 * doc.c (get_doc_string): Improve the format passed to `error'.
16581
16582 * doprnt.c (doprnt): Improve commentary.
16583
16584 * term.c (init_tty) [MSDOS]: Fix 1st argument to maybe_fatal.
16585
16586 * Makefile.in (TAGS): Depend on $(M_FILE) and $(S_FILE), and scan
16587 them with etags.
16588
f1052e5d
EZ
16589 * makefile.w32-in (globals.h): Add a dummy recipe, to make any
16590 changes in globals.h immediately force recompilation.
762b15be
EZ
16591 (TAGS): Depend on $(CURDIR)/m/intel386.h and
16592 $(CURDIR)/s/ms-w32.h.
16593 (TAGS-gmake): Scan $(CURDIR)/m/intel386.h and $(CURDIR)/s/ms-w32.h.
f1052e5d 16594
fa6996bc
EZ
16595 * character.c (Fchar_direction): Function deleted.
16596 (syms_of_character): Don't defsubr it.
16597 <char-direction-table>: Deleted.
16598
e6c3da20
EZ
165992011-04-23 Eli Zaretskii <eliz@gnu.org>
16600
16601 Fix doprnt so it could be used again safely in `verror'. (Bug#8435)
16602 * doprnt.c: Include limits.h.
16603 (SIZE_MAX): New macro.
04f2d78b
CB
16604 (doprnt): Return a size_t value. 2nd arg is now size_t.
16605 Many local variables are now size_t instead of int or unsigned.
e6c3da20
EZ
16606 Improve overflow protection. Support `l' modifier for integer
16607 conversions. Support %l conversion. Don't assume an EMACS_INT
16608 argument for integer conversions and for %c.
16609
16610 * lisp.h (doprnt): Restore prototype.
16611
16612 * makefile.w32-in ($(BLD)/callint.$(O)): Depend on
16613 $(SRC)/character.h.
16614
16615 * Makefile.in (base_obj): Add back doprnt.o.
16616
16617 * deps.mk (doprnt.o): Add back prerequisites.
16618 (callint.o): Depend on character.h.
16619
16620 * eval.c (internal_lisp_condition_case): Include the handler
16621 representation in the error message.
16622 (verror): Call doprnt instead of vsnprintf. Fix an off-by-one bug
16623 when breaking from the loop.
16624
16625 * xdisp.c (vmessage): Call doprnt instead of vsnprintf.
16626
16627 * callint.c (Fcall_interactively): When displaying error message
16628 about invalid control letter, pass the character's codepoint, not
16629 a pointer to its multibyte form. Improve display of the character
16630 in octal and display also its hex code.
16631
16632 * character.c (char_string): Use %x to display the (unsigned)
16633 codepoint of an invalid character, to avoid displaying a bogus
16634 negative value.
16635
16636 * font.c (check_otf_features): Pass SDATA of SYMBOL_NAME to
16637 `error', not SYMBOL_NAME itself.
16638
16639 * coding.c (Fencode_sjis_char, Fencode_big5_char): Use %c for
16640 character arguments to `error'.
16641
16642 * charset.c (check_iso_charset_parameter): Fix incorrect argument
16643 to `error' in error message about FINAL_CHAR argument. Make sure
16644 FINAL_CHAR is a character, and use %c when it is passed as
16645 argument to `error'.
16646
4ffd0d6b 166472011-04-23 Eli Zaretskii <eliz@gnu.org>
97a93095
EZ
16648
16649 * s/ms-w32.h (localtime): Redirect to sys_localtime.
16650
16651 * w32.c: Include <time.h>.
16652 (sys_localtime): New function.
16653
4ffd0d6b 166542011-04-23 Chong Yidong <cyd@stupidchicken.com>
c17819f4
CY
16655
16656 * xdisp.c (init_xdisp): Initialize echo_area_window (Bug#6451).
16657
4ffd0d6b 16658 * buffer.c (syms_of_buffer): Doc fix (Bug#6902).
aac0c6e3 16659
4ffd0d6b 166602011-04-23 Samuel Thibault <sthibault@debian.org> (tiny change)
aac0c6e3 16661
4ffd0d6b
GM
16662 * sysdep.c (wait_for_termination): On GNU Hurd, kill returns -1 on
16663 zombies (Bug#8467).
aac0c6e3 16664
04c56954
EZ
166652011-04-19 Eli Zaretskii <eliz@gnu.org>
16666
16667 * syntax.h (SETUP_SYNTAX_TABLE_FOR_OBJECT): Fix setting of
16668 gl_state.e_property when gl_state.object is Qt.
16669
16670 * insdel.c (make_gap_larger): Remove limitation of buffer size
16671 to <= INT_MAX.
16672
16a43933
CY
166732011-04-18 Chong Yidong <cyd@stupidchicken.com>
16674
16675 * xdisp.c (lookup_glyphless_char_display)
16676 (produce_glyphless_glyph): Handle cons cell entry in
16677 glyphless-char-display.
16678 (Vglyphless_char_display): Document it.
16679
16680 * term.c (produce_glyphless_glyph): Handle cons cell entry in
16681 glyphless-char-display.
16682
4581706e
CY
166832011-04-17 Chong Yidong <cyd@stupidchicken.com>
16684
16685 * xdisp.c (get_next_display_element): Remove unnecessary ifdefs.
16686
16687 * termhooks.h (FRAME_WINDOW_P): Remove duplicated definitions.
16688
16689 * dispextern.h (FACE_SUITABLE_FOR_ASCII_CHAR_P): Add missing
16690 definition for no-X builds.
16691
4887c6e2 166922011-04-16 Paul Eggert <eggert@cs.ucla.edu>
764430a3 16693
fd35b6f9
PE
16694 Static checks with GCC 4.6.0 and non-default toolkits.
16695
5c1ccb01
PE
16696 * s/sol2-6.h, s/unixware.h (PTY_TTY_NAME_SPRINTF): Protoize decl.
16697
006c5daa
PE
16698 * process.c (keyboard_bit_set): Define only if SIGIO.
16699 (send_process_trap): Mark it with NO_RETURN if it doesn't return.
16700 (send_process): Repair possible setjmp clobbering.
16701
efc736d3
PE
16702 * s/usg5-4-common.h (SETUP_SLAVE_PTY): Don't pass extra arg to 'fatal'.
16703
4e2fe2e6
PE
16704 * eval.c: Include <stdio.h>, for vsnprintf on non-GNU/Linux hosts.
16705
f97334a2
PE
16706 * data.c (arith_error): Mark with NO_RETURN if it doesn't return.
16707
4e75f29d
PE
16708 * alloc.c (bytes_used_when_full, SPARE_MEMORY, BYTES_USED):
16709 Define only if needed.
16710
90efadd1
PE
16711 * sysdep.c (_FILE_OFFSET_BITS): Make this hack even uglier
16712 by pacifying GCC about it. Maybe it's time to retire it?
875975e9 16713 * xfaces.c (USG, __TIMEVAL__): Likewise.
90efadd1 16714
3c647824
PE
16715 * dispextern.h (struct redisplay_interface): Rename param
16716 to avoid shadowing.
e264f262 16717 * termhooks.h (struct terminal): Likewise.
761383f4 16718 * xterm.c (xembed_send_message): Likewise.
3c647824 16719
b58c5c4a
PE
16720 * insdel.c (make_gap_smaller): Define only if
16721 USE_MMAP_FOR_BUFFERS || REL_ALLOC || DOUG_LEA_MALLOC.
16722
cad59032
PE
16723 * keyboard.c (read_char): Make a var volatile so longjmp won't clobber
16724 it.
16725
c339dc2e
PE
16726 * emacs.c (MAX_HEAP_BSS_DIFF, my_edata): Move to where they're used,
16727 so that we aren't warned about unused symbols.
16728
91a3e27b
PE
16729 * xfns.c (Fx_file_dialog): Rename local to avoid shadowing.
16730
399c71d3 16731 * xdisp.c (x_produce_glyphs): Mark var as initialized (Bug#8512).
7a3fb125 16732
8ffc96f5
PE
16733 * xfns.c (x_real_positions): Mark locals as initialized.
16734
eef9bc79
PE
16735 * xmenu.c (xmenu_show): Don't use uninitialized vars.
16736
098db9dd
PE
16737 * xterm.c: Fix problems found by static analysis with other toolkits.
16738 (toolkit_scroll_bar_interaction): Define and use only if USE_X_TOOLKIT.
dda3aedd
PE
16739 (x_dispatch_event): Declare static if USE_GTK, and
16740 define if USE_GTK || USE_X_TOOLKIT.
098db9dd 16741 (SET_SAVED_BUTTON_EVENT): Define only if USE_X_TOOLKIT || USE_GTK.
dda3aedd 16742 * xterm.h (x_dispatch_event): Extern only if USE_X_TOOLKIT.
841a1577
JB
16743 * xterm.c, xterm.h (x_mouse_leave): Bring this function back, but only
16744 if defined HAVE_MENUS && !defined USE_X_TOOLKIT && !defined USE_GTK.
098db9dd 16745
eb18f6cc
PE
16746 * xmenu.c (menu_help_callback): Pointer type fixes.
16747 Use const pointers when pointing at readonly data. Avoid pointer
16748 signedness clashes.
16749 (FALSE): Remove unused macro.
16750 (update_frame_menubar): Remove unused decl.
16751
1fe72bf8
PE
16752 * xfns.c (Fx_hide_tip): Move locals to avoid shadowing.
16753
60d9e1db
PE
16754 * menu.c (push_submenu_start, push_submenu_end): Do not define unless
16755 USE_X_TOOLKIT || USE_GTK || HAVE_NS || defined HAVE_NTGUI.
16756 (single_menu_item): Rename local to avoid shadowing.
16757
39261c26
PE
16758 * keyboard.c (make_lispy_event): Remove unused local var.
16759
018c5e19
PE
16760 * frame.c, frame.h (x_get_resource_string): Bring this back, but
16761 only if HAVE_X_WINDOWS && !USE_X_TOOLKIT.
16762
63d2b86e
PE
16763 * bitmaps: Change bitmaps from unsigned char back to the X11
16764 compatible char. Avoid the old compiler warnings about
16765 out-of-range initializers by using, for example, '\xab' rather
16766 than 0xab.
16767
aefd87e1
PE
16768 * xgselect.c (xgselect_initialize): Check vs interface
16769 even if ! (defined (USE_GTK) || defined (HAVE_GCONF)).
16770
bf501fb9
PE
16771 * xmenu.c (xmenu_show): Rename parm to avoid shadowing.
16772
e9829fdf
PE
16773 * xterm.c (x_create_toolkit_scroll_bar): Use const * for pointers
16774 to read-only memory.
16775
1086c095
PE
16776 * fns.c (vector): Remove; this old hack is no longer needed.
16777
2baccd04 16778 * xsmfns.c (create_client_leader_window): Rename shadowing arg.
401f10cb 16779 Remove unused var.
dde42981 16780 (gdk_x11_set_sm_client_id) [!USE_GTK]: Don't define.
2baccd04 16781
72391843 16782 * xrdb.c (x_load_resources): Omit unused local.
3565b346 16783
436c16df 16784 * xfns.c (free_frame_menubar, atof): Remove duplicate decls.
8a94ea33 16785 (x_window): Rename locals to avoid shadowing.
dc5ddd85 16786 (USG): Use the kludged USG macro, to pacify gcc.
436c16df 16787
92bb796d 16788 * xterm.c (x_alloc_nearest_color_for_widget): Remove; unused.
bbbef9e1 16789 (x_term_init): Remove local to avoid shadowing.
92bb796d 16790
764430a3 16791 * xfns.c, xterm.c (_XEditResCheckMessages): Protoize decl.
4887c6e2
PE
16792
16793 * xdisp.c, dispextern.h (set_vertical_scroll_bar): Now extern if
16794 USE_TOOLKIT_SCROLL_BARS && !USE_GTK, as xterm.c needs it then.
16795
d1dfb56c
EZ
167962011-04-16 Eli Zaretskii <eliz@gnu.org>
16797
c4354cb4
EZ
16798 * gnutls.c (Fgnutls_boot): Don't pass Lisp_Object to `error'.
16799
d1dfb56c
EZ
16800 Fix regex.c, syntax.c and friends for buffers > 2GB.
16801 * syntax.h (struct gl_state_s): Declare character position members
16802 EMACS_INT.
16803
16804 * syntax.c (update_syntax_table): Declare 2nd argument EMACS_INT.
16805
04f2d78b
CB
16806 * textprop.c (verify_interval_modification, interval_of):
16807 Declare arguments EMACS_INT.
d1dfb56c
EZ
16808
16809 * intervals.c (adjust_intervals_for_insertion): Declare arguments
16810 EMACS_INT.
16811
16812 * intervals.h (CHECK_TOTAL_LENGTH): Cast to EMACS_INT, not `int'.
16813
16814 * indent.c (Fvertical_motion): Local variable it_start is now
16815 EMACS_INT.
16816
16817 * regex.c (re_match, re_match_2, re_match_2_internal)
16818 (bcmp_translate, regcomp, regexec, print_double_string)
16819 (group_in_compile_stack, re_search, re_search_2, regex_compile)
16820 (re_compile_pattern, re_exec): Declare arguments and local
16821 variables `size_t' and `ssize_t' and return values `regoff_t', as
16822 appropriate.
16823 (POP_FAILURE_REG_OR_COUNT) <pfreg>: Declare `long'.
16824 (CHECK_INFINITE_LOOP) <failure>: Declare `ssize_t'.
16825 <compile_stack_type>: `size' and `avail' are now `size_t'.
16826
16827 * regex.h <regoff_t>: Use ssize_t, not int.
16828 (re_search, re_search_2, re_match, re_match_2): Arguments that
16829 specify buffer/string position and length are now ssize_t and
16830 size_t. Return type is regoff_t.
16831
613052cd
BK
168322011-04-16 Ben Key <bkey76@gmail.com>
16833
16834 * nsfont.m: Fixed bugs in ns_get_family and
16835 ns_descriptor_to_entity that were caused by using free to
16836 deallocate memory blocks that were allocated by xmalloc (via
16837 xstrdup). This caused Emacs to crash when compiled with
16838 XMALLOC_OVERRUN_CHECK defined (when Emacs was configured with
16839 --enable-checking=xmallocoverrun). xfree is now used to
16840 deallocate these memory blocks.
16841
4170f62f 168422011-04-15 Paul Eggert <eggert@cs.ucla.edu>
3e047f51 16843
71b41406
PE
16844 * sysdep.c (emacs_read): Remove unnecessary check vs MAX_RW_COUNT.
16845
9587a89d
PE
16846 emacs_write: Accept and return EMACS_INT for sizes.
16847 See http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00514.html
16848 et seq.
16849 * gnutls.c, gnutls.h (emacs_gnutls_read, emacs_gnutls_write):
16850 Accept and return EMACS_INT.
16851 (emacs_gnutls_write): Return the number of bytes written on
16852 partial writes.
16853 * sysdep.c, lisp.h (emacs_read, emacs_write): Likewise.
273a5f82
PE
16854 (emacs_read, emacs_write): Remove check for negative size, as the
16855 Emacs source code has been audited now.
9587a89d
PE
16856 * sysdep.c (MAX_RW_COUNT): New macro, to work around kernel bugs.
16857 (emacs_read, emacs_write): Use it.
273a5f82
PE
16858 * process.c (send_process): Adjust to the new signatures of
16859 emacs_write and emacs_gnutls_write. Do not attempt to store
16860 a byte offset into an 'int'; it might overflow.
9587a89d 16861 See http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00483.html
273a5f82 16862
3e047f51
PE
16863 * sound.c: Don't assume sizes fit in 'int'.
16864 (struct sound_device.period_size, alsa_period_size):
9c3c56a7 16865 Return EMACS_INT, not int.
3e047f51 16866 (struct sound_device.write, vox_write, alsa_write):
9c3c56a7
PE
16867 Accept EMACS_INT, not int.
16868 (wav_play, au_play): Use EMACS_INT to store sizes and to
3e047f51
PE
16869 record read return values.
16870
cc39a9db
BK
168712011-04-15 Ben Key <bkey76@gmail.com>
16872
c9d0ec6d
JB
16873 * keyboard.c (Qundefined): Don't declare static since it is used
16874 in nsfns.m.
16875 * xfaces.c (Qbold, Qexpanded, Qitalic, Qcondensed): Don't declare
16876 static since they are used in nsfont.m.
cc39a9db 16877
6c60eb9f
SM
168782011-04-15 Stefan Monnier <monnier@iro.umontreal.ca>
16879
16880 * process.c (Qprocessp): Don't declare static.
16881 * lisp.h (Qprocessp): Declare again.
16882
7990b61a
JB
168832011-04-15 Juanma Barranquero <lekktu@gmail.com>
16884
16885 * font.c (Qopentype): Don't make static (used from w32uniscribe.c).
16886
5d4cb038
PE
168872011-04-14 Paul Eggert <eggert@cs.ucla.edu>
16888
8bd7b830 16889 Improve C-level modularity by making more things 'static'.
cd64ea1d 16890
e3b27b31
PE
16891 Don't publish debugger-only interfaces to other modules.
16892 * lisp.h (safe_debug_print, debug_output_compilation_hack):
16893 (verify_bytepos, count_markers): Move decls to the only modules
16894 that need them.
16895 * region-cache.h (pp_cache): Likewise.
16896 * window.h (check_all_windows): Likewise.
16897 * marker.c, print.c, region-cache.c, window.c: Decls moved here.
16898
5d4cb038
PE
16899 * sysdep.c (croak): Now static, if
16900 defined TIOCNOTTY || defined USG5 || defined CYGWIN.
16901 * syssignal.h (croak): Declare only if not static.
69003fd8
PE
16902
16903 * alloc.c (refill_memory_reserve): Now static if
16904 !defined REL_ALLOC || defined SYSTEM_MALLOC.
16905 * lisp.h (refill_memory_reserve): Declare only if not static.
93ea6e8f 16906
e87b6180
PE
16907 * xsettings.c, xsettings.h (xsettings_get_system_normal_font):
16908 Define only if USE_LUCID.
16909
ac64929e
PE
16910 * xrdb.c (x_customization_string, x_rm_string): Now static.
16911
6f37259d
PE
16912 * xmenu.c (x_menu_wait_for_event): Export only if USE_MOTIF.
16913 * xterm.h (x_menu_wait_for_event): Declare only if USE_MOTIF.
16914
1683e3ab
PE
16915 * xdisp.c (draw_row_with_mouse_face): Now static.
16916 * dispextern.h (draw_row_with_mouse_fave): Remove decl.
16917
de9c2632
PE
16918 * window.h (check_all_windows): Mark externally visible.
16919
2b96acb7
PE
16920 * window.c (window_deletion_count): Now static.
16921
16922 * undo.c: Make symbols static if they're not exported.
16923 (last_undo_buffer, last_boundary_position, pending_boundary):
16924 Now static.
16925
50436f33
PE
16926 * textprop.c (interval_insert_behind_hooks): Now static.
16927 (interval_insert_in_front_hooks): Likewise.
16928
64520e5c
PE
16929 * term.c: Make symbols static if they're not exported.
16930 (tty_turn_off_highlight, get_tty_terminal, max_frame_cols):
16931 (max_frame_lines, tty_set_terminal_modes):
16932 (tty_reset_terminal_modes, tty_turn_off_highlight):
16933 (get_tty_terminal): Now static.
16934 (term_mouse_moveto): Do not define if HAVE_WINDOW_SYSTEM.
16935 * termhooks.h (term_mouse_moveto): Do not declare if
8bd7b830 16936 HAVE_WINDOW_SYSTEM.
64520e5c
PE
16937 * dispextern.h (tty_set_terminal_modes, tty_reset_terminal_modes):
16938 (tty_turn_off_highlight, get_tty_terminal): Remove decls.
16939
1fa53021
PE
16940 * sysdep.c: Make symbols static if they're not exported.
16941 (emacs_get_tty, emacs_set_tty, old_fcntl_flags, old_fcntl_owner):
16942 Now static.
16943 (sigprocmask_set, full_mask): Remove; unused.
16944 (wait_debugging): Mark as visible.
16945 * syssignal.h (SIGFULLMASK, full_mask): Remove decls.
16946 * systty.h (emacs_get_tty, emacs_set_tty): Remove decls.
16947
d4b43b22
PE
16948 * syntax.c (syntax_temp): Define only if !__GNUC__.
16949
b7c513d0
PE
16950 * sound.c (current_sound_device, current_sound): Now static.
16951
989b29ad
PE
16952 * search.c (searchbufs, searchbuf_head): Now static.
16953
13a55a78
PE
16954 * scroll.c (scroll_cost): Remove; unused.
16955 * dispextern.h (scroll_cost): Remove decl.
16956
de68a1fc
PE
16957 * region-cache.h (pp_cache): Mark as externally visible.
16958
40ccffa6
PE
16959 * process.c: Make symbols static if they're not exported.
16960 (process_tick, update_tick, create_process, chan_process):
16961 (Vprocess_alist, proc_buffered_char, datagram_access):
16962 (fd_callback_data, send_process_frame, process_sent_to): Now static.
16963 (deactivate_process): Mark defn as static, as well as decl.
16964 * lisp.h (create_process): Remove decl.
16965 * process.h (chan_process, Vprocess_alist): Remove decls.
16966
ad64fc97
PE
16967 * print.c: Make symbols static if they're not exported.
16968 (print_depth, new_backquote_output, being_printed, print_buffer):
16969 (print_buffer_size, print_buffer_pos, print_buffer_pos_byte):
16970 (print_interval, print_number_index, initial_stderr_stream):
16971 Now static.
16972 * lisp.h (Fprinc): Remove decl.
16973 (debug_output_compilation_hack): Mark as externally visible.
16974
adddb265
PE
16975 * sysdep.c (croak): Move decl from here to syssignal.h.
16976 * syssignal.h (croak): Put it here, so the API can be checked when
16977 'croak' is called from dissociate_if_controlling_tty.
16978
1717ede2
PE
16979 * minibuf.c: Make symbols static if they're not exported.
16980 (minibuf_save_list, choose_minibuf_frame): Now static.
16981 * lisp.h (choose_minibuf_frame): Remove decl.
16982
fa5fb2bc
PE
16983 * lisp.h (verify_bytepos, count_markers): Mark as externally visible.
16984
1e3890d1
PE
16985 * lread.c: Make symbols static if they're not exported.
16986 (read_objects, initial_obarray, oblookup_last_bucket_number):
16987 Now static.
16988 (make_symbol): Remove; unused.
16989 * lisp.h (initial_obarray, make_symbol): Remove decls.
16990
8a1414fa
PE
16991 * keyboard.c: Make symbols static if they're not exported.
16992 (single_kboard, recent_keys_index, total_keys, recent_keys):
16993 (this_command_key_count_reset, raw_keybuf, raw_keybuf_count):
16994 (this_single_command_key_start, echoing, last_auto_save):
16995 (read_key_sequence_cmd, dribble, recursive_edit_unwind):
16996 (command_loop, echo_now, keyboard_init_hook, help_char_p):
16997 (quit_throw_to_read_char, command_loop_2, top_level_1, poll_timer):
16998 (Vlispy_mouse_stem, double_click_count):
16999 Now static.
17000 (force_auto_save_soon): Define only if SIGDANGER.
17001 (ignore_mouse_drag_p): Now static if
17002 !defined HAVE_WINDOW_SYSTEM || defined USE_GTK || defined HAVE_NS.
17003 (print_help): Remove; unused.
17004 (stop_character, last_timer_event): Mark as externally visible.
17005 * keyboard.h (ignore_mouse_drag_p): Declare only if
17006 defined HAVE_WINDOW_SYSTEM && !defined USE_GTK && !defined HAVE_NS.
17007 (echo_now, help_char_p, quit_throw_to_read_char): Remove decls.
17008 * lisp.h (echoing): Remove decl.
17009 (force_auto_save_soon): Declare only if SIGDANGER.
17010 * xdisp.c (redisplay_window): Simplify code, to make it more
17011 obvious that ignore_mouse_drag_p is not accessed if !defined
17012 USE_GTK && !defined HAVE_NS.
17013
93ea6e8f
PE
17014 * intervals.c: Make symbols static if they're not exported.
17015 (merge_properties_sticky, merge_interval_right, delete_interval):
17016 Now static.
17017 * intervals.h (merge_interval_right, delete_interval): Remove decls.
17018
77382fcc
PE
17019 * insdel.c: Make symbols static if they're not exported.
17020 However, leave prepare_to_modify_buffer alone. It's never
17021 called from outside this function, but that appears to be a bug.
17022 (combine_after_change_list, combine_after_change_buffer):
4889fc82 17023 (adjust_after_replace, signal_before_change): Now static.
77382fcc
PE
17024 (adjust_after_replace_noundo): Remove; unused.
17025 * lisp.h (adjust_after_replace, adjust_after_replace_noundo):
4889fc82 17026 (signal_before_change): Remove decls.
77382fcc 17027
9306c32e
PE
17028 * indent.c (val_compute_motion, val_vmotion): Now static.
17029
cd44d2eb
PE
17030 * image.c: Make symbols static if they're not exported.
17031 * dispextern.h (x_create_bitmap_from_xpm_data): Do not declare
17032 if USE_GTK.
17033 * image.c (x_create_bitmap_from_xpm_data): Do not define if USE_GTK.
17034 (xpm_color_cache, ct_table, ct_colors_allocated): Now static.
17035
ad9a7a06
PE
17036 * fringe.c (standard_bitmaps): Now static.
17037 (max_used_fringe_bitmap): Now static, unless HAVE_NS.
17038
81626931
PE
17039 * frame.c: Make symbols static if they're not exported.
17040 (x_report_frame_params, make_terminal_frame): Now static.
17041 (get_frame_param): Now static, unless HAVE_NS.
17042 (x_fullscreen_adjust): Define if WINDOWSNT, not if HAVE_WINDOW_SYSTEM.
17043 (x_get_resource_string): Remove; not used.
17044 * frame.h (make_terminal_frame, x_report_frame_params):
17045 (x_get_resource_string); Remove decls.
17046 (x_fullscreen_adjust): Declare only if WINDOWSNT.
17047 * lisp.h (get_frame_param): Declare only if HAVE_NS.
17048
239f9db9
PE
17049 * font.c, fontset.c: Make symbols static if they're not exported.
17050 * dispextern.h (FACE_SUITABLE_FOR_ASCII_CHAR_P): New macro.
17051 (FACE_SUITABLE_FOR_CHAR_P): Use it.
17052 * font.c (font_close_object): Now static.
17053 * font.h (font_close_object): Remove.
17054 * fontset.c (FONTSET_OBJLIST): Remove.
17055 (free_realized_fontset) #if-0 the body, which does nothing.
17056 (face_suitable_for_char_p): #if-0, as it's never called.
17057 * fontset.h (face_suitable_for_char_p): Remove decl.
04f2d78b
CB
17058 * xfaces.c (face_at_string_position):
17059 Use FACE_SUITABLE_FOR_ASCII_CHAR_P, not FACE_SUITABLE_FOR_CHAR_P,
239f9db9
PE
17060 since 0 is always ASCII.
17061
dfcf3579
PE
17062 * fns.c (weak_hash_tables): Now static.
17063
5045092b
PE
17064 * fileio.c: Make symbols static if they're not exported.
17065 (auto_saving, auto_save_mode_bits, auto_save_error_occurred):
17066 (Vwrite_region_annotation_buffers): Now static.
17067
57a96f5c
PE
17068 * eval.c: Make symbols static if they're not exported.
17069 (backtrace_list, lisp_eval_depth, when_entered_debugger): Now static.
17070 * lisp.h (backtrace_list): Remove decl.
17071
35f08c38
PE
17072 * emacs.c: Make symbols static if they're not exported.
17073 (malloc_state_ptr, malloc_using_checking, syms_of_emacs):
17074 (fatal_error_code, fatal_error_signal_hook, standard_args):
17075 Now static.
17076 (fatal_error_signal): Now static, unless FLOAT_CATCH_SIGKILL.
17077 (DEFINE_DUMMY_FUNCTION): Mark function as externally visible.
17078 (__CTOR_LIST__, __DTOR_LIST__): Now externally visible.
17079 * lisp.h (fatal_error_signal_hook): Remove decl.
17080 (fatal_error_signal): Declare only if FLOAT_CATCH_SIGKILL.
17081
f44bd759
PE
17082 * editfns.c: Move a (normally-unused) function to its only use.
17083 * editfns.c, lisp.h (get_operating_system_release): Remove.
17084 * process.c (init_process) [DARWIN_OS]: Do it inline, as it is not
17085 worth the hassle of breaking this out.
17086
b532497d
PE
17087 * xterm.c: Make symbols static if they're not exported.
17088 (x_raise_frame, x_lower_frame, x_wm_set_window_state):
17089 (x_wm_set_icon_pixmap, x_initialize, XTread_socket_fake_io_error):
17090 (x_destroy_window, x_delete_display):
17091 Now static.
17092 (x_dispatch_event): Now static if ! (USE_MOTIF || USE_X_TOOLKIT).
17093 (x_mouse_leave): Remove; unused.
17094 * xterm.h (x_display_info_for_name, x_raise_frame, x_lower_frame):
17095 (x_destroy_window, x_wm_set_window_state, x_wm_set_icon_pixmap):
17096 (x_delete_display, x_initialize, x_set_border_pixel, x_screen_planes):
17097 Remove decls.
17098 (x_mouse_leave): Declare only if WINDOWSNT.
17099 (x_dispatch_event): Declare only if USE_MOTIF or USE_X_TOOLKIT.
17100 (xic_create_fontsetname): Declare only if HAVE_X_WINDOWS &&
17101 USE_X_TOOLKIT.
17102
1675728f
PE
17103 * ftxfont.c: Make symbols static if they're not exported.
17104 (ftxfont_driver): Export only if !defined HAVE_XFT && def8ined
17105 HAVE_FREETYPE.
17106 * font.h (ftxfont_driver): Likewise.
17107
e4cebfca
PE
17108 * xfns.c: Make symbols static if they're not exported.
17109 (x_last_font_name, x_display_info_for_name):
17110 (x_set_foreground_color, x_set_background_color, x_set_mouse_color):
17111 (x_set_cursor_color, x_set_border_pixel, x_set_border_color):
17112 (x_set_cursor_type, x_set_icon_type, x_set_icon_name):
17113 (x_set_scroll_bar_foreground, x_set_scroll_bar_background):
17114 (x_explicitly_set_name, x_set_title, xic_defaut_fontset, tip_timer):
17115 (last_show_tip_args): Now static.
17116 (xic_defaut_fontset, xic_create_fontsetname): Define only if
17117 defined HAVE_X_WINDOWS && defined USE_X_TOOLKIT
17118 (x_screen_planes): Remove; unused.
17119 * dispextern.h (x_screen_planes): Remove decl.
17120
5bf46f05
PE
17121 * dispnew.c: Make symbols static if they're not exported.
17122 * dispextern.h (redraw_garbaged_frames, scrolling):
17123 (increment_row_positions): Remove.
17124 * dispnew.c (new_glyph_matrix, increment_row_positions, scrolling):
17125 (delayed_size_change, glyph_matrix_count, glyph_pool_count):
17126 Now static.
17127 (redraw_garbaged_frames): Remove; unused.
17128
435f4c28
PE
17129 * xfaces.c: Make symbols static if they're not exported.
17130 * dispextern.h (ascii_face_of_lisp_face, free_realized_face):
17131 Remove decls.
17132 * xterm.h (defined_color): Remove decls.
17133 (x_free_dpy_colors): Declare only if USE_X_TOOLKIT.
17134 * xfaces.c (tty_suppress_bold_inverse_default_colors_p):
17135 (menu_face_changed_default, defined_color, free_realized_face):
17136 (x_free_dpy_colors): Define only if USE_X_TOOLKIT.
17137 (ascii_face_of_lisp_face): Remove; unused.
17138
8524aef3
PE
17139 * xdisp.c: Make symbols static if they're not exported.
17140 * dispextern.h (scratch_glyph_row, window_box_edges):
17141 (glyph_to_pixel_coords, set_cursor_from_row):
17142 (get_next_display_element, set_iterator_to_next):
17143 (highlight_trailing_whitespace, frame_to_window_pixel_xy):
17144 (show_mouse_face): Remove decls
17145 * frame.h (message_buf_print): Likewise.
17146 * lisp.h (pop_message, set_message, check_point_in_composition):
17147 Likewise.
17148 * xterm.h (set_vertical_scroll_bar): Likewise.
17149 * xdisp.c (list_of_error, Vmessage_stack, line_number_displayed):
17150 (message_buf_print, scratch_glyph_row, displayed_buffer):
17151 (set_iterator_to_next, pop_message, set_message, set_cursor_from_row):
17152 (get_next_display_element, show_mouse_face, window_box_edges):
17153 (frame_to_window_pixel_xy, check_point_in_composition):
17154 (set_vertical_scroll_bar, highlight_trailing_whitespace): Now static.
17155 (glyph_to_pixel_coords): Remove; unused.
17156
16390cd2
PE
17157 * dired.c (file_name_completion): Now static.
17158
17159 * dbusbind.c (xd_in_read_queued_messages): Now static.
17160
a25f4dfa
PE
17161 * lisp.h (circular_list_error, FOREACH): Remove; unused.
17162 * data.c (circular_list_error): Remove.
17163
14a9c8df
PE
17164 * commands.h (last_point_position, last_point_position_buffer):
17165 (last_point_position_window): Remove decls.
17166 * keyboard.c: Make these variables static.
17167
04f2d78b
CB
17168 * coding.h (coding, code_convert_region, encode_coding_gap):
17169 Remove decls.
74ab6df5
PE
17170 * coding.c (Vsjis_coding_system, Vbig5_coding_system):
17171 (iso_code_class, detect_coding, code_convert_region): Now static.
17172 (encode_coding_gap): Remove; unused.
17173
38dfbee1
PE
17174 * chartab.c (chartab_chars, chartab_bits): Now static.
17175
a2cb4e63
PE
17176 * charset.h (charset_iso_8859_1): Remove decl.
17177 * charset.c (charset_iso_8859_1, charset_emacs, map_charset_for_dump):
17178 Now static.
17179
127198fd
PE
17180 * ccl.h (check_ccl_update, Vccl_program_table): Remove decls.
17181 * ccl.c (Vccl_program_table): Now static.
17182 (check_ccl_update): Remove; unused.
17183
d85b608f
PE
17184 * category.c (SET_CATEGORY_SET, set_category_set): Move here.
17185 * category.h: ... from here.
17186 * category.c (check_category_table, set_category_set): Now static.
17187
31cd66f3
PE
17188 * casetab.c (Vascii_upcase_table, Vascii_eqv_table): Now static.
17189 * lisp.h: Remove these decls.
17190
c358e587
PE
17191 * buffer.c (buffer_count): Remove unused var.
17192
e78aecca
PE
17193 * bidi.c (bidi_dump_cached_states): Mark as externally visible,
17194 so that it's not optimized away.
17195 (bidi_ignore_explicit_marks_for_paragraph_level): Likewise.
17196 * dispextern.h (bidi_dump_cached_states): Remove, since it's
17197 exported only to the debugger.
17198
e192d7d3 17199 * atimer.c (alarm_signal_handler, run_all_atimers): Now static.
04f2d78b 17200 * atimer.h (run_all_atimers): Remove; not exported.
e192d7d3 17201
92470028
PE
17202 font.c: Make copy_font_spec and merge_font_spec ordinary C functions.
17203 * font.c (copy_font_spec): Rename from Fcopy_font_spec, since it
17204 was inaccessible from Lisp.
17205 (merge_font_spec): Likewise, renaming from Fmerge_font_spec.
17206 * font.c, font.h, fontset.c, xfaces.c, xfont.c: Change all uses.
17207
244ed907
PE
17208 alloc.c: Import and export fewer symbols, and remove unused items.
17209 * lisp.h (suppress_checking, die): Declare only if ENABLE_CHECKING
17210 is defined.
17211 (suppress_checking): Add EXTERNALLY_VISIBLE attribute, so that
17212 it's not optimized away by whole-program optimization.
17213 (message_enable_multibyte, free_misc): Remove.
17214 (catchlist, handlerlist, mark_backtrace):
17215 Declare only if BYTE_MARK_STACK.
17216 (mark_byte_stack): Likewise, fixing a ifdef-vs-if typo.
17217 * alloc.c (pure): Export only if VIRT_ADDR_VARIES is defined.
17218 (message_enable_multibyte): Remove decl.
17219 (free_misc, interval_free_list, float_block, float_block_index):
17220 (n_float_blocks, float_free_list, cons_block, cons_block_index):
17221 (cons_free_list, last_marked_index):
17222 Now static.
17223 (suppress_checking, die): Define only if ENABLE_CHECKING is defined.
17224 * eval.c (catchlist, handlerlist): Export only if BYTE_MARK_STACK.
17225 (mark_backtrace): Define only if BYTE_MARK_STACK.
17226 * xdisp.c (message_enable_multibyte): Now static.
17227
61c2b50e 17228 Declare Lisp_Object Q* variables to be 'static' if not exported.
955cbe7b
PE
17229 This makes it easier for human readers (and static analyzers)
17230 to see whether these variables are used from other modules.
17231 * alloc.c, buffer.c, bytecode.c, callint.c, casetab.c, category.c:
17232 * ccl.c, character.c, charset.c, cmds.c, coding.c, composite.c:
17233 * data.c, dbusbind.c, dired.c, editfns.c, eval.c, fileio.c, fns.c:
17234 * font.c, frame.c, fringe.c, ftfont.c, image.c, keyboard.c, keymap.c:
17235 * lread.c, macros.c, minibuf.c, print.c, process.c, search.c:
17236 * sound.c, syntax.c, textprop.c, window.c, xdisp.c, xfaces.c, xfns.c:
17237 * xmenu.c, xselect.c:
17238 Declare Q* vars static if they are not used in other modules.
17239 * ccl.h, character.h, charset.h, coding.h, composite.h, font.h:
17240 * frame.h, intervals.h, keyboard.h, lisp.h, process.h, syntax.h:
17241 Remove decls of unexported vars.
17242 * keyboard.h (EVENT_HEAD_UNMODIFIED): Remove now-unused macro.
17243
95c82688
PE
17244 * lisp.h (DEFINE_FUNC): Make sname 'static'.
17245
16a97296
PE
17246 Make Emacs functions such as Fatom 'static' by default.
17247 This makes it easier for human readers (and static analyzers)
17248 to see whether these functions can be called from other modules.
17249 DEFUN now defines a static function. To make the function external
17250 so that it can be used in other C modules, use the new macro DEFUE.
8bd7b830
PE
17251 * lisp.h (Funibyte_char_to_multibyte, Fsyntax_table_p):
17252 (Finit_image_library):
16a97296
PE
17253 (Feval_region, Fbacktrace, Ffetch_bytecode, Fswitch_to_buffer):
17254 (Ffile_executable_p, Fmake_symbolic_link, Fcommand_execute):
17255 (Fget_process, Fdocumentation_property, Fbyte_code, Ffile_attributes):
17256 Remove decls, since these functions are now static.
17257 (Funintern, Fget_internal_run_time): New decls, since these functions
17258 were already external.
95c82688 17259
16a97296
PE
17260 * alloc.c, buffer.c, callint.c, callproc.c, casefiddle.c, casetab.c:
17261 * ccl.c, character.c, chartab.c, cmds.c, coding.c, data.c, dispnew.c:
17262 * doc.c, editfns.c, emacs.c, eval.c, fileio.c, filelock.c, floatfns.c:
17263 * fns.c, font.c, fontset.c, frame.c, image.c, indent.c:
17264 * keyboard.c, keymap.c, lread.c:
17265 * macros.c, marker.c, menu.c, minibuf.c, print.c, process.c, search.c:
17266 * syntax.c, term.c, terminal.c, textprop.c, undo.c:
17267 * window.c, xdisp.c, xfaces.c, xfns.c, xmenu.c, xsettings.c:
17268 Mark functions with DEFUE instead of DEFUN,
17269 if they are used in other modules.
17270 * buffer.c (Fset_buffer_major_mode, Fdelete_overlay): New forward
17271 decls for now-static functions.
17272 * buffer.h (Fdelete_overlay): Remove decl.
17273 * callproc.c (Fgetenv_internal): Mark as internal.
17274 * composite.c (Fremove_list_of_text_properties): Remove decl.
17275 (Fcomposition_get_gstring): New forward static decl.
17276 * composite.h (Fcomposite_get_gstring): Remove decl.
17277 * dired.c (Ffile_attributes): New forward static decl.
17278 * doc.c (Fdocumntation_property): New forward static decl.
17279 * eval.c (Ffetch_bytecode): New forward static decl.
17280 (Funintern): Remove extern decl; now in .h file where it belongs.
17281 * fileio.c (Fmake_symbolic_link): New forward static decl.
17282 * image.c (Finit_image_library): New forward static decl.
17283 * insdel.c (Fcombine_after_change_execute): Make forward decl static.
17284 * intervals.h (Fprevious_property_change):
17285 (Fremove_list_of_text_properties): Remove decls.
17286 * keyboard.c (Fthis_command_keys): Remove decl.
17287 (Fcommand_execute): New forward static decl.
17288 * keymap.c (Flookup_key): New forward static decl.
17289 (Fcopy_keymap): Now static.
17290 * keymap.h (Flookup_key): Remove decl.
17291 * process.c (Fget_process): New forward static decl.
17292 (Fprocess_datagram_address): Mark as internal.
17293 * syntax.c (Fsyntax_table_p): New forward static decl.
17294 (skip_chars): Remove duplicate decl.
17295 * textprop.c (Fprevious_property_change): New forward static decl.
17296 * window.c (Fset_window_fringes, Fset_window_scroll_bars):
17297 Now internal.
17298 (Fset_window_margins, Fset_window_vscroll): New forward static decls.
17299 * window.h (Fset_window_vscroll, Fset_window_margins): Remove decls.
17300
785bbd42
PE
17301 * editfns.c (Fformat): Remove unreachable code.
17302
8b913b57
AS
173032011-04-14 Andreas Schwab <schwab@linux-m68k.org>
17304
17305 * fileio.c (Finsert_file_contents): Fix typo in 2005-05-13
17306 change. (Bug#8496)
17307
a6744a35
EZ
173082011-04-13 Eli Zaretskii <eliz@gnu.org>
17309
17310 * xdisp.c (handle_invisible_prop): Don't call bidi_paragraph_init
17311 when at ZV. (Bug#8487)
17312
e7974947
AS
173132011-04-12 Andreas Schwab <schwab@linux-m68k.org>
17314
baad03f0
AS
17315 * charset.c (Fclear_charset_maps): Use xfree instead of free.
17316 (Bug#8437)
17317 * keyboard.c (parse_tool_bar_item): Likewise.
17318 * sound.c (sound_cleanup, alsa_close): Likewise.
17319 * termcap.c (tgetent): Likewise.
17320 * xfns.c (x_default_font_parameter): Likewise.
17321 * xsettings.c (read_and_apply_settings): Likewise.
17322
e7974947
AS
17323 * alloc.c (overrun_check_malloc, overrun_check_realloc)
17324 (overrun_check_free): Protoize.
17325
28272684
PE
173262011-04-12 Paul Eggert <eggert@cs.ucla.edu>
17327
17328 * sysdep.c (emacs_read, emacs_write): Check for negative sizes
17329 since callers should never pass a negative size.
17330 Change the signature to match that of plain 'read' and 'write'; see
17331 <http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00397.html>.
17332 * lisp.h: Update prototypes of emacs_write and emacs_read.
17333
11997c76
EZ
173342011-04-11 Eli Zaretskii <eliz@gnu.org>
17335
17336 * xdisp.c (redisplay_window): Don't try to determine the character
17337 position of the scroll margin if the window start point w->startp
e896f03c 17338 is outside the buffer's accessible region. (Bug#8468)
11997c76 17339
8a2cbd72
EZ
173402011-04-10 Eli Zaretskii <eliz@gnu.org>
17341
17342 Fix write-region and its subroutines for buffers > 2GB.
17343 * fileio.c (a_write, e_write): Modify declaration of arguments and
17344 local variables to support buffers larger than 2GB.
17345 (Fcopy_file): Use EMACS_INT for return value of emacs_read.
17346
17347 * sysdep.c (emacs_write, emacs_read): Use ssize_t for last
17348 argument, local variables, and return value.
17349
17350 * lisp.h: Update prototypes of emacs_write and emacs_read.
17351
17352 * sound.c (vox_write): Use ssize_t for return value of emacs_write.
17353
4073e537 173542011-04-10 Paul Eggert <eggert@cs.ucla.edu>
eb3f1cc8 17355
1ebfdcb6
PE
17356 * xdisp.c (vmessage): Use memchr, not strnlen, which some hosts lack.
17357
b2ded58d
PE
17358 Fix more problems found by GCC 4.6.0's static checks.
17359
7d66342c
PE
17360 * xdisp.c (vmessage): Use a better test for character truncation.
17361
bbf47d44
PE
17362 * charset.c (load_charset_map): <, not <=, for optimization,
17363 and to avoid potential problems with integer overflow.
9248994d 17364 * chartab.c (sub_char_table_set_range, char_table_set_range): Likewise.
f9a68bc5 17365 * casetab.c (set_identity, shuffle): Likewise.
3ab1c7ce 17366 * editfns.c (Fformat): Likewise.
1e69125e 17367 * syntax.c (skip_chars): Likewise.
3befa583 17368
e3019616
PE
17369 * xmenu.c (set_frame_menubar): Allocate smaller local vectors.
17370 This also lets GCC 4.6.0 generate slightly better loop code.
17371
becfa255
PE
17372 * callint.c (Fcall_interactively): <, not <=, for optimization.
17373 (Fcall_interactively): Count the number of arguments produced,
17374 not the number of arguments given. This is simpler and lets GCC
17375 4.6.0 generate slightly better code.
17376
dae0cd48
PE
17377 * ftfont.c: Distingish more carefully between FcChar8 and char.
17378 The previous code passed unsigned char * to a functions like
17379 strlen and xstrcasecmp that expect char *, which does not
17380 conform to the C standard.
17381 (get_adstyle_property, ftfont_pattern_entity): Use FcChar8 for
17382 arguments to FcPatternGetString, and explicitly cast FcChar8 * to
17383 char * when the C standard requires it.
17384
76032d70
PE
17385 * keyboard.c (read_char): Remove unused var.
17386
eb3f1cc8
PE
17387 * eval.c: Port to Windows vsnprintf (Bug#8435).
17388 Include <limits.h>.
17389 (SIZE_MAX): Define if the headers do not.
17390 (verror): Do not give up if vsnprintf returns a negative count.
17391 Instead, grow the buffer. This ports to Windows vsnprintf, which
17392 does not conform to C99. Problem reported by Eli Zaretskii.
17393 Also, simplify the allocation scheme, by avoiding the need for
17394 calling realloc, and removing the ALLOCATED variable.
17395
70476b54
PE
17396 * eval.c (verror): Initial buffer size is 4000 (not 200) bytes.
17397
12020a9e
PE
17398 Remove invocations of doprnt, as Emacs now uses vsnprintf.
17399 But keep the doprint source code for now, as we might revamp it
17400 and use it again (Bug#8435).
ea6c7ae6
PE
17401 * lisp.h (doprnt): Remove.
17402 * Makefile.in (base_obj): Remove doprnt.o.
17403 * deps.mk (doprnt.o): Remove.
17404
5fdb398c
PE
17405 error: Print 32- and 64-bit integers portably (Bug#8435).
17406 Without this change, on typical 64-bit hosts error ("...%d...", N)
17407 was used to print both 32- and 64-bit integers N, which relied on
17408 undefined behavior.
61bdb816 17409 * lisp.h, m/amdx86-64.h, m/ia64.h, m/ibms390x.h (pEd): New macro.
5fdb398c
PE
17410 * lisp.h (error, verror): Mark as printf-like functions.
17411 * eval.c (verror): Use vsnprintf, not doprnt, to do the real work.
17412 Report overflow in size calculations when allocating printf buffer.
17413 Do not truncate output string at its first null byte.
17414 * xdisp.c (vmessage): Use vsnprintf, not doprnt, to do the real work.
17415 Truncate the output at a character boundary, since vsnprintf does not
17416 do that.
17417 * charset.c (check_iso_charset_parameter): Convert internal
17418 character to string before calling 'error', since %c now has the
17419 printf meaning.
17420 * coding.c (Fdecode_sjis_char, Fdecode_big5_char): Avoid int
17421 overflow when computing char to be passed to 'error'. Do not
17422 pass Lisp_Object to 'error'; pass the integer instead.
17423 * nsfns.m (Fns_do_applescript): Use int, not long, since it's
17424 formatted with plain %d.
17425
b189fa66
PE
17426 * eval.c (internal_lisp_condition_case): Don't pass spurious arg.
17427
bff87ef0
PE
17428 * keyboard.c (access_keymap_keyremap): Print func name, not garbage.
17429
7e2cac20
PE
17430 * coding.c (Fdecode_sjis_char): Don't assume CODE fits in int.
17431
ce4d90b5
PE
17432 * xterm.c (x_catch_errors): Remove duplicate declaration.
17433
266c9547
PE
17434 * term.c (maybe_fatal): Mark its 3rd arg as a printf format, too.
17435
79c49ad2
PE
17436 * xdisp.c, lisp.h (message_nolog): Remove; unused.
17437
368f4090
JM
174382011-04-10 Jim Meyering <meyering@redhat.com>
17439
17440 use ssize_t and size_t for read- and write-like emacs_gnutls_* functions
17441 * gnutls.c (emacs_gnutls_read): Adjust signature to be more read-like:
17442 return ssize_t not "int", and use size_t as the buffer length.
17443 (emacs_gnutls_write): Likewise, and make the buffer pointer "const".
17444 * gnutls.h: Update declarations.
17445 * process.c (read_process_output): Use ssize_t, to match.
17446 (send_process): Likewise.
17447
a32d4040
CY
174482011-04-09 Chong Yidong <cyd@stupidchicken.com>
17449
17450 * image.c (Fimagemagick_types): Doc fix, and comment cleanup.
17451
8546720e 174522011-04-09 Chong Yidong <cyd@stupidchicken.com>
aac0c6e3 17453
04f2d78b
CB
17454 * ftfont.c (get_adstyle_property, ftfont_pattern_entity):
17455 Use unsigned char, to match FcChar8 type definition.
aac0c6e3 17456
8546720e
GM
17457 * xterm.c (handle_one_xevent):
17458 * xmenu.c (create_and_show_popup_menu):
17459 * xselect.c (x_decline_selection_request)
17460 (x_reply_selection_request): Avoid type-punned deref of X events.
aac0c6e3 17461
0a2f5c1a 174622011-04-09 Eli Zaretskii <eliz@gnu.org>
a53e2e89
EZ
17463
17464 Fix some uses of `int' instead of EMACS_INT.
17465 * search.c (string_match_1, fast_string_match)
17466 (fast_c_string_match_ignore_case, fast_string_match_ignore_case)
17467 (scan_buffer, find_next_newline_no_quit)
17468 (find_before_next_newline, search_command, Freplace_match)
17469 (Fmatch_data): Make some `int' variables be EMACS_INT.
17470
17471 * xdisp.c (display_count_lines): 3rd argument and return value now
17472 EMACS_INT. All callers changed.
17473 (pint2hrstr): Last argument is now EMACS_INT.
17474
17475 * coding.c (detect_coding_utf_8, detect_coding_emacs_mule)
17476 (detect_coding_iso_2022, detect_coding_sjis, detect_coding_big5)
17477 (detect_coding_ccl, detect_coding_charset, decode_coding_utf_8)
17478 (decode_coding_utf_16, decode_coding_emacs_mule)
17479 (decode_coding_iso_2022, decode_coding_sjis, decode_coding_big5)
17480 (decode_coding_ccl, decode_coding_charset)
17481 <consumed_chars, consumed_chars_base>: Declare EMACS_INT.
17482 (decode_coding_iso_2022, decode_coding_emacs_mule)
17483 (decode_coding_sjis, decode_coding_big5, decode_coding_charset)
17484 <char_offset, last_offset>: Declare EMACS_INT.
17485 (encode_coding_utf_8, encode_coding_utf_16)
17486 (encode_coding_emacs_mule, encode_invocation_designation)
17487 (encode_designation_at_bol, encode_coding_iso_2022)
17488 (encode_coding_sjis, encode_coding_big5, encode_coding_ccl)
17489 (encode_coding_raw_text, encode_coding_charset) <produced_chars>:
17490 Declare EMACS_INT.
17491 (ASSURE_DESTINATION): Declare more_bytes EMACS_INT.
17492 (encode_invocation_designation): Last argument P_NCHARS is now
17493 EMACS_INT.
17494 (decode_eol): Declare pos_byte, pos, and pos_end EMACS_INT.
17495 (produce_chars): from_nchars and to_nchars are now EMACS_INT.
17496
17497 * coding.h (struct coding_system) <head_ascii>: Declare EMACS_INT.
17498 All users changed.
17499
17500 * ccl.c (Fccl_execute_on_string): Declare some variables
17501 EMACS_INT.
17502
8546720e 175032011-04-08 Samuel Thibault <sthibault@debian.org> (tiny change)
0080dc6b
SS
17504
17505 * term.c (init_tty): Fix incorrect ifdef placement (Bug#8450).
17506
4e19a977
CS
175072011-03-19 Christoph Scholtes <cschol2112@googlemail.com>
17508
17509 * process.c (Fformat_network_address): Doc fix.
17510
87302331
R
175112011-04-08 T.V. Raman <tv.raman.tv@gmail.com> (tiny change)
17512
ee7683eb 17513 * xml.c (parse_region): Avoid creating spurious whitespace nodes.
87302331 17514
cbb59342
CY
175152011-04-08 Chong Yidong <cyd@stupidchicken.com>
17516
17517 * keyboard.c (read_char): Call Lisp function help-form-show,
17518 instead of using internal_with_output_to_temp_buffer.
17519 (Qhelp_form_show): New var.
e0d38eeb 17520 (syms_of_keyboard): Use DEFSYM macro.
cbb59342
CY
17521
17522 * print.c (internal_with_output_to_temp_buffer): Function deleted.
17523
17524 * lisp.h (internal_with_output_to_temp_buffer): Remove prototype.
17525
e67a13ab
CY
175262011-04-06 Chong Yidong <cyd@stupidchicken.com>
17527
04f2d78b
CB
17528 * process.c (Flist_processes): Remove to Lisp.
17529 (list_processes_1): Delete.
e67a13ab 17530
973f782d
EZ
175312011-04-06 Eli Zaretskii <eliz@gnu.org>
17532
7c106b1e
EZ
17533 * msdos.c (careadlinkat, careadlinkatcwd): MS-DOS replacements.
17534
973f782d
EZ
17535 * w32.c (careadlinkat, careadlinkatcwd): New always-fail stubs.
17536
41cf7d1a 175372011-04-06 Paul Eggert <eggert@cs.ucla.edu>
27ccc379 17538
ca23cc88
PE
17539 Fix more problems found by GCC 4.6.0's static checks.
17540
f390e2d5
PE
17541 * xmenu.c (Fx_popup_dialog): Don't assume string is free of formats.
17542
42eea0d0
PE
17543 * menu.c (Fx_popup_menu): Don't assume error_name lacks printf formats.
17544
b69769da 17545 * lisp.h (message, message_nolog, fatal): Mark as printf-like.
1e973bc7 17546
f9541e84
PE
17547 * xdisp.c (vmessage): Mark as a printf-like function.
17548
13841b55
PE
17549 * term.c (vfatal, maybe_fatal): Mark as printf-like functions.
17550
c136c10f
PE
17551 * sound.c (sound_warning): Don't crash if arg contains a printf format.
17552
5e2d4a30
PE
17553 * image.c (tiff_error_handler, tiff_warning_handler): Mark as
17554 printf-like functions.
17555 (tiff_load): Add casts to remove these marks before passing them
17556 to system-supplied API.
17557
583f48b9
PE
17558 * eval.c (Fsignal): Remove excess argument to 'fatal'.
17559
b25d760e
PE
17560 * coding.c (EMIT_ONE_BYTE, EMIT_TWO_BYTES): Use unsigned, not int.
17561 This avoids several warnings with gcc -Wstrict-overflow.
d5efd1d1
PE
17562 (DECODE_COMPOSITION_RULE): If the rule is invalid, goto invalid_code
17563 directly, rather than having caller test rule sign. This avoids
17564 some unnecessary tests.
17565 * composite.h (COMPOSITION_ENCODE_RULE_VALID): New macro.
17566 (COMPOSITION_ENCODE_RULE): Arguments now must be valid. This
17567 affects only one use, in DECODE_COMPOSITION_RULE, which is changed.
b25d760e 17568
bc7b6697 17569 * xfont.c (xfont_text_extents): Remove var that was set but not used.
625a3eb1 17570 (xfont_open): Avoid unnecessary tests.
bc7b6697 17571
27ccc379
PE
17572 * composite.c (composition_gstring_put_cache): Use unsigned integer.
17573
dcd5c89a
PE
17574 * composite.h, composite.c (composition_gstring_put_cache):
17575 Use EMACS_INT, not int, for length.
17576
b13a45c6
PE
17577 * composite.h (COMPOSITION_DECODE_REFS): New macro,
17578 breaking out part of COMPOSITION_DECODE_RULE.
17579 (COMPOSITION_DECODE_RULE): Use it.
17580 * composite.c (get_composition_id): Remove unused local vars,
17581 by using the new macro.
17582
1e792e4d
PE
17583 * textprop.c (set_text_properties_1): Change while to do-while,
17584 since the condition is always true at first.
17585
dc6c6455 17586 * intervals.c (graft_intervals_into_buffer): Mark var as used.
aa86731f
PE
17587 (interval_deletion_adjustment): Return unsigned value.
17588 All uses changed.
dc6c6455 17589
aba7731a
PE
17590 * process.c (list_processes_1, create_pty, read_process_output):
17591 (exec_sentinel): Remove vars that were set but not used.
afd4052b 17592 (create_pty): Remove unnecessary "volatile"s.
bc57d757 17593 (Fnetwork_interface_info): Avoid possibility of int overflow.
82eaa333 17594 (read_process_output): Do adaptive read buffering even if carryover.
fe07cdfa 17595 (read_process_output): Simplify nbytes computation if buffered.
aba7731a 17596
fdfc4bf3
PE
17597 * bytecode.c (exec_byte_code): Rename local to avoid shadowing.
17598
fca8fe46 17599 * syntax.c (scan_words): Remove var that was set but not used.
12cbf13f 17600 (update_syntax_table): Use unsigned instead of int.
fca8fe46 17601
06a0259a 17602 * lread.c (lisp_file_lexically_bound_p): Use ints rather than endptrs.
3c346cc3 17603 (lisp_file_lexically_bound_p, read1): Use unsigned instead of int.
e6eb4e9e 17604 (safe_to_load_p): Make the end-of-loop test the inverse of the in-loop.
06a0259a 17605
e7b9e80f
PE
17606 * print.c (print_error_message): Avoid int overflow.
17607
56201685
PE
17608 * font.c (font_list_entities): Redo for clarity,
17609 so that reader need not know FONT_DPI_INDEX + 1 == FONT_SPACING_INDEX.
17610
78834453 17611 * font.c (font_find_for_lface, Ffont_get_glyphs): Remove unused vars.
790771b1 17612 (font_score): Avoid potential overflow in diff calculation.
78834453 17613
0bc0b309 17614 * fns.c (substring_both): Remove var that is set but not used.
8cd55cb4 17615 (sxhash): Redo loop for clarity and to avoid wraparound warning.
0bc0b309 17616
e610eaca
PE
17617 * eval.c (funcall_lambda): Rename local to avoid shadowing.
17618
b895abce
PE
17619 * alloc.c (mark_object_loop_halt, mark_object): Use size_t, not int.
17620 Otherwise, GCC 4.6.0 optimizes the loop check away since the check
17621 can always succeed if overflow has undefined behavior.
17622
1f1d9321 17623 * search.c (boyer_moore, wordify): Remove vars set but not used.
6f076cc7 17624 (wordify): Omit three unnecessary tests.
1f1d9321 17625
c59478bc
PE
17626 * indent.c (MULTIBYTE_BYTES_WIDTH): Don't compute wide_column.
17627 All callers changed. This avoids the need for an unused var.
17628
79b73827
PE
17629 * casefiddle.c (casify_region): Remove var that is set but not used.
17630
a4db5dfe
PE
17631 * dired.c (file_name_completion): Remove var that is set but not used.
17632
43aae36e
PE
17633 * fileio.c (Finsert_file_contents): Make EOF condition clearer.
17634
2a47c44d 17635 * fileio.c (Finsert_file_contents): Avoid signed integer overflow.
163c5f32 17636 (Finsert_file_contents): Remove unnecessary code checking fd.
2a47c44d 17637
a37c69bf
PE
17638 * minibuf.c (read_minibuf_noninteractive): Use size_t for sizes.
17639 Check for integer overflow on size calculations.
17640
328ab8e7
PE
17641 * buffer.c (Fprevious_overlay_change): Remove var that is set
17642 but not used.
17643
e5a2a5cb
PE
17644 * keyboard.c (menu_bar_items, read_char_minibuf_menu_prompt):
17645 Remove vars that are set but not used.
8d84a6eb 17646 (timer_check_2): Don't assume timer-list and idle-timer-list are lists.
6b043475 17647 (timer_check_2): Mark vars as initialized.
e5a2a5cb 17648
a60e5f68
PE
17649 * gtkutil.c (xg_get_file_with_chooser): Mark var as initialized.
17650
f661cb61 17651 * image.c (lookup_image): Remove var that is set but not used.
35fa624f 17652 (xbm_load): Use parse_p, for gcc -Werror=unused-but-set-variable.
f661cb61 17653
f0397f5a
PE
17654 * fontset.c (Finternal_char_font, Ffontset_info): Remove vars
17655 that are set but not used.
17656
8664db06 17657 * xfns.c (make_invisible_cursor): Don't return garbage
03733ee7 17658 if XCreateBitmapFromData fails (Bug#8410).
8664db06 17659
6abdaa4a
PE
17660 * xselect.c (x_get_local_selection, x_handle_property_notify):
17661 Remove vars that are set but not used.
17662
0ce7538d 17663 * xfns.c (x_create_tip_frame): Remove var that is set but not used.
6abdaa4a 17664 (make_invisible_cursor): Initialize a possibly-uninitialized variable.
0ce7538d 17665
9ae848fc
PE
17666 * xterm.c (x_scroll_bar_to_input_event) [!USE_GTK]:
17667 Remove var that is set but not used.
0b918413
PE
17668 (scroll_bar_windows_size): Now size_t, not int.
17669 (x_send_scroll_bar_event): Use size_t, not int, for sizes.
17670 Check for overflow.
9ae848fc 17671
a5a62657
PE
17672 * xfaces.c (realize_named_face): Remove vars that are set but not used.
17673 (map_tty_color) [!defined MSDOS]: Likewise.
17674
5c5cdd39
PE
17675 * term.c (tty_write_glyphs): Use size_t; this avoids overflow warning.
17676
66ebf983
PE
17677 * coding.c: Remove vars that are set but not used.
17678 (DECODE_COMPOSITION_RULE): Remove 2nd arg, which is unused.
17679 All callers changed.
17680 (decode_coding_utf_8, decode_coding_utf_16 decode_coding_emacs_mule):
17681 (decode_coding_iso_2022, encode_coding_sjis, encode_coding_big5):
17682 (decode_coding_charset): Remove vars that are set but not used.
17683
1be4d761
PE
17684 * bytecode.c (Fbyte_code) [!defined BYTE_CODE_SAFE]: Remove var
17685 that is set but not used.
17686
47553fa8
PE
17687 * print.c (print_object): Remove var that is set but not used.
17688
1f7196bf 17689 Replace 2 copies of readlink code with 1 gnulib version (Bug#8401).
d1fdcab7
PE
17690 The gnulib version avoids calling malloc in the usual case,
17691 and on 64-bit hosts doesn't have some arbitrary 32-bit limits.
17692 * fileio.c (Ffile_symlink_p): Use emacs_readlink.
17693 * filelock.c (current_lock_owner): Likewise.
17694 * lisp.h (READLINK_BUFSIZE, emacs_readlink): New function.
17695 * sysdep.c: Include allocator.h, careadlinkat.h.
17696 (emacs_no_realloc_allocator): New static constant.
17697 (emacs_readlink): New function.
fdb61804
PE
17698 * deps.mk (sysdep.o): Depend on ../lib/allocator.h and on
17699 ../lib/careadlinkat.h.
d1fdcab7 17700
f84c17c7
SM
177012011-04-04 Stefan Monnier <monnier@iro.umontreal.ca>
17702
17703 * keyboard.c (safe_run_hook_funcall): Fix last change (don't stop at the
17704 first non-nil return value).
17705
ef3862ad
JD
177062011-04-03 Jan Djärv <jan.h.d@swipnet.se>
17707
17708 * nsterm.m (ns_update_auto_hide_menu_bar): Define MAC_OS_X_VERSION_10_6
17709 if not defined (Bug#8403).
17710
376a7006
JB
177112011-04-02 Juanma Barranquero <lekktu@gmail.com>
17712
17713 * xdisp.c (display_count_lines): Remove parameter `start',
17714 unused since 1998-01-01T02:27:27Z!rms@gnu.org. All callers changed.
17715 (get_char_face_and_encoding): Remove parameter `multibyte_p',
17716 unused since 2008-05-14T01:40:23Z!handa@m17n.org. All callers changed.
17717 (fill_stretch_glyph_string): Remove parameters `row' and `area',
17718 unused at least since Kim's GUI unification at 2003-03-16T20:45:46Z!storm@cua.dk
17719 and thereabouts. All callers changed.
17720 (get_per_char_metric): Remove parameter `f', unused since
17721 2008-05-14T01:40:23Z!handa@m17n.org. All callers changed.
17722
6ca3801d
JM
177232011-04-02 Jim Meyering <meyering@redhat.com>
17724
17725 do not dereference NULL upon failed strdup
17726 * nsfont.m (ns_descriptor_to_entity): Use xstrdup, not strdup.
17727 (ns_get_family): Likewise.
17728
d8e2b5ba
JB
177292011-04-02 Juanma Barranquero <lekktu@gmail.com>
17730
17731 * eval.c (unwind_to_catch) [DEBUG_GCPRO]: Remove redundant assignment.
17732
8c74fcbd
JD
177332011-04-02 Jan Djärv <jan.h.d@swipnet.se>
17734
17735 * nsterm.m (ns_update_auto_hide_menu_bar): Only for OSX 10.6 or
17736 later (Bug#8403).
17737
7200d79c
SM
177382011-04-01 Stefan Monnier <monnier@iro.umontreal.ca>
17739
03408648 17740 Add lexical binding.
7200d79c 17741
03408648
SM
17742 * window.c (Ftemp_output_buffer_show): New fun.
17743 (Fsave_window_excursion):
17744 * print.c (Fwith_output_to_temp_buffer): Move to subr.el.
17745
17746 * lread.c (lisp_file_lexically_bound_p): New function.
17747 (Fload): Bind Qlexical_binding.
17748 (readevalloop): Remove `evalfun' arg.
17749 Bind Qinternal_interpreter_environment.
17750 (Feval_buffer): Bind Qlexical_binding.
17751 (defvar_int, defvar_bool, defvar_lisp_nopro, defvar_kboard):
17752 Mark as dynamic.
17753 (syms_of_lread): Declare `lexical-binding'.
17754
17755 * lisp.h (struct Lisp_Symbol): New field `declared_special'.
17756
17757 * keyboard.c (eval_dyn): New fun.
17758 (menu_item_eval_property): Use it.
ca105506
SM
17759
17760 * image.c (parse_image_spec): Use Ffunctionp.
ca105506 17761
03408648
SM
17762 * fns.c (concat, mapcar1): Accept byte-code-functions.
17763
17764 * eval.c (Fsetq): Handle lexical vars.
17765 (Fdefun, Fdefmacro, Ffunction): Make closures when needed.
17766 (Fdefconst, Fdefvaralias, Fdefvar): Mark as dynamic.
17767 (FletX, Flet): Obey lexical binding.
17768 (Fcommandp): Handle closures.
17769 (Feval): New `lexical' arg.
17770 (eval_sub): New function extracted from Feval. Use it almost
17771 everywhere where Feval was used. Look up vars in lexical env.
17772 Handle closures.
17773 (Ffunctionp): Move from subr.el.
17774 (Ffuncall): Handle closures.
17775 (apply_lambda): Remove `eval_flags'.
17776 (funcall_lambda): Handle closures and new byte-code-functions.
17777 (Fspecial_variable_p): New function.
17778 (syms_of_eval): Initialize the Vinternal_interpreter_environment var,
17779 but without exporting it to Lisp.
23aba0ea 17780
23aba0ea 17781 * doc.c (Fdocumentation, store_function_docstring):
03408648 17782 * data.c (Finteractive_form): Handle closures.
23aba0ea 17783
03408648
SM
17784 * callint.c (Fcall_interactively): Preserve lexical-binding mode for
17785 interactive spec.
ba83908c 17786
04f2d78b
CB
17787 * bytecode.c (Bstack_ref, Bstack_set, Bstack_set2, BdiscardN):
17788 New byte-codes.
03408648
SM
17789 (exec_byte_code): New function extracted from Fbyte_code to handle new
17790 calling convention for byte-code-functions. Add new byte-codes.
ba83908c 17791
03408648 17792 * buffer.c (defvar_per_buffer): Set new `declared_special' field.
e2abe5a1 17793
03408648 17794 * alloc.c (Fmake_symbol): Init new `declared_special' field.
e2abe5a1 17795
e2abce01
JB
177962011-03-31 Juanma Barranquero <lekktu@gmail.com>
17797
17798 * xdisp.c (redisplay_internal): Fix prototype.
17799
63696a73 178002011-03-31 Eli Zaretskii <eliz@gnu.org>
09725d26 17801
63696a73 17802 * xdisp.c (SCROLL_LIMIT): New macro.
04f2d78b
CB
17803 (try_scrolling): Use it when setting scroll_limit.
17804 Limit scrolling to 100 screen lines.
63696a73
EZ
17805 (redisplay_window): Even when falling back on "recentering",
17806 position point in the window according to scroll-conservatively,
17807 scroll-margin, and scroll-*-aggressively variables. (Bug#6671)
17808
17809 (try_scrolling): When point is above the window, allow searching
17810 as far as scroll_max, or one screenful, to compute vertical
17811 distance from PT to the scroll margin position. This prevents
17812 try_scrolling from unnecessarily failing when
17813 scroll-conservatively is set to a value slightly larger than the
17814 window height. Clean up the case of PT below the margin at bottom
17815 of window: scroll_max can no longer be INT_MAX. When aggressive
17816 scrolling is in use, don't let point enter the opposite scroll
17817 margin as result of the scroll.
17818 (syms_of_xdisp) <scroll-conservatively>: Document the
09725d26
EZ
17819 threshold of 100 lines for never-recentering scrolling.
17820
e4cc2dfc
JB
178212011-03-31 Juanma Barranquero <lekktu@gmail.com>
17822
17823 * dispextern.h (move_it_by_lines):
17824 * xdisp.c (move_it_by_lines): Remove parameter `need_y_p', unused
17825 since 2000-12-29T14:24:09Z!gerd@gnu.org. All callers changed.
17826 (message_log_check_duplicate): Remove parameters `prev_bol' and
17827 `this_bol', unused since 1998-01-01T02:27:27Z!rms@gnu.org. All callers changed.
17828 (redisplay_internal): Remove parameter `preserve_echo_area',
17829 unused since 1999-07-21T21:43:52Z!gerd@gnu.org. All callers changed.
17830
17831 * indent.c (Fvertical_motion):
17832 * window.c (window_scroll_pixel_based, Frecenter):
17833 Don't pass `need_y_p' to `move_it_by_lines'.
17834
1c470562
SM
178352011-03-30 Stefan Monnier <monnier@iro.umontreal.ca>
17836
44f230aa
SM
17837 * eval.c (struct backtrace): Don't cheat with negative numbers, but do
17838 steal a few bits to be more compact.
17839 (interactive_p, Fbacktrace, Fbacktrace_frame, mark_backtrace):
17840 Remove unneeded casts.
17841
1c470562
SM
17842 * bytecode.c (Fbyte_code): CAR and CDR can GC.
17843
888adce9
ZK
178442011-03-30 Zachary Kanfer <zkanfer@gmail.com> (tiny change)
17845
17846 * keyboard.c (Fexecute_extended_command): Do log the "suggest key
17847 binding" message (bug#7967).
17848
f838ed7b
PE
178492011-03-30 Paul Eggert <eggert@cs.ucla.edu>
17850
77861b95
PE
17851 Fix more problems found by GCC 4.6.0's static checks.
17852
de6dbc14
PE
17853 * unexelf.c (unexec) [! (defined _SYSTYPE_SYSV || defined __sgi)]:
17854 Remove unused local var.
17855
f838ed7b
PE
17856 * editfns.c (Fmessage_box): Remove unused local var.
17857
792c7b2b
PE
17858 * xdisp.c (try_window_reusing_current_matrix, x_produce_glyphs):
17859 (note_mode_line_or_margin_highlight, note_mouse_highlight):
17860 Omit unused local vars.
c499e557 17861 * window.c (shrink_windows): Omit unused local var.
b01a1c29 17862 * menu.c (digest_single_submenu): Omit unused local var.
0bc32927
PE
17863 * dispnew.c (update_window) [PERIODIC_PREEMPTION_CHECKING]:
17864 Omit unused local var.
17865
ba0165e1
PE
17866 * keyboard.c (parse_modifiers_uncached, parse_modifiers):
17867 Don't assume string length fits in int.
32ad8845 17868 (keyremap_step, read_key_sequence): Use size_t for sizes.
48011560 17869 (read_key_sequence): Don't check last_real_key_start redundantly.
ba0165e1 17870
3c59b4c9
PE
17871 * callproc.c (Fcall_process, Fcall_process_region): Use SAFE_ALLOCA
17872 instead of alloca (Bug#8344).
17873
a3eed478 17874 * eval.c (Fbacktrace): Don't assume nargs fits in int.
5d5d959d 17875 (Fbacktrace_frame): Don't assume nframes fits in int.
a3eed478 17876
eb4d412d
PE
17877 * syntax.c (scan_sexps_forward): Avoid pointer wraparound.
17878
1658b401
PE
17879 * xterm.c (x_make_frame_visible, same_x_server): Redo to avoid overflow
17880 concerns.
17881
17882 * term.c (produce_glyphless_glyph): Remove unnecessary test.
17883
17884 * cm.c (calccost): Turn while-do into do-while, for clarity.
44f730c8 17885
9a2c6e05
PE
17886 * keyboard.c (syms_of_keyboard): Use the same style as later
17887 in this function when indexing through an array. This also
17888 works around GCC bug 48267.
17889
03d0a109
PE
17890 * image.c (tiff_load): Fix off-by-one image count (Bug#8336).
17891
44f730c8
PE
17892 * xselect.c (x_check_property_data): Return correct size (Bug#8335).
17893
fe75f926
PE
17894 * chartab.c (sub_char_table_ref_and_range): Redo for slight
17895 efficiency gain, and to bypass a gcc -Wstrict-overflow warning.
17896
ffa8c828
PE
17897 * keyboard.c, keyboard.h (num_input_events): Now size_t.
17898 This avoids undefined behavior on integer overflow, and is a bit
17899 more convenient anyway since it is compared to a size_t variable.
17900
c5101a77
PE
17901 Variadic C functions now count arguments with size_t, not int.
17902 This avoids an unnecessary limitation on 64-bit machines, which
17903 caused (substring ...) to crash on large vectors (Bug#8344).
17904 * lisp.h (struct Lisp_Subr.function.aMANY): Now takes size_t, not int.
17905 (DEFUN_ARGS_MANY, internal_condition_case_n, safe_call): Likewise.
77861b95 17906 All variadic functions and their callers changed accordingly.
c5101a77
PE
17907 (struct gcpro.nvars): Now size_t, not int. All uses changed.
17908 * data.c (arith_driver, float_arith_driver): Likewise.
17909 * editfns.c (general_insert_function): Likewise.
17910 * eval.c (struct backtrace.nargs, interactive_p)
17911 (internal_condition_case_n, run_hook_with_args, apply_lambda)
17912 (funcall_lambda, mark_backtrace): Likewise.
17913 * fns.c (concat): Likewise.
17914 * frame.c (x_set_frame_parameters): Likewise.
17915 * fns.c (get_key_arg): Now accepts and returns size_t, and returns
17916 0 if not found, not -1. All callers changed.
17917
dd3f25f7
PE
17918 * alloc.c (garbage_collect): Don't assume stack size fits in int.
17919 (stack_copy_size): Now size_t, not int.
17920 (stack_copy, stack_copy_size): Define only if MAX_SAVE_STACK > 0.
17921
461c2ab9
JB
179222011-03-28 Juanma Barranquero <lekktu@gmail.com>
17923
17924 * coding.c (encode_designation_at_bol): Remove parameter `charbuf_end',
17925 unused since 2002-03-01T01:17:24Z!handa@m17n.org and 2008-02-01T16:01:31Z!miles@gnu.org.
17926 All callers changed.
17927
17928 * lisp.h (multibyte_char_to_unibyte):
17929 * character.c (multibyte_char_to_unibyte): Remove parameter `rev_tbl',
17930 unused since 2002-03-01T01:16:34Z!handa@m17n.org and 2008-02-01T16:01:31Z!miles@gnu.org.
17931 * character.h (CHAR_TO_BYTE8):
17932 * cmds.c (internal_self_insert):
17933 * editfns.c (general_insert_function):
17934 * keymap.c (push_key_description):
17935 * search.c (Freplace_match):
17936 * xdisp.c (message_dolog, set_message_1): All callers changed.
17937
f6d62986
SM
179382011-03-28 Stefan Monnier <monnier@iro.umontreal.ca>
17939
17940 * keyboard.c (safe_run_hook_funcall): New function.
17941 (safe_run_hooks_1, safe_run_hooks_error, safe_run_hooks): On error,
17942 don't set the hook to nil, but remove the offending function instead.
17943 (Qcommand_hook_internal): Remove, unused.
17944 (syms_of_keyboard): Don't initialize Qcommand_hook_internal nor define
17945 Vcommand_hook_internal.
17946
17947 * eval.c (enum run_hooks_condition): Remove.
17948 (funcall_nil, funcall_not): New functions.
17949 (run_hook_with_args): Call each function through a `funcall' argument.
17950 Remove `cond' argument, now redundant.
17951 (Frun_hooks, Frun_hook_with_args, Frun_hook_with_args_until_success)
17952 (Frun_hook_with_args_until_failure): Adjust accordingly.
17953 (run_hook_wrapped_funcall, Frun_hook_wrapped): New functions.
17954
1db5b1ad
JB
179552011-03-28 Juanma Barranquero <lekktu@gmail.com>
17956
17957 * dispextern.h (string_buffer_position): Remove declaration.
17958
17959 * print.c (strout): Remove parameter `multibyte', unused since
17960 1999-08-21T19:30:21Z!gerd@gnu.org. All callers changed.
17961
17962 * search.c (boyer_moore): Remove parameters `len', `pos' and `lim',
17963 never used since function introduction in 1998-02-08T21:33:56Z!rms@gnu.org.
17964 All callers changed.
17965
17966 * w32.c (_wsa_errlist): Use braces for struct initializers.
17967
17968 * xdisp.c (string_buffer_position_lim): Remove parameter `w',
17969 never used since function introduction in 2001-03-09T18:41:50Z!gerd@gnu.org.
17970 All callers changed.
17971 (string_buffer_position): Likewise. Also, make static (it's never
17972 used outside xdisp.c).
17973 (cursor_row_p): Remove parameter `w', unused since
17974 2000-10-17T16:08:57Z!gerd@gnu.org. All callers changed.
17975 (decode_mode_spec): Remove parameter `precision', introduced during
17976 Gerd Moellmann's rewrite at 1999-07-21T21:43:52Z!gerd@gnu.org, but never used.
17977 All callers changed.
17978
5ffb62aa
JD
179792011-03-27 Jan Djärv <jan.h.d@swipnet.se>
17980
17981 * nsterm.m (syms_of_nsterm): Use doc: for ns-auto-hide-menu-bar.
17982
461c2ab9 179832011-03-27 Anders Lindgren <andlind@gmail.com>
f0a1382a
JD
17984
17985 * nsterm.m (ns_menu_bar_is_hidden): New variable.
17986 (ns_constrain_all_frames, ns_menu_bar_should_be_hidden)
17987 (ns_update_auto_hide_menu_bar): New functions.
17988 (ns_update_begin): Call ns_update_auto_hide_menu_bar.
17989 (applicationDidBecomeActive): Call ns_update_auto_hide_menu_bar and
17990 ns_constrain_all_frames.
17991 (constrainFrameRect): Return at once if ns_menu_bar_should_be_hidden.
17992 (syms_of_nsterm): DEFVAR ns-auto-hide-menu-bar, init to Qnil.
17993
5c380ffb
JD
179942011-03-27 Jan Djärv <jan.h.d@swipnet.se>
17995
17996 * nsmenu.m (runDialogAt): Remove argument to timer_check.
17997
9af30bdf
GM
179982011-03-27 Glenn Morris <rgm@gnu.org>
17999
18000 * syssignal.h: Replace RETSIGTYPE with void.
18001 * atimer.c, data.c, dispnew.c, emacs.c, floatfns.c, keyboard.c:
18002 * keyboard.h, lisp.h, process.c, sysdep.c, xterm.c:
18003 Replace SIGTYPE with void everywhere.
18004 * s/usg5-4-common.h (SIGTYPE): Remove definition.
18005 * s/template.h (SIGTYPE): Remove commented out definition.
18006
e2abce01
JB
180072011-03-26 Eli Zaretskii <eliz@gnu.org>
18008
18009 * xdisp.c (redisplay_window): Don't check buffer's clip_changed
18010 flag as a prerequisite for invoking try_scrolling. (Bug#6671)
18011
f868cd8a
JB
180122011-03-26 Juanma Barranquero <lekktu@gmail.com>
18013
59eb0929
JB
18014 * w32.c (read_unc_volume): Use parameter `henum', instead of
18015 global variable `wget_enum_handle'.
18016
18017 * keymap.c (describe_vector): Remove parameters `indices' and
18018 `char_table_depth', unused since 2002-03-01T01:43:26Z!handa@m17n.org.
18019 (describe_map, Fdescribe_vector): Adjust calls to `describe_vector'.
18020
f868cd8a
JB
18021 * keyboard.h (timer_check, show_help_echo): Remove unused parameters.
18022
18023 * keyboard.c (timer_check): Remove parameter `do_it_now',
18024 unused since 1996-04-12T06:01:29Z!rms@gnu.org.
18025 (show_help_echo): Remove parameter `ok_to_overwrite_keystroke_echo',
18026 unused since 2008-04-19T19:30:53Z!monnier@iro.umontreal.ca.
18027
18028 * keyboard.c (read_char):
18029 * w32menu.c (w32_menu_display_help):
18030 * xmenu.c (show_help_event, menu_help_callback):
18031 Adjust calls to `show_help_echo'.
18032
18033 * gtkutil.c (xg_maybe_add_timer):
18034 * keyboard.c (readable_events):
18035 * process.c (wait_reading_process_output):
18036 * xmenu.c (x_menu_wait_for_event): Adjust calls to `timer_check'.
18037
18038 * insdel.c (adjust_markers_gap_motion):
18039 Remove; no-op since 1998-01-02T21:29:48Z!rms@gnu.org.
18040 (gap_left, gap_right): Don't call it.
18041
2ecf6fdb
CY
180422011-03-25 Chong Yidong <cyd@stupidchicken.com>
18043
18044 * xdisp.c (handle_fontified_prop): Discard changes to clip_changed
18045 incurred during fontification.
18046
6b1f9ba4
JB
180472011-03-25 Juanma Barranquero <lekktu@gmail.com>
18048
18049 * buffer.c (defvar_per_buffer): Remove unused parameter `doc'.
18050 (DEFVAR_PER_BUFFER): Don't pass it.
18051
18052 * dispnew.c (row_equal_p, add_row_entry): Remove unused parameter `w'.
18053 (scrolling_window): Don't pass it.
18054
0f4a96b5
JB
180552011-03-25 Juanma Barranquero <lekktu@gmail.com>
18056
18057 * dispextern.h (glyph_matric): Use #if GLYPH_DEBUG, not #ifdef.
18058
18059 * fileio.c (check_executable) [DOS_NT]: Remove unused variables `len'
18060 and `suffix'.
18061 (Fset_file_selinux_context) [HAVE_LIBSELINUX]: Move here declaration
18062 of variables specific to SELinux and computation of `encoded_absname'.
18063
18064 * image.c (XPutPixel): Remove unused variable `height'.
18065
18066 * keyboard.c (make_lispy_event): Remove unused variable `hpos'.
18067
18068 * unexw32.c (get_section_info): Remove unused variable `section'.
18069
18070 * w32.c (stat): Remove unused variables `drive_root' and `devtype'.
18071 (system_process_attributes): Remove unused variable `sess'.
18072 (sys_read): Remove unused variable `err'.
18073
18074 * w32fns.c (top): Wrap variables with #if GLYPH_DEBUG, not #ifdef.
18075 (w32_wnd_proc): Remove unused variable `isdead'.
18076 (unwind_create_frame): Use #if GLYPH_DEBUG, not #ifdef.
18077 (Fx_server_max_request_size): Remove unused variable `dpyinfo'.
18078 (x_create_tip_frame): Remove unused variable `tem'.
18079
18080 * w32inevt.c (w32_console_read_socket):
18081 Remove unused variable `no_events'.
18082
18083 * w32term.c (x_draw_composite_glyph_string_foreground):
18084 Remove unused variable `width'.
18085
1149507c
JB
180862011-03-24 Juanma Barranquero <lekktu@gmail.com>
18087
18088 * w32term.c (x_set_glyph_string_clipping):
18089 Don't pass uninitialized region to CombineRgn.
18090
9c88f339
JB
180912011-03-23 Juanma Barranquero <lekktu@gmail.com>
18092
18093 * w32fns.c (x_set_menu_bar_lines): Remove unused variable `olines'.
18094 (w32_wnd_proc): Pass NULL to Windows API, not uninitialized buffer.
18095 (Fx_close_connection): Remove unused variable `i'.
18096
18097 * w32font.c (w32font_draw): Return number of glyphs.
18098 (w32font_open_internal): Remove unused variable `i'.
18099 (w32font_driver): Add missing initializer.
18100
18101 * w32menu.c (utf8to16): Remove unused variable `utf16'.
18102 (fill_in_menu): Remove unused variable `items_added'.
18103
18104 * w32term.c (last_mouse_press_frame): Remove static global variable.
18105 (w32_clip_to_row): Remove unused variable `f'.
18106 (x_delete_terminal): Remove unused variable `i'.
18107
18108 * w32uniscribe.c (uniscribe_shape): Remove unused variable `nclusters'.
18109 (NOTHING): Remove unused static global variable.
18110 (uniscribe_check_otf): Remove unused variable `table'.
18111 (uniscribe_font_driver): Add missing initializers.
18112
dee091a3
JD
181132011-03-23 Julien Danjou <julien@danjou.info>
18114
18115 * term.c (Fsuspend_tty, Fresume_tty):
18116 * minibuf.c (read_minibuf, run_exit_minibuf_hook):
18117 * window.c (temp_output_buffer_show):
18118 * insdel.c (signal_before_change):
18119 * frame.c (Fhandle_switch_frame):
18120 * fileio.c (Fdo_auto_save):
18121 * emacs.c (Fkill_emacs):
18122 * editfns.c (save_excursion_restore):
18123 * cmds.c (internal_self_insert):
18124 * callint.c (Fcall_interactively):
18125 * buffer.c (Fkill_all_local_variables):
18126 * keyboard.c (Fcommand_execute, Fsuspend_emacs, safe_run_hooks_1):
18127 Use Frun_hooks.
0f4a96b5 18128 (command_loop_1): Use Frun_hooks. Call safe_run_hooks
e9fce1ac 18129 unconditionally since it does the check itself.
dee091a3 18130
2c520ab5 181312011-03-23 Paul Eggert <eggert@cs.ucla.edu>
f0641eff 18132
c9c49752
PE
18133 Fix more problems found by GCC 4.5.2's static checks.
18134
8abc3f12
PE
18135 * coding.c (encode_coding_raw_text): Avoid unnecessary test
18136 the first time through the loop, since we know p0 < p1 then.
18137 This also avoids a gcc -Wstrict-overflow warning.
18138
a2d26660
PE
18139 * lisp.h (SAFE_ALLOCA, SAFE_ALLOCA_LISP): Avoid 'int' overflow
18140 leading to a memory leak, possible in functions like
18141 load_charset_map_from_file that can allocate an unbounded number
b12ef411 18142 of objects (Bug#8318).
a2d26660 18143
916c72e9
PE
18144 * xmenu.c (set_frame_menubar): Use EMACS_UINT, not int, for indexes
18145 that could (at least in theory) be that large.
18146
19ab8a18
PE
18147 * xdisp.c (message_log_check_duplicate): Return unsigned long, not int.
18148 This is less likely to overflow, and avoids undefined behavior if
18149 overflow does occur. All callers changed. Use strtoul to scan
18150 for the unsigned long integer.
b7cbbd6f
PE
18151 (pint2hrstr): Simplify and tune code slightly.
18152 This also avoids a (bogus) GCC warning with gcc -Wstrict-overflow.
19ab8a18 18153
f0641eff
PE
18154 * scroll.c (do_scrolling): Work around GCC bug 48228.
18155 See <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48228>.
18156
7f650bb9
PE
18157 * frame.c (Fmodify_frame_parameters): Simplify loop counter.
18158 This also avoids a warning with gcc -Wstrict-overflow.
39f5e519
PE
18159 (validate_x_resource_name): Simplify count usage.
18160 This also avoids a warning with gcc -Wstrict-overflow.
7f650bb9 18161
37dd57d1
PE
18162 * fileio.c (Fcopy_file): Report error if fchown or fchmod
18163 fail (Bug#8306).
81e56e61 18164
699979fc 18165 * emacs.c (Fdaemon_initialized): Do not ignore I/O errors (Bug#8303).
dc1ca6a8 18166
401bf9b4
PE
18167 * process.c (Fmake_network_process): Use socklen_t, not int,
18168 where POSIX says socklen_t is required in portable programs.
18169 This fixes a porting bug on hosts like 64-bit HP-UX, where
591b2973 18170 socklen_t is wider than int (Bug#8277).
401bf9b4
PE
18171 (Fmake_network_process, server_accept_connection):
18172 (wait_reading_process_output, read_process_output):
18173 Likewise.
18174
b93aacde
PE
18175 * process.c: Rename or move locals to avoid shadowing.
18176 (list_processes_1, Fmake_network_process):
18177 (read_process_output_error_handler, exec_sentinel_error_handler):
18178 Rename or move locals.
4dc343ee 18179 (Fmake_network_process): Define label "retry_connect" only if needed.
0da49335 18180 (Fnetwork_interface_info): Fix pointer signedness.
f990b4e5 18181 (process_send_signal): Add cast to avoid pointer signedness problem.
7b808126 18182 (FIRST_PROC_DESC, IF_NON_BLOCKING_CONNECT): Remove unused macros.
c939f91b 18183 (create_process): Use 'volatile' to avoid vfork clobbering (Bug#8298).
b93aacde 18184
af8a867c 18185 Make tparam.h and terminfo.c consistent.
44f230aa
SM
18186 * cm.c (tputs, tgoto, BC, UP): Remove extern decls.
18187 Include tparam.h instead, since it declares them.
af8a867c
PE
18188 * cm.h (PC): Remove extern decl; tparam.h now does this.
18189 * deps.mk (cm.o, terminfo.o): Depend on tparam.h.
18190 * terminfo.c: Include tparam.h, to check interfaces.
18191 (tparm): Make 1st arg a const pointer in decl. Put it at top level.
18192 (tparam): Adjust signature to match interface in tparam.h;
18193 this removes some undefined behavior. Check that outstring and len
18194 are zero, which they always are with Emacs.
18195 * tparam.h (PC, BC, UP): New extern decls.
18196
0248044d 18197 * xftfont.c (xftfont_shape): Now static, and defined only if needed.
001a7ab4 18198 (xftfont_open): Rename locals to avoid shadowing.
0248044d 18199
8ff096c1 18200 * ftfont.c (ftfont_resolve_generic_family): Fix pointer signedness.
a00924bb
PE
18201 (ftfont_otf_capability, ftfont_shape): Omit decls if not needed.
18202 (OTF_TAG_SYM): Omit macro if not needed.
e932860f 18203 (ftfont_list): Remove unused local.
49eaafba
PE
18204 (get_adstyle_property, ftfont_pattern_entity):
18205 (ftfont_lookup_cache, ftfont_open, ftfont_anchor_point):
18206 Rename locals to avoid shadowing.
8ff096c1 18207
e2be39f6
PE
18208 * xfont.c (xfont_list_family): Mark var as initialized.
18209
c9735e30
PE
18210 * xml.c (make_dom): Now static.
18211
8f5201ae
PE
18212 * composite.c (composition_compute_stop_pos): Rename local to
18213 avoid shadowing.
b246f932
PE
18214 (composition_reseat_it): Remove unused locals.
18215 (find_automatic_composition, composition_adjust_point): Likewise.
80e079b2 18216 (composition_update_it): Mark var as initialized.
11b61122
PE
18217 (find_automatic_composition): Mark vars as initialized,
18218 with a FIXME (Bug#8290).
8f5201ae 18219
760fbc2c
PE
18220 character.h: Rename locals to avoid shadowing.
18221 * character.h (PREV_CHAR_BOUNDARY, FETCH_STRING_CHAR_ADVANCE):
18222 (FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE, FETCH_CHAR_ADVANCE):
18223 (FETCH_CHAR_ADVANCE_NO_CHECK, INC_POS, DEC_POS, BUF_INC_POS):
18224 (BUF_DEC_POS): Be more systematic about renaming local temporaries
18225 to avoid shadowing.
18226
ff08eb85
PE
18227 * textprop.c (property_change_between_p): Remove; unused.
18228
fc7bf025
PE
18229 * intervals.c (interval_start_pos): Now static.
18230
235d7abc
PE
18231 * intervals.h (CHECK_TOTAL_LENGTH): Avoid empty "else".
18232
44f230aa
SM
18233 * atimer.c (start_atimer, append_atimer_lists, set_alarm):
18234 Rename locals to avoid shadowing.
3e7d6594 18235
50060332
PE
18236 * sound.c (wav_play, au_play, Fplay_sound_internal):
18237 Fix pointer signedness.
d01f234b 18238 (alsa_choose_format): Remove unused local var.
c83b8872
PE
18239 (wav_play): Initialize a variable to 0, to prevent undefined
18240 behavior (Bug#8278).
50060332 18241
c4fc4e30
PE
18242 * region-cache.c (insert_cache_boundary): Redo var to avoid shadowing.
18243
918436ed
PE
18244 * region-cache.h (pp_cache): New decl, for gcc -Wmissing-prototypes.
18245
c939f91b
PE
18246 * callproc.c (Fcall_process): Use 'volatile' to avoid vfork
18247 clobbering (Bug#8298).
b9c7f648
PE
18248 * sysdep.c (sys_subshell): Likewise.
18249 Previously, the sys_subshell 'volatile' was incorrectly IF_LINTted out.
7e9123a2 18250
6bd8c144
PE
18251 * lisp.h (child_setup): Now NO_RETURN unless DOS_NT.
18252 This should get cleaned up, so that child_setup has the
18253 same signature on all platforms.
18254
7710357c 18255 * callproc.c (call_process_cleanup): Now static.
cb1d0ef7 18256 (relocate_fd): Rename locals to avoid shadowing.
7710357c 18257
c59da222
CY
182582011-03-22 Chong Yidong <cyd@stupidchicken.com>
18259
18260 * xterm.c (x_clear_frame): Remove XClearWindow call. This appears
18261 not to be necessary, and produces flickering.
18262
66b87493
GM
182632011-03-20 Glenn Morris <rgm@gnu.org>
18264
18265 * config.in: Remove file.
18266
45b6f6d5
JB
182672011-03-20 Juanma Barranquero <lekktu@gmail.com>
18268
18269 * minibuf.c (Vcompleting_read_function): Don't declare, global variables
18270 are now in src/globals.h.
18271 (syms_of_minibuf): Remove spurious & from previous change.
18272
cd394be1 182732011-03-20 Leo Liu <sdl.web@gmail.com>
3ec03f7e
LL
18274
18275 * minibuf.c (completing-read-function): New variable.
18276 (completing-read-default): Rename from completing-read.
18277 (completing-read): Call completing-read-function.
18278
b14e3e21
CY
182792011-03-19 Juanma Barranquero <lekktu@gmail.com>
18280
18281 * xfaces.c (Fx_load_color_file):
18282 Read color file from absolute filename (bug#8250).
18283
f2b726e6
JB
182842011-03-19 Juanma Barranquero <lekktu@gmail.com>
18285
18286 * makefile.w32-in: Update dependencies.
18287
09f6ff02
EZ
182882011-03-17 Eli Zaretskii <eliz@gnu.org>
18289
18290 * makefile.w32-in ($(BLD)/unexw32.$(O)): Depend on $(SRC)/unexec.h.
18291
29a6015a
PE
182922011-03-17 Paul Eggert <eggert@cs.ucla.edu>
18293
a3a6c54e
PE
18294 Fix more problems found by GCC 4.5.2's static checks.
18295
b766f867
PE
18296 * process.c (make_serial_process_unwind, send_process_trap):
18297 (sigchld_handler): Now static.
18298
be02381c
PE
18299 * process.c (allocate_pty): Let PTY_ITERATION declare iteration vars.
18300 That way, the code declares only the vars that it needs.
18301 * s/aix4-2.h (PTY_ITERATION): Declare iteration vars.
18302 * s/cygwin.h (PTY_ITERATION): Likewise.
18303 * s/darwin.h (PTY_ITERATION): Likewise.
18304 * s/gnu-linux.h (PTY_ITERATION): Likewise.
18305
57048744
PE
18306 * s/irix6-5.h (PTY_OPEN): Declare stb, to loosen coupling.
18307 * process.c (allocate_pty): Don't declare stb unless it's needed.
18308
7914961c 18309 * bytecode.c (MAYBE_GC): Rewrite so as not to use empty "else".
615f2d59
PE
18310 (CONSTANTLIM): Remove; unused.
18311 (METER_CODE, Bscan_buffer, Bread_char, Bset_mark):
18312 Define only if needed.
7914961c 18313
b3967b18
PE
18314 * unexelf.c (unexec): Name an expression,
18315 to avoid gcc -Wbad-function-cast warning.
9ae71512
PE
18316 Use a different way to cause a compilation error if anyone uses
18317 n rather than nn, a way that does not involve shadowing.
73366a00 18318 (ELF_BSS_SECTION_NAME, OLD_PROGRAM_H): Remove; unused.
b3967b18 18319
29a6015a
PE
18320 * deps.mk (unexalpha.o): Remove; unused.
18321
43cfc33e 18322 New file unexec.h, the (simple) interface for unexec (Bug#8267).
7feda0d2 18323 * unexec.h: New file.
ce701a33
PE
18324 * deps.mk (emacs.o, unexaix.o, unexcw.o, unexcoff.o, unexelf.o):
18325 (unexhp9k800.o, unexmacosx.o, unexsol.o, unexw32.o):
18326 Depend on unexec.h.
18327 * emacs.c [!defined CANNOT_DUMP]: Include unexec.h.
18328 * unexaix.c, unexcoff.c, unexcw.c, unexelf.c, unexhp9k800.c:
18329 * unexmacosx.c, unexsol.c, unexw32.c: Include unexec.h.
381259ef 18330 Change as necessary to match prototype in unexec.h.
ce701a33 18331
01f44d5a
PE
18332 * syntax.c (Fforward_comment, scan_lists): Rename locals to avoid
18333 shadowing.
4f63c6bb 18334 (back_comment, skip_chars): Mark vars as initialized.
01f44d5a 18335
a6670b0b
PE
18336 * character.h (FETCH_STRING_CHAR_ADVANCE_NO_CHECK, BUF_INC_POS):
18337 Rename locals to avoid shadowing.
18338
cef2010d 18339 * lread.c (read1): Rewrite so as not to use empty "else".
0902fe45 18340 (Fload, readevalloop, read1): Rename locals to avoid shadowing.
cef2010d 18341
d4d7173a
PE
18342 * print.c (Fredirect_debugging_output): Fix pointer signedess.
18343
f08b802a
PE
18344 * lisp.h (debug_output_compilation_hack): Add decl here, to avoid
18345 warning when compiling print.c.
18346
3ddb0639
PE
18347 * font.c (font_unparse_fcname): Abort in an "impossible" situation
18348 instead of using an uninitialized var.
5ad03b97 18349 (font_sort_entities): Mark var as initialized.
3ddb0639 18350
170a2692
PE
18351 * character.h (FETCH_CHAR_ADVANCE): Rename locals to avoid shadowing.
18352
e663c700
PE
18353 * font.c (font_unparse_xlfd): Don't mix pointers to variables with
18354 pointers to constants.
89bc529a 18355 (font_parse_fcname): Remove unused vars.
7b81e2d0 18356 (font_delete_unmatched): Now static.
ea838e10 18357 (font_get_spec): Remove; unused.
13a547c6
PE
18358 (font_style_to_value, font_prop_validate_style, font_unparse_fcname):
18359 (font_update_drivers, Ffont_get_glyphs, font_add_log):
18360 Rename or move locals to avoid shadowing.
e663c700 18361
2a80c887 18362 * fns.c (require_nesting_list, require_unwind): Now static.
612f56df 18363 (Ffillarray): Rename locals to avoid shadowing.
2a80c887 18364
1384fa33 18365 * floatfns.c (domain_error2): Define only if needed.
a885e2ed 18366 (Ffrexp, Fldexp): Rename locals to avoid shadowing.
1384fa33 18367
8b2c52e9
PE
18368 * alloc.c (mark_backtrace): Move decl from here ...
18369 * lisp.h: ... to here, so that it can be checked.
18370
475545b5 18371 * eval.c (call_debugger, do_debug_on_call, grow_specpdl): Now static.
d28a2170 18372 (Fdefvar): Rewrite so as not to use empty "else".
cfcbfb1a
PE
18373 (lisp_indirect_variable): Name an expression,
18374 to avoid gcc -Wbad-function-cast warning.
1faed8ae 18375 (Fdefvar): Rename locals to avoid shadowing.
475545b5 18376
b1349114 18377 * callint.c (quotify_arg, quotify_args): Now static.
a3e8cbda 18378 (Fcall_interactively): Rename locals to avoid shadowing.
b0e80955 18379 Use const pointer when appropriate.
b1349114 18380
a2928364
PE
18381 * lisp.h (get_system_name, get_operating_system_release):
18382 Move decls here, to check interfaces.
18383 * process.c (get_operating_system_release): Move decl to lisp.h.
18384 * xrdb.c (get_system_name): Likewise.
63c5d10b
PE
18385 * editfns.c (init_editfns, Fuser_login_name, Fuser_uid):
18386 (Fuser_real_uid, Fuser_full_name): Remove unnecessary casts,
18387 some of which prompt warnings from gcc -Wbad-function-cast.
545b49b4
PE
18388 (Fformat_time_string, Fencode_time, Finsert_char):
18389 (Ftranslate_region_internal, Fformat):
18390 Rename or remove local vars to avoid shadowing.
9710023e 18391 (Ftranslate_region_internal): Mark var as initialized.
63c5d10b 18392
a415e694
PE
18393 * doc.c (Fdocumentation, Fsnarf_documentation): Move locals to
18394 avoid shadowing.
18395
8ef4622d
PE
18396 * lisp.h (eassert): Check that the argument compiles, even if
18397 ENABLE_CHECKING is not defined.
18398
946f9a5b
PE
18399 * data.c (Findirect_variable): Name an expression, to avoid
18400 gcc -Wbad-function-cast warning.
112396d6 18401 (default_value, arithcompare, arith_driver, arith_error): Now static.
b9b84fa9 18402 (store_symval_forwarding): Rename local to avoid shadowing.
44f230aa
SM
18403 (Fmake_variable_buffer_local, Fmake_local_variable):
18404 Mark variables as initialized.
52746918 18405 (do_blv_forwarding, do_symval_forwarding): Remove; unused.
946f9a5b 18406
e5aab7e7 18407 * alloc.c (check_cons_list): Do not define unless GC_CHECK_CONS_LIST.
ae35e756
PE
18408 (Fmake_vector, Fvector, Fmake_byte_code, Fgarbage_collect):
18409 Rename locals to avoid shadowing.
dff45157
PE
18410 (mark_stack): Move local variables into the #ifdef region where
18411 they're used.
7bc26fdb
PE
18412 (BLOCK_INPUT_ALLOC, UNBLOCK_INPUT_ALLOC): Define only if
18413 ! defined SYSTEM_MALLOC && ! defined SYNC_INPUT, as they are not
18414 needed otherwise.
18415 (CHECK_ALLOCATED): Define only if GC_CHECK_MARKED_OBJECTS.
18416 (GC_STRING_CHARS): Remove; not used.
d40d4be1 18417 (Fmemory_limit): Cast sbrk's returned value to char *.
ae35e756 18418
e5aab7e7
PE
18419 * lisp.h (check_cons_list): Declare if GC_CHECK_CONS_LIST; this
18420 avoids undefined behavior in theory.
18421
4da60324
PE
18422 * regex.c (IF_LINT): Add defn, for benefit of ../lib-src.
18423
88043301
PE
18424 Use functions, not macros, for up- and down-casing (Bug#8254).
18425 * buffer.h (DOWNCASE_TABLE, UPCASE_TABLE, DOWNCASE, UPPERCASEP):
18426 (NOCASEP, LOWERCASEP, UPCASE, UPCASE1): Remove. All callers changed
18427 to use the following functions instead of these macros.
18428 (downcase): Adjust to lack of DOWNCASE_TABLE. Return int, not
18429 EMACS_INT, since callers assume the returned value fits in int.
18430 (upcase1): Likewise, for UPCASE_TABLE.
18431 (uppercasep, lowercasep, upcase): New static inline functions.
0da09c43 18432 * editfns.c (Fchar_equal): Remove no-longer-needed workaround for
db69b0cd 18433 the race-condition problem in the old DOWNCASE.
88043301 18434
19ed5445
PE
18435 * regex.c (CHARSET_LOOKUP_RANGE_TABLE_RAW, POP_FAILURE_REG_OR_COUNT):
18436 Rename locals to avoid shadowing.
18437 (regex_compile, re_match_2_internal): Move locals to avoid shadowing.
abbd1bcf
PE
18438 (regex_compile, re_search_2, re_match_2_internal):
18439 Remove unused local vars.
952db0d7
PE
18440 (FREE_VAR): Rewrite so as not to use empty "else",
18441 which gcc can warn about.
da053e48 18442 (regex_compile, re_match_2_internal): Mark locals as initialized.
b313f9d8
PE
18443 (RETALLOC_IF): Define only if needed.
18444 (WORDCHAR_P): Likewise. This one is never needed, but is used
18445 only in a comment talking about a compiler bug, so put inside
18446 the #if 0 of that comment.
18447 (CHARSET_LOOKUP_BITMAP, FAIL_STACK_FULL, RESET_FAIL_STACK):
18448 (PUSH_FAILURE_ELT, BUF_PUSH_3, STOP_ADDR_VSTRING):
18449 Remove; unused.
19ed5445 18450
1f3561e4 18451 * search.c (boyer_moore): Rename locals to avoid shadowing.
76ef09b7
PE
18452 * character.h (FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE):
18453 (PREV_CHAR_BOUNDARY): Likewise.
1f3561e4 18454
ded6f8f7
PE
18455 * search.c (simple_search): Remove unused var.
18456
dbd37a95
PE
18457 * dired.c (compile_pattern): Move decl from here ...
18458 * lisp.h: ... to here, so that it can be checked.
18459 (struct re_registers): New forward decl.
18460
7e47afad
PE
18461 * character.h (INC_POS, DEC_POS): Rename locals to avoid shadowing.
18462
85f24f61
PE
18463 * indent.c (MULTIBYTE_BYTES_WIDTH): New args bytes, width.
18464 All uses changed.
18465 (MULTIBYTE_BYTES_WIDTH, scan_for_column, compute_motion):
18466 Rename locals to avoid shadowing.
5671df8f 18467 (Fvertical_motion): Mark locals as initialized.
85f24f61 18468
181aa2be 18469 * casefiddle.c (casify_object, casify_region): Now static.
e45a141a 18470 (casify_region): Mark local as initialized.
181aa2be 18471
930d429c
PE
18472 * cmds.c (internal_self_insert): Rename local to avoid shadowing.
18473
7082eac6
PE
18474 * lisp.h (GCPRO2_VAR, GCPRO3_VAR, GCPRO4_VAR, GCPRO5_VAR, GCPRO6_VAR):
18475 New macros, so that the caller can use some names other than
18476 gcpro1, gcpro2, etc.
18477 (GCPRO2, GCPRO3, GCPRO4, GCPRO5, GCPRO6): Reimplement in terms
18478 of the new macros.
18479 (GCPRO1_VAR, UNGCPRO_VAR): Change the meaning of the second
18480 argument, for consistency with GCPRO2_VAR, etc: it is now the
18481 prefix of the variable, not the variable itself. All uses
18482 changed.
38b2c076
PE
18483 * dired.c (directory_files_internal, file_name_completion):
18484 Rename locals to avoid shadowing.
18485
15206ed9
PE
18486 Fix a race condition diagnosed by gcc -Wsequence-point (Bug#8254).
18487 An expression of the form (DOWNCASE (x) == DOWNCASE (y)), found in
18488 dired.c's scmp function, had undefined behavior.
18489 * lisp.h (DOWNCASE_TABLE, UPCASE_TABLE, DOWNCASE, UPPERCASEP):
18490 (NOCASEP, LOWERCASEP, UPCASE, UPCASE1): Move from here ...
18491 * buffer.h: ... to here, because these macros use current_buffer,
18492 and the new implementation with inline functions needs to have
18493 current_buffer in scope now, rather than later when the macros
18494 are used.
18495 (downcase, upcase1): New static inline functions.
18496 (DOWNCASE, UPCASE1): Reimplement using these functions.
18497 This avoids undefined behavior in expressions like
18498 DOWNCASE (x) == DOWNCASE (y), which previously suffered
18499 from race conditions in accessing the global variables
18500 case_temp1 and case_temp2.
18501 * casetab.c (case_temp1, case_temp2): Remove; no longer needed.
18502 * lisp.h (case_temp1, case_temp2): Remove their decls.
18503 * character.h (ASCII_CHAR_P): Move from here ...
18504 * lisp.h: ... to here, so that the inline functions mentioned
18505 above can use them.
18506
4a6bea26
PE
18507 * dired.c (directory_files_internal_unwind): Now static.
18508
f14b7e14
PE
18509 * fileio.c (file_name_as_directory, directory_file_name):
18510 (barf_or_query_if_file_exists, auto_save_error, auto_save_1):
18511 Now static.
2893f146
PE
18512 (file_name_as_directory): Use const pointers when appropriate.
18513 (Fexpand_file_name): Likewise. In particular, newdir might
18514 point at constant storage, so make it a const pointer.
fd4ead52 18515 (Fmake_directory_internal, Fread_file_name): Remove unused vars.
b14aac08
PE
18516 (Ffile_selinux_context, Fset_file_selinux_context): Fix pointer
18517 signedness issues.
f839df0c
PE
18518 (Fset_file_times, Finsert_file_contents, auto_save_error):
18519 Rename locals to avoid shadowing.
f14b7e14 18520
5716756e 18521 * minibuf.c (choose_minibuf_frame_1): Now static.
62137a95
PE
18522 (Ftry_completion, Fall_completions): Rename or remove locals
18523 to avoid shadowing.
5716756e 18524
b4c3046a
PE
18525 * marker.c (bytepos_to_charpos): Remove; unused.
18526
b45db522
PE
18527 * lisp.h (verify_bytepos, count_markers): New decls,
18528 so that gcc does not warn that these functions aren't declared.
18529
85876d07
PE
18530 * insdel.c (check_markers, make_gap_larger, make_gap_smaller):
18531 (reset_var_on_error, Fcombine_after_change_execute_1): Now static.
f0cb4a60 18532 (CHECK_MARKERS): Redo to avoid gcc -Wempty-body diagnostic.
40ef059e 18533 (copy_text): Remove unused local var.
85876d07 18534
03d78a21 18535 * filelock.c (within_one_second): Now static.
b3dd38ab 18536 (lock_file_1): Rename local to avoid shadowing.
03d78a21 18537
5df8f01b
PE
18538 * buffer.c (fix_overlays_before): Mark locals as initialized.
18539 (fix_start_end_in_overlays): Likewise. This function should be
18540 simplified by using pointers-to-pointers, but that's a different
18541 matter.
b1d876f1 18542 (switch_to_buffer_1): Now static.
8f54f30a
PE
18543 (Fkill_buffer, record_buffer, Fbury_buffer, Fset_buffer_multibyte):
18544 (report_overlay_modification): Rename locals to avoid shadowing.
c3bd59b5 18545
a70072c9 18546 * sysdep.c (system_process_attributes): Rename vars to avoid shadowing.
fbd02d7b 18547 Fix pointer signedness issue.
edced198
PE
18548 (sys_subshell): Mark local as volatile if checking for lint,
18549 to suppress a gcc -Wclobbered warning that does not seem to be right.
15dfd3d9 18550 (MAXPATHLEN): Define only if needed.
a70072c9 18551
a0977c44
PE
18552 * process.c (serial_open, serial_configure): Move decls from here ...
18553 * systty.h: ... to here, so that they can be checked.
18554
a884fdcc
PE
18555 * fns.c (get_random, seed_random): Move extern decls from here ...
18556 * lisp.h: ... to here, so that they can be checked.
18557
604efe86 18558 * sysdep.c (reset_io): Now static.
b8950c94 18559 (wait_for_termination_signal): Remove; unused.
604efe86 18560
38fc62d9
PE
18561 * keymap.c (keymap_parent, keymap_memberp, map_keymap_internal):
18562 (copy_keymap_item, append_key, push_text_char_description):
18563 Now static.
1004a21a 18564 (Fwhere_is_internal): Don't test CONSP (sequences) unnecessarily.
dbbb8427 18565 (DENSE_TABLE_SIZE): Remove; unused.
c1141155
PE
18566 (get_keymap, access_keymap, Fdefine_key, Fwhere_is_internal):
18567 (describe_map_tree):
18568 Rename locals to avoid shadowing.
38fc62d9 18569
2f2650da
PE
18570 * keyboard.c: Declare functions static if they are not used elsewhere.
18571 (echo_char, echo_dash, cmd_error, top_level_2):
18572 (poll_for_input, handle_async_input): Now static.
69a058fa
PE
18573 (read_char, kbd_buffer_get_event, make_lispy_position):
18574 (make_lispy_event, make_lispy_movement, apply_modifiers):
18575 (decode_keyboard_code, tty_read_avail_input, menu_bar_items):
18576 (parse_tool_bar_item, read_key_sequence, Fread_key_sequence):
18577 (Fread_key_sequence_vector): Rename locals to avoid shadowing.
c8a06054 18578 (read_key_sequence, read_char): Mark locals as initialized.
3ac94672 18579 (Fexit_recursive_edit, Fabort_recursive_edit): Mark with NO_RETURN.
2f2650da 18580
a053e86c 18581 * keyboard.h (make_ctrl_char): New decl.
da2f2dd9
PE
18582 (mark_kboards): Move decl here ...
18583 * alloc.c (mark_kboards): ... from here.
a053e86c 18584
4752793e
PE
18585 * lisp.h (force_auto_save_soon): New decl.
18586
74f10ca7 18587 * emacs.c (init_cmdargs): Rename local to avoid shadowing.
244fc23d
PE
18588 (DEFINE_DUMMY_FUNCTION): New macro.
18589 (__do_global_ctors, __do_global_ctors_aux, __do_global_dtors, __main):
18590 Use it.
c03cd23f
PE
18591 (main): Add casts to avoid warnings
18592 if GCC considers string literals to be constants.
74f10ca7 18593
022e70d4
PE
18594 * lisp.h (fatal_error_signal): Add decl, since it's exported.
18595
59d6fe83
PE
18596 * dbusbind.c: Pointer signedness fixes.
18597 (xd_signature, xd_append_arg, xd_initialize):
18598 (Fdbus_call_method, Fdbus_call_method_asynchronously):
18599 (Fdbus_method_return_internal, Fdbus_method_error_internal):
18600 (Fdbus_send_signal, xd_read_message_1, Fdbus_register_service):
18601 (Fdbus_register_signal): Use SSDATA when the context wants char *.
18602
78320123
PE
18603 * dbusbind.c (Fdbus_init_bus): Add cast to avoid warning
18604 if GCC considers string literals to be constants.
49cebcca 18605 (Fdbus_register_service, Fdbus_register_method): Remove unused vars.
78320123 18606
35ac2a97
SM
186072011-03-16 Stefan Monnier <monnier@iro.umontreal.ca>
18608
fb103ca9
SM
18609 * print.c (PRINT_CIRCLE_CANDIDATE_P): New macro.
18610 (print_preprocess, print_object): New macro to fix last change.
18611
35ac2a97
SM
18612 * print.c (print_preprocess): Don't forget font objects.
18613
62973b41
JB
186142011-03-16 Juanma Barranquero <lekktu@gmail.com>
18615
18616 * emacs.c (USAGE3): Doc fixes.
18617
0e48bb22
AS
186182011-03-15 Andreas Schwab <schwab@linux-m68k.org>
18619
18620 * coding.c (detect_coding_iso_2022): Reorganize code to clarify
18621 structure.
18622
7684e57b
JB
186232011-03-14 Juanma Barranquero <lekktu@gmail.com>
18624
18625 * lisp.h (VWindow_system, Qfile_name_history):
18626 * keyboard.h (lispy_function_keys) [WINDOWSNT]:
18627 * w32term.h (w32_system_caret_hwnd, w32_system_caret_height)
18628 (w32_system_caret_x, w32_system_caret_y): Declare extern.
18629
18630 * w32select.c: Don't #include "keyboard.h".
c96bbc66 18631 (run_protected): Add extern declaration for waiting_for_input.
7684e57b
JB
18632
18633 * w32.c (Qlocal, noninteractive1, inhibit_window_system):
18634 * w32console.c (detect_input_pending, read_input_pending)
18635 (encode_terminal_code):
18636 * w32fns.c (quit_char, lispy_function_keys, Qtooltip)
18637 (w32_system_caret_hwnd, w32_system_caret_height, w32_system_caret_x)
18638 (w32_system_caret_y, Qfile_name_history):
18639 * w32font.c (w32font_driver, QCantialias, QCotf, QClang):
18640 * w32inevt.c (reinvoke_input_signal, lispy_function_keys):
18641 * w32menu.c (Qmenu_bar, QCtoggle, QCradio, Qoverriding_local_map)
18642 (Qoverriding_terminal_local_map, Qmenu_bar_update_hook):
18643 * w32proc.c (Qlocal, report_file_error):
18644 * w32term.c (Vwindow_system, updating_frame):
18645 * w32uniscribe.c (initialized, uniscribe_font_driver):
18646 Remove unneeded extern declarations.
18647
2aa46d6c
CY
186482011-03-14 Chong Yidong <cyd@stupidchicken.com>
18649
c96bbc66 18650 * buffer.c (Fmake_indirect_buffer): Fix incorrect assertions.
2aa46d6c 18651
cffc6f3b
CY
186522011-03-13 Chong Yidong <cyd@stupidchicken.com>
18653
18654 * buffer.h (BUF_BEGV, BUF_BEGV_BYTE, BUF_ZV, BUF_ZV_BYTE, BUF_PT)
18655 (BUF_PT_BYTE): Rewrite to handle indirect buffers (Bug#8219).
18656 These macros can no longer be used for assignment.
18657
44f230aa
SM
18658 * buffer.c (Fget_buffer_create, Fmake_indirect_buffer):
18659 Assign struct members directly, instead of using BUF_BEGV etc.
cffc6f3b
CY
18660 (record_buffer_markers, fetch_buffer_markers): New functions for
18661 recording and fetching special buffer markers.
18662 (set_buffer_internal_1, set_buffer_temp): Use them.
18663
18664 * lread.c (unreadchar): Use SET_BUF_PT_BOTH.
18665
18666 * insdel.c (adjust_point): Use SET_BUF_PT_BOTH.
18667
18668 * intervals.c (temp_set_point_both): Use SET_BUF_PT_BOTH.
18669 (get_local_map): Use SET_BUF_BEGV_BOTH and SET_BUF_ZV_BOTH.
18670
18671 * xdisp.c (hscroll_window_tree):
18672 (reconsider_clip_changes): Use PT instead of BUF_PT.
18673
d251f04b
EZ
186742011-03-13 Eli Zaretskii <eliz@gnu.org>
18675
18676 * makefile.w32-in ($(BLD)/editfns.$(O)): Depend on
18677 $(EMACS_ROOT)/lib/intprops.h.
18678
f0c77cd1
PE
186792011-03-13 Paul Eggert <eggert@cs.ucla.edu>
18680
3eca4629
PE
18681 Fix more problems found by GCC 4.5.2's static checks.
18682
7c86ee98
PE
18683 * gtkutil.c (xg_get_pixbuf_from_pixmap): Add cast from char *
18684 to unsigned char * to avoid compiler diagnostic.
b0afc268
PE
18685 (xg_free_frame_widgets): Make it clear that a local variable is
18686 needed only if USE_GTK_TOOLTIP.
01e0b5ad
PE
18687 (gdk_window_get_screen): Make it clear that this macro is needed
18688 only if USE_GTK_TOOLTIP.
1e5524e7
PE
18689 (int_gtk_range_get_value): New function, which avoids a diagnostic
18690 from gcc -Wbad-function-cast.
18691 (xg_set_toolkit_scroll_bar_thumb): Use it.
18692 (xg_tool_bar_callback, xg_tool_item_stale_p): Rewrite to avoid
18693 diagnostic from gcc -Wbad-function-cast.
65dc836c
PE
18694 (get_utf8_string, xg_get_file_with_chooser):
18695 Rename locals to avoid shadowing.
18696 (create_dialog): Move locals to avoid shadowing.
7c86ee98 18697
41729b81
PE
18698 * xgselect.c (xg_select): Remove unused var.
18699
f0c77cd1
PE
18700 * image.c (four_corners_best): Mark locals as initialized.
18701 (gif_load): Initialize transparent_p to zero (Bug#8238).
18702 Mark another local as initialized.
ec6cf4c6 18703 (my_png_error, my_error_exit): Mark with NO_RETURN.
f0c77cd1 18704
ce0ad53d 18705 * image.c (clear_image_cache): Now static.
d5d5a617 18706 (DIM, HAVE_STDLIB_H_1): Remove unused macros.
e22cffbc 18707 (xpm_load): Redo to avoid "discards qualifiers" gcc warning.
77a765fd
PE
18708 (x_edge_detection): Remove unnecessary cast that
18709 gcc -Wbad-function-cast diagnoses.
2037898d 18710 (gif_load): Fix pointer signedness.
6ae141d6
PE
18711 (clear_image_cache, xbm_read_bitmap_data, x_detect_edges):
18712 (jpeg_load, gif_load): Rename locals to avoid shadowing.
ce0ad53d 18713
33383987 187142011-03-12 Paul Eggert <eggert@cs.ucla.edu>
3eca4629 18715
d32df629
PE
18716 Improve quality of tests for time stamp overflow.
18717 For example, without this patch (encode-time 0 0 0 1 1
18718 1152921504606846976) returns the obviously-bogus value (-948597
18719 62170) on my RHEL 5.5 x86-64 host. With the patch, it correctly
18720 reports time overflow. See
18721 <http://lists.gnu.org/archive/html/emacs-devel/2011-03/msg00470.html>.
b8d9bd41
PE
18722 * deps.mk (editfns.o): Depend on ../lib/intprops.h.
18723 * editfns.c: Include limits.h and intprops.h.
18724 (TIME_T_MIN, TIME_T_MAX): New macros.
18725 (time_overflow): Move earlier, to before first use.
18726 (hi_time, lo_time): New functions, for an accurate test for
18727 out-of-range times.
18728 (Fcurrent_time, Fget_internal_run_time, make_time): Use them.
18729 (Fget_internal_run_time): Don't assume time_t fits in int.
18730 (make_time): Use list2 instead of Fcons twice.
18731 (Fdecode_time): More accurate test for out-of-range times.
18732 (check_tm_member): New function.
18733 (Fencode_time): Use it, to test for out-of-range times.
d32df629
PE
18734 (lisp_time_argument): Don't rely on undefined left-shift and
18735 right-shift behavior when checking for time stamp overflow.
8be6f318 18736
fe31d94c
PE
18737 * editfns.c (time_overflow): New function, refactoring common code.
18738 (Fformat_time_string, Fdecode_time, Fencode_time):
18739 (Fcurrent_time_string): Use it.
18740
8be6f318
PE
18741 Move 'make_time' to be next to its inverse 'lisp_time_argument'.
18742 * dired.c (make_time): Move to ...
18743 * editfns.c (make_time): ... here.
18744 * systime.h: Note the move.
18745
09d9db2c 187462011-03-12 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
c47cbdfd 18747
126bc0dc
YM
18748 * fringe.c (update_window_fringes): Remove unused variables.
18749
c47cbdfd
YM
18750 * unexmacosx.c (copy_data_segment): Also copy __got section.
18751 (Bug#8223)
18752
7ac80be9
EZ
187532011-03-12 Eli Zaretskii <eliz@gnu.org>
18754
c96bbc66 18755 * termcap.c [MSDOS]: Include "msdos.h".
058e5dad
EZ
18756 (find_capability, tgetnum, tgetflag, tgetstr, tputs, tgetent):
18757 Constify `char *' arguments and their references according to
18758 prototypes in tparam.h.
18759
ecb0f94d 18760 * deps.mk (termcap.o): Depend on tparam.h and msdos.h.
058e5dad 18761
7ac80be9
EZ
18762 * msdos.c (XMenuAddPane): 3rd argument is `const char *' now.
18763 Adapt all references accordingly.
18764
18765 * msdos.h (XMenuAddPane): 3rd argument is `const char *' now.
18766
ef1fd07e
TT
187672011-03-11 Tom Tromey <tromey@redhat.com>
18768
18769 * buffer.c (syms_of_buffer): Remove obsolete comment.
18770
7ef4b50c
EZ
187712011-03-11 Eli Zaretskii <eliz@gnu.org>
18772
18773 * termhooks.h (encode_terminal_code): Declare prototype.
18774
18775 * msdos.c (encode_terminal_code): Don't declare prototype.
18776
18777 * term.c (encode_terminal_code): Now external again, used by
18778 w32console.c and msdos.c.
18779
44f230aa
SM
18780 * makefile.w32-in ($(BLD)/term.$(O), ($(BLD)/tparam.$(O)):
18781 Depend on $(SRC)/tparam.h, see 2011-03-11T07:24:21Z!eggert@cs.ucla.edu.
7ef4b50c 18782
4b1ec863 187832011-03-11 Paul Eggert <eggert@cs.ucla.edu>
f78faa98 18784
1714f52b 18785 Fix some minor problems found by GCC 4.5.2's static checks.
83316bf4 18786
4b1ec863
PE
18787 * fringe.c (update_window_fringes): Mark locals as initialized
18788 (Bug#8227).
18789 (destroy_fringe_bitmap, init_fringe_bitmap): Now static.
bf60f616 18790
524c7aa6
PE
18791 * alloc.c (mark_fringe_data): Move decl from here ...
18792 * lisp.h (mark_fringe_data) [HAVE_WINDOW_SYSTEM]: ... to here,
18793 to check its interface.
18794 (init_fringe_once): Do not declare unless HAVE_WINDOW_SYSTEM.
18795
a5c0af81 18796 * fontset.c (free_realized_fontset): Now static.
7519b8cd 18797 (Fset_fontset_font): Rename local to avoid shadowing.
cc6e5db1 18798 (fontset_font): Mark local as initialized.
a9a06e0b 18799 (FONTSET_SPEC, FONTSET_REPERTORY, RFONT_DEF_REPERTORY): Remove; unused.
a5c0af81 18800
b4716021
PE
18801 * xrdb.c: Include "xterm.h", to check x_load_resources's interface.
18802
811e9bac 18803 * xselect.c (x_disown_buffer_selections): Remove; not used.
7b83e2f1 18804 (TRACE3) [!defined TRACE_SELECTION]: Remove; not used.
aa0daa9f
PE
18805 (x_own_selection, Fx_disown_selection_internal): Rename locals
18806 to avoid shadowing.
18807 (x_handle_dnd_message): Remove local to avoid shadowing.
811e9bac 18808
7e3ab302
PE
18809 * lisp.h (GCPRO1_VAR, UNGCPRO_VAR): New macros,
18810 so that the caller can use some name other than gcpro1.
18811 (GCPRO1, UNGCPRO): Reimplement in terms of the new macros.
58d2d479
PE
18812 * xfns.c (Fx_create_frame, x_create_tip_frame, Fx_show_tip):
18813 (Fx_backspace_delete_keys_p):
18814 Use them to avoid shadowing, and rename vars to avoid shadowing.
18815 (x_decode_color, x_set_name, x_window): Now static.
6b437900 18816 (Fx_create_frame): Add braces to silence GCC warning.
c0951e53 18817 (Fx_file_dialog, Fx_select_font): Fix pointer signedness.
06b0c8a0
PE
18818 (x_real_positions, xg_set_icon_from_xpm_data, x_create_tip_frame):
18819 Remove unused locals.
7e3ab302
PE
18820 (Fx_create_frame, x_create_tip_frame, Fx_show_tip):
18821 (Fx_backspace_delete_keys_p): Rename locals to avoid shadowing.
18822 Some of these renamings use the new GCPRO1_VAR and UNGCPRO_VAR
18823 macros.
f78faa98 18824
e2b13473
PE
18825 * xterm.h (x_mouse_leave): New decl.
18826
77f23912
PE
18827 * xterm.c (x_copy_dpy_color, x_focus_on_frame, x_unfocus_frame):
18828 Remove unused functions.
cdf4ba58
PE
18829 (x_shift_glyphs_for_insert, XTflash, XTring_bell):
18830 (x_calc_absolute_position): Now static.
7411c686 18831 (XTread_socket): Don't define label "out" unless it's used.
2b07bcff 18832 Don't declare local "event" unless it's used.
ed7bf3a5
PE
18833 (x_iconify_frame, x_free_frame_resources): Don't declare locals
18834 unless they are used.
38d0b34a
PE
18835 (XEMBED_VERSION, xembed_set_info): Don't define unless needed.
18836 (x_fatal_error_signal): Remove; not used.
a6067996
PE
18837 (x_draw_image_foreground, redo_mouse_highlight, XTmouse_position):
18838 (x_scroll_bar_report_motion, handle_one_xevent, x_draw_bar_cursor):
18839 (x_error_catcher, x_connection_closed, x_error_handler):
18840 (x_error_quitter, xembed_send_message, x_iconify_frame):
18841 (my_log_handler): Rename locals to avoid shadowing.
28f1c698 18842 (x_delete_glyphs, x_ins_del_lines): Mark with NO_RETURN.
2a8fade0 18843 (x_connection_closed): Tell GCC not to suggest NO_RETURN.
77f23912 18844
44f230aa
SM
18845 * xfaces.c (clear_face_cache, Fx_list_fonts, Fface_font):
18846 Rename or move locals to avoid shadowing.
6b463e58 18847 (tty_defined_color, merge_face_heights): Now static.
5967d051 18848 (free_realized_faces_for_fontset): Remove; not used.
1e9966ea
PE
18849 (Fx_list_fonts): Mark variable that gcc -Wuninitialized
18850 does not deduce is never used uninitialized.
73719eba
PE
18851 (STRDUPA, LSTRDUPA, FONT_POINT_SIZE_QUANTUM): Remove; not used.
18852 (LFACEP): Define only if XASSERTS, as it's not needed otherwise.
071048a3 18853
426994c3 18854 * terminal.c (store_terminal_param): Now static.
5489860b 18855
032f1620 18856 * xmenu.c (menu_highlight_callback): Now static.
9d66f88e 18857 (set_frame_menubar): Remove unused local.
d4323972 18858 (xmenu_show): Rename parameter to avoid shadowing.
6d1f7fee
PE
18859 (xmenu_show, xdialog_show, xmenu_show): Make local pointers "const"
18860 since they might point to immutable storage.
281585b0
PE
18861 (next_menubar_widget_id): Declare only if USE_X_TOOLKIT,
18862 since it's unused otherwise.
032f1620 18863
367c19e5 18864 * xdisp.c (produce_glyphless_glyph): Initialize lower_xoff.
53df7c11 18865 Add a FIXME, since the code still doesn't look right. (Bug#8215)
9f36b9fd
PE
18866 (Fcurrent_bidi_paragraph_direction): Simplify slightly; this
18867 avoids a gcc -Wuninitialized diagnostic.
0e086e8f 18868 (display_line, BUILD_COMPOSITE_GLYPH_STRING, draw_glyphs):
44a3a108
PE
18869 (note_mouse_highlight): Mark variables that gcc -Wuninitialized
18870 does not deduce are never used uninitialized.
70739cbe 18871
07b48fa9
PE
18872 * lisp.h (IF_LINT): New macro, copied from ../lib-src/emacsclient.c.
18873
8868a238 18874 * xdisp.c (redisplay_window): Rename local to avoid shadowing.
4554d213
PE
18875 * window.c (window_loop, size_window):
18876 (run_window_configuration_change_hook, enlarge_window): Likewise.
8868a238 18877
7e5cf297 18878 * window.c (display_buffer): Now static.
d6550a9f
PE
18879 (size_window): Mark variables that gcc -Wuninitialized
18880 does not deduce are never used uninitialized.
a586633d
PE
18881 * window.h (check_all_windows): New decl, to forestall
18882 gcc -Wmissing-prototypes diagnostic.
5b555da1 18883 * dispextern.h (bidi_dump_cached_states): Likewise.
7e5cf297 18884
f6095868
PE
18885 * charset.h (CHECK_CHARSET_GET_CHARSET): Rename locals to avoid
18886 shadowing.
18887 * charset.c (map_charset_for_dump, Fchar_charset): Likewise.
726929c4
PE
18888 Include <limits.h>.
18889 (Fsort_charsets): Redo min/max calculation to shorten the code a bit
18890 and to avoid gcc -Wuninitialized warning.
89ef49df
PE
18891 (load_charset_map): Mark variables that gcc -Wuninitialized
18892 does not deduce are never used uninitialized.
53df7c11 18893 (load_charset): Abort instead of using uninitialized var (Bug#8229).
f6095868 18894
f38b440c
PE
18895 * coding.c (coding_set_source, coding_set_destination):
18896 Use "else { /* comment */ }" rather than "else /* comment */;"
18897 for clarity, and to avoid gcc -Wempty-body warning.
2735d060
PE
18898 (Fdefine_coding_system_internal): Don't redeclare 'i' inside
18899 a block, when the outer 'i' will do.
18900 (decode_coding_utf_8, decode_coding_utf_16, detect_coding_emacs_mule):
18901 (emacs_mule_char, decode_coding_emacs_mule, detect_coding_iso_2022):
18902 (decode_coding_iso_2022, decode_coding_sjis, decode_coding_big5):
18903 (decode_coding_raw_text, decode_coding_charset, get_translation_table):
18904 (Fdecode_sjis_char, Fdefine_coding_system_internal):
18905 Rename locals to avoid shadowing.
18906 * character.h (FETCH_STRING_CHAR_ADVANCE): Likewise.
e2f1bab9
PE
18907 * coding.c (emacs_mule_char, encode_invocation_designation):
18908 Now static, since they're not used elsewhere.
413bb2db 18909 (decode_coding_iso_2022): Add "default: abort ();" as a safety check.
c4a63b12 18910 (decode_coding_object, encode_coding_object, detect_coding_system):
ee05f961
PE
18911 (decode_coding_emacs_mule): Mark variables that gcc
18912 -Wuninitialized does not deduce are never used uninitialized.
160b01f6
PE
18913 (detect_coding_iso_2022): Initialize a local variable that might
18914 be used uninitialized. Leave a FIXME because it's not clear that
53df7c11 18915 this initialization is needed. (Bug#8211)
5f58e762
PE
18916 (ISO_CODE_LF, ISO_CODE_CR, CODING_ISO_FLAG_EUC_TW_SHIFT):
18917 (ONE_MORE_BYTE_NO_CHECK, UTF_BOM, UTF_16_INVALID_P):
18918 (SHIFT_OUT_OK, ENCODE_CONTROL_SEQUENCE_INTRODUCER):
18919 (ENCODE_DIRECTION_R2L, ENCODE_DIRECTION_L2R):
18920 Remove unused macros.
f38b440c 18921
232b38b9 18922 * category.c (hash_get_category_set): Remove unused local var.
9f3b5e69 18923 (copy_category_table): Now static, since it's not used elsewhere.
d0891610 18924 * character.c (string_count_byte8): Likewise.
232b38b9 18925
fb90da1b
PE
18926 * ccl.c (CCL_WRITE_STRING, CCL_ENCODE_CHAR, Fccl_execute_on_string):
18927 (Fregister_code_conversion_map): Rename locals to avoid shadowing.
18928
fb93dbc2
PE
18929 * chartab.c (copy_sub_char_table): Now static, since it's not used
18930 elsewhere.
5c156ace
PE
18931 (sub_char_table_ref_and_range, char_table_ref_and_range):
18932 Rename locals to avoid shadowing.
bbcd0949 18933 (ASET_RANGE, GET_SUB_CHAR_TABLE): Remove unused macros.
fb93dbc2 18934
7d3b3862 18935 * bidi.c (bidi_check_type): Now static, since it's not used elsewhere.
630d6892 18936 (BIDI_BOB): Remove unused macro.
7d3b3862 18937
6be7d3da
PE
18938 * cm.c (cmgoto): Mark variables that gcc -Wuninitialized does not
18939 deduce are never used uninitialized.
c2ed9c8b 18940 * term.c (encode_terminal_code): Likewise.
6be7d3da 18941
75f8807f 18942 * term.c (encode_terminal_code): Now static. Remove unused local.
72abad34 18943
50938595
PE
18944 * tparam.h: New file.
18945 * term.c, tparam.h: Include it.
18946 * deps.mk (term.o, tparam.o): Depend on tparam.h.
18947 * term.c (tputs, tgetent, tgetflag, tgetnum, tparam, tgetstr):
18948 Move these decls to tparam.h, and make them agree with what
18949 is actually in tparam.c. The previous trick of using incompatible
18950 decls in different modules does not conform to the C standard.
18951 All callers of tparam changed to use tparam's actual API.
18952 * tparam.c (tparam1, tparam, tgoto):
18953 Use const pointers where appropriate.
18954
fbceeba2
PE
18955 * cm.c (calccost, cmgoto): Use const pointers where appropriate.
18956 * cm.h (struct cm): Likewise.
18957 * dispextern.h (do_line_insertion_deletion_costs): Likewise.
18958 * scroll.c (ins_del_costs, do_line_insertion_deletion_costs): Likewise.
18959 * term.c (tty_ins_del_lines, calculate_costs, struct fkey_table):
18960 (term_get_fkeys_1, append_glyphless_glyph, produce_glyphless_glyph):
18961 (turn_on_face, init_tty): Likewise.
18962 * termchar.h (struct tty_display_info): Likewise.
fbceeba2 18963
7f3f1250
PE
18964 * term.c (term_mouse_position): Rename local to avoid shadowing.
18965
e6ca6543
PE
18966 * alloc.c (mark_ttys): Move decl from here ...
18967 * lisp.h (mark_ttys): ... to here, so that it's checked against defn.
18968
c40f8d15
AS
189692011-03-11 Andreas Schwab <schwab@linux-m68k.org>
18970
18971 * .gdbinit (pwinx, xbuffer): Fix access to buffer name.
18972
cfe0661d
JB
189732011-03-09 Juanma Barranquero <lekktu@gmail.com>
18974
18975 * search.c (compile_pattern_1): Remove argument regp, unused since
18976 revid:rms@gnu.org-19941211082627-3x1g1wyqkjmwloig.
18977 (compile_pattern): Don't pass it.
18978
0afb4571
J
189792011-03-08 Jan Djärv <jan.h.d@swipnet.se>
18980
18981 * xterm.h (DEFAULT_GDK_DISPLAY): New define.
18982 (GDK_WINDOW_XID, gtk_widget_get_preferred_size): New defines
18983 for ! HAVE_GTK3.
18984 (GTK_WIDGET_TO_X_WIN): Use GDK_WINDOW_XID.
18985
18986 * xmenu.c (menu_position_func): Call gtk_widget_get_preferred_size.
18987
18988 * gtkutil.c: Include gtkx.h if HAVE_GTK3. If ! HAVE_GTK3, define
18989 gdk_window_get_screen, gdk_window_get_geometry,
18990 gdk_x11_window_lookup_for_display and GDK_KEY_g.
18991 (xg_set_screen): Use DEFAULT_GDK_DISPLAY.
18992 (xg_get_pixbuf_from_pixmap): New function.
18993 (xg_get_pixbuf_from_pix_and_mask): Change parameters from GdkPixmap
18994 to Pixmap, take frame as parameter, remove GdkColormap parameter.
18995 Call xg_get_pixbuf_from_pixmap instead of
18996 gdk_pixbuf_get_from_drawable.
18997 (xg_get_image_for_pixmap): Do not make GdkPixmaps, call
18998 xg_get_pixbuf_from_pix_and_mask with Pixmap parameters instead.
18999 (xg_check_special_colors): Use GtkStyleContext and its functions
19000 for HAVE_GTK3.
19001 (xg_prepare_tooltip, xg_hide_tooltip): Call gdk_window_get_screen.
19002 (xg_prepare_tooltip, create_dialog, menubar_map_cb)
19003 (xg_update_frame_menubar, xg_tool_bar_detach_callback)
44f230aa
SM
19004 (xg_tool_bar_attach_callback, xg_update_tool_bar_sizes):
19005 Call gtk_widget_get_preferred_size.
0afb4571
J
19006 (xg_frame_resized): gdk_window_get_geometry only takes 5
19007 parameters.
44f230aa
SM
19008 (xg_win_to_widget, xg_event_is_for_menubar):
19009 Call gdk_x11_window_lookup_for_display.
0afb4571
J
19010 (xg_set_widget_bg): New function.
19011 (delete_cb): New function.
895009e1 19012 (xg_create_frame_widgets): Connect delete-event to delete_cb.
5c32d3f2 19013 Call xg_set_widget_bg. Only set background pixmap for ! HAVE_GTK3
0afb4571
J
19014 (xg_set_background_color): Call xg_set_widget_bg.
19015 (xg_set_frame_icon): Call xg_get_pixbuf_from_pix_and_mask.
19016 (xg_create_scroll_bar): vadj is a GtkAdjustment for HAVE_GTK3.
19017 Only call gtk_range_set_update_policy if ! HAVE_GTK3.
19018 (xg_make_tool_item): Only connect xg_tool_bar_item_expose_callback
19019 if ! HAVE_GTK3.
19020 (update_frame_tool_bar): Call gtk_widget_hide.
19021 (xg_initialize): Use GDK_KEY_g.
19022
19023 * xsmfns.c (gdk_set_sm_client_id): Define to gdk_set_sm_client_id
19024 if ! HAVE_GTK3
19025 (x_session_initialize): Call gdk_x11_set_sm_client_id.
19026
19027 * xterm.c (XFillRectangle): Use cairo routines for HAVE_GTK3.
19028 (x_term_init): Disable Xinput(2) with GDK_CORE_DEVICE_EVENTS.
19029 Load ~/emacs.d/gtkrc only for ! HAVE_GTK3.
19030
1c2cc4ef
JB
190312011-03-08 Juanma Barranquero <lekktu@gmail.com>
19032
19033 * w32xfns.c (select_palette): Check success of RealizePalette against
19034 GDI_ERROR, not zero.
19035
33383987 19036See ChangeLog.11 for earlier changes.
aac0c6e3
MR
19037
19038;; Local Variables:
19039;; coding: utf-8
aac0c6e3
MR
19040;; End:
19041
2f097256 19042 Copyright (C) 2011-2012 Free Software Foundation, Inc.
aac0c6e3
MR
19043
19044 This file is part of GNU Emacs.
19045
19046 GNU Emacs is free software: you can redistribute it and/or modify
19047 it under the terms of the GNU General Public License as published by
19048 the Free Software Foundation, either version 3 of the License, or
19049 (at your option) any later version.
19050
19051 GNU Emacs is distributed in the hope that it will be useful,
19052 but WITHOUT ANY WARRANTY; without even the implied warranty of
19053 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19054 GNU General Public License for more details.
19055
19056 You should have received a copy of the GNU General Public License
19057 along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.