* doc/emacs/mini.texi (Repetition): Further copyedit.
[bpt/emacs.git] / src / ChangeLog
CommitLineData
fcf14875
EZ
12012-10-17 Eli Zaretskii <eliz@gnu.org>
2
3 * cygw32.c (Fcygwin_convert_path_to_windows)
4 (Fcygwin_convert_path_from_windows): Use EQ to compare 2
5 Lisp_Object values. (Bug#12661)
6
7 * w32fns.c (w32_msg_pump): Use XIL instead of casting an integer
8 to Lisp_Object. (Bug#12661)
9
fe0b1ec4
KH
102012-10-17 Kenichi Handa <handa@gnu.org>
11
12 * xdisp.c (reseat_1): Make the information stored in it->cmp_it
13 invalidate.
14
d556ebf9
DA
152012-10-17 Dmitry Antipov <dmantipov@yandex.ru>
16
17 * buffer.c (Fkill_buffer): When unchaining the marker,
1f9f395d 18 reset its buffer pointer to NULL (Bug#12652).
d556ebf9 19
f0863a54
DA
202012-10-17 Dmitry Antipov <dmantipov@yandex.ru>
21
22 Do not verify indirection counters of killed buffers (Bug#12579).
23 * buffer.h (BUFFER_CHECK_INDIRECTION): New macro.
24 * buffer.c (compact_buffer, set_buffer_internal_1): Use it.
25
12fbe755
DA
262012-10-16 Dmitry Antipov <dmantipov@yandex.ru>
27
28 * alloc.c (Fmake_byte_code): Fix typo in comment.
29 * print.c (print_interval): Define as static to match prototype.
30 * indent.c (disptab_matches_widthtab, recompute_width_table):
31 Convert to eassert.
32
61655b89
DA
332012-10-16 Dmitry Antipov <dmantipov@yandex.ru>
34
35 * editfns.c (get_system_name): Remove.
36 * lisp.h (get_system_name): Remove prototype.
37 * xrdb.c (getenv, getpwuid, getpwnam): Remove prototypes.
38 (get_environ_db): Use Vsystem_name. Avoid call to strlen.
39
9520f2f2
DC
402012-10-15 Daniel Colascione <dancol@dancol.org>
41
42 * dbusbind.c: Add comment explaining reason for previous change.
43
dca778d5
MR
442012-10-15 Martin Rudalics <rudalics@gmx.at>
45
46 * window.c (Fwindow_end): Rewrite check whether cached position
47 can be used (Bug#12600).
48 (resize_frame_windows, grow_mini_window, shrink_mini_window):
49 Set windows_or_buffers_changed.
50
3e0341b0
DC
512012-10-15 Daniel Colascione <dancol@dancol.org>
52
53 * dbusbind.c: Fix cygw32 build break when compiling with dbus
54 enabled by undefining the symbol "interface", which the platform
55 headers define to something incompatible.
56
33d4113c
DC
572012-10-14 Daniel Colascione <dancol@dancol.org>
58
59 * image.c (init_tiff_functions, init_imagemagick_functions)
60 (init_svg_functions): Fix cygw32 build break by using these
61 functions only when WINDOWSNT _and_ HAVE_NTGUI.
62
a36fb15e
JD
632012-10-14 Jan Djärv <jan.h.d@swipnet.se>
64
65 * nsterm.m (ns_select): Count fd:s in writefs also (Bug#12422).
66
537f336d
JD
672012-10-13 Jan Djärv <jan.h.d@swipnet.se>
68
69 * gtkutil.c (xg_set_widget_bg): Divide by 65535 (Bug#12612).
70
0ba06a77
KH
712012-10-13 HANATAKA, Shinya <bogytech@gmail.com> (tiny change)
72
73 * coding.c (detect_coding): Set coding->id before calling
74 this->detector.
75
ce2fe65a
AS
762012-10-13 Andreas Schwab <schwab@linux-m68k.org>
77
78 * fileio.c: Formatting fixes.
79
d6453ce4
PE
802012-10-13 Paul Eggert <eggert@cs.ucla.edu>
81
82 Fix some stat-related races.
83 * fileio.c (Fwrite_region): Avoid race condition if a file is
84 removed or renamed by some other process immediately after Emacs
85 writes it but before Emacs stats it. Do not assume that stat (or
86 fstat) succeeds.
87 * image.c (slurp_file): Resolve the file name with fopen + fstat
88 rather than stat + fopen.
89 (pbm_read_file) [0]: Remove unused code with stat race.
90 * process.c (allocate_pty) [HAVE_PTYS && !PTY_ITERATION && !PTY_OPEN]:
91 Remove ineffective code with stat race.
92
06485aa8
SM
932012-10-12 Stefan Monnier <monnier@iro.umontreal.ca>
94
95 * doc.c (get_doc_string): Don't signal an error if the file is missing.
96
167e3640
JD
972012-10-12 Jan Djärv <jan.h.d@swipnet.se>
98
99 * nsterm.m (hold_event_q): New static variable.
100 (EV_TRAILER, sendScrollEventAtLoc:fromEvent:): Call hold_event if
101 ! q_event_ptr.
102 (hold_event): New function.
103 (ns_read_socket): If hold_event_q have events, store them and
104 return (Bug#12384).
105 (setPosition:portion:whole:): Send SIGIO to ourselves if apploopnr
106 is zero (Bug#12384).
107
c40239df
JB
1082012-10-12 Juanma Barranquero <lekktu@gmail.com>
109
110 * makefile.w32-in ($(BLD)/w32select.$(O)): Update dependencies.
111
bb385a92
EZ
1122012-10-12 Eli Zaretskii <eliz@gnu.org>
113
2a9f1099
EZ
114 * makefile.w32-in ($(BLD)/fileio.$(O)): Add sys/file.h.
115
bb385a92
EZ
116 * fileio.c (check_existing): New function.
117 (make_temp_name, Ffile_exists_p, Ffile_writable_p): Call it
118 instead of calling 'stat', when what's needed is to check whether
119 a file exists. This avoids expensive system calls on MS-Windows.
120 (Bug#12587)
121
8599b23a 122 * w32.c (init_environment): Call 'check_existing' instead of 'stat'.
bb385a92
EZ
123
124 * lread.c (openp) [WINDOWSNT]: Call 'access' instead of 'stat' to
125 determine whether a file exists and is not a directory.
126
127 * lisp.h (check_existing): Add prototype.
128
2b9c2e68
JD
1292012-10-12 Jan Djärv <jan.h.d@swipnet.se>
130
131 * nsfont.m (nsfont_open): Remove font cache, it is not GC correct.
132
81749a23
GM
1332012-10-12 Glenn Morris <rgm@gnu.org>
134
135 * buffer.c (Fset_buffer): Doc fix. (Bug#12624)
136
5253a5fd
SM
1372012-10-11 Stefan Monnier <monnier@iro.umontreal.ca>
138
389a94a5
SM
139 * buffer.c (Fkill_buffer): Null out the overlay list(s) as well.
140
5253a5fd
SM
141 * eval.c (Fautoload): Remember previous autoload status in load-history.
142
7cded46f
PE
1432012-10-11 Paul Eggert <eggert@cs.ucla.edu>
144
145 lread.c, macros.c, marker.c, menu.c, minibuf.c: Use bool for booleans.
146 * lread.c (load_each_byte, new_backquote_flag, readchar)
147 (read_filtered_event, lisp_file_lexically_bound_p)
148 (safe_to_load_version, Fload, complete_filename_p, openp)
149 (build_load_history, readevalloop, read_escape, read1)
150 (string_to_number, read_vector, read_list):
151 * macros.c (Fstart_kbd_macro):
152 * marker.c (CONSIDER):
153 * menu.c (parse_single_submenu, digest_single_submenu)
154 (find_and_return_menu_selection, Fx_popup_menu):
155 * minibuf.c (read_minibuf_noninteractive, read_minibuf)
156 (Ftry_completion):
157 * nsmenu.m (ns_update_menubar, runMenuAt:forFrame:keymaps:):
158 (ns_menu_show):
159 * xmenu.c (set_frame_menubar, create_and_show_popup_menu)
160 (xmenu_show, xdialog_show):
161 Use bool for booleans.
162 * lread.c (safe_to_load_version): Rename from safe_to_load_p,
163 as it's not a predicate. All uses changed. Omit unnecessary
164 buffer termination.
165
549c3414
DA
1662012-10-11 Dmitry Antipov <dmantipov@yandex.ru>
167
168 * editfns.c (save_excursion_save): Use nil if mark points to nowhere.
169 (save_excursion_restore): Do not restore mark if it was not saved.
170
e85aafe7
PE
1712012-10-11 Paul Eggert <eggert@cs.ucla.edu>
172
fd2f90cf
PE
173 * marker.c (cached_modiff): EMACS_INT, not int.
174
c1af190b
PE
175 * w32select.c (waiting_for_input): Declare by including "keyboard.h"
176 instead of having a wrong decl.
e85aafe7
PE
177 * nsmenu.m (waiting_for_input): Remove wrong decl.
178
e738ca56
PE
1792012-10-10 Paul Eggert <eggert@cs.ucla.edu>
180
9fa1de30
PE
181 keyboard.c, keymap.c: Use bool for booleans.
182 * dispnew.c (sit_for): Distinguish between 3-way display_option
183 and boolean do_display.
184 * keyboard.c (single_kboard, this_command_key_count_reset)
185 (waiting_for_input, echoing, immediate_quit, input_pending)
186 (interrupt_input, interrupts_deferred, pop_kboard)
187 (temporarily_switch_to_single_kboard, ignore_mouse_drag_p)
188 (command_loop_1, adjust_point_for_property)
189 (safe_run_hooks_error, input_polling_used, read_char):
190 (help_char_p, readable_events, kbd_buffer_events_waiting)
191 (kbd_buffer_get_event, timer_check_2, make_lispy_event)
192 (lucid_event_type_list_p, get_input_pending):
193 (gobble_input, menu_separator_name_p, menu_bar_item)
194 (parse_menu_item, parse_tool_bar_item, read_char_x_menu_prompt)
195 (read_char_minibuf_menu_prompt, access_keymap_keyremap)
196 (keyremap_step, test_undefined, read_key_sequence)
197 (detect_input_pending, detect_input_pending_ignore_squeezables)
198 (detect_input_pending_run_timers, requeued_events_pending_p)
199 (quit_throw_to_read_char, Fset_input_interrupt_mode):
200 * keymap.c (get_keymap, keymap_parent, keymap_memberp)
201 (access_keymap_1, access_keymap, map_keymap, get_keyelt)
202 (Fdefine_key, Flookup_key, struct accessible_keymaps_data)
203 (accessible_keymaps_1, Fkey_description, push_key_description):
204 (shadow_lookup, struct where_is_internal_data)
205 (where_is_internal, Fwhere_is_internal, where_is_internal_1)
206 (Fdescribe_buffer_bindings, describe_map_tree, struct describe_map_elt)
207 (describe_map, describe_vector):
208 * menu.c (single_menu_item):
209 * nsmenu.m (ns_update_menubar):
210 * process.c (wait_reading_process_output):
211 * search.c (scan_buffer, scan_newline):
212 Use bool for boolean.
213 * keyboard.c (timers_run, swallow_events)
214 (detect_input_pending_run_timers):
215 * process.c (wait_reading_process_output):
216 Use unsigned for counter where wraparound-on-overflow is desired,
217 since unsigned is guaranteed to have that behavior and signed is not.
218 (read_char): Use ptrdiff_t for string length.
219 (get_input_pending): Remove first argument, since it was always
220 the same pointer-to-int (now pointer-to-boolean) &input_pending,
221 and behave as if it had that value. Return new value of
222 input_pending. All callers changed.
223 * keyboard.h (struct kboard): Use unsigned : 1 for boolean member
224 immediate_echo. Use ptrdiff_t for echo_after_prompt, since it's
225 a string length.
226 * keymap.c (push_key_description): Omit last arg, which was always 1.
227 All callers changed.
228
e738ca56
PE
229 * regex.c (immediate_quit) [emacs]: Remove duplicate decl.
230
29f21cdf
JB
2312012-10-10 Juanma Barranquero <lekktu@gmail.com>
232
233 * makefile.w32-in ($(BLD)/dispnew.$(O), $(BLD)/indent.$(O))
234 ($(BLD)/term.$(O)): Update dependencies.
235
6aea7528
DA
2362012-10-10 Dmitry Antipov <dmantipov@yandex.ru>
237
238 * alloc.c (mark_object): Use meaningful PVEC_NORMAL_VECTOR.
239 * lisp.h (enum pvec_type): Adjust comments and omit explicit
240 initializer for PVEC_NORMAL_VECTOR.
241
5f3f57be
PE
2422012-10-10 Paul Eggert <eggert@cs.ucla.edu>
243
244 Clean out old termopts cruft.
245 * termopts.h (flow_control, meta_key): Remove unused decls.
246 * dispnew.c, indent.c, nsterm.m, term.c, xsettings.c, xsmfns.c:
247 Don't include termopts.h.
248
3e98c68e
DA
2492012-10-10 Dmitry Antipov <dmantipov@yandex.ru>
250
251 * alloc.c (gc_sweep): Use pointer-to-a-pointer loop for buffers.
252
77e344e5
PE
2532012-10-10 Paul Eggert <eggert@cs.ucla.edu>
254
255 * commands.h (immediate_quit): Remove duplicate decl.
256
5683d7cd
JD
2572012-10-09 Jan Djärv <jan.h.d@swipnet.se>
258
259 * nsfont.m (Vfonts_in_cache): Remove, not needed as font.c handles
260 caching.
261 (nsfont_open): Remove setting of Vfonts_in_cache.
1f9f395d 262 (syms_of_nsfont): Remove initialization of Vfonts_in_cache.
5683d7cd 263
cf5fc6db
EZ
2642012-10-09 Eli Zaretskii <eliz@gnu.org>
265
b15736e6
EZ
266 * w32fns.c (w32_last_error): Change the return value to DWORD, to
267 match what GetLastError returns. Explain why the function is
268 needed.
269
cf5fc6db
EZ
270 * frame.c (delete_frame): Rename local variable 'tooltip_frame' to
271 'is_tooltip_frame', to avoid confusion with its global namesake.
272
f99714ce
DC
2732012-10-08 Daniel Colascione <dancol@dancol.org>
274
275 * xdisp.c (start_hourglass): Call w32_note_current_window when
2b1f11ed
EZ
276 HAVE_NTGUI, not just WINDOWSNT, resolving a problem in the cygw32
277 build that caused Emacs to display the hourglass cursor forever.
f99714ce 278
fd59cb29
GM
279 * w32fns.c (Fx_display_color_cells): Instead of using NCOLORS,
280 which is broken under remote desktop, calculate the number of
281 colors available for a display based on the display's number of
282 planes and number of bits per pixel per plane. (bug#10397).
283
62c480c9 2842012-10-08 Jan Djärv <jan.h.d@swipnet.se>
fd59cb29 285
62c480c9
JD
286 * nsfont.m (Vfonts_in_cache): New variable.
287 (nsfont_open): Use unsignedLongLongValue for cache in case wide ints
288 are used. Add cached fonts to Vfonts_in_cache.
289 (syms_of_nsfont): Initialize and staticpro Vfonts_in_cache.
290
607446ba
JB
2912012-10-08 Juanma Barranquero <lekktu@gmail.com>
292
fd5125ad
JB
293 * makefile.w32-in (LOCAL_FLAGS): Don't define HAVE_NTGUI, it's now
294 in nt/config.nt.
46979e0b
JB
295 (FONT_H): Define after FRAME_H.
296 ($(BLD)/emacs.$(O), $(BLD)/process.$(O), $(BLD)/w32heap.$(O)):
297 Update dependencies.
fd5125ad 298
607446ba
JB
299 * w32term.c: Remove leftover declaration of keyboard_codepage.
300
b6f4e300
EZ
3012012-10-08 Eli Zaretskii <eliz@gnu.org>
302
c54ebba4
EZ
303 * makefile.w32-in (FONT_H): Add $(FRAME_H).
304 (W32TERM_H): Add $(ATIMER_H) and $(FRAME_H).
305 ($(BLD)/emacs.$(O), $(BLD)/w32console.$(O)): Update dependencies.
306 (GLOBAL_SOURCES): Add cygw32.c.
fd59cb29
GM
307 ($(BLD)/unexw32.$(O)):
308 ($(BLD)/w32.$(O)):
309 ($(BLD)/w32console.$(O)):
310 ($(BLD)/w32fns.$(O)):
311 ($(BLD)/w32heap.$(O)):
312 ($(BLD)/w32menu.$(O)):
15c720a3 313 ($(BLD)/w32proc.$(O)): Add w32common.h.
c54ebba4 314
b6f4e300
EZ
315 * w32fns.c (w32_color_map_lookup, x_to_w32_color): Argument is now
316 'const char *'.
317 (x_to_w32_color): Don't modify the argument, modify a copy instead.
318
501199a3
DC
3192012-10-08 Daniel Colascione <dancol@dancol.org>
320
321 * w32term.h (WM_EMACS_BRINGTOTOP, WM_EMACS_INPUT_READY)
322 (WM_EMACS_END): Change WM_EMACS_BRINGTOTOP from 22 to 21 to close
323 accidental message numbering hole. Change other messages to
324 match.
325
326 * w32select.h (HAVE_W32SELECT): Remove.
327
328 * w32select.c, w32proc.c, w32menu.c, w32console.c, w32.c: Include
1f9f395d 329 w32common.h instead of w32heap.h.
501199a3
DC
330
331 * w32heap.h (ROUND_UP, ROUND_DOWN, get_page_size)
332 (get_allocation_unit, get_processor_type, get_w32_major_version)
333 (get_w32_minor_version, sysinfo_cache, osinfo_cache)
334 (w32_major_version, w32_minor_version, w32_build_number, OS_9X)
335 (OS_NT, os_subtype, cache_system_info): Move declarations to
336 w32common.
337
338 * w32heap.c: Include w32common.h.
339 (sysinfo_cache, syspage_mask, osinfo_cache, w32_major_version)
8599b23a
SM
340 (w32_minor_version, w32_build_number, w32_subtype):
341 Remove duplicate definitions.
501199a3
DC
342
343 * w32fns.c: Include w32common.h; include w32heap.h only in
344 WINDOWSNT.
345
346 (Fx_file_dialog): Clarify comment on GetOpenFileName structure.
347 Use `report_file_error' instead of `error' in order to better
348 inform users of what went wrong. Increase NTGUI_UNICODE file
349 dialog box file name length to 32k, the maximum allowed by the NT
350 kernel.
351
352 * w32common.h: New file.
353 (ROUND_UP, ROUND_DOWN, get_page_size)
354 (get_allocation_unit, get_processor_type, get_w32_major_version)
355 (get_w32_minor_version, sysinfo_cache, osinfo_cache)
356 (w32_major_version, w32_minor_version, w32_build_number, OS_9X)
357 (OS_NT, os_subtype, cache_system_info): Move here.
358
359 * unexw32.c, unexcw.c: Include w32common.h.
360
361 * emacs.c (main): Use (defined (WINDOWSNT) || defined
362 HAVE_NTGUI) instead of removed HAVE_W32SELECT to decide whether
363 to call syms_of_w32select.
364
365 * cygw32.h: Remove obsolete EXFUN declarations.
366
367 * cygw32.c (Qutf_16_le): Rename to Qutf_16le.
368
369 * Makefile.in (SOME_MACHINE_OBJECTS): Reverse accidental removal
370 of w32inevt.o from SOME_MACHINE_OBJECTS.
371
93aa5c81
DC
3722012-10-08 Daniel Colascione <dancol@dancol.org>
373
374 * image.c: Permanent fix for JPEG compilation issue --- limit
375 jpeglib `boolean' redefinition to Cygwin builds.
376
d424f3d8
EZ
3772012-10-08 Eli Zaretskii <eliz@gnu.org>
378
8ee4c6ce
EZ
379 * image.c (CHECK_LIB_AVAILABLE): Remove, no longer used.
380
d424f3d8
EZ
381 * emacs.c (DAEMON_MUST_EXEC) [HAVE_NTGUI]: Define this only on
382 Cygwin.
383
e08348a0
DC
3842012-10-08 Daniel Colascione <dancol@dancol.org>
385
386 * xfaces.c, xdisp.c, window.c, w32xfns.c, w32term.h, w32term.c,
387 w32select.h w32select.c, w32proc.c, w32menu.c, w32inevt.c,
388 w32help.c, w32font.c, w32font.c, w32fns.c, w32console.c, w32.h,
389 w32.c, unexw32.c, termhooks.h, process.c, menu.c, keyboard.h,
390 keyboard.c, image.c, frame.h, frame.c, fontset.c, font.h, font.c,
391 emacs.c, dispextern.h, cygw32.h, cygw32.c, conf_post.h,
392 Makefile.in: use HAVE_NTGUI for W32 GUI and WINDOWSNT for the
393 operating system. defined(HAVE_NTGUI) && !defined(WINDOWSNT) is
394 now a supported configuration.
395
396 * Makefile.in: consolidate image variables into LIBIMAGE; add
397 W32_OBJ and W32_LIBS. Compile new files.
398
399 * conf_post.h:
400 (_DebPrint) declare tracing facility for W32 debugging. We need
401 to unify tracing later.
402
403 (NTGUI_UNICODE) Define when compiling for Cygwin to allow the
404 unconditional use of W32 Unicode functions. Cygwin runs only on
405 100% Unicode operating systems.
406
407 * cygw32.c: New file. Define Cygwin-specific facilities.
408 (Fcygwin_convert_path_to_windows)
409 (Fcygwin_convert_path_from_windows): New user functions for
410 accessing Cygwin path-munging routines.
411
412 * cygw32.h: New file.
413 (WCSDATA, to_unicode, from_unicode): Define facilities for storing
414 UTF-16LE strings temporarily inside non-Lisp-visible string
415 objects.
416
417 (w32_strerror): Just what it says on the tin.
418
419 * emacs.c: Make the NS fork-then-exec code for daemon-launching
420 also run for Cygwin; both systems have the same problem with using
421 GUI facilities in a forked child. Also call syms_of_cygw32,
422 syms_of_w32select in correct places.
423
424 (DAEMON_MUST_EXEC): new macro defined to signal that a platform
425 needs fork-then-exec for daemon launching.
426
427 * font.h: Include frame.h.
428
429 * image.c: Use the image library cache machinery only when we're
430 compiling for native WINDOWSNT; Cygwin can use shared libraries
431 like any other Unixlike system.
432
433 * keyboard.c: Clarify a comment regarding the input loop.
434
435 * menu.c: When NTGUI_UNICODE is defined, use Unicode menu
436 functions directly instead of trying to detect at runtime that our
437 host operating system supports them. We make this change for two
438 reasons: Cygwin lacks support for the multibyte character
439 conversion functions used by the legacy menu code, and Cygwin
440 never needs to rely on non-Unicode APIs.
441
442 * unexw32.c (hinst): Declare extern.
443
444 * w32.c: Change header order;
445 (w32_strerror): Move to w32fns.c because we need it for
446 non-WINDOWSNT builds.
447
448 * w32.h: Add #error macro to make sure we don't include w32.h for
449 Cygwin builds. Remove w32select declarations.
450
451 * w32console.c (w32_sys_ring_bell, Fset_message_beep): Move to
1f9f395d 452 w32fns.c. w32console.c is WINDOWSNT-only.
e08348a0
DC
453
454 * w32fns.c: Include cygw32.h or w32.h depending on CYGWIN; more
455 NTGUI_UNICODE tweaks. (See above.) Change _snprintf to the more
456 POSIXy alternative.
457 (faked_key, sysinfo_cache, osinfo_cahce, syspage_mask)
458 (w32_major_version, w32_minor_version, w32_build_number)
459 (os_subtype, sound_type): Define here
460 (w32_defined_color): Make color parameter const for consistency
461 with other _defined_color functions.
462 (w32_createwindow): Unconditionally call w32_init_class instead of
463 doing so only when hprevinst is non-NULL. Plumbing hprevinst
464 through the code is complex and unnecessary because class
465 registration is practically free.
466 (w32_name_of_message): New EMACSDEBUG-only function.
467 (Fset_message_beep): Move here
468 (Fx_open_connection): Require that the display name for Windows be
469 "w32" for consistency, emacsclient disambiguation, and maybe, one
470 day, multi-window-system support.
471 (file_dialog_callback): NTGUI_UNICODE changes; encode and decode
472 Cygwin files for W32 GUI facilities, since these clearly don't
473 expect Cygwin names.
474 (_DebPrint): Define.
475 (w32_strerror, w32_console_toggle_lock_key, w32_kbd_mods_to_emacs)
476 (w32_kbd_patch_key, w32_sys_ring_bell): Move here.
477 (Ssystem_move_file_to_trash): Define only for native WINDOWSNT.
478 (w32_last_error): Remove.
479
480 * w32font.c: Define _strlwr to strlwr for non-WINDOWSNT builds.
481
482 * w32heap.c (syspage_mask): Declare here.
483 (cache_system_info): Remove.
484
485 * w32inevt.c (faked_key): Define globally, not statically.
486 (w32_kbd_mods_to_emacs, w32_kbd_patch_key, faked_key)
487 (w32_console_toggle_lock_key): Move to w32fns.c.
488
489 * w32menu.c: Include setjmp.h. NTGUI_UNICODE changes throughout.
490
491 * w32proc.c (_DebPrint): Move to w32fns.c.
492 * w32select.c: Include string.h, stdio.h for Cygwin.
493 * w32select.h: New File.
494
495 * w32term.c: Include io.h for non-CYGWIN builds; needed for
496 get_osfhandle.
497 (w32_message_fd): New variable. Under Cygwin, holds the file
498 descriptor the system used to tell us about pending thread
499 messages.
500
501 (w32_init_term): Remove incorrect calls to fcntl and init_sigio
502 that prevented compilation under non-WINDOWSNT systems.
503
504 (w32_initialize): Open /dev/windows and assign it to
505 w32_message_fd. Provide w32 feature.
506
507 * w32term.h: Include frame.h, atimer.h. Declare various frame functions.
508 (WM_EMACS_INPUT_READY): add.
509 (prepend_msg, w32_message_fd): Declare globally.
510
511 * w32xfns.c:
512 (keyboard_handle): Use only when WINDOWSNT.
513 (notify_msg_ready): New function. Posts a message to the main
514 thread's message queue under CYGWIN, which wakes up the main
515 thread from select(2) by making the /dev/windows file descriptor
516 ready. Under WINDOWSNT, it sets an event the same way the old
517 code did.
518
519 (post, prepend_msg): Actually call notify_msg_ready instead of
520 setting the input event directly.
521
98daa893
EZ
5222012-10-07 Eli Zaretskii <eliz@gnu.org>
523
524 * ralloc.c (relinquish): If a heap is ready to be relinquished,
525 but it still has blocs in it, don't return it to the system,
526 instead of aborting. (Bug#12402)
527
3bc0a2f7
JD
5282012-10-07 Jan Djärv <jan.h.d@swipnet.se>
529
8ad5b73b 530 * nsterm.m (ns_dumpglyphs_image): Only draw slice of image (Bug#12506).
493b5b1c 531
335f5ae4
JD
532 * nsterm.m (ns_update_auto_hide_menu_bar): Remove defintion of
533 MAC_OS_X_VERSION_10_6.
8ad5b73b
JD
534 (syms_of_nsterm): Remove comment about Panther and above for
535 ns-antialias-text.
335f5ae4
JD
536 * nsterm.h (MAC_OS_X_VERSION_10_3, onTiger): Remove.
537 (EmacsApp): Remove check for >= MAC_OS_X_VERSION_10_4.
538 (struct nsfont_info): Remove check for >= MAC_OS_X_VERSION_10_3.
539
540 * nsselect.m (ns_string_from_pasteboard): Remove check for >=
541 MAC_OS_X_VERSION_10_4.
542
8ad5b73b
JD
543 * nsmenu.m (fillWithWidgetValue:): Remove code for <
544 MAC_OS_X_VERSION_10_2.
335f5ae4
JD
545
546 * nsimage.m (setPixmapData, getPixelAtX, setAlphaAtX): Remove onTiger.
547
548 * nsfns.m (Fns_list_services): Remove comment and check for OSX < 10.4.
549 (ns_do_applescript): Remove check for >= MAC_OS_X_VERSION_10_4.
550
3bc0a2f7
JD
551 * nsterm.m (ns_in_resize): Remove (Bug#12479).
552 (ns_resize_handle_rect, mouseDown, mouseUp, mouseDragged): Remove.
8599b23a
SM
553 (ns_clear_frame, sendEvent, windowDidResize, drawRect:):
554 Remove ns_in_resize check.
3bc0a2f7
JD
555 (ns_clear_frame_area): Remove resize handle code.
556
557 * nsfns.m (ns_in_resize): Remove.
1f9f395d 558 (x_set_icon_name, ns_set_name, ns_set_name_as_filename): Remove
8ad5b73b 559 ns_in_resize check.
3bc0a2f7 560
c622b48f
PE
5612012-10-07 Paul Eggert <eggert@cs.ucla.edu>
562
563 Improve sys_siglist detection.
564 * sysdep.c (sys_siglist, init_signals): Use _sys_siglist if it's
565 defined as a macro, as is done in Solaris.
566 (sys_siglist_entries): New macro.
567 (save_strsignal): Use it.
568 * syssignal.h (safe_strsignal): Now ATTRIBUTE_CONST, to pacify
569 GCC 4.7.2 on Fedora 17 with the fixed sys_siglist detection.
570
04fafa46
JD
5712012-10-06 Jan Djärv <jan.h.d@swipnet.se>
572
573 * nsfns.m (Fx_create_frame): Call x_default_parameter with
574 fullscreen/Fullscreen.
575
576 * nsterm.h (EmacsView): Rename tbar_height to tibar_height.
577 tobar_height is new.
578
579 * nsterm.m (x_make_frame_visible): Check for fullscreen.
580 (ns_fullscreen_hook): Activate old style fullscreen with a timer.
581 (ns_term_init): Set activateIgnoringOtherApps if old style fullscreen.
582 (windowDidResize:): Check for correct window if old style fullscreen.
583 Capitalize word in comment. Remove incorrect comment.
584 (initFrameFromEmacs:): tbar_height renamed tibar_height.
585 (windowDidEnterFullScreen:): Toggle toolbar for fullscreen to fix
586 error in drawing background.
1f9f395d 587 (toggleFullScreen:): Remove comment. Rearrange calls.
04fafa46
JD
588 Set toolbar values to zero, save old height in tobar_height.
589 Restore tool bar height when leaving fullscreen.
590 (canBecomeMainWindow): New function.
591
c6e21c03
PE
5922012-10-06 Paul Eggert <eggert@cs.ucla.edu>
593
594 * keyboard.c (read_char): Remove unnecessary 'volatile's and label.
595
0d9f584b
EZ
5962012-10-05 Eli Zaretskii <eliz@gnu.org>
597
a65fbb5f
EZ
598 * w32proc.c (stop_timer_thread): Fix declaration of 'err'.
599
0d9f584b 600 * w32.c (utime): Open the file with FILE_FLAG_BACKUP_SEMANTICS, so
8599b23a
SM
601 that time stamps of directories could also be changed.
602 Don't request the too broad GENERIC_WRITE, only the more restrictive
0d9f584b
EZ
603 FILE_WRITE_ATTRIBUTES access rights.
604
605 * fileio.c (Fset_file_times): Special-case ignoring errors for
606 directories only on MSDOS, not on MS-Windows.
607
e8757f09 6082012-10-05 Ikumi Keita <ikumi@ikumi.que.jp> (tiny change)
ca347e3d
IK
609
610 * minibuf.c (Fcompleting_read): Doc fix. (Bug#12555)
611
7604f298
EZ
6122012-10-04 Eli Zaretskii <eliz@gnu.org>
613
614 * w32.c (utime): Test for INVALID_HANDLE_VALUE, not for NULL, to
615 see whether CreateFile failed.
616
88d69b7d
PE
6172012-10-04 Paul Eggert <eggert@cs.ucla.edu>
618
619 * profiler.c (handle_profiler_signal): Inhibit pending signals too,
620 to avoid similar races.
621 * keyboard.c (pending_signals): Now bool, not int.
622
7509f454
PE
623 Port timers to OpenBSD, plus check for timer failures.
624 OpenBSD problem reported by Han Boetes.
625 * profiler.c (setup_cpu_timer): Check for failure of timer_settime
626 and/or setitimer.
627 (Fprofiler_cpu_stop): Don't assume HAVE_SETITIMER.
628 * syssignal.h (HAVE_ITIMERSPEC): New macro. This is for platforms
629 like OpenBSD, which has timer_settime but does not declare it.
630 OpenBSD does not define SIGEV_SIGNAL, so use that when deciding
631 whether to use itimerspec-related primitives. All uses of
632 HAVE_TIMER_SETTIME replaced with HAVE_ITIMERSPEC.
633
a3c5c0c5
PE
6342012-10-02 Paul Eggert <eggert@cs.ucla.edu>
635
636 * profiler.c (handle_profiler_signal): Fix a malloc race
637 that caused Emacs to hang on Fedora 17 when profiling Lisp.
638
914e743b
JD
6392012-10-02 Jan Djärv <jan.h.d@swipnet.se>
640
641 * nsterm.m (windowDidEnterFullScreen): Remove fprintf.
642
d8ab37a8
EZ
6432012-10-02 Eli Zaretskii <eliz@gnu.org>
644
645 * w32proc.c (sys_wait): Declare 'signame' 'const char *', to be
646 consistent with the change in return value of 'safe_strsignal'.
647
b3ecad33
PE
6482012-10-02 Paul Eggert <eggert@cs.ucla.edu>
649
0a99eee1
PE
650 Prefer plain 'static' to 'static inline' (Bug#12541).
651 * bidi.c (bidi_get_type, bidi_check_type, bidi_get_category)
652 (bidi_set_sor_type, bidi_push_embedding_level)
653 (bidi_pop_embedding_level, bidi_remember_char, bidi_copy_it)
654 (bidi_cache_reset, bidi_cache_shrink, bidi_cache_fetch_state)
655 (bidi_cache_search, bidi_cache_ensure_space)
656 (bidi_cache_iterator_state, bidi_cache_find)
657 (bidi_peek_at_next_level, bidi_set_paragraph_end)
658 (bidi_count_bytes, bidi_char_at_pos, bidi_fetch_char)
659 (bidi_explicit_dir_char, bidi_resolve_neutral_1):
660 Now 'static', not 'static inline'.
661
b3ecad33
PE
662 Count overruns when profiling; change units to ns.
663 * profiler.c (handle_profiler_signal): Count sampling intervals, not ms.
664 Give extra weight to samples after overruns, to attempt to count
665 the time more accurately.
666 (setup_cpu_timer): Change sampling interval units from ms to ns, since
667 the underlying primitives nominally do ns.
668 (Fprofiler_cpu_start): Document the change. Mention that
669 the sampling intervals are only approximate.
670
090cf9db
SM
6712012-10-02 Stefan Monnier <monnier@iro.umontreal.ca>
672
673 * frame.c (Fmake_terminal_frame): Prefer safer CONSP over !NILP.
674
675 * coding.h (ENCODE_FILE, DECODE_FILE, DECODE_SYSTEM): Remove special
676 case for the special 0 coding-system.
677
678 * buffer.c (Fset_buffer_multibyte): Signal an error instead of widening.
679 (Fmake_overlay): Remove redundant tests.
64edc777 680 (fix_start_end_in_overlays): Remove redundant recentering.
090cf9db 681
81550bf4
JB
6822012-10-02 Juanma Barranquero <lekktu@gmail.com>
683
684 * makefile.w32-in ($(BLD)/alloc.$(O), $(BLD)/gmalloc.$(O)):
685 Update dependencies.
686
aa1ba90e
PE
6872012-10-01 Paul Eggert <eggert@cs.ucla.edu>
688
689 Fix a malloc race condition involving strsignal.
690 A signal can arrive in the middle of a malloc, and Emacs's signal
691 handler can invoke strsignal, which can invoke malloc, which is
692 not portable. This race condition bug makes Emacs hang on GNU/Linux.
693 Fix it by altering the signal handler so that it does not invoke
694 strsignal.
695 * emacs.c (shut_down_emacs): Use safe_strsignal, not strsignal.
696 * process.c (status_message): Use const pointer, in case strsignal
697 is #defined to safe_strsignal.
698 * sysdep.c (sys_siglist, init_signals): Always define and
699 initialize a substitute sys_siglist if the system does not define
700 one, even if HAVE_STRSIGNAL.
701 (safe_strsignal): Rename from strsignal. Always define,
702 using sys_siglist. Return a const pointer.
703 * syssignal.h (safe_strsignal): New decl.
704 (strsignal) [!HAVE_STRSIGNAL]: Define in terms of safe_strsignal.
705
ace917bd
EZ
7062012-10-01 Eli Zaretskii <eliz@gnu.org>
707
708 * w32proc.c (timer_loop): Fix code that waits for timer
709 expiration, to avoid high CPU usage.
710
9eb71b9c
SM
7112012-10-01 Stefan Monnier <monnier@iro.umontreal.ca>
712
713 * fns.c (check_hash_table, get_key_arg, maybe_resize_hash_table)
714 (sweep_weak_table): Remove redundant prototypes.
715
b3317662
FP
7162012-10-01 Fabrice Popineau <fabrice.popineau@gmail.com>
717
718 * emacs.c: Move the inclusion of TERM_HEADER after including
719 windows.h on WINDOWSNT. This avoids compilation problems with
720 MSVC.
721
f0e5f225
EZ
7222012-10-01 Eli Zaretskii <eliz@gnu.org>
723
2d7d1608
EZ
724 * unexw32.c (OFFSET_TO_RVA, RVA_TO_OFFSET)
725 (RVA_TO_SECTION_OFFSET): Encode all macro arguments in parentheses.
726 (RVA_TO_PTR): Cast the result of RVA_TO_OFFSET to 'unsigned char *',
727 as the previous version used 'void *'.
728
729 * ralloc.c (ROUNDUP): Fix last change.
730 (MEM_ROUNDUP): Don't cast MEM_ALIGN, it is already of type
731 'size_t'.
732
f0e5f225
EZ
733 * w32proc.c <disable_itimers>: New static flag.
734 (init_timers): Initialize it to zero, after creating the critical
735 sections used by the timer threads.
736 (term_timers): Set to 1 before deleting the critical sections.
737 (getitimer, setitimer): If disable_itimers is non-zero, return an
738 error indication without doing anything. Reported by Fabrice
739 Popineau <fabrice.popineau@supelec.fr> as part of bug#12544.
4cdfbb89
EZ
740 (alarm) [HAVE_SETITIMER]: Be more conformant to the expected
741 return results.
742 [!HAVE_SETITIMER]: Behave as the previous version that didn't
743 support timers.
f0e5f225
EZ
744
745 * emacs.c (shut_down_emacs) [WINDOWSNT]: Move the call to
746 term_ntproc after all the other bookkeeping, to get timers working
747 as long as possible.
748
82ef37c1
PE
7492012-10-01 Paul Eggert <eggert@cs.ucla.edu>
750
b3a4c387
PE
751 * xdisp.c (syms_of_xdisp): Default message-log-max to 1000, not 100.
752 Suggested by Juri Linkov in
753 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00821.html>.
754
b0ab8123
PE
755 Prefer plain 'static' to 'static inline' (Bug#12541).
756 With static functions, modern compilers inline pretty well by
757 themselves; advice from programmers often hurts as much as it helps.
758 On my host (x86-64, Fedora 17, GCC 4.7.2, default 'configure'),
759 this change shrinks the text size of the Emacs executable by 1.1%
760 without affecting CPU significantly in my benchmark.
761 * alloc.c (mem_find, live_string_p, live_cons_p, live_symbol_p)
762 (live_float_p, live_misc_p, live_vector_p, live_buffer_p)
763 (mark_maybe_object, mark_maybe_pointer, bounded_number):
764 * buffer.c (bset_abbrev_mode, bset_abbrev_table)
765 (bset_auto_fill_function, bset_auto_save_file_format)
766 (bset_auto_save_file_name, bset_backed_up, bset_begv_marker)
767 (bset_bidi_display_reordering, bset_buffer_file_coding_system)
768 (bset_cache_long_line_scans, bset_case_fold_search)
769 (bset_ctl_arrow, bset_cursor_in_non_selected_windows)
770 (bset_cursor_type, bset_display_table, bset_extra_line_spacing)
771 (bset_file_format, bset_file_truename, bset_fringe_cursor_alist)
772 (bset_fringe_indicator_alist, bset_fringes_outside_margins)
773 (bset_header_line_format, bset_indicate_buffer_boundaries)
774 (bset_indicate_empty_lines, bset_invisibility_spec)
775 (bset_left_fringe_width, bset_major_mode, bset_mark)
776 (bset_minor_modes, bset_mode_line_format, bset_mode_name)
777 (bset_name, bset_overwrite_mode, bset_pt_marker)
778 (bset_right_fringe_width, bset_save_length)
779 (bset_scroll_bar_width, bset_scroll_down_aggressively)
780 (bset_scroll_up_aggressively, bset_selective_display)
781 (bset_selective_display_ellipses, bset_vertical_scroll_bar_type)
782 (bset_word_wrap, bset_zv_marker, set_buffer_overlays_before)
783 (set_buffer_overlays_after):
784 * category.c (bset_category_table):
785 * charset.c (read_hex):
786 * coding.c (produce_composition, produce_charset)
787 (handle_composition_annotation, handle_charset_annotation)
788 (char_encodable_p):
789 * dispnew.c (swap_glyph_pointers, copy_row_except_pointers)
790 (assign_row, set_frame_matrix_frame, make_current)
791 (add_row_entry):
792 * eval.c (set_specpdl_symbol, set_specpdl_old_value):
793 * fns.c (maybe_resize_hash_table):
794 * frame.c (fset_buffer_predicate, fset_minibuffer_window):
795 * gmalloc.c (register_heapinfo):
796 * image.c (lookup_image_type):
797 * intervals.c (set_interval_object, set_interval_left)
798 (set_interval_right, copy_interval_parent, rotate_right)
799 (rotate_left, balance_possible_root_interval):
800 * keyboard.c (kset_echo_string, kset_kbd_queue)
801 (kset_keyboard_translate_table, kset_last_prefix_arg)
802 (kset_last_repeatable_command, kset_local_function_key_map)
803 (kset_overriding_terminal_local_map, kset_real_last_command)
804 (kset_system_key_syms, clear_event, set_prop):
805 * lread.c (digit_to_number):
806 * marker.c (attach_marker, live_buffer, set_marker_internal):
807 * nsterm.m (ns_compute_glyph_string_overhangs):
808 * process.c (pset_buffer, pset_command)
809 (pset_decode_coding_system, pset_decoding_buf)
810 (pset_encode_coding_system, pset_encoding_buf, pset_filter)
811 (pset_log, pset_mark, pset_name, pset_plist, pset_sentinel)
812 (pset_status, pset_tty_name, pset_type, pset_write_queue):
813 * syntax.c (bset_syntax_table, dec_bytepos):
814 * terminal.c (tset_param_alist):
815 * textprop.c (interval_has_some_properties)
816 (interval_has_some_properties_list):
817 * window.c (wset_combination_limit, wset_dedicated)
818 (wset_display_table, wset_hchild, wset_left_fringe_width)
819 (wset_left_margin_cols, wset_new_normal, wset_new_total)
820 (wset_normal_cols, wset_normal_lines, wset_parent, wset_pointm)
821 (wset_right_fringe_width, wset_right_margin_cols)
822 (wset_scroll_bar_width, wset_start, wset_temslot, wset_vchild)
823 (wset_vertical_scroll_bar_type, wset_window_parameters):
824 * xdisp.c (wset_base_line_number, wset_base_line_pos)
825 (wset_column_number_displayed, wset_region_showing)
826 (window_box_edges, run_window_scroll_functions)
827 (append_glyph_string_lists, prepend_glyph_string_lists)
828 (append_glyph_string, set_glyph_string_background_width)
829 (append_glyph, append_composite_glyph)
830 (take_vertical_position_into_account):
831 * xfaces.c (x_create_gc, x_free_gc, merge_face_vectors)
832 (face_attr_equal_p, lface_equal_p, hash_string_case_insensitive)
833 (lface_hash, lface_same_font_attributes_p, lookup_face):
834 * xml.c (libxml2_loaded_p):
835 * xterm.c (x_set_mode_line_face_gc, x_set_glyph_string_gc)
836 (x_set_glyph_string_clipping, x_clear_glyph_string_rect):
837 Now 'static', not 'static inline'.
838
05584c31
PE
839 * bidi.c: Tune.
840 (bidi_copy_it): Do the whole copy with a single memcpy.
841 (bidi_char_at_pos): Merge the two STRING_CHAR calls into one.
842
86ec63ba
PE
843 Revert the FOLLOW-SYMLINKS change for file-attributes.
844 Doing it right would require several changes to Tramp, and there's
845 not enough time to get that tested before the freeze today.
846 * dired.c (directory_files_internal, Ffile_attributes):
847 Undo last change.
848
82ef37c1
PE
849 * frame.c (x_report_frame_params): Port better to wider ints.
850 Do not assume that EMACS_UINT is the same width as uprintmax_t,
851 or that pointers can be printed in 15 decimal digits.
852 Avoid GCC warnings if EMACS_UINT is wider than a pointer.
853
62aba0d4
FP
8542012-09-30 Fabrice Popineau <fabrice.popineau@supelec.fr>
855
856 Support x64 build on MS-Windows.
857 * w32term.h (SCROLL_BAR_PACK, SCROLL_BAR_UNPACK): Define for x64.
858 (SET_SCROLL_BAR_W32_WINDOW): Cast ID to intptr_t, for
859 compatibility with x64.
5e4daaf3 860 (x_get_focus_frame): Add prototype.
62aba0d4
FP
861
862 * w32term.c (w32_draw_underwave): Don't use GCC extensions for
863 defining an XRectangle structure.
864
865 * w32proc.c (RVA_TO_PTR, w32_executable_type): Fix pointer
866 arithmetics for compatibility with x64.
867
868 * w32menu.c (add_menu_item): Use UINT_PTR instead of UINT, for
869 compatibility with x64.
870
871 * w32heap.h: Adjust prototypes and declarations.
872
873 * w32heap.c (RVA_TO_PTR, allocate_heap, sbrk, init_heap)
874 (round_heap): Use DWORD_PTR, ptrdiff_t and size_t instead of
875 DWORD, long, and unsigned long, for compatibility with x64.
876 (allocate_heap) [_WIN64]: Reserve 32GB of memory.
877 (sbrk): Argument is now of type ptrdiff_t.
878
879 * w32fns.c (HMONITOR): Condition declaration on _WIN32_WINNT being
880 less than 0x0500.
881 (w32_msg_pump): Use WPARAM type for 'result'.
882
883 * w32.c (init_environment, get_emacs_configuration): Support AMD64
884 architecture.
885 (init_ntproc): Cast arguments of _open_osfhandle to intptr_t, for
886 compatibility with x64.
887
888 * vm-limit.c (lim_data): Now size_t.
889 (check_memory_limits): Adjust prototypes of real_morecore and
890 __morecore to receive argument of type ptrdiff_t. Use size_t for
891 five_percent and data_size.
892
893 * unexw32.c: Use DWORD_PTR instead of DWORD for file-scope
894 variables, for compatibility with x64.
895 (rva_to_section, offset_to_section, relocate_offset)
896 (OFFSET_TO_RVA, RVA_TO_OFFSET, RVA_TO_SECTION_OFFSET)
897 (PTR_TO_RVA, RVA_TO_PTR, OFFSET_TO_PTR, get_section_info)
898 (copy_executable_and_dump_data): Use DWORD_PTR instead of DWORD
899 for compatibility with x64.
900
901 * sysdep.c (STDERR_FILENO): Define if not already defined.
902
903 * ralloc.c (real_morecore): Argument type is now ptrdiff_t.
904 (__morecore): Argument type is now ptrdiff_t.
905 (ROUNDUP, MEM_ROUNDUP): Use size_t instead of 'unsigned long'.
906 (relinquish): Use ptrdiff_t type for 'excess'.
907 (r_alloc_sbrk): Argument type is now ptrdiff_t.
908
909 * makefile.w32-in (HEAPSIZE): Get value from EMACS_HEAPSIZE.
910 (bootstrap-temacs-CMD, bootstrap-temacs-SH): Use $(EMACS_PURESIZE)
911 instead of a literal number.
912
913 * gmalloc.c [WINDOWSNT]: Include w32heap.h.
914 (min): Define only if not already defined.
915
916 * frame.c (x_report_frame_params): Use EMACS_UINT for the return
917 value of FRAME_X_WINDOW, to fit a 64-bit pointer on 64-bit Windows
918 hosts.
919
920 * image.c (x_bitmap_pixmap): Return ptrdiff_t, not int, since
921 'bitmaps' is a pointer.
922
923 * dispextern.h (x_bitmap_pixmap): Adjust prototype.
924
925 * alloc.c (gdb_make_enums_visible): Now conditional on __GNUC__.
926
e7a2937b
PE
9272012-09-30 Paul Eggert <eggert@cs.ucla.edu>
928
929 file-attributes has a new optional arg FOLLOW-SYMLINKS.
930 * dired.c (directory_files_internal, Ffile_attributes):
931 New arg follow_symlinks. All uses changed.
932
b43d62ae
SM
9332012-09-30 Stefan Monnier <monnier@iro.umontreal.ca>
934
935 * .gdbinit (xbacktrace): Adjust to recent "struct backtrace" change.
936
c06c382a
EZ
9372012-09-30 Eli Zaretskii <eliz@gnu.org>
938
939 Support atimers and CPU profiler via profile.c on MS-Windows.
940 * w32proc.c (sig_mask, crit_sig): New static variables.
941 (sys_signal): Support SIGALRM and SIGPROF.
942 (sigemptyset, sigaddset, sigfillset, sigprocmask)
b43d62ae 943 (pthread_sigmask, setpgrp): Move here from w32.c. sigaddset,
c06c382a
EZ
944 sigfillset, and sigprocmask are no longer no-ops.
945 (sigismember): New function.
946 (struct itimer_data): New definition.
947 (ticks_now, real_itimer, prof_itimer, clocks_min, crit_real)
948 (crit_prof): New static variables.
949 (MAX_SINGLE_SLEEP): New definition.
950 (timer_loop, stop_timer_thread, term_timers, init_timers)
951 (start_timer_thread, getitimer, setitimer): New functions.
952 (alarm): No longer a no-op, calls setitimer.
953
954 * w32.c (term_ntproc): Call term_timers.
955 (init_ntproc): Make sure all signals are unblocked at startup, to
956 erase any traces of dumping. Call init_timers.
957
958 * w32fns.c (hourglass_timer, HOURGLASS_ID): Remove.
959 Windows-specific code to display the hourglass mouse pointer is no
960 longer used.
961 (w32_wnd_proc): Remove code that handled the WM_TIMER message due
962 to hourglass timer expiration.
963 (start_hourglass, cancel_hourglass, DEFAULT_HOURGLASS_DELAY):
964 Remove, no longer used.
b43d62ae
SM
965 (w32_note_current_window, show_hourglass, hide_hourglass):
966 New functions, in support of hourglass cursor display similar to other
c06c382a
EZ
967 window systems.
968 (syms_of_w32fns): Don't initialize hourglass_timer.
969
970 * xdisp.c (start_hourglass, cancel_hourglass): Now used on
971 WINDOWSNT as well.
972 (start_hourglass) [WINDOWSNT]: Call w32_note_current_window.
973
974 * w32.h (init_timers, term_timers): Add prototypes.
975
95402d5f
KH
9762012-09-30 Kenichi Handa <handa@gnu.org>
977
978 * coding.c (decode_coding_ccl, encode_coding_ccl): Pay attention
979 to the buffer relocation which may be caused by ccl_driver.
980
dd946752
JD
9812012-09-30 Jan Djärv <jan.h.d@swipnet.se>
982
d7e642cc
JD
983 * xfns.c (Fx_file_dialog): Update comment.
984
985 * w32fns.c (Fx_file_dialog): Update comment.
986
987 * nsfns.m (Fns_read_file_name): Add argument DIR_ONLY_P.
988 Initialize panel name field if OSX >= 10.6.
989
990 * fileio.c (Fnext_read_file_uses_dialog_p): Add HAVE_NS.
991
dd946752
JD
992 * nsfns.m (ns_frame_parm_handlers): Add x_set_fullscreen.
993
994 * nsterm.m (NEW_STYLE_FS): New define.
995 (ns_fullscreen_hook, windowWillEnterFullScreen)
996 (windowDidEnterFullScreen, windowWillExitFullScreen)
997 (windowDidExitFullScreen, toggleFullScreen, handleFS)
998 (setFSValue): New functions.
999 (EmacsFSWindow): New implementation.
1000 (canBecomeKeyWindow): New function for EmacsFSWindow.
1001 (ns_create_terminal): Set fullscreen_hook to ns_fullscreen_hook.
1002 (dealloc): Release nonfs_window if in fullscreen.
1003 (updateFrameSize:): Call windowDidMove to update top/left.
1004 (windowWillResize:toSize:): Check if frame is still maximized.
1005 (initFrameFromEmacs:): Initialize fs_state, fs_before_fs,
1006 next_maximized, maximized_width, maximized_height and nonfs_window.
1007 Call setCollectionBehavior if NEW_STYLE_FS. Initialize bwidth and
1008 tbar_height.
1009 (windowWillUseStandardFrame:defaultFrame:): Update frame parameter
1f9f395d 1010 fullscreen. Set maximized_width/height. Act on next_maximized.
dd946752
JD
1011
1012 * nsterm.h (MAC_OS_X_VERSION_10_7, MAC_OS_X_VERSION_10_8): New.
1013 (EmacsView): Add variables for fullscreen.
1014 (handleFS, setFSValue, toggleFullScreen): New in EmacsView.
1015 (EmacsFSWindow): New interface for fullscreen.
1016
427730eb
JB
10172012-09-30 Juanma Barranquero <lekktu@gmail.com>
1018
1019 * makefile.w32-in ($(BLD)/profiler.$(O)): Update dependencies.
1020
48de8b12
CY
10212012-09-30 Chong Yidong <cyd@gnu.org>
1022
1023 * fns.c (Frandom): Doc fix.
1024
5938d519
MR
10252012-09-30 Martin Rudalics <rudalics@gmx.at>
1026
1027 * window.c (Vwindow_combination_limit): New default value.
1028 (Qwindow_size): New symbol replacing Qtemp_buffer_resize.
1029
cb5b0266
PE
10302012-09-30 Paul Eggert <eggert@cs.ucla.edu>
1031
1032 * syssignal.h (PROFILER_CPU_SUPPORT): Don't define if PROFILING.
1033 Suggested by Eli Zaretskii in
1034 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00811.html>.
1035
84f72efd
EZ
10362012-09-30 Eli Zaretskii <eliz@gnu.org>
1037
1038 * profiler.c (Fprofiler_cpu_stop): Use timer_settime only if
1039 HAVE_TIMER_SETTIME is defined.
1040
9d4dcdc9
PE
10412012-09-30 Paul Eggert <eggert@cs.ucla.edu>
1042
d89460ed
PE
1043 Profiler improvements: more-accurate timers, overflow checks.
1044 * profiler.c: Don't include stdio.h, limits.h, sys/time.h,
1045 signal.h, setjmp.h. Include systime.h instead.
1046 (saturated_add): New function.
1047 (record_backtrace, current_sample_interval): Use EMACS_INT, not size_t.
1048 (record_backtrace, handle_profiler_signal): Saturate on fixnum overflow.
1049 (profiler_timer, profiler_timer_ok) [HAVE_TIMER_SETTIME]:
1050 New static vars.
84f72efd 1051 (enum profiler_cpu_running): New enum.
d89460ed
PE
1052 (profiler_cpu_running): Now of that enum type, not bool.
1053 All uses changed to store the new value.
1054 (handle_profiler_signal): Rename from sigprof_handler_1,
1055 for consistency with other handlers. Do not check whether
1056 cpu_log is a hash-table if garbage collecting, since it
1057 doesn't matter in that case.
1058 (deliver_profiler_signal): Rename from sigprof_handler,
1059 for consistency with other handlers.
1060 (setup_cpu_timer): New function, with much of what used to be in
1061 Fprofiler_cpu_start. Check for out-of-range argument.
1062 Prefer timer_settime if available, and prefer
1063 thread cputime clocks, then process cputime clocks, then
1064 monotonic clocks, to the old realtime clock. Use make_timeval
1065 to round more-correctly when falling back to setitimer.
1066 (Fprofiler_cpu_start): Use it.
1067 (Fprofiler_cpu_stop): Prefer timer_settime if available.
1068 Don't assume that passing NULL as the 2nd argument of setitimer
1069 is the same as passing a pointer to all-zero storage.
1070 Ignore SIGPROF afterwards.
1071 (malloc_probe): Saturate at MOST_POSITIVE_FIXNUM.
1072 * sysdep.c (emacs_sigaction_init): Also mask out SIGPROF in
1073 non-fatal signal handlers. Ignore SIGPROF on startup.
1074 * syssignal.h (PROFILER_CPU_SUPPORT): Define this macro here, not
1075 in profiler.c, since sysdep.c now uses it.
1076
9d4dcdc9
PE
1077 * sysdep.c (handle_fatal_signal): Bump backtrace size to 40.
1078 Suggested by Eli Zaretskii in
1079 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00796.html>.
1080
8e5691a0
JB
10812012-09-29 Juanma Barranquero <lekktu@gmail.com>
1082
1083 * makefile.w32-in ($(BLD)/profiler.$(O)): Update dependencies.
1084
e7c1b6ef
SM
10852012-09-29 Stefan Monnier <monnier@iro.umontreal.ca>
1086
1087 * lisp.h (struct backtrace): Remove indirection for `function' field.
1088 * xdisp.c (redisplay_internal):
1089 * profiler.c (record_backtrace, sigprof_handler_1):
1090 * alloc.c (Fgarbage_collect):
1091 * eval.c (interactive_p, Fsignal, eval_sub, Ffuncall, Fbacktrace)
1092 (Fbacktrace_frame): Adjust accordingly.
1093
e61d39cd 10942012-09-28 Glenn Morris <rgm@gnu.org>
d393cefb
GM
1095
1096 * eval.c (Frun_hook_with_args, Frun_hook_with_args_until_success)
1097 (Frun_hook_with_args_until_failure): Doc fixes.
1098
404043ea
EZ
10992012-09-28 Eli Zaretskii <eliz@gnu.org>
1100
1101 * xdisp.c (syms_of_xdisp) <Qredisplay_internal>: Rename from
1102 Qautomatic_redisplay and change the symbol name. All users changed.
1103
704d3f45
TM
11042012-09-28 Tomohiro Matsuyama <tomo@cx4a.org>
1105
1106 * profiler.c (sigprof_handler): Fix race condition.
1107
757140ff
GM
11082012-09-28 Glenn Morris <rgm@gnu.org>
1109
1110 * lread.c (lisp_file_lexically_bound_p): Handle #! lines. (Bug#12528)
1111
a615a3ae
PE
11122012-09-27 Paul Eggert <eggert@cs.ucla.edu>
1113
1114 Check more robustly for timer_settime.
89d17fd0
PE
1115 * Makefile.in (LIB_TIMER_TIME): New macro.
1116 (LIBES): Add it.
a615a3ae
PE
1117 * atimer.c (alarm_timer, alarm_timer_ok, set_alarm, init_atimer):
1118 Use HAVE_TIMER_SETTIME, not SIGEV_SIGNAL, to decide whether to
1119 call timer_settime.
1120
3670daf7
TM
11212012-09-26 Tomohiro Matsuyama <tomo@cx4a.org>
1122
1123 * profiler.c (Fprofiler_cpu_start): Remove unnecessary flag SA_SIGINFO.
1124
6a586b7f
JB
11252012-09-26 Juanma Barranquero <lekktu@gmail.com>
1126
1127 * makefile.w32-in ($(BLD)/profiler.$(O)): Update dependencies.
1128
41c8bfcf
PE
11292012-09-26 Paul Eggert <eggert@cs.ucla.edu>
1130
1131 * character.h (MAYBE_UNIFY_CHAR): Remove.
1132 * charset.c, charset.h (maybe_unify_char): Now static.
1133 * charset.c (decode_char): Use maybe_unify_char, not MAYBE_UNIFY_CHAR.
1134 Since this stuff is now private to charset.c, there's no need for
1135 a public macro and no need to inline by hand.
1136
3a880af4
SM
11372012-09-26 Tomohiro Matsuyama <tomo@cx4a.org>
1138 Stefan Monnier <monnier@iro.umontreal.ca>
1139 Juanma Barranquero <lekktu@gmail.com>
611b7507 1140
3a880af4
SM
1141 * profiler.c: New file.
1142 * Makefile.in (base_obj): Add profiler.o.
611b7507
JB
1143 * makefile.w32-in (OBJ2, GLOBAL_SOURCES): Add profiler.c.
1144 ($(BLD)/profiler.$(O)): New target.
3a880af4
SM
1145 * emacs.c (main): Call syms_of_profiler.
1146 * alloc.c (Qautomatic_gc): New constant.
1147 (MALLOC_PROBE): New macro.
1148 (xmalloc, xzalloc, xrealloc, lisp_malloc, lisp_align_malloc): Use it.
1149 (total_bytes_of_live_objects): New function.
1150 (Fgarbage_collect): Use it. Record itself in backtrace_list.
1151 Call malloc_probe for the memory profiler.
1152 (syms_of_alloc): Define Qautomatic_gc.
1153 * eval.c (eval_sub, Ffuncall): Reorder assignments to avoid
1154 race condition.
1155 (struct backtrace): Move definition...
1156 * lisp.h (struct backtrace): ..here.
1157 (Qautomatic_gc, profiler_memory_running): Declare vars.
1158 (malloc_probe, syms_of_profiler): Declare functions.
1159 * xdisp.c (Qautomatic_redisplay): New constant.
1160 (redisplay_internal): Record itself in backtrace_list.
1161 (syms_of_xdisp): Define Qautomatic_redisplay.
611b7507 1162
5938d519 11632012-09-25 Eli Zaretskii <eliz@gnu.org>
b67238c2
JB
11642012-09-25 Juanma Barranquero <lekktu@gmail.com>
1165
1166 * makefile.w32-in ($(BLD)/callproc.$(O)): Update dependencies.
1167
e26fd2e4
PE
11682012-09-25 Paul Eggert <eggert@cs.ucla.edu>
1169
1170 Prefer POSIX timers if available.
1171 They avoid a race if the timer is too close to the current time.
1172 * atimer.c (alarm_timer, alarm_timer_ok) [SIGEV_SIGNAL]: New static vars.
1173 (set_alarm) [SIGEV_SIGNAL]: Use POSIX timers if available.
9180598c 1174 (init_atimer) [SIGEV_SIGNAL]: Initialize them.
e26fd2e4 1175
eedec3ee
EZ
11762012-09-25 Eli Zaretskii <eliz@gnu.org>
1177
1178 * coding.c (CHAR_STRING_ADVANCE_NO_UNIFY): Make it an alias of
1179 CHAR_STRING_ADVANCE.
1180 (STRING_CHAR_ADVANCE_NO_UNIFY): Make it an alias of
1181 STRING_CHAR_ADVANCE.
1182
aa15c6bb
JB
11832012-09-25 Juanma Barranquero <lekktu@gmail.com>
1184
1185 Move Vlibrary_cache to emacs.c and reset before dumping.
1186
1187 * lisp.h (reset_image_types): Declare.
1188 [WINDOWSNT] (Vlibrary_cache): Declare.
1189
1190 * image.c (reset_image_types): New function.
1191
1192 * emacs.c [WINDOWSNT] (Vlibrary_cache): Move from w32.c.
1193 (syms_of_emacs) [WINDOWSNT] <Vlibrary_cache>: Initialize and staticpro.
1194 (Fdump_emacs): Reset Vlibrary_cache and image_types.
1195
1196 * w32.c (Vlibrary_cache): Do not define; moved to emacs.c
1197 (globals_of_w32) <Vlibrary_cache>: Do not initialize.
1198
1199 * w32.h (Vlibrary_cache): Do not declare.
1200
54d629be
EZ
12012012-09-25 Eli Zaretskii <eliz@gnu.org>
1202
16b22fef
EZ
1203 * w32proc.c (sys_signal): Handle all signals defined by the
1204 MS-Windows runtime, not just SIGCHLD. Actually install the signal
1205 handlers for signals supported by Windows. Don't override
1206 term_ntproc as the handler for SIGABRT.
1207 (sigaction): Rewrite to call sys_signal instead of duplicating its
1208 code.
1209 (sys_kill): Improve commentary.
1210
1211 * w32.c (term_ntproc): Accept (and ignore) one argument, for
1212 consistency with a signature of a signal handler. All callers
1213 changed.
1214 (init_ntproc): Accept an argument DUMPING. If dumping, don't
1215 install term_ntproc as a signal handler for SIGABRT, as that
1216 should be done by the dumped Emacs.
1217
1218 * w32.h (init_ntproc, term_ntproc): Adjust prototypes.
1219
1220 * w32select.c (term_w32select): Protect against repeated
1221 invocation by setting clipboard_owner to NULL after calling
1222 DestroyWindow.
1223
1224 * emacs.c (shut_down_emacs, main): Adapt the calls to init_ntproc
1225 and term_ntproc to their modified signatures.
1226
54d629be
EZ
1227 * character.c (char_string, string_char): Remove calls to
1228 MAYBE_UNIFY_CHAR. See the discussion starting at
1229 http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00433.html
1230 for the details.
1231
59f7af81
CY
12322012-09-25 Chong Yidong <cyd@gnu.org>
1233
1234 * xdisp.c (mode_line_inverse_video): Delete obsolete variable.
1235
22e8cf4a
SM
12362012-09-24 Stefan Monnier <monnier@iro.umontreal.ca>
1237
1238 * bytecode.c (exec_byte_code): Signal an error instead of aborting,
1239 when encountering an unknown bytecode.
1240
578098f3
PE
12412012-09-24 Paul Eggert <eggert@cs.ucla.edu>
1242
1243 image.c, indent.c: Use bool for booleans.
1244 * dispextern.h (struct image_type): Members valid_p, load, init
1245 now return bool, not int. All uses changed.
1246 * image.c: Omit unnecessary static decls.
1247 (x_create_bitmap_mask, x_build_heuristic_mask):
1248 Return void, not int, since callers don't care about the return value.
1249 (x_create_bitmap_mask, define_image_type, valid_image_p)
1250 (struct image_keyword, parse_image_spec, image_spec_value)
1251 (check_image_size, image_background)
1252 (image_background_transparent, x_clear_image_1)
1253 (postprocess_image, lookup_image, x_check_image_size)
1254 (x_create_x_image_and_pixmap, xbm_image_p)
1255 (Create_Pixmap_From_Bitmap_Data, xbm_read_bitmap_data)
1256 (xbm_load_image, xbm_file_p, xbm_load, xpm_lookup_color)
1257 (init_xpm_functions, xpm_valid_color_symbols_p, xpm_image_p)
1258 (xpm_load, xpm_load_image, lookup_rgb_color, lookup_pixel_color)
1259 (x_to_xcolors, x_build_heuristic_mask, pbm_image_p, pbm_load)
1260 (png_image_p, init_png_functions, png_load_body, png_load)
1261 (jpeg_image_p, init_jpeg_functions, jpeg_load_body, jpeg_load)
1262 (tiff_image_p, init_tiff_functions, tiff_load, gif_image_p)
1263 (init_gif_functions, gif_load, imagemagick_image_p)
1264 (imagemagick_load_image, imagemagick_load, svg_image_p)
1265 (init_svg_functions, svg_load, svg_load_image, gs_image_p)
1266 (gs_load):
1267 * nsimage.m (ns_load_image):
1268 * nsterm.m (ns_defined_color):
1269 * xfaces.c (tty_lookup_color, tty_defined_color, defined_color):
1270 * xfns.c (x_defined_color):
1271 * xterm.c (x_alloc_lighter_color_for_widget)
1272 (x_alloc_nearest_color_1, x_alloc_nearest_color)
1273 (x_alloc_lighter_color):
1274 * indent.c (disptab_matches_widthtab, current_column)
1275 (scan_for_column, string_display_width, indented_beyond_p)
1276 (compute_motion, vmotion, Fvertical_motion):
1277 Use bool for booleans.
1278
a5f2b6ec
CY
12792012-09-24 Chong Yidong <cyd@gnu.org>
1280
1281 * chartab.c (Fset_char_table_default): Obsolete function removed.
1282
18e27ea8
PE
12832012-09-23 Paul Eggert <eggert@cs.ucla.edu>
1284
afea8a8a
PE
1285 Move pid_t related decls out of lisp.h.
1286 * lisp.h, syswait.h (record_child_status_change, wait_for_termination)
1287 (interruptible_wait_for_termination):
1288 Move these decls from lisp.h to syswait.h, since they use pid_t.
1289 Needed on FreeBSD; see Herbert J. Skuhra in
1290 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00571.html>.
1291 * callproc.c: Include syswait.h.
1292
18e27ea8
PE
1293 gnutls.c, gtkutil.c: Use bool for boolean.
1294 * gnutls.c (gnutls_global_initialized, init_gnutls_functions)
1295 (emacs_gnutls_handle_error):
1296 * gtkutil.c (xg_check_special_colors, xg_prepare_tooltip)
1297 (xg_hide_tooltip, xg_create_frame_widgets)
1298 (create_dialog, xg_uses_old_file_dialog)
1299 (xg_get_file_with_chooser, xg_get_file_with_selection)
1300 (xg_get_file_name, xg_have_tear_offs, create_menus, xg_create_widget)
1301 (xg_item_label_same_p, xg_update_menubar)
1302 (xg_modify_menubar_widgets, xg_event_is_for_menubar)
1303 (xg_ignore_gtk_scrollbar, xg_set_toolkit_scroll_bar_thumb)
1304 (xg_event_is_for_scrollbar, xg_pack_tool_bar, xg_make_tool_item)
1305 (is_box_type, xg_tool_item_stale_p, xg_update_tool_bar_sizes)
1306 (update_frame_tool_bar, free_frame_tool_bar):
1307 * gtkutil.c, w32term.c, xterm.c (x_wm_set_size_hint):
1308 * nsmenu.m (ns_update_menubar):
1309 * nsmenu.m, w32menu.c, xmenu.c (set_frame_menubar):
1310 * xfns.c (Fx_show_tip) [USE_GTK]:
1311 Use bool for boolean.
1312 * gtkutil.c (xg_update_frame_menubar):
1313 * xmenu.c (update_frame_menubar):
1314 Return void, not int, since caller ignores return value.
1315 * gtkutil.c (xg_change_toolbar_position):
1316 Return void, not 1.
1317
af0e9f75
JB
13182012-09-23 Juanma Barranquero <lekktu@gmail.com>
1319
1320 * makefile.w32-in (BLOCKINPUT_H): Remove.
1321 (SYSSIGNAL_H): New macro.
1322 ($(BLD)/alloc.$(O), $(BLD)/atimer.$(O), $(BLD)/buffer.$(O))
1323 ($(BLD)/callproc.$(O), $(BLD)/data.$(O), $(BLD)/dired.$(O))
1324 ($(BLD)/dispnew.$(O), $(BLD)/editfns.$(O), $(BLD)/emacs.$(O))
1325 ($(BLD)/eval.$(O), $(BLD)/fileio.$(O), $(BLD)/floatfns.$(O))
1326 ($(BLD)/fns.$(O), $(BLD)/fontset.$(O), $(BLD)/frame.$(O))
1327 ($(BLD)/fringe.$(O), $(BLD)/image.$(O), $(BLD)/insdel.$(O))
1328 ($(BLD)/keyboard.$(O), $(BLD)/keymap.$(O), $(BLD)/lread.$(O))
1329 ($(BLD)/menu.$(O), $(BLD)/w32inevt.$(O), $(BLD)/w32proc.$(O))
1330 ($(BLD)/print.$(O), $(BLD)/process.$(O), $(BLD)/ralloc.$(O))
1331 ($(BLD)/search.$(O), $(BLD)/sound.$(O), $(BLD)/sysdep.$(O))
1332 ($(BLD)/term.$(O), $(BLD)/window.$(O), $(BLD)/xdisp.$(O))
1333 ($(BLD)/xfaces.$(O), $(BLD)/w32fns.$(O), $(BLD)/w32menu.$(O))
1334 ($(BLD)/w32term.$(O), $(BLD)/w32select.$(O), $(BLD)/w32reg.$(O))
1335 ($(BLD)/w32xfns.$(O)): Update dependencies.
1336
5101529e
EZ
13372012-09-23 Eli Zaretskii <eliz@gnu.org>
1338
1339 * .gdbinit: Set breakpoint on terminate_due_to_signal, not on
1340 fatal_error_backtrace.
1341
1342 * w32proc.c (sys_kill): Undo last change: don't do anything when
1343 invoked to deliver SIGABRT to our own process. This is now
1344 handled by emacs_raise.
1345
2c3ee0ad
JB
13462012-09-23 Juanma Barranquero <lekktu@gmail.com>
1347
1348 * w32term.c (w32_read_socket): Remove leftover reference to
1349 interrupt_input_pending.
1350
62a1d661
PE
13512012-09-23 Paul Eggert <eggert@cs.ucla.edu>
1352
1353 Do not use SA_NODEFER.
1354 Problem reported by Dani Moncayo in
1355 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00557.html>.
1356 * alloc.c (die):
1357 * sysdep.c (emacs_abort): Do not reset signal handler.
1358 * emacs.c (terminate_due_to_signal): Reset signal handler here.
1359 * sysdep.c (init_signals): Do not use SA_NODEFER. It wasn't
1360 wanted even on POSIXish hosts, and it doesn't work on Windows.
1361
a0942b9a
JD
13622012-09-23 Jan Djärv <jan.h.d@swipnet.se>
1363
1364 * xterm.c (x_term_init): Call fixup_locale before and after calling
1365 gtk_init (Bug#12392).
1366
d07ff9db
CY
13672012-09-23 Chong Yidong <cyd@gnu.org>
1368
1369 * w32.c (w32_delayed_load): Remove LIBRARIES argument; always use
1370 Vdynamic_library_alist.
1371
1372 * gnutls.c (init_gnutls_functions): Caller changed; remove arg.
1373 (Fgnutls_available_p): Caller changed.
1374
1375 * xml.c (init_libxml2_functions, Flibxml_parse_html_region)
1376 (Flibxml_parse_xml_region): Likewise.
1377
1378 * dispextern.h (struct image_type): Remove arg from init function.
1379
1380 * image.c (Finit_image_library, lookup_image_type)
1381 (define_image_type): Remove now-unneeded second arg.
1382 (init_xpm_functions, init_png_functions, init_jpeg_functions)
1383 (init_tiff_functions, init_gif_functions, init_svg_functions):
1384 Arglist and w32_delayed_load calling convention changed.
1385 (gs_type): Remove init_gs_functions; there is no such function.
641cfd14 1386 (valid_image_p, make_image): Fix caller to lookup_image_type.
d07ff9db 1387
4d7e6e51
PE
13882012-09-23 Paul Eggert <eggert@cs.ucla.edu>
1389
1390 Simplify and avoid signal-handling races (Bug#12471).
1391 * alloc.c (die):
1392 * sysdep.c (emacs_abort) [HAVE_NTGUI]:
1393 Avoid recursive loop if there's a fatal error in the function itself.
1394 * atimer.c (pending_atimers):
1395 * blockinput.h: Don't include "atimer.h"; no longer needed.
1396 (interrupt_input_pending): Remove. All uses removed.
1397 pending_signals now counts both atimers and ordinary interrupts.
1398 This is less racy than having three separate pending-signal flags.
1399 (block_input, unblock_input, totally_unblock_input, unblock_input_to)
1400 (input_blocked_p):
1401 Rename from their upper-case counterparts BLOCK_INPUT,
1402 UNBLOCK_INPUT, TOTALLY_UNBLOCK_INPUT, UNBLOCK_INPUT_TO,
1403 INPUT_BLOCKED_P, and turn into functions. All uses changed.
1404 This makes it easier to access volatile variables more accurately.
1405 (BLOCK_INPUT_RESIGNAL): Remove. All uses replaced by unblock_input ().
1406 (input_blocked_p): Prefer this to 'interrupt_input_blocked', as
1407 that's more reliable if the code is buggy and sets
1408 interrupt_input_blocked to a negative value. All uses changed.
1409 * atimer.c (deliver_alarm_signal):
1410 Remove. No need to deliver this to the parent; any thread can
1411 handle this signal now. All uses replaced by underlying handler.
1412 * atimer.c (turn_on_atimers):
1413 * dispnew.c (handle_window_change_signal):
1414 * emacs.c (handle_danger_signal):
1415 * keyboard.c (kbd_buffer_get_event):
1416 Don't reestablish signal handler; not needed with sigaction.
1417 * blockinput.h (UNBLOCK_INPUT_TO, TOTALLY_UNBLOCK_INPUT)
1418 (UNBLOCK_INPUT_TO):
1419 Rework to avoid unnecessary accesses to volatile variables.
1420 (UNBLOCK_INPUT_TO): Now a function.
1421 (totally_unblock_input, unblock_input): New decls.
1422 * data.c (handle_arith_signal, deliver_arith_signal): Move to sysdep.c
1423 (init_data): Remove. Necessary stuff now done in init_signal.
1424 * emacs.c, xdisp.c: Include "atimer.h", since we invoke atimer functions.
1425 * emacs.c (handle_fatal_signal, deliver_fatal_signal): Move to sysdep.c.
1426 (fatal_error_code): Remove; no longer needed.
1427 (terminate_due_to_signal): Rename from fatal_error_backtrace, since
1428 it doesn't always backtrace. All uses changed. No need to reset
1429 signal to default, since sigaction and/or die does that for us now.
1430 Use emacs_raise (FOO), not kill (getpid (), FOO).
1431 (main): Check more-accurately whether we're dumping.
1432 Move fatal-error setup to sysdep.c
1433 * floatfns.c: Do not include "syssignal.h"; no longer needed.
1434 * gtkutil.c (xg_get_file_name, xg_get_font):
1435 Remove no-longer-needed signal-mask manipulation.
1436 * keyboard.c, process.c (POLL_FOR_INPUT):
1437 Don't depend on USE_ASYNC_EVENTS, a symbol that is never defined.
1438 * keyboard.c (read_avail_input): Remove.
1439 All uses replaced by gobble_input.
1440 (Ftop_level): Use TOTALLY_UNBLOCK_INPUT rather than open code.
1441 (kbd_buffer_store_event_hold, gobble_input):
1442 (record_asynch_buffer_change) [USABLE_SIGIO]:
1443 (store_user_signal_events):
1444 No need to mess with signal mask.
1445 (gobble_input): If blocking input and there are terminals, simply
1446 set pending_signals to 1 and return. All hooks changed to not
1447 worry about whether input is blocked.
1448 (process_pending_signals): Clear pending_signals before processing
1449 them, in case a signal comes in while we're processing.
1450 By convention callers now test pending_signals before calling us.
1451 (UNBLOCK_INPUT_TO, unblock_input, totally_unblock_input):
1452 New functions, to support changes to blockinput.h.
1453 (handle_input_available_signal): Now extern.
1454 (reinvoke_input_signal): Remove. All uses replaced by
1455 handle_async_input.
1456 (quit_count): Now volatile, since a signal handler uses it.
3a880af4
SM
1457 (handle_interrupt): Now takes bool IN_SIGNAL_HANDLER as arg.
1458 All callers changed. Block SIGINT only if not already blocked.
4d7e6e51
PE
1459 Clear sigmask reliably, even if Fsignal returns, which it can.
1460 Omit unnecessary accesses to volatile var.
1461 (quit_throw_to_read_char): No need to restore sigmask.
1462 * keyboard.c (gobble_input, handle_user_signal):
1463 * process.c (wait_reading_process_output):
1464 Call signal-handling code rather than killing ourselves.
1465 * lisp.h: Include <float.h>, for...
1466 (IEEE_FLOATING_POINT): New macro, moved here to avoid duplication.
1467 (pending_signals): Now volatile.
1468 (syms_of_data): Now const if IEEE floating point.
1469 (handle_input_available_signal) [USABLE_SIGIO]:
1470 (terminate_due_to_signal, record_child_status_change): New decls.
1471 * process.c (create_process): Avoid disaster if memory is exhausted
1472 while we're processing a vfork, by tightening the critical section
1473 around the vfork.
1474 (send_process_frame, process_sent_to, handle_pipe_signal)
1475 (deliver_pipe_signal): Remove. No longer needed, as Emacs now
1476 ignores SIGPIPE.
1477 (send_process): No need for setjmp/longjmp any more, since the
1478 SIGPIPE stuff is now gone. Instead, report an error if errno
1479 is EPIPE.
1480 (record_child_status_change): Now extern. PID and W are now args.
1481 Return void, not bool. All callers changed.
1482 * sysdep.c (wait_debugging) [(BSD_SYSTEM || HPUX) && !defined (__GNU__)]:
1483 Remove. All uses removed. This bug should be fixed now in a
1484 different way.
1485 (wait_for_termination_1): Use waitpid rather than sigsuspend,
1486 and record the child status change directly. This avoids the
1487 need to futz with the signal mask.
1488 (process_fatal_action): Move here from emacs.c.
1489 (emacs_sigaction_flags): New function, containing
1490 much of what used to be in emacs_sigaction_init.
1491 (emacs_sigaction_init): Use it. Block nonfatal system signals that are
1492 caught by emacs, to make races less likely.
1493 (deliver_process_signal): Rename from handle_on_main_thread.
1494 All uses changed.
1495 (BACKTRACE_LIMIT_MAX): Now at top level.
1496 (thread_backtrace_buffer, threadback_backtrace_pointers):
1497 New static vars.
1498 (deliver_thread_signal, deliver_fatal_thread_signal):
1499 New functions, for more-accurate delivery of thread-specific signals.
1500 (handle_fatal_signal, deliver_fatal_signal): Move here from emacs.c.
1501 (deliver_arith_signal): Handle in this thread, not
1502 in the main thread, since it's triggered by this thread.
1503 (maybe_fatal_sig): New function.
1504 (init_signals): New arg DUMPING so that we can be more accurate
1505 about whether we're dumping. Caller changed.
1506 Treat thread-specific signals differently from process-general signals.
1507 Block all signals while handling fatal error; that's safer.
1508 xsignal from SIGFPE only on non-IEEE hosts, treating it as fatal
1509 on IEEE hosts.
1510 When batch, ignore SIGHUP, SIGINT, SIGTERM if they were already ignored.
1511 Ignore SIGPIPE unless batch.
1512 (emacs_backtrace): Output backtrace for the appropriate thread,
1513 which is not necessarily the main thread.
1514 * syssignal.h: Include <stdbool.h>.
1515 (emacs_raise): New macro.
1516 * xterm.c (x_connection_signal): Remove; no longer needed
1517 now that we use sigaction.
1518 (x_connection_closed): No need to mess with sigmask now.
1519 (x_initialize): No need to reset SIGPIPE handler here, since
1520 init_signals does this for us now.
1521
8f4635e9
JD
15222012-09-23 Jan Djärv <jan.h.d@swipnet.se>
1523
1524 * nsterm.m (ns_dumpglyphs_image): dr is a new rect to draw image into,
fb39b937 1525 background rect may be larger (Bug#12245).
8f4635e9 1526
3296976d
CY
15272012-09-23 Chong Yidong <cyd@gnu.org>
1528
1529 * keyboard.c (timer_check): Avoid quitting during Fcopy_sequence.
1530
d41e491e
PE
15312012-09-22 Paul Eggert <eggert@cs.ucla.edu>
1532
1533 * .gdbinit: Just stop at fatal_error_backtrace.
1534 See Stefan Monnier's request in
1535 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00549.html>.
1536 Remove no-longer-used query of system type.
1537
c88b867f
CY
15382012-09-22 Chong Yidong <cyd@gnu.org>
1539
1540 * search.c (Freplace_match): Doc fix (Bug#12325).
1541
1542 * minibuf.c (Finternal_complete_buffer): Doc fix (Bug#12391).
1543
1544 * editfns.c (Fline_beginning_position): Doc fix (Bug#12416).
1545 (Fline_end_position): Doc fix.
1546
1547 * cmds.c (Fforward_char, Fbackward_char): Doc fix (Bug#12414).
1548
bb4d86b4
CY
15492012-09-22 Chong Yidong <cyd@gnu.org>
1550
1551 * dispextern.h (struct image_type): Add new slot, storing a type
1552 initialization function.
1553
1554 * image.c (define_image_type): Call the image initializer function
1555 if it is defined. Arguments and return value changed.
1556 (valid_image_p, make_image): Callers changed.
1557 (xbm_type, xpm_type, pbm_type, png_type, jpeg_type, tiff_type)
3a880af4
SM
1558 (gif_type, imagemagick_type, svg_type, gs_type):
1559 Add initialization functions.
bb4d86b4
CY
1560 (Finit_image_library): Call lookup_image_type.
1561 (CHECK_LIB_AVAILABLE): Macro deleted.
1562 (lookup_image_type): Call define_image_type here, rather than via
1563 Finit_image_library, and without using CHECK_LIB_AVAILABLE.
1564 (syms_of_image): Move define_image_type calls for xbm_type and
1565 pbm_type to lookup_image_type.
1566
df9685f3
EZ
15672012-09-22 Eli Zaretskii <eliz@gnu.org>
1568
1569 * keyboard.c (timer_check_2): Move calculation of 'timers' and
1570 'idle_timers' from here ...
1571 (timer_check): ... to here. Use Fcopy_sequence to copy the timer
1572 lists, to avoid infloops when the timer does something stupid,
1573 like reinvoke itself with the same or smaller time-out.
1574 (Bug#12447)
1575
8e17c9ba
MR
15762012-09-22 Martin Rudalics <rudalics@gmx.at>
1577
1578 * window.c (Fsplit_window_internal): Handle only Qt value of
1579 Vwindow_combination_limit separately.
1580 (Qtemp_buffer_resize): New symbol.
3a880af4
SM
1581 (Vwindow_combination_limit): New default value.
1582 Rewrite doc-string.
8e17c9ba 1583
589bd69b
EZ
15842012-09-22 Eli Zaretskii <eliz@gnu.org>
1585
1586 * xdisp.c (next_overlay_string): Initialize it->end_charpos for
1587 the new overlay string. (Bug#10159)
1588
01108e3f
PE
15892012-09-22 Paul Eggert <eggert@cs.ucla.edu>
1590
1591 * emacs.c (shut_down_emacs): Don't assume stderr is buffered,
1592 or that fprintf is async-signal-safe. POSIX doesn't require
1593 either assumption.
1594
82f8cd94
CY
15952012-09-22 Chong Yidong <cyd@gnu.org>
1596
1597 * buffer.c (Fset_buffer_modified_p): Handle indirect buffers
1598 (Bug#8207).
1599
3cccbd87
KH
16002012-09-22 Kenichi Handa <handa@gnu.org>
1601
1602 * composite.c (composition_reseat_it): Handle the case that a
1603 grapheme cluster is not covered by a single font (Bug#12352).
1604
09c01941
CY
16052012-09-21 Chong Yidong <cyd@gnu.org>
1606
1607 * image.c (define_image_type): Avoid adding duplicate types to
1608 image_types (Bug#12463). Suggested by Jörg Walter.
1609
acfa068f 16102012-09-21 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
e25c1a30
YM
1611
1612 * unexmacosx.c: Define LC_DATA_IN_CODE if not defined.
1613 (print_load_command_name): Add case LC_DATA_IN_CODE.
1614 (dump_it) [LC_DATA_IN_CODE]: Call copy_linkedit_data.
1615
acfa068f 16162012-09-21 Glenn Morris <rgm@gnu.org>
1e9bbf47
GM
1617
1618 * eval.c (Frun_hook_with_args_until_success)
1619 (Frun_hook_with_args_until_failure): Doc fixes. (Bug#12393)
1620
acfa068f 16212012-09-21 Andreas Schwab <schwab@linux-m68k.org>
c6ba4138
AS
1622
1623 * fileio.c (Ffile_selinux_context): Only call freecon when
1624 lgetfilecon succeeded.
1625 (Fset_file_selinux_context): Likewise. (Bug#12444)
1626
acfa068f 16272012-09-21 Eli Zaretskii <eliz@gnu.org>
aa36e4d2
EZ
1628
1629 * xdisp.c (try_window_reusing_current_matrix): Under bidi
1630 reordering, locate the cursor by calling set_cursor_from_row; if
1631 that fails, clear the desired glyph matrix before returning a
1632 failure indication to the caller. Fixes leaving garbled display
1633 when fast scrolling with a down-key. (Bug#12403)
f2016bea
EZ
1634 (compute_stop_pos_backwards): Fix a typo that caused crashes while
1635 scrolling through multibyte text.
aa36e4d2 1636
e99f70c8
SM
16372012-09-20 Stefan Monnier <monnier@iro.umontreal.ca>
1638
1639 * alloc.c (mark_object) <PVEC_WINDOW>: Mark prev/next_buffers *after*
1640 calling mark_vectorlike since that's the one that marks the window.
1641 (mark_discard_killed_buffers): Mark the final cdr.
1642 * window.h (struct window): Move prev/next_buffers to the
1643 non-standard fields.
1644 * window.c (make_window): Initialize prev/next_buffers manually.
1645
f75beb47
PE
16462012-09-20 Paul Eggert <eggert@cs.ucla.edu>
1647
1648 Omit unused arg EXPECTED from socket hooks.
1649 * keyboard.c (gobble_input, read_avail_input, tty_read_avail_input):
1650 * nsterm.m (ns_term_init):
1651 * termhooks.h (struct terminal.read_socket_hook):
1652 * w32inevt.c (w32_console_read_socket):
1653 * w32term.c (w32_read_socket):
1654 * xterm.c (XTread_socket):
1655 Omit unused arg EXPECTED. All callers changed.
1656 (store_user_signal_events): Return void, not int, since callers no
1657 longer care about the return value. All uses changed.
1658
b019b76a
JB
16592012-09-20 Juanma Barranquero <lekktu@gmail.com>
1660
1661 * w32gui.h (XParseGeometry): Do not declare.
1662
05642592
PE
16632012-09-19 Paul Eggert <eggert@cs.ucla.edu>
1664
e4bce92a 1665 * w32inevt.c (w32_console_read_socket): Return -1 on failure, not 0.
1f9f395d 1666 Ignore 'expected'. See Eli Zaretskii in
e4bce92a
PE
1667 <http://bugs.gnu.org/12471#8> (last line).
1668
05642592
PE
1669 * frame.c (read_integer): Remove. All uses replaced by strtol/strtoul.
1670 (XParseGeometry): Now static. Substitute extremal values for
1671 values that are out of range.
1672
e543ae91
JD
16732012-09-19 Jan Djärv <jan.h.d@swipnet.se>
1674
1675 * w32xfns.c (read_integer, XParseGeometry): Move to frame.c.
1676
1677 * nsfns.m (XParseGeometry): Remove.
1678 (Fx_create_frame): Call x_set_offset to correctly interpret
1679 top_pos in geometry.
1680
3a880af4 1681 * frame.c (read_integer, XParseGeometry): Move from w32xfns.c.
e543ae91
JD
1682 (Fx_parse_geometry): If there is a space in string, call
1683 Qns_parse_geometry, otherwise do as on other terms (Bug#12368).
1684
45ba16c7
EZ
16852012-09-17 Eli Zaretskii <eliz@gnu.org>
1686
c8b9f1bc
EZ
1687 * search.c (scan_buffer): Use character positions in calls to
1688 region_cache_forward and region_cache_backward, not byte
1689 positions. (Bug#12196)
1690
b4c932a2
EZ
1691 * w32term.c (w32_read_socket): Set pending_signals to 1, like
1692 xterm.c does. Reported by Daniel Colascione <dancol@dancol.org>.
1693
45ba16c7
EZ
1694 * ralloc.c (r_alloc_init) [!SYSTEM_MALLOC]: Initialize
1695 __malloc_extra_blocks to 32 instead of 64, like alloc.c did in
1696 emacs_blocked_malloc, now deleted.
1697
eeceac93
PE
16982012-09-17 Paul Eggert <eggert@cs.ucla.edu>
1699
1700 Remove no-longer-needed Solaris 2.4 vfork bug workaround.
1701 The workaround was for improving performance on Solaris 2.4, but
1702 is getting in the way now. Emacs will still work if someone is
1703 still running Solaris 2.4 in a museum somewhere; Sun dropped
1704 support for Solaris 2.4 in 2003.
1705 * callproc.c (Fcall_process) [HAVE_WORKING_VFORK]:
1706 * process.c (create_process) [HAVE_WORKING_VFORK]:
1707 Omit now-unnecessary workaround for the Solaris 2.4 vfork bug,
1708 since Emacs no longer uses vfork on that platform.
1709
78f83752
GM
17102012-09-17 Glenn Morris <rgm@gnu.org>
1711
1712 * emacs.c: Use COPYRIGHT.
1713
634b8cac
PE
17142012-09-16 Paul Eggert <eggert@cs.ucla.edu>
1715
0caaedb1
PE
1716 Remove configure's --without-sync-input option (Bug#12450).
1717 When auditing signal-handling in preparation for cleaning it up,
1718 I found that SYNC_INPUT has race conditions and would be a real
1719 pain to fix. Since it's an undocumented and deprecated
1720 configure-time option, now seems like a good time to remove it.
1721 Also see <http://bugs.gnu.org/11080#16>.
1722 * alloc.c (_bytes_used, __malloc_extra_blocks, _malloc_internal)
1723 (_free_internal) [!DOUG_LEA_MALLOC]: Remove decls.
1724 (alloc_mutex) [!SYSTEM_MALLOC && !SYNC_INPUT && HAVE_PTHREAD]:
1725 (malloc_hysteresis):
1726 (check_depth) [XMALLOC_OVERRUN_CHECK]:
1727 (MALLOC_BLOCK_INPUT, MALLOC_UNBLOCK_INPUT):
1728 (__malloc_hook, __realloc_hook, __free_hook, BYTES_USED)
1729 (dont_register_blocks, bytes_used_when_reconsidered)
1730 (bytes_used_when_full, emacs_blocked_free, emacs_blocked_malloc)
1731 (emacs_blocked_realloc, reset_malloc_hooks, uninterrupt_malloc):
1732 [!SYSTEM_MALLOC && !SYNC_INPUT]:
1f9f395d 1733 Remove. All uses removed.
0caaedb1
PE
1734 (MALLOC_BLOCK_INPUT, MALLOC_UNBLOCK_INPUT): Use a different
1735 implementation, one that depends on whether the new macro
1736 XMALLOC_BLOCK_INPUT_CHECK is defined, not on whether SYNC_INPUT
1737 is defined.
1738 * atimer.c (run_timers, handle_alarm_signal):
1739 * keyboard.c (pending_signal, poll_for_input_1, poll_for_input)
1740 (handle_async_input, process_pending_signals)
1741 (handle_input_available_signal, init_keyboard):
1742 * nsterm.m (ns_read_socket):
1743 * process.c (wait_reading_process_output):
1744 * regex.c (immediate_quit, IMMEDIATE_QUIT_CHECK):
1745 * sysdep.c (emacs_sigaction_init) [SA_RESTART]:
1746 (emacs_write):
1747 * xterm.c (XTread_socket):
1748 Assume SYNC_INPUT.
1749 * conf_post.h (SA_RESTART) [IRIX6_5]: Do not #undef.
1750 * eval.c (handling_signal): Remove. All uses removed.
1751 * lisp.h (ELSE_PENDING_SIGNALS): Remove.
1752 All uses replaced with the SYNC_INPUT version.
1753 (reset_malloc_hooks, uninterrupt_malloc, handling_signal):
1754 Remove decls.
1755 * sysdep.c, syssignal.h (main_thread) [FORWARD_SIGNAL_TO_MAIN_THREAD]:
1756 Now static.
1757
634b8cac
PE
1758 * font.c (Ffont_shape_gstring): Remove unused local.
1759
83da1b55
GM
17602012-09-16 Glenn Morris <rgm@gnu.org>
1761
518650a5
GM
1762 * Makefile.in (clean): No longer run nextstep's clean.
1763
83da1b55
GM
1764 * Makefile.in (ns_appdir, ns_appbindir, ns_appsrc): Remove variables.
1765 (ns_frag): Remove.
1766 (ns-app): Move here from ns.mk, and simplify.
1767 (clean): Simplify nextstep entry.
1768 * ns.mk: Remove file.
1769
85a43e2e
KH
17702012-09-17 Kenichi Handa <handa@gnu.org>
1771
1772 * font.c (Ffont_shape_gstring): Fix previous change; GLYPHs may
1773 not covert the last few charactes.
1774
ba13e616 17752012-09-16 Kenichi Handa <handa@gnu.org>
ea964864
KH
1776
1777 * font.c (Ffont_shape_gstring): Don't adjust grapheme cluster
1778 here, but just check the validity of glyphs in the glyph-string.
1779
a8c729af
MR
17802012-09-16 Martin Rudalics <rudalics@gmx.at>
1781
3a880af4
SM
1782 * window.c (Fwindow_parameter, Fset_window_parameter):
1783 Accept any window as argument (Bug#12452).
a8c729af 1784
c077c059
JD
17852012-09-16 Jan Djärv <jan.h.d@swipnet.se>
1786
1787 * nsfns.m (Fx_open_connection): Move initialization of ns_*_types
1788 to ns_term_init to avoid memory leak.
1789
1790 * nsterm.m (ns_update_begin): Initialize bp after lcokFocus, use
1791 explicit retain/release.
1792 (ns_term_init): Only allow one display. Initialize outerpool and
1793 ns_*_types.
1794
39a57ad0
PE
17952012-09-15 Paul Eggert <eggert@cs.ucla.edu>
1796
1797 Port _setjmp fix to POSIXish hosts as well as Microsoft.
1798 * image.c (_setjmp) [!HAVE__SETJMP]: Restore definition, as
1799 it's needed on POSIXish hosts that lack _setjmp. Attempt to solve
1800 the Microsoft problem in a different way, by altering ../nt/config.nt.
1801
7105c8cb
EZ
18022012-09-15 Eli Zaretskii <eliz@gnu.org>
1803
1804 * w32xfns.c:
1805 * w32uniscribe.c:
1806 * w32term.c:
1807 * w32select.c:
1808 * w32reg.c:
1809 * w32proc.c:
1810 * w32menu.c:
1811 * w32inevt.c:
1812 * w32heap.c:
1813 * w32font.c:
1814 * w32fns.c:
1815 * w32console.c:
1816 * w32.c:
1817 * w16select.c: Remove inclusion of setjmp.h, as it is now included
1818 by lisp.h. This completes removal of setjmp.h inclusion
1819 erroneously announced in the previous commit. (Bug#12446)
1820
1821 * lisp.h [!HAVE__SETJMP, !HAVE_SIGSETJMP]: Make the commentary
1822 more accurate.
1823
1824 * image.c (_setjmp) [!HAVE__SETJMP]: Define only if 'setjmp' is
1825 not defined as a macro. The latter happens on MS-Windows.
1826 (Bug#12446)
1827
0328b6de
PE
18282012-09-15 Paul Eggert <eggert@cs.ucla.edu>
1829
1830 Port better to POSIX hosts lacking _setjmp (Bug#12446).
1831 * lisp.h: Include <setjmp.h> here, since we use its symbols here.
7105c8cb 1832 Some instances of '#include <setjmp.h>' removed, if the
0328b6de
PE
1833 only reason for the instance was because "lisp.h" was included.
1834 (sys_jmp_buf, sys_setjmp, sys_longjmp): New symbols.
1835 Unless otherwise specified, replace all uses of jmp_buf, _setjmp,
1836 and _longjmp with the new symbols. Emacs already uses _setjmp if
1837 available, so this change affects only POSIXish hosts that have
1838 sigsetjmp but not _setjmp, such as some versions of Solaris and
1839 Unixware. (Also, POSIX-2008 marks _setjmp as obsolescent.)
1840 * image.c (_setjmp, _longjmp) [HAVE_PNG && !HAVE__SETJMP]: New macros.
1841 (png_load_body) [HAVE_PNG]:
1842 (PNG_LONGJMP) [HAVE_PNG && PNG_LIBPNG_VER < 10500]:
1843 (PNG_JMPBUF) [HAVE_PNG && PNG_LIBPNG_VER >= 10500]:
1844 Use _setjmp and _longjmp rather than sys_setjmp and sys_longjmp,
1845 since PNG requires jmp_buf. This is the only exception to the
1846 general rule that we now use sys_setjmp and sys_longjmp.
1847 This exception is OK since this code does not change the signal
1848 mask or longjmp out of a signal handler.
1849
2af03429
PE
18502012-09-14 Paul Eggert <eggert@cs.ucla.edu>
1851
1852 * alloc.c [!SYSTEM_MALLOC && !SYNC_INPUT && HAVE_PTHREAD]:
1853 Include "syssignal.h", for 'main_thread'.
1854
2f294edf
DA
18552012-09-14 Dmitry Antipov <dmantipov@yandex.ru>
1856
1857 Avoid out-of-range marker position (Bug#12426).
3a880af4
SM
1858 * insdel.c (replace_range, replace_range_2):
1859 Adjust markers before overlays, as suggested by comments.
2f294edf
DA
1860 (insert_1_both, insert_from_buffer_1, adjust_after_replace):
1861 Remove redundant check before calling offset_intervals.
1862
6b533e9c
MR
18632012-09-14 Martin Rudalics <rudalics@gmx.at>
1864
1865 * xdisp.c (Fformat_mode_line): Unconditionally save/restore
1866 current buffer (Bug#12387).
1867
2a7931e3
JB
18682012-09-14 Juanma Barranquero <lekktu@gmail.com>
1869
1870 * makefile.w32-in ($(BLD)/alloc.$(O)): Update dependencies.
1871
c18e885b
PE
18722012-09-13 Paul Eggert <eggert@cs.ucla.edu>
1873
1874 Use a more backwards-compatible timer format (Bug#12430).
1875 * keyboard.c (decode_timer): Get PSECS from the 8th (origin-0)
1876 vector element, not from the 4th, since PSECS is now at the end.
1877 (Fcurrent_idle_time): Doc fix.
1878
d59a1afb
DA
18792012-09-13 Dmitry Antipov <dmantipov@yandex.ru>
1880
1881 Function to mark objects and remove killed buffers at once.
1882 * alloc.c (discard_killed_buffers): Rename to ...
1883 (mark_discard_killed buffers) ... new name. Add marking
1884 of remaining objects. Fix comment. Adjust users.
1885 (mark_object): Do not touch frame buffer lists here.
1886 * frame.c (delete_frame): Reset frame buffer lists here.
1887
5f0cb45a
PE
18882012-09-13 Paul Eggert <eggert@cs.ucla.edu>
1889
8ea47e3a
PE
1890 Better workaround for GNOME bug when --enable-gcc-warnings.
1891 * emacsgtkfixed.c (G_STATIC_ASSERT): Remove, undoing last change.
1892 Instead, disable -Wunused-local-typedefs. See Dmitry Antipov in
1893 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00335.html>.
1894
4a4bbad2
PE
1895 Simplify SIGIO usage (Bug#12408).
1896 The code that dealt with SIGIO was crufty and confusing, e.g., it
1897 played tricks like "#undef SIGIO" but these tricks were not used
1898 consistently. Simplify mostly by not #undeffing standard symbols,
1899 e.g., use "defined USABLE_SIGIO" (our symbol, which we can define
1900 or not as we please) rather than "defined SIGIO" (standard symbol
1901 that we probably shouldn't #undef).
1902 * conf_post.h [USG5_4]: Do not include <sys/wait.h> here.
1903 Modules that need it can include it.
1904 [USG5_4 && emacs]: Likewise, do not include the streams stuff here.
1905 * dispextern.h (ignore_sigio): New decl.
1906 * emacs.c (shut_down_emacs): Invoke unrequest_sigio
1907 unconditionally, since it's now a no-op if !USABLE_SIGIO.
1908 * emacs.c (shut_down_emacs):
1909 * keyboard.c (kbd_buffer_store_event_hold):
1910 Use ignore_sigio rather than invoking 'signal' directly.
1911 * keyboard.c (USABLE_FIONREAD && USG5_4): Include <sys/filio.h>,
1912 for FIONREAD.
1913 (FIONREAD, SIGIO): Do not #undef.
1914 (tty_read_avail_input): Use #error rather than a syntax error.
1915 * process.c [USG5_4]: Include <sys/stream.h> and <sys/stropts.h>,
1916 for I_PIPE, used by SETUP_SLAVE_PTY.
1917 (DATAGRAM_SOCKETS): Simplify defn, based on USABLE_FIONREAD.
1918 * sysdep.c (croak): Remove; no longer needed. This bit of
1919 temporary code, with Fred N. Fish's comment that it's temporary,
1920 has been in Emacs since at least 1992!
1921 (init_sigio, reset_sigio, request_sigio, unrequest_sigio):
1922 Arrange for them to be no-ops in all cases when ! USABLE_SIGIO.
1923 * syssignal.h (croak): Remove decl.
1924 (SIGIO, SIGPOO, SIGAIO, SIGPTY): Do not #undef; that's too fragile.
1925 * systty.h [!NO_TERMIO]: Do not include <termio.h>; no longer needed
1926 now that we're termios-only.
1927 (FIONREAD, ASYNC) [BROKEN_FIONREAD]: Do not #undef.
1928 * term.c (dissociate_if_controlling_tty): Use #error rather than
1929 a run-time error.
1930
5f0cb45a
PE
1931 Work around GCC and GNOME bugs when --enable-gcc-warnings.
1932 * emacsgtkfixed.c (G_STATIC_ASSERT): Redefine to use 'verify',
1933 to work around GNOME bug 683906.
1934 * image.c (jpeg_load_body) [HAVE_JPEG && lint]: Pacify gcc -Wclobber.
1935 (struct my_jpeg_error_mgr) [HAVE_JPEG && lint]: New member fp.
1936 This works around GCC bug 54561.
1937
40bce90b
PE
19382012-09-12 Paul Eggert <eggert@cs.ucla.edu>
1939
1940 More fixes for 'volatile' and setjmp/longjmp.
1941 * eval.c (Fdefvar, Fcondition_case): Remove unnecessary 'volatile's.
1942 * image.c (struct png_load_context) [HAVE_PNG]: New type.
1943 (png_load_body) [HAVE_PNG]:
1944 (jpeg_load_body) [HAVE_JPEG]:
1945 New function, with most of the old parent function's body.
1946 (png_load) [HAVE_PNG]:
1947 (jpeg_load) [HAVE_JPEG]:
1948 Invoke the new function, to avoid longjmp munging our locals.
1949 (struct my_jpeg_error_mgr) [HAVE_JPEG]: New members cinfo, failure_code.
1950 (my_error_exit) [HAVE_JPEG]: Don't trust 'setjmp' to return 2 when
1951 longjmp is passed 2, as the C standard doesn't guarantee this.
1952 Instead, store the failure code into mgr->failure_code.
1953
bfeae2cf
SM
19542012-09-12 Stefan Monnier <monnier@iro.umontreal.ca>
1955
1956 * keyboard.c (read_char, requeued_events_pending_p, Finput_pending_p)
1957 (Fdiscard_input, quit_throw_to_read_char, init_keyboard)
1958 (syms_of_keyboard): Remove support for unread-command-char.
1959
8099e36b
EZ
19602012-09-12 Eli Zaretskii <eliz@gnu.org>
1961
1962 * w32proc.c (sys_kill): If PID is our process ID and the signal is
1963 SIGABRT, call emacs_abort. Avoids silently exiting upon assertion
1964 violation. (Bug#12426)
1965
92547ff9
PE
19662012-09-12 Paul Eggert <eggert@cs.ucla.edu>
1967
1968 * image.c (jpeg_memory_src): Don't assume string len fits in unsigned.
1969
45b82ad0
SM
19702012-09-12 Stefan Monnier <monnier@iro.umontreal.ca>
1971
1972 * eval.c: Add `inhibit-debugger'.
1973 (Qinhibit_debugger): New symbol.
1974 (call_debugger): Bind it instead of Qdebug_on_error.
1975 (maybe_call_debugger): Test Vinhibit_debugger.
1976 (syms_of_eval): Define inhibit-debugger.
1977 * xdisp.c (set_message): Don't bind Qinhibit_debug_on_message.
1978 (syms_of_xdisp): Remove inhibit-debug-on-message.
1979
5779a1dc
PE
19802012-09-11 Paul Eggert <eggert@cs.ucla.edu>
1981
50f2e553
PE
1982 Avoid _setjmp/_longjmp problems with local nonvolatile variables.
1983 If a nonvolatile local variable is written before a _longjmp to
1984 the frame containing the variable, and is read after the _longjmp,
1985 the value read is indeterminate. Some local variables of type
1986 'struct handler' and 'struct catchtag' are used in this way, so
1987 mark each of their slots as volatile if the slot can be set before
1988 _longjmp and read afterwards.
1989 * lisp.h (struct handler): var and chosen_clause are now volatile.
1990 (struct catchtag): val, next, and pdlcount are now volatile.
1991
ae1d87e2
PE
1992 * bidi.c (bidi_push_it, bidi_pop_it):
1993 * fns.c (copy_hash_table):
1994 * image.c (define_image_type):
1995 * keyboard.c (kbd_buffer_store_event_hold):
1996 * process.c (Fprocess_send_eof):
1997 * xfaces.c (x_create_gc) [HAVE_NS]:
1998 * xgselect.c (xg_select):
1999 Prefer assignment to memcpy when either will do.
2000
5779a1dc
PE
2001 * alloc.c (discard_killed_buffers): Tune and simplify a bit.
2002 Use pointer-to-a-pointer to simplify and avoid a NILP check each
2003 time an item is removed. No need to mark this function 'inline';
2004 the compiler knows better than we do.
2005
c4c9756b
JD
20062012-09-11 Jan Djärv <jan.h.d@swipnet.se>
2007
2008 * nsterm.m (ns_judge_scroll_bars): Pass NO to updateFrameSize.
2009 (updateFrameSize:): Add delay parameter to updateFrameSize, send it
2010 to change_frame_size (Bug#12388).
2011 (windowDidResize:): Pass YES to updateFrameSize.
2012
2013 * nsterm.h: Add delay parameter to updateFrameSize.
2014
d73e321c
DA
20152012-09-11 Dmitry Antipov <dmantipov@yandex.ru>
2016
2017 Discard killed buffers from deleted window and frame objects.
2018 This reduces an amount of references to killed buffers and
2019 helps GC to reclaim them faster.
2020 * alloc.c (discard_killed_buffers): New function.
2021 (mark_object): Use it for deleted windows and frames.
2022 (mark_object): If symbol's value is set up for a killed buffer
1f9f395d 2023 or deleted frame, restore its global binding.
d73e321c
DA
2024 * data.c (swap_in_global_binding): Add GC notice.
2025 (swap_in_symval_forwarding): Use convenient set_blv_where.
2026 * window.c (wset_next_buffers, wset_prev_buffers): Move ...
2027 * window.h: ... to here.
2028
e578f381
DA
20292012-09-11 Dmitry Antipov <dmantipov@yandex.ru>
2030
2031 Convenient macro to check whether the buffer is live.
2032 * buffer.h (BUFFER_LIVE_P): New macro.
2033 * alloc.c, buffer.c, editfns.c, insdel.c, lread.c, marker.c:
2034 * minibuf.c, print.c, process.c, window.c, xdisp.c: Use it.
2035
3057e615
YM
20362012-09-11 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
2037
2038 * xdisp.c (right_overwritten, right_overwriting): Also handle gstring
2039 composition cases (Bug#12364).
2040
2041 * xterm.c (x_draw_glyph_string): Avoid overwriting inverted left
2042 overhang of succeeding glyphs overlapping box cursor.
2043
2044 * w32term.c (x_draw_glyph_string): Likewise.
2045
6fda35f2
PE
20462012-09-11 Paul Eggert <eggert@cs.ucla.edu>
2047
c990426a
PE
2048 Simplify, document, and port floating-point (Bug#12381).
2049 The porting part of this patch fixes bugs on non-IEEE platforms
2050 with frexp, ldexp, logb.
2051 * data.c, lisp.h (Qdomain_error, Qsingularity_error, Qunderflow_error):
2052 Now static.
2053 * floatfns.c: Simplify discussion of functions that Emacs doesn't
2054 support, by removing commented-out code and briefly listing the
2055 C89 functions excluded. The commented-out stuff was confusing
2056 maintenance, e.g., we thought we needed cbrt but it was commented out.
2057 (logb): Remove decl; no longer needed.
2058 (isfinite): New macro, if not already supplied.
2059 (isnan): Don't replace any existing macro.
2060 (Ffrexp, Fldexp): Define even if !HAVE_COPYSIGN, as frexp and ldexp
2061 are present on all C89 platforms.
2062 (Ffrexp): Do not special-case zero, as frexp does the right thing
2063 for that case.
2064 (Flogb): Do not use logb, as it doesn't have the desired meaning
2065 on hosts that use non-base-2 floating point. Instead, stick with
2066 frexp, which is C89 anyway. Do not pass an infinity or a NaN to
2067 frexp, to avoid getting an unspecified result.
2068
6fda35f2
PE
2069 * xdisp.c (Qinhibit_debug_on_message): Now static.
2070
16130a58
JD
20712012-09-10 Jan Djärv <jan.h.d@swipnet.se>
2072
2073 * nsterm.m (ns_update_begin): Set clip path to whole view by using
2074 NSBezierPath (Bug#12131).
2075
d105a573
CY
20762012-09-10 Chong Yidong <cyd@gnu.org>
2077
2078 * fns.c (Fdelq, Fdelete): Doc fix.
2079
ff55dfe8
PE
20802012-09-10 Paul Eggert <eggert@cs.ucla.edu>
2081
2082 * lisp.h (XSETINT, XSETCONS, XSETVECTOR, XSETSTRING, XSETSYMBOL)
2083 (XSETFLOAT, XSETMISC): Parenthesize macro bodies.
2084
e7032e7c
SM
20852012-09-09 Stefan Monnier <monnier@iro.umontreal.ca>
2086
2087 * lisp.h (make_lisp_ptr): New macro to replace XSET.
2088 (XSETCONS, XSETVECTOR, XSETSTRING, XSETSYMBOL, XSETFLOAT, XSETMISC):
2089 Use it.
2090
e9957956
EZ
20912012-09-09 Eli Zaretskii <eliz@gnu.org>
2092
aba05ce9
EZ
2093 * fringe.c (draw_fringe_bitmap_1): Don't reduce the width of the
2094 left fringe if the window has a left margin. This avoids leaving
2095 traces of the cursor because its leftmost pixel is not drawn over.
2096
e9957956
EZ
2097 * dispnew.c (update_window_line): When the left margin area of a
2098 screen line is updated, set the redraw_fringe_bitmaps_p flag of
2099 that screen line. (Bug#12277)
2100
f6196b87
PE
21012012-09-09 Paul Eggert <eggert@cs.ucla.edu>
2102
2103 Assume C89 or later for math functions (Bug#12381).
2104 This simplifies the code, and makes it a bit smaller and faster,
2105 and (most important) makes it easier to clean up signal handling
2106 since we can stop worring about floating-point exceptions in
2107 library code. That was a problem before C89, but the problem
2108 went away many years ago on all practical Emacs targets.
2109 * data.c, image.c, lread.c, print.c:
2110 Don't include <math.h>; no longer needed.
2111 * data.c, floatfns.c (IEEE_FLOATING_POINT): Don't worry that it
2112 might be autoconfigured, as that never happens.
2113 * data.c (fmod):
2114 * doprnt.c (DBL_MAX_10_EXP):
2115 * print.c (DBL_DIG):
2116 Remove. C89 or later always defines these.
2117 * floatfns.c (HAVE_MATHERR, FLOAT_CHECK_ERRNO, FLOAT_CHECK_DOMAIN)
2118 (in_float, float_error_arg, float_error_arg2, float_error_fn_name)
2119 (arith_error, domain_error, domain_error2):
2120 Remove all this pre-C89 cruft. Do not include <errno.h> as that's
2121 no longer needed -- we simply return what C returns. All uses removed.
2122 (IN_FLOAT, IN_FLOAT2): Remove. All uses replaced with
2123 the wrapped code.
2124 (FLOAT_TO_INT, FLOAT_TO_INT2, range_error, range_error2):
2125 Remove. All uses expanded, as these macros are no longer used
2126 more than once and are now more trouble than they're worth.
2127 (Ftan): Use tan, not sin / cos.
2128 (Flogb): Assume C89 frexp.
2129 (fmod_float): Assume C89 fmod.
2130 (matherr) [HAVE_MATHERR]: Remove; no longer needed.
2131 (init_floatfns): Remove. All uses removed.
2132
9d7f1863
JD
21332012-09-08 Jan Djärv <jan.h.d@swipnet.se>
2134
2135 * nsterm.m (ns_draw_fringe_bitmap, ns_dumpglyphs_image): Take back
2136 compositeToPoint for OSX < 10.6 (Bug#12390).
2137
eabf0404
PE
21382012-09-08 Paul Eggert <eggert@cs.ucla.edu>
2139
2140 * floatfns.c (Ftan): Use tan (x), not (sin (x) / cos (x)).
2141 This produces more-accurate results.
2142
0b3b1d23
JD
21432012-09-08 Jan Djärv <jan.h.d@swipnet.se>
2144
2145 * nsterm.m (updateFrameSize): Call setFrame: on the view when size
2146 changes (Bug#12088).
2147
6dcef6ec
CY
21482012-09-08 Chong Yidong <cyd@gnu.org>
2149
2150 * syntax.c (Fstring_to_syntax): Doc fix.
2151
aa7d57c5
JD
21522012-09-08 Jan Djärv <jan.h.d@swipnet.se>
2153
2154 * nsterm.m (ns_clip_to_row): Remove code that deals with drawing fringe
2155 in the internal border.
2156 (x_set_window_size): Remove static variables and their usage.
2157 (ns_redraw_scroll_bars): Fix NSTRACE arg.
3a880af4
SM
2158 (ns_after_update_window_line, ns_draw_fringe_bitmap):
2159 Remove fringe/internal border adjustment (Bug#11052).
aa7d57c5
JD
2160 (ns_draw_fringe_bitmap): Make code more like other terms (xterm.c).
2161 (ns_draw_window_cursor): Remove fringe/internal border adjustment.
2162 (ns_fix_rect_ibw): Remove.
2163 (ns_get_glyph_string_clip_rect): Remove call to ns_fix_rect_ibw.
2164 (ns_dumpglyphs_box_or_relief): Ditto.
2165 (ns_maybe_dumpglyphs_background): Remove fringe/internal border
2166 adjustment.
2167 (ns_dumpglyphs_image): Ditto.
fc0c31f8 2168 (ns_dumpglyphs_stretch): Fix coding style. Remove fringe/internal
aa7d57c5
JD
2169 border adjustment.
2170 (ns_set_vertical_scroll_bar): Remove variables barOnVeryLeft/Right and
2171 their usage. Add fringe_extended_p and its use as in other terms.
2172 (ns_judge_scroll_bars): Code style fix. Call updateFrameSize if
2173 scroll bar was removed.
2174 (updateFrameSize): New function.
2175 (windowDidResize): Move code to updateFrameSize and call it.
2176
2177 * nsterm.h (EmacsView): Add updateFrameSize.
2178
1a5432bc
CY
21792012-09-07 Chong Yidong <cyd@gnu.org>
2180
b4f5313e
CY
2181 * textprop.c (Fget_text_property): Minor doc fix (Bug#12323).
2182
1a5432bc
CY
2183 * data.c (Flocal_variable_if_set_p): Doc fix (Bug#10713).
2184
1a4f1e9b
PE
21852012-09-07 Paul Eggert <eggert@cs.ucla.edu>
2186
2187 More signal-handler cleanup (Bug#12327).
eddb36a7
PE
2188 * emacs.c (main): Convert three 'signal' calls to 'sigaction' calls.
2189 Problem introduced when merging patches. Noted by Eli Zaretskii in
2190 <http://bugs.gnu.org/12327#67>.
1a4f1e9b
PE
2191 * floatfns.c: Comment fix.
2192 * lisp.h (force_auto_save_soon): Declare regardless of SIGDANGER.
2193 SIGDANGER might not be in scope so "#ifdef SIGDANGER" is not right,
2194 and anyway the declaration is harmless even if SIGDANGER is not defined.
2195 * syssignal.h (SIGIO): Also #undef if (! defined FIONREAD ||
2196 defined BROKEN_FIONREAD). systty.h formerly did this, but other
2197 source files not surprisingly expected syssignal.h to define, or
2198 not define, SIGIO, and it's cleaner to do it that way, for consistency.
2199 Include <sys/ioctl.h>, for FIONREAD.
2200 * systty.h (SIGIO): Do not #undef here; it's now syssignal.h's job.
2201 This eliminates a problem whereby other files mysteriously had
2202 to include "syssignal.h" before including "systty.h" if they
2203 wanted to use "#ifdef SIGIO".
2204
bc8000ff
EZ
22052012-09-07 Eli Zaretskii <eliz@gnu.org>
2206
3e6d6928
EZ
2207 * w32proc.c (sigaction): New function, emulates Posix 'sigaction'.
2208
2209 * w32.c (sigemptyset): Empty the set.
2210 (sigsetmask, sigmask, sigblock, sigunblock): Remove unused functions.
2211
bc8000ff
EZ
2212 * alloc.c [ENABLE_CHECKING]: Include signal.h, since we need SIGABRT.
2213
b4fa72f2
DA
22142012-09-07 Dmitry Antipov <dmantipov@yandex.ru>
2215
2216 * alloc.c (mark_buffer): Revert unsafe marking optimization.
2217 (mark_object): Likewise for frame objects.
2218
30730c93
PE
22192012-09-07 Paul Eggert <eggert@cs.ucla.edu>
2220
2221 * syssignal.h (handle_on_main_thread): Always declare,
2222 even if FORWARD_SIGNAL_TO_MAIN_THREAD is not defined.
2223 This ports to platforms without HAVE_PTHREAD.
2224
2fe28299
PE
22252012-09-06 Paul Eggert <eggert@cs.ucla.edu>
2226
2227 Signal-handler cleanup (Bug#12327).
2228 Emacs's signal handlers were written in the old 4.2BSD style with
2229 sigblock and sigmask and so forth, and this led to some
2230 inefficiencies and confusion. Rewrite these to use
2231 pthread_sigmask etc. without copying signal sets around. Also,
2232 get rid of the confusing macros 'SIGNAL_THREAD_CHECK' and
2233 'signal', and instead use functions that do not attempt to take
2234 over the system name space. This patch causes Emacs's text
2235 segment to shrink by 0.7% on my platform, Fedora 17 x86-64.
2236 * alloc.c, emacsgtkfixed.c, nsfns.m, widget.c, xmenu.c:
2237 Do not include <signal.h> or "syssignal.h", as these
2238 modules do not use signals.
2239 * atimer.c, callproc.c, data.c, dispnew.c, emacs.c, floatfns.c:
2240 * gtkutil.c, keyboard.c, process.c, sound.c, sysdep.c, term.c, xterm.c:
2241 Do not include <signal.h>, as "syssignal.h" does that for us now.
2242 * atimer.c (sigmask_atimers): New function.
2243 (block_atimers, unblock_atimers): New functions,
2244 replacing the old macros BLOCK_ATIMERS and UNBLOCK_ATIMERS.
2245 All uses replaced.
2246 * conf_post.h [SIGNAL_H_AHB]: Do not include <signal.h>;
2247 no longer needed here.
2248 * emacs.c (main): Inspect existing signal handler with sigaction,
fc0c31f8 2249 so that there's no need to block and unblock SIGHUP.
2fe28299
PE
2250 * sysdep.c (struct save_signal): New member 'action', replacing
2251 old member 'handler'.
2252 (save_signal_handlers, restore_signal_handlers):
2253 Use sigaction instead of 'signal' to save and restore.
2254 (get_set_sighandler, set_sighandler) [!WINDOWSNT]:
2255 New function. All users of 'signal' modified to use set_sighandler
2256 if they're writeonly, and to use sys_signal if they're read+write.
2257 (emacs_sigaction_init, forwarded_signal): New functions.
2258 (sys_signal): Remove. All uses replaced by calls to sigaction
2259 and emacs_sigaction_init, or by direct calls to 'signal'.
2260 (sys_sigmask) [!__GNUC__]: Remove; no longer needed.
2261 (sys_sigblock, sys_sigunblock, sys_sigsetmask): Remove;
2262 all uses replaced by pthread_sigmask etc. calls.
2263 * syssignal.h: Include <signal.h>.
2264 (emacs_sigaction_init, forwarded_signal): New decls.
2265 (SIGMASKTYPE): Remove. All uses replaced by its definiens, sigset_t.
2266 (SIGEMPTYMASK): Remove; all uses replaced by its definiens, empty_mask.
2267 (sigmask, sys_sigmask): Remove; no longer needed.
2268 (sigpause): Remove. All uses replaced by its definiens, sigsuspend.
2269 (sigblock, sigunblock, sigfree):
2270 (sigsetmask) [!defined sigsetmask]:
2271 Remove. All uses replaced by pthread_sigmask.
2272 (signal): Remove. Its remaining uses (with SIG_DFL and SIG_IGN)
2273 no longer need to be replaced, and its typical old uses
2274 are now done via emacs_sigaction_init and sigaction.
2275 (sys_sigblock, sys_sigunblock, sys_sigsetmask): Remove decls.
2276 (sys_sigdel): Remove; unused.
2277 (NSIG): Remove a FIXME; the code's fine. Remove an unnecessary ifdef.
2278
0216c128
EZ
22792012-09-06 Eli Zaretskii <eliz@gnu.org>
2280
2281 * process.c (CAN_HANDLE_MULTIPLE_CHILDREN): Fix a typo that broke
2282 SIGCHLD handling on systems that don't have WNOHANG. (Bug#12327)
2283
c752cfa9
DA
22842012-09-06 Dmitry Antipov <dmantipov@yandex.ru>
2285
2286 Explicitly mark buffer_defaults and buffer_local_symbols.
2287 * alloc.c (Fgarbage_collect): Mark buffer_defaults and
2288 mark_local_symbols here.
2289 (mark_object): If GC_CHECK_MARKED_OBJECTS, simplify checking
2290 since special buffers aren't marked here any more.
2291 (allocate_buffer): Chain new buffer with all_buffers here...
2292 * buffer.c (Fget_buffer_create, Fmake_indirect_buffer): ...and
2293 not here.
2294 (Vbuffer_defaults, Vbuffer_local_symbols): Remove.
2295 (syms_of_buffer): Remove staticpro of the above.
2296 (init_buffer_once): Set names for buffer_defaults and
2297 buffer_local_symbols.
2298
a864ef14
PE
22992012-09-06 Paul Eggert <eggert@cs.ucla.edu>
2300
2301 Use bool for booleans in font-related modules.
2302 * font.c (font_intern_prop, font_style_to_value)
2303 (font_style_symbolic, font_parse_xlfd, font_parse_fcname)
2304 (generate_otf_features, font_check_otf_features, font_check_otf)
2305 (font_match_p, font_list_entities, font_at):
2306 * fontset.c (fontset_id_valid_p, reorder_font_vector
2307 (fontset_find_font, Fset_fontset_font)
2308 (face_suitable_for_char_p) [0]:
2309 * ftfont.c (fc_initialized, ftfont_get_open_type_spec)
2310 (ftfont_open, ftfont_text_extents, ftfont_check_otf):
2311 (m17n_flt_initialized, ftfont_shape_by_flt):
2312 * ftxfont.c (ftxfont_draw_bitmap, ftxfont_draw):
2313 * nsfont.m (nsfont_draw):
2314 * w32font.c (w32font_draw):
2315 * w32term.c (x_draw_glyphless_glyph_string_foreground):
2316 Use bool for booleans.
2317 * font.h: Adjust to above API changes.
2318 (struct font, struct font_driver, struct font_driver_list):
2319 Use bool for booleans.
2320 (struct font): Remove useless member encoding_type.
2321 All users removed.
2322 * fontset.c, xftfont.c: Omit unnecessary static decls.
2323
0699fc18
DA
23242012-09-06 Dmitry Antipov <dmantipov@yandex.ru>
2325
2326 * alloc.c (mark_object): Revert window marking code
2327 since it's unsafe for the Fset_window_configuration.
2328
20ef56db
PE
23292012-09-05 Paul Eggert <eggert@cs.ucla.edu>
2330
2fe28299 2331 Fix race conditions with signal handlers and errno (Bug#12327).
20ef56db
PE
2332 Be more systematic about preserving errno whenever a signal
2333 handler returns, even if it's not in the main thread. Do this by
2334 renaming signal handlers to distinguish between signal delivery
2335 and signal handling. All uses changed.
2336 * atimer.c (deliver_alarm_signal): Rename from alarm_signal_handler.
2337 * data.c (deliver_arith_signal): Rename from arith_error.
2338 * dispnew.c (deliver_window_change_signal): Rename from
2339 window_change_signal.
2340 * emacs.c (deliver_error_signal): Rename from fatal_error_signal.
2341 (deliver_danger_signal) [SIGDANGER]: Rename from memory_warning_signal.
2342 * keyboard.c (deliver_input_available_signal): Rename from
2343 input_available_signal.
2344 (deliver_user_signal): Rename from handle_user_signal.
2345 (deliver_interrupt_signal): Rename from interrupt_signal.
2346 * process.c (deliver_pipe_signal): Rename from send_process_trap.
2347 (deliver_child_signal): Rename from sigchld_handler.
2348 * atimer.c (handle_alarm_signal):
2349 * data.c (handle_arith_signal):
2350 * dispnew.c (handle_window_change_signal):
2351 * emacs.c (handle_fatal_signal, handle_danger_signal):
2352 * keyboard.c (handle_input_available_signal):
2353 * keyboard.c (handle_user_signal, handle_interrupt_signal):
2354 * process.c (handle_pipe_signal, handle_child_signal):
2355 New functions, with the actual signal-handling code taken from the
2356 original respective signal handlers, sans the sporadic attempts to
2357 preserve errno, since that's now done by handle_on_main_thread.
2358 * atimer.c (alarm_signal_handler): Remove unnecessary decl.
2359 * emacs.c, floatfns.c, lisp.h: Remove unused FLOAT_CATCH_SIGKILL cruft.
2360 * emacs.c (main_thread) [FORWARD_SIGNAL_TO_MAIN_THREAD]:
2361 Move to sysdep.c.
2362 (main) [FORWARD_SIGNAL_TO_MAIN_THREAD]:
2363 Move initialization of main_thread to sysdep.c's init_signals.
2364 * process.c (waitpid) [!WNOHANG]: #define to wait; that's good enough for
2365 our usage, and simplifies the mainline code.
2366 (record_child_status_change): New static function, as a helper
2367 for handle_child_signal, and with most of the old child handler's
2368 contents.
2369 (CAN_HANDLE_MULTIPLE_CHILDREN): New constant.
2370 (handle_child_signal): Use the above.
2371 * sysdep.c (main_thread) [FORWARD_SIGNAL_TO_MAIN_THREAD]:
2372 Moved here from emacs.c.
2373 (init_signals) [FORWARD_SIGNAL_TO_MAIN_THREAD]: Initialize it;
2374 code moved here from emacs.c's main function.
2375 * sysdep.c, syssignal.h (handle_on_main_thread): New function,
3a880af4
SM
2376 replacing the old SIGNAL_THREAD_CHECK. All uses changed.
2377 This lets callers save and restore errno properly.
20ef56db 2378
e3ccf108
DA
23792012-09-05 Dmitry Antipov <dmantipov@yandex.ru>
2380
2381 Remove redundant or unused things here and there.
2382 * lisp.h (CYCLE_CHECK, CHAR_TABLE_TRANSLATE): Remove.
2383 * conf_post.h (RE_TRANSLATE): Use char_table_translate.
2384 * editfns.c (Fcompare_buffer_substrings): Likewise.
2385 * frame.h (struct terminal, struct font_driver_list):
2386 Remove redundant declarations.
2387 * window.h (Qleft, Qright): Likewise.
2388
697e1e39
DA
23892012-09-05 Dmitry Antipov <dmantipov@yandex.ru>
2390
2391 Do not mark objects from deleted buffers, windows and frames.
2392 * alloc.c (mark_buffer): Mark just the buffer if it is dead.
2393 (mark_object): Likewise for windows and frames.
2394
c1ca42ca
DA
23952012-09-05 Dmitry Antipov <dmantipov@yandex.ru>
2396
2397 * alloc.c (valid_lisp_object_p): Treat killed buffers,
2398 buffer_defaults and buffer_local_symbols as valid objects.
2399 Return special value to denote them.
2400
014d93be
PE
24012012-09-05 Paul Eggert <eggert@cs.ucla.edu>
2402
f75d7a91
PE
2403 * fileio.c, filelock.c, floatfns.c, fns.c: Use bool for boolean.
2404 * fileio.c (auto_saving, auto_save_error_occurred, make_temp_name)
2405 (Fexpand_file_name, barf_or_query_if_file_exists, Fcopy_file)
2406 (file_name_absolute_p, Fsubstitute_in_file_name):
2407 (check_executable, check_writable, Ffile_accessible_directory_p)
2408 (Fset_file_selinux_context, Fdefault_file_modes)
2409 (Finsert_file_contents, choose_write_coding_system)
2410 (Fwrite_region, build_annotations, a_write, e_write)
2411 (Fdo_auto_save):
2412 * filelock.c (boot_time_initialized, get_boot_time)
2413 (get_boot_time_1, lock_file_1, within_one_second):
2414 * floatfns.c (in_float):
2415 * fns.c (concat, internal_equal, Frequire, base64_encode_1)
2416 (base64_decode_1, cmpfn_eql, cmpfn_user_defined)
2417 (sweep_weak_table, sweep_weak_hash_tables, secure_hash):
2418 * lisp.h (struct Lisp_Hash_Table.cmpfn):
2419 * window.c (compare_window_configurations):
2420 Use bool for booleans.
2421 * fileio.c (auto_saving_dir_umask, auto_saving_mode_bits)
2422 (Fdefault_file_modes): Now mode_t, not int, for modes.
2423 (Fdo_auto_save): Set a boolean to 1 rather than using ++.
2424 (internal_delete_file): Now returns void, not a (boolean) int,
2425 since nobody was looking at the return value.
2426 * lisp.h, window.h: Adjust to above API changes.
2427
014d93be
PE
2428 * xdisp.c (set_message): Simplify and reindent last change.
2429
776f29e1
JB
24302012-09-05 Juanma Barranquero <lekktu@gmail.com>
2431
2432 * makefile.w32-in ($(BLD)/sysdep.$(O)): Update dependencies.
2433
7f7e0167
LI
24342012-09-04 Lars Ingebrigtsen <larsi@gnus.org>
2435
2436 * eval.c (call_debugger): Make the function non-static so that we
2437 can call it from set_message.
2438
2439 * xdisp.c (set_message): Implement the new variable `debug-on-message'.
2440 (syms_of_xdisp): Defvar it and `inhibit-debug-on-message'.
2441
cf29dd84
PE
24422012-09-04 Paul Eggert <eggert@cs.ucla.edu>
2443
2444 Give more-useful info on a fatal error (Bug#12328).
2445 * alloc.c [ENABLE_CHECKING]: Do not include <execinfo.h>.
2446 (die) [ENABLE_CHECKING]: Call fatal_error_backtrace instead
2447 of doing the work ourselves.
2448 * emacs.c (fatal_error_signal): Let fatal_error_backtrace
2449 do most of the work.
2450 (fatal_error_backtrace): New function, taken from the guts
2451 of the old fatal_error_signal, but with a new option to output
2452 a backtrace.
2453 (shut_down_emacs) [!DOS_NT]: Use strsignal to give more-useful
2454 info about the signal than just its number.
2455 * lisp.h (fatal_error_backtrace, emacs_backtrace): New decls.
2456 * sysdep.c: Include <execinfo.h>
2457 (emacs_backtrace): New function, taken partly from the previous
2458 code of the 'die' function.
2459 (emacs_abort): Call fatal_error_backtrace rather than abort.
2460
972debf2
SM
24612012-09-04 Stefan Monnier <monnier@iro.umontreal.ca>
2462
2463 * lread.c (readevalloop): Call internal-macroexpand-for-load to perform
2464 eager (load-time) macro-expansion.
2465 * lisp.mk (lisp): Add macroexp.
2466
1088b922
PE
24672012-09-04 Paul Eggert <eggert@cs.ucla.edu>
2468
2469 Simplify redefinition of 'abort' (Bug#12316).
2470 Do not try to redefine the 'abort' function. Instead, redo
2471 the code so that it calls 'emacs_abort' rather than 'abort'.
2472 This removes the need for the NO_ABORT configure-time macro
2473 and makes it easier to change the abort code to do a backtrace.
2474 * .gdbinit: Just stop at emacs_abort, not at w32_abort or abort.
2475 * emacs.c (abort) [!DOS_NT && !NO_ABORT]:
2476 Remove; sysdep.c's emacs_abort now takes its place.
2477 * lisp.h (emacs_abort): New decl. All calls from Emacs code to
2478 'abort' changed to use 'emacs_abort'.
2479 * msdos.c (dos_abort) [defined abort]: Remove; not used.
2480 (abort) [!defined abort]: Rename to ...
2481 (emacs_abort): ... new name.
2482 * sysdep.c (emacs_abort) [!HAVE_NTGUI]: New function, taking
2483 the place of the old 'abort' in emacs.c.
2484 * w32.c, w32fns.c (abort): Do not #undef.
2485 * w32.c (emacs_abort): Rename from w32_abort.
2486
30934d33
EZ
24872012-09-04 Eli Zaretskii <eliz@gnu.org>
2488
2489 * w32uniscribe.c (uniscribe_shape): Reverse the sign of
2490 offsets[j].dv, since the y axis of the screen coordinates points
2491 down, while the y axis of the font definition coordinates points
2492 up. This fixes display of Arabic diacritics such as KASRA and
2493 KASRATAN. (Bug#11860)
2494
af26b72c
PE
24952012-09-04 Paul Eggert <eggert@cs.ucla.edu>
2496
2497 Be more systematic about _setjmp vs setjmp.
2498 * alloc.c (test_setjmp, mark_stack):
2499 * image.c (PNG_LONGJMP) [PNG_LIBPNG_VER < 10500]:
2500 (PNG_JMPBUF) [! (PNG_LIBPNG_VER < 10500)]:
2501 (png_load, my_error_exit, jpeg_load):
2502 * process.c (send_process_trap, send_process):
2503 Uniformly prefer _setjmp and _longjmp to setjmp and longjmp.
2504 The underscored versions are up to 30x faster on some hosts.
2505 Formerly, the code used setjmp+longjmp sometimes and
2506 _setjmp+_longjmp at other times, with no particular reason to
2507 prefer setjmp+longjmp.
2508
26d4541d
PE
25092012-09-03 Paul Eggert <eggert@cs.ucla.edu>
2510
d42f4f0f 2511 Fix minor problem found by static checking.
26d4541d 2512 * buffer.c (Fdelete_all_overlays): Return nil.
26d4541d 2513
c5e28e39
MR
25142012-09-03 Martin Rudalics <rudalics@gmx.at>
2515
2516 * buffer.c (Fdelete_all_overlays): New function.
2517
3eab3ca9
CY
25182012-09-03 Chong Yidong <cyd@gnu.org>
2519
2520 * gtkutil.c: Add extern decl for Qxft.
2521
c04889f8
PE
25222012-09-02 Paul Eggert <eggert@cs.ucla.edu>
2523
1882aa38
PE
2524 * emacs.c, eval.c: Use bool for boolean.
2525 * emacs.c (initialized, inhibit_window_system, running_asynch_code):
2526 (malloc_using_checking) [DOUG_LEA_MALLOC]:
2527 (display_arg) [HAVE_X_WINDOWS || HAVE_NS]:
2528 (noninteractive, no_site_lisp, fatal_error_in_progress, argmatch)
2529 (main, decode_env_path, Fdaemon_initialized):
2530 * eval.c (call_debugger, Finteractive_p, interactive_p):
2531 (unwind_to_catch, Fsignal, wants_debugger, skip_debugger)
2532 (maybe_call_debugger, Fbacktrace):
2533 * process.c (read_process_output, exec_sentinel):
2534 Use bool for booleans.
2535 * emacs.c (shut_down_emacs): Omit unused boolean argument NO_X.
2536 All callers changed.
2537 * eval.c (interactive_p): Omit always-true boolean argument
2538 EXCLUDE_SUBRS_P. All callers changed.
2539 * dispextern.h, lisp.h: Reflect above API changes.
2540 * firstfile.c (dummy): Use the address of 'main', whose signature
2541 won't change, instead of the address of 'initialize', whose
2542 signature just changed from int to bool.
2543 * lisp.h (fatal_error_in_progress): New decl of boolean, moved here ...
2544 * msdos.c (fatal_error_in_progress): ... from here.
2545 * xdisp.c (redisplaying_p): Now a boolean. Set it to 1 instead
2546 of incrementing it.
2547 (redisplay_internal, unwind_redisplay): Simply clear
2548 REDISPLAYING_P when unwinding, instead of saving its previous,
2549 always-false value and then restoring it.
2550
a411ac43
PE
2551 Clean up some extern decls.
2552 Mostly, this hoists extern decls out of .c files and into .h files.
2553 That way, we're more likely to catch errors if the interfaces change.
2554 * alloc.c [USE_GTK]: Include "gtkutil.h" so that we need not
2555 declare xg_mark_data.
2556 * dispextern.h (x_frame_parm_handlers):
2557 * font.h (Qxft):
2558 * lisp.h (Qlexical_binding, Qinternal_interpreter_environment)
2559 (Qextra_light, Qlight, Qsemi_light, Qsemi_bold, Qbold, Qextra_bold)
2560 (Qultra_bold, Qoblique, Qitalic):
2561 Move extern decl here from .c file.
2562 * alloc.c (xg_mark_data) [USE_GTK]:
2563 * doc.c (Qclosure):
2564 * eval.c (Qlexical_binding):
2565 * fns.c (time) [!HAVE_UNISTD_H]:
2566 * gtkutil.c (Qxft, Qnormal, Qextra_light, Qlight, Qsemi_light)
2567 (Qsemi_bold, Qbold, Qextra_bold, Qultra_bold, Qoblique, Qitalic):
2568 * image.c (Vlibrary_cache, QCloaded_from) [HAVE_NTGUI]:
2569 * lread.c (Qinternal_interpreter_environment):
2570 * minibuf.c (Qbuffer):
2571 * process.c (QCfamily, QCfilter):
2572 * widget.c (free_frame_faces):
2573 * xfaces.c (free_frame_menubar) [USE_X_TOOLKIT]:
2574 * xfont.c (x_clear_errors):
2575 * xterm.c (x_frame_parm_handlers):
2576 Remove now-redundant extern decls.
2577 * keyboard.c, keyboard.h (ignore_mouse_drag_p) [USE_GTK || HAVE_NS]:
2578 * xfaces.c (Qultra_light, Qreverse_oblique, Qreverse_italic):
2579 Now static.
2580 * xfaces.c: Remove unnecessary static decls.
2581 * xterm.c (updating_frame): Remove decl of nonexistent object.
2582
c04889f8
PE
2583 * Makefile.in (gl-stamp): Don't scan $(SOME_MACHINE_OBJECTS)
2584 when building globals.h, as the objects that are not built on
2585 this host are not needed to compile C files on this host.
2586
8b339673
JD
25872012-09-02 Jan Djärv <jan.h.d@swipnet.se>
2588
2589 * gtkutil.h: Remove prototype for x_wm_set_size_hint.
2590
2591 * frame.h: Add missing prototype for x_wm_set_size_hint.
2592
a08d4ba7
PE
25932012-09-02 Paul Eggert <eggert@cs.ucla.edu>
2594
2595 * doc.c, editfns.c, insdel.c, intervals.c: Use bool for boolean.
2596 * doc.c (read_bytecode_char, get_doc_string, reread_doc_file)
2597 (Fdocumentation, Fdocumentation_property, Fsnarf_documentation)
2598 (Fsubstitute_command_keys):
2599 * editfns.c (region_limit, find_field, Fconstrain_to_field)
2600 (save_excursion_save, save_excursion_restore)
2601 (disassemble_lisp_time, decode_time_components, emacs_nmemftime)
2602 (format_time_string, general_insert_function)
2603 (make_buffer_string, make_buffer_string_both)
2604 (Fsubst_char_in_region, Ftranslate_region_internal, Fformat):
2605 * insdel.c (check_markers, gap_left, adjust_markers_for_insert)
2606 (copy_text, insert_1, insert_1_both, insert_from_string)
2607 (insert_from_string_before_markers, insert_from_string_1)
2608 (insert_from_buffer, insert_from_buffer_1, replace_range)
2609 (replace_range_2, del_range_1, del_range_byte, del_range_both)
2610 (del_range_2, modify_region):
2611 * intervals.c (intervals_equal, balance_possible_root_interval)
2612 (adjust_intervals_for_insertion, merge_properties_sticky)
2613 (graft_intervals_into_buffer, lookup_char_property)
2614 (adjust_for_invis_intang, set_point_both)
2615 (get_property_and_range, compare_string_intervals)
2616 (set_intervals_multibyte_1, set_intervals_multibyte):
2617 * keyboard.c (decode_timer):
2618 Use bool for boolean.
2619 * intervals.h, lisp.h, systime.h: Reflect above API changes.
2620 * editfns.c (struct info): Use 1-bit unsigned bitfields for booleans.
2621
48c948de
CY
26222012-09-02 Chong Yidong <cyd@gnu.org>
2623
2624 * keymap.c (push_key_description): Print M-TAB as C-M-i
2625 (Bug#11758).
2626
6c49a40b
JB
26272012-09-02 Juanma Barranquero <lekktu@gmail.com>
2628
2629 * makefile.w32-in (CCL_H, W32FONT_H): New macros.
2630 (ATIMER_H, FONT_H, $(BLD)/alloc.$(O), $(BLD)/callproc.$(O))
2631 ($(BLD)/editfns.$(O), $(BLD)/ccl.$(O), $(BLD)/chartab.$(O))
2632 ($(BLD)/coding.$(O), $(BLD)/sysdep.$(O), $(BLD)/fontset.$(O))
2633 ($(BLD)/sysdep.$(O), $(BLD)/w32fns.$(O), $(BLD)/keyboard.$(O))
2634 ($(BLD)/w32term.$(O), $(BLD)/w32menu.$(O), $(BLD)/process.$(O))
2635 ($(BLD)/w32font.$(O), $(BLD)/w32uniscribe.$(O)): Update dependencies.
2636
4dfbd238
EZ
26372012-09-01 Eli Zaretskii <eliz@gnu.org>
2638
7e510e28
EZ
2639 * w32uniscribe.c (uniscribe_shape): Handle correctly the case of
2640 more than one grapheme cluster passed to the shaper: compute the
2641 offset adjustment values separately for each cluster. (Bug#11860)
2642
4dfbd238
EZ
2643 * image.c: Restore mistakenly removed inclusion of w32.h. Without
2644 it, GCC doesn't see prototypes of w32_delayed_load, and complains
2645 about implicit conversions from integer to pointer.
2646
86571ae0
DC
26472012-09-01 Daniel Colascione <dancol@dancol.org>
2648
2649 * w32fns.c (x_display_info_for_name): Prevent crash if w32 window
2650 system used too early.
2651
0e23ef9d
PE
26522012-09-01 Paul Eggert <eggert@cs.ucla.edu>
2653
2654 Better seed support for (random).
2655 * emacs.c (main): Call init_random.
2656 * fns.c (Frandom): Set the seed from a string argument, if given.
2657 Remove long-obsolete Gentzel cruft.
2658 * lisp.h, sysdep.c (seed_random): Now takes address and size, not long.
2659 (init_random): New function.
2660
17a2cbbd
DC
26612012-09-01 Daniel Colascione <dancol@dancol.org>
2662
2663 * xterm.h: Add header guards. Declare x_menubar_window_to_frame.
2664 Remove x_set_frame_alpha, x_bitmap_icon, x_make_frame_visible,
2665 x_make_frame_invisible, x_iconify_frame, x_free_frame_resources,
2666 x_wm_set_size_hint, x_query_colors, x_real_positions,
2667 x_set_menu_bar_lines, x_char_width, x_char_height, x_sync,
2668 x_set_tool_bar_lines, x_activate_menubar, and free_frame_menubar,
2669 all of which have been moved to common code.
2670
2671 * xfaces.c: Include TERM_HEADER instead of listing all possible
2672 window-system headers.
2673
2674 * w32xfns.c (x_sync): Correct definition of x_sync (a no-op here)
2675 to match header.
2676
2677 * w32term.h (FRAME_X_WINDOW): Use FRAME_W32_WINDOW instead of
2678 directly accessing frame internals.
2679
f18cbb28 2680 * w32font.h: Include font.h. Define syms_of_w32font and
17a2cbbd
DC
2681 globals_of_w32font.
2682
2683 * process.c: Include TERM_HEADER instead of listing all possible
2684 window-system headers.
2685
3a880af4
SM
2686 * nsterm.h: Remove declarations now in frame.h.
2687 Define FRAME_X_SCREEN, FRAME_X_VISUAL.
17a2cbbd
DC
2688
2689 * menu.c: Include TERM_HEADER instead of listing all possible
2690 window-system headers.
2691
2692 * keyboard.h: Declare ignore_mouse_drag_p whenever we have a
2693 window system.
2694
2695 * keyboard.c: Include TERM_HEADER instead of listing all possible
2696 window-system headers.
2697
2698 * image.c: Include TERM_HEADER instead of listing all possible
2699 window-system headers. Declare Vlibrary_cache when compiling for
2700 Windows.
2701
2702 * gtkutil.h (xg_list_node_): Include xterm.h to pick up needed
2703 window system declarations.
2704
2705 * frame.h: Move common functions here: set_frame_menubar,
2706 x_set_window_size, x_sync, x_get_focus_frame,
2707 x_set_mouse_position, x_set_mouse_pixel_position,
2708 x_make_frame_visible, x_make_frame_invisible, x_iconify_frame,
2709 x_char_width, x_char_height, x_pixel_width, x_pixel_height,
2710 x_set_frame_alpha, x_set_menu_bar_lines, x_set_tool_bar_lines,
2711 x_activate_menubar, x_real_positions, x_bitmap_icon,
2712 x_set_menu_bar_lines, free_frame_menubar, x_free_frame_resources,
2713 and x_query_colors.
2714
2715 * frame.c: Include TERM_HEADER instead of listing all possible
2716 window-system headers.
2717
2718 * font.c: Include TERM_HEADER instead of listing all possible
2719 window-system headers.
2720
2721 * emacs.c: Include TERM_HEADER.
2722
f18cbb28
EZ
2723 * dispnew.c: Include TERM_HEADER instead of listing all possible
2724 window-system headers.
17a2cbbd 2725
f18cbb28 2726 * ccl.h: Include character.h.
17a2cbbd
DC
2727
2728 * Makefile.in: Define WINDOW_SYSTEM_OBJ to hold objects needed for
2729 the current window system; include in list of objects to link into
2730 Emacs.
2731
c650a5de
DA
27322012-08-31 Dmitry Antipov <dmantipov@yandex.ru>
2733
2734 Remove mark_ttys function and fix tty_display_info initialization.
2735 * lisp.h (mark_ttys): Remove prototype.
2736 * alloc.c (Fgarbage_collect): Remove redundant (and the only) call
2737 to mark_ttys because all possible values of 'top_frame' slot are
2738 the frames which are reachable from Vframe_list.
2739 * term.c (mark_ttys): Remove.
2740 (init_tty): Safely initialize 'top_frame' slot with Qnil.
2741
4e0f6479
DA
27422012-08-31 Dmitry Antipov <dmantipov@yandex.ru>
2743
2744 Change struct frame bitfields from unsigned char to unsigned.
2745 * frame.h (struct frame): Change type of 'display_preempted',
2746 'visible', 'iconified', 'has_minibuffer', 'wants_modeline',
2747 'auto_raise', 'auto_lower', 'no_split', 'explicit_name',
2748 'window_sizes_changed', 'mouse_moved' and 'pointer_invisible'
2749 bitfields from unsigned char to unsigned.
2750
8b96a52c
DA
27512012-08-31 Dmitry Antipov <dmantipov@yandex.ru>
2752
2753 Remove unused member of struct x_output and struct w32_output.
2754 * xterm.h (struct x_output): Remove unused field 'needs_exposure'.
2755 * w32term.h (struct w32_output): Likewise.
2756
b4444c8a
JD
27572012-08-30 Jan Djärv <jan.h.d@swipnet.se>
2758
2759 * gtkutil.c (x_wm_set_size_hint): Use 1 col for base_width so it
2760 does not become zero (Bug#12234).
2761
b98521db
PE
27622012-08-30 Paul Eggert <eggert@cs.ucla.edu>
2763
2764 * dispnew.c (update_frame_1): Pacify gcc -Wstrict-overflow
2765 for GCC 4.7.1 x86-64.
2766
31d02438
GM
27672012-08-30 Glenn Morris <rgm@gnu.org>
2768
2769 * lread.c (init_lread): For out-of-tree builds, only add the
2770 source directory's site-lisp dir to the load-path if it exists,
2771 consistent with in-tree builds. (Bug#12302)
2772
7f8941d8
JD
27732012-08-28 Jan Djärv <jan.h.d@swipnet.se>
2774
2775 * nsmenu.m (initWithContentRect:styleMask:backing:defer:): Initialize
fc0c31f8 2776 button_values to NULL. Call setStykeMask so dialogs get a close button.
7f8941d8
JD
2777 (windowShouldClose:): Set window_closed.
2778 (dealloc): New member, free button_values.
fc0c31f8
JB
2779 (process_dialog:): Make member function. Remove window argument,
2780 replace window with self. Count buttons and allocate and store values
7f8941d8
JD
2781 in button_values.
2782 (addButton:value:row:): value is int with the name tag. Call setTag
fc0c31f8 2783 with tag. Remove return self, declare return value as void.
7f8941d8
JD
2784 (addString:row:): Remove return self, declare return value as void.
2785 (addSplit): Remove return self, declare return value as void.
2786 (clicked:): Remove return self, declare return value as void.
fc0c31f8 2787 Set dialog_return to button_values[seltag]. Code formatting change.
7f8941d8
JD
2788 (initFromContents:isQuestion:): Adjust call to process_dialog.
2789 Code formatting change.
2790 (timeout_handler:): Set timer_fired to YES.
2791 (runDialogAt:): Set timer_fired to NO.
2792 Handle click on close button as quit.
2793
2794 * nsterm.h (EmacsDialogPanel): Make timer_fired BOOL.
2795 Add window_closed and button_values. Add void as return value for
2796 add(Button|String|Split). addButton takes int instead of Lisp_Object.
2797 Add process_dialog as new member.
2798
eada0861 27992012-08-28 Eli Zaretskii <eliz@gnu.org>
19c17fc1 2800
eada0861
GM
2801 * ralloc.c (free_bloc): Don't dereference a 'heap' structure if it
2802 is not one of the heaps we manage. (Bug#12242)
2803
28042012-08-28 Glenn Morris <rgm@gnu.org>
2805
2806 * eval.c (Fcalled_interactively_p): Doc fix. (Bug#11747)
2807
457294dd
MR
28082012-08-28 Martin Rudalics <rudalics@gmx.at>
2809
2810 * window.c (Fset_window_configuration): Remove handling of
37b9743e
MR
2811 auto-buffer-name window parameter. Install revision of reverted
2812 fix.
457294dd 2813
4f2daf31
DA
28142012-08-28 Dmitry Antipov <dmantipov@yandex.ru>
2815
2816 Do not allow to set major mode for a dead buffer.
2817 * buffer.c (Fset_buffer_major_mode): Signal an error
2818 if the buffer is dead.
2819 (Fother_buffer, other_buffer_safely): Remove redundant
2820 nested declaration.
2821
66322887
DA
28222012-08-28 Dmitry Antipov <dmantipov@yandex.ru>
2823
2824 Always use set_buffer_if_live to restore original buffer at unwind.
2825 * buffer.h (record_unwind_current_buffer): New function.
2826 * bytecode.c, dispnew.c, editfns.c, fileio.c, fns.c, insdel.c:
2827 * keyboard.c, keymap.c, minibuf.c, print.c, process.c, textprop.c:
2828 * undo.c, window.c: Adjust users.
2829 * buffer.c (set_buffer_if_live): Fix comment.
2830
a3d794a1
DA
28312012-08-28 Dmitry Antipov <dmantipov@yandex.ru>
2832
2833 Fix usage of set_buffer_internal.
2834 * buffer.h (set_buffer_internal): Make it BUFFER_INLINE.
2835 * buffer.c (set_buffer_if_live): Use set_buffer_internal.
2836 * coding.c (decode_coding): Omit redundant test.
2837 * fileio.c (decide_coding_unwind): Likewise.
2838 * fns.c (secure_hash): Likewise.
2839 * insdel.c (modify_region): Likewise.
2840 * keyboard.c (command_loop_1): Likewise.
2841 * print.c (PRINTFINISH): Likewise.
2842 * xdisp.c (run_window_scroll_functions): Use set_buffer_internal.
2843
59ea14cd
PE
28442012-08-27 Paul Eggert <eggert@cs.ucla.edu>
2845
2846 * dispnew.c: Use bool for boolean.
2847 (frame_garbaged, display_completed, delayed_size_change)
2848 (fonts_changed_p, add_window_display_history)
2849 (add_frame_display_history, verify_row_hash)
2850 (adjust_glyph_matrix, clear_window_matrices, glyph_row_slice_p)
2851 (row_equal_p, realloc_glyph_pool)
2852 (allocate_matrices_for_frame_redisplay)
2853 (showing_window_margins_p)
2854 (adjust_frame_glyphs_for_frame_redisplay)
2855 (build_frame_matrix_from_leaf_window, make_current)
2856 (mirrored_line_dance, mirror_line_dance, update_frame)
2857 (update_window_tree, update_single_window)
2858 (check_current_matrix_flags, update_window, update_text_area)
2859 (update_window_line, set_window_update_flags, scrolling_window)
2860 (update_frame_1, scrolling, buffer_posn_from_coords)
2861 (do_pending_window_change, change_frame_size)
2862 (change_frame_size_1, sit_for):
2863 Use bool for boolean.
2864 (clear_glyph_matrix_rows): Rename from enable_glyph_matrix_rows,
2865 and remove last int (actually boolean) argument, which was always 0.
2866 All callers changed.
2867 * dispextern.h, frame.h, lisp.h: Reflect above API changes.
2868 * dispextern.h (struct composition_it): Use bool for boolean.
2869 (struct glyph_matrix): Don't assume buffer sizes can fit in 'int'.
2870 (struct bidi_it): Use unsigned:1, not int, for boolean prev_was_pdf.
2871 * dired.c (file_name_completion):
2872 Use bool for boolean. (This was missed in an earlier change.)
2873
95072a94
MR
28742012-08-27 Martin Rudalics <rudalics@gmx.at>
2875
2876 * window.c (Fset_window_configuration): Revert first part of
2877 last change.
2878
0f19feff
JD
28792012-08-27 Jan Djärv <jan.h.d@swipnet.se>
2880
2881 * nsterm.h (NSPanel): New class variable dialog_return.
2882
3a880af4
SM
2883 * nsmenu.m (initWithContentRect:styleMask:backing:defer:):
2884 Initialize dialog_return.
0f19feff
JD
2885 (windowShouldClose:): Use stop instead of stopModalWithCode.
2886 (clicked:): Ditto, and also set dialog_return (Bug#12258).
2887 (timeout_handler:): Use stop instead of abortModal. Send a dummy
2888 event.
2889 (runDialogAt:): Make ret Lisp_Object. Set it from dialog_return when
2890 modal loop returns.
2891
f10fe38f
PE
28922012-08-27 Paul Eggert <eggert@cs.ucla.edu>
2893
de1339b0
PE
2894 * composite.c, data.c, dbusbind.c, dired.c: Use bool for booleans.
2895 * composite.c (find_composition, composition_gstring_p)
2896 (composition_reseat_it, find_automatic_composition):
2897 * data.c (let_shadows_buffer_binding_p)
2898 (let_shadows_global_binding_p, set_internal, make_blv)
2899 (Fmake_variable_buffer_local, Fmake_local_variable)
2900 (Fmake_variable_frame_local, arithcompare, cons_to_unsigned)
2901 (cons_to_signed, arith_driver):
2902 * dbusbind.c (xd_in_read_queued_messages):
2903 * dired.c (directory_files_internal, file_name_completion):
2904 Use bool for booleans.
2905 * dired.c (file_name_completion):
2906 * process.h (fd_callback):
2907 Omit int (actually boolean) argument. It wasn't being used.
2908 All uses changed.
2909 * composite.h, lisp.h: Reflect above API changes.
2910
f10fe38f
PE
2911 * cmds.c, coding.c: Use bool for booleans.
2912 * cmds.c (move_point, Fself_insert_command):
2913 * coding.h (struct composition status, struct coding_system):
2914 * coding.c (detect_coding_utf_8, encode_coding_utf_8)
2915 (detect_coding_utf_16, encode_coding_utf_16, detect_coding_emacs_mule)
2916 (emacs_mule_char, decode_coding_emacs_mule)
2917 (encode_coding_emacs_mule, detect_coding_iso_2022)
2918 (decode_coding_iso_2022, encode_invocation_designation)
2919 (encode_designation_at_bol, encode_coding_iso_2022)
2920 (detect_coding_sjis, detect_coding_big5, decode_coding_sjis)
2921 (decode_coding_big5, encode_coding_sjis, encode_coding_big5)
2922 (detect_coding_ccl, encode_coding_ccl, decode_coding_raw_text)
2923 (encode_coding_raw_text, detect_coding_charset)
2924 (decode_coding_charset, encode_coding_charset, detect_eol)
2925 (detect_coding, get_translation_table, produce_chars)
2926 (consume_chars, reused_workbuf_in_use)
2927 (make_conversion_work_buffer, code_conversion_save)
2928 (decode_coding_object, encode_coding_object)
2929 (detect_coding_system, char_encodable_p)
2930 (Funencodable_char_position, code_convert_region)
2931 (code_convert_string, code_convert_string_norecord)
2932 (Fset_coding_system_priority):
2933 * fileio.c (Finsert_file_contents):
2934 Use bool for booleans.
2935 * coding.h, lisp.h: Reflect above API changes.
2936 * coding.c: Remove unnecessary static function decls.
2937 (detect_coding): Use unsigned, not signed, to copy an unsigned field.
2938 (decode_coding, encode_coding, decode_coding_gap): Return 'void',
2939 not a boolean 'int', since callers never look at the return value.
2940 (ALLOC_CONVERSION_WORK_AREA): Assume caller returns 'void', not 'int'.
2941 * coding.h (decoding_buffer_size, encoding_buffer_size)
2942 (emacs_mule_string_char): Remove unused extern decls.
2943 (struct iso_2022_spec, struct coding_system):
2944 Use 'unsigned int : 1' for boolean fields, since there's more than one.
2945 (struct emacs_mule_spec): Remove unused field 'full_support'.
2946 All initializations removed.
2947 * cmds.c (internal_self_insert): Don't assume EMACS_INT fits in 'int'.
2948
5474c384
DA
29492012-08-27 Dmitry Antipov <dmantipov@yandex.ru>
2950
f10fe38f 2951 Fix spare memory change (Bug#12286).
5474c384
DA
2952 * alloc.c (mark_maybe_pointer): Handle MEM_TYPE_SPARE.
2953 (valid_lisp_object_p): Likewise.
2954
c4b6914d
MR
29552012-08-27 Martin Rudalics <rudalics@gmx.at>
2956
2957 * window.c (Fset_window_configuration): Record any window's old
2958 buffer if it's replaced (see Bug#8789). If the new current
2959 buffer doesn't appear in the selected window, go to its old
2960 point (Bug#12208).
2961
35aaa1ea
DA
29622012-08-27 Dmitry Antipov <dmantipov@yandex.ru>
2963
2964 Special MEM_TYPE_SPARE to denote reserved memory.
2965 * alloc.c (enum mem_type): New memory type.
2966 (refill_memory_reserve): Use new type for spare memory.
2967 This prevents live_cons_p and live_string_p from incorrect
2968 detection of uninitialized objects from spare memory as live.
2969
6af64513
PE
29702012-08-26 Paul Eggert <eggert@cs.ucla.edu>
2971
8b2e00a3
PE
2972 Spelling fixes.
2973 * Makefile.in (.PHONY): versioclean -> versionclean.
2974
b52d6985
PE
2975 Remove unused external symbols.
2976 * data.c (Qcons, Qfloat, Qmisc, Qstring, Qvector):
2977 * window.c (Qwindow_valid_p, decode_valid_window):
2978 Now static, not extern.
2979 * data.c (Qinterval): Remove; unused.
2980 (syms_of_data): Do not define 'interval'.
2981 * lisp.h (Qinteger, Qstring, Qmisc, Qvector, Qfloat, Qcons):
2982 * window.h (decode_valid_window):
2983 Remove decls.
2984
d5172d4f
PE
2985 * character.c, charset.c, chartab.c: Use bool for booleans.
2986 * character.c (lisp_string_width, string_count_byte8)
2987 (string_escape_byte8):
2988 * charset.c (charset_map_loaded, load_charset_map, read_hex):
2989 (load_charset_map_from_file, map_charset_chars)
2990 (Fdefine_charset_internal, define_charset_internal)
2991 (Fdeclare_equiv_charset, find_charsets_in_text)
2992 (Ffind_charset_region, char_charset, Fiso_charset):
2993 * chartab.c (sub_char_table_ref, sub_char_table_ref_and_range)
2994 (sub_char_table_set, sub_char_table_set_range)
2995 (char_table_set_range, optimize_sub_char_table)
2996 (map_sub_char_table):
2997 Use bool for boolean.
2998 * character.c (str_to_unibyte): Omit last boolean argument; it was
2999 always 0. All callers changed.
3000 * character.h, charset.h: Adjust to match previous changes.
3001 * character.h (char_printable_p): Remove decl of nonexistent function.
3002 * charset.h (struct charset): Members code_linear_p, iso_chars_96,
3003 ascii_compatible_p, supplementary_p, compact_codes_p, unified_p
3004 are all boolean, so make them single-bit bitfields.
3005
6af64513
PE
3006 * lisp.h (ASET): Remove attempt to detect side effects.
3007 It was meant to be temporary and it often doesn't work,
3008 because when IDX has side effects the behavior of IDX==IDX
3009 is undefined. See Stefan Monnier in
3010 <http://lists.gnu.org/archive/html/emacs-devel/2012-08/msg00762.html>.
3011
e1f29348
BR
30122012-08-26 Barry OReilly <gundaetiapo@gmail.com> (tiny change)
3013
3014 * lisp.h (functionp): New function (extracted from Ffunctionp).
3015 (FUNCTIONP): Use it.
3016 * eval.c (Ffunctionp): Use it.
3017
17c05d74
PE
30182012-08-25 Paul Eggert <eggert@cs.ucla.edu>
3019
0f46bc75
PE
3020 * xgselect.c (xg_select): Use auto storage for the GPollFD buffer
3021 as that's faster and simpler than static storage. Don't bother
3022 with the g_main_context_query overhead if g_main_context_pending
3023 says no events are pending.
3024 (gfds, gfds_size): Remove these static vars.
3025 (xgselect_initialize): Remove; no longer needed.
3026 All uses and decls removed.
3027
ee4c0f69
PE
3028 * emacs.c (fatal_error_signal_hook): Remove.
3029 All uses removed. This leftover from old code was always 0.
3030
17c05d74
PE
3031 * casefiddle.c, casetab.c, category.c: Use bool for boolean.
3032 * casefiddle.c (casify_object, casify_region):
3033 * casetab.c (set_case_table):
3034 * category.c, category.h (word_boundary_p):
3035 * category.h (CHAR_HAS_CATEGORY):
3036 Use bool for booleans, instead of int.
3037
391ceac5
EZ
30382012-08-25 Eli Zaretskii <eliz@gnu.org>
3039
3040 * makefile.w32-in ($(BLD)/alloc.$(O)): Depend on $(GNU_LIB)/execinfo.h.
3041
2f221583
PE
30422012-08-25 Paul Eggert <eggert@cs.ucla.edu>
3043
f4a681b0
PE
3044 On assertion failure, print backtrace if available.
3045 * alloc.c [ENABLE_CHECKING]: Include <execinfo.h>.
3046 (die) [ENABLE_CHECKING]: Print a backtrace if available.
3047 * Makefile.in (LIB_EXECINFO): New macro.
3048 (LIBES): Use it.
3049
2f221583
PE
3050 * bytecode.c, callint.c, callproc.c: Use bool for boolean.
3051 * bytecode.c (exec_byte_code):
3052 * callint.c (check_mark, Fcall_interactively):
3053 * callproc.c (Fcall_process, add_env, child_setup, getenv_internal_1)
3054 (getenv_internal, sync_process_alive, call_process_exited):
3055 * lisp.h (USE_SAFE_ALLOCA):
3056 Use bool for booleans, instead of int.
3057 * lisp.h, process.h: Adjust prototypes to match above changes.
3058 * callint.c (Fcall_interactively): Don't assume the mark's
3059 offset fits in 'int'.
3060
37ef52bb
PE
30612012-08-24 Paul Eggert <eggert@cs.ucla.edu>
3062
3063 * buffer.c, buffer.h: Use bool for boolean.
3064 * buffer.c (reset_buffer_local_variables)
3065 (buffer_lisp_local_variables, Fset_buffer_modified_p)
3066 (Frestore_buffer_modified_p, Fset_buffer_multibyte):
3067 (overlays_at, overlays_in, mouse_face_overlay_overlaps)
3068 (overlay_touches_p, overlay_strings, Foverlay_put)
3069 (report_overlay_modification, call_overlay_mod_hooks):
3070 (mmap_enlarge, mmap_set_vars):
3071 * buffer.h (buffer_has_overlays, uppercasep, lowercasep):
3072 Use bool for booleans, instead of int.
3073 * buffer.c (compact_buffer, mmap_free_1): Return void, not int,
3074 since the 1-or-0 return value is always ignored anyway.
3075 (mmap_initialized_p):
3076 * buffer.h (struct buffer_text.inhibit_shrinking): Now bool, not int.
3077 * buffer.h, lisp.h: Adjust prototypes to match above changes.
3078
2cc21167
PE
30792012-08-23 Paul Eggert <eggert@cs.ucla.edu>
3080
3081 * bidi.c: Use bool for boolean.
3082 This is a bit more readable, and makes the text segment of bidi.o
3083 0.4% smaller on my platform (GCC 4.7.1 x86-64, Fedora 15).
3084 Presumably it's faster too.
3085 (bidi_initialized, bidi_ignore_explicit_marks_for_paragraph_level):
3086 Now bool.
3087 (bidi_cache_find_level_change, bidi_cache_iterator_state)
3088 (bidi_unshelve_cache, bidi_init_it, bidi_count_bytes)
3089 (bidi_char_at_pos, bidi_fetch_char, bidi_paragraph_init)
3090 (bidi_explicit_dir_char, bidi_level_of_next_char)
3091 (bidi_find_other_level_edge, bidi_move_to_visually_next):
3092 Use bool for booleans, instead of int.
3093 * dispextern.h (bidi_init_it, bidi_paragraph_init)
3094 (bidi_unshelve_cache): Adjust decls to match code.
3095
7db4ddf4
MR
30962012-08-23 Martin Rudalics <rudalics@gmx.at>
3097
3098 * keyboard.c (Fposn_at_x_y): Do not allow internal window as
3099 argument.
3100
b1bb8011
PE
31012012-08-23 Paul Eggert <eggert@cs.ucla.edu>
3102
3103 * atimer.c, atimer.h (turn_on_atimers): Use bool for boolean.
3104 * atimer.h: Include <stdbool.h>.
3105
ff687885
DN
31062012-08-22 Dan Nicolaescu <dann@gnu.org>
3107
3108 * frame.h (FRAME_W32_P, FRAME_MSDOS_P, FRAME_NS_P): Change to
3109 compile time tests instead of run time tests on systems that do
3110 not use them.
3111 (FRAME_MAC_P): Remove leftover from deleted code.
3112 * frame.c (syms_of_frame): Remove leftover from deleted code.
3113
4ce7a138
JD
31142012-08-22 Jan Djärv <jan.h.d@swipnet.se>
3115
3116 * nsterm.m (insertText:): Don't clear modifiers if code is space.
3117
d733ec6d
PE
31182012-08-22 Paul Eggert <eggert@cs.ucla.edu>
3119
3120 * fontset.c (FONTSET_ADD): Return void, not Lisp_Object.
3121 Otherwise, the compiler complains about (A?B:C) where B is void
fc0c31f8 3122 and C is Lisp_Object. This fixes an incompatibility with Sun C 5.12.
d733ec6d
PE
3123 (fontset_add): Return void, for FONTSET_ADD.
3124
d0d2d26f
PE
31252012-08-21 Paul Eggert <eggert@cs.ucla.edu>
3126
fce31d69
PE
3127 * alloc.c: Use bool for booleans.
3128 (gc_in_progress, abort_on_gc)
3129 (setjmp_tested_p) [!GC_SAVE_REGISTERS_ON_STACK && !GC_SETJMP_WORKS]:
3130 (dont_register_blocks) [GC_MALLOC_CHECK]:
3131 (suppress_checking) [ENABLE_CHECKING]: Now bool, not int.
3132 (check_string_bytes, make_specified_string, memory_full)
3133 (live_string_p, live_cons_p, live_symbol_p, live_float_p)
3134 (live_misc_p, live_vector_p, live_buffer_p, mark_maybe_object)
3135 (mark_stack, valid_pointer_p, make_pure_string)
3136 (Fgarbage_collect, survives_gc_p, gc_sweep):
3137 Use bool for booleans, instead of int.
3138 (test_setjmp) [!GC_SAVE_REGISTERS_ON_STACK && !GC_SETJMP_WORKS]:
3139 Remove unused local.
3140 * alloc.c (PURE_POINTER_P):
3141 * lisp.h (STRING_MULTIBYTE): Document that it returns a boolean.
3142 * editfns.c (Fformat):
3143 * fileio.c (Fexpand_file_name, Fsubstitute_in_file_name)
3144 (Fdo_auto_save):
3145 * fns.c (sweep_weak_table):
3146 * lisp.h (suppress_checking, push_message, survives_gc_p)
3147 (make_pure_string, gc_in_progress, abort_on_gc):
3148 * lread.c (readchar, read1):
3149 * print.c (Fprin1_to_string):
3150 * xdisp.c (push_message):
3151 Use bool for booleans affected directly or indirectly by
3152 alloc.c's changes.
3153
d0d2d26f
PE
3154 Make recently-introduced setters macros.
3155 * fontset.c (set_fontset_id, set_fontset_name, set_fontset_ascii)
3156 (set_fontset_base, set_fontset_frame, set_fontset_nofont_face)
3157 (set_fontset_default, set_fontset_fallback): Rename from their
3158 upper-case counterparts, and make them functions rather than macros.
3159 This is more consistent with the other recently-introduced setters.
3160 These don't need to be inline, since they're local.
3161
d18e2bb6
JD
31622012-08-21 Jan Djärv <jan.h.d@swipnet.se>
3163
3164 * nsterm.m (fd_handler:): Alloc and release a NSAutoreleasePool in
3165 the loop (Bug#12247).
3166
1b9d9d16
PE
31672012-08-21 Paul Eggert <eggert@cs.ucla.edu>
3168
3169 * lisp.h (vcopy): Use memcpy rather than our own loop.
3170 This fixes a performance regression introduced by the recent
3171 addition of vcopy. This means 'vcopy' will need to be modified
3172 for a copying collector, but that's OK. Also, tighten the
3173 checking in the assertion.
3174
b2f09701
EZ
31752012-08-21 Eli Zaretskii <eliz@gnu.org>
3176
3177 * w32uniscribe.c (uniscribe_shape): Fix producing gstring
3178 components for RTL text (Bug#11860). Adjust X-OFFSET of each
3179 non-base glyph for the width of the base character, according to
e1f29348
BR
3180 what x_draw_composite_glyph_string_foreground expects.
3181 Generate WADJUST value according to composition_gstring_width's
b2f09701
EZ
3182 expectations, to produce correct width of the composed character.
3183 Reverse the sign of the DU offset produced by ScriptPlace.
3184
9b994fed
PE
31852012-08-21 Paul Eggert <eggert@cs.ucla.edu>
3186
3187 * dbusbind.c (xd_remove_watch): Do not assume C99 comments.
3188
086ca913
DA
31892012-08-21 Dmitry Antipov <dmantipov@yandex.ru>
3190
3191 Avoid direct writes to contents member of struct Lisp_Vector.
3192 * lisp.h (vcopy): New function to copy data into vector.
3193 * dispnew.c (Fframe_or_buffer_changed_p): Use AREF and ASET.
3194 * fns.c (Ffillarray): Use ASET.
3195 * keyboard.c (timer_check_2): Use AREF and ASET.
3196 (append_tool_bar_item, Frecent_keys): Use vcopy.
3197 * lread.c (read_vector): Use ASET.
3198 * msdos.c (Frecent_doskeys): Use vcopy.
3199 * xface.c (Finternal_copy_lisp_face): Use vcopy.
3200 (Finternal_merge_in_global_face): Use ASET and vcopy.
3201 * xfont.c (xfont_list_pattern): Likewise.
3202
5481664a
MR
32032012-08-21 Martin Rudalics <rudalics@gmx.at>
3204
3205 * window.c (Fwindow_point): For the selected window always return
3206 the position of its buffer's point.
3207 (Fset_window_point): For the selected window always go in its
3208 buffer to the specified position.
3209
6d470bdd
DA
32102012-08-21 Dmitry Antipov <dmantipov@yandex.ru>
3211
3212 Setter macros for fontsets.
3213 * fontset.c (SET_FONTSET_ID, SET_FONTSET_NAME, SET_FONTSET_ASCII)
3214 (SET_FONTSET_BASE, SET_FONTSET_FRAME, SET_FONTSET_NOFONT_FACE)
3215 (SET_FONTSET_DEFAULT, SET_FONTSET_FALLBACK): New macros.
3216 Adjust users.
3217
24564fe1
GM
32182012-08-20 Glenn Morris <rgm@gnu.org>
3219
3220 * Makefile.in (emacs$(EXEEXT), bootstrap-emacs$(EXEEXT)):
3221 Don't assume that `ln -f' works.
3222
0a05a035
EZ
32232012-08-20 Eli Zaretskii <eliz@gnu.org>
3224
3225 * .gdbinit: Use "set $dummy = ..." to avoid warnings from GDB 7.5
3226 and later about non-assignments with no effect. See discussion at
3227 http://sourceware.org/ml/gdb-patches/2012-08/msg00518.html for
3228 details.
3229
e46f2325
DA
32302012-08-20 Dmitry Antipov <dmantipov@yandex.ru>
3231
3232 Inline setter functions for Lisp_Objects slots of struct specbinding.
3233 * eval.c (set_specpdl_symbol, set_specpdl_old_value): New functions.
3234 Adjust users.
3235
734fbd86
MR
32362012-08-20 Martin Rudalics <rudalics@gmx.at>
3237
3238 * window.c (select_window): Always make selected window's buffer
3239 current.
3240
f1a95992
DA
32412012-08-20 Dmitry Antipov <dmantipov@yandex.ru>
3242
3243 Use AREF and ASET for docstrings of category tables.
3244 * category.h (CATEGORY_DOCSTRING): Use AREF.
3245 (SET_CATEGORY_DOCSTRING): Use ASET.
3246 * category.c (Fdefine_category): Use SET_CATEGORY_DOCSTRING.
3247
e83064be
DA
32482012-08-20 Dmitry Antipov <dmantipov@yandex.ru>
3249
3250 Inline setter functions for hash table members.
3251 * lisp.h (set_hash_key, set_hash_value, set_hash_next)
3252 (set_hash_hash, set_hash_index): Rename with _slot suffix.
3253 (set_hash_key_and_value, set_hash_index, set_hash_next)
3254 (set_hash_hash): New functions.
3255 * charset.c, fns.c: Adjust users.
3256
4ce60d2e
DA
32572012-08-20 Dmitry Antipov <dmantipov@yandex.ru>
3258
3259 Inline getter and setter functions for per-buffer values.
3260 * buffer.h (per_buffer_default, set_per_buffer_default)
3261 (per_buffer_value, set_per_buffer_value): New functions.
3262 (PER_BUFFER_VALUE, PER_BUFFER_DEFAULT): Remove.
3263 * buffer.c, data.c: Adjust users.
3264
c06c9690
JB
32652012-08-20 Juanma Barranquero <lekktu@gmail.com>
3266
3267 * makefile.w32-in ($(BLD)/vm-limit.$(O)): Update dependencies.
3268
32bd4250
PE
32692012-08-19 Paul Eggert <eggert@cs.ucla.edu>
3270
bad03192 3271 Rely on <config.h> + <unistd.h> to declare 'environ',
b69a6d22
PE
3272 as gnulib does this if the system doesn't.
3273 * callproc.c, editfns.c, process.c (environ) [!USE_CRT_DLL]:
72279493
EZ
3274 Remove declaration. MS-Windows declares it on stdlib.h which is
3275 included by conf_post.h.
b69a6d22
PE
3276 * emacs.c (environ) [DOUG_LEA_MALLOC]:
3277 * vm-limit.c (environ) [ORDINARY_LINK]: Remove decl.
3278 * vm-limit.c: Include <unistd.h>, for 'environ'.
3279
22d7feb2
PE
3280 * unexaix.c, unexcoff.c: Include "mem-limits.h".
3281 (start_of_data): Remove decl; mem-limits.h provides it.
3282
32bd4250
PE
3283 * xdisp.c (handle_invisible_prop): Make it a bit faster
3284 and avoid a gcc -Wmaybe-uninitialized diagnostic.
3285
450809af
CY
32862012-08-19 Chong Yidong <cyd@gnu.org>
3287
3288 * xdisp.c (handle_invisible_prop): Fix ellipses at overlay string
3289 ends (Bug#3874).
3290
9e677988
AS
32912012-08-19 Andreas Schwab <schwab@linux-m68k.org>
3292
6b1319ce
AS
3293 * .gdbinit: Use call instead of set when calling a function in the
3294 inferior.
3295
9e677988
AS
3296 * data.c (set_internal): Don't use set_blv_found.
3297 (Fkill_local_variable): Likewise.
3298
d7191076
AA
32992012-08-18 Alp Aker <alp.tekin.aker@gmail.com>
3300
3301 * nsfont.m (ns_ascii_average_width): Ensure the string
3302 ascii_printable is initialized with a null-terminated character
3303 array. Otherwise, it can contain undesired extra characters.
3304
e757f1c6
PE
33052012-08-18 Paul Eggert <eggert@cs.ucla.edu>
3306
3307 port new setting code to Sun C 5.8 2005/10/13
3308 * chartab.c, lisp.h (char_table_set, char_table_set_range):
3309 Return void, not Lisp_Object. Otherwise, the compiler
3310 complains about (A?B:C) where B is void and C is Lisp_Object
3311 when compiling CHAR_TABLE_SET, due to the recent change to
3312 the API of sub_char_table_set_contents.
3313
a999ce26
CY
33142012-08-18 Chong Yidong <cyd@gnu.org>
3315
3316 * xdisp.c (handle_invisible_prop): Obey TEXT_PROP_MEANS_INVISIBLE
3317 for the string case (Bug#3874).
3318
3f22b86f
PE
33192012-08-18 Paul Eggert <eggert@cs.ucla.edu>
3320
39eb03f1
PE
3321 * buffer.h (BSET): Remove (Bug#12215).
3322 Replace all uses with calls to new setter functions.
3323 (bset_bidi_paragraph_direction, bset_case_canon_table)
3324 (bset_case_eqv_table, bset_directory, bset_display_count)
3325 (bset_display_time, bset_downcase_table)
3326 (bset_enable_multibyte_characters, bset_filename, bset_keymap)
3327 (bset_last_selected_window, bset_local_var_alist)
3328 (bset_mark_active, bset_point_before_scroll, bset_read_only)
3329 (bset_truncate_lines, bset_undo_list, bset_upcase_table)
3330 (bset_width_table):
3331 * buffer.c (bset_abbrev_mode, bset_abbrev_table)
3332 (bset_auto_fill_function, bset_auto_save_file_format)
3333 (bset_auto_save_file_name, bset_backed_up, bset_begv_marker)
3334 (bset_bidi_display_reordering, bset_buffer_file_coding_system)
3335 (bset_cache_long_line_scans, bset_case_fold_search)
3336 (bset_ctl_arrow, bset_cursor_in_non_selected_windows)
3337 (bset_cursor_type, bset_display_table, bset_extra_line_spacing)
3338 (bset_file_format, bset_file_truename, bset_fringe_cursor_alist)
3339 (bset_fringe_indicator_alist, bset_fringes_outside_margins)
3340 (bset_header_line_format, bset_indicate_buffer_boundaries)
3341 (bset_indicate_empty_lines, bset_invisibility_spec)
3342 (bset_left_fringe_width, bset_major_mode, bset_mark)
3343 (bset_minor_modes, bset_mode_line_format, bset_mode_name)
3344 (bset_name, bset_overwrite_mode, bset_pt_marker)
3345 (bset_right_fringe_width, bset_save_length)
3346 (bset_scroll_bar_width, bset_scroll_down_aggressively)
3347 (bset_scroll_up_aggressively, bset_selective_display)
3348 (bset_selective_display_ellipses, bset_vertical_scroll_bar_type)
3349 (bset_word_wrap, bset_zv_marker):
3350 * category.c (bset_category_table):
3351 * syntax.c (bset_syntax_table):
3352 New setter functions.
3353
6a09a33b
PE
3354 * process.h (PSET): Remove (Bug#12215).
3355 Replace all uses with calls to new setter functions.
3356 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
3357 (PROCESS_INLINE): New macro.
3358 (pset_childp): New setter function.
3359 (pset_gnutls_cred_type) [HAVE_GNUTLS]: New setter function.
3360 * process.c (PROCESS_INLINE):
3361 Define to EXTERN_INLINE, so that the corresponding functions
3362 are compiled into code.
3363 (pset_buffer, pset_command, pset_decode_coding_system)
3364 (pset_decoding_buf, pset_encode_coding_system)
3365 (pset_encoding_buf, pset_filter, pset_log, pset_mark, pset_name)
3366 (pset_plist, pset_sentinel, pset_status, pset_tty_name)
3367 (pset_type, pset_write_queue): New setter functions.
3368
e8c17b81
PE
3369 * window.h (WSET): Remove (Bug#12215).
3370 Replace all uses with calls to new setter functions.
3371 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
3372 (WINDOW_INLINE): New macro.
3373 (wset_buffer, wset_frame, wset_left_col, wset_next, wset_prev)
3374 (wset_redisplay_end_trigger, wset_top_line, wset_total_cols)
3375 (wset_total_lines, wset_vertical_scroll_bar)
3376 (wset_window_end_pos, wset_window_end_valid)
3377 (wset_window_end_vpos): New setter functions.
3378 * window.c (WINDOW_INLINE):
3379 Define to EXTERN_INLINE, so that the corresponding functions
3380 are compiled into code.
3381 (wset_combination_limit, wset_dedicated, wset_display_table)
3382 (wset_hchild, wset_left_fringe_width, wset_left_margin_cols)
3383 (wset_new_normal, wset_new_total, wset_next_buffers)
3384 (wset_normal_cols, wset_normal_lines, wset_parent, wset_pointm)
3385 (wset_prev_buffers, wset_right_fringe_width)
3386 (wset_right_margin_cols, wset_scroll_bar_width, wset_start)
3387 (wset_temslot, wset_vchild, wset_vertical_scroll_bar_type)
3388 (wset_window_parameters):
3389 * xdisp.c (wset_base_line_number, wset_base_line_pos)
3390 (wset_column_number_displayed, wset_region_showing):
3391 New setter functions.
3392
3f22b86f
PE
3393 * termhooks.h (TSET): Remove (Bug#12215).
3394 Replace all uses with calls to new setter functions.
3395 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
3396 (TERMHOOKS_INLINE): New macro.
3397 (tset_charset_list, tset_selection_alist): New setter functions.
3398 * terminal.c (TERMHOOKS_INLINE):
3399 Define to EXTERN_INLINE, so that the corresponding functions
3400 are compiled into code.
3401 (tset_param_alist): New setter function.
3402
742af32f
PE
34032012-08-17 Paul Eggert <eggert@cs.ucla.edu>
3404
15dbb4d6
PE
3405 * keyboard.h (KSET): Remove (Bug#12215).
3406 Replace all uses with calls to new setter functions.
3407 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
3408 (KEYBOARD_INLINE): New macro.
3409 (kset_default_minibuffer_frame, kset_defining_kbd_macro)
3410 (kset_input_decode_map, kset_last_command, kset_last_kbd_macro)
3411 (kset_prefix_arg, kset_system_key_alist, kset_window_system):
3412 New setter functions.
3413 * keyboard.c (KEYBOARD_INLINE):
3414 Define to EXTERN_INLINE, so that the corresponding functions
3415 are compiled into code.
3416 (kset_echo_string, kset_kbd_queue)
3417 (kset_keyboard_translate_table, kset_last_prefix_arg)
3418 (kset_last_repeatable_command, kset_local_function_key_map)
3419 (kset_overriding_terminal_local_map, kset_real_last_command)
3420 (kset_system_key_syms): New setter functions.
3421
f00af5b1
PE
3422 * frame.h (FSET): Remove (Bug#12215).
3423 Replace all uses with calls to new setter functions.
3424 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
3425 (FRAME_INLINE): New macro.
3426 (fset_buffer_list, fset_buried_buffer_list, fset_condemned_scroll_bars)
3427 (fset_current_tool_bar_string, fset_desired_tool_bar_string)
3428 (fset_face_alist, fset_focus_frame, fset_icon_name, fset_menu_bar_items)
3429 (fset_menu_bar_vector, fset_menu_bar_window, fset_name)
3430 (fset_param_alist, fset_root_window, fset_scroll_bars)
3431 (fset_selected_window, fset_title, fset_tool_bar_items)
3432 (fset_tool_bar_position, fset_tool_bar_window): New functions.
3433 * frame.c (FRAME_INLINE):
3434 Define to EXTERN_INLINE, so that the corresponding functions
3435 are compiled into code.
3436 (fset_buffer_predicate, fset_minibuffer_window): New setter functions.
3437
0c94c8d6
PE
3438 A few more naming-convention fixes for getters and setters.
3439 * buffer.c (set_buffer_overlays_before): Move here from buffer.h,
3440 and rename from buffer_overlays_set_before.
3441 (set_buffer_overlays_after): Move here from buffer.h, and rename
3442 from buffer_overlays_set_after.
3443 * buffer.h (buffer_intervals): Rename from buffer_get_intervals.
3444 All uses changed.
3445 (set_buffer_intervals): Rename from buffer_set_intervals.
3446 * intervals.c (set_interval_object): Move here from intervals.h,
3447 and rename from interval_set_object.
3448 (set_interval_left): Move here from intervals.h, and rename from
3449 interval_set_left.
3450 (set_interval_right): Move here from intervals.h, and rename from
3451 interval_set_right.
3452 (copy_interval_parent): Move here from intervals.h, and rename from
3453 interval_copy_parent.
3454 * intervals.h (set_interval_parent): Rename from interval_set_parent.
3455 (set_interval_plist): Rename from interval_set_plist.
3456 Return void, not Lisp_Object, since no caller uses the result.
3457 * lisp.h (string_intervals): Rename from string_get_intervals.
3458 (set_string_intervals): Rename from string_set_intervals.
3459
34dabdb7
PE
3460 * lisp.h (set_char_table_extras): Rename from char_table_set_extras.
3461 (set_char_table_contents): Rename from char_table_set_contents.
0b390a9d 3462 (set_sub_char_table_contents): Rename from sub_char_table_set_contents.
34dabdb7
PE
3463 All uses changed. See the end of
3464 <http://lists.gnu.org/archive/html/emacs-devel/2012-08/msg00549.html>.
3465
742af32f
PE
3466 * lisp.h (CSET): Remove (Bug#12215).
3467 (set_char_table_ascii, set_char_table_defalt, set_char_table_parent)
3468 (set_char_table_purpose): New functions,
3469 replacing CSET. All uses changed. For example, replace
3470 "CSET (XCHAR_TABLE (char_table), parent, parent);" with
c24eb18a 3471 "set_char_table_parent (char_table, parent);".
742af32f
PE
3472 The old version was confusing because it used the same name
3473 'parent' for two different things.
3474
a04e2c62
DA
34752012-08-17 Dmitry Antipov <dmantipov@yandex.ru>
3476
3477 Functions to get and set Lisp_Object fields of buffer-local variables.
3478 * lisp.h (blv_found, set_blv_found, blv_value, set_blv_value)
3479 (set_blv_where, set_blv_defcell, set_blv_valcell): New functions.
3480 (BLV_FOUND, SET_BLV_FOUND, BLV_VALUE, SET_BLV_VALUE): Remove.
3481 * data.c, eval.c, frame.c: Adjust users.
3482
383dcbf9
CY
34832012-08-17 Chong Yidong <cyd@gnu.org>
3484
3485 * xfaces.c (merge_face_vectors): If the target font specfies a
3486 font spec, make the font's attributes take precedence over
3487 directly-specified attributes.
3488 (merge_face_ref): Recognize :font.
3489
44386687
DA
34902012-08-17 Dmitry Antipov <dmantipov@yandex.ru>
3491
3492 Do not use memcpy for copying intervals.
3493 * intervals.c (reproduce_interval): New function.
3494 (reproduce_tree, reproduce_tree_obj): Use it.
3495 (reproduce_tree_obj): Remove prototype.
3496
927c7216
PE
34972012-08-17 Paul Eggert <eggert@cs.ucla.edu>
3498
3499 * lisp.h (duration_to_sec_usec): Remove unused decl.
3500
93044f7b
AA
35012012-08-17 Alp Aker <alp.tekin.aker@gmail.com>
3502
3503 * nsfont.m (ns_ascii_average_width): Send initWithFormat selector
3504 to an allocated instance of NSString, not to the class itself.
3505
9851e4a5
JB
35062012-08-17 Juanma Barranquero <lekktu@gmail.com>
3507
3508 * makefile.w32-in (C_CTYPE_H): New macro.
3509 (LISP_H, $(BLD)/ccl.$(O), $(BLD)/doc.$(O), $(BLD)/w32console.$(O)):
3510 ($(BLD)/fontset.$(O), $(BLD)/frame.$(O), $(BLD)/composite.$(O)):
3511 ($(BLD)/sysdep.$(O), $(BLD)/w32uniscribe.$(O)): Update dependencies.
3512
620f13b0
PE
35132012-08-16 Paul Eggert <eggert@cs.ucla.edu>
3514
3515 Use ASCII tests for character types.
3516 * category.c, dispnew.c, doprnt.c, editfns.c, syntax.c, term.c:
3517 * xfns.c, xterm.c:
3518 Don't include <ctype.h>; was not needed.
3519 * charset.c, doc.c, fileio.c, font.c, frame.c, gtkutil.c, image.c:
3520 * sysdep.c, xfaces.c:
3521 Include <c-ctype.h> instead of <ctype.h>.
3522 * nsterm.m: Include <c-ctype.h>.
3523 * charset.c (read_hex):
3524 * doc.c (Fsnarf_documentation):
3525 * fileio.c (IS_DRIVE) [WINDOWSNT]:
3526 (DRIVE_LETTER) [DOS_NT]:
3527 (Ffile_name_directory, Fexpand_file_name)
3528 (Fsubstitute_in_file_name):
3529 * font.c (font_parse_xlfd, font_parse_fcname):
3530 * frame.c (x_set_font_backend):
3531 * gtkutil.c (xg_get_font):
3532 * image.c (xbm_scan, xpm_scan, pbm_scan_number):
3533 * nsimage.m (hexchar):
3534 * nsterm.m (ns_xlfd_to_fontname):
3535 * sysdep.c (system_process_attributes):
3536 * xfaces.c (hash_string_case_insensitive):
3537 Use C-locale tests instead of locale-specific tests for character
3538 types, since we want the ASCII interpretation here, not the
3539 interpretation suitable for whatever happens to be the current locale.
3540
52162052
MR
35412012-08-16 Martin Rudalics <rudalics@gmx.at>
3542
3543 Consistently check windows for validity/liveness
3544 (Bug#11984, Bug#12025, Bug#12026).
3545 * lisp.h (CHECK_VALID_WINDOW): New macro.
3546 * window.c (decode_window): Rename to decode_live_window.
3547 (decode_valid_window, Fwindow_valid_p): New functions.
3548 (Fwindow_frame, Fframe_root_window, Fwindow_minibuffer_p)
3549 (Fframe_first_window, Fframe_selected_window, Fwindow_parent)
3550 (Fwindow_top_child, Fwindow_left_child, Fwindow_next_sibling)
3551 (Fwindow_prev_sibling, Fwindow_combination_limit)
3552 (Fset_window_combination_limit, Fwindow_use_time)
3553 (Fwindow_total_height, Fwindow_total_width, Fwindow_new_total)
3554 (Fwindow_normal_size, Fwindow_new_normal, Fwindow_left_column)
3555 (Fwindow_top_line, Fwindow_body_height, Fwindow_body_width)
3556 (Fwindow_hscroll, Fset_window_hscroll)
3557 (Fwindow_redisplay_end_trigger)
3558 (Fset_window_redisplay_end_trigger, Fwindow_edges)
3559 (Fwindow_pixel_edges, Fwindow_absolute_pixel_edges)
3560 (Fwindow_inside_edges, Fwindow_inside_pixel_edges)
3561 (Fcoordinates_in_window_p, Fwindow_point, Fwindow_start)
3562 (Fwindow_end, Fset_window_point, Fset_window_start)
3563 (Fpos_visible_in_window_p, Fwindow_line_height)
3564 (Fwindow_dedicated_p, Fset_window_dedicated_p)
3565 (Fwindow_prev_buffers, Fset_window_prev_buffers)
3566 (Fwindow_next_buffers, Fwindow_parameters, Fwindow_parameter)
3567 (Fset_window_parameter, Fwindow_display_table)
3568 (Fset_window_display_table, Fdelete_other_windows_internal)
3569 (Fset_window_buffer, Fset_window_new_total)
3570 (Fset_window_new_normal, Fdelete_window_internal)
3571 (Fwindow_text_height, Fset_window_margins, Fwindow_margins)
3572 (Fset_window_fringes, Fwindow_fringes, Fset_window_scroll_bars)
3573 (Fwindow_scroll_bars): Check whether argument window is a valid or
3574 live window. Update doc-strings.
3575 (syms_of_window): New symbol Qwindow_valid_p.
3576 * keyboard.c (Fposn_at_x_y): Check whether argument
3577 frame_or_window denotes a valid window.
3578
2751c80f
DA
35792012-08-16 Dmitry Antipov <dmantipov@yandex.ru>
3580
3581 Fix previous char table change.
3582 * lisp.h (CHAR_TABLE_SET): Use sub_char_table_set_contents.
3583 * chartab.c (optimize_sub_char_table): Likewise.
3584
032a42c8
CY
35852012-08-16 Chong Yidong <cyd@gnu.org>
3586
a2d19368
CY
3587 * gtkutil.c (xg_get_font): Demand an Xft font (Bug#3228).
3588
032a42c8
CY
3589 * xfont.c (xfont_open):
3590 * xftfont.c (xftfont_open): Set the font's max_width field.
3591
3592 * nsfont.m (nsfont_open): Similar to the Xft backend, set
3593 min_width to space_width and average_width to the average over
3594 printable ASCII characters.
3595 (ns_char_width): Code cleanup.
3596 (ns_ascii_average_width): New utility function.
3597
3598 * font.h (struct font): Update comments.
3599
a098c930
DA
36002012-08-16 Dmitry Antipov <dmantipov@yandex.ru>
3601
032a42c8 3602 Simple interface to set Lisp_Object fields of character tables.
a098c930
DA
3603 * lisp.h (CSET): New macro.
3604 (char_table_set_extras, char_table_set_contents)
3605 (sub_char_table_set_contents): New function.
3606 * casetab.c, category.c, chartab.c, fns.c, fontset.c, search.c:
3607 * syntax.c: Adjust users.
3608
8be3a09c
SM
36092012-08-16 Stefan Monnier <monnier@iro.umontreal.ca>
3610
3611 * eval.c (eval_sub): Bind lexical-binding.
3612 * lread.c (Qlexical_binding): Make non-static.
3613
ac4845a6
JD
36142012-08-15 Jan Djärv <jan.h.d@swipnet.se>
3615
ddee6515
JD
3616 * nsmenu.m (popupSession): Remove.
3617 (pop_down_menu): Remove endModalSession.
3618 (timeout_handler:): New method.
3619 (runDialogAt:): Get next timeout. Start a NSTimer with that timeout.
3620 Call runModalForWindow. Check timer_fired when it returns.
3621 If not set, cancel timer and break out of loop.
3622 Otherwise loop again, with a new timeout.
3623
3624 * nsterm.m: Include fcntl.h if present.
3625 (fd_entry, t_readfds, inNsSelect): Remove.
3626 (select_writefds, select_valid, select_timeout, selfds)
3627 (select_mutex, apploopnr): Add.
3628 (EV_TRAILER): Call kbd_buffer_store_event_hold only if q_event_ptr.
3629 Otherwise call kbd_buffer_store_event.
3630 (ns_send_appdefined): Remove release of fd_entry.
3631 (ns_read_socket): Always send appdefined. Remove inNsSelect check.
3632 Increment and decrement apploopnr.
3633 (ns_select): If no file descriptors, just do a NSTimer.
3634 Otherwise copy read/write masks and start select thread (fd_handler).
3635 Start main loop and wait for application defined event.
3636 Inform select thread to stop selecting after main loop is exited.
3637 (ns_term_init): Create selfds pipe and set non-blocking.
fc0c31f8 3638 Initialize select_mutex. Start the select thread (fd_handler).
ddee6515
JD
3639 (fd_handler:): Loop forever, wait for info from the main thread
3640 to either start or stop selecting. When select returns, send
3641 and appdefined event.
3642 (sendScrollEventAtLoc:fromEvent:): Check if q_event_ptr is set.
3643 If not call kbd_buffer_store_event.
3644
3645 * nsterm.h (EmacsApp): fd_handler takes id argument.
3646 (EmacsDialogPanel): Add timer_fired and timeout_handler.
3647
ac4845a6
JD
3648 * gtkutil.c (xg_mark_data): Use FRAME_X_P.
3649
eb424fe3
EZ
36502012-08-15 Eli Zaretskii <eliz@gnu.org>
3651
3652 * region-cache.c (move_cache_gap): Update gap_len using the actual
3653 growth of the boundaries array. Do not change cache_len.
3654 (Bug#12196)
3655
4e6a86c6
DA
36562012-08-15 Dmitry Antipov <dmantipov@yandex.ru>
3657
3658 Generalize and cleanup font subsystem checks.
3659 * font.h (FONT_DEBUG, font_assert): Remove.
8be3a09c
SM
3660 * font.c, fontset.c, w32font.c, xfont.c, xftfont.c:
3661 Change font_assert to eassert. Use eassert where appropriate.
4e6a86c6 3662
5bf192ca
DA
36632012-08-15 Dmitry Antipov <dmantipov@yandex.ru>
3664
3665 * gtkutil.c (xg_get_font): Use pango_units_to_double.
3666
f2045622
CY
36672012-08-15 Chong Yidong <cyd@gnu.org>
3668
8be3a09c
SM
3669 * gtkutil.c (xg_get_font): Rename from xg_get_font_name.
3670 When using the new font chooser, use gtk_font_chooser_get_font_desc to
3671 extract the font descriptor instead of just the font name.
3672 In that case, return a font spec instead of a string.
f2045622
CY
3673 (x_last_font_name): Move to this file from xfns.c.
3674
3675 * xfns.c (Fx_select_font): The return value can also be a font
3676 spec. Move x_last_font_name management to gtkutil.c.
3677
3678 * xfaces.c: Make font weight and style symbols non-static.
3679
7f6feb56
SM
36802012-08-15 Stefan Monnier <monnier@iro.umontreal.ca>
3681
3682 * minibuf.c (read_minibuf): Ignore caller's inhibit-read-only
3683 (bug#12117).
3684
fecbd8ff
SM
36852012-08-14 Stefan Monnier <monnier@iro.umontreal.ca>
3686
3687 * alloc.c (Fgarbage_collect): Use plural form consistently.
3688
9b8d5165
EZ
36892012-08-14 Eli Zaretskii <eliz@gnu.org>
3690
3691 * keyboard.c (command_loop_1): Reset ignore_mouse_drag_p flag each
3692 iteration through the command loop. Fixes a problem whereby mouse
3693 movements are ignored until the first mouse click.
3694
f5d9e83a
PE
36952012-08-14 Paul Eggert <eggert@cs.ucla.edu>
3696
3697 Use bool, not int, for Lisp booleans.
3698 This is more natural, and on my platform (GCC 4.7.1 x86-64) it
3699 makes Emacs a bit smaller and presumably a bit faster.
3700 * lisp.h: Include <stdbool.h>.
3701 (struct Lisp_Boolfwd, defvar_bool):
3702 * lread.c (defvar_bool): Use bool, not int, for Lisp booleans.
3703 * regex.c [!emacs]: Include <stdbool.h>.
3704 (false, true): Remove; <stdbool.h> does this for us now.
3705
55802e4a
CY
37062012-08-14 Chong Yidong <cyd@gnu.org>
3707
4abcdac8
CY
3708 * character.c (Fcharacterp): Doc fix (Bug#12076).
3709
3710 * data.c (Findirect_variable): Doc fix (Bug#11040).
3711
55802e4a
CY
3712 * chartab.c (Fmap_char_table): Doc fix (Bug#12061).
3713
3714 * editfns.c (Fformat): Doc fix (Bug#12059).
4abcdac8 3715 (Fsave_current_buffer): Doc fix (Bug#11542).
55802e4a 3716
8e99d072
BR
37172012-08-14 Barry OReilly <gundaetiapo@gmail.com> (tiny change)
3718
3719 * keyboard.c (access_keymap_keyremap): Accept anonymous functions
3720 (bug#12022).
3721
08908aca
MR
37222012-08-14 Martin Rudalics <rudalics@gmx.at>
3723
3724 * frame.c (make_frame_without_minibuffer, make_minibuffer_frame)
3725 (delete_frame, Fmake_frame_invisible, Ficonify_frame):
3726 * minibuf.c (choose_minibuf_frame, read_minibuf):
3727 * w32fns.c (x_create_tip_frame):
3728 * xfns.c (x_create_tip_frame): Call set_window_buffer instead of
3729 Fset_window_buffer (Bug#11984, Bug#12025, Bug#12026).
3730
56120d6f
PE
37312012-08-14 Paul Eggert <eggert@cs.ucla.edu>
3732
3733 * intervals.c (offset_intervals): Remove obsolete comment.
3734
67b77c0b
AS
37352012-08-14 Andreas Schwab <schwab@linux-m68k.org>
3736
3737 * gtkutil.c (find_rtl_image, update_frame_tool_bar): Use NILP.
3738
f48b82fd
GR
37392012-08-14 Gergely Risko <gergely@risko.hu>
3740
3741 * coding.c (decode_coding): Record buffer modification before
3742 disabling undo_list (Bug#11773).
3743
fd318b54
DA
37442012-08-14 Dmitry Antipov <dmantipov@yandex.ru>
3745
3746 Revert and cleanup some recent overlay changes.
3747 * buffer.h (enum overlay_type): Remove.
3748 (buffer_get_overlays, buffer_set_overlays): Likewise.
3749 (buffer_set_overlays_before, buffer_set_overlays_after):
3750 New function. Adjust users.
3751 (unchain_both): Add eassert.
3752
41a62dd9
DA
37532012-08-14 Dmitry Antipov <dmantipov@yandex.ru>
3754
3755 * gtkutil.c (update_frame_tool_bar): Use EQ where appropriate.
3756
5884c324
PE
37572012-08-14 Paul Eggert <eggert@cs.ucla.edu>
3758
3759 * gtkutil.c (xg_mark_data): Don't assume C99.
3760
ca06f160
JD
37612012-08-13 Jan Djärv <jan.h.d@swipnet.se>
3762
3763 * gtkutil.c (xg_frame_tb_info): New struct.
3764 (TB_INFO_KEY): New define.
3765 (xg_free_frame_widgets): Free xg_frame_tb_info for frame if present.
3766 (xg_mark_data): Mark Lisp_Objects in xg_frame_tb_info.
3767 (xg_create_tool_bar): Allocate and initialize a xg_frame_tb_info
3768 if not present.
3769 (update_frame_tool_bar): Return early if data in xg_frame_tb_info
fc0c31f8 3770 is up to date. Otherwise store new data.
ca06f160
JD
3771 (free_frame_tool_bar): Free xg_frame_tb_info if present.
3772
7864a3f7
DA
37732012-08-13 Dmitry Antipov <dmantipov@yandex.ru>
3774
3775 Use KSET for write access to Lisp_Object members of struct kboard.
3776 * keyboard.h (KSET): New macro.
3777 * callint.c, category.c, frame.c, keyboard.c, keyboard.h, macros.c:
3778 * msdos.c, nsfns.m, nsterm.m, term.c, w32fns.c, w32term.c, xfns.c:
3779 * xterm.c: Adjust users.
3780
4c31be61
DA
37812012-08-13 Dmitry Antipov <dmantipov@yandex.ru>
3782
3783 Use BSET for write access to Lisp_Object members of struct buffer.
3784 * buffer.h (BSET): New macro.
3785 * buffer.c, casetab.c, cmds.c, coding.c, data.c, editfns.c:
3786 * fileio.c, frame.c, indent.c, insdel.c, intervals.c, keymap.c:
3787 * minibuf.c, print.c, process.c, syntax.c, undo.c, w32fns.c:
3788 * window.c, xdisp.c, xfns.c: Adjust users.
3789
14ae4239
BT
37902012-08-11 BT Templeton <bpt@hcoop.net> (tiny change)
3791
3792 * lread.c (syms_of_lread): Initialize Vlexical_binding.
3793
32bcadb4
JD
37942012-08-11 Jan Djärv <jan.h.d@swipnet.se>
3795
3d29b2ce 3796 * nsterm.m (not_in_argv): New function.
fc0c31f8 3797 (application:openFile, application:openTempFile:):
3d29b2ce
JD
3798 (application:openFileWithoutUI:, application:openFiles:): Open file
3799 if not_in_argv returns non-zero (bug#12171).
3800
32bcadb4 3801 * gtkutil.c (gtk_font_chooser_dialog_new, GTK_FONT_CHOOSER)
14ae4239
BT
3802 (gtk_font_chooser_set_font, gtk_font_chooser_get_font):
3803 Define for Gtk+ versions less than 3.2.
32bcadb4
JD
3804 (xg_get_font_name): Use those functions/macros here.
3805 Reported by Frans Oilinki <moilinki@gmail.com>.
3806
9ff9402d 38072012-08-11 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
8ccd072a
YM
3808
3809 * unexmacosx.c (copy_data_segment): Copy initialized data in
3810 statically linked libraries from input file rather than memory.
3811
db74a5fc
YM
3812 * unexmacosx.c (print_load_command_name): Add cases LC_MAIN,
3813 LC_SOURCE_VERSION, and LC_DYLIB_CODE_SIGN_DRS.
3814 (dump_it) [LC_DYLIB_CODE_SIGN_DRS]: Call copy_linkedit_data.
3815
25e65510
GM
38162012-08-10 Glenn Morris <rgm@gnu.org>
3817
3818 * conf_post.h (IF_LINT, lint_assume): Move here from lisp.h.
3819 * lisp.h (IF_LINT, lint_assume): Move to conf_post.h.
3820
7961135c
DA
38212012-08-10 Dmitry Antipov <dmantipov@yandex.ru>
3822
3823 Fix last change to allow compilation with low optimization levels.
3824 * intervals.c (INTERVALS_INLINE): Define to EXTERN_INLINE.
3825 Reported by Jan Djärv <jan.h.d@swipnet.se>.
3826
42b3a444
DA
38272012-08-10 Dmitry Antipov <dmantipov@yandex.ru>
3828
3829 Use common inline syntax in intervals.h.
3830 * intervals.h (INTERVALS_INLINE): New macro.
3831 Change all users from LISP_INLINE.
3832
9fb0c957
DA
38332012-08-10 Dmitry Antipov <dmantipov@yandex.ru>
3834
3835 Define Qnone once for all platforms.
3836 * frame.c (Qnone): Define here.
3837 (syms_of_frame): DEFSYM it.
3838 * lisp.h (Qnone): New declaration.
3839 * nsfns.m, nsterm.h, nsterm.m, w32fns.c, w32font.c:
3840 * xfns.c: Remove duplication. Adjust users.
3841
65e8ee52
DA
38422012-08-10 Dmitry Antipov <dmantipov@yandex.ru>
3843
3844 Remove unused macros from intervals.h.
3845 * intervals.h (MERGE_INSERTIONS, DISPLAY_INVISIBLE_GLYPH): Remove.
3846 * intervals.c: Adjust comment.
3847
9b855fd6
EZ
38482012-08-10 Eli Zaretskii <eliz@gnu.org>
3849
3850 * w32fns.c <w32_unicode_gui>: New static variable.
3851 (globals_of_w32fns): Initialize it according to os_subtype.
3852 (w32_init_class, w32_msg_pump, w32_wnd_proc): Use it instead of
3853 testing os_subtype.
3854
39cb9e56 38552012-08-10 Joakim Hårsman <joakim.harsman@gmail.com> (tiny change)
d30be705
EZ
3856 Eli Zaretskii <eliz@gnu.org>
3857
3858 Fix bug #10299 with Unicode characters sent by customized
3859 keyboards created by MSKLC.
3860 * w32fns.c (INIT_WINDOW_CLASS): New macro.
3861 (w32_init_class): Use it to initialize the Emacs class with either
3862 ANSI or Unicode API calls.
3863 (w32_msg_pump): Call GetMessageW and DispatchMessageW on NT and
3864 later.
3865 (w32_wnd_proc): If the character code sent by WM_CHAR or
3866 WM_SYSCHAR is above 255, post a WM_UNICHAR message, not the
3867 original message. Call DefWindowProcW on NT and later.
3868
9374581a
GM
38692012-08-10 Glenn Morris <rgm@gnu.org>
3870
4b94e8cf
GM
3871 * Makefile.in (config_h): Fix conf_post.h out-of-tree build location.
3872
9374581a
GM
3873 * lisp.h (DIRECTORY_SEP): Let configure set it.
3874
a2752828
DA
38752012-08-09 Dmitry Antipov <dmantipov@yandex.ru>
3876
3877 Use TSET for write access to Lisp_Object slots of struct terminal.
3878 * termhooks.h (TSET): New macro.
3879 * coding.c, terminal.c, xselect.c: Adjust users.
3880
cc92c454
SM
38812012-08-08 Stefan Monnier <monnier@iro.umontreal.ca>
3882
3883 * xdisp.c (safe_eval_handler): Remove prototype. Receive args describing
3884 the failing expression, include them in the error message.
3885 * eval.c (internal_condition_case_n): Pass nargs and args to hfun.
3886 * lisp.h (internal_condition_case_n): Update declaration.
3887
4cb3e6b3
DA
38882012-08-08 Dmitry Antipov <dmantipov@yandex.ru>
3889
3890 Inline functions to examine and change buffer overlays.
3891 * buffer.c (unchain_both): New function.
3892 * buffer.h (buffer_get_overlays, buffer_set_overlays):
3893 (buffer_has_overlays): New function.
3894 (enum overlay_type): New enum.
3895 * alloc.c, buffer.c, editfns.c, fileio.c, indent.c:
3896 * insdel.c, intervals.c, print.c, xdisp.c: Adjust users.
3897
8707c1e5
DA
38982012-08-08 Dmitry Antipov <dmantipov@yandex.ru>
3899
3900 Inline functions to examine and change buffer intervals.
3901 * alloc.c (mark_interval_tree): Remove.
3902 (MARK_INTERVAL_TREE): Simplify.
3903 (UNMARK_BALANCE_INTERVALS): Remove. Adjust users.
3904 * intervals.c (buffer_balance_intervals): New function.
3905 (graft_intervals_into_buffer): Adjust indentation.
3906 (set_intervals_multibyte): Simplify.
3907 * buffer.h (BUF_INTERVALS): Remove.
3908 (buffer_get_intervals, buffer_set_intervals): New function.
3909 * alloc.c, buffer.c, editfns.c, fileio.c, indent.c, insdel.c:
3910 * intervals.c, textprop.c: Adjust users.
3911
ad8c997f
DA
39122012-08-08 Dmitry Antipov <dmantipov@yandex.ru>
3913
3914 Inline functions to examine and change string intervals.
3915 * lisp.h (STRING_INTERVALS, STRING_SET_INTERVALS): Remove.
3916 (string_get_intervals, string_set_intervals): New function.
3917 * alloc.c, buffer.c, editfns.c, fns.c, insdel.c, intervals.c:
3918 * lread.c, print.c, textprop.c: Adjust users.
3919
32ac3a6b
GM
39202012-08-08 Glenn Morris <rgm@gnu.org>
3921
3922 * lisp.mk (lisp): Remove language/persian.elc.
3923
77c7bcb1
DA
39242012-08-08 Dmitry Antipov <dmantipov@yandex.ru>
3925
3926 Cleanup intervals.
3927 * intervals.h (NULL_INTERVAL, DEFAULT_INTERVAL): Remove.
3928 (NULL_INTERVAL_P): Likewise. Adjust users.
14ae4239
BT
3929 (FRONT_STICKY_P, END_NONSTICKY_P, FRONT_NONSTICKY_P):
3930 Adjust comment. Move under #if 0.
77c7bcb1
DA
3931 * alloc.c, buffer.c, editfns.c, fns.c, insdel.c, intervals.c:
3932 * print.c, syntax.c, textprop.c, xdisp.c: Adjust users.
3933
9c08a8d4
DA
39342012-08-08 Dmitry Antipov <dmantipov@yandex.ru>
3935
3936 Check total length of intervals with eassert.
3937 * intervals.h (CHECK_TOTAL_LENGTH): Remove.
3938 * intervals.c: Change all users to eassert.
3939
26d16b35
EZ
39402012-08-07 Eli Zaretskii <eliz@gnu.org>
3941
14ae4239
BT
3942 * .gdbinit (xframe, xwindow, nextcons, xcar, xcdr, xlist):
3943 Rename fields to match removal of FGET and WGET and disuse of
26d16b35
EZ
3944 INTERNAL_FIELD in Lisp_Cons.
3945
c644523b
DA
39462012-08-07 Dmitry Antipov <dmantipov@yandex.ru>
3947
3948 Revert and cleanup Lisp_Cons, Lisp_Misc and Lisp_Symbol things.
3949 * lisp.h (struct Lisp_Symbol): Change xname to meaningful
3950 name since all xname users are fixed long time ago. Do not
3951 use INTERNAL_FIELD.
3952 (set_symbol_name, set_symbol_function, set_symbol_plist):
3953 (set_symbol_next, set_overlay_plist): New function.
3954 (struct Lisp_Cons): Do not use INTERNAL_FIELD.
3955 (struct Lisp_Overlay): Likewise.
3956 (CVAR, MVAR, SVAR): Remove.
3957 * alloc.c, buffer.c, buffer.h, bytecode.c, cmds.c, data.c:
3958 * doc.c, eval.c, fns.c, keyboard.c, lread.c, nsselect.m:
3959 * xterm.c: Adjust users.
3960 * .gdbinit: Change to use name field of struct Lisp_Symbol
3961 where appropriate.
3962
6a3d20cc
DA
39632012-08-07 Dmitry Antipov <dmantipov@yandex.ru>
3964
3965 Basic functions to set Lisp_Object and pointer slots of intervals.
3966 * intervals.h (interval_set_parent, interval_set_object):
3967 (interval_set_left, interval_set_right, interval_set_plist):
3968 (interval_copy_parent): New function.
3969 (SET_INTERVAL_OBJECT, SET_INTERVAL_PARENT, INTERVAL_PTR_SIZE): Remove.
14ae4239
BT
3970 (RESET_INTERVAL, COPY_INTERVAL_CACHE, MERGE_INTERVAL_CACHE):
3971 Adjust indentation.
6a3d20cc
DA
3972 (INTERVAL_SIZE): Remove. Adjust users.
3973 * alloc.c, intervals.c, lread.c, textprop.c: Use new functions.
3974
4d2b044c
DA
39752012-08-07 Dmitry Antipov <dmantipov@yandex.ru>
3976
3977 Drop PGET and revert read access to Lisp_Objects slots of Lisp_Process.
3978 * process.h (PGET): Remove.
3979 (struct Lisp_Process): Do not use INTERNAL_FIELD.
3980 * gnutls.c, print.c, process.c, sysdep.c, w32.c, xdisp.c: Adjust users.
3981
d3d50620
DA
39822012-08-07 Dmitry Antipov <dmantipov@yandex.ru>
3983
3984 Drop WGET and revert read access to Lisp_Objects slots of struct window.
3985 * window.h (WGET): Remove.
3986 (struct window): Do not use INTERNAL_FIELD.
3987 * alloc.c, buffer.c, composite.c, dispextern.h, dispnew.c, editfns.c:
3988 * fileio.c, font.c, fontset.c, frame.c, frame.h, fringe.c, indent.c:
3989 * insdel.c, keyboard.c, keymap.c, lisp.h, minibuf.c, msdos.c, nsfns.m:
3990 * nsmenu.m, nsterm.m, print.c, textprop.c, w32fns.c, w32menu.c:
3991 * w32term.c, window.c, xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c:
3992 Adjust users.
3993
d10a51dc
CY
39942012-08-07 Chong Yidong <cyd@gnu.org>
3995
3996 * window.c (Fwindow_edges, Fwindow_pixel_edges)
3997 (Fwindow_absolute_pixel_edges, Fdelete_other_windows_internal)
3998 (Fdelete_window_internal): Signal an error if the window is not on
3999 a live frame (Bug#12025).
4000
e69b0960
DA
40012012-08-07 Dmitry Antipov <dmantipov@yandex.ru>
4002
4003 Drop FGET and revert read access to Lisp_Objects slots of struct frame.
4004 * frame.h (FGET): Remove.
4005 (struct frame): Do not use INTERNAL_FIELD.
4006 * buffer.c, data.c, dispnew.c, dosfns.c, eval.c, fontset.c, frame.c:
4007 * fringe.c, gtkutil.c, minibuf.c, msdos.c, nsfns.m, nsmenu.m, nsterm.m:
4008 * print.c, term.c, w32fns.c, w32menu.c, w32term.c, window.c, window.h:
4009 * xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c: Adjust users.
4010
25a20a3a
JB
40112012-08-06 Juanma Barranquero <lekktu@gmail.com>
4012
4013 * w32.c: Silence compiler warnings.
4014 (map_w32_filename): Remove unused variable `is_fat'.
4015 (chase_symlinks): Add parentheses around expression.
4016
1c6f11f4
GM
40172012-08-06 Glenn Morris <rgm@gnu.org>
4018
1db4583a
GM
4019 * sysdep.c: Respect BROKEN_GETWD.
4020
1c6f11f4
GM
4021 * dispnew.c (GNU_LIBRARY_PENDING_OUTPUT_COUNT, PENDING_OUTPUT_COUNT):
4022 Let configure handle it.
4023 (stdio_ext.h) [DISPNEW_NEEDS_STDIO_EXT]: Include it.
4024
2b90362b
DA
40252012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
4026
4027 Use GCALIGNMENT where appropriate.
4028 * alloc.c (XMALLOC_HEADER_ALIGNMENT, roundup_size):
4029 (union aligned_Lisp_Symbol, union aligned_Lisp_Misc):
4030 (mark_maybe_pointer, pure_alloc): Change to use GCALIGNMENT.
4031
5f50daf2
EZ
40322012-08-06 Eli Zaretskii <eliz@gnu.org>
4033
14ae4239
BT
4034 * w32menu.c (set_frame_menubar, initialize_frame_menubar):
4035 Don't use FRAME_MENU_BAR_ITEMS as an lvalue.
5f50daf2 4036
cbcc7007
SM
40372012-08-06 Stefan Monnier <monnier@iro.umontreal.ca>
4038
4039 * buffer.h (struct buffer): Revert `indirections' to a simple int;
4040 that should be sufficient for everyone.
4041
4d365fa4
JD
40422012-08-06 Jan Djärv <jan.h.d@swipnet.se>
4043
4044 * keyboard.c (timer_check_2): Add break so timer_check returns next
4045 timeout.
4046
dd86bd82
DA
40472012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
4048
4049 Fix Windows build errors introduced after converting to WGET and WSET.
4050 * w32term.c (w32_set_vertical_scroll_bar): Change to use WSET.
4051 Reported by Andy Moreton <andrewjmoreton@gmail.com>.
4052
054e1668
JD
40532012-08-06 Jan Djärv <jan.h.d@swipnet.se>
4054
4055 * nsterm.m (ns_frame_rehighlight): Use FSET.
4056
4057 * nsmenu.m (ns_update_menubar): Use FSET.
4058
21238f11
DA
40592012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
4060
4061 Separate read and write access to Lisp_Object slots of Lisp_Process.
4062 * process.h (PGET, PSET): New macros similar to AREF and ASET.
4063 * gnutls.c, print.c, process.c, sysdep.c, w32.c, xdisp.c: Adjust users.
4064
077288cf
DA
40652012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
4066
4067 Separate read and write access to Lisp_Object slots of struct window.
4068 * window.h (WGET, WSET): New macros similar to AREF and ASET.
4069 * alloc.c, buffer.c, composite.c, dispextern.h, dispnew.c, editfns.c:
4070 * fileio.c, font.c, fontset.c, frame.c, frame.h, fringe.c, indent.c:
4071 * insdel.c, keyboard.c, keymap.c, lisp.h, minibuf.c, msdos.c, nsfns.m:
4072 * nsmenu.m, nsterm.m, print.c, textprop.c, w32fns.c, w32menu.c:
4073 * w32term.c, window.c, xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c:
4074 Adjust users.
4075
71688bd7
DA
40762012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
4077
4078 Fix Windows build errors introduced after converting to FGET and FSET.
4079 * w32term.c (x_frame_rehighlight, x_scroll_bar_create):
4080 (w32_condemn_scroll_bars, w32_redeem_scroll_bar):
4081 (w32_judge_scroll_bars): Change to use FSET.
4082 Reported by Andy Moreton <andrewjmoreton@gmail.com>.
4083
f99bac93
DA
40842012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
4085
4086 Fix replacement typo.
4087 * window.c (replace_window): Set root_window instead of
4088 selected_window. This fixes a total window subsystem
4089 malfunction reported by Bastien Guerry <bzg@gnu.org>.
4090
8c2a0f2d
GM
40912012-08-06 Glenn Morris <rgm@gnu.org>
4092
4093 * lisp.mk (lisp): Add language/persian.elc.
4094
edd74c35
DA
40952012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
4096
4097 Separate read and write access to Lisp_Object slots of struct frame.
4098 * frame.h (FGET, FSET): New macros similar to AREF and ASET.
4099 * buffer.c, data.c, dispnew.c, dosfns.c, eval.c, fontset.c, frame.c:
4100 * fringe.c, gtkutil.c, minibuf.c, msdos.c, nsfns.m, nsmenu.m, nsterm.m:
4101 * print.c, term.c, w32fns.c, w32menu.c, w32term.c, window.c, window.h:
4102 * xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c: Adjust users.
4103
8671676c
AS
41042012-08-05 Andreas Schwab <schwab@linux-m68k.org>
4105
4106 * emacs.c (decode_env_path): Only use defaulted if WINDOWSNT.
4107
663e2b3f
DA
41082012-08-05 Dmitry Antipov <dmantipov@yandex.ru>
4109
4110 Generalize common compile-time constants.
4111 * lisp.h (header_size, bool_header_size, word_size): Now here.
4112 (struct Lisp_Vector): Add comment.
4113 (struct Lisp_Bool_Vector): Move up to define handy constants.
4114 (VECSIZE, PSEUDOVECSIZE): Simplify.
4115 (SAFE_ALLOCA_LISP): Use new constant. Adjust indentation.
4116 * buffer.c, buffer.h, bytecode.c, callint.c, eval.c, fns.c:
4117 * font.c, fontset.c, keyboard.c, keymap.c, macros.c, menu.c:
4118 * msdos.c, w32menu.c, w32term.h, window.c, xdisp.c, xfaces.c:
4119 * xfont.c, xmenu.c: Use word_size where appropriate.
4120
d32e47af
LM
41212012-08-05 Lawrence Mitchell <wence@gmx.li>
4122
4123 * search.c (Freplace_match): Treat \? in the replacement text
4124 literally (Bug#8161).
4125
e5d9c0d1
CY
41262012-08-05 Chong Yidong <cyd@gnu.org>
4127
4128 * term.c (Vsuspend_tty_functions, Vresume_tty_functions):
4129 * frame.c (Vdelete_frame_functions):
4130 * emacs.c (Vkill_emacs_hook): Doc fix.
4131
8da0576b
EZ
41322012-08-04 Eli Zaretskii <eliz@gnu.org>
4133
4134 * xfns.c (x_set_menu_bar_lines): Fix compilation error in
4135 --with-x-toolkit=no builds.
4136 Reported by Carsten Mattner <carstenmattner@gmail.com>.
4137
02676e5d
CY
41382012-08-04 Chong Yidong <cyd@gnu.org>
4139
4140 * syntax.c (Fmodify_syntax_entry): Doc fix.
4141
97147da9
EZ
41422012-08-04 Eli Zaretskii <eliz@gnu.org>
4143
76151e2c
EZ
4144 Fix startup warnings about ../site-lisp on MS-Windows. (Bug#11959)
4145 * w32.c (init_environment): Change the default values of many
4146 environment variables in dflt_envvars[] to NULL, to avoid pushing
14ae4239
BT
4147 them into environment when they were not already defined.
4148 Remove the code that deletes site-lisp subdirectories from the default
76151e2c 4149 value of EMACSLOADPATH, as it is no longer needed.
14ae4239
BT
4150 (check_windows_init_file): Now external, not static.
4151 Use Vload_path as is, without adding anything, as this function is now
76151e2c
EZ
4152 called when Vload_path is already set up.
4153
4154 * w32.h (check_windows_init_file): Add prototype.
4155
4156 * emacs.c (init_cmdargs) [WINDOWSNT]: When running from the build
4157 directory, ignore the /*/i386/ tail in Vinvocation_directory, for
4158 compatibility with Posix platforms.
4159 (main): Move the call to check_windows_init_file to here from
4160 w32.c.
4161 (decode_env_path) [WINDOWSNT]: Expand the %emacs_dir%/ prefix, if
4162 any, in the DEFALT argument into the root of the Emacs build or
4163 installation tree, as appropriate.
4164
4165 * callproc.c (init_callproc_1): Call decode_env_path instead of
4166 doing its equivalent by hand.
4167 (init_callproc): Replace DOS_NT condition with MSDOS, thus letting
4168 the code that sets Vexec_path run on MS-Windows.
4169
4170 * lread.c (init_lread): Add comments to #ifdef's.
4171
97147da9
EZ
4172 * msdos.c (dos_set_window_size, IT_update_begin)
4173 (IT_frame_up_to_date, IT_set_frame_parameters): Use FVAR and WVAR
4174 instead of direct references.
4175
185ee146
PE
41762012-08-04 Paul Eggert <eggert@cs.ucla.edu>
4177
4178 Export DEFAULT_REHASH_* to GDB.
4179 * lisp.h (DEFAULT_REHASH_THRESHOLD, DEFAULT_REHASH_SIZE):
4180 Now constants, not macros.
4181
8834c57a
PE
41822012-08-03 Paul Eggert <eggert@cs.ucla.edu>
4183
98c6f1e3
PE
4184 Remove unnecessary casts involving pointers.
4185 These casts are no longer needed now that we assume C89 or later,
4186 since they involve casting to or from void *.
4187 * alloc.c (make_pure_string, make_pure_c_string, pure_cons)
4188 (make_pure_float, make_pure_vector):
4189 * lisp.h (SAFE_ALLOCA, SAFE_ALLOCA_LISP):
4190 * macros.c (Fstart_kbd_macro):
4191 * menu.c (find_and_return_menu_selection):
4192 * minibuf.c (read_minibuf_noninteractive):
4193 * sysdep.c (closedir):
4194 * xdisp.c (x_produce_glyphs):
4195 * xfaces.c (compare_fonts_by_sort_order):
4196 * xfns.c (x_real_positions, select_visual):
4197 * xselect.c (x_stop_queuing_selection_requests)
4198 (x_get_window_property, x_get_window_property_as_lisp_data):
4199 * xterm.c (x_set_frame_alpha, x_find_modifier_meanings):
4200 Remove unnecessary pointer casts.
4201 * alloc.c (record_xmalloc): New function.
4202 * lisp.h (record_xmalloc): New decl.
4203 (SAFE_ALLOCA): Now takes just one arg -- the size -- and acts
4204 more like a function. This is because the pointer cast is not
4205 needed. All uses changed.
4206 * print.c (print_string, print_error_message): Avoid length recalc.
4207
8834c57a
PE
4208 Improve fix for macroexp crash with debugging (Bug#12118).
4209 * lisp.h (ASET) [ENABLE_CHECKING]: Pay attention to
4210 ARRAY_MARK_FLAG when checking subscripts, because ASET is
4211 not supposed to be invoked from the garbage collector.
4212 See Andreas Schwab in <http://bugs.gnu.org/12118#25>.
4213 (gc_aset): New function, which is like ASET but can be
4214 used in the garbage collector.
4215 (set_hash_key, set_hash_value, set_hash_next, set_hash_hash)
4216 (set_hash_index): Use it instead of ASET.
4217
6dad7178
EZ
42182012-08-03 Eli Zaretskii <eliz@gnu.org>
4219
4220 Support symlinks on latest versions of MS-Windows.
4221 * w32.c: Include winioctl.h and aclapi.h.
4222 (is_symlink, chase_symlinks, enable_privilege, restore_privilege)
4223 (revert_to_self): Forward declarations of static functions.
4224 <static BOOL g_b_init_get_security_info>:
4225 <g_b_init_create_symbolic_link>: New static flags.
4226 (globals_of_w32): Initialize them to zero.
4227 (GetSecurityInfo_Proc, CreateSymbolicLink_Proc): New typedefs.
4228 (map_w32_filename): Improve commentary. Simplify switch.
4229 (SYMBOLIC_LINK_FLAG_DIRECTORY): Define if not defined in system
4230 headers (most versions of MinGW w32api don't).
4231 (get_security_info, create_symbolic_link)
4232 (get_file_security_desc_by_handle, is_symlink, chase_symlinks):
4233 New functions.
4234 (sys_access, sys_chmod): Call 'chase_symlinks' to resolve symlinks
4235 in the argument file name.
4236 (sys_access): Call unc_volume_file_attributes only if
4237 GetFileAttributes fails with network-related error codes.
4238 (sys_rename): Diagnose renaming of a symlink when the user doesn't
4239 have the required privileges.
14ae4239 4240 (get_file_security_desc_by_name): Rename from
6dad7178
EZ
4241 get_file_security_desc.
4242 (stat_worker): New function, with most of the guts of 'stat', and
14ae4239
BT
4243 with addition of handling of symlinks and support for 'lstat'.
4244 If possible, get file's attributes and security information by
6dad7178
EZ
4245 handle, not by name. Produce S_IFLNK bit for symlinks, when
4246 called from 'lstat'.
4247 (stat, lstat): New functions, call 'stat_worker'.
4248 (symlink, readlink, careadlinkat): Rewritten to create and resolve
4249 symlinks when the underlying filesystem supports them.
4250
f162bcc3
PE
42512012-08-02 Paul Eggert <eggert@cs.ucla.edu>
4252
79ea6c20
PE
4253 Fix macroexp crash on Windows with debugging (Bug#12118).
4254 * lisp.h (ASET) [ENABLE_CHECKING]: Ignore ARRAY_MARK_FLAG when
4255 checking subscripts; problem introduced with the recent
4256 "ASET (a, i, v)" rather than "AREF (a, i) = v" patch.
4257 (ARRAY_MARK_FLAG): Now a macro as well as a constant,
4258 since it's used in non-static inline functions now.
4259
c0ce93fd
PE
4260 * xfaces.c (face_at_buffer_position, face_for_overlay_string):
4261 Don't assume buffer size fits in 'int'. Remove unused local.
c71f5156 4262
f162bcc3
PE
4263 Use C99-style 'extern inline' if available.
4264 * buffer.h (BUFFER_INLINE):
4265 * category.h (CATEGORY_INLINE):
4266 * character.h (CHARACTER_INLINE):
4267 * charset.h (CHARSET_INLINE):
4268 * composite.h (COMPOSITE_INLINE):
4269 * dispextern.h (DISPEXTERN_INLINE):
4270 * lisp.h (LISP_INLINE):
4271 * systime.h (SYSTIME_INLINE):
4272 New macro, replacing 'static inline' in this header.
4273 * buffer.h, category.h, character.h, charset.h, composite.h:
4274 * dispextern.h, lisp.h, systime.h:
4275 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
4276 * alloc.c (LISP_INLINE):
4277 * buffer.c (BUFFER_INLINE):
4278 * category.c (CATEGORY_INLINE):
4279 * character.c (CHARACTER_INLINE):
4280 * charset.c (CHARSET_INLINE):
4281 * composite.c (COMPOSITE_INLINE):
4282 * dispnew.c (DISPEXTERN_INLINE):
4283 * sysdep.c (SYSTIME_INLINE):
4284 Define to EXTERN_INLINE, so that the corresponding functions
4285 are compiled into code.
4286 * conf_post.h (INLINE, EXTERN_INLINE, INLINE_HEADER_BEGIN)
4287 (INLINE_HEADER_END): New macros.
4288 * lisp.h (PSEUDOVECTOR_FLAG): Now a macro as well as a constant,
4289 since it's used in non-static inline functions now.
a8333d03 4290 (VALMASK) [!USE_LSB_TAG]: Likewise.
f162bcc3 4291
837b365b
GM
42922012-08-02 Glenn Morris <rgm@gnu.org>
4293
d66b744d
GM
4294 * s/: Remove empty directory.
4295
837b365b
GM
4296 * s/ms-w32.h: Move to ../nt/inc.
4297 * makefile.w32-in (TAGS, TAGS-gmake, MS_W32_H):
4298 Update for new ms-w32.h location.
4299
13294f95
PE
43002012-08-02 Paul Eggert <eggert@cs.ucla.edu>
4301
4302 Port to Solaris 8.
4303 * syswait.h (WRETCODE): Remove, consistently with ../configure.ac.
4304
90df0db3
GM
43052012-08-02 Glenn Morris <rgm@gnu.org>
4306
4307 * nsterm.m (ns_exec_path, ns_load_path): Use SEPCHAR rather than
4308 hard-coding the path separator.
4309
4939150c
PE
43102012-08-01 Paul Eggert <eggert@cs.ucla.edu>
4311
4312 Use "ASET (a, i, v)" rather than "AREF (a, i) = v".
4313 This how ASET and AREF are supposed to work, and makes
4314 it easier to think about future improvements. See
4315 <http://lists.gnu.org/archive/html/emacs-devel/2012-08/msg00026.html>.
4316 * charset.h (set_charset_attr): New function.
4317 All lvalue-style uses of CHARSET_DECODER etc. changed to use it.
4318 * lisp.h (ASET): Rewrite so as not to use AREF in an lvalue style.
4319 (aref_addr): New function. All uses of &AREF(...) changed.
4320 (set_hash_key, set_hash_value, set_hash_next, set_hash_hash)
4321 (set_hash_index): New functions. All lvalue-style uses of
4322 HASH_KEY etc. changed.
4323 * keyboard.c (set_prop): New function. All lvalue-style uses
4324 of PROP changed.
4325
947b2afd
AA
43262012-08-01 Alp Aker <alp.tekin.aker@gmail.com>
4327
4328 * nsterm.m (ns_set_vertical_scroll_bar, ns_redeem_scroll_bar)
4329 (EmacsWindow-accessibilityAttributeValue, EmacsScroller-initFrame:)
1f9f395d 4330 (EmacsScroller-dealloc): Adjust to use WVAR. (Bug#12114)
947b2afd
AA
4331 * nsfns.m (ns_set_name_as_filename): Likewise.
4332 * nsmenu.m (ns_update_menubar): Likewise.
4333 * nsselect.m (symbol_to_nsstring): Adjust to use SVAR.
4334
4f5d0325
EZ
43352012-08-01 Eli Zaretskii <eliz@gnu.org>
4336
2008beae
EZ
4337 * .gdbinit (xcar, xcdr, xlist, xwindow, nextcons, xprintsym):
4338 Adapt to latest changes in field names of the corresponding Lisp
288479f6 4339 objects.
2008beae 4340
4f5d0325
EZ
4341 * xdisp.c (try_window_id): Use WVAR in IF_DEBUG code.
4342
fe3cc771
GM
43432012-08-01 Glenn Morris <rgm@gnu.org>
4344
4345 * s/msdos.h: Remove file.
4346 * conf_post.h [MSDOS]: New section, moved from s/msdos.h.
4347 * Makefile.in (S_FILE): Remove.
4348 (config_h): Remove S_FILE.
4349
c90acc54
JB
43502012-08-01 Juanma Barranquero <lekktu@gmail.com>
4351
4352 * s/ms-w32.h (DEVICE_SEP, IS_DIRECTORY_SEP, IS_ANY_SEP):
4353 Remove; moved to nt/config.nt.
4354
d8a05828
DA
43552012-08-01 Dmitry Antipov <dmantipov@yandex.ru>
4356
4357 Use INTERNAL_FIELD for conses and overlays.
4358 * lisp.h (struct Lisp_Cons): Use INTERNAL_FIELD.
4359 Remove obsolete comment.
4360 (MVAR): New macro.
4361 (struct Lisp_Overlay): Use INTERNAL_FIELD.
4362 * alloc.c, buffer.c, buffer.h, fns.c: Adjust users.
4363
8271d590
DA
43642012-08-01 Dmitry Antipov <dmantipov@yandex.ru>
4365
4366 Use INTERNAL_FIELD for symbols.
4367 * lisp.h (SVAR): New macro. Adjust users.
4368 * alloc.c, bytecode.c, cmds.c, data.c, doc.c, eval.c:
4369 * fns.c, keyboard.c, lread.c, xterm.c: Users changed.
4370
3193acd2
DA
43712012-08-01 Dmitry Antipov <dmantipov@yandex.ru>
4372
4373 Use INTERNAL_FIELD for processes.
4374 * process.h (PVAR): New macro. Adjust style.
4375 (struct Lisp_Process): Change Lisp_Object members to INTERNAL_FIELD.
4376 * print.c, process.c, sysdep.c, w32.c, xdisp.c: Users changed.
4377
3a45383a
DA
43782012-08-01 Dmitry Antipov <dmantipov@yandex.ru>
4379
4380 Use INTERNAL_FIELD for windows.
4381 * window.h (WVAR): New macro.
4382 (struct window): Change Lisp_Object members to INTERNAL_FIELD.
4383 * alloc.c, buffer.c, composite.c, dispextern.h, dispnew.c, editfns.c:
4384 * fileio.c, font.c, fontset.c, frame.c, frame.h, fringe.c, indent.c:
4385 * insdel.c, keyboard.c, keymap.c, lisp.h, minibuf.c, nsterm.m, print.c:
4386 * textprop.c, w32fns.c, w32menu.c, w32term.c, window.c, xdisp.c:
4387 * xfaces.c, xfns.c, xmenu.c, xterm.c: Users changed.
4388
c1dbc63c
PE
43892012-08-01 Paul Eggert <eggert@cs.ucla.edu>
4390
4391 * coding.h (CODING_ATTR_FLUSHING): Remove; unused and wouldn't work.
4392
5c0c0e8a
GM
43932012-08-01 Glenn Morris <rgm@gnu.org>
4394
4395 * lisp.h (IS_DIRECTORY_SEP, IS_DEVICE_SEP, IS_ANY_SEP):
4396 Move to configure.ac.
4397
552a99b4
JB
43982012-08-01 Juanma Barranquero <lekktu@gmail.com>
4399
4400 * makefile.w32-in (CONFIG_H): Update dependencies.
4401 (CONF_POST_H): New macro.
4402
4403 * s/ms-w32.h (SEPCHAR, NULL_DEVICE): Remove; moved to nt/config.nt.
4404
8d8e2dfe
GM
44052012-07-31 Glenn Morris <rgm@gnu.org>
4406
bc96620a
GM
4407 * Makefile.in (S_FILE): No longer set by configure.
4408
476b1b2d
GM
4409 * conf_post.h (config_opsysfile): Move earlier, so that WINDOWSNT
4410 is available.
4411 (alloca.h) [WINDOWSNT]: Don't include it on MS Windows.
4412
b2c7a106
GM
4413 * process.h (NULL_DEVICE):
4414 * emacs.c (SEPCHAR):
4415 * editfns.c (USER_FULL_NAME): Let configure set them.
4416
d53d062a
GM
4417 * s/README, s/template.h: Remove files.
4418
4515017f
GM
4419 * conf_post.h [HPUX]: Undefine HAVE_RANDOM and HAVE_RINT.
4420
8d8e2dfe
GM
4421 * conf_post.h (AMPERSAND_FULL_NAME, subprocesses):
4422 Move to configure.ac.
4423
5b20b3cc
EZ
44242012-07-31 Eli Zaretskii <eliz@gnu.org>
4425
1e0afd9a
EZ
4426 * .gdbinit (xframe): Adapt to introduction of FVAR and the
4427 resulting renaming of 'struct frame' members.
4428
5b20b3cc
EZ
4429 * w32menu.c (w32_menu_show): Revert bogus introduction of FVAR.
4430
4431 * fontset.c (dump_fontset): Fix compilation with ENABLE_CHECKING
4432 after introduction of FVAR.
4433
f1310128
JD
44342012-07-31 Jan Djärv <jan.h.d@swipnet.se>
4435
79e721e0
JD
4436 * nsmenu.m (update_frame_tool_bar): Change key from NSObject* to id.
4437
4438 * nsterm.m (ns_draw_fringe_bitmap, ns_dumpglyphs_image): Use drawInRect
4439 instead of compositeToPoint.
4440 (applicationShouldTerminate): Pass NS String literal to NSRunAlertPanel.
4441
8d7c7eed 4442 * nsfns.m, nsmenu.m, nsterm.m: Adopt to struct frame/FVAR changes.
f1310128 4443
e34f7f79
DA
44442012-07-31 Dmitry Antipov <dmantipov@yandex.ru>
4445
4446 Generalize INTERNAL_FIELD between buffers, keyboards and frames.
4447 * lisp.h (INTERNAL_FIELD): New macro.
14ae4239 4448 * buffer.h (BUFFER_INTERNAL_FIELD): Remove.
e34f7f79
DA
4449 (BVAR): Change to use INTERNAL_FIELD.
4450 * keyboard.h (KBOARD_INTERNAL_FIELD): Likewise.
4451 (KVAR): Change to use INTERNAL_FIELD.
4452 * frame.h (FVAR): New macro.
4453 (struct frame): Use INTERNAL_FIELD for all Lisp_Object fields.
3a45383a
DA
4454 * alloc.c, buffer.c, data.c, dispnew.c, dosfns.c, eval.c, frame.c:
4455 * fringe.c, gtkutil.c, minibuf.c, nsfns.m, nsterm.m, print.c:
4456 * term.c, w32fns.c, w32menu.c, w32term.c, window.c, window.h:
e34f7f79
DA
4457 * xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c: Users changed.
4458
c09bfb2f
DA
44592012-07-31 Dmitry Antipov <dmantipov@yandex.ru>
4460
4461 Miscellaneous fixes for non-default X toolkits.
4462 * xfns.c (Fx_file_dialog): Change to SSDATA to avoid warnings.
4463 * xterm.c (x_frame_of_widget): Remove redundant prototype.
4464 Move under #ifdef USE_LUCID.
4465 (x_create_toolkit_scroll_bar): Adjust scroll_bar_name
4466 definition and usage to avoid warnings.
4467
14c114ae
JD
44682012-07-31 Jan Djärv <jan.h.d@swipnet.se>
4469
4470 * nsterm.m (openFiles): Fix previous checkin.
4471
3bd21e82
PE
44722012-07-31 Paul Eggert <eggert@cs.ucla.edu>
4473
4474 * indent.c (compute_motion): Remove unused local.
4475
c1529ded
GM
44762012-07-31 Glenn Morris <rgm@gnu.org>
4477
400d5621
GM
4478 * s/usg5-4-common.h (wait3, WRETCODE): Let configure set them.
4479
268e2432
GM
4480 * conf_post.h [USG5_4]:
4481 Move remaining contents of s/usg5-4-common.h here.
4482 * s/usg5-4-common.h: Remove file.
4483
7552f3ee
GM
4484 * conf_post.h [IRIX6_5]: Move remaining contents of s/irix6-5.h here.
4485 * s/irix6-5.h: Remove file.
4486
6a381852
GM
4487 * conf_post.h [DARWIN_OS]: Move remaining contents of s/darwin.h here.
4488 * s/darwin.h: Remove file.
4489
c1529ded
GM
4490 * conf_post.h [HPUX]: Move random, srandom here from s/hpux10-20.h.
4491 * s/hpux10-20.h: Remove file, which is now empty.
4492
b429a4ee
GM
44932012-07-30 Glenn Morris <rgm@gnu.org>
4494
4495 * conf_post.h: New, split from configure.ac's AH_BOTTOM.
4496 * Makefile.in (config_h): Add conf_post.h.
4497 * makefile.w32-in (CONFIG_H): Add conf_post.h.
4498
adff3182
JD
44992012-07-30 Jan Djärv <jan.h.d@swipnet.se>
4500
4501 * nsterm.m (ns_do_open_file): New variable.
b9031d69 4502 (ns_term_init): Set ns_do_open_file to YES after run returns.
14ae4239
BT
4503 (openFile, openTempFile, openFileWithoutUI, openFiles):
4504 Open files only if ns_do_open_file.
adff3182 4505
c32af1e4
PE
45062012-07-30 Paul Eggert <eggert@cs.ucla.edu>
4507
7393bcbb
PE
4508 * lisp.h (SWITCH_ENUM_CAST): Remove. All uses removed.
4509 This no-op macro hasn't been needed for many years.
4510 * src/regex.c (SWITCH_ENUM_CAST) [!emacs]: Likewise.
4511
c32af1e4
PE
4512 Export DIRECTORY_SEP, TYPEMASK, VALMASK to GDB.
4513 * alloc.c (gdb_make_enums_visible) [USE_LSB_TAG]: Add lsb_bits.
4514 * lisp.h (enum lsb_bits) [USE_LSB_TAG]: New enum, for
4515 gdb_make_enums_visible.
4516 (TYPEMASK, VALMASK) [USE_LSB_TAGS]: Now enum constants, not macros.
4517 (DIRECTORY_SEP): Now a constant, not a macro.
4518
302fc036
EZ
45192012-07-30 Eli Zaretskii <eliz@gnu.org>
4520
4521 * w32fns.c (w32_wnd_proc): Pass w32_keyboard_codepage to
4522 w32_kbd_patch_key as the 2nd arg. (Bug#12082)
4523
4524 * w32term.c <w32_keyboard_codepage>: Renamed from
4525 keyboard_codepage and now external. All users changed.
4526
4527 * w32term.h: Add declaration of w32_keyboard_codepage.
4528
4529 * w32inevt.c (w32_kbd_patch_key): Accept an additional argument --
4530 the codepage to translate keys to Unicode. If this argument is
4531 -1, use the value returned by GetConsoleCP. All callers changed.
4532
88fb40b4
PE
45332012-07-30 Paul Eggert <eggert@cs.ucla.edu>
4534
0aee6912
PE
4535 Update .PHONY listings in makefiles.
4536 * Makefile.in (.PHONY): Add all, mostlyclean, clean,
4537 bootstrap-clean, distclean, maintainer-clean, versioclean,
4538 extraclean, frc.
4539
88fb40b4
PE
4540 * lisp.h (STRING_BYTES_BOUND): Cast entire result to ptrdiff_t.
4541 This is a bit clearer. Fix some commentary typos.
4542
0a763bd1
GM
45432012-07-30 Glenn Morris <rgm@gnu.org>
4544
32bac6d6
GM
4545 * s/netbsd.h: Let configure include signal.h if needed.
4546 Remove file, which is now empty.
4547
b65e7c46
GM
4548 * s/usg5-4-common.h (_longjmp, _setjmp, TIOCSIGSEND):
4549 Let configure set them.
4550 * s/irix6-5.h (_longjmp, _setjmp, TIOCSIGSEND):
4551 No more need to undefine.
0a763bd1 4552
169304bd
AS
45532012-07-30 Andreas Schwab <schwab@linux-m68k.org>
4554
4555 * keymap.c (Fkey_description): Don't remove 0x80 bit from
4556 non-single-byte char when adding meta modifier. (Bug#12090)
4557
6cd7a139
DA
45582012-07-30 Dmitry Antipov <dmantipov@yandex.ru>
4559
4560 Convert safe_call to use variable number of arguments.
4561 * xdisp.c (safe_call): Convert to use varargs. Adjust users.
4562 (safe_call2): Fix comment.
4563 * lisp.h (safe_call): Adjust prototype.
4564 * coding.c (encode_coding_object): Change to use safe_call2.
4565 * xfaces.c (merge_face_heights): Change to use safe_call1.
4566
d34d6ffc
GM
45672012-07-30 Glenn Morris <rgm@gnu.org>
4568
7b8a48e4 4569 * s/aix4-2.h (sigmask): No need to undefine it, since syssignal.h
227f5bd0 4570 does that unconditionally. Remove file, which is now empty.
7b8a48e4 4571
d34d6ffc
GM
4572 * s/freebsd.h, s/gnu-linux.h, s/sol2-6.h, s/unixware.h:
4573 Remove empty files.
4574
03a660a6
PE
45752012-07-30 Paul Eggert <eggert@cs.ucla.edu>
4576
4577 Export to GDB most of lisp.h's remaining object-like macros.
4578 * lisp.h (min, max): Move earlier, because they're used earlier now.
4579 (INTMASK, ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK)
4580 (CHAR_TABLE_STANDARD_SLOTS, CHARTAB_SIZE_BITS_0)
4581 (CHARTAB_SIZE_BITS_1, CHARTAB_SIZE_BITS_2, CHARTAB_SIZE_BITS_3)
4582 (DEFAULT_HASH_SIZE, COMPILED_ARGLIST, COMPILED_BYTECODE)
4583 (COMPILED_CONSTANTS, COMPILED_STACK_DEPTH, COMPILED_DOC_STRING)
4584 (COMPILED_INTERACTIVE, CHAR_ALT, CHAR_SUPER, CHAR_HYPER, CHAR_SHIFT)
4585 (CHAR_CTL, CHAR_META, CHAR_MODIFIER_MASK, CHARACTERBITS)
4586 (MANY, UNEVALLED, FLOAT_TO_STRING_BUFSIZE, MAX_ALLOCA):
4587 Now constants, for GDB. They need not be macros.
4588 (MOST_POSITIVE_FIXNUM, MOST_NEGATIVE_FIXNUM, STRING_BYTES_BOUND):
4589 Now constants, for GDB, as well as macros, for static initializers.
4590 (CHAR_TABLE_STANDARD_SLOTS, CHAR_TABLE_EXTRA_SLOTS):
4591 Move to after the definition of struct Lisp_Char_Table,
4592 since the former now needs that type defined.
4593 (enum CHARTAB_SIZE_BITS, enum CHAR_TABLE_STANDARD_SLOTS)
4594 (enum DEFAULT_HASH_SIZE, enum Lisp_Compiled, enum char_bits)
4595 (enum maxargs, enum FLOAT_TO_STRING_BUFSIZE, enum MAX_ALLOCA):
4596 New enums, for gdb_make_enums_visible.
4597 (GLYPH_MODE_LINE_FACE): Remove; unused.
88fb40b4 4598 * alloc.c (STRING_BYTES_MAX): Now a constant, not a macro.
03a660a6
PE
4599 (gdb_make_enums_visible): Add enum CHARTAB_SIZE_BITS, enum
4600 CHAR_TABLE_STANDARD_SLOTS, enum char_bits, enum DEFAULT_HASH_SIZE,
4601 enum FLOAT_TO_STRING_BUFSIZE, enum Lisp_Bits, enum Lisp_Compiled,
4602 enum maxargs, enum MAX_ALLOCA.
4603 (ARRAY_MARK_FLAG_VAL, PSEUDOVECTOR_FLAG_VAL, VALMASK_VAL): Remove.
4604 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Remove;
4605 no longer needed, now that they are done in lisp.h.
4606
e499d0ee
DA
46072012-07-30 Dmitry Antipov <dmantipov@yandex.ru>
4608
4609 Cleanup string bytes checking.
4610 * alloc.c (GC_STRING_BYTES, CHECK_STRING_BYTES): Remove. Convert
4611 all users to STRING_BYTES or string_bytes if GC_CHECK_STRING_BYTES.
4612 (check_string_bytes): Define to empty if not GC_CHECK_STRING_BYTES.
4613 (check_sblock, compact_small_strings): Simplify.
4614
d5040d2d
PE
46152012-07-29 Paul Eggert <eggert@cs.ucla.edu>
4616
4617 * lisp.h (LISP_INT_TAG, LISP_INT1_TAG, LISP_STRING_TAG): Remove.
4618 These macros are confusing and no longer need to be defined, as
4619 the enum values now suffice. All uses replaced with definiens.
4620 (Lisp_Int1, Lisp_String): Define directly; this is clearer.
4621
7f259ae6
JB
46222012-07-29 Juanma Barranquero <lekktu@gmail.com>
4623
4624 * makefile.w32-in (LISP_H, $(BLD)/emacs.$(O), $(BLD)/w32inevt.$(O))
4625 ($(BLD)/w32console.$(O)): Update dependencies.
4626
7e63e0c3
DA
46272012-07-29 Dmitry Antipov <dmantipov@yandex.ru>
4628
4629 Remove HIDE_LISP_IMPLEMENTATION and cleanup cons free list check.
4630 * lisp.h (HIDE_LISP_IMPLEMENTATION): Remove as useless for a long
4631 time. Adjust users.
4632 (CHECK_CONS_LIST): Remove. Convert all users to check_cons_list.
4633
ffd817eb
JD
46342012-07-29 Jan Djärv <jan.h.d@swipnet.se>
4635
4636 * lread.c (init_lread): Remove if-statement in ifdef HAVE_NS before
4637 setting sitelisp (Bug#12010).
4638
417a7a0e
EZ
46392012-07-29 Eli Zaretskii <eliz@gnu.org>
4640
14ae4239 4641 * w32heap.h (OS_9X): Rename from OS_WINDOWS_95.
417a7a0e
EZ
4642
4643 * w32heap.c (cache_system_info):
4644 * w32.c (sys_rename):
4645 * w32proc.c (find_child_console, sys_kill): All users changed.
4646
387d4d92
PE
46472012-07-29 Paul Eggert <eggert@cs.ucla.edu>
4648
4649 * alloc.c (Fgarbage_collect): Indent as per usual Emacs style.
4650
55a6cca6
EZ
46512012-07-29 Eli Zaretskii <eliz@gnu.org>
4652
4653 * makefile.w32-in (LISP_H): Add $(NT_INC)/stdalign.h.
4654
dbcf001c
DA
46552012-07-29 Dmitry Antipov <dmantipov@yandex.ru>
4656
4657 Cleanup statistics calculation in Fgarbage_collect.
14ae4239
BT
4658 * alloc.c (Fgarbage_collect): Rename t1 to meaningful start.
4659 Fix zombies percentage calculation. Simplify elapsed time calculation.
dbcf001c 4660
e2688e4a
DA
46612012-07-29 Dmitry Antipov <dmantipov@yandex.ru>
4662
4663 Generalize marker debugging code under MARKER_DEBUG and use eassert.
4664 * insdel.c (CHECK_MARKERS, check_markers_debug_flag): Remove.
4665 (gap_left, gap_right, adjust_markers_for_delete, insert_1_both)
4666 (insert_from_string_1, insert_from_gap, insert_from_buffer_1)
4667 (replace_range, replace_range_2, del_range_2): Change to eassert.
4668 * marker.c (byte_char_debug_check): Adjust style.
4669
b46a6a83
PE
46702012-07-29 Paul Eggert <eggert@cs.ucla.edu>
4671
4672 Don't use the abbreviation "win" to refer to Windows (Bug#10421).
4673 * regex.c (MAX_BUF_SIZE): Remove some incorrect and
4674 long-ago-commented-out code that talks about "WIN32".
4675 * w32heap.h (OS_WINDOWS_95): Rename from OS_WIN95.
4676 All uses changed.
4677
e32a5799
PE
46782012-07-28 Paul Eggert <eggert@cs.ucla.edu>
4679
4680 Use Gnulib stdalign module (Bug#9772, Bug#9960).
4681 * alloc.c (XMALLOC_BASE_ALIGNMENT, GC_POINTER_ALIGNMENT, pure_alloc):
4682 Simplify by using alignof.
4683 (pure_alloc) [! USE_LSB_TAG]: Don't over-align EMACS_INT values.
4684 * lisp.h: Include <stdalign.h>.
4685 (GCALIGNMENT): New macro and constant.
4686 (DECL_ALIGN): Remove. All uses replaced by alignas (GCALIGNMENT).
4687 (USE_LSB_TAG): ifdef on alignas, not on DECL_ALIGN.
4688 (stdalign): New macro, if not already defined.
4689
df81cd29
EZ
46902012-07-28 Eli Zaretskii <eliz@gnu.org>
4691
01bd1b0d
EZ
4692 Fix non-ASCII input in non-GUI frames on MS-Windows. (Bug#12055)
4693 * w32inevt.c: Include w32inevt.h.
4694 (w32_read_console_input): New inline function, calls either
4695 ReadConsoleInputA or ReadConsoleInputW, depending on the value of
4696 w32_console_unicode_input.
4697 (fill_queue): Call w32_read_console_input instead of ReadConsoleInput.
4698 (w32_kbd_patch_key, key_event): Use the codepage returned by
4699 GetConsoleCP, rather than the ANSI codepage returned by GetLocaleInfo.
4700 (key_event): use uChar.UnicodeChar only if
4701 w32_console_unicode_input is non-zero.
4702
4703 * w32console.c: Include w32heap.h.
4704 <w32_console_unicode_input>: New global variable.
4705 (initialize_w32_display): Set w32_console_unicode_input to 1 on NT
4706 family of Windows, zero otherwise.
4707
4708 * w32inevt.h: Declare w32_console_unicode_input.
4709
df81cd29
EZ
4710 * xdisp.c (init_iterator): Don't reference tip_frame in a build
4711 --without-x. (Bug#11742)
4712
c20fdd9e
PE
47132012-07-27 Paul Eggert <eggert@cs.ucla.edu>
4714
4715 Adjust GDB to reflect pvec_type changes (Bug#12036).
4716 * .gdbinit (xvectype, xpr, xbacktrace): Adjust to reflect the
14ae4239
BT
4717 2012-07-04 changes to pseudovector representation.
4718 Problem reported by Eli Zaretskii in <http://bugs.gnu.org/12036#30>.
c20fdd9e 4719
32770973 47202012-07-27 Michael Albinus <michael.albinus@gmx.de>
e518bc71
MA
4721
4722 * dbusbind.c (XD_DBUS_VALIDATE_BUS_ADDRESS): Canonicalize session
4723 bus address.
4724 (xd_close_bus, Fdbus_init_bus): Handle reference counter properly.
4725
3438fe21
EZ
47262012-07-27 Eli Zaretskii <eliz@gnu.org>
4727
bcfbc9de
EZ
4728 * alloc.c (listn): Fix the order the arguments are consed onto the
4729 list.
4730
3438fe21
EZ
4731 * lisp.h (enum constype): Use CONSTYPE_HEAP and CONSTYPE_PURE for
4732 enumeration constants, as PURE and HEAP are too general, and clash
4733 with other headers and sources, such as gmalloc.c and the
4734 MS-Windows system headers. All users changed.
4735
eeaea515
DA
47362012-07-27 Dmitry Antipov <dmantipov@yandex.ru>
4737
4738 Revert last save_excursion_save and save_excursion_restore changes.
4739 * alloc.c, editfns.c, marker.c, lisp.h: Revert.
4740 Lots of crashes reported by Chong Yidong <cyd@gnu.org>.
4741
073c88c2
DA
47422012-07-27 Dmitry Antipov <dmantipov@yandex.ru>
4743
4744 Fix recently-introduced typos in Windows port.
4745 Reported by Martin Rudalics <rudalics@gmx.at>.
4746 * w32.c (init_environment): Replace comma with semicolon.
eeaea515 4747 * w32fns.c (syms_of_w32fns): Add missing parenthesis.
073c88c2 4748
4706125e
PE
47492012-07-27 Paul Eggert <eggert@cs.ucla.edu>
4750
4751 Improve GDB symbol export (Bug#12036).
4752 * .gdbinit (xgetptr, xgetint, xgettype): Set $bugfix in different
4753 arms of an 'if', not using conditional expressions; otherwise GDB
4754 complains about the types in the unevaluated arm when the argument
4755 is an integer literal.
4756 (xgetint): Simplify expression.
4757 * alloc.c (gdb_make_enums_visible): New constant. This ports to
4758 GCC 3.4.2 the export of symbols to GDB. Problem reported by Eli
4759 Zaretskii in <http://bugs.gnu.org/12036#13>.
4760 * lisp.h (PUBLISH_TO_GDB): Remove. All uses removed. No longer
4761 needed now that we have gdb_make_enums_visible.
4762 (enum CHECK_LISP_OBJECT_TYPE, enum Lisp_Bits, enum More_Lisp_Bits)
4763 (enum enum_USE_LSB_TAG):
4764 New enum types, packaging up enums that need to be exported to GDB.
4765
694b6c97
DA
47662012-07-27 Dmitry Antipov <dmantipov@yandex.ru>
4767
4768 Utility function to make a list from specified amount of objects.
4769 * lisp.h (enum constype): New datatype.
4770 (listn): New prototype.
4771 * alloc.c (listn): New function.
4772 (Fmemory_use_count, syms_of_alloc): Use it.
4773 * buffer.c (syms_of_buffer): Likewise.
4774 * callint.c (syms_of_callint): Likewise.
4775 * charset.c (define_charset_internal): Likewise.
4776 * coding.c (syms_of_coding): Likewise.
4777 * keymap.c (syms_of_keymap): Likewise.
4778 * search.c (syms_of_search): Likewise.
4779 * syntax.c (syms_of_syntax): Likewise.
4780 * w32.c (init_environment): Likewise.
4781 * w32fns.c (Fw32_battery_status, syms_of_w32fns): Likewise.
4782 * xdisp.c (syms_of_xdisp): Likewise.
4783 * xfns.c (syms_of_xfns): Likewise.
4784
6195f384
DA
47852012-07-27 Dmitry Antipov <dmantipov@yandex.ru>
4786
4787 Fast save_excursion_save and save_excursion_restore.
4788 * lisp.h (struct Lisp_Excursion): New data type.
4789 (PVEC_EXCURSION): New pseudovector type.
4790 (XEXCURSION, XSETEXCURSION, EXCURSIONP): Convenient macros
4791 to deal with it. Adjust comments.
4792 (init_marker, attach_marker): New prototype.
4793 (unchain_marker): Adjust prototype.
4794 * marker.c (attach_marker): Change to global.
4795 (init_marker): New function.
4796 * alloc.c (Fmake_marker, build_marker): Use it.
4797 (build_marker): More easserts.
4798 (mark_object): Handle struct Lisp_Excursion.
4799 * editfns.c (save_excursion_save, save_excursion_restore):
4800 Reimplement to use struct Lisp_Excursion. Add comments.
4801
5eceb8fb
PE
48022012-07-26 Paul Eggert <eggert@cs.ucla.edu>
4803
4804 Fix export of symbols to GDB (Bug#12036).
4805 * alloc.c (ARRAY_MARK_FLAG_VAL, PSEUDOVECTOR_FLAG_VAL, VALMASK_VAL)
4806 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Move these here from
4807 emacs.c, as this is a more-suitable home. Had this been done earlier
4808 the fix for 12036 would have avoided some of the problems noted in
4809 <http://bugs.gnu.org/12036#13> by Eli Zaretskii, as the scope problems
4810 would have been more obvious.
562157c8
PE
4811 * emacs.c: Do not include <verify.h>; no longer needed.
4812 (gdb_CHECK_LISP_OBJECT_TYPE, gdb_DATA_SEG_BITS)
5eceb8fb
PE
4813 (gdb_GCTYPEBITS, gdb_USE_LSB_TAG)
4814 (CHECK_LISP_OBJECT_TYPE, DATA_SEG_BITS, GCTYPEBITS, USE_LSB_TAG):
4815 Remove; now done in lisp.h.
4816 * lisp.h (PUBLISH_TO_GDB): New macro.
4817 (GCTYPEBITS, USE_LSB_TAG, CHECK_LISP_OBJECT_TYPE, enum pvec_type)
4818 (DATA_SEG_BITS): Use it.
4819 (GCTYPEBITS, USE_LSB_TAG): Now also an enum, for GDB.
4820 (CHECK_LISP_OBJECT_TYPE, DATA_SEG_BITS): Now just an enum, for GDB.
4821 * mem-limits.h (EXCEEDS_LISP_PTR): Redo so that DATA_SEG_BITS need
4822 not be usable in #if. This simplifies things.
4823
d6749401
JB
48242012-07-26 Juanma Barranquero <lekktu@gmail.com>
4825
4826 * makefile.w32-in ($(BLD)/emacs.$(O)): Update dependencies.
4827
1781b9e9
PE
48282012-07-26 Paul Eggert <eggert@cs.ucla.edu>
4829
d89518db 4830 Simplify export of symbols to GDB (Bug#12036).
1781b9e9
PE
4831 * .gdbinit (xgetptr, xgetint, xgettype): Don't use "set $bugfix =
4832 $bugfix.i", as this doesn't work (with GDB 7.4.1, anyway).
4833 (xgetptr, xgetint, xgettype, xcoding, xcharset, xprintbytestr):
4834 Adjust to changes in lisp.h and emacs.c, by using
4835 CHECK_LISP_OBJECT_TYPE rather than gdb_use_struct, VALMASK instead
4836 of $valmask, DATA_SEG_BITS instead of gdb_data_seg_bits,
4837 INTTYPEBITS instead of gdb_gctypebits - 1, USE_LSB_TAG instead of
4838 gdb_use_lsb, (1 << GCTYPEBITS) - 1 instead of $tagmask, VALBITS
4839 instead of gdb_valbits.
4840 (xvectype, xvector, xpr, xprintstr, xbacktrace): Similarly, use
4841 PSEUDOVECTOR_FLAG instead of PVEC_FLAG, and ARRAY_MARK_FLAG
4842 instead of gdb_array_mark_flag.
4843 (xboolvector): Get size from $->size, not $->header.size.
4844 Use BOOL_VECTOR_BITS_PER_CHAR rather than mystery constants.
4845 (xreload, hook-run, hookpost-run): Remove.
4846 * emacs.c: Include <verify.h>.
4847 (gdb_use_lsb, gdb_use_struct, gdb_valbits, gdb_gctypebits)
4848 (gdb_data_seg_bits, PVEC_FLAG, gdb_array_mark_flag, gdb_pvec_type):
4849 Remove.
4850 (gdb_CHECK_LISP_OBJECT_TYPE, gdb_DATA_SEG_BITS, gdb_GCTYPEBITS)
4851 (gdb_USE_LSB_TAG): New enum constants.
4852 (CHECK_LISP_OBJECT_TYPE, DATA_SEG_BITS, GCTYPEBITS, USE_LSB_TAG):
4853 Also define these as enum constants, so they're visible to GDB.
4854 (ARRAY_MARK_FLAG_VAL, PSEUDOVECTOR_FLAG_VAL, VALMASK_VAL): New macros.
4855 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Also define these
4856 as constants, so they're visible to GDB.
4857 * lisp.h (VALBITS, INTTYPEBITS, FIXNUM_BITS, PSEUDOVECTOR_SIZE_BITS)
4858 (PSEUDOVECTOR_SIZE_MASK, PVEC_TYPE_MASK, BOOL_VECTOR_BITS_PER_CHAR):
4859 Now enum constants, not macros, so they're visible to GDB.
4860 (CHECK_LISP_OBJECT_TYPE, DATA_SEG_BITS): Default to 0, as this is
4861 more convenient now. All uses changed.
4862 (VALMASK) [USE_LSB_TAG]: Also define in this case.
4863 * mem-limits.h (EXCEEDS_LISP_PTR): Adjust to DATA_SEG_BITS change.
4864
3628596a
DA
48652012-07-26 Dmitry Antipov <dmantipov@yandex.ru>
4866
4867 Explicitly free restriction data that are not needed anymore.
4868 * editfns.c (save_restriction_restore): Free restriction data.
4869
7abaf5cc
SM
48702012-07-26 Stefan Monnier <monnier@iro.umontreal.ca>
4871
4872 * eval.c (Fautoload_do_load): Rename from do_autoload, export to Lisp,
4873 add argument, tune behavior, and adjust all callers.
4874
71f88e00
PE
48752012-07-25 Paul Eggert <eggert@cs.ucla.edu>
4876
4877 Use typedef for EMACS_INT, EMACS_UINT.
4878 * lisp.h, s/ms-w32.h (EMACS_INT, EMACS_UINT): Use typedefs rather
4879 than macros. This simplifies debugging in the usual case, since
4880 it lets GDB show addresses as 'EMACS_INT *' rather than 'long int *'
4881 and it allows expressions involving EMACS_INT casts.
4882 * .gdbinit (xreload): Simplify by using EMACS_INT cast.
4883
57ec3034
JD
48842012-07-25 Jan Djärv <jan.h.d@swipnet.se>
4885
4886 * nsterm.m (ns_read_socket): Return early if there is a modal
4887 window (Bug#12043).
4888
8137e7b3
MR
48892012-07-25 Martin Rudalics <rudalics@gmx.at>
4890
4891 * frame.c (Fredirect_frame_focus): In doc-string don't mention
4892 that FOCUS-FRAME can be omitted.
4893
04e9897c
DA
48942012-07-25 Dmitry Antipov <dmantipov@yandex.ru>
4895
4896 Adjust buffer text indirection counters at the end of Fkill_buffer.
4897 * buffer.c (Fkill_buffer): Adjust indirection counters when the
4898 buffer is definitely dead. This should really fix an issue reported
4899 by Christoph Scholtes again. (Bug#12007).
4900 (init_buffer_once): Initialize indirection counters of
4901 buffer_defaults and buffer_local_symbols (for sanity and safety).
4902
8a0484e1
EZ
49032012-07-24 Eli Zaretskii <eliz@gnu.org>
4904
4905 * xdisp.c (init_iterator): Don't compute dimensions of truncation
4906 and continuation glyphs on tooltip frames, leave them at zero.
4907 Avoids continued lines in tooltips. (Bug#11832)
4908
fa691a83
DA
49092012-07-24 Dmitry Antipov <dmantipov@yandex.ru>
4910
4911 Simplify copy_overlay.
04e9897c 4912 * buffer.c (copy_overlay): Simplify. Use build_marker.
fa691a83
DA
4913 * lisp.h (struct Lisp_Overlay): Restore comment with minor tweaks.
4914
436bc8e0
EZ
49152012-07-23 Eli Zaretskii <eliz@gnu.org>
4916
4917 * print.c (print_object): Don't crash when a frame's name is nil
4918 or invalid. (Bug#12025)
4919
4920 * window.c (decode_any_window): Disable CHECK_LIVE_FRAME test, as
4921 it signals an error when a tooltip frame is being created.
4922
d7a7fda3
DA
49232012-07-23 Dmitry Antipov <dmantipov@yandex.ru>
4924
4925 Cleanup miscellaneous objects allocation and initialization.
4926 * alloc.c (allocate_misc): Change to static. Add argument to
4927 specify the subtype. Adjust comment and users.
4928 (build_overlay): New function.
4929 * buffer.c (copy_overlays, Fmake_overlay): Use it.
4930 * lisp.h (struct Lisp_Overlay): Remove obsolete comment.
4931 (allocate_misc): Remove prototype.
4932 (build_overlay): Add prototype.
4933
49342012-07-23 Dmitry Antipov <dmantipov@yandex.ru>
372f8ffc
DA
4935
4936 Swap buffer text indirection counters in Fbuffer_swap_text.
4937 * buffer.c (Fbuffer_swap_text): Swap indirections too.
4938 This avoids crash reported by Christoph Scholtes at
4939 http://lists.gnu.org/archive/html/bug-gnu-emacs/2012-07/msg00785.html.
4940
9d7fa573
JD
49412012-07-22 Jan Djärv <jan.h.d@swipnet.se>
4942
4943 * nsmenu.m (Popdown_data): New struct.
4944 (pop_down_menu): p->pointer is Popdown_data. Release the pool and
4945 free Popdown_data.
4946 (ns_popup_dialog): Use NSAutoreleasePool and pass it to pop_down_menu.
4947 (initWithContentRect): Make imgView and contentView non-static
4948 and autorelease them. Also autorelease img and matrix (Bug#12005).
4949 (dealloc): Remove (Bug#12005).
4950
0dd6d66d
DA
49512012-07-22 Dmitry Antipov <dmantipov@yandex.ru>
4952
4953 Adjust consing_since_gc when objects are explicitly freed.
4954 * alloc.c (GC_DEFAULT_THRESHOLD): New macro.
4955 (Fgarbage_collect): Use it. Change minimum to 1/10 of default.
4956 (free_cons, free_misc): Subtract object size from consing_since_gc.
4957
d36d71df
DA
49582012-07-22 Dmitry Antipov <dmantipov@yandex.ru>
4959
4960 Simplify and cleanup markers positioning code.
4961 * marker.c (attach_marker): More useful eassert.
4962 (live_buffer, set_marker_internal): New function.
4963 (Fset_marker, set_marker_restricted): Use set_marker_internal.
4964 (set_marker_both, set_marker_restricted_both): Use live_buffer.
4965
fb9ea40f
PE
49662012-07-22 Paul Eggert <eggert@cs.ucla.edu>
4967
4968 * buffer.h (struct buffer.indirections): Now ptrdiff_t, not int,
4969 as it's limited by the amount of memory, not by INT_MAX.
4970
2d5c5f7d
EZ
49712012-07-21 Eli Zaretskii <eliz@gnu.org>
4972
07fb592e
EZ
4973 * keyboard.c (keys_of_keyboard): Bind language-change to 'ignore'
4974 in special-event-map. See the discussion at
4975 http://lists.gnu.org/archive/html/emacs-devel/2012-06/msg00417.html
4976 for the reasons.
4977
37a9eac8 4978 * w32menu.c (add_menu_item): Cast to ULONG_PTR when assigning
14ae4239
BT
4979 info.dwItemData. Fixes crashes on 64-bit Windows.
4980 Suggested by Fabrice Popineau <fabrice.popineau@supelec.fr>.
2d5c5f7d 4981
c4328746
JD
49822012-07-21 Jan Djärv <jan.h.d@swipnet.se>
4983
fc0c31f8 4984 * nsterm.m (accessibilityAttributeValue): New function. (Bug#11134).
4b17afa7 4985 (conversationIdentifier): Return value is NSInteger.
784051c4 4986 * nsterm.m (accessibilityAttributeValue): Surround with NS_IMPL_COCOA.
c4328746 4987
6e5d1c12
CY
49882012-07-21 Chong Yidong <cyd@gnu.org>
4989
4990 * window.c (decode_any_window): Signal an error if the window is
4991 on a dead frame (Bug#11984).
4992
9928463d
DA
49932012-07-20 Dmitry Antipov <dmantipov@yandex.ru>
4994
4995 Add indirection counting to speed up Fkill_buffer.
4996 * buffer.h (struct buffer): New member.
4997 * buffer.c (Fget_buffer_create): Set indirection counter to 0.
4998 (Fmake_indirect_buffer): Set indirection counter to -1, increment
4999 base buffer indirection counter.
5000 (compact_buffer): If ENABLE_CHECKING, verify indirection counters.
5001 (Fkill_buffer): Adjust indirection counters as needed, don't walk
5002 through buffer list if indirection counter is 0.
5003
f8643a6b
DA
50042012-07-20 Dmitry Antipov <dmantipov@yandex.ru>
5005
5006 Extend the value returned by Fgarbage_collect with heap statistics.
5007 * alloc.c (Qheap): New symbol.
5008 (syms_of_alloc): DEFSYM it.
5009 (Fgarbage_collect): If DOUG_LEA_MALLOC, add mallinfo data.
5010 (Fmemory_free): Remove.
5011 (syms_of_alloc): Don't defsubr it.
5012 * buffer.c (Fcompact_buffer): Remove.
5013 (syms_of_buffer): Don't defsubr it.
5014
dac616ff
DA
50152012-07-20 Dmitry Antipov <dmantipov@yandex.ru>
5016
5017 Make maybe_gc inline.
5018 Verify that inlining is always possible (GCC 4.7.1, -O3 -Winline).
5019 * lisp.h (consing_since_gc, gc_relative_threshold)
5020 (memory_full_cons_threshold): Revert declaration.
5021 (maybe_gc): Remove prototype, define as inline.
5022 * alloc.c: Remove old commented-out code.
5023 (consing_since_gc, gc_relative_threshold)
5024 (memory_full_cons_threshold): Revert to global.
5025 (maybe_gc): Remove.
5026
d7ea76b4
DA
50272012-07-20 Dmitry Antipov <dmantipov@yandex.ru>
5028
5029 Simple wrapper for make_unibyte_string, adjust font_open_by_name.
5030 * lisp.h (build_unibyte_string): New function.
5031 * dosfns.c, fileio.c, fns.c, ftfont.c, process.c:
5032 * sysdep.c, w32fns.c, xfns.c: Use it.
5033 * font.c (font_open_by_name): Change 2nd and 3rd args to the only arg
5034 of type Lisp_Object to avoid redundant calls to make_unibyte_string.
5035 Adjust users accordingly.
5036 * font.h (font_open_by_name): Adjust prototype.
5037
765e61e3
DA
50382012-07-20 Dmitry Antipov <dmantipov@yandex.ru>
5039
5040 Cleanup calls to Fgarbage_collect.
5041 * lisp.h (maybe_gc): New prototype.
5042 (consing_since_gc, gc_relative_threshold, memory_full_cons_threshold):
5043 Remove declarations.
5044 * alloc.c (maybe_gc): New function.
5045 (consing_since_gc, gc_relative_threshold, memory_full_cons_threshold):
5046 Make them static.
5047 * bytecode.c (MAYBE_GC): Use maybe_gc.
5048 * eval.c (eval_sub, Ffuncall): Likewise.
5049 * keyboard.c (read_char): Likewise. Adjust call to maybe_gc
5050 to avoid dependency from auto-save feature.
5051
52b852c7
PE
50522012-07-19 Paul Eggert <eggert@cs.ucla.edu>
5053
5054 * buffer.h (FOR_EACH_BUFFER): Rename from 'for_each_buffer'.
5055 (FOR_EACH_PER_BUFFER_OBJECT_AT): Rename from
5056 'for_each_per_buffer_object_at'.
5057 All uses changed. It's better to use upper-case for macros that
5058 cannot be implemented as functions, to give the reader a clue
5059 that they're special.
5060
5db81e33
SM
50612012-07-19 Stefan Monnier <monnier@iro.umontreal.ca>
5062
5063 * alloc.c (Fgarbage_collect): Tweak docstring.
5064
5b835e1d
DA
50652012-07-19 Dmitry Antipov <dmantipov@yandex.ru>
5066
5067 Tweak the value returned from Fgarbage_collect again.
5068 * alloc.c (Fgarbage_collect): New return value, as confirmed in
5069 http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00418.html.
5070 Adjust documentation.
5071 (total_vector_bytes): Rename to total_vector_slots, adjust
5072 accounting.
5073 (total_free_vector_bytes): Rename to total_free_vector_slots,
5074 adjust accounting.
5075 (Qstring_bytes, Qvector_slots): New symbols.
5076 (syms_of_alloc): DEFSYM them.
5077
9cd47b72
DA
50782012-07-19 Dmitry Antipov <dmantipov@yandex.ru>
5079
5080 Buffer compaction primitive which may be used from Lisp.
5081 * buffer.c (compact_buffer, Fcompact_buffer): New function.
5082 (syms_of_buffer): Register Fcompact_buffer.
5083 * alloc.c (Fgarbage_collect): Use compact_buffer.
5084 * buffer.h (compact_buffer): New prototype.
5085 (struct buffer_text): New member.
5086
d17337e5
DA
50872012-07-19 Dmitry Antipov <dmantipov@yandex.ru>
5088
5089 New macro to iterate over all buffers, miscellaneous cleanups.
5090 * lisp.h (all_buffers): Remove declaration.
5091 * buffer.h (all_buffers): Add declaration, with comment.
5092 (for_each_buffer): New macro.
5093 * alloc.c (Fgarbage_collect, mark_object): Use it.
5094 * buffer.c (Fkill_buffer, Fbuffer_swap_text, Fset_buffer_multibyte)
5095 (init_buffer): Likewise.
5096 * data.c (Fset_default): Likewise.
5097 * coding.c (code_conversion_restore): Remove redundant check
5098 for dead buffer.
5099 * buffer.c (Fkill_buffer): Likewise. Remove obsolete comment.
5100
60cfd278
AS
51012012-07-18 Andreas Schwab <schwab@linux-m68k.org>
5102
5103 Fix bug that created negative-length intervals.
5104 * intervals.c (merge_interval_right, merge_interval_left):
5105 Do not zero out this interval if it is absorbed by its children,
5106 as this interval's total length doesn't change in that case. See
5107 <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00403.html>.
5108
d06714cb
PE
51092012-07-18 Paul Eggert <eggert@cs.ucla.edu>
5110
83713154
PE
5111 * alloc.c (Fmake_bool_vector): Fix off-by-8 bug
5112 when invoking (make-bool-vector N t) and N is a positive
5113 multiple of 8 -- the last 8 bits were mistakenly cleared.
5114
d06714cb
PE
5115 Remove some struct layout assumptions in bool vectors.
5116 * alloc.c (bool_header_size): New constant.
5117 (header_size, word_size): Move earlier, as they're now used earlier.
5118 Use 'word_size' in a few more places, where it's appropriate.
5119 (Fmake_bool_vector, sweep_vectors): Don't assume that there is no
5120 padding before the data member of a bool vector.
5121 (sweep_vectors): Use PSEUDOVECTOR_TYPEP, in an eassert, rather
5122 than doing the check by hand with an abort ().
5123
464d5a5e
SM
51242012-07-18 Stefan Monnier <monnier@iro.umontreal.ca>
5125
5fbc0409
SM
5126 * eval.c (Fdefvar): Don't check constants since we only set the var if
5127 it's not yet defined anyway (bug#11904).
5128
464d5a5e
SM
5129 * lisp.h (last_undo_boundary): Declare new var.
5130 * keyboard.c (command_loop_1): Set it.
5131 * cmds.c (Fself_insert_command): Use it to only remove boundaries that
5132 were auto-added by the command loop (bug#11774).
5133
8dc2e44a
AS
51342012-07-18 Andreas Schwab <schwab@linux-m68k.org>
5135
5136 * w32font.c (Qsymbol): Remove local definition.
5137 (syms_of_w32font): Don't DEFSYM it.
5138
169925ec
DA
51392012-07-18 Dmitry Antipov <dmantipov@yandex.ru>
5140
5141 Fix sweep_vectors to handle large bool vectors correctly.
5142 * alloc.c (sweep_vectors): Account total_vector_bytes for
5143 bool vectors larger than VBLOCK_BYTES_MAX.
5144
5fbfb018
CY
51452012-07-18 Chong Yidong <cyd@gnu.org>
5146
5147 * frame.c (x_set_frame_parameters): Revert bogus change introduced
5148 in 2012-05-25 commit by Paul Eggert (Bug#11738).
5149
3ab6e069
DA
51502012-07-18 Dmitry Antipov <dmantipov@yandex.ru>
5151
5152 Return more descriptive data from Fgarbage_collect.
5153 Suggested by Stefan Monnier in
5154 http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00369.html.
5155 * alloc.c (bounded_number): New function.
5156 (total_buffers, total_vectors): New variable.
5157 (total_string_size): Rename to total_string_bytes, adjust users.
5158 (total_vector_size): Rename to total_vector_bytes, adjust users.
5159 (sweep_vectors): Account total_vectors and total_vector_bytes.
5160 (Fgarbage_collect): New return value. Adjust documentation.
5161 (gc_sweep): Account total_buffers.
5162 (Fmemory_free, Fmemory_use_counts): Use bounded_number.
5163 (VECTOR_SIZE): Remove.
5164 * data.c (Qfloat, Qvector, Qsymbol, Qstring, Qcons): Make global.
5165 (Qinterval, Qmisc): New symbols.
5166 (syms_of_data): Initialize them.
5167 * lisp.h (Qinterval, Qsymbol, Qstring, Qmisc, Qvector, Qfloat)
5168 (Qcons, Qbuffer): New declarations.
5169
6d02fe5b
PE
51702012-07-17 Paul Eggert <eggert@cs.ucla.edu>
5171
5172 * alloc.c (Fmemory_free): Account for memory-free's own storage.
5173 Round up, not down. Improve doc.
5174
b7ffe040
DA
51752012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
5176
5177 Restore old code in allocate_string_data to avoid Faset breakage.
5178 Reported by Julien Danjou <julien@danjou.info> in
5179 http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00371.html.
5180 * alloc.c (allocate_string_data): Restore old code with minor
5181 adjustments, fix comment to explain this subtle issue.
5182
4dc7c8d5
SM
51832012-07-17 Eli Zaretskii <eliz@gnu.org>
5184
5185 Remove FILE_SYSTEM_CASE.
5186 * s/msdos.h (FILE_SYSTEM_CASE): Don't define.
5187
5188 * fileio.c (FILE_SYSTEM_CASE): Don't define.
5189 (Ffile_name_directory, Fexpand_file_name): Don't use FILE_SYSTEM_CASE.
5190 Fixes problems on MS-DOS with Vtemp_file_name_pattern when
5191 call-process-region passes it through expand-file-name.
5192
5193 * dired.c (file_name_completion): Don't use FILE_SYSTEM_CASE.
5194
51952012-07-17 Andreas Schwab <schwab@linux-m68k.org>
5196
5197 Fix crash when creating indirect buffer (Bug#11917)
5198 * buffer.c (buffer_lisp_local_variables): Add argument CLONE.
5199 Don't handle unbound variables specially if non-zero.
5200 (Fbuffer_local_variables): Pass zero.
5201 (clone_per_buffer_values): Pass non-zero.
5202
52032012-07-17 Andreas Schwab <schwab@linux-m68k.org>
5204
5205 * gnutls.c (emacs_gnutls_handshake): Revert last change. Add QUIT
5206 to make the loop interruptible.
5207
52082012-07-17 Andreas Schwab <schwab@linux-m68k.org>
5209
5210 * gnutls.c (emacs_gnutls_handshake): Only retry if
5211 GNUTLS_E_INTERRUPTED.
5212
cce7fefc
DA
52132012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
5214
5215 Cleanup and convert miscellaneous checks to eassert.
5216 * alloc.c (mark_interval): Fix comment, partially rephrase
5217 old comment from intervals.h (see below).
5218 * intervals.c (find_interval, adjust_intervals_for_insertion)
5219 (delete_interval, adjust_intervals_for_deletion)
5220 (graft_intervals_into_buffer, temp_set_point_both, copy_intervals):
5221 Convert to eassert.
5222 (adjust_intervals_for_insertion, make_new_interval):
5223 Remove obsolete and unused code.
5224 * intervals.h (struct interval): Remove obsolete comment.
5225 * textprotp.c (erase_properties): Remove unused code.
5226 (Fadd_text_properties, set_text_properties_1, Fremove_text_properties)
5227 (Fremove_list_of_text_properties): Convert to eassert.
5228
9ea10cc3
CY
52292012-07-17 Chong Yidong <cyd@gnu.org>
5230
5231 * editfns.c (Finsert_char): Doc fix.
5232
3900d5de
DA
52332012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
5234
5235 Fix previous change to make Fmemory_free always accurate.
5236 * alloc.c (make_interval): Update total_free_intervals.
5237 (make_float): Likewise for total_free_floats.
5238 (free_cons, Fcons): Likewise for total_free_conses.
5239 (SETUP_ON_FREE_LIST, allocate_vector_from_block):
5240 Likewise for total_free_vector_bytes.
5241 (Fmake_symbol): Likewise for total_free_symbols.
5242 (bytes_free): Remove.
5243
7098646f
DA
52442012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
5245
5246 Simple free memory accounting feature.
5247 * alloc.c (bytes_free, total_free_vector_bytes): New variable.
5248 (sweep_vectors): Accumulate size of free vectors.
5249 (Fgarbage_collect): Setup bytes_free.
5250 (Fmemory_free): New function.
5251 (syms_of_alloc): Register it.
5252
22657b40
DA
52532012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
5254
5255 Cleanup overlays checking.
5256 * buffer.h (OVERLAY_VALID): Remove as useless synonym of OVERLAYP.
5257 * buffer.c (overlay_touches_p, recenter_overlay_lists): Change to
5258 eassert and OVERLAYP.
5259 (sort_overlays): Change to use OVERLAYP.
5260
ddfc8813
RK
52612012-07-16 René Kyllingstad <Rene@Kyllingstad.com> (tiny change)
5262
5263 * editfns.c (Finsert_char): Make it interactive, and make the
5264 second arg optional. Copy interactive spec and docstring from
5265 ucs-insert.
5266
7c26cf3c
PE
52672012-07-17 Paul Eggert <eggert@cs.ucla.edu>
5268
5269 * floatfns.c (Fabs): Do not wrap fabs inside IN_FLOAT (Bug#11913).
5270 Unlike the other wrapped functions, fabs has an unspecified
5271 effect on errno.
5272
5d127af9
JD
52732012-07-16 Jan Djärv <jan.h.d@swipnet.se>
5274
5275 * nsterm.m (keyDown): Interpret flags without left/right bits
5276 as the left key (Bug#11670).
5277
6a0dd1d7
DA
52782012-07-16 Dmitry Antipov <dmantipov@yandex.ru>
5279
5280 Remove empty and useless init functions.
5281 * lisp.h (init_character_once, init_fns, init_image)
5282 (init_filelock, init_sound): Remove prototype.
5283 * character.c (init_character_once): Remove.
5284 * filelock.c (init_filelock): Likewise.
5285 * fns.c (init_fns): Likewise.
5286 * image.c (init_image): Likewise.
5287 * sound.c (init_sound): Likewise.
5288 * emacs.c (main): Adjust accordingly.
5289
7a6136fd
DA
52902012-07-16 Dmitry Antipov <dmantipov@yandex.ru>
5291
5292 * gtkutil.h: Tiny cleanups.
5293 (use_old_gtk_file_dialog): Remove useless declaration.
5294 (xg_uses_old_file_dialog): Add suggested const attribute.
5295
ce811ad9
EZ
52962012-07-15 Eli Zaretskii <eliz@gnu.org>
5297
5298 * bidi.c (MAX_STRONG_CHAR_SEARCH): New macro.
5299 (bidi_paragraph_init): Use it to limit search forward for a strong
5300 directional character in abnormally large paragraphs full of
5301 neutral or weak characters. (Bug#11943)
5302
c9adfeaa
SF
53032012-07-15 Stefano Facchini <stefano.facchini@gmail.com> (tiny change)
5304
5305 * gtkutil.c (xg_create_tool_bar): Apply "primary-toolbar" style to
5306 the toolbar (Bug#9451).
5307 (xg_make_tool_item): Give the widget event box a transparent
5308 background.
5309
fff62aa9
DA
53102012-07-15 Dmitry Antipov <dmantipov@yandex.ru>
5311
5312 Cleanup basic allocation variables and functions.
5313 * alloc.c (ignore_warnings, init_intervals, init_float)
5314 (init_cons, init_symbol, init_marker): Remove.
5315 (interval_block_index): Initialize to INTERVAL_BLOCK_SIZE.
5316 (float_block_index): Initialize to FLOAT_BLOCK_SIZE.
5317 (cons_block_index): Initialize to CONS_BLOCK_SIZE.
5318 (symbol_block_size): Initialize to SYMBOL_BLOCK_SIZE.
5319 (marker_block_index): Initialize to MARKER_BLOCK_SIZE.
5320 (staticidx, init_alloc_once, init_strings, free_ablock):
5321 Remove redundant initialization.
5322 * fns.c (init_weak_hash_tables): Remove.
5323 * lisp.h (init_weak_hash_tables): Remove prototype.
5324
9730daca
DA
53252012-07-15 Dmitry Antipov <dmantipov@yandex.ru>
5326
5327 Use zero_vector where appropriate.
5328 * alloc.c (zero_vector): Define as Lisp_Object. Adjust users
5329 accordingly.
5330 * lisp.h (zero_vector): New declaration.
5331 * font.c (null_vector): Remove.
5332 (syms_of_font): Remove initialization and staticpro.
5333 (font_list_entities, font_find_for_lface): Change to use zero_vector.
5334 * keymap.c (Faccessible_keymaps): Likewise.
5335
2e2d2a13
LL
53362012-07-15 Leo Liu <sdl.web@gmail.com>
5337
5338 * fringe.c: Fix typo in comments.
5339
cd276f6e
LL
53402012-07-14 Leo Liu <sdl.web@gmail.com>
5341
5342 * fringe.c: Add a new bitmap exclamation-mark.
5343
5a1131d9
EZ
53442012-07-14 Eli Zaretskii <eliz@gnu.org>
5345
5346 * gmalloc.c (GMALLOC_INHIBIT_VALLOC): Don't reference.
5347
5348 * s/msdos.h (BSD_SYSTEM, DATA_START, GC_SETJMP_WORKS, HAVE_MOUSE)
5349 (HAVE_MENUS): Don't define, defined by editing config.in with
5350 msdos/sed2v2.inp.
5351 (GMALLOC_INHIBIT_VALLOC): Don't define.
5352 (MODE_LINE_BINARY_TEXT): Remove, not used anymore.
5353
22e983b7
JB
53542012-07-14 Juanma Barranquero <lekktu@gmail.com>
5355
5356 * s/ms-w32.h (GC_SETJMP_WORKS, GC_MARK_STACK): Set in nt/config.nt.
5357
5b3f250f
GM
53582012-07-14 Glenn Morris <rgm@gnu.org>
5359
5360 * s/aix4-2.h, s/freebsd.h, s/gnu-linux.h, s/hpux10-20.h:
5361 * s/irix6-5.h, s/netbsd.h, s/sol2-6.h, s/unixware.h:
5362 Let configure set GC_SETJMP_WORKS, GC_MARK_STACK.
5363
33d63ff4
GM
53642012-07-13 Glenn Morris <rgm@gnu.org>
5365
5b633342
GM
5366 * s/gnu-linux.h (GC_MARK_SECONDARY_STACK): Let configure set it.
5367
33d63ff4
GM
5368 * s/usg5-4-common.h (SETUP_SLAVE_PTY): Let configure set it.
5369 * s/irix6-5.h (SETUP_SLAVE_PTY): No more need to unset it.
5370
b55b9f85
JD
53712012-07-13 Jan Djärv <jan.h.d@swipnet.se>
5372
0dc8cf50
JD
5373 * nsterm.m (uRect): Only define if NS_IMPL_GNUSTEP.
5374 (x_free_frame_resources): Pass x_free_frame_resources to NSTRACE.
5375 (ns_lisp_to_color, ns_string_to_lispmod, ns_term_init)
5376 (ns_term_shutdown, requestService, initFrameFromEmacs): Use SSDATA
5377 where appropriate.
5378 (ns_exec_path, ns_load_path, changeFont): Put () around assignment used
5379 as boolean expression.
5380 (x_set_window_size): Remove unused variable toolbar.
5381 (ns_get_color_default, ns_mod_to_lisp): Remove.
5382 (ns_mouse_position): Remove unused variables xchar and ychar.
5383 (ns_compute_glyph_string_overhangs): Remove unused variable face.
5384 (ns_set_vertical_scroll_bar): Remove unused variable count.
5385 (ns_delete_terminal): Remove unused variable i.
5386 (ns_term_init): Remove unused variables r, g and b.
5387 (mouseDown): Remove unused variable window.
5388 (windowDidResize): Move definition of theWindow inside NS_IMPL_GNUSTEP.
5389 (initFrameFromEmacs): Remove unused variable vbextra.
5390 (mouseEntered): Remove unused variables p and dpyinfo.
5391 (mouseExited): Remove unused variables p and r.
5392 (ns_define_frame_cursor, ns_clear_frame_area)
5393 (ns_draw_window_cursor, ns_initialize_display_info): Make static.
5394 (menuDown): Assign [sender tag] to variable and cast the variable.
5395
5396 * nsterm.h (menuDown): Add id as type to argument sender.
5397 (ns_display_info_for_name): Add Lisp_Object argument.
5398 (ns_term_init): Add Lisp_Object argument.
5399 (ns_map_event_to_object): Add void argument.
5400 (ns_string_from_pasteboard, ns_string_to_pasteboard): Add correct
5401 prototype with arguments and only declare if __OBJC__.
5402 (nxatoms_of_nsselect): Add void argument.
5403 (ns_lisp_to_cursor_type): Add Lisp_Object argument.
5404 (ns_alloc_autorelease_pool): Add void argument.
5405 (ns_release_autorelease_pool): Add void* argument.
5406 (ns_get_defaults_value): Add const char* argument.
5407
5408 * nsmenu.m (ns_update_menubar, ns_menu_show, process_dialog)
5409 (initFromContents): Use SSDATA where appropriate.
5410 (ns_update_menubar): Add braces to ambigous if-else.
5411 (initWithTitle): Put () around assignment in if statement.
5412 (ns_menu_show): Remove unused variables window and keymap.
5413 (update_frame_tool_bar): Remove unused variable selected_p.
5414 (initWithContentRect): Remove unused variable this_cmd_name.
5415
5416 * nsimage.m (ns_load_image, allocInitFromFile): Use SSDATA where
5417 appropriate.
5418 (setXBMColor): Remove unused variable len.
5419 (setPixmapData): Put () around assignment in loop statement.
5420
5421 * nsfont.m (ns_get_family, ns_lang_to_script, ns_otf_to_script)
5422 (ns_registry_to_script, ns_get_req_script, nsfont_open): Use SSDATA
5423 where appropriate.
5424 (ns_get_covering_families, ns_findfonts, nsfont_list_family): Put ()
5425 around assignment in loop statement.
5426 (nsfont_open): Remove unused variable i.
5427 (nsfont_open): Remove unused variable len.
5428 (nsfont_draw): Remove unused variable cs.
5429
5430 * nsfns.m (x_set_icon_name, ns_set_name_internal)
5431 (ns_set_name_as_filename, ns_implicitly_set_icon_type)
5432 (x_set_icon_type, ns_lisp_to_cursor_type, Fns_read_file_name)
5433 (Fns_get_resource, Fns_set_resource, Fx_open_connection)
5434 (Fns_font_name, Fns_perform_service)
5435 (Fns_convert_utf8_nfd_to_nfc, ns_do_applescript)
5436 (Fns_do_applescript, Fx_show_tip): Use SSDATA where appropriate.
5437 (ns_set_name): Remove unused variable view.
5438 (x_set_menu_bar_lines): Remove unused variable olines.
5439 (x_set_tool_bar_lines): Remove unused variable root_window.
5440 (Fns_list_colors): Put () around assignment in while statement.
5441 (Fns_perform_service): Remove unused variable len.
5442 (Fns_display_usable_bounds): Remove unused variable top.
5443 (syms_of_nsfns): Remove unused variable i.
5444
b55b9f85
JD
5445 * nsmenu.m (ns_update_menubar): Exchange place of argument 2 and 3 to
5446 memcpy (Bug#11907).
5447
ed9265fc 54482012-07-13 Kalle Kankare <kalle.kankare@iki.fi> (tiny change)
2277de02
JD
5449
5450 * image.c (Fimagemagick_types): Initialize ex with GetExceptionInfo
5451 and free it with DestroyExceptionInfo (Bug#11558).
5452
ef099b57
JB
54532012-07-13 Juanma Barranquero <lekktu@gmail.com>
5454
5455 * s/ms-w32.h (FIRST_PTY_LETTER, HAVE_SOCKETS): Move to nt/config.nt.
5456 (HAVE_ATTRIBUTE_ALIGNED, HAVE_C99_STRTOLD, HAVE___BUILTIN_UNWIND_INIT):
5457 Set here, not in nt/config.nt.
5458
ea814a5d
EZ
54592012-07-13 Eli Zaretskii <eliz@gnu.org>
5460
5461 * xdisp.c (move_it_in_display_line_to): On GUI terminals, allow
5462 cursor overflow into the last glyph on display line when the right
5463 fringe is off. (Bug#11832)
5464
1a952767
PE
54652012-07-13 Paul Eggert <eggert@cs.ucla.edu>
5466
5467 * xdisp.c (produce_special_glyphs): Now static.
5468 * dispextern.h (produce_special_glyphs): Remove decl.
5469
983188fd
GM
54702012-07-13 Glenn Morris <rgm@gnu.org>
5471
8d7c7eed 5472 * s/bsd-common.h, s/cygwin.h: Remove empty files.
32fb4bb6
GM
5473 * s/freebsd.h, s/netbsd.h: Do not include bsd-common.h.
5474
983188fd
GM
5475 * s/usg5-4-common.h (USG, USG5):
5476 * s/template.h (USG5, USG, HPUX, BSD4_2, BSD_SYSTEM):
5477 * s/sol2-6.h (SOLARIS2):
5478 * s/irix6-5.h (IRIX6_5):
5479 * s/hpux10-20.h (USG, USG5, HPUX):
5480 * s/gnu-linux.h (USG, GNU_LINUX):
5481 * s/freebsd.h (BSD_SYSTEM):
5482 * s/darwin.h (BSD4_2, BSD_SYSTEM, DARWIN_OS):
5483 * s/cygwin.h (CYGWIN):
5484 * s/bsd-common.h (BSD_SYSTEM, BSD4_2):
5485 * s/aix4-2.h (USG, USG5, _AIX): Move "system type" macros to configure.
5486
d1e68667 54872012-07-13 BT Templeton <bpt@hcoop.net> (tiny change)
24ef80ae
PE
5488
5489 * nsfont.m (ns_charset_covers): Don't abort if no bitmap (Bug#11853).
24ef80ae 5490
6de0e799
GM
54912012-07-13 Glenn Morris <rgm@gnu.org>
5492
739ae010
GM
5493 * s/usg5-4-common.h (NSIG_MINIMUM): Let configure set it.
5494
dbee5793
GM
5495 * s/gnu-linux.h, s/irix6-5.h: Let configure set ULIMIT_BREAK_VALUE.
5496
6de0e799
GM
5497 * process.c (init_process_emacs): Replace MIN_PTY_KERNEL_VERSION.
5498 * s/darwin.h (MIN_PTY_KERNEL_VERSION): Remove single-use macro.
5499
b82da769
GM
55002012-07-12 Glenn Morris <rgm@gnu.org>
5501
4fae5a7a 5502 * s/darwin.h (SYSTEM_PURESIZE_EXTRA): Move to configure.
b82da769
GM
5503
5504 * process.c (init_process_emacs): Rename from init_process.
5505 The old name is also the name of a Mach system call.
5506 * lisp.h, emacs.c: Update for this name change.
5507 * nsgui.h, sysselect.h, s/darwin.h: Remove workaround that is no
5508 longer needed.
5509
5a979817
EZ
55102012-07-12 Eli Zaretskii <eliz@gnu.org>
5511
5512 * xdisp.c (insert_left_trunc_glyphs): Fix incorrect size in
5513 memmove call that removes glyphs covered by the left truncation
5514 glyph. Improve commentary.
5515 (display_line): Fix display of continuation glyphs on GUI frames
5516 when the right fringe is turned off and variable-size fonts are
5517 used in the window. Move the code that appends a stretch glyph to
5518 produce_special_glyphs, so that it could be used for truncation
5519 and continuation glyphs alike.
5520 (produce_special_glyphs) [HAVE_WINDOW_SYSTEM]: Produce a stretch
5521 glyph of a suitably computed width, to align the special glyphs at
5522 the window margin. Code moved from display_line. (Bug#11832)
5523
3e91a053
GM
55242012-07-12 Glenn Morris <rgm@gnu.org>
5525
ba9e4b84
GM
5526 * s/aix4-2.h, s/hpux10-20.h: Let configure set NO_EDITRES.
5527
5528 * s/gnu-linux.h, s/hpux10-20.h:
5529 Do not unconditionally define HAVE_XRMSETDATABASE.
5530
3e91a053
GM
5531 * s/gnu-linux.h (UNIX98_PTYS): Let configure set it.
5532
b300b1f4
PE
55332012-07-12 Paul Eggert <eggert@cs.ucla.edu>
5534
5535 Fix typos that broke OS X build.
5536 Reported by Randal L. Schwartz in
5537 <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00225.html>.
5538 * nsterm.m (ns_timeout): Add missing local decl.
5539 (ns_get_color): snprintf -> sprintf, to fix typo.
5540
6e777848
GM
55412012-07-12 Glenn Morris <rgm@gnu.org>
5542
3f922c37
GM
5543 * src/s/aix4-2.h, src/s/cygwin.h, src/s/darwin.h:
5544 * src/s/gnu-linux.h, src/s/hpux10-20.h, src/s/irix6-5.h:
5545 * src/s/sol2-6.h, src/s/unixware.h, src/s/usg5-4-common.h:
5546 Move PTY_NAME_SPRINTF, PTY_TTY_NAME_SPRINTF to configure.
5547
0ab7b23a
GM
5548 * s/cygwin.h, s/darwin.h, s/gnu-linux.h, s/irix6-5.h:
5549 Move PTY_OPEN to configure.
5550
6e777848
GM
5551 * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/darwin.h:
5552 * s/gnu-linux.h, s/hpux10-20.h, s/irix6-5.h, s/template.h:
5553 * s/usg5-4-common.h: Move FIRST_PTY_LETTER, PTY_ITERATION to configure.
5554
4a7edc24
DA
55552012-07-12 Dmitry Antipov <dmantipov@yandex.ru>
5556
5557 Use empty_unibyte_string where applicable.
5558 * keyboard.c (parse_tool_bar_item): Use empty_unibyte_string.
5559 * lread.c (read1): Likewise.
5560 * xsettings.c (syms_of_xsettings): Likewise.
5561
308aab79
GM
55622012-07-12 Glenn Morris <rgm@gnu.org>
5563
42bd1719
GM
5564 * s/cygwin.h (G_SLICE_ALWAYS_MALLOC):
5565 * s/freebsd.h (BROKEN_PTY_READ_AFTER_EAGAIN):
7ccad002
GM
5566 * s/irix6-5.h (SETPGRP_RELEASES_CTTY, PREFER_VSUSP):
5567 * s/hpux10-20.h (RUN_TIME_REMAP):
5568 * s/bsd-common.h (TABDLY): Move to configure.
5569
5570 * s/hpux10-20.h, s/sol2-6.h: Move XOS_NEEDS_TIME_H to configure.
5571
5572 * s/bsd-common.h, s/darwin.h: Move TAB3 to configure.
5573
ea0bbd17 5574 * s/aix4-2.h (BROKEN_FIONREAD, BROKEN_SIGAIO, BROKEN_SIGPTY)
42bd1719 5575 (BROKEN_SIGPOLL, BROKEN_GET_CURRENT_DIR_NAME): Let configure set them.
ea0bbd17
GM
5576
5577 * s/darwin.h (NO_ABORT, NO_MATHERR): Let configure set them.
51c3b9b4 5578
308aab79
GM
5579 * s/bsd-common.h, s/cygwin.h, s/gnu-linux.h, s/irix6-5.h:
5580 * s/template.h: Move NARROWPROTO to configure.
5581
ee1cf5cf
GM
55822012-07-11 Glenn Morris <rgm@gnu.org>
5583
30fe9bf4
GM
5584 * s/gnu-linux.h, s/sol2-6.h: No longer define POSIX,
5585 unused since 2011-01-17 change to systty.h.
5586
ee1cf5cf
GM
5587 * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/darwin.h, s/gnu-linux.h:
5588 * s/hpux10-20.h, s/template.h, s/usg5-4-common.h:
5589 Move HAVE_PTYS and HAVE_SOCKETS to configure.
5590
63e47e07
PE
55912012-07-11 Paul Eggert <eggert@cs.ucla.edu>
5592
5593 * s/sol2-6.h (HAVE_LIBKSTAT): Remove. (Bug#11914)
5594
c43fb4c3
GM
55952012-07-11 Glenn Morris <rgm@gnu.org>
5596
5597 * s/darwin.h, s/gnu-linux.h, s/template.h:
5598 Move INTERRUPT_INPUT to configure.
5599
e8df9267
DA
56002012-07-11 Dmitry Antipov <dmantipov@yandex.ru>
5601
5602 Minor adjustments to interning code.
5603 * lisp.h (intern, intern_c_string): Redefine as static inline
5604 wrappers for intern_1 and intern_c_string_1, respectively.
5605 (intern_1, intern_c_string_1): Rename prototypes.
14ae4239
BT
5606 * lread.c (intern_1, intern_c_string_1, oblookup):
5607 Simplify Vobarray checking.
e8df9267
DA
5608 * font.c (font_intern_prop): Likewise. Adjust comment.
5609 * w32font.c (intern_font_name): Likewise.
5610
34348bd4
AS
56112012-07-11 Andreas Schwab <schwab@linux-m68k.org>
5612
d96a1e0c
AS
5613 * gnutls.c (Fgnutls_boot): Properly parse :keylist argument.
5614
34348bd4
AS
5615 * coding.c (Fdefine_coding_system_internal): Use XCAR/XCDR instead
5616 of Fcar/Fcdr if possible.
5617 * font.c (check_otf_features): Likewise.
5618 * fontset.c (Fnew_fontset): Likewise.
5619 * gnutls.c (Fgnutls_boot): Likewise.
5620 * minibuf.c (read_minibuf): Likewise.
5621 * msdos.c (IT_set_frame_parameters): Likewise.
5622 * xmenu.c (Fx_popup_dialog): Likewise.
5623 * w32menu.c (Fx_popup_dialog): Likewise.
5624
c8add24e
GM
56252012-07-11 Glenn Morris <rgm@gnu.org>
5626
4b575b3c
GM
5627 * s/bsd-common.h, s/cygwin.h: No need to undefine INTERRUPT_INPUT,
5628 since nothing has defined it on these platforms.
5629
09f4e3b0
GM
5630 * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/gnu-linux.h:
5631 * s/irix6-5.h: Move SIGNALS_VIA_CHARACTERS to configure.
5632
172bedef
GM
5633 * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/darwin.h:
5634 * s/gnu-linux.h, s/hpux10-20.h, s/template.h, s/usg5-4-common.h:
5635 Move CLASH_DETECTION to configure.
5636
249685df
GM
5637 * s/gnu.h: Remove file, which is now empty.
5638
c8add24e
GM
5639 * s/gnu.h, s/gnu-linux.h:
5640 Move GNU_LIBRARY_PENDING_OUTPUT_COUNT to configure.
5641
b41253a3
JW
56422012-07-11 John Wiegley <johnw@newartisans.com>
5643
5644 * alloc.c (mark_memory): Guard the "no_address_safety_analysis"
5645 function attribute, so we only use it if it exists in the
5646 compiler.
5647
d923b542
DA
56482012-07-11 Dmitry Antipov <dmantipov@yandex.ru>
5649
5650 Avoid call to strlen in fast_c_string_match_ignore_case.
5651 * search.c (fast_c_string_match_ignore_case): Change to use
5652 length argument. Adjust users accordingly.
5653 * lisp.h (fast_c_string_match_ignore_case): Adjust prototype.
5654
5ebbef1d
PE
56552012-07-11 Paul Eggert <eggert@cs.ucla.edu>
5656
bb352260
PE
5657 Assume mkdir, rmdir.
5658 * sysdep.c (mkdir) [!HAVE_MKDIR]: Remove.
5659 * sysdep.c (rmdir) [!HAVE_RMDIR]: Remove.
5660
57054ddd
PE
5661 Assume rename.
5662 * sysdep.c (rename) [!HAVE_RENAME]: Remove.
5663
b747d3f7
PE
5664 Assume perror.
5665 * s/hpux10-20.h (HAVE_PERROR): Remove.
5666 * sysdep.c (perror) [HPUX && !HAVE_PERROR]:
5667 Remove dummy definition, as this problem was obsolete long ago.
5668
5ebbef1d
PE
5669 Assume strerror.
5670 * sysdep.c (strerror) [!HAVE_STRERROR && !WINDOWSNT]: Remove.
5671
984e7f30
DA
56722012-07-11 Dmitry Antipov <dmantipov@yandex.ru>
5673
5674 Avoid calls to strlen in font processing functions.
5675 * font.c (font_parse_name, font_parse_xlfd, font_parse_fcname)
14ae4239
BT
5676 (font_open_by_name): Change to use length argument.
5677 Adjust users accordingly.
d923b542
DA
5678 * font.h (font_open_by_name, font_parse_xlfd, font_unparse_xlfd):
5679 Adjust prototypes.
5680 * xfont.c (xfont_decode_coding_xlfd, font_unparse_xlfd):
5681 Change to return ptrdiff_t.
984e7f30
DA
5682 (xfont_list_pattern, xfont_match): Use length returned by
5683 xfont_decode_coding_xlfd.
5684 * xfns.c (x_default_font_parameter): Omit useless xstrdup.
5685
20e94fdd
GM
56862012-07-11 Glenn Morris <rgm@gnu.org>
5687
9d596af3
GM
5688 * s/darwin.h, s/freebsd.h, s/netbsd.h:
5689 Move DONT_REOPEN_PTY to configure.
5690
20e94fdd
GM
5691 * sound.c (DEFAULT_SOUND_DEVICE) [!WINDOWSNT]:
5692 * s/netbsd.h (DEFAULT_SOUND_DEVICE): Let configure set it.
5693
e99a530f
PE
56942012-07-10 Paul Eggert <eggert@cs.ucla.edu>
5695
22ffb973
PE
5696 Remove "#define unix" that is no longer needed (Bug#11905).
5697 * s/aix4-2.h (unix): Remove; no longer needed.
5698
e9a9ae03
PE
5699 EMACS_TIME simplification (Bug#11875).
5700 This replaces macros (which typically do not work in GDB)
5701 with functions, typedefs and enums, making the code easier to debug.
5702 The functional style also makes code easier to read and maintain.
5703 * systime.h: Include <sys/time.h> on all hosts, not just if
5704 WINDOWSNT, since 'struct timeval' is needed in general.
5705 (EMACS_TIME): Now a typedef, not a macro.
5706 (EMACS_TIME_RESOLUTION, LOG10_EMACS_TIME_RESOLUTION): Now constants,
5707 not macros.
5708 (EMACS_SECS, EMACS_NSECS, EMACS_TIME_SIGN, EMACS_TIME_VALID_P)
5709 (EMACS_TIME_FROM_DOUBLE, EMACS_TIME_TO_DOUBLE, EMACS_TIME_EQ)
5710 (EMACS_TIME_NE, EMACS_TIME_GT, EMACS_TIME_GE, EMACS_TIME_LT)
5711 (EMACS_TIME_LE): Now functions, not macros.
5712 (EMACS_SET_SECS, EMACS_SET_NSECS, EMACS_SET_SECS_NSECS)
5713 (EMACS_SET_USECS, EMACS_SET_SECS_USECS): Remove these macros,
5714 which are not functions. All uses rewritten to use:
5715 (make_emacs_time): New function.
5716 (EMACS_SECS_ADDR, EMACS_SET_INVALID_TIME, EMACS_GET_TIME)
5717 (EMACS_ADD_TIME, EMACS_SUB_TIME): Remove these macros, which are
5718 not functions. All uses rewritten to use the following, respectively:
5719 (emacs_secs_addr, invalid_emacs_time, get_emacs_time)
5720 (add_emacs_time, sub_emacs_time): New functions.
ed9265fc 5721 * atimer.c: Don't include <sys/time.h>, as "systime.h" does this.
e9a9ae03
PE
5722 * fileio.c (Fcopy_file):
5723 * xterm.c (XTflash): Get the current time closer to when it's used.
5724 * makefile.w32-in ($(BLD)/atimer.$(O)): Update dependencies.
5725
ffacb126
PE
5726 * bytecode.c (targets): Suppress -Woverride-init warnings.
5727
e99a530f
PE
5728 Simplify by avoiding confusing use of strncpy etc.
5729 * doc.c (Fsnarf_documentation):
5730 * fileio.c (Ffile_name_directory, Fsubstitute_in_file_name):
5731 * frame.c (Fmake_terminal_frame):
5732 * gtkutil.c (get_utf8_string):
5733 * lread.c (openp):
5734 * nsmenu.m (ns_update_menubar):
5735 * regex.c (regerror):
5736 Prefer memcpy to strncpy and strncat when either will do.
5737 * fileio.c (Fsubstitute_in_file_name):
5738 * keyboard.c (MULTI_LETTER_MOD, parse_modifiers_uncached)
5739 (menu_separator_name_p):
5740 * nsmenu.m (ns_update_menubar):
5741 Prefer memcmp to strncmp when either will do.
5742 * nsterm.m: Include <ftoastr.h>.
5743 (ns_get_color):
5744 * s/gnu-linux.h, s/sol2-6.h, s/unixware.h (PTY_TTY_NAME_SPRINTF):
5745 Prefer snprintf to strncpy.
5746 * nsterm.m (ns_term_init):
5747 * widget.c (set_frame_size) [0]: Prefer xstrdup to xmalloc + strncpy.
5748 * nsterm.m (ns_term_init):
5749 Avoid the need for strncpy, by using build_string or
5750 make_unibyte_string directly. Use dtoastr, not snprintf.
5751 * process.c (Fmake_network_process): Diagnose service names that
5752 are too long, rather than silently truncating them or creating
5753 non-null-terminated names.
5754 (Fnetwork_interface_info): Likewise, for interface names.
5755 * sysdep.c (system_process_attributes) [GNU_LINUX]:
5756 Prefer sprintf to strncat.
5757 * xdisp.c (debug_method_add) [GLYPH_DEBUG]:
5758 Prefer vsnprintf to vsprintf + strncpy.
5759
c59592b3
GM
57602012-07-10 Glenn Morris <rgm@gnu.org>
5761
5762 * dispnew.c (PENDING_OUTPUT_COUNT) [!__GNU_LIBRARY__]:
5763 Clarify fallback case.
5764
7d7bbefd
DA
57652012-07-10 Dmitry Antipov <dmantipov@yandex.ru>
5766
5767 Use XCAR and XCDR instead of Fcar and Fcdr where possible.
5768 * callint.c, coding.c, doc.c, editfns.c, eval.c, font.c, fontset.c,
5769 * frame.c, gnutls.c, minibuf.c, msdos.c, textprop.c, w32fns.c,
d923b542 5770 * w32menu.c, window.c, xmenu.c: Change to use XCAR and XCDR
7d7bbefd
DA
5771 where argument type is known to be a Lisp_Cons.
5772
3a4c8000
TT
57732012-07-10 Tom Tromey <tromey@redhat.com>
5774
5775 * bytecode.c (BYTE_CODE_THREADED): New macro.
5776 (BYTE_CODES): New macro. Replaces all old byte-code defines.
5777 (enum byte_code_op): New type.
5778 (CASE, NEXT, FIRST, CASE_DEFAULT, CASE_ABORT): New macros.
5779 (exec_byte_code): Use them. Use token threading when applicable.
5780
2a0213a6
DA
57812012-07-10 Dmitry Antipov <dmantipov@yandex.ru>
5782
5783 Optimize pure C strings initialization.
5784 * lisp.h (make_pure_string): Fix prototype.
5785 (build_pure_c_string): New function, defined as static inline. This
5786 provides a better opportunity to optimize away calls to strlen when
5787 the function is called with compile-time constant argument.
5788 * alloc.c (make_pure_c_string): Fix comment. Change to add nchars
5789 argument, adjust users accordingly. Use build_pure_c_string where
5790 appropriate.
5791 * buffer.c, coding.c, data.c, dbusbind.c, fileio.c, fontset.c, frame.c,
5792 * keyboard.c, keymap.c, lread.c, search.c, syntax.c, w32fns.c, xdisp.c,
5793 * xfaces.c, xfns.c, xterm.c: Use build_pure_c_string where appropriate.
5794
cb1caeaf
DA
57952012-07-10 Dmitry Antipov <dmantipov@yandex.ru>
5796
5797 Avoid calls to strlen in miscellaneous functions.
5798 * buffer.c (init_buffer): Use precalculated len, adjust if needed.
5799 * font.c (Ffont_xlfd_name): Likewise. Change to call make_string.
5800 * lread.c (openp): Likewise.
5801
c293e30c
DA
58022012-07-10 Dmitry Antipov <dmantipov@yandex.ru>
5803
5804 Avoid calls to strlen in path processing functions.
5805 * fileio.c (file_name_as_directory): Add comment. Change to add
5806 srclen argument and return the length of result. Adjust users
5807 accordingly.
5808 (directory_file_name): Fix comment. Change to add srclen argument,
14ae4239
BT
5809 swap 1st and 2nd arguments to obey the common convention.
5810 Adjust users accordingly.
c293e30c
DA
5811 * filelock.c (fill_in_lock_file_name): Avoid calls to strlen.
5812
9e059e3f
GM
58132012-07-10 Glenn Morris <rgm@gnu.org>
5814
d02eb359
GM
5815 * s/cygwin.h, s/darwin.h, s/freebsd.h, s/netbsd.h, s/unixware.h:
5816 Move PENDING_OUTPUT_COUNT definition to configure.
5817
882cf227
GM
5818 * s/irix6-5.h (DATA_START, DATA_SEG_BITS):
5819 * s/hpux10-20.h (DATA_SEG_BITS, DATA_START):
5820 * s/gnu.h (DATA_START): Move definitions to configure.
5821
af6e839f
GM
5822 * s/irix6-5.h (SETUP_SLAVE_PTY, PTY_NAME_SPRINTF): Drop ifdef guards.
5823 We include usg5-4-common.h, which defines them both.
5824
40289a12
GM
5825 * s/gnu.h: Don't include fcntl.h (every file in Emacs that uses
5826 O_RDONLY already includes it).
5827
9e059e3f
GM
5828 Stop ns builds setting the EMACSLOADPATH environment variable.
5829 * nsterm.m (ns_load_path): Rename from ns_init_paths.
5830 Now it does not set EMACSLOADPATH, just returns the load-path string.
5831 * nsterm.h: Update accordingly.
5832 * lread.c [HAVE_NS]: Include nsterm.h.
5833 (init_lread) [HAVE_NS]: Use ns_load_path.
5834 * emacs.c (main) [HAVE_NS]: No longer call ns_init_paths.
5835
7c4e8ec0
GM
58362012-07-09 Glenn Morris <rgm@gnu.org>
5837
d4f600ff
GM
5838 * s/gnu.h (SIGNALS_VIA_CHARACTERS): No need to define it here,
5839 since the included bsd-common.h does so.
5840
cbb31951
GM
5841 Stop ns builds setting the EMACSPATH environment variable.
5842 * nsterm.m (ns_exec_path): New function, split from ns_init_paths.
5843 (ns_init_paths): Do not set EMACSPATH.
5844 * nsterm.h (ns_exec_path): Add it.
5845 * callproc.c (init_callproc_1, init_callproc) [HAVE_NS]:
5846 Use ns_exec_path.
5847
7c4e8ec0
GM
5848 * nsterm.m, nsterm.h (ns_etc_directory): Fix type, empty return.
5849
26bccfae
PE
58502012-07-09 Paul Eggert <eggert@cs.ucla.edu>
5851
a0bee46f
PE
5852 * process.c (wait_reading_process_output): 'waitchannels' was unset
5853 when read_kbd || !NILP (wait_for_cell); fix this.
5854
5994c183
PE
5855 Add GCC-style 'const' attribute to functions that can use it.
5856 * character.h (char_resolve_modifier_mask):
5857 * keyboard.h (make_ctrl_char):
5858 * lisp.h (multibyte_char_to_unibyte, multibyte_char_to_unibyte_safe)
5859 (init_character_once, next_almost_prime, init_fns, init_image)
5860 (flush_pending_output, init_sound):
5861 * mem-limits.h (start_of_data):
5862 * menu.h (finish_menu_items):
5863 Add ATTRIBUTE_CONST.
5864 * emacs.c (DEFINE_DUMMY_FUNCTION):
5865 Declare the dummy function with ATTRIBUTE_CONST.
5866 * lisp.h (Fbyteorder, Fmax_char, Fidentity):
5867 Add decls with ATTRIBUTE_CONST.
5868
26bccfae
PE
5869 Minor improvements to make_formatted_string.
5870 * alloc.c (make_formatted_string): Prefer int to ptrdiff_t
5871 where int is good enough, as vsprintf returns an int.
5872 * lisp.h (make_formatted_string): Add ATTRIBUTE_FORMAT_PRINTF.
5873
a8290ec3
DA
58742012-07-09 Dmitry Antipov <dmantipov@yandex.ru>
5875
5876 Use make_formatted_string to avoid double length calculation.
5877 * lisp.h (make_formatted_string): New prototype.
5878 * alloc.c (make_formatted_string): New function.
5879 * buffer.c (Fgenerate_new_buffer_name): Use it.
5880 * dbus.c (syms_of_dbusbind): Likewise.
5881 * editfns.c (Fcurrent_time_zone): Likewise.
5882 * filelock.c (get_boot_time): Likewise.
5883 * frame.c (make_terminal_frame, set_term_frame_name)
5884 (x_report_frame_params): Likewise.
5885 * image.c (gs_load): Likewise.
5886 * minibuf.c (get_minibuffer): Likewise.
5887 * msdos.c (dos_set_window_size): Likewise.
5888 * process.c (make_process): Likewise.
5889 * xdisp.c (ensure_echo_area_buffers): Likewise.
5890 * xsettings.c (apply_xft_settings): Likewise.
5891
d01ba2f1
GM
58922012-07-09 Glenn Morris <rgm@gnu.org>
5893
5894 Stop ns builds polluting the environment with EMACSDATA, EMACSDOC.
5895 * nsterm.m (ns_etc_directory): New function, split from ns_init_paths.
5896 (ns_init_paths): Do not set EMACSDATA, EMACSDOC.
5897 * nsterm.h (ns_etc_directory): Add it.
5898 * callproc.c [HAVE_NS]: Include nsterm.h.
5899 (init_callproc_1, init_callproc) [HAVE_NS]: Use ns_etc_directory.
5900
f1f924b6
DA
59012012-07-09 Dmitry Antipov <dmantipov@yandex.ru>
5902
5903 Move marker debugging code under MARKER_DEBUG.
5904 * marker.c (MARKER_DEBUG): Move marker debugging code under
5905 #ifdef MARKER_DEBUG because byte_char_debug_check is too slow
5906 for bootstrap with --enable-checking (~3x slowdown reported
5907 by Juanma Barranquero <lekktu@gmail.com>).
5908 (verify_bytepos): Move under #ifdef MARKER_DEBUG.
5909
ab531b66
PE
59102012-07-08 Paul Eggert <eggert@cs.ucla.edu>
5911
5912 * systime.h (EMACS_SUB_TIME): Clarify behavior with unsigned time_t.
5913 See <http://bugs.gnu.org/11825#29>.
5914
c4b3bc8a
EZ
59152012-07-08 Eli Zaretskii <eliz@gnu.org>
5916
5917 * xdisp.c (fill_glyphless_glyph_string): If the face of the glyph
5918 has no font, use the frame's font. (Bug#11813)
3434fe8a
EZ
5919 (display_line): Add commentary about displaying truncation glyphs
5920 on GUI frames.
5921 (produce_special_glyphs): Move here from term.c.
5922
5923 * term.c (produce_special_glyphs): Move to xdisp.c.
5924
5925 * dispextern.h (produce_special_glyphs): Move prototype to xdisp.c
5926 section.
c4b3bc8a 5927
b676b881
AS
59282012-07-07 Andreas Schwab <schwab@linux-m68k.org>
5929
f17c5273
AS
5930 * xdisp.c (display_line): Avoid warning about implicit declaration
5931 of FRAME_FONT.
5932
298819b9
AS
5933 * frame.c (get_frame_param): Define only if HAVE_WINDOW_SYSTEM.
5934
b676b881
AS
5935 * lisp.h: Remove empty conditional.
5936
6045c4fd
PE
59372012-07-07 Paul Eggert <eggert@cs.ucla.edu>
5938
b3350bf9
PE
5939 * lread.c (load_path_check): Now static.
5940
6045c4fd
PE
5941 Fix some minor --with-ns problems found by static checking.
5942 * frame.c (Ftool_bar_pixel_width) [!FRAME_TOOLBAR_WIDTH]:
5943 (x_set_font) [!HAVE_X_WINDOWS]:
5944 * image.c (xpm_load_image) [HAVE_NS]:
5945 (x_to_xcolors) [!HAVE_X_WINDOWS && !HAVE_NTGUI]:
5946 (x_disable_image) [!HAVE_NS && !HAVE_NTGUI]:
5947 Remove unused local.
5948 (Fx_parse_geometry) [HAVE_NS]: Don't return garbage.
5949 (xpm_load_image) [HAVE_NS && !HAVE_XPM]: Remove unused label.
5950 * image.c (x_create_bitmap_from_file) [HAVE_NS]:
5951 (xpm_load_image, xpm_load) [HAVE_NS && !HAVE_XPM]:
5952 * nsselect.m (symbol_to_nsstring, ns_string_to_pasteboard_internal):
5953 * xfaces.c (Fx_load_color_file) [!HAVE_X_WINDOWS]:
5954 Fix pointer signedness problem.
5955 * xfaces.c (FRAME_X_FONT_TABLE):
5956 * xterm.h (FRAME_X_FONT_TABLE): Remove unused, incompatible macros.
5957
929e7845
GM
59582012-07-07 Glenn Morris <rgm@gnu.org>
5959
5960 * lread.c (load_path_check): New function, split from init_lread.
5961 (init_lread): Reorganize. Motivation:
5962 If EMACSLOADPATH is set, check/warn about that rather than the
5963 defaults, which we are not going to use. Hence we can remove
5964 the turn_off_warning and WINDOWSNT || HAVE_NS tests.
5965 Don't warn if site-lisp directories are missing.
5966 If not installed, start from a blank load-path, since
5967 PATH_LOADSEARCH refers to the eventual installation directories.
5968
58dd0aa4
EZ
59692012-07-07 Eli Zaretskii <eliz@gnu.org>
5970
5971 Support truncation and continuation glyphs on GUI frames, when
5972 fringes are disabled. (Bug#11832)
5973 * xdisp.c (init_iterator): Get dimensions of truncation and
14ae4239
BT
5974 continuation glyphs even if on GUI frames.
5975 Adjust it->last_visible_x on GUI frames when the left or right fringes,
58dd0aa4
EZ
5976 or both, are absent.
5977 (start_display, move_it_in_display_line_to): Handle the case of a
5978 GUI frame without a fringe to display continuation or truncation
5979 glyphs.
5980 (insert_left_trunc_glyphs): Support GUI frames: make sure
5981 truncation glyphs overwrite enough glyphs from the current line to
5982 have sufficient space in pixels.
5983 (display_line): Support truncation and continuation glyphs on GUI
5984 frames. If some spare pixels are left on the line after inserting
5985 the truncation glyphs, fill that space with a stretch glyph of a
5986 suitably computed width.
5987
5988 * term.c (produce_special_glyphs): Call PRODUCE_GLYPHS, not
5989 produce_glyphs, to support GUI sessions.
5990
31571fd7
PE
59912012-07-07 Paul Eggert <eggert@cs.ucla.edu>
5992
5a16b9bc
PE
5993 * sysdep.c (ULLONG_MAX): Define if not already defined (Bug#11781).
5994
f3047c75
PE
5995 * sysdep.c (list_system_processes): Port to NetBSD-current (Bug#11797).
5996
31571fd7
PE
5997 Do not require float-time's arg to fit in time_t (Bug#11825).
5998 This works better on hosts where time_t is unsigned, and where
5999 float-time is applied to the (negative) difference between two times.
6000 * editfns.c (decode_time_components): Last arg is now double *,
6001 not int *, and means to store all the result as a double, without
6002 worrying about whether the seconds part fits in time_t.
6003 All callers changed.
6004 (lisp_time_argument): Remove last int * arg, as it's no longer needed.
6005 All callers changed.
6006 (Ffloat_time): Do not fail merely because the specified time falls
6007 outside of time_t range.
6008
4516fbef
GM
60092012-07-07 Glenn Morris <rgm@gnu.org>
6010
6011 * s/darwin.h (HAVE_RES_INIT, HAVE_LIBRESOLV):
6012 * s/hpux10-20.h (HAVE_RINT, HAVE_RANDOM):
6013 * s/unixware.h (HAVE_GETWD): Move undefs to configure (effectively).
6014
07adc2c6
JB
60152012-07-07 Juanma Barranquero <lekktu@gmail.com>
6016
6017 * makefile.w32-in (DISPEXTERN_H, $(BLD)/regex.$(O)):
6018 Update dependencies.
6019
6020 * s/ms-w32.h [_MSC_VER]: Remove strcasecmp, strncasecmp.
6021
fd573f31
PE
60222012-07-06 Paul Eggert <eggert@cs.ucla.edu>
6023
fee5959d
PE
6024 Use c_strcasecmp for ASCII case-insensitive comparison (Bug#11786).
6025 * dispextern.h, nsfns.m, nsterm.m: Include <c-strcase.h>.
6026 * dispextern.h (xstrcasecmp): Rewrite using c_strcasecmp.
6027 * nsfns.m (x_get_string_resource): Use c_strncasecmp, not strncasecmp.
6028 * nsterm.m (ns_default): Use c_strcasecmp, not strcasecmp.
6029 * xfaces.c (xstrcasecmp) [!HAVE_STRCASECMP]: Remove.
6030
fd573f31
PE
6031 * xfont.c (compare_font_names): Redo to omit the need for casts.
6032
ddadbc0e
AS
60332012-07-06 Andreas Schwab <schwab@linux-m68k.org>
6034
fca8d6b6
AS
6035 * xfns.c (Fx_change_window_property): Doc fix.
6036 * w32fns.c (Fx_change_window_property): Doc fix.
6037
ddadbc0e
AS
6038 * w32fns.c (Fx_window_property): Accept the same arguments as the
6039 X Windows version. Doc fix.
6040 * xfns.c (Fx_window_property): Doc fix. (Bug#11870)
6041
ed9265fc 60422012-07-06 Juanma Barranquero <lekktu@gmail.com>
f247498e
JB
6043 Eli Zaretskii <eliz@gnu.org>
6044
6045 * s/ms-w32.h: Settings not specific to Windows moved to nt/config.nt.
6046 Windows-specific code from nt/config.nt moved here.
6047 Obsolete settings removed.
6048
216ee680
PE
60492012-07-06 Paul Eggert <eggert@cs.ucla.edu>
6050
6051 * process.c: Avoid unnecessary calls to gettime.
6052 (wait_reading_process_output): Don't get the time of day
6053 when gobbling data immediately and not waiting, as there's no need
6054 for it in that case. This removes a FIXME.
6055
bdd091e4
JD
60562012-07-06 Jan Djärv <jan.h.d@swipnet.se>
6057
6058 * gtkutil.c (xg_event_is_for_scrollbar): Assign gwin when HAVE_GTK3
6059 is defined (Bug#11768).
6060
9d44f8ce
DA
60612012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
6062
6063 Fix marker debugging code.
6064 * marker.c (byte_char_debug_check): Do not perform the check
6065 if buffer is not multibyte.
090bd7cb
JB
6066 (buf_charpos_to_bytepos, buf_bytepos_to_charpos):
6067 Call byte_char_debug_check with correct arguments.
9d44f8ce 6068
90fc4786
DA
60692012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
6070
6071 Compile marker debugging code only if ENABLE_CHECKING is defined.
090bd7cb
JB
6072 * marker.c (byte_char_debug_check, count_markers):
6073 Use only if ENABLE_CHECKING is defined.
90fc4786
DA
6074 (byte_debug_flag): Remove.
6075 (CONSIDER, buf_charpos_to_bytepos, buf_bytepos_to_charpos):
6076 Always call byte_char_debug_check if ENABLE_CHECKING is defined.
6077
7b7ae965
DA
60782012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
6079
4e57b342
DA
6080 Avoid code repetition in marker-related functions.
6081 * marker.c (attach_marker): New function.
6082 (Fset_marker, set_marker_restricted, set_marker_both)
6083 (set_marker_restricted_both): Use it.
6084 (Fset_marker, set_marker_restricted, Fbuffer_has_markers_at):
6085 Consistently rename charno to charpos.
6086 (marker_position): Add eassert.
6087 (marker_byte_position): Convert to eassert.
6088
60892012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
6090
6091 Simplify list operations in unchain_overlay and unchain_marker.
7b7ae965 6092 * buffer.c (unchain_overlay): Simplify. Add comment.
4e57b342 6093 * marker.c (unchain_marker): Simplify. Fix comments.
7b7ae965 6094
657924ff
DA
60952012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
6096
6097 Introduce fast path for the widely used marker operation.
6098 * alloc.c (build_marker): New function.
6099 * lisp.h (build_marker): New prototype.
6100 * buffer.c (clone_per_buffer_values, Fmake_indirect_buffer): Use it.
6101 * composite.c (autocmp_chars): Likewise.
6102 * editfns.c (buildmark): Remove.
6103 (Fpoint_marker, Fpoint_min_marker, Fpoint_max_marker)
6104 (save_restriction_save): Use build_marker.
6105 * marker.c (buf_charpos_to_bytepos, buf_bytepos_to_charpos): Likewise.
6106 * window.c (save_window_save): Likewise.
6107
041a49a6
DA
61082012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
6109
6110 Do not use Fdelete_overlay in delete_all_overlays
6111 to avoid redundant calls to unchain_overlay.
6112 * buffer.c (drop_overlay): New function.
6113 (delete_all_overlays, Fdelete_overlay): Use it.
6114 * minibuf.c (get_minibuffer): Fix comment.
6115
7dca65a4
PE
61162012-07-06 Paul Eggert <eggert@cs.ucla.edu>
6117
6118 Port to OpenBSD 5.1 amd64.
6119 * sysdep.c [BSD_SYSTEM]: Include <sys/param.h> before <sys/sysctl.h>.
6120 This is needed for OpenBSD, and should be harmless on all BSD systems.
6121 Also, include <sys/sysctl.h>, as it should be available on all
6122 BSD_SYSTEM hosts given that we're already calling sysctl in that case.
6123 (list_system_processes) [__OpenBSD__]: Use DARWIN_OS style mib, but
6124 use p_pid member, not kp_proc.pid.
6125
8eb876e2
GM
61262012-07-06 Glenn Morris <rgm@gnu.org>
6127
6128 * Makefile.in (emacs$(EXEEXT)): Don't check for load-path shadows.
6129
38182d90
PE
61302012-07-05 Paul Eggert <eggert@cs.ucla.edu>
6131
6132 More xmalloc and related cleanup.
6133 * alloc.c, bidi.c, buffer.c, buffer.h, bytecode.c, callint.c:
6134 * callproc.c, charset.c, coding.c, composite.c, data.c, dispnew.c:
6135 * doc.c, editfns.c, emacs.c, eval.c, fileio.c, filelock.c, fns.c:
6136 * font.c, fontset.c, frame.c, fringe.c, ftfont.c, ftxfont.c, gmalloc.c:
6137 * gtkutil.c, image.c, keyboard.c, keymap.c, lread.c, macros.c, menu.c:
6138 * nsfns.m, nsfont.m, nsmenu.m, nsterm.m, print.c, process.c, ralloc.c:
6139 * regex.c, region-cache.c, scroll.c, search.c, sound.c, syntax.c:
6140 * sysdep.c, term.c, termcap.c, unexmacosx.c, window.c, xdisp.c:
6141 * xfaces.c, xfns.c, xftfont.c, xgselect.c, xmenu.c, xrdb.c, xselect.c:
6142 * xterm.c:
6143 Omit needless casts involving void * pointers and allocation.
6144 Prefer "P = xmalloc (sizeof *P)" to "P = xmalloc (sizeof (TYPE_OF_P))",
6145 as the former is more robust if P's type is changed.
6146 Prefer xzalloc to xmalloc + memset 0.
6147 Simplify malloc-or-realloc to realloc.
6148 Don't worry about xmalloc returning a null pointer.
6149 Prefer xstrdup to xmalloc + strcpy.
6150 * editfns.c (Fmessage_box): Grow message_text by at least 80 when
6151 growing it.
6152 * keyboard.c (apply_modifiers_uncached): Prefer local array to
6153 alloca of a constant.
6154
6dd5a677
EZ
61552012-07-05 Eli Zaretskii <eliz@gnu.org>
6156
6157 * xdisp.c (display_line): Fix horizontal pixel coordinates when
6158 hscroll is larger than the line width. Fixes long and futile
6159 looping inside extend_face_to_end_of_line (on a TTY) producing
6160 glyphs that are not needed and thrown away.
6161
6b312f0f
DA
61622012-07-05 Dmitry Antipov <dmantipov@yandex.ru>
6163
6164 * marker.c (set_marker_restricted_both): Simplify by using
6165 clip_to_bounds.
6166
f520ef9b
PE
61672012-07-05 Paul Eggert <eggert@cs.ucla.edu>
6168
6169 * editfns.c (region_limit): Simplify by using clip_to_bounds.
6170
383b7c95
JD
61712012-07-05 Jan Djärv <jan.h.d@swipnet.se>
6172
6173 * gtkutil.c (gtk_scrollbar_new, gtk_box_new): Define when HAVE_GTK3 is
6174 not defined (Bug#11768).
6175 (xg_create_frame_widgets): Use gtk_plug_new_for_display (Bug#11768).
6176 (xg_create_frame_widgets, create_dialog, xg_get_file_with_chooser)
6177 (make_widget_for_menu_item, xg_make_tool_item): Use gtk_box_new
6178 followed by gtk_box_set_homogeneous (Bug#11768).
6179 (xg_update_menu_item): Use GTK_IS_BOX (Bug#11768).
090bd7cb
JB
6180 (update_theme_scrollbar_width, xg_create_scroll_bar):
6181 Use gtk_scrollbar_new (Bug#11768).
383b7c95
JD
6182 (xg_event_is_for_scrollbar): Use Gdk Device functions for HAVE_GTK3.
6183 (is_box_type): New function (Bug#11768).
6184 (xg_tool_item_stale_p): Call is_box_type.
5293d758 6185 (xg_initialize): Get settings by calling gtk_settings_get_for_screen
383b7c95
JD
6186 with default display (Bug#11768).
6187
d6e7bf45
EZ
61882012-07-05 Eli Zaretskii <eliz@gnu.org>
6189
6190 * xdisp.c (window_hscroll_limited): New function.
6191 (pos_visible_p, init_iterator): Use it to avoid overflow of pixel
6192 coordinates when window's hscroll is set to insanely large
6193 values. (Bug#11857)
6194
431391ec
JB
61952012-07-05 Juanma Barranquero <lekktu@gmail.com>
6196
6197 * makefile.w32-in ($(BLD)/dired.$(O), $(BLD)/fileio.$(O)): Fix typo.
6198 ($(BLD)/terminal.$(O), $(BLD)/syntax.$(O)): Update dependencies.
6199
23f86fce
DA
62002012-07-05 Dmitry Antipov <dmantipov@yandex.ru>
6201
6202 Cleanup xmalloc.
6203 * lisp.h (xzalloc): New prototype. Omit needless casts.
6204 * alloc.c (xzalloc): New function. Omit needless casts.
6205 * charset.c: Omit needless casts. Convert all calls to
6206 xmalloc with following memset to xzalloc.
6207 * dispnew.c: Likewise.
6208 * fringe.c: Likewise.
6209 * image.c: Likewise.
6210 * sound.c: Likewise.
6211 * term.c: Likewise.
6212 * w32fns.c: Likewise.
6213 * w32font.c: Likewise.
6214 * w32term.c: Likewise.
6215 * xfaces.c: Likewise.
6216 * xfns.c: Likewise.
6217 * xterm.c: Likewise.
6218 * atimer.c: Omit needless casts.
6219 * buffer.c: Likewise.
6220 * callproc.c: Likewise.
6221 * ccl.c: Likewise.
6222 * coding.c: Likewise.
6223 * composite.c: Likewise.
6224 * doc.c: Likewise.
6225 * doprnt.c: Likewise.
6226 * editfns.c: Likewise.
6227 * emacs.c: Likewise.
6228 * eval.c: Likewise.
6229 * filelock.c: Likewise.
6230 * fns.c: Likewise.
6231 * gtkutil.c: Likewise.
6232 * keyboard.c: Likewise.
6233 * lisp.h: Likewise.
6234 * lread.c: Likewise.
6235 * minibuf.c: Likewise.
6236 * msdos.c: Likewise.
6237 * print.c: Likewise.
6238 * process.c: Likewise.
6239 * region-cache.c: Likewise.
6240 * search.c: Likewise.
6241 * sysdep.c: Likewise.
6242 * termcap.c: Likewise.
6243 * terminal.c: Likewise.
6244 * tparam.c: Likewise.
6245 * w16select.c: Likewise.
6246 * w32.c: Likewise.
6247 * w32reg.c: Likewise.
6248 * w32select.c: Likewise.
6249 * w32uniscribe.c: Likewise.
6250 * widget.c: Likewise.
6251 * xdisp.c: Likewise.
6252 * xmenu.c: Likewise.
6253 * xrdb.c: Likewise.
6254 * xselect.c: Likewise.
6255
0497dc44
PE
62562012-07-05 Paul Eggert <eggert@cs.ucla.edu>
6257
6258 * fileio.c (time_error_value): Check the right error number.
6259 Problem reported by Troels Nielsen in
6260 <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00095.html>.
6261
356e7178
PE
62622012-07-04 Paul Eggert <eggert@cs.ucla.edu>
6263
4e71fd89
PE
6264 * window.c (set_window_hscroll): Revert the 100000 hscroll limit.
6265 This should be fixed in a better way; see Eli Zaretskii in
6266 <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00088.html>.
6267 (HSCROLL_MAX): Remove; this is now internal to set_window_hscroll.
6268
f0941253
PE
6269 * fileio.c (time_error_value): Rename from special_mtime.
6270 The old name's problems were noted by Eli Zaretskii in
6271 <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00087.html>.
6272
065c9eb4
PE
6273 * emacs.c (gdb_pvec_type): Change it back to enum pvec_type.
6274 This variable's comment says Emacs needs at least one GDB-visible
6275 symbol of type enum pvec_type, to work around GDB problems.
6276 The symbol's value doesn't matter.
6277
356e7178
PE
6278 * alloc.c (PSEUDOVECTOR_NBYTES): Remove stray ';'
6279 that causes compilation to fail on pre-C99 compilers.
6280
ed9265fc 62812012-07-04 Juanma Barranquero <lekktu@gmail.com>
95f61aa2
JB
6282
6283 * s/ms-w32.h (LISP_FLOAT_TYPE, HAVE_MEMCMP, HAVE_MEMCPY)
6284 (HAVE_MEMMOVE, HAVE_MEMSET): Don't set, obsolete.
6285
3884d954
DA
62862012-07-04 Dmitry Antipov <dmantipov@yandex.ru>
6287
d209e2fb 6288 * buffer.c (init_buffer_once): Fix initialization of
3884d954
DA
6289 headers for buffer_defaults and buffer_local_symbols.
6290 Reported by Juanma Barranquero <lekktu@gmail.com>.
6291
ee28be33
SM
62922012-07-04 Stefan Monnier <monnier@iro.umontreal.ca>
6293
6294 Turn VECTOR_FREE_LIST_FLAG into PVEC_FREE.
6295 * lisp.h (enum pvec_type): Use fewer bits.
6296 (PSEUDOVECTOR_SIZE_BITS): New constant.
6297 (PSEUDOVECTOR_SIZE_MASK, PVEC_TYPE_MASK): Use it.
6298 (XSETPVECTYPESIZE, XSETTYPED_PSEUDOVECTOR, DEFUN): Adapt code to
6299 change in pvec_type.
6300 (PSEUDOVECTOR_TYPEP): New macro.
6301 (TYPED_PSEUDOVECTORP): Use it.
6302 * fns.c (internal_equal): Adapt code to extract pvectype.
6303 * emacs.c (gdb_pvec_type): Update type.
6304 * alloc.c (PSEUDOVECTOR_NBYTES): New macro.
6305 (VECTOR_FREE_LIST_SIZE_MASK): Remove (=> PSEUDOVECTOR_SIZE_MASK).
6306 (VECTOR_FREE_LIST_FLAG): Remove (=> PVEC_FREE).
6307 (SETUP_ON_FREE_LIST): Use XSETPVECTYPESIZE.
6308 (sweep_vectors): Use it. Use local var `total_bytes' instead of
6309 abusing vector->header.next.nbytes.
6310 (live_vector_p): Use PVEC_TYPE.
6311 (mark_object): Adapt code to extract pvectype. Use switch.
6312
c7f2cd7f
PE
63132012-07-04 Paul Eggert <eggert@cs.ucla.edu>
6314
6315 * doprnt.c (doprnt): Don't assume string length fits in 'int'.
6316 Tighten new eassert a bit.
6317
8ce70ed2
DA
63182012-07-04 Dmitry Antipov <dmantipov@yandex.ru>
6319
6320 Fix compilation with --enable-gcc-warnings and -O1
6321 optimization level.
6322 * doprnt.c (doprnt): Change type of tem to int, initialize
6323 to avoid compiler warning. Add eassert.
6324 * search.c (simple_search): Initialize match_byte to avoid
6325 compiler warning. Add eassert.
6326
dea7f1e5
PE
63272012-07-04 Paul Eggert <eggert@cs.ucla.edu>
6328
24a212eb
PE
6329 Avoid weird behavior with large horizontal scrolls.
6330 Without this change, for example, large hscroll values would
6331 mess up Emacs's display on Fedora 15 x86, presumably due to
6332 overflows in int calculations in the display code.
6333 Also, if buffers had long lines, Emacs would freeze.
6334 * window.c (HSCROLL_MAX): Reduce to 100000, and make it visible to GDB.
6335 (set_window_hscroll): New function, containing the old guts of
6336 Fset_window_hscroll. Return the clipped value.
6337 (Fset_window_hscroll, Fscroll_left, Fscroll_right): Use it.
6338 This avoids the need to check against PTRDIFF_MAX.
6339
dea7f1e5
PE
6340 * buffer.c (Fgenerate_new_buffer_name): Fix sprintf format mismatch.
6341
76046526
DA
63422012-07-04 Dmitry Antipov <dmantipov@yandex.ru>
6343
6344 * buffer.c (Fgenerate_new_buffer_name): Fix type mismatch.
6345
39adff0d
PE
63462012-07-04 Paul Eggert <eggert@cs.ucla.edu>
6347
63807d47
PE
6348 * regex.c: Suppress GCC warning on RHEL 6. (Bug#11207)
6349 Conditionalize the pragmas on GCC 4.5 or later, not GCC 4.3 or later,
6350 since GCC 4.4.6 issues a bogus warning for them.
6351
39adff0d
PE
6352 Fix bugs in file timestamp newness comparisons.
6353 * fileio.c (Ffile_newer_than_file_p):
6354 * lread.c (Fload): Use full timestamp resolution of files,
6355 not just the 1-second resolution, so that files that are only
6356 slightly newer still count as newer.
6357 * fileio.c (Ffile_newer_than_file_p): Don't assume file
6358 timestamps fit in 'int'; this fixes a Y2038 bug on most hosts.
6359
dbeed9a6
PE
63602012-07-03 Paul Eggert <eggert@cs.ucla.edu>
6361
6362 * fileio.c: Improve handling of file time marker. (Bug#11852)
6363 (special_mtime): New function.
6364 (Finsert_file_contents, Fverify_visited_file_modtime):
6365 Use it to set special mtime values consistently.
6366
636334d6
AS
63672012-07-03 Andreas Schwab <schwab@linux-m68k.org>
6368
6369 * fileio.c (Finsert_file_contents): Properly handle st_mtime
6370 marker for non-existing file. (Bug#11852)
6371
e2017fe2
GM
63722012-07-03 Glenn Morris <rgm@gnu.org>
6373
6374 * lisp.h (Fread_file_name): Restore EXFUN (it's not a normal DEFUN
6375 and did not make it into globals.h).
6376
404dbd37
TT
63772012-07-03 Tom Tromey <tromey@redhat.com>
6378
6379 * window.c (Fset_window_margins, Fset_window_fringes)
6380 (Fset_window_scroll_bars, Fset_window_vscroll): No longer static.
6381 * textprop.c (Fprevious_property_change): No longer static.
6382 * syntax.c (Fsyntax_table_p): No longer static.
6383 * process.c (Fget_process, Fprocess_datagram_address): No longer
6384 static.
6385 * keymap.c (Flookup_key, Fcopy_keymap): No longer static.
6386 * keyboard.c (Fcommand_execute): No longer static.
6387 Remove EXFUN.
6388 * insdel.c (Fcombine_after_change_execute): No longer static.
6389 * image.c (Finit_image_library): No longer static.
6390 * fileio.c (Fmake_symbolic_link): No longer static.
6391 * eval.c (Ffetch_bytecode): No longer static.
6392 * editfns.c (Fuser_full_name): No longer static.
d209e2fb
JB
6393 * doc.c (Fdocumentation_property, Fsnarf_documentation):
6394 No longer static.
404dbd37
TT
6395 * buffer.c (Fset_buffer_major_mode, Fdelete_overlay): No longer
6396 static.
6397 * dired.c (Ffile_attributes): No longer static.
6398 * composite.c (Fcomposition_get_gstring): No longer static.
6399 * callproc.c (Fgetenv_internal): No longer static.
6400
6401 * ccl.h: Remove EXFUNs.
6402 * buffer.h: Remove EXFUNs.
6403 * dispextern.h: Remove EXFUNs.
6404 * intervals.h: Remove EXFUNs.
6405 * fontset.h: Remove EXFUN.
6406 * font.h: Remove EXFUNs.
6407 * dosfns.c (system_process_attributes): Remove EXFUN.
6408 * keymap.h: Remove EXFUNs.
6409 * lisp.h: Remove EXFUNs.
6410 * w32term.h: Remove EXFUNs.
6411 * window.h: Remove EXFUNs.
6412 * xsettings.h: Remove EXFUN.
6413 * xterm.h: Remove EXFUN.
6414
8e4fd1e1
GM
64152012-07-03 Glenn Morris <rgm@gnu.org>
6416
6417 * lisp.h (Frandom): Make it visible to C.
6418 * buffer.c (Fgenerate_new_buffer_name): Speed up finding a new
6419 buffer for invisible buffers. (Bug#1229)
6420
ca95b3eb
DA
64212012-07-03 Dmitry Antipov <dmantipov@yandex.ru>
6422
6423 Fix block vector allocation code to allow VECTOR_BLOCK_SIZE
6424 values which aren't power of 2.
14ae4239 6425 * alloc.c (VECTOR_FREE_LIST_SIZE_MASK): New macro.
1f9f395d 6426 Verify its value and the value of VECTOR_BLOCK_SIZE. Adjust users
ca95b3eb
DA
6427 accordingly.
6428
7555c33f
SM
64292012-07-03 Stefan Monnier <monnier@iro.umontreal.ca>
6430
6431 * lisp.h (Lisp_Misc, Lisp_Fwd): Move around to group better.
6432
6433 * alloc.c (mark_object): Revert part of last patch to use `switch'.
6434
d12e8f5a
DA
64352012-07-03 Dmitry Antipov <dmantipov@yandex.ru>
6436
6437 * alloc.c (allocate_vector_block): Remove redundant
6438 calls to mallopt if DOUG_LEA_MALLOC is defined.
6439 (allocate_vectorlike): If DOUG_LEA_MALLOC is defined,
6440 avoid calls to mallopt if zero_vector is returned.
6441
296094c3
DA
64422012-07-03 Dmitry Antipov <dmantipov@yandex.ru>
6443
6444 * alloc.c (check_string_bytes): If GC_CHECK_STRING_BYTES
6445 is enabled, avoid dereferencing NULL current_sblock if
6446 running undumped.
6447
36429c89
DA
64482012-07-03 Dmitry Antipov <dmantipov@yandex.ru>
6449
6450 Cleanup basic buffer management.
6451 * buffer.h (struct buffer): Change layout to use generic vector
6452 marking code. Fix some comments. Change type of 'clip_changed'
6453 to bitfield. Remove unused #ifndef old.
6454 (FIRST_FIELD_PER_BUFFER, LAST_FIELD_PER_BUFFER): Remove.
6455 (GET_OVERLAYS_AT): Fix indentation.
6456 (for_each_per_buffer_object_at): New macro.
6457 * buffer.c (clone_per_buffer_values, reset_buffer_local_variables)
6458 (Fbuffer_local_variables): Use it.
6459 (init_buffer_once, syms_of_buffer): Remove unused #ifndef old.
6460 * alloc.c (allocate_buffer): Adjust to match new layout of
6461 struct buffer. Fix comment.
6462 (mark_overlay): New function.
6463 (mark_buffer): Use it. Use mark_vectorlike to mark normal
6464 Lisp area of struct buffer.
6465 (mark_object): Use it. Adjust marking of misc objects
6466 and related comments.
6467
3b3e4cac
PE
64682012-07-02 Paul Eggert <eggert@cs.ucla.edu>
6469
6470 * alloc.c (mark_object): Remove "#ifdef GC_CHECK_MARKED_OBJECTS"
6471 wrapper that is not needed because the wrapped code is a no-op (zero
6472 machine instructions) when GC_CHECK_MARKED_OBJECTS is not defined.
6473 This avoids a -Wunused-macros diagnostic with GCC 4.7.1 x86-64.
6474
cf5c0175
DA
64752012-07-02 Dmitry Antipov <dmantipov@yandex.ru>
6476
6477 * alloc.c (mark_buffer): Simplify. Remove prototype.
6478 (mark_object): Add comment. Reorganize marking of vector-like
faf611c7 6479 objects. Use CHECK_LIVE for all vector-like objects except buffers
14ae4239
BT
6480 and subroutines when GC_CHECK_MARKED_OBJECTS is defined.
6481 Avoid redundant calls to mark_vectorlike for bool vectors.
cf5c0175 6482
ca26824c
GM
64832012-06-30 Glenn Morris <rgm@gnu.org>
6484
2e4c5312
GM
6485 * nsterm.m (ns_init_paths): Ignore site-lisp if --no-site-lisp.
6486
ca26824c
GM
6487 * epaths.in (PATH_SITELOADSEARCH): New.
6488 * lread.c (init_lread): Use PATH_SITELOADSEARCH.
6489 This is rather than relying on --enable-locallisppath elements
6490 having "site-lisp" in their names. (Bug#10208#25, 11658)
6491
0d23c240
EZ
64922012-06-30 Eli Zaretskii <eliz@gnu.org>
6493
c9240d7a
EZ
6494 * w32proc.c (sys_select): Accept and ignore one more argument.
6495
6496 * w32.c (emacs_gnutls_pull): Call select with one more argument.
6497
0d23c240 6498 * sysselect.h [DOS_NT]: Don't include sys/select.h.
9ff8f76b 6499 (pselect) [!MS_DOS]: Redirect to sys_select.
0d23c240
EZ
6500
6501 * sysdep.c: Don't include dos.h and dosfns.h.
6502
6503 * process.c (sys_select):
6504 * msdos.c (sys_select): Accept one more argument and ignore it.
6505
6506 * msdos.c (event_timestamp, sys_select): Use gnulib's gettime;
6507 adapt data types and code to that.
6508
6509 * dosfns.c:
6510 * msdos.c (gettime, settime): Define away the prototypes in dos.h,
6511 which clashes with the gnulib function of the same name.
6512
af5a5a98
AS
65132012-06-30 Andreas Schwab <schwab@linux-m68k.org>
6514
c5e4379c
AS
6515 * font.c (font_style_to_value, font_style_symbolic)
6516 (font_prop_validate_style): Add type checks for values in
6517 font_style_table.
6518
af5a5a98
AS
6519 * lisp.h (CHECK_RANGED_INTEGER): Make value to check the first
6520 argument.
6521 * character.c, charset.c, menu.c, process.c, window.c: Adjust all
6522 uses.
6523
8d38f461
EZ
65242012-06-29 Eli Zaretskii <eliz@gnu.org>
6525
2e5a6631
EZ
6526 * xdisp.c (try_window_id): Undo last change.
6527
8d38f461
EZ
6528 * w32.c (getwd): Adjust commentary about startup_dir.
6529 (init_environment): Always call sys_access, even in non-MSVC
6530 builds. Don't chdir to the directory of the Emacs executable.
6531 This undoes code from 1997 which was justified by the need to
6532 "avoid conflicts when removing and renaming directories". But its
6533 downside was that every relative file name was being interpreted
6534 relative to the directory of the Emacs executable, which can never
6535 be TRT. In particular, it broke sys_access when called with
6536 relative file names.
6537 (sys_access): Map GetLastError to errno.
6538
2af3565e
DA
65392012-06-29 Dmitry Antipov <dmantipov@yandex.ru>
6540
6541 * window.h (struct window): Change type of 'fringes_outside_margins'
6542 to bitfield. Fix comment. Adjust users accordingly.
cf5c0175 6543 (struct window): Change type of 'window_end_bytepos' to ptrdiff_t.
2af3565e
DA
6544 Adjust comment.
6545 * xdisp.c (try_window_id): Change type of 'first_vpos' and 'vpos'
6546 to ptrdiff_t.
6547
c8d3a25c 65482012-06-29 Andreas Schwab <schwab@linux-m68k.org>
57570cd3 6549
c8d3a25c
GM
6550 * gnutls.c (emacs_gnutls_handshake):
6551 Add QUIT to make the loop interruptible.
57570cd3 6552
c8d3a25c 65532012-06-29 Glenn Morris <rgm@gnu.org>
d01fd55f 6554
c8d3a25c
GM
6555 * charset.c (init_charset): Make lack of etc/charsets fatal.
6556
3e984ee8
DA
65572012-06-29 Dmitry Antipov <dmantipov@yandex.ru>
6558
6559 * editfns.c (region_limit): Fix type mismatch.
6560
ef884f23
DA
65612012-06-29 Dmitry Antipov <dmantipov@yandex.ru>
6562
6563 * nsfns.m: Fix GLYPH_DEBUG usage assuming that it may be
6564 undefined. Convert from xassert to eassert.
6565 * nsmenu.m: Convert from xassert to eassert.
6566 * nsterm.m: Likewise.
6567
7d7e0027
SM
65682012-06-28 Stefan Monnier <monnier@iro.umontreal.ca>
6569
6570 * editfns.c (region_limit): Clip to narrowing (bug#11770).
6571
aa754e6a
PE
65722012-06-28 Paul Eggert <eggert@cs.ucla.edu>
6573
6574 Avoid integer overflow on scroll-left and scroll-right.
6575 * window.c (HSCROLL_MAX): New macro.
6576 (Fscroll_left, Fscroll_right): Avoid undefined behavior on integer
6577 overflow when requested scroll falls outside ptrdiff_t range.
6578
80b00b08
DA
65792012-06-28 Dmitry Antipov <dmantipov@yandex.ru>
6580
6581 * window.h (struct window): Change type of 'hscroll',
6582 'min_hscroll' and 'last_point' from Lisp_Object to ptrdiff_t,
6583 'last_modified' and 'last_overlay_modified' to EMACS_INT.
6584 Adjust users accordingly.
6585 * xdisp.c (try_cursor_movement): Replace type check with eassert.
6586 * window.c (Fscroll_left, Fscroll_right): Change type of 'hscroll'
6587 from EMACS_INT to ptrdiff_t.
6588 (make_window): Omit redundant initialization.
6589
62b2bcf6
JB
65902012-06-28 Juanma Barranquero <lekktu@gmail.com>
6591
6592 * makefile.w32-in ($(BLD)/regex.$(O)): Update dependencies.
6593
45942c7d
DA
65942012-06-28 Dmitry Antipov <dmantipov@yandex.ru>
6595
6596 * window.h (struct window): Change type of 'use_time' and
6597 'sequence_number' from Lisp_Object to int.
6598 * frame.c (make_frame): Adjust users accordingly.
6599 * print.c (print_object): Likewise.
6600 * window.c (select_window, Fwindow_use_time, make_parent_window)
6601 (make_window): Likewise.
6602
e509cfa6
DA
66032012-06-28 Dmitry Antipov <dmantipov@yandex.ru>
6604
6605 * dispextern.h (GLYPH_DEBUG): Now defined in config.h if
6606 enabled with --enable-checking=[all,glyphs] configure option.
6607 Fix GLYPH_DEBUG usage assuming that it may be undefined,
6608 adjust comments accordingly.
6609 * dispnew.c: Fix GLYPH_DEBUG usage assuming that it may be
6610 undefined, adjust comments accordingly.
6611 * image.c: Likewise.
6612 * scroll.c: Likewise.
6613 * w32fns.c: Likewise.
6614 * w32term.c: Likewise.
6615 * xdisp.c: Likewise.
6616 * xfaces.c: Likewise.
6617 * xfns.c: Likewise.
6618 * xterm.c: Likewise.
6619
a54e2c05
DA
66202012-06-28 Dmitry Antipov <dmantipov@yandex.ru>
6621
6622 Generalize run-time debugging checks.
6623 * dispextern.h (XASSERTS): Remove.
6624 * fontset.c (xassert): Remove.
6625 Convert from xassert to eassert.
6626 * alloc.c: Convert from xassert to eassert.
6627 * bidi.c: Likewise.
6628 * dispnew.c: Likewise.
6629 * fns.c: Likewise.
6630 * fringe.c: Likewise.
6631 * ftfont.c: Likewise.
6632 * gtkutil.c: Likewise.
6633 * image.c: Likewise.
6634 * keyboard.c: Likewise.
6635 * menu.c: Likewise.
6636 * process.c: Likewise.
6637 * scroll.c: Likewise.
6638 * sound.c: Likewise.
6639 * term.c: Likewise.
6640 * w32console.c: Likewise.
6641 * w32fns.c: Likewise.
6642 * w32term.c: Likewise.
6643 * window.c: Likewise.
6644 * xdisp.c: Likewise.
6645 * xfaces.c: Likewise.
6646 * xfns.c: Likewise.
6647 * xselect.c: Likewise.
6648 * xterm.c: Likewise.
6649
1ec4b7b2
SM
66502012-06-27 Stefan Monnier <monnier@iro.umontreal.ca>
6651
6652 * fns.c (maybe_resize_hash_table): Output message when growing the
6653 purify-hashtable.
6654
2014308a
DA
66552012-06-27 Dmitry Antipov <dmantipov@yandex.ru>
6656
6657 * alloc.c (allocate_string_data): Remove dead code.
6658 * xsettings.c (XSETTINGS_FONT_NAME): Move under HAVE_XFT to
6659 avoid GCC warning about unused macro.
6660
246155eb
DA
66612012-06-27 Dmitry Antipov <dmantipov@yandex.ru>
6662
6663 * alloc.c (allocate_string): Omit intervals initialization.
6664 * alloc.c (make_uninit_multibyte_string): Initialize intervals
6665 as in make_pure_string and make_pure_c_string.
6666
43184b7b
DA
66672012-06-27 Dmitry Antipov <dmantipov@yandex.ru>
6668
d209e2fb 6669 * alloc.c (allocate_string): Fix last change.
43184b7b 6670
3fe6dd74
DA
66712012-06-27 Dmitry Antipov <dmantipov@yandex.ru>
6672
d209e2fb 6673 * alloc.c (allocate_string): Remove two redundant calls
3fe6dd74
DA
6674 to memset, add explicit initialization where appropriate.
6675
1ba6038a
GM
66762012-06-27 Glenn Morris <rgm@gnu.org>
6677
6678 * lisp.mk (lisp): Remove paths.elc.
6679
c89926a5
CY
66802012-06-27 Chong Yidong <cyd@gnu.org>
6681
6682 * doc.c (Fsubstitute_command_keys): Fix punctuation.
6683
ed6b3510
JW
66842012-06-26 John Wiegley <johnw@newartisans.com>
6685
1ec4b7b2 6686 * unexmacosx.c (copy_data_segment): Add two section names used
157e99e4
JW
6687 on Mac OS X Lion: __mod_init_func and __mod_term_func.
6688
ed6b3510
JW
6689 * alloc.c (mark_memory): Do not check with -faddress-sanitizer
6690 when building with Clang.
6691
8edd4a2b
SM
66922012-06-26 Stefan Monnier <monnier@iro.umontreal.ca>
6693
6694 * eval.c (Fapply): Allow calling it with a single argument.
6695
f6f62d1b
EZ
66962012-06-26 Eli Zaretskii <eliz@gnu.org>
6697
6698 * s/ms-w32.h (strcasecmp, strncasecmp) [_MSC_VER]: Redirect to
6699 _stricmp and _strnicmp.
6700 (HAVE_STRCASECMP, HAVE_STRNCASECMP): Define to 1.
6701
62efea5e
DA
67022012-06-26 Dmitry Antipov <dmantipov@yandex.ru>
6703
6704 * alloc.c (allocate_window): Zero out non-Lisp part of newly
6705 allocated window.
6706 (allocate_process): Likewise for new process.
8edd4a2b 6707 (allocate_terminal): Change to use offsetof.
62efea5e
DA
6708 (allocate_frame): Likewise.
6709 * frame.c (make_frame): Omit redundant initialization.
6710 * window.c (make_parent_window): Use memset.
6711 (make_window): Omit redundant initialization.
6712 * process.c (make_process): Omit redundant initialization.
6713 * terminal.c (create_terminal): Likewise.
6714
42997f4d
DA
67152012-06-26 Dmitry Antipov <dmantipov@yandex.ru>
6716
6717 * term.c (delete_tty): Remove redundant call to memset.
6718
1130ecfc
DA
67192012-06-26 Dmitry Antipov <dmantipov@yandex.ru>
6720
6721 * alloc.c: Remove build_string.
6722 * lisp.h: Define build_string as static inline. This provides
6723 a better opportunity to optimize away calls to strlen when the
6724 function is called with compile-time constant argument.
6725 * image.c (imagemagick_error): Convert to build_string.
6726 * w32proc.c (sys_spawnve): Likewise.
6727 * xterm.c (x_term_init): Likewise.
6728
cf38a720
PE
67292012-06-26 Paul Eggert <eggert@cs.ucla.edu>
6730
99027bdd
PE
6731 Use sprintf return value instead of invoking strlen on result.
6732 In the old days this wasn't portable, since some sprintf
6733 implementations returned char *. But they died out years ago and
6734 Emacs already assumes sprintf returns int.
6735 Similarly for float_to_string.
6736 This patch speeds up (number-to-string 1000) by 3% on Fedora 15 x86-64.
6737 * ccl.c (ccl_driver):
6738 * character.c (string_escape_byte8):
6739 * data.c (Fnumber_to_string):
6740 * doprnt.c (doprnt):
6741 * print.c (print_object):
6742 * xdisp.c (message_dolog):
6743 * xfns.c (syms_of_xfns):
6744 Use sprintf or float_to_string result to avoid need to call strlen.
6745 * data.c (Fnumber_to_string):
6746 Use make_unibyte_string, since the string must be ASCII.
6747 * lisp.h, print.c (float_to_string): Now returns int length.
6748 * term.c (produce_glyphless_glyph):
6749 Use sprintf result rather than recomputing it.
6750
cf38a720
PE
6751 Clean out last vestiges of the old HAVE_CONFIG_H stuff.
6752 * Makefile.in (ALL_CFLAGS):
6753 * makefile.w32-in (LOCAL_FLAGS): Remove -DHAVE_CONFIG_H.
6754 * gmalloc.c, regex.c: Include <config.h> unconditionally.
6755
3511c784
DA
67562012-06-25 Dmitry Antipov <dmantipov@yandex.ru>
6757
0a08eb21 6758 * dispextern.h (xstrcasecmp): Define to library function
3511c784
DA
6759 strcasecmp if available.
6760 * xfaces.c: Do not use xstrcasecmp if strcasecmp is available.
6761
fb7da12e
AS
67622012-06-25 Andreas Schwab <schwab@linux-m68k.org>
6763
6764 * keyboard.c (menu_bar_items, menu_bar_item, read_key_sequence):
6765 Avoid comma operator.
6766 * menu.c (push_submenu_start, push_submenu_end)
6767 (push_left_right_boundary, push_menu_pane): Likewise.
6768 * msdos.c (dos_rawgetc): Likewise.
6769
afa2ffd8
DA
67702012-06-25 Dmitry Antipov <dmantipov@yandex.ru>
6771
6772 * xfns.c (xic_create_fontsetname): Remove redundant calls
6773 to memset.
6774
b3b4476b
PE
67752012-06-25 Paul Eggert <eggert@cs.ucla.edu>
6776
4495ff38
PE
6777 * gtkutil.c (get_utf8_string): Remove redundant assignment.
6778 sprintf already null-terminates its output.
6779
b3b4476b
PE
6780 * xfns.c (x_window): Remove redundant cast.
6781
b00876c9
DA
67822012-06-25 Dmitry Antipov <dmantipov@yandex.ru>
6783
6784 * xmenu.c (xmenu_show, xdialog_show): Explicit cast from
6785 `const char *' to `char *' to avoid compiler warning.
6786
d188e26b
PE
67872012-06-24 Paul Eggert <eggert@cs.ucla.edu>
6788
885d1d74
PE
6789 * xterm.c (x_term_init): Build proper-sized _XSETTINGS_Snnn string
6790 instead of truncating it to 63 (admittedly a generous limit).
6791
d188e26b
PE
6792 * process.c: Fix spelling and caps in comments.
6793
e2f560b1
DN
67942012-06-24 Dan Nicolaescu <dann@ics.uci.edu>
6795
e86db54b 6796 * emacs.c (setpgrp): Remove definition, unused.
e2f560b1
DN
6797 * sysdep.c (setpgrp): Remove definition, not used in this file.
6798
7583a3a1
JB
67992012-06-24 Juanma Barranquero <lekktu@gmail.com>
6800
6801 * makefile.w32-in: Update dependencies.
6802
696056c2
EZ
68032012-06-24 Eli Zaretskii <eliz@gnu.org>
6804
6805 * makefile.w32-in (TIMESPEC_H): Remove nt/inc/sys/time.h.
6806 (SYSTIME_H): Add nt/inc/sys/time.h.
6807
6808 * systime.h [WINDOWSNT]: Include sys/time.h.
6809
6810 * s/ms-w32.h (struct timespec): Definition moved from
6811 nt/inc/sys/time.h. Suggested by Paul Eggert <eggert@cs.ucla.edu>.
6812
845ca893
PE
68132012-06-24 Paul Eggert <eggert@cs.ucla.edu>
6814
6815 Switch from NO_RETURN to C11's _Noreturn (Bug#11750).
6816 * buffer.h (buffer_slot_type_mismatch):
6817 * data.c (arith_error) [!FORWARD_SIGNAL_TO_MAIN_THREAD]:
6818 * eval.c (unwind_to_catch):
6819 * image.c (my_png_error, my_error_exit):
6820 * keyboard.c (quit_throw_to_read_char, user_error)
6821 (Fexit_recursive_edit, Fabort_recursive_edit):
6822 * lisp.h (die, args_out_of_range, args_out_of_range_3)
6823 (wrong_type_argument, buffer_overflow, __executable_start)
6824 (memory_full, buffer_memory_full, string_overflow, Fthrow)
6825 (xsignal, xsignal0, xsignal1, xsignal2, xsignal3, signal_error)
6826 (error, verror, nsberror, report_file_error, Ftop_level, Fkill_emacs)
6827 (fatal):
6828 (child_setup) [!DOS_NT]:
6829 * lread.c (end_of_file_error, invalid_syntax):
6830 * process.c (send_process_trap) [!FORWARD_SIGNAL_TO_MAIN_THREAD]:
6831 * puresize.h (pure_write_error):
6832 * search.c (matcher_overflow):
6833 * sound.c (sound_perror, alsa_sound_perror):
6834 * sysdep.c, syssignal.h (croak):
6835 * term.c (maybe_fatal, vfatal):
6836 * textprop.c (text_read_only):
6837 * undo.c (user_error):
6838 * unexmacosx.c (unexec_error):
6839 * xterm.c (x_ins_del_lines, x_delete_glyphs):
6840 Use _Noreturn rather than NO_RETURN.
6841 No need for separate decl merely because of _Noreturn.
6842 * sound.c (sound_warning, parse_sound):
6843 Remove unnecessary forward decls.
6844
f1dd8073
PE
68452012-06-24 Paul Eggert <eggert@cs.ucla.edu>
6846
6847 Fix bug when time_t is unsigned and as wide as intmax_t (Bug#9000).
6848 * lisp.h (WAIT_READING_MAX): New macro.
6849 * dispnew.c (Fsleep_for, sit_for):
6850 * keyboard.c (kbd_buffer_get_event):
6851 * process.c (Faccept_process_output):
6852 Use it to avoid bogus compiler warnings with obsolescent GCC versions.
6853 This improves on the previous patch, which introduced a bug
6854 when time_t is unsigned and as wide as intmax_t.
6855 See <http://bugs.gnu.org/9000#51>.
6856
b82c1755
EZ
68572012-06-23 Eli Zaretskii <eliz@gnu.org>
6858
6859 * dispnew.c (sit_for, Fsleep_for):
6860 * keyboard.c (kbd_buffer_get_event):
6861 * process.c (Faccept_process_output): Avoid compiler warnings when
6862 comparing a 32-bit time_t with a 64-bit INTMAX_MAX.
6863
ca300656
JB
68642012-06-23 Juanma Barranquero <lekktu@gmail.com>
6865
049ec95b
JB
6866 * makefile.w32-in: Update dependencies.
6867
ca300656
JB
6868 * w32.c (ltime): Add return type and declare static.
6869 (w32_get_internal_run_time): Remove usused variable `time_100ns'.
6870
db7b8d06
PE
68712012-06-23 Paul Eggert <eggert@cs.ucla.edu>
6872
6873 * sysdep.c [__FreeBSD__]: Fix more recently-introduced typos.
6874 Privately reported by Herbert J. Skuhra.
6875 (make_lisp_timeval) [__FreeBSD__]: Rename from TIMELIST.
6876 All uses changed.
6877 (system_process_attributes) [__FreeBSD__]: Invoke make_lisp_time,
6878 not make_lisp_timeval, when the argument is of type EMACS_TIME.
6879
0bd8297f
EZ
68802012-06-23 Eli Zaretskii <eliz@gnu.org>
6881
96512555
EZ
6882 * w32proc.c (Fw32_get_locale_info): Fix an off-by-one error in
6883 last argument of make_unibyte_string.
6884
0bd8297f
EZ
6885 * keyboard.c (kbd_buffer_get_event): Include the codepage and the
6886 language ID in the event parameters.
6887
6888 * w32term.c (w32_read_socket): Put the new keyboard codepage into
6889 event.code, not the obscure "character set ID".
6890
63def6b6
CY
68912012-06-23 Chong Yidong <cyd@gnu.org>
6892
6893 * xmenu.c (x_menu_wait_for_event): Adapt GTK3 to new xg_select.
6894
e8a02204
EZ
68952012-06-23 Eli Zaretskii <eliz@gnu.org>
6896
388cdec0
EZ
6897 Fix the MS-Windows build broken by 2012-06-22T21:17:42Z!eggert@cs.ucla.edu.
6898 * w32.c (fdutimens): New function.
6899
6900 * w32proc.c (sys_select): Adapt to change in the EMACS_TIME type.
6901
6902 * s/ms-w32.h (pselect): Redirect to sys_select.
6903
6904 * sysselect.h [WINDOWSNT]: Don't include sys/select.h.
6905
e8a02204
EZ
6906 * ralloc.c (r_alloc_inhibit_buffer_relocation): Fix stupid thinko
6907 in the logic of incrementing and decrementing the value of
6908 use_relocatable_buffers.
6909
d054f3fb
PE
69102012-06-23 Paul Eggert <eggert@cs.ucla.edu>
6911
6912 * sysdep.c [__FreeBSD__]: Fix recently-introduced typos.
6913 Privately reported by Herbert J. Skuhra.
6914 [__FreeBSD__]: Remove "*/" typo after "#include".
6915 (timeval_to_EMACS_TIME) [__FreeBSD__]: New static function.
6916 (TIMEVAL) [__FreeBSD__]: Now a static function rather than a macro.
6917 (TIMEVAL, system_process_attributes) [__FreeBSD__]:
6918 Don't assume EMACS_TIME and struct timeval are the same type.
6919
d35af63c
PE
69202012-06-22 Paul Eggert <eggert@cs.ucla.edu>
6921
6922 Support higher-resolution time stamps (Bug#9000).
6923 The time stamps are only nanosecond-resolution at the C level,
6924 since that's the best that any real-world system supports now.
6925 But they are picosecond-resolution at the Lisp level, as that's
6926 easy, and leaves room for future OS improvements.
6927
6928 * Makefile.in (LIB_CLOCK_GETTIME): New macro.
6929 (LIBES): Use it.
6930
6931 * alloc.c (Fgarbage_collect): Port to higher-res time stamps.
6932 Don't get current time unless it's needed.
6933
6934 * atimer.c: Include <sys/time.h> unconditionally, since gnulib
6935 now provides it if it's absent.
6936 (start_atimer): Port to higher-res time stamps.
6937 Check for time stamp overflow. Don't get current time more
6938 often than is needed.
6939
6940 * buffer.h (struct buffer): Buffer modtime now has high resolution.
6941 Include systime.h, not time.h.
6942 (NONEXISTENT_MODTIME_NSECS, UNKNOWN_MODTIME_NSECS): New macros.
6943
6944 * dired.c: Include stat-time.h.
6945 (Ffile-attributes): File times now have higher resolution.
6946
6947 * dispextern.h [HAVE_WINDOW_SYSTEM]: Include systime.h.
6948 (struct image): Timestamp now has higher resolution.
6949
6950 * dispnew.c (PERIODIC_PREEMPTION_CHECKING): Remove, as Emacs always
6951 has at least microseconds now. All uses removed.
6952 (update_frame, update_single_window, update_window, update_frame_1)
6953 (Fsleep_for, sit_for): Port to higher-resolution time stamps.
927c7216 6954 (duration_to_sec_usec): Remove; no longer needed.
d35af63c
PE
6955
6956 * editfns.c (time_overflow): Now extern.
6957 (Fcurrent_time, Fget_internal_run_time, make_time, lisp_time_argument)
6958 (float-time, Fformat_time_string, Fcurrent_time_string)
6959 (Fcurrent_time_zone): Accept and generate higher-resolution
6960 time stamps.
6961 (make_time_tail, make_lisp_time, dissassemble_lisp_time)
6962 (decode_time_components, lisp_seconds_argument): New functions.
6963 (make_time): Now static.
6964 (lisp_time_argument): Now returns EMACS_TIME. New arg ppsec.
6965 Report an error if the time is invalid, rather than having the caller
6966 do that.
6967
6968 * fileio.c: Include <stat-time.h>
6969 (Fcopy_file): Copy higher-resolution time stamps.
6970 Prefer to set the time stamp via a file descriptor if that works.
6971 (Fset_file_times, Finsert_file_contents, Fwrite_region)
6972 (Fverify_visited_file_modtime, Fclear_visited_file_modtime)
6973 (Fvisited_file_modtime, Fset_visited_file_modtime):
6974 Support higher-resolution time stamps.
6975
6976 * fns.c (Frandom): Use nanoseconds, not microseconds, for seed.
6977
6978 * gtkutil.c (xg_maybe_add_timer): Port to higher-res time stamps.
6979
6980 * image.c (prepare_image_for_display, clear_image_cache)
6981 (lookup_image): Port to higer-resolution time stamps.
6982
6983 * keyboard.c (start_polling, bind_polling_period):
6984 Check for time stamp overflow.
6985 (read_char, kbd_buffer_get_event, timer_start_idle)
6986 (timer_stop_idle, timer_resume_idle, timer_check_2, timer_check)
6987 (Fcurrent_idle_time, init_keyboard, set_waiting_for_input):
6988 Port to higher-resolution time stamps. Do not assume time_t is signed.
6989 (decode_timer): New function. Timers are now vectors of length 9,
6990 not 8, to accommodate the picosecond component.
6991 (timer_check_2): Use it.
6992
6993 * nsterm.m (select_timeout, timeval_subtract): Remove.
6994 (ns_timeout): Use Emacs's facilities for time stamp arithmetic,
6995 as they're a bit more accurate and handle overflow better.
6996 (ns_select): Change prototype to be compatible with pselect.
6997 (ns_select, ns_term_shutdown): Port to ns-resolution time stamps.
6998 * nsterm.h (ns_select): Adjust prototype.
6999
7000 * msdos.c (EMACS_TIME_ZERO_OR_NEG_P): Remove, as it assumes
7001 us-resolution time stamps.
7002 (sys_select): Use the new EMACS_TIME_SIGN macro instead.
7003
7004 * lread.c (read_filtered_event): Port to ns-resolution time stamps.
7005
7006 * lisp.h (time_overflow): New decl.
7007 (wait_reading_process_output): First arg is now intmax_t, not int,
7008 to accommodate larger waits.
7009
7010 * process.h (struct Lisp_Process.read_output_delay):
7011 Now counts nanoseconds, not microseconds.
7012 * process.c (ADAPTIVE_READ_BUFFERING): Don't worry about
7013 EMACS_HAS_USECS.
7014 (READ_OUTPUT_DELAY_INCREMENT, Faccept_process_output)
7015 (wait_reading_process_output):
7016 Port to ns-resolution time stamps.
7017 (Faccept_process_output, wait_reading_process_output):
7018 Check for time stamp overflow. Do not assume time_t is signed.
7019 (select_wrapper): Remove; we now use pselect.
7020 (Fprocess_attributes): Now generates ns-resolution time stamps.
7021
7022 * sysdep.c: Include utimens.h. Don't include utime.h
7023 or worry about struct utimbuf; gnulib does that for us now.
7024 (gettimeofday): Remove; gnulib provides a substitute.
7025 (make_timeval): New function.
7026 (set_file_times): Now sets ns-resolution time stamps.
7027 New arg FD; all uses changed.
7028 (time_from_jiffies, ltime_from_jiffies, get_up_time)
7029 (system_process_attributes):
7030 Now returns ns-resolution time stamp. All uses changed.
7031 Check for time stamp overflow.
7032
7033 * sysselect.h: Don't depend on HAVE_SYS_SELECT_H; gnulib
7034 provides a substitute now.
7035
7036 * systime.h: Include timespec.h rather than sys/time.h and time.h,
7037 since it guarantees struct timespec.
7038 (EMACS_TIME): Now struct timespec, so that we can support
7039 ns-resolution time stamps.
7040 (EMACS_TIME_RESOLUTION, LOG10_EMACS_TIME_RESOLUTION): New macros.
7041 (EMACS_HAS_USECS): Remove; Emacs always has sub-second time stamps now.
7042 (EMACS_USECS): Remove.
7043 (EMACS_SET_USECS): The underlying time stamp now has ns resolution,
7044 so multiply the arg by 1000 before storing it.
7045 (EMACS_NSECS, EMACS_SECS_ADDR, EMACS_SET_NSECS, EMACS_SET_SECS_NSECS):
7046 New macros.
7047 (EMACS_GET_TIME, EMACS_ADD_TIME, EMACS_SUB_TIME):
7048 Port to ns-resolution time stamps.
7049 (EMACS_TIME_NEG_P): Remove; replaced by....
7050 (EMACS_TIME_SIGN): New macro.
7051 (EMACS_SET_INVALID_TIME, EMACS_TIME_VALID_P)
7052 (EMACS_TIME_FROM_DOUBLE, EMACS_TIME_TO_DOUBLE): New macros.
7053 (set_file_times, make_time, lisp_time_argument): Adjust signature.
7054 (make_timeval, make_lisp_time, decode_time_components): New decls.
7055 (EMACS_TIME_CMP): Remove; no longer used. Plus, it was buggy, in
7056 that it mishandled time_t overflow. You can't compare by subtracting!
7057 (EMACS_TIME_EQ, EMACS_TIME_NE, EMACS_TIME_GT, EMACS_TIME_GE)
7058 (EMACS_TIME_LT, EMACS_TIME_LE): Rewrite in terms of timespec_cmp.
7059
7060 * term.c: Include <sys/time.h>.
7061 (timeval_to_Time): New function, for proper overflow wraparound.
7062 (term_mouse_position, term_mouse_click): Use it.
7063
7064 * undo.c (record_first_change): Support higher-resolution time stamps
7065 in the undo buffer.
7066 (Fprimitive_undo): Use them when restoring time stamps.
7067
7068 * w32.c (ltime, U64_TO_LISP_TIME, process_times, emacs_gnutls_pull)
7069 (w32_get_internal_run_time):
7070 Port to higher-resolution Emacs time stamps.
7071 (ltime): Now accepts single 64-bit integer, as that's more convenient
7072 for callers.
7073
7074 * xdisp.c (start_hourglass): Port to ns-resolution time stamps.
7075
7076 * xgselect.c, xgselect.h (xg_select): Add sigmask argument,
7077 for compatibility with pselect. Support ns-resolution time stamps.
7078
7079 * xmenu.c (x_menu_wait_for_event): Support ns-resolution time stamps.
7080
7081 * xselect.c (wait_for_property_change, x_get_foreign_selection):
7082 Check for time stamp overflow, and support ns-resolution time stamps.
7083
7084 * xterm.c: Don't include sys/time.h; gnulib does that for us now.
7085 Don't worry about whether HAVE_TIMEVAL and HAVE_SELECT are set.
7086 (timeval_subtract): Remove; no longer needed.
7087 (XTflash, XTring_bell, x_wait_for_event):
7088 Port to ns-resolution time stamps. Don't assume time_t is signed.
7089
b6a92dfe
CY
70902012-06-22 Chong Yidong <cyd@gnu.org>
7091
7092 * xdisp.c (x_consider_frame_title): Revert last change.
7093
d251c37c
EZ
70942012-06-22 Eli Zaretskii <eliz@gnu.org>
7095
7096 * alloc.c (NSTATICS): Enlarge to 0x650. Otherwise, Emacs compiled
7097 with -DENABLE_CHECKING -DXASSERTS -DGLYPH_DEBUG=1 -DBYTE_CODE_METER
7098 aborts in staticpro during startup. (Without -DBYTE_CODE_METER,
7099 staticidx goes up to 1597 out of 1600 = 0x640.)
7100
f10deafb
PE
71012012-06-20 Paul Eggert <eggert@cs.ucla.edu>
7102
7103 * fileio.c (Fdefault_file_modes): Block input while fiddling with umask.
7104 Otherwise, the umask might be mistakenly 0 while handling input signals.
7105
ec6de1e2
SM
71062012-06-19 Stefan Monnier <monnier@iro.umontreal.ca>
7107
7108 * minibuf.c (Fread_string): Bind minibuffer-completion-table.
7109
28be1ada
DA
71102012-06-19 Dmitry Antipov <dmantipov@yandex.ru>
7111
7112 * alloc.c, bytecode.c, ccl.c, coding.c, composite.c, data.c, dosfns.c:
7113 * font.c, image.c, keyboard.c, lread.c, menu.c, minibuf.c, msdos.c:
7114 * print.c, syntax.c, window.c, xmenu.c, xselect.c: Replace direct
7115 access to `contents' member of Lisp_Vector objects with AREF and ASET
7116 where appropriate.
7117
c6bf3022
CY
71182012-06-19 Chong Yidong <cyd@gnu.org>
7119
7120 * frame.c (delete_frame): When selecting a frame on a different
7121 text terminal, do not alter the terminal's top-frame.
7122
7123 * xdisp.c (format_mode_line_unwind_data): Record the target
7124 frame's selected window and its terminal's top-frame.
7125 (unwind_format_mode_line): Restore them.
7126 (x_consider_frame_title, display_mode_line, Fformat_mode_line):
7127 Callers changed.
7128 (x_consider_frame_title): Do not condition on HAVE_WINDOW_SYSTEM,
7129 since tty frames can be explicitly named.
7130 (prepare_menu_bars): Likewise.
7131
7132 * term.c (Ftty_top_frame): New function.
7133
defd4196
PE
71342012-06-18 Paul Eggert <eggert@cs.ucla.edu>
7135
7136 Port byte-code-meter to modern targets.
7137 * bytecode.c (METER_CODE) [BYTE_CODE_METER]: Don't assume
7138 !CHECK_LISP_OBJECT_TYPE && !USE_LSB_TAG. Problem with
8b5257e1 7139 CHECK_LISP_OBJECT_TYPE reported by Dmitry Antipov in
defd4196
PE
7140 <http://lists.gnu.org/archive/html/emacs-devel/2012-06/msg00282.html>.
7141 (METER_1, METER_2): Simplify.
7142
1053a871
SM
71432012-06-18 Stefan Monnier <monnier@iro.umontreal.ca>
7144
7145 * data.c (Fdefalias): Return `symbol' (bug#11686).
7146
b7e8d081
MR
71472012-06-18 Martin Rudalics <rudalics@gmx.at>
7148
7149 * buffer.c (Fkill_buffer): Don't throw an error when the buffer
1053a871
SM
7150 gets killed during executing of this function (Bug#11665).
7151 Try to always return Qt when the buffer has been actually killed.
b7e8d081
MR
7152 (Vkill_buffer_query_functions): In doc-string say that functions
7153 run by this hook should not change the current buffer.
7154
7ea2b339
PE
71552012-06-18 Paul Eggert <eggert@cs.ucla.edu>
7156
7157 Fix recently-introduced process.c problems found by static checking.
7158 * process.c (write_queue_push, write_queue_pop, send_process):
7159 Use ptrdiff_t, not int or EMACS_INT, for buffer lengths and offsets.
7160 (write_queue_pop): Fix pointer signedness problem.
7161 (send_process): Remove unused local.
7162
96a313a1
CY
71632012-06-17 Chong Yidong <cyd@gnu.org>
7164
7165 * xdisp.c (redisplay_internal): No need to redisplay terminal
7166 frames that are not on top.
7167
20ca2e94
TN
71682012-06-17 Troels Nielsen <bn.troels@gmail.com>
7169
7170 * process.c (make_process): Initialize write_queue.
7171 (write_queue_push, write_queue_pop): New functions.
7172 (send_process): Use them to maintain correct ordering of process
7173 writes (Bug#10815).
7174
9a900ca9
PE
71752012-06-17 Paul Eggert <eggert@cs.ucla.edu>
7176
310fbfa8
PE
7177 * lisp.h (eassert): Assume C89 or later.
7178 This removes the need for CHECK.
7179 (CHECK): Remove. Its comments about always evaluating its
7180 argument were confusing, as 'eassert' typically does not evaluate
7181 its argument.
7182
27bb1ca4
PE
7183 * coding.c (produce_chars): Use ptrdiff_t, not int.
7184
9a900ca9
PE
7185 * xterm.c (x_draw_underwave): Check for integer overflow.
7186 This pacifies gcc 4.7.0 -Wunsafe-loop-optimizations on x86-64.
7187
41b7f8bc 71882012-06-17 Jan Djärv <jan.h.d@swipnet.se>
50a93863
JD
7189
7190 * nsterm.m (x_free_frame_resources): Move xfree so freed memory isn't
7191 referenced (Bug#11583).
7192
9b0e3eba
AA
71932012-06-16 Aurelien Aptel <aurelien.aptel@gmail.com>
7194
7195 Implement wave-style variant of underlining.
7196 * dispextern.h (face_underline_type): New enum.
7197 (face): Add field for underline type.
7198 * nsterm.m (ns_draw_underwave): New function.
7199 (ns_draw_text_decoration): Use it.
7200 * w32term.c (w32_restore_glyph_string_clip, w32_draw_underwave):
7201 New functions.
7202 (x_draw_glyph_string): Use them.
7203 * xfaces.c (Qline, Qwave): New Lisp objects.
7204 (check_lface_attrs, merge_face_ref)
1053a871
SM
7205 (Finternal_set_lisp_face_attribute, realize_x_face):
7206 Handle wave-style underline face attributes.
9b0e3eba
AA
7207 * xterm.c (x_draw_underwave): New function.
7208 (x_draw_glyph_string): Use it.
7209
0fb52f11
JB
72102012-06-16 Juanma Barranquero <lekktu@gmail.com>
7211
7212 * makefile.w32-in ($(BLD)/emacs.$(O), $(BLD)/fringe.$(O))
7213 ($(BLD)/xml.$(O), $(BLD)/intervals.$(O), $(BLD)/macros.$(O))
7214 ($(BLD)/minibuf.$(O), $(BLD)/regex.$(O), $(BLD)/region-cache.$(O))
7215 ($(BLD)/textprop.$(O), $(BLD)/undo.$(O), $(BLD)/window.$(O))
7216 ($(BLD)/w32select.$(O)): Update dependencies.
7217
e5560ff7
AS
72182012-06-16 Andreas Schwab <schwab@linux-m68k.org>
7219
7220 * buffer.h (FETCH_MULTIBYTE_CHAR): Define as inline.
7221 (BUF_FETCH_MULTIBYTE_CHAR): Likewise.
7222 * character.c (_fetch_multibyte_char_p): Remove.
7223 * alloc.c: Include "character.h" before "buffer.h".
7224 * bidi.c: Likewise.
7225 * buffer.c: Likewise.
7226 * bytecode.c: Likewise.
7227 * callint.c: Likewise.
7228 * callproc.c: Likewise.
7229 * casefiddle.c: Likewise.
7230 * casetab.c: Likewise.
7231 * category.c: Likewise.
7232 * cmds.c: Likewise.
7233 * coding.c: Likewise.
7234 * composite.c: Likewise.
7235 * dired.c: Likewise.
7236 * dispnew.c: Likewise.
7237 * doc.c: Likewise.
7238 * dosfns.c: Likewise.
7239 * editfns.c: Likewise.
7240 * emacs.c: Likewise.
7241 * fileio.c: Likewise.
7242 * filelock.c: Likewise.
7243 * font.c: Likewise.
7244 * fontset.c: Likewise.
7245 * fringe.c: Likewise.
7246 * indent.c: Likewise.
7247 * insdel.c: Likewise.
7248 * intervals.c: Likewise.
7249 * keyboard.c: Likewise.
7250 * keymap.c: Likewise.
7251 * lread.c: Likewise.
7252 * macros.c: Likewise.
7253 * marker.c: Likewise.
7254 * minibuf.c: Likewise.
7255 * nsfns.m: Likewise.
7256 * nsmenu.m: Likewise.
7257 * print.c: Likewise.
7258 * process.c: Likewise.
7259 * regex.c: Likewise.
7260 * region-cache.c: Likewise.
7261 * search.c: Likewise.
7262 * syntax.c: Likewise.
7263 * term.c: Likewise.
7264 * textprop.c: Likewise.
7265 * undo.c: Likewise.
7266 * unexsol.c: Likewise.
7267 * w16select.c: Likewise.
7268 * w32fns.c: Likewise.
7269 * w32menu.c: Likewise.
7270 * window.c: Likewise.
7271 * xdisp.c: Likewise.
7272 * xfns.c: Likewise.
7273 * xmenu.c: Likewise.
7274 * xml.c: Likewise.
7275 * xselect.c: Likewise.
7276
2f07e6af
EZ
72772012-06-16 Eli Zaretskii <eliz@gnu.org>
7278
1053a871
SM
7279 * xdisp.c (set_cursor_from_row): Don't dereference glyphs_end.
7280 If all the glyphs of the glyph row came from strings, and we have no
2f07e6af 7281 cursor positioning clues, put the cursor on the first glyph of the
1097afe4
EZ
7282 row.
7283 (handle_face_prop): Use chunk-relative overlay string index when
7284 indexing into it->string_overlays array. (Bug#11653)
946fdb73
EZ
7285 (set_cursor_from_row): Use the leftmost glyph as GLYPH_BEFORE, not
7286 the rightmost. (Bug#11720)
2f07e6af 7287
29b83cec
AS
72882012-06-16 Andreas Schwab <schwab@linux-m68k.org>
7289
7290 * category.h (CHAR_HAS_CATEGORY): Define as inline.
7291 (CATEGORY_MEMBER): Enforce 1/0 value.
7292 * category.c (_temp_category_set): Remove.
7293
4c5501e9
EZ
72942012-06-16 Eli Zaretskii <eliz@gnu.org>
7295
7296 * window.c (Fdelete_other_windows_internal)
7297 (Fdelete_window_internal): Don't access frame's mouse highlight
7298 info of the initial frame. (Bug#11677)
7299
2b570124
PE
73002012-06-14 Paul Eggert <eggert@cs.ucla.edu>
7301
e93864f9
PE
7302 * .gdbinit (xgetint): Fix recently-introduced paren typo.
7303 Assume USE_2_TAGS_FOR_INTS.
7304 (xreload): Adjust $tagmask width to match recent lisp.h change.
7305
2b570124
PE
7306 Simplify lisp.h in minor ways that should not affect code.
7307 * lisp.h (USE_2_TAGS_FOR_INTS): Remove, as it was always defined.
7308 (LISP_INT_TAG, case_Lisp_Int, LISP_STRING_TAG, LISP_INT_TAG_P)
7309 (LISP_INT1_TAG, enum Lisp_Type, XINT, XUINT, make_number):
7310 Simplify under the assumption that USE_2_TAGS_FOR_INTS is defined.
7311 (INTTYPEBITS): New macro, for clarity.
7312 (INTMASK, MOST_POSITIVE_FIXNUM): Use it.
1053a871
SM
7313 (LISP_INT1_TAG, LISP_STRING_TAG, LISP_INT_TAG_P):
7314 Simplify now that USE_LSB_TAG is always defined.
2b570124
PE
7315 (TYPEMASK, XINT) [USE_LSB_TAG]: Remove unnecessary cast.
7316 (make_number) [!USE_LSB_TAG]: Use INTMASK; that's simpler.
7317
81755f69
JB
73182012-06-13 Juanma Barranquero <lekktu@gmail.com>
7319
7320 * makefile.w32-in ($(BLD)/data.$(O)): Update dependencies.
7321
16192a57
GM
73222012-06-13 Glenn Morris <rgm@gnu.org>
7323
7324 * s/bsd-common.h (BSD4_3):
7325 * s/usg5-4-common.h (USG5_4): No longer define; unused.
7326
646b5f55
AS
73272012-06-13 Andreas Schwab <schwab@linux-m68k.org>
7328
7329 * lisp.h (Lisp_Object) [CHECK_LISP_OBJECT_TYPE]: Define as struct
7330 instead of union.
7331 (XLI, XIL): Define.
1053a871
SM
7332 (XHASH, XTYPE, XINT, XUINT, make_number, XSET, XPNTR, XUNTAG):
7333 Use them.
7334 * emacs.c (gdb_use_struct): Rename from gdb_use_union.
646b5f55 7335 * .gdbinit: Check gdb_use_struct instead of gdb_use_union.
1053a871 7336 * alloc.c (widen_to_Lisp_Object): Remove.
646b5f55
AS
7337 (mark_memory): Use XIL instead of widen_to_Lisp_Object.
7338 * frame.c (delete_frame): Remove outdated comment.
7339 * w32fns.c (Fw32_register_hot_key): Use XLI instead of checking
7340 USE_LISP_UNION_TYPE.
7341 (Fw32_unregister_hot_key): Likewise.
7342 (Fw32_toggle_lock_key): Likewise.
7343 * w32menu.c (add_menu_item): Likewise.
7344 (w32_menu_display_help): Use XIL instead of checking
7345 USE_LISP_UNION_TYPE.
7346 * w32heap.c (allocate_heap): Don't check USE_LISP_UNION_TYPE.
7347 (init_heap): Likewise.
7348 * w32term.c (w32_read_socket): Update comment.
7349
1d3823c9
GM
73502012-06-13 Glenn Morris <rgm@gnu.org>
7351
c62ff706
GM
7352 * s/usg5-4-common.h, src/s/unixware.h:
7353 Remove define/undef of HAVE_SYSV_SIGPAUSE (not used since 2010-05-04).
7354
1d3823c9
GM
7355 * s/gnu.h (POSIX_SIGNALS): Remove (not used since 2010-05-04).
7356
bfe3e0a2
PE
73572012-06-13 Paul Eggert <eggert@cs.ucla.edu>
7358
7359 USE_LISP_UNION_TYPE + USE_LSB_TAG cleanup (Bug#11604)
7360 * alloc.c (make_number) [!defined make_number]:
7361 Remove, as lisp.h always defines this now.
7362 (mark_maybe_pointer): Simplify since USE_LSB_TAG is always defined now.
7363 (roundup_size): Verify that it is a power of 2.
7364 * data.c (Fmake_variable_buffer_local, Fmake_local_variable):
7365 * ftfont.c (ftfont_driver): Use LISP_INITIALLY_ZERO.
7366 * lisp.h (USE_LSB_TAG): Allow the builder to compile with
7367 -DUSE_LSB_TAG=0, to override the automatically-selected default.
7368 USE_LSB_TAG now is always defined to be either 0 or 1.
7369 All uses changed.
7370 (union Lisp_Object): Don't worry about WORDS_BIGENDIAN; the
7371 code works fine either way, and efficiency is not a concern here,
7372 as the union type is for debugging, not for production.
7373 (LISP_MAKE_RVALUE, make_number) [USE_LISP_UNION_TYPE]:
7374 Use an inline function on all platforms when using the union type,
7375 since this is simpler and 'static inline' can be used portably
7376 within Emacs now.
7377 (LISP_INITIALLY_ZERO): New macro.
7378 (XFASTINT, XSETFASTINT) [USE_LISP_UNION_TYPE]: Remove.
7379 (XSET) [USE_LISP_UNION_TYPE]: Don't overparenthesize.
7380
45fa9c0f
GM
73812012-06-12 Glenn Morris <rgm@gnu.org>
7382
b4492cba
GM
7383 * s/gnu-kfreebsd.h, s/hpux11.h, s/openbsd.h, s/sol2-10.h: Remove files.
7384
7385 * s/gnu-linux.h (HAVE_PROCFS): Move to configure.
0d369729 7386
45fa9c0f
GM
7387 * s/hpux10-20.h, s/openbsd.h, s/usg5-4-common.h:
7388 Move BROKEN_SIGIO to configure.
7389
7390 * s/bsd-common.h, s/darwin.h, s/gnu-kfreebsd.h, s/hpux10-20.h:
7391 Move NO_TERMIO to configure.
7392
0e25d334
CY
73932012-06-12 Chong Yidong <cyd@gnu.org>
7394
7395 * image.c (imagemagick_load_image): Use MagickFlattenImage if
7396 MagickMergeImageLayers is undefined. Use pixel pusher loop if
7397 MagickExportImagePixels is undefined.
7398
43682bb6
PE
73992012-06-12 Paul Eggert <eggert@cs.ucla.edu>
7400
7401 * image.c (imagemagick_load_image): Remove unused label.
7402
a9be7d2b
GM
74032012-06-11 Glenn Morris <rgm@gnu.org>
7404
7405 * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/darwin.h:
7406 * s/gnu-kfreebsd.h, s/gnu-linux.h, s/gnu.h, s/hpux10-20.h:
7407 * s/irix6-5.h, s/ms-w32.h, s/msdos.h, s/template.h:
7408 * s/usg5-4-common.h: Move SYSTEM_TYPE to configure.
7409
3017f87f
SM
74102012-06-11 Stefan Monnier <monnier@iro.umontreal.ca>
7411
7412 * alloc.c (make_byte_code): New function.
7413 (Fmake_byte_code): Use it. Don't purify here.
7414 * lread.c (read1): Use it as well to avoid extra allocation.
7415
1b9b4cf4
CY
74162012-06-11 Chong Yidong <cyd@gnu.org>
7417
7418 * image.c (imagemagick_load_image): Implement transparency.
7419
95988fcf
AS
74202012-06-10 Andreas Schwab <schwab@linux-m68k.org>
7421
7422 * regex.c (at_begline_loc_p): Also recognize `(?N:' and correctly
7423 account for preceding backslashes. (Bug#11663)
7424
cd4eb164
CY
74252012-06-09 Chong Yidong <cyd@gnu.org>
7426
7427 * term.c: Support italics in capable terminals (Bug#9652).
7428 (no_color_bit): Replace unused NC_BLINK with NC_ITALIC.
7429 (turn_on_face): Output using TS_enter_italic_mode if available.
7430 Don't handle unused blinking and alt-charset cases.
7431 (turn_off_face): Handle italic case; discard unused tty_blinking_p
7432 and tty_alt_charset_p cases.
7433 (tty_capable_p, init_tty): Support italics.
7434
7435 * termchar.h (struct tty_display_info): Add field for italics.
7436 Remove unused blink field.
7437
7438 * xfaces.c (tty_supports_face_attributes_p, realize_tty_face):
7439 Handle slant.
7440
7441 * dispextern.h: Replace unused TTY_CAP_BLINK with TTY_CAP_ITALIC.
7442 (struct face): Remove unused fields tty_dim_p, tty_blinking_p, and
7443 tty_alt_charset_p. Add tty_italic_p.
7444
ff88beb8
MA
74452012-06-09 Michael Albinus <michael.albinus@gmx.de>
7446
7447 * dbusbind.c (XD_BASIC_DBUS_TYPE): Use dbus_type_is_valid and
7448 dbus_type_is_basic if available.
7449 (xd_extract_signed, xd_extract_unsigned): Rename from
7450 extract_signed and extract_unsigned, respectively. Adapt callers.
7451
44286096
CY
74522012-06-09 Chong Yidong <cyd@gnu.org>
7453
1682701f
CY
7454 * xfaces.c (face_for_overlay_string): Handle face remapping (Bug#2066).
7455
44286096
CY
7456 * fringe.c (Fset_fringe_bitmap_face): Handle the noninteractive
7457 case (Bug#9752).
7458
d86feb17
PE
74592012-06-08 Paul Eggert <eggert@cs.ucla.edu>
7460
7461 * xdisp.c (vmessage): Treat frame message as multibyte.
7462 Without this change, (let ((§ 1)) (make-variable-buffer-local '§))
7463 would generate the diagnostic "Making \302\247 buffer-local while
7464 let-bound!".
7465
d5c20fe8
EZ
74662012-06-08 Eli Zaretskii <eliz@gnu.org>
7467
7468 * dispnew.c (showing_window_margins_p): Undo last change, which
7469 was done due to an inadvertent commit.
7470 (adjust_frame_glyphs_for_frame_redisplay): Do call
7471 showing_window_margins_p.
7472
513749ee
SM
74732012-06-08 Stefan Monnier <monnier@iro.umontreal.ca>
7474
7475 * eval.c (Fmake_var_non_special): New primitive.
7476 (syms_of_eval): Defsubr it.
7477 * lread.c (syms_of_lread): Mark `values' as lexically scoped.
7478
d4a8f5c1
JB
74792012-06-08 Juanma Barranquero <lekktu@gmail.com>
7480
7481 * dispnew.c (showing_window_margins_p): Wrap in #if 0 to prevent unused
7482 function warning (the only call is inside #if 0 since 2012-06-08T08:44:45Z!eliz@gnu.org).
7483
8bbbc977
EZ
74842012-06-08 Eli Zaretskii <eliz@gnu.org>
7485
7486 * alloc.c (allocate_vectorlike): Fix last change.
7487
f3372c87
DA
74882012-06-08 Dmitry Antipov <dmantipov@yandex.ru>
7489
7490 Block-based vector allocation of small vectors.
7491 * lisp.h (struct vectorlike_header): New field `nbytes',
7492 adjust comment accordingly.
7493 * alloc.c (enum mem_type): New type `MEM_TYPE_VECTOR_BLOCK'
fc0c31f8 7494 to denote vector blocks. Adjust users (live_vector_p,
f3372c87
DA
7495 mark_maybe_pointer, valid_lisp_object_p) accordingly.
7496 (COMMON_MULTIPLE): Move outside #if USE_LSB_TAG.
7497 (VECTOR_BLOCK_SIZE, vroundup, VECTOR_BLOCK_BYTES),
7498 (VBLOCK_BYTES_MIN, VBLOCK_BYTES_MAX, VECTOR_MAX_FREE_LIST_INDEX),
7499 (VECTOR_FREE_LIST_FLAG, ADVANCE, VINDEX, SETUP_ON_FREE_LIST),
7500 (VECTOR_SIZE, VECTOR_IN_BLOCK): New macros.
7501 (roundup_size): New constant.
7502 (struct vector_block): New data type.
7503 (vector_blocks, vector_free_lists, zero_vector): New variables.
513749ee 7504 (all_vectors): Rename to `large_vectors'.
f3372c87
DA
7505 (allocate_vector_from_block, init_vectors, allocate_vector_from_block)
7506 (sweep_vectors): New functions.
7507 (allocate_vectorlike): Return `zero_vector' as the only vector of
fc0c31f8 7508 0 items. Allocate new vector from block if vector size is less than
f3372c87
DA
7509 or equal to VBLOCK_BYTES_MAX.
7510 (Fgarbage_collect): Move all vector sweeping code to sweep_vectors.
7511 (init_alloc_once): Add call to init_vectors.
7512
4f18a4ed
SM
75132012-06-08 Stefan Monnier <monnier@iro.umontreal.ca>
7514
7515 * eval.c (Fmacroexpand): Stop if the macro returns the same form.
7516
86f158bc
PE
75172012-06-07 Paul Eggert <eggert@cs.ucla.edu>
7518
7519 * doprnt.c (doprnt): Truncate multibyte char correctly.
7520 Without this change, doprnt (buf, 2, "%s", FORMAT_END, AP)
7521 would mishandle a string argument "Xc" if X was a multibyte
7522 character of length 2: it would truncate after X's first byte
7523 rather than including all of X.
7524
c5cfcbe0
CY
75252012-06-06 Chong Yidong <cyd@gnu.org>
7526
7527 * buffer.c (word_wrap): Doc fix.
7528
c05cf390
PE
75292012-06-04 Paul Eggert <eggert@cs.ucla.edu>
7530
7531 * xdisp.c (note_mode_line_or_margin_highlight): Pacify gcc -Wall.
7532
0c3461de
GM
75332012-06-03 Glenn Morris <rgm@gnu.org>
7534
7535 * xdisp.c (tool-bar-style): Doc fix.
7536
c71232db
UM
75372012-06-03 Ulrich Müller <ulm@gentoo.org>
7538
7539 * Makefile.in (PAXCTL): Define.
7540 (temacs$(EXEEXT)): Disable memory randomization for the temacs
7541 binary via PaX flags if the paxctl utility is available.
7542 (emacs$(EXEEXT), bootstrap-emacs$(EXEEXT)):
7543 Restore PaX flags to their default. (Bug#11398)
7544
383f7350
CY
75452012-06-03 Chong Yidong <cyd@gnu.org>
7546
7547 * xdisp.c (decode_mode_spec_coding): Display a space for a unibyte
7548 buffer (Bug#11226).
7549
5f2c76c6
CY
75502012-06-03 Chong Yidong <cyd@gnu.org>
7551
7552 * xdisp.c (calc_pixel_width_or_height): Use Fbuffer_local_value.
7553 (note_mode_line_or_margin_highlight): If there is no help echo,
7554 use mode-line-default-help-echo. Handle the case where the mouse
7555 position is past the end of the mode line string.
7556
7557 * buffer.c (buffer_local_value_1): New function, split from
7558 Fbuffer_local_value; can return Qunbound.
7559 (Fbuffer_local_value): Use it.
7560 (Vmode_line_format): Docstring tweaks.
7561
773d47f6
PE
75622012-06-02 Paul Eggert <eggert@cs.ucla.edu>
7563
7564 * sysdep.c (system_process_attributes): Improve comment.
7565
f2d6a3df
SM
75662012-06-02 Stefan Monnier <monnier@iro.umontreal.ca>
7567
7568 * keyboard.c: Export real-this-command to Elisp.
7569 (syms_of_keyboard): Rename real_this_command to Vreal_this_command
7570 and DEFVAR it. Update all users.
7571
63810350
PE
75722012-06-02 Paul Eggert <eggert@cs.ucla.edu>
7573
7bd5c1f4
PE
7574 * minibuf.c (Fassoc_string): Remove duplicate declaration.
7575
63810350
PE
7576 * sysdep.c (system_process_attributes) [SOLARIS2 && HAVE_PROCFS]:
7577 Convert pctcpu and pctmem to Lisp float properly.
7578 Let the compiler fold better, as 100.0/0x8000 is exact.
7579
a2821611
AS
75802012-06-02 Andreas Schwab <schwab@linux-m68k.org>
7581
7582 * alloc.c (CONS_BLOCK_SIZE): Account for padding at the end of
7583 cons_block.
7584
5fceba1d
PE
75852012-06-01 Paul Eggert <eggert@cs.ucla.edu>
7586
7587 * xfns.c (x_set_tool_bar_lines) [USE_GTK]: Adjust to bitfield change.
7588
c98ff5dd
DA
75892012-06-01 Dmitry Antipov <dmantipov@yandex.ru>
7590
7591 For a 'struct window', replace some Lisp_Object fields to
7592 bitfields where appropriate, remove unused fields.
7593 * window.h (struct window): Remove unused 'last_mark_x' and
7594 'last_mark_y' fields. Rename 'mini_p' field to 'mini',
1f9f395d 7595 change its type from Lisp_Object to bitfield.
c98ff5dd
DA
7596 Change type of 'force_start', 'optional_new_start',
7597 'last_had_star', 'update_mode_line' and 'start_at_line_beg'
fc0c31f8 7598 fields from Lisp_Object to bitfield. Adjust users accordingly.
c98ff5dd 7599
ca34e0be
PE
76002012-05-31 Paul Eggert <eggert@cs.ucla.edu>
7601
7602 Pacify gcc -Wdouble-precision when using Xaw.
7603 * xterm.c (xaw_jump_callback, x_set_toolkit_scroll_bar_thumb)
7604 [HAVE_X_WINDOWS && USE_TOOLKIT_SCROLL_BARS && !USE_MOTIF && !USE_GTK]:
7605 Use 'float' consistently, rather than 'float' in most places
7606 and 'double' in a couple of places.
7607
efc00ab1 76082012-05-31 Eli Zaretskii <eliz@gnu.org>
d5fd2c54
EZ
7609
7610 * xdisp.c (handle_stop): Detect whether we have overlay strings
7611 loaded by testing it->current.overlay_string_index to be
7612 non-negative, instead of checking whether n_overlay_strings is
7613 positive. (Bug#11587)
7614
efc00ab1 76152012-05-31 Chong Yidong <cyd@gnu.org>
353c87f6
CY
7616
7617 * keymap.c (describe_map_tree): Revert 2011-07-07 change (Bug#1169).
7618
7619 * doc.c (Fsubstitute_command_keys): Doc fix.
7620
efc00ab1 76212012-05-31 Eli Zaretskii <eliz@gnu.org>
a02ae4e5
EZ
7622
7623 * search.c (search_buffer): Remove calls to
7624 r_alloc_inhibit_buffer_relocation, as it is now called by
7625 maybe_unify_char, which was the cause of relocation of buffer text
7626 in bug#11519.
7627
efc00ab1 76282012-05-31 Eli Zaretskii <eliz@gnu.org>
291d430f
EZ
7629
7630 * charset.c (maybe_unify_char): Inhibit relocation of buffer text
7631 for the duration of call to load_charset, to avoid problems with
7632 callers of maybe_unify_char that access buffer text through C
7633 pointers.
7634
7635 * ralloc.c (r_alloc_inhibit_buffer_relocation): Increment and
7636 decrement the inhibition flag, instead of just setting or
7637 resetting it.
7638
ba93a187
PE
76392012-05-31 Paul Eggert <eggert@cs.ucla.edu>
7640
7641 Remove obsolete '#define static' cruft.
7642 * s/hpux10-20.h (_FILE_OFFSET_BITS): Don't #undef.
7643 This #undef was "temporary" in 2000; it is no longer needed
7644 now that '#define static' has gone away.
7645 * xfns.c, xterm.h (gray_bitmap_width, gray_bitmap_height)
7646 (gray_bitmap_bits): Remove; no longer needed.
7647 All uses replaced with definiens.
7648 * xterm.c: Include "bitmaps/gray.xbm".
7649
9e4bf381
PE
76502012-05-30 Paul Eggert <eggert@cs.ucla.edu>
7651
7652 Clean up __executable_start, monstartup when --enable-profiling.
7653 The following changes affect the code only when profiling.
7654 * dispnew.c (__executable_start): Rename from safe_bcopy.
7655 Define only on platforms that need it.
7656 * emacs.c: Include <sys/gmon.h> when profiling.
7657 (_mcleanup): Remove decl, since <sys/gmon.h> does it now.
7658 (__executable_start): Remove decl, since lisp.h does it now.
7659 (safe_bcopy): Remove decl; no longer has that name.
7660 (main): Coalesce #if into single bit of code, for simplicity.
7661 Cast pointers to uintptr_t, since standard libraries want integers
7662 and not pointers.
7663 * lisp.h (__executable_start): New decl.
7664
32d72c2f
GM
76652012-05-31 Glenn Morris <rgm@gnu.org>
7666
7667 * image.c (Fimagemagick_types): Doc fix.
7668
baac5bc7
JM
76692012-05-30 Jim Meyering <meyering@redhat.com>
7670
7671 * callproc.c (Fcall_process_region): Include directory component
7672 in mkstemp error message (Bug#11586).
7673
72cb32cf
PE
76742012-05-30 Paul Eggert <eggert@cs.ucla.edu>
7675
7676 * alloc.c, lisp.h (make_pure_vector): Now static.
7677
61b108cc
SM
76782012-05-30 Stefan Monnier <monnier@iro.umontreal.ca>
7679
7680 * eval.c (Fdefun, Fdefmacro, Vmacro_declaration_function):
7681 Move to byte-run.el.
7682 (Fautoload): Do the hash-doc more carefully.
7683 * data.c (Fdefalias): Purify definition, except for keymaps.
7684 (Qdefun): Move from eval.c.
7685 * lisp.h (Qdefun): Remove.
7686 * lread.c (read1): Tiny simplification.
7687
471fe23d
TN
76882012-05-29 Troels Nielsen <bn.troels@gmail.com>
7689
934f3f58 7690 Do not create empty overlays with the evaporate property (Bug#9642).
471fe23d
TN
7691 * buffer.c (Fmove_overlay): Reinstate the earlier fix for
7692 Bug#9642, but explicitly check that the buffer the overlay would
7693 be moved to is live and rearrange lines to make sure that errors
7694 will not put the overlay in an inconsistent state.
7695 (Fdelete_overlay): Cosmetics.
7696
85d0efd1
EZ
76972012-05-28 Eli Zaretskii <eliz@gnu.org>
7698
7699 * w32term.c (my_bring_window_to_top): New function.
7700 (x_raise_frame): Use handle returned by DeferWindowPos, which
61b108cc
SM
7701 could be different from the original one.
7702 Call my_bring_window_to_top instead of my_set_foreground_window.
85d0efd1
EZ
7703 (Bug#11513)
7704
7705 * w32fns.c (w32_wnd_proc): Accept and process WM_EMACS_BRINGTOTOP
7706 by calling BringWindowToTop.
7707
7708 * w32term.h (WM_EMACS_BRINGTOTOP): New message.
7709 (WM_EMACS_END): Increase by one.
7710
da92a98c
PE
77112012-05-28 Paul Eggert <eggert@cs.ucla.edu>
7712
7713 * bidi.c (bidi_mirror_char): Put eassert before conversion to int.
7714 This avoids undefined behavior that might cause the eassert
7715 to not catch an out-of-range value.
7716
74d1f848
JB
77172012-05-28 Juanma Barranquero <lekktu@gmail.com>
7718
7719 * makefile.w32-in ($(BLD)/w32inevt.$(O), $(BLD)/w32console.$(O)):
7720 Update dependencies.
7721
9e1a06fc
EZ
77222012-05-27 Eli Zaretskii <eliz@gnu.org>
7723
7724 * bidi.c (bidi_mirror_char): Fix last change.
7725
f3dd7312
AS
77262012-05-27 Andreas Schwab <schwab@linux-m68k.org>
7727
7728 * unexmacosx.c (copy_data_segment): Truncate after 16 characters
7729 when referring to sectname field in printf format.
7730
81899c91
PE
77312012-05-27 Paul Eggert <eggert@cs.ucla.edu>
7732
57b81a9f
PE
7733 * lisp.h [REL_ALLOC]: Omit duplicate prototypes.
7734 Only r_alloc_inhibit_buffer_relocation needed to be added;
7735 the others were already declared.
7736
81899c91
PE
7737 * bidi.c (bidi_mirror_char): Don't possibly truncate the integer
7738 before checking whether it's out of range. Put the check inside
7739 eassert. See
7740 <http://lists.gnu.org/archive/html/emacs-devel/2012-05/msg00485.html>.
7741
33017faf 77422012-05-27 Ken Brown <kbrown@cornell.edu>
2f9b9adb
KB
7743
7744 * callproc.c (Fcall_process): Restore a line that was accidentally
7745 commented out in the 2011-02-13 change (bug#11547).
7746
33017faf 77472012-05-27 Eli Zaretskii <eliz@gnu.org>
52c55cc7
EZ
7748
7749 * lisp.h [REL_ALLOC]: Add prototypes for external functions
7750 defined on ralloc.c.
7751
7752 * buffer.c [REL_ALLOC]: Remove prototypes of
7753 r_alloc_reset_variable, r_alloc, r_re_alloc, and r_alloc_free,
7754 they are now on lisp.h.
7755
7756 * ralloc.c (r_alloc_inhibit_buffer_relocation): New function.
7757
7758 * search.c (search_buffer): Use it to inhibit relocation of buffer
7759 text while re_search_2 is doing its job, because re_search_2 is
7760 passed C pointers to buffer text. (Bug#11519)
7761
23415acf
EZ
7762 * msdos.c (internal_terminal_init) <Vwindow_system_version>:
7763 Update value to 24.
7764
44e27368
EZ
7765 * xdisp.c (move_it_to): Under MOVE_TO_Y, when restoring iterator
7766 state after an additional call to move_it_in_display_line_to, keep
7767 the values of it->max_ascent and it->max_descent found for the
7768 entire line.
7769 (pos_visible_p): Revert the comparison against bottom_y to what it
7770 was in revid eliz@gnu.org-20120513182235-4p6386j761ld0nwb.
7771 (Bug#11464)
7772
c1892f11
PE
77732012-05-26 Paul Eggert <eggert@cs.ucla.edu>
7774
7775 Fix coding-related core dumps with gcc -ftrapv.
7776 The code was computing A - B, where A and B are pointers, and B is
7777 random garbage. This can lead to core dumps on platforms that
7778 have special pointer registers, and it also leads to core dumps on
7779 x86-64 when compiled with gcc -ftrapv. The fix is to compute
7780 A - B only when B is initialized properly.
7781 * coding.c (coding_set_source, coding_set_destination): Return void.
7782 (coding_change_source, coding_change_destinations): New functions,
7783 with the old behaviors of coding_set_source and coding_set_destination.
7784 All callers that need an offset changed to use these new functions.
7785
eb7afdad
GM
77862012-05-26 Glenn Morris <rgm@gnu.org>
7787
7788 * nsterm.m (ns_init_paths): Don't mess with INFOPATH. (Bug#2791)
7789
f12fdf02
EZ
77902012-05-26 Eli Zaretskii <eliz@gnu.org>
7791
53a63be6 7792 Extend mouse support on W32 text-mode console.
61b108cc
SM
7793 * xdisp.c (draw_row_with_mouse_face):
7794 Call tty_draw_row_with_mouse_face for WINDOWSNT as well.
eb3f6f01 7795
eb3f6f01 7796 * w32console.c: Include window.h.
61b108cc
SM
7797 (w32con_write_glyphs_with_face, tty_draw_row_with_mouse_face):
7798 New functions.
eb3f6f01
EZ
7799 (initialize_w32_display): Initialize mouse-highlight data.
7800
53a63be6
EZ
7801 * w32inevt.c: Include termchar.h and window.h.
7802 (do_mouse_event): Support mouse-autoselect-window. When the mouse
7803 moves, call note_mouse_highlight. If help_echo changed, call
7804 gen_help_event to produce help-echo message in the echo area.
7805 Call clear_mouse_face if mouse_face_hidden is set in the mouse
7806 highlight info.
7807
4cfd81f6
PE
78082012-05-26 Paul Eggert <eggert@cs.ucla.edu>
7809
7810 * lread.c (read1): Simplify slightly to avoid an overflow warning
7811 with GCC 4.7.0 on x86-64.
7812
4446092a
EZ
78132012-05-26 Eli Zaretskii <eliz@gnu.org>
7814
7815 * bidi.c (bidi_mirror_char): Revert last change: an int is
7816 definitely wide enough here.
7817
42b2a986 78182012-05-25 Paul Eggert <eggert@cs.ucla.edu>
3164aeac 7819
42b2a986 7820 Fix integer width and related bugs (Bug#9874).
eb106a49 7821 * alloc.c (pure_bytes_used_lisp, pure_bytes_used_non_lisp):
d311d28c
PE
7822 (allocate_vectorlike, buffer_memory_full, struct sdata, SDATA_SIZE)
7823 (string_bytes, check_sblock, allocate_string_data):
7824 (compact_small_strings, Fmake_bool_vector, make_string)
7825 (make_unibyte_string, make_multibyte_string)
7826 (make_string_from_bytes, make_specified_string)
7827 (allocate_vectorlike, Fmake_vector, find_string_data_in_pure)
7828 (make_pure_string, make_pure_c_string, make_pure_vector, Fpurecopy)
7829 (mark_vectorlike):
7830 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
7831 (allocate_pseudovector):
7832 Use int, not EMACS_INT, where int is wide enough.
7833 (inhibit_garbage_collection, Fgarbage_collect):
7834 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
7835 * bidi.c (bidi_mirror_char): Use EMACS_INT, not int, where
7836 int might not be wide enough.
7837 (bidi_cache_search, bidi_cache_find, bidi_init_it)
7838 (bidi_count_bytes, bidi_char_at_pos, bidi_fetch_char)
7839 (bidi_at_paragraph_end, bidi_find_paragraph_start)
7840 (bidi_paragraph_init, bidi_resolve_explicit, bidi_resolve_weak)
7841 (bidi_level_of_next_char, bidi_move_to_visually_next):
7842 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
7843 * buffer.c (copy_overlays, Fgenerate_new_buffer_name)
7844 (Fkill_buffer, Fset_buffer_major_mode)
7845 (advance_to_char_boundary, Fbuffer_swap_text)
7846 (Fset_buffer_multibyte, overlays_at, overlays_in)
7847 (overlay_touches_p, struct sortvec, record_overlay_string)
7848 (overlay_strings, recenter_overlay_lists)
7849 (adjust_overlays_for_insert, adjust_overlays_for_delete)
7850 (fix_start_end_in_overlays, fix_overlays_before, modify_overlay)
7851 (Fmove_overlay, Fnext_overlay_change, Fprevious_overlay_change)
7852 (Foverlay_recenter, last_overlay_modification_hooks_used)
7853 (report_overlay_modification, evaporate_overlays, enlarge_buffer_text):
7854 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
977b0e45
PE
7855 (validate_region): Omit unnecessary test for b <= e,
7856 since that's guaranteed by the previous test.
d311d28c
PE
7857 (adjust_overlays_for_delete): Avoid pos + length overflow.
7858 (Fmove_overlay, Fdelete_overlay, add_overlay_mod_hooklist)
7859 (report_overlay_modification):
7860 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
7861 (Foverlays_at, Fnext_overlay_change, Fprevious_overlay_change):
7862 Omit pointer cast, which isn't needed anyway, and doesn't work
7863 after the EMACS_INT -> ptrdiff_t change.
02481186 7864 (Fmove_overlay): Clip BEG and END to ptrdiff_t to avoid overflow.
d311d28c
PE
7865 * buffer.h: Adjust decls to match defn changes elsewhere.
7866 (struct buffer_text, struct buffer):
7867 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
7868 Use EMACS_INT, not int, where int might not be wide enough.
39b5db3b
PE
7869 * bytecode.c (unmark_byte_stack, exec_byte_code): Use ptrdiff_t,
7870 not int, to avoid needless 32-bit limit on 64-bit hosts.
7871 (exec_byte_code): Use tighter memory-full test, one that checks
7872 for alloca overflow. Don't compute the address of the object just
7873 before an array, as that's not portable. Use EMACS_INT, not
7874 ptrdiff_t or int, where ptrdiff_t or int might not be wide enough.
d311d28c
PE
7875 * callint.c (Fcall_interactively):
7876 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
7877 * callproc.c (call_process_kill, Fcall_process):
7878 Don't assume pid_t fits into an Emacs fixnum.
7879 (call_process_cleanup, Fcall_process, child_setup):
7880 Don't assume pid_t fits into int.
7881 (call_process_cleanup, Fcall_process, delete_temp_file)
7882 (Fcall_process_region):
7883 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
7884 (Fcall_process): Simplify handling of volatile integers.
7885 Use int, not EMACS_INT, where int will do.
7886 * casefiddle.c (casify_object, casify_region, operate_on_word)
7887 (Fupcase_word, Fdowncase_word, Fcapitalize_word):
7888 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
7889 (casify_object): Avoid integer overflow when overallocating buffer.
7890 * casetab.c (set_identity, shuffle): Prefer int to unsigned when
45c2afd6 7891 either works. Use lint_assume to convince GCC 4.6.1 that it's OK.
d311d28c
PE
7892 * category.c (Fchar_category_set): Don't assume fixnum fits in int.
7893 * category.h (CATEGORYP): Don't assume arg is nonnegative.
7894 * ccl.c (GET_CCL_INT): Remove; no longer needed, since the
7895 integers are now checked earlier. All uses replaced with XINT.
7896 (ccl_driver):
7897 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
7898 For CCL_MapSingle, check that content and value are in int range.
c801946a
PE
7899 (ccl_driver, Fregister_code_conversion_map):
7900 Check that Vcode_version_map_vector is a vector.
d311d28c
PE
7901 (resolve_symbol_ccl_program): Check that vector header is in range.
7902 Always copy the vector, so that we can check its contents reliably
7903 now rather than having to recheck each instruction as it's being
7904 executed. Check that vector words fit in 'int'.
7905 (ccl_get_compiled_code, Fregister_ccl_program)
7906 (Fregister_code_conversion_map): Use ptrdiff_t, not int, for
7907 program indexes, to avoid needless 32-bit limit on 64-bit hosts.
7908 (Fccl_execute, Fccl_execute_on_string): Check that initial reg
7909 contents are in range.
7910 (Fccl_execute_on_string): Check that status is in range.
7911 * ccl.h (struct ccl_program.idx): Now ptrdiff_t, not int.
7912 * character.c (char_resolve_modifier_mask, Fchar_resolve_modifiers):
7913 Accept and return EMACS_INT, not int, because callers can pass values
7914 out of 'int' range.
7915 (c_string_width, strwidth, lisp_string_width, chars_in_text)
7916 (multibyte_chars_in_text, parse_str_as_multibyte)
7917 (str_as_multibyte, count_size_as_multibyte, str_to_multibyte)
7918 (str_as_unibyte, str_to_unibyte, string_count_byte8)
7919 (string_escape_byte8, Fget_byte):
7920 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
a14e1568 7921 (Funibyte_string): Use CHECK_RANGED_INTEGER, not CHECK_NATNUM, to
d311d28c
PE
7922 avoid mishandling large integers.
7923 * character.h: Adjust decls to match defn changes elsewhere.
7924 * charset.c (load_charset_map_from_file, find_charsets_in_text)
7925 (Ffind_charset_region):
7926 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
7927 (load_charset_map_from_file): Redo idx calculation to avoid overflow.
7928 (load_charset_map_from_vector, Fdefine_charset_internal):
3c7649c1 7929 Don't assume fixnum fits in int.
d311d28c
PE
7930 (load_charset_map_from_vector, Fmap_charset_chars):
7931 Remove now-unnecessary CHECK_NATNUMs.
7932 (Fdefine_charset_internal): Check ranges here, more carefully.
3c7649c1
PE
7933 Don't rely on undefined behavior with signed left shift overflow.
7934 Don't assume unsigned int fits into fixnum, or that fixnum fits
7935 into unsigned int. Don't require max_code to be a valid fixnum;
7936 that's not true for gb10830 4-byte on a 32-bit host. Allow
7937 invalid_code to be a cons, for the same reason. Require code_offset
7938 to be a character. Avoid int overflow if max_char is close
7939 to INT_MAX.
7940 (CODE_POINT_TO_INDEX): On 32-bit hosts, return int, not unsigned;
7941 this is intended anyway and avoids some undefined behavior.
7942 (load_charset_map): Pass unsigned, not int, as 2nd arg of
7943 INDEX_TO_CODE_POINT, as that's what it expects.
7944 (Funify_charset, encode_char): Don't stuff unsigned vals into int vars.
60ad3eab
PE
7945 * charset.h (DECODE_CHAR): Return int, not unsigned;
7946 this is what was intended anyway, and it avoids undefined behavior.
7947 (CHARSET_OFFSET): Remove unused macro, instead of fixing its
7948 integer-overflow issues.
7949 (ENCODE_CHAR): Return unsigned on all hosts, not just on 32-bit hosts.
7950 Formerly, it returned EMACS_INT on 64-bit hosts in the common case
7951 where the argument is EMACS_INT, and this behavior is not intended.
d311d28c
PE
7952 * chartab.c (Fmake_char_table, Fset_char_table_range)
7953 (uniprop_get_decoder, uniprop_get_encoder):
7954 Don't assume fixnum fits in int.
7955 * cmds.c (move_point): New function, that does the gist of
7956 Fforward_char and Fbackward_char, but does so while checking
7957 for integer overflow more accurately.
c96e5d6a 7958 (Fforward_char, Fbackward_char): Use it.
d311d28c
PE
7959 (Fforward_line, Fend_of_line, internal_self_insert)
7960 (internal_self_insert):
7961 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
7962 Fix a FIXME, by checking for integer overflow when calculating
7963 target_clm and actual_clm.
7964 * coding.c (detect_coding_XXX, encode_coding_XXX, CODING_DECODE_CHAR)
8f50130c 7965 (CODING_ENCODE_CHAR, CODING_CHAR_CHARSET, CODING_CHAR_CHARSET_P)
d311d28c
PE
7966 (ASSURE_DESTINATION, coding_alloc_by_realloc)
7967 (coding_alloc_by_making_gap, alloc_destination)
7968 (detect_coding_utf_8, encode_coding_utf_8, decode_coding_utf_16)
7969 (encode_coding_utf_16, detect_coding_emacs_mule)
7970 (decode_coding_emacs_mule, encode_coding_emacs_mule)
7971 (detect_coding_iso_2022, decode_coding_iso_2022)
7972 (encode_invocation_designation, encode_designation_at_bol)
7973 (encode_coding_iso_2022, detect_coding_sjis, detect_coding_big5)
7974 (decode_coding_sjis, decode_coding_big5, encode_coding_sjis)
7975 (encode_coding_big5, detect_coding_ccl, decode_coding_ccl)
7976 (encode_coding_ccl, encode_coding_raw_text)
7977 (detect_coding_charset, decode_coding_charset)
7978 (encode_coding_charset, detect_eol, decode_eol, produce_chars)
7979 (produce_composition, produce_charset, produce_annotation)
7980 (decode_coding, handle_composition_annotation)
7981 (handle_charset_annotation, consume_chars, decode_coding_gap)
7982 (decode_coding_object, encode_coding_object, detect_coding_system)
7983 (Ffind_coding_systems_region_internal, Fcheck_coding_systems_region)
7984 (code_convert_region, code_convert_string)
8f50130c
PE
7985 (Fdefine_coding_system_internal)
7986 (coding_set_source, coding_set_destination):
d311d28c
PE
7987 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
7988 (setup_iso_safe_charsets, consume_chars, Funencodable_char_position)
7989 (Fdefine_coding_system_internal):
7990 Don't assume fixnums fit in int.
7991 (decode_coding_gap, decode_coding_object, encode_coding_object)
5895d7b9 7992 (Fread_coding_system, Fdetect_coding_region)
2c6a9faa
PE
7993 (Funencodable_char_position, Fcheck_coding_systems_region)
7994 (get_translation, handle_composition_annotation, consume_chars):
d311d28c 7995 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
977b0e45 7996 (consume_chars): Rewrite to not calculate an address outside buffer.
d311d28c 7997 (Ffind_operation_coding_system): NATNUMP can eval its arg twice.
7b09a37a 7998 Don't access memory outside of the args array.
d311d28c 7999 (Fdefine_coding_system_internal): Check for charset-id overflow.
47664caa
PE
8000 (ENCODE_ISO_CHARACTER): Use unsigned, not int, to store the unsigned
8001 result of ENCODE_CHAR.
d311d28c
PE
8002 * coding.h: Adjust decls to match defn changes elsewhere.
8003 (struct coding_system):
8004 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8005 * composite.c (get_composition_id, find_composition)
8006 (run_composition_function, update_compositions)
8007 (compose_text, composition_gstring_put_cache)
8008 (composition_gstring_p, composition_gstring_width)
8009 (fill_gstring_header, fill_gstring_body, autocmp_chars)
8010 (composition_compute_stop_pos, composition_reseat_it)
8011 (composition_update_it, struct position_record)
8012 (find_automatic_composition, composition_adjust_point)
8013 (Fcomposition_get_gstring, Ffind_composition_internal):
8014 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8015 (update_compositions):
8016 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8017 * composite.h: Adjust decls to match defn changes elsewhere.
8018 (struct composition):
8019 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8020 * data.c (let_shadows_buffer_binding_p, let_shadows_global_binding_p):
8021 Do not attempt to compute the address of the object just before a
8022 buffer; this is not portable.
8023 (Faref, Faset):
8024 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8025 (Faset): Use int, not EMACS_INT, where int is wide enough.
8026 (Fstring_to_number): Don't assume fixnums fit in int.
8027 (Frem): Don't assume arg is nonnegative.
8028 * dbusbind.c (xd_append_arg): Check for integers out of range.
8029 (Fdbus_call_method): Don't overflow the timeout int.
42b2a986 8030 (extract_signed, extract_unsigned): New functions.
243e0530
PE
8031 (XD_CHECK_DBUS_SERIAL): Remove; superseded by extract_unsigned.
8032 (xd_get_connection_references): Return ptrdiff_t, not int.
8033 All uses changed.
8034 (xd_signature, xd_append_arg, xd_retrieve_arg, Fdbus_message_internal)
8035 (xd_read_message_1):
8036 Use int, not unsigned, where the dbus API uses int.
8037 (Fdbus_message_internal): Don't overflow mtype.
8038 (syms_of_dbusbind): Allocate right-sized buffer for integers.
d311d28c
PE
8039 * dired.c (directory_files_internal, file_name_completion, scmp)
8040 (file_name_completion_stat):
8041 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8042 (file_name_completion): Don't overflow matchcount.
8043 (file_name_completion_stat): Use SAFE_ALLOCA, not alloca.
8044 * dispextern.h: Adjust decls to match defn changes elsewhere.
8045 (struct text_pos, struct glyph, struct bidi_saved_info)
8046 (struct bidi_string_data, struct bidi_it, struct composition_it)
8047 (struct it):
8048 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8049 (struct display_pos, struct composition_it, struct it):
8050 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8051 * dispnew.c (increment_matrix_positions)
8052 (increment_row_positions, mode_line_string)
8053 (marginal_area_string):
8054 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
54e1617f 8055 (change_frame_size_1, Fredisplay, Fframe_or_buffer_changed_p):
d311d28c
PE
8056 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8057 (duration_to_sec_usec): New function, to check for overflow better.
8058 (Fsleep_for, sit_for): Use it.
8059 * doc.c (get_doc_string, store_function_docstring):
8060 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8061 (get_doc_string, Fsnarf_documentation):
8062 Use int, not EMACS_INT, where int is wide enough.
8063 (get_doc_string):
8064 Use SAFE_ALLOCA, not alloca.
8065 Check for overflow when converting EMACS_INT to off_t.
8066 * doprnt.c (doprnt):
8067 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8068 * editfns.c (init_editfns, Fuser_uid, Fuser_real_uid):
8069 Don't assume uid_t fits into fixnum.
8070 (buildmark, Fgoto_char, overlays_around, find_field, Fdelete_field)
8071 (Ffield_string, Ffield_string_no_properties, Ffield_beginning)
8072 (Ffield_end, Fconstrain_to_field, Fline_beginning_position)
8073 (Fline_end_position, Fprevious_char, Fchar_after, Fchar_before)
8074 (general_insert_function)
8075 (Finsert_char, make_buffer_string, make_buffer_string_both)
8076 (update_buffer_properties, Fbuffer_substring)
8077 (Fbuffer_substring_no_properties, Fcompare_buffer_substrings)
8078 (Fsubst_char_in_region, check_translation)
8079 (Ftranslate_region_internal, save_restriction_restore, Fformat)
8080 (transpose_markers, Ftranspose_regions):
8081 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8082 (clip_to_bounds): Move to lisp.h as an inline function).
8083 (Fconstrain_to_field): Don't assume integers are nonnegative.
8084 (Fline_beginning_position, Fsave_excursion, Fsave_current_buffer):
8085 (Fsubst_char_in_region, Fsave_restriction):
8086 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8087 (Femacs_pid): Don't assume pid_t fits into fixnum.
8088 (lo_time): Use int, not EMACS_INT, when int suffices.
8089 (lisp_time_argument): Check for usec out of range.
8090 (Fencode_time): Don't assume fixnum fits in int.
3f4eabd1
PE
8091 (Fuser_login_name, Fuser_full_name): Signal an error
8092 if a uid argument is out of range, rather than relying on
8093 undefined behavior.
c8d5c857
PE
8094 (Fformat_time_string): Remove now-unnecessary check.
8095 lisp_time_argument checks for out-of-range usec now.
243e0530 8096 Use ptrdiff_t, not size_t, where ptrdiff_t will do.
d311d28c
PE
8097 * emacs.c (gdb_valbits, gdb_gctypebits): Now int, not EMACS_INT.
8098 (gdb_data_seg_bits): Now uintptr_t, not EMACS_INT.
8099 (PVEC_FLAG, gdb_array_mark_flag): Now ptrdiff_t, not EMACS_INT.
8100 (init_cmdargs, Fdump_emacs):
8101 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8102 (Fkill_emacs): Don't assume fixnum fits in int; instead, take just
8103 the bottom (typically) 32 bits of the fixnum.
8104 * eval.c (specpdl_size, call_debugger):
8105 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8106 (when_entered_debugger, Fbacktrace_debug):
8107 Don't assume fixnum can fit in int.
8108 (Fdefvaralias, Fdefvar): Do not attempt to compute the address of
8109 the object just before a buffer; this is not portable.
8110 (FletX, Flet, Funwind_protect, do_autoload, Feval, funcall_lambda)
8111 (grow_specpdl, unbind_to):
8112 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8113 (Fapply, apply_lambda): Don't assume ptrdiff_t can hold fixnum.
8114 (grow_specpdl): Simplify allocation by using xpalloc.
856bbc81 8115 (Fprog1, Fprog2): Don't assume list length fits in int. Simplify.
d311d28c
PE
8116 * fileio.c (Ffind_file_name_handler, Fcopy_file, Frename_file)
8117 (Finsert_file_contents, Fwrite_region, Fdo_auto_save):
8118 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8119 (Ffind_file_name_handler, non_regular_inserted, Finsert_file_contents)
8120 (a_write, e_write):
8121 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8122 (Fcopy_file, non_regular_nbytes, read_non_regular)
8123 (Finsert_file_contents):
8124 Use int, not EMACS_INT, where int is wide enough.
8125 (READ_BUF_SIZE): Verify that it fits in int.
8126 (Finsert_file_contents): Check that counts are in proper range,
8127 rather than assuming fixnums fit into ptrdiff_t etc.
8128 Don't assume fixnums fit into int.
125b3835 8129 * floatfns.c (Fexpt): Avoid undefined signed * signed overflow.
5895d7b9
PE
8130 * fns.c (Fcompare_strings, Fstring_lessp, struct textprop_rec, concat)
8131 (string_char_byte_cache_charpos, string_char_byte_cache_bytepos)
d311d28c
PE
8132 (string_char_to_byte, string_byte_to_char)
8133 (string_make_multibyte, string_to_multibyte)
8134 (string_make_unibyte, Fstring_as_unibyte, Fstring_as_multibyte)
8135 (Fstring_to_unibyte, Fsubstring, Fsubstring_no_properties)
8136 (substring_both, Fdelete, internal_equal, Ffillarray)
8137 (Fclear_string, mapcar1)
8138 (Fbase64_encode_region, Fbase64_encode_string, base64_encode_1)
8139 (Fbase64_decode_region, Fbase64_decode_string, base64_decode_1)
8140 (larger_vector, make_hash_table, maybe_resize_hash_table)
8141 (hash_lookup, hash_remove_from_table, hash_clear, sweep_weak_table)
8142 (Fmaphash, secure_hash):
8143 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8144 (concat): Check for string index and length overflow.
8145 (Fmapconcat): Don't assume fixnums fit into ptrdiff_t.
8146 (Frequire):
8147 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8148 (larger_vector): New API (vec, incr_min, size_max) replaces old
8149 one (vec, new_size, init). This catches size overflow.
8150 INIT was removed because it was always Qnil.
8151 All callers changed.
8152 (INDEX_SIZE_BOUND): New macro, which calculates more precisely
8153 the upper bound on a hash table index size.
8154 (make_hash_table, maybe_resize_hash_table): Use it.
8155 (secure_hash): Computer start_byte and end_byte only after
8156 they're known to be in ptrdiff_t range.
8157 * font.c (font_intern_prop, font_at, font_range, Ffont_shape_gstring)
8158 (Ffont_get_glyphs, Ffont_at):
8159 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8160 (font_style_to_value, font_prop_validate_style, font_expand_wildcards)
8161 (Flist_fonts, Fopen_font):
8162 Don't assume fixnum can fit in int.
8163 (check_gstring): Don't assume index can fit in int.
8164 (font_match_p): Check that fixnum is a character, not a nonnegative
8165 fixnum, since the later code needs to stuff it into an int.
8166 (font_find_for_lface): Use SAFE_ALLOCA_LISP, not alloca.
8167 (font_fill_lglyph_metrics): Use unsigned, not EMACS_INT, to avoid
8168 conversion overflow issues.
8169 (Fopen_font): Check for integer out of range.
8170 (Ffont_get_glyphs): Don't assume index can fit in int.
8171 * font.h: Adjust decls to match defn changes elsewhere.
8172 * fontset.c (reorder_font_vector): Redo score calculation to avoid
8173 integer overflow.
8174 (num_auto_fontsets, fontset_from_font): Use ptrdiff_t, not
8175 printmax_t, where ptrdiff_t is wide enough.
8176 (Finternal_char_font):
8177 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8178 * frame.c (Fset_mouse_position, Fset_mouse_pixel_position)
8179 (Fset_frame_height, Fset_frame_width, Fset_frame_size)
8180 (Fset_frame_position, x_set_frame_parameters)
8181 (x_set_line_spacing, x_set_border_width)
8182 (x_set_internal_border_width, x_set_alpha, x_figure_window_size):
8183 Check that fixnums are in proper range for system types.
8184 (frame_name_fnn_p, Fframe_parameter, Fmodify_frame_parameters):
8185 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8186 (Fmodify_frame_parameters): Don't assume fixnum fits in int.
8187 Use SAFE_ALLOCA_LISP, not alloca.
8188 * frame.h (struct frame): Use intptr_t, not EMACS_INT, where
8189 intptr_t is wide enough.
8190 * fringe.c (lookup_fringe_bitmap, get_logical_fringe_bitmap)
8191 (Fdefine_fringe_bitmap): Don't assume fixnum fits in int.
8192 (Ffringe_bitmaps_at_pos): Don't assume index fits in int.
8193 Check for fixnum out of range.
8194 * ftfont.c (ftfont_list): Don't assume index fits in int.
8195 Check that fixnums are in proper range for system types.
8196 (ftfont_shape_by_flt):
8197 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
d311d28c
PE
8198 * gnutls.c (emacs_gnutls_write, emacs_gnutls_read):
8199 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8200 (Fgnutls_error_fatalp, Fgnutls_error_string, Fgnutls_boot):
8201 Check that fixnums are in proper range for system types.
8202 * gnutls.h: Adjust decls to match defn changes elsewhere.
8203 * gtkutil.c (xg_dialog_run):
8204 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8205 (update_frame_tool_bar):
8206 Check that fixnums are in proper range for system types.
8207 * image.c (parse_image_spec): Redo count calculation to avoid overflow.
5895d7b9 8208 (lookup_image): Check that fixnums are in range for system types.
d311d28c
PE
8209 * indent.c (last_known_column, last_known_column_point):
8210 (current_column_bol_cache):
8211 (skip_invisible, current_column, check_display_width):
8212 (check_display_width, scan_for_column, current_column_1)
8213 (Findent_to, Fcurrent_indentation, position_indentation)
8214 (indented_beyond_p, Fmove_to_column, compute_motion):
8215 (Fcompute_motion, Fvertical_motion):
8216 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8217 (last_known_column_modified): Use EMACS_INT, not int.
8218 (check_display_width):
8219 (Fcompute_motion):
8220 Check that fixnums and floats are in proper range for system types.
8221 (compute_motion): Don't assume index or fixnum fits in int.
8222 (compute_motion, Fcompute_motion):
8223 Use int, not EMACS_INT, when it is wide enough.
8224 (vmotion): Omit local var start_hpos that is always 0; that way
8225 we don't need to worry about overflow in expressions involving it.
8226 * indent.h: Adjust decls to match defn changes elsewhere.
8227 (struct position):
8228 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8229 Use int, not EMACS_INT, where int is wide enough.
8230 Remove unused members ovstring_chars_done and tab_offset;
8231 all uses removed.
8232 * insdel.c (move_gap, move_gap_both, gap_left, gap_right)
8233 (adjust_markers_for_delete, adjust_markers_for_insert, adjust_point)
8234 (adjust_markers_for_replace, make_gap_larger, make_gap_smaller)
8235 (make_gap, copy_text, insert, insert_and_inherit)
8236 (insert_before_markers, insert_before_markers_and_inherit)
8237 (insert_1, count_combining_before, count_combining_after)
8238 (insert_1_both, insert_from_string)
8239 (insert_from_string_before_markers, insert_from_string_1)
8240 (insert_from_gap, insert_from_buffer, insert_from_buffer_1)
8241 (adjust_after_replace, adjust_after_insert, replace_range)
8242 (replace_range_2, del_range, del_range_1, del_range_byte)
8243 (del_range_both, del_range_2, modify_region)
8244 (prepare_to_modify_buffer, signal_before_change)
8245 (signal_after_change, Fcombine_after_change_execute):
8246 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8247 * intervals.c (traverse_intervals, rotate_right, rotate_left)
8248 (balance_an_interval, split_interval_right, split_interval_left)
8249 (find_interval, next_interval, update_interval)
8250 (adjust_intervals_for_insertion, delete_node, delete_interval)
8251 (interval_deletion_adjustment, adjust_intervals_for_deletion)
8252 (static_offset_intervals, offset_intervals)
8253 (merge_interval_right, merge_interval_left, make_new_interval)
8254 (graft_intervals_into_buffer, temp_set_point_both)
8255 (temp_set_point, set_point, adjust_for_invis_intang)
8256 (set_point_both, move_if_not_intangible, get_property_and_range)
8257 (get_local_map, copy_intervals, copy_intervals_to_string)
8258 (compare_string_intervals, set_intervals_multibyte_1):
8259 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8260 * intervals.h: Adjust decls to match defn changes elsewhere.
8261 (struct interval):
8262 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8263 * keyboard.c (this_command_key_count, this_single_command_key_start)
8264 (before_command_key_count, before_command_echo_length, echo_now)
8265 (echo_length, recursive_edit_1, Frecursive_edit, Ftrack_mouse)
8266 (command_loop_1, safe_run_hooks, read_char, timer_check_2)
8267 (menu_item_eval_property, read_key_sequence, Fread_key_sequence)
8268 (Fread_key_sequence_vector, Fexecute_extended_command, Fsuspend_emacs):
8269 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8270 (last_non_minibuf_size, last_point_position, echo_truncate)
8271 (command_loop_1, adjust_point_for_property, read_char, gen_help_event)
8272 (make_lispy_position, make_lispy_event, parse_modifiers_uncached)
8273 (parse_modifiers, modify_event_symbol, Fexecute_extended_command)
8274 (stuff_buffered_input):
8275 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8276 (last_auto_save, command_loop_1, read_char):
8277 Use EMACS_INT, not int, to avoid integer overflow.
8278 (record_char): Avoid overflow in total_keys computation.
8279 (parse_modifiers_uncached): Redo index calculation to avoid overflow.
8280 * keyboard.h: Adjust decls to match defn changes elsewhere.
8281 * keymap.c (Fdefine_key, Fcurrent_active_maps, accessible_keymaps_1)
8282 (Fkey_description, Fdescribe_vector, Flookup_key):
8283 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8284 (click_position): New function, to check that positions are in range.
8285 (Fcurrent_active_maps):
8286 (describe_command):
8287 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8288 (Faccessible_keymaps, Fkey_description):
8289 (preferred_sequence_p):
8290 Don't assume fixnum can fit into int.
8291 (Fkey_description): Use SAFE_ALLOCA_LISP, not alloca.
8292 Check for integer overflow in size calculations.
8293 (Ftext_char_description): Use CHECK_CHARACTER, not CHECK_NUMBER, to
8294 avoid mishandling large integers.
8295 * lisp.h: Adjust decls to match defn changes elsewhere.
8296 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, struct Lisp_String)
8297 (struct vectorlike_header, struct Lisp_Subr, struct Lisp_Hash_Table)
8298 (struct Lisp_Marker):
8299 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8300 (clip_to_bounds): Now an inline function, moved here from editfns.c.
d311d28c
PE
8301 (GLYPH_CODE_P): Check for overflow in system types, subsuming the
8302 need for GLYPH_CODE_CHAR_VALID_P and doing proper checking ourselves.
8303 All callers changed.
8304 (GLYPH_CODE_CHAR, GLYPH_CODE_FACE):
8305 Assume the arg has valid form, since it always does.
8306 (TYPE_RANGED_INTEGERP): Avoid bug when checking against a wide
8307 unsigned integer system type.
8308 (CHECK_RANGED_INTEGER, CHECK_TYPE_RANGED_INTEGER): New macros.
8309 (struct catchtag, specpdl_size, SPECPDL_INDEX, USE_SAFE_ALLOCA):
8310 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8311 (struct catchtag): Use EMACS_INT, not int, since it may be a fixnum.
8312 (duration_to_sec_usec): New decl.
8313 * lread.c (read_from_string_index, read_from_string_index_byte)
8314 (read_from_string_limit, readchar, unreadchar, openp)
8315 (read_internal_start, read1, oblookup):
8316 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8317 (Fload, readevalloop, Feval_buffer, Feval_region):
8318 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8319 (openp): Check for out-of-range argument to 'access'.
8320 (read1): Use int, not EMACS_INT, where int is wide enough.
8321 Don't assume fixnum fits into int.
6efdadfd 8322 Fix off-by-one error that can read outside a buffer.
1ab7b8ac
PE
8323 (read_filtered_event): Use duration_to_sec_usec
8324 to do proper overflow checking on durations.
d311d28c
PE
8325 * macros.c (Fstart_kbd_macro): Use xpalloc to check for overflow
8326 in size calculation.
8327 (Fexecute_kbd_macro):
8328 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8329 * marker.c (cached_charpos, cached_bytepos, CONSIDER)
8330 (byte_char_debug_check, buf_charpos_to_bytepos, verify_bytepos)
8331 (buf_bytepos_to_charpos, Fset_marker, set_marker_restricted)
8332 (set_marker_both, set_marker_restricted_both, marker_position)
8333 (marker_byte_position, Fbuffer_has_markers_at):
8334 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8335 (Fset_marker, set_marker_restricted): Don't assume fixnum fits in int.
61b108cc 8336 * menu.c (ensure_menu_items): Rename from grow_menu_items.
d311d28c
PE
8337 It now merely ensures that the menu is large enough, without
8338 necessarily growing it, as this avoids some integer overflow issues.
8339 All callers changed.
8340 (keymap_panes, parse_single_submenu, Fx_popup_menu):
8341 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8342 (parse_single_submenu, Fx_popup_menu): Don't assume fixnum fits in int.
8343 Use SAFE_ALLOCA_LISP, not alloca.
8344 (find_and_return_menu_selection): Avoid unnecessary casts of pointers
8345 to EMACS_INT. Check that fixnums are in proper range for system types.
8346 * minibuf.c (minibuf_prompt_width, string_to_object)
8347 (Fminibuffer_contents, Fminibuffer_contents_no_properties)
8348 (Fminibuffer_completion_contents, Ftry_completion, Fall_completions):
8349 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8350 (get_minibuffer, read_minibuf_unwind):
8351 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8352 (read_minibuf): Omit unnecessary arg BACKUP_N, which is always nil;
8353 this simplifies overflow checking. All callers changed.
8354 (read_minibuf, Fread_buffer, Ftry_completion, Fall_completions)
8355 (Ftest_completion):
8356 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8357 * nsfns.m (check_ns_display_info): Don't assume fixnum fits in long.
8358 (x_set_menu_bar_lines, x_set_tool_bar_lines, Fx_create_frame):
8359 Check that fixnums are in proper range for system types.
8360 (Fx_create_frame, Fx_show_tip):
8361 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8362 * nsfont.m (ns_findfonts, nsfont_list_family):
8363 Don't assume fixnum fits in long.
8364 * nsmenu.m (ns_update_menubar, ns_menu_show, ns_popup_dialog):
8365 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8366 (ns_update_menubar): Use intptr_t, not EMACS_INT, when intptr_t is
8367 wide enough.
17fdb222 8368 * nsselect.m (ns_get_local_selection, clean_local_selection_data):
d311d28c
PE
8369 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8370 * print.c (print_buffer_size, print_buffer_pos, print_buffer_pos_byte)
8371 (PRINTDECLARE, PRINTPREPARE):
8372 (strout, print_string):
8373 (print, print_preprocess, print_check_string_charset_prop)
8374 (print_object):
8375 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8376 (PRINTDECLARE):
8377 (temp_output_buffer_setup, Fprin1_to_string, print_object):
8378 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8379 (PRINTPREPARE): Use int, not ptrdiff_t, where int is wide enough.
d311d28c 8380 (printchar, strout): Use xpalloc to catch size calculation overflow.
0fd11aa5 8381 (Fexternal_debugging_output): Don't overflow EMACS_INT->int conversion.
d311d28c
PE
8382 (print_error_message): Use SAFE_ALLOCA, not alloca.
8383 (print_object): Use int, not EMACS_INT, where int is wide enough.
a8b7caa3
PE
8384 (print_depth, new_backquote_output, print_number_index):
8385 Use ptrdiff_t, not int, where int might not be wide enough.
d311d28c
PE
8386 * process.c (Fdelete_process): Don't assume pid fits into EMACS_INT.
8387 (Fset_process_window_size, Fformat_network_address)
8388 (get_lisp_to_sockaddr_size, set_socket_option, Fmake_network_process)
d44287d4 8389 (sigchld_handler):
d311d28c 8390 Check that fixnums are in proper range for system types.
d44287d4 8391 (Fsignal_process): Simplify by avoiding a goto.
d83cf4cc
PE
8392 Check for process-ids out of pid_t range rather than relying on
8393 undefined behavior.
e4d81efc 8394 (process_tick, update_tick): Use EMACS_INT, not int.
d311d28c
PE
8395 (Fformat_network_address, read_process_output, send_process)
8396 (Fprocess_send_region, status_notify):
8397 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8398 (Fformat_network_address, Fmake_serial_process, Fmake_network_process)
8399 (wait_reading_process_output, read_process_output, exec_sentinel):
8400 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8401 (conv_lisp_to_sockaddr): Don't assume fixnums fit into int.
8402 (Faccept_process_output): Use duration_to_sec_usec to do proper
8403 overflow checking on durations.
dde14581
PE
8404 (emacs_get_tty_pgrp, Fprocess_running_child_p, process_send_signal):
8405 Don't assume pid_t fits in int.
02481186
PE
8406 * process.h (struct Lisp_Process): Members tick and update_tick
8407 are now of type EMACS_INT, not int.
b62b53e8
PE
8408 * puresize.h (PURESIZE_RATIO): Shrink this to 8/6 on 32-bit hosts
8409 configured --with-wide-int.
d311d28c
PE
8410 * scroll.c (calculate_scrolling, calculate_direct_scrolling)
8411 (line_ins_del): Use int, not EMACS_INT, where int is wide enough.
8412 * search.c (looking_at_1, string_match_1):
8413 (fast_string_match, fast_c_string_match_ignore_case)
8414 (fast_string_match_ignore_case, fast_looking_at, scan_buffer)
8415 (scan_newline, find_before_next_newline, search_command)
8416 (trivial_regexp_p, search_buffer, simple_search, boyer_moore)
8417 (set_search_regs, wordify):
8418 (Freplace_match):
8419 (Fmatch_data):
8420 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8421 (string_match_1, search_buffer, set_search_regs):
8422 (Fmatch_data):
8423 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8424 (wordify): Check for overflow in size calculation.
8425 (Freplace_match): Avoid potential buffer overflow in search_regs.start.
8426 (Fset_match_data): Don't assume fixnum fits in ptrdiff_t.
8427 Check that fixnums are in proper range for system types.
8428 * sound.c (struct sound_device)
8429 (wav_play, au_play, vox_write, alsa_period_size, alsa_write):
8430 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8431 (Fplay_sound_internal):
8432 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
eacd378d 8433 * syntax.c (struct lisp_parse_state, find_start_modiff)
d311d28c
PE
8434 (Finternal_describe_syntax_value, scan_lists, scan_sexps_forward):
8435 (Fparse_partial_sexp):
8436 Don't assume fixnums can fit in int.
8437 (struct lisp_parse_state, find_start_pos, find_start_value)
8438 (find_start_value_byte, find_start_begv)
8439 (update_syntax_table, char_quoted, dec_bytepos)
8440 (find_defun_start, prev_char_comend_first, back_comment):
8441 (scan_words, skip_chars, skip_syntaxes, forw_comment, Fforward_comment)
8442 (scan_lists, Fbackward_prefix_chars, scan_sexps_forward):
8443 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8444 (Finternal_describe_syntax_value): Check that match_lisp is a
8445 character, not an integer, since the code stuffs it into int.
8446 (scan_words, scan_sexps_forward):
8447 Check that fixnums are in proper range for system types.
8448 (Fforward_word):
8449 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8450 (scan_sexps_forward):
8451 Use CHARACTERP, not INTEGERP, since the value must fit into int.
8452 (Fparse_partial_sexp): Fix doc; element 8 is not ignored.
8453 * syntax.h: Adjust decls to match defn changes elsewhere.
8454 (struct gl_state_s):
8455 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
e4ecdc9c
PE
8456 (SETUP_SYNTAX_TABLE_FOR_OBJECT): Use PTRDIFF_MAX, not
8457 MOST_POSITIVE_FIXNUM.
d311d28c
PE
8458 * sysdep.c (wait_for_termination_1, wait_for_termination)
8459 (interruptible_wait_for_termination, mkdir):
8460 Don't assume pid_t fits in int; on 64-bit AIX pid_t is 64-bit.
8461 (emacs_read, emacs_write):
8462 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
225a2cff
PE
8463 (system_process_attributes): Don't assume uid_t, gid_t, EMACS_INT,
8464 and double all fit in int.
d311d28c
PE
8465 * term.c (set_tty_color_mode):
8466 Check that fixnums are in proper range for system types.
8467 * termhooks.h (struct input_event):
8468 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8469 * textprop.c (validate_interval_range, interval_of)
8470 (Fadd_text_properties, set_text_properties_1)
8471 (Fremove_text_properties, Fremove_list_of_text_properties)
8472 (Ftext_property_any, Ftext_property_not_all)
8473 (copy_text_properties, text_property_list, extend_property_ranges)
8474 (verify_interval_modification):
8475 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8476 (Fnext_single_char_property_change)
8477 (Fprevious_single_char_property_change):
8478 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
5895d7b9
PE
8479 (copy_text_properties):
8480 Check for integer overflow in index calculation.
d311d28c
PE
8481 * undo.c (last_boundary_position, record_point, record_insert)
8482 (record_delete, record_marker_adjustment, record_change)
8483 (record_property_change):
8484 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8485 (truncate_undo_list, Fprimitive_undo): Don't assume fixnum fits in int.
8486 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8487 * w32fns.c (Fx_create_frame, x_create_tip_frame, Fx_show_tip)
8488 (Fx_hide_tip, Fx_file_dialog):
8489 * w32menu.c (set_frame_menubar):
8490 Use ptrdiff_t, not int, for consistency with rest of code.
8491 * window.c (window_scroll_preserve_hpos, window_scroll_preserve_vpos)
8492 (select_window, Fdelete_other_windows_internal)
8493 (window_scroll_pixel_based, window_scroll_line_based)
8494 (Frecenter, Fset_window_configuration):
8495 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8496 (Fset_window_hscroll, run_window_configuration_change_hook)
8497 (set_window_buffer, temp_output_buffer_show, scroll_command)
5895d7b9 8498 (Fscroll_other_window, Frecenter):
d311d28c
PE
8499 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8500 (Fwindow_line_height, window_scroll, Fscroll_left, Fscroll_right):
8501 Don't assume fixnum fits in int.
8502 (Fset_window_scroll_bars):
8503 Check that fixnums are in proper range for system types.
8504 * xdisp.c (help_echo_pos, pos_visible_p, string_pos_nchars_ahead)
8505 (string_pos, c_string_pos, number_of_chars, init_iterator)
8506 (in_ellipses_for_invisible_text_p, init_from_display_pos)
8507 (compute_stop_pos, next_overlay_change, compute_display_string_pos)
8508 (compute_display_string_end, handle_face_prop)
5895d7b9
PE
8509 (face_before_or_after_it_pos, handle_invisible_prop)
8510 (handle_display_prop, handle_display_spec, handle_single_display_spec)
d311d28c
PE
8511 (display_prop_intangible_p, string_buffer_position_lim)
8512 (string_buffer_position, handle_composition_prop, load_overlay_strings)
8513 (get_overlay_strings_1, get_overlay_strings)
8514 (iterate_out_of_display_property, forward_to_next_line_start)
8515 (back_to_previous_visible_line_start, reseat, reseat_to_string)
8516 (get_next_display_element, set_iterator_to_next)
8517 (get_visually_first_element, compute_stop_pos_backwards)
8518 (handle_stop_backwards, next_element_from_buffer)
8519 (move_it_in_display_line_to, move_it_in_display_line)
8520 (move_it_to, move_it_vertically_backward, move_it_by_lines)
8521 (add_to_log, message_dolog, message_log_check_duplicate)
8522 (message2, message2_nolog, message3, message3_nolog
8523 (with_echo_area_buffer, display_echo_area_1, resize_mini_window_1)
8524 (current_message_1, truncate_echo_area, truncate_message_1)
8525 (set_message, set_message_1, store_mode_line_noprop)
8526 (hscroll_window_tree, debug_delta, debug_delta_bytes, debug_end_vpos)
8527 (text_outside_line_unchanged_p, check_point_in_composition)
8528 (reconsider_clip_changes)
8529 (redisplay_internal, set_cursor_from_row, try_scrolling)
8530 (try_cursor_movement, set_vertical_scroll_bar, redisplay_window)
8531 (redisplay_window, find_last_unchanged_at_beg_row)
8532 (find_first_unchanged_at_end_row, row_containing_pos, try_window_id)
8533 (trailing_whitespace_p, find_row_edges, display_line)
8534 (RECORD_MAX_MIN_POS, Fcurrent_bidi_paragraph_direction)
8535 (display_mode_element, store_mode_line_string)
8536 (pint2str, pint2hrstr, decode_mode_spec)
8537 (display_count_lines, display_string, draw_glyphs)
8538 (x_produce_glyphs, x_insert_glyphs)
8539 (rows_from_pos_range, mouse_face_from_buffer_pos)
8540 (fast_find_string_pos, mouse_face_from_string_pos)
8541 (note_mode_line_or_margin_highlight, note_mouse_highlight):
8542 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8543 (safe_call, init_from_display_pos, handle_fontified_prop)
8544 (handle_single_display_spec, load_overlay_strings)
8545 (with_echo_area_buffer, setup_echo_area_for_printing)
8546 (display_echo_area, echo_area_display)
8547 (x_consider_frame_title, prepare_menu_bars, update_menu_bar)
8548 (update_tool_bar, hscroll_window_tree, redisplay_internal)
5895d7b9
PE
8549 (redisplay_window, dump_glyph_row, display_mode_line)
8550 (Fformat_mode_line, decode_mode_spec, on_hot_spot_p):
43ad2e9a 8551 (handle_display_spec, display_prop_string_p):
d311d28c
PE
8552 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8553 (handle_single_display_spec, build_desired_tool_bar_string)
8554 (redisplay_tool_bar, scroll_window_tree, Fdump_glyph_matrix)
8555 (get_specified_cursor_type):
8556 Check that fixnums are in proper range for system types.
8557 (struct overlay_entry, resize_mini_window, Fdump_glyph_row)
8558 (Flookup_image_map):
8559 Don't assume fixnums fit in int.
8560 (compare_overlay_entries):
8561 Avoid mishandling comparisons due to subtraction overflow.
8562 (load_overlay_strings): Use SAFE_NALLOCA, not alloca.
8563 (last_escape_glyph_face_id, last_glyphless_glyph_face_id):
8564 (handle_tool_bar_click):
8565 Use int, not unsigned, since we prefer signed and the signedness
8566 doesn't matter here.
8567 (get_next_display_element, next_element_from_display_vector):
8568 Use int, not EMACS_INT, when int is wide enough.
8569 (start_hourglass): Use duration_to_sec_usec to do proper
8570 overflow checking on durations.
8571 * xfaces.c (Fbitmap_spec_p):
8572 Check that fixnums are in proper range for system types.
8573 (compare_fonts_by_sort_order):
8574 Avoid mishandling comparisons due to subtraction overflow.
8575 (Fx_family_fonts, realize_basic_faces):
8576 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8577 (Fx_family_fonts):
8578 Don't assume fixnum fits in int.
8579 Use SAFE_ALLOCA_LISP, not alloca.
8580 (merge_face_heights): Remove unnecessary cast to EMACS_INT.
8581 (Finternal_make_lisp_face): Don't allocate more than MAX_FACE_ID.
8582 (face_at_buffer_position, face_for_overlay_string)
8583 (face_at_string_position):
8584 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8585 (merge_faces): Use int, not EMACS_INT, where int is wide enough.
8586 * xfns.c (x_set_menu_bar_lines, x_set_tool_bar_lines, x_icon_verify)
8587 (Fx_show_tip):
8588 Check that fixnums are in proper range for system types.
8589 (Fx_create_frame, x_create_tip_frame, Fx_show_tip)
8590 (Fx_hide_tip, Fx_file_dialog, Fx_select_font):
8591 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8592 (Fx_change_window_property): Don't assume fixnums fit in int.
8593 * xfont.c (xfont_chars_supported):
8594 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8595 * xmenu.c (Fx_popup_dialog, set_frame_menubar)
8596 (create_and_show_popup_menu, create_and_show_dialog, xmenu_show):
8597 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8598 * xml.c (parse_region):
8599 * xrdb.c (magic_file_p):
8600 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8601 * xselect.c (TRACE1): Don't assume pid_t promotes to int.
8602 (x_get_local_selection, x_reply_selection_request)
8603 (x_handle_selection_request, wait_for_property_change):
8604 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8605 (selection_data_to_lisp_data): Use short, not EMACS_INT, where
8606 short is wide enough.
8607 (x_send_client_event): Don't assume fixnum fits in int.
8608 * xterm.c (x_x_to_emacs_modifiers):
8609 Don't assume EMACS_INT overflows nicely into int.
8610 (x_emacs_to_x_modifiers): Use EMACS_INT, not int, because values
8611 may come from Lisp.
8612 (handle_one_xevent): NATNUMP can eval its arg twice.
8613 (x_connection_closed):
8614 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8615 * xterm.h: Adjust decls to match defn changes elsewhere.
8616 (struct scroll_bar): Use struct vectorlike_header
8617 rather than rolling our own approximation.
8618 (SCROLL_BAR_VEC_SIZE): Remove; not used.
8619
c6574eb5
GM
86202012-05-25 Glenn Morris <rgm@gnu.org>
8621
8622 * lisp.mk (lisp): Update for more files being compiled now.
8623
e8d32c7e
SM
86242012-05-25 Stefan Monnier <monnier@iro.umontreal.ca>
8625
48def666
SM
8626 * lread.c: Remove `read_pure' which makes no difference.
8627 (read_pure): Remove var.
8628 (unreadpure): Remove function.
8629 (readevalloop): Don't call read_list with -1 flag.
8630 (read1, read_vector): Don't test read_pure any more.
8631 (read_list): Simplify.
8632
e8d32c7e
SM
8633 * fileio.c, character.h: Minor style tweaks.
8634
4b2addb7
DA
86352012-05-24 Dmitry Antipov <dmantipov@yandex.ru>
8636
8637 * window.h (clip_changed): Remove useless declaration.
8638
584461b2
JB
86392012-05-22 Juanma Barranquero <lekktu@gmail.com>
8640
8641 * makefile.w32-in: Follow-up to 2012-05-22T16:20:27Z!eggert@cs.ucla.edu.
8642 (TAGS, TAGS-gmake, CONFIG_H): Remove further references to m/intel386.h.
8643
34374650
PE
86442012-05-22 Paul Eggert <eggert@cs.ucla.edu>
8645
8646 Remove src/m/*.
8647 This directory predates autoconf and is no longer needed nowadays.
8648 Move its few remaining bits of functionality to where they're needed.
8649 * m/README, m/alpha.h, m/amdx86-64.h, m/ia64.h, m/ibmrs6000.h:
8650 * m/ibms390x.h, m/intel386.h, m/m68k.h, m/macppc.h, m/sparc.h:
8651 * m/template.h: Remove.
8652 * Makefile.in (M_FILE): Remove. All uses removed.
8653 * alloc.c (POINTERS_MIGHT_HIDE_IN_OBJECTS):
8654 * lisp.h (USE_LSB_TAG):
8655 * mem-limits.h (EXCEEDS_LISP_PTR):
8656 Use VAL_MAX, not VALBITS, in #if.
8657 * lisp.h (EMACS_INT_MAX): New macro, useful in #if.
8658 (EMACS_UINT): Define unconditionally now.
8659 (BITS_PER_CHAR, BITS_PER_SHORT, BITS_PER_INT, BITS_PER_LONG)
8660 (BITS_PER_EMACS_INT): New constants, replacing
8661 what used to be in config.h, but not useful in #if.
8662 (GCTYPEBITS, VALBITS): Define unconditionally, since m/* files don't
8663 define them any more.
8664 (VAL_MAX): New macro.
8665 (VALMASK): Use it.
8666 * puresize.h (PURESIZE_RATIO): Use EMACS_INT_MAX, not
8667 BITS_PER_EMACS_INT, in #if.
8668 * s/aix4-2.h (BROKEN_FIONREAD, BROKEN_SIGAIO, BROKEN_SIGPTY)
8669 (BROKEN_SIGPOLL): Move here from m/ibmrs6000.h, which was removed.
8670 * s/gnu-linux.h (ULIMIT_BREAK_VALUE) [__i386__]:
8671 * s/ms-w32.h (DATA_START):
8672 Move here from removed file m/intel386.h.
8673 * s/gnu.h (NLIST_STRUCT): Remove undef; 'configure' does this.
8674 * s/irix6-5.h (_LP64): Remove; lisp.h no longer needs this.
8675
261cb4bb
PE
86762012-05-21 Paul Eggert <eggert@cs.ucla.edu>
8677
8678 Assume C89 or later.
8679 * alloc.c, buffer.c, lisp.h: Replace POINTER_TYPE with void.
8680 * alloc.c (overrun_check_malloc, overrun_check_realloc, xmalloc)
8681 (xrealloc):
8682 * buffer.c (mmap_free_1, mmap_enlarge): Omit needless casts.
8683 * editfns.c, fns.c, gmalloc.c, insdel.c, sysdep.c, termcap.c (NULL):
8684 * textprop.c, tparam.c (NULL): Remove.
8685 * ralloc.c, vm-limit.c (POINTER): Assume void * works.
8686 * regex.c (SIGN_EXTEND_CHAR): Assume signed char works.
8687 * regex.h (_RE_ARGS): Remove. All uses rewritten to use prototypes.
8688 * unexelf.c (ElfBitsW): Assume c89 preprocessor or better.
8689 * xterm.c (input_signal_count): Assume volatile works.
8690
ff23cd9f
KB
86912012-05-21 Ken Brown <kbrown@cornell.edu>
8692
8693 * xgselect.c (xg_select): Fix first argument in call to 'select'
8694 (bug#11508).
8695
1b170bc6
KB
86962012-05-20 Ken Brown <kbrown@cornell.edu>
8697
8698 * gmalloc.c (_free_internal_nolock, _realloc_internal_nolock)
bd7239f5 8699 [CYGWIN]: Cast ptr to (char *) before comparing to _heapbase.
1b170bc6 8700
b2f4d39f
KB
87012012-05-19 Ken Brown <kbrown@cornell.edu>
8702
8703 * xfns.c (x_in_use): Remove `static' qualifier.
8704 * xterm.h (x_in_use): Declare.
8705 * xgselect.c: Include xterm.h.
8706 (xg_select): Test `x_in_use' instead of `inhibit_window_system'
8707 and `display_arg' (bug#9754).
8708
003fdae2
PE
87092012-05-19 Paul Eggert <eggert@cs.ucla.edu>
8710
9232a6d9
PE
8711 * s/ms-w32.h (HAVE_GETDOMAINNAME): Remove; not needed.
8712
003fdae2
PE
8713 * m/vax.h: Remove; no longer needed since HAVE_FTIME is being removed.
8714 * s/ms-w32.h (HAVE_FTIME): Remove; not needed.
8715
784b56e2
EZ
87162012-05-18 Eli Zaretskii <eliz@gnu.org>
8717
8718 Fix compilation with -DGLYPH_DEBUG=1 on MS-Windows.
8719
8720 * w32term.c [GLYPH_DEBUG]: Add prototype for x_check_font.
090bd7cb 8721 (x_check_font) [GLYPH_DEBUG]: New function, copied from xterm.c.
784b56e2
EZ
8722
8723 * w32fns.c (unwind_create_frame) [GLYPH_DEBUG]: Fix broken
8724 reference to image_cache->refcount.
8725 (x_create_tip_frame): Fix broken use of FRAME_IMAGE_CACHE.
8726
a0a79cde
JL
87272012-05-17 Juri Linkov <juri@jurta.org>
8728
8729 * search.c (Fword_search_regexp, Fword_search_backward)
8730 (Fword_search_forward, Fword_search_backward_lax)
8731 (Fword_search_forward_lax): Move functions to isearch.el
8732 (bug#10145, bug#11381).
8733
b0572523
PE
87342012-05-16 Paul Eggert <eggert@cs.ucla.edu>
8735
8736 * xgselect.c (xg_select): Just invoke 'select' if -nw (Bug#9754).
8737
9660f5fc
SM
87382012-05-15 Stefan Monnier <monnier@iro.umontreal.ca>
8739
8740 * lread.c (init_obarray): Declare Qt and Qnil as special.
8741
4374de83
GM
87422012-05-14 Glenn Morris <rgm@gnu.org>
8743
8744 * nsterm.m (ns_init_paths): Fix typo ("libexec" not "lib-exec").
985584ae 8745 Put "libexec" before "bin", for the sake of init_callproc_1.
4374de83 8746
dc44c39a
PE
87472012-05-14 Paul Eggert <eggert@cs.ucla.edu>
8748
078c97cb
PE
8749 * keyboard.c (kbd_buffer_get_event) [!HAVE_DBUS]: Omit unused local.
8750
dc44c39a
PE
8751 * unexaix.c: Port to more-recent AIX compilers.
8752 (report_error, report_error_1, make_hdr, copy_sym)
8753 (mark_x, adjust_lnnoptrs, unrelocate_symbols):
8754 Make arguments const char *, not char *, to avoid violations of C
8755 standard and to fix some AIX warnings reported by Gilles Pion.
8756
e18afed7 87572012-05-14 Eli Zaretskii <eliz@gnu.org>
ac268e67
EZ
8758
8759 * xdisp.c (handle_stop): Don't call get_overlay_strings_1 if we
8760 already have overlays loaded.
8761 (handle_single_display_spec): Before returning without displaying
8762 fringe bitmap, synchronize the bidi iterator with the main display
8763 iterator, by calling iterate_out_of_display_property.
8764 (iterate_out_of_display_property): Detect buffer iteration by
8765 testing that it->string is a Lisp string.
8766 (get_next_display_element): When the current object is exhausted,
8767 and there's something on it->stack, call set_iterator_to_next to
8768 proceed with what's on the stack, instead of returning zero.
8769 (set_iterator_to_next): If called at the end of a Lisp string,
8770 proceed to consider_string_end without incrementing string
8771 position. Don't increment display vector index past the end of
8772 the display vector. (Bug#11417)
c8fb9dc6
EZ
8773 (pos_visible_p): Don't report a position visible when move_it_to
8774 stopped at the last line of window, which happens to be scanned
8775 backwards by the bidi iteration. (Bug#11464)
ac268e67 8776
e18afed7 87772012-05-14 Eli Zaretskii <eliz@gnu.org>
82f9b393
EZ
8778
8779 * xdisp.c (handle_single_display_spec): Return 1 for left-margin
8780 and right-margin display specs even if the spec is invalid or we
61b108cc
SM
8781 are on a TTY, and thus unable to display on the fringes.
8782 That's because the text with the property will not be displayed anyway,
82f9b393
EZ
8783 so we need to signal to the caller that this is a "replacing"
8784 display spec. This fixes display when the spec is invalid or we
8785 are on a TTY.
8786
e18afed7 87872012-05-14 Paul Eggert <eggert@cs.ucla.edu>
297834cd
PE
8788
8789 * unexaix.c (make_hdr): Fix typo in prototype.
8790 This bug broke the build on AIX. Problem reported by Gilles Pion.
8791
9d0a235a
MA
87922012-05-14 Michael Albinus <michael.albinus@gmx.de>
8793
8794 * keyboard.c (kbd_buffer_get_event): Read special events also in
8795 batch mode. (Bug#11415)
8796
9e6b06ed
GM
87972012-05-12 Glenn Morris <rgm@gnu.org>
8798
8799 * ns.mk: Update for ns_appbindir no longer having trailing "/".
8800
c1a1d7a3
EZ
88012012-05-12 Eli Zaretskii <eliz@gnu.org>
8802
8803 * lisp.mk (lisp): Add newcomment.elc.
8804
3fe7cdc8
GM
88052012-05-12 Glenn Morris <rgm@gnu.org>
8806
8807 * Makefile.in (MKDIR_P): New, set by configure.
8808 * ns.mk (${ns_appdir}, ${ns_appbindir}Emacs): Use $MKDIR_P.
8809
53f7d2c0
PE
88102012-05-11 Paul Eggert <eggert@cs.ucla.edu>
8811
8812 Remove unused function hourglass_started.
8813 * dispextern.h (hourglass_started):
8814 * w32fns.c (hourglass_started):
8815 * xdisp.c (hourglass_started): Remove.
8816
75aafb17
JB
88172012-05-10 Juanma Barranquero <lekktu@gmail.com>
8818
8819 * makefile.w32-in ($(BLD)/gmalloc.$(O), $(BLD)/w32menu.$(O)):
8820 Update dependencies.
8821
12959e8e
PE
88222012-05-10 Paul Eggert <eggert@cs.ucla.edu>
8823
97107e2e
PE
8824 * xgselect.c (xg_select): Put maxfds+1 into a var.
8825 This is slightly clearer, and pacifies Ubuntu 12.04 gcc.
8826
12959e8e
PE
8827 * sound.c (DEFAULT_ALSA_SOUND_DEVICE): Define only if HAVE_ALSA.
8828
836d29b3
DA
88292012-05-10 Dave Abrahams <dave@boostpro.com>
8830
8831 * filelock.c (syms_of_filelock): New boolean create-lockfiles.
8832 (lock_file): If create_lockfiles is 0, do nothing. (Bug#11227)
8833
5cb67954
MA
88342012-05-09 Michael Albinus <michael.albinus@gmx.de>
8835
8836 * dbusbind.c (xd_registered_buses): New internal Lisp object.
8837 Rename all occurences of Vdbus_registered_buses to xd_registered_buses.
8838 (syms_of_dbusbind): Remove declaration of Vdbus_registered_buses.
8839 Initialize xd_registered_buses.
8840
3478ec45
PE
88412012-05-09 Paul Eggert <eggert@cs.ucla.edu>
8842
b263a6b0
PE
8843 Untag more efficiently if USE_LSB_TAG.
8844 This is based on a proposal by YAMAMOTO Mitsuharu in
8845 <http://lists.gnu.org/archive/html/emacs-devel/2008-01/msg01876.html>.
8846 For an admittedly artificial (nth 8000 longlist) benchmark on
8847 Fedora 15 x86-64, this yields a 25% CPU speedup. Also, it shrinks
8848 Emacs's overall text size by 1%.
8849 * lisp.h (XUNTAG): New macro.
8850 (XCONS, XVECTOR, XSTRING, XSYMBOL, XFLOAT, XMISC, XPROCESS, XWINDOW)
8851 (XTERMINAL, XSUBR, XBUFFER, XCHAR_TABLE, XSUB_CHAR_TABLE, XBOOL_VECTOR)
8852 (XSETTYPED_PSEUDOVECTOR, XHASH_TABLE, TYPED_PSEUDOVECTORP): Use it.
8853 * eval.c (Fautoload):
8854 * font.h (XFONT_SPEC, XFONT_ENTITY, XFONT_OBJECT):
8855 * frame.h (XFRAME): Use XUNTAG.
8856
3478ec45
PE
8857 Port recent dbusbind.c changes to 32-bit --with-wide-int.
8858 * dbusbind.c (xd_append_arg, xd_retrieve_arg, Fdbus_message_internal):
8859 Remove unportable assumptions about print widths of types like
8860 dbus_uint32_t.
8861 (xd_get_connection_address, Fdbus_init_bus): Cast Emacs integer to
8862 intptr_t when converting between pointer and integer, to avoid GCC
8863 warnings about wrong width.
8864
666b903b 88652012-05-09 Eli Zaretskii <eliz@gnu.org>
0d887c7d
EZ
8866
8867 * w32proc.c (new_child): Force Windows to reserve only 64KB of
8868 stack for each reader_thread, instead of defaulting to 8MB
8869 determined by the linker. This avoids failures in creating
8870 subprocesses on Windows 7, see the discussion in this thread:
8871 http://lists.gnu.org/archive/html/emacs-devel/2012-03/msg00119.html.
8872
b120cc17
JC
88732012-05-07 Jérémy Compostella <jeremy.compostella@gmail.com>
8874
8875 Fix up display of the *Minibuf-0* buffer in the mini window.
8876 * keyboard.c (read_char): Don't clear the echo area if there's no
8877 message to clear.
8878 * xdisp.c (redisplay_internal): Redisplay the mini window (with the
2fed2689 8879 contents of *Minibuf-0*) if there's no message displayed in its stead.
b120cc17 8880
9a4b36f8
MA
88812012-05-07 Michael Albinus <michael.albinus@gmx.de>
8882
8883 * dbusbind.c (XD_DEBUG_MESSAGE): Don't print message twice in
8884 batch mode.
8885
e5f9458f
CY
88862012-05-06 Chong Yidong <cyd@gnu.org>
8887
8888 * lisp.mk (lisp): Update.
8889
eceeb5fc 88902012-05-05 Jim Meyering <meyering@redhat.com>
bf98199c
JM
8891
8892 * w32font.c (fill_in_logfont): NUL-terminate a string (Bug#11372).
8893
71873e2b
SM
88942012-05-04 Stefan Monnier <monnier@iro.umontreal.ca>
8895
8896 * data.c (PUT_ERROR): New macro.
8897 (syms_of_data): Use it. Add new error type `user-error'.
8898 * undo.c (user_error): New function.
8899 (Fprimitive_undo): Use it.
8900 * print.c (print_error_message): Adjust print style for `user-error'.
8901 * keyboard.c (user_error): New function.
8902 (Fexit_recursive_edit, Fabort_recursive_edit): Use it.
8903
ab0fa4e4
PE
89042012-05-03 Paul Eggert <eggert@cs.ucla.edu>
8905
8906 Do not limit current-time-string to years 1000..9999.
8907 * editfns.c (TM_YEAR_IN_ASCTIME_RANGE): Remove.
8908 (Fcurrent_time_string): Support any year that is supported by the
8909 underlying localtime representation. Don't use asctime, as it
8910 has undefined behavior for years outside the range -999..9999.
8911
7ed806a7
PE
89122012-05-02 Paul Eggert <eggert@cs.ucla.edu>
8913
8914 Fix race conditions involving setenv, gmtime, localtime, asctime.
8915 Without this fix, interrupts could mess up code that uses these
8916 nonreentrant functions, since setting TZ invalidates existing
8917 tm_zone or tzname values, and since most of these functions return
8918 pointers to static storage.
8919 * editfns.c (format_time_string, Fdecode_time, Fencode_time)
8920 (Fcurrent_time_string, Fcurrent_time_zone, Fset_time_zone_rule):
8921 Grow the critical sections to include not just invoking
8922 localtime/gmtime, but also accessing these functions' results
8923 including their tm_zone values if any, and any related TZ setting.
8924 (format_time_string): Last arg is now struct tm *, not struct tm **,
71873e2b
SM
8925 so that the struct tm is saved in the critical section.
8926 All callers changed. Simplify allocation of initial buffer, partly
7ed806a7
PE
8927 motivated by the fact that memory allocation needs to be outside
8928 the critical section.
8929
0c16dfed
DA
89302012-05-02 Dmitry Antipov <dmantipov@yandex.ru>
8931
8932 * intervals.c (adjust_intervals_for_insertion): Initialize `newi'
8933 with RESET_INTERVAL.
8934
8935 * buffer.c (Fget_buffer_create, Fmake_indirect_buffer):
8936 Remove duplicated buffer name initialization.
8937
3f83ace8
JM
89382012-05-02 Jim Meyering <jim@meyering.net>
8939
8940 * xterm.c (x_term_init): Use memcpy instead of strncpy (Bug#11373).
8941
c7b8541e
JM
8942 * xfns.c (x_window): Use xstrdup (Bug#11375).
8943
90207a15 89442012-05-02 Eli Zaretskii <eliz@gnu.org>
2fa85638
EZ
8945
8946 * xdisp.c (pos_visible_p): If already at a newline from the
8947 display string before the 'while' loop, don't walk back the glyphs
8948 from it3.glyph_row. Solves assertion violation when the display
8949 string begins with a newline (egg.el). (Bug#11367)
8950
b593d6a9
AH
89512012-05-01 Stefan Monnier <monnier@iro.umontreal.ca>
8952
8953 * keyboard.c (Fexecute_extended_command, Vsuggest_key_bindings):
8954 Move to simple.el.
8955
4737362e
GM
89562012-05-01 Glenn Morris <rgm@gnu.org>
8957
99cf43f9
GM
8958 * syssignal.h: Remove reference to BROKEN_SIGINFO (last used in
8959 s/ptx4.h), BROKEN_SIGTSTP (last used in m/ustation.h, m/dpx2.h),
8960 and BROKEN_SIGURG (was in s/gnu-linux.h prior to 2008-02-10).
8961 All were removed before 23.1.
8962
9311dcff
GM
8963 * dispnew.c: Remove HAVE_LIBNCURSES test;
8964 it is always true on relevant platforms.
8965
4d5c6349
GM
8966 * Makefile.in (LD_SWITCH_X_SITE_RPATH):
8967 Rename from LD_SWITCH_X_SITE_AUX_RPATH.
8968
4737362e
GM
8969 * Makefile.in (LD_SWITCH_X_SITE_AUX): Remove; no longer used.
8970
74dd3a6b
AS
89712012-04-30 Andreas Schwab <schwab@linux-m68k.org>
8972
8973 * .gdbinit (xpr): Remove checks for no longer existing misc types.
8974 (xintfwd, xboolfwd, xobjfwd, xbufobjfwd, xkbobjfwd, xbuflocal):
8975 Remove.
8976
13c379ee
PE
89772012-04-28 Paul Eggert <eggert@cs.ucla.edu>
8978
8979 Do not avoid creating empty evaporating overlays (Bug#9642).
8980 * buffer.c (Fmove_overlay): Revert the change of 2012-04-23.
8981 That is, do not delete an evaporating overlay if it becomes
8982 empty after its bounds are adjusted to fit within its buffer.
8983 This fix caused other problems, and I'm reverting it until we get
8984 to the bottom of them.
8985
a8e7d6d7 89862012-04-27 Chong Yidong <cyd@gnu.org>
9be2fd9b
CY
8987
8988 * xselect.c (x_convert_selection): Initialize a pointer (Bug#11315).
8989
a8e7d6d7 89902012-04-27 Eli Zaretskii <eliz@gnu.org>
f0ee99a0
EZ
8991
8992 * xdisp.c (pos_visible_p): If the window start position is beyond
8993 ZV, start the display from buffer beginning. Prevents assertion
8994 violation in init_iterator when the minibuffer window is scrolled
8995 via the scroll bar.
8996
8997 * window.c (window_scroll_pixel_based): Likewise.
8998
a8e7d6d7 89992012-04-27 Chong Yidong <cyd@gnu.org>
9ec7751f
CY
9000
9001 * keymap.c (where_is_internal): Doc fix (Bug#10872).
9002
a8e7d6d7 90032012-04-27 Glenn Morris <rgm@gnu.org>
24c51a09
GM
9004
9005 * fileio.c (Fcopy_file, Fset_file_selinux_context):
9006 Ignore ENOTSUP failures from setfilecon functions. (Bug#11245)
9007
a8e7d6d7 90082012-04-27 Eli Zaretskii <eliz@gnu.org>
73055685 9009
b593d6a9
AH
9010 * dispnew.c (swap_glyph_pointers, copy_row_except_pointers):
9011 Don't overrun array limits of glyph row's used[] array. (Bug#11288)
73055685 9012
1c6900d9
EZ
90132012-04-26 Eli Zaretskii <eliz@gnu.org>
9014
4c3fa1d9
EZ
9015 * xdisp.c (IT_DISPLAYING_WHITESPACE): In addition to the loaded
9016 display element, check also the underlying string or buffer
9017 character. (Bug#11341)
9018
1c6900d9
EZ
9019 * w32menu.c: Include w32heap.h.
9020 (add_menu_item): If the call to AppendMenuW (via
9021 unicode_append_menu) fails, disable Unicode menus only if we are
9022 running on Windows 9X/Me.
9023
42bf8205
AS
90242012-04-24 Andreas Schwab <schwab@linux-m68k.org>
9025
9026 * .gdbinit (xpr): Handle USE_2_TAGS_FOR_INTS.
9027 (xgetint): Add missing shift for LSB tags.
9028
b1bac16e
MR
90292012-04-24 Martin Rudalics <rudalics@gmx.at>
9030
9031 * keyboard.c (read_char): Don't wipe echo area for select window
9032 events: These might get delayed via `mouse-autoselect-window'
9033 (Bug#11304).
9034
d69621cc
JB
90352012-04-24 Juanma Barranquero <lekktu@gmail.com>
9036
9037 * gnutls.c (init_gnutls_functions): Protect against (unlikely)
9038 manipulation of :loaded-from data.
9039
02fd101b
JB
90402012-04-23 Juanma Barranquero <lekktu@gmail.com>
9041
9042 * gnutls.c (init_gnutls_functions): The value of :loaded-from is
9043 now a cons (bug#11311).
9044
888bec30
PE
90452012-04-23 Paul Eggert <eggert@cs.ucla.edu>
9046
89a438bd
PE
9047 Do not create empty overlays with the evaporate property (Bug#9642).
9048 * buffer.c (Fmove_overlay): Delete an evaporating overlay
9049 if it becomes empty after its bounds are adjusted to fit within
9050 its buffer. Without this fix, in a nonempty buffer (let ((o
9051 (make-overlay 1 2))) (overlay-put o 'evaporate t) (move-overlay o 0 1))
9052 yields an empty overlay that has the evaporate property, which is
9053 not supposed to happen.
9054
1068fe4d
PE
9055 Fix minor GTK3 problems found by static checking.
9056 * emacsgtkfixed.c (EMACS_TYPE_FIXED, EMACS_FIXED, EmacsFixed)
9057 (EmacsFixedPrivate, EmacsFixedClass, struct _EmacsFixed)
9058 (struct _EmacsFixedClass, emacs_fixed_get_type):
9059 Move decls here from emacsgtkfixed.h, since they needn't be public.
9060 (emacs_fixed_get_type): Now static.
9061 (emacs_fixed_class_init): Omit unused local.
9062 (emacs_fixed_child_type): Remove; unused.
9063 * emacsgtkfixed.h (EMACS_TYPE_FIXED, EMACS_FIXED, EmacsFixed)
9064 (EmacsFixedPrivate, EmacsFixedClass, struct _EmacsFixed)
9065 (struct _EmacsFixedClass): Move to emacsgtkfixed.c.
9066 (EMACS_FIXED_CLASS, EMACS_IS_FIXED, EMACS_IS_FIXED_CLASS)
9067 (EMACS_FIXED_GET_CLASS): Remove; unused.
9068 * gtkutil.c (xg_create_frame_widgets) [!HAVE_GTK3]: Omit unused local.
9069
888bec30
PE
9070 * keyboard.c (handle_async_input): Define only if SYNC_INPUT || SIGIO.
9071 Problem reported by Juanma Barranquero for Windows -Wunused-function.
9072
de85e130
PE
90732012-04-22 Paul Eggert <eggert@cs.ucla.edu>
9074
d0baac98 9075 Modernize and clean up gmalloc.c to assume C89 (Bug#9119).
bd7239f5 9076 * gmalloc.c (_MALLOC_INTERNAL, _MALLOC_H, _PP, __ptr_t)
d0baac98
PE
9077 (__malloc_size_t, __malloc_ptrdiff_t):
9078 Remove. All uses removed, replaced by the definiens if needed,
9079 since we can assume C89 or better now.
9080 Include <stdint.h>, for PTRDIFF_MAX, uintptr_t.
9081 (protect_malloc_state, align, get_contiguous_space)
9082 (malloc_atfork_handler_prepare, malloc_atfork_handler_parent)
9083 (malloc_atfork_handler_child, malloc_enable_thread)
9084 (malloc_initialize_1, __malloc_initialize, morecore_nolock)
9085 (_malloc_internal_nolock, _malloc_internal, malloc, _malloc)
9086 (_free, _realloc, _free_internal_nolock, _free_internal, free, cfree)
9087 (special_realloc, _realloc_internal_nolock, _realloc_internal)
9088 (realloc, calloc, __default_morecore, memalign, valloc, checkhdr)
9089 (freehook, mallochook, reallochook, mabort, mcheck, mprobe):
9090 Define using prototypes, not old style.
9091 (align, _malloc_internal_nolock, _free_internal_nolock, memalign):
9092 Don't assume ptrdiff_t and uintptr_t are no wider than unsigned long.
9093 (align): Don't assume that signed integer overflow wraps around.
9094 Omit unused local var.
9095 (malloc_initialize_1, morecore_nolock, _malloc_internal_nolock)
9096 (_free_internal_nolock, memalign, mallochook, reallochook):
9097 Omit no-longer-needed casts.
9098 (valloc): Use getpagesize, not __getpagesize.
9099 (MAGICWORD, MAGICFREE): Now randomish size_t values, not 32-bit.
9100 (struct hdr): The 'magic' member is now size_t, not unsigned long.
9101
de85e130
PE
9102 * dbusbind.c (XD_DBUS_VALIDATE_OBJECT): Define only if needed.
9103
dcbf5805
MA
91042012-04-22 Michael Albinus <michael.albinus@gmx.de>
9105
9106 Move functions from C to Lisp. Make non-blocking method calls
9107 the default. Implement further D-Bus standard interfaces.
9108
9109 * dbusbind.c (DBUS_NUM_MESSAGE_TYPES): Declare.
9110 (QCdbus_request_name_allow_replacement)
9111 (QCdbus_request_name_replace_existing)
9112 (QCdbus_request_name_do_not_queue)
9113 (QCdbus_request_name_reply_primary_owner)
9114 (QCdbus_request_name_reply_in_queue)
9115 (QCdbus_request_name_reply_exists)
9116 (QCdbus_request_name_reply_already_owner): Move to dbus.el.
9117 (QCdbus_registered_serial, QCdbus_registered_method)
9118 (QCdbus_registered_signal): New Lisp objects.
9119 (XD_DEBUG_MESSAGE): Use sizeof.
9120 (XD_MESSAGE_TYPE_TO_STRING, XD_OBJECT_TO_STRING)
9121 (XD_DBUS_VALIDATE_BUS_ADDRESS, XD_DBUS_VALIDATE_OBJECT)
9122 (XD_DBUS_VALIDATE_BUS_NAME, XD_DBUS_VALIDATE_PATH)
9123 (XD_DBUS_VALIDATE_INTERFACE, XD_DBUS_VALIDATE_MEMBER): New macros.
9124 (XD_CHECK_DBUS_SERIAL): Rename from CHECK_DBUS_SERIAL_GET_SERIAL.
9125 (xd_signature, xd_append_arg): Allow float for integer types.
9126 (xd_get_connection_references): New function.
b593d6a9
AH
9127 (xd_get_connection_address): Rename from xd_initialize.
9128 Return cached address.
dcbf5805
MA
9129 (xd_remove_watch): Do not unset $DBUS_SESSION_BUS_ADDRESS.
9130 (xd_close_bus): Rename from Fdbus_close_bus. Not needed on Lisp
9131 level.
9132 (Fdbus_init_bus): New optional arg PRIVATE. Cache address.
9a4b36f8 9133 Return number of refcounts.
dcbf5805
MA
9134 (Fdbus_get_unique_name): Make stronger parameter check.
9135 (Fdbus_message_internal): New defun.
9136 (Fdbus_call_method, Fdbus_call_method_asynchronously)
9137 (Fdbus_method_return_internal, Fdbus_method_error_internal)
9138 (Fdbus_send_signal, Fdbus_register_service)
9139 (Fdbus_register_signal, Fdbus_register_method): Move to dbus.el.
9140 (xd_read_message_1): Obey new structure of Vdbus_registered_objects.
9141 (xd_read_queued_messages): Obey new structure of Vdbus_registered_buses.
9142 (Vdbus_compiled_version, Vdbus_runtime_version)
9143 (Vdbus_message_type_invalid, Vdbus_message_type_method_call)
9144 (Vdbus_message_type_method_return, Vdbus_message_type_error)
9145 (Vdbus_message_type_signal): New defvars.
b593d6a9
AH
9146 (Vdbus_registered_buses, Vdbus_registered_objects_table):
9147 Adapt docstring.
dcbf5805 9148
52828e02
PE
91492012-04-22 Paul Eggert <eggert@cs.ucla.edu>
9150
da05bc4c
PE
9151 Fix GC_MALLOC_CHECK debugging output on 64-bit hosts.
9152 * alloc.c (emacs_blocked_malloc) [GC_MALLOC_CHECK]:
9153 Do not assume ptrdiff_t is the same width as 'int'.
9154
52828e02
PE
9155 * alloc.c: Handle unusual debugging option combinations.
9156 (GC_CHECK_MARKED_OBJECTS): Undef if ! GC_MARK_STACK,
9157 since the two debugging options are incompatible.
9158 (GC_MALLOC_CHECK): Similarly, undef if GC_CHECK_MARKED_OBJECTS
9159 is defined.
9160 (mem_init, mem_insert, mem_insert_fixup):
9161 Define if GC_MARK_STACK || GC_MALLOC_CHECK.
9162 (NEED_MEM_INSERT): Remove; no longer needed.
9163
f01769f9
LL
91642012-04-22 Leo Liu <sdl.web@gmail.com>
9165
9166 * sysdep.c (list_system_processes): Support Darwin (Bug#5725).
9167
5790543d
PE
91682012-04-22 Paul Eggert <eggert@cs.ucla.edu>
9169
9170 * sysdep.c [__FreeBSD__]: Minor cleanups.
9171 (list_system_processes, system_process_attributes) [__FreeBSD__]:
9172 Use Emacs indenting style more consistently. Avoid some casts.
9173 Use 'double' consistently rather than mixing 'float' and 'double'.
9174
b91b7e4d
EW
91752012-04-21 Eduard Wiebe <usenet@pusto.de>
9176
b593d6a9
AH
9177 * sysdep.c (list_system_processes, system_process_attributes):
9178 Add implementation for FreeBSD (Bug#5243).
b91b7e4d 9179
6114eb15
AS
91802012-04-21 Andreas Schwab <schwab@linux-m68k.org>
9181
9182 * lisp.mk (lisp): Update.
9183
2f38dff7
PE
91842012-04-20 Paul Eggert <eggert@cs.ucla.edu>
9185
9186 * keyboard.c (process_pending_signals): Define only if SYNC_INPUT.
9187 It is never used otherwise.
9188
4ae29f89
SM
91892012-04-20 Stefan Monnier <monnier@iro.umontreal.ca>
9190
9191 * print.c (print_preprocess): Only check print_depth if print-circle
9192 is nil.
9193 (print_object): Check for cycles even when print-circle is nil and
9194 print-gensym is t, but only check print_depth if print-circle is nil.
9195
f30d612a
CY
91962012-04-20 Chong Yidong <cyd@gnu.org>
9197
9198 * process.c (wait_reading_process_output): If EIO occurs on a pty,
9199 set the status to "failed" and ensure that sentinel is run.
9200
c07a4c0b 92012012-04-20 Glenn Morris <rgm@gnu.org>
016a35df
GM
9202
9203 * process.c (Fset_process_inherit_coding_system_flag)
9204 (Fset_process_query_on_exit_flag): Doc fix (mention return value).
4373fd43 9205 (Fmake_network_process, Fmake_serial_process): Doc fix.
016a35df 9206
c07a4c0b 92072012-04-20 Eli Zaretskii <eliz@gnu.org>
20a68157
EZ
9208
9209 * xdisp.c (string_buffer_position_lim): Limit starting position to
9210 BEGV.
9211 (set_cursor_from_row): If called for a mode-line or header-line
9212 row, return zero immediately.
9213 (try_cursor_movement): If inside continuation line, don't back up
4ae29f89
SM
9214 farther than the first row after the header line, if any.
9215 Don't consider the header-line row as "partially visible", even if
20a68157
EZ
9216 MATRIX_ROW_PARTIALLY_VISIBLE_P returns non-zero. (Bug#11261)
9217
c07a4c0b 92182012-04-20 Atsuo Ohki <ohki@gssm.otsuka.tsukuba.ac.jp> (tiny change)
ad3a2b41 9219
4ae29f89
SM
9220 * lread.c (lisp_file_lexically_bound_p): Fix hang at ";-*-\n"
9221 (bug#11238).
ad3a2b41 9222
c07a4c0b 92232012-04-20 Teodor Zlatanov <tzz@lifelogs.com>
6c94c34f 92242012-04-18 Paul Eggert <eggert@cs.ucla.edu>
ae6e112d
PE
9225
9226 configure: new option --enable-gcc-warnings (Bug#11207)
9227 * Makefile.in (C_WARNINGS_SWITCH): Remove.
9228 (WARN_CFLAGS, WERROR_CFLAGS): New macros.
9229 (ALL_CFLAGS): Use new macros rather than old.
9230 * process.c: Ignore -Wstrict-overflow to work around GCC bug 52904.
9231 * regex.c: Ignore -Wstrict-overflow. If !emacs, also ignore
9232 -Wunused-but-set-variable, -Wunused-function, -Wunused-macros,
9233 -Wunused-result, -Wunused-variable. This should go away once
9234 the Emacs and Gnulib regex code is merged.
9235 (xmalloc, xrealloc): Now static.
9236
aba027e8
PE
92372012-04-17 Paul Eggert <eggert@cs.ucla.edu>
9238
9239 * dired.c (Fsystem_groups): Remove unused local.
9240
e5a36063
GM
92412012-04-17 Glenn Morris <rgm@gnu.org>
9242
9243 * dired.c (Fsystem_users): Doc fix.
9244
316411f0
DA
92452012-04-17 Dmitry Antipov <dmantipov@yandex.ru>
9246
9247 * dired.c (Fsystem_users, Fsystem_groups): New functions. (Bug#7900)
9248 (syms_of_dired): Add them.
9249
9426aba4
PE
92502012-04-16 Paul Eggert <eggert@cs.ucla.edu>
9251
b62a57be
PE
9252 Fix minor alloc.c problems found by static checking.
9253 * alloc.c (_malloc_internal, _free_internal) [!DOUG_LEA_MALLOC]:
9254 New extern decls, to avoid calling undeclared functions.
9255 (dont_register_blocks): Define if ((!SYSTEM_MALLOC && !SYNC_INPUT)
9256 && GC_MALLOC_CHECK), not if ((GC_MARK_STACK || defined
9257 GC_MALLOC_CHECK) && GC_MALLOC_CHECK), to match when it's used.
9258 (NEED_MEM_INSERT): New macro.
9259 (mem_insert, mem_insert_fixup) [!NEED_MEM_INSERT]: Remove; unused.
4b5afbb0 9260 Remove one incorrect comment and fix another.
b62a57be 9261
3539f31f
PE
9262 Fix minor ralloc.c problems found by static checking.
9263 See http://lists.gnu.org/archive/html/emacs-devel/2011-12/msg00720.html
9264 * ralloc.c (ALIGNED, ROUND_TO_PAGE, HEAP_PTR_SIZE)
9265 (r_alloc_size_in_use, r_alloc_freeze, r_alloc_thaw): Remove; unused.
9266 (r_alloc_sbrk): Now static.
9267
a041960a
PE
9268 Improve ralloc.c interface checking.
9269 See http://lists.gnu.org/archive/html/emacs-devel/2011-12/msg00720.html
9270 * buffer.c (ralloc_reset_variable, r_alloc, r_re_alloc)
9271 (r_alloc_free) [REL_ALLOC]: Move decls from here ...
9272 * lisp.h (r_alloc, r_alloc_free, r_re_alloc, r_alloc_reset_variable)
9273 [REL_ALLOC]: ... to here, to check interface.
9274 * m/ia64.h (r_alloc, r_alloc_free) [REL_ALLOC && !_MALLOC_INTERNAL]:
9275 Remove decls. This fixes an "It stinks!".
9276
9426aba4
PE
9277 * alloc.c (which_symbols): Fix alignment issue / type clash.
9278
d55c12ed
AS
92792012-04-15 Andreas Schwab <schwab@linux-m68k.org>
9280
9281 * lisp.h (struct Lisp_Symbol): Remove explicit padding.
9282 (struct Lisp_Misc_Any): Likewise.
9283 (struct Lisp_Free): Likewise.
9284 * alloc.c (union aligned_Lisp_Symbol): Define.
9285 (SYMBOL_BLOCK_SIZE, struct symbol_block): Use union
9286 aligned_Lisp_Symbol instead of struct Lisp_Symbol.
9287 (union aligned_Lisp_Misc): Define.
9288 (MARKER_BLOCK_SIZE, struct marker_block): Use union
9289 aligned_Lisp_Misc instead of union Lisp_Misc.
4ae29f89 9290 (Fmake_symbol, allocate_misc, gc_sweep): Adjust.
d55c12ed 9291
b948ce8b
PE
92922012-04-14 Paul Eggert <eggert@cs.ucla.edu>
9293
9294 Make GC_MAKE_GCPROS_NOOPS the default (Bug#9926).
9295 * lisp.h (GC_MARK_STACK): Default to GC_MAKE_GCPROS_NOOPS.
9296 * s/cygwin.h, s/darwin.h, s/freebsd.h, s/gnu.h, s/irix6-5.h, s/msdos.h:
9297 * s/netbsd.h, s/sol2-6.h:
9298 Remove definition of GC_MARK_STACK, since the default now works.
9299 * s/aix4-2.h, s/hpux10-20.h, s/unixware.h:
9300 Define GC_MARK_STACK to GC_USE_GCPROS_AS_BEFORE, since that's
9301 no longer the default.
9302 * s/gnu-linux.h (GC_MARK_STACK): Adjust to change in default.
9303
35dc09a1 93042012-04-14 Atsuo Ohki <ohki@gssm.otsuka.tsukuba.ac.jp> (tiny change)
ad3a2b41 9305
35dc09a1
GM
9306 * lread.c (lisp_file_lexically_bound_p):
9307 Fix hang at ";-*-\n" (bug#11238).
ad3a2b41 9308
35dc09a1
GM
93092012-04-14 Eli Zaretskii <eliz@gnu.org>
9310
9311 * xdisp.c (find_last_unchanged_at_beg_row): Don't consider a row
9312 "unchanged" if its end.pos is beyond ZV. (Bug#11199)
9313
93142012-04-14 Jan Djärv <jan.h.d@swipnet.se>
9315
9316 * nsterm.m (constrainFrameRect): Always constrain when there is only
9317 one screen (Bug#10962).
9318
bcd86815
KB
93192012-04-13 Ken Brown <kbrown@cornell.edu>
9320
9321 * s/cygwin.h (PTY_OPEN): Don't try to close a bogus file descriptor.
9322
c25df26e
RT
93232012-04-13 Reuben Thomas <rrt@sc3d.org>
9324
9325 * indent.c (Fmove_to_column): Change interactive spec (Bug#739).
9326
0fc59f1e
DC
93272012-04-11 Daniel Colascione <dancol@dancol.org>
9328
9329 * s/cygwin.h: The vfork the #define in cygwin.h was protecting
9330 against is gone. It's better to use vfork now so that when Cygwin
9331 gains a new, working vfork, we use it automatically (bug#10398).
9332
de8c03dc
SM
93332012-04-11 Stefan Monnier <monnier@iro.umontreal.ca>
9334
9335 * window.c (save_window_save): Obey window-point-insertion-type.
9336
2f097256
GM
93372012-04-11 Glenn Morris <rgm@gnu.org>
9338
9339 * Makefile.in (GNUSTEP_CFLAGS): Rename from C_SWITCH_X_SYSTEM.
9340
453b951e
SM
93412012-04-11 Stefan Monnier <monnier@iro.umontreal.ca>
9342
9343 * alloc.c (lisp_align_malloc): Remove unneeded prototype.
9344
75f1671a 93452012-04-10 Jason S. Cornez <jcornez@ravenpack.com> (tiny change)
6bbef4e5
JC
9346
9347 * keyboard.c: Override inhibit-quit after the third C-g (bug#6585).
9348 (force_quit_count): New var.
9349 (handle_interrupt): Use it.
9350
2a8ce227
JB
93512012-04-10 Juanma Barranquero <lekktu@gmail.com>
9352
9353 * w32.c (w32_delayed_load): Record the full path of the library
9354 being loaded (bug#10424).
9355
935396c0
GM
93562012-04-09 Glenn Morris <rgm@gnu.org>
9357
05920a43
GM
9358 * doc.c (Fsnarf_documentation): Check variables, functions are bound,
9359 not just in the obarray, before snarfing them. (Bug#11036)
9360
935396c0
GM
9361 * Makefile.in ($(leimdir)/leim-list.el):
9362 Pass EMACS rather than BUILT_EMACS.
9363
a18ecafa
TZ
93642012-04-09 Teodor Zlatanov <tzz@lifelogs.com>
9365
9366 * process.c (make_process):
9367 * process.h: Add integer `gnutls_handshakes_tried' member to
9368 process struct.
9369
6bbef4e5
JC
9370 * gnutls.h: Add `GNUTLS_EMACS_HANDSHAKES_LIMIT' upper limit.
9371 Add convenience `GNUTLS_LOG2i' macro.
a18ecafa
TZ
9372
9373 * gnutls.c (gnutls_log_function2i): Convenience log function.
9374 (emacs_gnutls_read): Use new log functions,
9375 `gnutls_handshakes_tried' process member, and
9376 `GNUTLS_EMACS_HANDSHAKES_LIMIT' to limit the number of handshake
9377 attempts per process (connection).
9378
b4d3bc10
CY
93792012-04-09 Chong Yidong <cyd@gnu.org>
9380
9381 * eval.c (Fuser_variable_p, user_variable_p_eh)
9382 (lisp_indirect_variable): Functions deleted.
9383 (Fdefvar): Caller changed.
9384
9385 * callint.c (Finteractive, Fcall_interactively):
9386 * minibuf.c (Fread_variable): Callers changed.
9387
70f4d973
EZ
93882012-04-09 Eli Zaretskii <eliz@gnu.org>
9389
9390 * xdisp.c (set_cursor_from_row): If the display string appears in
9391 the buffer at position that is closer to point than the position
9392 after the display string, display the cursor on the first glyph of
9393 the display string. Fixes cursor display when a 'display' text
9394 property immediately follows invisible text. (Bug#11094)
9395
cb3c2e3e
PE
93962012-04-09 Paul Eggert <eggert@cs.ucla.edu>
9397
9398 composite.c: use 'double' consistently
9399 * composite.c (get_composition_id): Use 'double' consistently
9400 instead of converting 'float' to 'double' and vice versa; this is
9401 easier to understand and avoids a GCC warning.
9402
fd06db5d
GM
94032012-04-09 Glenn Morris <rgm@gnu.org>
9404
50fe702a
GM
9405 * Makefile.in: Generate leim-list with bootstrap-emacs, in
9406 preparation for dumping it with emacs. (Bug#4789)
9407 (leimdir): New variable.
9408 ($(leimdir)/leim-list.el): New rule.
9409 (emacs$(EXEEXT)): Depend on leim-list.el.
9410
fd06db5d
GM
9411 * buffer.c (Qucs_set_table_for_input): Remove. (Bug#9821)
9412 (Fget_buffer_create): Don't call Qucs_set_table_for_input.
9413 (init_buffer_once, syms_of_buffer): Remove Qucs_set_table_for_input.
9414
55c131ee
AS
94152012-04-08 Andreas Schwab <schwab@linux-m68k.org>
9416
9417 * lisp.h (struct Lisp_Symbol): Add explicit padding to ensure
9418 proper alignment.
9419
9209588f
JB
94202012-04-07 Juanma Barranquero <lekktu@gmail.com>
9421
9422 * xml.c (init_libxml2_functions) [WINDOWSNT]:
9423 Remove unused local variable.
9424
e3fb2efb
PE
94252012-04-07 Paul Eggert <eggert@cs.ucla.edu>
9426
9427 Avoid unnecessary pointer scanning in garbage collection (Bug#10780).
9428 * alloc.c (POINTERS_MIGHT_HIDE_IN_OBJECTS): New macro.
9429 (mark_memory): Mark Lisp_Objects only if pointers might hide in
9430 objects, as mark_maybe_pointer will catch them otherwise.
9431 (GC_LISP_OBJECT_ALIGNMENT): Remove; no longer needed.
9432 * s/gnu-linux.h (GC_LISP_OBJECT_ALIGNMENT) [__mc68000__]: Likewise.
9433
b5385551
PE
94342012-04-07 Paul Eggert <eggert@cs.ucla.edu>
9435
9436 Fix typo that broke non-Windows builds.
9437 * xml.c (libxml2_loaded_p) [!!WINDOWSNT]: 'inine' -> 'inline'.
9438
9078ead6
EZ
94392012-04-07 Eli Zaretskii <eliz@gnu.org>
9440
9441 Support building on MS-Windows with libxml2.
9442
9443 * makefile.w32-in (OBJ2): Add xml.$(O).
9444 (GLOBAL_SOURCES): Add xml.c.
9445 ($(BLD)/xml.$(O)): New dependency list.
9446
9447 * xml.c (DEF_XML2_FN, LOAD_XML2_FN) [WINDOWSNT]: New macros.
9448 (fn_htmlReadMemory, fn_xmlReadMemory, fn_xmlDocGetRootElement)
9449 (fn_xmlFreeDoc, fn_xmlCleanupParser, fn_xmlCheckVersion)
9450 [!WINDOWSNT]: New macros.
9451 (init_libxml2_functions, libxml2_loaded_p): New functions.
9452 (parse_region): Call fn_xmlCheckVersion instead of using the macro
9453 LIBXML_TEST_VERSION. Call libxml2 functions via the fn_* macros.
9454 (xml_cleanup_parser): New function, export for fn_xmlCleanupParser.
9455 Calls xmlCleanupParser only if libxml2 was loaded (or statically
9456 linked in).
6bbef4e5
JC
9457 (Flibxml_parse_html_region, Flibxml_parse_xml_region):
9458 Call init_libxml2_functions before calling libxml2 functions.
9078ead6
EZ
9459 (syms_of_xml) <Qlibxml2_dll>: DEFSYM it.
9460
9461 * emacs.c: Don't include libxml/parser.h.
9462 (shut_down_emacs): Call xml_cleanup_parser, instead of calling
9463 xmlCleanupParser directly.
9464
9465 * lisp.h [HAVE_LIBXML2]: Add prototype for xml_cleanup_parser.
9466
3811fdf3
EZ
94672012-04-07 Eli Zaretskii <eliz@gnu.org>
9468
9469 * indent.c (Fvertical_motion): If there is a display string at
9470 point, use it.vpos to compute how many lines to backtrack after
9471 move_it_to point. (Bug#11133)
9472
2f8e16b2
EZ
94732012-04-06 Eli Zaretskii <eliz@gnu.org>
9474
9475 * buffer.h (FETCH_CHAR, FETCH_MULTIBYTE_CHAR):
9476 * character.h (STRING_CHAR, STRING_CHAR_AND_LENGTH): Add comments
9477 about subtle differences between FETCH_CHAR* and STRING_CHAR*
9478 macros related to unification of CJK characters. For the details,
9479 see the discussion following the message here:
9480 http://debbugs.gnu.org/cgi/bugreport.cgi?bug=11073#14.
9481
3d439cd1
CY
94822012-04-04 Chong Yidong <cyd@gnu.org>
9483
9484 * keyboard.c (Vdelayed_warnings_list): Doc fix.
9485
8bc53d00
EZ
94862012-04-01 Eli Zaretskii <eliz@gnu.org>
9487
9488 * w32menu.c (simple_dialog_show, add_menu_item): Use SAFE_ALLOCA
9489 instead of alloca. (Bug#11138)
9490
3b0512a3
AS
94912012-04-01 Andreas Schwab <schwab@linux-m68k.org>
9492
9493 * w32menu.c (is_simple_dialog): Properly check lisp types.
9494 (Bug#11141)
9495
8427ddd2
EZ
94962012-03-31 Eli Zaretskii <eliz@gnu.org>
9497
979022ef
EZ
9498 * xdisp.c (move_it_by_lines): When DVPOS is positive, and the
9499 position we get to after a call to move_it_to fails the
9500 IS_POS_VALID_AFTER_MOVE_P test, move to the next buffer position
9501 only if we wind up in a string from display property. (Bug#11063)
9502
a6b1c7cc
EZ
9503 * window.c (Fdelete_other_windows_internal): Invalidate the row
9504 and column information about mouse highlight, so that redisplay
9505 restores it after reallocating the glyph matrices. (Bug#7464)
9506
8427ddd2
EZ
9507 * xdisp.c (set_cursor_from_row): If `cursor' property on a display
9508 string comes from a `display' text property, use the buffer
9509 position of that property as if we actually saw that position in
9510 the row's glyphs.
697ba24b
EZ
9511 (move_it_by_lines): Remove the assertion that
9512 "it->current_x == 0 && it->hpos == 0" which can be legitimately
9513 violated when there's a before-string at the beginning of a line.
9514 (Bug#11063)
8427ddd2 9515
65a0a738
EZ
95162012-03-30 Eli Zaretskii <eliz@gnu.org>
9517
9518 * xdisp.c (append_space_for_newline): If the default face was
9519 remapped, use the remapped face for the appended newline.
9520 (extend_face_to_end_of_line): Use the remapped default face for
9521 extending the face to the end of the line.
9522 (display_line): Call extend_face_to_end_of_line when the default
9523 face was remapped. (Bug#11068)
9524
581355cc
EZ
95252012-03-29 Eli Zaretskii <eliz@gnu.org>
9526
9527 * s/ms-w32.h: Discourage from defining HAVE_GETCWD.
9528
e8fc049f
SM
95292012-03-28 Stefan Monnier <monnier@iro.umontreal.ca>
9530
9531 * keyboard.c (safe_run_hooks_error): Don't unquote strings.
9532
4fb9a543
GM
95332012-03-27 Glenn Morris <rgm@gnu.org>
9534
9535 * search.c (Fword_search_backward_lax, Fword_search_forward_lax):
9536 Doc fixes.
9537
679910f1
KH
95382012-03-26 Kenichi Handa <handa@m17n.org>
9539
9540 * dispextern.h (struct glyph): Fix previous change. Change the
9541 bit length of glyphless.ch to 25 (Bug#11082).
9542
90d49b7f
CY
95432012-03-26 Chong Yidong <cyd@gnu.org>
9544
9545 * keyboard.c (Vselection_inhibit_update_commands): New variable.
9546 (command_loop_1): Use it; inhibit selection update for
9547 handle-select-window too (Bug#8996).
9548
f514f6f0
FP
95492012-03-25 Fabrice Popineau <fabrice.popineau@supelec.fr>
9550
e8fc049f 9551 * w32heap.c (_heap_init, _heap_term): Remove dead MSVC-specific code.
f514f6f0 9552
bf43fa51
KH
95532012-03-25 Kenichi Handa <handa@m17n.org>
9554
9555 * dispextern.h (struct glyph): Change the bit length of
9556 glyphless.ch to 22 to make the member glyphless fit in 32 bits.
9557
8a0c01dd
EZ
95582012-03-24 Eli Zaretskii <eliz@gnu.org>
9559
9560 * s/ms-w32.h (tzname): Include time.h before redirecting to
9561 _tzname. Fixes the MSVC build. (Bug#9960)
9562
7d1c3a76
AS
95632012-03-24 Andreas Schwab <schwab@linux-m68k.org>
9564
8ed79523
AS
9565 * xdisp.c (produce_glyphless_glyph): Limit length of acronym to 6
9566 characters.
9567
7d1c3a76
AS
9568 * xterm.c (XTread_socket): Only modify handling_signal if
9569 !SYNC_INPUT. (Bug#11080)
9570
e99a9b8b
EZ
95712012-03-23 Eli Zaretskii <eliz@gnu.org>
9572
9573 * bidi.c (bidi_fetch_char): Use STRING_CHAR_AND_LENGTH instead of
9574 FETCH_MULTIBYTE_CHAR followed by CHAR_BYTES. Prevents crashes
9575 when fetching a multibyte character consumes more bytes than
9576 CHAR_BYTES returns, due to unification of CJK characters in
9577 string_char. (Bug#11073)
9578
5063c0e1
TN
95792012-03-23 Troels Nielsen <bn.troels@gmail.com> (tiny change)
9580
9581 * process.c (wait_reading_process_output): Handle pty disconnect
9582 by refraining from sending oneself a SIGCHLD (bug#10933).
9583
9f851fbd
CY
95842012-03-22 Chong Yidong <cyd@gnu.org>
9585
9586 * dispextern.h (struct it): New member string_from_prefix_prop_p.
9587
5063c0e1 9588 * xdisp.c (push_prefix_prop): Rename from push_display_prop.
9f851fbd
CY
9589 Mark string as coming from a prefix property.
9590 (handle_face_prop): Use default face for prefix strings (Bug#4281).
9591 (pop_it, reseat_1): Save and restore string_from_prefix_prop_p.
9592
fb5b8aca
CY
95932012-03-21 Chong Yidong <cyd@gnu.org>
9594
9595 * xfaces.c (Vface_remapping_alist): Doc fix.
9596
62356a1b
EZ
95972012-03-20 Eli Zaretskii <eliz@gnu.org>
9598
9599 * w32proc.c (Fw32_set_console_codepage)
5063c0e1
TN
9600 (Fw32_set_console_output_codepage, Fw32_get_codepage_charset):
9601 Doc fixes.
62356a1b 9602
025de85b
CY
96032012-03-20 Chong Yidong <cyd@gnu.org>
9604
9605 * dispnew.c (Fredisplay, Vredisplay_preemption_period): Update doc
9606 to reflect default non-nil value of redisplay-dont-pause.
9607
4827f94e
KH
96082012-03-19 Kenichi Handa <handa@m17n.org>
9609
9610 * ftfont.c (ftfont_drive_otf): Mask bits of character code to make
9611 it fit in a valid range (Bug#11003).
9612
e50a24a2
EZ
96132012-03-18 Eli Zaretskii <eliz@gnu.org>
9614
9615 * xdisp.c (cursor_row_p): Even if the glyph row ends in a string
9616 that is not from display property, accept the row as a "cursor
9617 row" if one of the string's character has a non-nil `cursor'
9618 property. Fixes cursor positioning when there are newlines in
9619 overlay strings, e.g. in icomplete.el. (Bug#11035)
9620
9af5ed87
PE
96212012-03-12 Paul Eggert <eggert@cs.ucla.edu>
9622
9623 * buffer.c (compare_overlays): Don't assume args differ (Bug#6830).
9624
d1f55f16
CY
96252012-03-12 Chong Yidong <cyd@gnu.org>
9626
9627 * eval.c (inhibit_lisp_code): Rename from
9628 inhibit_window_configuration_change_hook; move from window.c.
9629
9630 * xfns.c (unwind_create_frame_1, Fx_create_frame):
9631 * window.c (run_window_configuration_change_hook)
9632 (syms_of_window): Callers changed.
9633
66c5eebd
CY
96342012-03-11 Chong Yidong <cyd@gnu.org>
9635
413df973
CY
9636 * keymap.c (Fkey_description): Doc fix (Bug#9700).
9637
66c5eebd
CY
9638 * editfns.c (Fconstrain_to_field): Doc fix (Bug#9452).
9639
1de11f56
CY
96402012-03-10 Chong Yidong <cyd@gnu.org>
9641
9642 * frame.c (other_visible_frames): Don't assume the selected frame
9643 is visible (Bug#10955).
9644
cae07000
SM
96452012-03-09 Stefan Monnier <monnier@iro.umontreal.ca>
9646
9647 * buffer.c (compare_overlays): Avoid qsort's instability (bug#6830).
9648
89c94350
JD
96492012-03-08 Jan Djärv <jan.h.d@swipnet.se>
9650
9651 * gtkutil.c (x_wm_set_size_hint): Use one row in call to
9652 FRAME_TEXT_LINES_TO_PIXEL_HEIGHT so base_height is greater than
9653 zero (Bug#10954).
9654
999dd333
GM
96552012-03-03 Glenn Morris <rgm@gnu.org>
9656
01a6dcc8 9657 * alloc.c (Fgarbage_collect, misc-objects-consed): Doc fixes.
999dd333 9658
de0100f2
EZ
96592012-03-02 Eli Zaretskii <eliz@gnu.org>
9660
9661 * xdisp.c (try_window_reusing_current_matrix): Don't move cursor
9662 position past the first glyph_row that ends at ZV. (Bug#10902)
b8456c5c
EZ
9663 (redisplay_window, next_element_from_string): Fix typos in
9664 comments.
3e441275
EZ
9665 (redisplay_window): Pass to move_it_vertically the margin in
9666 pixels, not in screen lines.
de0100f2 9667
96a72ee9
GM
96682012-03-02 Glenn Morris <rgm@gnu.org>
9669
9670 * buffer.c (buffer-list-update-hook): Doc fix.
9671
312508d7
EZ
96722012-02-29 Eli Zaretskii <eliz@gnu.org>
9673
9674 * xdisp.c (get_overlay_strings_1): Under bidi redisplay, call
9675 push_it before setting up the iterator for the first overlay
9676 string, even if we have an empty string loaded.
9677 (next_overlay_string): If there's an empty string on the iterator
9678 stack, pop the stack. (Bug#10903)
9679
27f3c637
PE
96802012-02-25 Paul Eggert <eggert@cs.ucla.edu>
9681
9682 Generalize fix for crash due to non-contiguous EMACS_INT (Bug#10780).
9683 Suggested by Stefan Monnier in
9684 <http://lists.gnu.org/archive/html/emacs-devel/2012-02/msg00692.html>.
9685 * alloc.c (widen_to_Lisp_Object): New static function.
9686 (mark_memory): Also mark Lisp_Objects by fetching pointer words
9687 and widening them to Lisp_Objects. This would work even if
9688 USE_LSB_TAG is defined and wide integers are used, which might
9689 happen in a future version of Emacs.
9690
3c9dfce6
CY
96912012-02-25 Chong Yidong <cyd@gnu.org>
9692
fa74b241
CY
9693 * fileio.c (Ffile_selinux_context, Fset_file_selinux_context):
9694 Doc fix.
9695
3c9dfce6
CY
9696 * xselect.c (Fx_selection_exists_p): Doc fix.
9697 (x_clipboard_manager_save_all): Print an informative message
9698 before saving to clipboard manager.
9699
9486df08
CY
97002012-02-24 Chong Yidong <cyd@gnu.org>
9701
9702 * keyboard.c (process_special_events): Handle all X selection
9703 requests in kbd_buffer, not just the next one (Bug#8869).
9704
f01d3321
CY
97052012-02-23 Chong Yidong <cyd@gnu.org>
9706
9707 * xfns.c (Fx_create_frame): Avoid window-configuration-change-hook
9708 call when setting menu-bar-lines and tool-bar-lines parameters.
9709 (unwind_create_frame_1): New helper function.
9710
9711 * window.c (inhibit_window_configuration_change_hook): New var.
9712 (run_window_configuration_change_hook): Obey it.
b2e4ca7d 9713 (syms_of_window): Initialize it.
f01d3321 9714
86b847b6
CY
97152012-02-22 Chong Yidong <cyd@gnu.org>
9716
9717 * xterm.c (x_draw_image_relief): Add missing type check for
9718 Vtool_bar_button_margin (Bug#10743).
9719
a59225b1
CY
97202012-02-21 Chong Yidong <cyd@gnu.org>
9721
9722 * fileio.c (Vfile_name_handler_alist): Doc fix.
9723
9724 * buffer.c (Fget_file_buffer): Protect against invalid file
9725 handler return value.
9726
310f5bd4
PE
97272012-02-20 Paul Eggert <eggert@cs.ucla.edu>
9728
cb3a28cc
PE
9729 * .gdbinit (xreload): Don't assume EMACS_INT fits in 'long'
9730 when computing $valmask.
9731
310f5bd4
PE
9732 Fix crash due to non-contiguous EMACS_INT (Bug#10780).
9733 * lisp.h (VALBITS): Move definition up, so that USE_LSB_TAG can use it.
9734 (USE_LSB_TAG): Do not define if UINTPTR_MAX >> VALBITS == 0.
9735 It's useless in that case, and it can cause problems on hosts
9736 that allocate halves of EMACS_INT values separately.
9737 Reported by Dan Horák. Diagnosed by Andreas Schwab in
9738 <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=10780#30>.
9739 * mem-limits.h (EXCEEDS_LISP_PTR): Define to 0 on hosts where
9740 UINTPTR_MAX >> VALBITS == 0. This is required by the above change;
9741 it avoids undefined behavior on hosts where shifting right by more
9742 than the word width has undefined behavior.
9743
2375c96a
CY
97442012-02-19 Chong Yidong <cyd@gnu.org>
9745
9746 * fileio.c (Ffile_name_directory, Ffile_name_nondirectory)
9747 (Funhandled_file_name_directory, Ffile_name_as_directory)
9748 (Fdirectory_file_name, Fexpand_file_name)
9749 (Fsubstitute_in_file_name): Protect against invalid file handler
9750 return values (Bug#10845).
9751
3eb49e71
EZ
97522012-02-18 Eli Zaretskii <eliz@gnu.org>
9753
9754 * .gdbinit (pitx): Fix incorrect references to fields of the
9755 iterator stack.
9756
7b926f3f
CY
97572012-02-17 Chong Yidong <cyd@gnu.org>
9758
9759 * syntax.c (Fscan_lists): Doc fix (Bug#10833).
9760
11273115
PE
97612012-02-15 Paul Eggert <eggert@cs.ucla.edu>
9762
9763 * image.c (MAX_IMAGE_SIZE): Increase from 6.0 to 10.0; see
9764 <http://lists.gnu.org/archive/html/emacs-devel/2012-02/msg00540.html>.
9765
c3a70e2b
CY
97662012-02-15 Chong Yidong <cyd@gnu.org>
9767
9768 * eval.c (Fdefvar, Fdefconst): Doc fix; note that the variable is
9769 marked as special. Also, starting docstrings with * is obsolete.
9770
0ca43699
AS
97712012-02-13 Andreas Schwab <schwab@linux-m68k.org>
9772
9773 * gnutls.c (emacs_gnutls_write): Fix last change.
9774
2e8f3c56
LI
97752012-02-13 Lars Ingebrigtsen <larsi@gnus.org>
9776
9777 * gnutls.c (emacs_gnutls_write): Set errno appropriately for
9778 send_process.
9779
af70074f
SM
97802012-02-13 Stefan Monnier <monnier@iro.umontreal.ca>
9781
9782 * keymap.c (Fsingle_key_description): Handle char ranges.
9783
95986d52
CY
97842012-02-12 Chong Yidong <cyd@gnu.org>
9785
afd83bd1
CY
9786 * xdisp.c (handle_stop): Avoid assigning -1 to it->face_id here,
9787 as that creates a dangerous corner case.
9788
95986d52
CY
9789 * window.c (Fdelete_window_internal): Invalidate the mouse
9790 highlight (Bug#9904).
9791
bd7da63e
GM
97922012-02-12 Glenn Morris <rgm@gnu.org>
9793
9794 * xselect.c (Fx_own_selection_internal)
9795 (Fx_get_selection_internal, Fx_disown_selection_internal)
9796 (Fx_selection_owner_p, Fx_selection_exists_p): Doc fixes.
9797 * nsselect.m (Fx_own_selection_internal)
9798 (Fx_disown_selection_internal, Fx_selection_exists_p)
9799 (Fx_selection_owner_p, Fx_get_selection_internal):
9800 Sync docs and argument specs with the xselect.c versions.
9801
77abcbc2
LI
98022012-02-11 Lars Ingebrigtsen <larsi@gnus.org>
9803
9804 * gnutls.c (emacs_gnutls_write): Don't infloop if sendto fails.
9805
90b671e2
EZ
98062012-02-11 Eli Zaretskii <eliz@gnu.org>
9807
1c0ca0b7
EZ
9808 * w32select.c (Fx_selection_exists_p): Sync doc string and
9809 argument list with xselect.c. (Bug#10783)
9810
9811 * w16select.c (Fx_selection_exists_p): Sync doc string and
9812 argument list with xselect.c. (Bug#10783)
90b671e2 9813
49241268
GM
98142012-02-10 Glenn Morris <rgm@gnu.org>
9815
9816 * fns.c (Fsecure_hash): Doc fix.
9817
f998bbe7 98182012-02-09 Kenichi Handa <handa@m17n.org>
5c1ca13d
KH
9819
9820 * coding.c (produce_chars): Fix updating of src_end (Bug#10701).
9821
0992bd9c
CY
98222012-02-07 Chong Yidong <cyd@gnu.org>
9823
9824 * buffer.c (Fbuffer_local_variables)
9825 (buffer_lisp_local_variables): Handle unbound vars correctly;
9826 don't let Qunbound leak into Lisp.
9827
af008560
GM
98282012-02-07 Glenn Morris <rgm@gnu.org>
9829
dd605cc4
GM
9830 * image.c (Fimagemagick_types): Doc fix.
9831
af008560
GM
9832 * image.c (imagemagick-render-type): Change it from a lisp object
9833 to an integer. Move the doc here from the lisp manual.
9834 Treat all values not equal to 0 the same.
9835
1449fa1d
CY
98362012-02-06 Chong Yidong <cyd@gnu.org>
9837
9838 * doc.c (store_function_docstring): Avoid applying docstring of
9839 alias to base function (Bug#2603).
9840
3723ec07
AS
98412012-02-04 Andreas Schwab <schwab@linux-m68k.org>
9842
9843 * .gdbinit (pp1, pv1): Remove redundant defines.
9844 (pr): Use pp.
9845
79c1cc1e
CY
98462012-02-04 Chong Yidong <cyd@gnu.org>
9847
9848 * nsterm.m: Declare a global (Bug#10694).
9849
d7f29f8e
EZ
98502012-02-04 Eli Zaretskii <eliz@gnu.org>
9851
cae07000
SM
9852 * w32.c (get_emacs_configuration_options):
9853 Include --enable-checking, if specified, in the return value.
d7f29f8e 9854
3b95a6f9
MR
98552012-02-04 Martin Rudalics <rudalics@gmx.at>
9856
9857 * dispnew.c (change_frame_size_1): Calculate new_frame_total_cols
9858 after rounding frame sizes. (Bug#9723)
9859
d6fa96a6
EZ
98602012-02-04 Eli Zaretskii <eliz@gnu.org>
9861
9862 * keyboard.c (adjust_point_for_property): Don't position point
9863 before BEGV. (Bug#10696)
9864
df0b2940
PE
98652012-02-03 Paul Eggert <eggert@cs.ucla.edu>
9866
9867 Handle overflow when computing char display width (Bug#9496).
9868 * character.c (char_width): Return EMACS_INT, not int.
9869 (char_width, c_string_width): Check for overflow when
9870 computing the width; this is possible now that individual
9871 characters can have unbounded width. Problem introduced
9872 by merge from Emacs 23 on 2012-01-19.
9873
6bee44d6
MA
98742012-02-02 Michael Albinus <michael.albinus@gmx.de>
9875
9876 * dbusbind.c (Fdbus_register_method): Mention the return value
9877 :ignore in the docstring.
9878
44f92739
GM
98792012-02-02 Glenn Morris <rgm@gnu.org>
9880
1b9f60cc
GM
9881 * callproc.c (Fcall_process, Fcall_process_region): Doc fix.
9882
44f92739
GM
9883 * nsterm.m (syms_of_nsterm) <x-toolkit-scroll-bars>:
9884 Unconditionally set to t. (Bug#10673)
9885 * nsterm.m (syms_of_nsterm) <x-toolkit-scroll-bars>:
9886 * w32term.c (syms_of_w32term) <x-toolkit-scroll-bars>:
9887 * xterm.c (syms_of_xterm) <x-toolkit-scroll-bars>: Doc fix.
9888
c5d3843c
KH
98892012-02-02 Kenichi Handa <handa@m17n.org>
9890
9891 (x_produce_glyphs): Cancel previous change. If cmp->glyph_len is
9892 0, do not call append_composite_glyph.
9893
159462d4 98942012-02-02 Kenichi Handa <handa@m17n.org>
d2a51fd7
KH
9895
9896 * xdisp.c (BUILD_COMPOSITE_GLYPH_STRING): Initialize first_s to
9897 NULL (Bug#6988).
9898 (x_produce_glyphs): If the component of a composition is a null
9899 string, set it->pixel_width to 1 to avoid zero-width glyph.
9900
78cef877
EZ
99012012-02-01 Eli Zaretskii <eliz@gnu.org>
9902
9903 * ralloc.c (resize_bloc, r_alloc_sbrk): Don't call memmove if its
9904 first 2 arguments are identical. This makes inserting large
9905 output from a subprocess an order of magnitude faster on
9906 MS-Windows, where all sbrk'ed memory is always contiguous.
9907
97897668
GM
99082012-01-31 Glenn Morris <rgm@gnu.org>
9909
9910 * nsterm.m (syms_of_nsterm) <x-toolkit-scroll-bars>:
c78c6e0b 9911 * w32term.c (syms_of_w32term) <x-toolkit-scroll-bars>:
97897668
GM
9912 * xterm.c (syms_of_xterm) <x-toolkit-scroll-bars>: Sync docs.
9913
31fd3586
GM
99142012-01-29 Glenn Morris <rgm@gnu.org>
9915
9916 * gnutls.c (syms_of_gnutls): More doc (from etc/NEWS).
9917
0e24a8b2
CY
99182012-01-28 Samuel Thibault <sthibault@debian.org> (tiny change)
9919
9920 * s/gnu.h: Define POSIX_SIGNALS (Bug#10552).
9921
cc0adcb0
CY
99222012-01-28 Chong Yidong <cyd@gnu.org>
9923
9924 * minibuf.c (syms_of_minibuf): Doc fix (Bug#10550).
9925
acc28cb9
CY
99262012-01-26 Chong Yidong <cyd@gnu.org>
9927
9c69cfb7
CY
9928 * keyboard.c (Vecho_keystrokes): Document zero value (Bug#10503).
9929
acc28cb9
CY
9930 * search.c (Fsearch_forward, Fsearch_backward): Document negative
9931 repeat counts (Bug#10507).
9932
48da7392
GM
99332012-01-26 Glenn Morris <rgm@gnu.org>
9934
9935 * lread.c (syms_of_lread): Doc fix.
9936
14af5f7f
CY
99372012-01-25 HIROSHI OOTA <nil@mad.dog.cx> (tiny change)
9938
9939 * coding.c (encode_designation_at_bol): Change return value to
9940 EMACS_INT.
9941
0b21c100
CY
99422012-01-25 Chong Yidong <cyd@gnu.org>
9943
9944 * eval.c (Fuser_variable_p): Doc fix; mention custom-variable-p.
9945
3c2907f7
CY
99462012-01-21 Chong Yidong <cyd@gnu.org>
9947
9948 * floatfns.c (Fcopysign): Make the second argument non-optional,
9949 since nil is not allowed anyway.
9950
959ad23f
AS
99512012-01-21 Andreas Schwab <schwab@linux-m68k.org>
9952
9953 * process.c (read_process_output): Use p instead of XPROCESS (proc).
9954 (send_process): Likewise.
9955
34a02f46
MR
99562012-01-19 Martin Rudalics <rudalics@gmx.at>
9957
9958 * window.c (save_window_save, Fcurrent_window_configuration)
cae07000
SM
9959 (Vwindow_persistent_parameters): Do not use Qstate.
9960 Rewrite doc-strings.
34a02f46 9961
1259009a 99622012-01-19 Kenichi Handa <handa@m17n.org>
25ed9e61
KH
9963
9964 * character.c (char_width): New function.
70d4fdf6
GM
9965 (Fchar_width, c_string_width, lisp_string_width):
9966 Use char_width (Bug#9496).
25ed9e61 9967
6a6ee00d
MR
99682012-01-16 Martin Rudalics <rudalics@gmx.at>
9969
9970 * window.c (Vwindow_persistent_parameters): New variable.
9971 (Fset_window_configuration, save_window_save): Handle persistent
9972 window parameters.
9973
c85efaf7
EZ
99742012-01-14 Eli Zaretskii <eliz@gnu.org>
9975
9976 * w32fns.c (signal_user_input): Don't do a QUIT, to avoid
9977 thrashing the stack of the thread. (Bug#9087)
9978
5944709e
PE
99792012-01-12 Paul Eggert <eggert@cs.ucla.edu>
9980
9981 * xdisp.c (rows_from_pos_range): Add parens as per gcc -Wparentheses.
9982
e71f5d99
EZ
99832012-01-11 Eli Zaretskii <eliz@gnu.org>
9984
9985 * xdisp.c (rows_from_pos_range): Handle the case where the
9986 highlight ends on a newline. (Bug#10464)
9987 (mouse_face_from_buffer_pos): Fix off-by-one error in calculating
9988 he end column for display of highlight that ends on a newline
9989 before a R2L line.
9990
ce316182
GM
99912012-01-11 Glenn Morris <rgm@gnu.org>
9992
9993 * lread.c (init_lread): If no-site-lisp, remove site-lisp dirs
9994 from load-path also when installation-directory is nil. (Bug#10208)
9995
5b43da69
GM
99962012-01-10 Glenn Morris <rgm@gnu.org>
9997
74cc8ff9
GM
9998 * emacs.c (syms_of_emacs) <installation-directory>: Doc fix.
9999
7d8d6e4e
GM
10000 * epaths.in (PATH_LOADSEARCH, PATH_EXEC, PATH_DATA, PATH_DOC):
10001 Update template values to be closer to their typical values these days.
5b43da69 10002
a0db8d43
EZ
100032012-01-09 Eli Zaretskii <eliz@gnu.org>
10004
10005 * xdisp.c (rows_from_pos_range): Accept additional argument
10006 DISP_STRING, and accept any glyph in a row whose object is that
10007 string as eligible for mouse highlight. Fixes mouse highlight of
10008 display strings from overlays. (Bug#10464)
10009
9a0115ab 100102012-01-07 Paul Eggert <eggert@cs.ucla.edu>
09450bae 10011
b9110d6a 10012 emacs: fix an auto-save permissions race condition (Bug#10400)
09450bae
PE
10013 * fileio.c (auto_saving_dir_umask): New static var.
10014 (Fmake_directory_internal): Use it.
10015 (do_auto_save_make_dir): Set it, instead of invoking chmod after
10016 creating the directory. The old code temporarily assigns
10017 too-generous permissions to the directory.
10018 (do_auto_save_eh): Clear it.
b9110d6a 10019 (Fdo_auto_save): Catch all errors, not just file errors, so
09450bae
PE
10020 that the var is always cleared.
10021
6c1bd3f3
EZ
100222012-01-07 Eli Zaretskii <eliz@gnu.org>
10023
10024 * search.c (scan_buffer): Pass character positions to
10025 know_region_cache, not byte positions. (Bug#6540)
10026
069d2b50
L
100272012-01-07 LynX <_LynX@bk.ru> (tiny change)
10028
10029 * w32.c (sys_rename): Report EXDEV when rename of a directory
10030 fails because the target is on another logical disk. (Bug#10284)
10031
75bf0d33
DB
100322012-01-07 David Benjamin <davidben@mit.edu> (tiny change)
10033
10034 * xterm.c (x_embed_request_focus): New function.
10035
10036 * xterm.h: Add prototype.
10037
10038 * xfns.c (Fx_focus_frame): Use it for embedded frames (Bug#9977).
10039
1c6e5a32
GM
100402012-01-05 Glenn Morris <rgm@gnu.org>
10041
10042 * emacs.c (emacs_copyright): Update short copyright year to 2012.
10043
651e947e
EZ
100442012-01-01 Eli Zaretskii <eliz@gnu.org>
10045
10046 * gnutls.c (init_gnutls_functions): Load gnutls_check_version.
10047 Load gnutls_transport_set_lowat only if GnuTLS version is below
10048 2.11.1.
10049 (emacs_gnutls_handshake): Call gnutls_transport_set_lowat only for
10050 GnuTLS versions below 2.11.1.
10051
3778cdd8
AL
100522011-12-31 Antoine Levitt <antoine.levitt@gmail.com>
10053
10054 * xdisp.c (syms_of_xdisp) <window-scroll-functions>: Add warning
10055 to the doc string advising against its use for altering the way
10056 windows are scrolled.
10057
0e5317f7
KH
100582011-12-28 Kenichi Handa <handa@m17n.org>
10059
10060 * coding.c (Fdefine_coding_system_internal): Make an utf-8 base
10061 coding-system ASCII compatible only when it does not produce BOM
10062 on encoding (Bug#10383).
10063
93d5ca1f
JD
100642011-12-26 Jan Djärv <jan.h.d@swipnet.se>
10065
10066 * xmenu.c (x_menu_wait_for_event): Use xg_select for Gtk3 so menus
10067 can scroll.
10068 (create_and_show_popup_menu): Always use menu_position_func for
10069 Gtk3 (Bug#10361).
10070
ca22b785
AS
100712011-12-24 Andreas Schwab <schwab@linux-m68k.org>
10072
10073 * callint.c (Fcall_interactively): Don't truncate prompt string.
10074
d048e1e6
EZ
100752011-12-23 Eli Zaretskii <eliz@gnu.org>
10076
10077 * xdisp.c (handle_invisible_prop): Handle correctly an invisible
10078 property that ends at ZV, so that the bidi iteration could be
3ba1a2ad 10079 resumed from there (after widening). (Bug#10360)
d048e1e6 10080
5ccaba1f
JD
100812011-12-22 Jan Djärv <jan.h.d@swipnet.se>
10082
10083 * nsfont.m (ns_spec_to_descriptor): Do not autorelease fdesc.
10084
204ee57f
JD
100852011-12-21 Jan Djärv <jan.h.d@swipnet.se>
10086
b81d40f0
JB
10087 * nsterm.m (x_free_frame_resources):
10088 Release f->output_data.ns->miniimage.
204ee57f
JD
10089 (ns_index_color): Fix indentation. Do not retain
10090 color_table->colors[i].
10091
10092 * nsmenu.m (ns_update_menubar): Call free_menubar_widget_value_tree
10093 before returning.
10094
10095 * nsfns.m (x_set_background_color): Assign return value from
10096 ns_index_color to face-background instead of NSColor*.
10097 (ns_implicitly_set_icon_type): Fix indentation.
10098 Change assignment in for loop to comparison.
10099
10100 * emacs.c (ns_pool): New variable.
10101 (main): Assign ns_pool.
10102 (Fkill_emacs): Call ns_release_autorelease_pool.
10103
10104 * nsfont.m (ns_spec_to_descriptor): Fix indentation,
10105 autorelease fdesc, release fdAttrs and tdict.
10106 (ns_get_covering_families): Release charset.
10107 (ns_findfonts): Release NSFontDescriptor created with new.
10108 (ns_uni_to_glyphs): Fix indentation.
10109 (setString): Release attrStr before assigning new value.
10110
c803b2b7
JD
101112011-12-18 Jan Djärv <jan.h.d@swipnet.se>
10112
678f4426
JD
10113 * nsmenu.m (NSMenuDidBeginTrackingNotification): Declare if OSX < 10.5
10114 and NS_IMPL_COCOA.
10115 (trackingNotification): Surround with ifdef NS_IMPL_COCOA.
10116 (syms_of_nsmenu): Set trackingMenu to 1 if not NS_IMPL_COCOA.
10117
cd394be1 101182011-12-18 David Reitter <reitter@cmu.edu>
678f4426 10119
5fecd5fc
JD
10120 * nsterm.m (ns_term_init): Subscribe for notifications
10121 NSMenuDidBeginTrackingNotification and NSMenuDidEndTrackingNotification
10122 to method trackingNotification in EmacsMenu.
10123
10124 * nsmenu.m (trackingMenu): New variable.
3771cb17 10125 (trackingNotification): New method (from Aquamacs).
5fecd5fc 10126 (menuNeedsUpdate): Expand comment and return if trackingMenu is 0,
3771cb17 10127 from Aquamacs (Bug#7030).
678f4426
JD
10128
101292011-12-18 Jan Djärv <jan.h.d@swipnet.se>
5fecd5fc 10130
c803b2b7
JD
10131 * nsselect.m (CUT_BUFFER_SUPPORT): Remove define.
10132 (symbol_to_nsstring): Fix indentation.
10133 (ns_symbol_to_pb): New function.
cae07000
SM
10134 (Fns_get_selection_internal): Rename from Fns_get_cut_buffer_internal.
10135 (Fns_rotate_cut_buffers_internal): Remove.
10136 (Fns_store_selection_internal): Rename from
c803b2b7
JD
10137 Fns_store_cut_buffer_internal.
10138 (ns_get_foreign_selection, Fx_own_selection_internal)
10139 (Fx_disown_selection_internal, Fx_selection_exists_p)
b81d40f0
JB
10140 (Fns_get_selection_internal, Fns_store_selection_internal):
10141 Use ns_symbol_to_pb and check if return value is nil.
10142 (syms_of_nsselect): Remove ifdef CUT_BUFFER_SUPPORT. Remove defsubr
10143 Sns_rotate_cut_buffers_internal. Sns_get_cut_buffer_internal
c803b2b7
JD
10144 renamed to Sns_get_selection_internal, Sns_store_cut_buffer_internal
10145 renamed to Sns_store_selection_internal.
10146 (ns_handle_selection_request): Move code to Fx_own_selection_internal
10147 and remove this function.
10148 (ns_handle_selection_clear): Remove, never used.
10149 (Fx_own_selection_internal): Move code from ns_handle_selection_request
10150 here.
10151
e1b01a3a
KB
101522011-12-17 Ken Brown <kbrown@cornell.edu>
10153
10154 * fileio.c (check_writable) [CYGWIN]: Return non-zero if UID or
10155 GID is unknown (Bug#10257).
10156
2adb6e85
PE
101572011-12-17 Paul Eggert <eggert@cs.ucla.edu>
10158
10159 * s/gnu-linux.h: Fix mark_memory typo (Bug#10286).
10160 (GC_MARK_SECONDARY_STACK): Omit removed 3rd arg to mark_memory,
10161 which caused a build failure on GNU/Linux IA-64. This problem was
10162 introduced by my 2011-10-07 patch.
10163
d1d7b339
JL
101642011-12-15 Juri Linkov <juri@jurta.org>
10165
10166 * image.c (imagemagick_error): New function. (Bug#10112)
10167 (imagemagick_load_image): Comment out `MagickSetResolution' call.
10168 Use `imagemagick_error' where ImageMagick functions return
10169 `MagickFalse'.
10170 (Fimagemagick_types): Add `Fnreverse' to return the list in the
10171 proper order.
10172
100d5755
KH
101732011-12-15 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
10174
10175 * xftfont.c (xftfont_draw): Use the font metrics of s->font to
10176 fill background (Bug#8992).
10177
454592a6
MR
101782011-12-13 Martin Rudalics <rudalics@gmx.at>
10179
10180 * window.c (Vwindow_combination_resize)
10181 (Vwindow_combination_limit): Use t instead of non-nil in
10182 doc-strings.
61d4b438
MR
10183 (Vrecenter_redisplay): Add first sentence of doc-string on
10184 separate line.
53524d93 10185 (Frecenter): Fix doc-string typo.
454592a6 10186
3633e3aa
KH
101872011-12-11 Kenichi Handa <handa@m17n.org>
10188
10189 * coding.c (Funencodable_char_position): Pay attention to the
10190 buffer text relocation (Bug#9389).
10191
7b9d523a 101922011-12-10 Jan Djärv <jan.h.d@swipnet.se>
61ccba97 10193
7b9d523a
JD
10194 * xterm.c (x_term_init): Move call to gdk_window_add_filter before
10195 gtk_init (Bug#10100).
10196
b73189c6
EZ
101972011-12-10 Eli Zaretskii <eliz@gnu.org>
10198
10199 * xdisp.c (RECORD_MAX_MIN_POS): Use IT->cmp_it.charpos only if
10200 IT->string is nil. (Bug#10263)
10201
f7dfe5d6
JD
102022011-12-10 Jan Djärv <jan.h.d@swipnet.se>
10203
83faebb4
JD
10204 * nsterm.h (x_free_frame_resources): Declare.
10205
f7dfe5d6
JD
10206 * nsfns.m (ns_get_defaults_value): New function (Bug#10103).
10207 (Fns_get_resource, x_get_string_resource): Call ns_get_defaults_value.
10208
10209 * nsterm.h (ns_get_defaults_value): Declare.
10210
10211 * nsterm.m (ns_default): Call ns_get_defaults_value.
10212
7cd4e72c
EZ
102132011-12-09 Eli Zaretskii <eliz@gnu.org>
10214
10215 * xdisp.c (try_scrolling): Don't set scroll_down_p if dy is zero.
10216 (Bug#10170)
10217
b34d7317
YM
102182011-12-09 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
10219
10220 * unexelf.c (unexec) [NS_IMPL_GNUSTEP]: Take account of the case
10221 that where the value of an _OBJC_* symbol points to is in the .bss
10222 section (Bug#10240).
10223
76470ad1
KH
102242011-12-08 Kazuhiro Ito <kzhr@d1.dion.ne.jp> (tiny change)
10225
10226 * coding.c (encode_coding_ccl): Check (charbuf < charbuf_end)
2fac8180 10227 after the loop to call ccl_driver at least once (Bug#8619).
76470ad1 10228
745fff94
KH
102292011-12-08 Kenichi Handa <handa@m17n.org>
10230
10231 * ftfont.c (get_adstyle_property): Fix previous change
10232 (Bug#10233).
10233
6e44397c
JB
102342011-12-07 Juanma Barranquero <lekktu@gmail.com>
10235
10236 * w32.c (init_environment): If no_site_lisp, remove site-lisp
10237 dirs from the default value of EMACSLOADPATH (bug#10208).
10238
7efa6272
GM
102392011-12-07 Glenn Morris <rgm@gnu.org>
10240
10241 * lread.c (init_lread): If no_site_lisp, exclude site-lisp/ in
10242 installation and source directories as well. (Bug#10208)
10243
f6fc4d87
CY
102442011-12-06 Chong Yidong <cyd@gnu.org>
10245
10246 * minibuf.c (Fread_from_minibuffer): Doc fix (Bug#10228).
10247
2bf26180
GM
102482011-12-06 Glenn Morris <rgm@gnu.org>
10249
10250 * process.c (start_process_unwind): Treat any pid <= 0, except -2,
10251 as an error, not just -1. (Bug#10217)
10252
3a6ad4f0
CY
102532011-12-05 Chong Yidong <cyd@gnu.org>
10254
10255 * keyboard.c (process_special_events): New function.
10256 (swallow_events, Finput_pending_p): Use it (Bug#10195).
10257
75a3b399
PE
102582011-12-05 Paul Eggert <eggert@cs.ucla.edu>
10259
10260 * coding.c (encode_designation_at_bol): Don't use uninitialized
10261 local variable (Bug#9318).
10262
c3c9e25e
KH
102632011-12-05 Kenichi Handa <handa@m17n.org>
10264
10265 * ftfont.c (get_adstyle_property): If the font is not BDF nor PCF,
10266 return Qnil (Bug#8046, Bug#10193).
10267
5eb05ea3
KH
102682011-12-05 Kenichi Handa <handa@m17n.org>
10269
10270 * coding.c (encode_designation_at_bol): New args charbuf_end and
10271 dst. Return the number of produced bytes. Callers changed.
a79703f5
KH
10272 (coding_set_source): Return how many bytes coding->source was
10273 relocated.
10274 (coding_set_destination): Return how many bytes
10275 coding->destination was relocated.
10276 (CODING_DECODE_CHAR, CODING_ENCODE_CHAR, CODING_CHAR_CHARSET)
cae07000 10277 (CODING_CHAR_CHARSET_P): Adjust for the avove changes.
5eb05ea3
KH
10278
102792011-12-05 Kazuhiro Ito <kzhr@d1.dion.ne.jp> (tiny change)
10280
10281 * coding.c (CODING_CHAR_CHARSET_P): New macro.
10282 (encode_coding_emacs_mule, encode_coding_iso_2022): Use the above
10283 macro (Bug#9318).
10284
102852011-12-05 Andreas Schwab <schwab@linux-m68k.org>
10286
10287 The following changes are to fix Bug#9318.
10288
a79703f5 10289 * coding.c (CODING_ENCODE_CHAR, CODING_CHAR_CHARSET): New macros.
5eb05ea3
KH
10290 (encode_coding_emacs_mule, ENCODE_ISO_CHARACTER)
10291 (encode_coding_iso_2022, encode_coding_sjis)
a79703f5 10292 (encode_coding_big5, encode_coding_charset): Use the above macros.
5eb05ea3 10293
7dbda6df
JB
102942011-12-05 Juanma Barranquero <lekktu@gmail.com>
10295
10296 * lisp.h (process_quit_flag): Fix external declaration.
10297
6d5eb5b0
SM
102982011-12-04 Stefan Monnier <monnier@iro.umontreal.ca>
10299
10300 Don't macro-inline non-performance-critical code.
10301 * eval.c (process_quit_flag): New function.
10302 * lisp.h (QUIT): Use it.
10303
a0c3fad0
JD
103042011-12-04 Jan Djärv <jan.h.d@swipnet.se>
10305
10306 * nsfns.m (get_geometry_from_preferences): New function.
10307 (Fx_create_frame): Call get_geometry_from_preferences (Bug#10103).
10308
6c07aac2
AS
103092011-12-04 Andreas Schwab <schwab@linux-m68k.org>
10310
10311 * emacs.c (Qkill_emacs): Define.
10312 (syms_of_emacs): Initialize it.
10313 * keyboard.c (interrupt_signal): Don't call Fkill_emacs here, set
10314 Qquit_flag to `kill-emacs' instead.
6d5eb5b0
SM
10315 (quit_throw_to_read_char): Add parameter `from_signal'.
10316 All callers changed. Call Fkill_emacs if requested and safe.
6c07aac2
AS
10317 * lisp.h (QUIT): Call Fkill_emacs if requested.
10318
c052ead4
JD
103192011-12-03 Jan Djärv <jan.h.d@swipnet.se>
10320
10321 * widget.c (update_wm_hints): Return if wmshell is null.
10322 (widget_update_wm_size_hints): New function.
10323
10324 * widget.h (widget_update_wm_size_hints): Declare.
10325
10326 * xterm.c (x_wm_set_size_hint): If USE_X_TOOLKIT, call
10327 widget_update_wm_size_hints (Bug#10104).
10328
9e49252b
EZ
103292011-12-03 Eli Zaretskii <eliz@gnu.org>
10330
10331 * xdisp.c (handle_invisible_prop): If the invisible text ends just
10332 before a newline, prepare the bidi iterator for consuming the
10333 newline, and keep the current paragraph direction. (Bug#10183)
e9a49426 10334 (redisplay_window): Don't let `margin' become negative. (Bug#10192)
9e49252b 10335
02b16839
JL
103362011-12-02 Juri Linkov <juri@jurta.org>
10337
10338 * search.c (Fword_search_regexp): New Lisp function created from
10339 `wordify'. Change type of arg `lax' from `int' to `Lisp_Object'.
10340 (Fword_search_backward, Fword_search_forward)
10341 (Fword_search_backward_lax, Fword_search_forward_lax):
10342 Use `Fword_search_regexp' instead of `wordify'. Doc fix.
10343 (syms_of_search): Define `Sword_search_regexp'. (Bug#10145)
10344
0068070e
SM
103452011-12-01 Stefan Monnier <monnier@iro.umontreal.ca>
10346
10347 * fileio.c (Finsert_file_contents): Move after-change-function call
10348 to before the "handled:" label, since all "goto handled" appear in
10349 cases where the *-change-functions have already been properly called
10350 (bug#10117).
10351
3360a3fc
AS
103522011-12-01 Andreas Schwab <schwab@linux-m68k.org>
10353
10354 * keyboard.c (interrupt_signal): Don't call kill-emacs when
10355 waiting for input. (Bug#10169)
10356
73d6c093
EZ
103572011-11-30 Eli Zaretskii <eliz@gnu.org>
10358
10359 * dispnew.c (adjust_glyph_matrix): Remove the assertion that
10360 verifies glyph row's hash code--we have just reallocated the
10361 glyphs, so their contents can be complete garbage. (Bug#10164)
10362
febe6bea
JB
103632011-11-30 Juanma Barranquero <lekktu@gmail.com>
10364
10365 * dispnew.c (adjust_glyph_matrix) [XASSERTS]: Add missing check.
10366
801a4313
EZ
103672011-11-30 Eli Zaretskii <eliz@gnu.org>
10368
10369 * dispnew.c (adjust_glyph_matrix) [XASSERTS]: Ensure ROW's
10370 attributes are tested _before_ calling verify_row_hash, to protect
10371 against GCC re-ordering of the tests. (Bug#10164)
10372
2b56b87e
JD
103732011-11-29 Jan Djärv <jan.h.d@swipnet.se>
10374
10375 * xterm.h (struct x_output): net_wm_state_hidden_seen is new.
10376
10377 * xterm.c (handle_one_xevent): Only set async_visible and friends
10378 if net_wm_state_hidden_seen is non-zero (Bug#10002)
7dbda6df 10379 (get_current_wm_state): Set net_wm_state_hidden_seen to 1 if
2b56b87e
JD
10380 _NET_WM_STATE_HIDDEN is in NET_WM_STATE.
10381
dbf31225
PE
103822011-11-28 Paul Eggert <eggert@cs.ucla.edu>
10383
10384 Remove GCPRO-related macros that exist only to avoid shadowing locals.
10385 * lisp.h (GCPRO1_VAR, GCPRO2_VAR, GCPRO3_VAR, GCPRO4_VAR, GCPRO5_VAR)
10386 (GCPRO6_VAR, UNGCPRO_VAR): Remove. See
10387 <http://lists.gnu.org/archive/html/emacs-diffs/2011-11/msg00265.html>.
10388 All uses changed to use GCPRO1 etc.
10389 (GCPRO1, GCPRO2, GCPRO3, GCPRO4, GCPRO5, GCPRO6, UNGCPRO):
10390 Revert to old implementation (i.e., before 2011-03-11).
10391
1305621b
YM
103922011-11-28 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
10393
10394 * dispnew.c (scrolling_window): Truncate overlaps in copy destination
10395 of scroll runs so as to avoid assigning disabled bogus rows and
10396 unnecessary graphics copy operations.
10397
8c9afb46
EZ
103982011-11-27 Eli Zaretskii <eliz@gnu.org>
10399
10400 * s/ms-w32.h (utimbuf) [_MSC_VER]: Don't define.
10401 (snprintf) [_MSC_VER]: Redirect to _snprintf.
10402 (strtoll) [_MSC_VER]: Redirect to _strtoi64.
10403 (malloc, free, realloc, calloc): Redirect to e_* only when
10404 compiling Emacs.
10405
10406 * lisp.h (GCTYPEBITS): Move before first use.
10407 (ALIGN_GCTYPEBITS) [_MSC_VER]: Define.
10408 (DECL_ALIGN) [_MSC_VER]: Use it, as MSVC doesn't like bit ops in
10409 this macro definition.
10410
10411 * s/ms-w32.h (tzname): Redirect to _tzname for all values of
10412 _MSC_VER.
10413
54e9e3bf
JD
104142011-11-27 Jan Djärv <jan.h.d@swipnet.se>
10415
6d5eb5b0
SM
10416 * gtkutil.c (xg_create_frame_widgets):
10417 Call gtk_window_set_has_resize_grip (FALSE) if that function is
54e9e3bf
JD
10418 present with Gtk+ 2.0.
10419
83aca1cb
PE
104202011-11-26 Paul Eggert <eggert@cs.ucla.edu>
10421
10422 * fileio.c (Finsert_file_contents): Undo previous change; see
10423 <http://lists.gnu.org/archive/html/emacs-diffs/2011-11/msg00265.html>.
10424
5b76caa4
PE
104252011-11-26 Paul Eggert <eggert@cs.ucla.edu>
10426
10427 Rename locals to avoid shadowing.
10428 * fileio.c (Finsert_file_contents):
10429 Rename inner 'gcpro1' to 'inner_gcpro1' to avoid shadowing.
10430 * process.c (wait_reading_process_output):
10431 Rename inner 'proc' to 'p' to avoid shadowing.
10432 Indent for consistency with usual Emacs style.
10433
8c535114
EZ
104342011-11-25 Eli Zaretskii <eliz@gnu.org>
10435
10436 * xdisp.c (redisplay_window): If cursor row is not fully visible
10437 after recentering, and scroll-conservatively is set to a large
10438 number, scroll window by a few more lines to make the cursor fully
10439 visible and out of scroll-margin. (Bug#10105)
91b4a718
EZ
10440 (start_display): Don't move to the next line if the display should
10441 start at a newline that is part of a display vector or an overlay
10442 string. (Bug#10119)
8c535114 10443
fa4fdb5c
JL
104442011-11-24 Juri Linkov <juri@jurta.org>
10445
10446 * image.c (imagemagick_load_image): Move `MagickSetResolution' down
10447 after the `MagickPingImage' call. (Bug#10112)
10448
90ec88df
CY
104492011-11-23 Chong Yidong <cyd@gnu.org>
10450
10451 * window.c (Fcoordinates_in_window_p): Accept only live windows.
10452
56e2e794
MR
104532011-11-23 Martin Rudalics <rudalics@gmx.at>
10454
10455 * buffer.c (Fkill_buffer): Run replace_buffer_in_windows before
10456 making another buffer current. (Bug#10114)
10457
b6e64c41
GM
104582011-11-23 Glenn Morris <rgm@gnu.org>
10459
10460 * font.c (font_find_for_lface) [HAVE_NS]: Ignore case. (Bug#2526)
10461
6b21de18
CY
104622011-11-23 Chong Yidong <cyd@gnu.org>
10463
10464 * xdisp.c (compute_stop_pos): Check validity of end_charpos before
10465 using it (Bug#5984).
10466
b12cd789
EZ
104672011-11-22 Eli Zaretskii <eliz@gnu.org>
10468
10469 * dispnew.c (adjust_glyph_matrix): Don't verify hash code of mode-
10470 and header-lines, as they don't have one computed for them.
10471 (Bug#10098)
10472
10473 * .gdbinit (prow): Make displayed values more self-explaining.
10474 Add row's hash code.
10475
261b6fd4
LMI
104762011-11-21 Lars Magne Ingebrigtsen <larsi@gnus.org>
10477
10478 * process.c (wait_reading_process_output): Fix asynchrounous
10479 GnuTLS socket handling on some versions of the GnuTLS library.
16c1ad08 10480 (wait_reading_process_output): Add comment and URL.
261b6fd4 10481
e7cfd277
JD
104822011-11-21 Jan Djärv <jan.h.d@swipnet.se>
10483
10484 * xterm.c (x_clear_frame): Reinstate the XClearWindow call.
10485
a9b9b7f5
CY
104862011-11-21 Chong Yidong <cyd@gnu.org>
10487
10488 * window.c (Fnext_window, Fprevious_window): Doc fix.
10489
b0d15b4f
SM
104902011-11-20 Stefan Monnier <monnier@iro.umontreal.ca>
10491
10492 * window.c (get_phys_cursor_glyph): Fix Lisp_Object/int mixup.
10493
fe7a3057
JB
104942011-11-20 Juanma Barranquero <lekktu@gmail.com>
10495
10496 * nsfont.m (syms_of_nsfont) <ns-reg-to-script>: Fix typo.
10497
d2999b1a
MR
104982011-11-20 Martin Rudalics <rudalics@gmx.at>
10499
10500 * window.c (Fset_window_combination_limit): Rename argument
10501 STATUS to LIMIT.
10502 (Vwindow_combination_limit): Remove "status" from doc-string.
10503
d5ff9cd0
AS
105042011-11-20 Andreas Schwab <schwab@linux-m68k.org>
10505
10506 * m/ibms390.h: Remove.
10507 * m/ibms390x.h: Don't include "ibms390.h".
10508
a5bb9bd3
SM
105092011-11-20 Stefan Monnier <monnier@iro.umontreal.ca>
10510
10511 * fileio.c (Finsert_file_contents): Add missing gcpro1 variable.
10512 Suggested by Dmitry Antipov <dmantipov@yandex.ru>.
10513
cd1181db
JB
105142011-11-20 Juanma Barranquero <lekktu@gmail.com>
10515
10516 * casetab.c (Fset_case_table):
10517 * charset.c (Fcharset_after): Fix typos.
10518
615a3b8d 105192011-11-20 Paul Eggert <eggert@cs.ucla.edu>
6a0bf43d 10520
17e845af
PE
10521 Standardize on VIRT_ADDR_VARIES behavior (Bug#10042).
10522 Otherwise, valgrind does not work on some platforms.
10523 Problem reported by Andreas Schwab in
6a0bf43d
PE
10524 <http://lists.gnu.org/archive/html/emacs-devel/2011-11/msg00081.html>.
10525 * puresize.h (pure, PURE_P): Always behave as if VIRT_ADDR_VARIES
10526 is set, removing the need for VIRT_ADDRESS_VARIES.
10527 (PURE_P): Use a more-efficient implementation that needs just one
10528 comparison, not two: on x86-64 with GCC 4.6.2, this cut down the
10529 number of instructions from 6 (xorl, cmpq, jge, xorl, cmpq, setge)
10530 to 4 (xorl, subq, cmpq, setbe).
10531 * alloc.c (pure): Always extern now, since that's the
10532 VIRT_ADDR_VARIES behavior.
10533 (PURE_POINTER_P): Use a single comparison, not two, for
10534 consistency with the new puresize.h.
10535 * lisp.h (PNTR_COMPARISON_TYPE): Remove; no longer needed.
10536 * m/ibms390.h, m/intel386.h, m/template.h, s/cygwin.h, s/hpux10-20.h:
10537 Remove VIRT_ADDR_VARIES no longer needed.
10538
f8fe6f96
EZ
105392011-11-19 Eli Zaretskii <eliz@gnu.org>
10540
10541 * xdisp.c (x_write_glyphs, draw_phys_cursor_glyph)
10542 (erase_phys_cursor, update_window_cursor, show_mouse_face)
10543 (cursor_in_mouse_face_p): If the cursor position is out of bounds,
10544 behave as if the cursor position were at the window margin.
10545
10546 * window.c (get_phys_cursor_glyph): If the window is hscrolled,
10547 and the cursor position is out of bounds, behave as if the cursor
10548 position were at the window margin. (Bug#10075)
10549
df05a53c
CY
105502011-11-18 Chong Yidong <cyd@gnu.org>
10551
10552 * window.c (Fwindow_combination_limit): Make first argument
10553 non-optional, since it is meaningless for live windows like the
10554 selected window.
61ccba97 10555
2071918e
DA
105562011-11-18 Dmitry Antipov <dmantipov@yandex.ru>
10557
10558 * keymap.c (Fwhere_is_internal): Add missing RETURN_UNGCPROs.
10559
b50a28de
SM
105602011-11-18 Stefan Monnier <monnier@iro.umontreal.ca>
10561
10562 * intervals.c: Fix grafting over the whole buffer (bug#10071).
10563 (graft_intervals_into_buffer): Simplify.
10564
015137db
EZ
105652011-11-18 Eli Zaretskii <eliz@gnu.org>
10566
10567 * dispnew.c (swap_glyph_pointers): Swap the used[] arrays and the
10568 hash values of the two rows.
10569 (copy_row_except_pointers): Preserve the used[] arrays and the
10570 hash values of the two rows. (Bug#10035)
68c95424 10571 (add_row_entry): Add xassert to verify that ROW's hash code is valid.
015137db
EZ
10572
10573 * xdisp.c (row_hash): New function, body extracted from
10574 compute_line_metrics.
10575 (compute_line_metrics): Call row_hash, instead of computing the
10576 hash code inline.
10577
10578 * dispnew.c (verify_row_hash): Call row_hash for computing the
10579 hash code of a row, instead of duplicating code from xdisp.c.
10580
10581 * dispextern.h (row_hash): Add prototype.
10582
a2addb04
TH
105832011-11-18 Tassilo Horn <tassilo@member.fsf.org>
10584
10585 * frame.c (delete_frame): Don't delete the terminal when the last
10586 X frame is closed if emacs is built with GTK toolkit.
10587
df85d315
JB
105882011-11-17 Juanma Barranquero <lekktu@gmail.com>
10589
10590 * window.c (syms_of_window) <window-combination-resize>: Fix typo.
10591
a0c2d0ae
MR
105922011-11-17 Martin Rudalics <rudalics@gmx.at>
10593
10594 * window.c (Vwindow_splits): Rename to
10595 Vwindow_combination_resize. Suggested by Juri Linkov.
10596 (Fsplit_window_internal): Use Vwindow_combination_resize instead
10597 of Vwindow_splits.
10598
58179cce
JB
105992011-11-16 Juanma Barranquero <lekktu@gmail.com>
10600
7877f373
JB
10601 * nsfns.m (Fns_font_name):
10602 * window.c (syms_of_window) <window-combination-limit>: Fix typos.
58179cce 10603
b6f67890
MR
106042011-11-16 Martin Rudalics <rudalics@gmx.at>
10605
10606 * window.h (window): Rename slot "nest" to "combination_limit".
10607 * window.c (Fwindow_nest): Rename to Fwindow_combination_limit.
10608 (Fset_window_nest): Rename to Fset_window_combination_limit.
10609 (Vwindow_nest): Rename to Vwindow_combination_limit.
10610 (recombine_windows, make_parent_window, make_window)
10611 (Fsplit_window_internal, saved_window)
10612 (Fset_window_configuration, save_window_save): Rename all
10613 occurrences of window_nest to window_combination_limit.
10614
c7015153
JB
106152011-11-15 Juanma Barranquero <lekktu@gmail.com>
10616
10617 * image.c (imagemagick_load_image): Fix typo.
10618
322ad6ec
EZ
106192011-11-14 Eli Zaretskii <eliz@gnu.org>
10620
10621 * xdisp.c (display_line): Move the call to
10622 highlight_trailing_whitespace before the call to
10623 compute_line_metrics, since the latter needs to see the final
6d5eb5b0
SM
10624 faces of all the glyphs to compute ROW's hash value.
10625 Fixes assertion violations in row_equal_p. (Bug#10035)
322ad6ec 10626
f067b8ec
JB
106272011-11-14 Juanma Barranquero <lekktu@gmail.com>
10628
10629 * w32proc.c (reader_thread): Don't check pending input if cp->fd < 0,
10630 just return (bug#10044).
10631
1e5b2111
EZ
106322011-11-12 Eli Zaretskii <eliz@gnu.org>
10633
7ef3cbd5
EZ
10634 * makefile.w32-in (HEAPSIZE): New variable, allows to build temacs
10635 with user-defined heap size. Bump the default size of the temacs
10636 heap to 27MB, to avoid memory warning when running temacs.
10637 ($(TEMACS)): Use HEAPSIZE instead of a hardcoded value.
10638
1e5b2111
EZ
10639 * dispnew.c (scrolling_window): Fix incorrect indices in accessing
10640 current_matrix and desired_matrix. (Bug#9990)
7a7270dd
EZ
10641 (verify_row_hash) [XASSERTS]: New function.
10642 (adjust_glyph_matrix, row_equal_p): Use it in xassert to verify
10643 that the hash value of glyph rows is correct.
1e5b2111 10644
89d61221
MR
106452011-11-12 Martin Rudalics <rudalics@gmx.at>
10646
10647 * window.h (window): Remove splits slot.
10648 * window.c (Fwindow_splits, Fset_window_splits): Remove.
10649 (Fdelete_other_windows_internal, make_parent_window)
10650 (make_window, Fsplit_window_internal, Fdelete_window_internal)
10651 (Fset_window_configuration, save_window_save): Don't deal with
10652 split status of windows.
10653 (saved_window): Remove splits slot.
10654 (Vwindow_splits): Rewrite doc-string.
10655
97f18cc8
JD
106562011-11-11 Jan Djärv <jan.h.d@swipnet.se>
10657
10658 * xfns.c (unwind_create_frame):
10659 * nsfns.m (unwind_create_frame):
10660 * w32fns.c (unwind_create_frame): Use Fmemq to check if frame is in
10661 Vframe_list (Bug#9999).
10662
22a648b4
DA
106632011-11-11 Dmitry Antipov <dmantipov@yandex.ru>
10664
0b381c7e 10665 * xdisp.c (syms_of_xdisp): Remove duplicated definition of Qtext.
22a648b4 10666
659afede
KH
106672011-11-11 Kenichi Handa <handa@m17n.org>
10668
10669 * callproc.c (Fcall_process): Set the member dst_multibyte of
10670 process_coding.
10671
9ac0394b
KH
106722011-11-11 Johan Bockgård <bojohan@gnu.org>
10673
10674 * xdisp.c (fill_composite_glyph_string): Always set s->face, to
10675 avoid a crash (bug#9496).
10676
2fbdc249
CY
106772011-11-09 Chong Yidong <cyd@gnu.org>
10678
10679 * window.c (Fwindow_inside_edges, Fwindow_inside_pixel_edges)
10680 (Fwindow_inside_absolute_pixel_edges): Only allow live windows.
10681
ac6b1f81
PE
106822011-11-08 Paul Eggert <eggert@cs.ucla.edu>
10683
10684 * s/gnu.h (GC_MARK_STACK): Define to GC_MAKE_GCPROS_NOOPS (Bug#9926).
10685
09db192c
PE
106862011-11-08 Paul Eggert <eggert@cs.ucla.edu>
10687
10688 Avoid some portability problems by eschewing 'extern inline' functions.
10689 The trivial performance wins aren't worth the portability hassles; see
10690 <http://lists.gnu.org/archive/html/emacs-devel/2011-11/msg00084.html>
10691 et seq.
10692 * dispextern.h (window_box, window_box_height, window_text_bottom_y)
10693 (window_box_width, window_box_left, window_box_left_offset)
10694 (window_box_right, window_box_right_offset): Undo previous change,
10695 by removing the "extern"s.
10696 * intervals.c (adjust_intervals_for_insertion)
10697 (adjust_intervals_for_deletion): Undo previous change,
10698 making these static again.
10699 (offset_intervals, temp_set_point_both, temp_set_point)
10700 (copy_intervals_to_string): No longer inline.
10701 * xdisp.c (window_text_bottom_y, window_box_width)
10702 (window_box_height, window_box_left_offset)
10703 (window_box_right_offset, window_box_left, window_box_right)
10704 (window_box): No longer inline.
10705
105216ed
CY
107062011-11-08 Chong Yidong <cyd@gnu.org>
10707
10708 * window.c (Fwindow_left_column, Fwindow_top_line): Doc fix.
6d5eb5b0
SM
10709 (Fwindow_body_height, Fwindow_body_width): Move from Lisp.
10710 Signal an error if not a live window.
105216ed
CY
10711 (Fwindow_total_width, Fwindow_total_height): Move from Lisp.
10712 (Fwindow_total_size, Fwindow_body_size): Move to Lisp.
10713
ae9e237f
JB
107142011-11-07 Juanma Barranquero <lekktu@gmail.com>
10715
10716 * lisp.h (syms_of_abbrev): Remove declaration.
10717 Reported by CHENG Gao <chenggao@royau.me>.
10718
c7aa8333
EZ
107192011-11-07 Eli Zaretskii <eliz@gnu.org>
10720
10721 * w32.c (check_windows_init_file): Don't look for term/w32-win.el
10722 if Vpurify_flag is non-nil. Fixes a crash when running w32 build
10723 of temacs in GUI mode.
10724
be7f5545
MR
107252011-11-07 Martin Rudalics <rudalics@gmx.at>
10726
10727 * window.h: Declare delete_all_child_windows instead of
10728 delete_all_subwindows.
10729 * window.c (Fwindow_nest, Fset_window_nest)
10730 (Fset_window_new_total, Fset_window_new_normal)
10731 (Fwindow_resize_apply): Don't use term subwindow in doc-strings.
10732 (delete_all_subwindows): Rename to delete_all_child_windows.
10733 (Fdelete_other_windows_internal, Fset_window_configuration):
10734 Call delete_all_child_windows instead of delete_all_subwindows.
10735 * frame.c (delete_frame): Call delete_all_child_windows instead
10736 of delete_all_subwindows.
10737
ca78dc43
PE
107382011-11-07 Paul Eggert <eggert@cs.ucla.edu>
10739
10740 * alloc.c (DEADP): New macro, for porting to GNU/Hurd (Bug#9926).
10741 This is also needed for porting to any host where GC_MARK_STACK is
10742 not GC_MAKE_GCPROS_NOOPS.
10743 (which_symbols): Use it.
10744
a0241d01
KH
107452011-11-07 Kenichi Handa <handa@m17n.org>
10746
10747 * coding.c (coding_set_destination): Check coding->src_pos only
10748 when coding->src_object is a buffer (bug#9910).
10749
10750 * process.c (send_process): Set the member src_multibyte of coding
10751 to 0 (bug#9911) when sending a unibyte text.
10752
10753 * callproc.c (Fcall_process): Set the member src_multibyte of
10754 process_coding to 0 (bug#9912).
10755
a64bfdfa 107562011-11-06 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
ba24cea2
YM
10757
10758 * xmenu.c (cleanup_widget_value_tree): New function.
10759 (xmenu_show, xdialog_show): Use it in record_unwind_protect instead of
10760 calling free_menubar_widget_value_tree directly (Bug#9830).
10761
cb41b32a
PE
107622011-11-06 Paul Eggert <eggert@cs.ucla.edu>
10763
10764 Fix some portability problems with 'inline'.
10765 * dispextern.h (window_box, window_box_height, window_text_bottom_y)
10766 (window_box_width, window_box_left, window_box_left_offset)
10767 (window_box_right, window_box_right_offset): Declare extern.
10768 Otherwise, these inline functions do not conform to C99 and
10769 are miscompiled by Microsoft compilers. Reported by Eli Zaretskii in
10770 <http://lists.gnu.org/archive/html/emacs-devel/2011-11/msg00084.html>.
10771 * intervals.c (adjust_intervals_for_insertion)
10772 (adjust_intervals_for_deletion): Now extern, because otherwise the
10773 extern inline functions 'offset_intervals' couldn't refer to it.
10774 (static_offset_intervals): Remove.
10775 (offset_intervals): Rewrite using the old contents of
10776 static_offset_intervals. The old version didn't conform to C99
10777 because an extern inline function contained a reference to an
10778 identifier with static linkage.
10779
b7041366
AS
107802011-11-06 Andreas Schwab <schwab@linux-m68k.org>
10781
10782 * keyboard.c (interrupt_signal): Don't call kill-emacs while in
10783 GC.
10784
88a37c4d
EZ
107852011-11-06 Eli Zaretskii <eliz@gnu.org>
10786
10787 * xdisp.c (init_iterator, reseat_to_string): Don't set the
10788 iterator's bidi_p flag if Vpurify_flag is non-nil. (Bug#9963)
10789 (Fcurrent_bidi_paragraph_direction): If Vpurify_flag is non-nil,
10790 return Qleft_to_right.
10791
49745b39
CY
107922011-11-06 Chong Yidong <cyd@gnu.org>
10793
10794 * window.c (Fwindow_live_p, Fwindow_frame, Fframe_root_window)
10795 (Fminibuffer_window, Fwindow_buffer, Fwindow_splits)
10796 (Fset_window_splits, Fwindow_nest, Fset_window_nest)
10797 (Fwindow_use_time, Fwindow_total_size, Fwindow_normal_size)
10798 (Fwindow_new_normal, Fwindow_left_column, Fwindow_top_line)
10799 (Fwindow_margins, Fwindow_fringes, Fwindow_scroll_bars)
10800 (Fwindow_vscroll): Doc fix.
10801 (Fwindow_top_child, Fwindow_left_child): Eliminate a nil default
10802 argument, since it makes no sense to pass a live window and for
10803 consistency with window-child.
10804
1f05cd82
CS
108052011-11-05 Christoph Scholtes <cschol2112@googlemail.com>
10806
10807 * makefile.w32-in ($(TEMACS), (gl-stamp)): Use $(THISDIR) to
10808 support MSVC.
10809
22610910
JR
108102011-11-05 Jason Rumney <jasonr@gnu.org>
10811
10812 * w32font.c (font_matches_spec): Filter out non-Japanese kana fonts.
10813 (add_font_entity_to_list): Filter out non-Japanese Shift-JIS
10814 fonts (Bug#6029).
10815 (add_font_entity_to_list): Fix logic errors in mixed boolean and
10816 bitwise arithmetic preventing use of unicode-sip and non-truetype
10817 opentype fonts.
10818
a06776b2
EZ
108192011-11-05 Eli Zaretskii <eliz@gnu.org>
10820
3ad924ba
EZ
10821 * s/ms-w32.h (fstat, stat, utime): Move redirections to
10822 "emacs"-only part.
10823
a06776b2
EZ
10824 * w32fns.c (x_create_tip_frame, Fx_create_frame): Rearrange
10825 initialization code to keep similarity to xfns.c after changes
10826 from 2011-11-05.
10827
c9e7db78
JD
108282011-11-05 Jan Djärv <jan.h.d@swipnet.se>
10829
a97f8f3f
JD
10830 * nsfns.m: Declare image_cache_refcount if GLYPH_DEBUG.
10831 (unwind_create_frame): New function (Bug#9943).
10832 (Fx_create_frame): Restructure code to be more similar to the one in
10833 xfns.c. Call record_unwind_protect with unwind_create_frame (Bug#9943).
10834 Initialize image_cache_refcount if GLYPH_DEBUG (Bug#9943).
10835 Move terminal->reference_count++ just before making the frame official
10836 (Bug#9943).
10837
10838 * nsterm.m (x_free_frame_resources): New function.
10839 (x_destroy_window): Move code to x_free_frame_resources.
10840
c9e7db78 10841 * xfns.c (unwind_create_frame): Fix comment.
6d5eb5b0
SM
10842 (Fx_create_frame, x_create_tip_frame):
10843 Move terminal->reference_count++ just before making the frame
75f1671a 10844 official. Move initialization of image_cache_refcount and
c9e7db78
JD
10845 dpyinfo_refcount before calling init_frame_faces (Bug#9943).
10846
a6fc3b5c
EZ
108472011-11-05 Eli Zaretskii <eliz@gnu.org>
10848
10849 Support MSVC build with newer versions of Visual Studio.
10850 * makefile.w32-in (TAGS-gmake): Don't use $(patsubst ...), as
10851 Nmake barfs on that. Use $(OBJ*_c) variables instead, defined on
10852 nt/gmake.defs.
10853
10854 * lisp.h (ENUM_BF): New macro, for enumerated types in bitfields,
10855 which are not supported by MSVC.
10856 (Lisp_Symbol, Lisp_Misc_Any, Lisp_Marker, Lisp_Misc_Overlay)
10857 (Lisp_Save_Value, Lisp_Free): Use ENUM_BF for enumerated types in
10858 bitfields.
10859 (Lisp_Object) [USE_LISP_UNION_TYPE]: Use ENUM_BF for enumerated
10860 types in bitfields.
10861 (DEFUN) [_MSC_VER]: Define in a different way for MSVC.
10862
10863 * w32fns.c [_MSC_VER]: DECLARE_HANDLE for any MSVC version.
10864
58179cce 108652011-11-05 Fabrice Popineau <fabrice.popineau@supelec.fr> (tiny change)
a6fc3b5c
EZ
10866
10867 Support MSVC build with newer versions of Visual Studio.
10868 * w32.c: Don't include w32api.h for MSVC.
10869 (init_environment) [_MSC_VER]: Call sys_access, not _access.
10870
10871 * s/ms-w32.h <sigset_t, ssize_t> [_MSC_VER]: Typedefs for MSVC.
10872 [_MSC_VER]: Include sys/timeb.h, sys/stat.h, and signal.h.
10873 (fstat, stat, utime) [_MSC_VER]: Redirect to their sys_* cousins.
10874 (malloc, free, realloc, calloc) [_MSC_VER]: Always redirect to the
10875 e_* cousins.
10876 (alloca) [_MSC_VER]: Define to _alloca.
10877
10878 * lisp.h (DECL_ALIGN) [_MSC_VER]: Define for MSVC.
10879
10880 * regex.c <re_char> [_MSC_VER]: A separate definition for MSVC.
10881
a58c13ed
EZ
108822011-11-04 Eli Zaretskii <eliz@gnu.org>
10883
10884 * xdisp.c (note_mouse_highlight): If either of
10885 previous/next-single-property-change returns nil, treat that as
10886 the beginning or the end of the buffer. (Bug#9955)
10887
fe0b6370
JD
108882011-11-04 Jan Djärv <jan.h.d@swipnet.se>
10889
a58c13ed 10890 * gtkutil.c (xg_make_tool_item): Add callbacks if one of wimage or
fe0b6370
JD
10891 label is not null (Bug#9951).
10892 (xg_tool_item_stale_p): Handle the fact that wimage and/or wlbl
10893 may be NULL.
10894
89bd5ee1
EZ
108952011-11-04 Eli Zaretskii <eliz@gnu.org>
10896
10897 * window.c (Fwindow_body_size): Mention in the doc string that the
10898 return value is in frame's canonical units. (Bug#9949)
10899
84c3edb9
EZ
109002011-11-03 Eli Zaretskii <eliz@gnu.org>
10901
4e2fb5c7
EZ
10902 * xdisp.c (note_mouse_highlight): Initialize `area'. (Bug#9947)
10903
84c3edb9 10904 * w32fns.c (unwind_create_frame): If needed, free the glyph
3ab15fd6 10905 matrices of the partially constructed frame. (Bug#9943)
2a58bbc1 10906 * xfns.c (unwind_create_frame): Likewise.
84c3edb9 10907
bc17a887
EZ
109082011-11-01 Eli Zaretskii <eliz@gnu.org>
10909
10910 * xdisp.c (mouse_face_from_buffer_pos): Fix a typo in a comment.
10911 Don't stop backward scan on the continuation glyph, even though
10912 its CHARPOS is positive.
6d5eb5b0
SM
10913 (mouse_face_from_buffer_pos, note_mouse_highlight):
10914 Rename cover_string to disp_string.
bc17a887 10915
4ee88440
MR
109162011-11-01 Martin Rudalics <rudalics@gmx.at>
10917
10918 * window.c (temp_output_buffer_show): Don't use
10919 Vtemp_buffer_show_specifiers.
10920 (Vtemp_buffer_show_specifiers): Remove unused variable.
10921
c2ff3c02
EZ
109222011-10-30 Eli Zaretskii <eliz@gnu.org>
10923
10924 * xdisp.c (try_cursor_movement): Make sure ROW isn't decremented
10925 past the beginning of the current glyph matrix.
10926
58179cce 109272011-10-30 Adam Sjøgren <asjo@koldfront.dk> (tiny change)
6e56383b
JD
10928
10929 * xterm.c: Include X11/Xproto.h if HAVE_GTK3.
10930 (x_error_handler): Ignore BadMatch for X_SetInputFocus for
10931 HAVE_GTK3 (Bug#9869).
b77a6a7f 10932
3b574623
JD
10933 * gtkutil.c (xg_win_to_widget, xg_event_is_for_menubar): Initialize
10934 type to GDK_NOTHING so valgrind does not complain (Bug#9901).
10935
b77a6a7f
JD
10936 * xterm.h (x_display_info): Add Xatom_net_wm_state_hidden (Bug#9893).
10937
10938 * xterm.c: Declare x_handle_net_wm_state to return int.
10939 (handle_one_xevent): Check if we are iconified but don't have
10940 _NET_WM_STATE_HIDDEN. If do, treat as deiconify (Bug#9893).
10941 (get_current_wm_state): Return non-zero if not hidden,
10942 check for _NET_WM_STATE_HIDDEN (Bug#9893).
10943 (do_ewmh_fullscreen): Ignore return value from get_current_wm_state.
10944 (x_handle_net_wm_state): Return what get_current_wm_state returns.
10945 (x_term_init): Initialize dpyinfo->Xatom_net_wm_state_hidden.
10946
196e41e4
PE
109472011-10-29 Paul Eggert <eggert@cs.ucla.edu>
10948
10949 * alloc.c (which_symbols): Declare EXTERNALLY_VISIBLE,
10950 so that this new function doesn't get optimized away by a
10951 whole-program optimizer. Make the 2nd arg EMACS_INT, not int.
10952
021f2e1a
AS
109532011-10-29 Andreas Schwab <schwab@linux-m68k.org>
10954
10955 * frame.h (MOUSE_HL_INFO): Remove excess parens.
10956
8b058d44
EZ
109572011-10-29 Eli Zaretskii <eliz@gnu.org>
10958
10959 Fix the `xbytecode' command.
10960 * .gdbinit (xprintbytestr): New command.
b50a28de 10961 (xwhichsymbols): Rename from `which'; all callers changed.
8b058d44
EZ
10962 (xbytecode): Print the byte-code string as well.
10963
4452fb80
EZ
109642011-10-29 Kim Storm <storm@cua.dk>
10965
8b058d44
EZ
10966 * alloc.c (which_symbols): New function.
10967
21b72067
AS
109682011-10-29 Andreas Schwab <schwab@linux-m68k.org>
10969
10970 * minibuf.c (read_minibuf_noninteractive): Allow reading empty
10971 line. (Bug#9903)
10972
83ed7b5c
GM
109732011-10-29 Glenn Morris <rgm@gnu.org>
10974
10975 * process.c (wait_reading_process_output): Revert 2009-08-30 change.
10976 Not clear what it was for, and it causes various bugs. (Bug#9839)
10977
5a7a728b
EZ
109782011-10-28 Eli Zaretskii <eliz@gnu.org>
10979
10980 * xdisp.c (note_mouse_highlight): Initialize `part', to avoid a
10981 possible random value that matches one of those tested as
10982 condition to clear the mouse face.
10983
d3d0842f
CY
109842011-10-28 Chong Yidong <cyd@gnu.org>
10985
10986 * xdisp.c (note_mouse_highlight): Fix use of uninitialized var.
10987
31b39d13
DN
109882011-10-28 Dan Nicolaescu <dann@ics.uci.edu>
10989
10990 * window.c (make_window): Initialize phys_cursor_on_p.
10991
9aba6043
SM
109922011-10-28 Stefan Monnier <monnier@iro.umontreal.ca>
10993
10994 * lisp.h (struct Lisp_Symbol): Update comments.
10995
c20992f4
JB
109962011-10-28 Juanma Barranquero <lekktu@gmail.com>
10997
10998 * w32font.c (w32_load_unicows_or_gdi32): Add missing return.
10999
db4f02f2
EZ
110002011-10-28 Eli Zaretskii <eliz@gnu.org>
11001
11002 Fix Emacs on Windows 9X (bug#8562). Thanks to oslsachem
11003 <oslsachem@gmail.com> for helping to debug this.
11004
11005 * w32font.c (g_b_init_is_w9x, g_b_init_get_outline_metrics_w)
11006 (g_b_init_get_text_metrics_w, g_b_init_get_glyph_outline_w)
11007 (g_b_init_get_glyph_outline_w): New static variables.
11008 (GetOutlineTextMetricsW_Proc, GetTextMetricsW_Proc)
11009 (GetGlyphOutlineW_Proc): New typedefs.
11010 (w32_load_unicows_or_gdi32, get_outline_metrics_w)
9aba6043
SM
11011 (get_text_metrics_w, get_glyph_outline_w, globals_of_w32font):
11012 New functions.
11013 (w32font_open_internal, compute_metrics):
11014 Call get_outline_metrics_w, get_text_metrics_w, and get_glyph_outline_w
db4f02f2
EZ
11015 instead of calling the "wide" APIs directly.
11016
11017 * emacs.c (main) [HAVE_NTGUI]: Call globals_of_w32font.
11018
11019 * w32.h (syms_of_w32font): Add prototype.
11020
87e68db4
JB
110212011-10-27 Juanma Barranquero <lekktu@gmail.com>
11022
11023 * window.c (Fframe_root_window, Fframe_first_window, Fwindow_end)
11024 (Fframe_selected_window, Ftemp_output_buffer_show, Fnext_window)
11025 (Fdelete_window_internal, Fwindow_parameters): Fix typos in docstrings.
11026 (Fmove_to_window_line): Doc fix.
11027
435c1d67
CY
110282011-10-27 Chong Yidong <cyd@gnu.org>
11029
11030 * process.c (make_process): Set gnutls_state to NULL.
11031
11032 * gnutls.c (emacs_gnutls_deinit): Deinit the gnutls_state if it is
11033 non-NULL, regardless of GNUTLS_INITSTAGE.
11034 (Fgnutls_boot): Cleanups. Call emacs_gnutls_deinit if we signal
11035 an error. Set process slots as soon as we allocate them.
11036
11037 * gnutls.h (GNUTLS_LOG, GNUTLS_LOG2): Fix macros.
11038
9c6c6f49
CY
110392011-10-27 Chong Yidong <cyd@gnu.org>
11040
9aba6043
SM
11041 * gnutls.c (emacs_gnutls_deinit): New function.
11042 Deallocate credentials structures as well as calling gnutls_deinit.
9c6c6f49
CY
11043 (Fgnutls_deinit, Fgnutls_boot): Use it.
11044
11045 * process.c (make_process): Initialize GnuTLS credentials to NULL.
11046 (deactivate_process): Call emacs_gnutls_deinit.
11047
657d08d3
JB
110482011-10-27 Juanma Barranquero <lekktu@gmail.com>
11049
11050 * image.c (x_create_x_image_and_pixmap):
11051 * w32.c (sys_rename, w32_delayed_load):
11052 * w32font.c (fill_in_logfont):
11053 * w32reg.c (x_get_string_resource): Silence compiler warnings.
11054
5430d399
JB
110552011-10-26 Juanma Barranquero <lekktu@gmail.com>
11056
11057 * w32fns.c (w32_default_color_map): New function,
11058 extracted from Fw32_default_color_map.
a7ef684b 11059 (Fw32_default_color_map, Fx_open_connection): Use it. (Bug#9785)
5430d399 11060
fe0055fa
PE
110612011-10-25 Paul Eggert <eggert@cs.ucla.edu>
11062
11063 * dispextern.h (Fcontrolling_tty_p): New decl (Bug#6649 part 2).
11064
e6346438
SM
110652011-10-25 Stefan Monnier <monnier@iro.umontreal.ca>
11066
11067 * keyboard.c (test_undefined): New function (bug#9751).
11068 (read_key_sequence): Use it to detect when a key is bound to `undefined'.
11069
e112cc37
ET
110702011-10-25 Enami Tsugutomo <tsugutomo.enami@jp.sony.com>
11071
11072 * sysdep.c (init_sys_modes): Fix the check for the controlling
11073 terminal (Bug#6649).
11074
7b5d6677
EZ
110752011-10-20 Eli Zaretskii <eliz@gnu.org>
11076
11077 * dispextern.h (struct bidi_it): New member next_en_type.
11078
11079 * bidi.c (bidi_line_init): Initialize the next_en_type member.
11080 (bidi_resolve_explicit_1): When next_en_pos is valid for the
11081 current character, check also for next_en_type being WEAK_EN.
11082 (bidi_resolve_weak): Don't enter the expensive loop if the current
11083 position is before next_en_pos. Record the bidi type of the first
11084 non-ET, non-BN character we find, in addition to its position.
11085 (bidi_level_of_next_char): Invalidate next_en_type when
11086 next_en_pos is over-stepped.
11087
7da0b018
PE
110882011-10-20 Paul Eggert <eggert@cs.ucla.edu>
11089
11090 Time zone name fixes for non-ASCII locales (Bug#641, Bug#9794)
11091 * editfns.c: Rewrite current-time-zone so that it invokes
11092 the equivalent of (format-time-string "%Z") to get the time zone name.
11093 This fixes a bug when the time zone name contains characters that
11094 need converting from the system time locale to Emacs internal format.
11095 This fixes a shortcoming that I introduced in my 1999-10-19 patch:
11096 that patch fixed format-time-string to do the conversion, but
11097 I forgot to fix current-time-zone.
11098 (format_time_string): New function, containing most of
11099 what Fformat_time_string used to contain.
11100 (Fformat_time_string): Rewrite in terms of format_time_string.
11101 This doesn't change this function's behavior.
11102 (current-time-zone): Rewrite to use format_time_string.
11103 This fixes the bug reported by Michael Schierl in
11104 <http://lists.gnu.org/archive/html/emacs-devel/2007-06/msg00334.html>.
11105 Jason Rumney's 2007-06-07 change worked around this bug, but
11106 didn't fix it.
11107 * systime.h (tzname, timezone): Remove no-longer-used declarations.
11108
8547b010
EZ
111092011-10-19 Eli Zaretskii <eliz@gnu.org>
11110
11111 * xdisp.c (start_display): If the character at POS is displayed
11112 via a display vector, reset IT->current.dpvec_index to zero.
12b32963
EZ
11113 (try_window_reusing_current_matrix): If a line ends in a display
11114 vector or the next line starts in a display vector, continue
11115 redrawing the window even though the character position of
11116 start_row was reached.
8547b010
EZ
11117 (Bug#9771, part 2)
11118
4e948d15
CY
111192011-10-18 Chong Yidong <cyd@gnu.org>
11120
11121 * xdisp.c (get_next_display_element): Handle U+2010 and U+2011
11122 with nobreak-char-display too.
11123
4787455f
EZ
111242011-10-18 Eli Zaretskii <eliz@gnu.org>
11125
11126 Fix part 3 of bug#9771.
11127 * bidi.c (bidi_line_init): Initialize next_en_pos to zero, not -1.
11128 (bidi_resolve_neutral): Don't enter the expensive loop looking for
11129 non-neutral characters if the current character is a paragraph
11130 separator (a.k.a. Newline). This avoids running the same
11131 expensive loop twice, once when we consume the preceding newline
11132 and the other time when the line actually needs to be displayed.
11133 Avoid the loop when we see neutrals on the base embedding level
11134 following a character whose directionality is the same as the
11135 paragraph's. This avoids running the expensive loop when a line
11136 ends in a long sequence of neutrals, like control characters.
11137 Add assertion against STRONG_AL type. Slightly rearrange code
11138 that determines the type of a neutral given the first non-neutral
11139 that follows it.
11140 (bidi_level_of_next_char): Set next_en_pos to zero when
11141 invalidating its info.
11142
2c91f553
EZ
111432011-10-17 Eli Zaretskii <eliz@gnu.org>
11144
11145 * xdisp.c (push_display_prop): Determine whether to record string
11146 or buffer position by IT->string, not by IT->method. Allow
11147 GET_FROM_DISPLAY_VECTOR as IT->method on entry. (Bug#9771, part 4)
f2ff9e88
EZ
11148 (move_it_vertically_backward): Don't look for character position
11149 immediately after the newline when in a continuation line.
11150 (Bug#9771, part 1)
2c91f553 11151
c7b08b0d
MR
111522011-10-15 Martin Rudalics <rudalics@gmx.at>
11153
11154 * window.c (coordinates_in_window): Rewrite and delabelize
11155 vertical border check. (Bug#5357) (Bug#9618)
11156
6b02f655
SM
111572011-10-14 Stefan Monnier <monnier@iro.umontreal.ca>
11158
11159 * xterm.c (frame_highlight, frame_unhighlight): Ignore unexplained
11160 errors in XSetWindowBorder (bug#9310).
11161
81d40c92
DA
111622011-10-13 Dmitry Antipov <dmantipov@yandex.ru>
11163
11164 * editfns.c (Fset_time_zone_rule): Replace free with xfree to
11165 avoid crash when xmalloc overrun checking is enabled.
11166
d4172c3b
EZ
111672011-10-13 Eli Zaretskii <eliz@gnu.org>
11168
11169 * xdisp.c (Fcurrent_bidi_paragraph_direction): Initialize
11170 itb.paragraph_dir to NEUTRAL_DIR. Fixes an occasional incorrect
11171 cursor motion with <left> and <right> arrow keys.
11172
11173 * bidi.c (bidi_init_it): Don't initialize paragraph_dir here, as
11174 some callers set that themselves.
11175
b00eea75
EZ
111762011-10-12 Eli Zaretskii <eliz@gnu.org>
11177
11178 * xdisp.c (find_row_edges): Handle the case where ROW comes from a
11179 display string and the previous row comes from the same string and
11180 is empty. (Bug#9739) (Bug#9738)
11181
8fe012c4
SM
111822011-10-12 Stefan Monnier <monnier@iro.umontreal.ca>
11183
11184 * doc.c (get_doc_string): Encode file name (bug#9735).
11185
0074aef2
EZ
111862011-10-12 Eli Zaretskii <eliz@gnu.org>
11187
79beb178
EZ
11188 * bidi.c (bidi_level_of_next_char):
11189 * xdisp.c (get_visually_first_element): Remove old incorrect
11190 comments regarding the Unicode Line Separator character.
11191
0074aef2
EZ
11192 * bidi.c (bidi_init_it): Initialize paragraph_dir to NEUTRAL_DIR.
11193
6e4b3fbe
DA
111942011-10-12 Dmitry Antipov <dmantipov@yandex.ru>
11195
11196 * alloc.c (Fgc_status): Do not access beyond zombies array
11197 boundary if nzombies > MAX_ZOMBIES.
11198 * alloc.c (dump_zombies): Add missing format specifier.
11199
0324f3af
PE
112002011-10-12 Paul Eggert <eggert@cs.ucla.edu>
11201
b5525cac
PE
11202 * xdisp.c (set_cursor_from_row): Simplify conditionals,
11203 to pacify GCC 4.6.1 x86-64 with -O2 -Wstrict-overflow.
11204
0324f3af
PE
11205 * lread.c (read_escape): Allow hex escapes as large as ?\xfffffff.
11206 Some packages use them to denote characters with modifiers.
11207
e9b5f888
AS
112082011-10-11 Andreas Schwab <schwab@linux-m68k.org>
11209
11210 * lisp.h (GCPRO1_VAR, GCPRO2_VAR, GCPRO3_VAR, GCPRO4_VAR)
11211 (GCPRO5_VAR, GCPRO6_VAR, UNGCPRO_VAR): Add whitespace to avoid
11212 matching a pp-number. Rename parameter var to var1.
11213
127827c0
SM
112142011-10-11 Stefan Monnier <monnier@iro.umontreal.ca>
11215
11216 * minibuf.c (Finternal_complete_buffer): Fix last change (bug#9709).
11217
c8fd3bd0
GM
112182011-10-08 Glenn Morris <rgm@gnu.org>
11219
11220 * callint.c (Fcall_interactively): Give a more explicit error for the
11221 'c' case with a non-character input. (Bug#8479)
11222
352ec8ff
EZ
112232011-10-08 Eli Zaretskii <eliz@gnu.org>
11224
03669ccb
EZ
11225 * xdisp.c (hscroll_window_tree): Support hscroll in right-to-left
11226 lines.
7061c986
EZ
11227 (set_cursor_from_row): Fix cursor positioning in mixed L2R+R2L
11228 lines that are hscrolled on the left.
03669ccb 11229
352ec8ff
EZ
11230 * dispnew.c (buffer_posn_from_coords): Account for a possible
11231 presence of header-line. (Bug#4426)
11232
a66cfb1c
SM
112332011-10-07 Stefan Monnier <monnier@iro.umontreal.ca>
11234
6b02f655
SM
11235 * buffer.c (syms_of_buffer) <enable-multibyte-characters>:
11236 Don't advertise functionality which we discourage or doesn't work.
a66cfb1c 11237
7c5ee88e
PE
112382011-10-07 Paul Eggert <eggert@cs.ucla.edu>
11239
11240 * alloc.c (GC_LISP_OBJECT_ALIGNMENT): Use offsetof, not __alignof__
11241 or sizeof. __alignof__ gives the wrong answer on Fedora x86-64
11242 with GCC 4.6.1 when configured with CC='gcc -m32' --with-wide-int;
11243 this makes Emacs dump core during garbage collection on rare
11244 occasions. sizeof is obviously inferior to offsetof here, so
11245 stick with offsetof.
11246 (GC_POINTER_ALIGNMENT): New macro.
11247 (mark_memory): Omit 3rd (offset) arg; caller changed.
11248 Don't assume EMACS_INT alignment is the same as pointer alignment.
11249
df1bbe5b
SM
112502011-10-03 Stefan Monnier <monnier@iro.umontreal.ca>
11251
11252 * keyboard.c (read_key_sequence_remapped): New var.
11253 (read_key_sequence): Compute remapping in the right buffer.
11254 (command_loop_1): Use read_key_sequence's remapping directly.
11255
51553db6
SM
112562011-10-02 Stefan Monnier <monnier@iro.umontreal.ca>
11257
32c1fffd
SM
11258 * dired.c (file_name_completion): Don't expand file name.
11259 (Ffile_name_completion, Ffile_name_all_completions): Expand file name
11260 before checking file name handler.
11261
51553db6
SM
11262 * minibuf.c (Finternal_complete_buffer): Only show internal buffers if
11263 they've been requested explicitly (bug#9591).
11264
b6bd1599 112652011-10-01 Andreas Schwab <schwab@linux-m68k.org>
fa2ec41f
AS
11266
11267 * keymap.c (Fsingle_key_description): Use make_specified_string
11268 instead of build_string to build string from push_key_description.
11269 (Bug#5193)
11270
f701dc2a
PE
112712011-09-30 Paul Eggert <eggert@cs.ucla.edu>
11272
4222c55d
PE
11273 * buffer.h (struct buffer): Use time_t, not int, for a time stamp.
11274 This fixes a Y2038 bug on 64-bit hosts.
11275 * buffer.c (reset_buffer):
11276 * fileio.c (Fdo_auto_save, Fset_buffer_auto_saved)
11277 (Fclear_buffer_auto_save_failure):
11278 Use 0, not -1, to represent an unset failure time, since time_t
11279 might not be signed.
11280
f701dc2a
PE
11281 Remove dependency on glibc malloc internals.
11282 * alloc.c (XMALLOC_OVERRUN_CHECK_OVERHEAD, XMALLOC_OVERRUN_CHECK_SIZE):
11283 Move back here from lisp.h, but with their new implementations.
11284 (XMALLOC_BASE_ALIGNMENT, COMMON_MULTIPLE, XMALLOC_HEADER_ALIGNMENT)
11285 (XMALLOC_OVERRUN_SIZE_SIZE): Move these new lisp.h macros here.
11286 * charset.c (charset_table_init): New static var.
11287 (syms_of_charset): Use it instead of xmalloc. This removes a
11288 dependency on glibc malloc internals. See Eli Zaretskii's comment in
11289 <http://lists.gnu.org/archive/html/emacs-devel/2011-09/msg00815.html>.
11290 * lisp.h (XMALLOC_OVERRUN_CHECK_OVERHEAD, XMALLOC_OVERRUN_CHECK_SIZE):
11291 Move back to alloc.c.
11292 (XMALLOC_BASE_ALIGNMENT, COMMON_MULTIPLE, XMALLOC_HEADER_ALIGNMENT)
11293 (XMALLOC_OVERRUN_SIZE_SIZE): Move to alloc.c.
11294
9ceebf39
JD
112952011-09-30 Jan Djärv <jan.h.d@swipnet.se>
11296
11297 * nsterm.m (windowDidResize): Call x_set_window_size only when
11298 ns_in_resize is true. Otherwise set pixelwidth/height and
11299 call change_frame_size (Bug#9628).
11300
cb993c58
PE
113012011-09-30 Paul Eggert <eggert@cs.ucla.edu>
11302
3930c88b
PE
11303 Port --enable-checking=all to Fedora 14 x86-64.
11304 * charset.c (syms_of_charset): Also account for glibc malloc's
11305 internal overhead when calculating the initial malloc maximum.
11306
cb993c58
PE
11307 Port --enable-checking=all to Fedora 14 x86.
11308 * alloc.c (XMALLOC_OVERRUN_CHECK_OVERHEAD, XMALLOC_OVERRUN_CHECK_SIZE):
11309 Move to lisp.h.
11310 (xmalloc_put_size, xmalloc_get_size, overrun_check_malloc)
11311 (overrun_check_realloc, overrun_check_free):
11312 Use XMALLOC_OVERRUN_SIZE_SIZE, not sizeof (size_t).
11313 That way, xmalloc returns a properly-aligned pointer even if
11314 XMALLOC_OVERRUN_CHECK is defined. The old debugging code happened
11315 to align OK on typical 64-bit hosts, but not on Fedora 14 x86.
11316 * charset.c (syms_of_charset): Take XMALLOC_OVERRUN_CHECK_OVERHEAD
11317 into account when calculating the initial malloc maximum.
11318 * lisp.h (XMALLOC_OVERRUN_CHECK_OVERHEAD, XMALLOC_OVERRUN_CHECK_SIZE):
11319 Move here from alloc.c, so that charset.c can use it too.
11320 Properly align; the old code wasn't right for common 32-bit hosts
11321 when configured with --enable-checking=all.
11322 (XMALLOC_BASE_ALIGNMENT, COMMON_MULTIPLE, XMALLOC_HEADER_ALIGNMENT)
11323 (XMALLOC_OVERRUN_SIZE_SIZE): New macros.
11324
31bed486
EZ
113252011-09-29 Eli Zaretskii <eliz@gnu.org>
11326
04c70788 11327 * sysdep.c (snprintf) [!EOVERFLOW]: If EOVERFLOW is not defined,
31bed486
EZ
11328 use EDOM.
11329
fbcaa2f3
EZ
113302011-09-28 Eli Zaretskii <eliz@gnu.org>
11331
11332 * xdisp.c (compute_display_string_end): If there's no display
11333 string at CHARPOS, return -1.
11334
11335 * bidi.c (bidi_fetch_char): When compute_display_string_end
11336 returns a negative value, treat the character as a normal
11337 character not covered by a display string. (Bug#9624)
11338
a239d4e9
JB
113392011-09-28 Juanma Barranquero <lekktu@gmail.com>
11340
11341 * lread.c (Fread_from_string): Fix typo in docstring.
11342
88652fd5
EZ
113432011-09-27 Eli Zaretskii <eliz@gnu.org>
11344
11345 * xdisp.c (handle_invisible_prop): If invisible text ends on a
11346 newline, reseat the iterator instead of bidi-iterating there one
11347 character at a time. (Bug#9610)
32c1fffd
SM
11348 (BUFFER_POS_REACHED_P, move_it_in_display_line_to): Bail when past
11349 TO_CHARPOS if the bidi iterator is at base embedding level.
88652fd5 11350
ed497dd4
AS
113512011-09-27 Andreas Schwab <schwab@linux-m68k.org>
11352
11353 * lread.c (readevalloop): Use correct code for NBSP.
11354 (read1): Likewise. (Bug#9608)
11355
b2bf61aa
MA
113562011-09-25 Michael Albinus <michael.albinus@gmx.de>
11357
11358 * dbusbind.c (Fdbus_register_signal): When service is not
11359 registered, use nil in Vdbus_registered_objects_table. (Bug#9581)
11360
32bbb17c
GM
113612011-09-25 Glenn Morris <rgm@gnu.org>
11362
11363 * buffer.c (truncate-lines): Doc fix.
11364
94e0933e
CY
113652011-09-24 Chong Yidong <cyd@stupidchicken.com>
11366
11367 * window.c (Fwindow_prev_buffers, Fset_window_prev_buffers)
11368 (Fset_window_next_buffers): Doc fix.
11369
cddde921
GM
113702011-09-24 Glenn Morris <rgm@gnu.org>
11371
11372 * minibuf.c (read_minibuf): Disable line truncation. (Bug#5715)
11373
1260aef1
PE
113742011-09-24 Paul Eggert <eggert@cs.ucla.edu>
11375
25b4bfa0
PE
11376 Fix minor problems found by static checking.
11377 * xdisp.c (string_from_display_spec): Don't assume vecsize fits in int.
1260aef1
PE
11378 * indent.c (Fvertical_motion): Fix == vs = typo.
11379
e3cbd34b
EZ
113802011-09-24 Eli Zaretskii <eliz@gnu.org>
11381
a66cfb1c
SM
11382 * dispnew.c (syms_of_display) <redisplay-dont-pause>:
11383 Default value is now t. Doc fix.
6bf7006f 11384
e3cbd34b 11385 * indent.c (Fvertical_motion): Compute and apply the overshoot
32c1fffd 11386 logic when moving up, not only when moving down. Fix the
e3cbd34b 11387 confusing name and values of the it_overshoot_expected variable;
32c1fffd 11388 logic changes accordingly. (Bug#9254) (Bug#9549)
e3cbd34b
EZ
11389
11390 * xdisp.c (pos_visible_p): Produce correct pixel coordinates when
11391 CHARPOS is covered by a display string which includes newlines.
11392 (move_it_vertically_backward): Avoid inflooping when START_CHARPOS
11393 is covered by a display string with embedded newlines.
11394
a3de0cbd
MA
113952011-09-24 Michael Albinus <michael.albinus@gmx.de>
11396
11397 * dbusbind.c (Fdbus_register_signal): Add match rule to
11398 Vdbus_registered_objects_table. (Bug#9581)
a66cfb1c
SM
11399 (Fdbus_register_method, Vdbus_registered_objects_table):
11400 Fix docstring.
a3de0cbd 11401
b260039d
JM
114022011-09-24 Jim Meyering <meyering@redhat.com>
11403
32c1fffd 11404 do not ignore write error for any output size
b260039d
JM
11405 The previous change was incomplete.
11406 While it makes emacs --batch detect the vast majority of stdout
11407 write failures, errors were still ignored whenever the output size is
11408 k * (BUFSIZ+1) - 4. E.g., on a system with BUFSIZ of 4096,
11409 $ emacs --batch --eval '(print (format "%4093d" 0))' > /dev/full \
11410 && echo FAIL: ignored write error
11411 FAIL: ignored write error
11412 $ emacs --batch --eval '(print (format "%20481d" 0))' > /dev/full \
11413 && echo FAIL: ignored write error
11414 FAIL: ignored write error
11415 * emacs.c (Fkill_emacs): Also test ferror. (Bug#9574)
11416
8eca8a7c
AS
114172011-09-23 Andreas Schwab <schwab@linux-m68k.org>
11418
11419 * emacs.c (Fkill_emacs): In noninteractive mode exit
11420 non-successfully if a write error occurred on stdout. (Bug#9574)
11421
3341db62
EZ
114222011-09-21 Eli Zaretskii <eliz@gnu.org>
11423
11424 * xdisp.c (pop_it): Allow it->object that is a cons cell to pass
11425 the xassert test.
11426
11427 * dispextern.h (struct it): Update the comment documenting what
11428 can it->OBJECT be.
11429
8c203dbf
EZ
114302011-09-20 Eli Zaretskii <eliz@gnu.org>
11431
11432 * xdisp.c (set_cursor_from_row): If the row ends in a newline from
11433 a display string, extend search for cursor position to end of row.
11434 (find_row_edges): If the row ends in a newline from a display
11435 string, increment its MATRIX_ROW_END_CHARPOS by one. (Bug#9549)
11436 Handle the case of a display string with multiple newlines.
fd317ddf
EZ
11437 (Fcurrent_bidi_paragraph_direction): Fix search for previous
11438 non-empty line. Fixes confusing cursor motion with arrow keys at
11439 the beginning of a line that starts with whitespace.
8c203dbf 11440
a4824228
LMI
114412011-09-19 Lars Magne Ingebrigtsen <larsi@gnus.org>
11442
11443 * lread.c (Fread_from_string): Document what FINAL-STRING-INDEX is
11444 (bug#9493).
11445
33ed493b
CY
114462011-09-18 Chong Yidong <cyd@stupidchicken.com>
11447
11448 * xfns.c (Fx_create_frame): Handle the bitmapIcon resource as
11449 boolean (Bug#9154).
11450
56cd55c8
EZ
114512011-09-18 Eli Zaretskii <eliz@gnu.org>
11452
11453 * xdisp.c (display_line): Record maximum and minimum buffer
11454 positions even if no glyphs were produced (e.g., by a zero-width
11455 stretch). Fixes bug#9530 on a TTY. Under word-wrap, don't record
11456 buffer positions that will be removed from the glyph row because
11457 they don't fit.
c02dcedf
EZ
11458 (produce_stretch_glyph): Fix a bug in :align-to on a TTY when the
11459 column is beyond frame width: don't subtract 1 "pixel" when
11460 computing width of the stretch.
3e62b7e0
EZ
11461 (reseat_at_next_visible_line_start): Undo the change made on
11462 2011-09-17 that saved paragraph information and restored it after
11463 the call to `reseat'. (Bug#9545)
56cd55c8 11464
5ed99d36 114652011-09-18 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
3390454c
YM
11466
11467 * xdisp.c (expose_window): Save original value of phys_cursor_on_p
11468 and turn window cursor on if cleared (Bug#9415).
11469
5ed99d36 114702011-09-18 Andreas Schwab <schwab@linux-m68k.org>
edb7b4dc
AS
11471
11472 * search.c (boyer_moore): Take unibyte characters from pattern
11473 literally. (Bug#9458)
11474
9bade7b2
EZ
114752011-09-18 Eli Zaretskii <eliz@gnu.org>
11476
11477 * xdisp.c (reseat_at_next_visible_line_start): Fix last change.
11478
e5e9d610
PE
114792011-09-18 Paul Eggert <eggert@cs.ucla.edu>
11480
87e4427a
PE
11481 Fix minor problem found by static checking.
11482 * xdisp.c (reseat_at_next_visible_line_start): Mark locals as
11483 initialized, to pacify gcc -Wuninitialized.
11484
e5e9d610
PE
11485 * fileio.c: Report proper errno when syscall falls.
11486 (Finsert_file_contents): Save and restore errno,
11487 so that report_file_error outputs the correct diagnostic.
11488 (Fwrite_region) [CLASH_DETECTION]: Likewise.
11489
a1674f0b
EZ
114902011-09-18 Eli Zaretskii <eliz@gnu.org>
11491
11492 * .gdbinit (pgx): Fix references to fields of `struct glyph'.
11493
fbfb6dd4
EZ
114942011-09-17 Eli Zaretskii <eliz@gnu.org>
11495
11496 * xdisp.c (produce_stretch_glyph): Another fix for changes made on
11497 2011-08-30T17:32:44Z!eliz@gnu.org. (Bug#9530)
11498
bb187662
EZ
114992011-09-17 Eli Zaretskii <eliz@gnu.org>
11500
1137e8b8 11501 * xdisp.c (reseat_at_next_visible_line_start): Keep information
6b02f655 11502 about the current paragraph and restore it after the call to reseat.
1137e8b8
EZ
11503
11504 * bidi.c (MAX_PARAGRAPH_SEARCH): New macro.
11505 (bidi_find_paragraph_start): Search back for paragraph beginning
11506 at most MAX_PARAGRAPH_SEARCH lines; if not found, return BEGV_BYTE.
11507 (bidi_move_to_visually_next): Only trigger paragraph-related
11508 computations when the last character is a newline or at EOB, not
11509 just any NEUTRAL_B. (Bug#9470)
11510
bb187662
EZ
11511 * xdisp.c (set_cursor_from_row): Don't invoke special treatment of
11512 truncated lines if point is covered by a display string. (Bug#9524)
11513
2e621251
PE
115142011-09-16 Paul Eggert <eggert@cs.ucla.edu>
11515
11516 * xselect.c: Relax test for outgoing X longs (Bug#9498).
11517 (cons_to_x_long): New function.
11518 (lisp_data_to_selection_data): Use it. Correct the test for
11519 short-versus-long data; it was negated. Break out of vector
11520 loop, for efficiency, when a long datum is discovered.
11521
91a15bc6
SM
115222011-09-16 Stefan Monnier <monnier@iro.umontreal.ca>
11523
11524 * eval.c (Fquote): Document its non-consing behavior (bug#9482).
11525
b41c3a35
EZ
115262011-09-16 Eli Zaretskii <eliz@gnu.org>
11527
11528 * image.c (tiff_handler): Work around a bug in MinGW GCC 3.x (see
11529 GCC PR/17406) by declaring this function with external scope.
11530
7812ba2d
PE
115312011-09-15 Paul Eggert <eggert@cs.ucla.edu>
11532
11533 * editfns.c (Fformat): Fix bug in text-property fix (Bug#9514).
11534 Don't mishandle (length (format "%%")) and (format "%4000s%%" "").
11535
cf7edc2a
AS
115362011-09-15 Andreas Schwab <schwab@linux-m68k.org>
11537
11538 * editfns.c (Fformat): Correctly handle text properties on "%%".
11539
bd01620e
EZ
115402011-09-15 Eli Zaretskii <eliz@gnu.org>
11541
11542 * xterm.c (x_draw_composite_glyph_string_foreground):
11543 * w32term.c (x_draw_composite_glyph_string_foreground):
11544 * term.c (encode_terminal_code):
11545 * composite.c (composition_update_it, get_composition_id):
11546 * xdisp.c (get_next_display_element)
11547 (fill_composite_glyph_string): Add comments about special meaning
11548 of TAB characters in a composition.
11549
a02719a3
PE
115502011-09-15 Paul Eggert <eggert@cs.ucla.edu>
11551
11552 * editfns.c (Fformat): Fix off-by-1 bug for "%%b" (Bug#9514).
4c122725
PE
11553 This occurs when processing a multibyte format.
11554 Problem reported by Wolfgang Jenker.
a02719a3 11555
72589a3c
JB
115562011-09-15 Johan Bockgård <bojohan@gnu.org>
11557
11558 * xdisp.c (try_cursor_movement): Only check for exact match if
11559 cursor hpos found by set_cursor_from_row is valid. (Bug#9495)
11560
1c14176c
PE
115612011-09-14 Paul Eggert <eggert@cs.ucla.edu>
11562
11563 Remove unused external symbols.
11564 * dispextern.h (calc_pixel_width_or_height): Remove decl.
11565 * xdisp.c (calc_pixel_width_or_height): Now static.
11566 * doprnt.c (exprintf) [! (HAVE_X_WINDOWS && USE_X_TOOLKIT)]: Remove.
11567 * indent.c (check_display_width):
11568 * w32term.c: Fix comment to match code.
11569 * xterm.c, xterm.h (x_catching_errors): Remove.
11570
d2eea5b5
PE
115712011-09-14 Paul Eggert <eggert@cs.ucla.edu>
11572
11573 * xselect.c: Use signed conversions more consistently (Bug#9498).
11574 (selection_data_to_lisp_data): Assume incoming selection data are
11575 signed integers, not unsigned. This is to be consistent with
11576 outgoing selection data, which was modified to use signed integers
11577 in as part of the fix to Bug#9196 in response to Jan D.'s comment
11578 in <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9196#32> that X11
11579 expects long, not unsigned long.
11580
46888499
EZ
115812011-09-14 Eli Zaretskii <eliz@gnu.org>
11582
11583 * xdisp.c (try_window_reusing_current_matrix): Fix incorrect
11584 computation of loop end. Reported by Johan Bockgård
11585 <bojohan@gnu.org>.
11586
ef8ef9fb
CY
115872011-09-13 Chong Yidong <cyd@stupidchicken.com>
11588
11589 * frame.c (Fother_visible_frames_p): Function deleted.
11590
fa819fed
EZ
115912011-09-12 Eli Zaretskii <eliz@gnu.org>
11592
11593 * indent.c (compute_motion): Process display vector front to back
11594 rather than the other way around. (Bug#2496)
11595
2ba8e008
SM
115962011-09-12 Stefan Monnier <monnier@iro.umontreal.ca>
11597
11598 * fileio.c (Finsert_file_contents): Don't assume beg_offset is 0.
11599
20f53c69
CY
116002011-09-11 Chong Yidong <cyd@stupidchicken.com>
11601
11602 * minibuf.c (Fread_from_minibuffer): Doc fix.
11603
d562d7a4
EZ
116042011-09-11 Eli Zaretskii <eliz@gnu.org>
11605
11606 * xdisp.c (produce_stretch_glyph): Fix a typo made in changes from
11607 2011-08-30T17:32:44Z!eliz@gnu.org. (Bug#9475)
11608
1c4d7f3d
LMI
116092011-09-11 Lars Magne Ingebrigtsen <larsi@gnus.org>
11610
11611 * fileio.c (Fvisited_file_modtime): Document `(-1 65535)' as a
11612 value for non-existent files.
11613
b885bf36
EZ
116142011-09-11 Eli Zaretskii <eliz@gnu.org>
11615
11616 * fileio.c (Finsert_file_contents): If the file cannot be opened,
11617 set its "size" to -1. This will set the modtime_size field of
11618 the corresponding buffer to -1, which is what
11619 verify-visited-file-modtime expects for files that do not exist.
11620 (Bug#9139)
11621
6612f0bf
PE
116222011-09-11 Paul Eggert <eggert@cs.ucla.edu>
11623
11624 * keymap.h (KEY_DESCRIPTION_SIZE, push_key_description): Move decls
11625 here ...
11626 * lisp.h: ... from here. push_key_description is no longer
11627 defined in keyboard.c, so its declaration should not be in
11628 lisp.h's "Defined in keyboard.c" section, and KEY_DESCRIPTION_SIZE
11629 logically belongs with push_key_description.
11630
dfb3f755
PE
116312011-09-10 Paul Eggert <eggert@cs.ucla.edu>
11632
11633 * buffer.h: Include <sys/types.h> instead of <time.h>.
11634 Otherwise, off_t wasn't defined on FreeBSD 9.0-BETA2 i386.
11635 Problem reported by Herbert J. Skuhra.
11636
3134906c
LMI
116372011-09-10 Lars Magne Ingebrigtsen <larsi@gnus.org>
11638
11639 * xml.c (parse_region): Make the parsing work for
11640 non-comment-starting XML files again (bug#9144).
11641
8d903f4e
AS
116422011-09-10 Andreas Schwab <schwab@linux-m68k.org>
11643
11644 * image.c (gif_load): Fix calculation of bottom and right corner.
11645 (Bug#9468)
11646
80ad64f4
EZ
116472011-09-10 Eli Zaretskii <eliz@gnu.org>
11648
11649 * xdisp.c (MAX_DISP_SCAN): Decrease to 250. Prevents sluggish
11650 redisplay in small windows.
11651
208a048d
EZ
116522011-09-09 Eli Zaretskii <eliz@gnu.org>
11653
11654 * frame.c (x_report_frame_params): Cast to avoid compiler warnings.
11655
9b1c252e
MR
116562011-09-08 Martin Rudalics <rudalics@gmx.at>
11657
11658 * window.c (Fset_window_prev_buffers, Fset_window_next_buffers):
11659 Operate on live windows only.
11660
2949f33b
JB
116612011-09-08 Juanma Barranquero <lekktu@gmail.com>
11662
11663 * emacs.c (my_heap_start): #ifdef to avoid warnings when unused.
11664
e08dcafd
EZ
116652011-09-07 Eli Zaretskii <eliz@gnu.org>
11666
11667 * xdisp.c (move_it_in_display_line_to): Call RESTORE_IT on ppos_it
11668 only under bidi iteration.
11669
115b96bd
JD
116702011-09-07 Jan Djärv <jan.h.d@swipnet.se>
11671
11672 * gtkutil.c (xg_make_tool_item): Insert comment about eventbox.
11673
c8199d0f
PE
116742011-09-06 Paul Eggert <eggert@cs.ucla.edu>
11675
11676 isnan: Fix porting problem to Solaris 10 with bundled gcc.
11677 Without this fix, the command to link temacs failed due to an
11678 undefined symbol __builtin_isnan. This is because
11679 /usr/include/iso/math_c99.h #defines isnan(x) to
11680 __builtin_isnan(x), but the bundled gcc, which identifies itself
11681 as gcc 3.4.3 (csl-sol210-3_4-branch+sol_rpath), does not have
11682 a __builtin_isnan.
11683 * floatfns.c (isnan): #undef, and then #define to a clone of
11684 what's in data.c.
11685 (Fisnan): Always define, since it's always available now.
11686 (syms_of_floatfns): Always define isnan at the Lisp level.
11687
e39b275c 116882011-09-06 Paul Eggert <eggert@cs.ucla.edu>
1c262cae
PE
11689
11690 * Makefile.in (gl-stamp): move-if-change now in build-aux (Bug#9169).
11691
b2db44d9 116922011-09-06 Paul Eggert <eggert@cs.ucla.edu>
728f8f0a 11693
f4af5137 11694 * fileio.c: Fix bugs with large file offsets (Bug#9428).
728f8f0a
PE
11695 The previous code assumed that file offsets (off_t values) fit in
11696 EMACS_INT variables, which is not true on typical 32-bit hosts.
11697 The code messed up by falsely reporting buffer overflow in cases
11698 such as (insert-file-contents "big" nil 1 2) into an empty buffer
11699 when "big" contains more than 2**29 bytes, even though this
11700 inserts just one byte and does not overflow the buffer.
11701 (Finsert_file_contents): Store file offsets as off_t
11702 values, not as EMACS_INT values. Check for overflow when
11703 converting between EMACS_INT and off_t. When checking for
11704 buffer overflow or for overlap, take the offsets into account.
11705 Don't use EMACS_INT for small values where int suffices.
11706 When checking for overlap, fix a typo: ZV was used where
11707 ZV_BYTE was intended.
11708 (Fwrite_region): Don't assume off_t fits into 'long'.
11709 * buffer.h (struct buffer.modtime_size): Now off_t, not EMACS_INT.
11710
ecfc0a49
MA
117112011-09-05 Michael Albinus <michael.albinus@gmx.de>
11712
11713 * dbusbind.c (xd_signature_cat): Rename from signature_cat.
11714
6511acf2 117152011-09-04 Paul Eggert <eggert@cs.ucla.edu>
61bfeeb7 11716
0999621a 11717 sprintf-related integer and memory overflow issues (Bug#9412).
62f19c19
PE
11718
11719 * doprnt.c (doprnt): Support printing ptrdiff_t and intmax_t values.
8666506e 11720 (esprintf, exprintf, evxprintf): New functions.
62f19c19 11721 * keyboard.c (command_loop_level): Now EMACS_INT, not int.
6b02f655 11722 (cmd_error): Kbd macro iterations count is now EMACS_INT, not int.
62f19c19
PE
11723 (modify_event_symbol): Do not assume that the length of
11724 name_alist_or_stem is safe to alloca and fits in int.
11725 (Fexecute_extended_command): Likewise for function name and binding.
11726 (Frecursion_depth): Wrap around reliably on integer overflow.
11727 * keymap.c (push_key_description): First arg is now EMACS_INT, not int,
11728 since some callers pass EMACS_INT values.
11729 (Fsingle_key_description): Don't crash if symbol name contains more
11730 than MAX_ALLOCA bytes.
11731 * minibuf.c (minibuf_level): Now EMACS_INT, not int.
11732 (get_minibuffer): Arg is now EMACS_INT, not int.
11733 * lisp.h (get_minibuffer, push_key_description): Reflect API changes.
8666506e 11734 (esprintf, exprintf, evxprintf): New decls.
62f19c19
PE
11735 * window.h (command_loop_level, minibuf_level): Reflect API changes.
11736
2be7d702
PE
11737 * dbusbind.c (signature_cat): New function.
11738 (xd_signature, Fdbus_register_signal):
2ea16b89
PE
11739 Do not overrun buffer; instead, report string overflow.
11740
9d1df220
PE
11741 * dispnew.c (add_window_display_history): Don't overrun buffer.
11742 Truncate instead; this is OK since it's just a log.
11743
33ef5c64
PE
11744 * editfns.c (Fcurrent_time_zone): Don't overrun buffer
11745 even if the time zone offset is outlandishly large.
11746 Don't mishandle offset == INT_MIN.
11747
66c6fdd5
PE
11748 * emacs.c (main) [NS_IMPL_COCOA]: Don't overrun buffer
11749 when creating daemon; the previous buffer-overflow check was incorrect.
11750
d749b01b
PE
11751 * eval.c (verror): Simplify by rewriting in terms of evxprintf,
11752 which has the guts of the old verror function.
11753
b5cd1905
PE
11754 * filelock.c (lock_file_1, lock_file): Don't blindly alloca long name;
11755 use SAFE_ALLOCA instead. Use esprintf to avoid int-overflow issues.
11756
6e1a67fb
PE
11757 * font.c: Include <float.h>, for DBL_MAX_10_EXP.
11758 (font_unparse_xlfd): Don't blindly alloca long strings.
c21721cc 11759 Don't assume XINT result fits in int, or that XFLOAT_DATA * 10
8666506e 11760 fits in int, when using sprintf. Use single snprintf to count
c21721cc
PE
11761 length of string rather than counting it via multiple sprintfs;
11762 that's simpler and more reliable.
c21721cc
PE
11763 (font_unparse_fcname): Use it to avoid sprintf buffer overrun.
11764 (generate_otf_features) [0 && HAVE_LIBOTF]: Use esprintf, not
11765 sprintf, in case result does not fit in int.
11766
c57b67fc
PE
11767 * fontset.c (num_auto_fontsets): Now printmax_t, not int.
11768 (fontset_from_font): Print it.
11769
8a401434
PE
11770 * frame.c (tty_frame_count): Now printmax_t, not int.
11771 (make_terminal_frame, set_term_frame_name): Print it.
11772 (x_report_frame_params): In X, window IDs are unsigned long,
11773 not signed long, so print them as unsigned.
11774 (validate_x_resource_name): Check for implausibly long names,
11775 and don't assume name length fits in 'int'.
11776 (x_get_resource_string): Don't blindly alloca invocation name;
11777 use SAFE_ALLOCA. Use esprintf, not sprintf, in case result does
11778 not fit in int.
11779
6e1a67fb
PE
11780 * gtkutil.c: Include <float.h>, for DBL_MAX_10_EXP.
11781 (xg_check_special_colors, xg_set_geometry):
84722b3d
PE
11782 Make sprintf buffers a bit bigger, to avoid potential buffer overrun.
11783
0df02bf3
PE
11784 * lread.c (dir_warning): Don't blindly alloca buffer; use SAFE_ALLOCA.
11785 Use esprintf, not sprintf, in case result does not fit in int.
11786
48e30793
PE
11787 * macros.c (executing_kbd_macro_iterations): Now EMACS_INT, not int.
11788 (Fend_kbd_macro): Don't mishandle MOST_NEGATIVE_FIXNUM by treating
11789 it as a large positive number.
11790 (Fexecute_kbd_macro): Don't assume repeat count fits in int.
11791 * macros.h (executing_kbd_macro_iterations): Now EMACS_INT, not int.
11792
a66ff6d8
PE
11793 * nsterm.m ((NSSize)windowWillResize): Use esprintf, not sprintf,
11794 in case result does not fit in int.
11795
aca216ff
PE
11796 * print.c (float_to_string): Detect width overflow more reliably.
11797 (print_object): Make sprintf buffer a bit bigger, to avoid potential
11798 buffer overrun. Don't assume list length fits in 'int'. Treat
11799 print length of 0 as 0, not as infinity; to be consistent with other
11800 uses of print length in this function. Don't overflow print length
11801 index. Don't assume hash table size fits in 'long', or that
11802 vectorlike size fits in 'unsigned long'.
11803
31c286f7
PE
11804 * process.c (make_process): Use printmax_t, not int, to format
11805 process-name gensyms.
11806
55e5faa1
PE
11807 * sysdep.c (snprintf) [! HAVE_SNPRINTF]: New function.
11808
80f2e268
PE
11809 * term.c (produce_glyphless_glyph): Make sprintf buffer a bit bigger
11810 to avoid potential buffer overrun.
11811
670741ab
PE
11812 * xfaces.c (x_update_menu_appearance): Don't overrun buffer
11813 if X resource line is longer than 512 bytes.
11814
b7163a50
PE
11815 * xfns.c (x_window): Make sprintf buffer a bit bigger
11816 to avoid potential buffer overrun.
11817
ae58ff1f
PE
11818 * xterm.c (x_io_error_quitter): Don't overrun sprintf buffer.
11819
c43c8a6a
PE
11820 * xterm.h (x_check_errors): Add ATTRIBUTE_FORMAT_PRINTF.
11821
3f8236f4
PE
118222011-09-04 Paul Eggert <eggert@cs.ucla.edu>
11823
53e9fe90 11824 Integer overflow fixes for scrolling, etc.
6511acf2
PE
11825 Without these, Emacs silently mishandles large integers sometimes.
11826 For example, "C-u 4294967297 M-x recenter" was treated as if
53e9fe90
PE
11827 it were "C-u 1 M-x recenter" on a typical 64-bit host.
11828
6511acf2
PE
11829 * xdisp.c (try_window_id): Check Emacs fixnum range before
11830 converting to 'int'.
806add1d 11831
6511acf2 11832 * window.c (window_scroll_line_based, Frecenter):
71f02bc5
PE
11833 Check that an Emacs fixnum is in range before assigning it to 'int'.
11834 (Frecenter, Fmove_to_window_line): Use EMACS_INT, not int, for
11835 values converted from Emacs fixnums.
11836 (Frecenter): Don't wrap around a line count if it is out of 'int'
11837 range; instead, treat it as an extreme value.
11838 (Fset_window_configuration, compare_window_configurations):
11839 Use ptrdiff_t, not int, for index that might exceed 2 GiB.
11840
6511acf2
PE
11841 * search.c (Freplace_match): Use ptrdiff_t, not int, for indexes
11842 that can exceed INT_MAX. Check that EMACS_INT value is in range
11843 before assigning it to the (possibly-narrower) index.
a0efffc8
PE
11844 (match_limit): Don't assume that a fixnum can fit in 'int'.
11845
6511acf2 11846 * print.c (print_object): Use ptrdiff_t, not int, for index that can
29ebea3b
PE
11847 exceed INT_MAX.
11848
6511acf2 11849 * indent.c (position_indentation): Now takes ptrdiff_t, not int.
3f8236f4
PE
11850 (Fvertical_motion): Don't wrap around LINES values that don't fit
11851 in 'int'. Instead, treat them as extreme values. This is good
11852 enough for windows, which can't have more than INT_MAX lines anyway.
11853
fcb901a7
LMI
118542011-09-03 Lars Magne Ingebrigtsen <larsi@gnus.org>
11855
0f2f6b6d
LMI
11856 * Require libxml/parser.h to avoid compilation warning.
11857
fcb901a7
LMI
11858 * emacs.c (shut_down_emacs): Call xmlCleanupParser on shutdown.
11859
11860 * xml.c (parse_region): Don't call xmlCleanupParser after parsing,
11861 since this reportedly can destroy thread storage.
11862
6e20a0d4
CY
118632011-08-30 Chong Yidong <cyd@stupidchicken.com>
11864
11865 * syntax.c (find_defun_start): Update all cache variables if
11866 exiting early (Bug#9401).
11867
148ae00e
EZ
118682011-08-30 Eli Zaretskii <eliz@gnu.org>
11869
f6cfbd8f
EZ
11870 * image.c (x_bitmap_pixmap): Cast to int to avoid compiler warnings.
11871
148ae00e
EZ
11872 * xdisp.c (produce_stretch_glyph): No longer static, compiled also
11873 when HAVE_WINDOW_SYSTEM is not defined. Support both GUI and TTY
11874 frames. Call tty_append_glyph in the TTY case. (Bug#9402)
11875
11876 * term.c (tty_append_glyph): New function.
11877 (produce_stretch_glyph): Static function and its prototype deleted.
11878
a66cfb1c
SM
11879 * dispextern.h (produce_stretch_glyph, tty_append_glyph):
11880 Add prototypes.
148ae00e 11881
c4a07a4c
PE
118822011-08-29 Paul Eggert <eggert@cs.ucla.edu>
11883
11884 * image.c (parse_image_spec): Check for nonnegative, not for positive,
11885 when checking :margin (Bug#9390).
11886 (IMAGE_NON_NEGATIVE_INTEGER_VALUE_OR_PAIR):
a66cfb1c 11887 Rename from IMAGE_POSITIVE_INTEGER_VALUE_OR_PAIR,
c4a07a4c
PE
11888 so that the name doesn't mislead. All uses changed.
11889
6bc8cd65
JB
118902011-08-28 Johan Bockgård <bojohan@gnu.org>
11891
11892 * term.c (init_tty) [HAVE_GPM]: Move mouse settings after
11893 set_tty_hooks.
11894
dca4927e
EZ
118952011-08-27 Eli Zaretskii <eliz@gnu.org>
11896
11897 * xdisp.c (move_it_to): Don't bail out early when reaching
11898 position beyond to_charpos, if we are scanning backwards.
11899 (move_it_vertically_backward): When DY == 0, make sure we get to
11900 the first character in the line after the newline.
11901
f2cad773
PE
119022011-08-27 Paul Eggert <eggert@cs.ucla.edu>
11903
11904 * ccl.c: Improve and simplify overflow checking (Bug#9196).
11905 (ccl_driver): Do not generate an out-of-range pointer.
11906 (Fccl_execute_on_string): Remove unnecessary check for
11907 integer overflow, noted by Stefan Monnier in
11908 <http://lists.gnu.org/archive/html/emacs-devel/2011-08/msg00979.html>.
11909 Remove a FIXME that didn't need fixing.
11910 Simplify the newly-introduced buffer reallocation code.
11911
0cae2cdb
JB
119122011-08-27 Juanma Barranquero <lekktu@gmail.com>
11913
11914 * makefile.w32-in ($(BLD)/alloc.$(O)): Depend on lib/verify.h.
11915
5fc295a4 119162011-08-26 Paul Eggert <eggert@cs.ucla.edu>
ddff3151 11917
70c60eb2 11918 Integer and memory overflow issues (Bug#9196).
726e0ab1 11919
d31850da
PE
11920 * doc.c (get_doc_string): Rework so that
11921 get_doc_string_buffer_size is the actual buffer size, rather than
11922 being 1 less than the actual buffer size; this makes xpalloc more
11923 convenient.
11924
a69fbedb
PE
11925 * image.c (x_allocate_bitmap_record, cache_image):
11926 * xselect.c (Fx_register_dnd_atom):
11927 Simplify previous changes by using xpalloc.
11928
fe5c5d37
PE
11929 * buffer.c (overlay_str_len): Now ptrdiff_t, not EMACS_INT,
11930 since either will do and ptrdiff_t is convenient with xpalloc.
11931
0065d054
PE
11932 * charset.c (charset_table_size)
11933 (struct charset_sort_data.priority): Now ptrdiff_t.
11934 (charset_compare): Don't overflow if priorities differ greatly.
11935 (Fsort_charsets): Don't assume list length fits in int.
11936 Check for size-calculation overflow when allocating sort data.
11937 (syms_of_charset): Allocate an initial charset table that is
11938 just under 64 KiB, to avoid problems with glibc malloc and mmap.
11939
11940 * cmds.c (internal_self_insert): Check for size-calculation overflow.
11941
11942 * composite.h (struct composition.glyph_len): Now int, not unsigned.
11943 The actual value is always <= INT_MAX, and leaving it unsigned made
11944 overflow checking harder.
11945
11946 * dispextern.h (struct glyph_matrix.rows_allocated)
11947 (struct face_cache.size): Now ptrdiff_t, for convenience in use
11948 with xpalloc. The values are still always <= INT_MAX.
11949
11950 * indent.c (compute_motion): Adjust to region_cache_forward sig change.
11951
11952 * lisp.h (xnmalloc, xnrealloc, xpalloc): New decls.
11953 (SAFE_NALLOCA): New macro.
11954
11955 * region-cache.c (struct boundary.pos, find_cache_boundary)
11956 (move_cache_gap, insert_cache_boundary, delete_cache_boundaries)
11957 (set_cache_region, invalidate_region_cache)
11958 (revalidate_region_cache, know_region_cache, region_cache_forward)
11959 (region_cache_backward, pp_cache):
11960 Use ptrdiff_t, not EMACS_INT, since either will do. This is needed
11961 so that ptrdiff_t * can be passed to xpalloc.
11962 (struct region_cache): Similarly, for gap_start, gap_len, cache_len,
11963 beg_unchanged, end_unchanged, buffer_beg, buffer_end members.
11964 (pp_cache): Don't assume cache_len fits in int.
11965 * region-cache.h: Adjust extern decls to match.
11966
11967 * search.c (scan_buffer, Freplace_match): Use ptrdiff_t, not
11968 EMACS_INT, since either will do, for xpalloc.
11969
11970 * alloc.c: Include verify.h, and check that int fits in ptrdiff_t.
11971 (xnmalloc, xnrealloc, xpalloc): New functions.
11972
726e0ab1
PE
11973 * bidi.c (bidi_shelve_header_size): New constant.
11974 (bidi_cache_ensure_space, bidi_shelve_cache): Use it.
11975 (bidi_cache_ensure_space): Avoid integer overflow when allocating.
11976
51f30bc5 11977 * bidi.c (bidi_cache_shrink):
726e0ab1
PE
11978 * buffer.c (overlays_at, overlays_in, record_overlay_string)
11979 (overlay_strings):
11980 Don't update size of array until after memory allocation succeeds,
11981 because xmalloc/xrealloc may not return.
0065d054
PE
11982 (struct sortstrlist.bytes): Now ptrdiff_t, as EMACS_INT doesn't help
11983 now that we have proper integer overflow checking.
11984 (record_overlay_string, overlay_strings): Catch overflows when
11985 calculating size of overlay_str_buf.
726e0ab1 11986
0065d054
PE
11987 * callproc.c (Fcall_process): Check for size overflow when
11988 calculating size of args2.
11989 (child_setup): Avoid overflow by using size_t rather than ptrdiff_t.
11990 Normally we prefer signed values, but sticking with ptrdiff_t would
11991 require adding more-complicated checks.
726e0ab1
PE
11992
11993 * ccl.c (Fccl_execute_on_string): Check for memory overflow.
11994 Use ptrdiff_t rather than EMACS_INT where ptrdiff_t will do.
11995 Redo buffer-overflow calculations to avoid integer overflow.
0065d054 11996 Add a FIXME comment where memory seems to be over-allocated.
726e0ab1
PE
11997
11998 * character.c (Fstring): Check for size-calculation overflow.
11999
12000 * coding.c (produce_chars): Redo buffer-overflow calculations to avoid
12001 unnecessary integer overflow. Check for size overflow.
12002 (encode_coding_object): Don't update size until xmalloc succeeds.
12003
12004 * composite.c (get_composition_id): Check for overflow in glyph
12005 length calculations.
12006
12007 Integer and memory overflow fixes for display code.
12008 * dispextern.h (struct glyph_pool.nglyphs): Now ptrdiff_t, not int.
12009 * dispnew.c (adjust_glyph_matrix, realloc_glyph_pool)
12010 (scrolling_window): Check for overflow in size calculations.
12011 (line_draw_cost, realloc_glyph_pool, add_row_entry):
12012 Don't assume glyph table len fits in int.
12013 (struct row_entry.bucket, row_entry_pool_size, row_entry_idx)
12014 (row_table_size): Now ptrdiff_t, not int.
12015 (scrolling_window): Avoid overflow in size calculations.
12016 Don't update size until allocation succeeds.
12017 * fns.c (concat): Check for overflow in size calculations.
12018 (next_almost_prime): Verify NEXT_ALMOST_PRIME_LIMIT.
12019 * lisp.h (RANGED_INTEGERP, TYPE_RANGED_INTEGERP): New macros.
12020 (NEXT_ALMOST_PRIME_LIMIT): New constant.
12021
12022 * doc.c (get_doc_string_buffer_size): Now ptrdiff_t, not int.
12023 (get_doc_string): Check for size calculation overflow.
12024 Don't update size until allocation succeeds.
12025 (get_doc_string, Fsubstitute_command_keys): Use ptrdiff_t, not
12026 EMACS_INT, where ptrdiff_t will do.
12027 (Fsubstitute_command_keys): Check for string overflow.
12028
12029 * editfns.c (set_time_zone_rule): Don't assume environment length
12030 fits in int.
12031 (message_length): Now ptrdiff_t, not int.
12032 (Fmessage_box): Don't update size until allocation succeeds.
12033 Don't assume message length fits in int.
12034 (Fformat): Use ptrdiff_t, not EMACS_INT, where ptrdiff_t will do.
12035
0065d054
PE
12036 * emacs.c (main): Do not reallocate argv, since there is a null at
12037 the end that can be overwritten, and this way there's no need to
12038 worry about size-calculation overflow.
12039 (sort_args): Check for size-calculation overflow.
726e0ab1
PE
12040
12041 * eval.c (init_eval_once, grow_specpdl): Don't update size until
12042 alloc succeeds.
12043 (call_debugger, grow_specpdl): Redo calculations to avoid overflow.
12044
12045 * frame.c (set_menu_bar_lines, x_set_frame_parameters)
12046 (x_set_scroll_bar_width, x_figure_window_size):
12047 Check for integer overflow.
12048 (x_set_alpha): Do not assume XINT fits in int.
12049
12050 * frame.h (struct frame): Use int, not EMACS_INT, where int works.
12051 This is for the members text_lines, text_cols, total_lines, total_cols,
12052 where the system imposes an 'int' limit.
12053
12054 * fringe.c (Fdefine_fringe_bitmap):
12055 Don't update size until alloc works.
12056
12057 * ftfont.c (ftfont_get_open_type_spec, setup_otf_gstring)
12058 (ftfont_shape_by_flt): Check for integer overflow in size calculations.
12059
12060 * gtkutil.c (get_utf8_string, xg_store_widget_in_map):
12061 Check for size-calculation overflow.
12062 (get_utf8_string): Use ptrdiff_t, not size_t, where either will
12063 do, as we prefer signed integers.
12064 (id_to_widget.max_size, id_to_widget.used)
12065 (xg_store_widget_in_map, xg_remove_widget_from_map)
12066 (xg_get_widget_from_map, xg_get_scroll_id_for_window)
12067 (xg_remove_scroll_bar, xg_update_scrollbar_pos):
12068 Use and return ptrdiff_t, not int.
12069 (xg_gtk_scroll_destroy): Don't assume ptrdiff_t fits in int.
12070 * gtkutil.h: Change prototypes to match the above.
12071
12072 * image.c (RANGED_INTEGERP, TYPE_RANGED_INTEGERP): Remove; these
12073 are duplicate now that they've been promoted to lisp.h.
12074 (x_allocate_bitmap_record, x_alloc_image_color)
12075 (make_image_cache, cache_image, xpm_load):
12076 Don't update size until alloc is done.
12077 (xpm_load, lookup_rgb_color, lookup_pixel_color, x_to_xcolors)
12078 (x_detect_edges):
3256efce 12079 Check for size calculation overflow.
726e0ab1
PE
12080 (ct_colors_allocated_max): New constant.
12081 (x_to_xcolors, x_detect_edges): Reorder multiplicands to avoid
12082 overflow.
3256efce 12083
726e0ab1
PE
12084 * keyboard.c (read_char, menu_bar_items, tool_bar_items)
12085 (read_char_x_menu_prompt, read_char_minibuf_menu_width)
12086 (read_char_minibuf_menu_prompt, follow_key, read_key_sequence):
12087 Use ptrdiff_t, not int, to count maps.
12088 (read_char_minibuf_menu_prompt): Check for overflow in size
a66cfb1c
SM
12089 calculations. Don't update size until allocation succeeds.
12090 Redo calculations to avoid overflow.
726e0ab1
PE
12091 * keyboard.h: Change prototypes to match the above.
12092
12093 * keymap.c (cmm_size, current_minor_maps): Use ptrdiff_t, not int,
12094 to count maps.
12095 (current_minor_maps): Check for size calculation overflow.
12096 * keymap.h: Change prototypes to match the above.
12097
12098 * lread.c (read1, init_obarray): Don't update size until alloc done.
12099
12100 * macros.c (Fstart_kbd_macro): Don't update size until alloc done.
12101 (store_kbd_macro_char): Reorder multiplicands to avoid overflow.
12102
726e0ab1
PE
12103 * nsterm.h (struct ns_color_table.size, struct ns_color_table.avail):
12104 Now ptrdiff_t, not int.
12105 * nsterm.m (ns_index_color): Use ptrdiff_t, not int, for table indexes.
12106 (ns_draw_fringe_bitmap): Rewrite to avoid overflow.
12107
12108 * process.c (Fnetwork_interface_list): Check for overflow
12109 in size calculation.
12110
12111 * region-cache.c (move_cache_gap): Check for size calculation overflow.
12112
12113 * scroll.c (do_line_insertion_deletion_costs): Check for size calc
12114 overflow. Don't bother calling xmalloc when xrealloc will do.
12115
12116 * search.c (Freplace_match): Check for size calculation overflow.
12117 (Fset_match_data): Don't assume list lengths fit in 'int'.
12118
12119 * sysdep.c (system_process_attributes): Use ptrdiff_t, not int,
12120 for command line length. Do not attempt to address one before the
12121 beginning of an array, as that's not portable.
12122
12123 * term.c (max_frame_lines): Remove; unused.
12124 (encode_terminal_src_size, encode_terminal_dst_size): Now ptrdiff_t,
12125 not int.
12126 (encode_terminal_code, calculate_costs): Check for size
12127 calculation overflow.
12128 (encode_terminal_code): Use ptrdiff_t, not int, to record glyph
12129 table lengths and related sizes. Don't update size until alloc
12130 done. Redo calculations to avoid overflow.
12131 (calculate_costs): Don't bother calling xmalloc when xrealloc will do.
12132
12133 * termcap.c (tgetent): Use ptrdiff_t, not int, to record results of
12134 subtracting pointers.
12135 (gobble_line): Check for overflow more carefully. Don't update size
12136 until alloc done.
12137
12138 * tparam.c (tparam1): Use ptrdiff_t, not int, for sizes.
12139 Don't update size until alloc done.
12140 Redo size calculations to avoid overflow.
12141 Check for size calculation overflow.
0065d054 12142 (main) [DEBUG]: Fix typo in invoking tparam1.
726e0ab1
PE
12143
12144 * xdisp.c (store_mode_line_noprop_char, x_consider_frame_title):
12145 Use ptrdiff_t, not int, for sizes.
12146 (store_mode_line_noprop_char): Don't update size until alloc done.
12147
0065d054
PE
12148 * xfaces.c (lface_id_to_name_size, Finternal_make_lisp_face):
12149 Use ptrdiff_t, not int, for sizes.
12150 (Finternal_make_lisp_face, cache_face):
12151 Check for size calculation overflow.
12152 (cache_face): Treat size calculation overflows as if they were
12153 memory exhaustion (the usual treatment), rather than aborting.
726e0ab1
PE
12154
12155 * xfns.c (x_encode_text, x_set_name_internal)
12156 (Fx_change_window_property): Use ptrdiff_t, not int, to count
12157 sizes, since they can exceed INT_MAX in size. Check for size
12158 calculation overflow.
12159
0065d054
PE
12160 * xgselect.c (gfds_size): Now ptrdiff_t, for convenience with xpalloc.
12161 (xg_select): Check for size calculation overflow.
726e0ab1
PE
12162 Don't update size until alloc done.
12163
0065d054 12164 * xrdb.c (get_environ_db): Don't assume path length fits in int,
726e0ab1 12165 as sprintf is limited to int lengths.
1d526e2f 12166
252c5ee1
PE
12167 * xselect.c (X_LONG_SIZE, X_SHRT_MAX, X_SHRT_MIN, X_LONG_MAX)
12168 (X_LONG_MIN): New macros.
864d7ce7
PE
12169 Use them to make the following changes clearer.
12170 (MAX_SELECTION_QUANTUM): Make the other bounds on this value clearer.
12171 This change doesn't affect the value now, but it may help remind
12172 future maintainers not to raise the value too much later.
12173 (SELECTION_QUANTUM): Remove, replacing with ...
12174 (selection_quantum): ... new function, which avoids overflow.
12175 All uses changed.
12176 (struct selection_data.size): Now ptrdiff_t, not int, to avoid
12177 assumption that selection length fits in 'int'.
12178 (x_reply_selection_request, x_handle_selection_request)
12179 (x_get_window_property, receive_incremental_selection)
12180 (x_get_window_property_as_lisp_data, selection_data_to_lisp_data)
12181 (lisp_data_to_selection_data, clean_local_selection_data):
12182 Use ptrdiff_t, not int, to record length of selection.
12183 (x_reply_selection_request, x_get_window_property)
12184 (receive_incremental_selection, x_property_data_to_lisp):
12185 Redo calculations to avoid overflow.
12186 (x_reply_selection_request): When sending hint, ceiling it at
252c5ee1 12187 X_LONG_MAX rather than relying on wraparound overflow to send
864d7ce7
PE
12188 something.
12189 (x_get_window_property, receive_incremental_selection)
12190 (lisp_data_to_selection_data, x_property_data_to_lisp):
12191 Check for size-calculation overflow.
12192 (x_get_window_property, receive_incremental_selection)
12193 (lisp_data_to_selection_data, Fx_register_dnd_atom):
12194 Don't store size until memory allocation succeeds.
12195 (x_get_window_property): Plug memory leak on memory exhaustion.
12196 Don't double-block input; malloc is safe here. Don't assume 2**34
12197 - 4 fits in unsigned long. Add an xassert to check
12198 XGetWindowProperty overflow. Be more careful about overflow
12199 calculations, and distinguish size from memory overflow better.
12200 (receive_incremental_selection): When tracing, don't assume
12201 unsigned int is less than INT_MAX.
12202 (x_selection_data_to_lisp_data): Remove unnecessary (and in theory
12203 harmful) conversions of unsigned short to int.
12204 (lisp_data_to_selection_data): Don't assume that integers
12205 in the range -65535 through -1 fit in an X unsigned short.
12206 Don't assume that ULONG_MAX == X_ULONG_MAX. Don't store into
12207 result parameters unless successful. Rely on cons_to_unsigned
12208 to report problems with elements; the old code wasn't right anyway.
12209 (x_check_property_data): Check for int overflow; we cannot use
12210 a wider type due to X limits.
12211 (x_handle_dnd_message): Use unsigned int, to avoid int overflow.
12212
726e0ab1 12213 * xsmfns.c (smc_save_yourself_CB): Check for size calc overflow.
34db673b 12214
0065d054
PE
12215 * xterm.c (x_color_cells, x_send_scrollbar_event, handle_one_xevent)
12216 (x_term_init): Check for size calculation overflow.
726e0ab1
PE
12217 (x_color_cells): Don't store size until memory allocation succeeds.
12218 (handle_one_xevent): Use ptrdiff_t, not int, for byte counts.
0065d054 12219 Don't assume alloca size is less than MAX_ALLOCA.
726e0ab1
PE
12220 (x_term_init): Don't assume length fits in int (sprintf is limited
12221 to int size).
bc18e09d 12222
ebfa62c0
PE
12223 Use ptrdiff_t for composition IDs.
12224 * character.c (lisp_string_width):
12225 * composite.c (composition_table_size, n_compositions)
12226 (get_composition_id, composition_gstring_from_id):
12227 * dispextern.h (struct glyph_string.cmp_id, struct composition_it.id):
12228 * xdisp.c (BUILD_COMPOSITE_GLYPH_STRING):
12229 * window.c (Frecenter):
12230 Use ptrdiff_t, not int, for composition IDs.
12231 * composite.c (get_composition_id): Check for integer overflow.
12232 * composite.h: Adjust prototypes to match the above changes.
12233
d3411f89
PE
12234 Use ptrdiff_t for hash table indexes.
12235 * category.c (hash_get_category_set):
12236 * ccl.c (ccl_driver):
12237 * charset.h (struct charset.hash_index, CHECK_CHARSET_GET_ID):
12238 * coding.c (coding_system_charset_list, detect_coding_system):
12239 * coding.h (struct coding_system.id):
12240 * composite.c (get_composition_id, gstring_lookup_cache):
12241 * fns.c (hash_lookup, hash_put, Fgethash, Fputhash):
12242 * image.c (xpm_get_color_table_h):
12243 * lisp.h (hash_lookup, hash_put):
12244 * minibuf.c (Ftest_completion):
12245 Use ptrdiff_t for hash table indexes, not int (which is too
12246 narrow, on 64-bit hosts) or EMACS_INT (which is too wide, on
12247 32-bit --with-wide-int hosts).
12248
e097a6fa
PE
12249 * charset.c (Fdefine_charset_internal): Check for integer overflow.
12250 Add a FIXME comment about memory leaks.
12251 (syms_of_charset): Don't assume xmalloc returns.
12252
5637687f
PE
12253 Don't assume that stated character widths fit in int.
12254 * character.c (Fchar_width, c_string_width, lisp_string_width):
12255 * character.h (CHAR_WIDTH):
12256 * indent.c (MULTIBYTE_BYTES_WIDTH):
12257 Use sanitize_char_width to avoid undefined and/or bad behavior
12258 with outlandish widths.
a66cfb1c 12259 * character.h (sanitize_tab_width): Rename from sanitize_width,
5637687f
PE
12260 now that we have two such functions. All uses changed.
12261 (sanitize_char_width): New inline function.
12262
a2271ba2
PE
12263 Don't assume that tab-width fits in int.
12264 * character.h (sanitize_width): New inline function.
12265 (SANE_TAB_WIDTH): New macro.
12266 (ASCII_CHAR_WIDTH): Use it.
12267 * indent.c (sane_tab_width): Remove. All uses replaced by
12268 SANE_TAB_WIDTH (current_buffer).
12269 * xdisp.c (init_iterator): Use SANE_TAB_WIDTH.
12270
18c52557
PE
12271 * fileio.c: Integer overflow issues with file modes.
12272 (Fset_file_modes, auto_save_1): Don't assume EMACS_INT fits in int.
12273
caeeedc1
PE
12274 * charset.c (read_hex): New arg OVERFLOW. All uses changed.
12275 Remove unreachable code.
12276 (read_hex, load_charset_map_from_file): Check for integer overflow.
12277
6df6ae42 12278 * xterm.c: Don't go over XClientMessageEvent limit.
50849c52
PE
12279 (scroll_bar_windows_size): Now ptrdiff_t, as we prefer signed.
12280 (x_send_scroll_bar_event): Likewise. Check that the size does not
12281 exceed limits imposed by XClientMessageEvent, as well as the usual
12282 ptrdiff_t and size_t limits.
12283
b13995db
PE
12284 * keyboard.c: Overflow, signedness and related fixes.
12285 (make_lispy_movement): Use same integer type in forward decl
12286 that is used in the definition.
12287 (read_key_sequence, keyremap_step):
12288 Change bufsize argument back to int, undoing my 2011-03-30 change.
12289 We prefer signed types, and int is wide enough here.
12290 (parse_tool_bar_item): Don't assume tool_bar_max_label_size is less
12291 than TYPE_MAXIMUM (EMACS_INT) / 2. Don't let the label size grow
12292 larger than STRING_BYTES_BOUND. Use ptrdiff_t for Emacs string
12293 length, not size_t. Use ptrdiff_t for index, not int.
12294 (keyremap_step, read_key_sequence): Redo bufsize check to avoid
12295 possibility of integer overflow.
12296
13464394
PE
12297 Overflow, signedness and related fixes for images.
12298
12299 * dispextern.h (struct it.stack[0].u.image.image_id)
12300 (struct_it.image_id, struct image.id, struct image_cache.size)
12301 (struct image_cache.used, struct image_cache.ref_count):
12302 * gtkutil.c (update_frame_tool_bar):
12303 * image.c (x_reference_bitmap, Fimage_size, Fimage_mask_p)
12304 (Fimage_metadata, free_image_cache, clear_image_cache, lookup_image)
12305 (cache_image, mark_image_cache, x_kill_gs_process, Flookup_image):
12306 * nsmenu.m (update_frame_tool_bar):
12307 * xdisp.c (calc_pixel_width_or_height):
12308 * xfns.c (image_cache_refcount):
12309 Image IDs are now ptrdiff_t, not int, to avoid arbitrary limits
12310 on typical 64-bit hosts.
12311
12312 * image.c (RANGED_INTEGERP, TYPE_RANGED_INTEGERP): New macros.
12313 (x_bitmap_pixmap, x_create_x_image_and_pixmap):
12314 Omit unnecessary casts to int.
12315 (parse_image_spec): Check that integers fall into 'int' range
12316 when the callers expect that.
12317 (image_ascent): Redo ascent calculation to avoid int overflow.
12318 (clear_image_cache): Avoid overflow when sqrt (INT_MAX) < nimages.
12319 (lookup_image): Remove unnecessary tests.
12320 (xbm_image_p): Locals are now of int, not EMACS_INT,
12321 since parse_image_check makes sure they fit into int.
12322 (png_load, gif_load, svg_load_image):
12323 Prefer int to unsigned where either will do.
12324 (tiff_handler): New function, combining the cores of the
a66cfb1c
SM
12325 old tiff_error_handler and tiff_warning_handler.
12326 This function is rewritten to use vsnprintf and thereby avoid
13464394
PE
12327 stack buffer overflows. It uses only the features of vsnprintf
12328 that are common to both POSIX and native Microsoft.
12329 (tiff_error_handler, tiff_warning_handler): Use it.
12330 (tiff_load, gif_load, imagemagick_load_image):
12331 Don't assume :index value fits in 'int'.
12332 (gif_load): Omit unnecessary cast to double, and avoid double-rounding.
12333 (imagemagick_load_image): Check that crop parameters fit into
12334 the integer types that MagickCropImage accepts. Don't assume
12335 Vimagemagick_render_type has a nonnegative value. Don't assume
12336 size_t fits in 'long'.
12337 (gs_load): Use printmax_t to print the widest integers possible.
12338 Check for integer overflow when computing image height and width.
12339
c11821d4
EZ
123402011-08-26 Eli Zaretskii <eliz@gnu.org>
12341
12342 * xdisp.c (redisplay_window): Don't force window start if point
12343 will be invisible in the resulting window. (Bug#9324)
12344
0c95fcf7
EZ
123452011-08-25 Eli Zaretskii <eliz@gnu.org>
12346
12347 * xdisp.c (compute_display_string_pos): Return 2 in DISP_PROP when
12348 the display spec is of the form `(space ...)'.
12349 (handle_display_spec): Return the value returned by
12350 handle_single_display_spec, not just 1 or zero.
12351 (handle_single_display_spec): If the display spec is of the form
12352 `(space ...)', and specifies display in the text area, return 2
12353 rather than 1.
fee65a97 12354 (try_cursor_movement): Check for the need to scroll more
a66cfb1c
SM
12355 accurately, and prefer exact match for point under bidi.
12356 Don't advance `row' beyond the last row of the window.
0c95fcf7
EZ
12357
12358 * dispextern.h (struct bidi_it): Rename the disp_prop_p member
12359 into disp_prop; all users changed.
12360
12361 * bidi.c (bidi_fetch_char): If compute_display_string_pos returns
12362 DISP_PROP = 2, substitute the u+2029 PARAGRAPH SEPARATOR character
12363 for the text covered by the display property.
12364
e4ed06f1
CY
123652011-08-25 Chong Yidong <cyd@stupidchicken.com>
12366
12367 * buffer.c (Fbury_buffer_internal): Rename from Funrecord_buffer.
12368 Change return value to nil.
12369 (Frecord_buffer): Delete unused function.
12370
f67cdd7f
EZ
123712011-08-24 Eli Zaretskii <eliz@gnu.org>
12372
5980d4c6
EZ
12373 * xdisp.c (Fcurrent_bidi_paragraph_direction): For unibyte
12374 buffers, return left-to-right.
8610fe8b
EZ
12375 (set_cursor_from_row): Consider candidate row a win if its glyph
12376 represents a newline and point is on that newline. Fixes cursor
12377 positioning on the newline at EOL of R2L text within L2R
12378 paragraph, and vice versa.
12379 (try_cursor_movement): Check continued rows, in addition to
12380 continuation rows. Fixes unwarranted scroll when point enters a
12381 continued line of R2L text within an L2R paragraph, or vice versa.
12382 (cursor_row_p): Consider the case of point being equal to
12383 MATRIX_ROW_END_CHARPOS. Prevents cursor being stuck when moving
12384 from the end of a short line to the beginning of a continued line
12385 of R2L text within L2R paragraph.
12386 (RECORD_MAX_MIN_POS): For max_pos, use IT_CHARPOS even for
12387 composed characters.
5980d4c6 12388
f67cdd7f
EZ
12389 * bidi.c (bidi_check_type): Use xassert.
12390 (bidi_cache_iterator_state): Update the disp_pos and disp_prop_p
12391 members.
12392
bca633fb
EZ
123932011-08-23 Eli Zaretskii <eliz@gnu.org>
12394
12395 * bidi.c (bidi_get_type): Abort if we get zero as the bidi type of
12396 a character.
12397
4a5885a7
CY
123982011-08-23 Chong Yidong <cyd@stupidchicken.com>
12399
12400 * nsfont.m (ns_otf_to_script): Fix typo.
12401
0902a04e
KH
124022011-08-22 Kenichi Handa <handa@m17n.org>
12403
12404 * chartab.c (Fset_char_table_extra_slot): Do not inhibit setting a
12405 extra slot even if the purpose is char-code-property-table.
12406
1a2e6670
EZ
124072011-08-23 Eli Zaretskii <eliz@gnu.org>
12408
8ddde651
EZ
12409 * xdisp.c (redisplay_window): When computing centering_position,
12410 account for the height of the header line. (Bug#8874)
12411
425cc014
EZ
12412 * dispnew.c (buffer_posn_from_coords): Use buf_charpos_to_bytepos
12413 instead of CHAR_TO_BYTE. Fixes a crash when a completion
12414 candidate is selected by the mouse, and that candidate has a
12415 composed character under the mouse.
12416
1a2e6670
EZ
12417 * xdisp.c (x_produce_glyphs): Set it->nglyphs to 1. Fixes pixel
12418 coordinates reported by pos-visible-in-window-p for a composed
12419 character in column zero.
12420
8b76d6f8
SM
124212011-08-23 Stefan Monnier <monnier@iro.umontreal.ca>
12422
12423 * cmds.c (Fself_insert_command): Mention post-self-insert-hook.
12424
dac347dd
EZ
124252011-08-22 Eli Zaretskii <eliz@gnu.org>
12426
12427 * xdisp.c (BUFFER_POS_REACHED_P): If this is a composition,
12428 consider it a hit if to_charpos is anywhere in the range of the
12429 composed buffer positions.
12430
e013fb34
CY
124312011-08-22 Chong Yidong <cyd@stupidchicken.com>
12432
12433 * image.c (gif_load): Don't assume that each subimage has the same
12434 dimensions as the base image. Handle disposal method that is
12435 "undefined" by the gif spec (Bug#9335).
12436
bd1ba3e8
CY
124372011-08-20 Chong Yidong <cyd@stupidchicken.com>
12438
12439 * eval.c (Fsignal): Handle `debug' symbol in error handler (Bug#9329).
024a2d76 12440 (Fcondition_case): Document `debug' symbol in error handler.
bd1ba3e8 12441
54a1215b
EZ
124422011-08-19 Eli Zaretskii <eliz@gnu.org>
12443
823564e5
EZ
12444 * xfaces.c (face_at_buffer_position): Avoid repeated evaluation of
12445 face ID by FACE_FROM_ID, and avoid a crash when mouse is moved
12446 from an Org mode buffer to a Speedbar frame.
12447
54a1215b
EZ
12448 * xdisp.c (RECORD_MAX_MIN_POS): If the display element comes from
12449 a composition, take its buffer position from IT->cmp_it.charpos.
12450 Fixes cursor positioning at the beginning of a line that begins
12451 with a composed character.
12452
9778ebcc
EZ
124532011-08-18 Eli Zaretskii <eliz@gnu.org>
12454
0be6ee06
EZ
12455 * bidi.c (bidi_get_type): If bidi_type_table reports zero as the
12456 character bidirectional type, use STRONG_L instead. Fixes crashes
12457 in a buffer produced by `describe-categories'.
12458
9778ebcc
EZ
12459 * dispextern.h (struct bidi_it): Move disp_pos and disp_prop_p
12460 members before the level stack, so they would be saved and
12461 restored when copying iterator state. Fixes incorrect reordering
12462 around TABs covered by display properties.
12463
156bffbe
AS
124642011-08-18 Andreas Schwab <schwab@linux-m68k.org>
12465
6b02f655 12466 * process.c (Fnetwork_interface_list): Correctly determine buffer size.
156bffbe 12467
72ad093b
CY
124682011-08-17 Chong Yidong <cyd@stupidchicken.com>
12469
12470 * eval.c (internal_condition_case, internal_condition_case_1)
8b76d6f8
SM
12471 (internal_condition_case_2, internal_condition_case_n):
12472 Remove unnecessary aborts (Bug#9081).
72ad093b 12473
35774242
EZ
124742011-08-17 Eli Zaretskii <eliz@gnu.org>
12475
12476 * lread.c (Fload) [DOS_NT]: If `openp' returns -2, but the file
12477 has no `load' handler, try opening the file locally. (Bug#9311)
12478
db76dd85
KB
124792011-08-16 Ken Brown <kbrown@cornell.edu>
12480
12481 * gmalloc.c: Expand comment.
12482
b215eee5
EZ
124832011-08-16 Eli Zaretskii <eliz@gnu.org>
12484
12485 * xdisp.c (set_cursor_from_row): Don't accept a previous candidate
12486 if it fails the cursor_row_p test. Fixes cursor positioning at ZV.
12487
a4579d33
KB
124882011-08-16 Ken Brown <kbrown@cornell.edu>
12489
12490 Fix memory allocation problems in Cygwin build (Bug#9273).
12491
12492 * unexcw.c ( __malloc_initialized): Declare external variable.
12493 (fixup_executable): Force the dumped emacs to reinitialize malloc.
12494
8b76d6f8
SM
12495 * gmalloc.c [CYGWIN] (bss_sbrk_heapbase, bss_sbrk_heapinfo):
12496 New variables.
a4579d33
KB
12497 (malloc_initialize_1) [CYGWIN]: Prepare for reinitializing the
12498 dumped emacs.
12499 (_free_internal_nolock) [CYGWIN]: Ignore requests to free storage
12500 in the static heap.
12501 [CYGWIN] (special_realloc): New function.
12502 (_realloc_internal_nolock) [CYGWIN]: Use the new function on
12503 requests to realloc storage in the static heap.
12504
3ebec551
PE
125052011-08-15 Paul Eggert <eggert@cs.ucla.edu>
12506
12507 * bidi.c (bidi_initialize): Remove unused local.
12508
9fd8be00
EZ
125092011-08-15 Eli Zaretskii <eliz@gnu.org>
12510
6b02f655
SM
12511 * bidimirror.h:
12512 * biditype.h: Remove file.
12513 * makefile.w32-in ($(BLD)/bidi.$(O)):
12514 * deps.mk (bidi.o): Remove biditype.h and bidimirror.h.
474a8465
EZ
12515
12516 * dispextern.h: Fix a typo in the comment to bidi_type_t.
12517
12518 * chartab.c: Improve commentary for the uniprop_table API.
12519
32413314
EZ
12520 * bidi.c (bidi_paragraph_init): Support zero value of
12521 bidi_ignore_explicit_marks_for_paragraph_level.
474a8465
EZ
12522 (bidi_initialize): Use uniprop_table instead of including
12523 biditype.h and bidimirror.h.
32413314 12524
9fd8be00
EZ
12525 * xdisp.c (move_it_in_display_line_to): Don't reset pixel
12526 coordinates of the iterator when restoring from ppos_it.
12527 (Bug#9296)
12528
5cf2b69b
KH
125292011-08-14 Kenichi Handa <handa@m17n.org>
12530
12531 * process.c (create_process): Call setup_process_coding_systems
72ad093b 12532 after the pid of the process is set to -1 (Bug#8162).
5cf2b69b 12533
daf17d00
EZ
125342011-08-14 Eli Zaretskii <eliz@gnu.org>
12535
12536 * xdisp.c (move_it_in_display_line_to): Don't invoke
12537 IT_RESET_X_ASCENT_DESCENT when iterator position was restored from
12538 ppos_it. Fixes vertical cursor motion when line beginning is
12539 covered by an image. (Bug#9296)
12540
08e3161a
JD
125412011-08-14 Jan Djärv <jan.h.d@swipnet.se>
12542
12543 * nsterm.h (ns_run_ascript): Declare.
12544 (NSAPP_DATA2_RUNASSCRIPT): Define.
12545
12546 * nsfns.m (as_script, as_result, as_status): New static variables.
12547 (ns_run_ascript): New function.
5e617bc2 12548 (Fns_do_applescript): Set variables as_*. Make an NSApplicationDefined
08e3161a
JD
12549 event with data2 set to NSAPP_DATA2_RUNASSCRIPT, post it and then start
12550 the event loop. Get status from as_status (Bug#7276).
12551
12552 * nsterm.m (sendEvent): If event is NSApplicationDefined and
12553 data2 is NSAPP_DATA2_RUNASSCRIPT, call ns_run_ascript and then exit
12554 the event loop (Bug#7276).
12555
a3720aa2
AS
125562011-08-14 Andreas Schwab <schwab@linux-m68k.org>
12557
12558 * gnutls.c (QCgnutls_bootprop_priority)
12559 (QCgnutls_bootprop_trustfiles, QCgnutls_bootprop_keylist)
12560 (QCgnutls_bootprop_crlfiles, QCgnutls_bootprop_callbacks)
12561 (QCgnutls_bootprop_loglevel, QCgnutls_bootprop_hostname)
12562 (QCgnutls_bootprop_min_prime_bits, QCgnutls_bootprop_verify_flags)
12563 (QCgnutls_bootprop_verify_hostname_error)
12564 (QCgnutls_bootprop_callbacks_verify): Rename from
12565 Qgnutls_bootprop_..., all uses changed.
12566
12567 * xfaces.c (QCignore_defface): Rename from Qignore_defface, all
12568 uses changed.
12569
0a0d27fb
PE
125702011-08-14 Paul Eggert <eggert@cs.ucla.edu>
12571
19d5c50c
PE
12572 * xfaces.c (Qframe_set_background_mode): Now static.
12573 * dispextern.h (Qframe_set_background_mode): Remove decl.
12574
0a0d27fb
PE
12575 * process.c (Fnetwork_interface_info): Declare local only if needed.
12576
377538cb
JD
125772011-08-13 Jan Djärv <jan.h.d@swipnet.se>
12578
12579 * process.c: Include ifaddrs.h and net/if_dl.h if available (Bug#8477).
12580 (Fnetwork_interface_list): Allocate in increments of bytes instead
12581 of sizeof (struct ifreq). Iterate over ifconf.ifc_req by counting
12582 bytes (Bug#8477). Count bytes correctly when ifr_addr is a struct
12583 sockaddr.
12584 (struct ifflag_def): notrailers is smart on OSX.
12585 (Fnetwork_interface_info): Handle case when ifr_flags is negative.
12586 Get hardware address with getifaddrs if available.
12587
08fff70c
EZ
125882011-08-12 Eli Zaretskii <eliz@gnu.org>
12589
12590 * xdisp.c (iterate_out_of_display_property): xassert that
12591 IT->position is set to within IT->object's boundaries. Break from
12592 the loop as soon as EOB is reached; avoids infloops in redisplay
8b76d6f8
SM
12593 when IT->position is set up wrongly due to some bug.
12594 Set IT->current to match the bidi iterator unconditionally.
08fff70c
EZ
12595 (push_display_prop): Allow GET_FROM_STRING as IT->method on
12596 entry. Force push_it to save on the stack the current
12597 buffer/string position, to be restored by pop_it. Fix flags in
12598 the iterator structure wrt the object coming from a display
12599 property, as `line-prefix' and `wrap-prefix' are not ``replacing''
12600 properties. (Bug#9284)
12601
7be1c708 126022011-08-09 Andreas Schwab <schwab@linux-m68k.org>
aac0c6e3 12603
7be1c708
CY
12604 * fontset.c (fontset_get_font_group): Add proper type checks.
12605 (Bug#9172)
aac0c6e3 12606
7be1c708 126072011-08-09 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
aac0c6e3 12608
7be1c708
CY
12609 * unexmacosx.c (print_load_command_name): Add cases LC_FUNCTION_STARTS
12610 and LC_VERSION_MIN_MACOSX.
12611 (copy_linkedit_data) [LC_FUNCTION_STARTS]: New function.
12612 (dump_it) [LC_FUNCTION_STARTS]: Use it.
aac0c6e3 12613
97bb72a6
EZ
126142011-08-08 Eli Zaretskii <eliz@gnu.org>
12615
12616 * xdisp.c (forward_to_next_line_start): Allow to use the
8b76d6f8
SM
12617 no-display-properties-and-no-overlays under bidi display.
12618 Set disp_pos in the bidi iterator to avoid searches for display
757664a4 12619 properties and overlays.
97bb72a6 12620
d5617611
CY
126212011-08-08 Chong Yidong <cyd@stupidchicken.com>
12622
37e11a63
CY
12623 * editfns.c (Fset_time_zone_rule): Document relationship with the
12624 setenv function.
12625
d5617611
CY
12626 * ftfont.c (ftfont_pattern_entity): Copy the extras argument to
12627 the font entity extracted from the cache (Bug#8109).
12628
58872834
CY
126292011-08-07 Chong Yidong <cyd@stupidchicken.com>
12630
12631 * composite.c (autocmp_chars): Don't reset point. That is done by
12632 restore_point_unwind (Bug#5984).
12633
75bfc667
JL
126342011-08-07 Juri Linkov <juri@jurta.org>
12635
12636 * editfns.c (Fformat_time_string): Doc fix, add tag `usage:'
12637 to show the arg `TIME' instead of `TIMEVAL'.
12638
d1410150
EZ
126392011-08-06 Eli Zaretskii <eliz@gnu.org>
12640
12641 * xdisp.c (set_cursor_from_row): Fix cursor positioning when a
12642 display property strides EOL and includes a newline, as in
12643 longlines-mode. (Bug#9254)
75b771e4
EZ
12644 (move_it_in_display_line_to): Fix vertical-motion in a buffer with
12645 word-wrap under bidirectional display. (Bug#9224)
d1410150
EZ
12646
12647 * bidi.c (bidi_unshelve_cache): Don't reset the cache if JUST_FREE
12648 is non-zero, even if the data buffer is NULL. Fixes a crash in
12649 vertical-motion with longlines-mode. (Bug#9254)
12650
35928349
EZ
126512011-08-05 Eli Zaretskii <eliz@gnu.org>
12652
ec7cc85b
EZ
12653 * bidi.c <bidi_cache_total_alloc>: Now static.
12654 (bidi_initialize): Initialize bidi_cache_total_alloc.
12655
8b76d6f8 12656 * xdisp.c (display_line): Release buffer allocated for shelved bidi
35928349
EZ
12657 cache. (Bug#9221)
12658
12659 * bidi.c (bidi_shelve_cache, bidi_unshelve_cache): Track total
12660 amount allocated this far in `bidi_cache_total_alloc'.
12661 (bidi_unshelve_cache): Accept an additional argument JUST_FREE; if
12662 non-zero, only free the data buffer without restoring the cache
12663 contents. All callers changed.
12664
12665 * dispextern.h (bidi_unshelve_cache): Update prototype.
12666
12667 * xdisp.c (SAVE_IT, pos_visible_p, move_it_in_display_line_to)
12668 (move_it_in_display_line, move_it_to)
12669 (move_it_vertically_backward, move_it_by_lines): Replace the call
12670 to xfree to an equivalent call to bidi_unshelve_cache.
12671 (move_it_in_display_line_to): Fix logic of returning
412b6358 12672 MOVE_POS_MATCH_OR_ZV in the bidi case. (Bug#9224)
35928349 12673
e2e2423b
EZ
126742011-08-05 Eli Zaretskii <eliz@gnu.org>
12675
12676 * xdisp.c (set_cursor_from_row): Prefer the candidate glyph that
12677 came from a string character with a `cursor' property. (Bug#9229)
12678
ae9e757a
JD
126792011-08-04 Jan Djärv <jan.h.d@swipnet.se>
12680
12681 * Makefile.in (LIB_PTHREAD): New variable.
12682 (LIBES): Add LIB_PTHREAD (Bug#9216).
12683
12684 * alloc.c, emacs.c, gmalloc.c, gtkutil.c, keyboard.c, syssignal.h:
12685 Rename HAVE_GTK_AND_PTHREAD to HAVE_PTHREAD (Bug#9216).
12686
213bd7f2
AS
126872011-08-04 Andreas Schwab <schwab@linux-m68k.org>
12688
6b02f655 12689 * regex.c (re_iswctype): Remove some redundant boolean conversions.
213bd7f2 12690
99aaf75f
JD
126912011-08-04 Jan Djärv <jan.h.d@swipnet.se>
12692
12693 * xterm.c (x_find_topmost_parent): New function.
12694 (x_set_frame_alpha): Find topmost parent window with
12695 x_find_topmost_parent and set the property there also (bug#9181).
12696 (handle_one_xevent): Call x_set_frame_alpha on ReparentNotify.
12697
c74e9d86
PE
126982011-08-04 Paul Eggert <eggert@cs.ucla.edu>
12699
12700 * callproc.c (Fcall_process): Avoid vfork clobbering
12701 the local vars buffer, coding_systems, current_dir.
12702
640c8776
SM
127032011-08-03 Stefan Monnier <monnier@iro.umontreal.ca>
12704
12705 * keymap.c (Fmake_composed_keymap): Move to subr.el.
12706
f26d0e4c
PE
127072011-08-03 Paul Eggert <eggert@cs.ucla.edu>
12708
8a10d76c
PE
12709 * fontset.c (dump_fontset) [FONTSET_DEBUG]: Declare EXTERNALLY_VISIBLE
12710 so that it is not optimized away.
12711
f26d0e4c
PE
12712 * xdisp.c (compute_display_string_pos): Remove unused local.
12713
55439c61
EZ
127142011-08-02 Eli Zaretskii <eliz@gnu.org>
12715
12716 Fix slow cursor motion and scrolling in large buffers with
12717 selective display, like Org Mode buffers. (Bug#9218)
12718
12719 * dispextern.h (struct bidi_it): New member disp_prop_p.
12720
12721 * xdisp.c: Remove one-slot cache of display string positions.
12722 (compute_display_string_pos): Accept an additional argument
5e617bc2 12723 DISP_PROP_P; callers changed. Scan at most 5K characters forward
55439c61
EZ
12724 for a display string or property. If found, set DISP_PROP_P
12725 non-zero.
12726
12727 * bidi.c (bidi_fetch_char): Accept an additional argument
640c8776
SM
12728 DISP_PROP_P, and pass it to compute_display_string_pos.
12729 Only handle text covered by a display string if DISP_PROP_P is returned
55439c61
EZ
12730 non-zero. All callers of bidi_fetch_char changed.
12731
fb33fa43
SM
127322011-08-02 Stefan Monnier <monnier@iro.umontreal.ca>
12733
12734 * keymap.c (Fdefine_key): Fix Lisp_Object/int mixup; apply some CSE.
12735
b099e063
DM
127362010-12-03 Don March <don@ohspite.net>
12737
12738 * keymap.c (Fdefine_key): Fix non-prefix key error message when
12739 last character M-[char] is translated to ESC [char] (bug#7541).
12740
5cc7f7af
KH
127412011-08-02 Kenichi Handa <handa@m17n.org>
12742
d0fffa3f 12743 * lisp.h (uniprop_table): Extern it.
5cc7f7af
KH
12744
12745 * chartab.c (uniprop_table): Make it non-static.
12746
525d5e6e
EZ
127472011-08-01 Eli Zaretskii <eliz@gnu.org>
12748
12749 * xdisp.c (forward_to_next_line_start): Accept additional argument
12750 BIDI_IT_PREV, and store into it the state of the bidi iterator had
12751 on the newline.
12752 (reseat_at_next_visible_line_start): Use the bidi iterator state
12753 returned by forward_to_next_line_start to restore the state of
12754 it->bidi_it after backing up to previous newline. (Bug#9212)
12755
31011111
AS
127562011-07-30 Andreas Schwab <schwab@linux-m68k.org>
12757
12758 * regex.c (re_comp): Protoize.
12759 (re_exec): Fix return type.
12760 (regexec): Fix type of `ret'. (Bug#9203)
12761
476371c4
PE
127622011-07-28 Paul Eggert <eggert@cs.ucla.edu>
12763
e5d76069
PE
12764 * image.c (check_image_size): Use 1024x1024 if unknown frame (Bug#9189).
12765 This is needed if max-image-size is a floating-point number.
12766
9a79b20c
AS
127672011-07-28 Andreas Schwab <schwab@linux-m68k.org>
12768
12769 * print.c (print_object): Print empty symbol as ##.
12770
12771 * lread.c (read1): Read ## as empty symbol.
12772
d8c2fa78
AA
127732011-07-28 Alp Aker <alp.tekin.aker@gmail.com>
12774
12775 * nsfns.m (x_set_foreground_color): Set f->foreground_pixel when
12776 setting frame foreground color (Bug#9175).
12777 (x_set_background_color): Likewise.
12778
ffe57a7a
AA
12779 * nsmenu.m (-setText): Size tooltip dimensions precisely to
12780 contents (Bug#9176).
12781 (EmacsTooltip -init): Remove bezels and add shadows to
12782 tooltip windows.
12783
bf3492a5
AA
12784 * nsterm.m (ns_dumpglyphs_stretch): Avoid overwriting left fringe
12785 or scroll bar (Bug#8470).
12786
d55e9c53
AA
12787 * nsfont.m (nsfont_open): Remove assignment to voffset and
12788 unnecessary vars hshink, expand, hd, full_height, min_height.
12789 (nsfont_draw): Use s->ybase as baseline for glyph drawing (Bug#8913).
12790
12791 * nsterm.h (nsfont_info): Remove voffset field.
12792
d8c2fa78 127932011-07-28 Alp Aker <alp.tekin.aker@gmail.com>
4843aac3
AA
12794
12795 Implement strike-through and overline on NextStep (Bug#8863).
12796
12797 * nsfont.m (nsfont_open): Use underline position provided by font,
12798 instead of hard-coded value of 2.
12799 (nsfont_draw): Call ns_draw_text_decoration instead.
12800
12801 * nsterm.h: Add declaration for ns_draw_text_decoration.
12802
12803 * nsterm.m (ns_draw_text_decoration): New function for drawing
12804 underline, overline, and strike-through.
12805 (ns_dumpglyphs_image, ns_dumpglyphs_stretch): Add call to
12806 ns_draw_text_decoration. Change treatment of cursor drawing to
8d5ed899 12807 accommodate underlining, etc.
4843aac3 12808
4cc60b9b
EZ
128092011-07-28 Eli Zaretskii <eliz@gnu.org>
12810
bc7ece87
EZ
12811 * buffer.c (init_buffer_once): Set bidi-display-reordering to t by
12812 default.
4cc60b9b 12813
476371c4
PE
128142011-07-28 Paul Eggert <eggert@cs.ucla.edu>
12815
66606eea
PE
12816 * alloc.c (memory_full) [!SYNC_INPUT]: Fix signal-related race.
12817 Without this fix, if a signal arrives just after memory fills up,
12818 'malloc' might be invoked reentrantly.
12819
476371c4
PE
12820 * image.c (x_check_image_size) [!HAVE_X_WINDOWS]: Return 1.
12821 In other words, assume that every image size is allowed, on non-X
12822 hosts. This assumption is probably wrong, but it lets Emacs compile.
12823
f3fcc40d
AS
128242011-07-28 Andreas Schwab <schwab@linux-m68k.org>
12825
12826 * regex.c (re_iswctype): Convert return values to boolean.
12827
350c992f
EZ
128282011-07-28 Eli Zaretskii <eliz@fencepost.gnu.org>
12829
12830 * xdisp.c (compute_display_string_pos): Don't use cached display
12831 string position if the buffer had its restriction changed.
12832 (Bug#9184)
12833
5266b4bb
PE
128342011-07-28 Paul Eggert <eggert@cs.ucla.edu>
12835
12836 * callproc.c (Fcall_process): Use 'volatile' to avoid vfork clobbering.
12837
2573a837 128382011-07-28 Paul Eggert <eggert@cs.ucla.edu>
ca4aa935 12839
41f55ccd 12840 Integer signedness and overflow and related fixes. (Bug#9079)
cf950e6b 12841
39e378da
PE
12842 * bidi.c: Integer size and overflow fixes.
12843 (bidi_cache_size, bidi_cache_idx, bidi_cache_last_idx)
12844 (bidi_cache_start, bidi_cache_fetch_state, bidi_cache_search)
12845 (bidi_cache_find_level_change, bidi_cache_ensure_space)
12846 (bidi_cache_iterator_state, bidi_cache_find, bidi_cache_start_stack)
12847 (bidi_find_other_level_edge):
12848 Use ptrdiff_t instead of EMACS_INT where either will do.
12849 This works better on 32-bit hosts configured --with-wide-int.
12850 (bidi_cache_ensure_space): Check for size-calculation overflow.
12851 Use % rather than repeated addition, for better worst-case speed.
12852 Don't set bidi_cache_size until after xrealloc returns, because it
12853 might not return.
12854 (bidi_dump_cached_states): Use ptrdiff_t, not int, to avoid overflow.
f0eb61e9
PE
12855 (bidi_cache_ensure_space): Also check that the bidi cache size
12856 does not exceed that of the largest Lisp string or buffer. See Eli
12857 Zaretskii in <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9079#29>.
39e378da 12858
5e927815
PE
12859 * alloc.c (__malloc_size_t): Remove.
12860 All uses replaced by size_t. See Andreas Schwab's note
12861 <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9079#8>.
12862
ca4aa935
PE
12863 * image.c: Improve checking for integer overflow.
12864 (check_image_size): Assume that f is nonnull, since
12865 it is always nonnull in practice. This is one less thing to
12866 worry about when checking for integer overflow later.
12867 (x_check_image_size): New function, which checks for integer
12868 overflow issues inside X.
12869 (x_create_x_image_and_pixmap, xbm_read_bitmap_data): Use it.
12870 This removes the need for a memory_full check.
12871 (xbm_image_p): Rewrite to avoid integer multiplication overflow.
12872 (Create_Pixmap_From_Bitmap_Data, xbm_load): Use x_check_image_size.
12873 (xbm_read_bitmap_data): Change locals back to 'int', since
12874 their values must fit in 'int'.
12875 (xpm_load_image, png_load, tiff_load):
12876 Invoke x_create_x_image_and_pixmap earlier,
12877 to avoid much needless work if the image is too large.
12878 (tiff_load): Treat overly large images as if
12879 x_create_x_image_and_pixmap failed, not as malloc failures.
12880 (gs_load): Use x_check_image_size.
12881
5f8f9cc2
PE
12882 * gtkutil.c: Omit integer casts.
12883 (xg_get_pixbuf_from_pixmap): Remove unnecessary cast.
12884 (xg_set_toolkit_scroll_bar_thumb): Rewrite to avoid need for cast.
12885
5adf60bc
PE
12886 * image.c (png_load): Don't assume height * row_bytes fits in 'int'.
12887
c8907a93
PE
12888 * xfaces.c (Fbitmap_spec_p): Fix integer overflow bug.
12889 Without this fix, (bitmap-spec-p '(34359738368 1 "x"))
12890 would wrongly return t on a 64-bit host.
12891
e3c25c68
PE
12892 * dispnew.c (init_display): Use *_RANGE_OVERFLOW macros.
12893 The plain *_OVERFLOW macros run afoul of GCC bug 49705
12894 <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49705>
12895 and therefore cause GCC to emit a bogus diagnostic in some cases.
12896
3f791afe
PE
12897 * image.c: Integer signedness and overflow and related fixes.
12898 This is not an exhaustive set of fixes, but it's time to
12899 record what I've got.
12900 (lookup_pixel_color, check_image_size): Remove redundant decls.
12901 (check_image_size): Don't assume that arbitrary EMACS_INT values
12902 fit in 'int', or that arbitrary 'double' values fit in 'int'.
12903 (x_alloc_image_color, x_create_x_image_and_pixmap, png_load)
12904 (tiff_load, imagemagick_load_image):
12905 Check for overflow in size calculations.
12906 (x_create_x_image_and_pixmap): Remove unnecessary test for
12907 xmalloc returning NULL; that can't happen.
12908 (xbm_read_bitmap_data): Don't assume sizes fit into 'int'.
12909 (xpm_color_bucket): Use better integer hashing function.
12910 (xpm_cache_color): Don't possibly over-allocate memory.
12911 (struct png_memory_storage, tiff_memory_source, tiff_seek_in_memory)
12912 (gif_memory_source):
12913 Use ptrdiff_t, not int or size_t, to record sizes.
12914 (png_load): Don't assume values greater than 2**31 fit in 'int'.
12915 (our_stdio_fill_input_buffer): Prefer ptrdiff_t to size_t when
12916 either works, as we prefer signed integers.
12917 (tiff_read_from_memory, tiff_write_from_memory):
12918 Return tsize_t, not size_t, since that's what the TIFF API wants.
12919 (tiff_read_from_memory): Don't fail simply because the read would
12920 go past EOF; instead, return a short read.
12921 (tiff_load): Omit no-longer-needed casts.
12922 (Fimagemagick_types): Don't assume size fits into 'int'.
12923
3cc5a532
PE
12924 Improve hashing quality when configured --with-wide-int.
12925 * fns.c (hash_string): New function, taken from sxhash_string.
12926 Do not discard information about ASCII character case; this
12927 discarding is no longer needed.
12928 (sxhash-string): Use it. Change sig to match it. Caller changed.
12929 * lisp.h: Declare it.
12930 * lread.c (hash_string): Remove, since we now use fns.c's version.
12931 The fns.c version returns a wider integer if --with-wide-int is
12932 specified, so this should help the quality of the hashing a bit.
12933
b312a492
PE
12934 * emacs.c: Integer overflow minor fix.
12935 (heap_bss_diff): Now uprintmax_t, not unsigned long. All used changed.
12936 Define only if GNU_LINUX.
12937 (main, Fdump_emacs): Set and use heap_bss_diff only if GNU_LINUX.
12938
dfd153ae
PE
12939 * dispnew.c: Integer signedness and overflow fixes.
12940 Remove unnecessary forward decls, that were a maintenance hassle.
12941 (history_tick): Now uprintmax_t, so it's more likely to avoid overflow.
12942 All uses changed.
12943 (adjust_glyph_matrix, realloc_glyph_pool, adjust_frame_message_buffer)
12944 (scrolling_window): Use ptrdiff_t, not int, for byte count.
12945 (prepare_desired_row, line_draw_cost):
12946 Use int, not unsigned, where either works.
12947 (save_current_matrix, restore_current_matrix):
12948 Use ptrdiff_t, not size_t, where either works.
12949 (init_display): Check for overflow more accurately, and without
12950 relying on undefined behavior.
12951
a81d11a3
PE
12952 * editfns.c (pWIDE, pWIDElen, signed_wide, unsigned_wide):
12953 Remove, replacing with the new symbols in lisp.h. All uses changed.
12954 * fileio.c (make_temp_name):
12955 * filelock.c (lock_file_1, lock_file):
12956 * xdisp.c (message_dolog):
12957 Don't assume PRIdMAX etc. works; this isn't portable to pre-C99 hosts.
12958 Use pMd etc. instead.
12959 * lisp.h (printmax_t, uprintmax_t, pMd, pMu): New types and macros,
12960 replacing the pWIDE etc. symbols removed from editfns.c.
12961
3300e6fd
PE
12962 * keyboard.h (num_input_events): Now uintmax_t.
12963 This is (very slightly) less likely to mess up due to wraparound.
12964 All uses changed.
12965
fd05c7e9
PE
12966 * buffer.c: Integer signedness fixes.
12967 (alloc_buffer_text, enlarge_buffer_text):
12968 Use ptrdiff_t rather than size_t when either will do, as we prefer
12969 signed integers.
12970
903fe15d
PE
12971 * alloc.c: Integer signedness and overflow fixes.
12972 Do not impose an arbitrary 32-bit limit on malloc sizes when debugging.
12973 (__malloc_size_t): Default to size_t, not to int.
12974 (pure_size, pure_bytes_used_before_overflow, stack_copy_size)
12975 (Fgarbage_collect, mark_object_loop_halt, mark_object):
12976 Prefer ptrdiff_t to size_t when either would do, as we prefer
12977 signed integers.
12978 (XMALLOC_OVERRUN_CHECK_OVERHEAD): New macro.
12979 (xmalloc_overrun_check_header, xmalloc_overrun_check_trailer):
12980 Now const. Initialize with values that are in range even if char
12981 is signed.
12982 (XMALLOC_PUT_SIZE, XMALLOC_GET_SIZE): Remove, replacing with ...
12983 (xmalloc_put_size, xmalloc_get_size): New functions. All uses changed.
12984 These functions do the right thing with sizes > 2**32.
12985 (check_depth): Now ptrdiff_t, not int.
12986 (overrun_check_malloc, overrun_check_realloc, overrun_check_free):
12987 Adjust to new way of storing sizes. Check for size overflow bugs
12988 in rest of code.
12989 (STRING_BYTES_MAX): Adjust to new overheads. The old code was
12990 slightly wrong anyway, as it missed one instance of
12991 XMALLOC_OVERRUN_CHECK_OVERHEAD.
12992 (refill_memory_reserve): Omit needless cast to size_t.
12993 (mark_object_loop_halt): Mark as externally visible.
12994
ac82cc6a
PE
12995 * xselect.c: Integer signedness and overflow fixes.
12996 (Fx_register_dnd_atom, x_handle_dnd_message):
12997 Use ptrdiff_t, not size_t, since we prefer signed.
12998 (Fx_register_dnd_atom): Check for ptrdiff_t (and size_t) overflow.
12999 * xterm.h (struct x_display_info): Use ptrdiff_t, not size_t, for
13000 x_dnd_atoms_size and x_dnd_atoms_length.
13001
c2d1e36d
PE
13002 * doprnt.c: Prefer signed to unsigned when either works.
13003 * eval.c (verror):
13004 * doprnt.c (doprnt):
13005 * lisp.h (doprnt):
13006 * xdisp.c (vmessage):
13007 Use ptrdiff_t, not size_t, when using or implementing doprnt,
13008 since the sizes cannot exceed ptrdiff_t bounds anyway, and we
13009 prefer signed arithmetic to avoid comparison confusion.
13010 * doprnt.c (doprnt): Avoid a "+ 1" that can't overflow,
13011 but is a bit tricky.
13012
0e926e56
PE
13013 Assume freestanding C89 headers, string.h, stdlib.h.
13014 * data.c, doprnt.c, floatfns.c, print.c:
13015 Include float.h unconditionally.
13016 * gmalloc.c: Assume C89-at-least behavior for preprocessor,
13017 limits.h, stddef.h, string.h. Use memset instead of 'flood'.
13018 * regex.c: Likewise for stddef.h, string.h.
13019 (ISASCII): Remove; can assume it returns 1 now. All uses removed.
13020 * s/aix4-2.h (HAVE_STRING_H): Remove obsolete undef.
13021 * s/ms-w32.h (HAVE_LIMITS_H, HAVE_STRING_H, HAVE_STDLIB_H)
13022 (STDC_HEADERS): Remove obsolete defines.
13023 * sysdep.c: Include limits.h unconditionally.
13024
9cfdb3ec
PE
13025 Assume support for memcmp, memcpy, memmove, memset.
13026 * lisp.h, sysdep.c (memcmp, memcpy, memmove, memset):
13027 * regex.c (memcmp, memcpy):
13028 Remove; we assume C89 now.
13029
13030 * gmalloc.c (memcpy, memset, memmove): Remove; we assume C89 now.
13031 (__malloc_safe_bcopy): Remove; no longer needed.
13032
cf950e6b 13033 * lisp.h (struct vectorlike_header, struct Lisp_Subr): Signed sizes.
6089c567
PE
13034 Use EMACS_INT, not EMACS_UINT, for sizes. The code works equally
13035 well either way, and we prefer signed to unsigned.
13036
dbf38e02
LMI
130372011-07-27 Lars Magne Ingebrigtsen <larsi@gnus.org>
13038
13039 * gnutls.c (emacs_gnutls_read): Don't message anything if the peer
13040 closes the connection while we're reading (bug#9182).
13041
d6f0886c 130422011-07-25 Jan Djärv <jan.h.d@swipnet.se>
24e0f6b1 13043
d6f0886c
JD
13044 * nsmenu.m (ns_popup_dialog): Add an "ok" button if no buttons
13045 are specified (Bug#9168).
24e0f6b1 13046
2eb1f9e6
PE
130472011-07-25 Paul Eggert <eggert@cs.ucla.edu>
13048
13049 * bidi.c (bidi_dump_cached_states): Fix printf format mismatch.
13050 Found by GCC static checking and --with-wide-int on a 32-bit host.
13051
22381272 130522011-07-25 Eli Zaretskii <eliz@gnu.org>
7daee910
EZ
13053
13054 * xdisp.c (compute_display_string_pos): Fix logic of caching
13055 previous display string position. Initialize cached_prev_pos to
13056 -1. Fixes slow-down at the beginning of a buffer.
13057
f25e39b4
EZ
130582011-07-24 Eli Zaretskii <eliz@gnu.org>
13059
13060 * xfaces.c (check_lface_attrs) [HAVE_WINDOW_SYSTEM]: Allow `nil'
13061 for attrs[LFACE_FONTSET_INDEX].
13062
04c4b52e
PE
130632011-07-23 Paul Eggert <eggert@cs.ucla.edu>
13064
13065 * xml.c (parse_region): Remove unused local
13066 that was recently introduced.
13067
c1734fbd
EZ
130682011-07-23 Eli Zaretskii <eliz@gnu.org>
13069
be18c5a5
EZ
13070 * xfns.c (unwind_create_frame) [GLYPH_DEBUG]: Adapt to changes in
13071 2008-02-22T17:42:09Z!monnier@iro.umontreal.ca.
13072
c1734fbd
EZ
13073 * xdisp.c (move_it_in_display_line_to): Record the best matching
13074 position for TO_CHARPOS while scanning the line, and restore it on
640c8776
SM
13075 exit if none of the characters scanned was an exact match.
13076 Fixes vertical-motion and pos-visible-in-window-p under bidi redisplay
a9269c18
EZ
13077 when exact match is impossible due to invisible text, and the
13078 lines are truncated.
13079
a258d627
JD
130802011-07-23 Jan Djärv <jan.h.d@swipnet.se>
13081
13082 * nsterm.m (initFrameFromEmacs): Set NSTitledWindowMask in styleMask
13083 for OSX >= 10.7.
13084
b6d5a689
EZ
130852011-07-22 Eli Zaretskii <eliz@gnu.org>
13086
0f74f785
EZ
13087 Fix a significant slow-down of cursor motion with C-n, C-p,
13088 C-f/C-b, and C-v/M-v that couldn't keep up with keyboard
13089 auto-repeat under bidi redisplay in fontified buffers.
b6d5a689 13090 * xdisp.c (compute_stop_pos_backwards): New function.
b6d5a689
EZ
13091 (next_element_from_buffer): Call compute_stop_pos_backwards to
13092 find a suitable prev_stop when we find ourselves before
0f74f785
EZ
13093 base_level_stop.
13094 (reseat): Don't look for prev_stop, as that could mean a very long
13095 run.
13096 <cached_disp_pos, cached_disp_buffer, cached_disp_modiff>
13097 <cached_disp_overlay_modiff>: Cache for last found display string
13098 position.
551918c1 13099 (compute_display_string_pos): Return the cached position if asked
0f74f785
EZ
13100 about the same buffer in the same area of character positions, and
13101 the buffer wasn't changed since the time the display string
13102 position was cached.
551918c1 13103
b2d0c91a
EZ
131042011-07-22 Eli Zaretskii <eliz@gnu.org>
13105
13106 * xdisp.c (rows_from_pos_range): Don't ignore glyphs whose object
13107 is an integer, which is important for empty lines. (Bug#9149)
13108
043604ee
CY
131092011-07-22 Chong Yidong <cyd@stupidchicken.com>
13110
13111 * frame.c (Fmodify_frame_parameters): In tty case, update the
13112 default face if necessary (Bug#4238).
13113
da4adb04
CY
131142011-07-21 Chong Yidong <cyd@stupidchicken.com>
13115
13116 * editfns.c (Fstring_to_char): No need to explain what a character
13117 is in the docstring (Bug#6576).
13118
9abd0532
LMI
131192011-07-20 Lars Magne Ingebrigtsen <larsi@gnus.org>
13120
13121 * xml.c (parse_region): Make sure we always return a tree.
13122
36881d16
HK
131232011-07-20 HAMANO Kiyoto <khiker.mail@gmail.com>
13124
13125 * xml.c (parse_region): If a document contains only comments,
13126 return that, too.
13127
1e98674d
LMI
131282011-07-20 Lars Magne Ingebrigtsen <larsi@gnus.org>
13129
13130 * xml.c (make_dom): Return comments, too.
13131
590bd467
PE
131322011-07-19 Paul Eggert <eggert@cs.ucla.edu>
13133
13134 Port to OpenBSD.
13135 See http://lists.gnu.org/archive/html/emacs-devel/2011-07/msg00688.html
13136 and the surrounding thread.
13137 * minibuf.c (read_minibuf_noninteractive): Rewrite to use getchar
13138 rather than fgets, and retry after EINTR. Otherwise, 'emacs
13139 --batch -f byte-compile-file' fails on OpenBSD if an inactivity
13140 timer goes off.
13141 * s/openbsd.h (BROKEN_SIGIO): Define.
13142 * unexelf.c (unexec) [__OpenBSD__]:
13143 Don't update the .mdebug section of the Alpha COFF symbol table.
13144
f41628b2
LMI
131452011-07-19 Lars Magne Ingebrigtsen <larsi@gnus.org>
13146
13147 * lread.c (syms_of_lread): Clarify when `lexical-binding' is used
13148 (bug#8460).
13149
b59b67c5
PE
131502011-07-18 Paul Eggert <eggert@cs.ucla.edu>
13151
15e3a074
PE
13152 * fileio.c (Fcopy_file) [!MSDOS]: Tighten created file's mask.
13153 This fixes some race conditions on the permissions of any newly
13154 created file.
13155
41bed37d
PE
13156 * alloc.c (valid_pointer_p): Use pipe, not open.
13157 This fixes some permissions issues when debugging.
13158
b59b67c5
PE
13159 * fileio.c (Fcopy_file): Adjust mode if fchown fails. (Bug#9002)
13160 If fchown fails to set both uid and gid, try to set just gid,
13161 as that is sometimes allowed. Adjust the file's mode to eliminate
13162 setuid or setgid bits that are inappropriate if fchown fails.
13163
925a6be7
SM
131642011-07-18 Stefan Monnier <monnier@iro.umontreal.ca>
13165
13166 * xdisp.c (next_element_from_string, next_element_from_buffer): Use EQ
13167 to compare Lisp_Objects.
13168 * gnutls.c (syms_of_gnutls): Rename Vgnutls_log_level to
13169 global_gnutls_log_level, don't mistake it for a Lisp_Object.
13170 (init_gnutls_functions, emacs_gnutls_handle_error): Fix up uses.
13171
52968808
AS
131722011-07-17 Andreas Schwab <schwab@linux-m68k.org>
13173
0a6a104b
AS
13174 * lread.c (read_integer): Unread even EOF character.
13175 (read1): Likewise. Properly record start position of symbol.
13176
52968808
AS
13177 * lread.c (read1): Read `#:' as empty uninterned symbol if no
13178 symbol character follows.
13179
9e381cdd
PE
131802011-07-17 Paul Eggert <eggert@cs.ucla.edu>
13181
13182 * fileio.c (Fcopy_file): Pacify gcc re fchown. (Bug#9002)
13183 This works around a problem with the previous change to Fcopy_file.
13184 Recent glibc declares fchown with __attribute__((warn_unused_result)),
13185 and without this change, GCC might complain about discarding
13186 fchown's return value.
13187
b5641435
JB
131882011-07-16 Juanma Barranquero <lekktu@gmail.com>
13189
13190 * makefile.w32-in (GLOBAL_SOURCES): Add gnutls.c (followup to bug#9059).
13191
a8031457
PE
131922011-07-16 Paul Eggert <eggert@cs.ucla.edu>
13193
13194 * fileio.c (Fcopy_file): Don't diagnose fchown failures. (Bug#9002)
13195
dd889327
LMI
131962011-07-16 Lars Magne Ingebrigtsen <larsi@gnus.org>
13197
750c33f7
LMI
13198 * gnutls.c (syms_of_gnutls): Define `gnutls-log-level' here, since
13199 it's used from the C level.
13200
dd889327
LMI
13201 * process.c: Use the same condition for POLL_FOR_INPUT in both
13202 keyboard.c and process.c (bug#1858).
13203
87e86684
LM
132042011-07-09 Lawrence Mitchell <wence@gmx.li>
13205
13206 * gnutls.c (Qgnutls_bootprop_min_prime_bits): New variable.
13207 (Fgnutls_boot): Use it.
13208
64348f40
AS
132092011-07-15 Andreas Schwab <schwab@linux-m68k.org>
13210
13211 * doc.c (Fsubstitute_command_keys): Revert last change.
13212
1d698799
LMI
132132011-07-15 Lars Magne Ingebrigtsen <larsi@gnus.org>
13214
f863868c
LMI
13215 * doc.c (Fsubstitute_command_keys): Clarify that \= really only
13216 quotes the next character, and doesn't affect other longer
13217 sequences (bug#8935).
13218
1d698799
LMI
13219 * lread.c (syms_of_lread): Clarify that is isn't only
13220 `eval-buffer' and `eval-defun' that's affected by
13221 `lexical-binding' (bug#8460).
13222
aa4b6df6
EZ
132232011-07-15 Eli Zaretskii <eliz@gnu.org>
13224
13225 * xdisp.c (move_it_in_display_line_to): Fix vertical motion with
6b02f655 13226 bidi redisplay when a line includes both an image and is truncated.
aa4b6df6 13227
5d856da6
PE
132282011-07-14 Paul Eggert <eggert@cs.ucla.edu>
13229
ad6042bb
PE
13230 Fix minor problems found by static checking.
13231 * bidi.c (bidi_cache_size): Now EMACS_INT, not size_t.
13232 (elsz): Now a signed constant, not a size_t var. We prefer signed
13233 types to unsigned, to avoid integer comparison confusion. Without
13234 this change, GCC 4.6.1 with -Wunsafe-loop-optimizations complains
13235 "cannot optimize loop, the loop counter may overflow", a symptom
13236 of the confusion.
f00bbb22 13237 * indent.c (Fvertical_motion): Mark locals as initialized.
5d856da6
PE
13238 * xdisp.c (reseat_to_string): Fix pointer signedness issue.
13239
6468f31c
LMI
132402011-07-14 Lars Magne Ingebrigtsen <larsi@gnus.org>
13241
49080b10
LMI
13242 * search.c (Fre_search_backward): Mention `case-fold-search' in
13243 all the re_search_* functions (bug#8138).
13244
6468f31c
LMI
13245 * keyboard.c (Fopen_dribble_file): Document when the file is
13246 closed (bug#8056).
13247
c965adc5
EZ
132482011-07-14 Eli Zaretskii <eliz@gnu.org>
13249
df9733bf
EZ
13250 * bidi.c (bidi_dump_cached_states): Fix format of displaying
13251 bidi_cache_idx.
13252
0bb23927
EZ
13253 Support bidi reordering of display and overlay strings.
13254 * xdisp.c (compute_display_string_pos)
13255 (compute_display_string_end): Accept additional argument STRING.
13256 (init_iterator, reseat_1): Initialize bidi_it->string.s to NULL.
13257 (reseat_to_string): Initialize bidi_it->string.s and
13258 bidi_it->string.schars.
13259 (Fcurrent_bidi_paragraph_direction): Initialize itb.string.s to
640c8776
SM
13260 NULL (avoids a crash in bidi_paragraph_init).
13261 Initialize itb.string.lstring.
0bb23927
EZ
13262 (init_iterator): Call bidi_init_it only of a valid
13263 buffer position was specified. Initialize paragraph_embedding to
13264 L2R.
13265 (reseat_to_string): Initialize the bidi iterator.
13266 (display_string): If we need to ignore text properties of
13267 LISP_STRING, set IT->stop_charpos to IT->end_charpos. (The
13268 original value of -1 will not work with bidi.)
13269 (compute_display_string_pos): First arg is now struct
13270 `text_pos *'; all callers changed. Support display properties on
13271 Lisp strings.
13272 (compute_display_string_end): Support display properties on Lisp
13273 strings.
13274 (init_iterator, reseat_1, reseat_to_string): Initialize the
13275 string.bufpos member to 0 (zero, for compatibility with IT_CHARPOS
13276 when iterating on a string not from display properties).
640c8776
SM
13277 (compute_display_string_pos, compute_display_string_end):
13278 Fix calculation of the object to scan. Fixes an error when using
0bb23927
EZ
13279 arrow keys.
13280 (next_element_from_buffer): Don't abort when IT_CHARPOS is before
640c8776
SM
13281 base_level_stop; instead, set base_level_stop to BEGV.
13282 Fixes crashes in vertical-motion.
0bb23927
EZ
13283 (next_element_from_buffer): Improve commentary for when
13284 the iterator is before prev_stop.
13285 (init_iterator): Initialize bidi_p from the default value of
13286 bidi-display-reordering, not from buffer-local value. Use the
13287 buffer-local value only if initializing for buffer iteration.
13288 (handle_invisible_prop): Support invisible properties on strings
13289 that are being bidi-reordered.
13290 (set_iterator_to_next): Support bidi reordering of C strings and
13291 Lisp strings.
13292 (next_element_from_string): Support bidi reordering of Lisp
13293 strings.
13294 (handle_stop_backwards): Support Lisp strings as well.
640c8776
SM
13295 (display_string): Support display of R2L glyph rows.
13296 Use IT_STRING_CHARPOS when displaying from a Lisp string.
0bb23927
EZ
13297 (init_iterator): Don't initialize it->bidi_p for strings
13298 here.
13299 (reseat_to_string): Initialize it->bidi_p for strings here.
13300 (next_element_from_string, next_element_from_c_string)
13301 (next_element_from_buffer): Add xassert's for correspondence
13302 between IT's object being iterated and it->bidi_it.string
13303 structure.
13304 (face_before_or_after_it_pos): Support bidi iteration.
13305 (next_element_from_c_string): Handle the case of the first string
13306 character that is not the first one in the visual order.
13307 (get_visually_first_element): New function, refactored from common
13308 parts of next_element_from_buffer, next_element_from_string, and
13309 next_element_from_c_string.
13310 (tool_bar_lines_needed, redisplay_tool_bar)
13311 (display_menu_bar): Force left-to-right direction. Add a FIXME
13312 comment for making that be controlled by a user option.
13313 (push_it, pop_it): Save and restore the state of the
13314 bidi iterator. Save and restore the bidi_p flag.
13315 (pop_it): Iterate out of display property for string iteration as
13316 well.
13317 (iterate_out_of_display_property): Support iteration over strings.
13318 (handle_single_display_spec): Set up it->bidi_it for iteration
13319 over a display string, and call bidi_init_it.
13320 (handle_single_display_spec, next_overlay_string)
13321 (get_overlay_strings_1, push_display_prop): Set up the bidi
13322 iterator for displaying display or overlay strings.
13323 (forward_to_next_line_start): Don't use the shortcut if
13324 bidi-iterating.
13325 (back_to_previous_visible_line_start): If handle_display_prop
13326 pushed the iterator stack, restore the internal state of the bidi
13327 iterator by calling bidi_pop_it same number of times.
13328 (reseat_at_next_visible_line_start): If ON_NEWLINE_P is non-zero,
13329 and we are bidi-iterating, don't decrement the iterator position;
13330 instead, set the first_elt flag in the bidi iterator, to produce
13331 the same effect.
13332 (reseat_1): Remove redundant setting of string_from_display_prop_p.
13333 (push_display_prop): xassert that we are iterating a buffer.
13334 (push_it, pop_it): Save and restore paragraph_embedding member.
13335 (handle_single_display_spec, next_overlay_string)
13336 (get_overlay_strings_1, reseat_1, reseat_to_string)
13337 (push_display_prop): Set up the `unibyte' member of bidi_it.string
13338 correctly. Don't assume unibyte strings are not bidi-reordered.
13339 (compute_display_string_pos)
13340 (compute_display_string_end): Fix handling the case of C string.
13341 (push_it, pop_it): Save and restore from_disp_prop_p.
13342 (handle_single_display_spec, push_display_prop): Set the
13343 from_disp_prop_p flag.
13344 (get_overlay_strings_1): Reset the from_disp_prop_p flag.
13345 (pop_it): Call iterate_out_of_display_property only if we are
13346 popping after iteration over a string that came from a display
13347 property. Fix a typo in popping stretch info. Add an assertion
13348 for verifying that the iterator position is in sync with the bidi
13349 iterator.
13350 (handle_single_display_spec, get_overlay_strings_1)
13351 (push_display_prop): Fix initialization of paragraph direction for
13352 string when that of the parent object is not yet determined.
13353 (reseat_1): Call bidi_init_it to resync the bidi
13354 iterator with IT's position. (Bug#7616)
13355 (find_row_edges): If ROW->start.pos gives position
13356 smaller than min_pos, use it as ROW->minpos. (Bug#7616)
13357 (handle_stop, back_to_previous_visible_line_start, reseat_1):
13358 Reset the from_disp_prop_p flag.
13359 (SAVE_IT, RESTORE_IT): New macros.
13360 (pos_visible_p, face_before_or_after_it_pos)
13361 (back_to_previous_visible_line_start)
13362 (move_it_in_display_line_to, move_it_in_display_line)
13363 (move_it_to, move_it_vertically_backward, move_it_by_lines)
13364 (try_scrolling, redisplay_window, display_line): Use them when
13365 saving a temporary copy of the iterator and restoring it back.
13366 (back_to_previous_visible_line_start, reseat_1)
13367 (init_iterator): Empty the bidi cache "stack".
13368 (move_it_in_display_line_to): If iterator ended up at
13369 EOL, but we never saw any buffer positions smaller than
13370 to_charpos, return MOVE_POS_MATCH_OR_ZV. Fixes vertical cursor
13371 motion in bidi-reordered lines.
13372 (move_it_in_display_line_to): Record prev_method and prev_pos
13373 immediately before the call to set_iterator_to_next. Fixes cursor
13374 motion in bidi-reordered lines with stretch glyphs and strings
13375 displayed in margins. (Bug#8133) (Bug#8867)
13376 Return MOVE_POS_MATCH_OR_ZV only if iterator position is past
13377 TO_CHARPOS.
640c8776
SM
13378 (pos_visible_p): Support positions in bidi-reordered lines.
13379 Save and restore bidi cache.
0bb23927
EZ
13380
13381 * bidi.c (bidi_level_of_next_char): clen should be EMACS_NT, not int.
13382 (bidi_paragraph_info): Delete unused struct.
13383 (bidi_cache_idx, bidi_cache_last_idx): Declare EMACS_INT.
13384 (bidi_cache_start): New variable.
13385 (bidi_cache_reset): Reset bidi_cache_idx to bidi_cache_start, not
13386 to zero.
13387 (bidi_cache_fetch_state, bidi_cache_search)
13388 (bidi_cache_find_level_change, bidi_cache_iterator_state)
13389 (bidi_cache_find, bidi_peek_at_next_level)
13390 (bidi_level_of_next_char, bidi_find_other_level_edge)
13391 (bidi_move_to_visually_next): Compare cache index with
13392 bidi_cache_start rather than with zero.
13393 (bidi_fetch_char): Accept new argument STRING; all callers
13394 changed. Support iteration over a string. Support strings with
13395 display properties. Support unibyte strings. Fix the type of
13396 `len' according to what STRING_CHAR_AND_LENGTH expects.
13397 (bidi_paragraph_init, bidi_resolve_explicit_1)
13398 (bidi_resolve_explicit, bidi_resolve_weak)
640c8776
SM
13399 (bidi_level_of_next_char, bidi_move_to_visually_next):
13400 Support iteration over a string.
0bb23927
EZ
13401 (bidi_set_sor_type, bidi_resolve_explicit_1)
13402 (bidi_resolve_explicit, bidi_type_of_next_char): ignore_bn_limit
13403 can now be zero (for strings); special values 0 and -1 were
13404 changed to -1 and -2, respectively.
13405 (bidi_char_at_pos): New function.
13406 (bidi_paragraph_init, bidi_resolve_explicit, bidi_resolve_weak):
13407 Call it instead of FETCH_MULTIBYTE_CHAR.
13408 (bidi_move_to_visually_next): Abort if charpos or bytepos were not
13409 initialized to valid values.
13410 (bidi_init_it): Don't initialize charpos and bytepos with invalid
13411 values.
13412 (bidi_level_of_next_char): Allow the sentinel "position" to pass
13413 the test for valid cached positions. Fix the logic for looking up
13414 the sentinel state in the cache. GCPRO the Lisp string we are
13415 iterating.
13416 (bidi_push_it, bidi_pop_it): New functions.
13417 (bidi_initialize): Initialize the bidi cache start stack pointer.
13418 (bidi_cache_ensure_space): New function, refactored from part of
13419 bidi_cache_iterator_state. Don't assume the required size is just
13420 one BIDI_CACHE_CHUNK away.
13421 (bidi_cache_start_stack, bidi_push_it): Use IT_STACK_SIZE.
13422 (bidi_count_bytes, bidi_char_at_pos): New functions.
13423 (bidi_cache_search): Don't assume bidi_cache_last_idx is
13424 always valid if bidi_cache_idx is valid.
13425 (bidi_cache_find_level_change): xassert that bidi_cache_last_idx
13426 is valid if it's going to be used.
13427 (bidi_shelve_cache, bidi_unshelve_cache): New functions.
13428 (bidi_cache_fetch_state, bidi_cache_search)
c965adc5
EZ
13429 (bidi_cache_find_level_change, bidi_cache_ensure_space)
13430 (bidi_cache_iterator_state, bidi_cache_find)
640c8776
SM
13431 (bidi_find_other_level_edge, bidi_cache_start_stack):
13432 All variables related to cache indices are now EMACS_INT.
c965adc5 13433
0bb23927
EZ
13434 * dispextern.h (struct bidi_string_data): New structure.
13435 (struct bidi_it): New member `string'. Make flag members be 1-bit
13436 fields, and put them last in the struct.
640c8776
SM
13437 (compute_display_string_pos, compute_display_string_end):
13438 Update prototypes.
0bb23927
EZ
13439 (bidi_push_it, bidi_pop_it): Add prototypes.
13440 (struct iterator_stack_entry): New members bidi_p,
13441 paragraph_embedding, and from_disp_prop_p.
13442 (struct it): Member bidi_p is now a bit field 1 bit wide.
640c8776
SM
13443 (bidi_shelve_cache, bidi_unshelve_cache):
13444 Declare prototypes.
0bb23927
EZ
13445
13446 * .gdbinit (xvectype, xvector, xcompiled, xchartable, xboolvector)
13447 (xpr, xfont, xbacktrace): Use "header.size" when accessing vectors
13448 and vector-like objects.
13449
13450 * dispnew.c (buffer_posn_from_coords): Save and restore the bidi
13451 cache around display iteration.
13452
13453 * window.c (Fwindow_end, window_scroll_pixel_based)
13454 (displayed_window_lines, Frecenter): Save and restore the bidi
13455 cache around display iteration.
13456
3bbd2265
LMI
134572011-07-14 Lars Magne Ingebrigtsen <larsi@gnus.org>
13458
13459 * editfns.c (Fdelete_region): Clarify the use of the named
13460 parameters (bug#6788).
13461
adc47434
MR
134622011-07-14 Martin Rudalics <rudalics@gmx.at>
13463
13464 * indent.c (Fvertical_motion): Set and restore w->pointm when
13465 saving and restoring the window's buffer (Bug#9006).
13466
837c31f8
LMI
134672011-07-13 Lars Magne Ingebrigtsen <larsi@gnus.org>
13468
13469 * editfns.c (Fstring_to_char): Clarify just what is returned
13470 (bug#6576). Text by Eli Zaretskii.
13471
ac389d0c
JB
134722011-07-13 Juanma Barranquero <lekktu@gmail.com>
13473
13474 * gnutls.c (init_gnutls_functions): Honor gnutls_log_level (bug#9059).
13475
0be0ce47
EZ
134762011-07-13 Eli Zaretskii <eliz@gnu.org>
13477
13478 * buffer.c (mmap_find): Fix a typo.
13479
cd18e7e3
JB
134802011-07-13 Johan Bockgård <bojohan@gnu.org>
13481
13482 Fix execution of x selection hooks.
13483 * xselect.c (Qx_lost_selection_functions)
13484 (Qx_sent_selection_functions): New vars.
13485 (syms_of_xselect): DEFSYM them.
13486 (x_handle_selection_request): Pass Qx_sent_selection_functions
13487 rather than Vx_sent_selection_functions to Frun_hook_with_args.
13488 (x_handle_selection_clear,x_clear_frame_selections):
13489 Pass Qx_lost_selection_functions rather than
13490 Vx_lost_selection_functions to Frun_hook_with_args.
13491
47ea7f44
PE
134922011-07-13 Paul Eggert <eggert@cs.ucla.edu>
13493
ac389d0c 13494 * buffer.c (Fget_buffer_create): Initialize inhibit_shrinking.
2941c447
PE
13495 The old code sometimes used this field without initializing it.
13496
47ea7f44
PE
13497 * alloc.c (gc_sweep): Don't read past end of array.
13498 In theory, the old code could also have corrupted Emacs internals,
13499 though it'd be very unlikely.
13500
bc985c87
AS
135012011-07-12 Andreas Schwab <schwab@linux-m68k.org>
13502
13503 * character.c (Fcharacterp): Don't advertise optional ignored
ac389d0c 13504 argument. (Bug#4026)
bc985c87 13505
0cf34688
LMI
135062011-07-12 Lars Magne Ingebrigtsen <larsi@gnus.org>
13507
b3dadd76
LMI
13508 * keymap.c (syms_of_keymap): Clarify that "modifier" is "modifier
13509 key" (bug#4257).
13510
0cf34688
LMI
13511 * window.c (Fset_window_start): Doc fix (bug#4199).
13512 (Fset_window_hscroll): Ditto.
13513
270768cd
PE
135142011-07-12 Paul Eggert <eggert@cs.ucla.edu>
13515
077e3dda 13516 Fix minor new problems caught by GCC 4.6.1.
270768cd 13517 * term.c (init_tty): Remove unused local.
490011a6 13518 * xsettings.c (store_monospaced_changed): Define this function only
077e3dda 13519 if (defined HAVE_GSETTINGS || defined HAVE_GCONF), as it's
490011a6 13520 not used otherwise.
270768cd 13521
b1f58454
CY
135222011-07-12 Chong Yidong <cyd@stupidchicken.com>
13523
13524 * xdisp.c (Vresize_mini_windows): Minor doc fix (Bug#3300).
13525
22b9578d
LMI
135262011-07-11 Lars Magne Ingebrigtsen <larsi@gnus.org>
13527
6e70ab07
LMI
13528 * xdisp.c (syms_of_xdisp): Make it explicit that the mini-windows
13529 are the mini-buffer and the echo area (bug#3320).
13530
22b9578d
LMI
13531 * term.c (init_tty): Remove support for supdup, c10 and perq
13532 terminals, which are no longer supported (bug#1482).
13533
8974cc9f
JB
135342011-07-10 Johan Bockgård <bojohan@gnu.org>
13535
13536 * xdisp.c (Ftool_bar_lines_needed): Fix WINDOWP check.
13537
a560d974
JD
135382011-07-10 Jan Djärv <jan.h.d@swipnet.se>
13539
13540 * xmenu.c (menu_highlight_callback): Only pass frame to show_help_event
13541 for non-popups (Bug#3642).
13542
1dae0f0a
AS
135432011-07-10 Andreas Schwab <schwab@linux-m68k.org>
13544
268c2c36 13545 * alloc.c (reset_malloc_hooks): Protoize.
1dae0f0a 13546 * buffer.c (mmap_init, mmap_find, mmap_free_1, mmap_enlarge)
268c2c36
AS
13547 (mmap_set_vars, mmap_alloc, mmap_free, mmap_realloc): Likewise.
13548 * cm.c (losecursor): Likewise.
1dae0f0a
AS
13549 * data.c (fmod): Likewise.
13550 * dispnew.c (swap_glyphs_in_rows): Likewise.
13551 * emacs.c (memory_warning_signal): Likewise.
13552 * floatfns.c (float_error): Likewise.
13553 * font.c (check_gstring, check_otf_features, otf_tag_symbol)
13554 (otf_open, font_otf_capability, generate_otf_features)
13555 (font_otf_DeviceTable, font_otf_ValueRecord, font_otf_Anchor):
13556 Likewise.
13557 * image.c (pbm_read_file): Likewise.
13558 * indent.c (string_display_width): Likewise.
13559 * intervals.c (check_for_interval, search_for_interval)
13560 (inc_interval_count, count_intervals, root_interval)
13561 (adjust_intervals_for_insertion, make_new_interval): Likewise.
13562 * lread.c (defalias): Likewise.
268c2c36 13563 * ralloc.c (r_alloc_check): Likewise.
1dae0f0a
AS
13564 * regex.c (set_image_of_range_1, set_image_of_range)
13565 (regex_grow_registers): Likewise.
13566 * sysdep.c (strerror): Likewise.
13567 * termcap.c (valid_filename_p, tprint, main): Likewise.
13568 * tparam.c (main): Likewise.
13569 * unexhp9k800.c (run_time_remap, save_data_space)
13570 (update_file_ptrs, read_header, write_header, calculate_checksum)
13571 (copy_file, copy_rest, display_header): Likewise.
13572 * widget.c (mark_shell_size_user_specified, create_frame_gcs):
13573 Likewise.
13574 * xdisp.c (check_it): Likewise.
13575 * xfaces.c (register_color, unregister_color, unregister_colors):
13576 Likewise.
13577 * xfns.c (print_fontset_result): Likewise.
13578 * xrdb.c (member, fatal, main): Likewise.
13579
99033785
PE
135802011-07-10 Paul Eggert <eggert@cs.ucla.edu>
13581
13582 Fix minor problems found by static checking (Bug#9031).
13583 * chartab.c (char_table_set_range, map_sub_char_table):
13584 Remove unused locals.
13585 (uniprop_table): Now static.
13586 * composite.c (_work_char): Remove unused static var.
13587
9cb2ac56
JB
135882011-07-09 Juanma Barranquero <lekktu@gmail.com>
13589
13590 * chartab.c (uniprop_table_uncompress): Remove unused local variable.
13591
f25661f0
JD
135922011-07-09 Jan Djärv <jan.h.d@swipnet.se>
13593
13594 * gtkutil.c (qttip_cb): Remove code without function.
13595
8278c4fe
EZ
135962011-07-09 Eli Zaretskii <eliz@gnu.org>
13597
13598 * w32.c (pthread_sigmask): New stub.
13599
1692ae2d 136002011-07-08 Paul Eggert <eggert@cs.ucla.edu>
123403e4 13601
8a6ebd58 13602 Use pthread_sigmask, not sigprocmask (Bug#9010).
123403e4
PE
13603 sigprocmask is portable only for single-threaded applications, and
13604 Emacs can be multi-threaded when it uses GTK.
1301ac26
PE
13605 * Makefile.in (LIB_PTHREAD_SIGMASK): New macro.
13606 (LIBES): Use it.
13607 * callproc.c (Fcall_process):
13608 * process.c (create_process):
13609 * sysdep.c (sys_sigblock, sys_sigunblock, sys_sigsetmask):
13610 Use pthread_sigmask, not sigprocmask.
123403e4 13611
1b854618
JD
136122011-07-08 Jan Djärv <jan.h.d@swipnet.se>
13613
13614 * gtkutil.c (qttip_cb): Set line wrap to FALSE for tooltip widget.
13615 (xg_prepare_tooltip): Revert text in x->ttip_lbl, margins was
13616 wrong (Bug#8591).
13617
3fe4b549
JD
136182011-07-08 Jan Djärv <jan.h.d@swipnet.se>
13619
0ce7e563
JD
13620 * gtkutil.c (xg_prepare_tooltip): Fix indentation and comment.
13621 Put text in x->ttip_lbl instead of gtk_tooltip_set_text (Bug#8591).
13622 (xg_hide_tooltip): Fix comment.
13623
3fe4b549
JD
13624 * nsterm.m (initFrameFromEmacs): Don't use ns_return_types
13625 in registerServicesMenuSendTypes.
13626 (validRequestorForSendType): Don't check ns_return_types.
13627
13628 * nsfns.m (Fx_open_connection): Put NSStringPboardType into
13629 ns_return_type.
13630
5df75e47
JR
136312011-07-08 Jason Rumney <jasonr@gnu.org>
13632
22610910
JR
13633 * w32term.c (x_make_frame_visible): Use SH_SHOWNORMAL rather than
13634 SH_SHOW for hidden windows (Bug#5482).
13635
5df75e47
JR
13636 * w32fns.c (w32_wnd_proc) [WM_TIMER, WM_SET_CURSOR]: Avoid using
13637 frame struct members of non-existent frames (Bug#6284).
13638
699c10bd
JD
136392011-07-08 Jan Djärv <jan.h.d@swipnet.se>
13640
4393663b
JD
13641 * nsterm.m (keyDown): Call to wantsToDelayTextChangeNotifications and
13642 variable firstTime not needed on OSX >= 10.6.
13643 (setPosition): setFloatValue:knobProportion: is deprecated on OSX
13644 >= 10.5. Use setKnobProportion, setDoubleValue.
13645
13646 * nsterm.h (MAC_OS_X_VERSION_10_3, MAC_OS_X_VERSION_10_4)
13647 (MAC_OS_X_VERSION_10_5): Define if not defined.
13648 (EmacsView, EmacsTooltip): Implements NSWindowDelegate on OSX >= 10.6.
13649 (EmacsMenu): Implements NSMenuDelegate on OSX >= 10.6.
13650 (EmacsToolbar): Implements NSToolbarDelegate on OSX >= 10.6.
13651
13652 * nsselect.m (ns_string_from_pasteboard): Don't use deprecated methods
090bd7cb 13653 cString and lossyCString on OSX >= 10.4.
4393663b 13654
58179cce 13655 * nsmenu.m (fillWithWidgetValue): Don't use deprecated method
4393663b
JD
13656 sizeToFit on OSX >= 10.2.
13657
13658 * nsimage.m (allocInitFromFile): Don't use deprecated method
13659 bestRepresentationForDevice on OSX >= 10.6.
13660
13661 * nsfns.m (check_ns_display_info): Cast to long and use %ld in error
13662 to avoid warning.
13663
13664 * emacs.c: Declare unexec_init_emacs_zone.
13665
a63e0781
JD
13666 * nsgui.h: Fix compiler warning about gnulib redefining verify.
13667
699c10bd
JD
13668 * nsselect.m (ns_get_local_selection): Change to extern (Bug#8842).
13669
13670 * nsmenu.m (ns_update_menubar): Remove useless setDelegate call
13671 on svcsMenu (Bug#8842).
13672
13673 * nsfns.m (Fx_open_connection): Remove NSStringPboardType from
13674 ns_return_types.
13675 (Fns_list_services): Just return Qnil on 10.6, code not working there.
13676
13677 * nsterm.m (QUTF8_STRING): Declare.
13678 (initFrameFromEmacs): Call registerServicesMenuSendTypes.
13679 (validRequestorForSendType): Return type is (id).
13680 Change indexOfObjectIdenticalTo to indexOfObject.
13681 Check if we have local selection before returning self (Bug#8842).
13682 (writeSelectionToPasteboard): Put local selection into paste board
13683 if we have a local selection (Bug#8842).
13684 (syms_of_nsterm): DEFSYM QUTF8_STRING.
13685
13686 * nsterm.h (MAC_OS_X_VERSION_10_6): Define here instead of nsterm.m.
13687 (ns_get_local_selection): Declare.
13688
54e10184
LMI
136892011-07-07 Lars Magne Ingebrigtsen <larsi@gnus.org>
13690
9888ff71
LMI
13691 * keymap.c (describe_map_tree): Don't insert a double newline at
13692 the end of the buffer (bug#1169) and return whether we inserted
13693 something.
13694
54e10184
LMI
13695 * callint.c (Fcall_interactively): Change "reading args" to
13696 "providing args" to try to clarify what it does (bug#1010).
13697
15fa4783
KH
136982011-07-07 Kenichi Handa <handa@m17n.org>
13699
13700 * composite.c (composition_compute_stop_pos): Ignore a static
13701 composition starting before CHARPOS (Bug#8915).
13702
13703 * xdisp.c (handle_composition_prop): Likewise.
13704
a8815b00
EZ
137052011-07-07 Eli Zaretskii <eliz@gnu.org>
13706
13707 * term.c (produce_glyphs) <xassert>: Allow IT_GLYPHLESS in it->what.
13708 (Bug#9015)
13709
ef7b981d 137102011-07-07 Kenichi Handa <handa@m17n.org>
c805dec0
KH
13711
13712 * character.h (unicode_category_t): New enum type.
13713
13714 * chartab.c (uniprop_decoder_t, uniprop_encoder_t): New types.
13715 (Qchar_code_property_table): New variable.
13716 (UNIPROP_TABLE_P, UNIPROP_GET_DECODER)
13717 (UNIPROP_COMPRESSED_FORM_P): New macros.
13718 (char_table_ascii): Uncompress the compressed values.
13719 (sub_char_table_ref): New arg is_uniprop. Callers changed.
13720 Uncompress the compressed values.
ac389d0c 13721 (sub_char_table_ref_and_range): Likewise.
c805dec0
KH
13722 (char_table_ref_and_range): Uncompress the compressed values.
13723 (sub_char_table_set): New arg is_uniprop. Callers changed.
13724 Uncompress the compressed values.
13725 (sub_char_table_set_range): Args changed. Callers changed.
13726 (char_table_set_range): Adjuted for the above change.
13727 (map_sub_char_table): Delete args default_val and parent. Add arg
13728 top. Give decoded values to a Lisp function.
640c8776 13729 (map_char_table): Adjust for the above change. Give decoded
c805dec0
KH
13730 values to a Lisp function. Gcpro more variables.
13731 (uniprop_table_uncompress)
13732 (uniprop_decode_value_run_length): New functions.
13733 (uniprop_decoder, uniprop_decoder_count): New variables.
13734 (uniprop_get_decoder, uniprop_encode_value_character)
13735 (uniprop_encode_value_run_length, uniprop_encode_value_numeric):
13736 New functions.
13737 (uniprop_encoder, uniprop_encoder_count): New variables.
13738 (uniprop_get_encoder, uniprop_table)
13739 (Funicode_property_table_internal, Fget_unicode_property_internal)
13740 (Fput_unicode_property_internal): New functions.
13741 (syms_of_chartab): DEFSYM Qchar_code_property_table, defsubr
13742 Sunicode_property_table_internal, Sget_unicode_property_internal,
5e617bc2 13743 and Sput_unicode_property_internal. Defvar_lisp
c805dec0
KH
13744 char-code-property-alist.
13745
640c8776 13746 * composite.c (CHAR_COMPOSABLE_P): Adjust for the change of
c805dec0
KH
13747 Vunicode_category_table.
13748
640c8776 13749 * font.c (font_range): Adjust for the change of
c805dec0
KH
13750 Vunicode_category_table.
13751
76b397fb
DN
137522011-07-07 Dan Nicolaescu <dann@ics.uci.edu>
13753
13754 * m/iris4d.h: Remove file, move contents ...
13755 * s/irix6-5.h: ... here.
13756
22b4128e
PE
137572011-07-06 Paul Eggert <eggert@cs.ucla.edu>
13758
13759 Remove unportable assumption about struct layout (Bug#8884).
8a5c77bb
PE
13760 * alloc.c (mark_buffer):
13761 * buffer.c (reset_buffer_local_variables, Fbuffer_local_variables)
13762 (clone_per_buffer_values): Don't assume that
22b4128e
PE
13763 sizeof (struct buffer) is a multiple of sizeof (Lisp_Object).
13764 This isn't true in general, and it's particularly not true
13765 if Emacs is configured with --with-wide-int.
13766 * buffer.h (FIRST_FIELD_PER_BUFFER, LAST_FIELD_PER_BUFFER):
13767 New macros, used in the buffer.c change.
13768
869795d6
JD
137692011-07-05 Jan Djärv <jan.h.d@swipnet.se>
13770
13771 * xsettings.c: Use both GConf and GSettings if both are available.
13772 (store_config_changed_event): Add comment.
13773 (dpyinfo_valid, store_font_name_changed, map_tool_bar_style)
13774 (store_tool_bar_style_changed): New functions.
5e617bc2 13775 (store_monospaced_changed): Add comment. Call dpyinfo_valid.
869795d6
JD
13776 (struct xsettings): Move font inside HAVE_XFT.
13777 (GSETTINGS_TOOL_BAR_STYLE, GSETTINGS_FONT_NAME): New defines.
640c8776 13778 (GSETTINGS_MONO_FONT): Rename from SYSTEM_MONO_FONT.
869795d6 13779 Move inside HAVE_XFT.
640c8776 13780 (something_changed_gsettingsCB): Rename from something_changedCB.
869795d6
JD
13781 Check for changes in GSETTINGS_TOOL_BAR_STYLE and GSETTINGS_FONT_NAME
13782 also.
13783 (GCONF_TOOL_BAR_STYLE, GCONF_FONT_NAME): New defines.
5e617bc2 13784 (GCONF_MONO_FONT): Rename from SYSTEM_MONO_FONT. Move inside HAVE_XFT.
640c8776 13785 (something_changed_gconfCB): Rename from something_changedCB.
869795d6
JD
13786 Check for changes in GCONF_TOOL_BAR_STYLE and GCONF_FONT_NAME also.
13787 (parse_settings): Move check for font inside HAVE_XFT.
13788 (read_settings, apply_xft_settings): Add comment.
13789 (read_and_apply_settings): Add comment. Call map_tool_bar_style and
13790 store_tool_bar_style_changed. Move check for font inside HAVE_XFT and
13791 call store_font_name_changed.
13792 (xft_settings_event): Add comment.
13793 (init_gsettings): Add comment. Get values for GSETTINGS_TOOL_BAR_STYLE
13794 and GSETTINGS_FONT_NAME. Move check for fonts within HAVE_XFT.
13795 (init_gconf): Add comment. Get values for GCONF_TOOL_BAR_STYLE
13796 and GCONF_FONT_NAME. Move check for fonts within HAVE_XFT.
13797 (xsettings_initialize): Call init_gsettings last.
640c8776
SM
13798 (xsettings_get_system_font, xsettings_get_system_normal_font):
13799 Add comment.
869795d6 13800
d8ed26bd
PE
138012011-07-05 Paul Eggert <eggert@cs.ucla.edu>
13802
13803 Random fixes. E.g., (random) never returned negative values.
13804 * fns.c (Frandom): Use GET_EMACS_TIME for random seed, and add the
13805 subseconds part to the entropy, as that's a bit more random.
13806 Prefer signed to unsigned, since the signedness doesn't matter and
13807 in general we prefer signed. When given a limit, use a
13808 denominator equal to INTMASK + 1, not to VALMASK + 1, because the
13809 latter isn't right if USE_2_TAGS_FOR_INTS.
13810 * sysdep.c (get_random): Return a value in the range 0..INTMASK,
13811 not 0..VALMASK. Don't discard "excess" bits that random () returns.
13812
cabf1cac
SM
138132011-07-04 Stefan Monnier <monnier@iro.umontreal.ca>
13814
13815 * textprop.c (text_property_stickiness):
13816 Obey Vtext_property_default_nonsticky.
13817 (syms_of_textprop): Add `display' to Vtext_property_default_nonsticky.
13818 * w32fns.c (syms_of_w32fns):
13819 * xfns.c (syms_of_xfns): Don't Add `display' since it's there by default.
13820
6e9b2be9
PE
138212011-07-04 Paul Eggert <eggert@cs.ucla.edu>
13822
13823 * fileio.c (barf_or_query_if_file_exists): Use S_ISDIR.
13824 This is more efficient than Ffile_directory_p and avoids a minor race.
13825
90186c68
LMI
138262011-07-04 Lars Magne Ingebrigtsen <larsi@gnus.org>
13827
7c301272
LMI
13828 * buffer.c (Foverlay_put): Say what the return value is
13829 (bug#7835).
13830
c4f2d8d4
LMI
13831 * fileio.c (barf_or_query_if_file_exists): Check first if the file
13832 is a directory before asking whether to use the file name
13833 (bug#7564).
ad637907
LMI
13834 (barf_or_query_if_file_exists): Make the "File is a directory"
13835 error be more correct.
c4f2d8d4 13836
90186c68
LMI
13837 * fns.c (Frequire): Remove the mention of the .gz files, since
13838 that's installation-specific, but keep the mention of
13839 `get-load-suffixes'.
13840
da64016e
PE
138412011-07-04 Paul Eggert <eggert@cs.ucla.edu>
13842
13843 * editfns.c (Fformat_time_string): Don't assume strlen fits in int.
13844 Report string overflow if the output is too long.
13845
7d47b580
JB
138462011-07-04 Juanma Barranquero <lekktu@gmail.com>
13847
a555cb87
JB
13848 * gnutls.c (Fgnutls_boot): Don't mention :verify-error.
13849 (syms_of_gnutls): Remove duplicate DEFSYM for
13850 Qgnutls_bootprop_verify_hostname_error, an error for
13851 Qgnutls_bootprop_verify_error (which is no longer used).
13852
7d47b580
JB
13853 * eval.c (find_handler_clause): Remove parameters `sig' and `data',
13854 unused since 2011-01-26T20:02:07Z!monnier@iro.umontreal.ca. All callers changed.
13855 Also (re)move comments that are misplaced or no longer relevant.
13856
1e49bfab
LMI
138572011-07-03 Lars Magne Ingebrigtsen <larsi@gnus.org>
13858
13859 * callint.c (Finteractive): Clarify the meaning of "@" (bug#8813).
13860
1485f4c0
CY
138612011-07-03 Chong Yidong <cyd@stupidchicken.com>
13862
13863 * xfaces.c (Finternal_merge_in_global_face): Modify the foreground
13864 and background color parameters if they have been changed.
13865
a9ab721e
LMI
138662011-07-03 Lars Magne Ingebrigtsen <larsi@gnus.org>
13867
13868 * editfns.c (Fformat): Clarify the - and 0 flags (bug#6659).
13869
cf7cff57
PE
138702011-07-03 Paul Eggert <eggert@cs.ucla.edu>
13871
2e13213d
PE
13872 * xsettings.c (SYSTEM_FONT): Define only when used.
13873 No need to define when HAVE_GSETTINGS || !HAVE_XFT.
13874
cf7cff57
PE
13875 * keymap.c (access_keymap_1): Now static.
13876
7a8e04f7
CY
138772011-07-02 Chong Yidong <cyd@stupidchicken.com>
13878
13879 * keyboard.c (command_loop_1): If a down-mouse event is unbound,
13880 leave any prefix arg for the up event (Bug#1586).
13881
61352f62
LMI
138822011-07-02 Lars Magne Ingebrigtsen <larsi@gnus.org>
13883
69bb1ef7
LMI
13884 * lread.c (syms_of_lread): Mention single symbols defined by
13885 `defvar' or `defconst' (bug#7154).
13886
61352f62 13887 * fns.c (Frequire): Mention .el.gz files (bug#7314).
7b3747f9 13888 (Frequire): Mention get-load-suffixes.
61352f62 13889
28545e04
MR
138902011-07-02 Martin Rudalics <rudalics@gmx.at>
13891
13892 * window.h (window): Remove clone_number slot.
13893 * window.c (Fwindow_clone_number, Fset_window_clone_number):
13894 Remove.
13895 (make_parent_window, make_window, saved_window)
13896 (Fset_window_configuration, save_window_save): Don't deal with
13897 clone numbers.
13898 * buffer.c (Qclone_number): Remove declaration.
13899 (sort_overlays, overlay_strings): Don't deal with clone numbers.
13900
3349e122
SM
139012011-07-02 Stefan Monnier <monnier@iro.umontreal.ca>
13902
13903 Add multiple inheritance to keymaps.
13904 * keymap.c (Fmake_composed_keymap): New function.
13905 (Fset_keymap_parent): Simplify.
13906 (fix_submap_inheritance): Remove.
13907 (access_keymap_1): New function extracted from access_keymap to handle
13908 embedded parents and handle lists of maps.
13909 (access_keymap): Use it.
13910 (Fkeymap_prompt, map_keymap_internal, map_keymap, store_in_keymap)
13911 (Fcopy_keymap): Handle embedded parents.
13912 (Fcommand_remapping, define_as_prefix): Simplify.
13913 (Fkey_binding): Simplify.
13914 (syms_of_keymap): Move minibuffer-local-completion-map,
13915 minibuffer-local-filename-completion-map,
13916 minibuffer-local-must-match-map, and
13917 minibuffer-local-filename-must-match-map to Elisp.
13918 (syms_of_keymap): Defsubr make-composed-keymap.
13919 * keyboard.c (menu_bar_items): Use map_keymap_canonical.
13920 (parse_menu_item): Trivial simplification.
13921
3279eb87
GM
139222011-07-01 Glenn Morris <rgm@gnu.org>
13923
13924 * Makefile.in (SETTINGS_LIBS): Fix typo.
13925
39cb9e56 139262011-07-01 Kazuhiro Ito <kzhr@d1.dion.ne.jp> (tiny change)
4550efdf
KI
13927
13928 * coding.c (Fencode_coding_string): Record the last coding system
13929 used, as the function doc string says (bug#8738).
13930
0949d2b6
JD
139312011-07-01 Jan Djärv <jan.h.d@swipnet.se>
13932
13933 * xsettings.c (store_monospaced_changed): Take new font as arg and
13934 check for change against current_mono_font.
13935 (EMACS_TYPE_SETTINGS): Remove this and related defines.
13936 (emacs_settings_constructor, emacs_settings_get_property)
13937 (emacs_settings_set_property, emacs_settings_class_init)
13938 (emacs_settings_init, gsettings_obj): Remove.
13939 (something_changedCB): New function for HAVE_GSETTINGS.
13940 (something_changedCB): HAVE_GCONF: Call store_monospaced_changed
13941 with value as argument.
13942 (init_gsettings): Check that GSETTINGS_SCHEMA exists before calling
13943 g_settings_new (Bug#8967). Do not create gsettings_obj.
9173deec 13944 Remove calls to g_settings_bind. Connect something_changedCB to
0949d2b6
JD
13945 "changed".
13946
13947 * xgselect.c: Add defined (HAVE_GSETTINGS).
13948 (xgselect_initialize): Ditto.
13949
13950 * process.c: Add defined (HAVE_GSETTINGS) for xgselect.h
13951 (wait_reading_process_output): Add defined (HAVE_GSETTINGS) for
13952 xg_select.
13953
bbc6b304
PE
139542011-07-01 Paul Eggert <eggert@cs.ucla.edu>
13955
13956 * eval.c (struct backtrace): Simplify and port the data structure.
13957 Do not assume that "int nargs : BITS_PER_INT - 2;" produces a
13958 signed bit field, as this assumption is not portable and it makes
13959 Emacs crash when compiled with Sun C 5.8 on sparc. Do not use
13960 "char debug_on_exit : 1" as this is not portable either; instead,
13961 use the portable "unsigned int debug_on_exit : 1". Remove unused
13962 member evalargs. Remove obsolete comments about cc bombing out.
13963
9851bfc5
JD
139642011-06-30 Jan Djärv <jan.h.d@swipnet.se>
13965
51bb811f 13966 * xsettings.c: Include glib-object.h, gio/gio.h if HAVE_GSETTINGS.
9851bfc5
JD
13967 Let HAVE_GSETTINGS override HAVE_GCONF.
13968 (store_monospaced_changed): New function.
13969 (EMACS_SETTINGS): A new type derived from GObject to handle
13970 GSettings notifications.
13971 (emacs_settings_constructor, emacs_settings_get_property)
13972 (emacs_settings_set_property, emacs_settings_class_init):
13973 New functions.
13974 (gsettings_client, gsettings_obj): New variables.
13975 (GSETTINGS_SCHEMA): New define.
13976 (something_changedCB): Call store_monospaced_changed.
13977 (init_gsettings): New function.
13978 (xsettings_initialize): Call init_gsettings.
13979 (syms_of_xsettings): Initialize gsettings_client, gsettings_obj
13980 to NULL.
13981
640c8776 13982 * Makefile.in (SETTINGS_CFLAGS, SETTINGS_LIBS): Rename from
9851bfc5
JD
13983 GCONF_CFLAGS/LIBS.
13984
5386012d
MR
139852011-06-29 Martin Rudalics <rudalics@gmx.at>
13986
13987 * window.c (resize_root_window, grow_mini_window)
13988 (shrink_mini_window): Rename Qresize_root_window to
13989 Qwindow_resize_root_window and Qresize_root_window_vertically to
13990 Qwindow_resize_root_window_vertically.
13991
f13e0b08
PE
139922011-06-28 Paul Eggert <eggert@cs.ucla.edu>
13993
13994 * gnutls.c (Qgnutls_bootprop_verify_error): Remove unused var.
13995
94515237
JB
139962011-06-27 Juanma Barranquero <lekktu@gmail.com>
13997
13998 * makefile.w32-in: Redesign dependencies so they reflect more
13999 clearly which files are directly included by each source file,
14000 and not through other includes.
14001
e43b6e43
MR
140022011-06-27 Martin Rudalics <rudalics@gmx.at>
14003
14004 * buffer.c (Qclone_number): Declare static and DEFSYM it.
14005 (sort_overlays, overlay_strings): When an overlay's clone number
14006 matches the window's clone number process the overlay even if
14007 the overlay's window property doesn't match the current window.
14008
d68443dc
MR
14009 * window.c (Fwindow_vchild): Rename to Fwindow_top_child.
14010 (Fwindow_hchild): Rename to Fwindow_left_child.
14011 (Fwindow_next): Rename to Fwindow_next_sibling.
14012 (Fwindow_prev): Rename to Fwindow_prev_sibling.
d615d6d2
MR
14013 (resize_window_check): Rename to window_resize_check.
14014 (resize_window_apply): Rename to window_resize_apply.
14015 (Fresize_window_apply): Rename to Fwindow_resize_apply.
14016 (Fdelete_other_windows_internal, resize_frame_windows)
14017 (Fsplit_window_internal, Fdelete_window_internal)
14018 (grow_mini_window, shrink_mini_window)
14019 (Fresize_mini_window_internal): Fix callers accordingly.
d68443dc 14020
c7e73be5
JD
140212011-06-26 Jan Djärv <jan.h.d@swipnet.se>
14022
14023 * emacsgtkfixed.h: State that this is only used with Gtk+3.
14024 (emacs_fixed_set_min_size): Remove.
14025 (emacs_fixed_new): Take frame as argument.
14026
14027 * emacsgtkfixed.c: State that this is only used with Gtk+3.
14028 (_EmacsFixedPrivate): Remove minwidth/height.
14029 Add struct frame *f.
14030 (emacs_fixed_init): Initialize priv->f.
14031 (get_parent_class, emacs_fixed_set_min_size): Remove.
14032 (emacs_fixed_new): Set priv->f to argument.
14033 (emacs_fixed_get_preferred_width)
14034 (emacs_fixed_get_preferred_height): Use min_width/height from
14035 frames size_hint to set minimum and natural (Bug#8919).
14036 (XSetWMSizeHints, XSetWMNormalHints): Override these functions
14037 and use min_width/height from frames size_hint to set
14038 min_width/height (Bug#8919).
14039
14040 * gtkutil.c (xg_create_frame_widgets): Pass f to emacs_fixed_new.
9173deec
JB
14041 (x_wm_set_size_hint): Remove call to emacs_fixed_set_min_size.
14042 Fix indentation.
c7e73be5 14043
cf99dcf8
EZ
140442011-06-26 Eli Zaretskii <eliz@gnu.org>
14045
14046 * bidi.c (bidi_paragraph_init): Test for ZV_BYTE before calling
14047 bidi_at_paragraph_end, since fast_looking_at doesn't like to be
14048 called at ZV.
14049
029529ac
CY
140502011-06-26 Chong Yidong <cyd@stupidchicken.com>
14051
14052 * process.c (wait_reading_process_output): Bypass select if
14053 waiting for a cell while ignoring keyboard input, and input is
14054 pending. Suggested by Jan Djärv (Bug#8869).
14055
7a7ef429
PE
140562011-06-25 Paul Eggert <eggert@cs.ucla.edu>
14057
14058 Use gnulib's dup2 module instead of rolling our own.
14059 * sysdep.c (dup2) [!HAVE_DUP2]: Remove; gnulib now does this.
14060
11fdef7d 140612011-06-25 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
989b42d2
YM
14062
14063 * dispnew.c (scrolling_window): Before scrolling, turn off a
14064 mouse-highlight in the window being scrolled.
14065
cd3520a4
JB
140662011-06-24 Juanma Barranquero <lekktu@gmail.com>
14067
14068 Move DEFSYM to lisp.h and use everywhere.
14069
14070 * character.h (DEFSYM): Move declaration...
14071 * lisp.h (DEFSYM): ...here.
14072
14073 * gnutls.c:
14074 * minibuf.c:
14075 * w32menu.c:
14076 * w32proc.c:
14077 * w32select.c: Don't include character.h.
14078
14079 * alloc.c (syms_of_alloc):
14080 * buffer.c (syms_of_buffer):
14081 * bytecode.c (syms_of_bytecode):
14082 * callint.c (syms_of_callint):
14083 * casefiddle.c (syms_of_casefiddle):
14084 * casetab.c (init_casetab_once):
14085 * category.c (init_category_once, syms_of_category):
14086 * ccl.c (syms_of_ccl):
14087 * cmds.c (syms_of_cmds):
14088 * composite.c (syms_of_composite):
14089 * dbusbind.c (syms_of_dbusbind):
14090 * dired.c (syms_of_dired):
14091 * dispnew.c (syms_of_display):
14092 * doc.c (syms_of_doc):
14093 * editfns.c (syms_of_editfns):
14094 * emacs.c (syms_of_emacs):
14095 * eval.c (syms_of_eval):
14096 * fileio.c (syms_of_fileio):
14097 * fns.c (syms_of_fns):
14098 * frame.c (syms_of_frame):
14099 * fringe.c (syms_of_fringe):
14100 * insdel.c (syms_of_insdel):
14101 * keymap.c (syms_of_keymap):
14102 * lread.c (init_obarray, syms_of_lread):
14103 * macros.c (syms_of_macros):
14104 * msdos.c (syms_of_msdos):
14105 * print.c (syms_of_print):
14106 * process.c (syms_of_process):
14107 * search.c (syms_of_search):
14108 * sound.c (syms_of_sound):
14109 * syntax.c (init_syntax_once, syms_of_syntax):
14110 * terminal.c (syms_of_terminal):
14111 * textprop.c (syms_of_textprop):
14112 * undo.c (syms_of_undo):
14113 * w32.c (globals_of_w32):
14114 * window.c (syms_of_window):
14115 * xdisp.c (syms_of_xdisp):
14116 * xfaces.c (syms_of_xfaces):
14117 * xfns.c (syms_of_xfns):
14118 * xmenu.c (syms_of_xmenu):
14119 * xsettings.c (syms_of_xsettings):
14120 * xterm.c (syms_of_xterm): Use DEFSYM.
14121
4228cf16
TZ
141222011-06-24 Teodor Zlatanov <tzz@lifelogs.com>
14123
cd3520a4 14124 * gnutls.c (syms_of_gnutls): Use the DEFSYM macro from character.h.
4228cf16 14125
7fcccf1e
PE
141262011-06-23 Paul Eggert <eggert@cs.ucla.edu>
14127
7efb4e0e
PE
14128 Integer and buffer overflow fixes (Bug#8873).
14129
ff5844ad
PE
14130 * print.c (printchar, strout): Check for string overflow.
14131 (PRINTPREPARE, printchar, strout):
14132 Don't set size unless allocation succeeds.
14133
90532f02
PE
14134 * minibuf.c (read_minibuf_noninteractive): Use ptrdiff_t, not int,
14135 for sizes. Check for string overflow more accurately.
14136 Simplify newline removal at end; this suppresses a GCC 4.6.0 warning.
14137
6d84508d
PE
14138 * macros.c: Integer and buffer overflow fixes.
14139 * keyboard.h (struct keyboard.kbd_macro_bufsize):
14140 * macros.c (Fstart_kbd_macro, store_kbd_macro_char):
14141 Use ptrdiff_t, not int, for sizes.
14142 Don't increment bufsize until after realloc succeeds.
14143 Check for size-calculation overflow.
14144 (Fstart_kbd_macro): Use EMACS_INT, not int, for XINT result.
14145
437b2cb4
PE
14146 * lisp.h (DEFVAR_KBOARD): Use offsetof instead of char * finagling.
14147
8b9ac8b4
PE
14148 * lread.c: Integer overflow fixes.
14149 (read_integer): Radix is now EMACS_INT, not int,
14150 to improve quality of diagnostics for out-of-range radices.
14151 Calculate buffer size correctly for out-of-range radices.
14152 (read1): Check for integer overflow in radices, and in
14153 read-circle numbers.
82cb60d3
PE
14154 (read_escape): Avoid int overflow.
14155 (Fload, openp, read_buffer_size, read1)
14156 (substitute_object_recurse, read_vector, read_list, map_obarray):
14157 Use ptrdiff_t, not int, for sizes.
14158 (read1): Use EMACS_INT, not int, for sizes.
20270765 14159 Check for size overflow.
8b9ac8b4 14160
7fcccf1e
PE
14161 * image.c (cache_image): Check for size arithmetic overflow.
14162
bfbbd7e7
PE
14163 * lread.c: Integer overflow issues.
14164 (saved_doc_string_size, saved_doc_string_length)
14165 (prev_saved_doc_string_size, prev_saved_doc_string_length):
14166 Now ptrdiff_t, not int.
14167 (read1): Don't assume doc string length fits in int. Check for
14168 out-of-range doc string lengths.
14169 (read_list): Don't assume file position fits in int.
39019e54 14170 (read_escape): Check for hex character overflow.
bfbbd7e7 14171
4e323265
LL
141722011-06-22 Leo Liu <sdl.web@gmail.com>
14173
14174 * minibuf.c (Fcompleting_read_default, Vcompleting_read_function):
14175 Move to minibuffer.el.
14176
85fece3e
PE
141772011-06-22 Paul Eggert <eggert@cs.ucla.edu>
14178
20b84ce9 14179 Fixes for GLYPH_DEBUG found by GCC 4.6.0 static checking.
85fece3e
PE
14180 The following patches are for when GLYPH_DEBUG && !XASSERT.
14181 * dispextern.h (trace_redisplay_p, dump_glyph_string):
14182 * dispnew.c (flush_stdout):
14183 * xdisp.c (dump_glyph_row, dump_glyph_matrix, dump_glyph):
14184 Mark as externally visible.
14185 * dispnew.c (check_window_matrix_pointers): Now static.
14186 * dispnew.c (window_to_frame_vpos):
14187 * xfns.c (unwind_create_frame):
14188 * xterm.c (x_check_font): Remove unused local.
14189 * scroll.c (CHECK_BOUNDS):
14190 * xfaces.c (cache_fache): Rename local to avoid shadowing.
14191 * xfns.c, w32fns.c (image_cache_refcount, dpyinfo_refcount): Now static.
14192 * xdisp.c (check_window_end): Now a no-op if !XASSERTS.
14193 (debug_first_unchanged_at_end_vpos, debug_last_unchanged_at_beg_vpos)
14194 (debug_dvpos, debug_dy, debug_delta, debug_delta_bytes, debug_end_vpos):
14195 Now static.
14196 (debug_method_add): Use va_list and vsprintf rather than relying
14197 on undefined behavior with wrong number of arguments.
14198 (dump_glyph, dump_glyph_row, Fdump_glyph_matrix):
14199 Don't assume ptrdiff_t and EMACS_INT are the same width as int.
14200 In this code, it's OK to assume C99 behavior for ptrdiff_t formats
14201 since we're not interested in debugging glyphs with old libraries.
14202 * xfaces.c (cache_face): Move debugging code earlier; this pacifies
14203 GCC 4.6.0's static checking.
14204
0766b489
PE
142052011-06-22 Paul Eggert <eggert@cs.ucla.edu>
14206
31fd4b32
PE
14207 Integer overflow and signedness fixes (Bug#8873).
14208 A few related buffer overrun fixes, too.
14209
b79e8648
PE
14210 * font.c (font_score): Use EMACS_INT, not int, to store XINT value.
14211
0766b489
PE
14212 * dispextern.h (struct face.stipple):
14213 * image.c (x_bitmap_height, x_bitmap_width, x_bitmap_pixmap)
14214 (x_bitmap_mask, x_allocate_bitmap_record)
14215 (x_create_bitmap_from_data, x_create_bitmap_from_file)
14216 (x_destroy_bitmap, x_destroy_all_bitmaps, x_create_bitmap_mask)
14217 (x_create_bitmap_from_xpm_data):
14218 * nsterm.h (struct ns_display_info.bitmaps_size, .bitmaps_last):
14219 * w32term.h (struct w32_display_info.icon_bitmap_id, .bitmaps_size)
14220 (.bitmaps_last):
14221 * xfaces.c (load_pixmap):
14222 * xterm.c (x_bitmap_icon, x_wm_set_icon_pixmap):
14223 * xterm.h (struct x_display_info.icon_bitmap_id, .bitmaps_size)
14224 (.bitmaps_last, struct x_output.icon_bitmap):
14225 Use ptrdiff_t, not int, for bitmap indexes.
14226 (x_allocate_bitmap_record): Check for size overflow.
14227 * dispextern.h, lisp.h: Adjust to API changes elsewhere.
14228
b081724f
PE
14229 Use ptrdiff_t, not int, for overlay counts.
14230 * buffer.h (overlays_at, sort_overlays, GET_OVERLAYS_AT):
14231 * editfns.c (overlays_around, get_pos_property):
14232 * textprop.c (get_char_property_and_overlay):
14233 * xdisp.c (next_overlay_change, note_mouse_highlight):
14234 * xfaces.c (face_at_buffer_position):
21514da7
PE
14235 * buffer.c (OVERLAY_COUNT_MAX): New macro.
14236 (overlays_at, overlays_in, sort_overlays, Foverlays_at)
14237 (Fnext_overlay_change, Fprevious_overlay_change)
14238 (mouse_face_overlay_overlaps, Foverlays_in):
b081724f 14239 Use ptrdiff_t, not int, for sizes.
21514da7 14240 (overlays_at, overlays_in): Check for size-calculation overflow.
b081724f 14241
3de73e5e
PE
14242 * xterm.c (xim_initialize, same_x_server): Strlen may not fit in int.
14243
2606c57b
PE
14244 * xsmfns.c (smc_save_yourself_CB, x_session_initialize): Avoid strlen.
14245 (x_session_initialize): Do not assume string length fits in int.
14246
aaafe47a
PE
14247 * xsettings.c (apply_xft_settings): Fix potential buffer overrun.
14248 This is unlikely, but can occur if DPI is outlandish.
14249
2674ddc8 14250 * xsettings.c (Ffont_get_system_normal_font, Ffont_get_system_font):
3a5077c5
PE
14251 * xselect.c (Fx_get_atom_name): Avoid need for strlen.
14252
28154962
PE
14253 * xrdb.c: Don't assume strlen fits in int; avoid some strlens.
14254 * xrdb.c (magic_file_p, search_magic_path):
14255 Omit last arg SUFFIX; it was always 0. All callers changed.
14256 (magic_file_p): Use ptrdiff_t, not int. Check for size overflow.
14257
7de51af5
PE
14258 * xfont.c (xfont_match): Avoid need for strlen.
14259
25ed6cc3
PE
14260 * xfns.c: Don't assume strlen fits in int.
14261 (xic_create_fontsetname, x_window): Use ptrdiff_t, not int.
14262
4eab31dd
PE
14263 * xdisp.c (message_log_check_duplicate): Return intmax_t,
14264 not unsigned long, as we prefer signed integers. All callers changed.
14265 Detect integer overflow in repeat count.
14266 (message_dolog): Don't assume print length fits in 39 bytes.
df1f27af 14267 (display_mode_element): Don't assume strlen fits in int.
4eab31dd 14268
171e2a58
PE
14269 * termcap.c: Don't assume sizes fit in int and never overflow.
14270 (struct termcap_buffer, tgetent): Use ptrdiff_t, not int, for sizes.
14271 (gobble_line): Check for size-calculation overflow.
14272
ad39faca 14273 * minibuf.c (Fread_buffer):
6e5bb2dc 14274 * lread.c (intern, intern_c_string):
74ca2eb3
PE
14275 * image.c (xpm_scan) [HAVE_NS && !HAVE_XPM]:
14276 Don't assume string length fits in int.
14277
52c61c22 14278 * keyboard.c (parse_tool_bar_item):
9bda3520
PE
14279 * gtkutil.c (style_changed_cb): Avoid need for strlen.
14280
b5b8c9e5
PE
14281 * font.c: Don't assume string length fits in int.
14282 (font_parse_xlfd, font_parse_fcname, font_unparse_fcname):
14283 Use ptrdiff_t, not int.
ccd6111c
PE
14284 (font_intern_prop): Don't assume string length fits in int.
14285 Don't assume integer property fits in fixnum.
14286 * font.h (font_intern_prop): 2nd arg is now ptrdiff_t, not int.
b5b8c9e5 14287
882f0d81 14288 * filelock.c: Fix some buffer overrun and integer overflow issues.
51cab52b 14289 (get_boot_time): Don't assume gzip command string fits in 100 bytes.
882f0d81
PE
14290 Reformulate so as not to need the command string.
14291 Invoke gzip -cd rather than gunzip, as it's more portable.
14292 (lock_info_type, lock_file_1, lock_file):
14293 Don't assume pid_t and time_t fit in unsigned long.
14294 (LOCK_PID_MAX): Remove; we now use more-reliable bounds.
14295 (current_lock_owner): Prefer signed type for sizes.
14296 Use memcpy, not strncpy, where memcpy is what is really wanted.
14297 Don't assume (via atoi) that time_t and pid_t fit in int.
14298 Check for time_t and/or pid_t out of range, e.g., via a network share.
14299 Don't alloca where an auto var works fine.
14300
93f4cf88
PE
14301 * fileio.c: Fix some integer overflow issues.
14302 (file_name_as_directory, Fexpand_file_name, Fsubstitute_in_file_name):
14303 Don't assume string length fits in int.
14304 (directory_file_name): Don't assume string length fits in long.
14305 (make_temp_name): Don't assume pid fits in int, or that its print
14306 length is less than 20.
14307
f3e92b69
PE
14308 * data.c (Fsubr_name): Rewrite to avoid a strlen call.
14309
1bfdaf10
PE
14310 * coding.c (make_subsidiaries): Don't assume string length fits in int.
14311
35016e9a
PE
14312 * callproc.c (child_setup): Rewrite to avoid two strlen calls.
14313
3d1e65a1
PE
14314 * process.c (Fformat_network_address): Use EMACS_INT, not EMACS_UINT.
14315 We prefer signed integers, even for size calculations.
14316
0b963a93
PE
14317 * emacs.c: Don't assume string length fits in 'int'.
14318 (DEFINE_DUMMY_FUNCTION, sort_args): Use ptrdiff_t, not int.
14319 (main): Don't invoke strlen when not needed.
14320
573f4b54
PE
14321 * dbusbind.c (XD_ERROR): Don't arbitrarily truncate string.
14322 (XD_DEBUG_MESSAGE): Don't waste a byte.
14323
989f33ba
PE
14324 * callproc.c (getenv_internal_1, getenv_internal)
14325 (Fgetenv_internal):
965d34eb
PE
14326 * buffer.c (init_buffer): Don't assume string length fits in 'int'.
14327
e4d29b33
PE
14328 * lread.c (invalid_syntax): Omit length argument.
14329 All uses changed. This doesn't fix a bug, but it simplifies the
14330 code away from its former Hollerith-constant appearance, and it's
14331 one less 'int' to worry about when looking at integer-overflow issues.
51cab52b 14332 (string_to_number): Simplify 2011-04-26 change by invoking xsignal1.
e4d29b33 14333
eb49b136
PE
14334 * lisp.h (DEFUN): Remove bogus use of sizeof (struct Lisp_Subr).
14335 This didn't break anything, but it didn't help either.
14336 It's confusing to put a bogus integer in a place where the actual
14337 value does not matter.
9f62aeb1 14338 (LIST_END_P): Remove unused macro and its bogus comment.
cbeff735 14339 (make_fixnum_or_float): Remove unnecessary cast to EMACS_INT.
eb49b136 14340
15375a22
PE
14341 * lisp.h (union Lisp_Object.i): EMACS_INT, not EMACS_UINT.
14342 This is for consistency with the ordinary, non-USE_LISP_UNION_TYPE,
14343 implementation.
b61cc01c
PE
14344 (struct Lisp_Bool_Vector.size): EMACS_INT, not EMACS_UINT.
14345 We prefer signed types, and the value cannot exceed the EMACS_INT
14346 range anyway (because otherwise the length would not be representable).
9a8e8d9b
PE
14347 (XSET) [USE_LISP_UNION_TYPE]: Use uintptr_t and intptr_t,
14348 not EMACS_UINT and EMACS_INT, when converting pointer to integer.
14349 This avoids a GCC warning when WIDE_EMACS_INT.
15375a22 14350
53b2623d
PE
14351 * indent.c (sane_tab_width): New function.
14352 (current_column, scan_for_column, Findent_to, position_indentation)
14353 (compute_motion): Use it. This is just for clarity.
8fcaf9cc 14354 (Fcompute_motion): Don't assume hscroll and tab offset fit in int.
53b2623d 14355
51cab52b 14356 * image.c (xbm_image_p): Don't assume stated width, height fit in int.
45aebb64 14357
f2ed8a70
PE
14358 * lisp.h (lint_assume): New macro.
14359 * composite.c (composition_gstring_put_cache):
14360 * ftfont.c (ftfont_shape_by_flt): Use it to pacify GCC 4.6.0.
14361
abe80cc6
PE
14362 * editfns.c, insdel.c:
14363 Omit unnecessary forward decls, to simplify future changes.
a9e860e1 14364
b02c740e
PE
14365 * ftfont.c (ftfont_shape_by_flt): Use signed integers for lengths.
14366
ebc96716
PE
14367 * font.c (Ffont_shape_gstring): Don't assume glyph len fits in 'int'.
14368
b4e50fa0 14369 * fns.c (Ffillarray): Don't assume bool vector size fits in 'int'.
f03dc6ef 14370 Use much-faster test for byte-length change.
311d5d7c 14371 Don't assume string byte-length fits in 'int'.
a4cf38e4 14372 Check that character arg fits in 'int'.
85461888 14373 (mapcar1): Declare byte as byte, for clarity.
b4e50fa0 14374
c0c1ee9f
PE
14375 * alloc.c (Fmake_bool_vector): Avoid unnecessary multiplication.
14376
a498d7f4
PE
14377 * fns.c (concat): Catch string overflow earlier.
14378 Do not rely on integer wraparound.
14379
51cab52b
PE
14380 * dispextern.h (struct it.overlay_strings_charpos)
14381 (struct it.selective): Now EMACS_INT, not int.
87830974
PE
14382 * xdisp.c (forward_to_next_line_start)
14383 (back_to_previous_visible_line_start)
14384 (reseat_at_next_visible_line_start, next_element_from_buffer):
14385 Don't arbitrarily truncate the value of 'selective' to int.
14386
76031fad
PE
14387 * xdisp.c (init_iterator): Use XINT, not XFASTINT; it might be < 0.
14388
5eb55db9
PE
14389 * composite.c: Don't truncate sizes to 'int'.
14390 (composition_gstring_p, composition_reseat_it)
14391 (composition_adjust_point): Use EMACS_INT, not int.
7d100a81
PE
14392 (get_composition_id, composition_gstring_put_cache): Use EMACS_INT,
14393 not EMACS_UINT, for indexes.
5eb55db9 14394
0703a717
PE
14395 * category.h (CATEGORY_SET_P): Remove unnecessary cast to EMACS_INT.
14396
d6202519
PE
14397 * buffer.c: Include <verify.h>.
14398 (struct sortvec.priority, struct sortstr.priority):
8961a454 14399 Now EMACS_INT, not int.
c20998a7 14400 (compare_overlays, cmp_for_strings): Avoid subtraction overflow.
67c36fce
PE
14401 (struct sortstr.size, record_overlay_string)
14402 (struct sortstrlist.size, struct sortlist.used):
14403 Don't truncate size to int.
14404 (record_overlay_string): Check for size-calculation overflow.
d6202519 14405 (init_buffer_once): Check at compile-time, not run-time.
fadf4e30 14406
d5a19415
JM
144072011-06-22 Jim Meyering <meyering@redhat.com>
14408
029529ac 14409 Don't leak an XBM-image-sized buffer
d5a19415
JM
14410 * image.c (xbm_load): Free the image buffer after using it.
14411
a9041e6c
PE
144122011-06-21 Paul Eggert <eggert@cs.ucla.edu>
14413
14414 Port to Sun C.
14415 * composite.c (find_automatic_composition): Omit needless 'return 0;'
14416 that Sun C diagnosed.
14417 * fns.c (secure_hash): Fix pointer signedness issue.
14418 * intervals.c (static_offset_intervals): New function.
14419 (offset_intervals): Use it.
14420
7f3f739f
LL
144212011-06-21 Leo Liu <sdl.web@gmail.com>
14422
14423 * deps.mk (fns.o):
14424 * makefile.w32-in ($(BLD)/fns.$(O)): Include sha256.h and
14425 sha512.h.
14426
14427 * fns.c (secure_hash): Rename from crypto_hash_function and change
14428 the first arg to accept symbols.
5b66d427 14429 (Fsecure_hash): New primitive.
7f3f739f
LL
14430 (syms_of_fns): New symbols.
14431
76147d94
DD
144322011-06-20 Deniz Dogan <deniz@dogan.se>
14433
14434 * process.c (Fset_process_buffer): Clarify return value in
14435 docstring.
14436
7d7d0045
CY
144372011-06-18 Chong Yidong <cyd@stupidchicken.com>
14438
14439 * dispnew.c (add_window_display_history): Use BVAR.
14440
14441 * xdisp.c (debug_method_add): Use BVAR.
14442 (check_window_end, dump_glyph_matrix, dump_glyph)
14443 (dump_glyph_row, dump_glyph_string): Convert arglist to ANSI C.
14444
14445 * xfaces.c (check_lface_attrs, check_lface, dump_realized_face):
14446 Likewise.
14447
14448 * xfns.c (Fx_create_frame, x_create_tip_frame): Delay image cache
14449 check till after the cache is created in init_frame_faces.
14450
ff2bc410
SM
144512011-06-17 Stefan Monnier <monnier@iro.umontreal.ca>
14452
14453 * fns.c (Fsafe_length): Yet another int/Lisp_Object mixup.
14454
28177add
PE
144552011-06-16 Paul Eggert <eggert@cs.ucla.edu>
14456
dd3482fe
PE
14457 * lisp.h: Include <limits.h>, for INT_MAX, LONG_MAX, LLONG_MAX.
14458 Without this, prin1 mishandles Lisp_Misc_Save_Value printing on
14459 hosts with pre-C99 libraries, because pD is wrongly defined to "t".
14460
393d71f3 14461 Improve buffer-overflow checking (Bug#8873).
1c8e352f
PE
14462 * fileio.c (Finsert_file_contents):
14463 * insdel.c (insert_from_buffer_1, replace_range, replace_range_2):
14464 Remove the old (too-loose) buffer overflow checks.
14465 They weren't needed, since make_gap checks for buffer overflow.
14466 * insdel.c (make_gap_larger): Catch buffer overflows that were missed.
14467 The old code merely checked for Emacs fixnum overflow, and relied
14468 on undefined (wraparound) behavior. The new code avoids undefined
14469 behavior, and also checks for ptrdiff_t and/or size_t overflow.
14470
2e6813b0 14471 * editfns.c (Finsert_char): Don't dump core with very negative counts.
21d890a4
PE
14472 Tune. Don't use wider integers than needed. Don't use alloca.
14473 Use a bigger 'string' buffer. Rewrite to avoid 'n > 0' test.
2e6813b0 14474
599a9e4f
PE
14475 * insdel.c (replace_range): Fix buf overflow when insbytes < outgoing.
14476
99561444
PE
14477 * insdel.c, lisp.h (buffer_overflow): New function.
14478 (insert_from_buffer_1, replace_range, replace_range_2):
14479 * insdel.c (make_gap_larger):
14480 * editfns.c (Finsert_char):
14481 * fileio.c (Finsert_file_contents): Use it, to normalize wording.
14482
28177add
PE
14483 * buffer.h (BUF_BYTES_MAX): Cast to ptrdiff_t so that it's signed.
14484
e69dafad
PE
144852011-06-15 Paul Eggert <eggert@cs.ucla.edu>
14486
4baa020d 14487 Integer overflow and signedness fixes (Bug#8873, Bug#8828).
ff672d2c 14488
b1c46f02
PE
14489 * ccl.c (ASCENDING_ORDER): New macro, to work around GCC bug 43772.
14490 (GET_CCL_RANGE, IN_INT_RANGE): Use it.
14491
e69dafad
PE
14492 * fileio.c: Don't assume EMACS_INT fits in off_t.
14493 (emacs_lseek): New static function.
14494 (Finsert_file_contents, Fwrite_region): Use it.
14495 Use SEEK_SET, SEEK_CUR, SEEK_END as appropriate.
14496
566684ea
PE
14497 * fns.c (Fload_average): Don't assume 100 * load average fits in int.
14498
e6966cd6
PE
14499 * fns.c: Don't overflow int when computing a list length.
14500 * fns.c (QUIT_COUNT_HEURISTIC): New constant.
14501 (Flength, Fsafe_length): Use EMACS_INT, not int, to avoid unwanted
14502 truncation on 64-bit hosts. Check for QUIT every
14503 QUIT_COUNT_HEURISTIC entries rather than every other entry; that's
14504 faster and is responsive enough.
14505 (Flength): Report an error instead of overflowing an integer.
14506 (Fsafe_length): Return a float if the value is not representable
14507 as a fixnum. This shouldn't happen except in contrived situations.
6346d301 14508 (Fnthcdr, Fsort): Don't assume list length fits in int.
de41a810 14509 (Fcopy_sequence): Don't assume vector length fits in int.
00c604f2 14510
dd0b0efb
PE
14511 * alloc.c: Check that resized vectors' lengths fit in fixnums.
14512 (header_size, word_size): New constants.
14513 (allocate_vectorlike): Don't check size overflow here.
14514 (allocate_vector): Check it here instead, since this is the only
14515 caller of allocate_vectorlike that could cause overflow.
14516 Check that the new vector's length is representable as a fixnum.
14517
86fe5cfe
PE
14518 * fns.c (next_almost_prime): Don't return a multiple of 3 or 5.
14519 The previous code was bogus. For example, next_almost_prime (32)
14520 returned 39, which is undesirable as it is a multiple of 3; and
14521 next_almost_prime (24) returned 25, which is a multiple of 5 so
14522 why was the code bothering to check for multiples of 7?
14523
80e88859
PE
14524 * bytecode.c (exec_byte_code): Use ptrdiff_t, not int, for vector length.
14525
4a2f0ad6
PE
14526 * eval.c, doprnt.c (SIZE_MAX): Remove; inttypes.h defines this now.
14527
f66c7cf8
PE
14528 Variadic C functions now count arguments with ptrdiff_t.
14529 This partly undoes my 2011-03-30 change, which replaced int with size_t.
14530 Back then I didn't know that the Emacs coding style prefers signed int.
14531 Also, in the meantime I found a few more instances where arguments
4a2f0ad6
PE
14532 were being counted with int, which may truncate counts on 64-bit
14533 machines, or EMACS_INT, which may be unnecessarily wide.
f66c7cf8
PE
14534 * lisp.h (struct Lisp_Subr.function.aMANY)
14535 (DEFUN_ARGS_MANY, internal_condition_case_n, safe_call):
14536 Arg counts are now ptrdiff_t, not size_t.
14537 All variadic functions and their callers changed accordingly.
14538 (struct gcpro.nvars): Now size_t, not size_t. All uses changed.
14539 * bytecode.c (exec_byte_code): Check maxdepth for overflow,
14540 to avoid potential buffer overrun. Don't assume arg counts fit in 'int'.
14541 * callint.c (Fcall_interactively): Check arg count for overflow,
14542 to avoid potential buffer overrun. Use signed char, not 'int',
14543 for 'varies' array, so that we needn't bother to check its size
14544 calculation for overflow.
14545 * editfns.c (Fformat): Use ptrdiff_t, not EMACS_INT, to count args.
14546 * eval.c (apply_lambda):
14547 * fns.c (Fmapconcat): Use XFASTINT, not XINT, to get args length.
14548 (struct textprop_rec.argnum): Now ptrdiff_t, not int. All uses changed.
14549 (mapconcat): Use ptrdiff_t, not int and EMACS_INT, to count args.
14550
a1759b76
PE
14551 * callint.c (Fcall_interactively): Don't use index var as event count.
14552
d96be9fc
PE
14553 * vm-limit.c (check_memory_limits): Fix incorrect extern function decls.
14554 * mem-limits.h (SIZE): Remove; no longer used.
14555
a690a978 14556 * xterm.c (x_alloc_nearest_color_1): Prefer int to long when int works.
5efd304b 14557
578c21e6
PE
14558 Remove unnecessary casts.
14559 * xterm.c (x_term_init):
14560 * xfns.c (x_set_border_pixel):
14561 * widget.c (create_frame_gcs): Remove casts to unsigned long etc.
14562 These aren't needed now that we assume ANSI C.
14563
96f53c6c
PE
14564 * sound.c (Fplay_sound_internal): Remove cast to unsigned long.
14565 It's more likely to cause problems (due to unsigned overflow)
14566 than to cure them.
14567
83c77d31
PE
14568 * dired.c (Ffile_attributes): Don't use 32-bit hack on 64-bit hosts.
14569
ee2079f1
PE
14570 * unexelf.c (unexec): Don't assume BSS addr fits in unsigned.
14571
6da65536
PE
14572 * xterm.c (handle_one_xevent): Omit unnecessary casts to unsigned.
14573
7147c4a4
PE
14574 * keyboard.c (modify_event_symbol): Don't limit alist len to UINT_MAX.
14575
193e32d9
PE
14576 * lisp.h (CHAR_TABLE_SET): Omit now-redundant test.
14577
e5533da6
PE
14578 * lread.c (Fload): Don't compare a possibly-garbage time_t value.
14579
9910e595
PE
14580 GLYPH_CODE_FACE returns EMACS_INT, not int.
14581 * dispextern.h (merge_faces):
14582 * xfaces.c (merge_faces):
01103c44
PE
14583 * xdisp.c (get_next_display_element, next_element_from_display_vector):
14584 Don't assume EMACS_INT fits in int.
9910e595 14585
2638320e
PE
14586 * character.h (CHAR_VALID_P): Remove unused parameter.
14587 * fontset.c, lisp.h, xdisp.c: All uses changed.
14588
045eb8d9
PE
14589 * editfns.c (Ftranslate_region_internal): Omit redundant test.
14590
c1f134b5
PE
14591 * fns.c (concat): Minor tuning based on overflow analysis.
14592 This doesn't fix any bugs. Use int to hold character, instead
14593 of constantly refetching from Emacs object. Use XFASTINT, not
14594 XINT, for value known to be a character. Don't bother comparing
14595 a single byte to 0400, as it's always less.
14596
395fcb93 14597 * floatfns.c (Fexpt):
327eeec8
PE
14598 * fileio.c (make_temp_name): Omit unnecessary cast to unsigned.
14599
abbd3d23
PE
14600 * editfns.c (Ftranslate_region_internal): Use int, not EMACS_INT
14601 for characters.
14602
684a03ef
PE
14603 * doc.c (get_doc_string): Omit (unsigned)c that mishandled negatives.
14604
0fed43f3
PE
14605 * data.c (Faset): If ARRAY is a string, check that NEWELT is a char.
14606 Without this fix, on a 64-bit host (aset S 0 4294967386) would
14607 incorrectly succeed when S was a string, because 4294967386 was
14608 truncated before it was used.
14609
8fd02eb7
PE
14610 * chartab.c (Fchar_table_range): Use CHARACTERP to check range.
14611 Otherwise, an out-of-range integer could cause undefined behavior
14612 on a 64-bit host.
14613
f8c86b69
PE
14614 * composite.c: Use int, not EMACS_INT, for characters.
14615 (fill_gstring_body, composition_compute_stop_pos): Use int, not
14616 EMACS_INT, for values that are known to be in character range.
14617 This doesn't fix any bugs but is the usual style inside Emacs and
14618 may generate better code on 32-bit machines.
14619
34206dd2
PE
14620 Make sure a 64-bit char is never passed to ENCODE_CHAR.
14621 This is for reasons similar to the recent CHAR_STRING fix.
14622 * charset.c (Fencode_char): Check that character arg is actually
14623 a character. Pass an int to ENCODE_CHAR.
14624 * charset.h (ENCODE_CHAR): Verify that the character argument is no
14625 wider than 'int', as a compile-time check to prevent future regressions
14626 in this area.
14627
c5958d4c 14628 * character.c (char_string): Remove unnecessary casts.
13bdea59
PE
14629
14630 Make sure a 64-bit char is never passed to CHAR_STRING.
14631 Otherwise, CHAR_STRING would do the wrong thing on a 64-bit platform,
14632 by silently ignoring the top 32 bits, allowing some values
14633 that were far too large to be valid characters.
14634 * character.h: Include <verify.h>.
14635 (CHAR_STRING, CHAR_STRING_ADVANCE): Verify that the character
14636 arguments are no wider than unsigned, as a compile-time check
14637 to prevent future regressions in this area.
14638 * data.c (Faset):
01103c44 14639 * editfns.c (Fchar_to_string, general_insert_function, Finsert_char)
13bdea59
PE
14640 (Fsubst_char_in_region):
14641 * fns.c (concat):
14642 * xdisp.c (decode_mode_spec_coding):
14643 Adjust to CHAR_STRING's new requirement.
14644 * editfns.c (Finsert_char, Fsubst_char_in_region):
14645 * fns.c (concat): Check that character args are actually
14646 characters. Without this test, these functions did the wrong
14647 thing with wildly out-of-range values on 64-bit hosts.
14648
d37ca623
PE
14649 Remove incorrect casts to 'unsigned' that lose info on 64-bit hosts.
14650 These casts should not be needed on 32-bit hosts, either.
14651 * keyboard.c (read_char):
14652 * lread.c (Fload): Remove casts to unsigned.
14653
ea204efb
PE
14654 * lisp.h (UNSIGNED_CMP): New macro.
14655 This fixes comparison bugs on 64-bit hosts.
14656 (ASCII_CHAR_P): Use it.
14657 * casefiddle.c (casify_object):
01103c44 14658 * character.h (ASCII_BYTE_P, CHAR_VALID_P)
ea204efb
PE
14659 (SINGLE_BYTE_CHAR_P, CHAR_STRING):
14660 * composite.h (COMPOSITION_ENCODE_RULE_VALID):
14661 * dispextern.h (FACE_FROM_ID):
14662 * keyboard.c (read_char): Use UNSIGNED_CMP.
14663
41cb286c
PE
14664 * xmenu.c (dialog_selection_callback) [!USE_GTK]: Cast to intptr_t,
14665 not to EMACS_INT, to avoid GCC warning.
14666
4a1b9832
PE
14667 * xfns.c (x_set_scroll_bar_default_width): Remove unused 'int' locals.
14668
55daad71
PE
14669 * buffer.h (PTR_BYTE_POS, BUF_PTR_BYTE_POS): Remove harmful cast.
14670 The cast incorrectly truncated 64-bit byte offsets to 32 bits, and
14671 isn't needed on 32-bit machines.
8f95c75c 14672
01103c44
PE
14673 * buffer.c (Fgenerate_new_buffer_name):
14674 Use EMACS_INT for count, not int.
0ceccced 14675 (advance_to_char_boundary): Return EMACS_INT, not int.
e762cafe
PE
14676
14677 * data.c (Qcompiled_function): Now static.
14678
c6f072e7
PE
14679 * window.c (window_body_lines): Now static.
14680
20ce5912
PE
14681 * image.c (gif_load): Rename local to avoid shadowing.
14682
9c4c5f81
PE
14683 * lisp.h (SAFE_ALLOCA_LISP): Check for integer overflow.
14684 (struct Lisp_Save_Value): Use ptrdiff_t, not int, for 'integer' member.
14685 * alloc.c (make_save_value): Integer argument is now of type
14686 ptrdiff_t, not int.
14687 (mark_object): Use ptrdiff_t, not int.
14688 * lisp.h (pD): New macro.
14689 * print.c (print_object): Use it.
14690
c0c5c8ae
PE
14691 * alloc.c: Use EMACS_INT, not int, to count objects.
14692 (total_conses, total_markers, total_symbols, total_vector_size)
14693 (total_free_conses, total_free_markers, total_free_symbols)
01103c44
PE
14694 (total_free_floats, total_floats, total_free_intervals)
14695 (total_intervals, total_strings, total_free_strings):
c0c5c8ae
PE
14696 Now EMACS_INT, not int. All uses changed.
14697 (Fgarbage_collect): Compute overall total using a double, so that
14698 integer overflow is less likely to be a problem. Check for overflow
14699 when converting back to an integer.
5a25e253
PE
14700 (n_interval_blocks, n_string_blocks, n_float_blocks, n_cons_blocks)
14701 (n_vectors, n_symbol_blocks, n_marker_blocks): Remove.
14702 These were 'int' variables that could overflow on 64-bit hosts;
14703 they were never used, so remove them instead of repairing them.
211a0b2a 14704 (nzombies, ngcs, max_live, max_zombies): Now EMACS_INT, not 'int'.
6349ae4d
PE
14705 (inhibit_garbage_collection): Set gc_cons_threshold to max value.
14706 Previously, this ceilinged at INT_MAX, but that doesn't work on
14707 64-bit machines.
e46bb31a 14708 (allocate_pseudovector): Don't use EMACS_INT when int would do.
c0c5c8ae 14709
c78baabf 14710 * alloc.c (Fmake_bool_vector): Don't assume vector size fits in int.
86f61a15 14711 (allocate_vectorlike): Check for ptrdiff_t overflow.
b6439961
PE
14712 (mark_vectorlike, mark_char_table, mark_object): Avoid EMACS_UINT
14713 when a (possibly-narrower) signed value would do just as well.
14714 We prefer using signed arithmetic, to avoid comparison confusion.
c78baabf 14715
c9d624c6
PE
14716 * alloc.c: Catch some string size overflows that we were missing.
14717 (XMALLOC_OVERRUN_CHECK_SIZE) [!XMALLOC_OVERRUN_CHECK]: Define to 0,
14718 for convenience in STRING_BYTES_MAX.
14719 (STRING_BYTES_MAX): New macro, superseding the old one in lisp.h.
14720 The definition here is exact; the one in lisp.h was approximate.
14721 (allocate_string_data): Check for string overflow. This catches
14722 some instances we weren't catching before. Also, it catches
14723 size_t overflow on (unusual) hosts where SIZE_MAX <= min
14724 (PTRDIFF_MAX, MOST_POSITIVE_FIXNUM), e.g., when size_t is 32 bits
14725 and ptrdiff_t and EMACS_INT are both 64 bits.
c78baabf 14726
c9d624c6
PE
14727 * character.c, coding.c, doprnt.c, editfns.c, eval.c:
14728 All uses of STRING_BYTES_MAX replaced by STRING_BYTES_BOUND.
640c8776 14729 * lisp.h (STRING_BYTES_BOUND): Rename from STRING_BYTES_MAX.
c9d624c6 14730
353032ce
PE
14731 * character.c (string_escape_byte8): Fix nbytes/nchars typo.
14732
2bccce07
PE
14733 * alloc.c (Fmake_string): Check for out-of-range init.
14734
0ac30604
SM
147352011-06-15 Stefan Monnier <monnier@iro.umontreal.ca>
14736
14737 * eval.c (Fdefvaralias): Also mark the target as variable-special-p.
14738
c195f2de
JD
147392011-06-14 Jan Djärv <jan.h.d@swipnet.se>
14740
14741 * xfns.c (x_set_scroll_bar_default_width): Remove argument to
14742 xg_get_default_scrollbar_width.
14743
14744 * gtkutil.c: Include emacsgtkfixed.h if HAVE_GTK3.
14745 (int_gtk_range_get_value): Move to the scroll bar part of the file.
14746 (style_changed_cb): Call update_theme_scrollbar_width and call
14747 x_set_scroll_bar_default_width and xg_frame_set_char_size for
14748 all frames (Bug#8505).
14749 (xg_create_frame_widgets): Call emacs_fixed_new if HAVE_GTK3 (Bug#8505).
14750 Call gtk_window_set_resizable if HAVE_GTK3.
14751 (x_wm_set_size_hint): Call emacs_fixed_set_min_size with min width
14752 and height if HAVE_GTK3 (Bug#8505).
14753 (scroll_bar_width_for_theme): New variable.
14754 (update_theme_scrollbar_width): New function.
14755 (xg_get_default_scrollbar_width): Move code to
14756 update_theme_scrollbar_width, just return scroll_bar_width_for_theme.
14757 (xg_initialize): Call update_theme_scrollbar_width.
14758
14759 * gtkutil.h (xg_get_default_scrollbar_width): Remove argument.
14760
14761 * emacsgtkfixed.c, emacsgtkfixed.h: New files.
14762
e10ac9f1
MR
147632011-06-12 Martin Rudalics <rudalics@gmx.at>
14764
14765 * frame.c (make_frame): Call other_buffer_safely instead of
14766 other_buffer.
14767
14768 * window.c (temp_output_buffer_show): Call display_buffer with
14769 second argument Vtemp_buffer_show_specifiers and reset latter
14770 immediately after the call.
14771 (Vtemp_buffer_show_specifiers): New variable.
14772 (auto_window_vscroll_p, next_screen_context_lines)
14773 (Vscroll_preserve_screen_position): Remove leading asterisks from
14774 doc-strings.
14775
2d3c217e 147762011-06-12 Paul Eggert <eggert@cs.ucla.edu>
4475bec4 14777
7b7f97e8 14778 Fix minor problems found by GCC 4.6.0 static checking.
4475bec4
PE
14779 * buffer.c (Qclone_number): Remove for now, as it's unused.
14780 (record_buffer, Funrecord_buffer): Rename local to avoid shadowing.
14781 (record_buffer): Remove unused local.
14782 * frame.c (other_visible_frames, frame_buffer_list): Now static.
14783 (set_frame_buffer_list): Remove; unused.
14784 * frame.h (other_visible_frames): Remove decl.
14785 * keyboard.h (menu_items_inuse): Declare only if USE_GTK || USE_MOTIF.
14786 * lisp.h (frame_buffer_list, set_frame_buffer_list): Remove decls.
14787 (add_gpm_wait_descriptor, delete_gpm_wait_descriptor): Declare only
14788 if HAVE_GPM.
14789 * menu.c (menu_items_inuse): Now static unless USE_GTK || USE_MOTIF.
14790 * process.c (add_gpm_wait_descriptor, delete_gpm_wait_descriptor):
14791 Define only if HAVE_GPM.
14792 * widget.c (EmacsFrameResize, emacsFrameClassRec): Now static.
14793 (update_hints_inhibit): Remove; never set. All uses removed.
14794 * widgetprv.h (emacsFrameClassRec): Remove decl.
14795 * window.c (delete_deletable_window): Now returns void, since it
14796 wasn't returning anything.
14797 (compare_window_configurations): Remove unused locals.
14798 * xfns.c (x_set_scroll_bar_default_width): Remove unused locals.
14799 * xmenu.c (x_menu_set_in_use): Define only if USE_GTK || USE_MOTIF.
4475bec4
PE
14800 (dialog_selection_callback) [!USE_GTK]: Prefer intptr_t for integers
14801 the same widths as pointers. This follows up on the 2011-05-06 patch.
14802 * xterm.c (x_alloc_lighter_color_for_widget): Define only if USE_LUCID.
14803 * xterm.h: Likewise.
14804 (x_menu_set_in_use): Declare only if USE_GTK || USE_MOTIF.
14805
1384b89e
JB
148062011-06-12 Juanma Barranquero <lekktu@gmail.com>
14807
14808 * makefile.w32-in: Update dependencies.
14809 (LISP_H): Add lib/intprops.h.
14810
1100a63c
CY
148112011-06-11 Chong Yidong <cyd@stupidchicken.com>
14812
14813 * image.c (gif_load): Add animation frame delay to the metadata.
14814 (syms_of_image): Use DEFSYM. New symbol `delay'.
14815
6198ccd0
MR
148162011-06-11 Martin Rudalics <rudalics@gmx.at>
14817
14818 * window.c (delete_deletable_window): Re-add.
14819 (Fset_window_configuration): Rewrite to handle dead buffers and
14820 consequently deletable windows.
14821 (window_tree, Fwindow_tree): Remove. Supply functionality in
14822 window.el.
14823 (compare_window_configurations): Simplify code.
14824
b6e3633c
AS
148252011-06-11 Andreas Schwab <schwab@linux-m68k.org>
14826
1ab0dee5
AS
14827 * image.c (imagemagick_load_image): Fix type mismatch.
14828 (Fimagemagick_types): Likewise.
14829
b6e3633c
AS
14830 * window.h (replace_buffer_in_windows): Declare.
14831
9397e56f
MR
148322011-06-11 Martin Rudalics <rudalics@gmx.at>
14833
14834 * buffer.c: New Lisp objects Qbuffer_list_update_hook and
14835 Qclone_number. Remove external declaration of Qdelete_window.
14836 (Fbuffer_list): Rewrite doc-string. Minor restructuring of
14837 code.
640c8776
SM
14838 (Fget_buffer_create, Fmake_indirect_buffer, Frename_buffer):
14839 Run Qbuffer_list_update_hook if allowed.
9397e56f
MR
14840 (Fother_buffer): Rewrite doc-string. Major rewrite for new
14841 buffer list implementation.
14842 (other_buffer_safely): New function.
14843 (Fkill_buffer): Replace call to replace_buffer_in_all_windows by
14844 calls to replace_buffer_in_windows and
14845 replace_buffer_in_windows_safely. Run Qbuffer_list_update_hook
14846 if allowed.
14847 (record_buffer): Inhibit quitting and rewrite using quittable
14848 functions. Run Qbuffer_list_update_hook if allowed.
14849 (Frecord_buffer, Funrecord_buffer): New functions.
640c8776
SM
14850 (switch_to_buffer_1, Fswitch_to_buffer): Remove.
14851 Move switch-to-buffer to window.el.
9397e56f
MR
14852 (bury-buffer): Move to window.el.
14853 (Vbuffer_list_update_hook): New variable.
14854
14855 * lisp.h (other_buffer_safely): Add prototype in buffer.c
14856 section.
14857
14858 * window.h (resize_frame_windows): Move up in code.
14859 (Fwindow_frame): Remove EXFUN.
14860 (replace_buffer_in_all_windows): Remove prototype.
14861 (replace_buffer_in_windows_safely): Add prototype.
14862
14863 * window.c: Declare Qdelete_window static again. Move down
14864 declaration of select_count.
14865 (Fnext_window, Fprevious_window): Rewrite doc-strings.
14866 (Fother_window): Move to window.el.
14867 (window_loop): Remove DELETE_BUFFER_WINDOWS and UNSHOW_BUFFER
14868 cases. Add REPLACE_BUFFER_IN_WINDOWS_SAFELY case.
14869 (Fdelete_windows_on, Freplace_buffer_in_windows): Move to
14870 window.el.
14871 (replace_buffer_in_windows): Implement by calling
14872 Qreplace_buffer_in_windows.
14873 (replace_buffer_in_all_windows): Remove with some functionality
14874 moved into replace_buffer_in_windows_safely.
14875 (replace_buffer_in_windows_safely): New function.
14876 (select_window_norecord, select_frame_norecord): Move in front
14877 of run_window_configuration_change_hook. Remove now obsolete
14878 declarations.
640c8776
SM
14879 (Fset_window_buffer): Rewrite doc-string.
14880 Call Qrecord_window_buffer.
9397e56f
MR
14881 (keys_of_window): Move binding for other-window to window.el.
14882
b50691aa
CY
148832011-06-11 Chong Yidong <cyd@stupidchicken.com>
14884
14885 * dispextern.h (struct image): Replace data member, whose int_val
14886 and ptr_val fields were not used by anything, with a single
14887 lisp_val object.
14888
14889 * image.c (Fimage_metadata, make_image, mark_image, tiff_load)
14890 (gif_clear_image, gif_load, imagemagick_load_image)
14891 (gs_clear_image, gs_load): Callers changed.
14892
3f754b86
PE
148932011-06-10 Paul Eggert <eggert@cs.ucla.edu>
14894
cca69397
PE
14895 * buffer.h: Include <time.h>, for time_t.
14896 Needed to build on FreeBSD 8.2. Problem reported by Herbert J. Skuhra.
14897
109e28d0
PE
14898 Fix minor problems found by static checking.
14899
60737f02
PE
14900 * image.c (PixelGetMagickColor): Declare if ImageMagick headers don't.
14901
4b66faf3
PE
14902 Make identifiers static if they are not used in other modules.
14903 * data.c (Qcompiled_function, Qframe, Qvector):
14904 * image.c (QimageMagick, Qsvg):
14905 * minibuf.c (Qmetadata):
14906 * window.c (resize_window_check, resize_root_window): Now static.
14907 * window.h (resize_window_check, resize_root_window): Remove decls.
14908
109e28d0
PE
14909 * window.c (window_deletion_count, delete_deletable_window):
14910 Remove; unused.
46a4ce9e
PE
14911 (window_body_lines): Now static.
14912 (Fdelete_other_windows_internal): Mark vars as initialized.
14913 Make sure 'resize_failed' is initialized.
14914 (run_window_configuration_change_hook): Rename local to avoid shadowing.
14915 (resize_window_apply): Remove unused local.
14916 * window.h (delete_deletable_window): Remove decl.
14917
109e28d0 14918 * image.c (gif_load, svg_load_image): Rename locals to avoid shadowing.
33290528
PE
14919 (imagemagick_load_image): Fix pointer signedness problem by changing
14920 last arg from unsigned char * to char *. All uses changed.
14921 Also, fix a local for similar reasons.
14922 Remove unused locals. Remove locals to avoid shadowing.
14923 (fn_rsvg_handle_free): Remove; unused.
14924 (svg_load, svg_load_image): Fix pointer signedness problem.
f7e13da3 14925 (imagemagick_load_image): Don't use garbage pointer image_wand.
33290528 14926
3f754b86
PE
14927 * ftfont.c (ftfont_get_metrics, ftfont_drive_otf): Remove unused locals.
14928
2547adb1
CY
149292011-06-10 Chong Yidong <cyd@stupidchicken.com>
14930
14931 * image.c (gif_load): Fix omitted cast error introduced by
14932 2011-06-06 change.
14933
2c8e37d4
MR
149342011-06-10 Martin Rudalics <rudalics@gmx.at>
14935
14936 * window.h (resize_proportionally, orig_total_lines)
14937 (orig_top_line): Remove from window structure.
14938 (set_window_height, set_window_width, change_window_heights)
14939 (Fdelete_window): Remove prototypes.
14940 (resize_frame_windows): Remove duplicate declaration.
14941
440a42e3
EZ
149422011-06-10 Eli Zaretskii <eliz@gnu.org>
14943
14944 * window.h (resize_frame_windows, resize_window_check)
14945 (delete_deletable_window, resize_root_window)
14946 (resize_frame_windows): Declare prototypes.
14947
14948 * window.c (resize_window_apply): Make definition be "static" to
14949 match the prototype.
14950
562dd5e9
MR
149512011-06-10 Martin Rudalics <rudalics@gmx.at>
14952
14953 * window.c: Remove declarations of Qwindow_size_fixed,
14954 window_min_size_1, window_min_size_2, window_min_size,
14955 size_window, window_fixed_size_p, enlarge_window, delete_window.
14956 Remove static from declaration of Qdelete_window, it's
14957 temporarily needed by Fbury_buffer.
14958 (replace_window): Don't assign orig_top_line and
14959 orig_total_lines.
14960 (Fdelete_window, delete_window): Remove. Window deletion is
14961 handled by window.el.
640c8776
SM
14962 (window_loop): Remove DELETE_OTHER_WINDOWS case.
14963 Replace Fdelete_window calls with calls to Qdelete_window.
562dd5e9
MR
14964 (Fdelete_other_windows): Remove. Deleting other windows is
14965 handled by window.el.
14966 (window_fixed_size_p): Remove. Fixed-sizeness of windows is
14967 handled in window.el.
14968 (window_min_size_2, window_min_size_1, window_min_size): Remove.
14969 Window minimum sizes are handled in window.el.
14970 (shrink_windows, size_window, set_window_height)
14971 (set_window_width, change_window_heights, window_height)
14972 (window_width, CURBEG, CURSIZE, enlarge_window)
14973 (adjust_window_trailing_edge, Fadjust_window_trailing_edge)
14974 (Fenlarge_window, Fshrink_window): Remove. Window resizing is
14975 handled in window.el.
14976 (make_dummy_parent): Rename to make_parent_window and give it a
14977 second argument horflag.
14978 (make_window): Don't set resize_proportionally any more.
14979 (Fsplit_window): Remove. Windows are split in window.el.
14980 (save_restore_action, save_restore_orig_size)
14981 (shrink_window_lowest_first, save_restore_orig_size): Remove.
14982 Resize mini windows in window.el.
14983 (grow_mini_window, shrink_mini_window): Implement by calling
14984 Qresize_root_window_vertically, resize_window_check and
14985 resize_window_apply.
640c8776
SM
14986 (saved_window, Fset_window_configuration, save_window_save):
14987 Do not handle orig_top_line, orig_total_lines, and
562dd5e9
MR
14988 resize_proportionally.
14989 (window_min_height, window_min_width): Move to window.el.
14990 (keys_of_window): Move bindings for delete-other-windows,
14991 split-window, delete-window and enlarge-window to window.el.
14992
14993 * buffer.c: Temporarily extern Qdelete_window.
14994 (Fbury_buffer): Temporarily call Qdelete_window instead of
14995 Fdelete_window (Fbury_buffer will move to window.el soon).
14996
14997 * frame.c (set_menu_bar_lines_1): Remove code handling
14998 orig_top_line and orig_total_lines.
14999
15000 * dispnew.c (adjust_frame_glyphs_initially): Don't use
15001 set_window_height but set heights directly.
15002 (change_frame_size_1): Use resize_frame_windows.
15003
15004 * xdisp.c (init_xdisp): Don't use set_window_height but set
15005 heights directly.
15006
640c8776
SM
15007 * xfns.c (x_set_menu_bar_lines, x_set_tool_bar_lines):
15008 Use resize_frame_windows instead of change_window_heights and run
562dd5e9
MR
15009 run_window_configuration_change_hook.
15010
15011 * w32fns.c (x_set_tool_bar_lines): Use resize_frame_windows
15012 instead of change_window_heights and run
15013 run_window_configuration_change_hook.
15014
1a13852e
MR
150152011-06-09 Martin Rudalics <rudalics@gmx.at>
15016
15017 * window.c (replace_window): Rename second argument REPLACEMENT to
15018 NEW. New third argument SETFLAG. Rewrite.
15019 (delete_window, make_dummy_parent): Call replace_window with
15020 third argument 1.
15021 (window_list_1): Move down in code.
15022 (run_window_configuration_change_hook): Move set_buffer part
15023 before select_frame_norecord part in order to unwind correctly.
15024 Rename count1 to count.
15025 (recombine_windows, delete_deletable_window, resize_root_window)
15026 (Fdelete_other_windows_internal)
15027 (Frun_window_configuration_change_hook, make_parent_window)
15028 (resize_window_check, resize_window_apply, Fresize_window_apply)
15029 (resize_frame_windows, Fsplit_window_internal)
640c8776
SM
15030 (Fdelete_window_internal, Fresize_mini_window_internal):
15031 New functions.
1a13852e
MR
15032 (syms_of_window): New variables Vwindow_splits and Vwindow_nest.
15033
f3d1777e
MR
150342011-06-08 Martin Rudalics <rudalics@gmx.at>
15035
496e208e
MR
15036 * window.h (window): Add some new members to window structure -
15037 normal_lines, normal_cols, new_total, new_normal, clone_number,
15038 splits, nest, prev_buffers, next_buffers.
15039 (WINDOW_TOTAL_SIZE): Move here from window.c.
b9e809c2 15040 (MIN_SAFE_WINDOW_WIDTH, MIN_SAFE_WINDOW_HEIGHT): Define here.
496e208e 15041
f3d1777e
MR
15042 * window.c (Fwindow_height, Fwindow_width, Fwindow_full_width_p):
15043 Remove.
496e208e
MR
15044 (make_dummy_parent): Set new members of windows structure.
15045 (make_window): Move down in code. Handle new members of window
15046 structure.
15047 (Fwindow_clone_number, Fwindow_splits, Fset_window_splits)
15048 (Fwindow_nest, Fset_window_nest, Fwindow_new_total)
15049 (Fwindow_normal_size, Fwindow_new_normal, Fwindow_prev_buffers)
15050 (Fset_window_prev_buffers, Fwindow_next_buffers)
640c8776
SM
15051 (Fset_window_next_buffers, Fset_window_clone_number):
15052 New functions.
496e208e
MR
15053 (Fwindow_hscroll, Fwindow_at, Fwindow_point, Fwindow_start)
15054 (Fwindow_end, Fwindow_line_height, Fset_window_dedicated_p):
15055 Doc-string fixes.
15056 (Fwindow_parameters, Fwindow_parameter, Fset_window_parameter):
15057 Argument WINDOW can be now internal window too.
15058 (Fwindow_use_time): Move up in code.
15059 (Fget_buffer_window): Rename argument FRAME to ALL-FRAMES.
15060 Rewrite doc-string.
15061 (Fset_window_configuration, saved_window)
15062 (Fcurrent_window_configuration, save_window_save): Handle new
15063 members of window structure.
b9e809c2
MR
15064 (WINDOW_TOTAL_SIZE, MIN_SAFE_WINDOW_WIDTH)
15065 (MIN_SAFE_WINDOW_HEIGHT): Move to window.h.
15066 (syms_of_window): New Lisp objects Qrecord_window_buffer,
15067 Qwindow_deletable_p, Qdelete_window, Qreplace_buffer_in_windows,
15068 Qget_mru_window, Qresize_root_window,
15069 Qresize_root_window_vertically, Qsafe, Qabove, Qbelow,
15070 Qauto_buffer_name; staticpro them.
f3d1777e 15071
abde8f8c
MR
150722011-06-07 Martin Rudalics <rudalics@gmx.at>
15073
15074 * window.c (Fwindow_total_size, Fwindow_left_column)
15075 (Fwindow_top_line, window_body_lines, Fwindow_body_size)
15076 (Fwindow_list_1): New functions.
15077 (window_box_text_cols): Replace with window_body_cols.
640c8776
SM
15078 (Fwindow_width, Fscroll_left, Fscroll_right):
15079 Use window_body_cols instead of window_box_text_cols.
15080 (delete_window, Fset_window_configuration):
15081 Call delete_all_subwindows with window as argument.
fa8a67e6
MR
15082 (delete_all_subwindows): Take a window as argument and not a
15083 structure. Rewrite.
190b47e6
MR
15084 (window_loop): Remove handling of GET_LRU_WINDOW and
15085 GET_LARGEST_WINDOW.
15086 (Fget_lru_window, Fget_largest_window): Move to window.el.
abde8f8c
MR
15087
15088 * window.h: Extern window_body_cols instead of
fa8a67e6
MR
15089 window_box_text_cols. delete_all_subwindows now takes a
15090 Lisp_Object as argument.
abde8f8c 15091
640c8776
SM
15092 * indent.c (compute_motion, Fcompute_motion):
15093 Use window_body_cols instead of window_box_text_cols.
abde8f8c 15094
fa8a67e6
MR
15095 * frame.c (delete_frame): Call delete_all_subwindows with root
15096 window as argument.
15097
a54e3482
DC
150982011-06-07 Daniel Colascione <dan.colascione@gmail.com>
15099
15100 * fns.c (Fputhash): Document return value.
15101
60002bf5
CY
151022011-06-06 Chong Yidong <cyd@stupidchicken.com>
15103
15104 * image.c (gif_load): Implement gif89a spec "no disposal" method.
15105
0c671da6 151062011-06-06 Paul Eggert <eggert@cs.ucla.edu>
ccd9a01a 15107
b862a52a 15108 Cons<->int and similar integer overflow fixes (Bug#8794).
77984278 15109
be44ca6c
PE
15110 Check for overflow when converting integer to cons and back.
15111 * charset.c (Fdefine_charset_internal, Fdecode_char):
15112 Use cons_to_unsigned to catch overflow.
15113 (Fencode_char): Use INTEGER_TO_CONS.
15114 * composite.h (LGLYPH_CODE): Use cons_to_unsigned.
15115 (LGLYPH_SET_CODE): Use INTEGER_TO_CONS.
15116 * data.c (long_to_cons, cons_to_long): Remove.
15117 (cons_to_unsigned, cons_to_signed): New functions.
15118 These signal an error for invalid or out-of-range values.
15119 * dired.c (Ffile_attributes): Use INTEGER_TO_CONS.
15120 * fileio.c (Fset_visited_file_modtime): Use CONS_TO_INTEGER.
15121 * font.c (Ffont_variation_glyphs):
15122 * fontset.c (Finternal_char_font): Use INTEGER_TO_CONS.
15123 * lisp.h: Include <intprops.h>.
15124 (INTEGER_TO_CONS, CONS_TO_INTEGER): New macros.
15125 (cons_to_signed, cons_to_unsigned): New decls.
15126 (long_to_cons, cons_to_long): Remove decls.
15127 * undo.c (record_first_change): Use INTEGER_TO_CONS.
15128 (Fprimitive_undo): Use CONS_TO_INTEGER.
15129 * xfns.c (Fx_window_property): Likewise.
15130 * xselect.c: Include <limits.h>.
15131 (x_own_selection, selection_data_to_lisp_data):
15132 Use INTEGER_TO_CONS.
15133 (x_handle_selection_request, x_handle_selection_clear)
15134 (x_get_foreign_selection, Fx_disown_selection_internal)
15135 (Fx_get_atom_name, x_send_client_event): Use CONS_TO_INTEGER.
15136 (lisp_data_to_selection_data): Use cons_to_unsigned.
15137 (x_fill_property_data): Use cons_to_signed.
15138 Report values out of range.
15139
d1f3d2af
PE
15140 Check for buffer and string overflow more precisely.
15141 * buffer.h (BUF_BYTES_MAX): New macro.
15142 * lisp.h (STRING_BYTES_MAX): New macro.
15143 * alloc.c (Fmake_string):
15144 * character.c (string_escape_byte8):
15145 * coding.c (coding_alloc_by_realloc):
15146 * doprnt.c (doprnt):
15147 * editfns.c (Fformat):
15148 * eval.c (verror):
15149 Use STRING_BYTES_MAX, not MOST_POSITIVE_FIXNUM,
15150 since they may not be the same number.
15151 * editfns.c (Finsert_char):
15152 * fileio.c (Finsert_file_contents):
15153 Likewise for BUF_BYTES_MAX.
15154
dd52fcea
PE
15155 * image.c: Use ptrdiff_t, not int, for sizes.
15156 (slurp_file): Switch from int to ptrdiff_t.
15157 All uses changed.
15158 (slurp_file): Check that file size fits in both size_t (for
15159 malloc) and ptrdiff_t (for sanity and safety).
15160
7f9bbdbb
PE
15161 * fileio.c (Fverify_visited_file_modtime): Avoid time overflow
15162 if b->modtime has its maximal value.
15163
dfe18f82
PE
15164 * dired.c (Ffile_attributes): Don't assume EMACS_INT has >32 bits.
15165
84acfcf0
PE
15166 Don't assume time_t can fit into int.
15167 * buffer.h (struct buffer.modtime): Now time_t, not int.
15168 * fileio.c (Fvisited_file_modtime): No need for time_t cast now.
15169 * undo.c (Fprimitive_undo): Use time_t, not int, for time_t value.
15170
ccd9a01a
PE
15171 Minor fixes for signed vs unsigned integers.
15172 * character.h (MAYBE_UNIFY_CHAR):
15173 * charset.c (maybe_unify_char):
15174 * keyboard.c (read_char, reorder_modifiers):
15175 XINT -> XFASTINT, since the integer must be nonnegative.
15176 * ftfont.c (ftfont_spec_pattern):
15177 * keymap.c (access_keymap, silly_event_symbol_error):
15178 XUINT -> XFASTINT, since the integer must be nonnegative.
15179 (Fsingle_key_description, preferred_sequence_p): XUINT -> XINT,
15180 since it makes no difference and we prefer signed.
15181 * keyboard.c (record_char): Use XUINT when all the neighbors do.
15182 (access_keymap): NATNUMP -> INTEGERP, since the integer must be
15183 nonnegative.
15184
d6d100dd
SM
151852011-06-06 Stefan Monnier <monnier@iro.umontreal.ca>
15186
15187 * window.h (Fwindow_frame): Declare.
15188
2b6148e4
PE
151892011-06-06 Paul Eggert <eggert@cs.ucla.edu>
15190
15191 * alloc.c: Simplify handling of large-request failures (Bug#8800).
15192 (SPARE_MEMORY): Always define.
15193 (LARGE_REQUEST): Remove.
15194 (memory_full): Use SPARE_MEMORY rather than LARGE_REQUEST.
15195
f230ecc9
MR
151962011-06-06 Martin Rudalics <rudalics@gmx.at>
15197
727e958e
MR
15198 * lisp.h: Move EXFUNS for Fframe_root_window,
15199 Fframe_first_window and Fset_frame_selected_window to window.h.
15200
15201 * window.h: Move EXFUNS for Fframe_root_window,
15202 Fframe_first_window and Fset_frame_selected_window here from
15203 lisp.h.
15204
15205 * frame.c (Fwindow_frame, Fframe_first_window)
15206 (Fframe_root_window, Fframe_selected_window)
15207 (Fset_frame_selected_window): Move to window.c.
15208 (Factive_minibuffer_window): Move to minibuf.c.
15209 (Fother_visible_frames_p): New function.
15210
15211 * minibuf.c (Factive_minibuffer_window): Move here from frame.c.
15212
f230ecc9
MR
15213 * window.c (decode_window, decode_any_window): Move up in code.
15214 (Fwindowp, Fwindow_live_p): Rewrite doc-strings.
15215 (inhibit_frame_unsplittable): Remove unused variable.
bf60a96b
MR
15216 (Fwindow_buffer): Move up and rewrite doc-string.
15217 (Fwindow_parent, Fwindow_vchild, Fwindow_hchild, Fwindow_next)
15218 (Fwindow_prev): New functions.
727e958e
MR
15219 (Fwindow_frame): Move here from frame.c. Accept any window as
15220 argument.
15221 (Fframe_root_window, Fframe_first_window)
15222 (Fframe_selected_window): Move here from frame.c. Accept frame
15223 or arbitrary window as argument. Update doc-strings.
15224 (Fminibuffer_window): Move up in code.
15225 (Fwindow_minibuffer_p): Move up in code and simplify.
d6d100dd
SM
15226 (Fset_frame_selected_window): Move here from frame.c.
15227 Marginal rewrite.
727e958e
MR
15228 (Fselected_window, select_window, Fselect_window): Move up in
15229 code. Minor doc-string fixes.
f230ecc9 15230
4d09bcf6
PE
152312011-06-06 Paul Eggert <eggert@cs.ucla.edu>
15232
15233 * alloc.c (memory_full) [SYSTEM_MALLOC]: Port to MacOS (Bug#8800).
15234 Do not assume that spare memory exists; that assumption is valid
15235 only if SYSTEM_MALLOC.
15236 (LARGE_REQUEST): New macro, so that the issue of large requests
15237 is separated from the issue of spare memory.
15238
810928a2
AS
152392011-06-05 Andreas Schwab <schwab@linux-m68k.org>
15240
172418ad
AS
15241 * editfns.c (Fformat): Correctly handle zero flag with hexadecimal
15242 format. (Bug#8806)
15243
43f862f7
AS
15244 * gtkutil.c (xg_get_default_scrollbar_width): Avoid warning.
15245
810928a2
AS
15246 * xfns.c (x_set_scroll_bar_default_width): Move declarations
15247 before statements.
15248
a059fe24
JD
152492011-06-05 Jan Djärv <jan.h.d@swipnet.se>
15250
15251 * gtkutil.c (xg_get_default_scrollbar_width): New function.
15252
15253 * gtkutil.h: Declare xg_get_default_scrollbar_width.
15254
15255 * xfns.c (x_set_scroll_bar_default_width): If USE_GTK, get
15256 min width by calling x_set_scroll_bar_default_width (Bug#8505).
15257
989bf368
JB
152582011-06-05 Juanma Barranquero <lekktu@gmail.com>
15259
15260 * xdisp.c (single_display_spec_intangible_p): Remove declaration.
15261
4b80f674
CY
152622011-06-04 Chong Yidong <cyd@stupidchicken.com>
15263
15264 * xselect.c (x_clipboard_manager_save): Remove redundant arg.
15265 (x_clipboard_manager_save): Add return value.
d6d100dd
SM
15266 (x_clipboard_manager_error_1, x_clipboard_manager_error_2):
15267 New error handlers.
4b80f674
CY
15268 (x_clipboard_manager_save_frame, x_clipboard_manager_save_all):
15269 Obey Vx_select_enable_clipboard_manager. Catch errors in
15270 x_clipboard_manager_save (Bug#8779).
15271 (Vx_select_enable_clipboard_manager): New variable.
de65b42c 15272 (x_get_foreign_selection): Reduce scope of x_catch_errors (Bug#8790).
4b80f674 15273
99a33b77 152742011-06-04 Dan Nicolaescu <dann@ics.uci.edu>
8b3115e7
DN
15275
15276 * emacs.c (main): Warn when starting a GTK emacs in daemon mode.
15277
99a33b77 152782011-06-04 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
14eca62f
YM
15279
15280 * fringe.c (update_window_fringes): Don't update overlay arrow bitmap
15281 in the current matrix if keep_current_p is non-zero.
15282
8264569d
EZ
152832011-06-04 Eli Zaretskii <eliz@gnu.org>
15284
15285 * bidi.c (bidi_level_of_next_char): Fix last change.
15286
57f97249
EZ
152872011-06-03 Eli Zaretskii <eliz@gnu.org>
15288
fec2107c 15289 Support bidi reordering of text covered by display properties.
57f97249 15290
fec2107c
EZ
15291 * bidi.c (bidi_copy_it): Use offsetof instead of emulating it.
15292 (bidi_fetch_char, bidi_fetch_char_advance): New functions.
15293 (bidi_cache_search, bidi_cache_iterator_state)
15294 (bidi_paragraph_init, bidi_resolve_explicit, bidi_resolve_weak)
d6d100dd
SM
15295 (bidi_level_of_next_char, bidi_move_to_visually_next):
15296 Support character positions inside a run of characters covered by a
fec2107c
EZ
15297 display string.
15298 (bidi_paragraph_init, bidi_resolve_explicit_1)
15299 (bidi_level_of_next_char): Call bidi_fetch_char and
15300 bidi_fetch_char_advance instead of FETCH_CHAR and
15301 FETCH_CHAR_ADVANCE.
15302 (bidi_init_it): Initialize new members.
15303 (LRE_CHAR, RLE_CHAR, PDF_CHAR, LRO_CHAR, RLO_CHAR): Remove macro
15304 definitions.
15305 (bidi_explicit_dir_char): Lookup character type in bidi_type_table,
15306 instead of using explicit *_CHAR codes.
d6d100dd
SM
15307 (bidi_resolve_explicit, bidi_resolve_weak):
15308 Use FETCH_MULTIBYTE_CHAR instead of FETCH_CHAR, as reordering of
fec2107c
EZ
15309 bidirectional text is supported only in multibyte buffers.
15310 (bidi_init_it): Accept additional argument FRAME_WINDOW_P and use
15311 it to initialize the frame_window_p member of struct bidi_it.
15312 (bidi_cache_iterator_state, bidi_resolve_explicit_1)
15313 (bidi_resolve_explicit, bidi_resolve_weak)
15314 (bidi_level_of_next_char, bidi_move_to_visually_next): Abort if
15315 bidi_it->nchars is non-positive.
15316 (bidi_level_of_next_char): Don't try to lookup the cache for the
15317 next/previous character if nothing is cached there yet, or if we
15318 were just reseat()'ed to a new position.
c40e2fb2 15319
0e14fe90
EZ
15320 * xdisp.c (set_cursor_from_row): Set start and stop points
15321 according to the row's direction when priming the loop that looks
15322 for the glyph on which to display cursor.
15323 (single_display_spec_intangible_p): Function deleted.
15324 (display_prop_intangible_p): Reimplement to call
15325 handle_display_spec instead of single_display_spec_intangible_p.
d6d100dd
SM
15326 Accept 3 additional arguments needed by handle_display_spec.
15327 This fixes incorrect cursor motion across display property with complex
0e14fe90
EZ
15328 values: lists, `(when COND...)' forms, etc.
15329 (single_display_spec_string_p): Support property values that are
15330 lists with the argument STRING its top-level element.
15331 (display_prop_string_p): Fix the condition for processing a
15332 property that is a list to be consistent with handle_display_spec.
fec2107c 15333 (handle_display_spec): New function, refactored from the
fc6f18ce
EZ
15334 last portion of handle_display_prop.
15335 (compute_display_string_pos): Accept additional argument
15336 FRAME_WINDOW_P. Call handle_display_spec to determine whether the
15337 value of a `display' property is a "replacing spec".
15338 (handle_single_display_spec): Accept 2 additional arguments BUFPOS
15339 and FRAME_WINDOW_P. If IT is NULL, don't set up the iterator from
15340 the display property, but just return a value indicating whether
15341 the display property will replace the characters it covers.
15342 (Fcurrent_bidi_paragraph_direction): Initialize the nchars and
15343 frame_window_p members of struct bidi_it.
d6d100dd
SM
15344 (compute_display_string_pos, compute_display_string_end):
15345 New functions.
fec2107c
EZ
15346 (push_it): Accept second argument POSITION, where pop_it should
15347 jump to continue iteration.
15348 (reseat_1): Initialize bidi_it.disp_pos.
fc6f18ce 15349
fec2107c
EZ
15350 * keyboard.c (adjust_point_for_property): Adjust the call to
15351 display_prop_intangible_p to its new signature.
fc6f18ce
EZ
15352
15353 * dispextern.h (struct bidi_it): New member frame_window_p.
fec2107c
EZ
15354 (bidi_init_it): Update prototypes.
15355 (display_prop_intangible_p): Update prototype.
d6d100dd
SM
15356 (compute_display_string_pos, compute_display_string_end):
15357 Declare prototypes.
fec2107c
EZ
15358 (struct bidi_it): New members nchars and disp_pos. ch_len is now
15359 EMACS_INT.
fc6f18ce 15360
40087514 153612011-06-02 Paul Eggert <eggert@cs.ucla.edu>
0de4bb68 15362
57f53182
PE
15363 Malloc failure behavior now depends on size of allocation.
15364 * alloc.c (buffer_memory_full, memory_full): New arg NBYTES.
15365 * lisp.h: Change signatures accordingly.
15366 * alloc.c, buffer.c, editfns.c, menu.c, minibuf.c, xterm.c:
15367 All callers changed. (Bug#8762)
15368
15369 * gnutls.c: Use Emacs's memory allocators.
15370 Without this change, the gnutls library would invoke malloc etc.
15371 directly, which causes problems on non-SYNC_INPUT hosts, and which
15372 runs afoul of improving memory_full behavior. (Bug#8761)
15373 (fn_gnutls_global_set_mem_functions): New macro or function pointer.
15374 (emacs_gnutls_global_init): Use it to specify xmalloc, xrealloc,
15375 xfree instead of the default malloc, realloc, free.
15376 (Fgnutls_boot): No need to check for memory allocation failure,
15377 since xmalloc does that for us.
15378
ac32cd99 15379 Remove arbitrary limit of 2**31 entries in hash tables. (Bug#8771)
3870d916
PE
15380 * category.c (hash_get_category_set):
15381 * ccl.c (ccl_driver):
15382 * charset.c (Fdefine_charset_internal):
15383 * charset.h (struct charset.hash_index):
15384 * composite.c (get_composition_id, gstring_lookup_cache)
15385 (composition_gstring_put_cache):
15386 * composite.h (struct composition.hash_index):
15387 * dispextern.h (struct image.hash):
15388 * fns.c (next_almost_prime, larger_vector, cmpfn_eql)
15389 (cmpfn_equal, cmpfn_user_defined, hashfn_eq, hashfn_eql)
15390 (hashfn_equal, hashfn_user_defined, make_hash_table)
15391 (maybe_resize_hash_table, hash_lookup, hash_put)
15392 (hash_remove_from_table, hash_clear, sweep_weak_table, SXHASH_COMBINE)
15393 (sxhash_string, sxhash_list, sxhash_vector, sxhash_bool_vector)
15394 (Fsxhash, Fgethash, Fputhash, Fmaphash):
15395 * image.c (make_image, search_image_cache, lookup_image)
15396 (xpm_put_color_table_h):
15397 * lisp.h (struct Lisp_Hash_Table):
0de4bb68 15398 * minibuf.c (Ftry_completion, Fall_completions, Ftest_completion):
ac389d0c 15399 * print.c (print): Use 'EMACS_UINT' and 'EMACS_INT'
3870d916 15400 for hashes and hash indexes, instead of 'unsigned' and 'int'.
40087514
PE
15401 * alloc.c (allocate_vectorlike):
15402 Check for overflow in vector size calculations.
15403 * ccl.c (ccl_driver):
15404 Check for overflow when converting EMACS_INT to int.
0de4bb68
PE
15405 * fns.c, image.c: Remove unnecessary static decls that would otherwise
15406 need to be updated by these changes.
40087514
PE
15407 * fns.c (make_hash_table, maybe_resize_hash_table):
15408 Check for integer overflow with large hash tables.
0de4bb68
PE
15409 (make_hash_table, maybe_resize_hash_table, Fmake_hash_table):
15410 Prefer the faster XFLOAT_DATA to XFLOATINT where either will do.
15411 (SXHASH_REDUCE): New macro.
15412 (sxhash_string, sxhash_list, sxhash_vector, sxhash_bool_vector):
15413 Use it instead of discarding useful hash info with large hash values.
15414 (sxhash_float): New function.
15415 (sxhash): Use it. No more need for "& INTMASK" due to above changes.
15416 * lisp.h (FIXNUM_BITS): New macro, useful for SXHASH_REDUCE etc.
40087514
PE
15417 (MOST_NEGATIVE_FIXNUM, MOST_POSITIVE_FIXNUM, INTMASK):
15418 Rewrite to use FIXNUM_BITS, as this simplifies things.
0de4bb68
PE
15419 (next_almost_prime, larger_vector, sxhash, hash_lookup, hash_put):
15420 Adjust signatures to match updated version of code.
15421 (consing_since_gc): Now EMACS_INT, since a single hash table can
15422 use more than INT_MAX bytes.
15423
698d32e2
DN
154242011-06-01 Dan Nicolaescu <dann@ics.uci.edu>
15425
15426 Make it possible to build with GCC-4.6+ -O2 -flto.
15427
15428 * emacs.c (__malloc_initialize_hook): Mark as EXTERNALLY_VISIBLE.
15429
fd6fa53f
SM
154302011-06-01 Stefan Monnier <monnier@iro.umontreal.ca>
15431
15432 * minibuf.c (get_minibuffer, read_minibuf_unwind):
15433 Call minibuffer-inactive-mode.
15434
864db017
JB
154352011-05-31 Juanma Barranquero <lekktu@gmail.com>
15436
15437 * makefile.w32-in ($(BLD)/data.$(O), $(BLD)/editfns.$(O)):
15438 Update dependencies.
15439
2ad0baf4
DN
154402011-05-31 Dan Nicolaescu <dann@ics.uci.edu>
15441
15442 * data.c (init_data): Remove code for UTS, this system is not
15443 supported anymore.
15444
4fcc2638
DN
154452011-05-31 Dan Nicolaescu <dann@ics.uci.edu>
15446
15447 Don't force ./temacs to start in terminal mode.
15448
15449 * frame.c (make_initial_frame): Initialize faces in all cases, not
15450 only when CANNOT_DUMP is defined.
15451 * dispnew.c (init_display): Remove CANNOT_DUMP condition.
15452
c56e0fd5
DN
154532011-05-31 Dan Nicolaescu <dann@ics.uci.edu>
15454
15455 * dispnew.c (add_window_display_history): Use const for the string
15456 pointer. Remove declaration, not needed.
15457
333d54da 154582011-05-31 Paul Eggert <eggert@cs.ucla.edu>
9cf9f756 15459
55d4c1b2 15460 Use 'inline', not 'INLINE'.
333d54da 15461 <http://lists.gnu.org/archive/html/emacs-devel/2011-05/msg00914.html>
55d4c1b2
PE
15462 * alloc.c, fontset.c (INLINE): Remove.
15463 * alloc.c, bidi.c, charset.c, coding.c, dispnew.c, fns.c, image.c:
15464 * intervals.c, keyboard.c, process.c, syntax.c, textprop.c, w32term.c:
15465 * xdisp.c, xfaces.c, xterm.c: Replace all uses of INLINE with inline.
15466 * gmalloc.c (register_heapinfo): Use inline unconditionally.
15467 * lisp.h (LISP_MAKE_RVALUE): Use inline, not __inline__.
15468
738db178
DN
154692011-05-31 Dan Nicolaescu <dann@ics.uci.edu>
15470
15471 Make it possible to run ./temacs.
15472
15473 * callproc.c (set_initial_environment): Remove CANNOT_DUMP code,
15474 syms_of_callproc does the same thing. Remove test for
15475 "initialized", do it in the caller.
15476 * emacs.c (main): Avoid calling set_initial_environment when dumping.
15477
620c53a6
SM
154782011-05-31 Stefan Monnier <monnier@iro.umontreal.ca>
15479
15480 * minibuf.c (Finternal_complete_buffer): Return `category' metadata.
15481 (read_minibuf): Use get_minibuffer.
15482 (syms_of_minibuf): Use DEFSYM.
15483 (Qmetadata): New var.
15484 * data.c (Qbuffer): Don't make it static.
15485 (syms_of_data): Use DEFSYM.
15486
e003a292
PE
154872011-05-31 Paul Eggert <eggert@cs.ucla.edu>
15488
15489 * ccl.c (CCL_CODE_RANGE): Allow negative numbers. (Bug#8751)
15490 (CCL_CODE_MIN): New macro.
15491
ed008a6d
PE
154922011-05-30 Paul Eggert <eggert@cs.ucla.edu>
15493
3687c2ef
PE
15494 * alloc.c (lisp_align_malloc): Omit unnecessary val==NULL tests.
15495
ed008a6d
PE
15496 * eval.c (Qdebug): Now static.
15497 * lisp.h (Qdebug): Remove decl. This reverts a part of the
15498 2011-04-26T11:26:05Z!dan.colascione@gmail.com that inadvertently undid part of
15499 2011-04-14T06:48:41Z!eggert@cs.ucla.edu.
15500
d66c4c7c
CY
155012011-05-29 Chong Yidong <cyd@stupidchicken.com>
15502
15503 * image.c: Various fixes to ImageMagick code comments.
15504 (Fimagemagick_types): Doc fix.
15505
5fbc2025
PE
155062011-05-29 Paul Eggert <eggert@cs.ucla.edu>
15507
0196f88a
PE
15508 Minor fixes prompted by GCC 4.6.0 warnings.
15509
15510 * xselect.c (converted_selections, conversion_fail_tag): Now static.
15511
5fbc2025
PE
15512 * emacs.c [HAVE_X_WINDOWS]: Include "xterm.h".
15513 (x_clipboard_manager_save_all): Move extern decl to ...
15514 * xterm.h: ... here, so that it can be checked for consistency.
15515
1dd3c2d9
CY
155162011-05-29 Chong Yidong <cyd@stupidchicken.com>
15517
15518 * xselect.c (x_clipboard_manager_save_frame)
15519 (x_clipboard_manager_save_all): New functions.
15520 (Fx_clipboard_manager_save): Lisp function deleted.
15521
15522 * emacs.c (Fkill_emacs): Call x_clipboard_manager_save_all.
15523 * frame.c (delete_frame): Call x_clipboard_manager_save_frame.
15524
15525 * xterm.h: Update prototype.
15526
5ba6571d
WX
155272011-05-28 William Xu <william.xwl@gmail.com>
15528
15529 * nsterm.m (ns_term_shutdown): Synchronize user defaults before
15530 exiting (Bug#8239).
15531
3eaff834
JM
155322011-05-28 Jim Meyering <meyering@redhat.com>
15533
e1900994 15534 Avoid a sign-extension bug in crypto_hash_function.
3eaff834
JM
15535 * fns.c (to_uchar): Define.
15536 (crypto_hash_function): Use it to convert some newly-signed
15537 variables to unsigned, to avoid sign-extension bugs. For example,
15538 without this change, (md5 "truc") would evaluate to
15539 45723a2aff78ff4fff7fff1114760e62 rather than the expected
15540 45723a2af3788c4ff17f8d1114760e62. Reported by Antoine Levitt in
e1900994 15541 https://lists.gnu.org/archive/html/emacs-devel/2011-05/msg00883.html.
3eaff834 15542
0f6990a7
PE
155432011-05-27 Paul Eggert <eggert@cs.ucla.edu>
15544
15545 Integer overflow fixes.
c8a9ca5a 15546
08686060
PE
15547 * dbusbind.c: Serial number integer overflow fixes.
15548 (CHECK_DBUS_SERIAL_GET_SERIAL): New macro.
08686060
PE
15549 (Fdbus_call_method_asynchronously, xd_read_message_1): Use a float
15550 to hold a serial number that is too large for a fixnum.
15551 (Fdbus_method_return_internal, Fdbus_method_error_internal):
15552 Check for serial numbers out of range. Decode any serial number
59568bf0 15553 that was so large that it became a float. (Bug#8722)
08686060 15554
2d1fc3c7
PE
15555 * dbusbind.c: Use XFASTINT rather than XUINT, and check for nonneg.
15556 (Fdbus_call_method, Fdbus_call_method_asynchronously):
15557 Use XFASTINT rather than XUINT when numbers are nonnegative.
15558 (xd_append_arg, Fdbus_method_return_internal):
15559 (Fdbus_method_error_internal): Likewise. Also, for unsigned
15560 arguments, check that Lisp number is nonnegative, rather than
59568bf0 15561 silently wrapping negative numbers around. (Bug#8722)
30217ff0 15562 (xd_read_message_1): Don't assume dbus_uint32_t can fit in int.
59568bf0 15563 (Bug#8722)
2d1fc3c7 15564
c8a9ca5a
PE
15565 * data.c (arith_driver, Flsh): Avoid unnecessary casts to EMACS_UINT.
15566
519e1d69
PE
15567 * ccl.c (ccl_driver): Redo slightly to avoid the need for 'unsigned'.
15568
6df6ae42 15569 ccl: Add integer overflow checks.
30569699
PE
15570 * ccl.c (CCL_CODE_MAX, GET_CCL_RANGE, GET_CCL_CODE, GET_CCL_INT):
15571 (IN_INT_RANGE): New macros.
15572 (ccl_driver): Use them to check for integer overflow when
15573 decoding a CCL program. Many of the new checks are whether XINT (x)
15574 fits in int; it doesn't always, on 64-bit hosts. The new version
15575 doesn't catch all possible integer overflows, but it's an
847044ea 15576 improvement. (Bug#8719)
30569699 15577
c11285dc
PE
15578 * alloc.c (make_event_array): Use XINT, not XUINT.
15579 There's no need for unsigned here.
15580
fdccd48e
PE
15581 * mem-limits.h (EXCEEDS_LISP_PTR) [!USE_LSB_TAG]: EMACS_UINT -> uintptr_t
15582 This follows up to the 2011-05-06 change that substituted uintptr_t
15583 for EMACS_INT. This case wasn't caught back then.
15584
37910ab2
PE
15585 Rework Fformat to avoid integer overflow issues.
15586 * editfns.c: Include <float.h> unconditionally, as it's everywhere
15587 now (part of C89). Include <verify.h>.
15588 (MAX_10_EXP, CONVERTED_BYTE_SIZE): Remove; no longer needed.
15589 (pWIDE, pWIDElen, signed_wide, unsigned_wide): New defns.
15590 (Fformat): Avoid the prepass trying to compute sizes; it was only
15591 approximate and thus did not catch overflow reliably. Instead, walk
15592 through the format just once, formatting and computing sizes as we go,
15593 checking for integer overflow at every step, and allocating a larger
15594 buffer as needed. Keep track separately whether the format is
15595 multibyte. Keep only the most-recently calculated precision, rather
15596 than them all. Record whether each argument has been converted to
15597 string. Use EMACS_INT, not int, for byte and char and arg counts.
15598 Support field widths and precisions larger than INT_MAX. Avoid
15599 sprintf's undefined behavior with conversion specifications such as %#d
15600 and %.0c. Fix bug with strchr succeeding on '\0' when looking for
15601 flags. Fix bug with (format "%c" 256.0). Avoid integer overflow when
15602 formatting out-of-range floating point numbers with int
9173deec 15603 formats. (Bug#8668)
37910ab2 15604
2e6578fb
PE
15605 * lisp.h (FIXNUM_OVERFLOW_P): Work even if arg is a NaN.
15606
0ae6bdee
PE
15607 * data.c: Avoid integer truncation in expressions involving floats.
15608 * data.c: Include <intprops.h>.
15609 (arith_driver): When there's an integer overflow in an expression
15610 involving floating point, convert the integers to floating point
15611 so that the resulting value does not suffer from catastrophic
15612 integer truncation. For example, on a 64-bit host (* 4
15613 most-negative-fixnum 0.5) should yield about -4.6e+18, not zero.
15614 Do not rely on undefined behavior after integer overflow.
15615
de883a70
PE
15616 merge count_size_as_multibyte, parse_str_to_multibyte
15617 * character.c, character.h (count_size_as_multibyte):
fd6fa53f 15618 Rename from parse_str_to_multibyte; all uses changed.
de883a70
PE
15619 Check for integer overflow.
15620 * insdel.c, lisp.h (count_size_as_multibyte): Remove,
15621 since it's now a duplicate of the other. This is more of
15622 a character than a buffer op, so better that it's in character.c.
15623 * fns.c, print.c: Adjust to above changes.
15624
2ff916cb
PE
156252011-05-27 Stefan Monnier <monnier@iro.umontreal.ca>
15626
15627 * xselect.c (x_convert_selection): Yet another int/Lisp_Object mixup.
15628
f1b54466
PE
156292011-05-27 Paul Eggert <eggert@cs.ucla.edu>
15630
fb1ac845
PE
15631 * xselect.c: Fix minor problems prompted by GCC 4.6.0 warnings.
15632 (x_handle_selection_request, frame_for_x_selection): Remove unused vars.
15633 (x_clipboard_manager_save): Now static.
15634 (Fx_clipboard_manager_save): Rename local to avoid shadowing.
15635
f1b54466
PE
15636 * fns.c: Fix minor problems prompted by GCC 4.6.0 warnings.
15637 (crypto_hash_function): Now static.
15638 Fix pointer signedness problems. Avoid unnecessary initializations.
15639
a9f737ee
CY
156402011-05-27 Chong Yidong <cyd@stupidchicken.com>
15641
15642 * termhooks.h (Vselection_alist): Make it terminal-local.
15643
15644 * terminal.c (create_terminal): Initialize it.
15645
15646 * xselect.c: Support for clipboard managers.
15647 (Vselection_alist): Move to termhooks.h as terminal-local var.
15648 (LOCAL_SELECTION): New macro.
15649 (x_atom_to_symbol): Handle x_display_info_for_display fail case.
15650 (symbol_to_x_atom): Remove gratuitous arg.
15651 (x_handle_selection_request, lisp_data_to_selection_data)
15652 (x_get_foreign_selection, Fx_register_dnd_atom): Callers changed.
620c53a6
SM
15653 (x_own_selection, x_get_local_selection, x_convert_selection):
15654 New arg, specifying work frame. Use terminal-local Vselection_alist.
a9f737ee
CY
15655 (some_frame_on_display): Delete unused function.
15656 (Fx_own_selection_internal, Fx_get_selection_internal)
15657 (Fx_disown_selection_internal, Fx_selection_owner_p)
15658 (Fx_selection_exists_p): New optional frame arg.
15659 (frame_for_x_selection, Fx_clipboard_manager_save): New functions.
15660 (x_handle_selection_clear): Don't treat other terminals with the
15661 same keyboard specially. Use the terminal-local Vselection_alist.
15662 (x_clear_frame_selections): Use Frun_hook_with_args.
15663
15664 * xterm.c (x_term_init): Intern ATOM and CLIPBOARD_MANAGER atoms.
15665
15666 * xterm.h: Add support for those atoms.
15667
e067f0c1
CY
156682011-05-26 Chong Yidong <cyd@stupidchicken.com>
15669
15670 * xselect.c: ICCCM-compliant handling of MULTIPLE targets.
15671 (converted_selections, conversion_fail_tag): New global variables.
15672 (x_selection_request_lisp_error): Free the above.
15673 (x_get_local_selection): Remove unnecessary code.
15674 (x_reply_selection_request): Args changed; handle arbitrary array
620c53a6
SM
15675 of converted selections stored in converted_selections.
15676 Separate the XChangeProperty and SelectionNotify steps.
e067f0c1
CY
15677 (x_handle_selection_request): Rewrite to handle MULTIPLE target.
15678 (x_convert_selection): New function.
15679 (x_handle_selection_event): Simplify.
15680 (x_get_foreign_selection): Don't ignore incoming requests while
15681 waiting for an answer; this will fail when we implement
15682 SAVE_TARGETS, and seems unnecessary anyway.
15683 (selection_data_to_lisp_data): Recognize ATOM_PAIR type.
15684 (Vx_sent_selection_functions): Doc fix.
15685
0f4aebc0
LL
156862011-05-26 Leo Liu <sdl.web@gmail.com>
15687
15688 * editfns.c (Ftranspose_regions): Allow empty regions. (Bug#8699)
15689
e61124cd
YM
156902011-05-25 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
15691
15692 * dispextern.h (struct glyph_row): New member fringe_bitmap_periodic_p.
15693
15694 * dispnew.c (shift_glyph_matrix, scrolling_window): Mark scrolled row
15695 for fringe update if it has periodic bitmap.
ac389d0c 15696 (row_equal_p): Also compare left_fringe_offset, right_fringe_offset,
e61124cd
YM
15697 and fringe_bitmap_periodic_p.
15698
15699 * fringe.c (get_fringe_bitmap_data): New function.
15700 (draw_fringe_bitmap_1, update_window_fringes): Use it.
15701 (update_window_fringes): Record periodicity of fringe bitmap in glyph
15702 row. Mark glyph row for fringe update if periodicity changed.
15703
15704 * xdisp.c (try_window_reusing_current_matrix): Don't mark scrolled row
15705 for fringe update unless it has periodic bitmap.
15706
f16d9837
KH
157072011-05-25 Kenichi Handa <handa@m17n.org>
15708
15709 * xdisp.c (get_next_display_element): Set correct it->face_id for
15710 a static composition.
15711
e1b90ef6
LL
157122011-05-24 Leo Liu <sdl.web@gmail.com>
15713
15714 * deps.mk (fns.o):
15715 * makefile.w32-in ($(BLD)/fns.$(O)): Include sha1.h.
15716
15717 * fns.c (crypto_hash_function, Fsha1): New function.
15718 (Fmd5): Use crypto_hash_function.
15719 (syms_of_fns): Add Ssha1.
15720
7400048f
PE
157212011-05-22 Paul Eggert <eggert@cs.ucla.edu>
15722
15723 * gnutls.c: Remove unused macros.
15724 (fn_gnutls_transport_set_lowat, fn_gnutls_transport_set_pull_function):
15725 (fn_gnutls_transport_set_push_function) [!WINDOWSNT]:
15726 Remove macros that are defined and never used.
15727 Caught by gcc -Wunused-macros (GCC 4.6.0, Fedora 14).
15728
abb71cf4
CY
157292011-05-22 Chong Yidong <cyd@stupidchicken.com>
15730
15731 * xselect.c (syms_of_xselect): Remove unused symbol SAVE_TARGETS.
15732 (Fx_get_selection_internal): Minor cleanup.
15733 (Fx_own_selection_internal): Rename arguments for consistency with
15734 select.el.
15735
6307db39
PE
157362011-05-22 Paul Eggert <eggert@cs.ucla.edu>
15737
15738 * xselect.c (QSAVE_TARGETS): New static var, to fix build failure.
15739
f3d4e0a4
CY
157402011-05-22 Chong Yidong <cyd@stupidchicken.com>
15741
15742 * xselect.c (syms_of_xselect): Include character.h; use DEFSYM.
15743
4d8ade89
YM
157442011-05-21 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
15745
15746 * dispnew.c (scrolling_window): Don't exclude the case that the
15747 last enabled row in the desired matrix touches the bottom boundary.
15748
32078c8d
GM
157492011-05-21 Glenn Morris <rgm@gnu.org>
15750
15751 * Makefile.in ($(etc)/DOC): Make second command line even shorter.
33cf345f
GM
15752 (SOME_MACHINE_OBJECTS): Replace FONT_OBJ by its maximal expansion,
15753 and add some more files.
32078c8d 15754
7285dc67
EZ
157552011-05-20 Eli Zaretskii <eliz@gnu.org>
15756
15757 * callproc.c (Fcall_process) [MSDOS]: Fix arguments to
15758 report_file_error introduced by the change from 2011-05-07.
15759
89d1bd22
PE
157602011-05-20 Paul Eggert <eggert@cs.ucla.edu>
15761
15762 * systime.h (Time): Define only if emacs is defined.
15763 This is to allow ../lib-src/profile.c to be compiled on FreeBSD,
15764 where the include path doesn't have X11/X.h by default. See
15765 <http://lists.gnu.org/archive/html/emacs-devel/2011-05/msg00561.html>.
15766
cd394be1 157672011-05-20 Kenichi Handa <handa@m17n.org>
31bfc35c
KH
15768
15769 * composite.c (find_automatic_composition): Fix previous change.
15770
b9704ad9
GM
157712011-05-20 Glenn Morris <rgm@gnu.org>
15772
15773 * lisp.mk: New file, split from Makefile.in.
15774 * Makefile.in (lisp): Move to separate file, inserted by @lisp_frag@.
15775 (shortlisp): Remove.
15776 ($(etc)/DOC): Edit lisp.mk rather than using $shortlisp.
15777
4a720484
GM
157782011-05-19 Glenn Morris <rgm@gnu.org>
15779
15780 * Makefile.in (MSDOS_SUPPORT_REAL, MSDOS_SUPPORT, NS_SUPPORT)
15781 (REAL_MOUSE_SUPPORT, GPM_MOUSE_SUPPORT, MOUSE_SUPPORT, TOOLTIP_SUPPORT)
15782 (BASE_WINDOW_SUPPORT, X_WINDOW_SUPPORT, WINDOW_SUPPORT): Remove.
15783 (lisp): Set the order to that of loadup.el.
15784 (shortlisp): Make it a copy of $lisp.
15785 (SOME_MACHINE_LISP): Remove.
15786 ($(etc)/DOC): Depend just on $lisp, not $SOME_MACHINE_LISP too.
15787 Use just $shortlisp, not $SOME_MACHINE_LISP too.
15788
a28d4396
KH
157892011-05-18 Kenichi Handa <handa@m17n.org>
15790
15791 * composite.c (CHAR_COMPOSABLE_P): Add more check for efficiency.
15792 (BACKWARD_CHAR): Wrap the arg STOP by parenthesis.
15793 (find_automatic_composition): Mostly rewrite for efficiency.
15794
a2b1fa8e
JB
157952011-05-18 Juanma Barranquero <lekktu@gmail.com>
15796
15797 * makefile.w32-in: Update dependencies.
15798
8e1f5610
CS
157992011-05-18 Christoph Scholtes <cschol2112@googlemail.com>
15800
15801 * menu.c: Include limits.h (fixes the MS-Windows build broken by
7d7d0045 15802 2011-06-18T18:49:19Z!cyd@stupidchicken.com).
8e1f5610 15803
7025ee00 158042011-05-18 Paul Eggert <eggert@cs.ucla.edu>
cb93f9be 15805
cdfa6eab
PE
15806 Fix some integer overflow issues, such as string length overflow.
15807
06d6db33
PE
15808 * insdel.c (count_size_as_multibyte): Check for string overflow.
15809
2b4560a8
PE
15810 * character.c (lisp_string_width): Check for string overflow.
15811 Use EMACS_INT, not int, for string indexes and lengths; in
15812 particular, 2nd arg is now EMACS_INT, not int. Do not crash if
15813 the resulting string length overflows an EMACS_INT; instead,
15814 report a string overflow if no precision given. When checking for
15815 precision exhaustion, use a check that cannot possibly have
15816 integer overflow. (Bug#8675)
15817 * character.h (lisp_string_width): Adjust to new signature.
15818
cb93f9be
PE
15819 * alloc.c (string_overflow): New function.
15820 (Fmake_string): Use it. This doesn't change behavior, but saves
15821 a few bytes and will simplify future changes.
15822 * character.c (string_escape_byte8): Likewise.
15823 * lisp.h (string_overflow): New decl.
15824
1a1f3366
PE
15825 Fixups, following up to the user-interface timestamp change.
15826 * nsterm.m (last_mouse_movement_time, ns_mouse_position): Use Time
15827 for UI timestamps, instead of unsigned long.
9fbd6841
PE
15828 * msdos.c (mouse_get_pos): Likewise.
15829 * w32inevt.c (movement_time, w32_console_mouse_position): Likewise.
1a1f3366
PE
15830 * w32gui.h (Time): Define by including "systime.h" rather than by
15831 declaring it ourselves. (Bug#8664)
15832
d4e3e4d3
PE
15833 * dispextern.h (struct image): Don't assume time_t <= unsigned long.
15834 * image.c (clear_image_cache): Likewise.
15835
f6a24d19
PE
15836 * term.c (term_mouse_position): Don't assume time_t wraparound.
15837
08dc5ae6
PE
15838 Be more systematic about user-interface timestamps.
15839 Before, the code sometimes used 'Time', sometimes 'unsigned long',
620c53a6
SM
15840 and sometimes 'EMACS_UINT', to represent these timestamps.
15841 This change causes it to use 'Time' uniformly, as that's what X uses.
08dc5ae6
PE
15842 This makes the code easier to follow, and makes it easier to catch
15843 integer overflow bugs such as Bug#8664.
15844 * frame.c (Fmouse_position, Fmouse_pixel_position):
15845 Use Time, not unsigned long, for user-interface timestamps.
15846 * keyboard.c (last_event_timestamp, kbd_buffer_get_event): Likewise.
15847 (button_down_time, make_lispy_position, make_lispy_movement): Likewise.
15848 * keyboard.h (last_event_timestamp): Likewise.
15849 * menu.c (Fx_popup_menu) [!HAVE_X_WINDOWS]: Likewise.
15850 * menu.h (xmenu_show): Likewise.
15851 * term.c (term_mouse_position): Likewise.
15852 * termhooks.h (struct input_event.timestamp): Likewise.
15853 (struct terminal.mouse_position_hook): Likewise.
15854 * xmenu.c (create_and_show_popup_menu, xmenu_show): Likewise.
15855 * xterm.c (XTmouse_position, x_scroll_bar_report_motion): Likewise.
15856 * systime.h (Time): New decl. Pull it in from <X11/X.h> if
15857 HAVE_X_WINDOWS, otherwise define it as unsigned long, which is
15858 what it was before.
15859 * menu.h, termhooks.h: Include "systime.h", for Time.
15860
8e55734a
PE
15861 * keyboard.c (make_lispy_event): Fix problem in integer overflow.
15862 Don't assume that the difference between two unsigned long values
15863 can fit into an integer. At this point, we know button_down_time
15864 <= event->timestamp, so the difference must be nonnegative, so
15865 there's no need to cast the result if double-click-time is
15866 nonnegative, as it should be; check that it's nonnegative, just in
15867 case. This bug is triggered when events are more than 2**31 ms
86db42d2 15868 apart (about 25 days). (Bug#8664)
8e55734a 15869
841f1b75 15870 * xselect.c (last_event_timestamp): Remove duplicate decl.
6434756c 15871 (x_own_selection): Remove needless cast to unsigned long.
841f1b75 15872
3e26f69c
PE
15873 * xmenu.c (set_frame_menubar): Use int, not EMACS_UINT, for indexes
15874 that always fit in int. Use a sentinel instead of a counter, to
15875 avoid a temp and to allay GCC's concerns about possible int overflow.
d230cb74
PE
15876 * frame.h (struct frame): Use int for menu_bar_items_used
15877 instead of EMACS_INT, since it always fits in int.
3e26f69c 15878
5cc152c0
PE
15879 * menu.c (grow_menu_items): Check for int overflow.
15880
d89eb65e
PE
15881 * xmenu.c (set_frame_menubar): Don't mishandle vectors with no nils.
15882
5235bd3e
PE
15883 * xterm.c: Use EMACS_INT for Emacs modifiers, and int for X modifiers.
15884 Before, the code was not consistent. These values cannot exceed
15885 2**31 - 1 so there's no need to make them unsigned.
15886 (x_x_to_emacs_modifiers): Accept int and return EMACS_INT.
15887 (x_emacs_to_x_modifiers): Accept EMACS_INT and return int.
15888 (x_x_to_emacs_modifiers, x_emacs_to_x_modifiers): Reject non-integers
15889 as modifiers.
15890 * xterm.h (x_x_to_emacs_modifiers): Adjust to signature change.
15891
bc827e23
PE
15892 * lisp.h (XINT) [USE_LISP_UNION_TYPE]: Cast to EMACS_INT.
15893 (XUINT) [USE_LISP_UNION_TYPE]: Cast to EMACS_UINT.
15894 Otherwise, GCC 4.6.0 warns about printf (pI, XINT (...)),
15895 presumably because the widths might not match.
15896
78eb494e
PE
15897 * window.c (size_window): Avoid needless test at loop start.
15898
04f2d78b
CB
158992011-05-18 Courtney Bane <emacs-bugs-7626@cbane.org> (tiny change)
15900
15901 * term.c (Fresume_tty): Restore hooks before reinitializing (bug#8687).
15902
d2fc7e3d 159032011-05-12 Drew Adams <drew.adams@oracle.com>
e531bdff
DA
15904
15905 * textprop.c (Fprevious_single_char_property_change): Doc fix (bug#8655).
15906
d2fc7e3d 159072011-05-12 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
7db47798
YM
15908
15909 * w32term.c (w32_draw_fringe_bitmap): Rename local vars `left' and
15910 `width' to `bar_area_x' and `bar_area_width', respectively.
15911 (x_scroll_run): Take account of fringe background extension.
15912
04f2d78b
CB
15913 * xterm.c (x_draw_fringe_bitmap) [USE_TOOLKIT_SCROLL_BARS]:
15914 Rename local vars `left' and `width' to `bar_area_x' and
7db47798
YM
15915 `bar_area_width', respectively.
15916 (x_scroll_run) [USE_TOOLKIT_SCROLL_BARS]: Take account of fringe
15917 background extension.
15918
79b70037
GM
159192011-05-10 Jim Meyering <meyering@redhat.com>
15920
15921 * xdisp.c (x_intersect_rectangles): Fix typo "the the -> the".
15922
2f142cc5
JB
159232011-05-10 Juanma Barranquero <lekktu@gmail.com>
15924
15925 * image.c (Finit_image_library): Return t for built-in image types,
15926 like pbm and xbm. (Bug#8640)
15927
57679c86
AS
159282011-05-09 Andreas Schwab <schwab@linux-m68k.org>
15929
15930 * w32menu.c (set_frame_menubar): Fix submenu allocation.
15931
888c9e86
EZ
159322011-05-07 Eli Zaretskii <eliz@gnu.org>
15933
b0512a1d
EZ
15934 * w32console.c (Fset_screen_color): Doc fix.
15935 (Fget_screen_color): New function.
15936 (syms_of_ntterm): Defsubr it.
15937
7285dc67
EZ
15938 * callproc.c (call_process_cleanup) [MSDOS]: Don't close and
15939 unlink the temporary file if Fcall_process didn't create it in the
15940 first place.
15941 (Fcall_process) [MSDOS]: Don't create tempfile if stdout of the
15942 child process will be redirected to a file specified with `:file'.
888c9e86
EZ
15943 Don't try to re-open tempfile in that case, and set fd[0] to -1 as
15944 cue to call_process_cleanup not to close that handle.
15945
4d3fcc8e
BK
159462011-05-07 Ben Key <bkey76@gmail.com>
15947
15948 * makefile.w32-in: The bootstrap-temacs rule now makes use of
15949 one of two shell specific rules, either bootstrap-temacs-CMD or
15950 bootstrap-temacs-SH. The bootstrap-temacs-SH rule is identical
15951 to the previous implementation of the bootstrap-temacs rule.
15952 The bootstrap-temacs-CMD rule is similar to the previous
15953 implementation of the bootstrap-temacs rule except that it
15954 makes use of the ESC_CFLAGS variable instead of the CFLAGS
15955 variable.
15956
15957 These changes, along with some changes to nt/configure.bat,
15958 nt/gmake.defs, and nt/nmake.defs, are required to extend my
15959 earlier fix to add support for --cflags and --ldflags options
15960 that include quotes so that it works whether make uses cmd or
15961 sh as the shell.
15962
b4289b64
MA
159632011-05-06 Michael Albinus <michael.albinus@gmx.de>
15964
15965 * dbusbind.c (QCdbus_type_unix_fd): Declare static.
15966 (xd_remove_watch): Don't check QCdbus_type_unix_fd for SYMBOLP, it
15967 is a constant.
15968 (Fdbus_init_bus, xd_read_queued_messages): Bus can be a symbol or
15969 a string. Handle both cases.
15970 (Fdbus_call_method_asynchronously, Fdbus_register_signal)
15971 (Fdbus_register_method): Use Qinvalid_function.
15972
af4c0e28
JB
159732011-05-06 Juanma Barranquero <lekktu@gmail.com>
15974
15975 * makefile.w32-in: Update dependencies.
15976 (LISP_H): Add inttypes.h and stdin.h.
15977 (PROCESS_H): Add unistd.h.
15978
c51453d9
EZ
159792011-05-06 Eli Zaretskii <eliz@gnu.org>
15980
15981 * lread.c: Include limits.h (fixes the MS-Windows build broken by
15982 2011-05-06T07:13:19Z!eggert@cs.ucla.edu).
15983
8ff0ac3c 159842011-05-06 Paul Eggert <eggert@cs.ucla.edu>
c032b5f8 15985
4c4b566b
PE
15986 * image.c (Finit_image_library) [!HAVE_NTGUI]: Omit unused local.
15987
aab2b9b5
PE
15988 * term.c (vfatal): Remove stray call to va_end.
15989 It's not needed and the C Standard doesn't allow it here anyway.
15990
c378da0b
PE
15991 Use C99's va_copy to avoid undefined behavior on x86-64 GNU/Linux.
15992 * eval.c (verror): doprnt a copy of ap, not the original. (Bug#8545)
15993
288b08c7
PE
15994 * eval.c (verror): OK to create a string of up to MOST_POSITIVE_FIXNUM
15995 bytes.
15996
e3601888
PE
15997 * term.c: Don't include <stdarg.h>, as <lisp.h> does that.
15998
db6c0e74
PE
15999 * callproc.c (Fcall_process): Use 'volatile' to avoid vfork clobbering.
16000
dd5963ea
PE
16001 * process.c (Fformat_network_address): Fix typo: args2 -> *args2.
16002
88c9450f
PE
16003 * xmenu.c (set_frame_menubar): Fix typo: int * -> int (3 times).
16004
2f9442b8
PE
16005 * coding.c (detect_coding_charset): Fix typo: * 2 -> *4 (Bug#8601).
16006
c032b5f8
PE
16007 * charset.h (struct charset.code_space): Now has 15 elements, not 16.
16008 * charset.c (Fdefine_charset_internal): Don't initialize
16009 charset.code_space[15]. The value was garbage, on hosts with
2d38271b 16010 32-bit int (Bug#8600).
a108c10b
PE
16011
16012 * lread.c (read_integer): Be more consistent with string-to-number.
16013 Use string_to_number to do the actual conversion; this avoids
16014 rounding errors and fixes some other screwups. Without this fix,
16015 for example, #x1fffffffffffffff was misread as -2305843009213693952.
16016 (digit_to_number): Move earlier, for benefit of read_integer.
16017 Return -1 if the digit is out of range for the base, -2 if it is
48e400f0 16018 not a digit in any supported base. (Bug#8602)
a108c10b 16019
ad5f9eea
PE
16020 * doprnt.c (doprnt): Support arbitrary pI values, such as "I64".
16021
aec1708a
PE
16022 * dispnew.c (scrolling_window): Return 1 if we scrolled,
16023 to match comment at start of function. This also removes a
16024 GCC warning about overflow in a 32+64-bit port.
16025
47be4ab5
PE
16026 * lisp.h (EMACS_INT, EMACS_UINT, BITS_PER_EMACS_INT, pI): Simplify.
16027
371cac43
PE
16028 * dbusbind.c: Do not use XPNTR on a value that may be an integer.
16029 Reported by Stefan Monnier in
16030 <http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00919.html>.
04f2d78b
CB
16031 (xd_remove_watch, Fdbus_init_bus, xd_read_queued_messages):
16032 Use SYMBOLP-guarded XSYMBOL, not XPNTR.
371cac43 16033
d01a7826
PE
16034 * lisp.h (EMACS_INTPTR): Remove. All uses changed to intptr_t.
16035 (EMACS_UINTPTR): Likewise, with uintptr_t.
16036
7fd47d5c
PE
16037 * lisp.h: Prefer 64-bit EMACS_INT if available.
16038 (EMACS_INT, EMACS_UINT, BITS_PER_EMACS_INT, pI): Define to 64-bit
16039 on 32-bit hosts that have 64-bit int, so that they can access
16040 large files.
122b0c86
PE
16041 However, temporarily disable this change unless the temporary
16042 symbol WIDE_EMACS_INT is defined.
7fd47d5c 16043
8727937b
PE
16044 * lread.c, process.c: Do not include <inttypes.h>; lisp.h does it now.
16045
8ac068ac
PE
16046 Prefer intptr_t/uintptr_t for integers the same widths as pointers.
16047 This removes an assumption that EMACS_INT and long are the same
16048 width as pointers. The assumption is true for Emacs porting targets
16049 now, but we want to make other targets possible.
16050 * lisp.h: Include <inttypes.h>, for INTPTR_MAX, UINTPTR_MAX.
16051 (EMACS_INTPTR, EMACS_UINTPTR): New macros.
16052 In the rest of the code, change types of integers that hold casted
16053 pointers to EMACS_INTPTR and EMACS_UINTPTR, systematically
16054 replacing EMACS_INT, long, EMACS_UINT, and unsigned long.
16055 (XTYPE): Don't cast arg to EMACS_UINT; normally is not needed.
16056 (XSET): Cast type of XTYPE arg to EMACS_INTPTR; it is needed here.
16057 No need to cast type when ORing.
16058 (XPNTR): Return a value of type EMACS_INTPTR or EMACS_UINTPTR.
16059 * alloc.c (lisp_align_malloc): Remove a no-longer-needed cast.
16060 * doc.c (store_function_docstring): Use EMACS_INTPTR, so as not to
16061 assume EMACS_INT is the same width as char *.
16062 * gtkutil.c (xg_gtk_scroll_destroy, xg_tool_bar_button_cb):
16063 (xg_tool_bar_callback, xg_tool_bar_help_callback, xg_make_tool_item):
16064 Remove no-longer-needed casts.
16065 (xg_create_scroll_bar, xg_tool_bar_button_cb, xg_tool_bar_callback):
16066 (xg_tool_bar_help_callback, xg_make_tool_item):
16067 Use EMACS_INTPTR to hold an integer
16068 that will be cast to void *; this can avoid a GCC warning
16069 if EMACS_INT is not the same width as void *.
16070 * menu.c (find_and_call_menu_selection): Remove no-longer-needed cast.
16071 * xdisp.c (display_echo_area_1, resize_mini_window_1):
16072 (current_message_1, set_message_1):
16073 Use a local to convert to proper width without a cast.
16074 * xmenu.c (dialog_selection_callback): Likewise.
16075
ede49d71
PE
16076 * sysdep.c (get_random): Don't assume EMACS_INT is no wider than long.
16077 Also, don't assume VALBITS / RAND_BITS is less than 5,
16078 and don't rely on undefined behavior when shifting a 1 left into
16079 the sign bit.
16080 * lisp.h (get_random): Change signature to match.
16081
2f30ecd0
PE
16082 * lread.c (hash_string): Use size_t, not int, for hash computation.
16083 Normally we prefer signed values; but hashing is special, because
16084 it's better to use unsigned division on hash table sizes so that
16085 the remainder is nonnegative. Also, size_t is the natural width
16086 for hashing into memory. The previous code used 'int', which doesn't
16087 retain enough info to hash well into very large tables.
16088 (oblookup, oblookup_last_bucket_number, Funintern): Likewise.
16089
2a866e7b
PE
16090 * dbusbind.c: Don't possibly lose pointer info when converting.
16091 (xd_remove_watch, Fdbus_init_bus, xd_read_queued_messages):
16092 Use XPNTR rather than XHASH, so that the high-order bits of
16093 the pointer aren't lost when converting through void *.
16094
51639eac
PE
16095 * eval.c (Fautoload): Don't double-shift a pointer.
16096
92394119
PE
16097 * fns.c (Frandom): Let EMACS_UINT be wider than unsigned long.
16098
dbdb9a7c
JB
160992011-05-06 Juanma Barranquero <lekktu@gmail.com>
16100
16101 * gnutls.c (DEF_GNUTLS_FN):
16102 * image.c (DEF_IMGLIB_FN): Make function pointers static.
16103
db7a0b4f
AS
161042011-05-05 Andreas Schwab <schwab@linux-m68k.org>
16105
16106 * lread.c (lisp_file_lexically_bound_p): Stop scanning at end
16107 marker. (Bug#8610)
16108
cd394be1 161092011-05-05 Eli Zaretskii <eliz@gnu.org>
fab624aa
EZ
16110
16111 * w32heap.c (allocate_heap) [USE_LISP_UNION_TYPE || USE_LSB_TAG]:
16112 New version that can reserve upto 2GB of heap space.
16113
f7ff1b0f 161142011-05-05 Chong Yidong <cyd@stupidchicken.com>
45cb8994
CY
16115
16116 * nsfns.m (Fns_read_file_name): Doc fix (Bug#8534).
16117
639c109b
TZ
161182011-05-05 Teodor Zlatanov <tzz@lifelogs.com>
16119
16120 * gnutls.c (fn_gnutls_certificate_set_x509_key_file): Add alias to
16121 `gnutls_certificate_set_x509_key_file'.
16122
d2127135
JB
161232011-05-05 Juanma Barranquero <lekktu@gmail.com>
16124
16125 * makefile.w32-in ($(BLD)/image.$(O), $(BLD)/process.$(O)):
16126 Update dependencies.
16127
e968f4f3
JB
161282011-05-04 Juanma Barranquero <lekktu@gmail.com>
16129
16130 * gnutls.h (emacs_gnutls_write, emacs_gnutls_read):
16131 * gnutls.c (emacs_gnutls_write, emacs_gnutls_read):
16132 Remove unused parameter `fildes'.
16133 * process.c (read_process_output, send_process): Don't pass it.
16134
84d358f0
JB
161352011-05-04 Juanma Barranquero <lekktu@gmail.com>
16136
16137 Fix previous change: the library cache is defined in w32.c.
16138 * image.c (CACHE_IMAGE_TYPE) [!HAVE_NTGUI]: Define to noop.
16139 (Finit_image_library): Wrap Vlibrary_cache on "#ifdef HAVE_NTGUI".
16140
0898ca10
JB
161412011-05-04 Juanma Barranquero <lekktu@gmail.com>
16142
16143 Implement dynamic loading of GnuTLS on Windows.
16144
16145 * gnutls.h (GNUTLS_EMACS_ERROR_NOT_LOADED): New macro.
16146 (emacs_gnutls_write, emacs_gnutls_read): Mark as extern.
16147 (emacs_gnutls_record_check_pending, emacs_gnutls_transport_set_errno):
16148 Declare.
16149
16150 * gnutls.c (Qgnutls_dll): Define.
16151 (DEF_GNUTLS_FN, LOAD_GNUTLS_FN): New macros.
16152 (gnutls_*): Declare function pointers.
16153 (init_gnutls_functions): New function to initialize function pointers.
16154 (emacs_gnutls_handshake, Fgnutls_error_string, Fgnutls_deinit)
16155 (emacs_gnutls_global_init, Fgnutls_bye): Use function pointers.
16156 (emacs_gnutls_record_check_pending, emacs_gnutls_transport_set_errno):
16157 Wrappers for gnutls_record_check_pending and gnutls_transport_set_errno.
16158 (emacs_gnutls_write, emacs_gnutls_read)
16159 (emacs_gnutls_handle_error, Fgnutls_error_fatalp)
16160 (Fgnutls_available_p): New function.
16161 (Fgnutls_boot): Call Fgnutls_available_p. Use function pointers.
16162 (syms_of_gnutls) <Qgnutls_dll>: Initialize and staticpro it.
16163 (syms_of_gnutls) <Sgnutls_available_p>: defsubr it.
16164
16165 * image.c: Include w32.h.
16166 (Vimage_type_cache): Delete.
16167 (syms_of_image) <Vimage_type_cache>: Don't initialize and staticpro it.
16168 (CACHE_IMAGE_TYPE, Finit_image_library): Use Vlibrary_cache instead.
16169 (w32_delayed_load): Move to w32.c.
16170
16171 * w32.h (VlibraryCache, QCloaded_from, w32_delayed_load): Declare.
16172
16173 * w32.c (QCloaded_from, Vlibrary_cache): Define.
16174 (w32_delayed_load): Move from image.c. When loading a library, record
16175 its filename in the :loaded-from property of the library id.
16176 (globals_of_w32) <QCloaded_from, Vlibrary_cache>:
16177 Initialize and staticpro them.
16178 (emacs_gnutls_pull, emacs_gnutls_push): Call emacs_gnutls_* functions.
16179
16180 * process.c: Include lisp.h before w32.h, not after.
16181 (wait_reading_process_output): Call emacs_gnutls_record_check_pending
16182 instead of gnutls_record_check_pending.
16183
16184 * callproc.c, emacs.c: Include lisp.h before w32.h, not after.
16185
ff4de4aa
TZ
161862011-05-04 Teodor Zlatanov <tzz@lifelogs.com>
16187
16188 * gnutls.c (Fgnutls_boot): Support :keylist and :crlfiles options
16189 instead of :keyfiles. Give GnuTLS the keylist and the CRL lists
16190 as passed in.
16191
abe95abb
JD
161922011-05-03 Jan Djärv <jan.h.d@swipnet.se>
16193
16194 * xterm.c (x_set_frame_alpha): Do not set property on anything
16195 else than FRAME_X_OUTER_WINDOW (Bug#8608).
16196
e16e55d4
JB
161972011-05-02 Juanma Barranquero <lekktu@gmail.com>
16198
16199 * sysdep.c (get_tty_size) [WINDOWSNT]: Implement. (Bug#8596)
16200
bafcf6a5
JB
162012011-05-02 Juanma Barranquero <lekktu@gmail.com>
16202
16203 * gnutls.c (Qgnutls_log_level, Qgnutls_code, Qgnutls_anon)
16204 (Qgnutls_x509pki, Qgnutls_e_interrupted, Qgnutls_e_again)
16205 (Qgnutls_e_invalid_session, Qgnutls_e_not_ready_for_handshake)
16206 (gnutls_global_initialized, Qgnutls_bootprop_priority)
16207 (Qgnutls_bootprop_trustfiles, Qgnutls_bootprop_keyfiles)
16208 (Qgnutls_bootprop_callbacks, Qgnutls_bootprop_loglevel)
16209 (Qgnutls_bootprop_hostname, Qgnutls_bootprop_verify_flags)
16210 (Qgnutls_bootprop_verify_error, Qgnutls_bootprop_verify_hostname_error)
16211 (Qgnutls_bootprop_callbacks_verify): Make static.
16212
e7a6747f
AS
162132011-05-01 Andreas Schwab <schwab@linux-m68k.org>
16214
19ed11ba
AS
16215 * callproc.c: Indentation fixup.
16216
e7a6747f 16217 * sysdep.c (wait_for_termination_1): Make static.
04f2d78b
CB
16218 (wait_for_termination, interruptible_wait_for_termination):
16219 Move after wait_for_termination_1.
e7a6747f 16220
1ef14cb4
LMI
162212011-05-01 Lars Magne Ingebrigtsen <larsi@gnus.org>
16222
16223 * sysdep.c (interruptible_wait_for_termination): New function
16224 which is like wait_for_termination, but allows keyboard
16225 interruptions.
16226
16227 * callproc.c (Fcall_process): Add (:file "file") as an option for
16228 the STDOUT buffer.
16229 (Fcall_process_region): Ditto.
16230
330d880c
EZ
162312011-04-30 Eli Zaretskii <eliz@gnu.org>
16232
8db90b73
EZ
16233 * dosfns.c (Fint86, Fdos_memget, Fdos_memput): Use `ASIZE (FOO)'
16234 rather than `XVECTOR (FOO)->size'.
16235
330d880c
EZ
16236 * process.c: Remove HAVE_INTTYPES_H condition from inclusion of
16237 inttypes.h, as a gnulib replacement is used if it not available in
16238 system headers.
16239
15cbd324
EZ
162402011-04-21 Eli Zaretskii <eliz@gnu.org>
16241
16242 Lift the MOST_POSITIVE_FIXNUM/4 limitation on visited files.
16243 * fileio.c (Finsert_file_contents): Don't limit file size to 1/4
16244 of MOST_POSITIVE_FIXNUM. (Bug#8528)
16245
16246 * coding.c (coding_alloc_by_realloc): Error out if destination
16247 will grow beyond MOST_POSITIVE_FIXNUM.
16248 (decode_coding_emacs_mule): Abort if there isn't enough place in
16249 charbuf for the composition carryover bytes. Reserve an extra
16250 space for up to 2 characters produced in a loop.
16251 (decode_coding_iso_2022): Abort if there isn't enough place in
16252 charbuf for the composition carryover bytes.
16253
162542011-04-21 Eli Zaretskii <eliz@gnu.org>
afda1437 16255
ae940cca
EZ
16256 * doprnt.c (doprnt) [!HAVE_LONG_LONG_INT]: Error out instead of
16257 aborting when %lld or %lll format is passed.
16258 [!HAVE_UNSIGNED_LONG_LONG_INT]: Error out instead of aborting when
16259 %llo or %llx format is passed. (Bug#8545)
16260
03ab8921
EZ
16261 * window.c (window_scroll_line_based): Use a marker instead of
16262 simple variables to record original value of point. (Bug#7952)
16263
afda1437
EZ
16264 * doprnt.c (doprnt): Fix the case where a multibyte sequence
16265 produced by %s or %c overflows available buffer space. (Bug#8545)
16266
f76dee0c
PE
162672011-04-28 Paul Eggert <eggert@cs.ucla.edu>
16268
16269 * doprnt.c (doprnt): Omit useless test; int overflow check (Bug#8545).
283cdbef 16270 (SIZE_MAX): Move defn after all includes, as they might #define it.
f76dee0c 16271
fdc5744d
JB
162722011-04-28 Juanma Barranquero <lekktu@gmail.com>
16273
16274 * w32.c (init_environment): Warn about defaulting HOME to C:\.
16275
638f053a
JB
162762011-04-28 Juanma Barranquero <lekktu@gmail.com>
16277
16278 * keyboard.c (Qdelayed_warnings_hook): Define.
16279 (command_loop_1): Run `delayed-warnings-hook'
16280 if Vdelayed_warnings_list is non-nil.
16281 (syms_of_keyboard) <delayed-warnings-hook>: DEFSYM it.
16282 (syms_of_keyboard) <delayed-warnings-list>: DEFVAR_LISP it.
16283
d178f871
EZ
162842011-04-28 Eli Zaretskii <eliz@gnu.org>
16285
16286 * doprnt.c (doprnt): Don't return value smaller than the buffer
16287 size if the message was truncated. (Bug#8545).
16288
b124fd93
JB
162892011-04-28 Juanma Barranquero <lekktu@gmail.com>
16290
16291 * w32fns.c (Fx_change_window_property, Fx_delete_window_property)
16292 (Fx_window_property): #if-0 the whole functions, not just the bodies.
16293
e810457d
PE
162942011-04-27 Paul Eggert <eggert@cs.ucla.edu>
16295
16296 * doprnt.c (doprnt): Support "ll" length modifier, for long long.
16297
ea51cceb
JB
162982011-04-27 Juanma Barranquero <lekktu@gmail.com>
16299
16300 * makefile.w32-in: Update dependencies.
16301
94dcfacf
EZ
163022011-04-27 Eli Zaretskii <eliz@gnu.org>
16303
16304 Improve `doprnt' and its usage. (Bug#8545)
16305 * doprnt.c (doprnt): Make sure `format' is never accessed beyond
16306 `format_end'. Remove support for %l as a conversion specifier.
16307 Don't use xrealloc. Improve diagnostics when the %l size modifier
16308 is used. Update the commentary.
16309
16310 * eval.c (verror): Simplify calculation of size_t.
16311
16312 * coding.c (Ffind_operation_coding_system): Fix diagnostic error
16313 messages.
16314
f61f41d7
PE
163152011-04-27 Yoshiaki Kasahara <kasahara@nc.kyushu-u.ac.jp> (tiny change)
16316
16317 * buffer.c (init_buffer) [USE_MMAP_FOR_BUFFERS]: Adjust to aliasing
16318 change.
16319
96fb4434
PE
163202011-04-27 Paul Eggert <eggert@cs.ucla.edu>
16321
16322 * nsmenu.m: Replace all uses of XVECTOR with ASIZE and AREF.
16323 This makes this file independent of the recent pseudovector change.
16324
671875da 163252011-04-26 Paul Eggert <eggert@cs.ucla.edu>
eab3844f 16326
69e9b5a3
PE
16327 * keyboard.c (handle_user_signal): Fix pointer signedness problem.
16328
b5f869a7 16329 * gnutls.c (emacs_gnutls_handle_error): Remove unused local.
7754e151 16330 (Fgnutls_boot): gnutls_certificate_verify_peers2 wants unsigned *.
8d4c3955 16331 Remove unused local.
c8926152 16332 (emacs_gnutls_write): Don't use uninitialized rtnval if nbyte <= 0.
080e5a8d 16333
841a1577 16334 * lisp.h: Fix a problem with aliasing and vector headers. (Bug#8546)
04f2d78b
CB
16335 GCC 4.6.0 optimizes based on type-based alias analysis.
16336 For example, if b is of type struct buffer * and v of type struct
eab3844f
PE
16337 Lisp_Vector *, then gcc -O2 was incorrectly assuming that &b->size
16338 != &v->size, and therefore "v->size = 1; b->size = 2; return
16339 v->size;" must therefore return 1. This assumption is incorrect
16340 for Emacs, since it type-puns struct Lisp_Vector * with many other
16341 types. To fix this problem, this patch adds a new type struct
f904488f 16342 vectorlike_header that documents the constraints on layout of vectors
eab3844f
PE
16343 and pseudovectors, and helps optimizing compilers not get fooled
16344 by Emacs's type punning. It also adds the macros XSETTYPED_PVECTYPE
16345 XSETTYPED_PSEUDOVECTOR, TYPED_PSEUDOVECTORP, for similar reasons.
f904488f
PE
16346 * lisp.h (XSETTYPED_PVECTYPE): New macro, specifying the name of
16347 the size member.
eab3844f
PE
16348 (XSETPVECTYPE): Rewrite in terms of new macro.
16349 (XSETPVECTYPESIZE): New macro, specifying both type and size.
16350 This is a bit clearer, and further avoids the possibility of
16351 undesirable aliasing.
16352 (XSETTYPED_PSEUDOVECTOR): New macro, specifying the size.
f904488f 16353 (XSETPSEUDOVECTOR): Rewrite in terms of XSETTYPED_PSEUDOVECTOR.
eab3844f
PE
16354 (XSETSUBR): Rewrite in terms of XSETTYPED_PSEUDOVECTOR and XSIZE,
16355 since Lisp_Subr is a special case (no "next" field).
04f2d78b
CB
16356 (ASIZE): Now uses header.size rather than size.
16357 All previous uses of XVECTOR (foo)->size replaced to use this macro,
f904488f
PE
16358 to avoid the hassle of writing XVECTOR (foo)->header.size.
16359 (struct vectorlike_header): New type.
eab3844f
PE
16360 (TYPED_PSEUDOVECTORP): New macro, also specifying the C type of the
16361 object, to help avoid aliasing.
16362 (PSEUDOVECTORP): Rewrite in terms of TYPED_PSEUDOVECTORP.
16363 (SUBRP): Likewise, since Lisp_Subr is a special case.
16364 * lisp.h (struct Lisp_Vector, struct Lisp_Char_Table):
16365 (struct Lisp_Sub_Char_Table, struct Lisp_Bool_Vector):
16366 (struct Lisp_Hash_Table): Combine first two members into a single
f904488f 16367 struct vectorlike_header member. All uses of "size" and "next" members
eab3844f
PE
16368 changed to be "header.size" and "header.next".
16369 * buffer.h (struct buffer): Likewise.
16370 * font.h (struct font_spec, struct font_entity, struct font): Likewise.
16371 * frame.h (struct frame): Likewise.
16372 * process.h (struct Lisp_Process): Likewise.
16373 * termhooks.h (struct terminal): Likewise.
16374 * window.c (struct save_window_data, struct saved_window): Likewise.
16375 * window.h (struct window): Likewise.
16376 * alloc.c (allocate_buffer, Fmake_bool_vector, allocate_pseudovector):
16377 Use XSETPVECTYPESIZE, not XSETPVECTYPE, to avoid aliasing problems.
16378 * buffer.c (init_buffer_once): Likewise.
16379 * lread.c (defsubr): Use XSETTYPED_PVECTYPE, since Lisp_Subr is a
16380 special case.
16381 * process.c (Fformat_network_address): Use local var for size,
16382 for brevity.
16383
0df1eac5
PE
16384 * bytecode.c (exec_byte_code): Don't use XVECTOR before CHECK_VECTOR.
16385
847ab9d1 16386 Make the Lisp reader and string-to-float more consistent (Bug#8525)
452f4150
PE
16387 * data.c (atof): Remove decl; no longer used or needed.
16388 (digit_to_number): Move to lread.c.
16389 (Fstring_to_number): Use new string_to_number function, to be
16390 consistent with how the Lisp reader treats infinities and NaNs.
16391 Do not assume that floating-point numbers represent EMACS_INT
16392 without losing information; this is not true on most 64-bit hosts.
16393 Avoid double-rounding errors, by insisting on integers when
16394 parsing non-base-10 numbers, as the documentation specifies.
16395 * lisp.h (string_to_number): New decl, replacing ...
16396 (isfloat_string): Remove.
bc0a5c13 16397 * lread.c: Include <inttypes.h>, for uintmax_t and strtoumax.
d78050d6 16398 (read1): Do not accept +. and -. as integers; this
452f4150
PE
16399 appears to have been a coding error. Similarly, do not accept
16400 strings like +-1e0 as floating point numbers. Do not report
16401 overflow for integer overflows unless the base is not 10 which
16402 means we have no simple and reliable way to continue.
16403 Break out the floating-point parsing into a new
16404 function string_to_number, so that Fstring_to_number parses
16405 floating point numbers consistently with the Lisp reader.
04f2d78b 16406 (digit_to_number): Move here from data.c. Make it static inline.
452f4150
PE
16407 (E_CHAR, EXP_INT): Remove, replacing with ...
16408 (E_EXP): New macro, to solve the "1.0e+" problem mentioned below.
16409 (string_to_number): New function, replacing isfloat_string.
16410 This function checks for valid syntax and produces the resulting
16411 Lisp float number too. Rework it so that string-to-number
bc0a5c13 16412 no longer mishandles examples like "1.0e+". Use strtoumax,
d78050d6
PE
16413 so that overflow for non-base-10 numbers is reported only when
16414 there's no portable and simple way to convert to floating point.
452f4150 16415
67769ffc
PE
16416 * textprop.c (set_text_properties_1): Rewrite for clarity,
16417 and to avoid GCC warning about integer overflow.
16418
c20db43f
PE
16419 * intervals.h (struct interval): Use EMACS_INT for members
16420 where EMACS_UINT might cause problems. See
16421 <http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00514.html>.
16422 (CHECK_TOTAL_LENGTH): Remove cast to EMACS_INT; no longer needed.
16423 * intervals.c (interval_deletion_adjustment): Now returns EMACS_INT.
16424 All uses changed.
37aa2f85
PE
16425 (offset_intervals): Tell GCC not to worry about length overflow
16426 when negating a negative length.
c20db43f 16427
2538aa2f
PE
16428 * alloc.c (overrun_check_malloc, overrun_check_realloc): Now static.
16429 (overrun_check_free): Likewise.
16430
f2d3008d
PE
16431 * alloc.c (SDATA_SIZE) [!GC_CHECK_STRING_BYTES]: Avoid runtime check
16432 in the common case where SDATA_DATA_OFFSET is a multiple of Emacs
16433 word size.
16434
ec8df744
PE
16435 * gnutls.c: Fix problems found by GCC 4.6.0 on Ubuntu 10.10.
16436 (gnutls_make_error): Rename local to avoid shadowing.
16437 (gnutls_emacs_global_deinit): ifdef out; not used.
16438 (Fgnutls_boot): Use const for pointer to readonly storage.
16439 Comment out unused local. Fix pointer signedness problems.
16440
640ee02d
PE
16441 * lread.c (openp): Don't stuff size_t into an 'int'.
16442 Use <= on length, not < on length + 1, to avoid GCC 4.6.0 warning
16443 about possible signed overflow.
16444
6048fb2a
PE
16445 * gtkutil.c: Fix problems found by GCC 4.6.0 on Ubuntu 10.10.
16446 (GDK_KEY_g): Don't define if already defined.
16447 (xg_prepare_tooltip): Avoid pointer signedness problem.
16448 (xg_set_toolkit_scroll_bar_thumb): Redo to avoid two casts.
16449
fa3c87e1
PE
16450 * process.c (Fnetwork_interface_info): Avoid left-shift undefined
16451 behavior with 1 << 31. GCC 4.6.0 warns about this on 32-bit hosts.
16452
2172544b
PE
16453 * xfns.c (Fx_window_property): Simplify a bit,
16454 to make a bit faster and to avoid GCC 4.6.0 warning.
16455 * xselect.c (x_get_window_property, x_handle_dnd_message): Likewise.
16456
9b821a21
PE
16457 * fns.c (internal_equal): Don't assume size_t fits in int.
16458
3c616cfa
PE
16459 * alloc.c (compact_small_strings): Tighten assertion a little.
16460
c2982e87
PE
16461 Replace pEd with more-general pI, and fix some printf arg casts.
16462 * lisp.h (pI): New macro, generalizing old pEd macro to other
16463 conversion specifiers. For example, use "...%"pI"d..." rather
16464 than "...%"pEd"...".
16465 (pEd): Remove. All uses replaced with similar uses of pI.
61bdb816 16466 * m/amdx86-64.h, m/ia64.h, m/ibms390x.h: Likewise.
c2982e87
PE
16467 * alloc.c (check_pure_size): Don't overflow by converting size to int.
16468 * bidi.c (bidi_dump_cached_states): Use pI to avoid cast.
16469 * data.c (Fnumber_to_string): Use pI instead of if-then-else-abort.
16470 * dbusbind.c (xd_append_arg): Use pI to avoid cast.
16471 (Fdbus_method_return_internal, Fdbus_method_error_internal): Likewise.
16472 * font.c (font_unparse_xlfd): Avoid potential buffer overrun on
16473 64-bit hosts.
16474 (font_unparse_xlfd, font_unparse_fcname): Use pI to avoid casts.
16475 * keyboard.c (record_char, modify_event_symbol): Use pI to avoid casts.
16476 * print.c (safe_debug_print, print_object): Likewise.
16477 (print_object): Don't overflow by converting EMACS_INT or EMACS_UINT
16478 to int.
6f04d126
PE
16479 Use pI instead of if-then-else-abort. Use %p to avoid casts,
16480 avoiding the 0 flag, which is not portable.
c2982e87
PE
16481 * process.c (Fmake_network_process): Use pI to avoid cast.
16482 * region-cache.c (pp_cache): Likewise.
16483 * xdisp.c (decode_mode_spec): Likewise.
16484 * xrdb.c (x_load_resources) [USE_MOTIF]: Use pI to avoid undefined
16485 behavior on 64-bit hosts with printf arg.
6f04d126 16486 * xselect.c (x_queue_event): Use %p to avoid casts, avoiding 0 flag.
c2982e87
PE
16487 (x_stop_queuing_selection_requests): Likewise.
16488 (x_get_window_property): Don't truncate byte count to an 'int'
16489 when tracing.
0b432f21 16490
5e073ec7
PE
16491 * frame.c (frame_name_fnn_p): Get rid of strtol, which isn't right
16492 here, since it parses constructs like leading '-' and spaces,
16493 which are not wanted; and it overflows with large numbers.
16494 Instead, simply match F[0-9]+, which is what is wanted anyway.
16495
36372bf9
PE
16496 * alloc.c: Remove unportable assumptions about struct layout.
16497 (SDATA_SELECTOR, SDATA_DATA_OFFSET): New macros.
16498 (SDATA_OF_STRING, SDATA_SIZE, allocate_string_data):
16499 (allocate_vectorlike, make_pure_vector): Use the new macros,
16500 plus offsetof, to remove unportable assumptions about struct layout.
16501 These assumptions hold on all porting targets that I know of, but
16502 they are not guaranteed, they're easy to remove, and removing them
16503 makes further changes easier.
16504
0b432f21
PE
16505 * alloc.c (BLOCK BYTES): Fix typo by changing "ablock" to "ablocks".
16506 This doesn't fix a bug but makes the code clearer.
bfd1c781
PE
16507 (string_overrun_cookie): Now const. Use initializers that
16508 don't formally overflow signed char, to avoid warnings.
000098c1
PE
16509 (allocate_string_data) [GC_CHECK_STRING_OVERRUN]: Fix typo that
16510 can cause Emacs to crash when string overrun checking is enabled.
c7bda33c
PE
16511 (allocate_buffer): Don't assume sizeof (struct buffer) is a
16512 multiple of sizeof (EMACS_INT); it need not be, if
16513 alignof(EMACS_INT) < sizeof (EMACS_INT).
d0f4e1f5 16514 (check_sblock, check_string_bytes, check_string_free_list): Protoize.
0b432f21 16515
895009e1
JB
165162011-04-26 Juanma Barranquero <lekktu@gmail.com>
16517
16518 * keyboard.c (QCrtl): Rename from Qrtl. All uses changed.
16519
6a7a1b0b
TZ
165202011-04-26 Teodor Zlatanov <tzz@lifelogs.com>
16521
16522 * gnutls.c (emacs_gnutls_handshake): Return an error if we're not
b5f869a7 16523 supposed to be handshaking. (Bug#8556)
6a7a1b0b
TZ
16524 Reported by Paul Eggert <eggert@cs.ucla.edu>.
16525
841a1577 165262011-04-26 Daniel Colascione <dan.colascione@gmail.com>
0438ce91
DC
16527
16528 * lisp.h (Qdebug): List symbol.
895009e1 16529 * eval.c (Qdebug): Restore global linkage.
0438ce91
DC
16530 * keyboard.c (debug-on-event): New variable.
16531 (handle_user_signal): Break into debugger when debug-on-event
16532 matches the current signal symbol.
16533
f2d3ba6f
DN
165342011-04-25 Dan Nicolaescu <dann@ics.uci.edu>
16535
16536 * alloc.c (check_sblock, check_string_bytes)
16537 (check_string_free_list): Convert to standard C.
16538
42ce4c63
TZ
165392011-04-25 Teodor Zlatanov <tzz@lifelogs.com>
16540
16541 * w32.c (emacs_gnutls_push): Fix typo.
16542
825cd63c
EZ
165432011-04-25 Eli Zaretskii <eliz@gnu.org>
16544
fb11d64d
EZ
16545 * gnutls.c (emacs_gnutls_handshake): Avoid compiler warnings about
16546 "cast to pointer from integer of different size".
16547
825cd63c
EZ
16548 Improve doprnt and its use in verror. (Bug#8545)
16549 * doprnt.c (doprnt): Document the set of format control sequences
16550 supported by the function. Use SAFE_ALLOCA instead of always
16551 using `alloca'.
16552
16553 * eval.c (verror): Don't limit the buffer size at size_max-1, that
16554 is one byte too soon. Don't use xrealloc; instead xfree and
16555 xmalloc anew.
16556
e061a11b
TZ
165572011-04-24 Teodor Zlatanov <tzz@lifelogs.com>
16558
16559 * gnutls.h: Add GNUTLS_STAGE_CALLBACKS enum to denote we're in the
16560 callbacks stage.
16561
16562 * gnutls.c: Renamed global_initialized to
16563 gnutls_global_initialized. Added internals for the
16564 :verify-hostname-error, :verify-error, and :verify-flags
16565 parameters of `gnutls-boot' and documented those parameters in the
16566 docstring. Start callback support.
9173deec
JB
16567 (emacs_gnutls_handshake): Add Woe32 support. Retry handshake
16568 unless a fatal error occurred. Call gnutls_alert_send_appropriate
16569 on error. Return error code.
e061a11b
TZ
16570 (emacs_gnutls_write): Call emacs_gnutls_handle_error.
16571 (emacs_gnutls_read): Likewise.
16572 (Fgnutls_boot): Return handshake error code.
16573 (emacs_gnutls_handle_error): New function.
16574 (wsaerror_to_errno): Likewise.
16575
16576 * w32.h (emacs_gnutls_pull): Add prototype.
16577 (emacs_gnutls_push): Likewise.
16578
16579 * w32.c (emacs_gnutls_pull): New function for GnuTLS on Woe32.
16580 (emacs_gnutls_push): Likewise.
16581
165822011-04-24 Claudio Bley <claudio.bley@gmail.com> (tiny change)
16583
16584 * process.c (wait_reading_process_output): Check if GnuTLS
16585 buffered some data internally if no FDs are set for TLS
16586 connections.
16587
16588 * makefile.w32-in (OBJ2): Add gnutls.$(O).
16589 (LIBS): Link to USER_LIBS.
16590 ($(BLD)/gnutls.$(0)): New target.
16591
fa6996bc
EZ
165922011-04-24 Eli Zaretskii <eliz@gnu.org>
16593
eb35682e
EZ
16594 * xdisp.c (handle_single_display_spec): Rename the
16595 display_replaced_before_p argument into display_replaced_p, to
16596 make it consistent with the commentary. Fix typos in the
16597 commentary.
16598
e2ad650c
EZ
16599 * textprop.c (syms_of_textprop): Remove dead code.
16600 (copy_text_properties): Delete obsolete commentary about an
16601 interface that was deleted long ago. Fix typos in the description
16602 of arguments.
16603
1b2de274
EZ
16604 * msdos.c (XMenuActivate, XMenuAddSelection): Adjust argument list
16605 to changes in oldXMenu/XMenu.h from 2011-04-16.
16606 <menu_help_message, prev_menu_help_message>: Constify.
16607 (IT_menu_make_room): menu->help_text is now `const char **';
16608 adjust.
16609
16610 * msdos.h (XMenuActivate, XMenuAddSelection): Adjust prototypes
16611 to changes in oldXMenu/XMenu.h from 2011-04-16.
16612 (struct XMenu): Declare `help_text' `const char **'.
16613
16614 * xfaces.c <Qunspecified>: Make extern again.
16615
16616 * syntax.c: Include sys/types.h before including regex.h, as
75f1671a 16617 required by POSIX.
1b2de274 16618
762b15be
EZ
16619 * doc.c (get_doc_string): Improve the format passed to `error'.
16620
16621 * doprnt.c (doprnt): Improve commentary.
16622
16623 * term.c (init_tty) [MSDOS]: Fix 1st argument to maybe_fatal.
16624
16625 * Makefile.in (TAGS): Depend on $(M_FILE) and $(S_FILE), and scan
16626 them with etags.
16627
f1052e5d
EZ
16628 * makefile.w32-in (globals.h): Add a dummy recipe, to make any
16629 changes in globals.h immediately force recompilation.
762b15be
EZ
16630 (TAGS): Depend on $(CURDIR)/m/intel386.h and
16631 $(CURDIR)/s/ms-w32.h.
16632 (TAGS-gmake): Scan $(CURDIR)/m/intel386.h and $(CURDIR)/s/ms-w32.h.
f1052e5d 16633
fa6996bc
EZ
16634 * character.c (Fchar_direction): Function deleted.
16635 (syms_of_character): Don't defsubr it.
16636 <char-direction-table>: Deleted.
16637
e6c3da20
EZ
166382011-04-23 Eli Zaretskii <eliz@gnu.org>
16639
16640 Fix doprnt so it could be used again safely in `verror'. (Bug#8435)
16641 * doprnt.c: Include limits.h.
16642 (SIZE_MAX): New macro.
04f2d78b
CB
16643 (doprnt): Return a size_t value. 2nd arg is now size_t.
16644 Many local variables are now size_t instead of int or unsigned.
e6c3da20
EZ
16645 Improve overflow protection. Support `l' modifier for integer
16646 conversions. Support %l conversion. Don't assume an EMACS_INT
16647 argument for integer conversions and for %c.
16648
16649 * lisp.h (doprnt): Restore prototype.
16650
16651 * makefile.w32-in ($(BLD)/callint.$(O)): Depend on
16652 $(SRC)/character.h.
16653
16654 * Makefile.in (base_obj): Add back doprnt.o.
16655
16656 * deps.mk (doprnt.o): Add back prerequisites.
16657 (callint.o): Depend on character.h.
16658
16659 * eval.c (internal_lisp_condition_case): Include the handler
16660 representation in the error message.
16661 (verror): Call doprnt instead of vsnprintf. Fix an off-by-one bug
16662 when breaking from the loop.
16663
16664 * xdisp.c (vmessage): Call doprnt instead of vsnprintf.
16665
16666 * callint.c (Fcall_interactively): When displaying error message
16667 about invalid control letter, pass the character's codepoint, not
16668 a pointer to its multibyte form. Improve display of the character
16669 in octal and display also its hex code.
16670
16671 * character.c (char_string): Use %x to display the (unsigned)
16672 codepoint of an invalid character, to avoid displaying a bogus
16673 negative value.
16674
16675 * font.c (check_otf_features): Pass SDATA of SYMBOL_NAME to
16676 `error', not SYMBOL_NAME itself.
16677
16678 * coding.c (Fencode_sjis_char, Fencode_big5_char): Use %c for
16679 character arguments to `error'.
16680
16681 * charset.c (check_iso_charset_parameter): Fix incorrect argument
16682 to `error' in error message about FINAL_CHAR argument. Make sure
16683 FINAL_CHAR is a character, and use %c when it is passed as
16684 argument to `error'.
16685
4ffd0d6b 166862011-04-23 Eli Zaretskii <eliz@gnu.org>
97a93095
EZ
16687
16688 * s/ms-w32.h (localtime): Redirect to sys_localtime.
16689
16690 * w32.c: Include <time.h>.
16691 (sys_localtime): New function.
16692
4ffd0d6b 166932011-04-23 Chong Yidong <cyd@stupidchicken.com>
c17819f4
CY
16694
16695 * xdisp.c (init_xdisp): Initialize echo_area_window (Bug#6451).
16696
4ffd0d6b 16697 * buffer.c (syms_of_buffer): Doc fix (Bug#6902).
aac0c6e3 16698
4ffd0d6b 166992011-04-23 Samuel Thibault <sthibault@debian.org> (tiny change)
aac0c6e3 16700
4ffd0d6b
GM
16701 * sysdep.c (wait_for_termination): On GNU Hurd, kill returns -1 on
16702 zombies (Bug#8467).
aac0c6e3 16703
04c56954
EZ
167042011-04-19 Eli Zaretskii <eliz@gnu.org>
16705
16706 * syntax.h (SETUP_SYNTAX_TABLE_FOR_OBJECT): Fix setting of
16707 gl_state.e_property when gl_state.object is Qt.
16708
16709 * insdel.c (make_gap_larger): Remove limitation of buffer size
16710 to <= INT_MAX.
16711
16a43933
CY
167122011-04-18 Chong Yidong <cyd@stupidchicken.com>
16713
16714 * xdisp.c (lookup_glyphless_char_display)
16715 (produce_glyphless_glyph): Handle cons cell entry in
16716 glyphless-char-display.
16717 (Vglyphless_char_display): Document it.
16718
16719 * term.c (produce_glyphless_glyph): Handle cons cell entry in
16720 glyphless-char-display.
16721
4581706e
CY
167222011-04-17 Chong Yidong <cyd@stupidchicken.com>
16723
16724 * xdisp.c (get_next_display_element): Remove unnecessary ifdefs.
16725
16726 * termhooks.h (FRAME_WINDOW_P): Remove duplicated definitions.
16727
16728 * dispextern.h (FACE_SUITABLE_FOR_ASCII_CHAR_P): Add missing
16729 definition for no-X builds.
16730
4887c6e2 167312011-04-16 Paul Eggert <eggert@cs.ucla.edu>
764430a3 16732
fd35b6f9
PE
16733 Static checks with GCC 4.6.0 and non-default toolkits.
16734
5c1ccb01
PE
16735 * s/sol2-6.h, s/unixware.h (PTY_TTY_NAME_SPRINTF): Protoize decl.
16736
006c5daa
PE
16737 * process.c (keyboard_bit_set): Define only if SIGIO.
16738 (send_process_trap): Mark it with NO_RETURN if it doesn't return.
16739 (send_process): Repair possible setjmp clobbering.
16740
efc736d3
PE
16741 * s/usg5-4-common.h (SETUP_SLAVE_PTY): Don't pass extra arg to 'fatal'.
16742
4e2fe2e6
PE
16743 * eval.c: Include <stdio.h>, for vsnprintf on non-GNU/Linux hosts.
16744
f97334a2
PE
16745 * data.c (arith_error): Mark with NO_RETURN if it doesn't return.
16746
4e75f29d
PE
16747 * alloc.c (bytes_used_when_full, SPARE_MEMORY, BYTES_USED):
16748 Define only if needed.
16749
90efadd1
PE
16750 * sysdep.c (_FILE_OFFSET_BITS): Make this hack even uglier
16751 by pacifying GCC about it. Maybe it's time to retire it?
875975e9 16752 * xfaces.c (USG, __TIMEVAL__): Likewise.
90efadd1 16753
3c647824
PE
16754 * dispextern.h (struct redisplay_interface): Rename param
16755 to avoid shadowing.
e264f262 16756 * termhooks.h (struct terminal): Likewise.
761383f4 16757 * xterm.c (xembed_send_message): Likewise.
3c647824 16758
b58c5c4a
PE
16759 * insdel.c (make_gap_smaller): Define only if
16760 USE_MMAP_FOR_BUFFERS || REL_ALLOC || DOUG_LEA_MALLOC.
16761
cad59032
PE
16762 * keyboard.c (read_char): Make a var volatile so longjmp won't clobber
16763 it.
16764
c339dc2e
PE
16765 * emacs.c (MAX_HEAP_BSS_DIFF, my_edata): Move to where they're used,
16766 so that we aren't warned about unused symbols.
16767
91a3e27b
PE
16768 * xfns.c (Fx_file_dialog): Rename local to avoid shadowing.
16769
399c71d3 16770 * xdisp.c (x_produce_glyphs): Mark var as initialized (Bug#8512).
7a3fb125 16771
8ffc96f5
PE
16772 * xfns.c (x_real_positions): Mark locals as initialized.
16773
eef9bc79
PE
16774 * xmenu.c (xmenu_show): Don't use uninitialized vars.
16775
098db9dd
PE
16776 * xterm.c: Fix problems found by static analysis with other toolkits.
16777 (toolkit_scroll_bar_interaction): Define and use only if USE_X_TOOLKIT.
dda3aedd
PE
16778 (x_dispatch_event): Declare static if USE_GTK, and
16779 define if USE_GTK || USE_X_TOOLKIT.
098db9dd 16780 (SET_SAVED_BUTTON_EVENT): Define only if USE_X_TOOLKIT || USE_GTK.
dda3aedd 16781 * xterm.h (x_dispatch_event): Extern only if USE_X_TOOLKIT.
841a1577
JB
16782 * xterm.c, xterm.h (x_mouse_leave): Bring this function back, but only
16783 if defined HAVE_MENUS && !defined USE_X_TOOLKIT && !defined USE_GTK.
098db9dd 16784
eb18f6cc
PE
16785 * xmenu.c (menu_help_callback): Pointer type fixes.
16786 Use const pointers when pointing at readonly data. Avoid pointer
16787 signedness clashes.
16788 (FALSE): Remove unused macro.
16789 (update_frame_menubar): Remove unused decl.
16790
1fe72bf8
PE
16791 * xfns.c (Fx_hide_tip): Move locals to avoid shadowing.
16792
60d9e1db
PE
16793 * menu.c (push_submenu_start, push_submenu_end): Do not define unless
16794 USE_X_TOOLKIT || USE_GTK || HAVE_NS || defined HAVE_NTGUI.
16795 (single_menu_item): Rename local to avoid shadowing.
16796
39261c26
PE
16797 * keyboard.c (make_lispy_event): Remove unused local var.
16798
018c5e19
PE
16799 * frame.c, frame.h (x_get_resource_string): Bring this back, but
16800 only if HAVE_X_WINDOWS && !USE_X_TOOLKIT.
16801
63d2b86e
PE
16802 * bitmaps: Change bitmaps from unsigned char back to the X11
16803 compatible char. Avoid the old compiler warnings about
16804 out-of-range initializers by using, for example, '\xab' rather
16805 than 0xab.
16806
aefd87e1
PE
16807 * xgselect.c (xgselect_initialize): Check vs interface
16808 even if ! (defined (USE_GTK) || defined (HAVE_GCONF)).
16809
bf501fb9
PE
16810 * xmenu.c (xmenu_show): Rename parm to avoid shadowing.
16811
e9829fdf
PE
16812 * xterm.c (x_create_toolkit_scroll_bar): Use const * for pointers
16813 to read-only memory.
16814
1086c095
PE
16815 * fns.c (vector): Remove; this old hack is no longer needed.
16816
2baccd04 16817 * xsmfns.c (create_client_leader_window): Rename shadowing arg.
401f10cb 16818 Remove unused var.
dde42981 16819 (gdk_x11_set_sm_client_id) [!USE_GTK]: Don't define.
2baccd04 16820
72391843 16821 * xrdb.c (x_load_resources): Omit unused local.
3565b346 16822
436c16df 16823 * xfns.c (free_frame_menubar, atof): Remove duplicate decls.
8a94ea33 16824 (x_window): Rename locals to avoid shadowing.
dc5ddd85 16825 (USG): Use the kludged USG macro, to pacify gcc.
436c16df 16826
92bb796d 16827 * xterm.c (x_alloc_nearest_color_for_widget): Remove; unused.
bbbef9e1 16828 (x_term_init): Remove local to avoid shadowing.
92bb796d 16829
764430a3 16830 * xfns.c, xterm.c (_XEditResCheckMessages): Protoize decl.
4887c6e2
PE
16831
16832 * xdisp.c, dispextern.h (set_vertical_scroll_bar): Now extern if
16833 USE_TOOLKIT_SCROLL_BARS && !USE_GTK, as xterm.c needs it then.
16834
d1dfb56c
EZ
168352011-04-16 Eli Zaretskii <eliz@gnu.org>
16836
c4354cb4
EZ
16837 * gnutls.c (Fgnutls_boot): Don't pass Lisp_Object to `error'.
16838
d1dfb56c
EZ
16839 Fix regex.c, syntax.c and friends for buffers > 2GB.
16840 * syntax.h (struct gl_state_s): Declare character position members
16841 EMACS_INT.
16842
16843 * syntax.c (update_syntax_table): Declare 2nd argument EMACS_INT.
16844
04f2d78b
CB
16845 * textprop.c (verify_interval_modification, interval_of):
16846 Declare arguments EMACS_INT.
d1dfb56c
EZ
16847
16848 * intervals.c (adjust_intervals_for_insertion): Declare arguments
16849 EMACS_INT.
16850
16851 * intervals.h (CHECK_TOTAL_LENGTH): Cast to EMACS_INT, not `int'.
16852
16853 * indent.c (Fvertical_motion): Local variable it_start is now
16854 EMACS_INT.
16855
16856 * regex.c (re_match, re_match_2, re_match_2_internal)
16857 (bcmp_translate, regcomp, regexec, print_double_string)
16858 (group_in_compile_stack, re_search, re_search_2, regex_compile)
16859 (re_compile_pattern, re_exec): Declare arguments and local
16860 variables `size_t' and `ssize_t' and return values `regoff_t', as
16861 appropriate.
16862 (POP_FAILURE_REG_OR_COUNT) <pfreg>: Declare `long'.
16863 (CHECK_INFINITE_LOOP) <failure>: Declare `ssize_t'.
16864 <compile_stack_type>: `size' and `avail' are now `size_t'.
16865
16866 * regex.h <regoff_t>: Use ssize_t, not int.
16867 (re_search, re_search_2, re_match, re_match_2): Arguments that
16868 specify buffer/string position and length are now ssize_t and
16869 size_t. Return type is regoff_t.
16870
613052cd
BK
168712011-04-16 Ben Key <bkey76@gmail.com>
16872
16873 * nsfont.m: Fixed bugs in ns_get_family and
16874 ns_descriptor_to_entity that were caused by using free to
16875 deallocate memory blocks that were allocated by xmalloc (via
16876 xstrdup). This caused Emacs to crash when compiled with
16877 XMALLOC_OVERRUN_CHECK defined (when Emacs was configured with
16878 --enable-checking=xmallocoverrun). xfree is now used to
16879 deallocate these memory blocks.
16880
4170f62f 168812011-04-15 Paul Eggert <eggert@cs.ucla.edu>
3e047f51 16882
71b41406
PE
16883 * sysdep.c (emacs_read): Remove unnecessary check vs MAX_RW_COUNT.
16884
9587a89d
PE
16885 emacs_write: Accept and return EMACS_INT for sizes.
16886 See http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00514.html
16887 et seq.
16888 * gnutls.c, gnutls.h (emacs_gnutls_read, emacs_gnutls_write):
16889 Accept and return EMACS_INT.
16890 (emacs_gnutls_write): Return the number of bytes written on
16891 partial writes.
16892 * sysdep.c, lisp.h (emacs_read, emacs_write): Likewise.
273a5f82
PE
16893 (emacs_read, emacs_write): Remove check for negative size, as the
16894 Emacs source code has been audited now.
9587a89d
PE
16895 * sysdep.c (MAX_RW_COUNT): New macro, to work around kernel bugs.
16896 (emacs_read, emacs_write): Use it.
273a5f82
PE
16897 * process.c (send_process): Adjust to the new signatures of
16898 emacs_write and emacs_gnutls_write. Do not attempt to store
16899 a byte offset into an 'int'; it might overflow.
9587a89d 16900 See http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00483.html
273a5f82 16901
3e047f51
PE
16902 * sound.c: Don't assume sizes fit in 'int'.
16903 (struct sound_device.period_size, alsa_period_size):
9c3c56a7 16904 Return EMACS_INT, not int.
3e047f51 16905 (struct sound_device.write, vox_write, alsa_write):
9c3c56a7
PE
16906 Accept EMACS_INT, not int.
16907 (wav_play, au_play): Use EMACS_INT to store sizes and to
3e047f51
PE
16908 record read return values.
16909
cc39a9db
BK
169102011-04-15 Ben Key <bkey76@gmail.com>
16911
c9d0ec6d
JB
16912 * keyboard.c (Qundefined): Don't declare static since it is used
16913 in nsfns.m.
16914 * xfaces.c (Qbold, Qexpanded, Qitalic, Qcondensed): Don't declare
16915 static since they are used in nsfont.m.
cc39a9db 16916
6c60eb9f
SM
169172011-04-15 Stefan Monnier <monnier@iro.umontreal.ca>
16918
16919 * process.c (Qprocessp): Don't declare static.
16920 * lisp.h (Qprocessp): Declare again.
16921
7990b61a
JB
169222011-04-15 Juanma Barranquero <lekktu@gmail.com>
16923
16924 * font.c (Qopentype): Don't make static (used from w32uniscribe.c).
16925
5d4cb038
PE
169262011-04-14 Paul Eggert <eggert@cs.ucla.edu>
16927
8bd7b830 16928 Improve C-level modularity by making more things 'static'.
cd64ea1d 16929
e3b27b31
PE
16930 Don't publish debugger-only interfaces to other modules.
16931 * lisp.h (safe_debug_print, debug_output_compilation_hack):
16932 (verify_bytepos, count_markers): Move decls to the only modules
16933 that need them.
16934 * region-cache.h (pp_cache): Likewise.
16935 * window.h (check_all_windows): Likewise.
16936 * marker.c, print.c, region-cache.c, window.c: Decls moved here.
16937
5d4cb038
PE
16938 * sysdep.c (croak): Now static, if
16939 defined TIOCNOTTY || defined USG5 || defined CYGWIN.
16940 * syssignal.h (croak): Declare only if not static.
69003fd8
PE
16941
16942 * alloc.c (refill_memory_reserve): Now static if
16943 !defined REL_ALLOC || defined SYSTEM_MALLOC.
16944 * lisp.h (refill_memory_reserve): Declare only if not static.
93ea6e8f 16945
e87b6180
PE
16946 * xsettings.c, xsettings.h (xsettings_get_system_normal_font):
16947 Define only if USE_LUCID.
16948
ac64929e
PE
16949 * xrdb.c (x_customization_string, x_rm_string): Now static.
16950
6f37259d
PE
16951 * xmenu.c (x_menu_wait_for_event): Export only if USE_MOTIF.
16952 * xterm.h (x_menu_wait_for_event): Declare only if USE_MOTIF.
16953
1683e3ab
PE
16954 * xdisp.c (draw_row_with_mouse_face): Now static.
16955 * dispextern.h (draw_row_with_mouse_fave): Remove decl.
16956
de9c2632
PE
16957 * window.h (check_all_windows): Mark externally visible.
16958
2b96acb7
PE
16959 * window.c (window_deletion_count): Now static.
16960
16961 * undo.c: Make symbols static if they're not exported.
16962 (last_undo_buffer, last_boundary_position, pending_boundary):
16963 Now static.
16964
50436f33
PE
16965 * textprop.c (interval_insert_behind_hooks): Now static.
16966 (interval_insert_in_front_hooks): Likewise.
16967
64520e5c
PE
16968 * term.c: Make symbols static if they're not exported.
16969 (tty_turn_off_highlight, get_tty_terminal, max_frame_cols):
16970 (max_frame_lines, tty_set_terminal_modes):
16971 (tty_reset_terminal_modes, tty_turn_off_highlight):
16972 (get_tty_terminal): Now static.
16973 (term_mouse_moveto): Do not define if HAVE_WINDOW_SYSTEM.
16974 * termhooks.h (term_mouse_moveto): Do not declare if
8bd7b830 16975 HAVE_WINDOW_SYSTEM.
64520e5c
PE
16976 * dispextern.h (tty_set_terminal_modes, tty_reset_terminal_modes):
16977 (tty_turn_off_highlight, get_tty_terminal): Remove decls.
16978
1fa53021
PE
16979 * sysdep.c: Make symbols static if they're not exported.
16980 (emacs_get_tty, emacs_set_tty, old_fcntl_flags, old_fcntl_owner):
16981 Now static.
16982 (sigprocmask_set, full_mask): Remove; unused.
16983 (wait_debugging): Mark as visible.
16984 * syssignal.h (SIGFULLMASK, full_mask): Remove decls.
16985 * systty.h (emacs_get_tty, emacs_set_tty): Remove decls.
16986
d4b43b22
PE
16987 * syntax.c (syntax_temp): Define only if !__GNUC__.
16988
b7c513d0
PE
16989 * sound.c (current_sound_device, current_sound): Now static.
16990
989b29ad
PE
16991 * search.c (searchbufs, searchbuf_head): Now static.
16992
13a55a78
PE
16993 * scroll.c (scroll_cost): Remove; unused.
16994 * dispextern.h (scroll_cost): Remove decl.
16995
de68a1fc
PE
16996 * region-cache.h (pp_cache): Mark as externally visible.
16997
40ccffa6
PE
16998 * process.c: Make symbols static if they're not exported.
16999 (process_tick, update_tick, create_process, chan_process):
17000 (Vprocess_alist, proc_buffered_char, datagram_access):
17001 (fd_callback_data, send_process_frame, process_sent_to): Now static.
17002 (deactivate_process): Mark defn as static, as well as decl.
17003 * lisp.h (create_process): Remove decl.
17004 * process.h (chan_process, Vprocess_alist): Remove decls.
17005
ad64fc97
PE
17006 * print.c: Make symbols static if they're not exported.
17007 (print_depth, new_backquote_output, being_printed, print_buffer):
17008 (print_buffer_size, print_buffer_pos, print_buffer_pos_byte):
17009 (print_interval, print_number_index, initial_stderr_stream):
17010 Now static.
17011 * lisp.h (Fprinc): Remove decl.
17012 (debug_output_compilation_hack): Mark as externally visible.
17013
adddb265
PE
17014 * sysdep.c (croak): Move decl from here to syssignal.h.
17015 * syssignal.h (croak): Put it here, so the API can be checked when
17016 'croak' is called from dissociate_if_controlling_tty.
17017
1717ede2
PE
17018 * minibuf.c: Make symbols static if they're not exported.
17019 (minibuf_save_list, choose_minibuf_frame): Now static.
17020 * lisp.h (choose_minibuf_frame): Remove decl.
17021
fa5fb2bc
PE
17022 * lisp.h (verify_bytepos, count_markers): Mark as externally visible.
17023
1e3890d1
PE
17024 * lread.c: Make symbols static if they're not exported.
17025 (read_objects, initial_obarray, oblookup_last_bucket_number):
17026 Now static.
17027 (make_symbol): Remove; unused.
17028 * lisp.h (initial_obarray, make_symbol): Remove decls.
17029
8a1414fa
PE
17030 * keyboard.c: Make symbols static if they're not exported.
17031 (single_kboard, recent_keys_index, total_keys, recent_keys):
17032 (this_command_key_count_reset, raw_keybuf, raw_keybuf_count):
17033 (this_single_command_key_start, echoing, last_auto_save):
17034 (read_key_sequence_cmd, dribble, recursive_edit_unwind):
17035 (command_loop, echo_now, keyboard_init_hook, help_char_p):
17036 (quit_throw_to_read_char, command_loop_2, top_level_1, poll_timer):
17037 (Vlispy_mouse_stem, double_click_count):
17038 Now static.
17039 (force_auto_save_soon): Define only if SIGDANGER.
17040 (ignore_mouse_drag_p): Now static if
17041 !defined HAVE_WINDOW_SYSTEM || defined USE_GTK || defined HAVE_NS.
17042 (print_help): Remove; unused.
17043 (stop_character, last_timer_event): Mark as externally visible.
17044 * keyboard.h (ignore_mouse_drag_p): Declare only if
17045 defined HAVE_WINDOW_SYSTEM && !defined USE_GTK && !defined HAVE_NS.
17046 (echo_now, help_char_p, quit_throw_to_read_char): Remove decls.
17047 * lisp.h (echoing): Remove decl.
17048 (force_auto_save_soon): Declare only if SIGDANGER.
17049 * xdisp.c (redisplay_window): Simplify code, to make it more
17050 obvious that ignore_mouse_drag_p is not accessed if !defined
17051 USE_GTK && !defined HAVE_NS.
17052
93ea6e8f
PE
17053 * intervals.c: Make symbols static if they're not exported.
17054 (merge_properties_sticky, merge_interval_right, delete_interval):
17055 Now static.
17056 * intervals.h (merge_interval_right, delete_interval): Remove decls.
17057
77382fcc
PE
17058 * insdel.c: Make symbols static if they're not exported.
17059 However, leave prepare_to_modify_buffer alone. It's never
17060 called from outside this function, but that appears to be a bug.
17061 (combine_after_change_list, combine_after_change_buffer):
4889fc82 17062 (adjust_after_replace, signal_before_change): Now static.
77382fcc
PE
17063 (adjust_after_replace_noundo): Remove; unused.
17064 * lisp.h (adjust_after_replace, adjust_after_replace_noundo):
4889fc82 17065 (signal_before_change): Remove decls.
77382fcc 17066
9306c32e
PE
17067 * indent.c (val_compute_motion, val_vmotion): Now static.
17068
cd44d2eb
PE
17069 * image.c: Make symbols static if they're not exported.
17070 * dispextern.h (x_create_bitmap_from_xpm_data): Do not declare
17071 if USE_GTK.
17072 * image.c (x_create_bitmap_from_xpm_data): Do not define if USE_GTK.
17073 (xpm_color_cache, ct_table, ct_colors_allocated): Now static.
17074
ad9a7a06
PE
17075 * fringe.c (standard_bitmaps): Now static.
17076 (max_used_fringe_bitmap): Now static, unless HAVE_NS.
17077
81626931
PE
17078 * frame.c: Make symbols static if they're not exported.
17079 (x_report_frame_params, make_terminal_frame): Now static.
17080 (get_frame_param): Now static, unless HAVE_NS.
17081 (x_fullscreen_adjust): Define if WINDOWSNT, not if HAVE_WINDOW_SYSTEM.
17082 (x_get_resource_string): Remove; not used.
17083 * frame.h (make_terminal_frame, x_report_frame_params):
17084 (x_get_resource_string); Remove decls.
17085 (x_fullscreen_adjust): Declare only if WINDOWSNT.
17086 * lisp.h (get_frame_param): Declare only if HAVE_NS.
17087
239f9db9
PE
17088 * font.c, fontset.c: Make symbols static if they're not exported.
17089 * dispextern.h (FACE_SUITABLE_FOR_ASCII_CHAR_P): New macro.
17090 (FACE_SUITABLE_FOR_CHAR_P): Use it.
17091 * font.c (font_close_object): Now static.
17092 * font.h (font_close_object): Remove.
17093 * fontset.c (FONTSET_OBJLIST): Remove.
17094 (free_realized_fontset) #if-0 the body, which does nothing.
17095 (face_suitable_for_char_p): #if-0, as it's never called.
17096 * fontset.h (face_suitable_for_char_p): Remove decl.
04f2d78b
CB
17097 * xfaces.c (face_at_string_position):
17098 Use FACE_SUITABLE_FOR_ASCII_CHAR_P, not FACE_SUITABLE_FOR_CHAR_P,
239f9db9
PE
17099 since 0 is always ASCII.
17100
dfcf3579
PE
17101 * fns.c (weak_hash_tables): Now static.
17102
5045092b
PE
17103 * fileio.c: Make symbols static if they're not exported.
17104 (auto_saving, auto_save_mode_bits, auto_save_error_occurred):
17105 (Vwrite_region_annotation_buffers): Now static.
17106
57a96f5c
PE
17107 * eval.c: Make symbols static if they're not exported.
17108 (backtrace_list, lisp_eval_depth, when_entered_debugger): Now static.
17109 * lisp.h (backtrace_list): Remove decl.
17110
35f08c38
PE
17111 * emacs.c: Make symbols static if they're not exported.
17112 (malloc_state_ptr, malloc_using_checking, syms_of_emacs):
17113 (fatal_error_code, fatal_error_signal_hook, standard_args):
17114 Now static.
17115 (fatal_error_signal): Now static, unless FLOAT_CATCH_SIGKILL.
17116 (DEFINE_DUMMY_FUNCTION): Mark function as externally visible.
17117 (__CTOR_LIST__, __DTOR_LIST__): Now externally visible.
17118 * lisp.h (fatal_error_signal_hook): Remove decl.
17119 (fatal_error_signal): Declare only if FLOAT_CATCH_SIGKILL.
17120
f44bd759
PE
17121 * editfns.c: Move a (normally-unused) function to its only use.
17122 * editfns.c, lisp.h (get_operating_system_release): Remove.
17123 * process.c (init_process) [DARWIN_OS]: Do it inline, as it is not
17124 worth the hassle of breaking this out.
17125
b532497d
PE
17126 * xterm.c: Make symbols static if they're not exported.
17127 (x_raise_frame, x_lower_frame, x_wm_set_window_state):
17128 (x_wm_set_icon_pixmap, x_initialize, XTread_socket_fake_io_error):
17129 (x_destroy_window, x_delete_display):
17130 Now static.
17131 (x_dispatch_event): Now static if ! (USE_MOTIF || USE_X_TOOLKIT).
17132 (x_mouse_leave): Remove; unused.
17133 * xterm.h (x_display_info_for_name, x_raise_frame, x_lower_frame):
17134 (x_destroy_window, x_wm_set_window_state, x_wm_set_icon_pixmap):
17135 (x_delete_display, x_initialize, x_set_border_pixel, x_screen_planes):
17136 Remove decls.
17137 (x_mouse_leave): Declare only if WINDOWSNT.
17138 (x_dispatch_event): Declare only if USE_MOTIF or USE_X_TOOLKIT.
17139 (xic_create_fontsetname): Declare only if HAVE_X_WINDOWS &&
17140 USE_X_TOOLKIT.
17141
1675728f
PE
17142 * ftxfont.c: Make symbols static if they're not exported.
17143 (ftxfont_driver): Export only if !defined HAVE_XFT && def8ined
17144 HAVE_FREETYPE.
17145 * font.h (ftxfont_driver): Likewise.
17146
e4cebfca
PE
17147 * xfns.c: Make symbols static if they're not exported.
17148 (x_last_font_name, x_display_info_for_name):
17149 (x_set_foreground_color, x_set_background_color, x_set_mouse_color):
17150 (x_set_cursor_color, x_set_border_pixel, x_set_border_color):
17151 (x_set_cursor_type, x_set_icon_type, x_set_icon_name):
17152 (x_set_scroll_bar_foreground, x_set_scroll_bar_background):
17153 (x_explicitly_set_name, x_set_title, xic_defaut_fontset, tip_timer):
17154 (last_show_tip_args): Now static.
17155 (xic_defaut_fontset, xic_create_fontsetname): Define only if
17156 defined HAVE_X_WINDOWS && defined USE_X_TOOLKIT
17157 (x_screen_planes): Remove; unused.
17158 * dispextern.h (x_screen_planes): Remove decl.
17159
5bf46f05
PE
17160 * dispnew.c: Make symbols static if they're not exported.
17161 * dispextern.h (redraw_garbaged_frames, scrolling):
17162 (increment_row_positions): Remove.
17163 * dispnew.c (new_glyph_matrix, increment_row_positions, scrolling):
17164 (delayed_size_change, glyph_matrix_count, glyph_pool_count):
17165 Now static.
17166 (redraw_garbaged_frames): Remove; unused.
17167
435f4c28
PE
17168 * xfaces.c: Make symbols static if they're not exported.
17169 * dispextern.h (ascii_face_of_lisp_face, free_realized_face):
17170 Remove decls.
17171 * xterm.h (defined_color): Remove decls.
17172 (x_free_dpy_colors): Declare only if USE_X_TOOLKIT.
17173 * xfaces.c (tty_suppress_bold_inverse_default_colors_p):
17174 (menu_face_changed_default, defined_color, free_realized_face):
17175 (x_free_dpy_colors): Define only if USE_X_TOOLKIT.
17176 (ascii_face_of_lisp_face): Remove; unused.
17177
8524aef3
PE
17178 * xdisp.c: Make symbols static if they're not exported.
17179 * dispextern.h (scratch_glyph_row, window_box_edges):
17180 (glyph_to_pixel_coords, set_cursor_from_row):
17181 (get_next_display_element, set_iterator_to_next):
17182 (highlight_trailing_whitespace, frame_to_window_pixel_xy):
17183 (show_mouse_face): Remove decls
17184 * frame.h (message_buf_print): Likewise.
17185 * lisp.h (pop_message, set_message, check_point_in_composition):
17186 Likewise.
17187 * xterm.h (set_vertical_scroll_bar): Likewise.
17188 * xdisp.c (list_of_error, Vmessage_stack, line_number_displayed):
17189 (message_buf_print, scratch_glyph_row, displayed_buffer):
17190 (set_iterator_to_next, pop_message, set_message, set_cursor_from_row):
17191 (get_next_display_element, show_mouse_face, window_box_edges):
17192 (frame_to_window_pixel_xy, check_point_in_composition):
17193 (set_vertical_scroll_bar, highlight_trailing_whitespace): Now static.
17194 (glyph_to_pixel_coords): Remove; unused.
17195
16390cd2
PE
17196 * dired.c (file_name_completion): Now static.
17197
17198 * dbusbind.c (xd_in_read_queued_messages): Now static.
17199
a25f4dfa
PE
17200 * lisp.h (circular_list_error, FOREACH): Remove; unused.
17201 * data.c (circular_list_error): Remove.
17202
14a9c8df
PE
17203 * commands.h (last_point_position, last_point_position_buffer):
17204 (last_point_position_window): Remove decls.
17205 * keyboard.c: Make these variables static.
17206
04f2d78b
CB
17207 * coding.h (coding, code_convert_region, encode_coding_gap):
17208 Remove decls.
74ab6df5
PE
17209 * coding.c (Vsjis_coding_system, Vbig5_coding_system):
17210 (iso_code_class, detect_coding, code_convert_region): Now static.
17211 (encode_coding_gap): Remove; unused.
17212
38dfbee1
PE
17213 * chartab.c (chartab_chars, chartab_bits): Now static.
17214
a2cb4e63
PE
17215 * charset.h (charset_iso_8859_1): Remove decl.
17216 * charset.c (charset_iso_8859_1, charset_emacs, map_charset_for_dump):
17217 Now static.
17218
127198fd
PE
17219 * ccl.h (check_ccl_update, Vccl_program_table): Remove decls.
17220 * ccl.c (Vccl_program_table): Now static.
17221 (check_ccl_update): Remove; unused.
17222
d85b608f
PE
17223 * category.c (SET_CATEGORY_SET, set_category_set): Move here.
17224 * category.h: ... from here.
17225 * category.c (check_category_table, set_category_set): Now static.
17226
31cd66f3
PE
17227 * casetab.c (Vascii_upcase_table, Vascii_eqv_table): Now static.
17228 * lisp.h: Remove these decls.
17229
c358e587
PE
17230 * buffer.c (buffer_count): Remove unused var.
17231
e78aecca
PE
17232 * bidi.c (bidi_dump_cached_states): Mark as externally visible,
17233 so that it's not optimized away.
17234 (bidi_ignore_explicit_marks_for_paragraph_level): Likewise.
17235 * dispextern.h (bidi_dump_cached_states): Remove, since it's
17236 exported only to the debugger.
17237
e192d7d3 17238 * atimer.c (alarm_signal_handler, run_all_atimers): Now static.
04f2d78b 17239 * atimer.h (run_all_atimers): Remove; not exported.
e192d7d3 17240
92470028
PE
17241 font.c: Make copy_font_spec and merge_font_spec ordinary C functions.
17242 * font.c (copy_font_spec): Rename from Fcopy_font_spec, since it
17243 was inaccessible from Lisp.
17244 (merge_font_spec): Likewise, renaming from Fmerge_font_spec.
17245 * font.c, font.h, fontset.c, xfaces.c, xfont.c: Change all uses.
17246
244ed907
PE
17247 alloc.c: Import and export fewer symbols, and remove unused items.
17248 * lisp.h (suppress_checking, die): Declare only if ENABLE_CHECKING
17249 is defined.
17250 (suppress_checking): Add EXTERNALLY_VISIBLE attribute, so that
17251 it's not optimized away by whole-program optimization.
17252 (message_enable_multibyte, free_misc): Remove.
17253 (catchlist, handlerlist, mark_backtrace):
17254 Declare only if BYTE_MARK_STACK.
17255 (mark_byte_stack): Likewise, fixing a ifdef-vs-if typo.
17256 * alloc.c (pure): Export only if VIRT_ADDR_VARIES is defined.
17257 (message_enable_multibyte): Remove decl.
17258 (free_misc, interval_free_list, float_block, float_block_index):
17259 (n_float_blocks, float_free_list, cons_block, cons_block_index):
17260 (cons_free_list, last_marked_index):
17261 Now static.
17262 (suppress_checking, die): Define only if ENABLE_CHECKING is defined.
17263 * eval.c (catchlist, handlerlist): Export only if BYTE_MARK_STACK.
17264 (mark_backtrace): Define only if BYTE_MARK_STACK.
17265 * xdisp.c (message_enable_multibyte): Now static.
17266
61c2b50e 17267 Declare Lisp_Object Q* variables to be 'static' if not exported.
955cbe7b
PE
17268 This makes it easier for human readers (and static analyzers)
17269 to see whether these variables are used from other modules.
17270 * alloc.c, buffer.c, bytecode.c, callint.c, casetab.c, category.c:
17271 * ccl.c, character.c, charset.c, cmds.c, coding.c, composite.c:
17272 * data.c, dbusbind.c, dired.c, editfns.c, eval.c, fileio.c, fns.c:
17273 * font.c, frame.c, fringe.c, ftfont.c, image.c, keyboard.c, keymap.c:
17274 * lread.c, macros.c, minibuf.c, print.c, process.c, search.c:
17275 * sound.c, syntax.c, textprop.c, window.c, xdisp.c, xfaces.c, xfns.c:
17276 * xmenu.c, xselect.c:
17277 Declare Q* vars static if they are not used in other modules.
17278 * ccl.h, character.h, charset.h, coding.h, composite.h, font.h:
17279 * frame.h, intervals.h, keyboard.h, lisp.h, process.h, syntax.h:
17280 Remove decls of unexported vars.
17281 * keyboard.h (EVENT_HEAD_UNMODIFIED): Remove now-unused macro.
17282
95c82688
PE
17283 * lisp.h (DEFINE_FUNC): Make sname 'static'.
17284
16a97296
PE
17285 Make Emacs functions such as Fatom 'static' by default.
17286 This makes it easier for human readers (and static analyzers)
17287 to see whether these functions can be called from other modules.
17288 DEFUN now defines a static function. To make the function external
17289 so that it can be used in other C modules, use the new macro DEFUE.
8bd7b830
PE
17290 * lisp.h (Funibyte_char_to_multibyte, Fsyntax_table_p):
17291 (Finit_image_library):
16a97296
PE
17292 (Feval_region, Fbacktrace, Ffetch_bytecode, Fswitch_to_buffer):
17293 (Ffile_executable_p, Fmake_symbolic_link, Fcommand_execute):
17294 (Fget_process, Fdocumentation_property, Fbyte_code, Ffile_attributes):
17295 Remove decls, since these functions are now static.
17296 (Funintern, Fget_internal_run_time): New decls, since these functions
17297 were already external.
95c82688 17298
16a97296
PE
17299 * alloc.c, buffer.c, callint.c, callproc.c, casefiddle.c, casetab.c:
17300 * ccl.c, character.c, chartab.c, cmds.c, coding.c, data.c, dispnew.c:
17301 * doc.c, editfns.c, emacs.c, eval.c, fileio.c, filelock.c, floatfns.c:
17302 * fns.c, font.c, fontset.c, frame.c, image.c, indent.c:
17303 * keyboard.c, keymap.c, lread.c:
17304 * macros.c, marker.c, menu.c, minibuf.c, print.c, process.c, search.c:
17305 * syntax.c, term.c, terminal.c, textprop.c, undo.c:
17306 * window.c, xdisp.c, xfaces.c, xfns.c, xmenu.c, xsettings.c:
17307 Mark functions with DEFUE instead of DEFUN,
17308 if they are used in other modules.
17309 * buffer.c (Fset_buffer_major_mode, Fdelete_overlay): New forward
17310 decls for now-static functions.
17311 * buffer.h (Fdelete_overlay): Remove decl.
17312 * callproc.c (Fgetenv_internal): Mark as internal.
17313 * composite.c (Fremove_list_of_text_properties): Remove decl.
17314 (Fcomposition_get_gstring): New forward static decl.
17315 * composite.h (Fcomposite_get_gstring): Remove decl.
17316 * dired.c (Ffile_attributes): New forward static decl.
17317 * doc.c (Fdocumntation_property): New forward static decl.
17318 * eval.c (Ffetch_bytecode): New forward static decl.
17319 (Funintern): Remove extern decl; now in .h file where it belongs.
17320 * fileio.c (Fmake_symbolic_link): New forward static decl.
17321 * image.c (Finit_image_library): New forward static decl.
17322 * insdel.c (Fcombine_after_change_execute): Make forward decl static.
17323 * intervals.h (Fprevious_property_change):
17324 (Fremove_list_of_text_properties): Remove decls.
17325 * keyboard.c (Fthis_command_keys): Remove decl.
17326 (Fcommand_execute): New forward static decl.
17327 * keymap.c (Flookup_key): New forward static decl.
17328 (Fcopy_keymap): Now static.
17329 * keymap.h (Flookup_key): Remove decl.
17330 * process.c (Fget_process): New forward static decl.
17331 (Fprocess_datagram_address): Mark as internal.
17332 * syntax.c (Fsyntax_table_p): New forward static decl.
17333 (skip_chars): Remove duplicate decl.
17334 * textprop.c (Fprevious_property_change): New forward static decl.
17335 * window.c (Fset_window_fringes, Fset_window_scroll_bars):
17336 Now internal.
17337 (Fset_window_margins, Fset_window_vscroll): New forward static decls.
17338 * window.h (Fset_window_vscroll, Fset_window_margins): Remove decls.
17339
785bbd42
PE
17340 * editfns.c (Fformat): Remove unreachable code.
17341
8b913b57
AS
173422011-04-14 Andreas Schwab <schwab@linux-m68k.org>
17343
17344 * fileio.c (Finsert_file_contents): Fix typo in 2005-05-13
17345 change. (Bug#8496)
17346
a6744a35
EZ
173472011-04-13 Eli Zaretskii <eliz@gnu.org>
17348
17349 * xdisp.c (handle_invisible_prop): Don't call bidi_paragraph_init
17350 when at ZV. (Bug#8487)
17351
e7974947
AS
173522011-04-12 Andreas Schwab <schwab@linux-m68k.org>
17353
baad03f0
AS
17354 * charset.c (Fclear_charset_maps): Use xfree instead of free.
17355 (Bug#8437)
17356 * keyboard.c (parse_tool_bar_item): Likewise.
17357 * sound.c (sound_cleanup, alsa_close): Likewise.
17358 * termcap.c (tgetent): Likewise.
17359 * xfns.c (x_default_font_parameter): Likewise.
17360 * xsettings.c (read_and_apply_settings): Likewise.
17361
e7974947
AS
17362 * alloc.c (overrun_check_malloc, overrun_check_realloc)
17363 (overrun_check_free): Protoize.
17364
28272684
PE
173652011-04-12 Paul Eggert <eggert@cs.ucla.edu>
17366
17367 * sysdep.c (emacs_read, emacs_write): Check for negative sizes
17368 since callers should never pass a negative size.
17369 Change the signature to match that of plain 'read' and 'write'; see
17370 <http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00397.html>.
17371 * lisp.h: Update prototypes of emacs_write and emacs_read.
17372
11997c76
EZ
173732011-04-11 Eli Zaretskii <eliz@gnu.org>
17374
17375 * xdisp.c (redisplay_window): Don't try to determine the character
17376 position of the scroll margin if the window start point w->startp
e896f03c 17377 is outside the buffer's accessible region. (Bug#8468)
11997c76 17378
8a2cbd72
EZ
173792011-04-10 Eli Zaretskii <eliz@gnu.org>
17380
17381 Fix write-region and its subroutines for buffers > 2GB.
17382 * fileio.c (a_write, e_write): Modify declaration of arguments and
17383 local variables to support buffers larger than 2GB.
17384 (Fcopy_file): Use EMACS_INT for return value of emacs_read.
17385
17386 * sysdep.c (emacs_write, emacs_read): Use ssize_t for last
17387 argument, local variables, and return value.
17388
17389 * lisp.h: Update prototypes of emacs_write and emacs_read.
17390
17391 * sound.c (vox_write): Use ssize_t for return value of emacs_write.
17392
4073e537 173932011-04-10 Paul Eggert <eggert@cs.ucla.edu>
eb3f1cc8 17394
1ebfdcb6
PE
17395 * xdisp.c (vmessage): Use memchr, not strnlen, which some hosts lack.
17396
b2ded58d
PE
17397 Fix more problems found by GCC 4.6.0's static checks.
17398
7d66342c
PE
17399 * xdisp.c (vmessage): Use a better test for character truncation.
17400
bbf47d44
PE
17401 * charset.c (load_charset_map): <, not <=, for optimization,
17402 and to avoid potential problems with integer overflow.
9248994d 17403 * chartab.c (sub_char_table_set_range, char_table_set_range): Likewise.
f9a68bc5 17404 * casetab.c (set_identity, shuffle): Likewise.
3ab1c7ce 17405 * editfns.c (Fformat): Likewise.
1e69125e 17406 * syntax.c (skip_chars): Likewise.
3befa583 17407
e3019616
PE
17408 * xmenu.c (set_frame_menubar): Allocate smaller local vectors.
17409 This also lets GCC 4.6.0 generate slightly better loop code.
17410
becfa255
PE
17411 * callint.c (Fcall_interactively): <, not <=, for optimization.
17412 (Fcall_interactively): Count the number of arguments produced,
17413 not the number of arguments given. This is simpler and lets GCC
17414 4.6.0 generate slightly better code.
17415
dae0cd48
PE
17416 * ftfont.c: Distingish more carefully between FcChar8 and char.
17417 The previous code passed unsigned char * to a functions like
17418 strlen and xstrcasecmp that expect char *, which does not
17419 conform to the C standard.
17420 (get_adstyle_property, ftfont_pattern_entity): Use FcChar8 for
17421 arguments to FcPatternGetString, and explicitly cast FcChar8 * to
17422 char * when the C standard requires it.
17423
76032d70
PE
17424 * keyboard.c (read_char): Remove unused var.
17425
eb3f1cc8
PE
17426 * eval.c: Port to Windows vsnprintf (Bug#8435).
17427 Include <limits.h>.
17428 (SIZE_MAX): Define if the headers do not.
17429 (verror): Do not give up if vsnprintf returns a negative count.
17430 Instead, grow the buffer. This ports to Windows vsnprintf, which
17431 does not conform to C99. Problem reported by Eli Zaretskii.
17432 Also, simplify the allocation scheme, by avoiding the need for
17433 calling realloc, and removing the ALLOCATED variable.
17434
70476b54
PE
17435 * eval.c (verror): Initial buffer size is 4000 (not 200) bytes.
17436
12020a9e
PE
17437 Remove invocations of doprnt, as Emacs now uses vsnprintf.
17438 But keep the doprint source code for now, as we might revamp it
17439 and use it again (Bug#8435).
ea6c7ae6
PE
17440 * lisp.h (doprnt): Remove.
17441 * Makefile.in (base_obj): Remove doprnt.o.
17442 * deps.mk (doprnt.o): Remove.
17443
5fdb398c
PE
17444 error: Print 32- and 64-bit integers portably (Bug#8435).
17445 Without this change, on typical 64-bit hosts error ("...%d...", N)
17446 was used to print both 32- and 64-bit integers N, which relied on
17447 undefined behavior.
61bdb816 17448 * lisp.h, m/amdx86-64.h, m/ia64.h, m/ibms390x.h (pEd): New macro.
5fdb398c
PE
17449 * lisp.h (error, verror): Mark as printf-like functions.
17450 * eval.c (verror): Use vsnprintf, not doprnt, to do the real work.
17451 Report overflow in size calculations when allocating printf buffer.
17452 Do not truncate output string at its first null byte.
17453 * xdisp.c (vmessage): Use vsnprintf, not doprnt, to do the real work.
17454 Truncate the output at a character boundary, since vsnprintf does not
17455 do that.
17456 * charset.c (check_iso_charset_parameter): Convert internal
17457 character to string before calling 'error', since %c now has the
17458 printf meaning.
17459 * coding.c (Fdecode_sjis_char, Fdecode_big5_char): Avoid int
17460 overflow when computing char to be passed to 'error'. Do not
17461 pass Lisp_Object to 'error'; pass the integer instead.
17462 * nsfns.m (Fns_do_applescript): Use int, not long, since it's
17463 formatted with plain %d.
17464
b189fa66
PE
17465 * eval.c (internal_lisp_condition_case): Don't pass spurious arg.
17466
bff87ef0
PE
17467 * keyboard.c (access_keymap_keyremap): Print func name, not garbage.
17468
7e2cac20
PE
17469 * coding.c (Fdecode_sjis_char): Don't assume CODE fits in int.
17470
ce4d90b5
PE
17471 * xterm.c (x_catch_errors): Remove duplicate declaration.
17472
266c9547
PE
17473 * term.c (maybe_fatal): Mark its 3rd arg as a printf format, too.
17474
79c49ad2
PE
17475 * xdisp.c, lisp.h (message_nolog): Remove; unused.
17476
368f4090
JM
174772011-04-10 Jim Meyering <meyering@redhat.com>
17478
17479 use ssize_t and size_t for read- and write-like emacs_gnutls_* functions
17480 * gnutls.c (emacs_gnutls_read): Adjust signature to be more read-like:
17481 return ssize_t not "int", and use size_t as the buffer length.
17482 (emacs_gnutls_write): Likewise, and make the buffer pointer "const".
17483 * gnutls.h: Update declarations.
17484 * process.c (read_process_output): Use ssize_t, to match.
17485 (send_process): Likewise.
17486
a32d4040
CY
174872011-04-09 Chong Yidong <cyd@stupidchicken.com>
17488
17489 * image.c (Fimagemagick_types): Doc fix, and comment cleanup.
17490
8546720e 174912011-04-09 Chong Yidong <cyd@stupidchicken.com>
aac0c6e3 17492
04f2d78b
CB
17493 * ftfont.c (get_adstyle_property, ftfont_pattern_entity):
17494 Use unsigned char, to match FcChar8 type definition.
aac0c6e3 17495
8546720e
GM
17496 * xterm.c (handle_one_xevent):
17497 * xmenu.c (create_and_show_popup_menu):
17498 * xselect.c (x_decline_selection_request)
17499 (x_reply_selection_request): Avoid type-punned deref of X events.
aac0c6e3 17500
0a2f5c1a 175012011-04-09 Eli Zaretskii <eliz@gnu.org>
a53e2e89
EZ
17502
17503 Fix some uses of `int' instead of EMACS_INT.
17504 * search.c (string_match_1, fast_string_match)
17505 (fast_c_string_match_ignore_case, fast_string_match_ignore_case)
17506 (scan_buffer, find_next_newline_no_quit)
17507 (find_before_next_newline, search_command, Freplace_match)
17508 (Fmatch_data): Make some `int' variables be EMACS_INT.
17509
17510 * xdisp.c (display_count_lines): 3rd argument and return value now
17511 EMACS_INT. All callers changed.
17512 (pint2hrstr): Last argument is now EMACS_INT.
17513
17514 * coding.c (detect_coding_utf_8, detect_coding_emacs_mule)
17515 (detect_coding_iso_2022, detect_coding_sjis, detect_coding_big5)
17516 (detect_coding_ccl, detect_coding_charset, decode_coding_utf_8)
17517 (decode_coding_utf_16, decode_coding_emacs_mule)
17518 (decode_coding_iso_2022, decode_coding_sjis, decode_coding_big5)
17519 (decode_coding_ccl, decode_coding_charset)
17520 <consumed_chars, consumed_chars_base>: Declare EMACS_INT.
17521 (decode_coding_iso_2022, decode_coding_emacs_mule)
17522 (decode_coding_sjis, decode_coding_big5, decode_coding_charset)
17523 <char_offset, last_offset>: Declare EMACS_INT.
17524 (encode_coding_utf_8, encode_coding_utf_16)
17525 (encode_coding_emacs_mule, encode_invocation_designation)
17526 (encode_designation_at_bol, encode_coding_iso_2022)
17527 (encode_coding_sjis, encode_coding_big5, encode_coding_ccl)
17528 (encode_coding_raw_text, encode_coding_charset) <produced_chars>:
17529 Declare EMACS_INT.
17530 (ASSURE_DESTINATION): Declare more_bytes EMACS_INT.
17531 (encode_invocation_designation): Last argument P_NCHARS is now
17532 EMACS_INT.
17533 (decode_eol): Declare pos_byte, pos, and pos_end EMACS_INT.
17534 (produce_chars): from_nchars and to_nchars are now EMACS_INT.
17535
17536 * coding.h (struct coding_system) <head_ascii>: Declare EMACS_INT.
17537 All users changed.
17538
17539 * ccl.c (Fccl_execute_on_string): Declare some variables
17540 EMACS_INT.
17541
8546720e 175422011-04-08 Samuel Thibault <sthibault@debian.org> (tiny change)
0080dc6b
SS
17543
17544 * term.c (init_tty): Fix incorrect ifdef placement (Bug#8450).
17545
4e19a977
CS
175462011-03-19 Christoph Scholtes <cschol2112@googlemail.com>
17547
17548 * process.c (Fformat_network_address): Doc fix.
17549
87302331
R
175502011-04-08 T.V. Raman <tv.raman.tv@gmail.com> (tiny change)
17551
ee7683eb 17552 * xml.c (parse_region): Avoid creating spurious whitespace nodes.
87302331 17553
cbb59342
CY
175542011-04-08 Chong Yidong <cyd@stupidchicken.com>
17555
17556 * keyboard.c (read_char): Call Lisp function help-form-show,
17557 instead of using internal_with_output_to_temp_buffer.
17558 (Qhelp_form_show): New var.
e0d38eeb 17559 (syms_of_keyboard): Use DEFSYM macro.
cbb59342
CY
17560
17561 * print.c (internal_with_output_to_temp_buffer): Function deleted.
17562
17563 * lisp.h (internal_with_output_to_temp_buffer): Remove prototype.
17564
e67a13ab
CY
175652011-04-06 Chong Yidong <cyd@stupidchicken.com>
17566
04f2d78b
CB
17567 * process.c (Flist_processes): Remove to Lisp.
17568 (list_processes_1): Delete.
e67a13ab 17569
973f782d
EZ
175702011-04-06 Eli Zaretskii <eliz@gnu.org>
17571
7c106b1e
EZ
17572 * msdos.c (careadlinkat, careadlinkatcwd): MS-DOS replacements.
17573
973f782d
EZ
17574 * w32.c (careadlinkat, careadlinkatcwd): New always-fail stubs.
17575
41cf7d1a 175762011-04-06 Paul Eggert <eggert@cs.ucla.edu>
27ccc379 17577
ca23cc88
PE
17578 Fix more problems found by GCC 4.6.0's static checks.
17579
f390e2d5
PE
17580 * xmenu.c (Fx_popup_dialog): Don't assume string is free of formats.
17581
42eea0d0
PE
17582 * menu.c (Fx_popup_menu): Don't assume error_name lacks printf formats.
17583
b69769da 17584 * lisp.h (message, message_nolog, fatal): Mark as printf-like.
1e973bc7 17585
f9541e84
PE
17586 * xdisp.c (vmessage): Mark as a printf-like function.
17587
13841b55
PE
17588 * term.c (vfatal, maybe_fatal): Mark as printf-like functions.
17589
c136c10f
PE
17590 * sound.c (sound_warning): Don't crash if arg contains a printf format.
17591
5e2d4a30
PE
17592 * image.c (tiff_error_handler, tiff_warning_handler): Mark as
17593 printf-like functions.
17594 (tiff_load): Add casts to remove these marks before passing them
17595 to system-supplied API.
17596
583f48b9
PE
17597 * eval.c (Fsignal): Remove excess argument to 'fatal'.
17598
b25d760e
PE
17599 * coding.c (EMIT_ONE_BYTE, EMIT_TWO_BYTES): Use unsigned, not int.
17600 This avoids several warnings with gcc -Wstrict-overflow.
d5efd1d1
PE
17601 (DECODE_COMPOSITION_RULE): If the rule is invalid, goto invalid_code
17602 directly, rather than having caller test rule sign. This avoids
17603 some unnecessary tests.
17604 * composite.h (COMPOSITION_ENCODE_RULE_VALID): New macro.
17605 (COMPOSITION_ENCODE_RULE): Arguments now must be valid. This
17606 affects only one use, in DECODE_COMPOSITION_RULE, which is changed.
b25d760e 17607
bc7b6697 17608 * xfont.c (xfont_text_extents): Remove var that was set but not used.
625a3eb1 17609 (xfont_open): Avoid unnecessary tests.
bc7b6697 17610
27ccc379
PE
17611 * composite.c (composition_gstring_put_cache): Use unsigned integer.
17612
dcd5c89a
PE
17613 * composite.h, composite.c (composition_gstring_put_cache):
17614 Use EMACS_INT, not int, for length.
17615
b13a45c6
PE
17616 * composite.h (COMPOSITION_DECODE_REFS): New macro,
17617 breaking out part of COMPOSITION_DECODE_RULE.
17618 (COMPOSITION_DECODE_RULE): Use it.
17619 * composite.c (get_composition_id): Remove unused local vars,
17620 by using the new macro.
17621
1e792e4d
PE
17622 * textprop.c (set_text_properties_1): Change while to do-while,
17623 since the condition is always true at first.
17624
dc6c6455 17625 * intervals.c (graft_intervals_into_buffer): Mark var as used.
aa86731f
PE
17626 (interval_deletion_adjustment): Return unsigned value.
17627 All uses changed.
dc6c6455 17628
aba7731a
PE
17629 * process.c (list_processes_1, create_pty, read_process_output):
17630 (exec_sentinel): Remove vars that were set but not used.
afd4052b 17631 (create_pty): Remove unnecessary "volatile"s.
bc57d757 17632 (Fnetwork_interface_info): Avoid possibility of int overflow.
82eaa333 17633 (read_process_output): Do adaptive read buffering even if carryover.
fe07cdfa 17634 (read_process_output): Simplify nbytes computation if buffered.
aba7731a 17635
fdfc4bf3
PE
17636 * bytecode.c (exec_byte_code): Rename local to avoid shadowing.
17637
fca8fe46 17638 * syntax.c (scan_words): Remove var that was set but not used.
12cbf13f 17639 (update_syntax_table): Use unsigned instead of int.
fca8fe46 17640
06a0259a 17641 * lread.c (lisp_file_lexically_bound_p): Use ints rather than endptrs.
3c346cc3 17642 (lisp_file_lexically_bound_p, read1): Use unsigned instead of int.
e6eb4e9e 17643 (safe_to_load_p): Make the end-of-loop test the inverse of the in-loop.
06a0259a 17644
e7b9e80f
PE
17645 * print.c (print_error_message): Avoid int overflow.
17646
56201685
PE
17647 * font.c (font_list_entities): Redo for clarity,
17648 so that reader need not know FONT_DPI_INDEX + 1 == FONT_SPACING_INDEX.
17649
78834453 17650 * font.c (font_find_for_lface, Ffont_get_glyphs): Remove unused vars.
790771b1 17651 (font_score): Avoid potential overflow in diff calculation.
78834453 17652
0bc0b309 17653 * fns.c (substring_both): Remove var that is set but not used.
8cd55cb4 17654 (sxhash): Redo loop for clarity and to avoid wraparound warning.
0bc0b309 17655
e610eaca
PE
17656 * eval.c (funcall_lambda): Rename local to avoid shadowing.
17657
b895abce
PE
17658 * alloc.c (mark_object_loop_halt, mark_object): Use size_t, not int.
17659 Otherwise, GCC 4.6.0 optimizes the loop check away since the check
17660 can always succeed if overflow has undefined behavior.
17661
1f1d9321 17662 * search.c (boyer_moore, wordify): Remove vars set but not used.
6f076cc7 17663 (wordify): Omit three unnecessary tests.
1f1d9321 17664
c59478bc
PE
17665 * indent.c (MULTIBYTE_BYTES_WIDTH): Don't compute wide_column.
17666 All callers changed. This avoids the need for an unused var.
17667
79b73827
PE
17668 * casefiddle.c (casify_region): Remove var that is set but not used.
17669
a4db5dfe
PE
17670 * dired.c (file_name_completion): Remove var that is set but not used.
17671
43aae36e
PE
17672 * fileio.c (Finsert_file_contents): Make EOF condition clearer.
17673
2a47c44d 17674 * fileio.c (Finsert_file_contents): Avoid signed integer overflow.
163c5f32 17675 (Finsert_file_contents): Remove unnecessary code checking fd.
2a47c44d 17676
a37c69bf
PE
17677 * minibuf.c (read_minibuf_noninteractive): Use size_t for sizes.
17678 Check for integer overflow on size calculations.
17679
328ab8e7
PE
17680 * buffer.c (Fprevious_overlay_change): Remove var that is set
17681 but not used.
17682
e5a2a5cb
PE
17683 * keyboard.c (menu_bar_items, read_char_minibuf_menu_prompt):
17684 Remove vars that are set but not used.
8d84a6eb 17685 (timer_check_2): Don't assume timer-list and idle-timer-list are lists.
6b043475 17686 (timer_check_2): Mark vars as initialized.
e5a2a5cb 17687
a60e5f68
PE
17688 * gtkutil.c (xg_get_file_with_chooser): Mark var as initialized.
17689
f661cb61 17690 * image.c (lookup_image): Remove var that is set but not used.
35fa624f 17691 (xbm_load): Use parse_p, for gcc -Werror=unused-but-set-variable.
f661cb61 17692
f0397f5a
PE
17693 * fontset.c (Finternal_char_font, Ffontset_info): Remove vars
17694 that are set but not used.
17695
8664db06 17696 * xfns.c (make_invisible_cursor): Don't return garbage
03733ee7 17697 if XCreateBitmapFromData fails (Bug#8410).
8664db06 17698
6abdaa4a
PE
17699 * xselect.c (x_get_local_selection, x_handle_property_notify):
17700 Remove vars that are set but not used.
17701
0ce7538d 17702 * xfns.c (x_create_tip_frame): Remove var that is set but not used.
6abdaa4a 17703 (make_invisible_cursor): Initialize a possibly-uninitialized variable.
0ce7538d 17704
9ae848fc
PE
17705 * xterm.c (x_scroll_bar_to_input_event) [!USE_GTK]:
17706 Remove var that is set but not used.
0b918413
PE
17707 (scroll_bar_windows_size): Now size_t, not int.
17708 (x_send_scroll_bar_event): Use size_t, not int, for sizes.
17709 Check for overflow.
9ae848fc 17710
a5a62657
PE
17711 * xfaces.c (realize_named_face): Remove vars that are set but not used.
17712 (map_tty_color) [!defined MSDOS]: Likewise.
17713
5c5cdd39
PE
17714 * term.c (tty_write_glyphs): Use size_t; this avoids overflow warning.
17715
66ebf983
PE
17716 * coding.c: Remove vars that are set but not used.
17717 (DECODE_COMPOSITION_RULE): Remove 2nd arg, which is unused.
17718 All callers changed.
17719 (decode_coding_utf_8, decode_coding_utf_16 decode_coding_emacs_mule):
17720 (decode_coding_iso_2022, encode_coding_sjis, encode_coding_big5):
17721 (decode_coding_charset): Remove vars that are set but not used.
17722
1be4d761
PE
17723 * bytecode.c (Fbyte_code) [!defined BYTE_CODE_SAFE]: Remove var
17724 that is set but not used.
17725
47553fa8
PE
17726 * print.c (print_object): Remove var that is set but not used.
17727
1f7196bf 17728 Replace 2 copies of readlink code with 1 gnulib version (Bug#8401).
d1fdcab7
PE
17729 The gnulib version avoids calling malloc in the usual case,
17730 and on 64-bit hosts doesn't have some arbitrary 32-bit limits.
17731 * fileio.c (Ffile_symlink_p): Use emacs_readlink.
17732 * filelock.c (current_lock_owner): Likewise.
17733 * lisp.h (READLINK_BUFSIZE, emacs_readlink): New function.
17734 * sysdep.c: Include allocator.h, careadlinkat.h.
17735 (emacs_no_realloc_allocator): New static constant.
17736 (emacs_readlink): New function.
fdb61804
PE
17737 * deps.mk (sysdep.o): Depend on ../lib/allocator.h and on
17738 ../lib/careadlinkat.h.
d1fdcab7 17739
f84c17c7
SM
177402011-04-04 Stefan Monnier <monnier@iro.umontreal.ca>
17741
17742 * keyboard.c (safe_run_hook_funcall): Fix last change (don't stop at the
17743 first non-nil return value).
17744
ef3862ad
JD
177452011-04-03 Jan Djärv <jan.h.d@swipnet.se>
17746
17747 * nsterm.m (ns_update_auto_hide_menu_bar): Define MAC_OS_X_VERSION_10_6
17748 if not defined (Bug#8403).
17749
376a7006
JB
177502011-04-02 Juanma Barranquero <lekktu@gmail.com>
17751
17752 * xdisp.c (display_count_lines): Remove parameter `start',
17753 unused since 1998-01-01T02:27:27Z!rms@gnu.org. All callers changed.
17754 (get_char_face_and_encoding): Remove parameter `multibyte_p',
17755 unused since 2008-05-14T01:40:23Z!handa@m17n.org. All callers changed.
17756 (fill_stretch_glyph_string): Remove parameters `row' and `area',
17757 unused at least since Kim's GUI unification at 2003-03-16T20:45:46Z!storm@cua.dk
17758 and thereabouts. All callers changed.
17759 (get_per_char_metric): Remove parameter `f', unused since
17760 2008-05-14T01:40:23Z!handa@m17n.org. All callers changed.
17761
6ca3801d
JM
177622011-04-02 Jim Meyering <meyering@redhat.com>
17763
17764 do not dereference NULL upon failed strdup
17765 * nsfont.m (ns_descriptor_to_entity): Use xstrdup, not strdup.
17766 (ns_get_family): Likewise.
17767
d8e2b5ba
JB
177682011-04-02 Juanma Barranquero <lekktu@gmail.com>
17769
17770 * eval.c (unwind_to_catch) [DEBUG_GCPRO]: Remove redundant assignment.
17771
8c74fcbd
JD
177722011-04-02 Jan Djärv <jan.h.d@swipnet.se>
17773
17774 * nsterm.m (ns_update_auto_hide_menu_bar): Only for OSX 10.6 or
17775 later (Bug#8403).
17776
7200d79c
SM
177772011-04-01 Stefan Monnier <monnier@iro.umontreal.ca>
17778
03408648 17779 Add lexical binding.
7200d79c 17780
03408648
SM
17781 * window.c (Ftemp_output_buffer_show): New fun.
17782 (Fsave_window_excursion):
17783 * print.c (Fwith_output_to_temp_buffer): Move to subr.el.
17784
17785 * lread.c (lisp_file_lexically_bound_p): New function.
17786 (Fload): Bind Qlexical_binding.
17787 (readevalloop): Remove `evalfun' arg.
17788 Bind Qinternal_interpreter_environment.
17789 (Feval_buffer): Bind Qlexical_binding.
17790 (defvar_int, defvar_bool, defvar_lisp_nopro, defvar_kboard):
17791 Mark as dynamic.
17792 (syms_of_lread): Declare `lexical-binding'.
17793
17794 * lisp.h (struct Lisp_Symbol): New field `declared_special'.
17795
17796 * keyboard.c (eval_dyn): New fun.
17797 (menu_item_eval_property): Use it.
ca105506
SM
17798
17799 * image.c (parse_image_spec): Use Ffunctionp.
ca105506 17800
03408648
SM
17801 * fns.c (concat, mapcar1): Accept byte-code-functions.
17802
17803 * eval.c (Fsetq): Handle lexical vars.
17804 (Fdefun, Fdefmacro, Ffunction): Make closures when needed.
17805 (Fdefconst, Fdefvaralias, Fdefvar): Mark as dynamic.
17806 (FletX, Flet): Obey lexical binding.
17807 (Fcommandp): Handle closures.
17808 (Feval): New `lexical' arg.
17809 (eval_sub): New function extracted from Feval. Use it almost
17810 everywhere where Feval was used. Look up vars in lexical env.
17811 Handle closures.
17812 (Ffunctionp): Move from subr.el.
17813 (Ffuncall): Handle closures.
17814 (apply_lambda): Remove `eval_flags'.
17815 (funcall_lambda): Handle closures and new byte-code-functions.
17816 (Fspecial_variable_p): New function.
17817 (syms_of_eval): Initialize the Vinternal_interpreter_environment var,
17818 but without exporting it to Lisp.
23aba0ea 17819
23aba0ea 17820 * doc.c (Fdocumentation, store_function_docstring):
03408648 17821 * data.c (Finteractive_form): Handle closures.
23aba0ea 17822
03408648
SM
17823 * callint.c (Fcall_interactively): Preserve lexical-binding mode for
17824 interactive spec.
ba83908c 17825
04f2d78b
CB
17826 * bytecode.c (Bstack_ref, Bstack_set, Bstack_set2, BdiscardN):
17827 New byte-codes.
03408648
SM
17828 (exec_byte_code): New function extracted from Fbyte_code to handle new
17829 calling convention for byte-code-functions. Add new byte-codes.
ba83908c 17830
03408648 17831 * buffer.c (defvar_per_buffer): Set new `declared_special' field.
e2abe5a1 17832
03408648 17833 * alloc.c (Fmake_symbol): Init new `declared_special' field.
e2abe5a1 17834
e2abce01
JB
178352011-03-31 Juanma Barranquero <lekktu@gmail.com>
17836
17837 * xdisp.c (redisplay_internal): Fix prototype.
17838
63696a73 178392011-03-31 Eli Zaretskii <eliz@gnu.org>
09725d26 17840
63696a73 17841 * xdisp.c (SCROLL_LIMIT): New macro.
04f2d78b
CB
17842 (try_scrolling): Use it when setting scroll_limit.
17843 Limit scrolling to 100 screen lines.
63696a73
EZ
17844 (redisplay_window): Even when falling back on "recentering",
17845 position point in the window according to scroll-conservatively,
17846 scroll-margin, and scroll-*-aggressively variables. (Bug#6671)
17847
17848 (try_scrolling): When point is above the window, allow searching
17849 as far as scroll_max, or one screenful, to compute vertical
17850 distance from PT to the scroll margin position. This prevents
17851 try_scrolling from unnecessarily failing when
17852 scroll-conservatively is set to a value slightly larger than the
17853 window height. Clean up the case of PT below the margin at bottom
17854 of window: scroll_max can no longer be INT_MAX. When aggressive
17855 scrolling is in use, don't let point enter the opposite scroll
17856 margin as result of the scroll.
17857 (syms_of_xdisp) <scroll-conservatively>: Document the
09725d26
EZ
17858 threshold of 100 lines for never-recentering scrolling.
17859
e4cc2dfc
JB
178602011-03-31 Juanma Barranquero <lekktu@gmail.com>
17861
17862 * dispextern.h (move_it_by_lines):
17863 * xdisp.c (move_it_by_lines): Remove parameter `need_y_p', unused
17864 since 2000-12-29T14:24:09Z!gerd@gnu.org. All callers changed.
17865 (message_log_check_duplicate): Remove parameters `prev_bol' and
17866 `this_bol', unused since 1998-01-01T02:27:27Z!rms@gnu.org. All callers changed.
17867 (redisplay_internal): Remove parameter `preserve_echo_area',
17868 unused since 1999-07-21T21:43:52Z!gerd@gnu.org. All callers changed.
17869
17870 * indent.c (Fvertical_motion):
17871 * window.c (window_scroll_pixel_based, Frecenter):
17872 Don't pass `need_y_p' to `move_it_by_lines'.
17873
1c470562
SM
178742011-03-30 Stefan Monnier <monnier@iro.umontreal.ca>
17875
44f230aa
SM
17876 * eval.c (struct backtrace): Don't cheat with negative numbers, but do
17877 steal a few bits to be more compact.
17878 (interactive_p, Fbacktrace, Fbacktrace_frame, mark_backtrace):
17879 Remove unneeded casts.
17880
1c470562
SM
17881 * bytecode.c (Fbyte_code): CAR and CDR can GC.
17882
888adce9
ZK
178832011-03-30 Zachary Kanfer <zkanfer@gmail.com> (tiny change)
17884
17885 * keyboard.c (Fexecute_extended_command): Do log the "suggest key
17886 binding" message (bug#7967).
17887
f838ed7b
PE
178882011-03-30 Paul Eggert <eggert@cs.ucla.edu>
17889
77861b95
PE
17890 Fix more problems found by GCC 4.6.0's static checks.
17891
de6dbc14
PE
17892 * unexelf.c (unexec) [! (defined _SYSTYPE_SYSV || defined __sgi)]:
17893 Remove unused local var.
17894
f838ed7b
PE
17895 * editfns.c (Fmessage_box): Remove unused local var.
17896
792c7b2b
PE
17897 * xdisp.c (try_window_reusing_current_matrix, x_produce_glyphs):
17898 (note_mode_line_or_margin_highlight, note_mouse_highlight):
17899 Omit unused local vars.
c499e557 17900 * window.c (shrink_windows): Omit unused local var.
b01a1c29 17901 * menu.c (digest_single_submenu): Omit unused local var.
0bc32927
PE
17902 * dispnew.c (update_window) [PERIODIC_PREEMPTION_CHECKING]:
17903 Omit unused local var.
17904
ba0165e1
PE
17905 * keyboard.c (parse_modifiers_uncached, parse_modifiers):
17906 Don't assume string length fits in int.
32ad8845 17907 (keyremap_step, read_key_sequence): Use size_t for sizes.
48011560 17908 (read_key_sequence): Don't check last_real_key_start redundantly.
ba0165e1 17909
3c59b4c9
PE
17910 * callproc.c (Fcall_process, Fcall_process_region): Use SAFE_ALLOCA
17911 instead of alloca (Bug#8344).
17912
a3eed478 17913 * eval.c (Fbacktrace): Don't assume nargs fits in int.
5d5d959d 17914 (Fbacktrace_frame): Don't assume nframes fits in int.
a3eed478 17915
eb4d412d
PE
17916 * syntax.c (scan_sexps_forward): Avoid pointer wraparound.
17917
1658b401
PE
17918 * xterm.c (x_make_frame_visible, same_x_server): Redo to avoid overflow
17919 concerns.
17920
17921 * term.c (produce_glyphless_glyph): Remove unnecessary test.
17922
17923 * cm.c (calccost): Turn while-do into do-while, for clarity.
44f730c8 17924
9a2c6e05
PE
17925 * keyboard.c (syms_of_keyboard): Use the same style as later
17926 in this function when indexing through an array. This also
17927 works around GCC bug 48267.
17928
03d0a109
PE
17929 * image.c (tiff_load): Fix off-by-one image count (Bug#8336).
17930
44f730c8
PE
17931 * xselect.c (x_check_property_data): Return correct size (Bug#8335).
17932
fe75f926
PE
17933 * chartab.c (sub_char_table_ref_and_range): Redo for slight
17934 efficiency gain, and to bypass a gcc -Wstrict-overflow warning.
17935
ffa8c828
PE
17936 * keyboard.c, keyboard.h (num_input_events): Now size_t.
17937 This avoids undefined behavior on integer overflow, and is a bit
17938 more convenient anyway since it is compared to a size_t variable.
17939
c5101a77
PE
17940 Variadic C functions now count arguments with size_t, not int.
17941 This avoids an unnecessary limitation on 64-bit machines, which
17942 caused (substring ...) to crash on large vectors (Bug#8344).
17943 * lisp.h (struct Lisp_Subr.function.aMANY): Now takes size_t, not int.
17944 (DEFUN_ARGS_MANY, internal_condition_case_n, safe_call): Likewise.
77861b95 17945 All variadic functions and their callers changed accordingly.
c5101a77
PE
17946 (struct gcpro.nvars): Now size_t, not int. All uses changed.
17947 * data.c (arith_driver, float_arith_driver): Likewise.
17948 * editfns.c (general_insert_function): Likewise.
17949 * eval.c (struct backtrace.nargs, interactive_p)
17950 (internal_condition_case_n, run_hook_with_args, apply_lambda)
17951 (funcall_lambda, mark_backtrace): Likewise.
17952 * fns.c (concat): Likewise.
17953 * frame.c (x_set_frame_parameters): Likewise.
17954 * fns.c (get_key_arg): Now accepts and returns size_t, and returns
17955 0 if not found, not -1. All callers changed.
17956
dd3f25f7
PE
17957 * alloc.c (garbage_collect): Don't assume stack size fits in int.
17958 (stack_copy_size): Now size_t, not int.
17959 (stack_copy, stack_copy_size): Define only if MAX_SAVE_STACK > 0.
17960
461c2ab9
JB
179612011-03-28 Juanma Barranquero <lekktu@gmail.com>
17962
17963 * coding.c (encode_designation_at_bol): Remove parameter `charbuf_end',
17964 unused since 2002-03-01T01:17:24Z!handa@m17n.org and 2008-02-01T16:01:31Z!miles@gnu.org.
17965 All callers changed.
17966
17967 * lisp.h (multibyte_char_to_unibyte):
17968 * character.c (multibyte_char_to_unibyte): Remove parameter `rev_tbl',
17969 unused since 2002-03-01T01:16:34Z!handa@m17n.org and 2008-02-01T16:01:31Z!miles@gnu.org.
17970 * character.h (CHAR_TO_BYTE8):
17971 * cmds.c (internal_self_insert):
17972 * editfns.c (general_insert_function):
17973 * keymap.c (push_key_description):
17974 * search.c (Freplace_match):
17975 * xdisp.c (message_dolog, set_message_1): All callers changed.
17976
f6d62986
SM
179772011-03-28 Stefan Monnier <monnier@iro.umontreal.ca>
17978
17979 * keyboard.c (safe_run_hook_funcall): New function.
17980 (safe_run_hooks_1, safe_run_hooks_error, safe_run_hooks): On error,
17981 don't set the hook to nil, but remove the offending function instead.
17982 (Qcommand_hook_internal): Remove, unused.
17983 (syms_of_keyboard): Don't initialize Qcommand_hook_internal nor define
17984 Vcommand_hook_internal.
17985
17986 * eval.c (enum run_hooks_condition): Remove.
17987 (funcall_nil, funcall_not): New functions.
17988 (run_hook_with_args): Call each function through a `funcall' argument.
17989 Remove `cond' argument, now redundant.
17990 (Frun_hooks, Frun_hook_with_args, Frun_hook_with_args_until_success)
17991 (Frun_hook_with_args_until_failure): Adjust accordingly.
17992 (run_hook_wrapped_funcall, Frun_hook_wrapped): New functions.
17993
1db5b1ad
JB
179942011-03-28 Juanma Barranquero <lekktu@gmail.com>
17995
17996 * dispextern.h (string_buffer_position): Remove declaration.
17997
17998 * print.c (strout): Remove parameter `multibyte', unused since
17999 1999-08-21T19:30:21Z!gerd@gnu.org. All callers changed.
18000
18001 * search.c (boyer_moore): Remove parameters `len', `pos' and `lim',
18002 never used since function introduction in 1998-02-08T21:33:56Z!rms@gnu.org.
18003 All callers changed.
18004
18005 * w32.c (_wsa_errlist): Use braces for struct initializers.
18006
18007 * xdisp.c (string_buffer_position_lim): Remove parameter `w',
18008 never used since function introduction in 2001-03-09T18:41:50Z!gerd@gnu.org.
18009 All callers changed.
18010 (string_buffer_position): Likewise. Also, make static (it's never
18011 used outside xdisp.c).
18012 (cursor_row_p): Remove parameter `w', unused since
18013 2000-10-17T16:08:57Z!gerd@gnu.org. All callers changed.
18014 (decode_mode_spec): Remove parameter `precision', introduced during
18015 Gerd Moellmann's rewrite at 1999-07-21T21:43:52Z!gerd@gnu.org, but never used.
18016 All callers changed.
18017
5ffb62aa
JD
180182011-03-27 Jan Djärv <jan.h.d@swipnet.se>
18019
18020 * nsterm.m (syms_of_nsterm): Use doc: for ns-auto-hide-menu-bar.
18021
461c2ab9 180222011-03-27 Anders Lindgren <andlind@gmail.com>
f0a1382a
JD
18023
18024 * nsterm.m (ns_menu_bar_is_hidden): New variable.
18025 (ns_constrain_all_frames, ns_menu_bar_should_be_hidden)
18026 (ns_update_auto_hide_menu_bar): New functions.
18027 (ns_update_begin): Call ns_update_auto_hide_menu_bar.
18028 (applicationDidBecomeActive): Call ns_update_auto_hide_menu_bar and
18029 ns_constrain_all_frames.
18030 (constrainFrameRect): Return at once if ns_menu_bar_should_be_hidden.
18031 (syms_of_nsterm): DEFVAR ns-auto-hide-menu-bar, init to Qnil.
18032
5c380ffb
JD
180332011-03-27 Jan Djärv <jan.h.d@swipnet.se>
18034
18035 * nsmenu.m (runDialogAt): Remove argument to timer_check.
18036
9af30bdf
GM
180372011-03-27 Glenn Morris <rgm@gnu.org>
18038
18039 * syssignal.h: Replace RETSIGTYPE with void.
18040 * atimer.c, data.c, dispnew.c, emacs.c, floatfns.c, keyboard.c:
18041 * keyboard.h, lisp.h, process.c, sysdep.c, xterm.c:
18042 Replace SIGTYPE with void everywhere.
18043 * s/usg5-4-common.h (SIGTYPE): Remove definition.
18044 * s/template.h (SIGTYPE): Remove commented out definition.
18045
e2abce01
JB
180462011-03-26 Eli Zaretskii <eliz@gnu.org>
18047
18048 * xdisp.c (redisplay_window): Don't check buffer's clip_changed
18049 flag as a prerequisite for invoking try_scrolling. (Bug#6671)
18050
f868cd8a
JB
180512011-03-26 Juanma Barranquero <lekktu@gmail.com>
18052
59eb0929
JB
18053 * w32.c (read_unc_volume): Use parameter `henum', instead of
18054 global variable `wget_enum_handle'.
18055
18056 * keymap.c (describe_vector): Remove parameters `indices' and
18057 `char_table_depth', unused since 2002-03-01T01:43:26Z!handa@m17n.org.
18058 (describe_map, Fdescribe_vector): Adjust calls to `describe_vector'.
18059
f868cd8a
JB
18060 * keyboard.h (timer_check, show_help_echo): Remove unused parameters.
18061
18062 * keyboard.c (timer_check): Remove parameter `do_it_now',
18063 unused since 1996-04-12T06:01:29Z!rms@gnu.org.
18064 (show_help_echo): Remove parameter `ok_to_overwrite_keystroke_echo',
18065 unused since 2008-04-19T19:30:53Z!monnier@iro.umontreal.ca.
18066
18067 * keyboard.c (read_char):
18068 * w32menu.c (w32_menu_display_help):
18069 * xmenu.c (show_help_event, menu_help_callback):
18070 Adjust calls to `show_help_echo'.
18071
18072 * gtkutil.c (xg_maybe_add_timer):
18073 * keyboard.c (readable_events):
18074 * process.c (wait_reading_process_output):
18075 * xmenu.c (x_menu_wait_for_event): Adjust calls to `timer_check'.
18076
18077 * insdel.c (adjust_markers_gap_motion):
18078 Remove; no-op since 1998-01-02T21:29:48Z!rms@gnu.org.
18079 (gap_left, gap_right): Don't call it.
18080
2ecf6fdb
CY
180812011-03-25 Chong Yidong <cyd@stupidchicken.com>
18082
18083 * xdisp.c (handle_fontified_prop): Discard changes to clip_changed
18084 incurred during fontification.
18085
6b1f9ba4
JB
180862011-03-25 Juanma Barranquero <lekktu@gmail.com>
18087
18088 * buffer.c (defvar_per_buffer): Remove unused parameter `doc'.
18089 (DEFVAR_PER_BUFFER): Don't pass it.
18090
18091 * dispnew.c (row_equal_p, add_row_entry): Remove unused parameter `w'.
18092 (scrolling_window): Don't pass it.
18093
0f4a96b5
JB
180942011-03-25 Juanma Barranquero <lekktu@gmail.com>
18095
18096 * dispextern.h (glyph_matric): Use #if GLYPH_DEBUG, not #ifdef.
18097
18098 * fileio.c (check_executable) [DOS_NT]: Remove unused variables `len'
18099 and `suffix'.
18100 (Fset_file_selinux_context) [HAVE_LIBSELINUX]: Move here declaration
18101 of variables specific to SELinux and computation of `encoded_absname'.
18102
18103 * image.c (XPutPixel): Remove unused variable `height'.
18104
18105 * keyboard.c (make_lispy_event): Remove unused variable `hpos'.
18106
18107 * unexw32.c (get_section_info): Remove unused variable `section'.
18108
18109 * w32.c (stat): Remove unused variables `drive_root' and `devtype'.
18110 (system_process_attributes): Remove unused variable `sess'.
18111 (sys_read): Remove unused variable `err'.
18112
18113 * w32fns.c (top): Wrap variables with #if GLYPH_DEBUG, not #ifdef.
18114 (w32_wnd_proc): Remove unused variable `isdead'.
18115 (unwind_create_frame): Use #if GLYPH_DEBUG, not #ifdef.
18116 (Fx_server_max_request_size): Remove unused variable `dpyinfo'.
18117 (x_create_tip_frame): Remove unused variable `tem'.
18118
18119 * w32inevt.c (w32_console_read_socket):
18120 Remove unused variable `no_events'.
18121
18122 * w32term.c (x_draw_composite_glyph_string_foreground):
18123 Remove unused variable `width'.
18124
1149507c
JB
181252011-03-24 Juanma Barranquero <lekktu@gmail.com>
18126
18127 * w32term.c (x_set_glyph_string_clipping):
18128 Don't pass uninitialized region to CombineRgn.
18129
9c88f339
JB
181302011-03-23 Juanma Barranquero <lekktu@gmail.com>
18131
18132 * w32fns.c (x_set_menu_bar_lines): Remove unused variable `olines'.
18133 (w32_wnd_proc): Pass NULL to Windows API, not uninitialized buffer.
18134 (Fx_close_connection): Remove unused variable `i'.
18135
18136 * w32font.c (w32font_draw): Return number of glyphs.
18137 (w32font_open_internal): Remove unused variable `i'.
18138 (w32font_driver): Add missing initializer.
18139
18140 * w32menu.c (utf8to16): Remove unused variable `utf16'.
18141 (fill_in_menu): Remove unused variable `items_added'.
18142
18143 * w32term.c (last_mouse_press_frame): Remove static global variable.
18144 (w32_clip_to_row): Remove unused variable `f'.
18145 (x_delete_terminal): Remove unused variable `i'.
18146
18147 * w32uniscribe.c (uniscribe_shape): Remove unused variable `nclusters'.
18148 (NOTHING): Remove unused static global variable.
18149 (uniscribe_check_otf): Remove unused variable `table'.
18150 (uniscribe_font_driver): Add missing initializers.
18151
dee091a3
JD
181522011-03-23 Julien Danjou <julien@danjou.info>
18153
18154 * term.c (Fsuspend_tty, Fresume_tty):
18155 * minibuf.c (read_minibuf, run_exit_minibuf_hook):
18156 * window.c (temp_output_buffer_show):
18157 * insdel.c (signal_before_change):
18158 * frame.c (Fhandle_switch_frame):
18159 * fileio.c (Fdo_auto_save):
18160 * emacs.c (Fkill_emacs):
18161 * editfns.c (save_excursion_restore):
18162 * cmds.c (internal_self_insert):
18163 * callint.c (Fcall_interactively):
18164 * buffer.c (Fkill_all_local_variables):
18165 * keyboard.c (Fcommand_execute, Fsuspend_emacs, safe_run_hooks_1):
18166 Use Frun_hooks.
0f4a96b5 18167 (command_loop_1): Use Frun_hooks. Call safe_run_hooks
e9fce1ac 18168 unconditionally since it does the check itself.
dee091a3 18169
2c520ab5 181702011-03-23 Paul Eggert <eggert@cs.ucla.edu>
f0641eff 18171
c9c49752
PE
18172 Fix more problems found by GCC 4.5.2's static checks.
18173
8abc3f12
PE
18174 * coding.c (encode_coding_raw_text): Avoid unnecessary test
18175 the first time through the loop, since we know p0 < p1 then.
18176 This also avoids a gcc -Wstrict-overflow warning.
18177
a2d26660
PE
18178 * lisp.h (SAFE_ALLOCA, SAFE_ALLOCA_LISP): Avoid 'int' overflow
18179 leading to a memory leak, possible in functions like
18180 load_charset_map_from_file that can allocate an unbounded number
b12ef411 18181 of objects (Bug#8318).
a2d26660 18182
916c72e9
PE
18183 * xmenu.c (set_frame_menubar): Use EMACS_UINT, not int, for indexes
18184 that could (at least in theory) be that large.
18185
19ab8a18
PE
18186 * xdisp.c (message_log_check_duplicate): Return unsigned long, not int.
18187 This is less likely to overflow, and avoids undefined behavior if
18188 overflow does occur. All callers changed. Use strtoul to scan
18189 for the unsigned long integer.
b7cbbd6f
PE
18190 (pint2hrstr): Simplify and tune code slightly.
18191 This also avoids a (bogus) GCC warning with gcc -Wstrict-overflow.
19ab8a18 18192
f0641eff
PE
18193 * scroll.c (do_scrolling): Work around GCC bug 48228.
18194 See <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48228>.
18195
7f650bb9
PE
18196 * frame.c (Fmodify_frame_parameters): Simplify loop counter.
18197 This also avoids a warning with gcc -Wstrict-overflow.
39f5e519
PE
18198 (validate_x_resource_name): Simplify count usage.
18199 This also avoids a warning with gcc -Wstrict-overflow.
7f650bb9 18200
37dd57d1
PE
18201 * fileio.c (Fcopy_file): Report error if fchown or fchmod
18202 fail (Bug#8306).
81e56e61 18203
699979fc 18204 * emacs.c (Fdaemon_initialized): Do not ignore I/O errors (Bug#8303).
dc1ca6a8 18205
401bf9b4
PE
18206 * process.c (Fmake_network_process): Use socklen_t, not int,
18207 where POSIX says socklen_t is required in portable programs.
18208 This fixes a porting bug on hosts like 64-bit HP-UX, where
591b2973 18209 socklen_t is wider than int (Bug#8277).
401bf9b4
PE
18210 (Fmake_network_process, server_accept_connection):
18211 (wait_reading_process_output, read_process_output):
18212 Likewise.
18213
b93aacde
PE
18214 * process.c: Rename or move locals to avoid shadowing.
18215 (list_processes_1, Fmake_network_process):
18216 (read_process_output_error_handler, exec_sentinel_error_handler):
18217 Rename or move locals.
4dc343ee 18218 (Fmake_network_process): Define label "retry_connect" only if needed.
0da49335 18219 (Fnetwork_interface_info): Fix pointer signedness.
f990b4e5 18220 (process_send_signal): Add cast to avoid pointer signedness problem.
7b808126 18221 (FIRST_PROC_DESC, IF_NON_BLOCKING_CONNECT): Remove unused macros.
c939f91b 18222 (create_process): Use 'volatile' to avoid vfork clobbering (Bug#8298).
b93aacde 18223
af8a867c 18224 Make tparam.h and terminfo.c consistent.
44f230aa
SM
18225 * cm.c (tputs, tgoto, BC, UP): Remove extern decls.
18226 Include tparam.h instead, since it declares them.
af8a867c
PE
18227 * cm.h (PC): Remove extern decl; tparam.h now does this.
18228 * deps.mk (cm.o, terminfo.o): Depend on tparam.h.
18229 * terminfo.c: Include tparam.h, to check interfaces.
18230 (tparm): Make 1st arg a const pointer in decl. Put it at top level.
18231 (tparam): Adjust signature to match interface in tparam.h;
18232 this removes some undefined behavior. Check that outstring and len
18233 are zero, which they always are with Emacs.
18234 * tparam.h (PC, BC, UP): New extern decls.
18235
0248044d 18236 * xftfont.c (xftfont_shape): Now static, and defined only if needed.
001a7ab4 18237 (xftfont_open): Rename locals to avoid shadowing.
0248044d 18238
8ff096c1 18239 * ftfont.c (ftfont_resolve_generic_family): Fix pointer signedness.
a00924bb
PE
18240 (ftfont_otf_capability, ftfont_shape): Omit decls if not needed.
18241 (OTF_TAG_SYM): Omit macro if not needed.
e932860f 18242 (ftfont_list): Remove unused local.
49eaafba
PE
18243 (get_adstyle_property, ftfont_pattern_entity):
18244 (ftfont_lookup_cache, ftfont_open, ftfont_anchor_point):
18245 Rename locals to avoid shadowing.
8ff096c1 18246
e2be39f6
PE
18247 * xfont.c (xfont_list_family): Mark var as initialized.
18248
c9735e30
PE
18249 * xml.c (make_dom): Now static.
18250
8f5201ae
PE
18251 * composite.c (composition_compute_stop_pos): Rename local to
18252 avoid shadowing.
b246f932
PE
18253 (composition_reseat_it): Remove unused locals.
18254 (find_automatic_composition, composition_adjust_point): Likewise.
80e079b2 18255 (composition_update_it): Mark var as initialized.
11b61122
PE
18256 (find_automatic_composition): Mark vars as initialized,
18257 with a FIXME (Bug#8290).
8f5201ae 18258
760fbc2c
PE
18259 character.h: Rename locals to avoid shadowing.
18260 * character.h (PREV_CHAR_BOUNDARY, FETCH_STRING_CHAR_ADVANCE):
18261 (FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE, FETCH_CHAR_ADVANCE):
18262 (FETCH_CHAR_ADVANCE_NO_CHECK, INC_POS, DEC_POS, BUF_INC_POS):
18263 (BUF_DEC_POS): Be more systematic about renaming local temporaries
18264 to avoid shadowing.
18265
ff08eb85
PE
18266 * textprop.c (property_change_between_p): Remove; unused.
18267
fc7bf025
PE
18268 * intervals.c (interval_start_pos): Now static.
18269
235d7abc
PE
18270 * intervals.h (CHECK_TOTAL_LENGTH): Avoid empty "else".
18271
44f230aa
SM
18272 * atimer.c (start_atimer, append_atimer_lists, set_alarm):
18273 Rename locals to avoid shadowing.
3e7d6594 18274
50060332
PE
18275 * sound.c (wav_play, au_play, Fplay_sound_internal):
18276 Fix pointer signedness.
d01f234b 18277 (alsa_choose_format): Remove unused local var.
c83b8872
PE
18278 (wav_play): Initialize a variable to 0, to prevent undefined
18279 behavior (Bug#8278).
50060332 18280
c4fc4e30
PE
18281 * region-cache.c (insert_cache_boundary): Redo var to avoid shadowing.
18282
918436ed
PE
18283 * region-cache.h (pp_cache): New decl, for gcc -Wmissing-prototypes.
18284
c939f91b
PE
18285 * callproc.c (Fcall_process): Use 'volatile' to avoid vfork
18286 clobbering (Bug#8298).
b9c7f648
PE
18287 * sysdep.c (sys_subshell): Likewise.
18288 Previously, the sys_subshell 'volatile' was incorrectly IF_LINTted out.
7e9123a2 18289
6bd8c144
PE
18290 * lisp.h (child_setup): Now NO_RETURN unless DOS_NT.
18291 This should get cleaned up, so that child_setup has the
18292 same signature on all platforms.
18293
7710357c 18294 * callproc.c (call_process_cleanup): Now static.
cb1d0ef7 18295 (relocate_fd): Rename locals to avoid shadowing.
7710357c 18296
c59da222
CY
182972011-03-22 Chong Yidong <cyd@stupidchicken.com>
18298
18299 * xterm.c (x_clear_frame): Remove XClearWindow call. This appears
18300 not to be necessary, and produces flickering.
18301
66b87493
GM
183022011-03-20 Glenn Morris <rgm@gnu.org>
18303
18304 * config.in: Remove file.
18305
45b6f6d5
JB
183062011-03-20 Juanma Barranquero <lekktu@gmail.com>
18307
18308 * minibuf.c (Vcompleting_read_function): Don't declare, global variables
18309 are now in src/globals.h.
18310 (syms_of_minibuf): Remove spurious & from previous change.
18311
cd394be1 183122011-03-20 Leo Liu <sdl.web@gmail.com>
3ec03f7e
LL
18313
18314 * minibuf.c (completing-read-function): New variable.
18315 (completing-read-default): Rename from completing-read.
18316 (completing-read): Call completing-read-function.
18317
b14e3e21
CY
183182011-03-19 Juanma Barranquero <lekktu@gmail.com>
18319
18320 * xfaces.c (Fx_load_color_file):
18321 Read color file from absolute filename (bug#8250).
18322
f2b726e6
JB
183232011-03-19 Juanma Barranquero <lekktu@gmail.com>
18324
18325 * makefile.w32-in: Update dependencies.
18326
09f6ff02
EZ
183272011-03-17 Eli Zaretskii <eliz@gnu.org>
18328
18329 * makefile.w32-in ($(BLD)/unexw32.$(O)): Depend on $(SRC)/unexec.h.
18330
29a6015a
PE
183312011-03-17 Paul Eggert <eggert@cs.ucla.edu>
18332
a3a6c54e
PE
18333 Fix more problems found by GCC 4.5.2's static checks.
18334
b766f867
PE
18335 * process.c (make_serial_process_unwind, send_process_trap):
18336 (sigchld_handler): Now static.
18337
be02381c
PE
18338 * process.c (allocate_pty): Let PTY_ITERATION declare iteration vars.
18339 That way, the code declares only the vars that it needs.
18340 * s/aix4-2.h (PTY_ITERATION): Declare iteration vars.
18341 * s/cygwin.h (PTY_ITERATION): Likewise.
18342 * s/darwin.h (PTY_ITERATION): Likewise.
18343 * s/gnu-linux.h (PTY_ITERATION): Likewise.
18344
57048744
PE
18345 * s/irix6-5.h (PTY_OPEN): Declare stb, to loosen coupling.
18346 * process.c (allocate_pty): Don't declare stb unless it's needed.
18347
7914961c 18348 * bytecode.c (MAYBE_GC): Rewrite so as not to use empty "else".
615f2d59
PE
18349 (CONSTANTLIM): Remove; unused.
18350 (METER_CODE, Bscan_buffer, Bread_char, Bset_mark):
18351 Define only if needed.
7914961c 18352
b3967b18
PE
18353 * unexelf.c (unexec): Name an expression,
18354 to avoid gcc -Wbad-function-cast warning.
9ae71512
PE
18355 Use a different way to cause a compilation error if anyone uses
18356 n rather than nn, a way that does not involve shadowing.
73366a00 18357 (ELF_BSS_SECTION_NAME, OLD_PROGRAM_H): Remove; unused.
b3967b18 18358
29a6015a
PE
18359 * deps.mk (unexalpha.o): Remove; unused.
18360
43cfc33e 18361 New file unexec.h, the (simple) interface for unexec (Bug#8267).
7feda0d2 18362 * unexec.h: New file.
ce701a33
PE
18363 * deps.mk (emacs.o, unexaix.o, unexcw.o, unexcoff.o, unexelf.o):
18364 (unexhp9k800.o, unexmacosx.o, unexsol.o, unexw32.o):
18365 Depend on unexec.h.
18366 * emacs.c [!defined CANNOT_DUMP]: Include unexec.h.
18367 * unexaix.c, unexcoff.c, unexcw.c, unexelf.c, unexhp9k800.c:
18368 * unexmacosx.c, unexsol.c, unexw32.c: Include unexec.h.
381259ef 18369 Change as necessary to match prototype in unexec.h.
ce701a33 18370
01f44d5a
PE
18371 * syntax.c (Fforward_comment, scan_lists): Rename locals to avoid
18372 shadowing.
4f63c6bb 18373 (back_comment, skip_chars): Mark vars as initialized.
01f44d5a 18374
a6670b0b
PE
18375 * character.h (FETCH_STRING_CHAR_ADVANCE_NO_CHECK, BUF_INC_POS):
18376 Rename locals to avoid shadowing.
18377
cef2010d 18378 * lread.c (read1): Rewrite so as not to use empty "else".
0902fe45 18379 (Fload, readevalloop, read1): Rename locals to avoid shadowing.
cef2010d 18380
d4d7173a
PE
18381 * print.c (Fredirect_debugging_output): Fix pointer signedess.
18382
f08b802a
PE
18383 * lisp.h (debug_output_compilation_hack): Add decl here, to avoid
18384 warning when compiling print.c.
18385
3ddb0639
PE
18386 * font.c (font_unparse_fcname): Abort in an "impossible" situation
18387 instead of using an uninitialized var.
5ad03b97 18388 (font_sort_entities): Mark var as initialized.
3ddb0639 18389
170a2692
PE
18390 * character.h (FETCH_CHAR_ADVANCE): Rename locals to avoid shadowing.
18391
e663c700
PE
18392 * font.c (font_unparse_xlfd): Don't mix pointers to variables with
18393 pointers to constants.
89bc529a 18394 (font_parse_fcname): Remove unused vars.
7b81e2d0 18395 (font_delete_unmatched): Now static.
ea838e10 18396 (font_get_spec): Remove; unused.
13a547c6
PE
18397 (font_style_to_value, font_prop_validate_style, font_unparse_fcname):
18398 (font_update_drivers, Ffont_get_glyphs, font_add_log):
18399 Rename or move locals to avoid shadowing.
e663c700 18400
2a80c887 18401 * fns.c (require_nesting_list, require_unwind): Now static.
612f56df 18402 (Ffillarray): Rename locals to avoid shadowing.
2a80c887 18403
1384fa33 18404 * floatfns.c (domain_error2): Define only if needed.
a885e2ed 18405 (Ffrexp, Fldexp): Rename locals to avoid shadowing.
1384fa33 18406
8b2c52e9
PE
18407 * alloc.c (mark_backtrace): Move decl from here ...
18408 * lisp.h: ... to here, so that it can be checked.
18409
475545b5 18410 * eval.c (call_debugger, do_debug_on_call, grow_specpdl): Now static.
d28a2170 18411 (Fdefvar): Rewrite so as not to use empty "else".
cfcbfb1a
PE
18412 (lisp_indirect_variable): Name an expression,
18413 to avoid gcc -Wbad-function-cast warning.
1faed8ae 18414 (Fdefvar): Rename locals to avoid shadowing.
475545b5 18415
b1349114 18416 * callint.c (quotify_arg, quotify_args): Now static.
a3e8cbda 18417 (Fcall_interactively): Rename locals to avoid shadowing.
b0e80955 18418 Use const pointer when appropriate.
b1349114 18419
a2928364
PE
18420 * lisp.h (get_system_name, get_operating_system_release):
18421 Move decls here, to check interfaces.
18422 * process.c (get_operating_system_release): Move decl to lisp.h.
18423 * xrdb.c (get_system_name): Likewise.
63c5d10b
PE
18424 * editfns.c (init_editfns, Fuser_login_name, Fuser_uid):
18425 (Fuser_real_uid, Fuser_full_name): Remove unnecessary casts,
18426 some of which prompt warnings from gcc -Wbad-function-cast.
545b49b4
PE
18427 (Fformat_time_string, Fencode_time, Finsert_char):
18428 (Ftranslate_region_internal, Fformat):
18429 Rename or remove local vars to avoid shadowing.
9710023e 18430 (Ftranslate_region_internal): Mark var as initialized.
63c5d10b 18431
a415e694
PE
18432 * doc.c (Fdocumentation, Fsnarf_documentation): Move locals to
18433 avoid shadowing.
18434
8ef4622d
PE
18435 * lisp.h (eassert): Check that the argument compiles, even if
18436 ENABLE_CHECKING is not defined.
18437
946f9a5b
PE
18438 * data.c (Findirect_variable): Name an expression, to avoid
18439 gcc -Wbad-function-cast warning.
112396d6 18440 (default_value, arithcompare, arith_driver, arith_error): Now static.
b9b84fa9 18441 (store_symval_forwarding): Rename local to avoid shadowing.
44f230aa
SM
18442 (Fmake_variable_buffer_local, Fmake_local_variable):
18443 Mark variables as initialized.
52746918 18444 (do_blv_forwarding, do_symval_forwarding): Remove; unused.
946f9a5b 18445
e5aab7e7 18446 * alloc.c (check_cons_list): Do not define unless GC_CHECK_CONS_LIST.
ae35e756
PE
18447 (Fmake_vector, Fvector, Fmake_byte_code, Fgarbage_collect):
18448 Rename locals to avoid shadowing.
dff45157
PE
18449 (mark_stack): Move local variables into the #ifdef region where
18450 they're used.
7bc26fdb
PE
18451 (BLOCK_INPUT_ALLOC, UNBLOCK_INPUT_ALLOC): Define only if
18452 ! defined SYSTEM_MALLOC && ! defined SYNC_INPUT, as they are not
18453 needed otherwise.
18454 (CHECK_ALLOCATED): Define only if GC_CHECK_MARKED_OBJECTS.
18455 (GC_STRING_CHARS): Remove; not used.
d40d4be1 18456 (Fmemory_limit): Cast sbrk's returned value to char *.
ae35e756 18457
e5aab7e7
PE
18458 * lisp.h (check_cons_list): Declare if GC_CHECK_CONS_LIST; this
18459 avoids undefined behavior in theory.
18460
4da60324
PE
18461 * regex.c (IF_LINT): Add defn, for benefit of ../lib-src.
18462
88043301
PE
18463 Use functions, not macros, for up- and down-casing (Bug#8254).
18464 * buffer.h (DOWNCASE_TABLE, UPCASE_TABLE, DOWNCASE, UPPERCASEP):
18465 (NOCASEP, LOWERCASEP, UPCASE, UPCASE1): Remove. All callers changed
18466 to use the following functions instead of these macros.
18467 (downcase): Adjust to lack of DOWNCASE_TABLE. Return int, not
18468 EMACS_INT, since callers assume the returned value fits in int.
18469 (upcase1): Likewise, for UPCASE_TABLE.
18470 (uppercasep, lowercasep, upcase): New static inline functions.
0da09c43 18471 * editfns.c (Fchar_equal): Remove no-longer-needed workaround for
db69b0cd 18472 the race-condition problem in the old DOWNCASE.
88043301 18473
19ed5445
PE
18474 * regex.c (CHARSET_LOOKUP_RANGE_TABLE_RAW, POP_FAILURE_REG_OR_COUNT):
18475 Rename locals to avoid shadowing.
18476 (regex_compile, re_match_2_internal): Move locals to avoid shadowing.
abbd1bcf
PE
18477 (regex_compile, re_search_2, re_match_2_internal):
18478 Remove unused local vars.
952db0d7
PE
18479 (FREE_VAR): Rewrite so as not to use empty "else",
18480 which gcc can warn about.
da053e48 18481 (regex_compile, re_match_2_internal): Mark locals as initialized.
b313f9d8
PE
18482 (RETALLOC_IF): Define only if needed.
18483 (WORDCHAR_P): Likewise. This one is never needed, but is used
18484 only in a comment talking about a compiler bug, so put inside
18485 the #if 0 of that comment.
18486 (CHARSET_LOOKUP_BITMAP, FAIL_STACK_FULL, RESET_FAIL_STACK):
18487 (PUSH_FAILURE_ELT, BUF_PUSH_3, STOP_ADDR_VSTRING):
18488 Remove; unused.
19ed5445 18489
1f3561e4 18490 * search.c (boyer_moore): Rename locals to avoid shadowing.
76ef09b7
PE
18491 * character.h (FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE):
18492 (PREV_CHAR_BOUNDARY): Likewise.
1f3561e4 18493
ded6f8f7
PE
18494 * search.c (simple_search): Remove unused var.
18495
dbd37a95
PE
18496 * dired.c (compile_pattern): Move decl from here ...
18497 * lisp.h: ... to here, so that it can be checked.
18498 (struct re_registers): New forward decl.
18499
7e47afad
PE
18500 * character.h (INC_POS, DEC_POS): Rename locals to avoid shadowing.
18501
85f24f61
PE
18502 * indent.c (MULTIBYTE_BYTES_WIDTH): New args bytes, width.
18503 All uses changed.
18504 (MULTIBYTE_BYTES_WIDTH, scan_for_column, compute_motion):
18505 Rename locals to avoid shadowing.
5671df8f 18506 (Fvertical_motion): Mark locals as initialized.
85f24f61 18507
181aa2be 18508 * casefiddle.c (casify_object, casify_region): Now static.
e45a141a 18509 (casify_region): Mark local as initialized.
181aa2be 18510
930d429c
PE
18511 * cmds.c (internal_self_insert): Rename local to avoid shadowing.
18512
7082eac6
PE
18513 * lisp.h (GCPRO2_VAR, GCPRO3_VAR, GCPRO4_VAR, GCPRO5_VAR, GCPRO6_VAR):
18514 New macros, so that the caller can use some names other than
18515 gcpro1, gcpro2, etc.
18516 (GCPRO2, GCPRO3, GCPRO4, GCPRO5, GCPRO6): Reimplement in terms
18517 of the new macros.
18518 (GCPRO1_VAR, UNGCPRO_VAR): Change the meaning of the second
18519 argument, for consistency with GCPRO2_VAR, etc: it is now the
18520 prefix of the variable, not the variable itself. All uses
18521 changed.
38b2c076
PE
18522 * dired.c (directory_files_internal, file_name_completion):
18523 Rename locals to avoid shadowing.
18524
15206ed9
PE
18525 Fix a race condition diagnosed by gcc -Wsequence-point (Bug#8254).
18526 An expression of the form (DOWNCASE (x) == DOWNCASE (y)), found in
18527 dired.c's scmp function, had undefined behavior.
18528 * lisp.h (DOWNCASE_TABLE, UPCASE_TABLE, DOWNCASE, UPPERCASEP):
18529 (NOCASEP, LOWERCASEP, UPCASE, UPCASE1): Move from here ...
18530 * buffer.h: ... to here, because these macros use current_buffer,
18531 and the new implementation with inline functions needs to have
18532 current_buffer in scope now, rather than later when the macros
18533 are used.
18534 (downcase, upcase1): New static inline functions.
18535 (DOWNCASE, UPCASE1): Reimplement using these functions.
18536 This avoids undefined behavior in expressions like
18537 DOWNCASE (x) == DOWNCASE (y), which previously suffered
18538 from race conditions in accessing the global variables
18539 case_temp1 and case_temp2.
18540 * casetab.c (case_temp1, case_temp2): Remove; no longer needed.
18541 * lisp.h (case_temp1, case_temp2): Remove their decls.
18542 * character.h (ASCII_CHAR_P): Move from here ...
18543 * lisp.h: ... to here, so that the inline functions mentioned
18544 above can use them.
18545
4a6bea26
PE
18546 * dired.c (directory_files_internal_unwind): Now static.
18547
f14b7e14
PE
18548 * fileio.c (file_name_as_directory, directory_file_name):
18549 (barf_or_query_if_file_exists, auto_save_error, auto_save_1):
18550 Now static.
2893f146
PE
18551 (file_name_as_directory): Use const pointers when appropriate.
18552 (Fexpand_file_name): Likewise. In particular, newdir might
18553 point at constant storage, so make it a const pointer.
fd4ead52 18554 (Fmake_directory_internal, Fread_file_name): Remove unused vars.
b14aac08
PE
18555 (Ffile_selinux_context, Fset_file_selinux_context): Fix pointer
18556 signedness issues.
f839df0c
PE
18557 (Fset_file_times, Finsert_file_contents, auto_save_error):
18558 Rename locals to avoid shadowing.
f14b7e14 18559
5716756e 18560 * minibuf.c (choose_minibuf_frame_1): Now static.
62137a95
PE
18561 (Ftry_completion, Fall_completions): Rename or remove locals
18562 to avoid shadowing.
5716756e 18563
b4c3046a
PE
18564 * marker.c (bytepos_to_charpos): Remove; unused.
18565
b45db522
PE
18566 * lisp.h (verify_bytepos, count_markers): New decls,
18567 so that gcc does not warn that these functions aren't declared.
18568
85876d07
PE
18569 * insdel.c (check_markers, make_gap_larger, make_gap_smaller):
18570 (reset_var_on_error, Fcombine_after_change_execute_1): Now static.
f0cb4a60 18571 (CHECK_MARKERS): Redo to avoid gcc -Wempty-body diagnostic.
40ef059e 18572 (copy_text): Remove unused local var.
85876d07 18573
03d78a21 18574 * filelock.c (within_one_second): Now static.
b3dd38ab 18575 (lock_file_1): Rename local to avoid shadowing.
03d78a21 18576
5df8f01b
PE
18577 * buffer.c (fix_overlays_before): Mark locals as initialized.
18578 (fix_start_end_in_overlays): Likewise. This function should be
18579 simplified by using pointers-to-pointers, but that's a different
18580 matter.
b1d876f1 18581 (switch_to_buffer_1): Now static.
8f54f30a
PE
18582 (Fkill_buffer, record_buffer, Fbury_buffer, Fset_buffer_multibyte):
18583 (report_overlay_modification): Rename locals to avoid shadowing.
c3bd59b5 18584
a70072c9 18585 * sysdep.c (system_process_attributes): Rename vars to avoid shadowing.
fbd02d7b 18586 Fix pointer signedness issue.
edced198
PE
18587 (sys_subshell): Mark local as volatile if checking for lint,
18588 to suppress a gcc -Wclobbered warning that does not seem to be right.
15dfd3d9 18589 (MAXPATHLEN): Define only if needed.
a70072c9 18590
a0977c44
PE
18591 * process.c (serial_open, serial_configure): Move decls from here ...
18592 * systty.h: ... to here, so that they can be checked.
18593
a884fdcc
PE
18594 * fns.c (get_random, seed_random): Move extern decls from here ...
18595 * lisp.h: ... to here, so that they can be checked.
18596
604efe86 18597 * sysdep.c (reset_io): Now static.
b8950c94 18598 (wait_for_termination_signal): Remove; unused.
604efe86 18599
38fc62d9
PE
18600 * keymap.c (keymap_parent, keymap_memberp, map_keymap_internal):
18601 (copy_keymap_item, append_key, push_text_char_description):
18602 Now static.
1004a21a 18603 (Fwhere_is_internal): Don't test CONSP (sequences) unnecessarily.
dbbb8427 18604 (DENSE_TABLE_SIZE): Remove; unused.
c1141155
PE
18605 (get_keymap, access_keymap, Fdefine_key, Fwhere_is_internal):
18606 (describe_map_tree):
18607 Rename locals to avoid shadowing.
38fc62d9 18608
2f2650da
PE
18609 * keyboard.c: Declare functions static if they are not used elsewhere.
18610 (echo_char, echo_dash, cmd_error, top_level_2):
18611 (poll_for_input, handle_async_input): Now static.
69a058fa
PE
18612 (read_char, kbd_buffer_get_event, make_lispy_position):
18613 (make_lispy_event, make_lispy_movement, apply_modifiers):
18614 (decode_keyboard_code, tty_read_avail_input, menu_bar_items):
18615 (parse_tool_bar_item, read_key_sequence, Fread_key_sequence):
18616 (Fread_key_sequence_vector): Rename locals to avoid shadowing.
c8a06054 18617 (read_key_sequence, read_char): Mark locals as initialized.
3ac94672 18618 (Fexit_recursive_edit, Fabort_recursive_edit): Mark with NO_RETURN.
2f2650da 18619
a053e86c 18620 * keyboard.h (make_ctrl_char): New decl.
da2f2dd9
PE
18621 (mark_kboards): Move decl here ...
18622 * alloc.c (mark_kboards): ... from here.
a053e86c 18623
4752793e
PE
18624 * lisp.h (force_auto_save_soon): New decl.
18625
74f10ca7 18626 * emacs.c (init_cmdargs): Rename local to avoid shadowing.
244fc23d
PE
18627 (DEFINE_DUMMY_FUNCTION): New macro.
18628 (__do_global_ctors, __do_global_ctors_aux, __do_global_dtors, __main):
18629 Use it.
c03cd23f
PE
18630 (main): Add casts to avoid warnings
18631 if GCC considers string literals to be constants.
74f10ca7 18632
022e70d4
PE
18633 * lisp.h (fatal_error_signal): Add decl, since it's exported.
18634
59d6fe83
PE
18635 * dbusbind.c: Pointer signedness fixes.
18636 (xd_signature, xd_append_arg, xd_initialize):
18637 (Fdbus_call_method, Fdbus_call_method_asynchronously):
18638 (Fdbus_method_return_internal, Fdbus_method_error_internal):
18639 (Fdbus_send_signal, xd_read_message_1, Fdbus_register_service):
18640 (Fdbus_register_signal): Use SSDATA when the context wants char *.
18641
78320123
PE
18642 * dbusbind.c (Fdbus_init_bus): Add cast to avoid warning
18643 if GCC considers string literals to be constants.
49cebcca 18644 (Fdbus_register_service, Fdbus_register_method): Remove unused vars.
78320123 18645
35ac2a97
SM
186462011-03-16 Stefan Monnier <monnier@iro.umontreal.ca>
18647
fb103ca9
SM
18648 * print.c (PRINT_CIRCLE_CANDIDATE_P): New macro.
18649 (print_preprocess, print_object): New macro to fix last change.
18650
35ac2a97
SM
18651 * print.c (print_preprocess): Don't forget font objects.
18652
62973b41
JB
186532011-03-16 Juanma Barranquero <lekktu@gmail.com>
18654
18655 * emacs.c (USAGE3): Doc fixes.
18656
0e48bb22
AS
186572011-03-15 Andreas Schwab <schwab@linux-m68k.org>
18658
18659 * coding.c (detect_coding_iso_2022): Reorganize code to clarify
18660 structure.
18661
7684e57b
JB
186622011-03-14 Juanma Barranquero <lekktu@gmail.com>
18663
18664 * lisp.h (VWindow_system, Qfile_name_history):
18665 * keyboard.h (lispy_function_keys) [WINDOWSNT]:
18666 * w32term.h (w32_system_caret_hwnd, w32_system_caret_height)
18667 (w32_system_caret_x, w32_system_caret_y): Declare extern.
18668
18669 * w32select.c: Don't #include "keyboard.h".
c96bbc66 18670 (run_protected): Add extern declaration for waiting_for_input.
7684e57b
JB
18671
18672 * w32.c (Qlocal, noninteractive1, inhibit_window_system):
18673 * w32console.c (detect_input_pending, read_input_pending)
18674 (encode_terminal_code):
18675 * w32fns.c (quit_char, lispy_function_keys, Qtooltip)
18676 (w32_system_caret_hwnd, w32_system_caret_height, w32_system_caret_x)
18677 (w32_system_caret_y, Qfile_name_history):
18678 * w32font.c (w32font_driver, QCantialias, QCotf, QClang):
18679 * w32inevt.c (reinvoke_input_signal, lispy_function_keys):
18680 * w32menu.c (Qmenu_bar, QCtoggle, QCradio, Qoverriding_local_map)
18681 (Qoverriding_terminal_local_map, Qmenu_bar_update_hook):
18682 * w32proc.c (Qlocal, report_file_error):
18683 * w32term.c (Vwindow_system, updating_frame):
18684 * w32uniscribe.c (initialized, uniscribe_font_driver):
18685 Remove unneeded extern declarations.
18686
2aa46d6c
CY
186872011-03-14 Chong Yidong <cyd@stupidchicken.com>
18688
c96bbc66 18689 * buffer.c (Fmake_indirect_buffer): Fix incorrect assertions.
2aa46d6c 18690
cffc6f3b
CY
186912011-03-13 Chong Yidong <cyd@stupidchicken.com>
18692
18693 * buffer.h (BUF_BEGV, BUF_BEGV_BYTE, BUF_ZV, BUF_ZV_BYTE, BUF_PT)
18694 (BUF_PT_BYTE): Rewrite to handle indirect buffers (Bug#8219).
18695 These macros can no longer be used for assignment.
18696
44f230aa
SM
18697 * buffer.c (Fget_buffer_create, Fmake_indirect_buffer):
18698 Assign struct members directly, instead of using BUF_BEGV etc.
cffc6f3b
CY
18699 (record_buffer_markers, fetch_buffer_markers): New functions for
18700 recording and fetching special buffer markers.
18701 (set_buffer_internal_1, set_buffer_temp): Use them.
18702
18703 * lread.c (unreadchar): Use SET_BUF_PT_BOTH.
18704
18705 * insdel.c (adjust_point): Use SET_BUF_PT_BOTH.
18706
18707 * intervals.c (temp_set_point_both): Use SET_BUF_PT_BOTH.
18708 (get_local_map): Use SET_BUF_BEGV_BOTH and SET_BUF_ZV_BOTH.
18709
18710 * xdisp.c (hscroll_window_tree):
18711 (reconsider_clip_changes): Use PT instead of BUF_PT.
18712
d251f04b
EZ
187132011-03-13 Eli Zaretskii <eliz@gnu.org>
18714
18715 * makefile.w32-in ($(BLD)/editfns.$(O)): Depend on
18716 $(EMACS_ROOT)/lib/intprops.h.
18717
f0c77cd1
PE
187182011-03-13 Paul Eggert <eggert@cs.ucla.edu>
18719
3eca4629
PE
18720 Fix more problems found by GCC 4.5.2's static checks.
18721
7c86ee98
PE
18722 * gtkutil.c (xg_get_pixbuf_from_pixmap): Add cast from char *
18723 to unsigned char * to avoid compiler diagnostic.
b0afc268
PE
18724 (xg_free_frame_widgets): Make it clear that a local variable is
18725 needed only if USE_GTK_TOOLTIP.
01e0b5ad
PE
18726 (gdk_window_get_screen): Make it clear that this macro is needed
18727 only if USE_GTK_TOOLTIP.
1e5524e7
PE
18728 (int_gtk_range_get_value): New function, which avoids a diagnostic
18729 from gcc -Wbad-function-cast.
18730 (xg_set_toolkit_scroll_bar_thumb): Use it.
18731 (xg_tool_bar_callback, xg_tool_item_stale_p): Rewrite to avoid
18732 diagnostic from gcc -Wbad-function-cast.
65dc836c
PE
18733 (get_utf8_string, xg_get_file_with_chooser):
18734 Rename locals to avoid shadowing.
18735 (create_dialog): Move locals to avoid shadowing.
7c86ee98 18736
41729b81
PE
18737 * xgselect.c (xg_select): Remove unused var.
18738
f0c77cd1
PE
18739 * image.c (four_corners_best): Mark locals as initialized.
18740 (gif_load): Initialize transparent_p to zero (Bug#8238).
18741 Mark another local as initialized.
ec6cf4c6 18742 (my_png_error, my_error_exit): Mark with NO_RETURN.
f0c77cd1 18743
ce0ad53d 18744 * image.c (clear_image_cache): Now static.
d5d5a617 18745 (DIM, HAVE_STDLIB_H_1): Remove unused macros.
e22cffbc 18746 (xpm_load): Redo to avoid "discards qualifiers" gcc warning.
77a765fd
PE
18747 (x_edge_detection): Remove unnecessary cast that
18748 gcc -Wbad-function-cast diagnoses.
2037898d 18749 (gif_load): Fix pointer signedness.
6ae141d6
PE
18750 (clear_image_cache, xbm_read_bitmap_data, x_detect_edges):
18751 (jpeg_load, gif_load): Rename locals to avoid shadowing.
ce0ad53d 18752
33383987 187532011-03-12 Paul Eggert <eggert@cs.ucla.edu>
3eca4629 18754
d32df629
PE
18755 Improve quality of tests for time stamp overflow.
18756 For example, without this patch (encode-time 0 0 0 1 1
18757 1152921504606846976) returns the obviously-bogus value (-948597
18758 62170) on my RHEL 5.5 x86-64 host. With the patch, it correctly
18759 reports time overflow. See
18760 <http://lists.gnu.org/archive/html/emacs-devel/2011-03/msg00470.html>.
b8d9bd41
PE
18761 * deps.mk (editfns.o): Depend on ../lib/intprops.h.
18762 * editfns.c: Include limits.h and intprops.h.
18763 (TIME_T_MIN, TIME_T_MAX): New macros.
18764 (time_overflow): Move earlier, to before first use.
18765 (hi_time, lo_time): New functions, for an accurate test for
18766 out-of-range times.
18767 (Fcurrent_time, Fget_internal_run_time, make_time): Use them.
18768 (Fget_internal_run_time): Don't assume time_t fits in int.
18769 (make_time): Use list2 instead of Fcons twice.
18770 (Fdecode_time): More accurate test for out-of-range times.
18771 (check_tm_member): New function.
18772 (Fencode_time): Use it, to test for out-of-range times.
d32df629
PE
18773 (lisp_time_argument): Don't rely on undefined left-shift and
18774 right-shift behavior when checking for time stamp overflow.
8be6f318 18775
fe31d94c
PE
18776 * editfns.c (time_overflow): New function, refactoring common code.
18777 (Fformat_time_string, Fdecode_time, Fencode_time):
18778 (Fcurrent_time_string): Use it.
18779
8be6f318
PE
18780 Move 'make_time' to be next to its inverse 'lisp_time_argument'.
18781 * dired.c (make_time): Move to ...
18782 * editfns.c (make_time): ... here.
18783 * systime.h: Note the move.
18784
09d9db2c 187852011-03-12 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
c47cbdfd 18786
126bc0dc
YM
18787 * fringe.c (update_window_fringes): Remove unused variables.
18788
c47cbdfd
YM
18789 * unexmacosx.c (copy_data_segment): Also copy __got section.
18790 (Bug#8223)
18791
7ac80be9
EZ
187922011-03-12 Eli Zaretskii <eliz@gnu.org>
18793
c96bbc66 18794 * termcap.c [MSDOS]: Include "msdos.h".
058e5dad
EZ
18795 (find_capability, tgetnum, tgetflag, tgetstr, tputs, tgetent):
18796 Constify `char *' arguments and their references according to
18797 prototypes in tparam.h.
18798
ecb0f94d 18799 * deps.mk (termcap.o): Depend on tparam.h and msdos.h.
058e5dad 18800
7ac80be9
EZ
18801 * msdos.c (XMenuAddPane): 3rd argument is `const char *' now.
18802 Adapt all references accordingly.
18803
18804 * msdos.h (XMenuAddPane): 3rd argument is `const char *' now.
18805
ef1fd07e
TT
188062011-03-11 Tom Tromey <tromey@redhat.com>
18807
18808 * buffer.c (syms_of_buffer): Remove obsolete comment.
18809
7ef4b50c
EZ
188102011-03-11 Eli Zaretskii <eliz@gnu.org>
18811
18812 * termhooks.h (encode_terminal_code): Declare prototype.
18813
18814 * msdos.c (encode_terminal_code): Don't declare prototype.
18815
18816 * term.c (encode_terminal_code): Now external again, used by
18817 w32console.c and msdos.c.
18818
44f230aa
SM
18819 * makefile.w32-in ($(BLD)/term.$(O), ($(BLD)/tparam.$(O)):
18820 Depend on $(SRC)/tparam.h, see 2011-03-11T07:24:21Z!eggert@cs.ucla.edu.
7ef4b50c 18821
4b1ec863 188222011-03-11 Paul Eggert <eggert@cs.ucla.edu>
f78faa98 18823
1714f52b 18824 Fix some minor problems found by GCC 4.5.2's static checks.
83316bf4 18825
4b1ec863
PE
18826 * fringe.c (update_window_fringes): Mark locals as initialized
18827 (Bug#8227).
18828 (destroy_fringe_bitmap, init_fringe_bitmap): Now static.
bf60f616 18829
524c7aa6
PE
18830 * alloc.c (mark_fringe_data): Move decl from here ...
18831 * lisp.h (mark_fringe_data) [HAVE_WINDOW_SYSTEM]: ... to here,
18832 to check its interface.
18833 (init_fringe_once): Do not declare unless HAVE_WINDOW_SYSTEM.
18834
a5c0af81 18835 * fontset.c (free_realized_fontset): Now static.
7519b8cd 18836 (Fset_fontset_font): Rename local to avoid shadowing.
cc6e5db1 18837 (fontset_font): Mark local as initialized.
a9a06e0b 18838 (FONTSET_SPEC, FONTSET_REPERTORY, RFONT_DEF_REPERTORY): Remove; unused.
a5c0af81 18839
b4716021
PE
18840 * xrdb.c: Include "xterm.h", to check x_load_resources's interface.
18841
811e9bac 18842 * xselect.c (x_disown_buffer_selections): Remove; not used.
7b83e2f1 18843 (TRACE3) [!defined TRACE_SELECTION]: Remove; not used.
aa0daa9f
PE
18844 (x_own_selection, Fx_disown_selection_internal): Rename locals
18845 to avoid shadowing.
18846 (x_handle_dnd_message): Remove local to avoid shadowing.
811e9bac 18847
7e3ab302
PE
18848 * lisp.h (GCPRO1_VAR, UNGCPRO_VAR): New macros,
18849 so that the caller can use some name other than gcpro1.
18850 (GCPRO1, UNGCPRO): Reimplement in terms of the new macros.
58d2d479
PE
18851 * xfns.c (Fx_create_frame, x_create_tip_frame, Fx_show_tip):
18852 (Fx_backspace_delete_keys_p):
18853 Use them to avoid shadowing, and rename vars to avoid shadowing.
18854 (x_decode_color, x_set_name, x_window): Now static.
6b437900 18855 (Fx_create_frame): Add braces to silence GCC warning.
c0951e53 18856 (Fx_file_dialog, Fx_select_font): Fix pointer signedness.
06b0c8a0
PE
18857 (x_real_positions, xg_set_icon_from_xpm_data, x_create_tip_frame):
18858 Remove unused locals.
7e3ab302
PE
18859 (Fx_create_frame, x_create_tip_frame, Fx_show_tip):
18860 (Fx_backspace_delete_keys_p): Rename locals to avoid shadowing.
18861 Some of these renamings use the new GCPRO1_VAR and UNGCPRO_VAR
18862 macros.
f78faa98 18863
e2b13473
PE
18864 * xterm.h (x_mouse_leave): New decl.
18865
77f23912
PE
18866 * xterm.c (x_copy_dpy_color, x_focus_on_frame, x_unfocus_frame):
18867 Remove unused functions.
cdf4ba58
PE
18868 (x_shift_glyphs_for_insert, XTflash, XTring_bell):
18869 (x_calc_absolute_position): Now static.
7411c686 18870 (XTread_socket): Don't define label "out" unless it's used.
2b07bcff 18871 Don't declare local "event" unless it's used.
ed7bf3a5
PE
18872 (x_iconify_frame, x_free_frame_resources): Don't declare locals
18873 unless they are used.
38d0b34a
PE
18874 (XEMBED_VERSION, xembed_set_info): Don't define unless needed.
18875 (x_fatal_error_signal): Remove; not used.
a6067996
PE
18876 (x_draw_image_foreground, redo_mouse_highlight, XTmouse_position):
18877 (x_scroll_bar_report_motion, handle_one_xevent, x_draw_bar_cursor):
18878 (x_error_catcher, x_connection_closed, x_error_handler):
18879 (x_error_quitter, xembed_send_message, x_iconify_frame):
18880 (my_log_handler): Rename locals to avoid shadowing.
28f1c698 18881 (x_delete_glyphs, x_ins_del_lines): Mark with NO_RETURN.
2a8fade0 18882 (x_connection_closed): Tell GCC not to suggest NO_RETURN.
77f23912 18883
44f230aa
SM
18884 * xfaces.c (clear_face_cache, Fx_list_fonts, Fface_font):
18885 Rename or move locals to avoid shadowing.
6b463e58 18886 (tty_defined_color, merge_face_heights): Now static.
5967d051 18887 (free_realized_faces_for_fontset): Remove; not used.
1e9966ea
PE
18888 (Fx_list_fonts): Mark variable that gcc -Wuninitialized
18889 does not deduce is never used uninitialized.
73719eba
PE
18890 (STRDUPA, LSTRDUPA, FONT_POINT_SIZE_QUANTUM): Remove; not used.
18891 (LFACEP): Define only if XASSERTS, as it's not needed otherwise.
071048a3 18892
426994c3 18893 * terminal.c (store_terminal_param): Now static.
5489860b 18894
032f1620 18895 * xmenu.c (menu_highlight_callback): Now static.
9d66f88e 18896 (set_frame_menubar): Remove unused local.
d4323972 18897 (xmenu_show): Rename parameter to avoid shadowing.
6d1f7fee
PE
18898 (xmenu_show, xdialog_show, xmenu_show): Make local pointers "const"
18899 since they might point to immutable storage.
281585b0
PE
18900 (next_menubar_widget_id): Declare only if USE_X_TOOLKIT,
18901 since it's unused otherwise.
032f1620 18902
367c19e5 18903 * xdisp.c (produce_glyphless_glyph): Initialize lower_xoff.
53df7c11 18904 Add a FIXME, since the code still doesn't look right. (Bug#8215)
9f36b9fd
PE
18905 (Fcurrent_bidi_paragraph_direction): Simplify slightly; this
18906 avoids a gcc -Wuninitialized diagnostic.
0e086e8f 18907 (display_line, BUILD_COMPOSITE_GLYPH_STRING, draw_glyphs):
44a3a108
PE
18908 (note_mouse_highlight): Mark variables that gcc -Wuninitialized
18909 does not deduce are never used uninitialized.
70739cbe 18910
07b48fa9
PE
18911 * lisp.h (IF_LINT): New macro, copied from ../lib-src/emacsclient.c.
18912
8868a238 18913 * xdisp.c (redisplay_window): Rename local to avoid shadowing.
4554d213
PE
18914 * window.c (window_loop, size_window):
18915 (run_window_configuration_change_hook, enlarge_window): Likewise.
8868a238 18916
7e5cf297 18917 * window.c (display_buffer): Now static.
d6550a9f
PE
18918 (size_window): Mark variables that gcc -Wuninitialized
18919 does not deduce are never used uninitialized.
a586633d
PE
18920 * window.h (check_all_windows): New decl, to forestall
18921 gcc -Wmissing-prototypes diagnostic.
5b555da1 18922 * dispextern.h (bidi_dump_cached_states): Likewise.
7e5cf297 18923
f6095868
PE
18924 * charset.h (CHECK_CHARSET_GET_CHARSET): Rename locals to avoid
18925 shadowing.
18926 * charset.c (map_charset_for_dump, Fchar_charset): Likewise.
726929c4
PE
18927 Include <limits.h>.
18928 (Fsort_charsets): Redo min/max calculation to shorten the code a bit
18929 and to avoid gcc -Wuninitialized warning.
89ef49df
PE
18930 (load_charset_map): Mark variables that gcc -Wuninitialized
18931 does not deduce are never used uninitialized.
53df7c11 18932 (load_charset): Abort instead of using uninitialized var (Bug#8229).
f6095868 18933
f38b440c
PE
18934 * coding.c (coding_set_source, coding_set_destination):
18935 Use "else { /* comment */ }" rather than "else /* comment */;"
18936 for clarity, and to avoid gcc -Wempty-body warning.
2735d060
PE
18937 (Fdefine_coding_system_internal): Don't redeclare 'i' inside
18938 a block, when the outer 'i' will do.
18939 (decode_coding_utf_8, decode_coding_utf_16, detect_coding_emacs_mule):
18940 (emacs_mule_char, decode_coding_emacs_mule, detect_coding_iso_2022):
18941 (decode_coding_iso_2022, decode_coding_sjis, decode_coding_big5):
18942 (decode_coding_raw_text, decode_coding_charset, get_translation_table):
18943 (Fdecode_sjis_char, Fdefine_coding_system_internal):
18944 Rename locals to avoid shadowing.
18945 * character.h (FETCH_STRING_CHAR_ADVANCE): Likewise.
e2f1bab9
PE
18946 * coding.c (emacs_mule_char, encode_invocation_designation):
18947 Now static, since they're not used elsewhere.
413bb2db 18948 (decode_coding_iso_2022): Add "default: abort ();" as a safety check.
c4a63b12 18949 (decode_coding_object, encode_coding_object, detect_coding_system):
ee05f961
PE
18950 (decode_coding_emacs_mule): Mark variables that gcc
18951 -Wuninitialized does not deduce are never used uninitialized.
160b01f6
PE
18952 (detect_coding_iso_2022): Initialize a local variable that might
18953 be used uninitialized. Leave a FIXME because it's not clear that
53df7c11 18954 this initialization is needed. (Bug#8211)
5f58e762
PE
18955 (ISO_CODE_LF, ISO_CODE_CR, CODING_ISO_FLAG_EUC_TW_SHIFT):
18956 (ONE_MORE_BYTE_NO_CHECK, UTF_BOM, UTF_16_INVALID_P):
18957 (SHIFT_OUT_OK, ENCODE_CONTROL_SEQUENCE_INTRODUCER):
18958 (ENCODE_DIRECTION_R2L, ENCODE_DIRECTION_L2R):
18959 Remove unused macros.
f38b440c 18960
232b38b9 18961 * category.c (hash_get_category_set): Remove unused local var.
9f3b5e69 18962 (copy_category_table): Now static, since it's not used elsewhere.
d0891610 18963 * character.c (string_count_byte8): Likewise.
232b38b9 18964
fb90da1b
PE
18965 * ccl.c (CCL_WRITE_STRING, CCL_ENCODE_CHAR, Fccl_execute_on_string):
18966 (Fregister_code_conversion_map): Rename locals to avoid shadowing.
18967
fb93dbc2
PE
18968 * chartab.c (copy_sub_char_table): Now static, since it's not used
18969 elsewhere.
5c156ace
PE
18970 (sub_char_table_ref_and_range, char_table_ref_and_range):
18971 Rename locals to avoid shadowing.
bbcd0949 18972 (ASET_RANGE, GET_SUB_CHAR_TABLE): Remove unused macros.
fb93dbc2 18973
7d3b3862 18974 * bidi.c (bidi_check_type): Now static, since it's not used elsewhere.
630d6892 18975 (BIDI_BOB): Remove unused macro.
7d3b3862 18976
6be7d3da
PE
18977 * cm.c (cmgoto): Mark variables that gcc -Wuninitialized does not
18978 deduce are never used uninitialized.
c2ed9c8b 18979 * term.c (encode_terminal_code): Likewise.
6be7d3da 18980
75f8807f 18981 * term.c (encode_terminal_code): Now static. Remove unused local.
72abad34 18982
50938595
PE
18983 * tparam.h: New file.
18984 * term.c, tparam.h: Include it.
18985 * deps.mk (term.o, tparam.o): Depend on tparam.h.
18986 * term.c (tputs, tgetent, tgetflag, tgetnum, tparam, tgetstr):
18987 Move these decls to tparam.h, and make them agree with what
18988 is actually in tparam.c. The previous trick of using incompatible
18989 decls in different modules does not conform to the C standard.
18990 All callers of tparam changed to use tparam's actual API.
18991 * tparam.c (tparam1, tparam, tgoto):
18992 Use const pointers where appropriate.
18993
fbceeba2
PE
18994 * cm.c (calccost, cmgoto): Use const pointers where appropriate.
18995 * cm.h (struct cm): Likewise.
18996 * dispextern.h (do_line_insertion_deletion_costs): Likewise.
18997 * scroll.c (ins_del_costs, do_line_insertion_deletion_costs): Likewise.
18998 * term.c (tty_ins_del_lines, calculate_costs, struct fkey_table):
18999 (term_get_fkeys_1, append_glyphless_glyph, produce_glyphless_glyph):
19000 (turn_on_face, init_tty): Likewise.
19001 * termchar.h (struct tty_display_info): Likewise.
fbceeba2 19002
7f3f1250
PE
19003 * term.c (term_mouse_position): Rename local to avoid shadowing.
19004
e6ca6543
PE
19005 * alloc.c (mark_ttys): Move decl from here ...
19006 * lisp.h (mark_ttys): ... to here, so that it's checked against defn.
19007
c40f8d15
AS
190082011-03-11 Andreas Schwab <schwab@linux-m68k.org>
19009
19010 * .gdbinit (pwinx, xbuffer): Fix access to buffer name.
19011
cfe0661d
JB
190122011-03-09 Juanma Barranquero <lekktu@gmail.com>
19013
19014 * search.c (compile_pattern_1): Remove argument regp, unused since
19015 revid:rms@gnu.org-19941211082627-3x1g1wyqkjmwloig.
19016 (compile_pattern): Don't pass it.
19017
0afb4571
J
190182011-03-08 Jan Djärv <jan.h.d@swipnet.se>
19019
19020 * xterm.h (DEFAULT_GDK_DISPLAY): New define.
19021 (GDK_WINDOW_XID, gtk_widget_get_preferred_size): New defines
19022 for ! HAVE_GTK3.
19023 (GTK_WIDGET_TO_X_WIN): Use GDK_WINDOW_XID.
19024
19025 * xmenu.c (menu_position_func): Call gtk_widget_get_preferred_size.
19026
19027 * gtkutil.c: Include gtkx.h if HAVE_GTK3. If ! HAVE_GTK3, define
19028 gdk_window_get_screen, gdk_window_get_geometry,
19029 gdk_x11_window_lookup_for_display and GDK_KEY_g.
19030 (xg_set_screen): Use DEFAULT_GDK_DISPLAY.
19031 (xg_get_pixbuf_from_pixmap): New function.
19032 (xg_get_pixbuf_from_pix_and_mask): Change parameters from GdkPixmap
19033 to Pixmap, take frame as parameter, remove GdkColormap parameter.
19034 Call xg_get_pixbuf_from_pixmap instead of
19035 gdk_pixbuf_get_from_drawable.
19036 (xg_get_image_for_pixmap): Do not make GdkPixmaps, call
19037 xg_get_pixbuf_from_pix_and_mask with Pixmap parameters instead.
19038 (xg_check_special_colors): Use GtkStyleContext and its functions
19039 for HAVE_GTK3.
19040 (xg_prepare_tooltip, xg_hide_tooltip): Call gdk_window_get_screen.
19041 (xg_prepare_tooltip, create_dialog, menubar_map_cb)
19042 (xg_update_frame_menubar, xg_tool_bar_detach_callback)
44f230aa
SM
19043 (xg_tool_bar_attach_callback, xg_update_tool_bar_sizes):
19044 Call gtk_widget_get_preferred_size.
0afb4571
J
19045 (xg_frame_resized): gdk_window_get_geometry only takes 5
19046 parameters.
44f230aa
SM
19047 (xg_win_to_widget, xg_event_is_for_menubar):
19048 Call gdk_x11_window_lookup_for_display.
0afb4571
J
19049 (xg_set_widget_bg): New function.
19050 (delete_cb): New function.
895009e1 19051 (xg_create_frame_widgets): Connect delete-event to delete_cb.
5c32d3f2 19052 Call xg_set_widget_bg. Only set background pixmap for ! HAVE_GTK3
0afb4571
J
19053 (xg_set_background_color): Call xg_set_widget_bg.
19054 (xg_set_frame_icon): Call xg_get_pixbuf_from_pix_and_mask.
19055 (xg_create_scroll_bar): vadj is a GtkAdjustment for HAVE_GTK3.
19056 Only call gtk_range_set_update_policy if ! HAVE_GTK3.
19057 (xg_make_tool_item): Only connect xg_tool_bar_item_expose_callback
19058 if ! HAVE_GTK3.
19059 (update_frame_tool_bar): Call gtk_widget_hide.
19060 (xg_initialize): Use GDK_KEY_g.
19061
19062 * xsmfns.c (gdk_set_sm_client_id): Define to gdk_set_sm_client_id
19063 if ! HAVE_GTK3
19064 (x_session_initialize): Call gdk_x11_set_sm_client_id.
19065
19066 * xterm.c (XFillRectangle): Use cairo routines for HAVE_GTK3.
19067 (x_term_init): Disable Xinput(2) with GDK_CORE_DEVICE_EVENTS.
19068 Load ~/emacs.d/gtkrc only for ! HAVE_GTK3.
19069
1c2cc4ef
JB
190702011-03-08 Juanma Barranquero <lekktu@gmail.com>
19071
19072 * w32xfns.c (select_palette): Check success of RealizePalette against
19073 GDI_ERROR, not zero.
19074
33383987 19075See ChangeLog.11 for earlier changes.
aac0c6e3
MR
19076
19077;; Local Variables:
19078;; coding: utf-8
aac0c6e3
MR
19079;; End:
19080
2f097256 19081 Copyright (C) 2011-2012 Free Software Foundation, Inc.
aac0c6e3
MR
19082
19083 This file is part of GNU Emacs.
19084
19085 GNU Emacs is free software: you can redistribute it and/or modify
19086 it under the terms of the GNU General Public License as published by
19087 the Free Software Foundation, either version 3 of the License, or
19088 (at your option) any later version.
19089
19090 GNU Emacs is distributed in the hope that it will be useful,
19091 but WITHOUT ANY WARRANTY; without even the implied warranty of
19092 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19093 GNU General Public License for more details.
19094
19095 You should have received a copy of the GNU General Public License
19096 along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.