Recognize that cp51932.el and eucjp-ms.el are loaded during dumping
[bpt/emacs.git] / src / ChangeLog
1 2012-10-21 Glenn Morris <rgm@gnu.org>
2
3 * lisp.mk (lisp): Add cp51932.el and eucjp-ms.el.
4
5 2012-10-20 Paul Eggert <eggert@cs.ucla.edu>
6
7 Port to OpenBSD 5.1.
8 * frame.c (Fmouse_position, Fmouse_pixel_position):
9 * xdisp.c (produce_stretch_glyph):
10 Declare local vars only when they're needed.
11 This is clearer and avoids a warning on OpenBSD about unused vars.
12 * frame.h (FRAME_WINDOW_P): Always evaluate its argument.
13 This is safer, and avoids OpenBSD warnings about unused vars.
14 * keyboard.c (record_menu_key): Remove unnecessary decl.
15 (poll_timer): Define only if POLL_FOR_INPUT is defined.
16 * unexelf.c (ELFSIZE) [!ElfW]: Do not define if already defined,
17 as our definition clashes with OpenBSD's.
18 * xfaces.c (load_face_colors, check_lface_attrs)
19 (get_lface_attributes_no_remap, get_lface_attributes)
20 (lface_fully_specified_p, x_supports_face_attributes_p)
21 (tty_supports_face_attributes_p, face_fontset, realize_face)
22 (realize_x_face, realize_tty_face):
23 Declare parameters to be Lisp_Object[LFACE_VECTOR_SIZE], not
24 merely Lisp_Object *. This is more informative and avoids
25 a warning on OpenBSD about accessing beyond an object's size.
26
27 2012-10-20 Chong Yidong <cyd@gnu.org>
28
29 * lread.c (Fload): Doc fix (Bug#12592).
30
31 2012-10-19 Kazuhiro Ito <kzhr@d1.dion.ne.jp> (tiny change)
32
33 * font.c (Ffont_at): Fix previous change.
34
35 2012-10-19 Eli Zaretskii <eliz@gnu.org>
36
37 * puresize.h (BASE_PURESIZE): Bump the base value to 1700000. See
38 http://lists.gnu.org/archive/html/emacs-devel/2012-10/msg00593.html
39 for the reasons.
40
41 * alloc.c (NSTATICS): Decrease to 0x800.
42
43 2012-10-19 Stefan Monnier <monnier@iro.umontreal.ca>
44
45 * fns.c (Fnreverse): Include the problem element when signalling an
46 error (bug#12677).
47
48 2012-10-18 Jan Djärv <jan.h.d@swipnet.se>
49
50 * nsterm.m (ns_select): Check writefds before call to
51 FD_ISSET (Bug#12668).
52
53 2012-10-18 Daniel Colascione <dancol@dancol.org>
54
55 * alloc.c (NSTATICS): Increase from 0x650 to 0x1000
56 (staticpro): If we run out of staticpro slots, die with an
57 informative error instead of just calling emacs_abort.
58
59 2012-10-18 Martin Rudalics <rudalics@gmx.at>
60
61 Fix two flaws reported by Dmitry Antipov.
62 * window.c (Ftemp_output_buffer_show): Remove.
63 (Fwindow_vscroll, Fset_window_vscroll): Use decode_live_window.
64 (syms_of_window): Remove defsubr for Stemp_output_buffer_show.
65
66 2012-10-17 Eli Zaretskii <eliz@gnu.org>
67
68 * makefile.w32-in ($(BLD)/w32.$(O)):
69 ($(BLD)/vm-limit.$(O)):
70 ($(BLD)/term.$(O)):
71 ($(BLD)/unexw32.$(O)):
72 ($(BLD)/fileio.$(O)):
73 ($(BLD)/dispnew.$(O)): Update dependencies.
74
75 * w32term.h (w32_initialize_display_info, initialize_w32_display):
76 Add prototypes.
77
78 * w32proc.c: Include ctype.h.
79
80 * w32.h (init_environment, check_windows_init_file)
81 (syms_of_ntproc, syms_of_ntterm, dostounix_filename)
82 (unixtodos_filename, init_winsock, srandom, random, sys_pipe)
83 (set_process_dir, sys_spawnve, register_child, sys_sleep, getwd)
84 (sys_link): Add prototypes.
85
86 * w32.c: Include w32select.h.
87 (sys_access, e_malloc, sys_select): Add prototypes.
88 (emacs_gnutls_pull): 'timeout' is now EMACS_TIME, not struct timeval.
89
90 * vm-limit.c [WINDOWSNT]: Include w32heap.h.
91
92 * unexw32.c: Include lisp.h and w32.h.
93
94 * term.c [WINDOWSNT]: Include w32term.h.
95
96 * process.c [WINDOWSNT]: Add prototype of sys_select.
97
98 * fileio.c [WINDOWSNT]: Include w32.h.
99
100 * dispnew.c [WINDOWSNT]: Include w32.h.
101
102 * cygw32.c (Fcygwin_convert_path_to_windows)
103 (Fcygwin_convert_path_from_windows): Use EQ to compare 2
104 Lisp_Object values. (Bug#12661)
105
106 * w32fns.c (w32_msg_pump): Use XIL instead of casting an integer
107 to Lisp_Object. (Bug#12661)
108
109 2012-10-17 Kenichi Handa <handa@gnu.org>
110
111 * xdisp.c (reseat_1): Make the information stored in it->cmp_it
112 invalidate.
113
114 2012-10-17 Dmitry Antipov <dmantipov@yandex.ru>
115
116 * buffer.c (Fkill_buffer): When unchaining the marker,
117 reset its buffer pointer to NULL (Bug#12652).
118
119 2012-10-17 Dmitry Antipov <dmantipov@yandex.ru>
120
121 Do not verify indirection counters of killed buffers (Bug#12579).
122 * buffer.h (BUFFER_CHECK_INDIRECTION): New macro.
123 * buffer.c (compact_buffer, set_buffer_internal_1): Use it.
124
125 2012-10-16 Dmitry Antipov <dmantipov@yandex.ru>
126
127 * alloc.c (Fmake_byte_code): Fix typo in comment.
128 * print.c (print_interval): Define as static to match prototype.
129 * indent.c (disptab_matches_widthtab, recompute_width_table):
130 Convert to eassert.
131
132 2012-10-16 Dmitry Antipov <dmantipov@yandex.ru>
133
134 * editfns.c (get_system_name): Remove.
135 * lisp.h (get_system_name): Remove prototype.
136 * xrdb.c (getenv, getpwuid, getpwnam): Remove prototypes.
137 (get_environ_db): Use Vsystem_name. Avoid call to strlen.
138
139 2012-10-15 Daniel Colascione <dancol@dancol.org>
140
141 * dbusbind.c: Add comment explaining reason for previous change.
142
143 2012-10-15 Martin Rudalics <rudalics@gmx.at>
144
145 * window.c (Fwindow_end): Rewrite check whether cached position
146 can be used (Bug#12600).
147 (resize_frame_windows, grow_mini_window, shrink_mini_window):
148 Set windows_or_buffers_changed.
149
150 2012-10-15 Daniel Colascione <dancol@dancol.org>
151
152 * dbusbind.c: Fix cygw32 build break when compiling with dbus
153 enabled by undefining the symbol "interface", which the platform
154 headers define to something incompatible.
155
156 2012-10-14 Daniel Colascione <dancol@dancol.org>
157
158 * image.c (init_tiff_functions, init_imagemagick_functions)
159 (init_svg_functions): Fix cygw32 build break by using these
160 functions only when WINDOWSNT _and_ HAVE_NTGUI.
161
162 2012-10-14 Jan Djärv <jan.h.d@swipnet.se>
163
164 * nsterm.m (ns_select): Count fd:s in writefs also (Bug#12422).
165
166 2012-10-13 Jan Djärv <jan.h.d@swipnet.se>
167
168 * gtkutil.c (xg_set_widget_bg): Divide by 65535 (Bug#12612).
169
170 2012-10-13 HANATAKA, Shinya <bogytech@gmail.com> (tiny change)
171
172 * coding.c (detect_coding): Set coding->id before calling
173 this->detector.
174
175 2012-10-13 Andreas Schwab <schwab@linux-m68k.org>
176
177 * fileio.c: Formatting fixes.
178
179 2012-10-13 Paul Eggert <eggert@cs.ucla.edu>
180
181 Fix some stat-related races.
182 * fileio.c (Fwrite_region): Avoid race condition if a file is
183 removed or renamed by some other process immediately after Emacs
184 writes it but before Emacs stats it. Do not assume that stat (or
185 fstat) succeeds.
186 * image.c (slurp_file): Resolve the file name with fopen + fstat
187 rather than stat + fopen.
188 (pbm_read_file) [0]: Remove unused code with stat race.
189 * process.c (allocate_pty) [HAVE_PTYS && !PTY_ITERATION && !PTY_OPEN]:
190 Remove ineffective code with stat race.
191
192 2012-10-12 Stefan Monnier <monnier@iro.umontreal.ca>
193
194 * doc.c (get_doc_string): Don't signal an error if the file is missing.
195
196 2012-10-12 Jan Djärv <jan.h.d@swipnet.se>
197
198 * nsterm.m (hold_event_q): New static variable.
199 (EV_TRAILER, sendScrollEventAtLoc:fromEvent:): Call hold_event if
200 ! q_event_ptr.
201 (hold_event): New function.
202 (ns_read_socket): If hold_event_q have events, store them and
203 return (Bug#12384).
204 (setPosition:portion:whole:): Send SIGIO to ourselves if apploopnr
205 is zero (Bug#12384).
206
207 2012-10-12 Juanma Barranquero <lekktu@gmail.com>
208
209 * makefile.w32-in ($(BLD)/w32select.$(O)): Update dependencies.
210
211 2012-10-12 Eli Zaretskii <eliz@gnu.org>
212
213 * makefile.w32-in ($(BLD)/fileio.$(O)): Add sys/file.h.
214
215 * fileio.c (check_existing): New function.
216 (make_temp_name, Ffile_exists_p, Ffile_writable_p): Call it
217 instead of calling 'stat', when what's needed is to check whether
218 a file exists. This avoids expensive system calls on MS-Windows.
219 (Bug#12587)
220
221 * w32.c (init_environment): Call 'check_existing' instead of 'stat'.
222
223 * lread.c (openp) [WINDOWSNT]: Call 'access' instead of 'stat' to
224 determine whether a file exists and is not a directory.
225
226 * lisp.h (check_existing): Add prototype.
227
228 2012-10-12 Jan Djärv <jan.h.d@swipnet.se>
229
230 * nsfont.m (nsfont_open): Remove font cache, it is not GC correct.
231
232 2012-10-12 Glenn Morris <rgm@gnu.org>
233
234 * buffer.c (Fset_buffer): Doc fix. (Bug#12624)
235
236 2012-10-11 Stefan Monnier <monnier@iro.umontreal.ca>
237
238 * buffer.c (Fkill_buffer): Null out the overlay list(s) as well.
239
240 * eval.c (Fautoload): Remember previous autoload status in load-history.
241
242 2012-10-11 Paul Eggert <eggert@cs.ucla.edu>
243
244 lread.c, macros.c, marker.c, menu.c, minibuf.c: Use bool for booleans.
245 * lread.c (load_each_byte, new_backquote_flag, readchar)
246 (read_filtered_event, lisp_file_lexically_bound_p)
247 (safe_to_load_version, Fload, complete_filename_p, openp)
248 (build_load_history, readevalloop, read_escape, read1)
249 (string_to_number, read_vector, read_list):
250 * macros.c (Fstart_kbd_macro):
251 * marker.c (CONSIDER):
252 * menu.c (parse_single_submenu, digest_single_submenu)
253 (find_and_return_menu_selection, Fx_popup_menu):
254 * minibuf.c (read_minibuf_noninteractive, read_minibuf)
255 (Ftry_completion):
256 * nsmenu.m (ns_update_menubar, runMenuAt:forFrame:keymaps:):
257 (ns_menu_show):
258 * xmenu.c (set_frame_menubar, create_and_show_popup_menu)
259 (xmenu_show, xdialog_show):
260 Use bool for booleans.
261 * lread.c (safe_to_load_version): Rename from safe_to_load_p,
262 as it's not a predicate. All uses changed. Omit unnecessary
263 buffer termination.
264
265 2012-10-11 Dmitry Antipov <dmantipov@yandex.ru>
266
267 * editfns.c (save_excursion_save): Use nil if mark points to nowhere.
268 (save_excursion_restore): Do not restore mark if it was not saved.
269
270 2012-10-11 Paul Eggert <eggert@cs.ucla.edu>
271
272 * marker.c (cached_modiff): EMACS_INT, not int.
273
274 * w32select.c (waiting_for_input): Declare by including "keyboard.h"
275 instead of having a wrong decl.
276 * nsmenu.m (waiting_for_input): Remove wrong decl.
277
278 2012-10-10 Paul Eggert <eggert@cs.ucla.edu>
279
280 keyboard.c, keymap.c: Use bool for booleans.
281 * dispnew.c (sit_for): Distinguish between 3-way display_option
282 and boolean do_display.
283 * keyboard.c (single_kboard, this_command_key_count_reset)
284 (waiting_for_input, echoing, immediate_quit, input_pending)
285 (interrupt_input, interrupts_deferred, pop_kboard)
286 (temporarily_switch_to_single_kboard, ignore_mouse_drag_p)
287 (command_loop_1, adjust_point_for_property)
288 (safe_run_hooks_error, input_polling_used, read_char):
289 (help_char_p, readable_events, kbd_buffer_events_waiting)
290 (kbd_buffer_get_event, timer_check_2, make_lispy_event)
291 (lucid_event_type_list_p, get_input_pending):
292 (gobble_input, menu_separator_name_p, menu_bar_item)
293 (parse_menu_item, parse_tool_bar_item, read_char_x_menu_prompt)
294 (read_char_minibuf_menu_prompt, access_keymap_keyremap)
295 (keyremap_step, test_undefined, read_key_sequence)
296 (detect_input_pending, detect_input_pending_ignore_squeezables)
297 (detect_input_pending_run_timers, requeued_events_pending_p)
298 (quit_throw_to_read_char, Fset_input_interrupt_mode):
299 * keymap.c (get_keymap, keymap_parent, keymap_memberp)
300 (access_keymap_1, access_keymap, map_keymap, get_keyelt)
301 (Fdefine_key, Flookup_key, struct accessible_keymaps_data)
302 (accessible_keymaps_1, Fkey_description, push_key_description):
303 (shadow_lookup, struct where_is_internal_data)
304 (where_is_internal, Fwhere_is_internal, where_is_internal_1)
305 (Fdescribe_buffer_bindings, describe_map_tree, struct describe_map_elt)
306 (describe_map, describe_vector):
307 * menu.c (single_menu_item):
308 * nsmenu.m (ns_update_menubar):
309 * process.c (wait_reading_process_output):
310 * search.c (scan_buffer, scan_newline):
311 Use bool for boolean.
312 * keyboard.c (timers_run, swallow_events)
313 (detect_input_pending_run_timers):
314 * process.c (wait_reading_process_output):
315 Use unsigned for counter where wraparound-on-overflow is desired,
316 since unsigned is guaranteed to have that behavior and signed is not.
317 (read_char): Use ptrdiff_t for string length.
318 (get_input_pending): Remove first argument, since it was always
319 the same pointer-to-int (now pointer-to-boolean) &input_pending,
320 and behave as if it had that value. Return new value of
321 input_pending. All callers changed.
322 * keyboard.h (struct kboard): Use unsigned : 1 for boolean member
323 immediate_echo. Use ptrdiff_t for echo_after_prompt, since it's
324 a string length.
325 * keymap.c (push_key_description): Omit last arg, which was always 1.
326 All callers changed.
327
328 * regex.c (immediate_quit) [emacs]: Remove duplicate decl.
329
330 2012-10-10 Juanma Barranquero <lekktu@gmail.com>
331
332 * makefile.w32-in ($(BLD)/dispnew.$(O), $(BLD)/indent.$(O))
333 ($(BLD)/term.$(O)): Update dependencies.
334
335 2012-10-10 Dmitry Antipov <dmantipov@yandex.ru>
336
337 * alloc.c (mark_object): Use meaningful PVEC_NORMAL_VECTOR.
338 * lisp.h (enum pvec_type): Adjust comments and omit explicit
339 initializer for PVEC_NORMAL_VECTOR.
340
341 2012-10-10 Paul Eggert <eggert@cs.ucla.edu>
342
343 Clean out old termopts cruft.
344 * termopts.h (flow_control, meta_key): Remove unused decls.
345 * dispnew.c, indent.c, nsterm.m, term.c, xsettings.c, xsmfns.c:
346 Don't include termopts.h.
347
348 2012-10-10 Dmitry Antipov <dmantipov@yandex.ru>
349
350 * alloc.c (gc_sweep): Use pointer-to-a-pointer loop for buffers.
351
352 2012-10-10 Paul Eggert <eggert@cs.ucla.edu>
353
354 * commands.h (immediate_quit): Remove duplicate decl.
355
356 2012-10-09 Jan Djärv <jan.h.d@swipnet.se>
357
358 * nsfont.m (Vfonts_in_cache): Remove, not needed as font.c handles
359 caching.
360 (nsfont_open): Remove setting of Vfonts_in_cache.
361 (syms_of_nsfont): Remove initialization of Vfonts_in_cache.
362
363 2012-10-09 Eli Zaretskii <eliz@gnu.org>
364
365 * w32fns.c (w32_last_error): Change the return value to DWORD, to
366 match what GetLastError returns. Explain why the function is
367 needed.
368
369 * frame.c (delete_frame): Rename local variable 'tooltip_frame' to
370 'is_tooltip_frame', to avoid confusion with its global namesake.
371
372 2012-10-08 Daniel Colascione <dancol@dancol.org>
373
374 * xdisp.c (start_hourglass): Call w32_note_current_window when
375 HAVE_NTGUI, not just WINDOWSNT, resolving a problem in the cygw32
376 build that caused Emacs to display the hourglass cursor forever.
377
378 * w32fns.c (Fx_display_color_cells): Instead of using NCOLORS,
379 which is broken under remote desktop, calculate the number of
380 colors available for a display based on the display's number of
381 planes and number of bits per pixel per plane. (bug#10397).
382
383 2012-10-08 Jan Djärv <jan.h.d@swipnet.se>
384
385 * nsfont.m (Vfonts_in_cache): New variable.
386 (nsfont_open): Use unsignedLongLongValue for cache in case wide ints
387 are used. Add cached fonts to Vfonts_in_cache.
388 (syms_of_nsfont): Initialize and staticpro Vfonts_in_cache.
389
390 2012-10-08 Juanma Barranquero <lekktu@gmail.com>
391
392 * makefile.w32-in (LOCAL_FLAGS): Don't define HAVE_NTGUI, it's now
393 in nt/config.nt.
394 (FONT_H): Define after FRAME_H.
395 ($(BLD)/emacs.$(O), $(BLD)/process.$(O), $(BLD)/w32heap.$(O)):
396 Update dependencies.
397
398 * w32term.c: Remove leftover declaration of keyboard_codepage.
399
400 2012-10-08 Eli Zaretskii <eliz@gnu.org>
401
402 * makefile.w32-in (FONT_H): Add $(FRAME_H).
403 (W32TERM_H): Add $(ATIMER_H) and $(FRAME_H).
404 ($(BLD)/emacs.$(O), $(BLD)/w32console.$(O)): Update dependencies.
405 (GLOBAL_SOURCES): Add cygw32.c.
406 ($(BLD)/unexw32.$(O)):
407 ($(BLD)/w32.$(O)):
408 ($(BLD)/w32console.$(O)):
409 ($(BLD)/w32fns.$(O)):
410 ($(BLD)/w32heap.$(O)):
411 ($(BLD)/w32menu.$(O)):
412 ($(BLD)/w32proc.$(O)): Add w32common.h.
413
414 * w32fns.c (w32_color_map_lookup, x_to_w32_color): Argument is now
415 'const char *'.
416 (x_to_w32_color): Don't modify the argument, modify a copy instead.
417
418 2012-10-08 Daniel Colascione <dancol@dancol.org>
419
420 * w32term.h (WM_EMACS_BRINGTOTOP, WM_EMACS_INPUT_READY)
421 (WM_EMACS_END): Change WM_EMACS_BRINGTOTOP from 22 to 21 to close
422 accidental message numbering hole. Change other messages to
423 match.
424
425 * w32select.h (HAVE_W32SELECT): Remove.
426
427 * w32select.c, w32proc.c, w32menu.c, w32console.c, w32.c: Include
428 w32common.h instead of w32heap.h.
429
430 * w32heap.h (ROUND_UP, ROUND_DOWN, get_page_size)
431 (get_allocation_unit, get_processor_type, get_w32_major_version)
432 (get_w32_minor_version, sysinfo_cache, osinfo_cache)
433 (w32_major_version, w32_minor_version, w32_build_number, OS_9X)
434 (OS_NT, os_subtype, cache_system_info): Move declarations to
435 w32common.
436
437 * w32heap.c: Include w32common.h.
438 (sysinfo_cache, syspage_mask, osinfo_cache, w32_major_version)
439 (w32_minor_version, w32_build_number, w32_subtype):
440 Remove duplicate definitions.
441
442 * w32fns.c: Include w32common.h; include w32heap.h only in
443 WINDOWSNT.
444
445 (Fx_file_dialog): Clarify comment on GetOpenFileName structure.
446 Use `report_file_error' instead of `error' in order to better
447 inform users of what went wrong. Increase NTGUI_UNICODE file
448 dialog box file name length to 32k, the maximum allowed by the NT
449 kernel.
450
451 * w32common.h: New file.
452 (ROUND_UP, ROUND_DOWN, get_page_size)
453 (get_allocation_unit, get_processor_type, get_w32_major_version)
454 (get_w32_minor_version, sysinfo_cache, osinfo_cache)
455 (w32_major_version, w32_minor_version, w32_build_number, OS_9X)
456 (OS_NT, os_subtype, cache_system_info): Move here.
457
458 * unexw32.c, unexcw.c: Include w32common.h.
459
460 * emacs.c (main): Use (defined (WINDOWSNT) || defined
461 HAVE_NTGUI) instead of removed HAVE_W32SELECT to decide whether
462 to call syms_of_w32select.
463
464 * cygw32.h: Remove obsolete EXFUN declarations.
465
466 * cygw32.c (Qutf_16_le): Rename to Qutf_16le.
467
468 * Makefile.in (SOME_MACHINE_OBJECTS): Reverse accidental removal
469 of w32inevt.o from SOME_MACHINE_OBJECTS.
470
471 2012-10-08 Daniel Colascione <dancol@dancol.org>
472
473 * image.c: Permanent fix for JPEG compilation issue --- limit
474 jpeglib `boolean' redefinition to Cygwin builds.
475
476 2012-10-08 Eli Zaretskii <eliz@gnu.org>
477
478 * image.c (CHECK_LIB_AVAILABLE): Remove, no longer used.
479
480 * emacs.c (DAEMON_MUST_EXEC) [HAVE_NTGUI]: Define this only on
481 Cygwin.
482
483 2012-10-08 Daniel Colascione <dancol@dancol.org>
484
485 * xfaces.c, xdisp.c, window.c, w32xfns.c, w32term.h, w32term.c,
486 w32select.h w32select.c, w32proc.c, w32menu.c, w32inevt.c,
487 w32help.c, w32font.c, w32font.c, w32fns.c, w32console.c, w32.h,
488 w32.c, unexw32.c, termhooks.h, process.c, menu.c, keyboard.h,
489 keyboard.c, image.c, frame.h, frame.c, fontset.c, font.h, font.c,
490 emacs.c, dispextern.h, cygw32.h, cygw32.c, conf_post.h,
491 Makefile.in: use HAVE_NTGUI for W32 GUI and WINDOWSNT for the
492 operating system. defined(HAVE_NTGUI) && !defined(WINDOWSNT) is
493 now a supported configuration.
494
495 * Makefile.in: consolidate image variables into LIBIMAGE; add
496 W32_OBJ and W32_LIBS. Compile new files.
497
498 * conf_post.h:
499 (_DebPrint) declare tracing facility for W32 debugging. We need
500 to unify tracing later.
501
502 (NTGUI_UNICODE) Define when compiling for Cygwin to allow the
503 unconditional use of W32 Unicode functions. Cygwin runs only on
504 100% Unicode operating systems.
505
506 * cygw32.c: New file. Define Cygwin-specific facilities.
507 (Fcygwin_convert_path_to_windows)
508 (Fcygwin_convert_path_from_windows): New user functions for
509 accessing Cygwin path-munging routines.
510
511 * cygw32.h: New file.
512 (WCSDATA, to_unicode, from_unicode): Define facilities for storing
513 UTF-16LE strings temporarily inside non-Lisp-visible string
514 objects.
515
516 (w32_strerror): Just what it says on the tin.
517
518 * emacs.c: Make the NS fork-then-exec code for daemon-launching
519 also run for Cygwin; both systems have the same problem with using
520 GUI facilities in a forked child. Also call syms_of_cygw32,
521 syms_of_w32select in correct places.
522
523 (DAEMON_MUST_EXEC): new macro defined to signal that a platform
524 needs fork-then-exec for daemon launching.
525
526 * font.h: Include frame.h.
527
528 * image.c: Use the image library cache machinery only when we're
529 compiling for native WINDOWSNT; Cygwin can use shared libraries
530 like any other Unixlike system.
531
532 * keyboard.c: Clarify a comment regarding the input loop.
533
534 * menu.c: When NTGUI_UNICODE is defined, use Unicode menu
535 functions directly instead of trying to detect at runtime that our
536 host operating system supports them. We make this change for two
537 reasons: Cygwin lacks support for the multibyte character
538 conversion functions used by the legacy menu code, and Cygwin
539 never needs to rely on non-Unicode APIs.
540
541 * unexw32.c (hinst): Declare extern.
542
543 * w32.c: Change header order;
544 (w32_strerror): Move to w32fns.c because we need it for
545 non-WINDOWSNT builds.
546
547 * w32.h: Add #error macro to make sure we don't include w32.h for
548 Cygwin builds. Remove w32select declarations.
549
550 * w32console.c (w32_sys_ring_bell, Fset_message_beep): Move to
551 w32fns.c. w32console.c is WINDOWSNT-only.
552
553 * w32fns.c: Include cygw32.h or w32.h depending on CYGWIN; more
554 NTGUI_UNICODE tweaks. (See above.) Change _snprintf to the more
555 POSIXy alternative.
556 (faked_key, sysinfo_cache, osinfo_cahce, syspage_mask)
557 (w32_major_version, w32_minor_version, w32_build_number)
558 (os_subtype, sound_type): Define here
559 (w32_defined_color): Make color parameter const for consistency
560 with other _defined_color functions.
561 (w32_createwindow): Unconditionally call w32_init_class instead of
562 doing so only when hprevinst is non-NULL. Plumbing hprevinst
563 through the code is complex and unnecessary because class
564 registration is practically free.
565 (w32_name_of_message): New EMACSDEBUG-only function.
566 (Fset_message_beep): Move here
567 (Fx_open_connection): Require that the display name for Windows be
568 "w32" for consistency, emacsclient disambiguation, and maybe, one
569 day, multi-window-system support.
570 (file_dialog_callback): NTGUI_UNICODE changes; encode and decode
571 Cygwin files for W32 GUI facilities, since these clearly don't
572 expect Cygwin names.
573 (_DebPrint): Define.
574 (w32_strerror, w32_console_toggle_lock_key, w32_kbd_mods_to_emacs)
575 (w32_kbd_patch_key, w32_sys_ring_bell): Move here.
576 (Ssystem_move_file_to_trash): Define only for native WINDOWSNT.
577 (w32_last_error): Remove.
578
579 * w32font.c: Define _strlwr to strlwr for non-WINDOWSNT builds.
580
581 * w32heap.c (syspage_mask): Declare here.
582 (cache_system_info): Remove.
583
584 * w32inevt.c (faked_key): Define globally, not statically.
585 (w32_kbd_mods_to_emacs, w32_kbd_patch_key, faked_key)
586 (w32_console_toggle_lock_key): Move to w32fns.c.
587
588 * w32menu.c: Include setjmp.h. NTGUI_UNICODE changes throughout.
589
590 * w32proc.c (_DebPrint): Move to w32fns.c.
591 * w32select.c: Include string.h, stdio.h for Cygwin.
592 * w32select.h: New File.
593
594 * w32term.c: Include io.h for non-CYGWIN builds; needed for
595 get_osfhandle.
596 (w32_message_fd): New variable. Under Cygwin, holds the file
597 descriptor the system used to tell us about pending thread
598 messages.
599
600 (w32_init_term): Remove incorrect calls to fcntl and init_sigio
601 that prevented compilation under non-WINDOWSNT systems.
602
603 (w32_initialize): Open /dev/windows and assign it to
604 w32_message_fd. Provide w32 feature.
605
606 * w32term.h: Include frame.h, atimer.h. Declare various frame functions.
607 (WM_EMACS_INPUT_READY): add.
608 (prepend_msg, w32_message_fd): Declare globally.
609
610 * w32xfns.c:
611 (keyboard_handle): Use only when WINDOWSNT.
612 (notify_msg_ready): New function. Posts a message to the main
613 thread's message queue under CYGWIN, which wakes up the main
614 thread from select(2) by making the /dev/windows file descriptor
615 ready. Under WINDOWSNT, it sets an event the same way the old
616 code did.
617
618 (post, prepend_msg): Actually call notify_msg_ready instead of
619 setting the input event directly.
620
621 2012-10-07 Eli Zaretskii <eliz@gnu.org>
622
623 * ralloc.c (relinquish): If a heap is ready to be relinquished,
624 but it still has blocs in it, don't return it to the system,
625 instead of aborting. (Bug#12402)
626
627 2012-10-07 Jan Djärv <jan.h.d@swipnet.se>
628
629 * nsterm.m (ns_dumpglyphs_image): Only draw slice of image (Bug#12506).
630
631 * nsterm.m (ns_update_auto_hide_menu_bar): Remove defintion of
632 MAC_OS_X_VERSION_10_6.
633 (syms_of_nsterm): Remove comment about Panther and above for
634 ns-antialias-text.
635 * nsterm.h (MAC_OS_X_VERSION_10_3, onTiger): Remove.
636 (EmacsApp): Remove check for >= MAC_OS_X_VERSION_10_4.
637 (struct nsfont_info): Remove check for >= MAC_OS_X_VERSION_10_3.
638
639 * nsselect.m (ns_string_from_pasteboard): Remove check for >=
640 MAC_OS_X_VERSION_10_4.
641
642 * nsmenu.m (fillWithWidgetValue:): Remove code for <
643 MAC_OS_X_VERSION_10_2.
644
645 * nsimage.m (setPixmapData, getPixelAtX, setAlphaAtX): Remove onTiger.
646
647 * nsfns.m (Fns_list_services): Remove comment and check for OSX < 10.4.
648 (ns_do_applescript): Remove check for >= MAC_OS_X_VERSION_10_4.
649
650 * nsterm.m (ns_in_resize): Remove (Bug#12479).
651 (ns_resize_handle_rect, mouseDown, mouseUp, mouseDragged): Remove.
652 (ns_clear_frame, sendEvent, windowDidResize, drawRect:):
653 Remove ns_in_resize check.
654 (ns_clear_frame_area): Remove resize handle code.
655
656 * nsfns.m (ns_in_resize): Remove.
657 (x_set_icon_name, ns_set_name, ns_set_name_as_filename): Remove
658 ns_in_resize check.
659
660 2012-10-07 Paul Eggert <eggert@cs.ucla.edu>
661
662 Improve sys_siglist detection.
663 * sysdep.c (sys_siglist, init_signals): Use _sys_siglist if it's
664 defined as a macro, as is done in Solaris.
665 (sys_siglist_entries): New macro.
666 (save_strsignal): Use it.
667 * syssignal.h (safe_strsignal): Now ATTRIBUTE_CONST, to pacify
668 GCC 4.7.2 on Fedora 17 with the fixed sys_siglist detection.
669
670 2012-10-06 Jan Djärv <jan.h.d@swipnet.se>
671
672 * nsfns.m (Fx_create_frame): Call x_default_parameter with
673 fullscreen/Fullscreen.
674
675 * nsterm.h (EmacsView): Rename tbar_height to tibar_height.
676 tobar_height is new.
677
678 * nsterm.m (x_make_frame_visible): Check for fullscreen.
679 (ns_fullscreen_hook): Activate old style fullscreen with a timer.
680 (ns_term_init): Set activateIgnoringOtherApps if old style fullscreen.
681 (windowDidResize:): Check for correct window if old style fullscreen.
682 Capitalize word in comment. Remove incorrect comment.
683 (initFrameFromEmacs:): tbar_height renamed tibar_height.
684 (windowDidEnterFullScreen:): Toggle toolbar for fullscreen to fix
685 error in drawing background.
686 (toggleFullScreen:): Remove comment. Rearrange calls.
687 Set toolbar values to zero, save old height in tobar_height.
688 Restore tool bar height when leaving fullscreen.
689 (canBecomeMainWindow): New function.
690
691 2012-10-06 Paul Eggert <eggert@cs.ucla.edu>
692
693 * keyboard.c (read_char): Remove unnecessary 'volatile's and label.
694
695 2012-10-05 Eli Zaretskii <eliz@gnu.org>
696
697 * w32proc.c (stop_timer_thread): Fix declaration of 'err'.
698
699 * w32.c (utime): Open the file with FILE_FLAG_BACKUP_SEMANTICS, so
700 that time stamps of directories could also be changed.
701 Don't request the too broad GENERIC_WRITE, only the more restrictive
702 FILE_WRITE_ATTRIBUTES access rights.
703
704 * fileio.c (Fset_file_times): Special-case ignoring errors for
705 directories only on MSDOS, not on MS-Windows.
706
707 2012-10-05 Ikumi Keita <ikumi@ikumi.que.jp> (tiny change)
708
709 * minibuf.c (Fcompleting_read): Doc fix. (Bug#12555)
710
711 2012-10-04 Eli Zaretskii <eliz@gnu.org>
712
713 * w32.c (utime): Test for INVALID_HANDLE_VALUE, not for NULL, to
714 see whether CreateFile failed.
715
716 2012-10-04 Paul Eggert <eggert@cs.ucla.edu>
717
718 * profiler.c (handle_profiler_signal): Inhibit pending signals too,
719 to avoid similar races.
720 * keyboard.c (pending_signals): Now bool, not int.
721
722 Port timers to OpenBSD, plus check for timer failures.
723 OpenBSD problem reported by Han Boetes.
724 * profiler.c (setup_cpu_timer): Check for failure of timer_settime
725 and/or setitimer.
726 (Fprofiler_cpu_stop): Don't assume HAVE_SETITIMER.
727 * syssignal.h (HAVE_ITIMERSPEC): New macro. This is for platforms
728 like OpenBSD, which has timer_settime but does not declare it.
729 OpenBSD does not define SIGEV_SIGNAL, so use that when deciding
730 whether to use itimerspec-related primitives. All uses of
731 HAVE_TIMER_SETTIME replaced with HAVE_ITIMERSPEC.
732
733 2012-10-02 Paul Eggert <eggert@cs.ucla.edu>
734
735 * profiler.c (handle_profiler_signal): Fix a malloc race
736 that caused Emacs to hang on Fedora 17 when profiling Lisp.
737
738 2012-10-02 Jan Djärv <jan.h.d@swipnet.se>
739
740 * nsterm.m (windowDidEnterFullScreen): Remove fprintf.
741
742 2012-10-02 Eli Zaretskii <eliz@gnu.org>
743
744 * w32proc.c (sys_wait): Declare 'signame' 'const char *', to be
745 consistent with the change in return value of 'safe_strsignal'.
746
747 2012-10-02 Paul Eggert <eggert@cs.ucla.edu>
748
749 Prefer plain 'static' to 'static inline' (Bug#12541).
750 * bidi.c (bidi_get_type, bidi_check_type, bidi_get_category)
751 (bidi_set_sor_type, bidi_push_embedding_level)
752 (bidi_pop_embedding_level, bidi_remember_char, bidi_copy_it)
753 (bidi_cache_reset, bidi_cache_shrink, bidi_cache_fetch_state)
754 (bidi_cache_search, bidi_cache_ensure_space)
755 (bidi_cache_iterator_state, bidi_cache_find)
756 (bidi_peek_at_next_level, bidi_set_paragraph_end)
757 (bidi_count_bytes, bidi_char_at_pos, bidi_fetch_char)
758 (bidi_explicit_dir_char, bidi_resolve_neutral_1):
759 Now 'static', not 'static inline'.
760
761 Count overruns when profiling; change units to ns.
762 * profiler.c (handle_profiler_signal): Count sampling intervals, not ms.
763 Give extra weight to samples after overruns, to attempt to count
764 the time more accurately.
765 (setup_cpu_timer): Change sampling interval units from ms to ns, since
766 the underlying primitives nominally do ns.
767 (Fprofiler_cpu_start): Document the change. Mention that
768 the sampling intervals are only approximate.
769
770 2012-10-02 Stefan Monnier <monnier@iro.umontreal.ca>
771
772 * frame.c (Fmake_terminal_frame): Prefer safer CONSP over !NILP.
773
774 * coding.h (ENCODE_FILE, DECODE_FILE, DECODE_SYSTEM): Remove special
775 case for the special 0 coding-system.
776
777 * buffer.c (Fset_buffer_multibyte): Signal an error instead of widening.
778 (Fmake_overlay): Remove redundant tests.
779 (fix_start_end_in_overlays): Remove redundant recentering.
780
781 2012-10-02 Juanma Barranquero <lekktu@gmail.com>
782
783 * makefile.w32-in ($(BLD)/alloc.$(O), $(BLD)/gmalloc.$(O)):
784 Update dependencies.
785
786 2012-10-01 Paul Eggert <eggert@cs.ucla.edu>
787
788 Fix a malloc race condition involving strsignal.
789 A signal can arrive in the middle of a malloc, and Emacs's signal
790 handler can invoke strsignal, which can invoke malloc, which is
791 not portable. This race condition bug makes Emacs hang on GNU/Linux.
792 Fix it by altering the signal handler so that it does not invoke
793 strsignal.
794 * emacs.c (shut_down_emacs): Use safe_strsignal, not strsignal.
795 * process.c (status_message): Use const pointer, in case strsignal
796 is #defined to safe_strsignal.
797 * sysdep.c (sys_siglist, init_signals): Always define and
798 initialize a substitute sys_siglist if the system does not define
799 one, even if HAVE_STRSIGNAL.
800 (safe_strsignal): Rename from strsignal. Always define,
801 using sys_siglist. Return a const pointer.
802 * syssignal.h (safe_strsignal): New decl.
803 (strsignal) [!HAVE_STRSIGNAL]: Define in terms of safe_strsignal.
804
805 2012-10-01 Eli Zaretskii <eliz@gnu.org>
806
807 * w32proc.c (timer_loop): Fix code that waits for timer
808 expiration, to avoid high CPU usage.
809
810 2012-10-01 Stefan Monnier <monnier@iro.umontreal.ca>
811
812 * fns.c (check_hash_table, get_key_arg, maybe_resize_hash_table)
813 (sweep_weak_table): Remove redundant prototypes.
814
815 2012-10-01 Fabrice Popineau <fabrice.popineau@gmail.com>
816
817 * emacs.c: Move the inclusion of TERM_HEADER after including
818 windows.h on WINDOWSNT. This avoids compilation problems with
819 MSVC.
820
821 2012-10-01 Eli Zaretskii <eliz@gnu.org>
822
823 * unexw32.c (OFFSET_TO_RVA, RVA_TO_OFFSET)
824 (RVA_TO_SECTION_OFFSET): Encode all macro arguments in parentheses.
825 (RVA_TO_PTR): Cast the result of RVA_TO_OFFSET to 'unsigned char *',
826 as the previous version used 'void *'.
827
828 * ralloc.c (ROUNDUP): Fix last change.
829 (MEM_ROUNDUP): Don't cast MEM_ALIGN, it is already of type
830 'size_t'.
831
832 * w32proc.c <disable_itimers>: New static flag.
833 (init_timers): Initialize it to zero, after creating the critical
834 sections used by the timer threads.
835 (term_timers): Set to 1 before deleting the critical sections.
836 (getitimer, setitimer): If disable_itimers is non-zero, return an
837 error indication without doing anything. Reported by Fabrice
838 Popineau <fabrice.popineau@supelec.fr> as part of bug#12544.
839 (alarm) [HAVE_SETITIMER]: Be more conformant to the expected
840 return results.
841 [!HAVE_SETITIMER]: Behave as the previous version that didn't
842 support timers.
843
844 * emacs.c (shut_down_emacs) [WINDOWSNT]: Move the call to
845 term_ntproc after all the other bookkeeping, to get timers working
846 as long as possible.
847
848 2012-10-01 Paul Eggert <eggert@cs.ucla.edu>
849
850 * xdisp.c (syms_of_xdisp): Default message-log-max to 1000, not 100.
851 Suggested by Juri Linkov in
852 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00821.html>.
853
854 Prefer plain 'static' to 'static inline' (Bug#12541).
855 With static functions, modern compilers inline pretty well by
856 themselves; advice from programmers often hurts as much as it helps.
857 On my host (x86-64, Fedora 17, GCC 4.7.2, default 'configure'),
858 this change shrinks the text size of the Emacs executable by 1.1%
859 without affecting CPU significantly in my benchmark.
860 * alloc.c (mem_find, live_string_p, live_cons_p, live_symbol_p)
861 (live_float_p, live_misc_p, live_vector_p, live_buffer_p)
862 (mark_maybe_object, mark_maybe_pointer, bounded_number):
863 * buffer.c (bset_abbrev_mode, bset_abbrev_table)
864 (bset_auto_fill_function, bset_auto_save_file_format)
865 (bset_auto_save_file_name, bset_backed_up, bset_begv_marker)
866 (bset_bidi_display_reordering, bset_buffer_file_coding_system)
867 (bset_cache_long_line_scans, bset_case_fold_search)
868 (bset_ctl_arrow, bset_cursor_in_non_selected_windows)
869 (bset_cursor_type, bset_display_table, bset_extra_line_spacing)
870 (bset_file_format, bset_file_truename, bset_fringe_cursor_alist)
871 (bset_fringe_indicator_alist, bset_fringes_outside_margins)
872 (bset_header_line_format, bset_indicate_buffer_boundaries)
873 (bset_indicate_empty_lines, bset_invisibility_spec)
874 (bset_left_fringe_width, bset_major_mode, bset_mark)
875 (bset_minor_modes, bset_mode_line_format, bset_mode_name)
876 (bset_name, bset_overwrite_mode, bset_pt_marker)
877 (bset_right_fringe_width, bset_save_length)
878 (bset_scroll_bar_width, bset_scroll_down_aggressively)
879 (bset_scroll_up_aggressively, bset_selective_display)
880 (bset_selective_display_ellipses, bset_vertical_scroll_bar_type)
881 (bset_word_wrap, bset_zv_marker, set_buffer_overlays_before)
882 (set_buffer_overlays_after):
883 * category.c (bset_category_table):
884 * charset.c (read_hex):
885 * coding.c (produce_composition, produce_charset)
886 (handle_composition_annotation, handle_charset_annotation)
887 (char_encodable_p):
888 * dispnew.c (swap_glyph_pointers, copy_row_except_pointers)
889 (assign_row, set_frame_matrix_frame, make_current)
890 (add_row_entry):
891 * eval.c (set_specpdl_symbol, set_specpdl_old_value):
892 * fns.c (maybe_resize_hash_table):
893 * frame.c (fset_buffer_predicate, fset_minibuffer_window):
894 * gmalloc.c (register_heapinfo):
895 * image.c (lookup_image_type):
896 * intervals.c (set_interval_object, set_interval_left)
897 (set_interval_right, copy_interval_parent, rotate_right)
898 (rotate_left, balance_possible_root_interval):
899 * keyboard.c (kset_echo_string, kset_kbd_queue)
900 (kset_keyboard_translate_table, kset_last_prefix_arg)
901 (kset_last_repeatable_command, kset_local_function_key_map)
902 (kset_overriding_terminal_local_map, kset_real_last_command)
903 (kset_system_key_syms, clear_event, set_prop):
904 * lread.c (digit_to_number):
905 * marker.c (attach_marker, live_buffer, set_marker_internal):
906 * nsterm.m (ns_compute_glyph_string_overhangs):
907 * process.c (pset_buffer, pset_command)
908 (pset_decode_coding_system, pset_decoding_buf)
909 (pset_encode_coding_system, pset_encoding_buf, pset_filter)
910 (pset_log, pset_mark, pset_name, pset_plist, pset_sentinel)
911 (pset_status, pset_tty_name, pset_type, pset_write_queue):
912 * syntax.c (bset_syntax_table, dec_bytepos):
913 * terminal.c (tset_param_alist):
914 * textprop.c (interval_has_some_properties)
915 (interval_has_some_properties_list):
916 * window.c (wset_combination_limit, wset_dedicated)
917 (wset_display_table, wset_hchild, wset_left_fringe_width)
918 (wset_left_margin_cols, wset_new_normal, wset_new_total)
919 (wset_normal_cols, wset_normal_lines, wset_parent, wset_pointm)
920 (wset_right_fringe_width, wset_right_margin_cols)
921 (wset_scroll_bar_width, wset_start, wset_temslot, wset_vchild)
922 (wset_vertical_scroll_bar_type, wset_window_parameters):
923 * xdisp.c (wset_base_line_number, wset_base_line_pos)
924 (wset_column_number_displayed, wset_region_showing)
925 (window_box_edges, run_window_scroll_functions)
926 (append_glyph_string_lists, prepend_glyph_string_lists)
927 (append_glyph_string, set_glyph_string_background_width)
928 (append_glyph, append_composite_glyph)
929 (take_vertical_position_into_account):
930 * xfaces.c (x_create_gc, x_free_gc, merge_face_vectors)
931 (face_attr_equal_p, lface_equal_p, hash_string_case_insensitive)
932 (lface_hash, lface_same_font_attributes_p, lookup_face):
933 * xml.c (libxml2_loaded_p):
934 * xterm.c (x_set_mode_line_face_gc, x_set_glyph_string_gc)
935 (x_set_glyph_string_clipping, x_clear_glyph_string_rect):
936 Now 'static', not 'static inline'.
937
938 * bidi.c: Tune.
939 (bidi_copy_it): Do the whole copy with a single memcpy.
940 (bidi_char_at_pos): Merge the two STRING_CHAR calls into one.
941
942 Revert the FOLLOW-SYMLINKS change for file-attributes.
943 Doing it right would require several changes to Tramp, and there's
944 not enough time to get that tested before the freeze today.
945 * dired.c (directory_files_internal, Ffile_attributes):
946 Undo last change.
947
948 * frame.c (x_report_frame_params): Port better to wider ints.
949 Do not assume that EMACS_UINT is the same width as uprintmax_t,
950 or that pointers can be printed in 15 decimal digits.
951 Avoid GCC warnings if EMACS_UINT is wider than a pointer.
952
953 2012-09-30 Fabrice Popineau <fabrice.popineau@supelec.fr>
954
955 Support x64 build on MS-Windows.
956 * w32term.h (SCROLL_BAR_PACK, SCROLL_BAR_UNPACK): Define for x64.
957 (SET_SCROLL_BAR_W32_WINDOW): Cast ID to intptr_t, for
958 compatibility with x64.
959 (x_get_focus_frame): Add prototype.
960
961 * w32term.c (w32_draw_underwave): Don't use GCC extensions for
962 defining an XRectangle structure.
963
964 * w32proc.c (RVA_TO_PTR, w32_executable_type): Fix pointer
965 arithmetics for compatibility with x64.
966
967 * w32menu.c (add_menu_item): Use UINT_PTR instead of UINT, for
968 compatibility with x64.
969
970 * w32heap.h: Adjust prototypes and declarations.
971
972 * w32heap.c (RVA_TO_PTR, allocate_heap, sbrk, init_heap)
973 (round_heap): Use DWORD_PTR, ptrdiff_t and size_t instead of
974 DWORD, long, and unsigned long, for compatibility with x64.
975 (allocate_heap) [_WIN64]: Reserve 32GB of memory.
976 (sbrk): Argument is now of type ptrdiff_t.
977
978 * w32fns.c (HMONITOR): Condition declaration on _WIN32_WINNT being
979 less than 0x0500.
980 (w32_msg_pump): Use WPARAM type for 'result'.
981
982 * w32.c (init_environment, get_emacs_configuration): Support AMD64
983 architecture.
984 (init_ntproc): Cast arguments of _open_osfhandle to intptr_t, for
985 compatibility with x64.
986
987 * vm-limit.c (lim_data): Now size_t.
988 (check_memory_limits): Adjust prototypes of real_morecore and
989 __morecore to receive argument of type ptrdiff_t. Use size_t for
990 five_percent and data_size.
991
992 * unexw32.c: Use DWORD_PTR instead of DWORD for file-scope
993 variables, for compatibility with x64.
994 (rva_to_section, offset_to_section, relocate_offset)
995 (OFFSET_TO_RVA, RVA_TO_OFFSET, RVA_TO_SECTION_OFFSET)
996 (PTR_TO_RVA, RVA_TO_PTR, OFFSET_TO_PTR, get_section_info)
997 (copy_executable_and_dump_data): Use DWORD_PTR instead of DWORD
998 for compatibility with x64.
999
1000 * sysdep.c (STDERR_FILENO): Define if not already defined.
1001
1002 * ralloc.c (real_morecore): Argument type is now ptrdiff_t.
1003 (__morecore): Argument type is now ptrdiff_t.
1004 (ROUNDUP, MEM_ROUNDUP): Use size_t instead of 'unsigned long'.
1005 (relinquish): Use ptrdiff_t type for 'excess'.
1006 (r_alloc_sbrk): Argument type is now ptrdiff_t.
1007
1008 * makefile.w32-in (HEAPSIZE): Get value from EMACS_HEAPSIZE.
1009 (bootstrap-temacs-CMD, bootstrap-temacs-SH): Use $(EMACS_PURESIZE)
1010 instead of a literal number.
1011
1012 * gmalloc.c [WINDOWSNT]: Include w32heap.h.
1013 (min): Define only if not already defined.
1014
1015 * frame.c (x_report_frame_params): Use EMACS_UINT for the return
1016 value of FRAME_X_WINDOW, to fit a 64-bit pointer on 64-bit Windows
1017 hosts.
1018
1019 * image.c (x_bitmap_pixmap): Return ptrdiff_t, not int, since
1020 'bitmaps' is a pointer.
1021
1022 * dispextern.h (x_bitmap_pixmap): Adjust prototype.
1023
1024 * alloc.c (gdb_make_enums_visible): Now conditional on __GNUC__.
1025
1026 2012-09-30 Paul Eggert <eggert@cs.ucla.edu>
1027
1028 file-attributes has a new optional arg FOLLOW-SYMLINKS.
1029 * dired.c (directory_files_internal, Ffile_attributes):
1030 New arg follow_symlinks. All uses changed.
1031
1032 2012-09-30 Stefan Monnier <monnier@iro.umontreal.ca>
1033
1034 * .gdbinit (xbacktrace): Adjust to recent "struct backtrace" change.
1035
1036 2012-09-30 Eli Zaretskii <eliz@gnu.org>
1037
1038 Support atimers and CPU profiler via profile.c on MS-Windows.
1039 * w32proc.c (sig_mask, crit_sig): New static variables.
1040 (sys_signal): Support SIGALRM and SIGPROF.
1041 (sigemptyset, sigaddset, sigfillset, sigprocmask)
1042 (pthread_sigmask, setpgrp): Move here from w32.c. sigaddset,
1043 sigfillset, and sigprocmask are no longer no-ops.
1044 (sigismember): New function.
1045 (struct itimer_data): New definition.
1046 (ticks_now, real_itimer, prof_itimer, clocks_min, crit_real)
1047 (crit_prof): New static variables.
1048 (MAX_SINGLE_SLEEP): New definition.
1049 (timer_loop, stop_timer_thread, term_timers, init_timers)
1050 (start_timer_thread, getitimer, setitimer): New functions.
1051 (alarm): No longer a no-op, calls setitimer.
1052
1053 * w32.c (term_ntproc): Call term_timers.
1054 (init_ntproc): Make sure all signals are unblocked at startup, to
1055 erase any traces of dumping. Call init_timers.
1056
1057 * w32fns.c (hourglass_timer, HOURGLASS_ID): Remove.
1058 Windows-specific code to display the hourglass mouse pointer is no
1059 longer used.
1060 (w32_wnd_proc): Remove code that handled the WM_TIMER message due
1061 to hourglass timer expiration.
1062 (start_hourglass, cancel_hourglass, DEFAULT_HOURGLASS_DELAY):
1063 Remove, no longer used.
1064 (w32_note_current_window, show_hourglass, hide_hourglass):
1065 New functions, in support of hourglass cursor display similar to other
1066 window systems.
1067 (syms_of_w32fns): Don't initialize hourglass_timer.
1068
1069 * xdisp.c (start_hourglass, cancel_hourglass): Now used on
1070 WINDOWSNT as well.
1071 (start_hourglass) [WINDOWSNT]: Call w32_note_current_window.
1072
1073 * w32.h (init_timers, term_timers): Add prototypes.
1074
1075 2012-09-30 Kenichi Handa <handa@gnu.org>
1076
1077 * coding.c (decode_coding_ccl, encode_coding_ccl): Pay attention
1078 to the buffer relocation which may be caused by ccl_driver.
1079
1080 2012-09-30 Jan Djärv <jan.h.d@swipnet.se>
1081
1082 * xfns.c (Fx_file_dialog): Update comment.
1083
1084 * w32fns.c (Fx_file_dialog): Update comment.
1085
1086 * nsfns.m (Fns_read_file_name): Add argument DIR_ONLY_P.
1087 Initialize panel name field if OSX >= 10.6.
1088
1089 * fileio.c (Fnext_read_file_uses_dialog_p): Add HAVE_NS.
1090
1091 * nsfns.m (ns_frame_parm_handlers): Add x_set_fullscreen.
1092
1093 * nsterm.m (NEW_STYLE_FS): New define.
1094 (ns_fullscreen_hook, windowWillEnterFullScreen)
1095 (windowDidEnterFullScreen, windowWillExitFullScreen)
1096 (windowDidExitFullScreen, toggleFullScreen, handleFS)
1097 (setFSValue): New functions.
1098 (EmacsFSWindow): New implementation.
1099 (canBecomeKeyWindow): New function for EmacsFSWindow.
1100 (ns_create_terminal): Set fullscreen_hook to ns_fullscreen_hook.
1101 (dealloc): Release nonfs_window if in fullscreen.
1102 (updateFrameSize:): Call windowDidMove to update top/left.
1103 (windowWillResize:toSize:): Check if frame is still maximized.
1104 (initFrameFromEmacs:): Initialize fs_state, fs_before_fs,
1105 next_maximized, maximized_width, maximized_height and nonfs_window.
1106 Call setCollectionBehavior if NEW_STYLE_FS. Initialize bwidth and
1107 tbar_height.
1108 (windowWillUseStandardFrame:defaultFrame:): Update frame parameter
1109 fullscreen. Set maximized_width/height. Act on next_maximized.
1110
1111 * nsterm.h (MAC_OS_X_VERSION_10_7, MAC_OS_X_VERSION_10_8): New.
1112 (EmacsView): Add variables for fullscreen.
1113 (handleFS, setFSValue, toggleFullScreen): New in EmacsView.
1114 (EmacsFSWindow): New interface for fullscreen.
1115
1116 2012-09-30 Juanma Barranquero <lekktu@gmail.com>
1117
1118 * makefile.w32-in ($(BLD)/profiler.$(O)): Update dependencies.
1119
1120 2012-09-30 Chong Yidong <cyd@gnu.org>
1121
1122 * fns.c (Frandom): Doc fix.
1123
1124 2012-09-30 Martin Rudalics <rudalics@gmx.at>
1125
1126 * window.c (Vwindow_combination_limit): New default value.
1127 (Qwindow_size): New symbol replacing Qtemp_buffer_resize.
1128
1129 2012-09-30 Paul Eggert <eggert@cs.ucla.edu>
1130
1131 * syssignal.h (PROFILER_CPU_SUPPORT): Don't define if PROFILING.
1132 Suggested by Eli Zaretskii in
1133 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00811.html>.
1134
1135 2012-09-30 Eli Zaretskii <eliz@gnu.org>
1136
1137 * profiler.c (Fprofiler_cpu_stop): Use timer_settime only if
1138 HAVE_TIMER_SETTIME is defined.
1139
1140 2012-09-30 Paul Eggert <eggert@cs.ucla.edu>
1141
1142 Profiler improvements: more-accurate timers, overflow checks.
1143 * profiler.c: Don't include stdio.h, limits.h, sys/time.h,
1144 signal.h, setjmp.h. Include systime.h instead.
1145 (saturated_add): New function.
1146 (record_backtrace, current_sample_interval): Use EMACS_INT, not size_t.
1147 (record_backtrace, handle_profiler_signal): Saturate on fixnum overflow.
1148 (profiler_timer, profiler_timer_ok) [HAVE_TIMER_SETTIME]:
1149 New static vars.
1150 (enum profiler_cpu_running): New enum.
1151 (profiler_cpu_running): Now of that enum type, not bool.
1152 All uses changed to store the new value.
1153 (handle_profiler_signal): Rename from sigprof_handler_1,
1154 for consistency with other handlers. Do not check whether
1155 cpu_log is a hash-table if garbage collecting, since it
1156 doesn't matter in that case.
1157 (deliver_profiler_signal): Rename from sigprof_handler,
1158 for consistency with other handlers.
1159 (setup_cpu_timer): New function, with much of what used to be in
1160 Fprofiler_cpu_start. Check for out-of-range argument.
1161 Prefer timer_settime if available, and prefer
1162 thread cputime clocks, then process cputime clocks, then
1163 monotonic clocks, to the old realtime clock. Use make_timeval
1164 to round more-correctly when falling back to setitimer.
1165 (Fprofiler_cpu_start): Use it.
1166 (Fprofiler_cpu_stop): Prefer timer_settime if available.
1167 Don't assume that passing NULL as the 2nd argument of setitimer
1168 is the same as passing a pointer to all-zero storage.
1169 Ignore SIGPROF afterwards.
1170 (malloc_probe): Saturate at MOST_POSITIVE_FIXNUM.
1171 * sysdep.c (emacs_sigaction_init): Also mask out SIGPROF in
1172 non-fatal signal handlers. Ignore SIGPROF on startup.
1173 * syssignal.h (PROFILER_CPU_SUPPORT): Define this macro here, not
1174 in profiler.c, since sysdep.c now uses it.
1175
1176 * sysdep.c (handle_fatal_signal): Bump backtrace size to 40.
1177 Suggested by Eli Zaretskii in
1178 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00796.html>.
1179
1180 2012-09-29 Juanma Barranquero <lekktu@gmail.com>
1181
1182 * makefile.w32-in ($(BLD)/profiler.$(O)): Update dependencies.
1183
1184 2012-09-29 Stefan Monnier <monnier@iro.umontreal.ca>
1185
1186 * lisp.h (struct backtrace): Remove indirection for `function' field.
1187 * xdisp.c (redisplay_internal):
1188 * profiler.c (record_backtrace, sigprof_handler_1):
1189 * alloc.c (Fgarbage_collect):
1190 * eval.c (interactive_p, Fsignal, eval_sub, Ffuncall, Fbacktrace)
1191 (Fbacktrace_frame): Adjust accordingly.
1192
1193 2012-09-28 Glenn Morris <rgm@gnu.org>
1194
1195 * eval.c (Frun_hook_with_args, Frun_hook_with_args_until_success)
1196 (Frun_hook_with_args_until_failure): Doc fixes.
1197
1198 2012-09-28 Eli Zaretskii <eliz@gnu.org>
1199
1200 * xdisp.c (syms_of_xdisp) <Qredisplay_internal>: Rename from
1201 Qautomatic_redisplay and change the symbol name. All users changed.
1202
1203 2012-09-28 Tomohiro Matsuyama <tomo@cx4a.org>
1204
1205 * profiler.c (sigprof_handler): Fix race condition.
1206
1207 2012-09-28 Glenn Morris <rgm@gnu.org>
1208
1209 * lread.c (lisp_file_lexically_bound_p): Handle #! lines. (Bug#12528)
1210
1211 2012-09-27 Paul Eggert <eggert@cs.ucla.edu>
1212
1213 Check more robustly for timer_settime.
1214 * Makefile.in (LIB_TIMER_TIME): New macro.
1215 (LIBES): Add it.
1216 * atimer.c (alarm_timer, alarm_timer_ok, set_alarm, init_atimer):
1217 Use HAVE_TIMER_SETTIME, not SIGEV_SIGNAL, to decide whether to
1218 call timer_settime.
1219
1220 2012-09-26 Tomohiro Matsuyama <tomo@cx4a.org>
1221
1222 * profiler.c (Fprofiler_cpu_start): Remove unnecessary flag SA_SIGINFO.
1223
1224 2012-09-26 Juanma Barranquero <lekktu@gmail.com>
1225
1226 * makefile.w32-in ($(BLD)/profiler.$(O)): Update dependencies.
1227
1228 2012-09-26 Paul Eggert <eggert@cs.ucla.edu>
1229
1230 * character.h (MAYBE_UNIFY_CHAR): Remove.
1231 * charset.c, charset.h (maybe_unify_char): Now static.
1232 * charset.c (decode_char): Use maybe_unify_char, not MAYBE_UNIFY_CHAR.
1233 Since this stuff is now private to charset.c, there's no need for
1234 a public macro and no need to inline by hand.
1235
1236 2012-09-26 Tomohiro Matsuyama <tomo@cx4a.org>
1237 Stefan Monnier <monnier@iro.umontreal.ca>
1238 Juanma Barranquero <lekktu@gmail.com>
1239
1240 * profiler.c: New file.
1241 * Makefile.in (base_obj): Add profiler.o.
1242 * makefile.w32-in (OBJ2, GLOBAL_SOURCES): Add profiler.c.
1243 ($(BLD)/profiler.$(O)): New target.
1244 * emacs.c (main): Call syms_of_profiler.
1245 * alloc.c (Qautomatic_gc): New constant.
1246 (MALLOC_PROBE): New macro.
1247 (xmalloc, xzalloc, xrealloc, lisp_malloc, lisp_align_malloc): Use it.
1248 (total_bytes_of_live_objects): New function.
1249 (Fgarbage_collect): Use it. Record itself in backtrace_list.
1250 Call malloc_probe for the memory profiler.
1251 (syms_of_alloc): Define Qautomatic_gc.
1252 * eval.c (eval_sub, Ffuncall): Reorder assignments to avoid
1253 race condition.
1254 (struct backtrace): Move definition...
1255 * lisp.h (struct backtrace): ..here.
1256 (Qautomatic_gc, profiler_memory_running): Declare vars.
1257 (malloc_probe, syms_of_profiler): Declare functions.
1258 * xdisp.c (Qautomatic_redisplay): New constant.
1259 (redisplay_internal): Record itself in backtrace_list.
1260 (syms_of_xdisp): Define Qautomatic_redisplay.
1261
1262 2012-09-25 Eli Zaretskii <eliz@gnu.org>
1263 2012-09-25 Juanma Barranquero <lekktu@gmail.com>
1264
1265 * makefile.w32-in ($(BLD)/callproc.$(O)): Update dependencies.
1266
1267 2012-09-25 Paul Eggert <eggert@cs.ucla.edu>
1268
1269 Prefer POSIX timers if available.
1270 They avoid a race if the timer is too close to the current time.
1271 * atimer.c (alarm_timer, alarm_timer_ok) [SIGEV_SIGNAL]: New static vars.
1272 (set_alarm) [SIGEV_SIGNAL]: Use POSIX timers if available.
1273 (init_atimer) [SIGEV_SIGNAL]: Initialize them.
1274
1275 2012-09-25 Eli Zaretskii <eliz@gnu.org>
1276
1277 * coding.c (CHAR_STRING_ADVANCE_NO_UNIFY): Make it an alias of
1278 CHAR_STRING_ADVANCE.
1279 (STRING_CHAR_ADVANCE_NO_UNIFY): Make it an alias of
1280 STRING_CHAR_ADVANCE.
1281
1282 2012-09-25 Juanma Barranquero <lekktu@gmail.com>
1283
1284 Move Vlibrary_cache to emacs.c and reset before dumping.
1285
1286 * lisp.h (reset_image_types): Declare.
1287 [WINDOWSNT] (Vlibrary_cache): Declare.
1288
1289 * image.c (reset_image_types): New function.
1290
1291 * emacs.c [WINDOWSNT] (Vlibrary_cache): Move from w32.c.
1292 (syms_of_emacs) [WINDOWSNT] <Vlibrary_cache>: Initialize and staticpro.
1293 (Fdump_emacs): Reset Vlibrary_cache and image_types.
1294
1295 * w32.c (Vlibrary_cache): Do not define; moved to emacs.c
1296 (globals_of_w32) <Vlibrary_cache>: Do not initialize.
1297
1298 * w32.h (Vlibrary_cache): Do not declare.
1299
1300 2012-09-25 Eli Zaretskii <eliz@gnu.org>
1301
1302 * w32proc.c (sys_signal): Handle all signals defined by the
1303 MS-Windows runtime, not just SIGCHLD. Actually install the signal
1304 handlers for signals supported by Windows. Don't override
1305 term_ntproc as the handler for SIGABRT.
1306 (sigaction): Rewrite to call sys_signal instead of duplicating its
1307 code.
1308 (sys_kill): Improve commentary.
1309
1310 * w32.c (term_ntproc): Accept (and ignore) one argument, for
1311 consistency with a signature of a signal handler. All callers
1312 changed.
1313 (init_ntproc): Accept an argument DUMPING. If dumping, don't
1314 install term_ntproc as a signal handler for SIGABRT, as that
1315 should be done by the dumped Emacs.
1316
1317 * w32.h (init_ntproc, term_ntproc): Adjust prototypes.
1318
1319 * w32select.c (term_w32select): Protect against repeated
1320 invocation by setting clipboard_owner to NULL after calling
1321 DestroyWindow.
1322
1323 * emacs.c (shut_down_emacs, main): Adapt the calls to init_ntproc
1324 and term_ntproc to their modified signatures.
1325
1326 * character.c (char_string, string_char): Remove calls to
1327 MAYBE_UNIFY_CHAR. See the discussion starting at
1328 http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00433.html
1329 for the details.
1330
1331 2012-09-25 Chong Yidong <cyd@gnu.org>
1332
1333 * xdisp.c (mode_line_inverse_video): Delete obsolete variable.
1334
1335 2012-09-24 Stefan Monnier <monnier@iro.umontreal.ca>
1336
1337 * bytecode.c (exec_byte_code): Signal an error instead of aborting,
1338 when encountering an unknown bytecode.
1339
1340 2012-09-24 Paul Eggert <eggert@cs.ucla.edu>
1341
1342 image.c, indent.c: Use bool for booleans.
1343 * dispextern.h (struct image_type): Members valid_p, load, init
1344 now return bool, not int. All uses changed.
1345 * image.c: Omit unnecessary static decls.
1346 (x_create_bitmap_mask, x_build_heuristic_mask):
1347 Return void, not int, since callers don't care about the return value.
1348 (x_create_bitmap_mask, define_image_type, valid_image_p)
1349 (struct image_keyword, parse_image_spec, image_spec_value)
1350 (check_image_size, image_background)
1351 (image_background_transparent, x_clear_image_1)
1352 (postprocess_image, lookup_image, x_check_image_size)
1353 (x_create_x_image_and_pixmap, xbm_image_p)
1354 (Create_Pixmap_From_Bitmap_Data, xbm_read_bitmap_data)
1355 (xbm_load_image, xbm_file_p, xbm_load, xpm_lookup_color)
1356 (init_xpm_functions, xpm_valid_color_symbols_p, xpm_image_p)
1357 (xpm_load, xpm_load_image, lookup_rgb_color, lookup_pixel_color)
1358 (x_to_xcolors, x_build_heuristic_mask, pbm_image_p, pbm_load)
1359 (png_image_p, init_png_functions, png_load_body, png_load)
1360 (jpeg_image_p, init_jpeg_functions, jpeg_load_body, jpeg_load)
1361 (tiff_image_p, init_tiff_functions, tiff_load, gif_image_p)
1362 (init_gif_functions, gif_load, imagemagick_image_p)
1363 (imagemagick_load_image, imagemagick_load, svg_image_p)
1364 (init_svg_functions, svg_load, svg_load_image, gs_image_p)
1365 (gs_load):
1366 * nsimage.m (ns_load_image):
1367 * nsterm.m (ns_defined_color):
1368 * xfaces.c (tty_lookup_color, tty_defined_color, defined_color):
1369 * xfns.c (x_defined_color):
1370 * xterm.c (x_alloc_lighter_color_for_widget)
1371 (x_alloc_nearest_color_1, x_alloc_nearest_color)
1372 (x_alloc_lighter_color):
1373 * indent.c (disptab_matches_widthtab, current_column)
1374 (scan_for_column, string_display_width, indented_beyond_p)
1375 (compute_motion, vmotion, Fvertical_motion):
1376 Use bool for booleans.
1377
1378 2012-09-24 Chong Yidong <cyd@gnu.org>
1379
1380 * chartab.c (Fset_char_table_default): Obsolete function removed.
1381
1382 2012-09-23 Paul Eggert <eggert@cs.ucla.edu>
1383
1384 Move pid_t related decls out of lisp.h.
1385 * lisp.h, syswait.h (record_child_status_change, wait_for_termination)
1386 (interruptible_wait_for_termination):
1387 Move these decls from lisp.h to syswait.h, since they use pid_t.
1388 Needed on FreeBSD; see Herbert J. Skuhra in
1389 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00571.html>.
1390 * callproc.c: Include syswait.h.
1391
1392 gnutls.c, gtkutil.c: Use bool for boolean.
1393 * gnutls.c (gnutls_global_initialized, init_gnutls_functions)
1394 (emacs_gnutls_handle_error):
1395 * gtkutil.c (xg_check_special_colors, xg_prepare_tooltip)
1396 (xg_hide_tooltip, xg_create_frame_widgets)
1397 (create_dialog, xg_uses_old_file_dialog)
1398 (xg_get_file_with_chooser, xg_get_file_with_selection)
1399 (xg_get_file_name, xg_have_tear_offs, create_menus, xg_create_widget)
1400 (xg_item_label_same_p, xg_update_menubar)
1401 (xg_modify_menubar_widgets, xg_event_is_for_menubar)
1402 (xg_ignore_gtk_scrollbar, xg_set_toolkit_scroll_bar_thumb)
1403 (xg_event_is_for_scrollbar, xg_pack_tool_bar, xg_make_tool_item)
1404 (is_box_type, xg_tool_item_stale_p, xg_update_tool_bar_sizes)
1405 (update_frame_tool_bar, free_frame_tool_bar):
1406 * gtkutil.c, w32term.c, xterm.c (x_wm_set_size_hint):
1407 * nsmenu.m (ns_update_menubar):
1408 * nsmenu.m, w32menu.c, xmenu.c (set_frame_menubar):
1409 * xfns.c (Fx_show_tip) [USE_GTK]:
1410 Use bool for boolean.
1411 * gtkutil.c (xg_update_frame_menubar):
1412 * xmenu.c (update_frame_menubar):
1413 Return void, not int, since caller ignores return value.
1414 * gtkutil.c (xg_change_toolbar_position):
1415 Return void, not 1.
1416
1417 2012-09-23 Juanma Barranquero <lekktu@gmail.com>
1418
1419 * makefile.w32-in (BLOCKINPUT_H): Remove.
1420 (SYSSIGNAL_H): New macro.
1421 ($(BLD)/alloc.$(O), $(BLD)/atimer.$(O), $(BLD)/buffer.$(O))
1422 ($(BLD)/callproc.$(O), $(BLD)/data.$(O), $(BLD)/dired.$(O))
1423 ($(BLD)/dispnew.$(O), $(BLD)/editfns.$(O), $(BLD)/emacs.$(O))
1424 ($(BLD)/eval.$(O), $(BLD)/fileio.$(O), $(BLD)/floatfns.$(O))
1425 ($(BLD)/fns.$(O), $(BLD)/fontset.$(O), $(BLD)/frame.$(O))
1426 ($(BLD)/fringe.$(O), $(BLD)/image.$(O), $(BLD)/insdel.$(O))
1427 ($(BLD)/keyboard.$(O), $(BLD)/keymap.$(O), $(BLD)/lread.$(O))
1428 ($(BLD)/menu.$(O), $(BLD)/w32inevt.$(O), $(BLD)/w32proc.$(O))
1429 ($(BLD)/print.$(O), $(BLD)/process.$(O), $(BLD)/ralloc.$(O))
1430 ($(BLD)/search.$(O), $(BLD)/sound.$(O), $(BLD)/sysdep.$(O))
1431 ($(BLD)/term.$(O), $(BLD)/window.$(O), $(BLD)/xdisp.$(O))
1432 ($(BLD)/xfaces.$(O), $(BLD)/w32fns.$(O), $(BLD)/w32menu.$(O))
1433 ($(BLD)/w32term.$(O), $(BLD)/w32select.$(O), $(BLD)/w32reg.$(O))
1434 ($(BLD)/w32xfns.$(O)): Update dependencies.
1435
1436 2012-09-23 Eli Zaretskii <eliz@gnu.org>
1437
1438 * .gdbinit: Set breakpoint on terminate_due_to_signal, not on
1439 fatal_error_backtrace.
1440
1441 * w32proc.c (sys_kill): Undo last change: don't do anything when
1442 invoked to deliver SIGABRT to our own process. This is now
1443 handled by emacs_raise.
1444
1445 2012-09-23 Juanma Barranquero <lekktu@gmail.com>
1446
1447 * w32term.c (w32_read_socket): Remove leftover reference to
1448 interrupt_input_pending.
1449
1450 2012-09-23 Paul Eggert <eggert@cs.ucla.edu>
1451
1452 Do not use SA_NODEFER.
1453 Problem reported by Dani Moncayo in
1454 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00557.html>.
1455 * alloc.c (die):
1456 * sysdep.c (emacs_abort): Do not reset signal handler.
1457 * emacs.c (terminate_due_to_signal): Reset signal handler here.
1458 * sysdep.c (init_signals): Do not use SA_NODEFER. It wasn't
1459 wanted even on POSIXish hosts, and it doesn't work on Windows.
1460
1461 2012-09-23 Jan Djärv <jan.h.d@swipnet.se>
1462
1463 * xterm.c (x_term_init): Call fixup_locale before and after calling
1464 gtk_init (Bug#12392).
1465
1466 2012-09-23 Chong Yidong <cyd@gnu.org>
1467
1468 * w32.c (w32_delayed_load): Remove LIBRARIES argument; always use
1469 Vdynamic_library_alist.
1470
1471 * gnutls.c (init_gnutls_functions): Caller changed; remove arg.
1472 (Fgnutls_available_p): Caller changed.
1473
1474 * xml.c (init_libxml2_functions, Flibxml_parse_html_region)
1475 (Flibxml_parse_xml_region): Likewise.
1476
1477 * dispextern.h (struct image_type): Remove arg from init function.
1478
1479 * image.c (Finit_image_library, lookup_image_type)
1480 (define_image_type): Remove now-unneeded second arg.
1481 (init_xpm_functions, init_png_functions, init_jpeg_functions)
1482 (init_tiff_functions, init_gif_functions, init_svg_functions):
1483 Arglist and w32_delayed_load calling convention changed.
1484 (gs_type): Remove init_gs_functions; there is no such function.
1485 (valid_image_p, make_image): Fix caller to lookup_image_type.
1486
1487 2012-09-23 Paul Eggert <eggert@cs.ucla.edu>
1488
1489 Simplify and avoid signal-handling races (Bug#12471).
1490 * alloc.c (die):
1491 * sysdep.c (emacs_abort) [HAVE_NTGUI]:
1492 Avoid recursive loop if there's a fatal error in the function itself.
1493 * atimer.c (pending_atimers):
1494 * blockinput.h: Don't include "atimer.h"; no longer needed.
1495 (interrupt_input_pending): Remove. All uses removed.
1496 pending_signals now counts both atimers and ordinary interrupts.
1497 This is less racy than having three separate pending-signal flags.
1498 (block_input, unblock_input, totally_unblock_input, unblock_input_to)
1499 (input_blocked_p):
1500 Rename from their upper-case counterparts BLOCK_INPUT,
1501 UNBLOCK_INPUT, TOTALLY_UNBLOCK_INPUT, UNBLOCK_INPUT_TO,
1502 INPUT_BLOCKED_P, and turn into functions. All uses changed.
1503 This makes it easier to access volatile variables more accurately.
1504 (BLOCK_INPUT_RESIGNAL): Remove. All uses replaced by unblock_input ().
1505 (input_blocked_p): Prefer this to 'interrupt_input_blocked', as
1506 that's more reliable if the code is buggy and sets
1507 interrupt_input_blocked to a negative value. All uses changed.
1508 * atimer.c (deliver_alarm_signal):
1509 Remove. No need to deliver this to the parent; any thread can
1510 handle this signal now. All uses replaced by underlying handler.
1511 * atimer.c (turn_on_atimers):
1512 * dispnew.c (handle_window_change_signal):
1513 * emacs.c (handle_danger_signal):
1514 * keyboard.c (kbd_buffer_get_event):
1515 Don't reestablish signal handler; not needed with sigaction.
1516 * blockinput.h (UNBLOCK_INPUT_TO, TOTALLY_UNBLOCK_INPUT)
1517 (UNBLOCK_INPUT_TO):
1518 Rework to avoid unnecessary accesses to volatile variables.
1519 (UNBLOCK_INPUT_TO): Now a function.
1520 (totally_unblock_input, unblock_input): New decls.
1521 * data.c (handle_arith_signal, deliver_arith_signal): Move to sysdep.c
1522 (init_data): Remove. Necessary stuff now done in init_signal.
1523 * emacs.c, xdisp.c: Include "atimer.h", since we invoke atimer functions.
1524 * emacs.c (handle_fatal_signal, deliver_fatal_signal): Move to sysdep.c.
1525 (fatal_error_code): Remove; no longer needed.
1526 (terminate_due_to_signal): Rename from fatal_error_backtrace, since
1527 it doesn't always backtrace. All uses changed. No need to reset
1528 signal to default, since sigaction and/or die does that for us now.
1529 Use emacs_raise (FOO), not kill (getpid (), FOO).
1530 (main): Check more-accurately whether we're dumping.
1531 Move fatal-error setup to sysdep.c
1532 * floatfns.c: Do not include "syssignal.h"; no longer needed.
1533 * gtkutil.c (xg_get_file_name, xg_get_font):
1534 Remove no-longer-needed signal-mask manipulation.
1535 * keyboard.c, process.c (POLL_FOR_INPUT):
1536 Don't depend on USE_ASYNC_EVENTS, a symbol that is never defined.
1537 * keyboard.c (read_avail_input): Remove.
1538 All uses replaced by gobble_input.
1539 (Ftop_level): Use TOTALLY_UNBLOCK_INPUT rather than open code.
1540 (kbd_buffer_store_event_hold, gobble_input):
1541 (record_asynch_buffer_change) [USABLE_SIGIO]:
1542 (store_user_signal_events):
1543 No need to mess with signal mask.
1544 (gobble_input): If blocking input and there are terminals, simply
1545 set pending_signals to 1 and return. All hooks changed to not
1546 worry about whether input is blocked.
1547 (process_pending_signals): Clear pending_signals before processing
1548 them, in case a signal comes in while we're processing.
1549 By convention callers now test pending_signals before calling us.
1550 (UNBLOCK_INPUT_TO, unblock_input, totally_unblock_input):
1551 New functions, to support changes to blockinput.h.
1552 (handle_input_available_signal): Now extern.
1553 (reinvoke_input_signal): Remove. All uses replaced by
1554 handle_async_input.
1555 (quit_count): Now volatile, since a signal handler uses it.
1556 (handle_interrupt): Now takes bool IN_SIGNAL_HANDLER as arg.
1557 All callers changed. Block SIGINT only if not already blocked.
1558 Clear sigmask reliably, even if Fsignal returns, which it can.
1559 Omit unnecessary accesses to volatile var.
1560 (quit_throw_to_read_char): No need to restore sigmask.
1561 * keyboard.c (gobble_input, handle_user_signal):
1562 * process.c (wait_reading_process_output):
1563 Call signal-handling code rather than killing ourselves.
1564 * lisp.h: Include <float.h>, for...
1565 (IEEE_FLOATING_POINT): New macro, moved here to avoid duplication.
1566 (pending_signals): Now volatile.
1567 (syms_of_data): Now const if IEEE floating point.
1568 (handle_input_available_signal) [USABLE_SIGIO]:
1569 (terminate_due_to_signal, record_child_status_change): New decls.
1570 * process.c (create_process): Avoid disaster if memory is exhausted
1571 while we're processing a vfork, by tightening the critical section
1572 around the vfork.
1573 (send_process_frame, process_sent_to, handle_pipe_signal)
1574 (deliver_pipe_signal): Remove. No longer needed, as Emacs now
1575 ignores SIGPIPE.
1576 (send_process): No need for setjmp/longjmp any more, since the
1577 SIGPIPE stuff is now gone. Instead, report an error if errno
1578 is EPIPE.
1579 (record_child_status_change): Now extern. PID and W are now args.
1580 Return void, not bool. All callers changed.
1581 * sysdep.c (wait_debugging) [(BSD_SYSTEM || HPUX) && !defined (__GNU__)]:
1582 Remove. All uses removed. This bug should be fixed now in a
1583 different way.
1584 (wait_for_termination_1): Use waitpid rather than sigsuspend,
1585 and record the child status change directly. This avoids the
1586 need to futz with the signal mask.
1587 (process_fatal_action): Move here from emacs.c.
1588 (emacs_sigaction_flags): New function, containing
1589 much of what used to be in emacs_sigaction_init.
1590 (emacs_sigaction_init): Use it. Block nonfatal system signals that are
1591 caught by emacs, to make races less likely.
1592 (deliver_process_signal): Rename from handle_on_main_thread.
1593 All uses changed.
1594 (BACKTRACE_LIMIT_MAX): Now at top level.
1595 (thread_backtrace_buffer, threadback_backtrace_pointers):
1596 New static vars.
1597 (deliver_thread_signal, deliver_fatal_thread_signal):
1598 New functions, for more-accurate delivery of thread-specific signals.
1599 (handle_fatal_signal, deliver_fatal_signal): Move here from emacs.c.
1600 (deliver_arith_signal): Handle in this thread, not
1601 in the main thread, since it's triggered by this thread.
1602 (maybe_fatal_sig): New function.
1603 (init_signals): New arg DUMPING so that we can be more accurate
1604 about whether we're dumping. Caller changed.
1605 Treat thread-specific signals differently from process-general signals.
1606 Block all signals while handling fatal error; that's safer.
1607 xsignal from SIGFPE only on non-IEEE hosts, treating it as fatal
1608 on IEEE hosts.
1609 When batch, ignore SIGHUP, SIGINT, SIGTERM if they were already ignored.
1610 Ignore SIGPIPE unless batch.
1611 (emacs_backtrace): Output backtrace for the appropriate thread,
1612 which is not necessarily the main thread.
1613 * syssignal.h: Include <stdbool.h>.
1614 (emacs_raise): New macro.
1615 * xterm.c (x_connection_signal): Remove; no longer needed
1616 now that we use sigaction.
1617 (x_connection_closed): No need to mess with sigmask now.
1618 (x_initialize): No need to reset SIGPIPE handler here, since
1619 init_signals does this for us now.
1620
1621 2012-09-23 Jan Djärv <jan.h.d@swipnet.se>
1622
1623 * nsterm.m (ns_dumpglyphs_image): dr is a new rect to draw image into,
1624 background rect may be larger (Bug#12245).
1625
1626 2012-09-23 Chong Yidong <cyd@gnu.org>
1627
1628 * keyboard.c (timer_check): Avoid quitting during Fcopy_sequence.
1629
1630 2012-09-22 Paul Eggert <eggert@cs.ucla.edu>
1631
1632 * .gdbinit: Just stop at fatal_error_backtrace.
1633 See Stefan Monnier's request in
1634 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00549.html>.
1635 Remove no-longer-used query of system type.
1636
1637 2012-09-22 Chong Yidong <cyd@gnu.org>
1638
1639 * search.c (Freplace_match): Doc fix (Bug#12325).
1640
1641 * minibuf.c (Finternal_complete_buffer): Doc fix (Bug#12391).
1642
1643 * editfns.c (Fline_beginning_position): Doc fix (Bug#12416).
1644 (Fline_end_position): Doc fix.
1645
1646 * cmds.c (Fforward_char, Fbackward_char): Doc fix (Bug#12414).
1647
1648 2012-09-22 Chong Yidong <cyd@gnu.org>
1649
1650 * dispextern.h (struct image_type): Add new slot, storing a type
1651 initialization function.
1652
1653 * image.c (define_image_type): Call the image initializer function
1654 if it is defined. Arguments and return value changed.
1655 (valid_image_p, make_image): Callers changed.
1656 (xbm_type, xpm_type, pbm_type, png_type, jpeg_type, tiff_type)
1657 (gif_type, imagemagick_type, svg_type, gs_type):
1658 Add initialization functions.
1659 (Finit_image_library): Call lookup_image_type.
1660 (CHECK_LIB_AVAILABLE): Macro deleted.
1661 (lookup_image_type): Call define_image_type here, rather than via
1662 Finit_image_library, and without using CHECK_LIB_AVAILABLE.
1663 (syms_of_image): Move define_image_type calls for xbm_type and
1664 pbm_type to lookup_image_type.
1665
1666 2012-09-22 Eli Zaretskii <eliz@gnu.org>
1667
1668 * keyboard.c (timer_check_2): Move calculation of 'timers' and
1669 'idle_timers' from here ...
1670 (timer_check): ... to here. Use Fcopy_sequence to copy the timer
1671 lists, to avoid infloops when the timer does something stupid,
1672 like reinvoke itself with the same or smaller time-out.
1673 (Bug#12447)
1674
1675 2012-09-22 Martin Rudalics <rudalics@gmx.at>
1676
1677 * window.c (Fsplit_window_internal): Handle only Qt value of
1678 Vwindow_combination_limit separately.
1679 (Qtemp_buffer_resize): New symbol.
1680 (Vwindow_combination_limit): New default value.
1681 Rewrite doc-string.
1682
1683 2012-09-22 Eli Zaretskii <eliz@gnu.org>
1684
1685 * xdisp.c (next_overlay_string): Initialize it->end_charpos for
1686 the new overlay string. (Bug#10159)
1687
1688 2012-09-22 Paul Eggert <eggert@cs.ucla.edu>
1689
1690 * emacs.c (shut_down_emacs): Don't assume stderr is buffered,
1691 or that fprintf is async-signal-safe. POSIX doesn't require
1692 either assumption.
1693
1694 2012-09-22 Chong Yidong <cyd@gnu.org>
1695
1696 * buffer.c (Fset_buffer_modified_p): Handle indirect buffers
1697 (Bug#8207).
1698
1699 2012-09-22 Kenichi Handa <handa@gnu.org>
1700
1701 * composite.c (composition_reseat_it): Handle the case that a
1702 grapheme cluster is not covered by a single font (Bug#12352).
1703
1704 2012-09-21 Chong Yidong <cyd@gnu.org>
1705
1706 * image.c (define_image_type): Avoid adding duplicate types to
1707 image_types (Bug#12463). Suggested by Jörg Walter.
1708
1709 2012-09-21 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
1710
1711 * unexmacosx.c: Define LC_DATA_IN_CODE if not defined.
1712 (print_load_command_name): Add case LC_DATA_IN_CODE.
1713 (dump_it) [LC_DATA_IN_CODE]: Call copy_linkedit_data.
1714
1715 2012-09-21 Glenn Morris <rgm@gnu.org>
1716
1717 * eval.c (Frun_hook_with_args_until_success)
1718 (Frun_hook_with_args_until_failure): Doc fixes. (Bug#12393)
1719
1720 2012-09-21 Andreas Schwab <schwab@linux-m68k.org>
1721
1722 * fileio.c (Ffile_selinux_context): Only call freecon when
1723 lgetfilecon succeeded.
1724 (Fset_file_selinux_context): Likewise. (Bug#12444)
1725
1726 2012-09-21 Eli Zaretskii <eliz@gnu.org>
1727
1728 * xdisp.c (try_window_reusing_current_matrix): Under bidi
1729 reordering, locate the cursor by calling set_cursor_from_row; if
1730 that fails, clear the desired glyph matrix before returning a
1731 failure indication to the caller. Fixes leaving garbled display
1732 when fast scrolling with a down-key. (Bug#12403)
1733 (compute_stop_pos_backwards): Fix a typo that caused crashes while
1734 scrolling through multibyte text.
1735
1736 2012-09-20 Stefan Monnier <monnier@iro.umontreal.ca>
1737
1738 * alloc.c (mark_object) <PVEC_WINDOW>: Mark prev/next_buffers *after*
1739 calling mark_vectorlike since that's the one that marks the window.
1740 (mark_discard_killed_buffers): Mark the final cdr.
1741 * window.h (struct window): Move prev/next_buffers to the
1742 non-standard fields.
1743 * window.c (make_window): Initialize prev/next_buffers manually.
1744
1745 2012-09-20 Paul Eggert <eggert@cs.ucla.edu>
1746
1747 Omit unused arg EXPECTED from socket hooks.
1748 * keyboard.c (gobble_input, read_avail_input, tty_read_avail_input):
1749 * nsterm.m (ns_term_init):
1750 * termhooks.h (struct terminal.read_socket_hook):
1751 * w32inevt.c (w32_console_read_socket):
1752 * w32term.c (w32_read_socket):
1753 * xterm.c (XTread_socket):
1754 Omit unused arg EXPECTED. All callers changed.
1755 (store_user_signal_events): Return void, not int, since callers no
1756 longer care about the return value. All uses changed.
1757
1758 2012-09-20 Juanma Barranquero <lekktu@gmail.com>
1759
1760 * w32gui.h (XParseGeometry): Do not declare.
1761
1762 2012-09-19 Paul Eggert <eggert@cs.ucla.edu>
1763
1764 * w32inevt.c (w32_console_read_socket): Return -1 on failure, not 0.
1765 Ignore 'expected'. See Eli Zaretskii in
1766 <http://bugs.gnu.org/12471#8> (last line).
1767
1768 * frame.c (read_integer): Remove. All uses replaced by strtol/strtoul.
1769 (XParseGeometry): Now static. Substitute extremal values for
1770 values that are out of range.
1771
1772 2012-09-19 Jan Djärv <jan.h.d@swipnet.se>
1773
1774 * w32xfns.c (read_integer, XParseGeometry): Move to frame.c.
1775
1776 * nsfns.m (XParseGeometry): Remove.
1777 (Fx_create_frame): Call x_set_offset to correctly interpret
1778 top_pos in geometry.
1779
1780 * frame.c (read_integer, XParseGeometry): Move from w32xfns.c.
1781 (Fx_parse_geometry): If there is a space in string, call
1782 Qns_parse_geometry, otherwise do as on other terms (Bug#12368).
1783
1784 2012-09-17 Eli Zaretskii <eliz@gnu.org>
1785
1786 * search.c (scan_buffer): Use character positions in calls to
1787 region_cache_forward and region_cache_backward, not byte
1788 positions. (Bug#12196)
1789
1790 * w32term.c (w32_read_socket): Set pending_signals to 1, like
1791 xterm.c does. Reported by Daniel Colascione <dancol@dancol.org>.
1792
1793 * ralloc.c (r_alloc_init) [!SYSTEM_MALLOC]: Initialize
1794 __malloc_extra_blocks to 32 instead of 64, like alloc.c did in
1795 emacs_blocked_malloc, now deleted.
1796
1797 2012-09-17 Paul Eggert <eggert@cs.ucla.edu>
1798
1799 Remove no-longer-needed Solaris 2.4 vfork bug workaround.
1800 The workaround was for improving performance on Solaris 2.4, but
1801 is getting in the way now. Emacs will still work if someone is
1802 still running Solaris 2.4 in a museum somewhere; Sun dropped
1803 support for Solaris 2.4 in 2003.
1804 * callproc.c (Fcall_process) [HAVE_WORKING_VFORK]:
1805 * process.c (create_process) [HAVE_WORKING_VFORK]:
1806 Omit now-unnecessary workaround for the Solaris 2.4 vfork bug,
1807 since Emacs no longer uses vfork on that platform.
1808
1809 2012-09-17 Glenn Morris <rgm@gnu.org>
1810
1811 * emacs.c: Use COPYRIGHT.
1812
1813 2012-09-16 Paul Eggert <eggert@cs.ucla.edu>
1814
1815 Remove configure's --without-sync-input option (Bug#12450).
1816 When auditing signal-handling in preparation for cleaning it up,
1817 I found that SYNC_INPUT has race conditions and would be a real
1818 pain to fix. Since it's an undocumented and deprecated
1819 configure-time option, now seems like a good time to remove it.
1820 Also see <http://bugs.gnu.org/11080#16>.
1821 * alloc.c (_bytes_used, __malloc_extra_blocks, _malloc_internal)
1822 (_free_internal) [!DOUG_LEA_MALLOC]: Remove decls.
1823 (alloc_mutex) [!SYSTEM_MALLOC && !SYNC_INPUT && HAVE_PTHREAD]:
1824 (malloc_hysteresis):
1825 (check_depth) [XMALLOC_OVERRUN_CHECK]:
1826 (MALLOC_BLOCK_INPUT, MALLOC_UNBLOCK_INPUT):
1827 (__malloc_hook, __realloc_hook, __free_hook, BYTES_USED)
1828 (dont_register_blocks, bytes_used_when_reconsidered)
1829 (bytes_used_when_full, emacs_blocked_free, emacs_blocked_malloc)
1830 (emacs_blocked_realloc, reset_malloc_hooks, uninterrupt_malloc):
1831 [!SYSTEM_MALLOC && !SYNC_INPUT]:
1832 Remove. All uses removed.
1833 (MALLOC_BLOCK_INPUT, MALLOC_UNBLOCK_INPUT): Use a different
1834 implementation, one that depends on whether the new macro
1835 XMALLOC_BLOCK_INPUT_CHECK is defined, not on whether SYNC_INPUT
1836 is defined.
1837 * atimer.c (run_timers, handle_alarm_signal):
1838 * keyboard.c (pending_signal, poll_for_input_1, poll_for_input)
1839 (handle_async_input, process_pending_signals)
1840 (handle_input_available_signal, init_keyboard):
1841 * nsterm.m (ns_read_socket):
1842 * process.c (wait_reading_process_output):
1843 * regex.c (immediate_quit, IMMEDIATE_QUIT_CHECK):
1844 * sysdep.c (emacs_sigaction_init) [SA_RESTART]:
1845 (emacs_write):
1846 * xterm.c (XTread_socket):
1847 Assume SYNC_INPUT.
1848 * conf_post.h (SA_RESTART) [IRIX6_5]: Do not #undef.
1849 * eval.c (handling_signal): Remove. All uses removed.
1850 * lisp.h (ELSE_PENDING_SIGNALS): Remove.
1851 All uses replaced with the SYNC_INPUT version.
1852 (reset_malloc_hooks, uninterrupt_malloc, handling_signal):
1853 Remove decls.
1854 * sysdep.c, syssignal.h (main_thread) [FORWARD_SIGNAL_TO_MAIN_THREAD]:
1855 Now static.
1856
1857 * font.c (Ffont_shape_gstring): Remove unused local.
1858
1859 2012-09-16 Glenn Morris <rgm@gnu.org>
1860
1861 * Makefile.in (clean): No longer run nextstep's clean.
1862
1863 * Makefile.in (ns_appdir, ns_appbindir, ns_appsrc): Remove variables.
1864 (ns_frag): Remove.
1865 (ns-app): Move here from ns.mk, and simplify.
1866 (clean): Simplify nextstep entry.
1867 * ns.mk: Remove file.
1868
1869 2012-09-17 Kenichi Handa <handa@gnu.org>
1870
1871 * font.c (Ffont_shape_gstring): Fix previous change; GLYPHs may
1872 not covert the last few charactes.
1873
1874 2012-09-16 Kenichi Handa <handa@gnu.org>
1875
1876 * font.c (Ffont_shape_gstring): Don't adjust grapheme cluster
1877 here, but just check the validity of glyphs in the glyph-string.
1878
1879 2012-09-16 Martin Rudalics <rudalics@gmx.at>
1880
1881 * window.c (Fwindow_parameter, Fset_window_parameter):
1882 Accept any window as argument (Bug#12452).
1883
1884 2012-09-16 Jan Djärv <jan.h.d@swipnet.se>
1885
1886 * nsfns.m (Fx_open_connection): Move initialization of ns_*_types
1887 to ns_term_init to avoid memory leak.
1888
1889 * nsterm.m (ns_update_begin): Initialize bp after lcokFocus, use
1890 explicit retain/release.
1891 (ns_term_init): Only allow one display. Initialize outerpool and
1892 ns_*_types.
1893
1894 2012-09-15 Paul Eggert <eggert@cs.ucla.edu>
1895
1896 Port _setjmp fix to POSIXish hosts as well as Microsoft.
1897 * image.c (_setjmp) [!HAVE__SETJMP]: Restore definition, as
1898 it's needed on POSIXish hosts that lack _setjmp. Attempt to solve
1899 the Microsoft problem in a different way, by altering ../nt/config.nt.
1900
1901 2012-09-15 Eli Zaretskii <eliz@gnu.org>
1902
1903 * w32xfns.c:
1904 * w32uniscribe.c:
1905 * w32term.c:
1906 * w32select.c:
1907 * w32reg.c:
1908 * w32proc.c:
1909 * w32menu.c:
1910 * w32inevt.c:
1911 * w32heap.c:
1912 * w32font.c:
1913 * w32fns.c:
1914 * w32console.c:
1915 * w32.c:
1916 * w16select.c: Remove inclusion of setjmp.h, as it is now included
1917 by lisp.h. This completes removal of setjmp.h inclusion
1918 erroneously announced in the previous commit. (Bug#12446)
1919
1920 * lisp.h [!HAVE__SETJMP, !HAVE_SIGSETJMP]: Make the commentary
1921 more accurate.
1922
1923 * image.c (_setjmp) [!HAVE__SETJMP]: Define only if 'setjmp' is
1924 not defined as a macro. The latter happens on MS-Windows.
1925 (Bug#12446)
1926
1927 2012-09-15 Paul Eggert <eggert@cs.ucla.edu>
1928
1929 Port better to POSIX hosts lacking _setjmp (Bug#12446).
1930 * lisp.h: Include <setjmp.h> here, since we use its symbols here.
1931 Some instances of '#include <setjmp.h>' removed, if the
1932 only reason for the instance was because "lisp.h" was included.
1933 (sys_jmp_buf, sys_setjmp, sys_longjmp): New symbols.
1934 Unless otherwise specified, replace all uses of jmp_buf, _setjmp,
1935 and _longjmp with the new symbols. Emacs already uses _setjmp if
1936 available, so this change affects only POSIXish hosts that have
1937 sigsetjmp but not _setjmp, such as some versions of Solaris and
1938 Unixware. (Also, POSIX-2008 marks _setjmp as obsolescent.)
1939 * image.c (_setjmp, _longjmp) [HAVE_PNG && !HAVE__SETJMP]: New macros.
1940 (png_load_body) [HAVE_PNG]:
1941 (PNG_LONGJMP) [HAVE_PNG && PNG_LIBPNG_VER < 10500]:
1942 (PNG_JMPBUF) [HAVE_PNG && PNG_LIBPNG_VER >= 10500]:
1943 Use _setjmp and _longjmp rather than sys_setjmp and sys_longjmp,
1944 since PNG requires jmp_buf. This is the only exception to the
1945 general rule that we now use sys_setjmp and sys_longjmp.
1946 This exception is OK since this code does not change the signal
1947 mask or longjmp out of a signal handler.
1948
1949 2012-09-14 Paul Eggert <eggert@cs.ucla.edu>
1950
1951 * alloc.c [!SYSTEM_MALLOC && !SYNC_INPUT && HAVE_PTHREAD]:
1952 Include "syssignal.h", for 'main_thread'.
1953
1954 2012-09-14 Dmitry Antipov <dmantipov@yandex.ru>
1955
1956 Avoid out-of-range marker position (Bug#12426).
1957 * insdel.c (replace_range, replace_range_2):
1958 Adjust markers before overlays, as suggested by comments.
1959 (insert_1_both, insert_from_buffer_1, adjust_after_replace):
1960 Remove redundant check before calling offset_intervals.
1961
1962 2012-09-14 Martin Rudalics <rudalics@gmx.at>
1963
1964 * xdisp.c (Fformat_mode_line): Unconditionally save/restore
1965 current buffer (Bug#12387).
1966
1967 2012-09-14 Juanma Barranquero <lekktu@gmail.com>
1968
1969 * makefile.w32-in ($(BLD)/alloc.$(O)): Update dependencies.
1970
1971 2012-09-13 Paul Eggert <eggert@cs.ucla.edu>
1972
1973 Use a more backwards-compatible timer format (Bug#12430).
1974 * keyboard.c (decode_timer): Get PSECS from the 8th (origin-0)
1975 vector element, not from the 4th, since PSECS is now at the end.
1976 (Fcurrent_idle_time): Doc fix.
1977
1978 2012-09-13 Dmitry Antipov <dmantipov@yandex.ru>
1979
1980 Function to mark objects and remove killed buffers at once.
1981 * alloc.c (discard_killed_buffers): Rename to ...
1982 (mark_discard_killed buffers) ... new name. Add marking
1983 of remaining objects. Fix comment. Adjust users.
1984 (mark_object): Do not touch frame buffer lists here.
1985 * frame.c (delete_frame): Reset frame buffer lists here.
1986
1987 2012-09-13 Paul Eggert <eggert@cs.ucla.edu>
1988
1989 Better workaround for GNOME bug when --enable-gcc-warnings.
1990 * emacsgtkfixed.c (G_STATIC_ASSERT): Remove, undoing last change.
1991 Instead, disable -Wunused-local-typedefs. See Dmitry Antipov in
1992 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00335.html>.
1993
1994 Simplify SIGIO usage (Bug#12408).
1995 The code that dealt with SIGIO was crufty and confusing, e.g., it
1996 played tricks like "#undef SIGIO" but these tricks were not used
1997 consistently. Simplify mostly by not #undeffing standard symbols,
1998 e.g., use "defined USABLE_SIGIO" (our symbol, which we can define
1999 or not as we please) rather than "defined SIGIO" (standard symbol
2000 that we probably shouldn't #undef).
2001 * conf_post.h [USG5_4]: Do not include <sys/wait.h> here.
2002 Modules that need it can include it.
2003 [USG5_4 && emacs]: Likewise, do not include the streams stuff here.
2004 * dispextern.h (ignore_sigio): New decl.
2005 * emacs.c (shut_down_emacs): Invoke unrequest_sigio
2006 unconditionally, since it's now a no-op if !USABLE_SIGIO.
2007 * emacs.c (shut_down_emacs):
2008 * keyboard.c (kbd_buffer_store_event_hold):
2009 Use ignore_sigio rather than invoking 'signal' directly.
2010 * keyboard.c (USABLE_FIONREAD && USG5_4): Include <sys/filio.h>,
2011 for FIONREAD.
2012 (FIONREAD, SIGIO): Do not #undef.
2013 (tty_read_avail_input): Use #error rather than a syntax error.
2014 * process.c [USG5_4]: Include <sys/stream.h> and <sys/stropts.h>,
2015 for I_PIPE, used by SETUP_SLAVE_PTY.
2016 (DATAGRAM_SOCKETS): Simplify defn, based on USABLE_FIONREAD.
2017 * sysdep.c (croak): Remove; no longer needed. This bit of
2018 temporary code, with Fred N. Fish's comment that it's temporary,
2019 has been in Emacs since at least 1992!
2020 (init_sigio, reset_sigio, request_sigio, unrequest_sigio):
2021 Arrange for them to be no-ops in all cases when ! USABLE_SIGIO.
2022 * syssignal.h (croak): Remove decl.
2023 (SIGIO, SIGPOO, SIGAIO, SIGPTY): Do not #undef; that's too fragile.
2024 * systty.h [!NO_TERMIO]: Do not include <termio.h>; no longer needed
2025 now that we're termios-only.
2026 (FIONREAD, ASYNC) [BROKEN_FIONREAD]: Do not #undef.
2027 * term.c (dissociate_if_controlling_tty): Use #error rather than
2028 a run-time error.
2029
2030 Work around GCC and GNOME bugs when --enable-gcc-warnings.
2031 * emacsgtkfixed.c (G_STATIC_ASSERT): Redefine to use 'verify',
2032 to work around GNOME bug 683906.
2033 * image.c (jpeg_load_body) [HAVE_JPEG && lint]: Pacify gcc -Wclobber.
2034 (struct my_jpeg_error_mgr) [HAVE_JPEG && lint]: New member fp.
2035 This works around GCC bug 54561.
2036
2037 2012-09-12 Paul Eggert <eggert@cs.ucla.edu>
2038
2039 More fixes for 'volatile' and setjmp/longjmp.
2040 * eval.c (Fdefvar, Fcondition_case): Remove unnecessary 'volatile's.
2041 * image.c (struct png_load_context) [HAVE_PNG]: New type.
2042 (png_load_body) [HAVE_PNG]:
2043 (jpeg_load_body) [HAVE_JPEG]:
2044 New function, with most of the old parent function's body.
2045 (png_load) [HAVE_PNG]:
2046 (jpeg_load) [HAVE_JPEG]:
2047 Invoke the new function, to avoid longjmp munging our locals.
2048 (struct my_jpeg_error_mgr) [HAVE_JPEG]: New members cinfo, failure_code.
2049 (my_error_exit) [HAVE_JPEG]: Don't trust 'setjmp' to return 2 when
2050 longjmp is passed 2, as the C standard doesn't guarantee this.
2051 Instead, store the failure code into mgr->failure_code.
2052
2053 2012-09-12 Stefan Monnier <monnier@iro.umontreal.ca>
2054
2055 * keyboard.c (read_char, requeued_events_pending_p, Finput_pending_p)
2056 (Fdiscard_input, quit_throw_to_read_char, init_keyboard)
2057 (syms_of_keyboard): Remove support for unread-command-char.
2058
2059 2012-09-12 Eli Zaretskii <eliz@gnu.org>
2060
2061 * w32proc.c (sys_kill): If PID is our process ID and the signal is
2062 SIGABRT, call emacs_abort. Avoids silently exiting upon assertion
2063 violation. (Bug#12426)
2064
2065 2012-09-12 Paul Eggert <eggert@cs.ucla.edu>
2066
2067 * image.c (jpeg_memory_src): Don't assume string len fits in unsigned.
2068
2069 2012-09-12 Stefan Monnier <monnier@iro.umontreal.ca>
2070
2071 * eval.c: Add `inhibit-debugger'.
2072 (Qinhibit_debugger): New symbol.
2073 (call_debugger): Bind it instead of Qdebug_on_error.
2074 (maybe_call_debugger): Test Vinhibit_debugger.
2075 (syms_of_eval): Define inhibit-debugger.
2076 * xdisp.c (set_message): Don't bind Qinhibit_debug_on_message.
2077 (syms_of_xdisp): Remove inhibit-debug-on-message.
2078
2079 2012-09-11 Paul Eggert <eggert@cs.ucla.edu>
2080
2081 Avoid _setjmp/_longjmp problems with local nonvolatile variables.
2082 If a nonvolatile local variable is written before a _longjmp to
2083 the frame containing the variable, and is read after the _longjmp,
2084 the value read is indeterminate. Some local variables of type
2085 'struct handler' and 'struct catchtag' are used in this way, so
2086 mark each of their slots as volatile if the slot can be set before
2087 _longjmp and read afterwards.
2088 * lisp.h (struct handler): var and chosen_clause are now volatile.
2089 (struct catchtag): val, next, and pdlcount are now volatile.
2090
2091 * bidi.c (bidi_push_it, bidi_pop_it):
2092 * fns.c (copy_hash_table):
2093 * image.c (define_image_type):
2094 * keyboard.c (kbd_buffer_store_event_hold):
2095 * process.c (Fprocess_send_eof):
2096 * xfaces.c (x_create_gc) [HAVE_NS]:
2097 * xgselect.c (xg_select):
2098 Prefer assignment to memcpy when either will do.
2099
2100 * alloc.c (discard_killed_buffers): Tune and simplify a bit.
2101 Use pointer-to-a-pointer to simplify and avoid a NILP check each
2102 time an item is removed. No need to mark this function 'inline';
2103 the compiler knows better than we do.
2104
2105 2012-09-11 Jan Djärv <jan.h.d@swipnet.se>
2106
2107 * nsterm.m (ns_judge_scroll_bars): Pass NO to updateFrameSize.
2108 (updateFrameSize:): Add delay parameter to updateFrameSize, send it
2109 to change_frame_size (Bug#12388).
2110 (windowDidResize:): Pass YES to updateFrameSize.
2111
2112 * nsterm.h: Add delay parameter to updateFrameSize.
2113
2114 2012-09-11 Dmitry Antipov <dmantipov@yandex.ru>
2115
2116 Discard killed buffers from deleted window and frame objects.
2117 This reduces an amount of references to killed buffers and
2118 helps GC to reclaim them faster.
2119 * alloc.c (discard_killed_buffers): New function.
2120 (mark_object): Use it for deleted windows and frames.
2121 (mark_object): If symbol's value is set up for a killed buffer
2122 or deleted frame, restore its global binding.
2123 * data.c (swap_in_global_binding): Add GC notice.
2124 (swap_in_symval_forwarding): Use convenient set_blv_where.
2125 * window.c (wset_next_buffers, wset_prev_buffers): Move ...
2126 * window.h: ... to here.
2127
2128 2012-09-11 Dmitry Antipov <dmantipov@yandex.ru>
2129
2130 Convenient macro to check whether the buffer is live.
2131 * buffer.h (BUFFER_LIVE_P): New macro.
2132 * alloc.c, buffer.c, editfns.c, insdel.c, lread.c, marker.c:
2133 * minibuf.c, print.c, process.c, window.c, xdisp.c: Use it.
2134
2135 2012-09-11 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
2136
2137 * xdisp.c (right_overwritten, right_overwriting): Also handle gstring
2138 composition cases (Bug#12364).
2139
2140 * xterm.c (x_draw_glyph_string): Avoid overwriting inverted left
2141 overhang of succeeding glyphs overlapping box cursor.
2142
2143 * w32term.c (x_draw_glyph_string): Likewise.
2144
2145 2012-09-11 Paul Eggert <eggert@cs.ucla.edu>
2146
2147 Simplify, document, and port floating-point (Bug#12381).
2148 The porting part of this patch fixes bugs on non-IEEE platforms
2149 with frexp, ldexp, logb.
2150 * data.c, lisp.h (Qdomain_error, Qsingularity_error, Qunderflow_error):
2151 Now static.
2152 * floatfns.c: Simplify discussion of functions that Emacs doesn't
2153 support, by removing commented-out code and briefly listing the
2154 C89 functions excluded. The commented-out stuff was confusing
2155 maintenance, e.g., we thought we needed cbrt but it was commented out.
2156 (logb): Remove decl; no longer needed.
2157 (isfinite): New macro, if not already supplied.
2158 (isnan): Don't replace any existing macro.
2159 (Ffrexp, Fldexp): Define even if !HAVE_COPYSIGN, as frexp and ldexp
2160 are present on all C89 platforms.
2161 (Ffrexp): Do not special-case zero, as frexp does the right thing
2162 for that case.
2163 (Flogb): Do not use logb, as it doesn't have the desired meaning
2164 on hosts that use non-base-2 floating point. Instead, stick with
2165 frexp, which is C89 anyway. Do not pass an infinity or a NaN to
2166 frexp, to avoid getting an unspecified result.
2167
2168 * xdisp.c (Qinhibit_debug_on_message): Now static.
2169
2170 2012-09-10 Jan Djärv <jan.h.d@swipnet.se>
2171
2172 * nsterm.m (ns_update_begin): Set clip path to whole view by using
2173 NSBezierPath (Bug#12131).
2174
2175 2012-09-10 Chong Yidong <cyd@gnu.org>
2176
2177 * fns.c (Fdelq, Fdelete): Doc fix.
2178
2179 2012-09-10 Paul Eggert <eggert@cs.ucla.edu>
2180
2181 * lisp.h (XSETINT, XSETCONS, XSETVECTOR, XSETSTRING, XSETSYMBOL)
2182 (XSETFLOAT, XSETMISC): Parenthesize macro bodies.
2183
2184 2012-09-09 Stefan Monnier <monnier@iro.umontreal.ca>
2185
2186 * lisp.h (make_lisp_ptr): New macro to replace XSET.
2187 (XSETCONS, XSETVECTOR, XSETSTRING, XSETSYMBOL, XSETFLOAT, XSETMISC):
2188 Use it.
2189
2190 2012-09-09 Eli Zaretskii <eliz@gnu.org>
2191
2192 * fringe.c (draw_fringe_bitmap_1): Don't reduce the width of the
2193 left fringe if the window has a left margin. This avoids leaving
2194 traces of the cursor because its leftmost pixel is not drawn over.
2195
2196 * dispnew.c (update_window_line): When the left margin area of a
2197 screen line is updated, set the redraw_fringe_bitmaps_p flag of
2198 that screen line. (Bug#12277)
2199
2200 2012-09-09 Paul Eggert <eggert@cs.ucla.edu>
2201
2202 Assume C89 or later for math functions (Bug#12381).
2203 This simplifies the code, and makes it a bit smaller and faster,
2204 and (most important) makes it easier to clean up signal handling
2205 since we can stop worring about floating-point exceptions in
2206 library code. That was a problem before C89, but the problem
2207 went away many years ago on all practical Emacs targets.
2208 * data.c, image.c, lread.c, print.c:
2209 Don't include <math.h>; no longer needed.
2210 * data.c, floatfns.c (IEEE_FLOATING_POINT): Don't worry that it
2211 might be autoconfigured, as that never happens.
2212 * data.c (fmod):
2213 * doprnt.c (DBL_MAX_10_EXP):
2214 * print.c (DBL_DIG):
2215 Remove. C89 or later always defines these.
2216 * floatfns.c (HAVE_MATHERR, FLOAT_CHECK_ERRNO, FLOAT_CHECK_DOMAIN)
2217 (in_float, float_error_arg, float_error_arg2, float_error_fn_name)
2218 (arith_error, domain_error, domain_error2):
2219 Remove all this pre-C89 cruft. Do not include <errno.h> as that's
2220 no longer needed -- we simply return what C returns. All uses removed.
2221 (IN_FLOAT, IN_FLOAT2): Remove. All uses replaced with
2222 the wrapped code.
2223 (FLOAT_TO_INT, FLOAT_TO_INT2, range_error, range_error2):
2224 Remove. All uses expanded, as these macros are no longer used
2225 more than once and are now more trouble than they're worth.
2226 (Ftan): Use tan, not sin / cos.
2227 (Flogb): Assume C89 frexp.
2228 (fmod_float): Assume C89 fmod.
2229 (matherr) [HAVE_MATHERR]: Remove; no longer needed.
2230 (init_floatfns): Remove. All uses removed.
2231
2232 2012-09-08 Jan Djärv <jan.h.d@swipnet.se>
2233
2234 * nsterm.m (ns_draw_fringe_bitmap, ns_dumpglyphs_image): Take back
2235 compositeToPoint for OSX < 10.6 (Bug#12390).
2236
2237 2012-09-08 Paul Eggert <eggert@cs.ucla.edu>
2238
2239 * floatfns.c (Ftan): Use tan (x), not (sin (x) / cos (x)).
2240 This produces more-accurate results.
2241
2242 2012-09-08 Jan Djärv <jan.h.d@swipnet.se>
2243
2244 * nsterm.m (updateFrameSize): Call setFrame: on the view when size
2245 changes (Bug#12088).
2246
2247 2012-09-08 Chong Yidong <cyd@gnu.org>
2248
2249 * syntax.c (Fstring_to_syntax): Doc fix.
2250
2251 2012-09-08 Jan Djärv <jan.h.d@swipnet.se>
2252
2253 * nsterm.m (ns_clip_to_row): Remove code that deals with drawing fringe
2254 in the internal border.
2255 (x_set_window_size): Remove static variables and their usage.
2256 (ns_redraw_scroll_bars): Fix NSTRACE arg.
2257 (ns_after_update_window_line, ns_draw_fringe_bitmap):
2258 Remove fringe/internal border adjustment (Bug#11052).
2259 (ns_draw_fringe_bitmap): Make code more like other terms (xterm.c).
2260 (ns_draw_window_cursor): Remove fringe/internal border adjustment.
2261 (ns_fix_rect_ibw): Remove.
2262 (ns_get_glyph_string_clip_rect): Remove call to ns_fix_rect_ibw.
2263 (ns_dumpglyphs_box_or_relief): Ditto.
2264 (ns_maybe_dumpglyphs_background): Remove fringe/internal border
2265 adjustment.
2266 (ns_dumpglyphs_image): Ditto.
2267 (ns_dumpglyphs_stretch): Fix coding style. Remove fringe/internal
2268 border adjustment.
2269 (ns_set_vertical_scroll_bar): Remove variables barOnVeryLeft/Right and
2270 their usage. Add fringe_extended_p and its use as in other terms.
2271 (ns_judge_scroll_bars): Code style fix. Call updateFrameSize if
2272 scroll bar was removed.
2273 (updateFrameSize): New function.
2274 (windowDidResize): Move code to updateFrameSize and call it.
2275
2276 * nsterm.h (EmacsView): Add updateFrameSize.
2277
2278 2012-09-07 Chong Yidong <cyd@gnu.org>
2279
2280 * textprop.c (Fget_text_property): Minor doc fix (Bug#12323).
2281
2282 * data.c (Flocal_variable_if_set_p): Doc fix (Bug#10713).
2283
2284 2012-09-07 Paul Eggert <eggert@cs.ucla.edu>
2285
2286 More signal-handler cleanup (Bug#12327).
2287 * emacs.c (main): Convert three 'signal' calls to 'sigaction' calls.
2288 Problem introduced when merging patches. Noted by Eli Zaretskii in
2289 <http://bugs.gnu.org/12327#67>.
2290 * floatfns.c: Comment fix.
2291 * lisp.h (force_auto_save_soon): Declare regardless of SIGDANGER.
2292 SIGDANGER might not be in scope so "#ifdef SIGDANGER" is not right,
2293 and anyway the declaration is harmless even if SIGDANGER is not defined.
2294 * syssignal.h (SIGIO): Also #undef if (! defined FIONREAD ||
2295 defined BROKEN_FIONREAD). systty.h formerly did this, but other
2296 source files not surprisingly expected syssignal.h to define, or
2297 not define, SIGIO, and it's cleaner to do it that way, for consistency.
2298 Include <sys/ioctl.h>, for FIONREAD.
2299 * systty.h (SIGIO): Do not #undef here; it's now syssignal.h's job.
2300 This eliminates a problem whereby other files mysteriously had
2301 to include "syssignal.h" before including "systty.h" if they
2302 wanted to use "#ifdef SIGIO".
2303
2304 2012-09-07 Eli Zaretskii <eliz@gnu.org>
2305
2306 * w32proc.c (sigaction): New function, emulates Posix 'sigaction'.
2307
2308 * w32.c (sigemptyset): Empty the set.
2309 (sigsetmask, sigmask, sigblock, sigunblock): Remove unused functions.
2310
2311 * alloc.c [ENABLE_CHECKING]: Include signal.h, since we need SIGABRT.
2312
2313 2012-09-07 Dmitry Antipov <dmantipov@yandex.ru>
2314
2315 * alloc.c (mark_buffer): Revert unsafe marking optimization.
2316 (mark_object): Likewise for frame objects.
2317
2318 2012-09-07 Paul Eggert <eggert@cs.ucla.edu>
2319
2320 * syssignal.h (handle_on_main_thread): Always declare,
2321 even if FORWARD_SIGNAL_TO_MAIN_THREAD is not defined.
2322 This ports to platforms without HAVE_PTHREAD.
2323
2324 2012-09-06 Paul Eggert <eggert@cs.ucla.edu>
2325
2326 Signal-handler cleanup (Bug#12327).
2327 Emacs's signal handlers were written in the old 4.2BSD style with
2328 sigblock and sigmask and so forth, and this led to some
2329 inefficiencies and confusion. Rewrite these to use
2330 pthread_sigmask etc. without copying signal sets around. Also,
2331 get rid of the confusing macros 'SIGNAL_THREAD_CHECK' and
2332 'signal', and instead use functions that do not attempt to take
2333 over the system name space. This patch causes Emacs's text
2334 segment to shrink by 0.7% on my platform, Fedora 17 x86-64.
2335 * alloc.c, emacsgtkfixed.c, nsfns.m, widget.c, xmenu.c:
2336 Do not include <signal.h> or "syssignal.h", as these
2337 modules do not use signals.
2338 * atimer.c, callproc.c, data.c, dispnew.c, emacs.c, floatfns.c:
2339 * gtkutil.c, keyboard.c, process.c, sound.c, sysdep.c, term.c, xterm.c:
2340 Do not include <signal.h>, as "syssignal.h" does that for us now.
2341 * atimer.c (sigmask_atimers): New function.
2342 (block_atimers, unblock_atimers): New functions,
2343 replacing the old macros BLOCK_ATIMERS and UNBLOCK_ATIMERS.
2344 All uses replaced.
2345 * conf_post.h [SIGNAL_H_AHB]: Do not include <signal.h>;
2346 no longer needed here.
2347 * emacs.c (main): Inspect existing signal handler with sigaction,
2348 so that there's no need to block and unblock SIGHUP.
2349 * sysdep.c (struct save_signal): New member 'action', replacing
2350 old member 'handler'.
2351 (save_signal_handlers, restore_signal_handlers):
2352 Use sigaction instead of 'signal' to save and restore.
2353 (get_set_sighandler, set_sighandler) [!WINDOWSNT]:
2354 New function. All users of 'signal' modified to use set_sighandler
2355 if they're writeonly, and to use sys_signal if they're read+write.
2356 (emacs_sigaction_init, forwarded_signal): New functions.
2357 (sys_signal): Remove. All uses replaced by calls to sigaction
2358 and emacs_sigaction_init, or by direct calls to 'signal'.
2359 (sys_sigmask) [!__GNUC__]: Remove; no longer needed.
2360 (sys_sigblock, sys_sigunblock, sys_sigsetmask): Remove;
2361 all uses replaced by pthread_sigmask etc. calls.
2362 * syssignal.h: Include <signal.h>.
2363 (emacs_sigaction_init, forwarded_signal): New decls.
2364 (SIGMASKTYPE): Remove. All uses replaced by its definiens, sigset_t.
2365 (SIGEMPTYMASK): Remove; all uses replaced by its definiens, empty_mask.
2366 (sigmask, sys_sigmask): Remove; no longer needed.
2367 (sigpause): Remove. All uses replaced by its definiens, sigsuspend.
2368 (sigblock, sigunblock, sigfree):
2369 (sigsetmask) [!defined sigsetmask]:
2370 Remove. All uses replaced by pthread_sigmask.
2371 (signal): Remove. Its remaining uses (with SIG_DFL and SIG_IGN)
2372 no longer need to be replaced, and its typical old uses
2373 are now done via emacs_sigaction_init and sigaction.
2374 (sys_sigblock, sys_sigunblock, sys_sigsetmask): Remove decls.
2375 (sys_sigdel): Remove; unused.
2376 (NSIG): Remove a FIXME; the code's fine. Remove an unnecessary ifdef.
2377
2378 2012-09-06 Eli Zaretskii <eliz@gnu.org>
2379
2380 * process.c (CAN_HANDLE_MULTIPLE_CHILDREN): Fix a typo that broke
2381 SIGCHLD handling on systems that don't have WNOHANG. (Bug#12327)
2382
2383 2012-09-06 Dmitry Antipov <dmantipov@yandex.ru>
2384
2385 Explicitly mark buffer_defaults and buffer_local_symbols.
2386 * alloc.c (Fgarbage_collect): Mark buffer_defaults and
2387 mark_local_symbols here.
2388 (mark_object): If GC_CHECK_MARKED_OBJECTS, simplify checking
2389 since special buffers aren't marked here any more.
2390 (allocate_buffer): Chain new buffer with all_buffers here...
2391 * buffer.c (Fget_buffer_create, Fmake_indirect_buffer): ...and
2392 not here.
2393 (Vbuffer_defaults, Vbuffer_local_symbols): Remove.
2394 (syms_of_buffer): Remove staticpro of the above.
2395 (init_buffer_once): Set names for buffer_defaults and
2396 buffer_local_symbols.
2397
2398 2012-09-06 Paul Eggert <eggert@cs.ucla.edu>
2399
2400 Use bool for booleans in font-related modules.
2401 * font.c (font_intern_prop, font_style_to_value)
2402 (font_style_symbolic, font_parse_xlfd, font_parse_fcname)
2403 (generate_otf_features, font_check_otf_features, font_check_otf)
2404 (font_match_p, font_list_entities, font_at):
2405 * fontset.c (fontset_id_valid_p, reorder_font_vector
2406 (fontset_find_font, Fset_fontset_font)
2407 (face_suitable_for_char_p) [0]:
2408 * ftfont.c (fc_initialized, ftfont_get_open_type_spec)
2409 (ftfont_open, ftfont_text_extents, ftfont_check_otf):
2410 (m17n_flt_initialized, ftfont_shape_by_flt):
2411 * ftxfont.c (ftxfont_draw_bitmap, ftxfont_draw):
2412 * nsfont.m (nsfont_draw):
2413 * w32font.c (w32font_draw):
2414 * w32term.c (x_draw_glyphless_glyph_string_foreground):
2415 Use bool for booleans.
2416 * font.h: Adjust to above API changes.
2417 (struct font, struct font_driver, struct font_driver_list):
2418 Use bool for booleans.
2419 (struct font): Remove useless member encoding_type.
2420 All users removed.
2421 * fontset.c, xftfont.c: Omit unnecessary static decls.
2422
2423 2012-09-06 Dmitry Antipov <dmantipov@yandex.ru>
2424
2425 * alloc.c (mark_object): Revert window marking code
2426 since it's unsafe for the Fset_window_configuration.
2427
2428 2012-09-05 Paul Eggert <eggert@cs.ucla.edu>
2429
2430 Fix race conditions with signal handlers and errno (Bug#12327).
2431 Be more systematic about preserving errno whenever a signal
2432 handler returns, even if it's not in the main thread. Do this by
2433 renaming signal handlers to distinguish between signal delivery
2434 and signal handling. All uses changed.
2435 * atimer.c (deliver_alarm_signal): Rename from alarm_signal_handler.
2436 * data.c (deliver_arith_signal): Rename from arith_error.
2437 * dispnew.c (deliver_window_change_signal): Rename from
2438 window_change_signal.
2439 * emacs.c (deliver_error_signal): Rename from fatal_error_signal.
2440 (deliver_danger_signal) [SIGDANGER]: Rename from memory_warning_signal.
2441 * keyboard.c (deliver_input_available_signal): Rename from
2442 input_available_signal.
2443 (deliver_user_signal): Rename from handle_user_signal.
2444 (deliver_interrupt_signal): Rename from interrupt_signal.
2445 * process.c (deliver_pipe_signal): Rename from send_process_trap.
2446 (deliver_child_signal): Rename from sigchld_handler.
2447 * atimer.c (handle_alarm_signal):
2448 * data.c (handle_arith_signal):
2449 * dispnew.c (handle_window_change_signal):
2450 * emacs.c (handle_fatal_signal, handle_danger_signal):
2451 * keyboard.c (handle_input_available_signal):
2452 * keyboard.c (handle_user_signal, handle_interrupt_signal):
2453 * process.c (handle_pipe_signal, handle_child_signal):
2454 New functions, with the actual signal-handling code taken from the
2455 original respective signal handlers, sans the sporadic attempts to
2456 preserve errno, since that's now done by handle_on_main_thread.
2457 * atimer.c (alarm_signal_handler): Remove unnecessary decl.
2458 * emacs.c, floatfns.c, lisp.h: Remove unused FLOAT_CATCH_SIGKILL cruft.
2459 * emacs.c (main_thread) [FORWARD_SIGNAL_TO_MAIN_THREAD]:
2460 Move to sysdep.c.
2461 (main) [FORWARD_SIGNAL_TO_MAIN_THREAD]:
2462 Move initialization of main_thread to sysdep.c's init_signals.
2463 * process.c (waitpid) [!WNOHANG]: #define to wait; that's good enough for
2464 our usage, and simplifies the mainline code.
2465 (record_child_status_change): New static function, as a helper
2466 for handle_child_signal, and with most of the old child handler's
2467 contents.
2468 (CAN_HANDLE_MULTIPLE_CHILDREN): New constant.
2469 (handle_child_signal): Use the above.
2470 * sysdep.c (main_thread) [FORWARD_SIGNAL_TO_MAIN_THREAD]:
2471 Moved here from emacs.c.
2472 (init_signals) [FORWARD_SIGNAL_TO_MAIN_THREAD]: Initialize it;
2473 code moved here from emacs.c's main function.
2474 * sysdep.c, syssignal.h (handle_on_main_thread): New function,
2475 replacing the old SIGNAL_THREAD_CHECK. All uses changed.
2476 This lets callers save and restore errno properly.
2477
2478 2012-09-05 Dmitry Antipov <dmantipov@yandex.ru>
2479
2480 Remove redundant or unused things here and there.
2481 * lisp.h (CYCLE_CHECK, CHAR_TABLE_TRANSLATE): Remove.
2482 * conf_post.h (RE_TRANSLATE): Use char_table_translate.
2483 * editfns.c (Fcompare_buffer_substrings): Likewise.
2484 * frame.h (struct terminal, struct font_driver_list):
2485 Remove redundant declarations.
2486 * window.h (Qleft, Qright): Likewise.
2487
2488 2012-09-05 Dmitry Antipov <dmantipov@yandex.ru>
2489
2490 Do not mark objects from deleted buffers, windows and frames.
2491 * alloc.c (mark_buffer): Mark just the buffer if it is dead.
2492 (mark_object): Likewise for windows and frames.
2493
2494 2012-09-05 Dmitry Antipov <dmantipov@yandex.ru>
2495
2496 * alloc.c (valid_lisp_object_p): Treat killed buffers,
2497 buffer_defaults and buffer_local_symbols as valid objects.
2498 Return special value to denote them.
2499
2500 2012-09-05 Paul Eggert <eggert@cs.ucla.edu>
2501
2502 * fileio.c, filelock.c, floatfns.c, fns.c: Use bool for boolean.
2503 * fileio.c (auto_saving, auto_save_error_occurred, make_temp_name)
2504 (Fexpand_file_name, barf_or_query_if_file_exists, Fcopy_file)
2505 (file_name_absolute_p, Fsubstitute_in_file_name):
2506 (check_executable, check_writable, Ffile_accessible_directory_p)
2507 (Fset_file_selinux_context, Fdefault_file_modes)
2508 (Finsert_file_contents, choose_write_coding_system)
2509 (Fwrite_region, build_annotations, a_write, e_write)
2510 (Fdo_auto_save):
2511 * filelock.c (boot_time_initialized, get_boot_time)
2512 (get_boot_time_1, lock_file_1, within_one_second):
2513 * floatfns.c (in_float):
2514 * fns.c (concat, internal_equal, Frequire, base64_encode_1)
2515 (base64_decode_1, cmpfn_eql, cmpfn_user_defined)
2516 (sweep_weak_table, sweep_weak_hash_tables, secure_hash):
2517 * lisp.h (struct Lisp_Hash_Table.cmpfn):
2518 * window.c (compare_window_configurations):
2519 Use bool for booleans.
2520 * fileio.c (auto_saving_dir_umask, auto_saving_mode_bits)
2521 (Fdefault_file_modes): Now mode_t, not int, for modes.
2522 (Fdo_auto_save): Set a boolean to 1 rather than using ++.
2523 (internal_delete_file): Now returns void, not a (boolean) int,
2524 since nobody was looking at the return value.
2525 * lisp.h, window.h: Adjust to above API changes.
2526
2527 * xdisp.c (set_message): Simplify and reindent last change.
2528
2529 2012-09-05 Juanma Barranquero <lekktu@gmail.com>
2530
2531 * makefile.w32-in ($(BLD)/sysdep.$(O)): Update dependencies.
2532
2533 2012-09-04 Lars Ingebrigtsen <larsi@gnus.org>
2534
2535 * eval.c (call_debugger): Make the function non-static so that we
2536 can call it from set_message.
2537
2538 * xdisp.c (set_message): Implement the new variable `debug-on-message'.
2539 (syms_of_xdisp): Defvar it and `inhibit-debug-on-message'.
2540
2541 2012-09-04 Paul Eggert <eggert@cs.ucla.edu>
2542
2543 Give more-useful info on a fatal error (Bug#12328).
2544 * alloc.c [ENABLE_CHECKING]: Do not include <execinfo.h>.
2545 (die) [ENABLE_CHECKING]: Call fatal_error_backtrace instead
2546 of doing the work ourselves.
2547 * emacs.c (fatal_error_signal): Let fatal_error_backtrace
2548 do most of the work.
2549 (fatal_error_backtrace): New function, taken from the guts
2550 of the old fatal_error_signal, but with a new option to output
2551 a backtrace.
2552 (shut_down_emacs) [!DOS_NT]: Use strsignal to give more-useful
2553 info about the signal than just its number.
2554 * lisp.h (fatal_error_backtrace, emacs_backtrace): New decls.
2555 * sysdep.c: Include <execinfo.h>
2556 (emacs_backtrace): New function, taken partly from the previous
2557 code of the 'die' function.
2558 (emacs_abort): Call fatal_error_backtrace rather than abort.
2559
2560 2012-09-04 Stefan Monnier <monnier@iro.umontreal.ca>
2561
2562 * lread.c (readevalloop): Call internal-macroexpand-for-load to perform
2563 eager (load-time) macro-expansion.
2564 * lisp.mk (lisp): Add macroexp.
2565
2566 2012-09-04 Paul Eggert <eggert@cs.ucla.edu>
2567
2568 Simplify redefinition of 'abort' (Bug#12316).
2569 Do not try to redefine the 'abort' function. Instead, redo
2570 the code so that it calls 'emacs_abort' rather than 'abort'.
2571 This removes the need for the NO_ABORT configure-time macro
2572 and makes it easier to change the abort code to do a backtrace.
2573 * .gdbinit: Just stop at emacs_abort, not at w32_abort or abort.
2574 * emacs.c (abort) [!DOS_NT && !NO_ABORT]:
2575 Remove; sysdep.c's emacs_abort now takes its place.
2576 * lisp.h (emacs_abort): New decl. All calls from Emacs code to
2577 'abort' changed to use 'emacs_abort'.
2578 * msdos.c (dos_abort) [defined abort]: Remove; not used.
2579 (abort) [!defined abort]: Rename to ...
2580 (emacs_abort): ... new name.
2581 * sysdep.c (emacs_abort) [!HAVE_NTGUI]: New function, taking
2582 the place of the old 'abort' in emacs.c.
2583 * w32.c, w32fns.c (abort): Do not #undef.
2584 * w32.c (emacs_abort): Rename from w32_abort.
2585
2586 2012-09-04 Eli Zaretskii <eliz@gnu.org>
2587
2588 * w32uniscribe.c (uniscribe_shape): Reverse the sign of
2589 offsets[j].dv, since the y axis of the screen coordinates points
2590 down, while the y axis of the font definition coordinates points
2591 up. This fixes display of Arabic diacritics such as KASRA and
2592 KASRATAN. (Bug#11860)
2593
2594 2012-09-04 Paul Eggert <eggert@cs.ucla.edu>
2595
2596 Be more systematic about _setjmp vs setjmp.
2597 * alloc.c (test_setjmp, mark_stack):
2598 * image.c (PNG_LONGJMP) [PNG_LIBPNG_VER < 10500]:
2599 (PNG_JMPBUF) [! (PNG_LIBPNG_VER < 10500)]:
2600 (png_load, my_error_exit, jpeg_load):
2601 * process.c (send_process_trap, send_process):
2602 Uniformly prefer _setjmp and _longjmp to setjmp and longjmp.
2603 The underscored versions are up to 30x faster on some hosts.
2604 Formerly, the code used setjmp+longjmp sometimes and
2605 _setjmp+_longjmp at other times, with no particular reason to
2606 prefer setjmp+longjmp.
2607
2608 2012-09-03 Paul Eggert <eggert@cs.ucla.edu>
2609
2610 Fix minor problem found by static checking.
2611 * buffer.c (Fdelete_all_overlays): Return nil.
2612
2613 2012-09-03 Martin Rudalics <rudalics@gmx.at>
2614
2615 * buffer.c (Fdelete_all_overlays): New function.
2616
2617 2012-09-03 Chong Yidong <cyd@gnu.org>
2618
2619 * gtkutil.c: Add extern decl for Qxft.
2620
2621 2012-09-02 Paul Eggert <eggert@cs.ucla.edu>
2622
2623 * emacs.c, eval.c: Use bool for boolean.
2624 * emacs.c (initialized, inhibit_window_system, running_asynch_code):
2625 (malloc_using_checking) [DOUG_LEA_MALLOC]:
2626 (display_arg) [HAVE_X_WINDOWS || HAVE_NS]:
2627 (noninteractive, no_site_lisp, fatal_error_in_progress, argmatch)
2628 (main, decode_env_path, Fdaemon_initialized):
2629 * eval.c (call_debugger, Finteractive_p, interactive_p):
2630 (unwind_to_catch, Fsignal, wants_debugger, skip_debugger)
2631 (maybe_call_debugger, Fbacktrace):
2632 * process.c (read_process_output, exec_sentinel):
2633 Use bool for booleans.
2634 * emacs.c (shut_down_emacs): Omit unused boolean argument NO_X.
2635 All callers changed.
2636 * eval.c (interactive_p): Omit always-true boolean argument
2637 EXCLUDE_SUBRS_P. All callers changed.
2638 * dispextern.h, lisp.h: Reflect above API changes.
2639 * firstfile.c (dummy): Use the address of 'main', whose signature
2640 won't change, instead of the address of 'initialize', whose
2641 signature just changed from int to bool.
2642 * lisp.h (fatal_error_in_progress): New decl of boolean, moved here ...
2643 * msdos.c (fatal_error_in_progress): ... from here.
2644 * xdisp.c (redisplaying_p): Now a boolean. Set it to 1 instead
2645 of incrementing it.
2646 (redisplay_internal, unwind_redisplay): Simply clear
2647 REDISPLAYING_P when unwinding, instead of saving its previous,
2648 always-false value and then restoring it.
2649
2650 Clean up some extern decls.
2651 Mostly, this hoists extern decls out of .c files and into .h files.
2652 That way, we're more likely to catch errors if the interfaces change.
2653 * alloc.c [USE_GTK]: Include "gtkutil.h" so that we need not
2654 declare xg_mark_data.
2655 * dispextern.h (x_frame_parm_handlers):
2656 * font.h (Qxft):
2657 * lisp.h (Qlexical_binding, Qinternal_interpreter_environment)
2658 (Qextra_light, Qlight, Qsemi_light, Qsemi_bold, Qbold, Qextra_bold)
2659 (Qultra_bold, Qoblique, Qitalic):
2660 Move extern decl here from .c file.
2661 * alloc.c (xg_mark_data) [USE_GTK]:
2662 * doc.c (Qclosure):
2663 * eval.c (Qlexical_binding):
2664 * fns.c (time) [!HAVE_UNISTD_H]:
2665 * gtkutil.c (Qxft, Qnormal, Qextra_light, Qlight, Qsemi_light)
2666 (Qsemi_bold, Qbold, Qextra_bold, Qultra_bold, Qoblique, Qitalic):
2667 * image.c (Vlibrary_cache, QCloaded_from) [HAVE_NTGUI]:
2668 * lread.c (Qinternal_interpreter_environment):
2669 * minibuf.c (Qbuffer):
2670 * process.c (QCfamily, QCfilter):
2671 * widget.c (free_frame_faces):
2672 * xfaces.c (free_frame_menubar) [USE_X_TOOLKIT]:
2673 * xfont.c (x_clear_errors):
2674 * xterm.c (x_frame_parm_handlers):
2675 Remove now-redundant extern decls.
2676 * keyboard.c, keyboard.h (ignore_mouse_drag_p) [USE_GTK || HAVE_NS]:
2677 * xfaces.c (Qultra_light, Qreverse_oblique, Qreverse_italic):
2678 Now static.
2679 * xfaces.c: Remove unnecessary static decls.
2680 * xterm.c (updating_frame): Remove decl of nonexistent object.
2681
2682 * Makefile.in (gl-stamp): Don't scan $(SOME_MACHINE_OBJECTS)
2683 when building globals.h, as the objects that are not built on
2684 this host are not needed to compile C files on this host.
2685
2686 2012-09-02 Jan Djärv <jan.h.d@swipnet.se>
2687
2688 * gtkutil.h: Remove prototype for x_wm_set_size_hint.
2689
2690 * frame.h: Add missing prototype for x_wm_set_size_hint.
2691
2692 2012-09-02 Paul Eggert <eggert@cs.ucla.edu>
2693
2694 * doc.c, editfns.c, insdel.c, intervals.c: Use bool for boolean.
2695 * doc.c (read_bytecode_char, get_doc_string, reread_doc_file)
2696 (Fdocumentation, Fdocumentation_property, Fsnarf_documentation)
2697 (Fsubstitute_command_keys):
2698 * editfns.c (region_limit, find_field, Fconstrain_to_field)
2699 (save_excursion_save, save_excursion_restore)
2700 (disassemble_lisp_time, decode_time_components, emacs_nmemftime)
2701 (format_time_string, general_insert_function)
2702 (make_buffer_string, make_buffer_string_both)
2703 (Fsubst_char_in_region, Ftranslate_region_internal, Fformat):
2704 * insdel.c (check_markers, gap_left, adjust_markers_for_insert)
2705 (copy_text, insert_1, insert_1_both, insert_from_string)
2706 (insert_from_string_before_markers, insert_from_string_1)
2707 (insert_from_buffer, insert_from_buffer_1, replace_range)
2708 (replace_range_2, del_range_1, del_range_byte, del_range_both)
2709 (del_range_2, modify_region):
2710 * intervals.c (intervals_equal, balance_possible_root_interval)
2711 (adjust_intervals_for_insertion, merge_properties_sticky)
2712 (graft_intervals_into_buffer, lookup_char_property)
2713 (adjust_for_invis_intang, set_point_both)
2714 (get_property_and_range, compare_string_intervals)
2715 (set_intervals_multibyte_1, set_intervals_multibyte):
2716 * keyboard.c (decode_timer):
2717 Use bool for boolean.
2718 * intervals.h, lisp.h, systime.h: Reflect above API changes.
2719 * editfns.c (struct info): Use 1-bit unsigned bitfields for booleans.
2720
2721 2012-09-02 Chong Yidong <cyd@gnu.org>
2722
2723 * keymap.c (push_key_description): Print M-TAB as C-M-i
2724 (Bug#11758).
2725
2726 2012-09-02 Juanma Barranquero <lekktu@gmail.com>
2727
2728 * makefile.w32-in (CCL_H, W32FONT_H): New macros.
2729 (ATIMER_H, FONT_H, $(BLD)/alloc.$(O), $(BLD)/callproc.$(O))
2730 ($(BLD)/editfns.$(O), $(BLD)/ccl.$(O), $(BLD)/chartab.$(O))
2731 ($(BLD)/coding.$(O), $(BLD)/sysdep.$(O), $(BLD)/fontset.$(O))
2732 ($(BLD)/sysdep.$(O), $(BLD)/w32fns.$(O), $(BLD)/keyboard.$(O))
2733 ($(BLD)/w32term.$(O), $(BLD)/w32menu.$(O), $(BLD)/process.$(O))
2734 ($(BLD)/w32font.$(O), $(BLD)/w32uniscribe.$(O)): Update dependencies.
2735
2736 2012-09-01 Eli Zaretskii <eliz@gnu.org>
2737
2738 * w32uniscribe.c (uniscribe_shape): Handle correctly the case of
2739 more than one grapheme cluster passed to the shaper: compute the
2740 offset adjustment values separately for each cluster. (Bug#11860)
2741
2742 * image.c: Restore mistakenly removed inclusion of w32.h. Without
2743 it, GCC doesn't see prototypes of w32_delayed_load, and complains
2744 about implicit conversions from integer to pointer.
2745
2746 2012-09-01 Daniel Colascione <dancol@dancol.org>
2747
2748 * w32fns.c (x_display_info_for_name): Prevent crash if w32 window
2749 system used too early.
2750
2751 2012-09-01 Paul Eggert <eggert@cs.ucla.edu>
2752
2753 Better seed support for (random).
2754 * emacs.c (main): Call init_random.
2755 * fns.c (Frandom): Set the seed from a string argument, if given.
2756 Remove long-obsolete Gentzel cruft.
2757 * lisp.h, sysdep.c (seed_random): Now takes address and size, not long.
2758 (init_random): New function.
2759
2760 2012-09-01 Daniel Colascione <dancol@dancol.org>
2761
2762 * xterm.h: Add header guards. Declare x_menubar_window_to_frame.
2763 Remove x_set_frame_alpha, x_bitmap_icon, x_make_frame_visible,
2764 x_make_frame_invisible, x_iconify_frame, x_free_frame_resources,
2765 x_wm_set_size_hint, x_query_colors, x_real_positions,
2766 x_set_menu_bar_lines, x_char_width, x_char_height, x_sync,
2767 x_set_tool_bar_lines, x_activate_menubar, and free_frame_menubar,
2768 all of which have been moved to common code.
2769
2770 * xfaces.c: Include TERM_HEADER instead of listing all possible
2771 window-system headers.
2772
2773 * w32xfns.c (x_sync): Correct definition of x_sync (a no-op here)
2774 to match header.
2775
2776 * w32term.h (FRAME_X_WINDOW): Use FRAME_W32_WINDOW instead of
2777 directly accessing frame internals.
2778
2779 * w32font.h: Include font.h. Define syms_of_w32font and
2780 globals_of_w32font.
2781
2782 * process.c: Include TERM_HEADER instead of listing all possible
2783 window-system headers.
2784
2785 * nsterm.h: Remove declarations now in frame.h.
2786 Define FRAME_X_SCREEN, FRAME_X_VISUAL.
2787
2788 * menu.c: Include TERM_HEADER instead of listing all possible
2789 window-system headers.
2790
2791 * keyboard.h: Declare ignore_mouse_drag_p whenever we have a
2792 window system.
2793
2794 * keyboard.c: Include TERM_HEADER instead of listing all possible
2795 window-system headers.
2796
2797 * image.c: Include TERM_HEADER instead of listing all possible
2798 window-system headers. Declare Vlibrary_cache when compiling for
2799 Windows.
2800
2801 * gtkutil.h (xg_list_node_): Include xterm.h to pick up needed
2802 window system declarations.
2803
2804 * frame.h: Move common functions here: set_frame_menubar,
2805 x_set_window_size, x_sync, x_get_focus_frame,
2806 x_set_mouse_position, x_set_mouse_pixel_position,
2807 x_make_frame_visible, x_make_frame_invisible, x_iconify_frame,
2808 x_char_width, x_char_height, x_pixel_width, x_pixel_height,
2809 x_set_frame_alpha, x_set_menu_bar_lines, x_set_tool_bar_lines,
2810 x_activate_menubar, x_real_positions, x_bitmap_icon,
2811 x_set_menu_bar_lines, free_frame_menubar, x_free_frame_resources,
2812 and x_query_colors.
2813
2814 * frame.c: Include TERM_HEADER instead of listing all possible
2815 window-system headers.
2816
2817 * font.c: Include TERM_HEADER instead of listing all possible
2818 window-system headers.
2819
2820 * emacs.c: Include TERM_HEADER.
2821
2822 * dispnew.c: Include TERM_HEADER instead of listing all possible
2823 window-system headers.
2824
2825 * ccl.h: Include character.h.
2826
2827 * Makefile.in: Define WINDOW_SYSTEM_OBJ to hold objects needed for
2828 the current window system; include in list of objects to link into
2829 Emacs.
2830
2831 2012-08-31 Dmitry Antipov <dmantipov@yandex.ru>
2832
2833 Remove mark_ttys function and fix tty_display_info initialization.
2834 * lisp.h (mark_ttys): Remove prototype.
2835 * alloc.c (Fgarbage_collect): Remove redundant (and the only) call
2836 to mark_ttys because all possible values of 'top_frame' slot are
2837 the frames which are reachable from Vframe_list.
2838 * term.c (mark_ttys): Remove.
2839 (init_tty): Safely initialize 'top_frame' slot with Qnil.
2840
2841 2012-08-31 Dmitry Antipov <dmantipov@yandex.ru>
2842
2843 Change struct frame bitfields from unsigned char to unsigned.
2844 * frame.h (struct frame): Change type of 'display_preempted',
2845 'visible', 'iconified', 'has_minibuffer', 'wants_modeline',
2846 'auto_raise', 'auto_lower', 'no_split', 'explicit_name',
2847 'window_sizes_changed', 'mouse_moved' and 'pointer_invisible'
2848 bitfields from unsigned char to unsigned.
2849
2850 2012-08-31 Dmitry Antipov <dmantipov@yandex.ru>
2851
2852 Remove unused member of struct x_output and struct w32_output.
2853 * xterm.h (struct x_output): Remove unused field 'needs_exposure'.
2854 * w32term.h (struct w32_output): Likewise.
2855
2856 2012-08-30 Jan Djärv <jan.h.d@swipnet.se>
2857
2858 * gtkutil.c (x_wm_set_size_hint): Use 1 col for base_width so it
2859 does not become zero (Bug#12234).
2860
2861 2012-08-30 Paul Eggert <eggert@cs.ucla.edu>
2862
2863 * dispnew.c (update_frame_1): Pacify gcc -Wstrict-overflow
2864 for GCC 4.7.1 x86-64.
2865
2866 2012-08-30 Glenn Morris <rgm@gnu.org>
2867
2868 * lread.c (init_lread): For out-of-tree builds, only add the
2869 source directory's site-lisp dir to the load-path if it exists,
2870 consistent with in-tree builds. (Bug#12302)
2871
2872 2012-08-28 Jan Djärv <jan.h.d@swipnet.se>
2873
2874 * nsmenu.m (initWithContentRect:styleMask:backing:defer:): Initialize
2875 button_values to NULL. Call setStykeMask so dialogs get a close button.
2876 (windowShouldClose:): Set window_closed.
2877 (dealloc): New member, free button_values.
2878 (process_dialog:): Make member function. Remove window argument,
2879 replace window with self. Count buttons and allocate and store values
2880 in button_values.
2881 (addButton:value:row:): value is int with the name tag. Call setTag
2882 with tag. Remove return self, declare return value as void.
2883 (addString:row:): Remove return self, declare return value as void.
2884 (addSplit): Remove return self, declare return value as void.
2885 (clicked:): Remove return self, declare return value as void.
2886 Set dialog_return to button_values[seltag]. Code formatting change.
2887 (initFromContents:isQuestion:): Adjust call to process_dialog.
2888 Code formatting change.
2889 (timeout_handler:): Set timer_fired to YES.
2890 (runDialogAt:): Set timer_fired to NO.
2891 Handle click on close button as quit.
2892
2893 * nsterm.h (EmacsDialogPanel): Make timer_fired BOOL.
2894 Add window_closed and button_values. Add void as return value for
2895 add(Button|String|Split). addButton takes int instead of Lisp_Object.
2896 Add process_dialog as new member.
2897
2898 2012-08-28 Eli Zaretskii <eliz@gnu.org>
2899
2900 * ralloc.c (free_bloc): Don't dereference a 'heap' structure if it
2901 is not one of the heaps we manage. (Bug#12242)
2902
2903 2012-08-28 Glenn Morris <rgm@gnu.org>
2904
2905 * eval.c (Fcalled_interactively_p): Doc fix. (Bug#11747)
2906
2907 2012-08-28 Martin Rudalics <rudalics@gmx.at>
2908
2909 * window.c (Fset_window_configuration): Remove handling of
2910 auto-buffer-name window parameter. Install revision of reverted
2911 fix.
2912
2913 2012-08-28 Dmitry Antipov <dmantipov@yandex.ru>
2914
2915 Do not allow to set major mode for a dead buffer.
2916 * buffer.c (Fset_buffer_major_mode): Signal an error
2917 if the buffer is dead.
2918 (Fother_buffer, other_buffer_safely): Remove redundant
2919 nested declaration.
2920
2921 2012-08-28 Dmitry Antipov <dmantipov@yandex.ru>
2922
2923 Always use set_buffer_if_live to restore original buffer at unwind.
2924 * buffer.h (record_unwind_current_buffer): New function.
2925 * bytecode.c, dispnew.c, editfns.c, fileio.c, fns.c, insdel.c:
2926 * keyboard.c, keymap.c, minibuf.c, print.c, process.c, textprop.c:
2927 * undo.c, window.c: Adjust users.
2928 * buffer.c (set_buffer_if_live): Fix comment.
2929
2930 2012-08-28 Dmitry Antipov <dmantipov@yandex.ru>
2931
2932 Fix usage of set_buffer_internal.
2933 * buffer.h (set_buffer_internal): Make it BUFFER_INLINE.
2934 * buffer.c (set_buffer_if_live): Use set_buffer_internal.
2935 * coding.c (decode_coding): Omit redundant test.
2936 * fileio.c (decide_coding_unwind): Likewise.
2937 * fns.c (secure_hash): Likewise.
2938 * insdel.c (modify_region): Likewise.
2939 * keyboard.c (command_loop_1): Likewise.
2940 * print.c (PRINTFINISH): Likewise.
2941 * xdisp.c (run_window_scroll_functions): Use set_buffer_internal.
2942
2943 2012-08-27 Paul Eggert <eggert@cs.ucla.edu>
2944
2945 * dispnew.c: Use bool for boolean.
2946 (frame_garbaged, display_completed, delayed_size_change)
2947 (fonts_changed_p, add_window_display_history)
2948 (add_frame_display_history, verify_row_hash)
2949 (adjust_glyph_matrix, clear_window_matrices, glyph_row_slice_p)
2950 (row_equal_p, realloc_glyph_pool)
2951 (allocate_matrices_for_frame_redisplay)
2952 (showing_window_margins_p)
2953 (adjust_frame_glyphs_for_frame_redisplay)
2954 (build_frame_matrix_from_leaf_window, make_current)
2955 (mirrored_line_dance, mirror_line_dance, update_frame)
2956 (update_window_tree, update_single_window)
2957 (check_current_matrix_flags, update_window, update_text_area)
2958 (update_window_line, set_window_update_flags, scrolling_window)
2959 (update_frame_1, scrolling, buffer_posn_from_coords)
2960 (do_pending_window_change, change_frame_size)
2961 (change_frame_size_1, sit_for):
2962 Use bool for boolean.
2963 (clear_glyph_matrix_rows): Rename from enable_glyph_matrix_rows,
2964 and remove last int (actually boolean) argument, which was always 0.
2965 All callers changed.
2966 * dispextern.h, frame.h, lisp.h: Reflect above API changes.
2967 * dispextern.h (struct composition_it): Use bool for boolean.
2968 (struct glyph_matrix): Don't assume buffer sizes can fit in 'int'.
2969 (struct bidi_it): Use unsigned:1, not int, for boolean prev_was_pdf.
2970 * dired.c (file_name_completion):
2971 Use bool for boolean. (This was missed in an earlier change.)
2972
2973 2012-08-27 Martin Rudalics <rudalics@gmx.at>
2974
2975 * window.c (Fset_window_configuration): Revert first part of
2976 last change.
2977
2978 2012-08-27 Jan Djärv <jan.h.d@swipnet.se>
2979
2980 * nsterm.h (NSPanel): New class variable dialog_return.
2981
2982 * nsmenu.m (initWithContentRect:styleMask:backing:defer:):
2983 Initialize dialog_return.
2984 (windowShouldClose:): Use stop instead of stopModalWithCode.
2985 (clicked:): Ditto, and also set dialog_return (Bug#12258).
2986 (timeout_handler:): Use stop instead of abortModal. Send a dummy
2987 event.
2988 (runDialogAt:): Make ret Lisp_Object. Set it from dialog_return when
2989 modal loop returns.
2990
2991 2012-08-27 Paul Eggert <eggert@cs.ucla.edu>
2992
2993 * composite.c, data.c, dbusbind.c, dired.c: Use bool for booleans.
2994 * composite.c (find_composition, composition_gstring_p)
2995 (composition_reseat_it, find_automatic_composition):
2996 * data.c (let_shadows_buffer_binding_p)
2997 (let_shadows_global_binding_p, set_internal, make_blv)
2998 (Fmake_variable_buffer_local, Fmake_local_variable)
2999 (Fmake_variable_frame_local, arithcompare, cons_to_unsigned)
3000 (cons_to_signed, arith_driver):
3001 * dbusbind.c (xd_in_read_queued_messages):
3002 * dired.c (directory_files_internal, file_name_completion):
3003 Use bool for booleans.
3004 * dired.c (file_name_completion):
3005 * process.h (fd_callback):
3006 Omit int (actually boolean) argument. It wasn't being used.
3007 All uses changed.
3008 * composite.h, lisp.h: Reflect above API changes.
3009
3010 * cmds.c, coding.c: Use bool for booleans.
3011 * cmds.c (move_point, Fself_insert_command):
3012 * coding.h (struct composition status, struct coding_system):
3013 * coding.c (detect_coding_utf_8, encode_coding_utf_8)
3014 (detect_coding_utf_16, encode_coding_utf_16, detect_coding_emacs_mule)
3015 (emacs_mule_char, decode_coding_emacs_mule)
3016 (encode_coding_emacs_mule, detect_coding_iso_2022)
3017 (decode_coding_iso_2022, encode_invocation_designation)
3018 (encode_designation_at_bol, encode_coding_iso_2022)
3019 (detect_coding_sjis, detect_coding_big5, decode_coding_sjis)
3020 (decode_coding_big5, encode_coding_sjis, encode_coding_big5)
3021 (detect_coding_ccl, encode_coding_ccl, decode_coding_raw_text)
3022 (encode_coding_raw_text, detect_coding_charset)
3023 (decode_coding_charset, encode_coding_charset, detect_eol)
3024 (detect_coding, get_translation_table, produce_chars)
3025 (consume_chars, reused_workbuf_in_use)
3026 (make_conversion_work_buffer, code_conversion_save)
3027 (decode_coding_object, encode_coding_object)
3028 (detect_coding_system, char_encodable_p)
3029 (Funencodable_char_position, code_convert_region)
3030 (code_convert_string, code_convert_string_norecord)
3031 (Fset_coding_system_priority):
3032 * fileio.c (Finsert_file_contents):
3033 Use bool for booleans.
3034 * coding.h, lisp.h: Reflect above API changes.
3035 * coding.c: Remove unnecessary static function decls.
3036 (detect_coding): Use unsigned, not signed, to copy an unsigned field.
3037 (decode_coding, encode_coding, decode_coding_gap): Return 'void',
3038 not a boolean 'int', since callers never look at the return value.
3039 (ALLOC_CONVERSION_WORK_AREA): Assume caller returns 'void', not 'int'.
3040 * coding.h (decoding_buffer_size, encoding_buffer_size)
3041 (emacs_mule_string_char): Remove unused extern decls.
3042 (struct iso_2022_spec, struct coding_system):
3043 Use 'unsigned int : 1' for boolean fields, since there's more than one.
3044 (struct emacs_mule_spec): Remove unused field 'full_support'.
3045 All initializations removed.
3046 * cmds.c (internal_self_insert): Don't assume EMACS_INT fits in 'int'.
3047
3048 2012-08-27 Dmitry Antipov <dmantipov@yandex.ru>
3049
3050 Fix spare memory change (Bug#12286).
3051 * alloc.c (mark_maybe_pointer): Handle MEM_TYPE_SPARE.
3052 (valid_lisp_object_p): Likewise.
3053
3054 2012-08-27 Martin Rudalics <rudalics@gmx.at>
3055
3056 * window.c (Fset_window_configuration): Record any window's old
3057 buffer if it's replaced (see Bug#8789). If the new current
3058 buffer doesn't appear in the selected window, go to its old
3059 point (Bug#12208).
3060
3061 2012-08-27 Dmitry Antipov <dmantipov@yandex.ru>
3062
3063 Special MEM_TYPE_SPARE to denote reserved memory.
3064 * alloc.c (enum mem_type): New memory type.
3065 (refill_memory_reserve): Use new type for spare memory.
3066 This prevents live_cons_p and live_string_p from incorrect
3067 detection of uninitialized objects from spare memory as live.
3068
3069 2012-08-26 Paul Eggert <eggert@cs.ucla.edu>
3070
3071 Spelling fixes.
3072 * Makefile.in (.PHONY): versioclean -> versionclean.
3073
3074 Remove unused external symbols.
3075 * data.c (Qcons, Qfloat, Qmisc, Qstring, Qvector):
3076 * window.c (Qwindow_valid_p, decode_valid_window):
3077 Now static, not extern.
3078 * data.c (Qinterval): Remove; unused.
3079 (syms_of_data): Do not define 'interval'.
3080 * lisp.h (Qinteger, Qstring, Qmisc, Qvector, Qfloat, Qcons):
3081 * window.h (decode_valid_window):
3082 Remove decls.
3083
3084 * character.c, charset.c, chartab.c: Use bool for booleans.
3085 * character.c (lisp_string_width, string_count_byte8)
3086 (string_escape_byte8):
3087 * charset.c (charset_map_loaded, load_charset_map, read_hex):
3088 (load_charset_map_from_file, map_charset_chars)
3089 (Fdefine_charset_internal, define_charset_internal)
3090 (Fdeclare_equiv_charset, find_charsets_in_text)
3091 (Ffind_charset_region, char_charset, Fiso_charset):
3092 * chartab.c (sub_char_table_ref, sub_char_table_ref_and_range)
3093 (sub_char_table_set, sub_char_table_set_range)
3094 (char_table_set_range, optimize_sub_char_table)
3095 (map_sub_char_table):
3096 Use bool for boolean.
3097 * character.c (str_to_unibyte): Omit last boolean argument; it was
3098 always 0. All callers changed.
3099 * character.h, charset.h: Adjust to match previous changes.
3100 * character.h (char_printable_p): Remove decl of nonexistent function.
3101 * charset.h (struct charset): Members code_linear_p, iso_chars_96,
3102 ascii_compatible_p, supplementary_p, compact_codes_p, unified_p
3103 are all boolean, so make them single-bit bitfields.
3104
3105 * lisp.h (ASET): Remove attempt to detect side effects.
3106 It was meant to be temporary and it often doesn't work,
3107 because when IDX has side effects the behavior of IDX==IDX
3108 is undefined. See Stefan Monnier in
3109 <http://lists.gnu.org/archive/html/emacs-devel/2012-08/msg00762.html>.
3110
3111 2012-08-26 Barry OReilly <gundaetiapo@gmail.com> (tiny change)
3112
3113 * lisp.h (functionp): New function (extracted from Ffunctionp).
3114 (FUNCTIONP): Use it.
3115 * eval.c (Ffunctionp): Use it.
3116
3117 2012-08-25 Paul Eggert <eggert@cs.ucla.edu>
3118
3119 * xgselect.c (xg_select): Use auto storage for the GPollFD buffer
3120 as that's faster and simpler than static storage. Don't bother
3121 with the g_main_context_query overhead if g_main_context_pending
3122 says no events are pending.
3123 (gfds, gfds_size): Remove these static vars.
3124 (xgselect_initialize): Remove; no longer needed.
3125 All uses and decls removed.
3126
3127 * emacs.c (fatal_error_signal_hook): Remove.
3128 All uses removed. This leftover from old code was always 0.
3129
3130 * casefiddle.c, casetab.c, category.c: Use bool for boolean.
3131 * casefiddle.c (casify_object, casify_region):
3132 * casetab.c (set_case_table):
3133 * category.c, category.h (word_boundary_p):
3134 * category.h (CHAR_HAS_CATEGORY):
3135 Use bool for booleans, instead of int.
3136
3137 2012-08-25 Eli Zaretskii <eliz@gnu.org>
3138
3139 * makefile.w32-in ($(BLD)/alloc.$(O)): Depend on $(GNU_LIB)/execinfo.h.
3140
3141 2012-08-25 Paul Eggert <eggert@cs.ucla.edu>
3142
3143 On assertion failure, print backtrace if available.
3144 * alloc.c [ENABLE_CHECKING]: Include <execinfo.h>.
3145 (die) [ENABLE_CHECKING]: Print a backtrace if available.
3146 * Makefile.in (LIB_EXECINFO): New macro.
3147 (LIBES): Use it.
3148
3149 * bytecode.c, callint.c, callproc.c: Use bool for boolean.
3150 * bytecode.c (exec_byte_code):
3151 * callint.c (check_mark, Fcall_interactively):
3152 * callproc.c (Fcall_process, add_env, child_setup, getenv_internal_1)
3153 (getenv_internal, sync_process_alive, call_process_exited):
3154 * lisp.h (USE_SAFE_ALLOCA):
3155 Use bool for booleans, instead of int.
3156 * lisp.h, process.h: Adjust prototypes to match above changes.
3157 * callint.c (Fcall_interactively): Don't assume the mark's
3158 offset fits in 'int'.
3159
3160 2012-08-24 Paul Eggert <eggert@cs.ucla.edu>
3161
3162 * buffer.c, buffer.h: Use bool for boolean.
3163 * buffer.c (reset_buffer_local_variables)
3164 (buffer_lisp_local_variables, Fset_buffer_modified_p)
3165 (Frestore_buffer_modified_p, Fset_buffer_multibyte):
3166 (overlays_at, overlays_in, mouse_face_overlay_overlaps)
3167 (overlay_touches_p, overlay_strings, Foverlay_put)
3168 (report_overlay_modification, call_overlay_mod_hooks):
3169 (mmap_enlarge, mmap_set_vars):
3170 * buffer.h (buffer_has_overlays, uppercasep, lowercasep):
3171 Use bool for booleans, instead of int.
3172 * buffer.c (compact_buffer, mmap_free_1): Return void, not int,
3173 since the 1-or-0 return value is always ignored anyway.
3174 (mmap_initialized_p):
3175 * buffer.h (struct buffer_text.inhibit_shrinking): Now bool, not int.
3176 * buffer.h, lisp.h: Adjust prototypes to match above changes.
3177
3178 2012-08-23 Paul Eggert <eggert@cs.ucla.edu>
3179
3180 * bidi.c: Use bool for boolean.
3181 This is a bit more readable, and makes the text segment of bidi.o
3182 0.4% smaller on my platform (GCC 4.7.1 x86-64, Fedora 15).
3183 Presumably it's faster too.
3184 (bidi_initialized, bidi_ignore_explicit_marks_for_paragraph_level):
3185 Now bool.
3186 (bidi_cache_find_level_change, bidi_cache_iterator_state)
3187 (bidi_unshelve_cache, bidi_init_it, bidi_count_bytes)
3188 (bidi_char_at_pos, bidi_fetch_char, bidi_paragraph_init)
3189 (bidi_explicit_dir_char, bidi_level_of_next_char)
3190 (bidi_find_other_level_edge, bidi_move_to_visually_next):
3191 Use bool for booleans, instead of int.
3192 * dispextern.h (bidi_init_it, bidi_paragraph_init)
3193 (bidi_unshelve_cache): Adjust decls to match code.
3194
3195 2012-08-23 Martin Rudalics <rudalics@gmx.at>
3196
3197 * keyboard.c (Fposn_at_x_y): Do not allow internal window as
3198 argument.
3199
3200 2012-08-23 Paul Eggert <eggert@cs.ucla.edu>
3201
3202 * atimer.c, atimer.h (turn_on_atimers): Use bool for boolean.
3203 * atimer.h: Include <stdbool.h>.
3204
3205 2012-08-22 Dan Nicolaescu <dann@gnu.org>
3206
3207 * frame.h (FRAME_W32_P, FRAME_MSDOS_P, FRAME_NS_P): Change to
3208 compile time tests instead of run time tests on systems that do
3209 not use them.
3210 (FRAME_MAC_P): Remove leftover from deleted code.
3211 * frame.c (syms_of_frame): Remove leftover from deleted code.
3212
3213 2012-08-22 Jan Djärv <jan.h.d@swipnet.se>
3214
3215 * nsterm.m (insertText:): Don't clear modifiers if code is space.
3216
3217 2012-08-22 Paul Eggert <eggert@cs.ucla.edu>
3218
3219 * fontset.c (FONTSET_ADD): Return void, not Lisp_Object.
3220 Otherwise, the compiler complains about (A?B:C) where B is void
3221 and C is Lisp_Object. This fixes an incompatibility with Sun C 5.12.
3222 (fontset_add): Return void, for FONTSET_ADD.
3223
3224 2012-08-21 Paul Eggert <eggert@cs.ucla.edu>
3225
3226 * alloc.c: Use bool for booleans.
3227 (gc_in_progress, abort_on_gc)
3228 (setjmp_tested_p) [!GC_SAVE_REGISTERS_ON_STACK && !GC_SETJMP_WORKS]:
3229 (dont_register_blocks) [GC_MALLOC_CHECK]:
3230 (suppress_checking) [ENABLE_CHECKING]: Now bool, not int.
3231 (check_string_bytes, make_specified_string, memory_full)
3232 (live_string_p, live_cons_p, live_symbol_p, live_float_p)
3233 (live_misc_p, live_vector_p, live_buffer_p, mark_maybe_object)
3234 (mark_stack, valid_pointer_p, make_pure_string)
3235 (Fgarbage_collect, survives_gc_p, gc_sweep):
3236 Use bool for booleans, instead of int.
3237 (test_setjmp) [!GC_SAVE_REGISTERS_ON_STACK && !GC_SETJMP_WORKS]:
3238 Remove unused local.
3239 * alloc.c (PURE_POINTER_P):
3240 * lisp.h (STRING_MULTIBYTE): Document that it returns a boolean.
3241 * editfns.c (Fformat):
3242 * fileio.c (Fexpand_file_name, Fsubstitute_in_file_name)
3243 (Fdo_auto_save):
3244 * fns.c (sweep_weak_table):
3245 * lisp.h (suppress_checking, push_message, survives_gc_p)
3246 (make_pure_string, gc_in_progress, abort_on_gc):
3247 * lread.c (readchar, read1):
3248 * print.c (Fprin1_to_string):
3249 * xdisp.c (push_message):
3250 Use bool for booleans affected directly or indirectly by
3251 alloc.c's changes.
3252
3253 Make recently-introduced setters macros.
3254 * fontset.c (set_fontset_id, set_fontset_name, set_fontset_ascii)
3255 (set_fontset_base, set_fontset_frame, set_fontset_nofont_face)
3256 (set_fontset_default, set_fontset_fallback): Rename from their
3257 upper-case counterparts, and make them functions rather than macros.
3258 This is more consistent with the other recently-introduced setters.
3259 These don't need to be inline, since they're local.
3260
3261 2012-08-21 Jan Djärv <jan.h.d@swipnet.se>
3262
3263 * nsterm.m (fd_handler:): Alloc and release a NSAutoreleasePool in
3264 the loop (Bug#12247).
3265
3266 2012-08-21 Paul Eggert <eggert@cs.ucla.edu>
3267
3268 * lisp.h (vcopy): Use memcpy rather than our own loop.
3269 This fixes a performance regression introduced by the recent
3270 addition of vcopy. This means 'vcopy' will need to be modified
3271 for a copying collector, but that's OK. Also, tighten the
3272 checking in the assertion.
3273
3274 2012-08-21 Eli Zaretskii <eliz@gnu.org>
3275
3276 * w32uniscribe.c (uniscribe_shape): Fix producing gstring
3277 components for RTL text (Bug#11860). Adjust X-OFFSET of each
3278 non-base glyph for the width of the base character, according to
3279 what x_draw_composite_glyph_string_foreground expects.
3280 Generate WADJUST value according to composition_gstring_width's
3281 expectations, to produce correct width of the composed character.
3282 Reverse the sign of the DU offset produced by ScriptPlace.
3283
3284 2012-08-21 Paul Eggert <eggert@cs.ucla.edu>
3285
3286 * dbusbind.c (xd_remove_watch): Do not assume C99 comments.
3287
3288 2012-08-21 Dmitry Antipov <dmantipov@yandex.ru>
3289
3290 Avoid direct writes to contents member of struct Lisp_Vector.
3291 * lisp.h (vcopy): New function to copy data into vector.
3292 * dispnew.c (Fframe_or_buffer_changed_p): Use AREF and ASET.
3293 * fns.c (Ffillarray): Use ASET.
3294 * keyboard.c (timer_check_2): Use AREF and ASET.
3295 (append_tool_bar_item, Frecent_keys): Use vcopy.
3296 * lread.c (read_vector): Use ASET.
3297 * msdos.c (Frecent_doskeys): Use vcopy.
3298 * xface.c (Finternal_copy_lisp_face): Use vcopy.
3299 (Finternal_merge_in_global_face): Use ASET and vcopy.
3300 * xfont.c (xfont_list_pattern): Likewise.
3301
3302 2012-08-21 Martin Rudalics <rudalics@gmx.at>
3303
3304 * window.c (Fwindow_point): For the selected window always return
3305 the position of its buffer's point.
3306 (Fset_window_point): For the selected window always go in its
3307 buffer to the specified position.
3308
3309 2012-08-21 Dmitry Antipov <dmantipov@yandex.ru>
3310
3311 Setter macros for fontsets.
3312 * fontset.c (SET_FONTSET_ID, SET_FONTSET_NAME, SET_FONTSET_ASCII)
3313 (SET_FONTSET_BASE, SET_FONTSET_FRAME, SET_FONTSET_NOFONT_FACE)
3314 (SET_FONTSET_DEFAULT, SET_FONTSET_FALLBACK): New macros.
3315 Adjust users.
3316
3317 2012-08-20 Glenn Morris <rgm@gnu.org>
3318
3319 * Makefile.in (emacs$(EXEEXT), bootstrap-emacs$(EXEEXT)):
3320 Don't assume that `ln -f' works.
3321
3322 2012-08-20 Eli Zaretskii <eliz@gnu.org>
3323
3324 * .gdbinit: Use "set $dummy = ..." to avoid warnings from GDB 7.5
3325 and later about non-assignments with no effect. See discussion at
3326 http://sourceware.org/ml/gdb-patches/2012-08/msg00518.html for
3327 details.
3328
3329 2012-08-20 Dmitry Antipov <dmantipov@yandex.ru>
3330
3331 Inline setter functions for Lisp_Objects slots of struct specbinding.
3332 * eval.c (set_specpdl_symbol, set_specpdl_old_value): New functions.
3333 Adjust users.
3334
3335 2012-08-20 Martin Rudalics <rudalics@gmx.at>
3336
3337 * window.c (select_window): Always make selected window's buffer
3338 current.
3339
3340 2012-08-20 Dmitry Antipov <dmantipov@yandex.ru>
3341
3342 Use AREF and ASET for docstrings of category tables.
3343 * category.h (CATEGORY_DOCSTRING): Use AREF.
3344 (SET_CATEGORY_DOCSTRING): Use ASET.
3345 * category.c (Fdefine_category): Use SET_CATEGORY_DOCSTRING.
3346
3347 2012-08-20 Dmitry Antipov <dmantipov@yandex.ru>
3348
3349 Inline setter functions for hash table members.
3350 * lisp.h (set_hash_key, set_hash_value, set_hash_next)
3351 (set_hash_hash, set_hash_index): Rename with _slot suffix.
3352 (set_hash_key_and_value, set_hash_index, set_hash_next)
3353 (set_hash_hash): New functions.
3354 * charset.c, fns.c: Adjust users.
3355
3356 2012-08-20 Dmitry Antipov <dmantipov@yandex.ru>
3357
3358 Inline getter and setter functions for per-buffer values.
3359 * buffer.h (per_buffer_default, set_per_buffer_default)
3360 (per_buffer_value, set_per_buffer_value): New functions.
3361 (PER_BUFFER_VALUE, PER_BUFFER_DEFAULT): Remove.
3362 * buffer.c, data.c: Adjust users.
3363
3364 2012-08-20 Juanma Barranquero <lekktu@gmail.com>
3365
3366 * makefile.w32-in ($(BLD)/vm-limit.$(O)): Update dependencies.
3367
3368 2012-08-19 Paul Eggert <eggert@cs.ucla.edu>
3369
3370 Rely on <config.h> + <unistd.h> to declare 'environ',
3371 as gnulib does this if the system doesn't.
3372 * callproc.c, editfns.c, process.c (environ) [!USE_CRT_DLL]:
3373 Remove declaration. MS-Windows declares it on stdlib.h which is
3374 included by conf_post.h.
3375 * emacs.c (environ) [DOUG_LEA_MALLOC]:
3376 * vm-limit.c (environ) [ORDINARY_LINK]: Remove decl.
3377 * vm-limit.c: Include <unistd.h>, for 'environ'.
3378
3379 * unexaix.c, unexcoff.c: Include "mem-limits.h".
3380 (start_of_data): Remove decl; mem-limits.h provides it.
3381
3382 * xdisp.c (handle_invisible_prop): Make it a bit faster
3383 and avoid a gcc -Wmaybe-uninitialized diagnostic.
3384
3385 2012-08-19 Chong Yidong <cyd@gnu.org>
3386
3387 * xdisp.c (handle_invisible_prop): Fix ellipses at overlay string
3388 ends (Bug#3874).
3389
3390 2012-08-19 Andreas Schwab <schwab@linux-m68k.org>
3391
3392 * .gdbinit: Use call instead of set when calling a function in the
3393 inferior.
3394
3395 * data.c (set_internal): Don't use set_blv_found.
3396 (Fkill_local_variable): Likewise.
3397
3398 2012-08-18 Alp Aker <alp.tekin.aker@gmail.com>
3399
3400 * nsfont.m (ns_ascii_average_width): Ensure the string
3401 ascii_printable is initialized with a null-terminated character
3402 array. Otherwise, it can contain undesired extra characters.
3403
3404 2012-08-18 Paul Eggert <eggert@cs.ucla.edu>
3405
3406 port new setting code to Sun C 5.8 2005/10/13
3407 * chartab.c, lisp.h (char_table_set, char_table_set_range):
3408 Return void, not Lisp_Object. Otherwise, the compiler
3409 complains about (A?B:C) where B is void and C is Lisp_Object
3410 when compiling CHAR_TABLE_SET, due to the recent change to
3411 the API of sub_char_table_set_contents.
3412
3413 2012-08-18 Chong Yidong <cyd@gnu.org>
3414
3415 * xdisp.c (handle_invisible_prop): Obey TEXT_PROP_MEANS_INVISIBLE
3416 for the string case (Bug#3874).
3417
3418 2012-08-18 Paul Eggert <eggert@cs.ucla.edu>
3419
3420 * buffer.h (BSET): Remove (Bug#12215).
3421 Replace all uses with calls to new setter functions.
3422 (bset_bidi_paragraph_direction, bset_case_canon_table)
3423 (bset_case_eqv_table, bset_directory, bset_display_count)
3424 (bset_display_time, bset_downcase_table)
3425 (bset_enable_multibyte_characters, bset_filename, bset_keymap)
3426 (bset_last_selected_window, bset_local_var_alist)
3427 (bset_mark_active, bset_point_before_scroll, bset_read_only)
3428 (bset_truncate_lines, bset_undo_list, bset_upcase_table)
3429 (bset_width_table):
3430 * buffer.c (bset_abbrev_mode, bset_abbrev_table)
3431 (bset_auto_fill_function, bset_auto_save_file_format)
3432 (bset_auto_save_file_name, bset_backed_up, bset_begv_marker)
3433 (bset_bidi_display_reordering, bset_buffer_file_coding_system)
3434 (bset_cache_long_line_scans, bset_case_fold_search)
3435 (bset_ctl_arrow, bset_cursor_in_non_selected_windows)
3436 (bset_cursor_type, bset_display_table, bset_extra_line_spacing)
3437 (bset_file_format, bset_file_truename, bset_fringe_cursor_alist)
3438 (bset_fringe_indicator_alist, bset_fringes_outside_margins)
3439 (bset_header_line_format, bset_indicate_buffer_boundaries)
3440 (bset_indicate_empty_lines, bset_invisibility_spec)
3441 (bset_left_fringe_width, bset_major_mode, bset_mark)
3442 (bset_minor_modes, bset_mode_line_format, bset_mode_name)
3443 (bset_name, bset_overwrite_mode, bset_pt_marker)
3444 (bset_right_fringe_width, bset_save_length)
3445 (bset_scroll_bar_width, bset_scroll_down_aggressively)
3446 (bset_scroll_up_aggressively, bset_selective_display)
3447 (bset_selective_display_ellipses, bset_vertical_scroll_bar_type)
3448 (bset_word_wrap, bset_zv_marker):
3449 * category.c (bset_category_table):
3450 * syntax.c (bset_syntax_table):
3451 New setter functions.
3452
3453 * process.h (PSET): Remove (Bug#12215).
3454 Replace all uses with calls to new setter functions.
3455 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
3456 (PROCESS_INLINE): New macro.
3457 (pset_childp): New setter function.
3458 (pset_gnutls_cred_type) [HAVE_GNUTLS]: New setter function.
3459 * process.c (PROCESS_INLINE):
3460 Define to EXTERN_INLINE, so that the corresponding functions
3461 are compiled into code.
3462 (pset_buffer, pset_command, pset_decode_coding_system)
3463 (pset_decoding_buf, pset_encode_coding_system)
3464 (pset_encoding_buf, pset_filter, pset_log, pset_mark, pset_name)
3465 (pset_plist, pset_sentinel, pset_status, pset_tty_name)
3466 (pset_type, pset_write_queue): New setter functions.
3467
3468 * window.h (WSET): Remove (Bug#12215).
3469 Replace all uses with calls to new setter functions.
3470 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
3471 (WINDOW_INLINE): New macro.
3472 (wset_buffer, wset_frame, wset_left_col, wset_next, wset_prev)
3473 (wset_redisplay_end_trigger, wset_top_line, wset_total_cols)
3474 (wset_total_lines, wset_vertical_scroll_bar)
3475 (wset_window_end_pos, wset_window_end_valid)
3476 (wset_window_end_vpos): New setter functions.
3477 * window.c (WINDOW_INLINE):
3478 Define to EXTERN_INLINE, so that the corresponding functions
3479 are compiled into code.
3480 (wset_combination_limit, wset_dedicated, wset_display_table)
3481 (wset_hchild, wset_left_fringe_width, wset_left_margin_cols)
3482 (wset_new_normal, wset_new_total, wset_next_buffers)
3483 (wset_normal_cols, wset_normal_lines, wset_parent, wset_pointm)
3484 (wset_prev_buffers, wset_right_fringe_width)
3485 (wset_right_margin_cols, wset_scroll_bar_width, wset_start)
3486 (wset_temslot, wset_vchild, wset_vertical_scroll_bar_type)
3487 (wset_window_parameters):
3488 * xdisp.c (wset_base_line_number, wset_base_line_pos)
3489 (wset_column_number_displayed, wset_region_showing):
3490 New setter functions.
3491
3492 * termhooks.h (TSET): Remove (Bug#12215).
3493 Replace all uses with calls to new setter functions.
3494 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
3495 (TERMHOOKS_INLINE): New macro.
3496 (tset_charset_list, tset_selection_alist): New setter functions.
3497 * terminal.c (TERMHOOKS_INLINE):
3498 Define to EXTERN_INLINE, so that the corresponding functions
3499 are compiled into code.
3500 (tset_param_alist): New setter function.
3501
3502 2012-08-17 Paul Eggert <eggert@cs.ucla.edu>
3503
3504 * keyboard.h (KSET): Remove (Bug#12215).
3505 Replace all uses with calls to new setter functions.
3506 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
3507 (KEYBOARD_INLINE): New macro.
3508 (kset_default_minibuffer_frame, kset_defining_kbd_macro)
3509 (kset_input_decode_map, kset_last_command, kset_last_kbd_macro)
3510 (kset_prefix_arg, kset_system_key_alist, kset_window_system):
3511 New setter functions.
3512 * keyboard.c (KEYBOARD_INLINE):
3513 Define to EXTERN_INLINE, so that the corresponding functions
3514 are compiled into code.
3515 (kset_echo_string, kset_kbd_queue)
3516 (kset_keyboard_translate_table, kset_last_prefix_arg)
3517 (kset_last_repeatable_command, kset_local_function_key_map)
3518 (kset_overriding_terminal_local_map, kset_real_last_command)
3519 (kset_system_key_syms): New setter functions.
3520
3521 * frame.h (FSET): Remove (Bug#12215).
3522 Replace all uses with calls to new setter functions.
3523 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
3524 (FRAME_INLINE): New macro.
3525 (fset_buffer_list, fset_buried_buffer_list, fset_condemned_scroll_bars)
3526 (fset_current_tool_bar_string, fset_desired_tool_bar_string)
3527 (fset_face_alist, fset_focus_frame, fset_icon_name, fset_menu_bar_items)
3528 (fset_menu_bar_vector, fset_menu_bar_window, fset_name)
3529 (fset_param_alist, fset_root_window, fset_scroll_bars)
3530 (fset_selected_window, fset_title, fset_tool_bar_items)
3531 (fset_tool_bar_position, fset_tool_bar_window): New functions.
3532 * frame.c (FRAME_INLINE):
3533 Define to EXTERN_INLINE, so that the corresponding functions
3534 are compiled into code.
3535 (fset_buffer_predicate, fset_minibuffer_window): New setter functions.
3536
3537 A few more naming-convention fixes for getters and setters.
3538 * buffer.c (set_buffer_overlays_before): Move here from buffer.h,
3539 and rename from buffer_overlays_set_before.
3540 (set_buffer_overlays_after): Move here from buffer.h, and rename
3541 from buffer_overlays_set_after.
3542 * buffer.h (buffer_intervals): Rename from buffer_get_intervals.
3543 All uses changed.
3544 (set_buffer_intervals): Rename from buffer_set_intervals.
3545 * intervals.c (set_interval_object): Move here from intervals.h,
3546 and rename from interval_set_object.
3547 (set_interval_left): Move here from intervals.h, and rename from
3548 interval_set_left.
3549 (set_interval_right): Move here from intervals.h, and rename from
3550 interval_set_right.
3551 (copy_interval_parent): Move here from intervals.h, and rename from
3552 interval_copy_parent.
3553 * intervals.h (set_interval_parent): Rename from interval_set_parent.
3554 (set_interval_plist): Rename from interval_set_plist.
3555 Return void, not Lisp_Object, since no caller uses the result.
3556 * lisp.h (string_intervals): Rename from string_get_intervals.
3557 (set_string_intervals): Rename from string_set_intervals.
3558
3559 * lisp.h (set_char_table_extras): Rename from char_table_set_extras.
3560 (set_char_table_contents): Rename from char_table_set_contents.
3561 (set_sub_char_table_contents): Rename from sub_char_table_set_contents.
3562 All uses changed. See the end of
3563 <http://lists.gnu.org/archive/html/emacs-devel/2012-08/msg00549.html>.
3564
3565 * lisp.h (CSET): Remove (Bug#12215).
3566 (set_char_table_ascii, set_char_table_defalt, set_char_table_parent)
3567 (set_char_table_purpose): New functions,
3568 replacing CSET. All uses changed. For example, replace
3569 "CSET (XCHAR_TABLE (char_table), parent, parent);" with
3570 "set_char_table_parent (char_table, parent);".
3571 The old version was confusing because it used the same name
3572 'parent' for two different things.
3573
3574 2012-08-17 Dmitry Antipov <dmantipov@yandex.ru>
3575
3576 Functions to get and set Lisp_Object fields of buffer-local variables.
3577 * lisp.h (blv_found, set_blv_found, blv_value, set_blv_value)
3578 (set_blv_where, set_blv_defcell, set_blv_valcell): New functions.
3579 (BLV_FOUND, SET_BLV_FOUND, BLV_VALUE, SET_BLV_VALUE): Remove.
3580 * data.c, eval.c, frame.c: Adjust users.
3581
3582 2012-08-17 Chong Yidong <cyd@gnu.org>
3583
3584 * xfaces.c (merge_face_vectors): If the target font specfies a
3585 font spec, make the font's attributes take precedence over
3586 directly-specified attributes.
3587 (merge_face_ref): Recognize :font.
3588
3589 2012-08-17 Dmitry Antipov <dmantipov@yandex.ru>
3590
3591 Do not use memcpy for copying intervals.
3592 * intervals.c (reproduce_interval): New function.
3593 (reproduce_tree, reproduce_tree_obj): Use it.
3594 (reproduce_tree_obj): Remove prototype.
3595
3596 2012-08-17 Paul Eggert <eggert@cs.ucla.edu>
3597
3598 * lisp.h (duration_to_sec_usec): Remove unused decl.
3599
3600 2012-08-17 Alp Aker <alp.tekin.aker@gmail.com>
3601
3602 * nsfont.m (ns_ascii_average_width): Send initWithFormat selector
3603 to an allocated instance of NSString, not to the class itself.
3604
3605 2012-08-17 Juanma Barranquero <lekktu@gmail.com>
3606
3607 * makefile.w32-in (C_CTYPE_H): New macro.
3608 (LISP_H, $(BLD)/ccl.$(O), $(BLD)/doc.$(O), $(BLD)/w32console.$(O)):
3609 ($(BLD)/fontset.$(O), $(BLD)/frame.$(O), $(BLD)/composite.$(O)):
3610 ($(BLD)/sysdep.$(O), $(BLD)/w32uniscribe.$(O)): Update dependencies.
3611
3612 2012-08-16 Paul Eggert <eggert@cs.ucla.edu>
3613
3614 Use ASCII tests for character types.
3615 * category.c, dispnew.c, doprnt.c, editfns.c, syntax.c, term.c:
3616 * xfns.c, xterm.c:
3617 Don't include <ctype.h>; was not needed.
3618 * charset.c, doc.c, fileio.c, font.c, frame.c, gtkutil.c, image.c:
3619 * sysdep.c, xfaces.c:
3620 Include <c-ctype.h> instead of <ctype.h>.
3621 * nsterm.m: Include <c-ctype.h>.
3622 * charset.c (read_hex):
3623 * doc.c (Fsnarf_documentation):
3624 * fileio.c (IS_DRIVE) [WINDOWSNT]:
3625 (DRIVE_LETTER) [DOS_NT]:
3626 (Ffile_name_directory, Fexpand_file_name)
3627 (Fsubstitute_in_file_name):
3628 * font.c (font_parse_xlfd, font_parse_fcname):
3629 * frame.c (x_set_font_backend):
3630 * gtkutil.c (xg_get_font):
3631 * image.c (xbm_scan, xpm_scan, pbm_scan_number):
3632 * nsimage.m (hexchar):
3633 * nsterm.m (ns_xlfd_to_fontname):
3634 * sysdep.c (system_process_attributes):
3635 * xfaces.c (hash_string_case_insensitive):
3636 Use C-locale tests instead of locale-specific tests for character
3637 types, since we want the ASCII interpretation here, not the
3638 interpretation suitable for whatever happens to be the current locale.
3639
3640 2012-08-16 Martin Rudalics <rudalics@gmx.at>
3641
3642 Consistently check windows for validity/liveness
3643 (Bug#11984, Bug#12025, Bug#12026).
3644 * lisp.h (CHECK_VALID_WINDOW): New macro.
3645 * window.c (decode_window): Rename to decode_live_window.
3646 (decode_valid_window, Fwindow_valid_p): New functions.
3647 (Fwindow_frame, Fframe_root_window, Fwindow_minibuffer_p)
3648 (Fframe_first_window, Fframe_selected_window, Fwindow_parent)
3649 (Fwindow_top_child, Fwindow_left_child, Fwindow_next_sibling)
3650 (Fwindow_prev_sibling, Fwindow_combination_limit)
3651 (Fset_window_combination_limit, Fwindow_use_time)
3652 (Fwindow_total_height, Fwindow_total_width, Fwindow_new_total)
3653 (Fwindow_normal_size, Fwindow_new_normal, Fwindow_left_column)
3654 (Fwindow_top_line, Fwindow_body_height, Fwindow_body_width)
3655 (Fwindow_hscroll, Fset_window_hscroll)
3656 (Fwindow_redisplay_end_trigger)
3657 (Fset_window_redisplay_end_trigger, Fwindow_edges)
3658 (Fwindow_pixel_edges, Fwindow_absolute_pixel_edges)
3659 (Fwindow_inside_edges, Fwindow_inside_pixel_edges)
3660 (Fcoordinates_in_window_p, Fwindow_point, Fwindow_start)
3661 (Fwindow_end, Fset_window_point, Fset_window_start)
3662 (Fpos_visible_in_window_p, Fwindow_line_height)
3663 (Fwindow_dedicated_p, Fset_window_dedicated_p)
3664 (Fwindow_prev_buffers, Fset_window_prev_buffers)
3665 (Fwindow_next_buffers, Fwindow_parameters, Fwindow_parameter)
3666 (Fset_window_parameter, Fwindow_display_table)
3667 (Fset_window_display_table, Fdelete_other_windows_internal)
3668 (Fset_window_buffer, Fset_window_new_total)
3669 (Fset_window_new_normal, Fdelete_window_internal)
3670 (Fwindow_text_height, Fset_window_margins, Fwindow_margins)
3671 (Fset_window_fringes, Fwindow_fringes, Fset_window_scroll_bars)
3672 (Fwindow_scroll_bars): Check whether argument window is a valid or
3673 live window. Update doc-strings.
3674 (syms_of_window): New symbol Qwindow_valid_p.
3675 * keyboard.c (Fposn_at_x_y): Check whether argument
3676 frame_or_window denotes a valid window.
3677
3678 2012-08-16 Dmitry Antipov <dmantipov@yandex.ru>
3679
3680 Fix previous char table change.
3681 * lisp.h (CHAR_TABLE_SET): Use sub_char_table_set_contents.
3682 * chartab.c (optimize_sub_char_table): Likewise.
3683
3684 2012-08-16 Chong Yidong <cyd@gnu.org>
3685
3686 * gtkutil.c (xg_get_font): Demand an Xft font (Bug#3228).
3687
3688 * xfont.c (xfont_open):
3689 * xftfont.c (xftfont_open): Set the font's max_width field.
3690
3691 * nsfont.m (nsfont_open): Similar to the Xft backend, set
3692 min_width to space_width and average_width to the average over
3693 printable ASCII characters.
3694 (ns_char_width): Code cleanup.
3695 (ns_ascii_average_width): New utility function.
3696
3697 * font.h (struct font): Update comments.
3698
3699 2012-08-16 Dmitry Antipov <dmantipov@yandex.ru>
3700
3701 Simple interface to set Lisp_Object fields of character tables.
3702 * lisp.h (CSET): New macro.
3703 (char_table_set_extras, char_table_set_contents)
3704 (sub_char_table_set_contents): New function.
3705 * casetab.c, category.c, chartab.c, fns.c, fontset.c, search.c:
3706 * syntax.c: Adjust users.
3707
3708 2012-08-16 Stefan Monnier <monnier@iro.umontreal.ca>
3709
3710 * eval.c (eval_sub): Bind lexical-binding.
3711 * lread.c (Qlexical_binding): Make non-static.
3712
3713 2012-08-15 Jan Djärv <jan.h.d@swipnet.se>
3714
3715 * nsmenu.m (popupSession): Remove.
3716 (pop_down_menu): Remove endModalSession.
3717 (timeout_handler:): New method.
3718 (runDialogAt:): Get next timeout. Start a NSTimer with that timeout.
3719 Call runModalForWindow. Check timer_fired when it returns.
3720 If not set, cancel timer and break out of loop.
3721 Otherwise loop again, with a new timeout.
3722
3723 * nsterm.m: Include fcntl.h if present.
3724 (fd_entry, t_readfds, inNsSelect): Remove.
3725 (select_writefds, select_valid, select_timeout, selfds)
3726 (select_mutex, apploopnr): Add.
3727 (EV_TRAILER): Call kbd_buffer_store_event_hold only if q_event_ptr.
3728 Otherwise call kbd_buffer_store_event.
3729 (ns_send_appdefined): Remove release of fd_entry.
3730 (ns_read_socket): Always send appdefined. Remove inNsSelect check.
3731 Increment and decrement apploopnr.
3732 (ns_select): If no file descriptors, just do a NSTimer.
3733 Otherwise copy read/write masks and start select thread (fd_handler).
3734 Start main loop and wait for application defined event.
3735 Inform select thread to stop selecting after main loop is exited.
3736 (ns_term_init): Create selfds pipe and set non-blocking.
3737 Initialize select_mutex. Start the select thread (fd_handler).
3738 (fd_handler:): Loop forever, wait for info from the main thread
3739 to either start or stop selecting. When select returns, send
3740 and appdefined event.
3741 (sendScrollEventAtLoc:fromEvent:): Check if q_event_ptr is set.
3742 If not call kbd_buffer_store_event.
3743
3744 * nsterm.h (EmacsApp): fd_handler takes id argument.
3745 (EmacsDialogPanel): Add timer_fired and timeout_handler.
3746
3747 * gtkutil.c (xg_mark_data): Use FRAME_X_P.
3748
3749 2012-08-15 Eli Zaretskii <eliz@gnu.org>
3750
3751 * region-cache.c (move_cache_gap): Update gap_len using the actual
3752 growth of the boundaries array. Do not change cache_len.
3753 (Bug#12196)
3754
3755 2012-08-15 Dmitry Antipov <dmantipov@yandex.ru>
3756
3757 Generalize and cleanup font subsystem checks.
3758 * font.h (FONT_DEBUG, font_assert): Remove.
3759 * font.c, fontset.c, w32font.c, xfont.c, xftfont.c:
3760 Change font_assert to eassert. Use eassert where appropriate.
3761
3762 2012-08-15 Dmitry Antipov <dmantipov@yandex.ru>
3763
3764 * gtkutil.c (xg_get_font): Use pango_units_to_double.
3765
3766 2012-08-15 Chong Yidong <cyd@gnu.org>
3767
3768 * gtkutil.c (xg_get_font): Rename from xg_get_font_name.
3769 When using the new font chooser, use gtk_font_chooser_get_font_desc to
3770 extract the font descriptor instead of just the font name.
3771 In that case, return a font spec instead of a string.
3772 (x_last_font_name): Move to this file from xfns.c.
3773
3774 * xfns.c (Fx_select_font): The return value can also be a font
3775 spec. Move x_last_font_name management to gtkutil.c.
3776
3777 * xfaces.c: Make font weight and style symbols non-static.
3778
3779 2012-08-15 Stefan Monnier <monnier@iro.umontreal.ca>
3780
3781 * minibuf.c (read_minibuf): Ignore caller's inhibit-read-only
3782 (bug#12117).
3783
3784 2012-08-14 Stefan Monnier <monnier@iro.umontreal.ca>
3785
3786 * alloc.c (Fgarbage_collect): Use plural form consistently.
3787
3788 2012-08-14 Eli Zaretskii <eliz@gnu.org>
3789
3790 * keyboard.c (command_loop_1): Reset ignore_mouse_drag_p flag each
3791 iteration through the command loop. Fixes a problem whereby mouse
3792 movements are ignored until the first mouse click.
3793
3794 2012-08-14 Paul Eggert <eggert@cs.ucla.edu>
3795
3796 Use bool, not int, for Lisp booleans.
3797 This is more natural, and on my platform (GCC 4.7.1 x86-64) it
3798 makes Emacs a bit smaller and presumably a bit faster.
3799 * lisp.h: Include <stdbool.h>.
3800 (struct Lisp_Boolfwd, defvar_bool):
3801 * lread.c (defvar_bool): Use bool, not int, for Lisp booleans.
3802 * regex.c [!emacs]: Include <stdbool.h>.
3803 (false, true): Remove; <stdbool.h> does this for us now.
3804
3805 2012-08-14 Chong Yidong <cyd@gnu.org>
3806
3807 * character.c (Fcharacterp): Doc fix (Bug#12076).
3808
3809 * data.c (Findirect_variable): Doc fix (Bug#11040).
3810
3811 * chartab.c (Fmap_char_table): Doc fix (Bug#12061).
3812
3813 * editfns.c (Fformat): Doc fix (Bug#12059).
3814 (Fsave_current_buffer): Doc fix (Bug#11542).
3815
3816 2012-08-14 Barry OReilly <gundaetiapo@gmail.com> (tiny change)
3817
3818 * keyboard.c (access_keymap_keyremap): Accept anonymous functions
3819 (bug#12022).
3820
3821 2012-08-14 Martin Rudalics <rudalics@gmx.at>
3822
3823 * frame.c (make_frame_without_minibuffer, make_minibuffer_frame)
3824 (delete_frame, Fmake_frame_invisible, Ficonify_frame):
3825 * minibuf.c (choose_minibuf_frame, read_minibuf):
3826 * w32fns.c (x_create_tip_frame):
3827 * xfns.c (x_create_tip_frame): Call set_window_buffer instead of
3828 Fset_window_buffer (Bug#11984, Bug#12025, Bug#12026).
3829
3830 2012-08-14 Paul Eggert <eggert@cs.ucla.edu>
3831
3832 * intervals.c (offset_intervals): Remove obsolete comment.
3833
3834 2012-08-14 Andreas Schwab <schwab@linux-m68k.org>
3835
3836 * gtkutil.c (find_rtl_image, update_frame_tool_bar): Use NILP.
3837
3838 2012-08-14 Gergely Risko <gergely@risko.hu>
3839
3840 * coding.c (decode_coding): Record buffer modification before
3841 disabling undo_list (Bug#11773).
3842
3843 2012-08-14 Dmitry Antipov <dmantipov@yandex.ru>
3844
3845 Revert and cleanup some recent overlay changes.
3846 * buffer.h (enum overlay_type): Remove.
3847 (buffer_get_overlays, buffer_set_overlays): Likewise.
3848 (buffer_set_overlays_before, buffer_set_overlays_after):
3849 New function. Adjust users.
3850 (unchain_both): Add eassert.
3851
3852 2012-08-14 Dmitry Antipov <dmantipov@yandex.ru>
3853
3854 * gtkutil.c (update_frame_tool_bar): Use EQ where appropriate.
3855
3856 2012-08-14 Paul Eggert <eggert@cs.ucla.edu>
3857
3858 * gtkutil.c (xg_mark_data): Don't assume C99.
3859
3860 2012-08-13 Jan Djärv <jan.h.d@swipnet.se>
3861
3862 * gtkutil.c (xg_frame_tb_info): New struct.
3863 (TB_INFO_KEY): New define.
3864 (xg_free_frame_widgets): Free xg_frame_tb_info for frame if present.
3865 (xg_mark_data): Mark Lisp_Objects in xg_frame_tb_info.
3866 (xg_create_tool_bar): Allocate and initialize a xg_frame_tb_info
3867 if not present.
3868 (update_frame_tool_bar): Return early if data in xg_frame_tb_info
3869 is up to date. Otherwise store new data.
3870 (free_frame_tool_bar): Free xg_frame_tb_info if present.
3871
3872 2012-08-13 Dmitry Antipov <dmantipov@yandex.ru>
3873
3874 Use KSET for write access to Lisp_Object members of struct kboard.
3875 * keyboard.h (KSET): New macro.
3876 * callint.c, category.c, frame.c, keyboard.c, keyboard.h, macros.c:
3877 * msdos.c, nsfns.m, nsterm.m, term.c, w32fns.c, w32term.c, xfns.c:
3878 * xterm.c: Adjust users.
3879
3880 2012-08-13 Dmitry Antipov <dmantipov@yandex.ru>
3881
3882 Use BSET for write access to Lisp_Object members of struct buffer.
3883 * buffer.h (BSET): New macro.
3884 * buffer.c, casetab.c, cmds.c, coding.c, data.c, editfns.c:
3885 * fileio.c, frame.c, indent.c, insdel.c, intervals.c, keymap.c:
3886 * minibuf.c, print.c, process.c, syntax.c, undo.c, w32fns.c:
3887 * window.c, xdisp.c, xfns.c: Adjust users.
3888
3889 2012-08-11 BT Templeton <bpt@hcoop.net> (tiny change)
3890
3891 * lread.c (syms_of_lread): Initialize Vlexical_binding.
3892
3893 2012-08-11 Jan Djärv <jan.h.d@swipnet.se>
3894
3895 * nsterm.m (not_in_argv): New function.
3896 (application:openFile, application:openTempFile:):
3897 (application:openFileWithoutUI:, application:openFiles:): Open file
3898 if not_in_argv returns non-zero (bug#12171).
3899
3900 * gtkutil.c (gtk_font_chooser_dialog_new, GTK_FONT_CHOOSER)
3901 (gtk_font_chooser_set_font, gtk_font_chooser_get_font):
3902 Define for Gtk+ versions less than 3.2.
3903 (xg_get_font_name): Use those functions/macros here.
3904 Reported by Frans Oilinki <moilinki@gmail.com>.
3905
3906 2012-08-11 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
3907
3908 * unexmacosx.c (copy_data_segment): Copy initialized data in
3909 statically linked libraries from input file rather than memory.
3910
3911 * unexmacosx.c (print_load_command_name): Add cases LC_MAIN,
3912 LC_SOURCE_VERSION, and LC_DYLIB_CODE_SIGN_DRS.
3913 (dump_it) [LC_DYLIB_CODE_SIGN_DRS]: Call copy_linkedit_data.
3914
3915 2012-08-10 Glenn Morris <rgm@gnu.org>
3916
3917 * conf_post.h (IF_LINT, lint_assume): Move here from lisp.h.
3918 * lisp.h (IF_LINT, lint_assume): Move to conf_post.h.
3919
3920 2012-08-10 Dmitry Antipov <dmantipov@yandex.ru>
3921
3922 Fix last change to allow compilation with low optimization levels.
3923 * intervals.c (INTERVALS_INLINE): Define to EXTERN_INLINE.
3924 Reported by Jan Djärv <jan.h.d@swipnet.se>.
3925
3926 2012-08-10 Dmitry Antipov <dmantipov@yandex.ru>
3927
3928 Use common inline syntax in intervals.h.
3929 * intervals.h (INTERVALS_INLINE): New macro.
3930 Change all users from LISP_INLINE.
3931
3932 2012-08-10 Dmitry Antipov <dmantipov@yandex.ru>
3933
3934 Define Qnone once for all platforms.
3935 * frame.c (Qnone): Define here.
3936 (syms_of_frame): DEFSYM it.
3937 * lisp.h (Qnone): New declaration.
3938 * nsfns.m, nsterm.h, nsterm.m, w32fns.c, w32font.c:
3939 * xfns.c: Remove duplication. Adjust users.
3940
3941 2012-08-10 Dmitry Antipov <dmantipov@yandex.ru>
3942
3943 Remove unused macros from intervals.h.
3944 * intervals.h (MERGE_INSERTIONS, DISPLAY_INVISIBLE_GLYPH): Remove.
3945 * intervals.c: Adjust comment.
3946
3947 2012-08-10 Eli Zaretskii <eliz@gnu.org>
3948
3949 * w32fns.c <w32_unicode_gui>: New static variable.
3950 (globals_of_w32fns): Initialize it according to os_subtype.
3951 (w32_init_class, w32_msg_pump, w32_wnd_proc): Use it instead of
3952 testing os_subtype.
3953
3954 2012-08-10 Joakim Hårsman <joakim.harsman@gmail.com> (tiny change)
3955 Eli Zaretskii <eliz@gnu.org>
3956
3957 Fix bug #10299 with Unicode characters sent by customized
3958 keyboards created by MSKLC.
3959 * w32fns.c (INIT_WINDOW_CLASS): New macro.
3960 (w32_init_class): Use it to initialize the Emacs class with either
3961 ANSI or Unicode API calls.
3962 (w32_msg_pump): Call GetMessageW and DispatchMessageW on NT and
3963 later.
3964 (w32_wnd_proc): If the character code sent by WM_CHAR or
3965 WM_SYSCHAR is above 255, post a WM_UNICHAR message, not the
3966 original message. Call DefWindowProcW on NT and later.
3967
3968 2012-08-10 Glenn Morris <rgm@gnu.org>
3969
3970 * Makefile.in (config_h): Fix conf_post.h out-of-tree build location.
3971
3972 * lisp.h (DIRECTORY_SEP): Let configure set it.
3973
3974 2012-08-09 Dmitry Antipov <dmantipov@yandex.ru>
3975
3976 Use TSET for write access to Lisp_Object slots of struct terminal.
3977 * termhooks.h (TSET): New macro.
3978 * coding.c, terminal.c, xselect.c: Adjust users.
3979
3980 2012-08-08 Stefan Monnier <monnier@iro.umontreal.ca>
3981
3982 * xdisp.c (safe_eval_handler): Remove prototype. Receive args describing
3983 the failing expression, include them in the error message.
3984 * eval.c (internal_condition_case_n): Pass nargs and args to hfun.
3985 * lisp.h (internal_condition_case_n): Update declaration.
3986
3987 2012-08-08 Dmitry Antipov <dmantipov@yandex.ru>
3988
3989 Inline functions to examine and change buffer overlays.
3990 * buffer.c (unchain_both): New function.
3991 * buffer.h (buffer_get_overlays, buffer_set_overlays):
3992 (buffer_has_overlays): New function.
3993 (enum overlay_type): New enum.
3994 * alloc.c, buffer.c, editfns.c, fileio.c, indent.c:
3995 * insdel.c, intervals.c, print.c, xdisp.c: Adjust users.
3996
3997 2012-08-08 Dmitry Antipov <dmantipov@yandex.ru>
3998
3999 Inline functions to examine and change buffer intervals.
4000 * alloc.c (mark_interval_tree): Remove.
4001 (MARK_INTERVAL_TREE): Simplify.
4002 (UNMARK_BALANCE_INTERVALS): Remove. Adjust users.
4003 * intervals.c (buffer_balance_intervals): New function.
4004 (graft_intervals_into_buffer): Adjust indentation.
4005 (set_intervals_multibyte): Simplify.
4006 * buffer.h (BUF_INTERVALS): Remove.
4007 (buffer_get_intervals, buffer_set_intervals): New function.
4008 * alloc.c, buffer.c, editfns.c, fileio.c, indent.c, insdel.c:
4009 * intervals.c, textprop.c: Adjust users.
4010
4011 2012-08-08 Dmitry Antipov <dmantipov@yandex.ru>
4012
4013 Inline functions to examine and change string intervals.
4014 * lisp.h (STRING_INTERVALS, STRING_SET_INTERVALS): Remove.
4015 (string_get_intervals, string_set_intervals): New function.
4016 * alloc.c, buffer.c, editfns.c, fns.c, insdel.c, intervals.c:
4017 * lread.c, print.c, textprop.c: Adjust users.
4018
4019 2012-08-08 Glenn Morris <rgm@gnu.org>
4020
4021 * lisp.mk (lisp): Remove language/persian.elc.
4022
4023 2012-08-08 Dmitry Antipov <dmantipov@yandex.ru>
4024
4025 Cleanup intervals.
4026 * intervals.h (NULL_INTERVAL, DEFAULT_INTERVAL): Remove.
4027 (NULL_INTERVAL_P): Likewise. Adjust users.
4028 (FRONT_STICKY_P, END_NONSTICKY_P, FRONT_NONSTICKY_P):
4029 Adjust comment. Move under #if 0.
4030 * alloc.c, buffer.c, editfns.c, fns.c, insdel.c, intervals.c:
4031 * print.c, syntax.c, textprop.c, xdisp.c: Adjust users.
4032
4033 2012-08-08 Dmitry Antipov <dmantipov@yandex.ru>
4034
4035 Check total length of intervals with eassert.
4036 * intervals.h (CHECK_TOTAL_LENGTH): Remove.
4037 * intervals.c: Change all users to eassert.
4038
4039 2012-08-07 Eli Zaretskii <eliz@gnu.org>
4040
4041 * .gdbinit (xframe, xwindow, nextcons, xcar, xcdr, xlist):
4042 Rename fields to match removal of FGET and WGET and disuse of
4043 INTERNAL_FIELD in Lisp_Cons.
4044
4045 2012-08-07 Dmitry Antipov <dmantipov@yandex.ru>
4046
4047 Revert and cleanup Lisp_Cons, Lisp_Misc and Lisp_Symbol things.
4048 * lisp.h (struct Lisp_Symbol): Change xname to meaningful
4049 name since all xname users are fixed long time ago. Do not
4050 use INTERNAL_FIELD.
4051 (set_symbol_name, set_symbol_function, set_symbol_plist):
4052 (set_symbol_next, set_overlay_plist): New function.
4053 (struct Lisp_Cons): Do not use INTERNAL_FIELD.
4054 (struct Lisp_Overlay): Likewise.
4055 (CVAR, MVAR, SVAR): Remove.
4056 * alloc.c, buffer.c, buffer.h, bytecode.c, cmds.c, data.c:
4057 * doc.c, eval.c, fns.c, keyboard.c, lread.c, nsselect.m:
4058 * xterm.c: Adjust users.
4059 * .gdbinit: Change to use name field of struct Lisp_Symbol
4060 where appropriate.
4061
4062 2012-08-07 Dmitry Antipov <dmantipov@yandex.ru>
4063
4064 Basic functions to set Lisp_Object and pointer slots of intervals.
4065 * intervals.h (interval_set_parent, interval_set_object):
4066 (interval_set_left, interval_set_right, interval_set_plist):
4067 (interval_copy_parent): New function.
4068 (SET_INTERVAL_OBJECT, SET_INTERVAL_PARENT, INTERVAL_PTR_SIZE): Remove.
4069 (RESET_INTERVAL, COPY_INTERVAL_CACHE, MERGE_INTERVAL_CACHE):
4070 Adjust indentation.
4071 (INTERVAL_SIZE): Remove. Adjust users.
4072 * alloc.c, intervals.c, lread.c, textprop.c: Use new functions.
4073
4074 2012-08-07 Dmitry Antipov <dmantipov@yandex.ru>
4075
4076 Drop PGET and revert read access to Lisp_Objects slots of Lisp_Process.
4077 * process.h (PGET): Remove.
4078 (struct Lisp_Process): Do not use INTERNAL_FIELD.
4079 * gnutls.c, print.c, process.c, sysdep.c, w32.c, xdisp.c: Adjust users.
4080
4081 2012-08-07 Dmitry Antipov <dmantipov@yandex.ru>
4082
4083 Drop WGET and revert read access to Lisp_Objects slots of struct window.
4084 * window.h (WGET): Remove.
4085 (struct window): Do not use INTERNAL_FIELD.
4086 * alloc.c, buffer.c, composite.c, dispextern.h, dispnew.c, editfns.c:
4087 * fileio.c, font.c, fontset.c, frame.c, frame.h, fringe.c, indent.c:
4088 * insdel.c, keyboard.c, keymap.c, lisp.h, minibuf.c, msdos.c, nsfns.m:
4089 * nsmenu.m, nsterm.m, print.c, textprop.c, w32fns.c, w32menu.c:
4090 * w32term.c, window.c, xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c:
4091 Adjust users.
4092
4093 2012-08-07 Chong Yidong <cyd@gnu.org>
4094
4095 * window.c (Fwindow_edges, Fwindow_pixel_edges)
4096 (Fwindow_absolute_pixel_edges, Fdelete_other_windows_internal)
4097 (Fdelete_window_internal): Signal an error if the window is not on
4098 a live frame (Bug#12025).
4099
4100 2012-08-07 Dmitry Antipov <dmantipov@yandex.ru>
4101
4102 Drop FGET and revert read access to Lisp_Objects slots of struct frame.
4103 * frame.h (FGET): Remove.
4104 (struct frame): Do not use INTERNAL_FIELD.
4105 * buffer.c, data.c, dispnew.c, dosfns.c, eval.c, fontset.c, frame.c:
4106 * fringe.c, gtkutil.c, minibuf.c, msdos.c, nsfns.m, nsmenu.m, nsterm.m:
4107 * print.c, term.c, w32fns.c, w32menu.c, w32term.c, window.c, window.h:
4108 * xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c: Adjust users.
4109
4110 2012-08-06 Juanma Barranquero <lekktu@gmail.com>
4111
4112 * w32.c: Silence compiler warnings.
4113 (map_w32_filename): Remove unused variable `is_fat'.
4114 (chase_symlinks): Add parentheses around expression.
4115
4116 2012-08-06 Glenn Morris <rgm@gnu.org>
4117
4118 * sysdep.c: Respect BROKEN_GETWD.
4119
4120 * dispnew.c (GNU_LIBRARY_PENDING_OUTPUT_COUNT, PENDING_OUTPUT_COUNT):
4121 Let configure handle it.
4122 (stdio_ext.h) [DISPNEW_NEEDS_STDIO_EXT]: Include it.
4123
4124 2012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
4125
4126 Use GCALIGNMENT where appropriate.
4127 * alloc.c (XMALLOC_HEADER_ALIGNMENT, roundup_size):
4128 (union aligned_Lisp_Symbol, union aligned_Lisp_Misc):
4129 (mark_maybe_pointer, pure_alloc): Change to use GCALIGNMENT.
4130
4131 2012-08-06 Eli Zaretskii <eliz@gnu.org>
4132
4133 * w32menu.c (set_frame_menubar, initialize_frame_menubar):
4134 Don't use FRAME_MENU_BAR_ITEMS as an lvalue.
4135
4136 2012-08-06 Stefan Monnier <monnier@iro.umontreal.ca>
4137
4138 * buffer.h (struct buffer): Revert `indirections' to a simple int;
4139 that should be sufficient for everyone.
4140
4141 2012-08-06 Jan Djärv <jan.h.d@swipnet.se>
4142
4143 * keyboard.c (timer_check_2): Add break so timer_check returns next
4144 timeout.
4145
4146 2012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
4147
4148 Fix Windows build errors introduced after converting to WGET and WSET.
4149 * w32term.c (w32_set_vertical_scroll_bar): Change to use WSET.
4150 Reported by Andy Moreton <andrewjmoreton@gmail.com>.
4151
4152 2012-08-06 Jan Djärv <jan.h.d@swipnet.se>
4153
4154 * nsterm.m (ns_frame_rehighlight): Use FSET.
4155
4156 * nsmenu.m (ns_update_menubar): Use FSET.
4157
4158 2012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
4159
4160 Separate read and write access to Lisp_Object slots of Lisp_Process.
4161 * process.h (PGET, PSET): New macros similar to AREF and ASET.
4162 * gnutls.c, print.c, process.c, sysdep.c, w32.c, xdisp.c: Adjust users.
4163
4164 2012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
4165
4166 Separate read and write access to Lisp_Object slots of struct window.
4167 * window.h (WGET, WSET): New macros similar to AREF and ASET.
4168 * alloc.c, buffer.c, composite.c, dispextern.h, dispnew.c, editfns.c:
4169 * fileio.c, font.c, fontset.c, frame.c, frame.h, fringe.c, indent.c:
4170 * insdel.c, keyboard.c, keymap.c, lisp.h, minibuf.c, msdos.c, nsfns.m:
4171 * nsmenu.m, nsterm.m, print.c, textprop.c, w32fns.c, w32menu.c:
4172 * w32term.c, window.c, xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c:
4173 Adjust users.
4174
4175 2012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
4176
4177 Fix Windows build errors introduced after converting to FGET and FSET.
4178 * w32term.c (x_frame_rehighlight, x_scroll_bar_create):
4179 (w32_condemn_scroll_bars, w32_redeem_scroll_bar):
4180 (w32_judge_scroll_bars): Change to use FSET.
4181 Reported by Andy Moreton <andrewjmoreton@gmail.com>.
4182
4183 2012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
4184
4185 Fix replacement typo.
4186 * window.c (replace_window): Set root_window instead of
4187 selected_window. This fixes a total window subsystem
4188 malfunction reported by Bastien Guerry <bzg@gnu.org>.
4189
4190 2012-08-06 Glenn Morris <rgm@gnu.org>
4191
4192 * lisp.mk (lisp): Add language/persian.elc.
4193
4194 2012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
4195
4196 Separate read and write access to Lisp_Object slots of struct frame.
4197 * frame.h (FGET, FSET): New macros similar to AREF and ASET.
4198 * buffer.c, data.c, dispnew.c, dosfns.c, eval.c, fontset.c, frame.c:
4199 * fringe.c, gtkutil.c, minibuf.c, msdos.c, nsfns.m, nsmenu.m, nsterm.m:
4200 * print.c, term.c, w32fns.c, w32menu.c, w32term.c, window.c, window.h:
4201 * xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c: Adjust users.
4202
4203 2012-08-05 Andreas Schwab <schwab@linux-m68k.org>
4204
4205 * emacs.c (decode_env_path): Only use defaulted if WINDOWSNT.
4206
4207 2012-08-05 Dmitry Antipov <dmantipov@yandex.ru>
4208
4209 Generalize common compile-time constants.
4210 * lisp.h (header_size, bool_header_size, word_size): Now here.
4211 (struct Lisp_Vector): Add comment.
4212 (struct Lisp_Bool_Vector): Move up to define handy constants.
4213 (VECSIZE, PSEUDOVECSIZE): Simplify.
4214 (SAFE_ALLOCA_LISP): Use new constant. Adjust indentation.
4215 * buffer.c, buffer.h, bytecode.c, callint.c, eval.c, fns.c:
4216 * font.c, fontset.c, keyboard.c, keymap.c, macros.c, menu.c:
4217 * msdos.c, w32menu.c, w32term.h, window.c, xdisp.c, xfaces.c:
4218 * xfont.c, xmenu.c: Use word_size where appropriate.
4219
4220 2012-08-05 Lawrence Mitchell <wence@gmx.li>
4221
4222 * search.c (Freplace_match): Treat \? in the replacement text
4223 literally (Bug#8161).
4224
4225 2012-08-05 Chong Yidong <cyd@gnu.org>
4226
4227 * term.c (Vsuspend_tty_functions, Vresume_tty_functions):
4228 * frame.c (Vdelete_frame_functions):
4229 * emacs.c (Vkill_emacs_hook): Doc fix.
4230
4231 2012-08-04 Eli Zaretskii <eliz@gnu.org>
4232
4233 * xfns.c (x_set_menu_bar_lines): Fix compilation error in
4234 --with-x-toolkit=no builds.
4235 Reported by Carsten Mattner <carstenmattner@gmail.com>.
4236
4237 2012-08-04 Chong Yidong <cyd@gnu.org>
4238
4239 * syntax.c (Fmodify_syntax_entry): Doc fix.
4240
4241 2012-08-04 Eli Zaretskii <eliz@gnu.org>
4242
4243 Fix startup warnings about ../site-lisp on MS-Windows. (Bug#11959)
4244 * w32.c (init_environment): Change the default values of many
4245 environment variables in dflt_envvars[] to NULL, to avoid pushing
4246 them into environment when they were not already defined.
4247 Remove the code that deletes site-lisp subdirectories from the default
4248 value of EMACSLOADPATH, as it is no longer needed.
4249 (check_windows_init_file): Now external, not static.
4250 Use Vload_path as is, without adding anything, as this function is now
4251 called when Vload_path is already set up.
4252
4253 * w32.h (check_windows_init_file): Add prototype.
4254
4255 * emacs.c (init_cmdargs) [WINDOWSNT]: When running from the build
4256 directory, ignore the /*/i386/ tail in Vinvocation_directory, for
4257 compatibility with Posix platforms.
4258 (main): Move the call to check_windows_init_file to here from
4259 w32.c.
4260 (decode_env_path) [WINDOWSNT]: Expand the %emacs_dir%/ prefix, if
4261 any, in the DEFALT argument into the root of the Emacs build or
4262 installation tree, as appropriate.
4263
4264 * callproc.c (init_callproc_1): Call decode_env_path instead of
4265 doing its equivalent by hand.
4266 (init_callproc): Replace DOS_NT condition with MSDOS, thus letting
4267 the code that sets Vexec_path run on MS-Windows.
4268
4269 * lread.c (init_lread): Add comments to #ifdef's.
4270
4271 * msdos.c (dos_set_window_size, IT_update_begin)
4272 (IT_frame_up_to_date, IT_set_frame_parameters): Use FVAR and WVAR
4273 instead of direct references.
4274
4275 2012-08-04 Paul Eggert <eggert@cs.ucla.edu>
4276
4277 Export DEFAULT_REHASH_* to GDB.
4278 * lisp.h (DEFAULT_REHASH_THRESHOLD, DEFAULT_REHASH_SIZE):
4279 Now constants, not macros.
4280
4281 2012-08-03 Paul Eggert <eggert@cs.ucla.edu>
4282
4283 Remove unnecessary casts involving pointers.
4284 These casts are no longer needed now that we assume C89 or later,
4285 since they involve casting to or from void *.
4286 * alloc.c (make_pure_string, make_pure_c_string, pure_cons)
4287 (make_pure_float, make_pure_vector):
4288 * lisp.h (SAFE_ALLOCA, SAFE_ALLOCA_LISP):
4289 * macros.c (Fstart_kbd_macro):
4290 * menu.c (find_and_return_menu_selection):
4291 * minibuf.c (read_minibuf_noninteractive):
4292 * sysdep.c (closedir):
4293 * xdisp.c (x_produce_glyphs):
4294 * xfaces.c (compare_fonts_by_sort_order):
4295 * xfns.c (x_real_positions, select_visual):
4296 * xselect.c (x_stop_queuing_selection_requests)
4297 (x_get_window_property, x_get_window_property_as_lisp_data):
4298 * xterm.c (x_set_frame_alpha, x_find_modifier_meanings):
4299 Remove unnecessary pointer casts.
4300 * alloc.c (record_xmalloc): New function.
4301 * lisp.h (record_xmalloc): New decl.
4302 (SAFE_ALLOCA): Now takes just one arg -- the size -- and acts
4303 more like a function. This is because the pointer cast is not
4304 needed. All uses changed.
4305 * print.c (print_string, print_error_message): Avoid length recalc.
4306
4307 Improve fix for macroexp crash with debugging (Bug#12118).
4308 * lisp.h (ASET) [ENABLE_CHECKING]: Pay attention to
4309 ARRAY_MARK_FLAG when checking subscripts, because ASET is
4310 not supposed to be invoked from the garbage collector.
4311 See Andreas Schwab in <http://bugs.gnu.org/12118#25>.
4312 (gc_aset): New function, which is like ASET but can be
4313 used in the garbage collector.
4314 (set_hash_key, set_hash_value, set_hash_next, set_hash_hash)
4315 (set_hash_index): Use it instead of ASET.
4316
4317 2012-08-03 Eli Zaretskii <eliz@gnu.org>
4318
4319 Support symlinks on latest versions of MS-Windows.
4320 * w32.c: Include winioctl.h and aclapi.h.
4321 (is_symlink, chase_symlinks, enable_privilege, restore_privilege)
4322 (revert_to_self): Forward declarations of static functions.
4323 <static BOOL g_b_init_get_security_info>:
4324 <g_b_init_create_symbolic_link>: New static flags.
4325 (globals_of_w32): Initialize them to zero.
4326 (GetSecurityInfo_Proc, CreateSymbolicLink_Proc): New typedefs.
4327 (map_w32_filename): Improve commentary. Simplify switch.
4328 (SYMBOLIC_LINK_FLAG_DIRECTORY): Define if not defined in system
4329 headers (most versions of MinGW w32api don't).
4330 (get_security_info, create_symbolic_link)
4331 (get_file_security_desc_by_handle, is_symlink, chase_symlinks):
4332 New functions.
4333 (sys_access, sys_chmod): Call 'chase_symlinks' to resolve symlinks
4334 in the argument file name.
4335 (sys_access): Call unc_volume_file_attributes only if
4336 GetFileAttributes fails with network-related error codes.
4337 (sys_rename): Diagnose renaming of a symlink when the user doesn't
4338 have the required privileges.
4339 (get_file_security_desc_by_name): Rename from
4340 get_file_security_desc.
4341 (stat_worker): New function, with most of the guts of 'stat', and
4342 with addition of handling of symlinks and support for 'lstat'.
4343 If possible, get file's attributes and security information by
4344 handle, not by name. Produce S_IFLNK bit for symlinks, when
4345 called from 'lstat'.
4346 (stat, lstat): New functions, call 'stat_worker'.
4347 (symlink, readlink, careadlinkat): Rewritten to create and resolve
4348 symlinks when the underlying filesystem supports them.
4349
4350 2012-08-02 Paul Eggert <eggert@cs.ucla.edu>
4351
4352 Fix macroexp crash on Windows with debugging (Bug#12118).
4353 * lisp.h (ASET) [ENABLE_CHECKING]: Ignore ARRAY_MARK_FLAG when
4354 checking subscripts; problem introduced with the recent
4355 "ASET (a, i, v)" rather than "AREF (a, i) = v" patch.
4356 (ARRAY_MARK_FLAG): Now a macro as well as a constant,
4357 since it's used in non-static inline functions now.
4358
4359 * xfaces.c (face_at_buffer_position, face_for_overlay_string):
4360 Don't assume buffer size fits in 'int'. Remove unused local.
4361
4362 Use C99-style 'extern inline' if available.
4363 * buffer.h (BUFFER_INLINE):
4364 * category.h (CATEGORY_INLINE):
4365 * character.h (CHARACTER_INLINE):
4366 * charset.h (CHARSET_INLINE):
4367 * composite.h (COMPOSITE_INLINE):
4368 * dispextern.h (DISPEXTERN_INLINE):
4369 * lisp.h (LISP_INLINE):
4370 * systime.h (SYSTIME_INLINE):
4371 New macro, replacing 'static inline' in this header.
4372 * buffer.h, category.h, character.h, charset.h, composite.h:
4373 * dispextern.h, lisp.h, systime.h:
4374 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
4375 * alloc.c (LISP_INLINE):
4376 * buffer.c (BUFFER_INLINE):
4377 * category.c (CATEGORY_INLINE):
4378 * character.c (CHARACTER_INLINE):
4379 * charset.c (CHARSET_INLINE):
4380 * composite.c (COMPOSITE_INLINE):
4381 * dispnew.c (DISPEXTERN_INLINE):
4382 * sysdep.c (SYSTIME_INLINE):
4383 Define to EXTERN_INLINE, so that the corresponding functions
4384 are compiled into code.
4385 * conf_post.h (INLINE, EXTERN_INLINE, INLINE_HEADER_BEGIN)
4386 (INLINE_HEADER_END): New macros.
4387 * lisp.h (PSEUDOVECTOR_FLAG): Now a macro as well as a constant,
4388 since it's used in non-static inline functions now.
4389 (VALMASK) [!USE_LSB_TAG]: Likewise.
4390
4391 2012-08-02 Glenn Morris <rgm@gnu.org>
4392
4393 * s/: Remove empty directory.
4394
4395 * s/ms-w32.h: Move to ../nt/inc.
4396 * makefile.w32-in (TAGS, TAGS-gmake, MS_W32_H):
4397 Update for new ms-w32.h location.
4398
4399 2012-08-02 Paul Eggert <eggert@cs.ucla.edu>
4400
4401 Port to Solaris 8.
4402 * syswait.h (WRETCODE): Remove, consistently with ../configure.ac.
4403
4404 2012-08-02 Glenn Morris <rgm@gnu.org>
4405
4406 * nsterm.m (ns_exec_path, ns_load_path): Use SEPCHAR rather than
4407 hard-coding the path separator.
4408
4409 2012-08-01 Paul Eggert <eggert@cs.ucla.edu>
4410
4411 Use "ASET (a, i, v)" rather than "AREF (a, i) = v".
4412 This how ASET and AREF are supposed to work, and makes
4413 it easier to think about future improvements. See
4414 <http://lists.gnu.org/archive/html/emacs-devel/2012-08/msg00026.html>.
4415 * charset.h (set_charset_attr): New function.
4416 All lvalue-style uses of CHARSET_DECODER etc. changed to use it.
4417 * lisp.h (ASET): Rewrite so as not to use AREF in an lvalue style.
4418 (aref_addr): New function. All uses of &AREF(...) changed.
4419 (set_hash_key, set_hash_value, set_hash_next, set_hash_hash)
4420 (set_hash_index): New functions. All lvalue-style uses of
4421 HASH_KEY etc. changed.
4422 * keyboard.c (set_prop): New function. All lvalue-style uses
4423 of PROP changed.
4424
4425 2012-08-01 Alp Aker <alp.tekin.aker@gmail.com>
4426
4427 * nsterm.m (ns_set_vertical_scroll_bar, ns_redeem_scroll_bar)
4428 (EmacsWindow-accessibilityAttributeValue, EmacsScroller-initFrame:)
4429 (EmacsScroller-dealloc): Adjust to use WVAR. (Bug#12114)
4430 * nsfns.m (ns_set_name_as_filename): Likewise.
4431 * nsmenu.m (ns_update_menubar): Likewise.
4432 * nsselect.m (symbol_to_nsstring): Adjust to use SVAR.
4433
4434 2012-08-01 Eli Zaretskii <eliz@gnu.org>
4435
4436 * .gdbinit (xcar, xcdr, xlist, xwindow, nextcons, xprintsym):
4437 Adapt to latest changes in field names of the corresponding Lisp
4438 objects.
4439
4440 * xdisp.c (try_window_id): Use WVAR in IF_DEBUG code.
4441
4442 2012-08-01 Glenn Morris <rgm@gnu.org>
4443
4444 * s/msdos.h: Remove file.
4445 * conf_post.h [MSDOS]: New section, moved from s/msdos.h.
4446 * Makefile.in (S_FILE): Remove.
4447 (config_h): Remove S_FILE.
4448
4449 2012-08-01 Juanma Barranquero <lekktu@gmail.com>
4450
4451 * s/ms-w32.h (DEVICE_SEP, IS_DIRECTORY_SEP, IS_ANY_SEP):
4452 Remove; moved to nt/config.nt.
4453
4454 2012-08-01 Dmitry Antipov <dmantipov@yandex.ru>
4455
4456 Use INTERNAL_FIELD for conses and overlays.
4457 * lisp.h (struct Lisp_Cons): Use INTERNAL_FIELD.
4458 Remove obsolete comment.
4459 (MVAR): New macro.
4460 (struct Lisp_Overlay): Use INTERNAL_FIELD.
4461 * alloc.c, buffer.c, buffer.h, fns.c: Adjust users.
4462
4463 2012-08-01 Dmitry Antipov <dmantipov@yandex.ru>
4464
4465 Use INTERNAL_FIELD for symbols.
4466 * lisp.h (SVAR): New macro. Adjust users.
4467 * alloc.c, bytecode.c, cmds.c, data.c, doc.c, eval.c:
4468 * fns.c, keyboard.c, lread.c, xterm.c: Users changed.
4469
4470 2012-08-01 Dmitry Antipov <dmantipov@yandex.ru>
4471
4472 Use INTERNAL_FIELD for processes.
4473 * process.h (PVAR): New macro. Adjust style.
4474 (struct Lisp_Process): Change Lisp_Object members to INTERNAL_FIELD.
4475 * print.c, process.c, sysdep.c, w32.c, xdisp.c: Users changed.
4476
4477 2012-08-01 Dmitry Antipov <dmantipov@yandex.ru>
4478
4479 Use INTERNAL_FIELD for windows.
4480 * window.h (WVAR): New macro.
4481 (struct window): Change Lisp_Object members to INTERNAL_FIELD.
4482 * alloc.c, buffer.c, composite.c, dispextern.h, dispnew.c, editfns.c:
4483 * fileio.c, font.c, fontset.c, frame.c, frame.h, fringe.c, indent.c:
4484 * insdel.c, keyboard.c, keymap.c, lisp.h, minibuf.c, nsterm.m, print.c:
4485 * textprop.c, w32fns.c, w32menu.c, w32term.c, window.c, xdisp.c:
4486 * xfaces.c, xfns.c, xmenu.c, xterm.c: Users changed.
4487
4488 2012-08-01 Paul Eggert <eggert@cs.ucla.edu>
4489
4490 * coding.h (CODING_ATTR_FLUSHING): Remove; unused and wouldn't work.
4491
4492 2012-08-01 Glenn Morris <rgm@gnu.org>
4493
4494 * lisp.h (IS_DIRECTORY_SEP, IS_DEVICE_SEP, IS_ANY_SEP):
4495 Move to configure.ac.
4496
4497 2012-08-01 Juanma Barranquero <lekktu@gmail.com>
4498
4499 * makefile.w32-in (CONFIG_H): Update dependencies.
4500 (CONF_POST_H): New macro.
4501
4502 * s/ms-w32.h (SEPCHAR, NULL_DEVICE): Remove; moved to nt/config.nt.
4503
4504 2012-07-31 Glenn Morris <rgm@gnu.org>
4505
4506 * Makefile.in (S_FILE): No longer set by configure.
4507
4508 * conf_post.h (config_opsysfile): Move earlier, so that WINDOWSNT
4509 is available.
4510 (alloca.h) [WINDOWSNT]: Don't include it on MS Windows.
4511
4512 * process.h (NULL_DEVICE):
4513 * emacs.c (SEPCHAR):
4514 * editfns.c (USER_FULL_NAME): Let configure set them.
4515
4516 * s/README, s/template.h: Remove files.
4517
4518 * conf_post.h [HPUX]: Undefine HAVE_RANDOM and HAVE_RINT.
4519
4520 * conf_post.h (AMPERSAND_FULL_NAME, subprocesses):
4521 Move to configure.ac.
4522
4523 2012-07-31 Eli Zaretskii <eliz@gnu.org>
4524
4525 * .gdbinit (xframe): Adapt to introduction of FVAR and the
4526 resulting renaming of 'struct frame' members.
4527
4528 * w32menu.c (w32_menu_show): Revert bogus introduction of FVAR.
4529
4530 * fontset.c (dump_fontset): Fix compilation with ENABLE_CHECKING
4531 after introduction of FVAR.
4532
4533 2012-07-31 Jan Djärv <jan.h.d@swipnet.se>
4534
4535 * nsmenu.m (update_frame_tool_bar): Change key from NSObject* to id.
4536
4537 * nsterm.m (ns_draw_fringe_bitmap, ns_dumpglyphs_image): Use drawInRect
4538 instead of compositeToPoint.
4539 (applicationShouldTerminate): Pass NS String literal to NSRunAlertPanel.
4540
4541 * nsfns.m, nsmenu.m, nsterm.m: Adopt to struct frame/FVAR changes.
4542
4543 2012-07-31 Dmitry Antipov <dmantipov@yandex.ru>
4544
4545 Generalize INTERNAL_FIELD between buffers, keyboards and frames.
4546 * lisp.h (INTERNAL_FIELD): New macro.
4547 * buffer.h (BUFFER_INTERNAL_FIELD): Remove.
4548 (BVAR): Change to use INTERNAL_FIELD.
4549 * keyboard.h (KBOARD_INTERNAL_FIELD): Likewise.
4550 (KVAR): Change to use INTERNAL_FIELD.
4551 * frame.h (FVAR): New macro.
4552 (struct frame): Use INTERNAL_FIELD for all Lisp_Object fields.
4553 * alloc.c, buffer.c, data.c, dispnew.c, dosfns.c, eval.c, frame.c:
4554 * fringe.c, gtkutil.c, minibuf.c, nsfns.m, nsterm.m, print.c:
4555 * term.c, w32fns.c, w32menu.c, w32term.c, window.c, window.h:
4556 * xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c: Users changed.
4557
4558 2012-07-31 Dmitry Antipov <dmantipov@yandex.ru>
4559
4560 Miscellaneous fixes for non-default X toolkits.
4561 * xfns.c (Fx_file_dialog): Change to SSDATA to avoid warnings.
4562 * xterm.c (x_frame_of_widget): Remove redundant prototype.
4563 Move under #ifdef USE_LUCID.
4564 (x_create_toolkit_scroll_bar): Adjust scroll_bar_name
4565 definition and usage to avoid warnings.
4566
4567 2012-07-31 Jan Djärv <jan.h.d@swipnet.se>
4568
4569 * nsterm.m (openFiles): Fix previous checkin.
4570
4571 2012-07-31 Paul Eggert <eggert@cs.ucla.edu>
4572
4573 * indent.c (compute_motion): Remove unused local.
4574
4575 2012-07-31 Glenn Morris <rgm@gnu.org>
4576
4577 * s/usg5-4-common.h (wait3, WRETCODE): Let configure set them.
4578
4579 * conf_post.h [USG5_4]:
4580 Move remaining contents of s/usg5-4-common.h here.
4581 * s/usg5-4-common.h: Remove file.
4582
4583 * conf_post.h [IRIX6_5]: Move remaining contents of s/irix6-5.h here.
4584 * s/irix6-5.h: Remove file.
4585
4586 * conf_post.h [DARWIN_OS]: Move remaining contents of s/darwin.h here.
4587 * s/darwin.h: Remove file.
4588
4589 * conf_post.h [HPUX]: Move random, srandom here from s/hpux10-20.h.
4590 * s/hpux10-20.h: Remove file, which is now empty.
4591
4592 2012-07-30 Glenn Morris <rgm@gnu.org>
4593
4594 * conf_post.h: New, split from configure.ac's AH_BOTTOM.
4595 * Makefile.in (config_h): Add conf_post.h.
4596 * makefile.w32-in (CONFIG_H): Add conf_post.h.
4597
4598 2012-07-30 Jan Djärv <jan.h.d@swipnet.se>
4599
4600 * nsterm.m (ns_do_open_file): New variable.
4601 (ns_term_init): Set ns_do_open_file to YES after run returns.
4602 (openFile, openTempFile, openFileWithoutUI, openFiles):
4603 Open files only if ns_do_open_file.
4604
4605 2012-07-30 Paul Eggert <eggert@cs.ucla.edu>
4606
4607 * lisp.h (SWITCH_ENUM_CAST): Remove. All uses removed.
4608 This no-op macro hasn't been needed for many years.
4609 * src/regex.c (SWITCH_ENUM_CAST) [!emacs]: Likewise.
4610
4611 Export DIRECTORY_SEP, TYPEMASK, VALMASK to GDB.
4612 * alloc.c (gdb_make_enums_visible) [USE_LSB_TAG]: Add lsb_bits.
4613 * lisp.h (enum lsb_bits) [USE_LSB_TAG]: New enum, for
4614 gdb_make_enums_visible.
4615 (TYPEMASK, VALMASK) [USE_LSB_TAGS]: Now enum constants, not macros.
4616 (DIRECTORY_SEP): Now a constant, not a macro.
4617
4618 2012-07-30 Eli Zaretskii <eliz@gnu.org>
4619
4620 * w32fns.c (w32_wnd_proc): Pass w32_keyboard_codepage to
4621 w32_kbd_patch_key as the 2nd arg. (Bug#12082)
4622
4623 * w32term.c <w32_keyboard_codepage>: Renamed from
4624 keyboard_codepage and now external. All users changed.
4625
4626 * w32term.h: Add declaration of w32_keyboard_codepage.
4627
4628 * w32inevt.c (w32_kbd_patch_key): Accept an additional argument --
4629 the codepage to translate keys to Unicode. If this argument is
4630 -1, use the value returned by GetConsoleCP. All callers changed.
4631
4632 2012-07-30 Paul Eggert <eggert@cs.ucla.edu>
4633
4634 Update .PHONY listings in makefiles.
4635 * Makefile.in (.PHONY): Add all, mostlyclean, clean,
4636 bootstrap-clean, distclean, maintainer-clean, versioclean,
4637 extraclean, frc.
4638
4639 * lisp.h (STRING_BYTES_BOUND): Cast entire result to ptrdiff_t.
4640 This is a bit clearer. Fix some commentary typos.
4641
4642 2012-07-30 Glenn Morris <rgm@gnu.org>
4643
4644 * s/netbsd.h: Let configure include signal.h if needed.
4645 Remove file, which is now empty.
4646
4647 * s/usg5-4-common.h (_longjmp, _setjmp, TIOCSIGSEND):
4648 Let configure set them.
4649 * s/irix6-5.h (_longjmp, _setjmp, TIOCSIGSEND):
4650 No more need to undefine.
4651
4652 2012-07-30 Andreas Schwab <schwab@linux-m68k.org>
4653
4654 * keymap.c (Fkey_description): Don't remove 0x80 bit from
4655 non-single-byte char when adding meta modifier. (Bug#12090)
4656
4657 2012-07-30 Dmitry Antipov <dmantipov@yandex.ru>
4658
4659 Convert safe_call to use variable number of arguments.
4660 * xdisp.c (safe_call): Convert to use varargs. Adjust users.
4661 (safe_call2): Fix comment.
4662 * lisp.h (safe_call): Adjust prototype.
4663 * coding.c (encode_coding_object): Change to use safe_call2.
4664 * xfaces.c (merge_face_heights): Change to use safe_call1.
4665
4666 2012-07-30 Glenn Morris <rgm@gnu.org>
4667
4668 * s/aix4-2.h (sigmask): No need to undefine it, since syssignal.h
4669 does that unconditionally. Remove file, which is now empty.
4670
4671 * s/freebsd.h, s/gnu-linux.h, s/sol2-6.h, s/unixware.h:
4672 Remove empty files.
4673
4674 2012-07-30 Paul Eggert <eggert@cs.ucla.edu>
4675
4676 Export to GDB most of lisp.h's remaining object-like macros.
4677 * lisp.h (min, max): Move earlier, because they're used earlier now.
4678 (INTMASK, ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK)
4679 (CHAR_TABLE_STANDARD_SLOTS, CHARTAB_SIZE_BITS_0)
4680 (CHARTAB_SIZE_BITS_1, CHARTAB_SIZE_BITS_2, CHARTAB_SIZE_BITS_3)
4681 (DEFAULT_HASH_SIZE, COMPILED_ARGLIST, COMPILED_BYTECODE)
4682 (COMPILED_CONSTANTS, COMPILED_STACK_DEPTH, COMPILED_DOC_STRING)
4683 (COMPILED_INTERACTIVE, CHAR_ALT, CHAR_SUPER, CHAR_HYPER, CHAR_SHIFT)
4684 (CHAR_CTL, CHAR_META, CHAR_MODIFIER_MASK, CHARACTERBITS)
4685 (MANY, UNEVALLED, FLOAT_TO_STRING_BUFSIZE, MAX_ALLOCA):
4686 Now constants, for GDB. They need not be macros.
4687 (MOST_POSITIVE_FIXNUM, MOST_NEGATIVE_FIXNUM, STRING_BYTES_BOUND):
4688 Now constants, for GDB, as well as macros, for static initializers.
4689 (CHAR_TABLE_STANDARD_SLOTS, CHAR_TABLE_EXTRA_SLOTS):
4690 Move to after the definition of struct Lisp_Char_Table,
4691 since the former now needs that type defined.
4692 (enum CHARTAB_SIZE_BITS, enum CHAR_TABLE_STANDARD_SLOTS)
4693 (enum DEFAULT_HASH_SIZE, enum Lisp_Compiled, enum char_bits)
4694 (enum maxargs, enum FLOAT_TO_STRING_BUFSIZE, enum MAX_ALLOCA):
4695 New enums, for gdb_make_enums_visible.
4696 (GLYPH_MODE_LINE_FACE): Remove; unused.
4697 * alloc.c (STRING_BYTES_MAX): Now a constant, not a macro.
4698 (gdb_make_enums_visible): Add enum CHARTAB_SIZE_BITS, enum
4699 CHAR_TABLE_STANDARD_SLOTS, enum char_bits, enum DEFAULT_HASH_SIZE,
4700 enum FLOAT_TO_STRING_BUFSIZE, enum Lisp_Bits, enum Lisp_Compiled,
4701 enum maxargs, enum MAX_ALLOCA.
4702 (ARRAY_MARK_FLAG_VAL, PSEUDOVECTOR_FLAG_VAL, VALMASK_VAL): Remove.
4703 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Remove;
4704 no longer needed, now that they are done in lisp.h.
4705
4706 2012-07-30 Dmitry Antipov <dmantipov@yandex.ru>
4707
4708 Cleanup string bytes checking.
4709 * alloc.c (GC_STRING_BYTES, CHECK_STRING_BYTES): Remove. Convert
4710 all users to STRING_BYTES or string_bytes if GC_CHECK_STRING_BYTES.
4711 (check_string_bytes): Define to empty if not GC_CHECK_STRING_BYTES.
4712 (check_sblock, compact_small_strings): Simplify.
4713
4714 2012-07-29 Paul Eggert <eggert@cs.ucla.edu>
4715
4716 * lisp.h (LISP_INT_TAG, LISP_INT1_TAG, LISP_STRING_TAG): Remove.
4717 These macros are confusing and no longer need to be defined, as
4718 the enum values now suffice. All uses replaced with definiens.
4719 (Lisp_Int1, Lisp_String): Define directly; this is clearer.
4720
4721 2012-07-29 Juanma Barranquero <lekktu@gmail.com>
4722
4723 * makefile.w32-in (LISP_H, $(BLD)/emacs.$(O), $(BLD)/w32inevt.$(O))
4724 ($(BLD)/w32console.$(O)): Update dependencies.
4725
4726 2012-07-29 Dmitry Antipov <dmantipov@yandex.ru>
4727
4728 Remove HIDE_LISP_IMPLEMENTATION and cleanup cons free list check.
4729 * lisp.h (HIDE_LISP_IMPLEMENTATION): Remove as useless for a long
4730 time. Adjust users.
4731 (CHECK_CONS_LIST): Remove. Convert all users to check_cons_list.
4732
4733 2012-07-29 Jan Djärv <jan.h.d@swipnet.se>
4734
4735 * lread.c (init_lread): Remove if-statement in ifdef HAVE_NS before
4736 setting sitelisp (Bug#12010).
4737
4738 2012-07-29 Eli Zaretskii <eliz@gnu.org>
4739
4740 * w32heap.h (OS_9X): Rename from OS_WINDOWS_95.
4741
4742 * w32heap.c (cache_system_info):
4743 * w32.c (sys_rename):
4744 * w32proc.c (find_child_console, sys_kill): All users changed.
4745
4746 2012-07-29 Paul Eggert <eggert@cs.ucla.edu>
4747
4748 * alloc.c (Fgarbage_collect): Indent as per usual Emacs style.
4749
4750 2012-07-29 Eli Zaretskii <eliz@gnu.org>
4751
4752 * makefile.w32-in (LISP_H): Add $(NT_INC)/stdalign.h.
4753
4754 2012-07-29 Dmitry Antipov <dmantipov@yandex.ru>
4755
4756 Cleanup statistics calculation in Fgarbage_collect.
4757 * alloc.c (Fgarbage_collect): Rename t1 to meaningful start.
4758 Fix zombies percentage calculation. Simplify elapsed time calculation.
4759
4760 2012-07-29 Dmitry Antipov <dmantipov@yandex.ru>
4761
4762 Generalize marker debugging code under MARKER_DEBUG and use eassert.
4763 * insdel.c (CHECK_MARKERS, check_markers_debug_flag): Remove.
4764 (gap_left, gap_right, adjust_markers_for_delete, insert_1_both)
4765 (insert_from_string_1, insert_from_gap, insert_from_buffer_1)
4766 (replace_range, replace_range_2, del_range_2): Change to eassert.
4767 * marker.c (byte_char_debug_check): Adjust style.
4768
4769 2012-07-29 Paul Eggert <eggert@cs.ucla.edu>
4770
4771 Don't use the abbreviation "win" to refer to Windows (Bug#10421).
4772 * regex.c (MAX_BUF_SIZE): Remove some incorrect and
4773 long-ago-commented-out code that talks about "WIN32".
4774 * w32heap.h (OS_WINDOWS_95): Rename from OS_WIN95.
4775 All uses changed.
4776
4777 2012-07-28 Paul Eggert <eggert@cs.ucla.edu>
4778
4779 Use Gnulib stdalign module (Bug#9772, Bug#9960).
4780 * alloc.c (XMALLOC_BASE_ALIGNMENT, GC_POINTER_ALIGNMENT, pure_alloc):
4781 Simplify by using alignof.
4782 (pure_alloc) [! USE_LSB_TAG]: Don't over-align EMACS_INT values.
4783 * lisp.h: Include <stdalign.h>.
4784 (GCALIGNMENT): New macro and constant.
4785 (DECL_ALIGN): Remove. All uses replaced by alignas (GCALIGNMENT).
4786 (USE_LSB_TAG): ifdef on alignas, not on DECL_ALIGN.
4787 (stdalign): New macro, if not already defined.
4788
4789 2012-07-28 Eli Zaretskii <eliz@gnu.org>
4790
4791 Fix non-ASCII input in non-GUI frames on MS-Windows. (Bug#12055)
4792 * w32inevt.c: Include w32inevt.h.
4793 (w32_read_console_input): New inline function, calls either
4794 ReadConsoleInputA or ReadConsoleInputW, depending on the value of
4795 w32_console_unicode_input.
4796 (fill_queue): Call w32_read_console_input instead of ReadConsoleInput.
4797 (w32_kbd_patch_key, key_event): Use the codepage returned by
4798 GetConsoleCP, rather than the ANSI codepage returned by GetLocaleInfo.
4799 (key_event): use uChar.UnicodeChar only if
4800 w32_console_unicode_input is non-zero.
4801
4802 * w32console.c: Include w32heap.h.
4803 <w32_console_unicode_input>: New global variable.
4804 (initialize_w32_display): Set w32_console_unicode_input to 1 on NT
4805 family of Windows, zero otherwise.
4806
4807 * w32inevt.h: Declare w32_console_unicode_input.
4808
4809 * xdisp.c (init_iterator): Don't reference tip_frame in a build
4810 --without-x. (Bug#11742)
4811
4812 2012-07-27 Paul Eggert <eggert@cs.ucla.edu>
4813
4814 Adjust GDB to reflect pvec_type changes (Bug#12036).
4815 * .gdbinit (xvectype, xpr, xbacktrace): Adjust to reflect the
4816 2012-07-04 changes to pseudovector representation.
4817 Problem reported by Eli Zaretskii in <http://bugs.gnu.org/12036#30>.
4818
4819 2012-07-27 Michael Albinus <michael.albinus@gmx.de>
4820
4821 * dbusbind.c (XD_DBUS_VALIDATE_BUS_ADDRESS): Canonicalize session
4822 bus address.
4823 (xd_close_bus, Fdbus_init_bus): Handle reference counter properly.
4824
4825 2012-07-27 Eli Zaretskii <eliz@gnu.org>
4826
4827 * alloc.c (listn): Fix the order the arguments are consed onto the
4828 list.
4829
4830 * lisp.h (enum constype): Use CONSTYPE_HEAP and CONSTYPE_PURE for
4831 enumeration constants, as PURE and HEAP are too general, and clash
4832 with other headers and sources, such as gmalloc.c and the
4833 MS-Windows system headers. All users changed.
4834
4835 2012-07-27 Dmitry Antipov <dmantipov@yandex.ru>
4836
4837 Revert last save_excursion_save and save_excursion_restore changes.
4838 * alloc.c, editfns.c, marker.c, lisp.h: Revert.
4839 Lots of crashes reported by Chong Yidong <cyd@gnu.org>.
4840
4841 2012-07-27 Dmitry Antipov <dmantipov@yandex.ru>
4842
4843 Fix recently-introduced typos in Windows port.
4844 Reported by Martin Rudalics <rudalics@gmx.at>.
4845 * w32.c (init_environment): Replace comma with semicolon.
4846 * w32fns.c (syms_of_w32fns): Add missing parenthesis.
4847
4848 2012-07-27 Paul Eggert <eggert@cs.ucla.edu>
4849
4850 Improve GDB symbol export (Bug#12036).
4851 * .gdbinit (xgetptr, xgetint, xgettype): Set $bugfix in different
4852 arms of an 'if', not using conditional expressions; otherwise GDB
4853 complains about the types in the unevaluated arm when the argument
4854 is an integer literal.
4855 (xgetint): Simplify expression.
4856 * alloc.c (gdb_make_enums_visible): New constant. This ports to
4857 GCC 3.4.2 the export of symbols to GDB. Problem reported by Eli
4858 Zaretskii in <http://bugs.gnu.org/12036#13>.
4859 * lisp.h (PUBLISH_TO_GDB): Remove. All uses removed. No longer
4860 needed now that we have gdb_make_enums_visible.
4861 (enum CHECK_LISP_OBJECT_TYPE, enum Lisp_Bits, enum More_Lisp_Bits)
4862 (enum enum_USE_LSB_TAG):
4863 New enum types, packaging up enums that need to be exported to GDB.
4864
4865 2012-07-27 Dmitry Antipov <dmantipov@yandex.ru>
4866
4867 Utility function to make a list from specified amount of objects.
4868 * lisp.h (enum constype): New datatype.
4869 (listn): New prototype.
4870 * alloc.c (listn): New function.
4871 (Fmemory_use_count, syms_of_alloc): Use it.
4872 * buffer.c (syms_of_buffer): Likewise.
4873 * callint.c (syms_of_callint): Likewise.
4874 * charset.c (define_charset_internal): Likewise.
4875 * coding.c (syms_of_coding): Likewise.
4876 * keymap.c (syms_of_keymap): Likewise.
4877 * search.c (syms_of_search): Likewise.
4878 * syntax.c (syms_of_syntax): Likewise.
4879 * w32.c (init_environment): Likewise.
4880 * w32fns.c (Fw32_battery_status, syms_of_w32fns): Likewise.
4881 * xdisp.c (syms_of_xdisp): Likewise.
4882 * xfns.c (syms_of_xfns): Likewise.
4883
4884 2012-07-27 Dmitry Antipov <dmantipov@yandex.ru>
4885
4886 Fast save_excursion_save and save_excursion_restore.
4887 * lisp.h (struct Lisp_Excursion): New data type.
4888 (PVEC_EXCURSION): New pseudovector type.
4889 (XEXCURSION, XSETEXCURSION, EXCURSIONP): Convenient macros
4890 to deal with it. Adjust comments.
4891 (init_marker, attach_marker): New prototype.
4892 (unchain_marker): Adjust prototype.
4893 * marker.c (attach_marker): Change to global.
4894 (init_marker): New function.
4895 * alloc.c (Fmake_marker, build_marker): Use it.
4896 (build_marker): More easserts.
4897 (mark_object): Handle struct Lisp_Excursion.
4898 * editfns.c (save_excursion_save, save_excursion_restore):
4899 Reimplement to use struct Lisp_Excursion. Add comments.
4900
4901 2012-07-26 Paul Eggert <eggert@cs.ucla.edu>
4902
4903 Fix export of symbols to GDB (Bug#12036).
4904 * alloc.c (ARRAY_MARK_FLAG_VAL, PSEUDOVECTOR_FLAG_VAL, VALMASK_VAL)
4905 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Move these here from
4906 emacs.c, as this is a more-suitable home. Had this been done earlier
4907 the fix for 12036 would have avoided some of the problems noted in
4908 <http://bugs.gnu.org/12036#13> by Eli Zaretskii, as the scope problems
4909 would have been more obvious.
4910 * emacs.c: Do not include <verify.h>; no longer needed.
4911 (gdb_CHECK_LISP_OBJECT_TYPE, gdb_DATA_SEG_BITS)
4912 (gdb_GCTYPEBITS, gdb_USE_LSB_TAG)
4913 (CHECK_LISP_OBJECT_TYPE, DATA_SEG_BITS, GCTYPEBITS, USE_LSB_TAG):
4914 Remove; now done in lisp.h.
4915 * lisp.h (PUBLISH_TO_GDB): New macro.
4916 (GCTYPEBITS, USE_LSB_TAG, CHECK_LISP_OBJECT_TYPE, enum pvec_type)
4917 (DATA_SEG_BITS): Use it.
4918 (GCTYPEBITS, USE_LSB_TAG): Now also an enum, for GDB.
4919 (CHECK_LISP_OBJECT_TYPE, DATA_SEG_BITS): Now just an enum, for GDB.
4920 * mem-limits.h (EXCEEDS_LISP_PTR): Redo so that DATA_SEG_BITS need
4921 not be usable in #if. This simplifies things.
4922
4923 2012-07-26 Juanma Barranquero <lekktu@gmail.com>
4924
4925 * makefile.w32-in ($(BLD)/emacs.$(O)): Update dependencies.
4926
4927 2012-07-26 Paul Eggert <eggert@cs.ucla.edu>
4928
4929 Simplify export of symbols to GDB (Bug#12036).
4930 * .gdbinit (xgetptr, xgetint, xgettype): Don't use "set $bugfix =
4931 $bugfix.i", as this doesn't work (with GDB 7.4.1, anyway).
4932 (xgetptr, xgetint, xgettype, xcoding, xcharset, xprintbytestr):
4933 Adjust to changes in lisp.h and emacs.c, by using
4934 CHECK_LISP_OBJECT_TYPE rather than gdb_use_struct, VALMASK instead
4935 of $valmask, DATA_SEG_BITS instead of gdb_data_seg_bits,
4936 INTTYPEBITS instead of gdb_gctypebits - 1, USE_LSB_TAG instead of
4937 gdb_use_lsb, (1 << GCTYPEBITS) - 1 instead of $tagmask, VALBITS
4938 instead of gdb_valbits.
4939 (xvectype, xvector, xpr, xprintstr, xbacktrace): Similarly, use
4940 PSEUDOVECTOR_FLAG instead of PVEC_FLAG, and ARRAY_MARK_FLAG
4941 instead of gdb_array_mark_flag.
4942 (xboolvector): Get size from $->size, not $->header.size.
4943 Use BOOL_VECTOR_BITS_PER_CHAR rather than mystery constants.
4944 (xreload, hook-run, hookpost-run): Remove.
4945 * emacs.c: Include <verify.h>.
4946 (gdb_use_lsb, gdb_use_struct, gdb_valbits, gdb_gctypebits)
4947 (gdb_data_seg_bits, PVEC_FLAG, gdb_array_mark_flag, gdb_pvec_type):
4948 Remove.
4949 (gdb_CHECK_LISP_OBJECT_TYPE, gdb_DATA_SEG_BITS, gdb_GCTYPEBITS)
4950 (gdb_USE_LSB_TAG): New enum constants.
4951 (CHECK_LISP_OBJECT_TYPE, DATA_SEG_BITS, GCTYPEBITS, USE_LSB_TAG):
4952 Also define these as enum constants, so they're visible to GDB.
4953 (ARRAY_MARK_FLAG_VAL, PSEUDOVECTOR_FLAG_VAL, VALMASK_VAL): New macros.
4954 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Also define these
4955 as constants, so they're visible to GDB.
4956 * lisp.h (VALBITS, INTTYPEBITS, FIXNUM_BITS, PSEUDOVECTOR_SIZE_BITS)
4957 (PSEUDOVECTOR_SIZE_MASK, PVEC_TYPE_MASK, BOOL_VECTOR_BITS_PER_CHAR):
4958 Now enum constants, not macros, so they're visible to GDB.
4959 (CHECK_LISP_OBJECT_TYPE, DATA_SEG_BITS): Default to 0, as this is
4960 more convenient now. All uses changed.
4961 (VALMASK) [USE_LSB_TAG]: Also define in this case.
4962 * mem-limits.h (EXCEEDS_LISP_PTR): Adjust to DATA_SEG_BITS change.
4963
4964 2012-07-26 Dmitry Antipov <dmantipov@yandex.ru>
4965
4966 Explicitly free restriction data that are not needed anymore.
4967 * editfns.c (save_restriction_restore): Free restriction data.
4968
4969 2012-07-26 Stefan Monnier <monnier@iro.umontreal.ca>
4970
4971 * eval.c (Fautoload_do_load): Rename from do_autoload, export to Lisp,
4972 add argument, tune behavior, and adjust all callers.
4973
4974 2012-07-25 Paul Eggert <eggert@cs.ucla.edu>
4975
4976 Use typedef for EMACS_INT, EMACS_UINT.
4977 * lisp.h, s/ms-w32.h (EMACS_INT, EMACS_UINT): Use typedefs rather
4978 than macros. This simplifies debugging in the usual case, since
4979 it lets GDB show addresses as 'EMACS_INT *' rather than 'long int *'
4980 and it allows expressions involving EMACS_INT casts.
4981 * .gdbinit (xreload): Simplify by using EMACS_INT cast.
4982
4983 2012-07-25 Jan Djärv <jan.h.d@swipnet.se>
4984
4985 * nsterm.m (ns_read_socket): Return early if there is a modal
4986 window (Bug#12043).
4987
4988 2012-07-25 Martin Rudalics <rudalics@gmx.at>
4989
4990 * frame.c (Fredirect_frame_focus): In doc-string don't mention
4991 that FOCUS-FRAME can be omitted.
4992
4993 2012-07-25 Dmitry Antipov <dmantipov@yandex.ru>
4994
4995 Adjust buffer text indirection counters at the end of Fkill_buffer.
4996 * buffer.c (Fkill_buffer): Adjust indirection counters when the
4997 buffer is definitely dead. This should really fix an issue reported
4998 by Christoph Scholtes again. (Bug#12007).
4999 (init_buffer_once): Initialize indirection counters of
5000 buffer_defaults and buffer_local_symbols (for sanity and safety).
5001
5002 2012-07-24 Eli Zaretskii <eliz@gnu.org>
5003
5004 * xdisp.c (init_iterator): Don't compute dimensions of truncation
5005 and continuation glyphs on tooltip frames, leave them at zero.
5006 Avoids continued lines in tooltips. (Bug#11832)
5007
5008 2012-07-24 Dmitry Antipov <dmantipov@yandex.ru>
5009
5010 Simplify copy_overlay.
5011 * buffer.c (copy_overlay): Simplify. Use build_marker.
5012 * lisp.h (struct Lisp_Overlay): Restore comment with minor tweaks.
5013
5014 2012-07-23 Eli Zaretskii <eliz@gnu.org>
5015
5016 * print.c (print_object): Don't crash when a frame's name is nil
5017 or invalid. (Bug#12025)
5018
5019 * window.c (decode_any_window): Disable CHECK_LIVE_FRAME test, as
5020 it signals an error when a tooltip frame is being created.
5021
5022 2012-07-23 Dmitry Antipov <dmantipov@yandex.ru>
5023
5024 Cleanup miscellaneous objects allocation and initialization.
5025 * alloc.c (allocate_misc): Change to static. Add argument to
5026 specify the subtype. Adjust comment and users.
5027 (build_overlay): New function.
5028 * buffer.c (copy_overlays, Fmake_overlay): Use it.
5029 * lisp.h (struct Lisp_Overlay): Remove obsolete comment.
5030 (allocate_misc): Remove prototype.
5031 (build_overlay): Add prototype.
5032
5033 2012-07-23 Dmitry Antipov <dmantipov@yandex.ru>
5034
5035 Swap buffer text indirection counters in Fbuffer_swap_text.
5036 * buffer.c (Fbuffer_swap_text): Swap indirections too.
5037 This avoids crash reported by Christoph Scholtes at
5038 http://lists.gnu.org/archive/html/bug-gnu-emacs/2012-07/msg00785.html.
5039
5040 2012-07-22 Jan Djärv <jan.h.d@swipnet.se>
5041
5042 * nsmenu.m (Popdown_data): New struct.
5043 (pop_down_menu): p->pointer is Popdown_data. Release the pool and
5044 free Popdown_data.
5045 (ns_popup_dialog): Use NSAutoreleasePool and pass it to pop_down_menu.
5046 (initWithContentRect): Make imgView and contentView non-static
5047 and autorelease them. Also autorelease img and matrix (Bug#12005).
5048 (dealloc): Remove (Bug#12005).
5049
5050 2012-07-22 Dmitry Antipov <dmantipov@yandex.ru>
5051
5052 Adjust consing_since_gc when objects are explicitly freed.
5053 * alloc.c (GC_DEFAULT_THRESHOLD): New macro.
5054 (Fgarbage_collect): Use it. Change minimum to 1/10 of default.
5055 (free_cons, free_misc): Subtract object size from consing_since_gc.
5056
5057 2012-07-22 Dmitry Antipov <dmantipov@yandex.ru>
5058
5059 Simplify and cleanup markers positioning code.
5060 * marker.c (attach_marker): More useful eassert.
5061 (live_buffer, set_marker_internal): New function.
5062 (Fset_marker, set_marker_restricted): Use set_marker_internal.
5063 (set_marker_both, set_marker_restricted_both): Use live_buffer.
5064
5065 2012-07-22 Paul Eggert <eggert@cs.ucla.edu>
5066
5067 * buffer.h (struct buffer.indirections): Now ptrdiff_t, not int,
5068 as it's limited by the amount of memory, not by INT_MAX.
5069
5070 2012-07-21 Eli Zaretskii <eliz@gnu.org>
5071
5072 * keyboard.c (keys_of_keyboard): Bind language-change to 'ignore'
5073 in special-event-map. See the discussion at
5074 http://lists.gnu.org/archive/html/emacs-devel/2012-06/msg00417.html
5075 for the reasons.
5076
5077 * w32menu.c (add_menu_item): Cast to ULONG_PTR when assigning
5078 info.dwItemData. Fixes crashes on 64-bit Windows.
5079 Suggested by Fabrice Popineau <fabrice.popineau@supelec.fr>.
5080
5081 2012-07-21 Jan Djärv <jan.h.d@swipnet.se>
5082
5083 * nsterm.m (accessibilityAttributeValue): New function. (Bug#11134).
5084 (conversationIdentifier): Return value is NSInteger.
5085 * nsterm.m (accessibilityAttributeValue): Surround with NS_IMPL_COCOA.
5086
5087 2012-07-21 Chong Yidong <cyd@gnu.org>
5088
5089 * window.c (decode_any_window): Signal an error if the window is
5090 on a dead frame (Bug#11984).
5091
5092 2012-07-20 Dmitry Antipov <dmantipov@yandex.ru>
5093
5094 Add indirection counting to speed up Fkill_buffer.
5095 * buffer.h (struct buffer): New member.
5096 * buffer.c (Fget_buffer_create): Set indirection counter to 0.
5097 (Fmake_indirect_buffer): Set indirection counter to -1, increment
5098 base buffer indirection counter.
5099 (compact_buffer): If ENABLE_CHECKING, verify indirection counters.
5100 (Fkill_buffer): Adjust indirection counters as needed, don't walk
5101 through buffer list if indirection counter is 0.
5102
5103 2012-07-20 Dmitry Antipov <dmantipov@yandex.ru>
5104
5105 Extend the value returned by Fgarbage_collect with heap statistics.
5106 * alloc.c (Qheap): New symbol.
5107 (syms_of_alloc): DEFSYM it.
5108 (Fgarbage_collect): If DOUG_LEA_MALLOC, add mallinfo data.
5109 (Fmemory_free): Remove.
5110 (syms_of_alloc): Don't defsubr it.
5111 * buffer.c (Fcompact_buffer): Remove.
5112 (syms_of_buffer): Don't defsubr it.
5113
5114 2012-07-20 Dmitry Antipov <dmantipov@yandex.ru>
5115
5116 Make maybe_gc inline.
5117 Verify that inlining is always possible (GCC 4.7.1, -O3 -Winline).
5118 * lisp.h (consing_since_gc, gc_relative_threshold)
5119 (memory_full_cons_threshold): Revert declaration.
5120 (maybe_gc): Remove prototype, define as inline.
5121 * alloc.c: Remove old commented-out code.
5122 (consing_since_gc, gc_relative_threshold)
5123 (memory_full_cons_threshold): Revert to global.
5124 (maybe_gc): Remove.
5125
5126 2012-07-20 Dmitry Antipov <dmantipov@yandex.ru>
5127
5128 Simple wrapper for make_unibyte_string, adjust font_open_by_name.
5129 * lisp.h (build_unibyte_string): New function.
5130 * dosfns.c, fileio.c, fns.c, ftfont.c, process.c:
5131 * sysdep.c, w32fns.c, xfns.c: Use it.
5132 * font.c (font_open_by_name): Change 2nd and 3rd args to the only arg
5133 of type Lisp_Object to avoid redundant calls to make_unibyte_string.
5134 Adjust users accordingly.
5135 * font.h (font_open_by_name): Adjust prototype.
5136
5137 2012-07-20 Dmitry Antipov <dmantipov@yandex.ru>
5138
5139 Cleanup calls to Fgarbage_collect.
5140 * lisp.h (maybe_gc): New prototype.
5141 (consing_since_gc, gc_relative_threshold, memory_full_cons_threshold):
5142 Remove declarations.
5143 * alloc.c (maybe_gc): New function.
5144 (consing_since_gc, gc_relative_threshold, memory_full_cons_threshold):
5145 Make them static.
5146 * bytecode.c (MAYBE_GC): Use maybe_gc.
5147 * eval.c (eval_sub, Ffuncall): Likewise.
5148 * keyboard.c (read_char): Likewise. Adjust call to maybe_gc
5149 to avoid dependency from auto-save feature.
5150
5151 2012-07-19 Paul Eggert <eggert@cs.ucla.edu>
5152
5153 * buffer.h (FOR_EACH_BUFFER): Rename from 'for_each_buffer'.
5154 (FOR_EACH_PER_BUFFER_OBJECT_AT): Rename from
5155 'for_each_per_buffer_object_at'.
5156 All uses changed. It's better to use upper-case for macros that
5157 cannot be implemented as functions, to give the reader a clue
5158 that they're special.
5159
5160 2012-07-19 Stefan Monnier <monnier@iro.umontreal.ca>
5161
5162 * alloc.c (Fgarbage_collect): Tweak docstring.
5163
5164 2012-07-19 Dmitry Antipov <dmantipov@yandex.ru>
5165
5166 Tweak the value returned from Fgarbage_collect again.
5167 * alloc.c (Fgarbage_collect): New return value, as confirmed in
5168 http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00418.html.
5169 Adjust documentation.
5170 (total_vector_bytes): Rename to total_vector_slots, adjust
5171 accounting.
5172 (total_free_vector_bytes): Rename to total_free_vector_slots,
5173 adjust accounting.
5174 (Qstring_bytes, Qvector_slots): New symbols.
5175 (syms_of_alloc): DEFSYM them.
5176
5177 2012-07-19 Dmitry Antipov <dmantipov@yandex.ru>
5178
5179 Buffer compaction primitive which may be used from Lisp.
5180 * buffer.c (compact_buffer, Fcompact_buffer): New function.
5181 (syms_of_buffer): Register Fcompact_buffer.
5182 * alloc.c (Fgarbage_collect): Use compact_buffer.
5183 * buffer.h (compact_buffer): New prototype.
5184 (struct buffer_text): New member.
5185
5186 2012-07-19 Dmitry Antipov <dmantipov@yandex.ru>
5187
5188 New macro to iterate over all buffers, miscellaneous cleanups.
5189 * lisp.h (all_buffers): Remove declaration.
5190 * buffer.h (all_buffers): Add declaration, with comment.
5191 (for_each_buffer): New macro.
5192 * alloc.c (Fgarbage_collect, mark_object): Use it.
5193 * buffer.c (Fkill_buffer, Fbuffer_swap_text, Fset_buffer_multibyte)
5194 (init_buffer): Likewise.
5195 * data.c (Fset_default): Likewise.
5196 * coding.c (code_conversion_restore): Remove redundant check
5197 for dead buffer.
5198 * buffer.c (Fkill_buffer): Likewise. Remove obsolete comment.
5199
5200 2012-07-18 Andreas Schwab <schwab@linux-m68k.org>
5201
5202 Fix bug that created negative-length intervals.
5203 * intervals.c (merge_interval_right, merge_interval_left):
5204 Do not zero out this interval if it is absorbed by its children,
5205 as this interval's total length doesn't change in that case. See
5206 <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00403.html>.
5207
5208 2012-07-18 Paul Eggert <eggert@cs.ucla.edu>
5209
5210 * alloc.c (Fmake_bool_vector): Fix off-by-8 bug
5211 when invoking (make-bool-vector N t) and N is a positive
5212 multiple of 8 -- the last 8 bits were mistakenly cleared.
5213
5214 Remove some struct layout assumptions in bool vectors.
5215 * alloc.c (bool_header_size): New constant.
5216 (header_size, word_size): Move earlier, as they're now used earlier.
5217 Use 'word_size' in a few more places, where it's appropriate.
5218 (Fmake_bool_vector, sweep_vectors): Don't assume that there is no
5219 padding before the data member of a bool vector.
5220 (sweep_vectors): Use PSEUDOVECTOR_TYPEP, in an eassert, rather
5221 than doing the check by hand with an abort ().
5222
5223 2012-07-18 Stefan Monnier <monnier@iro.umontreal.ca>
5224
5225 * eval.c (Fdefvar): Don't check constants since we only set the var if
5226 it's not yet defined anyway (bug#11904).
5227
5228 * lisp.h (last_undo_boundary): Declare new var.
5229 * keyboard.c (command_loop_1): Set it.
5230 * cmds.c (Fself_insert_command): Use it to only remove boundaries that
5231 were auto-added by the command loop (bug#11774).
5232
5233 2012-07-18 Andreas Schwab <schwab@linux-m68k.org>
5234
5235 * w32font.c (Qsymbol): Remove local definition.
5236 (syms_of_w32font): Don't DEFSYM it.
5237
5238 2012-07-18 Dmitry Antipov <dmantipov@yandex.ru>
5239
5240 Fix sweep_vectors to handle large bool vectors correctly.
5241 * alloc.c (sweep_vectors): Account total_vector_bytes for
5242 bool vectors larger than VBLOCK_BYTES_MAX.
5243
5244 2012-07-18 Chong Yidong <cyd@gnu.org>
5245
5246 * frame.c (x_set_frame_parameters): Revert bogus change introduced
5247 in 2012-05-25 commit by Paul Eggert (Bug#11738).
5248
5249 2012-07-18 Dmitry Antipov <dmantipov@yandex.ru>
5250
5251 Return more descriptive data from Fgarbage_collect.
5252 Suggested by Stefan Monnier in
5253 http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00369.html.
5254 * alloc.c (bounded_number): New function.
5255 (total_buffers, total_vectors): New variable.
5256 (total_string_size): Rename to total_string_bytes, adjust users.
5257 (total_vector_size): Rename to total_vector_bytes, adjust users.
5258 (sweep_vectors): Account total_vectors and total_vector_bytes.
5259 (Fgarbage_collect): New return value. Adjust documentation.
5260 (gc_sweep): Account total_buffers.
5261 (Fmemory_free, Fmemory_use_counts): Use bounded_number.
5262 (VECTOR_SIZE): Remove.
5263 * data.c (Qfloat, Qvector, Qsymbol, Qstring, Qcons): Make global.
5264 (Qinterval, Qmisc): New symbols.
5265 (syms_of_data): Initialize them.
5266 * lisp.h (Qinterval, Qsymbol, Qstring, Qmisc, Qvector, Qfloat)
5267 (Qcons, Qbuffer): New declarations.
5268
5269 2012-07-17 Paul Eggert <eggert@cs.ucla.edu>
5270
5271 * alloc.c (Fmemory_free): Account for memory-free's own storage.
5272 Round up, not down. Improve doc.
5273
5274 2012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
5275
5276 Restore old code in allocate_string_data to avoid Faset breakage.
5277 Reported by Julien Danjou <julien@danjou.info> in
5278 http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00371.html.
5279 * alloc.c (allocate_string_data): Restore old code with minor
5280 adjustments, fix comment to explain this subtle issue.
5281
5282 2012-07-17 Eli Zaretskii <eliz@gnu.org>
5283
5284 Remove FILE_SYSTEM_CASE.
5285 * s/msdos.h (FILE_SYSTEM_CASE): Don't define.
5286
5287 * fileio.c (FILE_SYSTEM_CASE): Don't define.
5288 (Ffile_name_directory, Fexpand_file_name): Don't use FILE_SYSTEM_CASE.
5289 Fixes problems on MS-DOS with Vtemp_file_name_pattern when
5290 call-process-region passes it through expand-file-name.
5291
5292 * dired.c (file_name_completion): Don't use FILE_SYSTEM_CASE.
5293
5294 2012-07-17 Andreas Schwab <schwab@linux-m68k.org>
5295
5296 Fix crash when creating indirect buffer (Bug#11917)
5297 * buffer.c (buffer_lisp_local_variables): Add argument CLONE.
5298 Don't handle unbound variables specially if non-zero.
5299 (Fbuffer_local_variables): Pass zero.
5300 (clone_per_buffer_values): Pass non-zero.
5301
5302 2012-07-17 Andreas Schwab <schwab@linux-m68k.org>
5303
5304 * gnutls.c (emacs_gnutls_handshake): Revert last change. Add QUIT
5305 to make the loop interruptible.
5306
5307 2012-07-17 Andreas Schwab <schwab@linux-m68k.org>
5308
5309 * gnutls.c (emacs_gnutls_handshake): Only retry if
5310 GNUTLS_E_INTERRUPTED.
5311
5312 2012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
5313
5314 Cleanup and convert miscellaneous checks to eassert.
5315 * alloc.c (mark_interval): Fix comment, partially rephrase
5316 old comment from intervals.h (see below).
5317 * intervals.c (find_interval, adjust_intervals_for_insertion)
5318 (delete_interval, adjust_intervals_for_deletion)
5319 (graft_intervals_into_buffer, temp_set_point_both, copy_intervals):
5320 Convert to eassert.
5321 (adjust_intervals_for_insertion, make_new_interval):
5322 Remove obsolete and unused code.
5323 * intervals.h (struct interval): Remove obsolete comment.
5324 * textprotp.c (erase_properties): Remove unused code.
5325 (Fadd_text_properties, set_text_properties_1, Fremove_text_properties)
5326 (Fremove_list_of_text_properties): Convert to eassert.
5327
5328 2012-07-17 Chong Yidong <cyd@gnu.org>
5329
5330 * editfns.c (Finsert_char): Doc fix.
5331
5332 2012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
5333
5334 Fix previous change to make Fmemory_free always accurate.
5335 * alloc.c (make_interval): Update total_free_intervals.
5336 (make_float): Likewise for total_free_floats.
5337 (free_cons, Fcons): Likewise for total_free_conses.
5338 (SETUP_ON_FREE_LIST, allocate_vector_from_block):
5339 Likewise for total_free_vector_bytes.
5340 (Fmake_symbol): Likewise for total_free_symbols.
5341 (bytes_free): Remove.
5342
5343 2012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
5344
5345 Simple free memory accounting feature.
5346 * alloc.c (bytes_free, total_free_vector_bytes): New variable.
5347 (sweep_vectors): Accumulate size of free vectors.
5348 (Fgarbage_collect): Setup bytes_free.
5349 (Fmemory_free): New function.
5350 (syms_of_alloc): Register it.
5351
5352 2012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
5353
5354 Cleanup overlays checking.
5355 * buffer.h (OVERLAY_VALID): Remove as useless synonym of OVERLAYP.
5356 * buffer.c (overlay_touches_p, recenter_overlay_lists): Change to
5357 eassert and OVERLAYP.
5358 (sort_overlays): Change to use OVERLAYP.
5359
5360 2012-07-16 René Kyllingstad <Rene@Kyllingstad.com> (tiny change)
5361
5362 * editfns.c (Finsert_char): Make it interactive, and make the
5363 second arg optional. Copy interactive spec and docstring from
5364 ucs-insert.
5365
5366 2012-07-17 Paul Eggert <eggert@cs.ucla.edu>
5367
5368 * floatfns.c (Fabs): Do not wrap fabs inside IN_FLOAT (Bug#11913).
5369 Unlike the other wrapped functions, fabs has an unspecified
5370 effect on errno.
5371
5372 2012-07-16 Jan Djärv <jan.h.d@swipnet.se>
5373
5374 * nsterm.m (keyDown): Interpret flags without left/right bits
5375 as the left key (Bug#11670).
5376
5377 2012-07-16 Dmitry Antipov <dmantipov@yandex.ru>
5378
5379 Remove empty and useless init functions.
5380 * lisp.h (init_character_once, init_fns, init_image)
5381 (init_filelock, init_sound): Remove prototype.
5382 * character.c (init_character_once): Remove.
5383 * filelock.c (init_filelock): Likewise.
5384 * fns.c (init_fns): Likewise.
5385 * image.c (init_image): Likewise.
5386 * sound.c (init_sound): Likewise.
5387 * emacs.c (main): Adjust accordingly.
5388
5389 2012-07-16 Dmitry Antipov <dmantipov@yandex.ru>
5390
5391 * gtkutil.h: Tiny cleanups.
5392 (use_old_gtk_file_dialog): Remove useless declaration.
5393 (xg_uses_old_file_dialog): Add suggested const attribute.
5394
5395 2012-07-15 Eli Zaretskii <eliz@gnu.org>
5396
5397 * bidi.c (MAX_STRONG_CHAR_SEARCH): New macro.
5398 (bidi_paragraph_init): Use it to limit search forward for a strong
5399 directional character in abnormally large paragraphs full of
5400 neutral or weak characters. (Bug#11943)
5401
5402 2012-07-15 Stefano Facchini <stefano.facchini@gmail.com> (tiny change)
5403
5404 * gtkutil.c (xg_create_tool_bar): Apply "primary-toolbar" style to
5405 the toolbar (Bug#9451).
5406 (xg_make_tool_item): Give the widget event box a transparent
5407 background.
5408
5409 2012-07-15 Dmitry Antipov <dmantipov@yandex.ru>
5410
5411 Cleanup basic allocation variables and functions.
5412 * alloc.c (ignore_warnings, init_intervals, init_float)
5413 (init_cons, init_symbol, init_marker): Remove.
5414 (interval_block_index): Initialize to INTERVAL_BLOCK_SIZE.
5415 (float_block_index): Initialize to FLOAT_BLOCK_SIZE.
5416 (cons_block_index): Initialize to CONS_BLOCK_SIZE.
5417 (symbol_block_size): Initialize to SYMBOL_BLOCK_SIZE.
5418 (marker_block_index): Initialize to MARKER_BLOCK_SIZE.
5419 (staticidx, init_alloc_once, init_strings, free_ablock):
5420 Remove redundant initialization.
5421 * fns.c (init_weak_hash_tables): Remove.
5422 * lisp.h (init_weak_hash_tables): Remove prototype.
5423
5424 2012-07-15 Dmitry Antipov <dmantipov@yandex.ru>
5425
5426 Use zero_vector where appropriate.
5427 * alloc.c (zero_vector): Define as Lisp_Object. Adjust users
5428 accordingly.
5429 * lisp.h (zero_vector): New declaration.
5430 * font.c (null_vector): Remove.
5431 (syms_of_font): Remove initialization and staticpro.
5432 (font_list_entities, font_find_for_lface): Change to use zero_vector.
5433 * keymap.c (Faccessible_keymaps): Likewise.
5434
5435 2012-07-15 Leo Liu <sdl.web@gmail.com>
5436
5437 * fringe.c: Fix typo in comments.
5438
5439 2012-07-14 Leo Liu <sdl.web@gmail.com>
5440
5441 * fringe.c: Add a new bitmap exclamation-mark.
5442
5443 2012-07-14 Eli Zaretskii <eliz@gnu.org>
5444
5445 * gmalloc.c (GMALLOC_INHIBIT_VALLOC): Don't reference.
5446
5447 * s/msdos.h (BSD_SYSTEM, DATA_START, GC_SETJMP_WORKS, HAVE_MOUSE)
5448 (HAVE_MENUS): Don't define, defined by editing config.in with
5449 msdos/sed2v2.inp.
5450 (GMALLOC_INHIBIT_VALLOC): Don't define.
5451 (MODE_LINE_BINARY_TEXT): Remove, not used anymore.
5452
5453 2012-07-14 Juanma Barranquero <lekktu@gmail.com>
5454
5455 * s/ms-w32.h (GC_SETJMP_WORKS, GC_MARK_STACK): Set in nt/config.nt.
5456
5457 2012-07-14 Glenn Morris <rgm@gnu.org>
5458
5459 * s/aix4-2.h, s/freebsd.h, s/gnu-linux.h, s/hpux10-20.h:
5460 * s/irix6-5.h, s/netbsd.h, s/sol2-6.h, s/unixware.h:
5461 Let configure set GC_SETJMP_WORKS, GC_MARK_STACK.
5462
5463 2012-07-13 Glenn Morris <rgm@gnu.org>
5464
5465 * s/gnu-linux.h (GC_MARK_SECONDARY_STACK): Let configure set it.
5466
5467 * s/usg5-4-common.h (SETUP_SLAVE_PTY): Let configure set it.
5468 * s/irix6-5.h (SETUP_SLAVE_PTY): No more need to unset it.
5469
5470 2012-07-13 Jan Djärv <jan.h.d@swipnet.se>
5471
5472 * nsterm.m (uRect): Only define if NS_IMPL_GNUSTEP.
5473 (x_free_frame_resources): Pass x_free_frame_resources to NSTRACE.
5474 (ns_lisp_to_color, ns_string_to_lispmod, ns_term_init)
5475 (ns_term_shutdown, requestService, initFrameFromEmacs): Use SSDATA
5476 where appropriate.
5477 (ns_exec_path, ns_load_path, changeFont): Put () around assignment used
5478 as boolean expression.
5479 (x_set_window_size): Remove unused variable toolbar.
5480 (ns_get_color_default, ns_mod_to_lisp): Remove.
5481 (ns_mouse_position): Remove unused variables xchar and ychar.
5482 (ns_compute_glyph_string_overhangs): Remove unused variable face.
5483 (ns_set_vertical_scroll_bar): Remove unused variable count.
5484 (ns_delete_terminal): Remove unused variable i.
5485 (ns_term_init): Remove unused variables r, g and b.
5486 (mouseDown): Remove unused variable window.
5487 (windowDidResize): Move definition of theWindow inside NS_IMPL_GNUSTEP.
5488 (initFrameFromEmacs): Remove unused variable vbextra.
5489 (mouseEntered): Remove unused variables p and dpyinfo.
5490 (mouseExited): Remove unused variables p and r.
5491 (ns_define_frame_cursor, ns_clear_frame_area)
5492 (ns_draw_window_cursor, ns_initialize_display_info): Make static.
5493 (menuDown): Assign [sender tag] to variable and cast the variable.
5494
5495 * nsterm.h (menuDown): Add id as type to argument sender.
5496 (ns_display_info_for_name): Add Lisp_Object argument.
5497 (ns_term_init): Add Lisp_Object argument.
5498 (ns_map_event_to_object): Add void argument.
5499 (ns_string_from_pasteboard, ns_string_to_pasteboard): Add correct
5500 prototype with arguments and only declare if __OBJC__.
5501 (nxatoms_of_nsselect): Add void argument.
5502 (ns_lisp_to_cursor_type): Add Lisp_Object argument.
5503 (ns_alloc_autorelease_pool): Add void argument.
5504 (ns_release_autorelease_pool): Add void* argument.
5505 (ns_get_defaults_value): Add const char* argument.
5506
5507 * nsmenu.m (ns_update_menubar, ns_menu_show, process_dialog)
5508 (initFromContents): Use SSDATA where appropriate.
5509 (ns_update_menubar): Add braces to ambigous if-else.
5510 (initWithTitle): Put () around assignment in if statement.
5511 (ns_menu_show): Remove unused variables window and keymap.
5512 (update_frame_tool_bar): Remove unused variable selected_p.
5513 (initWithContentRect): Remove unused variable this_cmd_name.
5514
5515 * nsimage.m (ns_load_image, allocInitFromFile): Use SSDATA where
5516 appropriate.
5517 (setXBMColor): Remove unused variable len.
5518 (setPixmapData): Put () around assignment in loop statement.
5519
5520 * nsfont.m (ns_get_family, ns_lang_to_script, ns_otf_to_script)
5521 (ns_registry_to_script, ns_get_req_script, nsfont_open): Use SSDATA
5522 where appropriate.
5523 (ns_get_covering_families, ns_findfonts, nsfont_list_family): Put ()
5524 around assignment in loop statement.
5525 (nsfont_open): Remove unused variable i.
5526 (nsfont_open): Remove unused variable len.
5527 (nsfont_draw): Remove unused variable cs.
5528
5529 * nsfns.m (x_set_icon_name, ns_set_name_internal)
5530 (ns_set_name_as_filename, ns_implicitly_set_icon_type)
5531 (x_set_icon_type, ns_lisp_to_cursor_type, Fns_read_file_name)
5532 (Fns_get_resource, Fns_set_resource, Fx_open_connection)
5533 (Fns_font_name, Fns_perform_service)
5534 (Fns_convert_utf8_nfd_to_nfc, ns_do_applescript)
5535 (Fns_do_applescript, Fx_show_tip): Use SSDATA where appropriate.
5536 (ns_set_name): Remove unused variable view.
5537 (x_set_menu_bar_lines): Remove unused variable olines.
5538 (x_set_tool_bar_lines): Remove unused variable root_window.
5539 (Fns_list_colors): Put () around assignment in while statement.
5540 (Fns_perform_service): Remove unused variable len.
5541 (Fns_display_usable_bounds): Remove unused variable top.
5542 (syms_of_nsfns): Remove unused variable i.
5543
5544 * nsmenu.m (ns_update_menubar): Exchange place of argument 2 and 3 to
5545 memcpy (Bug#11907).
5546
5547 2012-07-13 Kalle Kankare <kalle.kankare@iki.fi> (tiny change)
5548
5549 * image.c (Fimagemagick_types): Initialize ex with GetExceptionInfo
5550 and free it with DestroyExceptionInfo (Bug#11558).
5551
5552 2012-07-13 Juanma Barranquero <lekktu@gmail.com>
5553
5554 * s/ms-w32.h (FIRST_PTY_LETTER, HAVE_SOCKETS): Move to nt/config.nt.
5555 (HAVE_ATTRIBUTE_ALIGNED, HAVE_C99_STRTOLD, HAVE___BUILTIN_UNWIND_INIT):
5556 Set here, not in nt/config.nt.
5557
5558 2012-07-13 Eli Zaretskii <eliz@gnu.org>
5559
5560 * xdisp.c (move_it_in_display_line_to): On GUI terminals, allow
5561 cursor overflow into the last glyph on display line when the right
5562 fringe is off. (Bug#11832)
5563
5564 2012-07-13 Paul Eggert <eggert@cs.ucla.edu>
5565
5566 * xdisp.c (produce_special_glyphs): Now static.
5567 * dispextern.h (produce_special_glyphs): Remove decl.
5568
5569 2012-07-13 Glenn Morris <rgm@gnu.org>
5570
5571 * s/bsd-common.h, s/cygwin.h: Remove empty files.
5572 * s/freebsd.h, s/netbsd.h: Do not include bsd-common.h.
5573
5574 * s/usg5-4-common.h (USG, USG5):
5575 * s/template.h (USG5, USG, HPUX, BSD4_2, BSD_SYSTEM):
5576 * s/sol2-6.h (SOLARIS2):
5577 * s/irix6-5.h (IRIX6_5):
5578 * s/hpux10-20.h (USG, USG5, HPUX):
5579 * s/gnu-linux.h (USG, GNU_LINUX):
5580 * s/freebsd.h (BSD_SYSTEM):
5581 * s/darwin.h (BSD4_2, BSD_SYSTEM, DARWIN_OS):
5582 * s/cygwin.h (CYGWIN):
5583 * s/bsd-common.h (BSD_SYSTEM, BSD4_2):
5584 * s/aix4-2.h (USG, USG5, _AIX): Move "system type" macros to configure.
5585
5586 2012-07-13 BT Templeton <bpt@hcoop.net> (tiny change)
5587
5588 * nsfont.m (ns_charset_covers): Don't abort if no bitmap (Bug#11853).
5589
5590 2012-07-13 Glenn Morris <rgm@gnu.org>
5591
5592 * s/usg5-4-common.h (NSIG_MINIMUM): Let configure set it.
5593
5594 * s/gnu-linux.h, s/irix6-5.h: Let configure set ULIMIT_BREAK_VALUE.
5595
5596 * process.c (init_process_emacs): Replace MIN_PTY_KERNEL_VERSION.
5597 * s/darwin.h (MIN_PTY_KERNEL_VERSION): Remove single-use macro.
5598
5599 2012-07-12 Glenn Morris <rgm@gnu.org>
5600
5601 * s/darwin.h (SYSTEM_PURESIZE_EXTRA): Move to configure.
5602
5603 * process.c (init_process_emacs): Rename from init_process.
5604 The old name is also the name of a Mach system call.
5605 * lisp.h, emacs.c: Update for this name change.
5606 * nsgui.h, sysselect.h, s/darwin.h: Remove workaround that is no
5607 longer needed.
5608
5609 2012-07-12 Eli Zaretskii <eliz@gnu.org>
5610
5611 * xdisp.c (insert_left_trunc_glyphs): Fix incorrect size in
5612 memmove call that removes glyphs covered by the left truncation
5613 glyph. Improve commentary.
5614 (display_line): Fix display of continuation glyphs on GUI frames
5615 when the right fringe is turned off and variable-size fonts are
5616 used in the window. Move the code that appends a stretch glyph to
5617 produce_special_glyphs, so that it could be used for truncation
5618 and continuation glyphs alike.
5619 (produce_special_glyphs) [HAVE_WINDOW_SYSTEM]: Produce a stretch
5620 glyph of a suitably computed width, to align the special glyphs at
5621 the window margin. Code moved from display_line. (Bug#11832)
5622
5623 2012-07-12 Glenn Morris <rgm@gnu.org>
5624
5625 * s/aix4-2.h, s/hpux10-20.h: Let configure set NO_EDITRES.
5626
5627 * s/gnu-linux.h, s/hpux10-20.h:
5628 Do not unconditionally define HAVE_XRMSETDATABASE.
5629
5630 * s/gnu-linux.h (UNIX98_PTYS): Let configure set it.
5631
5632 2012-07-12 Paul Eggert <eggert@cs.ucla.edu>
5633
5634 Fix typos that broke OS X build.
5635 Reported by Randal L. Schwartz in
5636 <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00225.html>.
5637 * nsterm.m (ns_timeout): Add missing local decl.
5638 (ns_get_color): snprintf -> sprintf, to fix typo.
5639
5640 2012-07-12 Glenn Morris <rgm@gnu.org>
5641
5642 * src/s/aix4-2.h, src/s/cygwin.h, src/s/darwin.h:
5643 * src/s/gnu-linux.h, src/s/hpux10-20.h, src/s/irix6-5.h:
5644 * src/s/sol2-6.h, src/s/unixware.h, src/s/usg5-4-common.h:
5645 Move PTY_NAME_SPRINTF, PTY_TTY_NAME_SPRINTF to configure.
5646
5647 * s/cygwin.h, s/darwin.h, s/gnu-linux.h, s/irix6-5.h:
5648 Move PTY_OPEN to configure.
5649
5650 * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/darwin.h:
5651 * s/gnu-linux.h, s/hpux10-20.h, s/irix6-5.h, s/template.h:
5652 * s/usg5-4-common.h: Move FIRST_PTY_LETTER, PTY_ITERATION to configure.
5653
5654 2012-07-12 Dmitry Antipov <dmantipov@yandex.ru>
5655
5656 Use empty_unibyte_string where applicable.
5657 * keyboard.c (parse_tool_bar_item): Use empty_unibyte_string.
5658 * lread.c (read1): Likewise.
5659 * xsettings.c (syms_of_xsettings): Likewise.
5660
5661 2012-07-12 Glenn Morris <rgm@gnu.org>
5662
5663 * s/cygwin.h (G_SLICE_ALWAYS_MALLOC):
5664 * s/freebsd.h (BROKEN_PTY_READ_AFTER_EAGAIN):
5665 * s/irix6-5.h (SETPGRP_RELEASES_CTTY, PREFER_VSUSP):
5666 * s/hpux10-20.h (RUN_TIME_REMAP):
5667 * s/bsd-common.h (TABDLY): Move to configure.
5668
5669 * s/hpux10-20.h, s/sol2-6.h: Move XOS_NEEDS_TIME_H to configure.
5670
5671 * s/bsd-common.h, s/darwin.h: Move TAB3 to configure.
5672
5673 * s/aix4-2.h (BROKEN_FIONREAD, BROKEN_SIGAIO, BROKEN_SIGPTY)
5674 (BROKEN_SIGPOLL, BROKEN_GET_CURRENT_DIR_NAME): Let configure set them.
5675
5676 * s/darwin.h (NO_ABORT, NO_MATHERR): Let configure set them.
5677
5678 * s/bsd-common.h, s/cygwin.h, s/gnu-linux.h, s/irix6-5.h:
5679 * s/template.h: Move NARROWPROTO to configure.
5680
5681 2012-07-11 Glenn Morris <rgm@gnu.org>
5682
5683 * s/gnu-linux.h, s/sol2-6.h: No longer define POSIX,
5684 unused since 2011-01-17 change to systty.h.
5685
5686 * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/darwin.h, s/gnu-linux.h:
5687 * s/hpux10-20.h, s/template.h, s/usg5-4-common.h:
5688 Move HAVE_PTYS and HAVE_SOCKETS to configure.
5689
5690 2012-07-11 Paul Eggert <eggert@cs.ucla.edu>
5691
5692 * s/sol2-6.h (HAVE_LIBKSTAT): Remove. (Bug#11914)
5693
5694 2012-07-11 Glenn Morris <rgm@gnu.org>
5695
5696 * s/darwin.h, s/gnu-linux.h, s/template.h:
5697 Move INTERRUPT_INPUT to configure.
5698
5699 2012-07-11 Dmitry Antipov <dmantipov@yandex.ru>
5700
5701 Minor adjustments to interning code.
5702 * lisp.h (intern, intern_c_string): Redefine as static inline
5703 wrappers for intern_1 and intern_c_string_1, respectively.
5704 (intern_1, intern_c_string_1): Rename prototypes.
5705 * lread.c (intern_1, intern_c_string_1, oblookup):
5706 Simplify Vobarray checking.
5707 * font.c (font_intern_prop): Likewise. Adjust comment.
5708 * w32font.c (intern_font_name): Likewise.
5709
5710 2012-07-11 Andreas Schwab <schwab@linux-m68k.org>
5711
5712 * gnutls.c (Fgnutls_boot): Properly parse :keylist argument.
5713
5714 * coding.c (Fdefine_coding_system_internal): Use XCAR/XCDR instead
5715 of Fcar/Fcdr if possible.
5716 * font.c (check_otf_features): Likewise.
5717 * fontset.c (Fnew_fontset): Likewise.
5718 * gnutls.c (Fgnutls_boot): Likewise.
5719 * minibuf.c (read_minibuf): Likewise.
5720 * msdos.c (IT_set_frame_parameters): Likewise.
5721 * xmenu.c (Fx_popup_dialog): Likewise.
5722 * w32menu.c (Fx_popup_dialog): Likewise.
5723
5724 2012-07-11 Glenn Morris <rgm@gnu.org>
5725
5726 * s/bsd-common.h, s/cygwin.h: No need to undefine INTERRUPT_INPUT,
5727 since nothing has defined it on these platforms.
5728
5729 * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/gnu-linux.h:
5730 * s/irix6-5.h: Move SIGNALS_VIA_CHARACTERS to configure.
5731
5732 * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/darwin.h:
5733 * s/gnu-linux.h, s/hpux10-20.h, s/template.h, s/usg5-4-common.h:
5734 Move CLASH_DETECTION to configure.
5735
5736 * s/gnu.h: Remove file, which is now empty.
5737
5738 * s/gnu.h, s/gnu-linux.h:
5739 Move GNU_LIBRARY_PENDING_OUTPUT_COUNT to configure.
5740
5741 2012-07-11 John Wiegley <johnw@newartisans.com>
5742
5743 * alloc.c (mark_memory): Guard the "no_address_safety_analysis"
5744 function attribute, so we only use it if it exists in the
5745 compiler.
5746
5747 2012-07-11 Dmitry Antipov <dmantipov@yandex.ru>
5748
5749 Avoid call to strlen in fast_c_string_match_ignore_case.
5750 * search.c (fast_c_string_match_ignore_case): Change to use
5751 length argument. Adjust users accordingly.
5752 * lisp.h (fast_c_string_match_ignore_case): Adjust prototype.
5753
5754 2012-07-11 Paul Eggert <eggert@cs.ucla.edu>
5755
5756 Assume mkdir, rmdir.
5757 * sysdep.c (mkdir) [!HAVE_MKDIR]: Remove.
5758 * sysdep.c (rmdir) [!HAVE_RMDIR]: Remove.
5759
5760 Assume rename.
5761 * sysdep.c (rename) [!HAVE_RENAME]: Remove.
5762
5763 Assume perror.
5764 * s/hpux10-20.h (HAVE_PERROR): Remove.
5765 * sysdep.c (perror) [HPUX && !HAVE_PERROR]:
5766 Remove dummy definition, as this problem was obsolete long ago.
5767
5768 Assume strerror.
5769 * sysdep.c (strerror) [!HAVE_STRERROR && !WINDOWSNT]: Remove.
5770
5771 2012-07-11 Dmitry Antipov <dmantipov@yandex.ru>
5772
5773 Avoid calls to strlen in font processing functions.
5774 * font.c (font_parse_name, font_parse_xlfd, font_parse_fcname)
5775 (font_open_by_name): Change to use length argument.
5776 Adjust users accordingly.
5777 * font.h (font_open_by_name, font_parse_xlfd, font_unparse_xlfd):
5778 Adjust prototypes.
5779 * xfont.c (xfont_decode_coding_xlfd, font_unparse_xlfd):
5780 Change to return ptrdiff_t.
5781 (xfont_list_pattern, xfont_match): Use length returned by
5782 xfont_decode_coding_xlfd.
5783 * xfns.c (x_default_font_parameter): Omit useless xstrdup.
5784
5785 2012-07-11 Glenn Morris <rgm@gnu.org>
5786
5787 * s/darwin.h, s/freebsd.h, s/netbsd.h:
5788 Move DONT_REOPEN_PTY to configure.
5789
5790 * sound.c (DEFAULT_SOUND_DEVICE) [!WINDOWSNT]:
5791 * s/netbsd.h (DEFAULT_SOUND_DEVICE): Let configure set it.
5792
5793 2012-07-10 Paul Eggert <eggert@cs.ucla.edu>
5794
5795 Remove "#define unix" that is no longer needed (Bug#11905).
5796 * s/aix4-2.h (unix): Remove; no longer needed.
5797
5798 EMACS_TIME simplification (Bug#11875).
5799 This replaces macros (which typically do not work in GDB)
5800 with functions, typedefs and enums, making the code easier to debug.
5801 The functional style also makes code easier to read and maintain.
5802 * systime.h: Include <sys/time.h> on all hosts, not just if
5803 WINDOWSNT, since 'struct timeval' is needed in general.
5804 (EMACS_TIME): Now a typedef, not a macro.
5805 (EMACS_TIME_RESOLUTION, LOG10_EMACS_TIME_RESOLUTION): Now constants,
5806 not macros.
5807 (EMACS_SECS, EMACS_NSECS, EMACS_TIME_SIGN, EMACS_TIME_VALID_P)
5808 (EMACS_TIME_FROM_DOUBLE, EMACS_TIME_TO_DOUBLE, EMACS_TIME_EQ)
5809 (EMACS_TIME_NE, EMACS_TIME_GT, EMACS_TIME_GE, EMACS_TIME_LT)
5810 (EMACS_TIME_LE): Now functions, not macros.
5811 (EMACS_SET_SECS, EMACS_SET_NSECS, EMACS_SET_SECS_NSECS)
5812 (EMACS_SET_USECS, EMACS_SET_SECS_USECS): Remove these macros,
5813 which are not functions. All uses rewritten to use:
5814 (make_emacs_time): New function.
5815 (EMACS_SECS_ADDR, EMACS_SET_INVALID_TIME, EMACS_GET_TIME)
5816 (EMACS_ADD_TIME, EMACS_SUB_TIME): Remove these macros, which are
5817 not functions. All uses rewritten to use the following, respectively:
5818 (emacs_secs_addr, invalid_emacs_time, get_emacs_time)
5819 (add_emacs_time, sub_emacs_time): New functions.
5820 * atimer.c: Don't include <sys/time.h>, as "systime.h" does this.
5821 * fileio.c (Fcopy_file):
5822 * xterm.c (XTflash): Get the current time closer to when it's used.
5823 * makefile.w32-in ($(BLD)/atimer.$(O)): Update dependencies.
5824
5825 * bytecode.c (targets): Suppress -Woverride-init warnings.
5826
5827 Simplify by avoiding confusing use of strncpy etc.
5828 * doc.c (Fsnarf_documentation):
5829 * fileio.c (Ffile_name_directory, Fsubstitute_in_file_name):
5830 * frame.c (Fmake_terminal_frame):
5831 * gtkutil.c (get_utf8_string):
5832 * lread.c (openp):
5833 * nsmenu.m (ns_update_menubar):
5834 * regex.c (regerror):
5835 Prefer memcpy to strncpy and strncat when either will do.
5836 * fileio.c (Fsubstitute_in_file_name):
5837 * keyboard.c (MULTI_LETTER_MOD, parse_modifiers_uncached)
5838 (menu_separator_name_p):
5839 * nsmenu.m (ns_update_menubar):
5840 Prefer memcmp to strncmp when either will do.
5841 * nsterm.m: Include <ftoastr.h>.
5842 (ns_get_color):
5843 * s/gnu-linux.h, s/sol2-6.h, s/unixware.h (PTY_TTY_NAME_SPRINTF):
5844 Prefer snprintf to strncpy.
5845 * nsterm.m (ns_term_init):
5846 * widget.c (set_frame_size) [0]: Prefer xstrdup to xmalloc + strncpy.
5847 * nsterm.m (ns_term_init):
5848 Avoid the need for strncpy, by using build_string or
5849 make_unibyte_string directly. Use dtoastr, not snprintf.
5850 * process.c (Fmake_network_process): Diagnose service names that
5851 are too long, rather than silently truncating them or creating
5852 non-null-terminated names.
5853 (Fnetwork_interface_info): Likewise, for interface names.
5854 * sysdep.c (system_process_attributes) [GNU_LINUX]:
5855 Prefer sprintf to strncat.
5856 * xdisp.c (debug_method_add) [GLYPH_DEBUG]:
5857 Prefer vsnprintf to vsprintf + strncpy.
5858
5859 2012-07-10 Glenn Morris <rgm@gnu.org>
5860
5861 * dispnew.c (PENDING_OUTPUT_COUNT) [!__GNU_LIBRARY__]:
5862 Clarify fallback case.
5863
5864 2012-07-10 Dmitry Antipov <dmantipov@yandex.ru>
5865
5866 Use XCAR and XCDR instead of Fcar and Fcdr where possible.
5867 * callint.c, coding.c, doc.c, editfns.c, eval.c, font.c, fontset.c,
5868 * frame.c, gnutls.c, minibuf.c, msdos.c, textprop.c, w32fns.c,
5869 * w32menu.c, window.c, xmenu.c: Change to use XCAR and XCDR
5870 where argument type is known to be a Lisp_Cons.
5871
5872 2012-07-10 Tom Tromey <tromey@redhat.com>
5873
5874 * bytecode.c (BYTE_CODE_THREADED): New macro.
5875 (BYTE_CODES): New macro. Replaces all old byte-code defines.
5876 (enum byte_code_op): New type.
5877 (CASE, NEXT, FIRST, CASE_DEFAULT, CASE_ABORT): New macros.
5878 (exec_byte_code): Use them. Use token threading when applicable.
5879
5880 2012-07-10 Dmitry Antipov <dmantipov@yandex.ru>
5881
5882 Optimize pure C strings initialization.
5883 * lisp.h (make_pure_string): Fix prototype.
5884 (build_pure_c_string): New function, defined as static inline. This
5885 provides a better opportunity to optimize away calls to strlen when
5886 the function is called with compile-time constant argument.
5887 * alloc.c (make_pure_c_string): Fix comment. Change to add nchars
5888 argument, adjust users accordingly. Use build_pure_c_string where
5889 appropriate.
5890 * buffer.c, coding.c, data.c, dbusbind.c, fileio.c, fontset.c, frame.c,
5891 * keyboard.c, keymap.c, lread.c, search.c, syntax.c, w32fns.c, xdisp.c,
5892 * xfaces.c, xfns.c, xterm.c: Use build_pure_c_string where appropriate.
5893
5894 2012-07-10 Dmitry Antipov <dmantipov@yandex.ru>
5895
5896 Avoid calls to strlen in miscellaneous functions.
5897 * buffer.c (init_buffer): Use precalculated len, adjust if needed.
5898 * font.c (Ffont_xlfd_name): Likewise. Change to call make_string.
5899 * lread.c (openp): Likewise.
5900
5901 2012-07-10 Dmitry Antipov <dmantipov@yandex.ru>
5902
5903 Avoid calls to strlen in path processing functions.
5904 * fileio.c (file_name_as_directory): Add comment. Change to add
5905 srclen argument and return the length of result. Adjust users
5906 accordingly.
5907 (directory_file_name): Fix comment. Change to add srclen argument,
5908 swap 1st and 2nd arguments to obey the common convention.
5909 Adjust users accordingly.
5910 * filelock.c (fill_in_lock_file_name): Avoid calls to strlen.
5911
5912 2012-07-10 Glenn Morris <rgm@gnu.org>
5913
5914 * s/cygwin.h, s/darwin.h, s/freebsd.h, s/netbsd.h, s/unixware.h:
5915 Move PENDING_OUTPUT_COUNT definition to configure.
5916
5917 * s/irix6-5.h (DATA_START, DATA_SEG_BITS):
5918 * s/hpux10-20.h (DATA_SEG_BITS, DATA_START):
5919 * s/gnu.h (DATA_START): Move definitions to configure.
5920
5921 * s/irix6-5.h (SETUP_SLAVE_PTY, PTY_NAME_SPRINTF): Drop ifdef guards.
5922 We include usg5-4-common.h, which defines them both.
5923
5924 * s/gnu.h: Don't include fcntl.h (every file in Emacs that uses
5925 O_RDONLY already includes it).
5926
5927 Stop ns builds setting the EMACSLOADPATH environment variable.
5928 * nsterm.m (ns_load_path): Rename from ns_init_paths.
5929 Now it does not set EMACSLOADPATH, just returns the load-path string.
5930 * nsterm.h: Update accordingly.
5931 * lread.c [HAVE_NS]: Include nsterm.h.
5932 (init_lread) [HAVE_NS]: Use ns_load_path.
5933 * emacs.c (main) [HAVE_NS]: No longer call ns_init_paths.
5934
5935 2012-07-09 Glenn Morris <rgm@gnu.org>
5936
5937 * s/gnu.h (SIGNALS_VIA_CHARACTERS): No need to define it here,
5938 since the included bsd-common.h does so.
5939
5940 Stop ns builds setting the EMACSPATH environment variable.
5941 * nsterm.m (ns_exec_path): New function, split from ns_init_paths.
5942 (ns_init_paths): Do not set EMACSPATH.
5943 * nsterm.h (ns_exec_path): Add it.
5944 * callproc.c (init_callproc_1, init_callproc) [HAVE_NS]:
5945 Use ns_exec_path.
5946
5947 * nsterm.m, nsterm.h (ns_etc_directory): Fix type, empty return.
5948
5949 2012-07-09 Paul Eggert <eggert@cs.ucla.edu>
5950
5951 * process.c (wait_reading_process_output): 'waitchannels' was unset
5952 when read_kbd || !NILP (wait_for_cell); fix this.
5953
5954 Add GCC-style 'const' attribute to functions that can use it.
5955 * character.h (char_resolve_modifier_mask):
5956 * keyboard.h (make_ctrl_char):
5957 * lisp.h (multibyte_char_to_unibyte, multibyte_char_to_unibyte_safe)
5958 (init_character_once, next_almost_prime, init_fns, init_image)
5959 (flush_pending_output, init_sound):
5960 * mem-limits.h (start_of_data):
5961 * menu.h (finish_menu_items):
5962 Add ATTRIBUTE_CONST.
5963 * emacs.c (DEFINE_DUMMY_FUNCTION):
5964 Declare the dummy function with ATTRIBUTE_CONST.
5965 * lisp.h (Fbyteorder, Fmax_char, Fidentity):
5966 Add decls with ATTRIBUTE_CONST.
5967
5968 Minor improvements to make_formatted_string.
5969 * alloc.c (make_formatted_string): Prefer int to ptrdiff_t
5970 where int is good enough, as vsprintf returns an int.
5971 * lisp.h (make_formatted_string): Add ATTRIBUTE_FORMAT_PRINTF.
5972
5973 2012-07-09 Dmitry Antipov <dmantipov@yandex.ru>
5974
5975 Use make_formatted_string to avoid double length calculation.
5976 * lisp.h (make_formatted_string): New prototype.
5977 * alloc.c (make_formatted_string): New function.
5978 * buffer.c (Fgenerate_new_buffer_name): Use it.
5979 * dbus.c (syms_of_dbusbind): Likewise.
5980 * editfns.c (Fcurrent_time_zone): Likewise.
5981 * filelock.c (get_boot_time): Likewise.
5982 * frame.c (make_terminal_frame, set_term_frame_name)
5983 (x_report_frame_params): Likewise.
5984 * image.c (gs_load): Likewise.
5985 * minibuf.c (get_minibuffer): Likewise.
5986 * msdos.c (dos_set_window_size): Likewise.
5987 * process.c (make_process): Likewise.
5988 * xdisp.c (ensure_echo_area_buffers): Likewise.
5989 * xsettings.c (apply_xft_settings): Likewise.
5990
5991 2012-07-09 Glenn Morris <rgm@gnu.org>
5992
5993 Stop ns builds polluting the environment with EMACSDATA, EMACSDOC.
5994 * nsterm.m (ns_etc_directory): New function, split from ns_init_paths.
5995 (ns_init_paths): Do not set EMACSDATA, EMACSDOC.
5996 * nsterm.h (ns_etc_directory): Add it.
5997 * callproc.c [HAVE_NS]: Include nsterm.h.
5998 (init_callproc_1, init_callproc) [HAVE_NS]: Use ns_etc_directory.
5999
6000 2012-07-09 Dmitry Antipov <dmantipov@yandex.ru>
6001
6002 Move marker debugging code under MARKER_DEBUG.
6003 * marker.c (MARKER_DEBUG): Move marker debugging code under
6004 #ifdef MARKER_DEBUG because byte_char_debug_check is too slow
6005 for bootstrap with --enable-checking (~3x slowdown reported
6006 by Juanma Barranquero <lekktu@gmail.com>).
6007 (verify_bytepos): Move under #ifdef MARKER_DEBUG.
6008
6009 2012-07-08 Paul Eggert <eggert@cs.ucla.edu>
6010
6011 * systime.h (EMACS_SUB_TIME): Clarify behavior with unsigned time_t.
6012 See <http://bugs.gnu.org/11825#29>.
6013
6014 2012-07-08 Eli Zaretskii <eliz@gnu.org>
6015
6016 * xdisp.c (fill_glyphless_glyph_string): If the face of the glyph
6017 has no font, use the frame's font. (Bug#11813)
6018 (display_line): Add commentary about displaying truncation glyphs
6019 on GUI frames.
6020 (produce_special_glyphs): Move here from term.c.
6021
6022 * term.c (produce_special_glyphs): Move to xdisp.c.
6023
6024 * dispextern.h (produce_special_glyphs): Move prototype to xdisp.c
6025 section.
6026
6027 2012-07-07 Andreas Schwab <schwab@linux-m68k.org>
6028
6029 * xdisp.c (display_line): Avoid warning about implicit declaration
6030 of FRAME_FONT.
6031
6032 * frame.c (get_frame_param): Define only if HAVE_WINDOW_SYSTEM.
6033
6034 * lisp.h: Remove empty conditional.
6035
6036 2012-07-07 Paul Eggert <eggert@cs.ucla.edu>
6037
6038 * lread.c (load_path_check): Now static.
6039
6040 Fix some minor --with-ns problems found by static checking.
6041 * frame.c (Ftool_bar_pixel_width) [!FRAME_TOOLBAR_WIDTH]:
6042 (x_set_font) [!HAVE_X_WINDOWS]:
6043 * image.c (xpm_load_image) [HAVE_NS]:
6044 (x_to_xcolors) [!HAVE_X_WINDOWS && !HAVE_NTGUI]:
6045 (x_disable_image) [!HAVE_NS && !HAVE_NTGUI]:
6046 Remove unused local.
6047 (Fx_parse_geometry) [HAVE_NS]: Don't return garbage.
6048 (xpm_load_image) [HAVE_NS && !HAVE_XPM]: Remove unused label.
6049 * image.c (x_create_bitmap_from_file) [HAVE_NS]:
6050 (xpm_load_image, xpm_load) [HAVE_NS && !HAVE_XPM]:
6051 * nsselect.m (symbol_to_nsstring, ns_string_to_pasteboard_internal):
6052 * xfaces.c (Fx_load_color_file) [!HAVE_X_WINDOWS]:
6053 Fix pointer signedness problem.
6054 * xfaces.c (FRAME_X_FONT_TABLE):
6055 * xterm.h (FRAME_X_FONT_TABLE): Remove unused, incompatible macros.
6056
6057 2012-07-07 Glenn Morris <rgm@gnu.org>
6058
6059 * lread.c (load_path_check): New function, split from init_lread.
6060 (init_lread): Reorganize. Motivation:
6061 If EMACSLOADPATH is set, check/warn about that rather than the
6062 defaults, which we are not going to use. Hence we can remove
6063 the turn_off_warning and WINDOWSNT || HAVE_NS tests.
6064 Don't warn if site-lisp directories are missing.
6065 If not installed, start from a blank load-path, since
6066 PATH_LOADSEARCH refers to the eventual installation directories.
6067
6068 2012-07-07 Eli Zaretskii <eliz@gnu.org>
6069
6070 Support truncation and continuation glyphs on GUI frames, when
6071 fringes are disabled. (Bug#11832)
6072 * xdisp.c (init_iterator): Get dimensions of truncation and
6073 continuation glyphs even if on GUI frames.
6074 Adjust it->last_visible_x on GUI frames when the left or right fringes,
6075 or both, are absent.
6076 (start_display, move_it_in_display_line_to): Handle the case of a
6077 GUI frame without a fringe to display continuation or truncation
6078 glyphs.
6079 (insert_left_trunc_glyphs): Support GUI frames: make sure
6080 truncation glyphs overwrite enough glyphs from the current line to
6081 have sufficient space in pixels.
6082 (display_line): Support truncation and continuation glyphs on GUI
6083 frames. If some spare pixels are left on the line after inserting
6084 the truncation glyphs, fill that space with a stretch glyph of a
6085 suitably computed width.
6086
6087 * term.c (produce_special_glyphs): Call PRODUCE_GLYPHS, not
6088 produce_glyphs, to support GUI sessions.
6089
6090 2012-07-07 Paul Eggert <eggert@cs.ucla.edu>
6091
6092 * sysdep.c (ULLONG_MAX): Define if not already defined (Bug#11781).
6093
6094 * sysdep.c (list_system_processes): Port to NetBSD-current (Bug#11797).
6095
6096 Do not require float-time's arg to fit in time_t (Bug#11825).
6097 This works better on hosts where time_t is unsigned, and where
6098 float-time is applied to the (negative) difference between two times.
6099 * editfns.c (decode_time_components): Last arg is now double *,
6100 not int *, and means to store all the result as a double, without
6101 worrying about whether the seconds part fits in time_t.
6102 All callers changed.
6103 (lisp_time_argument): Remove last int * arg, as it's no longer needed.
6104 All callers changed.
6105 (Ffloat_time): Do not fail merely because the specified time falls
6106 outside of time_t range.
6107
6108 2012-07-07 Glenn Morris <rgm@gnu.org>
6109
6110 * s/darwin.h (HAVE_RES_INIT, HAVE_LIBRESOLV):
6111 * s/hpux10-20.h (HAVE_RINT, HAVE_RANDOM):
6112 * s/unixware.h (HAVE_GETWD): Move undefs to configure (effectively).
6113
6114 2012-07-07 Juanma Barranquero <lekktu@gmail.com>
6115
6116 * makefile.w32-in (DISPEXTERN_H, $(BLD)/regex.$(O)):
6117 Update dependencies.
6118
6119 * s/ms-w32.h [_MSC_VER]: Remove strcasecmp, strncasecmp.
6120
6121 2012-07-06 Paul Eggert <eggert@cs.ucla.edu>
6122
6123 Use c_strcasecmp for ASCII case-insensitive comparison (Bug#11786).
6124 * dispextern.h, nsfns.m, nsterm.m: Include <c-strcase.h>.
6125 * dispextern.h (xstrcasecmp): Rewrite using c_strcasecmp.
6126 * nsfns.m (x_get_string_resource): Use c_strncasecmp, not strncasecmp.
6127 * nsterm.m (ns_default): Use c_strcasecmp, not strcasecmp.
6128 * xfaces.c (xstrcasecmp) [!HAVE_STRCASECMP]: Remove.
6129
6130 * xfont.c (compare_font_names): Redo to omit the need for casts.
6131
6132 2012-07-06 Andreas Schwab <schwab@linux-m68k.org>
6133
6134 * xfns.c (Fx_change_window_property): Doc fix.
6135 * w32fns.c (Fx_change_window_property): Doc fix.
6136
6137 * w32fns.c (Fx_window_property): Accept the same arguments as the
6138 X Windows version. Doc fix.
6139 * xfns.c (Fx_window_property): Doc fix. (Bug#11870)
6140
6141 2012-07-06 Juanma Barranquero <lekktu@gmail.com>
6142 Eli Zaretskii <eliz@gnu.org>
6143
6144 * s/ms-w32.h: Settings not specific to Windows moved to nt/config.nt.
6145 Windows-specific code from nt/config.nt moved here.
6146 Obsolete settings removed.
6147
6148 2012-07-06 Paul Eggert <eggert@cs.ucla.edu>
6149
6150 * process.c: Avoid unnecessary calls to gettime.
6151 (wait_reading_process_output): Don't get the time of day
6152 when gobbling data immediately and not waiting, as there's no need
6153 for it in that case. This removes a FIXME.
6154
6155 2012-07-06 Jan Djärv <jan.h.d@swipnet.se>
6156
6157 * gtkutil.c (xg_event_is_for_scrollbar): Assign gwin when HAVE_GTK3
6158 is defined (Bug#11768).
6159
6160 2012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
6161
6162 Fix marker debugging code.
6163 * marker.c (byte_char_debug_check): Do not perform the check
6164 if buffer is not multibyte.
6165 (buf_charpos_to_bytepos, buf_bytepos_to_charpos):
6166 Call byte_char_debug_check with correct arguments.
6167
6168 2012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
6169
6170 Compile marker debugging code only if ENABLE_CHECKING is defined.
6171 * marker.c (byte_char_debug_check, count_markers):
6172 Use only if ENABLE_CHECKING is defined.
6173 (byte_debug_flag): Remove.
6174 (CONSIDER, buf_charpos_to_bytepos, buf_bytepos_to_charpos):
6175 Always call byte_char_debug_check if ENABLE_CHECKING is defined.
6176
6177 2012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
6178
6179 Avoid code repetition in marker-related functions.
6180 * marker.c (attach_marker): New function.
6181 (Fset_marker, set_marker_restricted, set_marker_both)
6182 (set_marker_restricted_both): Use it.
6183 (Fset_marker, set_marker_restricted, Fbuffer_has_markers_at):
6184 Consistently rename charno to charpos.
6185 (marker_position): Add eassert.
6186 (marker_byte_position): Convert to eassert.
6187
6188 2012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
6189
6190 Simplify list operations in unchain_overlay and unchain_marker.
6191 * buffer.c (unchain_overlay): Simplify. Add comment.
6192 * marker.c (unchain_marker): Simplify. Fix comments.
6193
6194 2012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
6195
6196 Introduce fast path for the widely used marker operation.
6197 * alloc.c (build_marker): New function.
6198 * lisp.h (build_marker): New prototype.
6199 * buffer.c (clone_per_buffer_values, Fmake_indirect_buffer): Use it.
6200 * composite.c (autocmp_chars): Likewise.
6201 * editfns.c (buildmark): Remove.
6202 (Fpoint_marker, Fpoint_min_marker, Fpoint_max_marker)
6203 (save_restriction_save): Use build_marker.
6204 * marker.c (buf_charpos_to_bytepos, buf_bytepos_to_charpos): Likewise.
6205 * window.c (save_window_save): Likewise.
6206
6207 2012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
6208
6209 Do not use Fdelete_overlay in delete_all_overlays
6210 to avoid redundant calls to unchain_overlay.
6211 * buffer.c (drop_overlay): New function.
6212 (delete_all_overlays, Fdelete_overlay): Use it.
6213 * minibuf.c (get_minibuffer): Fix comment.
6214
6215 2012-07-06 Paul Eggert <eggert@cs.ucla.edu>
6216
6217 Port to OpenBSD 5.1 amd64.
6218 * sysdep.c [BSD_SYSTEM]: Include <sys/param.h> before <sys/sysctl.h>.
6219 This is needed for OpenBSD, and should be harmless on all BSD systems.
6220 Also, include <sys/sysctl.h>, as it should be available on all
6221 BSD_SYSTEM hosts given that we're already calling sysctl in that case.
6222 (list_system_processes) [__OpenBSD__]: Use DARWIN_OS style mib, but
6223 use p_pid member, not kp_proc.pid.
6224
6225 2012-07-06 Glenn Morris <rgm@gnu.org>
6226
6227 * Makefile.in (emacs$(EXEEXT)): Don't check for load-path shadows.
6228
6229 2012-07-05 Paul Eggert <eggert@cs.ucla.edu>
6230
6231 More xmalloc and related cleanup.
6232 * alloc.c, bidi.c, buffer.c, buffer.h, bytecode.c, callint.c:
6233 * callproc.c, charset.c, coding.c, composite.c, data.c, dispnew.c:
6234 * doc.c, editfns.c, emacs.c, eval.c, fileio.c, filelock.c, fns.c:
6235 * font.c, fontset.c, frame.c, fringe.c, ftfont.c, ftxfont.c, gmalloc.c:
6236 * gtkutil.c, image.c, keyboard.c, keymap.c, lread.c, macros.c, menu.c:
6237 * nsfns.m, nsfont.m, nsmenu.m, nsterm.m, print.c, process.c, ralloc.c:
6238 * regex.c, region-cache.c, scroll.c, search.c, sound.c, syntax.c:
6239 * sysdep.c, term.c, termcap.c, unexmacosx.c, window.c, xdisp.c:
6240 * xfaces.c, xfns.c, xftfont.c, xgselect.c, xmenu.c, xrdb.c, xselect.c:
6241 * xterm.c:
6242 Omit needless casts involving void * pointers and allocation.
6243 Prefer "P = xmalloc (sizeof *P)" to "P = xmalloc (sizeof (TYPE_OF_P))",
6244 as the former is more robust if P's type is changed.
6245 Prefer xzalloc to xmalloc + memset 0.
6246 Simplify malloc-or-realloc to realloc.
6247 Don't worry about xmalloc returning a null pointer.
6248 Prefer xstrdup to xmalloc + strcpy.
6249 * editfns.c (Fmessage_box): Grow message_text by at least 80 when
6250 growing it.
6251 * keyboard.c (apply_modifiers_uncached): Prefer local array to
6252 alloca of a constant.
6253
6254 2012-07-05 Eli Zaretskii <eliz@gnu.org>
6255
6256 * xdisp.c (display_line): Fix horizontal pixel coordinates when
6257 hscroll is larger than the line width. Fixes long and futile
6258 looping inside extend_face_to_end_of_line (on a TTY) producing
6259 glyphs that are not needed and thrown away.
6260
6261 2012-07-05 Dmitry Antipov <dmantipov@yandex.ru>
6262
6263 * marker.c (set_marker_restricted_both): Simplify by using
6264 clip_to_bounds.
6265
6266 2012-07-05 Paul Eggert <eggert@cs.ucla.edu>
6267
6268 * editfns.c (region_limit): Simplify by using clip_to_bounds.
6269
6270 2012-07-05 Jan Djärv <jan.h.d@swipnet.se>
6271
6272 * gtkutil.c (gtk_scrollbar_new, gtk_box_new): Define when HAVE_GTK3 is
6273 not defined (Bug#11768).
6274 (xg_create_frame_widgets): Use gtk_plug_new_for_display (Bug#11768).
6275 (xg_create_frame_widgets, create_dialog, xg_get_file_with_chooser)
6276 (make_widget_for_menu_item, xg_make_tool_item): Use gtk_box_new
6277 followed by gtk_box_set_homogeneous (Bug#11768).
6278 (xg_update_menu_item): Use GTK_IS_BOX (Bug#11768).
6279 (update_theme_scrollbar_width, xg_create_scroll_bar):
6280 Use gtk_scrollbar_new (Bug#11768).
6281 (xg_event_is_for_scrollbar): Use Gdk Device functions for HAVE_GTK3.
6282 (is_box_type): New function (Bug#11768).
6283 (xg_tool_item_stale_p): Call is_box_type.
6284 (xg_initialize): Get settings by calling gtk_settings_get_for_screen
6285 with default display (Bug#11768).
6286
6287 2012-07-05 Eli Zaretskii <eliz@gnu.org>
6288
6289 * xdisp.c (window_hscroll_limited): New function.
6290 (pos_visible_p, init_iterator): Use it to avoid overflow of pixel
6291 coordinates when window's hscroll is set to insanely large
6292 values. (Bug#11857)
6293
6294 2012-07-05 Juanma Barranquero <lekktu@gmail.com>
6295
6296 * makefile.w32-in ($(BLD)/dired.$(O), $(BLD)/fileio.$(O)): Fix typo.
6297 ($(BLD)/terminal.$(O), $(BLD)/syntax.$(O)): Update dependencies.
6298
6299 2012-07-05 Dmitry Antipov <dmantipov@yandex.ru>
6300
6301 Cleanup xmalloc.
6302 * lisp.h (xzalloc): New prototype. Omit needless casts.
6303 * alloc.c (xzalloc): New function. Omit needless casts.
6304 * charset.c: Omit needless casts. Convert all calls to
6305 xmalloc with following memset to xzalloc.
6306 * dispnew.c: Likewise.
6307 * fringe.c: Likewise.
6308 * image.c: Likewise.
6309 * sound.c: Likewise.
6310 * term.c: Likewise.
6311 * w32fns.c: Likewise.
6312 * w32font.c: Likewise.
6313 * w32term.c: Likewise.
6314 * xfaces.c: Likewise.
6315 * xfns.c: Likewise.
6316 * xterm.c: Likewise.
6317 * atimer.c: Omit needless casts.
6318 * buffer.c: Likewise.
6319 * callproc.c: Likewise.
6320 * ccl.c: Likewise.
6321 * coding.c: Likewise.
6322 * composite.c: Likewise.
6323 * doc.c: Likewise.
6324 * doprnt.c: Likewise.
6325 * editfns.c: Likewise.
6326 * emacs.c: Likewise.
6327 * eval.c: Likewise.
6328 * filelock.c: Likewise.
6329 * fns.c: Likewise.
6330 * gtkutil.c: Likewise.
6331 * keyboard.c: Likewise.
6332 * lisp.h: Likewise.
6333 * lread.c: Likewise.
6334 * minibuf.c: Likewise.
6335 * msdos.c: Likewise.
6336 * print.c: Likewise.
6337 * process.c: Likewise.
6338 * region-cache.c: Likewise.
6339 * search.c: Likewise.
6340 * sysdep.c: Likewise.
6341 * termcap.c: Likewise.
6342 * terminal.c: Likewise.
6343 * tparam.c: Likewise.
6344 * w16select.c: Likewise.
6345 * w32.c: Likewise.
6346 * w32reg.c: Likewise.
6347 * w32select.c: Likewise.
6348 * w32uniscribe.c: Likewise.
6349 * widget.c: Likewise.
6350 * xdisp.c: Likewise.
6351 * xmenu.c: Likewise.
6352 * xrdb.c: Likewise.
6353 * xselect.c: Likewise.
6354
6355 2012-07-05 Paul Eggert <eggert@cs.ucla.edu>
6356
6357 * fileio.c (time_error_value): Check the right error number.
6358 Problem reported by Troels Nielsen in
6359 <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00095.html>.
6360
6361 2012-07-04 Paul Eggert <eggert@cs.ucla.edu>
6362
6363 * window.c (set_window_hscroll): Revert the 100000 hscroll limit.
6364 This should be fixed in a better way; see Eli Zaretskii in
6365 <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00088.html>.
6366 (HSCROLL_MAX): Remove; this is now internal to set_window_hscroll.
6367
6368 * fileio.c (time_error_value): Rename from special_mtime.
6369 The old name's problems were noted by Eli Zaretskii in
6370 <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00087.html>.
6371
6372 * emacs.c (gdb_pvec_type): Change it back to enum pvec_type.
6373 This variable's comment says Emacs needs at least one GDB-visible
6374 symbol of type enum pvec_type, to work around GDB problems.
6375 The symbol's value doesn't matter.
6376
6377 * alloc.c (PSEUDOVECTOR_NBYTES): Remove stray ';'
6378 that causes compilation to fail on pre-C99 compilers.
6379
6380 2012-07-04 Juanma Barranquero <lekktu@gmail.com>
6381
6382 * s/ms-w32.h (LISP_FLOAT_TYPE, HAVE_MEMCMP, HAVE_MEMCPY)
6383 (HAVE_MEMMOVE, HAVE_MEMSET): Don't set, obsolete.
6384
6385 2012-07-04 Dmitry Antipov <dmantipov@yandex.ru>
6386
6387 * buffer.c (init_buffer_once): Fix initialization of
6388 headers for buffer_defaults and buffer_local_symbols.
6389 Reported by Juanma Barranquero <lekktu@gmail.com>.
6390
6391 2012-07-04 Stefan Monnier <monnier@iro.umontreal.ca>
6392
6393 Turn VECTOR_FREE_LIST_FLAG into PVEC_FREE.
6394 * lisp.h (enum pvec_type): Use fewer bits.
6395 (PSEUDOVECTOR_SIZE_BITS): New constant.
6396 (PSEUDOVECTOR_SIZE_MASK, PVEC_TYPE_MASK): Use it.
6397 (XSETPVECTYPESIZE, XSETTYPED_PSEUDOVECTOR, DEFUN): Adapt code to
6398 change in pvec_type.
6399 (PSEUDOVECTOR_TYPEP): New macro.
6400 (TYPED_PSEUDOVECTORP): Use it.
6401 * fns.c (internal_equal): Adapt code to extract pvectype.
6402 * emacs.c (gdb_pvec_type): Update type.
6403 * alloc.c (PSEUDOVECTOR_NBYTES): New macro.
6404 (VECTOR_FREE_LIST_SIZE_MASK): Remove (=> PSEUDOVECTOR_SIZE_MASK).
6405 (VECTOR_FREE_LIST_FLAG): Remove (=> PVEC_FREE).
6406 (SETUP_ON_FREE_LIST): Use XSETPVECTYPESIZE.
6407 (sweep_vectors): Use it. Use local var `total_bytes' instead of
6408 abusing vector->header.next.nbytes.
6409 (live_vector_p): Use PVEC_TYPE.
6410 (mark_object): Adapt code to extract pvectype. Use switch.
6411
6412 2012-07-04 Paul Eggert <eggert@cs.ucla.edu>
6413
6414 * doprnt.c (doprnt): Don't assume string length fits in 'int'.
6415 Tighten new eassert a bit.
6416
6417 2012-07-04 Dmitry Antipov <dmantipov@yandex.ru>
6418
6419 Fix compilation with --enable-gcc-warnings and -O1
6420 optimization level.
6421 * doprnt.c (doprnt): Change type of tem to int, initialize
6422 to avoid compiler warning. Add eassert.
6423 * search.c (simple_search): Initialize match_byte to avoid
6424 compiler warning. Add eassert.
6425
6426 2012-07-04 Paul Eggert <eggert@cs.ucla.edu>
6427
6428 Avoid weird behavior with large horizontal scrolls.
6429 Without this change, for example, large hscroll values would
6430 mess up Emacs's display on Fedora 15 x86, presumably due to
6431 overflows in int calculations in the display code.
6432 Also, if buffers had long lines, Emacs would freeze.
6433 * window.c (HSCROLL_MAX): Reduce to 100000, and make it visible to GDB.
6434 (set_window_hscroll): New function, containing the old guts of
6435 Fset_window_hscroll. Return the clipped value.
6436 (Fset_window_hscroll, Fscroll_left, Fscroll_right): Use it.
6437 This avoids the need to check against PTRDIFF_MAX.
6438
6439 * buffer.c (Fgenerate_new_buffer_name): Fix sprintf format mismatch.
6440
6441 2012-07-04 Dmitry Antipov <dmantipov@yandex.ru>
6442
6443 * buffer.c (Fgenerate_new_buffer_name): Fix type mismatch.
6444
6445 2012-07-04 Paul Eggert <eggert@cs.ucla.edu>
6446
6447 * regex.c: Suppress GCC warning on RHEL 6. (Bug#11207)
6448 Conditionalize the pragmas on GCC 4.5 or later, not GCC 4.3 or later,
6449 since GCC 4.4.6 issues a bogus warning for them.
6450
6451 Fix bugs in file timestamp newness comparisons.
6452 * fileio.c (Ffile_newer_than_file_p):
6453 * lread.c (Fload): Use full timestamp resolution of files,
6454 not just the 1-second resolution, so that files that are only
6455 slightly newer still count as newer.
6456 * fileio.c (Ffile_newer_than_file_p): Don't assume file
6457 timestamps fit in 'int'; this fixes a Y2038 bug on most hosts.
6458
6459 2012-07-03 Paul Eggert <eggert@cs.ucla.edu>
6460
6461 * fileio.c: Improve handling of file time marker. (Bug#11852)
6462 (special_mtime): New function.
6463 (Finsert_file_contents, Fverify_visited_file_modtime):
6464 Use it to set special mtime values consistently.
6465
6466 2012-07-03 Andreas Schwab <schwab@linux-m68k.org>
6467
6468 * fileio.c (Finsert_file_contents): Properly handle st_mtime
6469 marker for non-existing file. (Bug#11852)
6470
6471 2012-07-03 Glenn Morris <rgm@gnu.org>
6472
6473 * lisp.h (Fread_file_name): Restore EXFUN (it's not a normal DEFUN
6474 and did not make it into globals.h).
6475
6476 2012-07-03 Tom Tromey <tromey@redhat.com>
6477
6478 * window.c (Fset_window_margins, Fset_window_fringes)
6479 (Fset_window_scroll_bars, Fset_window_vscroll): No longer static.
6480 * textprop.c (Fprevious_property_change): No longer static.
6481 * syntax.c (Fsyntax_table_p): No longer static.
6482 * process.c (Fget_process, Fprocess_datagram_address): No longer
6483 static.
6484 * keymap.c (Flookup_key, Fcopy_keymap): No longer static.
6485 * keyboard.c (Fcommand_execute): No longer static.
6486 Remove EXFUN.
6487 * insdel.c (Fcombine_after_change_execute): No longer static.
6488 * image.c (Finit_image_library): No longer static.
6489 * fileio.c (Fmake_symbolic_link): No longer static.
6490 * eval.c (Ffetch_bytecode): No longer static.
6491 * editfns.c (Fuser_full_name): No longer static.
6492 * doc.c (Fdocumentation_property, Fsnarf_documentation):
6493 No longer static.
6494 * buffer.c (Fset_buffer_major_mode, Fdelete_overlay): No longer
6495 static.
6496 * dired.c (Ffile_attributes): No longer static.
6497 * composite.c (Fcomposition_get_gstring): No longer static.
6498 * callproc.c (Fgetenv_internal): No longer static.
6499
6500 * ccl.h: Remove EXFUNs.
6501 * buffer.h: Remove EXFUNs.
6502 * dispextern.h: Remove EXFUNs.
6503 * intervals.h: Remove EXFUNs.
6504 * fontset.h: Remove EXFUN.
6505 * font.h: Remove EXFUNs.
6506 * dosfns.c (system_process_attributes): Remove EXFUN.
6507 * keymap.h: Remove EXFUNs.
6508 * lisp.h: Remove EXFUNs.
6509 * w32term.h: Remove EXFUNs.
6510 * window.h: Remove EXFUNs.
6511 * xsettings.h: Remove EXFUN.
6512 * xterm.h: Remove EXFUN.
6513
6514 2012-07-03 Glenn Morris <rgm@gnu.org>
6515
6516 * lisp.h (Frandom): Make it visible to C.
6517 * buffer.c (Fgenerate_new_buffer_name): Speed up finding a new
6518 buffer for invisible buffers. (Bug#1229)
6519
6520 2012-07-03 Dmitry Antipov <dmantipov@yandex.ru>
6521
6522 Fix block vector allocation code to allow VECTOR_BLOCK_SIZE
6523 values which aren't power of 2.
6524 * alloc.c (VECTOR_FREE_LIST_SIZE_MASK): New macro.
6525 Verify its value and the value of VECTOR_BLOCK_SIZE. Adjust users
6526 accordingly.
6527
6528 2012-07-03 Stefan Monnier <monnier@iro.umontreal.ca>
6529
6530 * lisp.h (Lisp_Misc, Lisp_Fwd): Move around to group better.
6531
6532 * alloc.c (mark_object): Revert part of last patch to use `switch'.
6533
6534 2012-07-03 Dmitry Antipov <dmantipov@yandex.ru>
6535
6536 * alloc.c (allocate_vector_block): Remove redundant
6537 calls to mallopt if DOUG_LEA_MALLOC is defined.
6538 (allocate_vectorlike): If DOUG_LEA_MALLOC is defined,
6539 avoid calls to mallopt if zero_vector is returned.
6540
6541 2012-07-03 Dmitry Antipov <dmantipov@yandex.ru>
6542
6543 * alloc.c (check_string_bytes): If GC_CHECK_STRING_BYTES
6544 is enabled, avoid dereferencing NULL current_sblock if
6545 running undumped.
6546
6547 2012-07-03 Dmitry Antipov <dmantipov@yandex.ru>
6548
6549 Cleanup basic buffer management.
6550 * buffer.h (struct buffer): Change layout to use generic vector
6551 marking code. Fix some comments. Change type of 'clip_changed'
6552 to bitfield. Remove unused #ifndef old.
6553 (FIRST_FIELD_PER_BUFFER, LAST_FIELD_PER_BUFFER): Remove.
6554 (GET_OVERLAYS_AT): Fix indentation.
6555 (for_each_per_buffer_object_at): New macro.
6556 * buffer.c (clone_per_buffer_values, reset_buffer_local_variables)
6557 (Fbuffer_local_variables): Use it.
6558 (init_buffer_once, syms_of_buffer): Remove unused #ifndef old.
6559 * alloc.c (allocate_buffer): Adjust to match new layout of
6560 struct buffer. Fix comment.
6561 (mark_overlay): New function.
6562 (mark_buffer): Use it. Use mark_vectorlike to mark normal
6563 Lisp area of struct buffer.
6564 (mark_object): Use it. Adjust marking of misc objects
6565 and related comments.
6566
6567 2012-07-02 Paul Eggert <eggert@cs.ucla.edu>
6568
6569 * alloc.c (mark_object): Remove "#ifdef GC_CHECK_MARKED_OBJECTS"
6570 wrapper that is not needed because the wrapped code is a no-op (zero
6571 machine instructions) when GC_CHECK_MARKED_OBJECTS is not defined.
6572 This avoids a -Wunused-macros diagnostic with GCC 4.7.1 x86-64.
6573
6574 2012-07-02 Dmitry Antipov <dmantipov@yandex.ru>
6575
6576 * alloc.c (mark_buffer): Simplify. Remove prototype.
6577 (mark_object): Add comment. Reorganize marking of vector-like
6578 objects. Use CHECK_LIVE for all vector-like objects except buffers
6579 and subroutines when GC_CHECK_MARKED_OBJECTS is defined.
6580 Avoid redundant calls to mark_vectorlike for bool vectors.
6581
6582 2012-06-30 Glenn Morris <rgm@gnu.org>
6583
6584 * nsterm.m (ns_init_paths): Ignore site-lisp if --no-site-lisp.
6585
6586 * epaths.in (PATH_SITELOADSEARCH): New.
6587 * lread.c (init_lread): Use PATH_SITELOADSEARCH.
6588 This is rather than relying on --enable-locallisppath elements
6589 having "site-lisp" in their names. (Bug#10208#25, 11658)
6590
6591 2012-06-30 Eli Zaretskii <eliz@gnu.org>
6592
6593 * w32proc.c (sys_select): Accept and ignore one more argument.
6594
6595 * w32.c (emacs_gnutls_pull): Call select with one more argument.
6596
6597 * sysselect.h [DOS_NT]: Don't include sys/select.h.
6598 (pselect) [!MS_DOS]: Redirect to sys_select.
6599
6600 * sysdep.c: Don't include dos.h and dosfns.h.
6601
6602 * process.c (sys_select):
6603 * msdos.c (sys_select): Accept one more argument and ignore it.
6604
6605 * msdos.c (event_timestamp, sys_select): Use gnulib's gettime;
6606 adapt data types and code to that.
6607
6608 * dosfns.c:
6609 * msdos.c (gettime, settime): Define away the prototypes in dos.h,
6610 which clashes with the gnulib function of the same name.
6611
6612 2012-06-30 Andreas Schwab <schwab@linux-m68k.org>
6613
6614 * font.c (font_style_to_value, font_style_symbolic)
6615 (font_prop_validate_style): Add type checks for values in
6616 font_style_table.
6617
6618 * lisp.h (CHECK_RANGED_INTEGER): Make value to check the first
6619 argument.
6620 * character.c, charset.c, menu.c, process.c, window.c: Adjust all
6621 uses.
6622
6623 2012-06-29 Eli Zaretskii <eliz@gnu.org>
6624
6625 * xdisp.c (try_window_id): Undo last change.
6626
6627 * w32.c (getwd): Adjust commentary about startup_dir.
6628 (init_environment): Always call sys_access, even in non-MSVC
6629 builds. Don't chdir to the directory of the Emacs executable.
6630 This undoes code from 1997 which was justified by the need to
6631 "avoid conflicts when removing and renaming directories". But its
6632 downside was that every relative file name was being interpreted
6633 relative to the directory of the Emacs executable, which can never
6634 be TRT. In particular, it broke sys_access when called with
6635 relative file names.
6636 (sys_access): Map GetLastError to errno.
6637
6638 2012-06-29 Dmitry Antipov <dmantipov@yandex.ru>
6639
6640 * window.h (struct window): Change type of 'fringes_outside_margins'
6641 to bitfield. Fix comment. Adjust users accordingly.
6642 (struct window): Change type of 'window_end_bytepos' to ptrdiff_t.
6643 Adjust comment.
6644 * xdisp.c (try_window_id): Change type of 'first_vpos' and 'vpos'
6645 to ptrdiff_t.
6646
6647 2012-06-29 Andreas Schwab <schwab@linux-m68k.org>
6648
6649 * gnutls.c (emacs_gnutls_handshake):
6650 Add QUIT to make the loop interruptible.
6651
6652 2012-06-29 Glenn Morris <rgm@gnu.org>
6653
6654 * charset.c (init_charset): Make lack of etc/charsets fatal.
6655
6656 2012-06-29 Dmitry Antipov <dmantipov@yandex.ru>
6657
6658 * editfns.c (region_limit): Fix type mismatch.
6659
6660 2012-06-29 Dmitry Antipov <dmantipov@yandex.ru>
6661
6662 * nsfns.m: Fix GLYPH_DEBUG usage assuming that it may be
6663 undefined. Convert from xassert to eassert.
6664 * nsmenu.m: Convert from xassert to eassert.
6665 * nsterm.m: Likewise.
6666
6667 2012-06-28 Stefan Monnier <monnier@iro.umontreal.ca>
6668
6669 * editfns.c (region_limit): Clip to narrowing (bug#11770).
6670
6671 2012-06-28 Paul Eggert <eggert@cs.ucla.edu>
6672
6673 Avoid integer overflow on scroll-left and scroll-right.
6674 * window.c (HSCROLL_MAX): New macro.
6675 (Fscroll_left, Fscroll_right): Avoid undefined behavior on integer
6676 overflow when requested scroll falls outside ptrdiff_t range.
6677
6678 2012-06-28 Dmitry Antipov <dmantipov@yandex.ru>
6679
6680 * window.h (struct window): Change type of 'hscroll',
6681 'min_hscroll' and 'last_point' from Lisp_Object to ptrdiff_t,
6682 'last_modified' and 'last_overlay_modified' to EMACS_INT.
6683 Adjust users accordingly.
6684 * xdisp.c (try_cursor_movement): Replace type check with eassert.
6685 * window.c (Fscroll_left, Fscroll_right): Change type of 'hscroll'
6686 from EMACS_INT to ptrdiff_t.
6687 (make_window): Omit redundant initialization.
6688
6689 2012-06-28 Juanma Barranquero <lekktu@gmail.com>
6690
6691 * makefile.w32-in ($(BLD)/regex.$(O)): Update dependencies.
6692
6693 2012-06-28 Dmitry Antipov <dmantipov@yandex.ru>
6694
6695 * window.h (struct window): Change type of 'use_time' and
6696 'sequence_number' from Lisp_Object to int.
6697 * frame.c (make_frame): Adjust users accordingly.
6698 * print.c (print_object): Likewise.
6699 * window.c (select_window, Fwindow_use_time, make_parent_window)
6700 (make_window): Likewise.
6701
6702 2012-06-28 Dmitry Antipov <dmantipov@yandex.ru>
6703
6704 * dispextern.h (GLYPH_DEBUG): Now defined in config.h if
6705 enabled with --enable-checking=[all,glyphs] configure option.
6706 Fix GLYPH_DEBUG usage assuming that it may be undefined,
6707 adjust comments accordingly.
6708 * dispnew.c: Fix GLYPH_DEBUG usage assuming that it may be
6709 undefined, adjust comments accordingly.
6710 * image.c: Likewise.
6711 * scroll.c: Likewise.
6712 * w32fns.c: Likewise.
6713 * w32term.c: Likewise.
6714 * xdisp.c: Likewise.
6715 * xfaces.c: Likewise.
6716 * xfns.c: Likewise.
6717 * xterm.c: Likewise.
6718
6719 2012-06-28 Dmitry Antipov <dmantipov@yandex.ru>
6720
6721 Generalize run-time debugging checks.
6722 * dispextern.h (XASSERTS): Remove.
6723 * fontset.c (xassert): Remove.
6724 Convert from xassert to eassert.
6725 * alloc.c: Convert from xassert to eassert.
6726 * bidi.c: Likewise.
6727 * dispnew.c: Likewise.
6728 * fns.c: Likewise.
6729 * fringe.c: Likewise.
6730 * ftfont.c: Likewise.
6731 * gtkutil.c: Likewise.
6732 * image.c: Likewise.
6733 * keyboard.c: Likewise.
6734 * menu.c: Likewise.
6735 * process.c: Likewise.
6736 * scroll.c: Likewise.
6737 * sound.c: Likewise.
6738 * term.c: Likewise.
6739 * w32console.c: Likewise.
6740 * w32fns.c: Likewise.
6741 * w32term.c: Likewise.
6742 * window.c: Likewise.
6743 * xdisp.c: Likewise.
6744 * xfaces.c: Likewise.
6745 * xfns.c: Likewise.
6746 * xselect.c: Likewise.
6747 * xterm.c: Likewise.
6748
6749 2012-06-27 Stefan Monnier <monnier@iro.umontreal.ca>
6750
6751 * fns.c (maybe_resize_hash_table): Output message when growing the
6752 purify-hashtable.
6753
6754 2012-06-27 Dmitry Antipov <dmantipov@yandex.ru>
6755
6756 * alloc.c (allocate_string_data): Remove dead code.
6757 * xsettings.c (XSETTINGS_FONT_NAME): Move under HAVE_XFT to
6758 avoid GCC warning about unused macro.
6759
6760 2012-06-27 Dmitry Antipov <dmantipov@yandex.ru>
6761
6762 * alloc.c (allocate_string): Omit intervals initialization.
6763 * alloc.c (make_uninit_multibyte_string): Initialize intervals
6764 as in make_pure_string and make_pure_c_string.
6765
6766 2012-06-27 Dmitry Antipov <dmantipov@yandex.ru>
6767
6768 * alloc.c (allocate_string): Fix last change.
6769
6770 2012-06-27 Dmitry Antipov <dmantipov@yandex.ru>
6771
6772 * alloc.c (allocate_string): Remove two redundant calls
6773 to memset, add explicit initialization where appropriate.
6774
6775 2012-06-27 Glenn Morris <rgm@gnu.org>
6776
6777 * lisp.mk (lisp): Remove paths.elc.
6778
6779 2012-06-27 Chong Yidong <cyd@gnu.org>
6780
6781 * doc.c (Fsubstitute_command_keys): Fix punctuation.
6782
6783 2012-06-26 John Wiegley <johnw@newartisans.com>
6784
6785 * unexmacosx.c (copy_data_segment): Add two section names used
6786 on Mac OS X Lion: __mod_init_func and __mod_term_func.
6787
6788 * alloc.c (mark_memory): Do not check with -faddress-sanitizer
6789 when building with Clang.
6790
6791 2012-06-26 Stefan Monnier <monnier@iro.umontreal.ca>
6792
6793 * eval.c (Fapply): Allow calling it with a single argument.
6794
6795 2012-06-26 Eli Zaretskii <eliz@gnu.org>
6796
6797 * s/ms-w32.h (strcasecmp, strncasecmp) [_MSC_VER]: Redirect to
6798 _stricmp and _strnicmp.
6799 (HAVE_STRCASECMP, HAVE_STRNCASECMP): Define to 1.
6800
6801 2012-06-26 Dmitry Antipov <dmantipov@yandex.ru>
6802
6803 * alloc.c (allocate_window): Zero out non-Lisp part of newly
6804 allocated window.
6805 (allocate_process): Likewise for new process.
6806 (allocate_terminal): Change to use offsetof.
6807 (allocate_frame): Likewise.
6808 * frame.c (make_frame): Omit redundant initialization.
6809 * window.c (make_parent_window): Use memset.
6810 (make_window): Omit redundant initialization.
6811 * process.c (make_process): Omit redundant initialization.
6812 * terminal.c (create_terminal): Likewise.
6813
6814 2012-06-26 Dmitry Antipov <dmantipov@yandex.ru>
6815
6816 * term.c (delete_tty): Remove redundant call to memset.
6817
6818 2012-06-26 Dmitry Antipov <dmantipov@yandex.ru>
6819
6820 * alloc.c: Remove build_string.
6821 * lisp.h: Define build_string as static inline. This provides
6822 a better opportunity to optimize away calls to strlen when the
6823 function is called with compile-time constant argument.
6824 * image.c (imagemagick_error): Convert to build_string.
6825 * w32proc.c (sys_spawnve): Likewise.
6826 * xterm.c (x_term_init): Likewise.
6827
6828 2012-06-26 Paul Eggert <eggert@cs.ucla.edu>
6829
6830 Use sprintf return value instead of invoking strlen on result.
6831 In the old days this wasn't portable, since some sprintf
6832 implementations returned char *. But they died out years ago and
6833 Emacs already assumes sprintf returns int.
6834 Similarly for float_to_string.
6835 This patch speeds up (number-to-string 1000) by 3% on Fedora 15 x86-64.
6836 * ccl.c (ccl_driver):
6837 * character.c (string_escape_byte8):
6838 * data.c (Fnumber_to_string):
6839 * doprnt.c (doprnt):
6840 * print.c (print_object):
6841 * xdisp.c (message_dolog):
6842 * xfns.c (syms_of_xfns):
6843 Use sprintf or float_to_string result to avoid need to call strlen.
6844 * data.c (Fnumber_to_string):
6845 Use make_unibyte_string, since the string must be ASCII.
6846 * lisp.h, print.c (float_to_string): Now returns int length.
6847 * term.c (produce_glyphless_glyph):
6848 Use sprintf result rather than recomputing it.
6849
6850 Clean out last vestiges of the old HAVE_CONFIG_H stuff.
6851 * Makefile.in (ALL_CFLAGS):
6852 * makefile.w32-in (LOCAL_FLAGS): Remove -DHAVE_CONFIG_H.
6853 * gmalloc.c, regex.c: Include <config.h> unconditionally.
6854
6855 2012-06-25 Dmitry Antipov <dmantipov@yandex.ru>
6856
6857 * dispextern.h (xstrcasecmp): Define to library function
6858 strcasecmp if available.
6859 * xfaces.c: Do not use xstrcasecmp if strcasecmp is available.
6860
6861 2012-06-25 Andreas Schwab <schwab@linux-m68k.org>
6862
6863 * keyboard.c (menu_bar_items, menu_bar_item, read_key_sequence):
6864 Avoid comma operator.
6865 * menu.c (push_submenu_start, push_submenu_end)
6866 (push_left_right_boundary, push_menu_pane): Likewise.
6867 * msdos.c (dos_rawgetc): Likewise.
6868
6869 2012-06-25 Dmitry Antipov <dmantipov@yandex.ru>
6870
6871 * xfns.c (xic_create_fontsetname): Remove redundant calls
6872 to memset.
6873
6874 2012-06-25 Paul Eggert <eggert@cs.ucla.edu>
6875
6876 * gtkutil.c (get_utf8_string): Remove redundant assignment.
6877 sprintf already null-terminates its output.
6878
6879 * xfns.c (x_window): Remove redundant cast.
6880
6881 2012-06-25 Dmitry Antipov <dmantipov@yandex.ru>
6882
6883 * xmenu.c (xmenu_show, xdialog_show): Explicit cast from
6884 `const char *' to `char *' to avoid compiler warning.
6885
6886 2012-06-24 Paul Eggert <eggert@cs.ucla.edu>
6887
6888 * xterm.c (x_term_init): Build proper-sized _XSETTINGS_Snnn string
6889 instead of truncating it to 63 (admittedly a generous limit).
6890
6891 * process.c: Fix spelling and caps in comments.
6892
6893 2012-06-24 Dan Nicolaescu <dann@ics.uci.edu>
6894
6895 * emacs.c (setpgrp): Remove definition, unused.
6896 * sysdep.c (setpgrp): Remove definition, not used in this file.
6897
6898 2012-06-24 Juanma Barranquero <lekktu@gmail.com>
6899
6900 * makefile.w32-in: Update dependencies.
6901
6902 2012-06-24 Eli Zaretskii <eliz@gnu.org>
6903
6904 * makefile.w32-in (TIMESPEC_H): Remove nt/inc/sys/time.h.
6905 (SYSTIME_H): Add nt/inc/sys/time.h.
6906
6907 * systime.h [WINDOWSNT]: Include sys/time.h.
6908
6909 * s/ms-w32.h (struct timespec): Definition moved from
6910 nt/inc/sys/time.h. Suggested by Paul Eggert <eggert@cs.ucla.edu>.
6911
6912 2012-06-24 Paul Eggert <eggert@cs.ucla.edu>
6913
6914 Switch from NO_RETURN to C11's _Noreturn (Bug#11750).
6915 * buffer.h (buffer_slot_type_mismatch):
6916 * data.c (arith_error) [!FORWARD_SIGNAL_TO_MAIN_THREAD]:
6917 * eval.c (unwind_to_catch):
6918 * image.c (my_png_error, my_error_exit):
6919 * keyboard.c (quit_throw_to_read_char, user_error)
6920 (Fexit_recursive_edit, Fabort_recursive_edit):
6921 * lisp.h (die, args_out_of_range, args_out_of_range_3)
6922 (wrong_type_argument, buffer_overflow, __executable_start)
6923 (memory_full, buffer_memory_full, string_overflow, Fthrow)
6924 (xsignal, xsignal0, xsignal1, xsignal2, xsignal3, signal_error)
6925 (error, verror, nsberror, report_file_error, Ftop_level, Fkill_emacs)
6926 (fatal):
6927 (child_setup) [!DOS_NT]:
6928 * lread.c (end_of_file_error, invalid_syntax):
6929 * process.c (send_process_trap) [!FORWARD_SIGNAL_TO_MAIN_THREAD]:
6930 * puresize.h (pure_write_error):
6931 * search.c (matcher_overflow):
6932 * sound.c (sound_perror, alsa_sound_perror):
6933 * sysdep.c, syssignal.h (croak):
6934 * term.c (maybe_fatal, vfatal):
6935 * textprop.c (text_read_only):
6936 * undo.c (user_error):
6937 * unexmacosx.c (unexec_error):
6938 * xterm.c (x_ins_del_lines, x_delete_glyphs):
6939 Use _Noreturn rather than NO_RETURN.
6940 No need for separate decl merely because of _Noreturn.
6941 * sound.c (sound_warning, parse_sound):
6942 Remove unnecessary forward decls.
6943
6944 2012-06-24 Paul Eggert <eggert@cs.ucla.edu>
6945
6946 Fix bug when time_t is unsigned and as wide as intmax_t (Bug#9000).
6947 * lisp.h (WAIT_READING_MAX): New macro.
6948 * dispnew.c (Fsleep_for, sit_for):
6949 * keyboard.c (kbd_buffer_get_event):
6950 * process.c (Faccept_process_output):
6951 Use it to avoid bogus compiler warnings with obsolescent GCC versions.
6952 This improves on the previous patch, which introduced a bug
6953 when time_t is unsigned and as wide as intmax_t.
6954 See <http://bugs.gnu.org/9000#51>.
6955
6956 2012-06-23 Eli Zaretskii <eliz@gnu.org>
6957
6958 * dispnew.c (sit_for, Fsleep_for):
6959 * keyboard.c (kbd_buffer_get_event):
6960 * process.c (Faccept_process_output): Avoid compiler warnings when
6961 comparing a 32-bit time_t with a 64-bit INTMAX_MAX.
6962
6963 2012-06-23 Juanma Barranquero <lekktu@gmail.com>
6964
6965 * makefile.w32-in: Update dependencies.
6966
6967 * w32.c (ltime): Add return type and declare static.
6968 (w32_get_internal_run_time): Remove usused variable `time_100ns'.
6969
6970 2012-06-23 Paul Eggert <eggert@cs.ucla.edu>
6971
6972 * sysdep.c [__FreeBSD__]: Fix more recently-introduced typos.
6973 Privately reported by Herbert J. Skuhra.
6974 (make_lisp_timeval) [__FreeBSD__]: Rename from TIMELIST.
6975 All uses changed.
6976 (system_process_attributes) [__FreeBSD__]: Invoke make_lisp_time,
6977 not make_lisp_timeval, when the argument is of type EMACS_TIME.
6978
6979 2012-06-23 Eli Zaretskii <eliz@gnu.org>
6980
6981 * w32proc.c (Fw32_get_locale_info): Fix an off-by-one error in
6982 last argument of make_unibyte_string.
6983
6984 * keyboard.c (kbd_buffer_get_event): Include the codepage and the
6985 language ID in the event parameters.
6986
6987 * w32term.c (w32_read_socket): Put the new keyboard codepage into
6988 event.code, not the obscure "character set ID".
6989
6990 2012-06-23 Chong Yidong <cyd@gnu.org>
6991
6992 * xmenu.c (x_menu_wait_for_event): Adapt GTK3 to new xg_select.
6993
6994 2012-06-23 Eli Zaretskii <eliz@gnu.org>
6995
6996 Fix the MS-Windows build broken by 2012-06-22T21:17:42Z!eggert@cs.ucla.edu.
6997 * w32.c (fdutimens): New function.
6998
6999 * w32proc.c (sys_select): Adapt to change in the EMACS_TIME type.
7000
7001 * s/ms-w32.h (pselect): Redirect to sys_select.
7002
7003 * sysselect.h [WINDOWSNT]: Don't include sys/select.h.
7004
7005 * ralloc.c (r_alloc_inhibit_buffer_relocation): Fix stupid thinko
7006 in the logic of incrementing and decrementing the value of
7007 use_relocatable_buffers.
7008
7009 2012-06-23 Paul Eggert <eggert@cs.ucla.edu>
7010
7011 * sysdep.c [__FreeBSD__]: Fix recently-introduced typos.
7012 Privately reported by Herbert J. Skuhra.
7013 [__FreeBSD__]: Remove "*/" typo after "#include".
7014 (timeval_to_EMACS_TIME) [__FreeBSD__]: New static function.
7015 (TIMEVAL) [__FreeBSD__]: Now a static function rather than a macro.
7016 (TIMEVAL, system_process_attributes) [__FreeBSD__]:
7017 Don't assume EMACS_TIME and struct timeval are the same type.
7018
7019 2012-06-22 Paul Eggert <eggert@cs.ucla.edu>
7020
7021 Support higher-resolution time stamps (Bug#9000).
7022 The time stamps are only nanosecond-resolution at the C level,
7023 since that's the best that any real-world system supports now.
7024 But they are picosecond-resolution at the Lisp level, as that's
7025 easy, and leaves room for future OS improvements.
7026
7027 * Makefile.in (LIB_CLOCK_GETTIME): New macro.
7028 (LIBES): Use it.
7029
7030 * alloc.c (Fgarbage_collect): Port to higher-res time stamps.
7031 Don't get current time unless it's needed.
7032
7033 * atimer.c: Include <sys/time.h> unconditionally, since gnulib
7034 now provides it if it's absent.
7035 (start_atimer): Port to higher-res time stamps.
7036 Check for time stamp overflow. Don't get current time more
7037 often than is needed.
7038
7039 * buffer.h (struct buffer): Buffer modtime now has high resolution.
7040 Include systime.h, not time.h.
7041 (NONEXISTENT_MODTIME_NSECS, UNKNOWN_MODTIME_NSECS): New macros.
7042
7043 * dired.c: Include stat-time.h.
7044 (Ffile-attributes): File times now have higher resolution.
7045
7046 * dispextern.h [HAVE_WINDOW_SYSTEM]: Include systime.h.
7047 (struct image): Timestamp now has higher resolution.
7048
7049 * dispnew.c (PERIODIC_PREEMPTION_CHECKING): Remove, as Emacs always
7050 has at least microseconds now. All uses removed.
7051 (update_frame, update_single_window, update_window, update_frame_1)
7052 (Fsleep_for, sit_for): Port to higher-resolution time stamps.
7053 (duration_to_sec_usec): Remove; no longer needed.
7054
7055 * editfns.c (time_overflow): Now extern.
7056 (Fcurrent_time, Fget_internal_run_time, make_time, lisp_time_argument)
7057 (float-time, Fformat_time_string, Fcurrent_time_string)
7058 (Fcurrent_time_zone): Accept and generate higher-resolution
7059 time stamps.
7060 (make_time_tail, make_lisp_time, dissassemble_lisp_time)
7061 (decode_time_components, lisp_seconds_argument): New functions.
7062 (make_time): Now static.
7063 (lisp_time_argument): Now returns EMACS_TIME. New arg ppsec.
7064 Report an error if the time is invalid, rather than having the caller
7065 do that.
7066
7067 * fileio.c: Include <stat-time.h>
7068 (Fcopy_file): Copy higher-resolution time stamps.
7069 Prefer to set the time stamp via a file descriptor if that works.
7070 (Fset_file_times, Finsert_file_contents, Fwrite_region)
7071 (Fverify_visited_file_modtime, Fclear_visited_file_modtime)
7072 (Fvisited_file_modtime, Fset_visited_file_modtime):
7073 Support higher-resolution time stamps.
7074
7075 * fns.c (Frandom): Use nanoseconds, not microseconds, for seed.
7076
7077 * gtkutil.c (xg_maybe_add_timer): Port to higher-res time stamps.
7078
7079 * image.c (prepare_image_for_display, clear_image_cache)
7080 (lookup_image): Port to higer-resolution time stamps.
7081
7082 * keyboard.c (start_polling, bind_polling_period):
7083 Check for time stamp overflow.
7084 (read_char, kbd_buffer_get_event, timer_start_idle)
7085 (timer_stop_idle, timer_resume_idle, timer_check_2, timer_check)
7086 (Fcurrent_idle_time, init_keyboard, set_waiting_for_input):
7087 Port to higher-resolution time stamps. Do not assume time_t is signed.
7088 (decode_timer): New function. Timers are now vectors of length 9,
7089 not 8, to accommodate the picosecond component.
7090 (timer_check_2): Use it.
7091
7092 * nsterm.m (select_timeout, timeval_subtract): Remove.
7093 (ns_timeout): Use Emacs's facilities for time stamp arithmetic,
7094 as they're a bit more accurate and handle overflow better.
7095 (ns_select): Change prototype to be compatible with pselect.
7096 (ns_select, ns_term_shutdown): Port to ns-resolution time stamps.
7097 * nsterm.h (ns_select): Adjust prototype.
7098
7099 * msdos.c (EMACS_TIME_ZERO_OR_NEG_P): Remove, as it assumes
7100 us-resolution time stamps.
7101 (sys_select): Use the new EMACS_TIME_SIGN macro instead.
7102
7103 * lread.c (read_filtered_event): Port to ns-resolution time stamps.
7104
7105 * lisp.h (time_overflow): New decl.
7106 (wait_reading_process_output): First arg is now intmax_t, not int,
7107 to accommodate larger waits.
7108
7109 * process.h (struct Lisp_Process.read_output_delay):
7110 Now counts nanoseconds, not microseconds.
7111 * process.c (ADAPTIVE_READ_BUFFERING): Don't worry about
7112 EMACS_HAS_USECS.
7113 (READ_OUTPUT_DELAY_INCREMENT, Faccept_process_output)
7114 (wait_reading_process_output):
7115 Port to ns-resolution time stamps.
7116 (Faccept_process_output, wait_reading_process_output):
7117 Check for time stamp overflow. Do not assume time_t is signed.
7118 (select_wrapper): Remove; we now use pselect.
7119 (Fprocess_attributes): Now generates ns-resolution time stamps.
7120
7121 * sysdep.c: Include utimens.h. Don't include utime.h
7122 or worry about struct utimbuf; gnulib does that for us now.
7123 (gettimeofday): Remove; gnulib provides a substitute.
7124 (make_timeval): New function.
7125 (set_file_times): Now sets ns-resolution time stamps.
7126 New arg FD; all uses changed.
7127 (time_from_jiffies, ltime_from_jiffies, get_up_time)
7128 (system_process_attributes):
7129 Now returns ns-resolution time stamp. All uses changed.
7130 Check for time stamp overflow.
7131
7132 * sysselect.h: Don't depend on HAVE_SYS_SELECT_H; gnulib
7133 provides a substitute now.
7134
7135 * systime.h: Include timespec.h rather than sys/time.h and time.h,
7136 since it guarantees struct timespec.
7137 (EMACS_TIME): Now struct timespec, so that we can support
7138 ns-resolution time stamps.
7139 (EMACS_TIME_RESOLUTION, LOG10_EMACS_TIME_RESOLUTION): New macros.
7140 (EMACS_HAS_USECS): Remove; Emacs always has sub-second time stamps now.
7141 (EMACS_USECS): Remove.
7142 (EMACS_SET_USECS): The underlying time stamp now has ns resolution,
7143 so multiply the arg by 1000 before storing it.
7144 (EMACS_NSECS, EMACS_SECS_ADDR, EMACS_SET_NSECS, EMACS_SET_SECS_NSECS):
7145 New macros.
7146 (EMACS_GET_TIME, EMACS_ADD_TIME, EMACS_SUB_TIME):
7147 Port to ns-resolution time stamps.
7148 (EMACS_TIME_NEG_P): Remove; replaced by....
7149 (EMACS_TIME_SIGN): New macro.
7150 (EMACS_SET_INVALID_TIME, EMACS_TIME_VALID_P)
7151 (EMACS_TIME_FROM_DOUBLE, EMACS_TIME_TO_DOUBLE): New macros.
7152 (set_file_times, make_time, lisp_time_argument): Adjust signature.
7153 (make_timeval, make_lisp_time, decode_time_components): New decls.
7154 (EMACS_TIME_CMP): Remove; no longer used. Plus, it was buggy, in
7155 that it mishandled time_t overflow. You can't compare by subtracting!
7156 (EMACS_TIME_EQ, EMACS_TIME_NE, EMACS_TIME_GT, EMACS_TIME_GE)
7157 (EMACS_TIME_LT, EMACS_TIME_LE): Rewrite in terms of timespec_cmp.
7158
7159 * term.c: Include <sys/time.h>.
7160 (timeval_to_Time): New function, for proper overflow wraparound.
7161 (term_mouse_position, term_mouse_click): Use it.
7162
7163 * undo.c (record_first_change): Support higher-resolution time stamps
7164 in the undo buffer.
7165 (Fprimitive_undo): Use them when restoring time stamps.
7166
7167 * w32.c (ltime, U64_TO_LISP_TIME, process_times, emacs_gnutls_pull)
7168 (w32_get_internal_run_time):
7169 Port to higher-resolution Emacs time stamps.
7170 (ltime): Now accepts single 64-bit integer, as that's more convenient
7171 for callers.
7172
7173 * xdisp.c (start_hourglass): Port to ns-resolution time stamps.
7174
7175 * xgselect.c, xgselect.h (xg_select): Add sigmask argument,
7176 for compatibility with pselect. Support ns-resolution time stamps.
7177
7178 * xmenu.c (x_menu_wait_for_event): Support ns-resolution time stamps.
7179
7180 * xselect.c (wait_for_property_change, x_get_foreign_selection):
7181 Check for time stamp overflow, and support ns-resolution time stamps.
7182
7183 * xterm.c: Don't include sys/time.h; gnulib does that for us now.
7184 Don't worry about whether HAVE_TIMEVAL and HAVE_SELECT are set.
7185 (timeval_subtract): Remove; no longer needed.
7186 (XTflash, XTring_bell, x_wait_for_event):
7187 Port to ns-resolution time stamps. Don't assume time_t is signed.
7188
7189 2012-06-22 Chong Yidong <cyd@gnu.org>
7190
7191 * xdisp.c (x_consider_frame_title): Revert last change.
7192
7193 2012-06-22 Eli Zaretskii <eliz@gnu.org>
7194
7195 * alloc.c (NSTATICS): Enlarge to 0x650. Otherwise, Emacs compiled
7196 with -DENABLE_CHECKING -DXASSERTS -DGLYPH_DEBUG=1 -DBYTE_CODE_METER
7197 aborts in staticpro during startup. (Without -DBYTE_CODE_METER,
7198 staticidx goes up to 1597 out of 1600 = 0x640.)
7199
7200 2012-06-20 Paul Eggert <eggert@cs.ucla.edu>
7201
7202 * fileio.c (Fdefault_file_modes): Block input while fiddling with umask.
7203 Otherwise, the umask might be mistakenly 0 while handling input signals.
7204
7205 2012-06-19 Stefan Monnier <monnier@iro.umontreal.ca>
7206
7207 * minibuf.c (Fread_string): Bind minibuffer-completion-table.
7208
7209 2012-06-19 Dmitry Antipov <dmantipov@yandex.ru>
7210
7211 * alloc.c, bytecode.c, ccl.c, coding.c, composite.c, data.c, dosfns.c:
7212 * font.c, image.c, keyboard.c, lread.c, menu.c, minibuf.c, msdos.c:
7213 * print.c, syntax.c, window.c, xmenu.c, xselect.c: Replace direct
7214 access to `contents' member of Lisp_Vector objects with AREF and ASET
7215 where appropriate.
7216
7217 2012-06-19 Chong Yidong <cyd@gnu.org>
7218
7219 * frame.c (delete_frame): When selecting a frame on a different
7220 text terminal, do not alter the terminal's top-frame.
7221
7222 * xdisp.c (format_mode_line_unwind_data): Record the target
7223 frame's selected window and its terminal's top-frame.
7224 (unwind_format_mode_line): Restore them.
7225 (x_consider_frame_title, display_mode_line, Fformat_mode_line):
7226 Callers changed.
7227 (x_consider_frame_title): Do not condition on HAVE_WINDOW_SYSTEM,
7228 since tty frames can be explicitly named.
7229 (prepare_menu_bars): Likewise.
7230
7231 * term.c (Ftty_top_frame): New function.
7232
7233 2012-06-18 Paul Eggert <eggert@cs.ucla.edu>
7234
7235 Port byte-code-meter to modern targets.
7236 * bytecode.c (METER_CODE) [BYTE_CODE_METER]: Don't assume
7237 !CHECK_LISP_OBJECT_TYPE && !USE_LSB_TAG. Problem with
7238 CHECK_LISP_OBJECT_TYPE reported by Dmitry Antipov in
7239 <http://lists.gnu.org/archive/html/emacs-devel/2012-06/msg00282.html>.
7240 (METER_1, METER_2): Simplify.
7241
7242 2012-06-18 Stefan Monnier <monnier@iro.umontreal.ca>
7243
7244 * data.c (Fdefalias): Return `symbol' (bug#11686).
7245
7246 2012-06-18 Martin Rudalics <rudalics@gmx.at>
7247
7248 * buffer.c (Fkill_buffer): Don't throw an error when the buffer
7249 gets killed during executing of this function (Bug#11665).
7250 Try to always return Qt when the buffer has been actually killed.
7251 (Vkill_buffer_query_functions): In doc-string say that functions
7252 run by this hook should not change the current buffer.
7253
7254 2012-06-18 Paul Eggert <eggert@cs.ucla.edu>
7255
7256 Fix recently-introduced process.c problems found by static checking.
7257 * process.c (write_queue_push, write_queue_pop, send_process):
7258 Use ptrdiff_t, not int or EMACS_INT, for buffer lengths and offsets.
7259 (write_queue_pop): Fix pointer signedness problem.
7260 (send_process): Remove unused local.
7261
7262 2012-06-17 Chong Yidong <cyd@gnu.org>
7263
7264 * xdisp.c (redisplay_internal): No need to redisplay terminal
7265 frames that are not on top.
7266
7267 2012-06-17 Troels Nielsen <bn.troels@gmail.com>
7268
7269 * process.c (make_process): Initialize write_queue.
7270 (write_queue_push, write_queue_pop): New functions.
7271 (send_process): Use them to maintain correct ordering of process
7272 writes (Bug#10815).
7273
7274 2012-06-17 Paul Eggert <eggert@cs.ucla.edu>
7275
7276 * lisp.h (eassert): Assume C89 or later.
7277 This removes the need for CHECK.
7278 (CHECK): Remove. Its comments about always evaluating its
7279 argument were confusing, as 'eassert' typically does not evaluate
7280 its argument.
7281
7282 * coding.c (produce_chars): Use ptrdiff_t, not int.
7283
7284 * xterm.c (x_draw_underwave): Check for integer overflow.
7285 This pacifies gcc 4.7.0 -Wunsafe-loop-optimizations on x86-64.
7286
7287 2012-06-17 Jan Djärv <jan.h.d@swipnet.se>
7288
7289 * nsterm.m (x_free_frame_resources): Move xfree so freed memory isn't
7290 referenced (Bug#11583).
7291
7292 2012-06-16 Aurelien Aptel <aurelien.aptel@gmail.com>
7293
7294 Implement wave-style variant of underlining.
7295 * dispextern.h (face_underline_type): New enum.
7296 (face): Add field for underline type.
7297 * nsterm.m (ns_draw_underwave): New function.
7298 (ns_draw_text_decoration): Use it.
7299 * w32term.c (w32_restore_glyph_string_clip, w32_draw_underwave):
7300 New functions.
7301 (x_draw_glyph_string): Use them.
7302 * xfaces.c (Qline, Qwave): New Lisp objects.
7303 (check_lface_attrs, merge_face_ref)
7304 (Finternal_set_lisp_face_attribute, realize_x_face):
7305 Handle wave-style underline face attributes.
7306 * xterm.c (x_draw_underwave): New function.
7307 (x_draw_glyph_string): Use it.
7308
7309 2012-06-16 Juanma Barranquero <lekktu@gmail.com>
7310
7311 * makefile.w32-in ($(BLD)/emacs.$(O), $(BLD)/fringe.$(O))
7312 ($(BLD)/xml.$(O), $(BLD)/intervals.$(O), $(BLD)/macros.$(O))
7313 ($(BLD)/minibuf.$(O), $(BLD)/regex.$(O), $(BLD)/region-cache.$(O))
7314 ($(BLD)/textprop.$(O), $(BLD)/undo.$(O), $(BLD)/window.$(O))
7315 ($(BLD)/w32select.$(O)): Update dependencies.
7316
7317 2012-06-16 Andreas Schwab <schwab@linux-m68k.org>
7318
7319 * buffer.h (FETCH_MULTIBYTE_CHAR): Define as inline.
7320 (BUF_FETCH_MULTIBYTE_CHAR): Likewise.
7321 * character.c (_fetch_multibyte_char_p): Remove.
7322 * alloc.c: Include "character.h" before "buffer.h".
7323 * bidi.c: Likewise.
7324 * buffer.c: Likewise.
7325 * bytecode.c: Likewise.
7326 * callint.c: Likewise.
7327 * callproc.c: Likewise.
7328 * casefiddle.c: Likewise.
7329 * casetab.c: Likewise.
7330 * category.c: Likewise.
7331 * cmds.c: Likewise.
7332 * coding.c: Likewise.
7333 * composite.c: Likewise.
7334 * dired.c: Likewise.
7335 * dispnew.c: Likewise.
7336 * doc.c: Likewise.
7337 * dosfns.c: Likewise.
7338 * editfns.c: Likewise.
7339 * emacs.c: Likewise.
7340 * fileio.c: Likewise.
7341 * filelock.c: Likewise.
7342 * font.c: Likewise.
7343 * fontset.c: Likewise.
7344 * fringe.c: Likewise.
7345 * indent.c: Likewise.
7346 * insdel.c: Likewise.
7347 * intervals.c: Likewise.
7348 * keyboard.c: Likewise.
7349 * keymap.c: Likewise.
7350 * lread.c: Likewise.
7351 * macros.c: Likewise.
7352 * marker.c: Likewise.
7353 * minibuf.c: Likewise.
7354 * nsfns.m: Likewise.
7355 * nsmenu.m: Likewise.
7356 * print.c: Likewise.
7357 * process.c: Likewise.
7358 * regex.c: Likewise.
7359 * region-cache.c: Likewise.
7360 * search.c: Likewise.
7361 * syntax.c: Likewise.
7362 * term.c: Likewise.
7363 * textprop.c: Likewise.
7364 * undo.c: Likewise.
7365 * unexsol.c: Likewise.
7366 * w16select.c: Likewise.
7367 * w32fns.c: Likewise.
7368 * w32menu.c: Likewise.
7369 * window.c: Likewise.
7370 * xdisp.c: Likewise.
7371 * xfns.c: Likewise.
7372 * xmenu.c: Likewise.
7373 * xml.c: Likewise.
7374 * xselect.c: Likewise.
7375
7376 2012-06-16 Eli Zaretskii <eliz@gnu.org>
7377
7378 * xdisp.c (set_cursor_from_row): Don't dereference glyphs_end.
7379 If all the glyphs of the glyph row came from strings, and we have no
7380 cursor positioning clues, put the cursor on the first glyph of the
7381 row.
7382 (handle_face_prop): Use chunk-relative overlay string index when
7383 indexing into it->string_overlays array. (Bug#11653)
7384 (set_cursor_from_row): Use the leftmost glyph as GLYPH_BEFORE, not
7385 the rightmost. (Bug#11720)
7386
7387 2012-06-16 Andreas Schwab <schwab@linux-m68k.org>
7388
7389 * category.h (CHAR_HAS_CATEGORY): Define as inline.
7390 (CATEGORY_MEMBER): Enforce 1/0 value.
7391 * category.c (_temp_category_set): Remove.
7392
7393 2012-06-16 Eli Zaretskii <eliz@gnu.org>
7394
7395 * window.c (Fdelete_other_windows_internal)
7396 (Fdelete_window_internal): Don't access frame's mouse highlight
7397 info of the initial frame. (Bug#11677)
7398
7399 2012-06-14 Paul Eggert <eggert@cs.ucla.edu>
7400
7401 * .gdbinit (xgetint): Fix recently-introduced paren typo.
7402 Assume USE_2_TAGS_FOR_INTS.
7403 (xreload): Adjust $tagmask width to match recent lisp.h change.
7404
7405 Simplify lisp.h in minor ways that should not affect code.
7406 * lisp.h (USE_2_TAGS_FOR_INTS): Remove, as it was always defined.
7407 (LISP_INT_TAG, case_Lisp_Int, LISP_STRING_TAG, LISP_INT_TAG_P)
7408 (LISP_INT1_TAG, enum Lisp_Type, XINT, XUINT, make_number):
7409 Simplify under the assumption that USE_2_TAGS_FOR_INTS is defined.
7410 (INTTYPEBITS): New macro, for clarity.
7411 (INTMASK, MOST_POSITIVE_FIXNUM): Use it.
7412 (LISP_INT1_TAG, LISP_STRING_TAG, LISP_INT_TAG_P):
7413 Simplify now that USE_LSB_TAG is always defined.
7414 (TYPEMASK, XINT) [USE_LSB_TAG]: Remove unnecessary cast.
7415 (make_number) [!USE_LSB_TAG]: Use INTMASK; that's simpler.
7416
7417 2012-06-13 Juanma Barranquero <lekktu@gmail.com>
7418
7419 * makefile.w32-in ($(BLD)/data.$(O)): Update dependencies.
7420
7421 2012-06-13 Glenn Morris <rgm@gnu.org>
7422
7423 * s/bsd-common.h (BSD4_3):
7424 * s/usg5-4-common.h (USG5_4): No longer define; unused.
7425
7426 2012-06-13 Andreas Schwab <schwab@linux-m68k.org>
7427
7428 * lisp.h (Lisp_Object) [CHECK_LISP_OBJECT_TYPE]: Define as struct
7429 instead of union.
7430 (XLI, XIL): Define.
7431 (XHASH, XTYPE, XINT, XUINT, make_number, XSET, XPNTR, XUNTAG):
7432 Use them.
7433 * emacs.c (gdb_use_struct): Rename from gdb_use_union.
7434 * .gdbinit: Check gdb_use_struct instead of gdb_use_union.
7435 * alloc.c (widen_to_Lisp_Object): Remove.
7436 (mark_memory): Use XIL instead of widen_to_Lisp_Object.
7437 * frame.c (delete_frame): Remove outdated comment.
7438 * w32fns.c (Fw32_register_hot_key): Use XLI instead of checking
7439 USE_LISP_UNION_TYPE.
7440 (Fw32_unregister_hot_key): Likewise.
7441 (Fw32_toggle_lock_key): Likewise.
7442 * w32menu.c (add_menu_item): Likewise.
7443 (w32_menu_display_help): Use XIL instead of checking
7444 USE_LISP_UNION_TYPE.
7445 * w32heap.c (allocate_heap): Don't check USE_LISP_UNION_TYPE.
7446 (init_heap): Likewise.
7447 * w32term.c (w32_read_socket): Update comment.
7448
7449 2012-06-13 Glenn Morris <rgm@gnu.org>
7450
7451 * s/usg5-4-common.h, src/s/unixware.h:
7452 Remove define/undef of HAVE_SYSV_SIGPAUSE (not used since 2010-05-04).
7453
7454 * s/gnu.h (POSIX_SIGNALS): Remove (not used since 2010-05-04).
7455
7456 2012-06-13 Paul Eggert <eggert@cs.ucla.edu>
7457
7458 USE_LISP_UNION_TYPE + USE_LSB_TAG cleanup (Bug#11604)
7459 * alloc.c (make_number) [!defined make_number]:
7460 Remove, as lisp.h always defines this now.
7461 (mark_maybe_pointer): Simplify since USE_LSB_TAG is always defined now.
7462 (roundup_size): Verify that it is a power of 2.
7463 * data.c (Fmake_variable_buffer_local, Fmake_local_variable):
7464 * ftfont.c (ftfont_driver): Use LISP_INITIALLY_ZERO.
7465 * lisp.h (USE_LSB_TAG): Allow the builder to compile with
7466 -DUSE_LSB_TAG=0, to override the automatically-selected default.
7467 USE_LSB_TAG now is always defined to be either 0 or 1.
7468 All uses changed.
7469 (union Lisp_Object): Don't worry about WORDS_BIGENDIAN; the
7470 code works fine either way, and efficiency is not a concern here,
7471 as the union type is for debugging, not for production.
7472 (LISP_MAKE_RVALUE, make_number) [USE_LISP_UNION_TYPE]:
7473 Use an inline function on all platforms when using the union type,
7474 since this is simpler and 'static inline' can be used portably
7475 within Emacs now.
7476 (LISP_INITIALLY_ZERO): New macro.
7477 (XFASTINT, XSETFASTINT) [USE_LISP_UNION_TYPE]: Remove.
7478 (XSET) [USE_LISP_UNION_TYPE]: Don't overparenthesize.
7479
7480 2012-06-12 Glenn Morris <rgm@gnu.org>
7481
7482 * s/gnu-kfreebsd.h, s/hpux11.h, s/openbsd.h, s/sol2-10.h: Remove files.
7483
7484 * s/gnu-linux.h (HAVE_PROCFS): Move to configure.
7485
7486 * s/hpux10-20.h, s/openbsd.h, s/usg5-4-common.h:
7487 Move BROKEN_SIGIO to configure.
7488
7489 * s/bsd-common.h, s/darwin.h, s/gnu-kfreebsd.h, s/hpux10-20.h:
7490 Move NO_TERMIO to configure.
7491
7492 2012-06-12 Chong Yidong <cyd@gnu.org>
7493
7494 * image.c (imagemagick_load_image): Use MagickFlattenImage if
7495 MagickMergeImageLayers is undefined. Use pixel pusher loop if
7496 MagickExportImagePixels is undefined.
7497
7498 2012-06-12 Paul Eggert <eggert@cs.ucla.edu>
7499
7500 * image.c (imagemagick_load_image): Remove unused label.
7501
7502 2012-06-11 Glenn Morris <rgm@gnu.org>
7503
7504 * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/darwin.h:
7505 * s/gnu-kfreebsd.h, s/gnu-linux.h, s/gnu.h, s/hpux10-20.h:
7506 * s/irix6-5.h, s/ms-w32.h, s/msdos.h, s/template.h:
7507 * s/usg5-4-common.h: Move SYSTEM_TYPE to configure.
7508
7509 2012-06-11 Stefan Monnier <monnier@iro.umontreal.ca>
7510
7511 * alloc.c (make_byte_code): New function.
7512 (Fmake_byte_code): Use it. Don't purify here.
7513 * lread.c (read1): Use it as well to avoid extra allocation.
7514
7515 2012-06-11 Chong Yidong <cyd@gnu.org>
7516
7517 * image.c (imagemagick_load_image): Implement transparency.
7518
7519 2012-06-10 Andreas Schwab <schwab@linux-m68k.org>
7520
7521 * regex.c (at_begline_loc_p): Also recognize `(?N:' and correctly
7522 account for preceding backslashes. (Bug#11663)
7523
7524 2012-06-09 Chong Yidong <cyd@gnu.org>
7525
7526 * term.c: Support italics in capable terminals (Bug#9652).
7527 (no_color_bit): Replace unused NC_BLINK with NC_ITALIC.
7528 (turn_on_face): Output using TS_enter_italic_mode if available.
7529 Don't handle unused blinking and alt-charset cases.
7530 (turn_off_face): Handle italic case; discard unused tty_blinking_p
7531 and tty_alt_charset_p cases.
7532 (tty_capable_p, init_tty): Support italics.
7533
7534 * termchar.h (struct tty_display_info): Add field for italics.
7535 Remove unused blink field.
7536
7537 * xfaces.c (tty_supports_face_attributes_p, realize_tty_face):
7538 Handle slant.
7539
7540 * dispextern.h: Replace unused TTY_CAP_BLINK with TTY_CAP_ITALIC.
7541 (struct face): Remove unused fields tty_dim_p, tty_blinking_p, and
7542 tty_alt_charset_p. Add tty_italic_p.
7543
7544 2012-06-09 Michael Albinus <michael.albinus@gmx.de>
7545
7546 * dbusbind.c (XD_BASIC_DBUS_TYPE): Use dbus_type_is_valid and
7547 dbus_type_is_basic if available.
7548 (xd_extract_signed, xd_extract_unsigned): Rename from
7549 extract_signed and extract_unsigned, respectively. Adapt callers.
7550
7551 2012-06-09 Chong Yidong <cyd@gnu.org>
7552
7553 * xfaces.c (face_for_overlay_string): Handle face remapping (Bug#2066).
7554
7555 * fringe.c (Fset_fringe_bitmap_face): Handle the noninteractive
7556 case (Bug#9752).
7557
7558 2012-06-08 Paul Eggert <eggert@cs.ucla.edu>
7559
7560 * xdisp.c (vmessage): Treat frame message as multibyte.
7561 Without this change, (let ((§ 1)) (make-variable-buffer-local '§))
7562 would generate the diagnostic "Making \302\247 buffer-local while
7563 let-bound!".
7564
7565 2012-06-08 Eli Zaretskii <eliz@gnu.org>
7566
7567 * dispnew.c (showing_window_margins_p): Undo last change, which
7568 was done due to an inadvertent commit.
7569 (adjust_frame_glyphs_for_frame_redisplay): Do call
7570 showing_window_margins_p.
7571
7572 2012-06-08 Stefan Monnier <monnier@iro.umontreal.ca>
7573
7574 * eval.c (Fmake_var_non_special): New primitive.
7575 (syms_of_eval): Defsubr it.
7576 * lread.c (syms_of_lread): Mark `values' as lexically scoped.
7577
7578 2012-06-08 Juanma Barranquero <lekktu@gmail.com>
7579
7580 * dispnew.c (showing_window_margins_p): Wrap in #if 0 to prevent unused
7581 function warning (the only call is inside #if 0 since 2012-06-08T08:44:45Z!eliz@gnu.org).
7582
7583 2012-06-08 Eli Zaretskii <eliz@gnu.org>
7584
7585 * alloc.c (allocate_vectorlike): Fix last change.
7586
7587 2012-06-08 Dmitry Antipov <dmantipov@yandex.ru>
7588
7589 Block-based vector allocation of small vectors.
7590 * lisp.h (struct vectorlike_header): New field `nbytes',
7591 adjust comment accordingly.
7592 * alloc.c (enum mem_type): New type `MEM_TYPE_VECTOR_BLOCK'
7593 to denote vector blocks. Adjust users (live_vector_p,
7594 mark_maybe_pointer, valid_lisp_object_p) accordingly.
7595 (COMMON_MULTIPLE): Move outside #if USE_LSB_TAG.
7596 (VECTOR_BLOCK_SIZE, vroundup, VECTOR_BLOCK_BYTES),
7597 (VBLOCK_BYTES_MIN, VBLOCK_BYTES_MAX, VECTOR_MAX_FREE_LIST_INDEX),
7598 (VECTOR_FREE_LIST_FLAG, ADVANCE, VINDEX, SETUP_ON_FREE_LIST),
7599 (VECTOR_SIZE, VECTOR_IN_BLOCK): New macros.
7600 (roundup_size): New constant.
7601 (struct vector_block): New data type.
7602 (vector_blocks, vector_free_lists, zero_vector): New variables.
7603 (all_vectors): Rename to `large_vectors'.
7604 (allocate_vector_from_block, init_vectors, allocate_vector_from_block)
7605 (sweep_vectors): New functions.
7606 (allocate_vectorlike): Return `zero_vector' as the only vector of
7607 0 items. Allocate new vector from block if vector size is less than
7608 or equal to VBLOCK_BYTES_MAX.
7609 (Fgarbage_collect): Move all vector sweeping code to sweep_vectors.
7610 (init_alloc_once): Add call to init_vectors.
7611
7612 2012-06-08 Stefan Monnier <monnier@iro.umontreal.ca>
7613
7614 * eval.c (Fmacroexpand): Stop if the macro returns the same form.
7615
7616 2012-06-07 Paul Eggert <eggert@cs.ucla.edu>
7617
7618 * doprnt.c (doprnt): Truncate multibyte char correctly.
7619 Without this change, doprnt (buf, 2, "%s", FORMAT_END, AP)
7620 would mishandle a string argument "Xc" if X was a multibyte
7621 character of length 2: it would truncate after X's first byte
7622 rather than including all of X.
7623
7624 2012-06-06 Chong Yidong <cyd@gnu.org>
7625
7626 * buffer.c (word_wrap): Doc fix.
7627
7628 2012-06-04 Paul Eggert <eggert@cs.ucla.edu>
7629
7630 * xdisp.c (note_mode_line_or_margin_highlight): Pacify gcc -Wall.
7631
7632 2012-06-03 Glenn Morris <rgm@gnu.org>
7633
7634 * xdisp.c (tool-bar-style): Doc fix.
7635
7636 2012-06-03 Ulrich Müller <ulm@gentoo.org>
7637
7638 * Makefile.in (PAXCTL): Define.
7639 (temacs$(EXEEXT)): Disable memory randomization for the temacs
7640 binary via PaX flags if the paxctl utility is available.
7641 (emacs$(EXEEXT), bootstrap-emacs$(EXEEXT)):
7642 Restore PaX flags to their default. (Bug#11398)
7643
7644 2012-06-03 Chong Yidong <cyd@gnu.org>
7645
7646 * xdisp.c (decode_mode_spec_coding): Display a space for a unibyte
7647 buffer (Bug#11226).
7648
7649 2012-06-03 Chong Yidong <cyd@gnu.org>
7650
7651 * xdisp.c (calc_pixel_width_or_height): Use Fbuffer_local_value.
7652 (note_mode_line_or_margin_highlight): If there is no help echo,
7653 use mode-line-default-help-echo. Handle the case where the mouse
7654 position is past the end of the mode line string.
7655
7656 * buffer.c (buffer_local_value_1): New function, split from
7657 Fbuffer_local_value; can return Qunbound.
7658 (Fbuffer_local_value): Use it.
7659 (Vmode_line_format): Docstring tweaks.
7660
7661 2012-06-02 Paul Eggert <eggert@cs.ucla.edu>
7662
7663 * sysdep.c (system_process_attributes): Improve comment.
7664
7665 2012-06-02 Stefan Monnier <monnier@iro.umontreal.ca>
7666
7667 * keyboard.c: Export real-this-command to Elisp.
7668 (syms_of_keyboard): Rename real_this_command to Vreal_this_command
7669 and DEFVAR it. Update all users.
7670
7671 2012-06-02 Paul Eggert <eggert@cs.ucla.edu>
7672
7673 * minibuf.c (Fassoc_string): Remove duplicate declaration.
7674
7675 * sysdep.c (system_process_attributes) [SOLARIS2 && HAVE_PROCFS]:
7676 Convert pctcpu and pctmem to Lisp float properly.
7677 Let the compiler fold better, as 100.0/0x8000 is exact.
7678
7679 2012-06-02 Andreas Schwab <schwab@linux-m68k.org>
7680
7681 * alloc.c (CONS_BLOCK_SIZE): Account for padding at the end of
7682 cons_block.
7683
7684 2012-06-01 Paul Eggert <eggert@cs.ucla.edu>
7685
7686 * xfns.c (x_set_tool_bar_lines) [USE_GTK]: Adjust to bitfield change.
7687
7688 2012-06-01 Dmitry Antipov <dmantipov@yandex.ru>
7689
7690 For a 'struct window', replace some Lisp_Object fields to
7691 bitfields where appropriate, remove unused fields.
7692 * window.h (struct window): Remove unused 'last_mark_x' and
7693 'last_mark_y' fields. Rename 'mini_p' field to 'mini',
7694 change its type from Lisp_Object to bitfield.
7695 Change type of 'force_start', 'optional_new_start',
7696 'last_had_star', 'update_mode_line' and 'start_at_line_beg'
7697 fields from Lisp_Object to bitfield. Adjust users accordingly.
7698
7699 2012-05-31 Paul Eggert <eggert@cs.ucla.edu>
7700
7701 Pacify gcc -Wdouble-precision when using Xaw.
7702 * xterm.c (xaw_jump_callback, x_set_toolkit_scroll_bar_thumb)
7703 [HAVE_X_WINDOWS && USE_TOOLKIT_SCROLL_BARS && !USE_MOTIF && !USE_GTK]:
7704 Use 'float' consistently, rather than 'float' in most places
7705 and 'double' in a couple of places.
7706
7707 2012-05-31 Eli Zaretskii <eliz@gnu.org>
7708
7709 * xdisp.c (handle_stop): Detect whether we have overlay strings
7710 loaded by testing it->current.overlay_string_index to be
7711 non-negative, instead of checking whether n_overlay_strings is
7712 positive. (Bug#11587)
7713
7714 2012-05-31 Chong Yidong <cyd@gnu.org>
7715
7716 * keymap.c (describe_map_tree): Revert 2011-07-07 change (Bug#1169).
7717
7718 * doc.c (Fsubstitute_command_keys): Doc fix.
7719
7720 2012-05-31 Eli Zaretskii <eliz@gnu.org>
7721
7722 * search.c (search_buffer): Remove calls to
7723 r_alloc_inhibit_buffer_relocation, as it is now called by
7724 maybe_unify_char, which was the cause of relocation of buffer text
7725 in bug#11519.
7726
7727 2012-05-31 Eli Zaretskii <eliz@gnu.org>
7728
7729 * charset.c (maybe_unify_char): Inhibit relocation of buffer text
7730 for the duration of call to load_charset, to avoid problems with
7731 callers of maybe_unify_char that access buffer text through C
7732 pointers.
7733
7734 * ralloc.c (r_alloc_inhibit_buffer_relocation): Increment and
7735 decrement the inhibition flag, instead of just setting or
7736 resetting it.
7737
7738 2012-05-31 Paul Eggert <eggert@cs.ucla.edu>
7739
7740 Remove obsolete '#define static' cruft.
7741 * s/hpux10-20.h (_FILE_OFFSET_BITS): Don't #undef.
7742 This #undef was "temporary" in 2000; it is no longer needed
7743 now that '#define static' has gone away.
7744 * xfns.c, xterm.h (gray_bitmap_width, gray_bitmap_height)
7745 (gray_bitmap_bits): Remove; no longer needed.
7746 All uses replaced with definiens.
7747 * xterm.c: Include "bitmaps/gray.xbm".
7748
7749 2012-05-30 Paul Eggert <eggert@cs.ucla.edu>
7750
7751 Clean up __executable_start, monstartup when --enable-profiling.
7752 The following changes affect the code only when profiling.
7753 * dispnew.c (__executable_start): Rename from safe_bcopy.
7754 Define only on platforms that need it.
7755 * emacs.c: Include <sys/gmon.h> when profiling.
7756 (_mcleanup): Remove decl, since <sys/gmon.h> does it now.
7757 (__executable_start): Remove decl, since lisp.h does it now.
7758 (safe_bcopy): Remove decl; no longer has that name.
7759 (main): Coalesce #if into single bit of code, for simplicity.
7760 Cast pointers to uintptr_t, since standard libraries want integers
7761 and not pointers.
7762 * lisp.h (__executable_start): New decl.
7763
7764 2012-05-31 Glenn Morris <rgm@gnu.org>
7765
7766 * image.c (Fimagemagick_types): Doc fix.
7767
7768 2012-05-30 Jim Meyering <meyering@redhat.com>
7769
7770 * callproc.c (Fcall_process_region): Include directory component
7771 in mkstemp error message (Bug#11586).
7772
7773 2012-05-30 Paul Eggert <eggert@cs.ucla.edu>
7774
7775 * alloc.c, lisp.h (make_pure_vector): Now static.
7776
7777 2012-05-30 Stefan Monnier <monnier@iro.umontreal.ca>
7778
7779 * eval.c (Fdefun, Fdefmacro, Vmacro_declaration_function):
7780 Move to byte-run.el.
7781 (Fautoload): Do the hash-doc more carefully.
7782 * data.c (Fdefalias): Purify definition, except for keymaps.
7783 (Qdefun): Move from eval.c.
7784 * lisp.h (Qdefun): Remove.
7785 * lread.c (read1): Tiny simplification.
7786
7787 2012-05-29 Troels Nielsen <bn.troels@gmail.com>
7788
7789 Do not create empty overlays with the evaporate property (Bug#9642).
7790 * buffer.c (Fmove_overlay): Reinstate the earlier fix for
7791 Bug#9642, but explicitly check that the buffer the overlay would
7792 be moved to is live and rearrange lines to make sure that errors
7793 will not put the overlay in an inconsistent state.
7794 (Fdelete_overlay): Cosmetics.
7795
7796 2012-05-28 Eli Zaretskii <eliz@gnu.org>
7797
7798 * w32term.c (my_bring_window_to_top): New function.
7799 (x_raise_frame): Use handle returned by DeferWindowPos, which
7800 could be different from the original one.
7801 Call my_bring_window_to_top instead of my_set_foreground_window.
7802 (Bug#11513)
7803
7804 * w32fns.c (w32_wnd_proc): Accept and process WM_EMACS_BRINGTOTOP
7805 by calling BringWindowToTop.
7806
7807 * w32term.h (WM_EMACS_BRINGTOTOP): New message.
7808 (WM_EMACS_END): Increase by one.
7809
7810 2012-05-28 Paul Eggert <eggert@cs.ucla.edu>
7811
7812 * bidi.c (bidi_mirror_char): Put eassert before conversion to int.
7813 This avoids undefined behavior that might cause the eassert
7814 to not catch an out-of-range value.
7815
7816 2012-05-28 Juanma Barranquero <lekktu@gmail.com>
7817
7818 * makefile.w32-in ($(BLD)/w32inevt.$(O), $(BLD)/w32console.$(O)):
7819 Update dependencies.
7820
7821 2012-05-27 Eli Zaretskii <eliz@gnu.org>
7822
7823 * bidi.c (bidi_mirror_char): Fix last change.
7824
7825 2012-05-27 Andreas Schwab <schwab@linux-m68k.org>
7826
7827 * unexmacosx.c (copy_data_segment): Truncate after 16 characters
7828 when referring to sectname field in printf format.
7829
7830 2012-05-27 Paul Eggert <eggert@cs.ucla.edu>
7831
7832 * lisp.h [REL_ALLOC]: Omit duplicate prototypes.
7833 Only r_alloc_inhibit_buffer_relocation needed to be added;
7834 the others were already declared.
7835
7836 * bidi.c (bidi_mirror_char): Don't possibly truncate the integer
7837 before checking whether it's out of range. Put the check inside
7838 eassert. See
7839 <http://lists.gnu.org/archive/html/emacs-devel/2012-05/msg00485.html>.
7840
7841 2012-05-27 Ken Brown <kbrown@cornell.edu>
7842
7843 * callproc.c (Fcall_process): Restore a line that was accidentally
7844 commented out in the 2011-02-13 change (bug#11547).
7845
7846 2012-05-27 Eli Zaretskii <eliz@gnu.org>
7847
7848 * lisp.h [REL_ALLOC]: Add prototypes for external functions
7849 defined on ralloc.c.
7850
7851 * buffer.c [REL_ALLOC]: Remove prototypes of
7852 r_alloc_reset_variable, r_alloc, r_re_alloc, and r_alloc_free,
7853 they are now on lisp.h.
7854
7855 * ralloc.c (r_alloc_inhibit_buffer_relocation): New function.
7856
7857 * search.c (search_buffer): Use it to inhibit relocation of buffer
7858 text while re_search_2 is doing its job, because re_search_2 is
7859 passed C pointers to buffer text. (Bug#11519)
7860
7861 * msdos.c (internal_terminal_init) <Vwindow_system_version>:
7862 Update value to 24.
7863
7864 * xdisp.c (move_it_to): Under MOVE_TO_Y, when restoring iterator
7865 state after an additional call to move_it_in_display_line_to, keep
7866 the values of it->max_ascent and it->max_descent found for the
7867 entire line.
7868 (pos_visible_p): Revert the comparison against bottom_y to what it
7869 was in revid eliz@gnu.org-20120513182235-4p6386j761ld0nwb.
7870 (Bug#11464)
7871
7872 2012-05-26 Paul Eggert <eggert@cs.ucla.edu>
7873
7874 Fix coding-related core dumps with gcc -ftrapv.
7875 The code was computing A - B, where A and B are pointers, and B is
7876 random garbage. This can lead to core dumps on platforms that
7877 have special pointer registers, and it also leads to core dumps on
7878 x86-64 when compiled with gcc -ftrapv. The fix is to compute
7879 A - B only when B is initialized properly.
7880 * coding.c (coding_set_source, coding_set_destination): Return void.
7881 (coding_change_source, coding_change_destinations): New functions,
7882 with the old behaviors of coding_set_source and coding_set_destination.
7883 All callers that need an offset changed to use these new functions.
7884
7885 2012-05-26 Glenn Morris <rgm@gnu.org>
7886
7887 * nsterm.m (ns_init_paths): Don't mess with INFOPATH. (Bug#2791)
7888
7889 2012-05-26 Eli Zaretskii <eliz@gnu.org>
7890
7891 Extend mouse support on W32 text-mode console.
7892 * xdisp.c (draw_row_with_mouse_face):
7893 Call tty_draw_row_with_mouse_face for WINDOWSNT as well.
7894
7895 * w32console.c: Include window.h.
7896 (w32con_write_glyphs_with_face, tty_draw_row_with_mouse_face):
7897 New functions.
7898 (initialize_w32_display): Initialize mouse-highlight data.
7899
7900 * w32inevt.c: Include termchar.h and window.h.
7901 (do_mouse_event): Support mouse-autoselect-window. When the mouse
7902 moves, call note_mouse_highlight. If help_echo changed, call
7903 gen_help_event to produce help-echo message in the echo area.
7904 Call clear_mouse_face if mouse_face_hidden is set in the mouse
7905 highlight info.
7906
7907 2012-05-26 Paul Eggert <eggert@cs.ucla.edu>
7908
7909 * lread.c (read1): Simplify slightly to avoid an overflow warning
7910 with GCC 4.7.0 on x86-64.
7911
7912 2012-05-26 Eli Zaretskii <eliz@gnu.org>
7913
7914 * bidi.c (bidi_mirror_char): Revert last change: an int is
7915 definitely wide enough here.
7916
7917 2012-05-25 Paul Eggert <eggert@cs.ucla.edu>
7918
7919 Fix integer width and related bugs (Bug#9874).
7920 * alloc.c (pure_bytes_used_lisp, pure_bytes_used_non_lisp):
7921 (allocate_vectorlike, buffer_memory_full, struct sdata, SDATA_SIZE)
7922 (string_bytes, check_sblock, allocate_string_data):
7923 (compact_small_strings, Fmake_bool_vector, make_string)
7924 (make_unibyte_string, make_multibyte_string)
7925 (make_string_from_bytes, make_specified_string)
7926 (allocate_vectorlike, Fmake_vector, find_string_data_in_pure)
7927 (make_pure_string, make_pure_c_string, make_pure_vector, Fpurecopy)
7928 (mark_vectorlike):
7929 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
7930 (allocate_pseudovector):
7931 Use int, not EMACS_INT, where int is wide enough.
7932 (inhibit_garbage_collection, Fgarbage_collect):
7933 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
7934 * bidi.c (bidi_mirror_char): Use EMACS_INT, not int, where
7935 int might not be wide enough.
7936 (bidi_cache_search, bidi_cache_find, bidi_init_it)
7937 (bidi_count_bytes, bidi_char_at_pos, bidi_fetch_char)
7938 (bidi_at_paragraph_end, bidi_find_paragraph_start)
7939 (bidi_paragraph_init, bidi_resolve_explicit, bidi_resolve_weak)
7940 (bidi_level_of_next_char, bidi_move_to_visually_next):
7941 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
7942 * buffer.c (copy_overlays, Fgenerate_new_buffer_name)
7943 (Fkill_buffer, Fset_buffer_major_mode)
7944 (advance_to_char_boundary, Fbuffer_swap_text)
7945 (Fset_buffer_multibyte, overlays_at, overlays_in)
7946 (overlay_touches_p, struct sortvec, record_overlay_string)
7947 (overlay_strings, recenter_overlay_lists)
7948 (adjust_overlays_for_insert, adjust_overlays_for_delete)
7949 (fix_start_end_in_overlays, fix_overlays_before, modify_overlay)
7950 (Fmove_overlay, Fnext_overlay_change, Fprevious_overlay_change)
7951 (Foverlay_recenter, last_overlay_modification_hooks_used)
7952 (report_overlay_modification, evaporate_overlays, enlarge_buffer_text):
7953 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
7954 (validate_region): Omit unnecessary test for b <= e,
7955 since that's guaranteed by the previous test.
7956 (adjust_overlays_for_delete): Avoid pos + length overflow.
7957 (Fmove_overlay, Fdelete_overlay, add_overlay_mod_hooklist)
7958 (report_overlay_modification):
7959 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
7960 (Foverlays_at, Fnext_overlay_change, Fprevious_overlay_change):
7961 Omit pointer cast, which isn't needed anyway, and doesn't work
7962 after the EMACS_INT -> ptrdiff_t change.
7963 (Fmove_overlay): Clip BEG and END to ptrdiff_t to avoid overflow.
7964 * buffer.h: Adjust decls to match defn changes elsewhere.
7965 (struct buffer_text, struct buffer):
7966 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
7967 Use EMACS_INT, not int, where int might not be wide enough.
7968 * bytecode.c (unmark_byte_stack, exec_byte_code): Use ptrdiff_t,
7969 not int, to avoid needless 32-bit limit on 64-bit hosts.
7970 (exec_byte_code): Use tighter memory-full test, one that checks
7971 for alloca overflow. Don't compute the address of the object just
7972 before an array, as that's not portable. Use EMACS_INT, not
7973 ptrdiff_t or int, where ptrdiff_t or int might not be wide enough.
7974 * callint.c (Fcall_interactively):
7975 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
7976 * callproc.c (call_process_kill, Fcall_process):
7977 Don't assume pid_t fits into an Emacs fixnum.
7978 (call_process_cleanup, Fcall_process, child_setup):
7979 Don't assume pid_t fits into int.
7980 (call_process_cleanup, Fcall_process, delete_temp_file)
7981 (Fcall_process_region):
7982 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
7983 (Fcall_process): Simplify handling of volatile integers.
7984 Use int, not EMACS_INT, where int will do.
7985 * casefiddle.c (casify_object, casify_region, operate_on_word)
7986 (Fupcase_word, Fdowncase_word, Fcapitalize_word):
7987 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
7988 (casify_object): Avoid integer overflow when overallocating buffer.
7989 * casetab.c (set_identity, shuffle): Prefer int to unsigned when
7990 either works. Use lint_assume to convince GCC 4.6.1 that it's OK.
7991 * category.c (Fchar_category_set): Don't assume fixnum fits in int.
7992 * category.h (CATEGORYP): Don't assume arg is nonnegative.
7993 * ccl.c (GET_CCL_INT): Remove; no longer needed, since the
7994 integers are now checked earlier. All uses replaced with XINT.
7995 (ccl_driver):
7996 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
7997 For CCL_MapSingle, check that content and value are in int range.
7998 (ccl_driver, Fregister_code_conversion_map):
7999 Check that Vcode_version_map_vector is a vector.
8000 (resolve_symbol_ccl_program): Check that vector header is in range.
8001 Always copy the vector, so that we can check its contents reliably
8002 now rather than having to recheck each instruction as it's being
8003 executed. Check that vector words fit in 'int'.
8004 (ccl_get_compiled_code, Fregister_ccl_program)
8005 (Fregister_code_conversion_map): Use ptrdiff_t, not int, for
8006 program indexes, to avoid needless 32-bit limit on 64-bit hosts.
8007 (Fccl_execute, Fccl_execute_on_string): Check that initial reg
8008 contents are in range.
8009 (Fccl_execute_on_string): Check that status is in range.
8010 * ccl.h (struct ccl_program.idx): Now ptrdiff_t, not int.
8011 * character.c (char_resolve_modifier_mask, Fchar_resolve_modifiers):
8012 Accept and return EMACS_INT, not int, because callers can pass values
8013 out of 'int' range.
8014 (c_string_width, strwidth, lisp_string_width, chars_in_text)
8015 (multibyte_chars_in_text, parse_str_as_multibyte)
8016 (str_as_multibyte, count_size_as_multibyte, str_to_multibyte)
8017 (str_as_unibyte, str_to_unibyte, string_count_byte8)
8018 (string_escape_byte8, Fget_byte):
8019 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8020 (Funibyte_string): Use CHECK_RANGED_INTEGER, not CHECK_NATNUM, to
8021 avoid mishandling large integers.
8022 * character.h: Adjust decls to match defn changes elsewhere.
8023 * charset.c (load_charset_map_from_file, find_charsets_in_text)
8024 (Ffind_charset_region):
8025 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8026 (load_charset_map_from_file): Redo idx calculation to avoid overflow.
8027 (load_charset_map_from_vector, Fdefine_charset_internal):
8028 Don't assume fixnum fits in int.
8029 (load_charset_map_from_vector, Fmap_charset_chars):
8030 Remove now-unnecessary CHECK_NATNUMs.
8031 (Fdefine_charset_internal): Check ranges here, more carefully.
8032 Don't rely on undefined behavior with signed left shift overflow.
8033 Don't assume unsigned int fits into fixnum, or that fixnum fits
8034 into unsigned int. Don't require max_code to be a valid fixnum;
8035 that's not true for gb10830 4-byte on a 32-bit host. Allow
8036 invalid_code to be a cons, for the same reason. Require code_offset
8037 to be a character. Avoid int overflow if max_char is close
8038 to INT_MAX.
8039 (CODE_POINT_TO_INDEX): On 32-bit hosts, return int, not unsigned;
8040 this is intended anyway and avoids some undefined behavior.
8041 (load_charset_map): Pass unsigned, not int, as 2nd arg of
8042 INDEX_TO_CODE_POINT, as that's what it expects.
8043 (Funify_charset, encode_char): Don't stuff unsigned vals into int vars.
8044 * charset.h (DECODE_CHAR): Return int, not unsigned;
8045 this is what was intended anyway, and it avoids undefined behavior.
8046 (CHARSET_OFFSET): Remove unused macro, instead of fixing its
8047 integer-overflow issues.
8048 (ENCODE_CHAR): Return unsigned on all hosts, not just on 32-bit hosts.
8049 Formerly, it returned EMACS_INT on 64-bit hosts in the common case
8050 where the argument is EMACS_INT, and this behavior is not intended.
8051 * chartab.c (Fmake_char_table, Fset_char_table_range)
8052 (uniprop_get_decoder, uniprop_get_encoder):
8053 Don't assume fixnum fits in int.
8054 * cmds.c (move_point): New function, that does the gist of
8055 Fforward_char and Fbackward_char, but does so while checking
8056 for integer overflow more accurately.
8057 (Fforward_char, Fbackward_char): Use it.
8058 (Fforward_line, Fend_of_line, internal_self_insert)
8059 (internal_self_insert):
8060 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8061 Fix a FIXME, by checking for integer overflow when calculating
8062 target_clm and actual_clm.
8063 * coding.c (detect_coding_XXX, encode_coding_XXX, CODING_DECODE_CHAR)
8064 (CODING_ENCODE_CHAR, CODING_CHAR_CHARSET, CODING_CHAR_CHARSET_P)
8065 (ASSURE_DESTINATION, coding_alloc_by_realloc)
8066 (coding_alloc_by_making_gap, alloc_destination)
8067 (detect_coding_utf_8, encode_coding_utf_8, decode_coding_utf_16)
8068 (encode_coding_utf_16, detect_coding_emacs_mule)
8069 (decode_coding_emacs_mule, encode_coding_emacs_mule)
8070 (detect_coding_iso_2022, decode_coding_iso_2022)
8071 (encode_invocation_designation, encode_designation_at_bol)
8072 (encode_coding_iso_2022, detect_coding_sjis, detect_coding_big5)
8073 (decode_coding_sjis, decode_coding_big5, encode_coding_sjis)
8074 (encode_coding_big5, detect_coding_ccl, decode_coding_ccl)
8075 (encode_coding_ccl, encode_coding_raw_text)
8076 (detect_coding_charset, decode_coding_charset)
8077 (encode_coding_charset, detect_eol, decode_eol, produce_chars)
8078 (produce_composition, produce_charset, produce_annotation)
8079 (decode_coding, handle_composition_annotation)
8080 (handle_charset_annotation, consume_chars, decode_coding_gap)
8081 (decode_coding_object, encode_coding_object, detect_coding_system)
8082 (Ffind_coding_systems_region_internal, Fcheck_coding_systems_region)
8083 (code_convert_region, code_convert_string)
8084 (Fdefine_coding_system_internal)
8085 (coding_set_source, coding_set_destination):
8086 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8087 (setup_iso_safe_charsets, consume_chars, Funencodable_char_position)
8088 (Fdefine_coding_system_internal):
8089 Don't assume fixnums fit in int.
8090 (decode_coding_gap, decode_coding_object, encode_coding_object)
8091 (Fread_coding_system, Fdetect_coding_region)
8092 (Funencodable_char_position, Fcheck_coding_systems_region)
8093 (get_translation, handle_composition_annotation, consume_chars):
8094 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8095 (consume_chars): Rewrite to not calculate an address outside buffer.
8096 (Ffind_operation_coding_system): NATNUMP can eval its arg twice.
8097 Don't access memory outside of the args array.
8098 (Fdefine_coding_system_internal): Check for charset-id overflow.
8099 (ENCODE_ISO_CHARACTER): Use unsigned, not int, to store the unsigned
8100 result of ENCODE_CHAR.
8101 * coding.h: Adjust decls to match defn changes elsewhere.
8102 (struct coding_system):
8103 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8104 * composite.c (get_composition_id, find_composition)
8105 (run_composition_function, update_compositions)
8106 (compose_text, composition_gstring_put_cache)
8107 (composition_gstring_p, composition_gstring_width)
8108 (fill_gstring_header, fill_gstring_body, autocmp_chars)
8109 (composition_compute_stop_pos, composition_reseat_it)
8110 (composition_update_it, struct position_record)
8111 (find_automatic_composition, composition_adjust_point)
8112 (Fcomposition_get_gstring, Ffind_composition_internal):
8113 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8114 (update_compositions):
8115 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8116 * composite.h: Adjust decls to match defn changes elsewhere.
8117 (struct composition):
8118 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8119 * data.c (let_shadows_buffer_binding_p, let_shadows_global_binding_p):
8120 Do not attempt to compute the address of the object just before a
8121 buffer; this is not portable.
8122 (Faref, Faset):
8123 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8124 (Faset): Use int, not EMACS_INT, where int is wide enough.
8125 (Fstring_to_number): Don't assume fixnums fit in int.
8126 (Frem): Don't assume arg is nonnegative.
8127 * dbusbind.c (xd_append_arg): Check for integers out of range.
8128 (Fdbus_call_method): Don't overflow the timeout int.
8129 (extract_signed, extract_unsigned): New functions.
8130 (XD_CHECK_DBUS_SERIAL): Remove; superseded by extract_unsigned.
8131 (xd_get_connection_references): Return ptrdiff_t, not int.
8132 All uses changed.
8133 (xd_signature, xd_append_arg, xd_retrieve_arg, Fdbus_message_internal)
8134 (xd_read_message_1):
8135 Use int, not unsigned, where the dbus API uses int.
8136 (Fdbus_message_internal): Don't overflow mtype.
8137 (syms_of_dbusbind): Allocate right-sized buffer for integers.
8138 * dired.c (directory_files_internal, file_name_completion, scmp)
8139 (file_name_completion_stat):
8140 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8141 (file_name_completion): Don't overflow matchcount.
8142 (file_name_completion_stat): Use SAFE_ALLOCA, not alloca.
8143 * dispextern.h: Adjust decls to match defn changes elsewhere.
8144 (struct text_pos, struct glyph, struct bidi_saved_info)
8145 (struct bidi_string_data, struct bidi_it, struct composition_it)
8146 (struct it):
8147 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8148 (struct display_pos, struct composition_it, struct it):
8149 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8150 * dispnew.c (increment_matrix_positions)
8151 (increment_row_positions, mode_line_string)
8152 (marginal_area_string):
8153 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8154 (change_frame_size_1, Fredisplay, Fframe_or_buffer_changed_p):
8155 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8156 (duration_to_sec_usec): New function, to check for overflow better.
8157 (Fsleep_for, sit_for): Use it.
8158 * doc.c (get_doc_string, store_function_docstring):
8159 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8160 (get_doc_string, Fsnarf_documentation):
8161 Use int, not EMACS_INT, where int is wide enough.
8162 (get_doc_string):
8163 Use SAFE_ALLOCA, not alloca.
8164 Check for overflow when converting EMACS_INT to off_t.
8165 * doprnt.c (doprnt):
8166 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8167 * editfns.c (init_editfns, Fuser_uid, Fuser_real_uid):
8168 Don't assume uid_t fits into fixnum.
8169 (buildmark, Fgoto_char, overlays_around, find_field, Fdelete_field)
8170 (Ffield_string, Ffield_string_no_properties, Ffield_beginning)
8171 (Ffield_end, Fconstrain_to_field, Fline_beginning_position)
8172 (Fline_end_position, Fprevious_char, Fchar_after, Fchar_before)
8173 (general_insert_function)
8174 (Finsert_char, make_buffer_string, make_buffer_string_both)
8175 (update_buffer_properties, Fbuffer_substring)
8176 (Fbuffer_substring_no_properties, Fcompare_buffer_substrings)
8177 (Fsubst_char_in_region, check_translation)
8178 (Ftranslate_region_internal, save_restriction_restore, Fformat)
8179 (transpose_markers, Ftranspose_regions):
8180 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8181 (clip_to_bounds): Move to lisp.h as an inline function).
8182 (Fconstrain_to_field): Don't assume integers are nonnegative.
8183 (Fline_beginning_position, Fsave_excursion, Fsave_current_buffer):
8184 (Fsubst_char_in_region, Fsave_restriction):
8185 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8186 (Femacs_pid): Don't assume pid_t fits into fixnum.
8187 (lo_time): Use int, not EMACS_INT, when int suffices.
8188 (lisp_time_argument): Check for usec out of range.
8189 (Fencode_time): Don't assume fixnum fits in int.
8190 (Fuser_login_name, Fuser_full_name): Signal an error
8191 if a uid argument is out of range, rather than relying on
8192 undefined behavior.
8193 (Fformat_time_string): Remove now-unnecessary check.
8194 lisp_time_argument checks for out-of-range usec now.
8195 Use ptrdiff_t, not size_t, where ptrdiff_t will do.
8196 * emacs.c (gdb_valbits, gdb_gctypebits): Now int, not EMACS_INT.
8197 (gdb_data_seg_bits): Now uintptr_t, not EMACS_INT.
8198 (PVEC_FLAG, gdb_array_mark_flag): Now ptrdiff_t, not EMACS_INT.
8199 (init_cmdargs, Fdump_emacs):
8200 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8201 (Fkill_emacs): Don't assume fixnum fits in int; instead, take just
8202 the bottom (typically) 32 bits of the fixnum.
8203 * eval.c (specpdl_size, call_debugger):
8204 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8205 (when_entered_debugger, Fbacktrace_debug):
8206 Don't assume fixnum can fit in int.
8207 (Fdefvaralias, Fdefvar): Do not attempt to compute the address of
8208 the object just before a buffer; this is not portable.
8209 (FletX, Flet, Funwind_protect, do_autoload, Feval, funcall_lambda)
8210 (grow_specpdl, unbind_to):
8211 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8212 (Fapply, apply_lambda): Don't assume ptrdiff_t can hold fixnum.
8213 (grow_specpdl): Simplify allocation by using xpalloc.
8214 (Fprog1, Fprog2): Don't assume list length fits in int. Simplify.
8215 * fileio.c (Ffind_file_name_handler, Fcopy_file, Frename_file)
8216 (Finsert_file_contents, Fwrite_region, Fdo_auto_save):
8217 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8218 (Ffind_file_name_handler, non_regular_inserted, Finsert_file_contents)
8219 (a_write, e_write):
8220 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8221 (Fcopy_file, non_regular_nbytes, read_non_regular)
8222 (Finsert_file_contents):
8223 Use int, not EMACS_INT, where int is wide enough.
8224 (READ_BUF_SIZE): Verify that it fits in int.
8225 (Finsert_file_contents): Check that counts are in proper range,
8226 rather than assuming fixnums fit into ptrdiff_t etc.
8227 Don't assume fixnums fit into int.
8228 * floatfns.c (Fexpt): Avoid undefined signed * signed overflow.
8229 * fns.c (Fcompare_strings, Fstring_lessp, struct textprop_rec, concat)
8230 (string_char_byte_cache_charpos, string_char_byte_cache_bytepos)
8231 (string_char_to_byte, string_byte_to_char)
8232 (string_make_multibyte, string_to_multibyte)
8233 (string_make_unibyte, Fstring_as_unibyte, Fstring_as_multibyte)
8234 (Fstring_to_unibyte, Fsubstring, Fsubstring_no_properties)
8235 (substring_both, Fdelete, internal_equal, Ffillarray)
8236 (Fclear_string, mapcar1)
8237 (Fbase64_encode_region, Fbase64_encode_string, base64_encode_1)
8238 (Fbase64_decode_region, Fbase64_decode_string, base64_decode_1)
8239 (larger_vector, make_hash_table, maybe_resize_hash_table)
8240 (hash_lookup, hash_remove_from_table, hash_clear, sweep_weak_table)
8241 (Fmaphash, secure_hash):
8242 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8243 (concat): Check for string index and length overflow.
8244 (Fmapconcat): Don't assume fixnums fit into ptrdiff_t.
8245 (Frequire):
8246 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8247 (larger_vector): New API (vec, incr_min, size_max) replaces old
8248 one (vec, new_size, init). This catches size overflow.
8249 INIT was removed because it was always Qnil.
8250 All callers changed.
8251 (INDEX_SIZE_BOUND): New macro, which calculates more precisely
8252 the upper bound on a hash table index size.
8253 (make_hash_table, maybe_resize_hash_table): Use it.
8254 (secure_hash): Computer start_byte and end_byte only after
8255 they're known to be in ptrdiff_t range.
8256 * font.c (font_intern_prop, font_at, font_range, Ffont_shape_gstring)
8257 (Ffont_get_glyphs, Ffont_at):
8258 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8259 (font_style_to_value, font_prop_validate_style, font_expand_wildcards)
8260 (Flist_fonts, Fopen_font):
8261 Don't assume fixnum can fit in int.
8262 (check_gstring): Don't assume index can fit in int.
8263 (font_match_p): Check that fixnum is a character, not a nonnegative
8264 fixnum, since the later code needs to stuff it into an int.
8265 (font_find_for_lface): Use SAFE_ALLOCA_LISP, not alloca.
8266 (font_fill_lglyph_metrics): Use unsigned, not EMACS_INT, to avoid
8267 conversion overflow issues.
8268 (Fopen_font): Check for integer out of range.
8269 (Ffont_get_glyphs): Don't assume index can fit in int.
8270 * font.h: Adjust decls to match defn changes elsewhere.
8271 * fontset.c (reorder_font_vector): Redo score calculation to avoid
8272 integer overflow.
8273 (num_auto_fontsets, fontset_from_font): Use ptrdiff_t, not
8274 printmax_t, where ptrdiff_t is wide enough.
8275 (Finternal_char_font):
8276 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8277 * frame.c (Fset_mouse_position, Fset_mouse_pixel_position)
8278 (Fset_frame_height, Fset_frame_width, Fset_frame_size)
8279 (Fset_frame_position, x_set_frame_parameters)
8280 (x_set_line_spacing, x_set_border_width)
8281 (x_set_internal_border_width, x_set_alpha, x_figure_window_size):
8282 Check that fixnums are in proper range for system types.
8283 (frame_name_fnn_p, Fframe_parameter, Fmodify_frame_parameters):
8284 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8285 (Fmodify_frame_parameters): Don't assume fixnum fits in int.
8286 Use SAFE_ALLOCA_LISP, not alloca.
8287 * frame.h (struct frame): Use intptr_t, not EMACS_INT, where
8288 intptr_t is wide enough.
8289 * fringe.c (lookup_fringe_bitmap, get_logical_fringe_bitmap)
8290 (Fdefine_fringe_bitmap): Don't assume fixnum fits in int.
8291 (Ffringe_bitmaps_at_pos): Don't assume index fits in int.
8292 Check for fixnum out of range.
8293 * ftfont.c (ftfont_list): Don't assume index fits in int.
8294 Check that fixnums are in proper range for system types.
8295 (ftfont_shape_by_flt):
8296 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8297 * gnutls.c (emacs_gnutls_write, emacs_gnutls_read):
8298 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8299 (Fgnutls_error_fatalp, Fgnutls_error_string, Fgnutls_boot):
8300 Check that fixnums are in proper range for system types.
8301 * gnutls.h: Adjust decls to match defn changes elsewhere.
8302 * gtkutil.c (xg_dialog_run):
8303 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8304 (update_frame_tool_bar):
8305 Check that fixnums are in proper range for system types.
8306 * image.c (parse_image_spec): Redo count calculation to avoid overflow.
8307 (lookup_image): Check that fixnums are in range for system types.
8308 * indent.c (last_known_column, last_known_column_point):
8309 (current_column_bol_cache):
8310 (skip_invisible, current_column, check_display_width):
8311 (check_display_width, scan_for_column, current_column_1)
8312 (Findent_to, Fcurrent_indentation, position_indentation)
8313 (indented_beyond_p, Fmove_to_column, compute_motion):
8314 (Fcompute_motion, Fvertical_motion):
8315 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8316 (last_known_column_modified): Use EMACS_INT, not int.
8317 (check_display_width):
8318 (Fcompute_motion):
8319 Check that fixnums and floats are in proper range for system types.
8320 (compute_motion): Don't assume index or fixnum fits in int.
8321 (compute_motion, Fcompute_motion):
8322 Use int, not EMACS_INT, when it is wide enough.
8323 (vmotion): Omit local var start_hpos that is always 0; that way
8324 we don't need to worry about overflow in expressions involving it.
8325 * indent.h: Adjust decls to match defn changes elsewhere.
8326 (struct position):
8327 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8328 Use int, not EMACS_INT, where int is wide enough.
8329 Remove unused members ovstring_chars_done and tab_offset;
8330 all uses removed.
8331 * insdel.c (move_gap, move_gap_both, gap_left, gap_right)
8332 (adjust_markers_for_delete, adjust_markers_for_insert, adjust_point)
8333 (adjust_markers_for_replace, make_gap_larger, make_gap_smaller)
8334 (make_gap, copy_text, insert, insert_and_inherit)
8335 (insert_before_markers, insert_before_markers_and_inherit)
8336 (insert_1, count_combining_before, count_combining_after)
8337 (insert_1_both, insert_from_string)
8338 (insert_from_string_before_markers, insert_from_string_1)
8339 (insert_from_gap, insert_from_buffer, insert_from_buffer_1)
8340 (adjust_after_replace, adjust_after_insert, replace_range)
8341 (replace_range_2, del_range, del_range_1, del_range_byte)
8342 (del_range_both, del_range_2, modify_region)
8343 (prepare_to_modify_buffer, signal_before_change)
8344 (signal_after_change, Fcombine_after_change_execute):
8345 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8346 * intervals.c (traverse_intervals, rotate_right, rotate_left)
8347 (balance_an_interval, split_interval_right, split_interval_left)
8348 (find_interval, next_interval, update_interval)
8349 (adjust_intervals_for_insertion, delete_node, delete_interval)
8350 (interval_deletion_adjustment, adjust_intervals_for_deletion)
8351 (static_offset_intervals, offset_intervals)
8352 (merge_interval_right, merge_interval_left, make_new_interval)
8353 (graft_intervals_into_buffer, temp_set_point_both)
8354 (temp_set_point, set_point, adjust_for_invis_intang)
8355 (set_point_both, move_if_not_intangible, get_property_and_range)
8356 (get_local_map, copy_intervals, copy_intervals_to_string)
8357 (compare_string_intervals, set_intervals_multibyte_1):
8358 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8359 * intervals.h: Adjust decls to match defn changes elsewhere.
8360 (struct interval):
8361 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8362 * keyboard.c (this_command_key_count, this_single_command_key_start)
8363 (before_command_key_count, before_command_echo_length, echo_now)
8364 (echo_length, recursive_edit_1, Frecursive_edit, Ftrack_mouse)
8365 (command_loop_1, safe_run_hooks, read_char, timer_check_2)
8366 (menu_item_eval_property, read_key_sequence, Fread_key_sequence)
8367 (Fread_key_sequence_vector, Fexecute_extended_command, Fsuspend_emacs):
8368 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8369 (last_non_minibuf_size, last_point_position, echo_truncate)
8370 (command_loop_1, adjust_point_for_property, read_char, gen_help_event)
8371 (make_lispy_position, make_lispy_event, parse_modifiers_uncached)
8372 (parse_modifiers, modify_event_symbol, Fexecute_extended_command)
8373 (stuff_buffered_input):
8374 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8375 (last_auto_save, command_loop_1, read_char):
8376 Use EMACS_INT, not int, to avoid integer overflow.
8377 (record_char): Avoid overflow in total_keys computation.
8378 (parse_modifiers_uncached): Redo index calculation to avoid overflow.
8379 * keyboard.h: Adjust decls to match defn changes elsewhere.
8380 * keymap.c (Fdefine_key, Fcurrent_active_maps, accessible_keymaps_1)
8381 (Fkey_description, Fdescribe_vector, Flookup_key):
8382 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8383 (click_position): New function, to check that positions are in range.
8384 (Fcurrent_active_maps):
8385 (describe_command):
8386 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8387 (Faccessible_keymaps, Fkey_description):
8388 (preferred_sequence_p):
8389 Don't assume fixnum can fit into int.
8390 (Fkey_description): Use SAFE_ALLOCA_LISP, not alloca.
8391 Check for integer overflow in size calculations.
8392 (Ftext_char_description): Use CHECK_CHARACTER, not CHECK_NUMBER, to
8393 avoid mishandling large integers.
8394 * lisp.h: Adjust decls to match defn changes elsewhere.
8395 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, struct Lisp_String)
8396 (struct vectorlike_header, struct Lisp_Subr, struct Lisp_Hash_Table)
8397 (struct Lisp_Marker):
8398 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8399 (clip_to_bounds): Now an inline function, moved here from editfns.c.
8400 (GLYPH_CODE_P): Check for overflow in system types, subsuming the
8401 need for GLYPH_CODE_CHAR_VALID_P and doing proper checking ourselves.
8402 All callers changed.
8403 (GLYPH_CODE_CHAR, GLYPH_CODE_FACE):
8404 Assume the arg has valid form, since it always does.
8405 (TYPE_RANGED_INTEGERP): Avoid bug when checking against a wide
8406 unsigned integer system type.
8407 (CHECK_RANGED_INTEGER, CHECK_TYPE_RANGED_INTEGER): New macros.
8408 (struct catchtag, specpdl_size, SPECPDL_INDEX, USE_SAFE_ALLOCA):
8409 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8410 (struct catchtag): Use EMACS_INT, not int, since it may be a fixnum.
8411 (duration_to_sec_usec): New decl.
8412 * lread.c (read_from_string_index, read_from_string_index_byte)
8413 (read_from_string_limit, readchar, unreadchar, openp)
8414 (read_internal_start, read1, oblookup):
8415 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8416 (Fload, readevalloop, Feval_buffer, Feval_region):
8417 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8418 (openp): Check for out-of-range argument to 'access'.
8419 (read1): Use int, not EMACS_INT, where int is wide enough.
8420 Don't assume fixnum fits into int.
8421 Fix off-by-one error that can read outside a buffer.
8422 (read_filtered_event): Use duration_to_sec_usec
8423 to do proper overflow checking on durations.
8424 * macros.c (Fstart_kbd_macro): Use xpalloc to check for overflow
8425 in size calculation.
8426 (Fexecute_kbd_macro):
8427 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8428 * marker.c (cached_charpos, cached_bytepos, CONSIDER)
8429 (byte_char_debug_check, buf_charpos_to_bytepos, verify_bytepos)
8430 (buf_bytepos_to_charpos, Fset_marker, set_marker_restricted)
8431 (set_marker_both, set_marker_restricted_both, marker_position)
8432 (marker_byte_position, Fbuffer_has_markers_at):
8433 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8434 (Fset_marker, set_marker_restricted): Don't assume fixnum fits in int.
8435 * menu.c (ensure_menu_items): Rename from grow_menu_items.
8436 It now merely ensures that the menu is large enough, without
8437 necessarily growing it, as this avoids some integer overflow issues.
8438 All callers changed.
8439 (keymap_panes, parse_single_submenu, Fx_popup_menu):
8440 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8441 (parse_single_submenu, Fx_popup_menu): Don't assume fixnum fits in int.
8442 Use SAFE_ALLOCA_LISP, not alloca.
8443 (find_and_return_menu_selection): Avoid unnecessary casts of pointers
8444 to EMACS_INT. Check that fixnums are in proper range for system types.
8445 * minibuf.c (minibuf_prompt_width, string_to_object)
8446 (Fminibuffer_contents, Fminibuffer_contents_no_properties)
8447 (Fminibuffer_completion_contents, Ftry_completion, Fall_completions):
8448 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8449 (get_minibuffer, read_minibuf_unwind):
8450 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8451 (read_minibuf): Omit unnecessary arg BACKUP_N, which is always nil;
8452 this simplifies overflow checking. All callers changed.
8453 (read_minibuf, Fread_buffer, Ftry_completion, Fall_completions)
8454 (Ftest_completion):
8455 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8456 * nsfns.m (check_ns_display_info): Don't assume fixnum fits in long.
8457 (x_set_menu_bar_lines, x_set_tool_bar_lines, Fx_create_frame):
8458 Check that fixnums are in proper range for system types.
8459 (Fx_create_frame, Fx_show_tip):
8460 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8461 * nsfont.m (ns_findfonts, nsfont_list_family):
8462 Don't assume fixnum fits in long.
8463 * nsmenu.m (ns_update_menubar, ns_menu_show, ns_popup_dialog):
8464 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8465 (ns_update_menubar): Use intptr_t, not EMACS_INT, when intptr_t is
8466 wide enough.
8467 * nsselect.m (ns_get_local_selection, clean_local_selection_data):
8468 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8469 * print.c (print_buffer_size, print_buffer_pos, print_buffer_pos_byte)
8470 (PRINTDECLARE, PRINTPREPARE):
8471 (strout, print_string):
8472 (print, print_preprocess, print_check_string_charset_prop)
8473 (print_object):
8474 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8475 (PRINTDECLARE):
8476 (temp_output_buffer_setup, Fprin1_to_string, print_object):
8477 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8478 (PRINTPREPARE): Use int, not ptrdiff_t, where int is wide enough.
8479 (printchar, strout): Use xpalloc to catch size calculation overflow.
8480 (Fexternal_debugging_output): Don't overflow EMACS_INT->int conversion.
8481 (print_error_message): Use SAFE_ALLOCA, not alloca.
8482 (print_object): Use int, not EMACS_INT, where int is wide enough.
8483 (print_depth, new_backquote_output, print_number_index):
8484 Use ptrdiff_t, not int, where int might not be wide enough.
8485 * process.c (Fdelete_process): Don't assume pid fits into EMACS_INT.
8486 (Fset_process_window_size, Fformat_network_address)
8487 (get_lisp_to_sockaddr_size, set_socket_option, Fmake_network_process)
8488 (sigchld_handler):
8489 Check that fixnums are in proper range for system types.
8490 (Fsignal_process): Simplify by avoiding a goto.
8491 Check for process-ids out of pid_t range rather than relying on
8492 undefined behavior.
8493 (process_tick, update_tick): Use EMACS_INT, not int.
8494 (Fformat_network_address, read_process_output, send_process)
8495 (Fprocess_send_region, status_notify):
8496 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8497 (Fformat_network_address, Fmake_serial_process, Fmake_network_process)
8498 (wait_reading_process_output, read_process_output, exec_sentinel):
8499 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8500 (conv_lisp_to_sockaddr): Don't assume fixnums fit into int.
8501 (Faccept_process_output): Use duration_to_sec_usec to do proper
8502 overflow checking on durations.
8503 (emacs_get_tty_pgrp, Fprocess_running_child_p, process_send_signal):
8504 Don't assume pid_t fits in int.
8505 * process.h (struct Lisp_Process): Members tick and update_tick
8506 are now of type EMACS_INT, not int.
8507 * puresize.h (PURESIZE_RATIO): Shrink this to 8/6 on 32-bit hosts
8508 configured --with-wide-int.
8509 * scroll.c (calculate_scrolling, calculate_direct_scrolling)
8510 (line_ins_del): Use int, not EMACS_INT, where int is wide enough.
8511 * search.c (looking_at_1, string_match_1):
8512 (fast_string_match, fast_c_string_match_ignore_case)
8513 (fast_string_match_ignore_case, fast_looking_at, scan_buffer)
8514 (scan_newline, find_before_next_newline, search_command)
8515 (trivial_regexp_p, search_buffer, simple_search, boyer_moore)
8516 (set_search_regs, wordify):
8517 (Freplace_match):
8518 (Fmatch_data):
8519 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8520 (string_match_1, search_buffer, set_search_regs):
8521 (Fmatch_data):
8522 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8523 (wordify): Check for overflow in size calculation.
8524 (Freplace_match): Avoid potential buffer overflow in search_regs.start.
8525 (Fset_match_data): Don't assume fixnum fits in ptrdiff_t.
8526 Check that fixnums are in proper range for system types.
8527 * sound.c (struct sound_device)
8528 (wav_play, au_play, vox_write, alsa_period_size, alsa_write):
8529 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8530 (Fplay_sound_internal):
8531 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8532 * syntax.c (struct lisp_parse_state, find_start_modiff)
8533 (Finternal_describe_syntax_value, scan_lists, scan_sexps_forward):
8534 (Fparse_partial_sexp):
8535 Don't assume fixnums can fit in int.
8536 (struct lisp_parse_state, find_start_pos, find_start_value)
8537 (find_start_value_byte, find_start_begv)
8538 (update_syntax_table, char_quoted, dec_bytepos)
8539 (find_defun_start, prev_char_comend_first, back_comment):
8540 (scan_words, skip_chars, skip_syntaxes, forw_comment, Fforward_comment)
8541 (scan_lists, Fbackward_prefix_chars, scan_sexps_forward):
8542 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8543 (Finternal_describe_syntax_value): Check that match_lisp is a
8544 character, not an integer, since the code stuffs it into int.
8545 (scan_words, scan_sexps_forward):
8546 Check that fixnums are in proper range for system types.
8547 (Fforward_word):
8548 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8549 (scan_sexps_forward):
8550 Use CHARACTERP, not INTEGERP, since the value must fit into int.
8551 (Fparse_partial_sexp): Fix doc; element 8 is not ignored.
8552 * syntax.h: Adjust decls to match defn changes elsewhere.
8553 (struct gl_state_s):
8554 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8555 (SETUP_SYNTAX_TABLE_FOR_OBJECT): Use PTRDIFF_MAX, not
8556 MOST_POSITIVE_FIXNUM.
8557 * sysdep.c (wait_for_termination_1, wait_for_termination)
8558 (interruptible_wait_for_termination, mkdir):
8559 Don't assume pid_t fits in int; on 64-bit AIX pid_t is 64-bit.
8560 (emacs_read, emacs_write):
8561 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8562 (system_process_attributes): Don't assume uid_t, gid_t, EMACS_INT,
8563 and double all fit in int.
8564 * term.c (set_tty_color_mode):
8565 Check that fixnums are in proper range for system types.
8566 * termhooks.h (struct input_event):
8567 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8568 * textprop.c (validate_interval_range, interval_of)
8569 (Fadd_text_properties, set_text_properties_1)
8570 (Fremove_text_properties, Fremove_list_of_text_properties)
8571 (Ftext_property_any, Ftext_property_not_all)
8572 (copy_text_properties, text_property_list, extend_property_ranges)
8573 (verify_interval_modification):
8574 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8575 (Fnext_single_char_property_change)
8576 (Fprevious_single_char_property_change):
8577 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8578 (copy_text_properties):
8579 Check for integer overflow in index calculation.
8580 * undo.c (last_boundary_position, record_point, record_insert)
8581 (record_delete, record_marker_adjustment, record_change)
8582 (record_property_change):
8583 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8584 (truncate_undo_list, Fprimitive_undo): Don't assume fixnum fits in int.
8585 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8586 * w32fns.c (Fx_create_frame, x_create_tip_frame, Fx_show_tip)
8587 (Fx_hide_tip, Fx_file_dialog):
8588 * w32menu.c (set_frame_menubar):
8589 Use ptrdiff_t, not int, for consistency with rest of code.
8590 * window.c (window_scroll_preserve_hpos, window_scroll_preserve_vpos)
8591 (select_window, Fdelete_other_windows_internal)
8592 (window_scroll_pixel_based, window_scroll_line_based)
8593 (Frecenter, Fset_window_configuration):
8594 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8595 (Fset_window_hscroll, run_window_configuration_change_hook)
8596 (set_window_buffer, temp_output_buffer_show, scroll_command)
8597 (Fscroll_other_window, Frecenter):
8598 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8599 (Fwindow_line_height, window_scroll, Fscroll_left, Fscroll_right):
8600 Don't assume fixnum fits in int.
8601 (Fset_window_scroll_bars):
8602 Check that fixnums are in proper range for system types.
8603 * xdisp.c (help_echo_pos, pos_visible_p, string_pos_nchars_ahead)
8604 (string_pos, c_string_pos, number_of_chars, init_iterator)
8605 (in_ellipses_for_invisible_text_p, init_from_display_pos)
8606 (compute_stop_pos, next_overlay_change, compute_display_string_pos)
8607 (compute_display_string_end, handle_face_prop)
8608 (face_before_or_after_it_pos, handle_invisible_prop)
8609 (handle_display_prop, handle_display_spec, handle_single_display_spec)
8610 (display_prop_intangible_p, string_buffer_position_lim)
8611 (string_buffer_position, handle_composition_prop, load_overlay_strings)
8612 (get_overlay_strings_1, get_overlay_strings)
8613 (iterate_out_of_display_property, forward_to_next_line_start)
8614 (back_to_previous_visible_line_start, reseat, reseat_to_string)
8615 (get_next_display_element, set_iterator_to_next)
8616 (get_visually_first_element, compute_stop_pos_backwards)
8617 (handle_stop_backwards, next_element_from_buffer)
8618 (move_it_in_display_line_to, move_it_in_display_line)
8619 (move_it_to, move_it_vertically_backward, move_it_by_lines)
8620 (add_to_log, message_dolog, message_log_check_duplicate)
8621 (message2, message2_nolog, message3, message3_nolog
8622 (with_echo_area_buffer, display_echo_area_1, resize_mini_window_1)
8623 (current_message_1, truncate_echo_area, truncate_message_1)
8624 (set_message, set_message_1, store_mode_line_noprop)
8625 (hscroll_window_tree, debug_delta, debug_delta_bytes, debug_end_vpos)
8626 (text_outside_line_unchanged_p, check_point_in_composition)
8627 (reconsider_clip_changes)
8628 (redisplay_internal, set_cursor_from_row, try_scrolling)
8629 (try_cursor_movement, set_vertical_scroll_bar, redisplay_window)
8630 (redisplay_window, find_last_unchanged_at_beg_row)
8631 (find_first_unchanged_at_end_row, row_containing_pos, try_window_id)
8632 (trailing_whitespace_p, find_row_edges, display_line)
8633 (RECORD_MAX_MIN_POS, Fcurrent_bidi_paragraph_direction)
8634 (display_mode_element, store_mode_line_string)
8635 (pint2str, pint2hrstr, decode_mode_spec)
8636 (display_count_lines, display_string, draw_glyphs)
8637 (x_produce_glyphs, x_insert_glyphs)
8638 (rows_from_pos_range, mouse_face_from_buffer_pos)
8639 (fast_find_string_pos, mouse_face_from_string_pos)
8640 (note_mode_line_or_margin_highlight, note_mouse_highlight):
8641 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8642 (safe_call, init_from_display_pos, handle_fontified_prop)
8643 (handle_single_display_spec, load_overlay_strings)
8644 (with_echo_area_buffer, setup_echo_area_for_printing)
8645 (display_echo_area, echo_area_display)
8646 (x_consider_frame_title, prepare_menu_bars, update_menu_bar)
8647 (update_tool_bar, hscroll_window_tree, redisplay_internal)
8648 (redisplay_window, dump_glyph_row, display_mode_line)
8649 (Fformat_mode_line, decode_mode_spec, on_hot_spot_p):
8650 (handle_display_spec, display_prop_string_p):
8651 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8652 (handle_single_display_spec, build_desired_tool_bar_string)
8653 (redisplay_tool_bar, scroll_window_tree, Fdump_glyph_matrix)
8654 (get_specified_cursor_type):
8655 Check that fixnums are in proper range for system types.
8656 (struct overlay_entry, resize_mini_window, Fdump_glyph_row)
8657 (Flookup_image_map):
8658 Don't assume fixnums fit in int.
8659 (compare_overlay_entries):
8660 Avoid mishandling comparisons due to subtraction overflow.
8661 (load_overlay_strings): Use SAFE_NALLOCA, not alloca.
8662 (last_escape_glyph_face_id, last_glyphless_glyph_face_id):
8663 (handle_tool_bar_click):
8664 Use int, not unsigned, since we prefer signed and the signedness
8665 doesn't matter here.
8666 (get_next_display_element, next_element_from_display_vector):
8667 Use int, not EMACS_INT, when int is wide enough.
8668 (start_hourglass): Use duration_to_sec_usec to do proper
8669 overflow checking on durations.
8670 * xfaces.c (Fbitmap_spec_p):
8671 Check that fixnums are in proper range for system types.
8672 (compare_fonts_by_sort_order):
8673 Avoid mishandling comparisons due to subtraction overflow.
8674 (Fx_family_fonts, realize_basic_faces):
8675 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8676 (Fx_family_fonts):
8677 Don't assume fixnum fits in int.
8678 Use SAFE_ALLOCA_LISP, not alloca.
8679 (merge_face_heights): Remove unnecessary cast to EMACS_INT.
8680 (Finternal_make_lisp_face): Don't allocate more than MAX_FACE_ID.
8681 (face_at_buffer_position, face_for_overlay_string)
8682 (face_at_string_position):
8683 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8684 (merge_faces): Use int, not EMACS_INT, where int is wide enough.
8685 * xfns.c (x_set_menu_bar_lines, x_set_tool_bar_lines, x_icon_verify)
8686 (Fx_show_tip):
8687 Check that fixnums are in proper range for system types.
8688 (Fx_create_frame, x_create_tip_frame, Fx_show_tip)
8689 (Fx_hide_tip, Fx_file_dialog, Fx_select_font):
8690 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8691 (Fx_change_window_property): Don't assume fixnums fit in int.
8692 * xfont.c (xfont_chars_supported):
8693 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8694 * xmenu.c (Fx_popup_dialog, set_frame_menubar)
8695 (create_and_show_popup_menu, create_and_show_dialog, xmenu_show):
8696 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8697 * xml.c (parse_region):
8698 * xrdb.c (magic_file_p):
8699 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8700 * xselect.c (TRACE1): Don't assume pid_t promotes to int.
8701 (x_get_local_selection, x_reply_selection_request)
8702 (x_handle_selection_request, wait_for_property_change):
8703 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8704 (selection_data_to_lisp_data): Use short, not EMACS_INT, where
8705 short is wide enough.
8706 (x_send_client_event): Don't assume fixnum fits in int.
8707 * xterm.c (x_x_to_emacs_modifiers):
8708 Don't assume EMACS_INT overflows nicely into int.
8709 (x_emacs_to_x_modifiers): Use EMACS_INT, not int, because values
8710 may come from Lisp.
8711 (handle_one_xevent): NATNUMP can eval its arg twice.
8712 (x_connection_closed):
8713 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8714 * xterm.h: Adjust decls to match defn changes elsewhere.
8715 (struct scroll_bar): Use struct vectorlike_header
8716 rather than rolling our own approximation.
8717 (SCROLL_BAR_VEC_SIZE): Remove; not used.
8718
8719 2012-05-25 Glenn Morris <rgm@gnu.org>
8720
8721 * lisp.mk (lisp): Update for more files being compiled now.
8722
8723 2012-05-25 Stefan Monnier <monnier@iro.umontreal.ca>
8724
8725 * lread.c: Remove `read_pure' which makes no difference.
8726 (read_pure): Remove var.
8727 (unreadpure): Remove function.
8728 (readevalloop): Don't call read_list with -1 flag.
8729 (read1, read_vector): Don't test read_pure any more.
8730 (read_list): Simplify.
8731
8732 * fileio.c, character.h: Minor style tweaks.
8733
8734 2012-05-24 Dmitry Antipov <dmantipov@yandex.ru>
8735
8736 * window.h (clip_changed): Remove useless declaration.
8737
8738 2012-05-22 Juanma Barranquero <lekktu@gmail.com>
8739
8740 * makefile.w32-in: Follow-up to 2012-05-22T16:20:27Z!eggert@cs.ucla.edu.
8741 (TAGS, TAGS-gmake, CONFIG_H): Remove further references to m/intel386.h.
8742
8743 2012-05-22 Paul Eggert <eggert@cs.ucla.edu>
8744
8745 Remove src/m/*.
8746 This directory predates autoconf and is no longer needed nowadays.
8747 Move its few remaining bits of functionality to where they're needed.
8748 * m/README, m/alpha.h, m/amdx86-64.h, m/ia64.h, m/ibmrs6000.h:
8749 * m/ibms390x.h, m/intel386.h, m/m68k.h, m/macppc.h, m/sparc.h:
8750 * m/template.h: Remove.
8751 * Makefile.in (M_FILE): Remove. All uses removed.
8752 * alloc.c (POINTERS_MIGHT_HIDE_IN_OBJECTS):
8753 * lisp.h (USE_LSB_TAG):
8754 * mem-limits.h (EXCEEDS_LISP_PTR):
8755 Use VAL_MAX, not VALBITS, in #if.
8756 * lisp.h (EMACS_INT_MAX): New macro, useful in #if.
8757 (EMACS_UINT): Define unconditionally now.
8758 (BITS_PER_CHAR, BITS_PER_SHORT, BITS_PER_INT, BITS_PER_LONG)
8759 (BITS_PER_EMACS_INT): New constants, replacing
8760 what used to be in config.h, but not useful in #if.
8761 (GCTYPEBITS, VALBITS): Define unconditionally, since m/* files don't
8762 define them any more.
8763 (VAL_MAX): New macro.
8764 (VALMASK): Use it.
8765 * puresize.h (PURESIZE_RATIO): Use EMACS_INT_MAX, not
8766 BITS_PER_EMACS_INT, in #if.
8767 * s/aix4-2.h (BROKEN_FIONREAD, BROKEN_SIGAIO, BROKEN_SIGPTY)
8768 (BROKEN_SIGPOLL): Move here from m/ibmrs6000.h, which was removed.
8769 * s/gnu-linux.h (ULIMIT_BREAK_VALUE) [__i386__]:
8770 * s/ms-w32.h (DATA_START):
8771 Move here from removed file m/intel386.h.
8772 * s/gnu.h (NLIST_STRUCT): Remove undef; 'configure' does this.
8773 * s/irix6-5.h (_LP64): Remove; lisp.h no longer needs this.
8774
8775 2012-05-21 Paul Eggert <eggert@cs.ucla.edu>
8776
8777 Assume C89 or later.
8778 * alloc.c, buffer.c, lisp.h: Replace POINTER_TYPE with void.
8779 * alloc.c (overrun_check_malloc, overrun_check_realloc, xmalloc)
8780 (xrealloc):
8781 * buffer.c (mmap_free_1, mmap_enlarge): Omit needless casts.
8782 * editfns.c, fns.c, gmalloc.c, insdel.c, sysdep.c, termcap.c (NULL):
8783 * textprop.c, tparam.c (NULL): Remove.
8784 * ralloc.c, vm-limit.c (POINTER): Assume void * works.
8785 * regex.c (SIGN_EXTEND_CHAR): Assume signed char works.
8786 * regex.h (_RE_ARGS): Remove. All uses rewritten to use prototypes.
8787 * unexelf.c (ElfBitsW): Assume c89 preprocessor or better.
8788 * xterm.c (input_signal_count): Assume volatile works.
8789
8790 2012-05-21 Ken Brown <kbrown@cornell.edu>
8791
8792 * xgselect.c (xg_select): Fix first argument in call to 'select'
8793 (bug#11508).
8794
8795 2012-05-20 Ken Brown <kbrown@cornell.edu>
8796
8797 * gmalloc.c (_free_internal_nolock, _realloc_internal_nolock)
8798 [CYGWIN]: Cast ptr to (char *) before comparing to _heapbase.
8799
8800 2012-05-19 Ken Brown <kbrown@cornell.edu>
8801
8802 * xfns.c (x_in_use): Remove `static' qualifier.
8803 * xterm.h (x_in_use): Declare.
8804 * xgselect.c: Include xterm.h.
8805 (xg_select): Test `x_in_use' instead of `inhibit_window_system'
8806 and `display_arg' (bug#9754).
8807
8808 2012-05-19 Paul Eggert <eggert@cs.ucla.edu>
8809
8810 * s/ms-w32.h (HAVE_GETDOMAINNAME): Remove; not needed.
8811
8812 * m/vax.h: Remove; no longer needed since HAVE_FTIME is being removed.
8813 * s/ms-w32.h (HAVE_FTIME): Remove; not needed.
8814
8815 2012-05-18 Eli Zaretskii <eliz@gnu.org>
8816
8817 Fix compilation with -DGLYPH_DEBUG=1 on MS-Windows.
8818
8819 * w32term.c [GLYPH_DEBUG]: Add prototype for x_check_font.
8820 (x_check_font) [GLYPH_DEBUG]: New function, copied from xterm.c.
8821
8822 * w32fns.c (unwind_create_frame) [GLYPH_DEBUG]: Fix broken
8823 reference to image_cache->refcount.
8824 (x_create_tip_frame): Fix broken use of FRAME_IMAGE_CACHE.
8825
8826 2012-05-17 Juri Linkov <juri@jurta.org>
8827
8828 * search.c (Fword_search_regexp, Fword_search_backward)
8829 (Fword_search_forward, Fword_search_backward_lax)
8830 (Fword_search_forward_lax): Move functions to isearch.el
8831 (bug#10145, bug#11381).
8832
8833 2012-05-16 Paul Eggert <eggert@cs.ucla.edu>
8834
8835 * xgselect.c (xg_select): Just invoke 'select' if -nw (Bug#9754).
8836
8837 2012-05-15 Stefan Monnier <monnier@iro.umontreal.ca>
8838
8839 * lread.c (init_obarray): Declare Qt and Qnil as special.
8840
8841 2012-05-14 Glenn Morris <rgm@gnu.org>
8842
8843 * nsterm.m (ns_init_paths): Fix typo ("libexec" not "lib-exec").
8844 Put "libexec" before "bin", for the sake of init_callproc_1.
8845
8846 2012-05-14 Paul Eggert <eggert@cs.ucla.edu>
8847
8848 * keyboard.c (kbd_buffer_get_event) [!HAVE_DBUS]: Omit unused local.
8849
8850 * unexaix.c: Port to more-recent AIX compilers.
8851 (report_error, report_error_1, make_hdr, copy_sym)
8852 (mark_x, adjust_lnnoptrs, unrelocate_symbols):
8853 Make arguments const char *, not char *, to avoid violations of C
8854 standard and to fix some AIX warnings reported by Gilles Pion.
8855
8856 2012-05-14 Eli Zaretskii <eliz@gnu.org>
8857
8858 * xdisp.c (handle_stop): Don't call get_overlay_strings_1 if we
8859 already have overlays loaded.
8860 (handle_single_display_spec): Before returning without displaying
8861 fringe bitmap, synchronize the bidi iterator with the main display
8862 iterator, by calling iterate_out_of_display_property.
8863 (iterate_out_of_display_property): Detect buffer iteration by
8864 testing that it->string is a Lisp string.
8865 (get_next_display_element): When the current object is exhausted,
8866 and there's something on it->stack, call set_iterator_to_next to
8867 proceed with what's on the stack, instead of returning zero.
8868 (set_iterator_to_next): If called at the end of a Lisp string,
8869 proceed to consider_string_end without incrementing string
8870 position. Don't increment display vector index past the end of
8871 the display vector. (Bug#11417)
8872 (pos_visible_p): Don't report a position visible when move_it_to
8873 stopped at the last line of window, which happens to be scanned
8874 backwards by the bidi iteration. (Bug#11464)
8875
8876 2012-05-14 Eli Zaretskii <eliz@gnu.org>
8877
8878 * xdisp.c (handle_single_display_spec): Return 1 for left-margin
8879 and right-margin display specs even if the spec is invalid or we
8880 are on a TTY, and thus unable to display on the fringes.
8881 That's because the text with the property will not be displayed anyway,
8882 so we need to signal to the caller that this is a "replacing"
8883 display spec. This fixes display when the spec is invalid or we
8884 are on a TTY.
8885
8886 2012-05-14 Paul Eggert <eggert@cs.ucla.edu>
8887
8888 * unexaix.c (make_hdr): Fix typo in prototype.
8889 This bug broke the build on AIX. Problem reported by Gilles Pion.
8890
8891 2012-05-14 Michael Albinus <michael.albinus@gmx.de>
8892
8893 * keyboard.c (kbd_buffer_get_event): Read special events also in
8894 batch mode. (Bug#11415)
8895
8896 2012-05-12 Glenn Morris <rgm@gnu.org>
8897
8898 * ns.mk: Update for ns_appbindir no longer having trailing "/".
8899
8900 2012-05-12 Eli Zaretskii <eliz@gnu.org>
8901
8902 * lisp.mk (lisp): Add newcomment.elc.
8903
8904 2012-05-12 Glenn Morris <rgm@gnu.org>
8905
8906 * Makefile.in (MKDIR_P): New, set by configure.
8907 * ns.mk (${ns_appdir}, ${ns_appbindir}Emacs): Use $MKDIR_P.
8908
8909 2012-05-11 Paul Eggert <eggert@cs.ucla.edu>
8910
8911 Remove unused function hourglass_started.
8912 * dispextern.h (hourglass_started):
8913 * w32fns.c (hourglass_started):
8914 * xdisp.c (hourglass_started): Remove.
8915
8916 2012-05-10 Juanma Barranquero <lekktu@gmail.com>
8917
8918 * makefile.w32-in ($(BLD)/gmalloc.$(O), $(BLD)/w32menu.$(O)):
8919 Update dependencies.
8920
8921 2012-05-10 Paul Eggert <eggert@cs.ucla.edu>
8922
8923 * xgselect.c (xg_select): Put maxfds+1 into a var.
8924 This is slightly clearer, and pacifies Ubuntu 12.04 gcc.
8925
8926 * sound.c (DEFAULT_ALSA_SOUND_DEVICE): Define only if HAVE_ALSA.
8927
8928 2012-05-10 Dave Abrahams <dave@boostpro.com>
8929
8930 * filelock.c (syms_of_filelock): New boolean create-lockfiles.
8931 (lock_file): If create_lockfiles is 0, do nothing. (Bug#11227)
8932
8933 2012-05-09 Michael Albinus <michael.albinus@gmx.de>
8934
8935 * dbusbind.c (xd_registered_buses): New internal Lisp object.
8936 Rename all occurences of Vdbus_registered_buses to xd_registered_buses.
8937 (syms_of_dbusbind): Remove declaration of Vdbus_registered_buses.
8938 Initialize xd_registered_buses.
8939
8940 2012-05-09 Paul Eggert <eggert@cs.ucla.edu>
8941
8942 Untag more efficiently if USE_LSB_TAG.
8943 This is based on a proposal by YAMAMOTO Mitsuharu in
8944 <http://lists.gnu.org/archive/html/emacs-devel/2008-01/msg01876.html>.
8945 For an admittedly artificial (nth 8000 longlist) benchmark on
8946 Fedora 15 x86-64, this yields a 25% CPU speedup. Also, it shrinks
8947 Emacs's overall text size by 1%.
8948 * lisp.h (XUNTAG): New macro.
8949 (XCONS, XVECTOR, XSTRING, XSYMBOL, XFLOAT, XMISC, XPROCESS, XWINDOW)
8950 (XTERMINAL, XSUBR, XBUFFER, XCHAR_TABLE, XSUB_CHAR_TABLE, XBOOL_VECTOR)
8951 (XSETTYPED_PSEUDOVECTOR, XHASH_TABLE, TYPED_PSEUDOVECTORP): Use it.
8952 * eval.c (Fautoload):
8953 * font.h (XFONT_SPEC, XFONT_ENTITY, XFONT_OBJECT):
8954 * frame.h (XFRAME): Use XUNTAG.
8955
8956 Port recent dbusbind.c changes to 32-bit --with-wide-int.
8957 * dbusbind.c (xd_append_arg, xd_retrieve_arg, Fdbus_message_internal):
8958 Remove unportable assumptions about print widths of types like
8959 dbus_uint32_t.
8960 (xd_get_connection_address, Fdbus_init_bus): Cast Emacs integer to
8961 intptr_t when converting between pointer and integer, to avoid GCC
8962 warnings about wrong width.
8963
8964 2012-05-09 Eli Zaretskii <eliz@gnu.org>
8965
8966 * w32proc.c (new_child): Force Windows to reserve only 64KB of
8967 stack for each reader_thread, instead of defaulting to 8MB
8968 determined by the linker. This avoids failures in creating
8969 subprocesses on Windows 7, see the discussion in this thread:
8970 http://lists.gnu.org/archive/html/emacs-devel/2012-03/msg00119.html.
8971
8972 2012-05-07 Jérémy Compostella <jeremy.compostella@gmail.com>
8973
8974 Fix up display of the *Minibuf-0* buffer in the mini window.
8975 * keyboard.c (read_char): Don't clear the echo area if there's no
8976 message to clear.
8977 * xdisp.c (redisplay_internal): Redisplay the mini window (with the
8978 contents of *Minibuf-0*) if there's no message displayed in its stead.
8979
8980 2012-05-07 Michael Albinus <michael.albinus@gmx.de>
8981
8982 * dbusbind.c (XD_DEBUG_MESSAGE): Don't print message twice in
8983 batch mode.
8984
8985 2012-05-06 Chong Yidong <cyd@gnu.org>
8986
8987 * lisp.mk (lisp): Update.
8988
8989 2012-05-05 Jim Meyering <meyering@redhat.com>
8990
8991 * w32font.c (fill_in_logfont): NUL-terminate a string (Bug#11372).
8992
8993 2012-05-04 Stefan Monnier <monnier@iro.umontreal.ca>
8994
8995 * data.c (PUT_ERROR): New macro.
8996 (syms_of_data): Use it. Add new error type `user-error'.
8997 * undo.c (user_error): New function.
8998 (Fprimitive_undo): Use it.
8999 * print.c (print_error_message): Adjust print style for `user-error'.
9000 * keyboard.c (user_error): New function.
9001 (Fexit_recursive_edit, Fabort_recursive_edit): Use it.
9002
9003 2012-05-03 Paul Eggert <eggert@cs.ucla.edu>
9004
9005 Do not limit current-time-string to years 1000..9999.
9006 * editfns.c (TM_YEAR_IN_ASCTIME_RANGE): Remove.
9007 (Fcurrent_time_string): Support any year that is supported by the
9008 underlying localtime representation. Don't use asctime, as it
9009 has undefined behavior for years outside the range -999..9999.
9010
9011 2012-05-02 Paul Eggert <eggert@cs.ucla.edu>
9012
9013 Fix race conditions involving setenv, gmtime, localtime, asctime.
9014 Without this fix, interrupts could mess up code that uses these
9015 nonreentrant functions, since setting TZ invalidates existing
9016 tm_zone or tzname values, and since most of these functions return
9017 pointers to static storage.
9018 * editfns.c (format_time_string, Fdecode_time, Fencode_time)
9019 (Fcurrent_time_string, Fcurrent_time_zone, Fset_time_zone_rule):
9020 Grow the critical sections to include not just invoking
9021 localtime/gmtime, but also accessing these functions' results
9022 including their tm_zone values if any, and any related TZ setting.
9023 (format_time_string): Last arg is now struct tm *, not struct tm **,
9024 so that the struct tm is saved in the critical section.
9025 All callers changed. Simplify allocation of initial buffer, partly
9026 motivated by the fact that memory allocation needs to be outside
9027 the critical section.
9028
9029 2012-05-02 Dmitry Antipov <dmantipov@yandex.ru>
9030
9031 * intervals.c (adjust_intervals_for_insertion): Initialize `newi'
9032 with RESET_INTERVAL.
9033
9034 * buffer.c (Fget_buffer_create, Fmake_indirect_buffer):
9035 Remove duplicated buffer name initialization.
9036
9037 2012-05-02 Jim Meyering <jim@meyering.net>
9038
9039 * xterm.c (x_term_init): Use memcpy instead of strncpy (Bug#11373).
9040
9041 * xfns.c (x_window): Use xstrdup (Bug#11375).
9042
9043 2012-05-02 Eli Zaretskii <eliz@gnu.org>
9044
9045 * xdisp.c (pos_visible_p): If already at a newline from the
9046 display string before the 'while' loop, don't walk back the glyphs
9047 from it3.glyph_row. Solves assertion violation when the display
9048 string begins with a newline (egg.el). (Bug#11367)
9049
9050 2012-05-01 Stefan Monnier <monnier@iro.umontreal.ca>
9051
9052 * keyboard.c (Fexecute_extended_command, Vsuggest_key_bindings):
9053 Move to simple.el.
9054
9055 2012-05-01 Glenn Morris <rgm@gnu.org>
9056
9057 * syssignal.h: Remove reference to BROKEN_SIGINFO (last used in
9058 s/ptx4.h), BROKEN_SIGTSTP (last used in m/ustation.h, m/dpx2.h),
9059 and BROKEN_SIGURG (was in s/gnu-linux.h prior to 2008-02-10).
9060 All were removed before 23.1.
9061
9062 * dispnew.c: Remove HAVE_LIBNCURSES test;
9063 it is always true on relevant platforms.
9064
9065 * Makefile.in (LD_SWITCH_X_SITE_RPATH):
9066 Rename from LD_SWITCH_X_SITE_AUX_RPATH.
9067
9068 * Makefile.in (LD_SWITCH_X_SITE_AUX): Remove; no longer used.
9069
9070 2012-04-30 Andreas Schwab <schwab@linux-m68k.org>
9071
9072 * .gdbinit (xpr): Remove checks for no longer existing misc types.
9073 (xintfwd, xboolfwd, xobjfwd, xbufobjfwd, xkbobjfwd, xbuflocal):
9074 Remove.
9075
9076 2012-04-28 Paul Eggert <eggert@cs.ucla.edu>
9077
9078 Do not avoid creating empty evaporating overlays (Bug#9642).
9079 * buffer.c (Fmove_overlay): Revert the change of 2012-04-23.
9080 That is, do not delete an evaporating overlay if it becomes
9081 empty after its bounds are adjusted to fit within its buffer.
9082 This fix caused other problems, and I'm reverting it until we get
9083 to the bottom of them.
9084
9085 2012-04-27 Chong Yidong <cyd@gnu.org>
9086
9087 * xselect.c (x_convert_selection): Initialize a pointer (Bug#11315).
9088
9089 2012-04-27 Eli Zaretskii <eliz@gnu.org>
9090
9091 * xdisp.c (pos_visible_p): If the window start position is beyond
9092 ZV, start the display from buffer beginning. Prevents assertion
9093 violation in init_iterator when the minibuffer window is scrolled
9094 via the scroll bar.
9095
9096 * window.c (window_scroll_pixel_based): Likewise.
9097
9098 2012-04-27 Chong Yidong <cyd@gnu.org>
9099
9100 * keymap.c (where_is_internal): Doc fix (Bug#10872).
9101
9102 2012-04-27 Glenn Morris <rgm@gnu.org>
9103
9104 * fileio.c (Fcopy_file, Fset_file_selinux_context):
9105 Ignore ENOTSUP failures from setfilecon functions. (Bug#11245)
9106
9107 2012-04-27 Eli Zaretskii <eliz@gnu.org>
9108
9109 * dispnew.c (swap_glyph_pointers, copy_row_except_pointers):
9110 Don't overrun array limits of glyph row's used[] array. (Bug#11288)
9111
9112 2012-04-26 Eli Zaretskii <eliz@gnu.org>
9113
9114 * xdisp.c (IT_DISPLAYING_WHITESPACE): In addition to the loaded
9115 display element, check also the underlying string or buffer
9116 character. (Bug#11341)
9117
9118 * w32menu.c: Include w32heap.h.
9119 (add_menu_item): If the call to AppendMenuW (via
9120 unicode_append_menu) fails, disable Unicode menus only if we are
9121 running on Windows 9X/Me.
9122
9123 2012-04-24 Andreas Schwab <schwab@linux-m68k.org>
9124
9125 * .gdbinit (xpr): Handle USE_2_TAGS_FOR_INTS.
9126 (xgetint): Add missing shift for LSB tags.
9127
9128 2012-04-24 Martin Rudalics <rudalics@gmx.at>
9129
9130 * keyboard.c (read_char): Don't wipe echo area for select window
9131 events: These might get delayed via `mouse-autoselect-window'
9132 (Bug#11304).
9133
9134 2012-04-24 Juanma Barranquero <lekktu@gmail.com>
9135
9136 * gnutls.c (init_gnutls_functions): Protect against (unlikely)
9137 manipulation of :loaded-from data.
9138
9139 2012-04-23 Juanma Barranquero <lekktu@gmail.com>
9140
9141 * gnutls.c (init_gnutls_functions): The value of :loaded-from is
9142 now a cons (bug#11311).
9143
9144 2012-04-23 Paul Eggert <eggert@cs.ucla.edu>
9145
9146 Do not create empty overlays with the evaporate property (Bug#9642).
9147 * buffer.c (Fmove_overlay): Delete an evaporating overlay
9148 if it becomes empty after its bounds are adjusted to fit within
9149 its buffer. Without this fix, in a nonempty buffer (let ((o
9150 (make-overlay 1 2))) (overlay-put o 'evaporate t) (move-overlay o 0 1))
9151 yields an empty overlay that has the evaporate property, which is
9152 not supposed to happen.
9153
9154 Fix minor GTK3 problems found by static checking.
9155 * emacsgtkfixed.c (EMACS_TYPE_FIXED, EMACS_FIXED, EmacsFixed)
9156 (EmacsFixedPrivate, EmacsFixedClass, struct _EmacsFixed)
9157 (struct _EmacsFixedClass, emacs_fixed_get_type):
9158 Move decls here from emacsgtkfixed.h, since they needn't be public.
9159 (emacs_fixed_get_type): Now static.
9160 (emacs_fixed_class_init): Omit unused local.
9161 (emacs_fixed_child_type): Remove; unused.
9162 * emacsgtkfixed.h (EMACS_TYPE_FIXED, EMACS_FIXED, EmacsFixed)
9163 (EmacsFixedPrivate, EmacsFixedClass, struct _EmacsFixed)
9164 (struct _EmacsFixedClass): Move to emacsgtkfixed.c.
9165 (EMACS_FIXED_CLASS, EMACS_IS_FIXED, EMACS_IS_FIXED_CLASS)
9166 (EMACS_FIXED_GET_CLASS): Remove; unused.
9167 * gtkutil.c (xg_create_frame_widgets) [!HAVE_GTK3]: Omit unused local.
9168
9169 * keyboard.c (handle_async_input): Define only if SYNC_INPUT || SIGIO.
9170 Problem reported by Juanma Barranquero for Windows -Wunused-function.
9171
9172 2012-04-22 Paul Eggert <eggert@cs.ucla.edu>
9173
9174 Modernize and clean up gmalloc.c to assume C89 (Bug#9119).
9175 * gmalloc.c (_MALLOC_INTERNAL, _MALLOC_H, _PP, __ptr_t)
9176 (__malloc_size_t, __malloc_ptrdiff_t):
9177 Remove. All uses removed, replaced by the definiens if needed,
9178 since we can assume C89 or better now.
9179 Include <stdint.h>, for PTRDIFF_MAX, uintptr_t.
9180 (protect_malloc_state, align, get_contiguous_space)
9181 (malloc_atfork_handler_prepare, malloc_atfork_handler_parent)
9182 (malloc_atfork_handler_child, malloc_enable_thread)
9183 (malloc_initialize_1, __malloc_initialize, morecore_nolock)
9184 (_malloc_internal_nolock, _malloc_internal, malloc, _malloc)
9185 (_free, _realloc, _free_internal_nolock, _free_internal, free, cfree)
9186 (special_realloc, _realloc_internal_nolock, _realloc_internal)
9187 (realloc, calloc, __default_morecore, memalign, valloc, checkhdr)
9188 (freehook, mallochook, reallochook, mabort, mcheck, mprobe):
9189 Define using prototypes, not old style.
9190 (align, _malloc_internal_nolock, _free_internal_nolock, memalign):
9191 Don't assume ptrdiff_t and uintptr_t are no wider than unsigned long.
9192 (align): Don't assume that signed integer overflow wraps around.
9193 Omit unused local var.
9194 (malloc_initialize_1, morecore_nolock, _malloc_internal_nolock)
9195 (_free_internal_nolock, memalign, mallochook, reallochook):
9196 Omit no-longer-needed casts.
9197 (valloc): Use getpagesize, not __getpagesize.
9198 (MAGICWORD, MAGICFREE): Now randomish size_t values, not 32-bit.
9199 (struct hdr): The 'magic' member is now size_t, not unsigned long.
9200
9201 * dbusbind.c (XD_DBUS_VALIDATE_OBJECT): Define only if needed.
9202
9203 2012-04-22 Michael Albinus <michael.albinus@gmx.de>
9204
9205 Move functions from C to Lisp. Make non-blocking method calls
9206 the default. Implement further D-Bus standard interfaces.
9207
9208 * dbusbind.c (DBUS_NUM_MESSAGE_TYPES): Declare.
9209 (QCdbus_request_name_allow_replacement)
9210 (QCdbus_request_name_replace_existing)
9211 (QCdbus_request_name_do_not_queue)
9212 (QCdbus_request_name_reply_primary_owner)
9213 (QCdbus_request_name_reply_in_queue)
9214 (QCdbus_request_name_reply_exists)
9215 (QCdbus_request_name_reply_already_owner): Move to dbus.el.
9216 (QCdbus_registered_serial, QCdbus_registered_method)
9217 (QCdbus_registered_signal): New Lisp objects.
9218 (XD_DEBUG_MESSAGE): Use sizeof.
9219 (XD_MESSAGE_TYPE_TO_STRING, XD_OBJECT_TO_STRING)
9220 (XD_DBUS_VALIDATE_BUS_ADDRESS, XD_DBUS_VALIDATE_OBJECT)
9221 (XD_DBUS_VALIDATE_BUS_NAME, XD_DBUS_VALIDATE_PATH)
9222 (XD_DBUS_VALIDATE_INTERFACE, XD_DBUS_VALIDATE_MEMBER): New macros.
9223 (XD_CHECK_DBUS_SERIAL): Rename from CHECK_DBUS_SERIAL_GET_SERIAL.
9224 (xd_signature, xd_append_arg): Allow float for integer types.
9225 (xd_get_connection_references): New function.
9226 (xd_get_connection_address): Rename from xd_initialize.
9227 Return cached address.
9228 (xd_remove_watch): Do not unset $DBUS_SESSION_BUS_ADDRESS.
9229 (xd_close_bus): Rename from Fdbus_close_bus. Not needed on Lisp
9230 level.
9231 (Fdbus_init_bus): New optional arg PRIVATE. Cache address.
9232 Return number of refcounts.
9233 (Fdbus_get_unique_name): Make stronger parameter check.
9234 (Fdbus_message_internal): New defun.
9235 (Fdbus_call_method, Fdbus_call_method_asynchronously)
9236 (Fdbus_method_return_internal, Fdbus_method_error_internal)
9237 (Fdbus_send_signal, Fdbus_register_service)
9238 (Fdbus_register_signal, Fdbus_register_method): Move to dbus.el.
9239 (xd_read_message_1): Obey new structure of Vdbus_registered_objects.
9240 (xd_read_queued_messages): Obey new structure of Vdbus_registered_buses.
9241 (Vdbus_compiled_version, Vdbus_runtime_version)
9242 (Vdbus_message_type_invalid, Vdbus_message_type_method_call)
9243 (Vdbus_message_type_method_return, Vdbus_message_type_error)
9244 (Vdbus_message_type_signal): New defvars.
9245 (Vdbus_registered_buses, Vdbus_registered_objects_table):
9246 Adapt docstring.
9247
9248 2012-04-22 Paul Eggert <eggert@cs.ucla.edu>
9249
9250 Fix GC_MALLOC_CHECK debugging output on 64-bit hosts.
9251 * alloc.c (emacs_blocked_malloc) [GC_MALLOC_CHECK]:
9252 Do not assume ptrdiff_t is the same width as 'int'.
9253
9254 * alloc.c: Handle unusual debugging option combinations.
9255 (GC_CHECK_MARKED_OBJECTS): Undef if ! GC_MARK_STACK,
9256 since the two debugging options are incompatible.
9257 (GC_MALLOC_CHECK): Similarly, undef if GC_CHECK_MARKED_OBJECTS
9258 is defined.
9259 (mem_init, mem_insert, mem_insert_fixup):
9260 Define if GC_MARK_STACK || GC_MALLOC_CHECK.
9261 (NEED_MEM_INSERT): Remove; no longer needed.
9262
9263 2012-04-22 Leo Liu <sdl.web@gmail.com>
9264
9265 * sysdep.c (list_system_processes): Support Darwin (Bug#5725).
9266
9267 2012-04-22 Paul Eggert <eggert@cs.ucla.edu>
9268
9269 * sysdep.c [__FreeBSD__]: Minor cleanups.
9270 (list_system_processes, system_process_attributes) [__FreeBSD__]:
9271 Use Emacs indenting style more consistently. Avoid some casts.
9272 Use 'double' consistently rather than mixing 'float' and 'double'.
9273
9274 2012-04-21 Eduard Wiebe <usenet@pusto.de>
9275
9276 * sysdep.c (list_system_processes, system_process_attributes):
9277 Add implementation for FreeBSD (Bug#5243).
9278
9279 2012-04-21 Andreas Schwab <schwab@linux-m68k.org>
9280
9281 * lisp.mk (lisp): Update.
9282
9283 2012-04-20 Paul Eggert <eggert@cs.ucla.edu>
9284
9285 * keyboard.c (process_pending_signals): Define only if SYNC_INPUT.
9286 It is never used otherwise.
9287
9288 2012-04-20 Stefan Monnier <monnier@iro.umontreal.ca>
9289
9290 * print.c (print_preprocess): Only check print_depth if print-circle
9291 is nil.
9292 (print_object): Check for cycles even when print-circle is nil and
9293 print-gensym is t, but only check print_depth if print-circle is nil.
9294
9295 2012-04-20 Chong Yidong <cyd@gnu.org>
9296
9297 * process.c (wait_reading_process_output): If EIO occurs on a pty,
9298 set the status to "failed" and ensure that sentinel is run.
9299
9300 2012-04-20 Glenn Morris <rgm@gnu.org>
9301
9302 * process.c (Fset_process_inherit_coding_system_flag)
9303 (Fset_process_query_on_exit_flag): Doc fix (mention return value).
9304 (Fmake_network_process, Fmake_serial_process): Doc fix.
9305
9306 2012-04-20 Eli Zaretskii <eliz@gnu.org>
9307
9308 * xdisp.c (string_buffer_position_lim): Limit starting position to
9309 BEGV.
9310 (set_cursor_from_row): If called for a mode-line or header-line
9311 row, return zero immediately.
9312 (try_cursor_movement): If inside continuation line, don't back up
9313 farther than the first row after the header line, if any.
9314 Don't consider the header-line row as "partially visible", even if
9315 MATRIX_ROW_PARTIALLY_VISIBLE_P returns non-zero. (Bug#11261)
9316
9317 2012-04-20 Atsuo Ohki <ohki@gssm.otsuka.tsukuba.ac.jp> (tiny change)
9318
9319 * lread.c (lisp_file_lexically_bound_p): Fix hang at ";-*-\n"
9320 (bug#11238).
9321
9322 2012-04-20 Teodor Zlatanov <tzz@lifelogs.com>
9323 2012-04-18 Paul Eggert <eggert@cs.ucla.edu>
9324
9325 configure: new option --enable-gcc-warnings (Bug#11207)
9326 * Makefile.in (C_WARNINGS_SWITCH): Remove.
9327 (WARN_CFLAGS, WERROR_CFLAGS): New macros.
9328 (ALL_CFLAGS): Use new macros rather than old.
9329 * process.c: Ignore -Wstrict-overflow to work around GCC bug 52904.
9330 * regex.c: Ignore -Wstrict-overflow. If !emacs, also ignore
9331 -Wunused-but-set-variable, -Wunused-function, -Wunused-macros,
9332 -Wunused-result, -Wunused-variable. This should go away once
9333 the Emacs and Gnulib regex code is merged.
9334 (xmalloc, xrealloc): Now static.
9335
9336 2012-04-17 Paul Eggert <eggert@cs.ucla.edu>
9337
9338 * dired.c (Fsystem_groups): Remove unused local.
9339
9340 2012-04-17 Glenn Morris <rgm@gnu.org>
9341
9342 * dired.c (Fsystem_users): Doc fix.
9343
9344 2012-04-17 Dmitry Antipov <dmantipov@yandex.ru>
9345
9346 * dired.c (Fsystem_users, Fsystem_groups): New functions. (Bug#7900)
9347 (syms_of_dired): Add them.
9348
9349 2012-04-16 Paul Eggert <eggert@cs.ucla.edu>
9350
9351 Fix minor alloc.c problems found by static checking.
9352 * alloc.c (_malloc_internal, _free_internal) [!DOUG_LEA_MALLOC]:
9353 New extern decls, to avoid calling undeclared functions.
9354 (dont_register_blocks): Define if ((!SYSTEM_MALLOC && !SYNC_INPUT)
9355 && GC_MALLOC_CHECK), not if ((GC_MARK_STACK || defined
9356 GC_MALLOC_CHECK) && GC_MALLOC_CHECK), to match when it's used.
9357 (NEED_MEM_INSERT): New macro.
9358 (mem_insert, mem_insert_fixup) [!NEED_MEM_INSERT]: Remove; unused.
9359 Remove one incorrect comment and fix another.
9360
9361 Fix minor ralloc.c problems found by static checking.
9362 See http://lists.gnu.org/archive/html/emacs-devel/2011-12/msg00720.html
9363 * ralloc.c (ALIGNED, ROUND_TO_PAGE, HEAP_PTR_SIZE)
9364 (r_alloc_size_in_use, r_alloc_freeze, r_alloc_thaw): Remove; unused.
9365 (r_alloc_sbrk): Now static.
9366
9367 Improve ralloc.c interface checking.
9368 See http://lists.gnu.org/archive/html/emacs-devel/2011-12/msg00720.html
9369 * buffer.c (ralloc_reset_variable, r_alloc, r_re_alloc)
9370 (r_alloc_free) [REL_ALLOC]: Move decls from here ...
9371 * lisp.h (r_alloc, r_alloc_free, r_re_alloc, r_alloc_reset_variable)
9372 [REL_ALLOC]: ... to here, to check interface.
9373 * m/ia64.h (r_alloc, r_alloc_free) [REL_ALLOC && !_MALLOC_INTERNAL]:
9374 Remove decls. This fixes an "It stinks!".
9375
9376 * alloc.c (which_symbols): Fix alignment issue / type clash.
9377
9378 2012-04-15 Andreas Schwab <schwab@linux-m68k.org>
9379
9380 * lisp.h (struct Lisp_Symbol): Remove explicit padding.
9381 (struct Lisp_Misc_Any): Likewise.
9382 (struct Lisp_Free): Likewise.
9383 * alloc.c (union aligned_Lisp_Symbol): Define.
9384 (SYMBOL_BLOCK_SIZE, struct symbol_block): Use union
9385 aligned_Lisp_Symbol instead of struct Lisp_Symbol.
9386 (union aligned_Lisp_Misc): Define.
9387 (MARKER_BLOCK_SIZE, struct marker_block): Use union
9388 aligned_Lisp_Misc instead of union Lisp_Misc.
9389 (Fmake_symbol, allocate_misc, gc_sweep): Adjust.
9390
9391 2012-04-14 Paul Eggert <eggert@cs.ucla.edu>
9392
9393 Make GC_MAKE_GCPROS_NOOPS the default (Bug#9926).
9394 * lisp.h (GC_MARK_STACK): Default to GC_MAKE_GCPROS_NOOPS.
9395 * s/cygwin.h, s/darwin.h, s/freebsd.h, s/gnu.h, s/irix6-5.h, s/msdos.h:
9396 * s/netbsd.h, s/sol2-6.h:
9397 Remove definition of GC_MARK_STACK, since the default now works.
9398 * s/aix4-2.h, s/hpux10-20.h, s/unixware.h:
9399 Define GC_MARK_STACK to GC_USE_GCPROS_AS_BEFORE, since that's
9400 no longer the default.
9401 * s/gnu-linux.h (GC_MARK_STACK): Adjust to change in default.
9402
9403 2012-04-14 Atsuo Ohki <ohki@gssm.otsuka.tsukuba.ac.jp> (tiny change)
9404
9405 * lread.c (lisp_file_lexically_bound_p):
9406 Fix hang at ";-*-\n" (bug#11238).
9407
9408 2012-04-14 Eli Zaretskii <eliz@gnu.org>
9409
9410 * xdisp.c (find_last_unchanged_at_beg_row): Don't consider a row
9411 "unchanged" if its end.pos is beyond ZV. (Bug#11199)
9412
9413 2012-04-14 Jan Djärv <jan.h.d@swipnet.se>
9414
9415 * nsterm.m (constrainFrameRect): Always constrain when there is only
9416 one screen (Bug#10962).
9417
9418 2012-04-13 Ken Brown <kbrown@cornell.edu>
9419
9420 * s/cygwin.h (PTY_OPEN): Don't try to close a bogus file descriptor.
9421
9422 2012-04-13 Reuben Thomas <rrt@sc3d.org>
9423
9424 * indent.c (Fmove_to_column): Change interactive spec (Bug#739).
9425
9426 2012-04-11 Daniel Colascione <dancol@dancol.org>
9427
9428 * s/cygwin.h: The vfork the #define in cygwin.h was protecting
9429 against is gone. It's better to use vfork now so that when Cygwin
9430 gains a new, working vfork, we use it automatically (bug#10398).
9431
9432 2012-04-11 Stefan Monnier <monnier@iro.umontreal.ca>
9433
9434 * window.c (save_window_save): Obey window-point-insertion-type.
9435
9436 2012-04-11 Glenn Morris <rgm@gnu.org>
9437
9438 * Makefile.in (GNUSTEP_CFLAGS): Rename from C_SWITCH_X_SYSTEM.
9439
9440 2012-04-11 Stefan Monnier <monnier@iro.umontreal.ca>
9441
9442 * alloc.c (lisp_align_malloc): Remove unneeded prototype.
9443
9444 2012-04-10 Jason S. Cornez <jcornez@ravenpack.com> (tiny change)
9445
9446 * keyboard.c: Override inhibit-quit after the third C-g (bug#6585).
9447 (force_quit_count): New var.
9448 (handle_interrupt): Use it.
9449
9450 2012-04-10 Juanma Barranquero <lekktu@gmail.com>
9451
9452 * w32.c (w32_delayed_load): Record the full path of the library
9453 being loaded (bug#10424).
9454
9455 2012-04-09 Glenn Morris <rgm@gnu.org>
9456
9457 * doc.c (Fsnarf_documentation): Check variables, functions are bound,
9458 not just in the obarray, before snarfing them. (Bug#11036)
9459
9460 * Makefile.in ($(leimdir)/leim-list.el):
9461 Pass EMACS rather than BUILT_EMACS.
9462
9463 2012-04-09 Teodor Zlatanov <tzz@lifelogs.com>
9464
9465 * process.c (make_process):
9466 * process.h: Add integer `gnutls_handshakes_tried' member to
9467 process struct.
9468
9469 * gnutls.h: Add `GNUTLS_EMACS_HANDSHAKES_LIMIT' upper limit.
9470 Add convenience `GNUTLS_LOG2i' macro.
9471
9472 * gnutls.c (gnutls_log_function2i): Convenience log function.
9473 (emacs_gnutls_read): Use new log functions,
9474 `gnutls_handshakes_tried' process member, and
9475 `GNUTLS_EMACS_HANDSHAKES_LIMIT' to limit the number of handshake
9476 attempts per process (connection).
9477
9478 2012-04-09 Chong Yidong <cyd@gnu.org>
9479
9480 * eval.c (Fuser_variable_p, user_variable_p_eh)
9481 (lisp_indirect_variable): Functions deleted.
9482 (Fdefvar): Caller changed.
9483
9484 * callint.c (Finteractive, Fcall_interactively):
9485 * minibuf.c (Fread_variable): Callers changed.
9486
9487 2012-04-09 Eli Zaretskii <eliz@gnu.org>
9488
9489 * xdisp.c (set_cursor_from_row): If the display string appears in
9490 the buffer at position that is closer to point than the position
9491 after the display string, display the cursor on the first glyph of
9492 the display string. Fixes cursor display when a 'display' text
9493 property immediately follows invisible text. (Bug#11094)
9494
9495 2012-04-09 Paul Eggert <eggert@cs.ucla.edu>
9496
9497 composite.c: use 'double' consistently
9498 * composite.c (get_composition_id): Use 'double' consistently
9499 instead of converting 'float' to 'double' and vice versa; this is
9500 easier to understand and avoids a GCC warning.
9501
9502 2012-04-09 Glenn Morris <rgm@gnu.org>
9503
9504 * Makefile.in: Generate leim-list with bootstrap-emacs, in
9505 preparation for dumping it with emacs. (Bug#4789)
9506 (leimdir): New variable.
9507 ($(leimdir)/leim-list.el): New rule.
9508 (emacs$(EXEEXT)): Depend on leim-list.el.
9509
9510 * buffer.c (Qucs_set_table_for_input): Remove. (Bug#9821)
9511 (Fget_buffer_create): Don't call Qucs_set_table_for_input.
9512 (init_buffer_once, syms_of_buffer): Remove Qucs_set_table_for_input.
9513
9514 2012-04-08 Andreas Schwab <schwab@linux-m68k.org>
9515
9516 * lisp.h (struct Lisp_Symbol): Add explicit padding to ensure
9517 proper alignment.
9518
9519 2012-04-07 Juanma Barranquero <lekktu@gmail.com>
9520
9521 * xml.c (init_libxml2_functions) [WINDOWSNT]:
9522 Remove unused local variable.
9523
9524 2012-04-07 Paul Eggert <eggert@cs.ucla.edu>
9525
9526 Avoid unnecessary pointer scanning in garbage collection (Bug#10780).
9527 * alloc.c (POINTERS_MIGHT_HIDE_IN_OBJECTS): New macro.
9528 (mark_memory): Mark Lisp_Objects only if pointers might hide in
9529 objects, as mark_maybe_pointer will catch them otherwise.
9530 (GC_LISP_OBJECT_ALIGNMENT): Remove; no longer needed.
9531 * s/gnu-linux.h (GC_LISP_OBJECT_ALIGNMENT) [__mc68000__]: Likewise.
9532
9533 2012-04-07 Paul Eggert <eggert@cs.ucla.edu>
9534
9535 Fix typo that broke non-Windows builds.
9536 * xml.c (libxml2_loaded_p) [!!WINDOWSNT]: 'inine' -> 'inline'.
9537
9538 2012-04-07 Eli Zaretskii <eliz@gnu.org>
9539
9540 Support building on MS-Windows with libxml2.
9541
9542 * makefile.w32-in (OBJ2): Add xml.$(O).
9543 (GLOBAL_SOURCES): Add xml.c.
9544 ($(BLD)/xml.$(O)): New dependency list.
9545
9546 * xml.c (DEF_XML2_FN, LOAD_XML2_FN) [WINDOWSNT]: New macros.
9547 (fn_htmlReadMemory, fn_xmlReadMemory, fn_xmlDocGetRootElement)
9548 (fn_xmlFreeDoc, fn_xmlCleanupParser, fn_xmlCheckVersion)
9549 [!WINDOWSNT]: New macros.
9550 (init_libxml2_functions, libxml2_loaded_p): New functions.
9551 (parse_region): Call fn_xmlCheckVersion instead of using the macro
9552 LIBXML_TEST_VERSION. Call libxml2 functions via the fn_* macros.
9553 (xml_cleanup_parser): New function, export for fn_xmlCleanupParser.
9554 Calls xmlCleanupParser only if libxml2 was loaded (or statically
9555 linked in).
9556 (Flibxml_parse_html_region, Flibxml_parse_xml_region):
9557 Call init_libxml2_functions before calling libxml2 functions.
9558 (syms_of_xml) <Qlibxml2_dll>: DEFSYM it.
9559
9560 * emacs.c: Don't include libxml/parser.h.
9561 (shut_down_emacs): Call xml_cleanup_parser, instead of calling
9562 xmlCleanupParser directly.
9563
9564 * lisp.h [HAVE_LIBXML2]: Add prototype for xml_cleanup_parser.
9565
9566 2012-04-07 Eli Zaretskii <eliz@gnu.org>
9567
9568 * indent.c (Fvertical_motion): If there is a display string at
9569 point, use it.vpos to compute how many lines to backtrack after
9570 move_it_to point. (Bug#11133)
9571
9572 2012-04-06 Eli Zaretskii <eliz@gnu.org>
9573
9574 * buffer.h (FETCH_CHAR, FETCH_MULTIBYTE_CHAR):
9575 * character.h (STRING_CHAR, STRING_CHAR_AND_LENGTH): Add comments
9576 about subtle differences between FETCH_CHAR* and STRING_CHAR*
9577 macros related to unification of CJK characters. For the details,
9578 see the discussion following the message here:
9579 http://debbugs.gnu.org/cgi/bugreport.cgi?bug=11073#14.
9580
9581 2012-04-04 Chong Yidong <cyd@gnu.org>
9582
9583 * keyboard.c (Vdelayed_warnings_list): Doc fix.
9584
9585 2012-04-01 Eli Zaretskii <eliz@gnu.org>
9586
9587 * w32menu.c (simple_dialog_show, add_menu_item): Use SAFE_ALLOCA
9588 instead of alloca. (Bug#11138)
9589
9590 2012-04-01 Andreas Schwab <schwab@linux-m68k.org>
9591
9592 * w32menu.c (is_simple_dialog): Properly check lisp types.
9593 (Bug#11141)
9594
9595 2012-03-31 Eli Zaretskii <eliz@gnu.org>
9596
9597 * xdisp.c (move_it_by_lines): When DVPOS is positive, and the
9598 position we get to after a call to move_it_to fails the
9599 IS_POS_VALID_AFTER_MOVE_P test, move to the next buffer position
9600 only if we wind up in a string from display property. (Bug#11063)
9601
9602 * window.c (Fdelete_other_windows_internal): Invalidate the row
9603 and column information about mouse highlight, so that redisplay
9604 restores it after reallocating the glyph matrices. (Bug#7464)
9605
9606 * xdisp.c (set_cursor_from_row): If `cursor' property on a display
9607 string comes from a `display' text property, use the buffer
9608 position of that property as if we actually saw that position in
9609 the row's glyphs.
9610 (move_it_by_lines): Remove the assertion that
9611 "it->current_x == 0 && it->hpos == 0" which can be legitimately
9612 violated when there's a before-string at the beginning of a line.
9613 (Bug#11063)
9614
9615 2012-03-30 Eli Zaretskii <eliz@gnu.org>
9616
9617 * xdisp.c (append_space_for_newline): If the default face was
9618 remapped, use the remapped face for the appended newline.
9619 (extend_face_to_end_of_line): Use the remapped default face for
9620 extending the face to the end of the line.
9621 (display_line): Call extend_face_to_end_of_line when the default
9622 face was remapped. (Bug#11068)
9623
9624 2012-03-29 Eli Zaretskii <eliz@gnu.org>
9625
9626 * s/ms-w32.h: Discourage from defining HAVE_GETCWD.
9627
9628 2012-03-28 Stefan Monnier <monnier@iro.umontreal.ca>
9629
9630 * keyboard.c (safe_run_hooks_error): Don't unquote strings.
9631
9632 2012-03-27 Glenn Morris <rgm@gnu.org>
9633
9634 * search.c (Fword_search_backward_lax, Fword_search_forward_lax):
9635 Doc fixes.
9636
9637 2012-03-26 Kenichi Handa <handa@m17n.org>
9638
9639 * dispextern.h (struct glyph): Fix previous change. Change the
9640 bit length of glyphless.ch to 25 (Bug#11082).
9641
9642 2012-03-26 Chong Yidong <cyd@gnu.org>
9643
9644 * keyboard.c (Vselection_inhibit_update_commands): New variable.
9645 (command_loop_1): Use it; inhibit selection update for
9646 handle-select-window too (Bug#8996).
9647
9648 2012-03-25 Fabrice Popineau <fabrice.popineau@supelec.fr>
9649
9650 * w32heap.c (_heap_init, _heap_term): Remove dead MSVC-specific code.
9651
9652 2012-03-25 Kenichi Handa <handa@m17n.org>
9653
9654 * dispextern.h (struct glyph): Change the bit length of
9655 glyphless.ch to 22 to make the member glyphless fit in 32 bits.
9656
9657 2012-03-24 Eli Zaretskii <eliz@gnu.org>
9658
9659 * s/ms-w32.h (tzname): Include time.h before redirecting to
9660 _tzname. Fixes the MSVC build. (Bug#9960)
9661
9662 2012-03-24 Andreas Schwab <schwab@linux-m68k.org>
9663
9664 * xdisp.c (produce_glyphless_glyph): Limit length of acronym to 6
9665 characters.
9666
9667 * xterm.c (XTread_socket): Only modify handling_signal if
9668 !SYNC_INPUT. (Bug#11080)
9669
9670 2012-03-23 Eli Zaretskii <eliz@gnu.org>
9671
9672 * bidi.c (bidi_fetch_char): Use STRING_CHAR_AND_LENGTH instead of
9673 FETCH_MULTIBYTE_CHAR followed by CHAR_BYTES. Prevents crashes
9674 when fetching a multibyte character consumes more bytes than
9675 CHAR_BYTES returns, due to unification of CJK characters in
9676 string_char. (Bug#11073)
9677
9678 2012-03-23 Troels Nielsen <bn.troels@gmail.com> (tiny change)
9679
9680 * process.c (wait_reading_process_output): Handle pty disconnect
9681 by refraining from sending oneself a SIGCHLD (bug#10933).
9682
9683 2012-03-22 Chong Yidong <cyd@gnu.org>
9684
9685 * dispextern.h (struct it): New member string_from_prefix_prop_p.
9686
9687 * xdisp.c (push_prefix_prop): Rename from push_display_prop.
9688 Mark string as coming from a prefix property.
9689 (handle_face_prop): Use default face for prefix strings (Bug#4281).
9690 (pop_it, reseat_1): Save and restore string_from_prefix_prop_p.
9691
9692 2012-03-21 Chong Yidong <cyd@gnu.org>
9693
9694 * xfaces.c (Vface_remapping_alist): Doc fix.
9695
9696 2012-03-20 Eli Zaretskii <eliz@gnu.org>
9697
9698 * w32proc.c (Fw32_set_console_codepage)
9699 (Fw32_set_console_output_codepage, Fw32_get_codepage_charset):
9700 Doc fixes.
9701
9702 2012-03-20 Chong Yidong <cyd@gnu.org>
9703
9704 * dispnew.c (Fredisplay, Vredisplay_preemption_period): Update doc
9705 to reflect default non-nil value of redisplay-dont-pause.
9706
9707 2012-03-19 Kenichi Handa <handa@m17n.org>
9708
9709 * ftfont.c (ftfont_drive_otf): Mask bits of character code to make
9710 it fit in a valid range (Bug#11003).
9711
9712 2012-03-18 Eli Zaretskii <eliz@gnu.org>
9713
9714 * xdisp.c (cursor_row_p): Even if the glyph row ends in a string
9715 that is not from display property, accept the row as a "cursor
9716 row" if one of the string's character has a non-nil `cursor'
9717 property. Fixes cursor positioning when there are newlines in
9718 overlay strings, e.g. in icomplete.el. (Bug#11035)
9719
9720 2012-03-12 Paul Eggert <eggert@cs.ucla.edu>
9721
9722 * buffer.c (compare_overlays): Don't assume args differ (Bug#6830).
9723
9724 2012-03-12 Chong Yidong <cyd@gnu.org>
9725
9726 * eval.c (inhibit_lisp_code): Rename from
9727 inhibit_window_configuration_change_hook; move from window.c.
9728
9729 * xfns.c (unwind_create_frame_1, Fx_create_frame):
9730 * window.c (run_window_configuration_change_hook)
9731 (syms_of_window): Callers changed.
9732
9733 2012-03-11 Chong Yidong <cyd@gnu.org>
9734
9735 * keymap.c (Fkey_description): Doc fix (Bug#9700).
9736
9737 * editfns.c (Fconstrain_to_field): Doc fix (Bug#9452).
9738
9739 2012-03-10 Chong Yidong <cyd@gnu.org>
9740
9741 * frame.c (other_visible_frames): Don't assume the selected frame
9742 is visible (Bug#10955).
9743
9744 2012-03-09 Stefan Monnier <monnier@iro.umontreal.ca>
9745
9746 * buffer.c (compare_overlays): Avoid qsort's instability (bug#6830).
9747
9748 2012-03-08 Jan Djärv <jan.h.d@swipnet.se>
9749
9750 * gtkutil.c (x_wm_set_size_hint): Use one row in call to
9751 FRAME_TEXT_LINES_TO_PIXEL_HEIGHT so base_height is greater than
9752 zero (Bug#10954).
9753
9754 2012-03-03 Glenn Morris <rgm@gnu.org>
9755
9756 * alloc.c (Fgarbage_collect, misc-objects-consed): Doc fixes.
9757
9758 2012-03-02 Eli Zaretskii <eliz@gnu.org>
9759
9760 * xdisp.c (try_window_reusing_current_matrix): Don't move cursor
9761 position past the first glyph_row that ends at ZV. (Bug#10902)
9762 (redisplay_window, next_element_from_string): Fix typos in
9763 comments.
9764 (redisplay_window): Pass to move_it_vertically the margin in
9765 pixels, not in screen lines.
9766
9767 2012-03-02 Glenn Morris <rgm@gnu.org>
9768
9769 * buffer.c (buffer-list-update-hook): Doc fix.
9770
9771 2012-02-29 Eli Zaretskii <eliz@gnu.org>
9772
9773 * xdisp.c (get_overlay_strings_1): Under bidi redisplay, call
9774 push_it before setting up the iterator for the first overlay
9775 string, even if we have an empty string loaded.
9776 (next_overlay_string): If there's an empty string on the iterator
9777 stack, pop the stack. (Bug#10903)
9778
9779 2012-02-25 Paul Eggert <eggert@cs.ucla.edu>
9780
9781 Generalize fix for crash due to non-contiguous EMACS_INT (Bug#10780).
9782 Suggested by Stefan Monnier in
9783 <http://lists.gnu.org/archive/html/emacs-devel/2012-02/msg00692.html>.
9784 * alloc.c (widen_to_Lisp_Object): New static function.
9785 (mark_memory): Also mark Lisp_Objects by fetching pointer words
9786 and widening them to Lisp_Objects. This would work even if
9787 USE_LSB_TAG is defined and wide integers are used, which might
9788 happen in a future version of Emacs.
9789
9790 2012-02-25 Chong Yidong <cyd@gnu.org>
9791
9792 * fileio.c (Ffile_selinux_context, Fset_file_selinux_context):
9793 Doc fix.
9794
9795 * xselect.c (Fx_selection_exists_p): Doc fix.
9796 (x_clipboard_manager_save_all): Print an informative message
9797 before saving to clipboard manager.
9798
9799 2012-02-24 Chong Yidong <cyd@gnu.org>
9800
9801 * keyboard.c (process_special_events): Handle all X selection
9802 requests in kbd_buffer, not just the next one (Bug#8869).
9803
9804 2012-02-23 Chong Yidong <cyd@gnu.org>
9805
9806 * xfns.c (Fx_create_frame): Avoid window-configuration-change-hook
9807 call when setting menu-bar-lines and tool-bar-lines parameters.
9808 (unwind_create_frame_1): New helper function.
9809
9810 * window.c (inhibit_window_configuration_change_hook): New var.
9811 (run_window_configuration_change_hook): Obey it.
9812 (syms_of_window): Initialize it.
9813
9814 2012-02-22 Chong Yidong <cyd@gnu.org>
9815
9816 * xterm.c (x_draw_image_relief): Add missing type check for
9817 Vtool_bar_button_margin (Bug#10743).
9818
9819 2012-02-21 Chong Yidong <cyd@gnu.org>
9820
9821 * fileio.c (Vfile_name_handler_alist): Doc fix.
9822
9823 * buffer.c (Fget_file_buffer): Protect against invalid file
9824 handler return value.
9825
9826 2012-02-20 Paul Eggert <eggert@cs.ucla.edu>
9827
9828 * .gdbinit (xreload): Don't assume EMACS_INT fits in 'long'
9829 when computing $valmask.
9830
9831 Fix crash due to non-contiguous EMACS_INT (Bug#10780).
9832 * lisp.h (VALBITS): Move definition up, so that USE_LSB_TAG can use it.
9833 (USE_LSB_TAG): Do not define if UINTPTR_MAX >> VALBITS == 0.
9834 It's useless in that case, and it can cause problems on hosts
9835 that allocate halves of EMACS_INT values separately.
9836 Reported by Dan Horák. Diagnosed by Andreas Schwab in
9837 <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=10780#30>.
9838 * mem-limits.h (EXCEEDS_LISP_PTR): Define to 0 on hosts where
9839 UINTPTR_MAX >> VALBITS == 0. This is required by the above change;
9840 it avoids undefined behavior on hosts where shifting right by more
9841 than the word width has undefined behavior.
9842
9843 2012-02-19 Chong Yidong <cyd@gnu.org>
9844
9845 * fileio.c (Ffile_name_directory, Ffile_name_nondirectory)
9846 (Funhandled_file_name_directory, Ffile_name_as_directory)
9847 (Fdirectory_file_name, Fexpand_file_name)
9848 (Fsubstitute_in_file_name): Protect against invalid file handler
9849 return values (Bug#10845).
9850
9851 2012-02-18 Eli Zaretskii <eliz@gnu.org>
9852
9853 * .gdbinit (pitx): Fix incorrect references to fields of the
9854 iterator stack.
9855
9856 2012-02-17 Chong Yidong <cyd@gnu.org>
9857
9858 * syntax.c (Fscan_lists): Doc fix (Bug#10833).
9859
9860 2012-02-15 Paul Eggert <eggert@cs.ucla.edu>
9861
9862 * image.c (MAX_IMAGE_SIZE): Increase from 6.0 to 10.0; see
9863 <http://lists.gnu.org/archive/html/emacs-devel/2012-02/msg00540.html>.
9864
9865 2012-02-15 Chong Yidong <cyd@gnu.org>
9866
9867 * eval.c (Fdefvar, Fdefconst): Doc fix; note that the variable is
9868 marked as special. Also, starting docstrings with * is obsolete.
9869
9870 2012-02-13 Andreas Schwab <schwab@linux-m68k.org>
9871
9872 * gnutls.c (emacs_gnutls_write): Fix last change.
9873
9874 2012-02-13 Lars Ingebrigtsen <larsi@gnus.org>
9875
9876 * gnutls.c (emacs_gnutls_write): Set errno appropriately for
9877 send_process.
9878
9879 2012-02-13 Stefan Monnier <monnier@iro.umontreal.ca>
9880
9881 * keymap.c (Fsingle_key_description): Handle char ranges.
9882
9883 2012-02-12 Chong Yidong <cyd@gnu.org>
9884
9885 * xdisp.c (handle_stop): Avoid assigning -1 to it->face_id here,
9886 as that creates a dangerous corner case.
9887
9888 * window.c (Fdelete_window_internal): Invalidate the mouse
9889 highlight (Bug#9904).
9890
9891 2012-02-12 Glenn Morris <rgm@gnu.org>
9892
9893 * xselect.c (Fx_own_selection_internal)
9894 (Fx_get_selection_internal, Fx_disown_selection_internal)
9895 (Fx_selection_owner_p, Fx_selection_exists_p): Doc fixes.
9896 * nsselect.m (Fx_own_selection_internal)
9897 (Fx_disown_selection_internal, Fx_selection_exists_p)
9898 (Fx_selection_owner_p, Fx_get_selection_internal):
9899 Sync docs and argument specs with the xselect.c versions.
9900
9901 2012-02-11 Lars Ingebrigtsen <larsi@gnus.org>
9902
9903 * gnutls.c (emacs_gnutls_write): Don't infloop if sendto fails.
9904
9905 2012-02-11 Eli Zaretskii <eliz@gnu.org>
9906
9907 * w32select.c (Fx_selection_exists_p): Sync doc string and
9908 argument list with xselect.c. (Bug#10783)
9909
9910 * w16select.c (Fx_selection_exists_p): Sync doc string and
9911 argument list with xselect.c. (Bug#10783)
9912
9913 2012-02-10 Glenn Morris <rgm@gnu.org>
9914
9915 * fns.c (Fsecure_hash): Doc fix.
9916
9917 2012-02-09 Kenichi Handa <handa@m17n.org>
9918
9919 * coding.c (produce_chars): Fix updating of src_end (Bug#10701).
9920
9921 2012-02-07 Chong Yidong <cyd@gnu.org>
9922
9923 * buffer.c (Fbuffer_local_variables)
9924 (buffer_lisp_local_variables): Handle unbound vars correctly;
9925 don't let Qunbound leak into Lisp.
9926
9927 2012-02-07 Glenn Morris <rgm@gnu.org>
9928
9929 * image.c (Fimagemagick_types): Doc fix.
9930
9931 * image.c (imagemagick-render-type): Change it from a lisp object
9932 to an integer. Move the doc here from the lisp manual.
9933 Treat all values not equal to 0 the same.
9934
9935 2012-02-06 Chong Yidong <cyd@gnu.org>
9936
9937 * doc.c (store_function_docstring): Avoid applying docstring of
9938 alias to base function (Bug#2603).
9939
9940 2012-02-04 Andreas Schwab <schwab@linux-m68k.org>
9941
9942 * .gdbinit (pp1, pv1): Remove redundant defines.
9943 (pr): Use pp.
9944
9945 2012-02-04 Chong Yidong <cyd@gnu.org>
9946
9947 * nsterm.m: Declare a global (Bug#10694).
9948
9949 2012-02-04 Eli Zaretskii <eliz@gnu.org>
9950
9951 * w32.c (get_emacs_configuration_options):
9952 Include --enable-checking, if specified, in the return value.
9953
9954 2012-02-04 Martin Rudalics <rudalics@gmx.at>
9955
9956 * dispnew.c (change_frame_size_1): Calculate new_frame_total_cols
9957 after rounding frame sizes. (Bug#9723)
9958
9959 2012-02-04 Eli Zaretskii <eliz@gnu.org>
9960
9961 * keyboard.c (adjust_point_for_property): Don't position point
9962 before BEGV. (Bug#10696)
9963
9964 2012-02-03 Paul Eggert <eggert@cs.ucla.edu>
9965
9966 Handle overflow when computing char display width (Bug#9496).
9967 * character.c (char_width): Return EMACS_INT, not int.
9968 (char_width, c_string_width): Check for overflow when
9969 computing the width; this is possible now that individual
9970 characters can have unbounded width. Problem introduced
9971 by merge from Emacs 23 on 2012-01-19.
9972
9973 2012-02-02 Michael Albinus <michael.albinus@gmx.de>
9974
9975 * dbusbind.c (Fdbus_register_method): Mention the return value
9976 :ignore in the docstring.
9977
9978 2012-02-02 Glenn Morris <rgm@gnu.org>
9979
9980 * callproc.c (Fcall_process, Fcall_process_region): Doc fix.
9981
9982 * nsterm.m (syms_of_nsterm) <x-toolkit-scroll-bars>:
9983 Unconditionally set to t. (Bug#10673)
9984 * nsterm.m (syms_of_nsterm) <x-toolkit-scroll-bars>:
9985 * w32term.c (syms_of_w32term) <x-toolkit-scroll-bars>:
9986 * xterm.c (syms_of_xterm) <x-toolkit-scroll-bars>: Doc fix.
9987
9988 2012-02-02 Kenichi Handa <handa@m17n.org>
9989
9990 (x_produce_glyphs): Cancel previous change. If cmp->glyph_len is
9991 0, do not call append_composite_glyph.
9992
9993 2012-02-02 Kenichi Handa <handa@m17n.org>
9994
9995 * xdisp.c (BUILD_COMPOSITE_GLYPH_STRING): Initialize first_s to
9996 NULL (Bug#6988).
9997 (x_produce_glyphs): If the component of a composition is a null
9998 string, set it->pixel_width to 1 to avoid zero-width glyph.
9999
10000 2012-02-01 Eli Zaretskii <eliz@gnu.org>
10001
10002 * ralloc.c (resize_bloc, r_alloc_sbrk): Don't call memmove if its
10003 first 2 arguments are identical. This makes inserting large
10004 output from a subprocess an order of magnitude faster on
10005 MS-Windows, where all sbrk'ed memory is always contiguous.
10006
10007 2012-01-31 Glenn Morris <rgm@gnu.org>
10008
10009 * nsterm.m (syms_of_nsterm) <x-toolkit-scroll-bars>:
10010 * w32term.c (syms_of_w32term) <x-toolkit-scroll-bars>:
10011 * xterm.c (syms_of_xterm) <x-toolkit-scroll-bars>: Sync docs.
10012
10013 2012-01-29 Glenn Morris <rgm@gnu.org>
10014
10015 * gnutls.c (syms_of_gnutls): More doc (from etc/NEWS).
10016
10017 2012-01-28 Samuel Thibault <sthibault@debian.org> (tiny change)
10018
10019 * s/gnu.h: Define POSIX_SIGNALS (Bug#10552).
10020
10021 2012-01-28 Chong Yidong <cyd@gnu.org>
10022
10023 * minibuf.c (syms_of_minibuf): Doc fix (Bug#10550).
10024
10025 2012-01-26 Chong Yidong <cyd@gnu.org>
10026
10027 * keyboard.c (Vecho_keystrokes): Document zero value (Bug#10503).
10028
10029 * search.c (Fsearch_forward, Fsearch_backward): Document negative
10030 repeat counts (Bug#10507).
10031
10032 2012-01-26 Glenn Morris <rgm@gnu.org>
10033
10034 * lread.c (syms_of_lread): Doc fix.
10035
10036 2012-01-25 HIROSHI OOTA <nil@mad.dog.cx> (tiny change)
10037
10038 * coding.c (encode_designation_at_bol): Change return value to
10039 EMACS_INT.
10040
10041 2012-01-25 Chong Yidong <cyd@gnu.org>
10042
10043 * eval.c (Fuser_variable_p): Doc fix; mention custom-variable-p.
10044
10045 2012-01-21 Chong Yidong <cyd@gnu.org>
10046
10047 * floatfns.c (Fcopysign): Make the second argument non-optional,
10048 since nil is not allowed anyway.
10049
10050 2012-01-21 Andreas Schwab <schwab@linux-m68k.org>
10051
10052 * process.c (read_process_output): Use p instead of XPROCESS (proc).
10053 (send_process): Likewise.
10054
10055 2012-01-19 Martin Rudalics <rudalics@gmx.at>
10056
10057 * window.c (save_window_save, Fcurrent_window_configuration)
10058 (Vwindow_persistent_parameters): Do not use Qstate.
10059 Rewrite doc-strings.
10060
10061 2012-01-19 Kenichi Handa <handa@m17n.org>
10062
10063 * character.c (char_width): New function.
10064 (Fchar_width, c_string_width, lisp_string_width):
10065 Use char_width (Bug#9496).
10066
10067 2012-01-16 Martin Rudalics <rudalics@gmx.at>
10068
10069 * window.c (Vwindow_persistent_parameters): New variable.
10070 (Fset_window_configuration, save_window_save): Handle persistent
10071 window parameters.
10072
10073 2012-01-14 Eli Zaretskii <eliz@gnu.org>
10074
10075 * w32fns.c (signal_user_input): Don't do a QUIT, to avoid
10076 thrashing the stack of the thread. (Bug#9087)
10077
10078 2012-01-12 Paul Eggert <eggert@cs.ucla.edu>
10079
10080 * xdisp.c (rows_from_pos_range): Add parens as per gcc -Wparentheses.
10081
10082 2012-01-11 Eli Zaretskii <eliz@gnu.org>
10083
10084 * xdisp.c (rows_from_pos_range): Handle the case where the
10085 highlight ends on a newline. (Bug#10464)
10086 (mouse_face_from_buffer_pos): Fix off-by-one error in calculating
10087 he end column for display of highlight that ends on a newline
10088 before a R2L line.
10089
10090 2012-01-11 Glenn Morris <rgm@gnu.org>
10091
10092 * lread.c (init_lread): If no-site-lisp, remove site-lisp dirs
10093 from load-path also when installation-directory is nil. (Bug#10208)
10094
10095 2012-01-10 Glenn Morris <rgm@gnu.org>
10096
10097 * emacs.c (syms_of_emacs) <installation-directory>: Doc fix.
10098
10099 * epaths.in (PATH_LOADSEARCH, PATH_EXEC, PATH_DATA, PATH_DOC):
10100 Update template values to be closer to their typical values these days.
10101
10102 2012-01-09 Eli Zaretskii <eliz@gnu.org>
10103
10104 * xdisp.c (rows_from_pos_range): Accept additional argument
10105 DISP_STRING, and accept any glyph in a row whose object is that
10106 string as eligible for mouse highlight. Fixes mouse highlight of
10107 display strings from overlays. (Bug#10464)
10108
10109 2012-01-07 Paul Eggert <eggert@cs.ucla.edu>
10110
10111 emacs: fix an auto-save permissions race condition (Bug#10400)
10112 * fileio.c (auto_saving_dir_umask): New static var.
10113 (Fmake_directory_internal): Use it.
10114 (do_auto_save_make_dir): Set it, instead of invoking chmod after
10115 creating the directory. The old code temporarily assigns
10116 too-generous permissions to the directory.
10117 (do_auto_save_eh): Clear it.
10118 (Fdo_auto_save): Catch all errors, not just file errors, so
10119 that the var is always cleared.
10120
10121 2012-01-07 Eli Zaretskii <eliz@gnu.org>
10122
10123 * search.c (scan_buffer): Pass character positions to
10124 know_region_cache, not byte positions. (Bug#6540)
10125
10126 2012-01-07 LynX <_LynX@bk.ru> (tiny change)
10127
10128 * w32.c (sys_rename): Report EXDEV when rename of a directory
10129 fails because the target is on another logical disk. (Bug#10284)
10130
10131 2012-01-07 David Benjamin <davidben@mit.edu> (tiny change)
10132
10133 * xterm.c (x_embed_request_focus): New function.
10134
10135 * xterm.h: Add prototype.
10136
10137 * xfns.c (Fx_focus_frame): Use it for embedded frames (Bug#9977).
10138
10139 2012-01-05 Glenn Morris <rgm@gnu.org>
10140
10141 * emacs.c (emacs_copyright): Update short copyright year to 2012.
10142
10143 2012-01-01 Eli Zaretskii <eliz@gnu.org>
10144
10145 * gnutls.c (init_gnutls_functions): Load gnutls_check_version.
10146 Load gnutls_transport_set_lowat only if GnuTLS version is below
10147 2.11.1.
10148 (emacs_gnutls_handshake): Call gnutls_transport_set_lowat only for
10149 GnuTLS versions below 2.11.1.
10150
10151 2011-12-31 Antoine Levitt <antoine.levitt@gmail.com>
10152
10153 * xdisp.c (syms_of_xdisp) <window-scroll-functions>: Add warning
10154 to the doc string advising against its use for altering the way
10155 windows are scrolled.
10156
10157 2011-12-28 Kenichi Handa <handa@m17n.org>
10158
10159 * coding.c (Fdefine_coding_system_internal): Make an utf-8 base
10160 coding-system ASCII compatible only when it does not produce BOM
10161 on encoding (Bug#10383).
10162
10163 2011-12-26 Jan Djärv <jan.h.d@swipnet.se>
10164
10165 * xmenu.c (x_menu_wait_for_event): Use xg_select for Gtk3 so menus
10166 can scroll.
10167 (create_and_show_popup_menu): Always use menu_position_func for
10168 Gtk3 (Bug#10361).
10169
10170 2011-12-24 Andreas Schwab <schwab@linux-m68k.org>
10171
10172 * callint.c (Fcall_interactively): Don't truncate prompt string.
10173
10174 2011-12-23 Eli Zaretskii <eliz@gnu.org>
10175
10176 * xdisp.c (handle_invisible_prop): Handle correctly an invisible
10177 property that ends at ZV, so that the bidi iteration could be
10178 resumed from there (after widening). (Bug#10360)
10179
10180 2011-12-22 Jan Djärv <jan.h.d@swipnet.se>
10181
10182 * nsfont.m (ns_spec_to_descriptor): Do not autorelease fdesc.
10183
10184 2011-12-21 Jan Djärv <jan.h.d@swipnet.se>
10185
10186 * nsterm.m (x_free_frame_resources):
10187 Release f->output_data.ns->miniimage.
10188 (ns_index_color): Fix indentation. Do not retain
10189 color_table->colors[i].
10190
10191 * nsmenu.m (ns_update_menubar): Call free_menubar_widget_value_tree
10192 before returning.
10193
10194 * nsfns.m (x_set_background_color): Assign return value from
10195 ns_index_color to face-background instead of NSColor*.
10196 (ns_implicitly_set_icon_type): Fix indentation.
10197 Change assignment in for loop to comparison.
10198
10199 * emacs.c (ns_pool): New variable.
10200 (main): Assign ns_pool.
10201 (Fkill_emacs): Call ns_release_autorelease_pool.
10202
10203 * nsfont.m (ns_spec_to_descriptor): Fix indentation,
10204 autorelease fdesc, release fdAttrs and tdict.
10205 (ns_get_covering_families): Release charset.
10206 (ns_findfonts): Release NSFontDescriptor created with new.
10207 (ns_uni_to_glyphs): Fix indentation.
10208 (setString): Release attrStr before assigning new value.
10209
10210 2011-12-18 Jan Djärv <jan.h.d@swipnet.se>
10211
10212 * nsmenu.m (NSMenuDidBeginTrackingNotification): Declare if OSX < 10.5
10213 and NS_IMPL_COCOA.
10214 (trackingNotification): Surround with ifdef NS_IMPL_COCOA.
10215 (syms_of_nsmenu): Set trackingMenu to 1 if not NS_IMPL_COCOA.
10216
10217 2011-12-18 David Reitter <reitter@cmu.edu>
10218
10219 * nsterm.m (ns_term_init): Subscribe for notifications
10220 NSMenuDidBeginTrackingNotification and NSMenuDidEndTrackingNotification
10221 to method trackingNotification in EmacsMenu.
10222
10223 * nsmenu.m (trackingMenu): New variable.
10224 (trackingNotification): New method (from Aquamacs).
10225 (menuNeedsUpdate): Expand comment and return if trackingMenu is 0,
10226 from Aquamacs (Bug#7030).
10227
10228 2011-12-18 Jan Djärv <jan.h.d@swipnet.se>
10229
10230 * nsselect.m (CUT_BUFFER_SUPPORT): Remove define.
10231 (symbol_to_nsstring): Fix indentation.
10232 (ns_symbol_to_pb): New function.
10233 (Fns_get_selection_internal): Rename from Fns_get_cut_buffer_internal.
10234 (Fns_rotate_cut_buffers_internal): Remove.
10235 (Fns_store_selection_internal): Rename from
10236 Fns_store_cut_buffer_internal.
10237 (ns_get_foreign_selection, Fx_own_selection_internal)
10238 (Fx_disown_selection_internal, Fx_selection_exists_p)
10239 (Fns_get_selection_internal, Fns_store_selection_internal):
10240 Use ns_symbol_to_pb and check if return value is nil.
10241 (syms_of_nsselect): Remove ifdef CUT_BUFFER_SUPPORT. Remove defsubr
10242 Sns_rotate_cut_buffers_internal. Sns_get_cut_buffer_internal
10243 renamed to Sns_get_selection_internal, Sns_store_cut_buffer_internal
10244 renamed to Sns_store_selection_internal.
10245 (ns_handle_selection_request): Move code to Fx_own_selection_internal
10246 and remove this function.
10247 (ns_handle_selection_clear): Remove, never used.
10248 (Fx_own_selection_internal): Move code from ns_handle_selection_request
10249 here.
10250
10251 2011-12-17 Ken Brown <kbrown@cornell.edu>
10252
10253 * fileio.c (check_writable) [CYGWIN]: Return non-zero if UID or
10254 GID is unknown (Bug#10257).
10255
10256 2011-12-17 Paul Eggert <eggert@cs.ucla.edu>
10257
10258 * s/gnu-linux.h: Fix mark_memory typo (Bug#10286).
10259 (GC_MARK_SECONDARY_STACK): Omit removed 3rd arg to mark_memory,
10260 which caused a build failure on GNU/Linux IA-64. This problem was
10261 introduced by my 2011-10-07 patch.
10262
10263 2011-12-15 Juri Linkov <juri@jurta.org>
10264
10265 * image.c (imagemagick_error): New function. (Bug#10112)
10266 (imagemagick_load_image): Comment out `MagickSetResolution' call.
10267 Use `imagemagick_error' where ImageMagick functions return
10268 `MagickFalse'.
10269 (Fimagemagick_types): Add `Fnreverse' to return the list in the
10270 proper order.
10271
10272 2011-12-15 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
10273
10274 * xftfont.c (xftfont_draw): Use the font metrics of s->font to
10275 fill background (Bug#8992).
10276
10277 2011-12-13 Martin Rudalics <rudalics@gmx.at>
10278
10279 * window.c (Vwindow_combination_resize)
10280 (Vwindow_combination_limit): Use t instead of non-nil in
10281 doc-strings.
10282 (Vrecenter_redisplay): Add first sentence of doc-string on
10283 separate line.
10284 (Frecenter): Fix doc-string typo.
10285
10286 2011-12-11 Kenichi Handa <handa@m17n.org>
10287
10288 * coding.c (Funencodable_char_position): Pay attention to the
10289 buffer text relocation (Bug#9389).
10290
10291 2011-12-10 Jan Djärv <jan.h.d@swipnet.se>
10292
10293 * xterm.c (x_term_init): Move call to gdk_window_add_filter before
10294 gtk_init (Bug#10100).
10295
10296 2011-12-10 Eli Zaretskii <eliz@gnu.org>
10297
10298 * xdisp.c (RECORD_MAX_MIN_POS): Use IT->cmp_it.charpos only if
10299 IT->string is nil. (Bug#10263)
10300
10301 2011-12-10 Jan Djärv <jan.h.d@swipnet.se>
10302
10303 * nsterm.h (x_free_frame_resources): Declare.
10304
10305 * nsfns.m (ns_get_defaults_value): New function (Bug#10103).
10306 (Fns_get_resource, x_get_string_resource): Call ns_get_defaults_value.
10307
10308 * nsterm.h (ns_get_defaults_value): Declare.
10309
10310 * nsterm.m (ns_default): Call ns_get_defaults_value.
10311
10312 2011-12-09 Eli Zaretskii <eliz@gnu.org>
10313
10314 * xdisp.c (try_scrolling): Don't set scroll_down_p if dy is zero.
10315 (Bug#10170)
10316
10317 2011-12-09 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
10318
10319 * unexelf.c (unexec) [NS_IMPL_GNUSTEP]: Take account of the case
10320 that where the value of an _OBJC_* symbol points to is in the .bss
10321 section (Bug#10240).
10322
10323 2011-12-08 Kazuhiro Ito <kzhr@d1.dion.ne.jp> (tiny change)
10324
10325 * coding.c (encode_coding_ccl): Check (charbuf < charbuf_end)
10326 after the loop to call ccl_driver at least once (Bug#8619).
10327
10328 2011-12-08 Kenichi Handa <handa@m17n.org>
10329
10330 * ftfont.c (get_adstyle_property): Fix previous change
10331 (Bug#10233).
10332
10333 2011-12-07 Juanma Barranquero <lekktu@gmail.com>
10334
10335 * w32.c (init_environment): If no_site_lisp, remove site-lisp
10336 dirs from the default value of EMACSLOADPATH (bug#10208).
10337
10338 2011-12-07 Glenn Morris <rgm@gnu.org>
10339
10340 * lread.c (init_lread): If no_site_lisp, exclude site-lisp/ in
10341 installation and source directories as well. (Bug#10208)
10342
10343 2011-12-06 Chong Yidong <cyd@gnu.org>
10344
10345 * minibuf.c (Fread_from_minibuffer): Doc fix (Bug#10228).
10346
10347 2011-12-06 Glenn Morris <rgm@gnu.org>
10348
10349 * process.c (start_process_unwind): Treat any pid <= 0, except -2,
10350 as an error, not just -1. (Bug#10217)
10351
10352 2011-12-05 Chong Yidong <cyd@gnu.org>
10353
10354 * keyboard.c (process_special_events): New function.
10355 (swallow_events, Finput_pending_p): Use it (Bug#10195).
10356
10357 2011-12-05 Paul Eggert <eggert@cs.ucla.edu>
10358
10359 * coding.c (encode_designation_at_bol): Don't use uninitialized
10360 local variable (Bug#9318).
10361
10362 2011-12-05 Kenichi Handa <handa@m17n.org>
10363
10364 * ftfont.c (get_adstyle_property): If the font is not BDF nor PCF,
10365 return Qnil (Bug#8046, Bug#10193).
10366
10367 2011-12-05 Kenichi Handa <handa@m17n.org>
10368
10369 * coding.c (encode_designation_at_bol): New args charbuf_end and
10370 dst. Return the number of produced bytes. Callers changed.
10371 (coding_set_source): Return how many bytes coding->source was
10372 relocated.
10373 (coding_set_destination): Return how many bytes
10374 coding->destination was relocated.
10375 (CODING_DECODE_CHAR, CODING_ENCODE_CHAR, CODING_CHAR_CHARSET)
10376 (CODING_CHAR_CHARSET_P): Adjust for the avove changes.
10377
10378 2011-12-05 Kazuhiro Ito <kzhr@d1.dion.ne.jp> (tiny change)
10379
10380 * coding.c (CODING_CHAR_CHARSET_P): New macro.
10381 (encode_coding_emacs_mule, encode_coding_iso_2022): Use the above
10382 macro (Bug#9318).
10383
10384 2011-12-05 Andreas Schwab <schwab@linux-m68k.org>
10385
10386 The following changes are to fix Bug#9318.
10387
10388 * coding.c (CODING_ENCODE_CHAR, CODING_CHAR_CHARSET): New macros.
10389 (encode_coding_emacs_mule, ENCODE_ISO_CHARACTER)
10390 (encode_coding_iso_2022, encode_coding_sjis)
10391 (encode_coding_big5, encode_coding_charset): Use the above macros.
10392
10393 2011-12-05 Juanma Barranquero <lekktu@gmail.com>
10394
10395 * lisp.h (process_quit_flag): Fix external declaration.
10396
10397 2011-12-04 Stefan Monnier <monnier@iro.umontreal.ca>
10398
10399 Don't macro-inline non-performance-critical code.
10400 * eval.c (process_quit_flag): New function.
10401 * lisp.h (QUIT): Use it.
10402
10403 2011-12-04 Jan Djärv <jan.h.d@swipnet.se>
10404
10405 * nsfns.m (get_geometry_from_preferences): New function.
10406 (Fx_create_frame): Call get_geometry_from_preferences (Bug#10103).
10407
10408 2011-12-04 Andreas Schwab <schwab@linux-m68k.org>
10409
10410 * emacs.c (Qkill_emacs): Define.
10411 (syms_of_emacs): Initialize it.
10412 * keyboard.c (interrupt_signal): Don't call Fkill_emacs here, set
10413 Qquit_flag to `kill-emacs' instead.
10414 (quit_throw_to_read_char): Add parameter `from_signal'.
10415 All callers changed. Call Fkill_emacs if requested and safe.
10416 * lisp.h (QUIT): Call Fkill_emacs if requested.
10417
10418 2011-12-03 Jan Djärv <jan.h.d@swipnet.se>
10419
10420 * widget.c (update_wm_hints): Return if wmshell is null.
10421 (widget_update_wm_size_hints): New function.
10422
10423 * widget.h (widget_update_wm_size_hints): Declare.
10424
10425 * xterm.c (x_wm_set_size_hint): If USE_X_TOOLKIT, call
10426 widget_update_wm_size_hints (Bug#10104).
10427
10428 2011-12-03 Eli Zaretskii <eliz@gnu.org>
10429
10430 * xdisp.c (handle_invisible_prop): If the invisible text ends just
10431 before a newline, prepare the bidi iterator for consuming the
10432 newline, and keep the current paragraph direction. (Bug#10183)
10433 (redisplay_window): Don't let `margin' become negative. (Bug#10192)
10434
10435 2011-12-02 Juri Linkov <juri@jurta.org>
10436
10437 * search.c (Fword_search_regexp): New Lisp function created from
10438 `wordify'. Change type of arg `lax' from `int' to `Lisp_Object'.
10439 (Fword_search_backward, Fword_search_forward)
10440 (Fword_search_backward_lax, Fword_search_forward_lax):
10441 Use `Fword_search_regexp' instead of `wordify'. Doc fix.
10442 (syms_of_search): Define `Sword_search_regexp'. (Bug#10145)
10443
10444 2011-12-01 Stefan Monnier <monnier@iro.umontreal.ca>
10445
10446 * fileio.c (Finsert_file_contents): Move after-change-function call
10447 to before the "handled:" label, since all "goto handled" appear in
10448 cases where the *-change-functions have already been properly called
10449 (bug#10117).
10450
10451 2011-12-01 Andreas Schwab <schwab@linux-m68k.org>
10452
10453 * keyboard.c (interrupt_signal): Don't call kill-emacs when
10454 waiting for input. (Bug#10169)
10455
10456 2011-11-30 Eli Zaretskii <eliz@gnu.org>
10457
10458 * dispnew.c (adjust_glyph_matrix): Remove the assertion that
10459 verifies glyph row's hash code--we have just reallocated the
10460 glyphs, so their contents can be complete garbage. (Bug#10164)
10461
10462 2011-11-30 Juanma Barranquero <lekktu@gmail.com>
10463
10464 * dispnew.c (adjust_glyph_matrix) [XASSERTS]: Add missing check.
10465
10466 2011-11-30 Eli Zaretskii <eliz@gnu.org>
10467
10468 * dispnew.c (adjust_glyph_matrix) [XASSERTS]: Ensure ROW's
10469 attributes are tested _before_ calling verify_row_hash, to protect
10470 against GCC re-ordering of the tests. (Bug#10164)
10471
10472 2011-11-29 Jan Djärv <jan.h.d@swipnet.se>
10473
10474 * xterm.h (struct x_output): net_wm_state_hidden_seen is new.
10475
10476 * xterm.c (handle_one_xevent): Only set async_visible and friends
10477 if net_wm_state_hidden_seen is non-zero (Bug#10002)
10478 (get_current_wm_state): Set net_wm_state_hidden_seen to 1 if
10479 _NET_WM_STATE_HIDDEN is in NET_WM_STATE.
10480
10481 2011-11-28 Paul Eggert <eggert@cs.ucla.edu>
10482
10483 Remove GCPRO-related macros that exist only to avoid shadowing locals.
10484 * lisp.h (GCPRO1_VAR, GCPRO2_VAR, GCPRO3_VAR, GCPRO4_VAR, GCPRO5_VAR)
10485 (GCPRO6_VAR, UNGCPRO_VAR): Remove. See
10486 <http://lists.gnu.org/archive/html/emacs-diffs/2011-11/msg00265.html>.
10487 All uses changed to use GCPRO1 etc.
10488 (GCPRO1, GCPRO2, GCPRO3, GCPRO4, GCPRO5, GCPRO6, UNGCPRO):
10489 Revert to old implementation (i.e., before 2011-03-11).
10490
10491 2011-11-28 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
10492
10493 * dispnew.c (scrolling_window): Truncate overlaps in copy destination
10494 of scroll runs so as to avoid assigning disabled bogus rows and
10495 unnecessary graphics copy operations.
10496
10497 2011-11-27 Eli Zaretskii <eliz@gnu.org>
10498
10499 * s/ms-w32.h (utimbuf) [_MSC_VER]: Don't define.
10500 (snprintf) [_MSC_VER]: Redirect to _snprintf.
10501 (strtoll) [_MSC_VER]: Redirect to _strtoi64.
10502 (malloc, free, realloc, calloc): Redirect to e_* only when
10503 compiling Emacs.
10504
10505 * lisp.h (GCTYPEBITS): Move before first use.
10506 (ALIGN_GCTYPEBITS) [_MSC_VER]: Define.
10507 (DECL_ALIGN) [_MSC_VER]: Use it, as MSVC doesn't like bit ops in
10508 this macro definition.
10509
10510 * s/ms-w32.h (tzname): Redirect to _tzname for all values of
10511 _MSC_VER.
10512
10513 2011-11-27 Jan Djärv <jan.h.d@swipnet.se>
10514
10515 * gtkutil.c (xg_create_frame_widgets):
10516 Call gtk_window_set_has_resize_grip (FALSE) if that function is
10517 present with Gtk+ 2.0.
10518
10519 2011-11-26 Paul Eggert <eggert@cs.ucla.edu>
10520
10521 * fileio.c (Finsert_file_contents): Undo previous change; see
10522 <http://lists.gnu.org/archive/html/emacs-diffs/2011-11/msg00265.html>.
10523
10524 2011-11-26 Paul Eggert <eggert@cs.ucla.edu>
10525
10526 Rename locals to avoid shadowing.
10527 * fileio.c (Finsert_file_contents):
10528 Rename inner 'gcpro1' to 'inner_gcpro1' to avoid shadowing.
10529 * process.c (wait_reading_process_output):
10530 Rename inner 'proc' to 'p' to avoid shadowing.
10531 Indent for consistency with usual Emacs style.
10532
10533 2011-11-25 Eli Zaretskii <eliz@gnu.org>
10534
10535 * xdisp.c (redisplay_window): If cursor row is not fully visible
10536 after recentering, and scroll-conservatively is set to a large
10537 number, scroll window by a few more lines to make the cursor fully
10538 visible and out of scroll-margin. (Bug#10105)
10539 (start_display): Don't move to the next line if the display should
10540 start at a newline that is part of a display vector or an overlay
10541 string. (Bug#10119)
10542
10543 2011-11-24 Juri Linkov <juri@jurta.org>
10544
10545 * image.c (imagemagick_load_image): Move `MagickSetResolution' down
10546 after the `MagickPingImage' call. (Bug#10112)
10547
10548 2011-11-23 Chong Yidong <cyd@gnu.org>
10549
10550 * window.c (Fcoordinates_in_window_p): Accept only live windows.
10551
10552 2011-11-23 Martin Rudalics <rudalics@gmx.at>
10553
10554 * buffer.c (Fkill_buffer): Run replace_buffer_in_windows before
10555 making another buffer current. (Bug#10114)
10556
10557 2011-11-23 Glenn Morris <rgm@gnu.org>
10558
10559 * font.c (font_find_for_lface) [HAVE_NS]: Ignore case. (Bug#2526)
10560
10561 2011-11-23 Chong Yidong <cyd@gnu.org>
10562
10563 * xdisp.c (compute_stop_pos): Check validity of end_charpos before
10564 using it (Bug#5984).
10565
10566 2011-11-22 Eli Zaretskii <eliz@gnu.org>
10567
10568 * dispnew.c (adjust_glyph_matrix): Don't verify hash code of mode-
10569 and header-lines, as they don't have one computed for them.
10570 (Bug#10098)
10571
10572 * .gdbinit (prow): Make displayed values more self-explaining.
10573 Add row's hash code.
10574
10575 2011-11-21 Lars Magne Ingebrigtsen <larsi@gnus.org>
10576
10577 * process.c (wait_reading_process_output): Fix asynchrounous
10578 GnuTLS socket handling on some versions of the GnuTLS library.
10579 (wait_reading_process_output): Add comment and URL.
10580
10581 2011-11-21 Jan Djärv <jan.h.d@swipnet.se>
10582
10583 * xterm.c (x_clear_frame): Reinstate the XClearWindow call.
10584
10585 2011-11-21 Chong Yidong <cyd@gnu.org>
10586
10587 * window.c (Fnext_window, Fprevious_window): Doc fix.
10588
10589 2011-11-20 Stefan Monnier <monnier@iro.umontreal.ca>
10590
10591 * window.c (get_phys_cursor_glyph): Fix Lisp_Object/int mixup.
10592
10593 2011-11-20 Juanma Barranquero <lekktu@gmail.com>
10594
10595 * nsfont.m (syms_of_nsfont) <ns-reg-to-script>: Fix typo.
10596
10597 2011-11-20 Martin Rudalics <rudalics@gmx.at>
10598
10599 * window.c (Fset_window_combination_limit): Rename argument
10600 STATUS to LIMIT.
10601 (Vwindow_combination_limit): Remove "status" from doc-string.
10602
10603 2011-11-20 Andreas Schwab <schwab@linux-m68k.org>
10604
10605 * m/ibms390.h: Remove.
10606 * m/ibms390x.h: Don't include "ibms390.h".
10607
10608 2011-11-20 Stefan Monnier <monnier@iro.umontreal.ca>
10609
10610 * fileio.c (Finsert_file_contents): Add missing gcpro1 variable.
10611 Suggested by Dmitry Antipov <dmantipov@yandex.ru>.
10612
10613 2011-11-20 Juanma Barranquero <lekktu@gmail.com>
10614
10615 * casetab.c (Fset_case_table):
10616 * charset.c (Fcharset_after): Fix typos.
10617
10618 2011-11-20 Paul Eggert <eggert@cs.ucla.edu>
10619
10620 Standardize on VIRT_ADDR_VARIES behavior (Bug#10042).
10621 Otherwise, valgrind does not work on some platforms.
10622 Problem reported by Andreas Schwab in
10623 <http://lists.gnu.org/archive/html/emacs-devel/2011-11/msg00081.html>.
10624 * puresize.h (pure, PURE_P): Always behave as if VIRT_ADDR_VARIES
10625 is set, removing the need for VIRT_ADDRESS_VARIES.
10626 (PURE_P): Use a more-efficient implementation that needs just one
10627 comparison, not two: on x86-64 with GCC 4.6.2, this cut down the
10628 number of instructions from 6 (xorl, cmpq, jge, xorl, cmpq, setge)
10629 to 4 (xorl, subq, cmpq, setbe).
10630 * alloc.c (pure): Always extern now, since that's the
10631 VIRT_ADDR_VARIES behavior.
10632 (PURE_POINTER_P): Use a single comparison, not two, for
10633 consistency with the new puresize.h.
10634 * lisp.h (PNTR_COMPARISON_TYPE): Remove; no longer needed.
10635 * m/ibms390.h, m/intel386.h, m/template.h, s/cygwin.h, s/hpux10-20.h:
10636 Remove VIRT_ADDR_VARIES no longer needed.
10637
10638 2011-11-19 Eli Zaretskii <eliz@gnu.org>
10639
10640 * xdisp.c (x_write_glyphs, draw_phys_cursor_glyph)
10641 (erase_phys_cursor, update_window_cursor, show_mouse_face)
10642 (cursor_in_mouse_face_p): If the cursor position is out of bounds,
10643 behave as if the cursor position were at the window margin.
10644
10645 * window.c (get_phys_cursor_glyph): If the window is hscrolled,
10646 and the cursor position is out of bounds, behave as if the cursor
10647 position were at the window margin. (Bug#10075)
10648
10649 2011-11-18 Chong Yidong <cyd@gnu.org>
10650
10651 * window.c (Fwindow_combination_limit): Make first argument
10652 non-optional, since it is meaningless for live windows like the
10653 selected window.
10654
10655 2011-11-18 Dmitry Antipov <dmantipov@yandex.ru>
10656
10657 * keymap.c (Fwhere_is_internal): Add missing RETURN_UNGCPROs.
10658
10659 2011-11-18 Stefan Monnier <monnier@iro.umontreal.ca>
10660
10661 * intervals.c: Fix grafting over the whole buffer (bug#10071).
10662 (graft_intervals_into_buffer): Simplify.
10663
10664 2011-11-18 Eli Zaretskii <eliz@gnu.org>
10665
10666 * dispnew.c (swap_glyph_pointers): Swap the used[] arrays and the
10667 hash values of the two rows.
10668 (copy_row_except_pointers): Preserve the used[] arrays and the
10669 hash values of the two rows. (Bug#10035)
10670 (add_row_entry): Add xassert to verify that ROW's hash code is valid.
10671
10672 * xdisp.c (row_hash): New function, body extracted from
10673 compute_line_metrics.
10674 (compute_line_metrics): Call row_hash, instead of computing the
10675 hash code inline.
10676
10677 * dispnew.c (verify_row_hash): Call row_hash for computing the
10678 hash code of a row, instead of duplicating code from xdisp.c.
10679
10680 * dispextern.h (row_hash): Add prototype.
10681
10682 2011-11-18 Tassilo Horn <tassilo@member.fsf.org>
10683
10684 * frame.c (delete_frame): Don't delete the terminal when the last
10685 X frame is closed if emacs is built with GTK toolkit.
10686
10687 2011-11-17 Juanma Barranquero <lekktu@gmail.com>
10688
10689 * window.c (syms_of_window) <window-combination-resize>: Fix typo.
10690
10691 2011-11-17 Martin Rudalics <rudalics@gmx.at>
10692
10693 * window.c (Vwindow_splits): Rename to
10694 Vwindow_combination_resize. Suggested by Juri Linkov.
10695 (Fsplit_window_internal): Use Vwindow_combination_resize instead
10696 of Vwindow_splits.
10697
10698 2011-11-16 Juanma Barranquero <lekktu@gmail.com>
10699
10700 * nsfns.m (Fns_font_name):
10701 * window.c (syms_of_window) <window-combination-limit>: Fix typos.
10702
10703 2011-11-16 Martin Rudalics <rudalics@gmx.at>
10704
10705 * window.h (window): Rename slot "nest" to "combination_limit".
10706 * window.c (Fwindow_nest): Rename to Fwindow_combination_limit.
10707 (Fset_window_nest): Rename to Fset_window_combination_limit.
10708 (Vwindow_nest): Rename to Vwindow_combination_limit.
10709 (recombine_windows, make_parent_window, make_window)
10710 (Fsplit_window_internal, saved_window)
10711 (Fset_window_configuration, save_window_save): Rename all
10712 occurrences of window_nest to window_combination_limit.
10713
10714 2011-11-15 Juanma Barranquero <lekktu@gmail.com>
10715
10716 * image.c (imagemagick_load_image): Fix typo.
10717
10718 2011-11-14 Eli Zaretskii <eliz@gnu.org>
10719
10720 * xdisp.c (display_line): Move the call to
10721 highlight_trailing_whitespace before the call to
10722 compute_line_metrics, since the latter needs to see the final
10723 faces of all the glyphs to compute ROW's hash value.
10724 Fixes assertion violations in row_equal_p. (Bug#10035)
10725
10726 2011-11-14 Juanma Barranquero <lekktu@gmail.com>
10727
10728 * w32proc.c (reader_thread): Don't check pending input if cp->fd < 0,
10729 just return (bug#10044).
10730
10731 2011-11-12 Eli Zaretskii <eliz@gnu.org>
10732
10733 * makefile.w32-in (HEAPSIZE): New variable, allows to build temacs
10734 with user-defined heap size. Bump the default size of the temacs
10735 heap to 27MB, to avoid memory warning when running temacs.
10736 ($(TEMACS)): Use HEAPSIZE instead of a hardcoded value.
10737
10738 * dispnew.c (scrolling_window): Fix incorrect indices in accessing
10739 current_matrix and desired_matrix. (Bug#9990)
10740 (verify_row_hash) [XASSERTS]: New function.
10741 (adjust_glyph_matrix, row_equal_p): Use it in xassert to verify
10742 that the hash value of glyph rows is correct.
10743
10744 2011-11-12 Martin Rudalics <rudalics@gmx.at>
10745
10746 * window.h (window): Remove splits slot.
10747 * window.c (Fwindow_splits, Fset_window_splits): Remove.
10748 (Fdelete_other_windows_internal, make_parent_window)
10749 (make_window, Fsplit_window_internal, Fdelete_window_internal)
10750 (Fset_window_configuration, save_window_save): Don't deal with
10751 split status of windows.
10752 (saved_window): Remove splits slot.
10753 (Vwindow_splits): Rewrite doc-string.
10754
10755 2011-11-11 Jan Djärv <jan.h.d@swipnet.se>
10756
10757 * xfns.c (unwind_create_frame):
10758 * nsfns.m (unwind_create_frame):
10759 * w32fns.c (unwind_create_frame): Use Fmemq to check if frame is in
10760 Vframe_list (Bug#9999).
10761
10762 2011-11-11 Dmitry Antipov <dmantipov@yandex.ru>
10763
10764 * xdisp.c (syms_of_xdisp): Remove duplicated definition of Qtext.
10765
10766 2011-11-11 Kenichi Handa <handa@m17n.org>
10767
10768 * callproc.c (Fcall_process): Set the member dst_multibyte of
10769 process_coding.
10770
10771 2011-11-11 Johan Bockgård <bojohan@gnu.org>
10772
10773 * xdisp.c (fill_composite_glyph_string): Always set s->face, to
10774 avoid a crash (bug#9496).
10775
10776 2011-11-09 Chong Yidong <cyd@gnu.org>
10777
10778 * window.c (Fwindow_inside_edges, Fwindow_inside_pixel_edges)
10779 (Fwindow_inside_absolute_pixel_edges): Only allow live windows.
10780
10781 2011-11-08 Paul Eggert <eggert@cs.ucla.edu>
10782
10783 * s/gnu.h (GC_MARK_STACK): Define to GC_MAKE_GCPROS_NOOPS (Bug#9926).
10784
10785 2011-11-08 Paul Eggert <eggert@cs.ucla.edu>
10786
10787 Avoid some portability problems by eschewing 'extern inline' functions.
10788 The trivial performance wins aren't worth the portability hassles; see
10789 <http://lists.gnu.org/archive/html/emacs-devel/2011-11/msg00084.html>
10790 et seq.
10791 * dispextern.h (window_box, window_box_height, window_text_bottom_y)
10792 (window_box_width, window_box_left, window_box_left_offset)
10793 (window_box_right, window_box_right_offset): Undo previous change,
10794 by removing the "extern"s.
10795 * intervals.c (adjust_intervals_for_insertion)
10796 (adjust_intervals_for_deletion): Undo previous change,
10797 making these static again.
10798 (offset_intervals, temp_set_point_both, temp_set_point)
10799 (copy_intervals_to_string): No longer inline.
10800 * xdisp.c (window_text_bottom_y, window_box_width)
10801 (window_box_height, window_box_left_offset)
10802 (window_box_right_offset, window_box_left, window_box_right)
10803 (window_box): No longer inline.
10804
10805 2011-11-08 Chong Yidong <cyd@gnu.org>
10806
10807 * window.c (Fwindow_left_column, Fwindow_top_line): Doc fix.
10808 (Fwindow_body_height, Fwindow_body_width): Move from Lisp.
10809 Signal an error if not a live window.
10810 (Fwindow_total_width, Fwindow_total_height): Move from Lisp.
10811 (Fwindow_total_size, Fwindow_body_size): Move to Lisp.
10812
10813 2011-11-07 Juanma Barranquero <lekktu@gmail.com>
10814
10815 * lisp.h (syms_of_abbrev): Remove declaration.
10816 Reported by CHENG Gao <chenggao@royau.me>.
10817
10818 2011-11-07 Eli Zaretskii <eliz@gnu.org>
10819
10820 * w32.c (check_windows_init_file): Don't look for term/w32-win.el
10821 if Vpurify_flag is non-nil. Fixes a crash when running w32 build
10822 of temacs in GUI mode.
10823
10824 2011-11-07 Martin Rudalics <rudalics@gmx.at>
10825
10826 * window.h: Declare delete_all_child_windows instead of
10827 delete_all_subwindows.
10828 * window.c (Fwindow_nest, Fset_window_nest)
10829 (Fset_window_new_total, Fset_window_new_normal)
10830 (Fwindow_resize_apply): Don't use term subwindow in doc-strings.
10831 (delete_all_subwindows): Rename to delete_all_child_windows.
10832 (Fdelete_other_windows_internal, Fset_window_configuration):
10833 Call delete_all_child_windows instead of delete_all_subwindows.
10834 * frame.c (delete_frame): Call delete_all_child_windows instead
10835 of delete_all_subwindows.
10836
10837 2011-11-07 Paul Eggert <eggert@cs.ucla.edu>
10838
10839 * alloc.c (DEADP): New macro, for porting to GNU/Hurd (Bug#9926).
10840 This is also needed for porting to any host where GC_MARK_STACK is
10841 not GC_MAKE_GCPROS_NOOPS.
10842 (which_symbols): Use it.
10843
10844 2011-11-07 Kenichi Handa <handa@m17n.org>
10845
10846 * coding.c (coding_set_destination): Check coding->src_pos only
10847 when coding->src_object is a buffer (bug#9910).
10848
10849 * process.c (send_process): Set the member src_multibyte of coding
10850 to 0 (bug#9911) when sending a unibyte text.
10851
10852 * callproc.c (Fcall_process): Set the member src_multibyte of
10853 process_coding to 0 (bug#9912).
10854
10855 2011-11-06 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
10856
10857 * xmenu.c (cleanup_widget_value_tree): New function.
10858 (xmenu_show, xdialog_show): Use it in record_unwind_protect instead of
10859 calling free_menubar_widget_value_tree directly (Bug#9830).
10860
10861 2011-11-06 Paul Eggert <eggert@cs.ucla.edu>
10862
10863 Fix some portability problems with 'inline'.
10864 * dispextern.h (window_box, window_box_height, window_text_bottom_y)
10865 (window_box_width, window_box_left, window_box_left_offset)
10866 (window_box_right, window_box_right_offset): Declare extern.
10867 Otherwise, these inline functions do not conform to C99 and
10868 are miscompiled by Microsoft compilers. Reported by Eli Zaretskii in
10869 <http://lists.gnu.org/archive/html/emacs-devel/2011-11/msg00084.html>.
10870 * intervals.c (adjust_intervals_for_insertion)
10871 (adjust_intervals_for_deletion): Now extern, because otherwise the
10872 extern inline functions 'offset_intervals' couldn't refer to it.
10873 (static_offset_intervals): Remove.
10874 (offset_intervals): Rewrite using the old contents of
10875 static_offset_intervals. The old version didn't conform to C99
10876 because an extern inline function contained a reference to an
10877 identifier with static linkage.
10878
10879 2011-11-06 Andreas Schwab <schwab@linux-m68k.org>
10880
10881 * keyboard.c (interrupt_signal): Don't call kill-emacs while in
10882 GC.
10883
10884 2011-11-06 Eli Zaretskii <eliz@gnu.org>
10885
10886 * xdisp.c (init_iterator, reseat_to_string): Don't set the
10887 iterator's bidi_p flag if Vpurify_flag is non-nil. (Bug#9963)
10888 (Fcurrent_bidi_paragraph_direction): If Vpurify_flag is non-nil,
10889 return Qleft_to_right.
10890
10891 2011-11-06 Chong Yidong <cyd@gnu.org>
10892
10893 * window.c (Fwindow_live_p, Fwindow_frame, Fframe_root_window)
10894 (Fminibuffer_window, Fwindow_buffer, Fwindow_splits)
10895 (Fset_window_splits, Fwindow_nest, Fset_window_nest)
10896 (Fwindow_use_time, Fwindow_total_size, Fwindow_normal_size)
10897 (Fwindow_new_normal, Fwindow_left_column, Fwindow_top_line)
10898 (Fwindow_margins, Fwindow_fringes, Fwindow_scroll_bars)
10899 (Fwindow_vscroll): Doc fix.
10900 (Fwindow_top_child, Fwindow_left_child): Eliminate a nil default
10901 argument, since it makes no sense to pass a live window and for
10902 consistency with window-child.
10903
10904 2011-11-05 Christoph Scholtes <cschol2112@googlemail.com>
10905
10906 * makefile.w32-in ($(TEMACS), (gl-stamp)): Use $(THISDIR) to
10907 support MSVC.
10908
10909 2011-11-05 Jason Rumney <jasonr@gnu.org>
10910
10911 * w32font.c (font_matches_spec): Filter out non-Japanese kana fonts.
10912 (add_font_entity_to_list): Filter out non-Japanese Shift-JIS
10913 fonts (Bug#6029).
10914 (add_font_entity_to_list): Fix logic errors in mixed boolean and
10915 bitwise arithmetic preventing use of unicode-sip and non-truetype
10916 opentype fonts.
10917
10918 2011-11-05 Eli Zaretskii <eliz@gnu.org>
10919
10920 * s/ms-w32.h (fstat, stat, utime): Move redirections to
10921 "emacs"-only part.
10922
10923 * w32fns.c (x_create_tip_frame, Fx_create_frame): Rearrange
10924 initialization code to keep similarity to xfns.c after changes
10925 from 2011-11-05.
10926
10927 2011-11-05 Jan Djärv <jan.h.d@swipnet.se>
10928
10929 * nsfns.m: Declare image_cache_refcount if GLYPH_DEBUG.
10930 (unwind_create_frame): New function (Bug#9943).
10931 (Fx_create_frame): Restructure code to be more similar to the one in
10932 xfns.c. Call record_unwind_protect with unwind_create_frame (Bug#9943).
10933 Initialize image_cache_refcount if GLYPH_DEBUG (Bug#9943).
10934 Move terminal->reference_count++ just before making the frame official
10935 (Bug#9943).
10936
10937 * nsterm.m (x_free_frame_resources): New function.
10938 (x_destroy_window): Move code to x_free_frame_resources.
10939
10940 * xfns.c (unwind_create_frame): Fix comment.
10941 (Fx_create_frame, x_create_tip_frame):
10942 Move terminal->reference_count++ just before making the frame
10943 official. Move initialization of image_cache_refcount and
10944 dpyinfo_refcount before calling init_frame_faces (Bug#9943).
10945
10946 2011-11-05 Eli Zaretskii <eliz@gnu.org>
10947
10948 Support MSVC build with newer versions of Visual Studio.
10949 * makefile.w32-in (TAGS-gmake): Don't use $(patsubst ...), as
10950 Nmake barfs on that. Use $(OBJ*_c) variables instead, defined on
10951 nt/gmake.defs.
10952
10953 * lisp.h (ENUM_BF): New macro, for enumerated types in bitfields,
10954 which are not supported by MSVC.
10955 (Lisp_Symbol, Lisp_Misc_Any, Lisp_Marker, Lisp_Misc_Overlay)
10956 (Lisp_Save_Value, Lisp_Free): Use ENUM_BF for enumerated types in
10957 bitfields.
10958 (Lisp_Object) [USE_LISP_UNION_TYPE]: Use ENUM_BF for enumerated
10959 types in bitfields.
10960 (DEFUN) [_MSC_VER]: Define in a different way for MSVC.
10961
10962 * w32fns.c [_MSC_VER]: DECLARE_HANDLE for any MSVC version.
10963
10964 2011-11-05 Fabrice Popineau <fabrice.popineau@supelec.fr> (tiny change)
10965
10966 Support MSVC build with newer versions of Visual Studio.
10967 * w32.c: Don't include w32api.h for MSVC.
10968 (init_environment) [_MSC_VER]: Call sys_access, not _access.
10969
10970 * s/ms-w32.h <sigset_t, ssize_t> [_MSC_VER]: Typedefs for MSVC.
10971 [_MSC_VER]: Include sys/timeb.h, sys/stat.h, and signal.h.
10972 (fstat, stat, utime) [_MSC_VER]: Redirect to their sys_* cousins.
10973 (malloc, free, realloc, calloc) [_MSC_VER]: Always redirect to the
10974 e_* cousins.
10975 (alloca) [_MSC_VER]: Define to _alloca.
10976
10977 * lisp.h (DECL_ALIGN) [_MSC_VER]: Define for MSVC.
10978
10979 * regex.c <re_char> [_MSC_VER]: A separate definition for MSVC.
10980
10981 2011-11-04 Eli Zaretskii <eliz@gnu.org>
10982
10983 * xdisp.c (note_mouse_highlight): If either of
10984 previous/next-single-property-change returns nil, treat that as
10985 the beginning or the end of the buffer. (Bug#9955)
10986
10987 2011-11-04 Jan Djärv <jan.h.d@swipnet.se>
10988
10989 * gtkutil.c (xg_make_tool_item): Add callbacks if one of wimage or
10990 label is not null (Bug#9951).
10991 (xg_tool_item_stale_p): Handle the fact that wimage and/or wlbl
10992 may be NULL.
10993
10994 2011-11-04 Eli Zaretskii <eliz@gnu.org>
10995
10996 * window.c (Fwindow_body_size): Mention in the doc string that the
10997 return value is in frame's canonical units. (Bug#9949)
10998
10999 2011-11-03 Eli Zaretskii <eliz@gnu.org>
11000
11001 * xdisp.c (note_mouse_highlight): Initialize `area'. (Bug#9947)
11002
11003 * w32fns.c (unwind_create_frame): If needed, free the glyph
11004 matrices of the partially constructed frame. (Bug#9943)
11005 * xfns.c (unwind_create_frame): Likewise.
11006
11007 2011-11-01 Eli Zaretskii <eliz@gnu.org>
11008
11009 * xdisp.c (mouse_face_from_buffer_pos): Fix a typo in a comment.
11010 Don't stop backward scan on the continuation glyph, even though
11011 its CHARPOS is positive.
11012 (mouse_face_from_buffer_pos, note_mouse_highlight):
11013 Rename cover_string to disp_string.
11014
11015 2011-11-01 Martin Rudalics <rudalics@gmx.at>
11016
11017 * window.c (temp_output_buffer_show): Don't use
11018 Vtemp_buffer_show_specifiers.
11019 (Vtemp_buffer_show_specifiers): Remove unused variable.
11020
11021 2011-10-30 Eli Zaretskii <eliz@gnu.org>
11022
11023 * xdisp.c (try_cursor_movement): Make sure ROW isn't decremented
11024 past the beginning of the current glyph matrix.
11025
11026 2011-10-30 Adam Sjøgren <asjo@koldfront.dk> (tiny change)
11027
11028 * xterm.c: Include X11/Xproto.h if HAVE_GTK3.
11029 (x_error_handler): Ignore BadMatch for X_SetInputFocus for
11030 HAVE_GTK3 (Bug#9869).
11031
11032 * gtkutil.c (xg_win_to_widget, xg_event_is_for_menubar): Initialize
11033 type to GDK_NOTHING so valgrind does not complain (Bug#9901).
11034
11035 * xterm.h (x_display_info): Add Xatom_net_wm_state_hidden (Bug#9893).
11036
11037 * xterm.c: Declare x_handle_net_wm_state to return int.
11038 (handle_one_xevent): Check if we are iconified but don't have
11039 _NET_WM_STATE_HIDDEN. If do, treat as deiconify (Bug#9893).
11040 (get_current_wm_state): Return non-zero if not hidden,
11041 check for _NET_WM_STATE_HIDDEN (Bug#9893).
11042 (do_ewmh_fullscreen): Ignore return value from get_current_wm_state.
11043 (x_handle_net_wm_state): Return what get_current_wm_state returns.
11044 (x_term_init): Initialize dpyinfo->Xatom_net_wm_state_hidden.
11045
11046 2011-10-29 Paul Eggert <eggert@cs.ucla.edu>
11047
11048 * alloc.c (which_symbols): Declare EXTERNALLY_VISIBLE,
11049 so that this new function doesn't get optimized away by a
11050 whole-program optimizer. Make the 2nd arg EMACS_INT, not int.
11051
11052 2011-10-29 Andreas Schwab <schwab@linux-m68k.org>
11053
11054 * frame.h (MOUSE_HL_INFO): Remove excess parens.
11055
11056 2011-10-29 Eli Zaretskii <eliz@gnu.org>
11057
11058 Fix the `xbytecode' command.
11059 * .gdbinit (xprintbytestr): New command.
11060 (xwhichsymbols): Rename from `which'; all callers changed.
11061 (xbytecode): Print the byte-code string as well.
11062
11063 2011-10-29 Kim Storm <storm@cua.dk>
11064
11065 * alloc.c (which_symbols): New function.
11066
11067 2011-10-29 Andreas Schwab <schwab@linux-m68k.org>
11068
11069 * minibuf.c (read_minibuf_noninteractive): Allow reading empty
11070 line. (Bug#9903)
11071
11072 2011-10-29 Glenn Morris <rgm@gnu.org>
11073
11074 * process.c (wait_reading_process_output): Revert 2009-08-30 change.
11075 Not clear what it was for, and it causes various bugs. (Bug#9839)
11076
11077 2011-10-28 Eli Zaretskii <eliz@gnu.org>
11078
11079 * xdisp.c (note_mouse_highlight): Initialize `part', to avoid a
11080 possible random value that matches one of those tested as
11081 condition to clear the mouse face.
11082
11083 2011-10-28 Chong Yidong <cyd@gnu.org>
11084
11085 * xdisp.c (note_mouse_highlight): Fix use of uninitialized var.
11086
11087 2011-10-28 Dan Nicolaescu <dann@ics.uci.edu>
11088
11089 * window.c (make_window): Initialize phys_cursor_on_p.
11090
11091 2011-10-28 Stefan Monnier <monnier@iro.umontreal.ca>
11092
11093 * lisp.h (struct Lisp_Symbol): Update comments.
11094
11095 2011-10-28 Juanma Barranquero <lekktu@gmail.com>
11096
11097 * w32font.c (w32_load_unicows_or_gdi32): Add missing return.
11098
11099 2011-10-28 Eli Zaretskii <eliz@gnu.org>
11100
11101 Fix Emacs on Windows 9X (bug#8562). Thanks to oslsachem
11102 <oslsachem@gmail.com> for helping to debug this.
11103
11104 * w32font.c (g_b_init_is_w9x, g_b_init_get_outline_metrics_w)
11105 (g_b_init_get_text_metrics_w, g_b_init_get_glyph_outline_w)
11106 (g_b_init_get_glyph_outline_w): New static variables.
11107 (GetOutlineTextMetricsW_Proc, GetTextMetricsW_Proc)
11108 (GetGlyphOutlineW_Proc): New typedefs.
11109 (w32_load_unicows_or_gdi32, get_outline_metrics_w)
11110 (get_text_metrics_w, get_glyph_outline_w, globals_of_w32font):
11111 New functions.
11112 (w32font_open_internal, compute_metrics):
11113 Call get_outline_metrics_w, get_text_metrics_w, and get_glyph_outline_w
11114 instead of calling the "wide" APIs directly.
11115
11116 * emacs.c (main) [HAVE_NTGUI]: Call globals_of_w32font.
11117
11118 * w32.h (syms_of_w32font): Add prototype.
11119
11120 2011-10-27 Juanma Barranquero <lekktu@gmail.com>
11121
11122 * window.c (Fframe_root_window, Fframe_first_window, Fwindow_end)
11123 (Fframe_selected_window, Ftemp_output_buffer_show, Fnext_window)
11124 (Fdelete_window_internal, Fwindow_parameters): Fix typos in docstrings.
11125 (Fmove_to_window_line): Doc fix.
11126
11127 2011-10-27 Chong Yidong <cyd@gnu.org>
11128
11129 * process.c (make_process): Set gnutls_state to NULL.
11130
11131 * gnutls.c (emacs_gnutls_deinit): Deinit the gnutls_state if it is
11132 non-NULL, regardless of GNUTLS_INITSTAGE.
11133 (Fgnutls_boot): Cleanups. Call emacs_gnutls_deinit if we signal
11134 an error. Set process slots as soon as we allocate them.
11135
11136 * gnutls.h (GNUTLS_LOG, GNUTLS_LOG2): Fix macros.
11137
11138 2011-10-27 Chong Yidong <cyd@gnu.org>
11139
11140 * gnutls.c (emacs_gnutls_deinit): New function.
11141 Deallocate credentials structures as well as calling gnutls_deinit.
11142 (Fgnutls_deinit, Fgnutls_boot): Use it.
11143
11144 * process.c (make_process): Initialize GnuTLS credentials to NULL.
11145 (deactivate_process): Call emacs_gnutls_deinit.
11146
11147 2011-10-27 Juanma Barranquero <lekktu@gmail.com>
11148
11149 * image.c (x_create_x_image_and_pixmap):
11150 * w32.c (sys_rename, w32_delayed_load):
11151 * w32font.c (fill_in_logfont):
11152 * w32reg.c (x_get_string_resource): Silence compiler warnings.
11153
11154 2011-10-26 Juanma Barranquero <lekktu@gmail.com>
11155
11156 * w32fns.c (w32_default_color_map): New function,
11157 extracted from Fw32_default_color_map.
11158 (Fw32_default_color_map, Fx_open_connection): Use it. (Bug#9785)
11159
11160 2011-10-25 Paul Eggert <eggert@cs.ucla.edu>
11161
11162 * dispextern.h (Fcontrolling_tty_p): New decl (Bug#6649 part 2).
11163
11164 2011-10-25 Stefan Monnier <monnier@iro.umontreal.ca>
11165
11166 * keyboard.c (test_undefined): New function (bug#9751).
11167 (read_key_sequence): Use it to detect when a key is bound to `undefined'.
11168
11169 2011-10-25 Enami Tsugutomo <tsugutomo.enami@jp.sony.com>
11170
11171 * sysdep.c (init_sys_modes): Fix the check for the controlling
11172 terminal (Bug#6649).
11173
11174 2011-10-20 Eli Zaretskii <eliz@gnu.org>
11175
11176 * dispextern.h (struct bidi_it): New member next_en_type.
11177
11178 * bidi.c (bidi_line_init): Initialize the next_en_type member.
11179 (bidi_resolve_explicit_1): When next_en_pos is valid for the
11180 current character, check also for next_en_type being WEAK_EN.
11181 (bidi_resolve_weak): Don't enter the expensive loop if the current
11182 position is before next_en_pos. Record the bidi type of the first
11183 non-ET, non-BN character we find, in addition to its position.
11184 (bidi_level_of_next_char): Invalidate next_en_type when
11185 next_en_pos is over-stepped.
11186
11187 2011-10-20 Paul Eggert <eggert@cs.ucla.edu>
11188
11189 Time zone name fixes for non-ASCII locales (Bug#641, Bug#9794)
11190 * editfns.c: Rewrite current-time-zone so that it invokes
11191 the equivalent of (format-time-string "%Z") to get the time zone name.
11192 This fixes a bug when the time zone name contains characters that
11193 need converting from the system time locale to Emacs internal format.
11194 This fixes a shortcoming that I introduced in my 1999-10-19 patch:
11195 that patch fixed format-time-string to do the conversion, but
11196 I forgot to fix current-time-zone.
11197 (format_time_string): New function, containing most of
11198 what Fformat_time_string used to contain.
11199 (Fformat_time_string): Rewrite in terms of format_time_string.
11200 This doesn't change this function's behavior.
11201 (current-time-zone): Rewrite to use format_time_string.
11202 This fixes the bug reported by Michael Schierl in
11203 <http://lists.gnu.org/archive/html/emacs-devel/2007-06/msg00334.html>.
11204 Jason Rumney's 2007-06-07 change worked around this bug, but
11205 didn't fix it.
11206 * systime.h (tzname, timezone): Remove no-longer-used declarations.
11207
11208 2011-10-19 Eli Zaretskii <eliz@gnu.org>
11209
11210 * xdisp.c (start_display): If the character at POS is displayed
11211 via a display vector, reset IT->current.dpvec_index to zero.
11212 (try_window_reusing_current_matrix): If a line ends in a display
11213 vector or the next line starts in a display vector, continue
11214 redrawing the window even though the character position of
11215 start_row was reached.
11216 (Bug#9771, part 2)
11217
11218 2011-10-18 Chong Yidong <cyd@gnu.org>
11219
11220 * xdisp.c (get_next_display_element): Handle U+2010 and U+2011
11221 with nobreak-char-display too.
11222
11223 2011-10-18 Eli Zaretskii <eliz@gnu.org>
11224
11225 Fix part 3 of bug#9771.
11226 * bidi.c (bidi_line_init): Initialize next_en_pos to zero, not -1.
11227 (bidi_resolve_neutral): Don't enter the expensive loop looking for
11228 non-neutral characters if the current character is a paragraph
11229 separator (a.k.a. Newline). This avoids running the same
11230 expensive loop twice, once when we consume the preceding newline
11231 and the other time when the line actually needs to be displayed.
11232 Avoid the loop when we see neutrals on the base embedding level
11233 following a character whose directionality is the same as the
11234 paragraph's. This avoids running the expensive loop when a line
11235 ends in a long sequence of neutrals, like control characters.
11236 Add assertion against STRONG_AL type. Slightly rearrange code
11237 that determines the type of a neutral given the first non-neutral
11238 that follows it.
11239 (bidi_level_of_next_char): Set next_en_pos to zero when
11240 invalidating its info.
11241
11242 2011-10-17 Eli Zaretskii <eliz@gnu.org>
11243
11244 * xdisp.c (push_display_prop): Determine whether to record string
11245 or buffer position by IT->string, not by IT->method. Allow
11246 GET_FROM_DISPLAY_VECTOR as IT->method on entry. (Bug#9771, part 4)
11247 (move_it_vertically_backward): Don't look for character position
11248 immediately after the newline when in a continuation line.
11249 (Bug#9771, part 1)
11250
11251 2011-10-15 Martin Rudalics <rudalics@gmx.at>
11252
11253 * window.c (coordinates_in_window): Rewrite and delabelize
11254 vertical border check. (Bug#5357) (Bug#9618)
11255
11256 2011-10-14 Stefan Monnier <monnier@iro.umontreal.ca>
11257
11258 * xterm.c (frame_highlight, frame_unhighlight): Ignore unexplained
11259 errors in XSetWindowBorder (bug#9310).
11260
11261 2011-10-13 Dmitry Antipov <dmantipov@yandex.ru>
11262
11263 * editfns.c (Fset_time_zone_rule): Replace free with xfree to
11264 avoid crash when xmalloc overrun checking is enabled.
11265
11266 2011-10-13 Eli Zaretskii <eliz@gnu.org>
11267
11268 * xdisp.c (Fcurrent_bidi_paragraph_direction): Initialize
11269 itb.paragraph_dir to NEUTRAL_DIR. Fixes an occasional incorrect
11270 cursor motion with <left> and <right> arrow keys.
11271
11272 * bidi.c (bidi_init_it): Don't initialize paragraph_dir here, as
11273 some callers set that themselves.
11274
11275 2011-10-12 Eli Zaretskii <eliz@gnu.org>
11276
11277 * xdisp.c (find_row_edges): Handle the case where ROW comes from a
11278 display string and the previous row comes from the same string and
11279 is empty. (Bug#9739) (Bug#9738)
11280
11281 2011-10-12 Stefan Monnier <monnier@iro.umontreal.ca>
11282
11283 * doc.c (get_doc_string): Encode file name (bug#9735).
11284
11285 2011-10-12 Eli Zaretskii <eliz@gnu.org>
11286
11287 * bidi.c (bidi_level_of_next_char):
11288 * xdisp.c (get_visually_first_element): Remove old incorrect
11289 comments regarding the Unicode Line Separator character.
11290
11291 * bidi.c (bidi_init_it): Initialize paragraph_dir to NEUTRAL_DIR.
11292
11293 2011-10-12 Dmitry Antipov <dmantipov@yandex.ru>
11294
11295 * alloc.c (Fgc_status): Do not access beyond zombies array
11296 boundary if nzombies > MAX_ZOMBIES.
11297 * alloc.c (dump_zombies): Add missing format specifier.
11298
11299 2011-10-12 Paul Eggert <eggert@cs.ucla.edu>
11300
11301 * xdisp.c (set_cursor_from_row): Simplify conditionals,
11302 to pacify GCC 4.6.1 x86-64 with -O2 -Wstrict-overflow.
11303
11304 * lread.c (read_escape): Allow hex escapes as large as ?\xfffffff.
11305 Some packages use them to denote characters with modifiers.
11306
11307 2011-10-11 Andreas Schwab <schwab@linux-m68k.org>
11308
11309 * lisp.h (GCPRO1_VAR, GCPRO2_VAR, GCPRO3_VAR, GCPRO4_VAR)
11310 (GCPRO5_VAR, GCPRO6_VAR, UNGCPRO_VAR): Add whitespace to avoid
11311 matching a pp-number. Rename parameter var to var1.
11312
11313 2011-10-11 Stefan Monnier <monnier@iro.umontreal.ca>
11314
11315 * minibuf.c (Finternal_complete_buffer): Fix last change (bug#9709).
11316
11317 2011-10-08 Glenn Morris <rgm@gnu.org>
11318
11319 * callint.c (Fcall_interactively): Give a more explicit error for the
11320 'c' case with a non-character input. (Bug#8479)
11321
11322 2011-10-08 Eli Zaretskii <eliz@gnu.org>
11323
11324 * xdisp.c (hscroll_window_tree): Support hscroll in right-to-left
11325 lines.
11326 (set_cursor_from_row): Fix cursor positioning in mixed L2R+R2L
11327 lines that are hscrolled on the left.
11328
11329 * dispnew.c (buffer_posn_from_coords): Account for a possible
11330 presence of header-line. (Bug#4426)
11331
11332 2011-10-07 Stefan Monnier <monnier@iro.umontreal.ca>
11333
11334 * buffer.c (syms_of_buffer) <enable-multibyte-characters>:
11335 Don't advertise functionality which we discourage or doesn't work.
11336
11337 2011-10-07 Paul Eggert <eggert@cs.ucla.edu>
11338
11339 * alloc.c (GC_LISP_OBJECT_ALIGNMENT): Use offsetof, not __alignof__
11340 or sizeof. __alignof__ gives the wrong answer on Fedora x86-64
11341 with GCC 4.6.1 when configured with CC='gcc -m32' --with-wide-int;
11342 this makes Emacs dump core during garbage collection on rare
11343 occasions. sizeof is obviously inferior to offsetof here, so
11344 stick with offsetof.
11345 (GC_POINTER_ALIGNMENT): New macro.
11346 (mark_memory): Omit 3rd (offset) arg; caller changed.
11347 Don't assume EMACS_INT alignment is the same as pointer alignment.
11348
11349 2011-10-03 Stefan Monnier <monnier@iro.umontreal.ca>
11350
11351 * keyboard.c (read_key_sequence_remapped): New var.
11352 (read_key_sequence): Compute remapping in the right buffer.
11353 (command_loop_1): Use read_key_sequence's remapping directly.
11354
11355 2011-10-02 Stefan Monnier <monnier@iro.umontreal.ca>
11356
11357 * dired.c (file_name_completion): Don't expand file name.
11358 (Ffile_name_completion, Ffile_name_all_completions): Expand file name
11359 before checking file name handler.
11360
11361 * minibuf.c (Finternal_complete_buffer): Only show internal buffers if
11362 they've been requested explicitly (bug#9591).
11363
11364 2011-10-01 Andreas Schwab <schwab@linux-m68k.org>
11365
11366 * keymap.c (Fsingle_key_description): Use make_specified_string
11367 instead of build_string to build string from push_key_description.
11368 (Bug#5193)
11369
11370 2011-09-30 Paul Eggert <eggert@cs.ucla.edu>
11371
11372 * buffer.h (struct buffer): Use time_t, not int, for a time stamp.
11373 This fixes a Y2038 bug on 64-bit hosts.
11374 * buffer.c (reset_buffer):
11375 * fileio.c (Fdo_auto_save, Fset_buffer_auto_saved)
11376 (Fclear_buffer_auto_save_failure):
11377 Use 0, not -1, to represent an unset failure time, since time_t
11378 might not be signed.
11379
11380 Remove dependency on glibc malloc internals.
11381 * alloc.c (XMALLOC_OVERRUN_CHECK_OVERHEAD, XMALLOC_OVERRUN_CHECK_SIZE):
11382 Move back here from lisp.h, but with their new implementations.
11383 (XMALLOC_BASE_ALIGNMENT, COMMON_MULTIPLE, XMALLOC_HEADER_ALIGNMENT)
11384 (XMALLOC_OVERRUN_SIZE_SIZE): Move these new lisp.h macros here.
11385 * charset.c (charset_table_init): New static var.
11386 (syms_of_charset): Use it instead of xmalloc. This removes a
11387 dependency on glibc malloc internals. See Eli Zaretskii's comment in
11388 <http://lists.gnu.org/archive/html/emacs-devel/2011-09/msg00815.html>.
11389 * lisp.h (XMALLOC_OVERRUN_CHECK_OVERHEAD, XMALLOC_OVERRUN_CHECK_SIZE):
11390 Move back to alloc.c.
11391 (XMALLOC_BASE_ALIGNMENT, COMMON_MULTIPLE, XMALLOC_HEADER_ALIGNMENT)
11392 (XMALLOC_OVERRUN_SIZE_SIZE): Move to alloc.c.
11393
11394 2011-09-30 Jan Djärv <jan.h.d@swipnet.se>
11395
11396 * nsterm.m (windowDidResize): Call x_set_window_size only when
11397 ns_in_resize is true. Otherwise set pixelwidth/height and
11398 call change_frame_size (Bug#9628).
11399
11400 2011-09-30 Paul Eggert <eggert@cs.ucla.edu>
11401
11402 Port --enable-checking=all to Fedora 14 x86-64.
11403 * charset.c (syms_of_charset): Also account for glibc malloc's
11404 internal overhead when calculating the initial malloc maximum.
11405
11406 Port --enable-checking=all to Fedora 14 x86.
11407 * alloc.c (XMALLOC_OVERRUN_CHECK_OVERHEAD, XMALLOC_OVERRUN_CHECK_SIZE):
11408 Move to lisp.h.
11409 (xmalloc_put_size, xmalloc_get_size, overrun_check_malloc)
11410 (overrun_check_realloc, overrun_check_free):
11411 Use XMALLOC_OVERRUN_SIZE_SIZE, not sizeof (size_t).
11412 That way, xmalloc returns a properly-aligned pointer even if
11413 XMALLOC_OVERRUN_CHECK is defined. The old debugging code happened
11414 to align OK on typical 64-bit hosts, but not on Fedora 14 x86.
11415 * charset.c (syms_of_charset): Take XMALLOC_OVERRUN_CHECK_OVERHEAD
11416 into account when calculating the initial malloc maximum.
11417 * lisp.h (XMALLOC_OVERRUN_CHECK_OVERHEAD, XMALLOC_OVERRUN_CHECK_SIZE):
11418 Move here from alloc.c, so that charset.c can use it too.
11419 Properly align; the old code wasn't right for common 32-bit hosts
11420 when configured with --enable-checking=all.
11421 (XMALLOC_BASE_ALIGNMENT, COMMON_MULTIPLE, XMALLOC_HEADER_ALIGNMENT)
11422 (XMALLOC_OVERRUN_SIZE_SIZE): New macros.
11423
11424 2011-09-29 Eli Zaretskii <eliz@gnu.org>
11425
11426 * sysdep.c (snprintf) [!EOVERFLOW]: If EOVERFLOW is not defined,
11427 use EDOM.
11428
11429 2011-09-28 Eli Zaretskii <eliz@gnu.org>
11430
11431 * xdisp.c (compute_display_string_end): If there's no display
11432 string at CHARPOS, return -1.
11433
11434 * bidi.c (bidi_fetch_char): When compute_display_string_end
11435 returns a negative value, treat the character as a normal
11436 character not covered by a display string. (Bug#9624)
11437
11438 2011-09-28 Juanma Barranquero <lekktu@gmail.com>
11439
11440 * lread.c (Fread_from_string): Fix typo in docstring.
11441
11442 2011-09-27 Eli Zaretskii <eliz@gnu.org>
11443
11444 * xdisp.c (handle_invisible_prop): If invisible text ends on a
11445 newline, reseat the iterator instead of bidi-iterating there one
11446 character at a time. (Bug#9610)
11447 (BUFFER_POS_REACHED_P, move_it_in_display_line_to): Bail when past
11448 TO_CHARPOS if the bidi iterator is at base embedding level.
11449
11450 2011-09-27 Andreas Schwab <schwab@linux-m68k.org>
11451
11452 * lread.c (readevalloop): Use correct code for NBSP.
11453 (read1): Likewise. (Bug#9608)
11454
11455 2011-09-25 Michael Albinus <michael.albinus@gmx.de>
11456
11457 * dbusbind.c (Fdbus_register_signal): When service is not
11458 registered, use nil in Vdbus_registered_objects_table. (Bug#9581)
11459
11460 2011-09-25 Glenn Morris <rgm@gnu.org>
11461
11462 * buffer.c (truncate-lines): Doc fix.
11463
11464 2011-09-24 Chong Yidong <cyd@stupidchicken.com>
11465
11466 * window.c (Fwindow_prev_buffers, Fset_window_prev_buffers)
11467 (Fset_window_next_buffers): Doc fix.
11468
11469 2011-09-24 Glenn Morris <rgm@gnu.org>
11470
11471 * minibuf.c (read_minibuf): Disable line truncation. (Bug#5715)
11472
11473 2011-09-24 Paul Eggert <eggert@cs.ucla.edu>
11474
11475 Fix minor problems found by static checking.
11476 * xdisp.c (string_from_display_spec): Don't assume vecsize fits in int.
11477 * indent.c (Fvertical_motion): Fix == vs = typo.
11478
11479 2011-09-24 Eli Zaretskii <eliz@gnu.org>
11480
11481 * dispnew.c (syms_of_display) <redisplay-dont-pause>:
11482 Default value is now t. Doc fix.
11483
11484 * indent.c (Fvertical_motion): Compute and apply the overshoot
11485 logic when moving up, not only when moving down. Fix the
11486 confusing name and values of the it_overshoot_expected variable;
11487 logic changes accordingly. (Bug#9254) (Bug#9549)
11488
11489 * xdisp.c (pos_visible_p): Produce correct pixel coordinates when
11490 CHARPOS is covered by a display string which includes newlines.
11491 (move_it_vertically_backward): Avoid inflooping when START_CHARPOS
11492 is covered by a display string with embedded newlines.
11493
11494 2011-09-24 Michael Albinus <michael.albinus@gmx.de>
11495
11496 * dbusbind.c (Fdbus_register_signal): Add match rule to
11497 Vdbus_registered_objects_table. (Bug#9581)
11498 (Fdbus_register_method, Vdbus_registered_objects_table):
11499 Fix docstring.
11500
11501 2011-09-24 Jim Meyering <meyering@redhat.com>
11502
11503 do not ignore write error for any output size
11504 The previous change was incomplete.
11505 While it makes emacs --batch detect the vast majority of stdout
11506 write failures, errors were still ignored whenever the output size is
11507 k * (BUFSIZ+1) - 4. E.g., on a system with BUFSIZ of 4096,
11508 $ emacs --batch --eval '(print (format "%4093d" 0))' > /dev/full \
11509 && echo FAIL: ignored write error
11510 FAIL: ignored write error
11511 $ emacs --batch --eval '(print (format "%20481d" 0))' > /dev/full \
11512 && echo FAIL: ignored write error
11513 FAIL: ignored write error
11514 * emacs.c (Fkill_emacs): Also test ferror. (Bug#9574)
11515
11516 2011-09-23 Andreas Schwab <schwab@linux-m68k.org>
11517
11518 * emacs.c (Fkill_emacs): In noninteractive mode exit
11519 non-successfully if a write error occurred on stdout. (Bug#9574)
11520
11521 2011-09-21 Eli Zaretskii <eliz@gnu.org>
11522
11523 * xdisp.c (pop_it): Allow it->object that is a cons cell to pass
11524 the xassert test.
11525
11526 * dispextern.h (struct it): Update the comment documenting what
11527 can it->OBJECT be.
11528
11529 2011-09-20 Eli Zaretskii <eliz@gnu.org>
11530
11531 * xdisp.c (set_cursor_from_row): If the row ends in a newline from
11532 a display string, extend search for cursor position to end of row.
11533 (find_row_edges): If the row ends in a newline from a display
11534 string, increment its MATRIX_ROW_END_CHARPOS by one. (Bug#9549)
11535 Handle the case of a display string with multiple newlines.
11536 (Fcurrent_bidi_paragraph_direction): Fix search for previous
11537 non-empty line. Fixes confusing cursor motion with arrow keys at
11538 the beginning of a line that starts with whitespace.
11539
11540 2011-09-19 Lars Magne Ingebrigtsen <larsi@gnus.org>
11541
11542 * lread.c (Fread_from_string): Document what FINAL-STRING-INDEX is
11543 (bug#9493).
11544
11545 2011-09-18 Chong Yidong <cyd@stupidchicken.com>
11546
11547 * xfns.c (Fx_create_frame): Handle the bitmapIcon resource as
11548 boolean (Bug#9154).
11549
11550 2011-09-18 Eli Zaretskii <eliz@gnu.org>
11551
11552 * xdisp.c (display_line): Record maximum and minimum buffer
11553 positions even if no glyphs were produced (e.g., by a zero-width
11554 stretch). Fixes bug#9530 on a TTY. Under word-wrap, don't record
11555 buffer positions that will be removed from the glyph row because
11556 they don't fit.
11557 (produce_stretch_glyph): Fix a bug in :align-to on a TTY when the
11558 column is beyond frame width: don't subtract 1 "pixel" when
11559 computing width of the stretch.
11560 (reseat_at_next_visible_line_start): Undo the change made on
11561 2011-09-17 that saved paragraph information and restored it after
11562 the call to `reseat'. (Bug#9545)
11563
11564 2011-09-18 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
11565
11566 * xdisp.c (expose_window): Save original value of phys_cursor_on_p
11567 and turn window cursor on if cleared (Bug#9415).
11568
11569 2011-09-18 Andreas Schwab <schwab@linux-m68k.org>
11570
11571 * search.c (boyer_moore): Take unibyte characters from pattern
11572 literally. (Bug#9458)
11573
11574 2011-09-18 Eli Zaretskii <eliz@gnu.org>
11575
11576 * xdisp.c (reseat_at_next_visible_line_start): Fix last change.
11577
11578 2011-09-18 Paul Eggert <eggert@cs.ucla.edu>
11579
11580 Fix minor problem found by static checking.
11581 * xdisp.c (reseat_at_next_visible_line_start): Mark locals as
11582 initialized, to pacify gcc -Wuninitialized.
11583
11584 * fileio.c: Report proper errno when syscall falls.
11585 (Finsert_file_contents): Save and restore errno,
11586 so that report_file_error outputs the correct diagnostic.
11587 (Fwrite_region) [CLASH_DETECTION]: Likewise.
11588
11589 2011-09-18 Eli Zaretskii <eliz@gnu.org>
11590
11591 * .gdbinit (pgx): Fix references to fields of `struct glyph'.
11592
11593 2011-09-17 Eli Zaretskii <eliz@gnu.org>
11594
11595 * xdisp.c (produce_stretch_glyph): Another fix for changes made on
11596 2011-08-30T17:32:44Z!eliz@gnu.org. (Bug#9530)
11597
11598 2011-09-17 Eli Zaretskii <eliz@gnu.org>
11599
11600 * xdisp.c (reseat_at_next_visible_line_start): Keep information
11601 about the current paragraph and restore it after the call to reseat.
11602
11603 * bidi.c (MAX_PARAGRAPH_SEARCH): New macro.
11604 (bidi_find_paragraph_start): Search back for paragraph beginning
11605 at most MAX_PARAGRAPH_SEARCH lines; if not found, return BEGV_BYTE.
11606 (bidi_move_to_visually_next): Only trigger paragraph-related
11607 computations when the last character is a newline or at EOB, not
11608 just any NEUTRAL_B. (Bug#9470)
11609
11610 * xdisp.c (set_cursor_from_row): Don't invoke special treatment of
11611 truncated lines if point is covered by a display string. (Bug#9524)
11612
11613 2011-09-16 Paul Eggert <eggert@cs.ucla.edu>
11614
11615 * xselect.c: Relax test for outgoing X longs (Bug#9498).
11616 (cons_to_x_long): New function.
11617 (lisp_data_to_selection_data): Use it. Correct the test for
11618 short-versus-long data; it was negated. Break out of vector
11619 loop, for efficiency, when a long datum is discovered.
11620
11621 2011-09-16 Stefan Monnier <monnier@iro.umontreal.ca>
11622
11623 * eval.c (Fquote): Document its non-consing behavior (bug#9482).
11624
11625 2011-09-16 Eli Zaretskii <eliz@gnu.org>
11626
11627 * image.c (tiff_handler): Work around a bug in MinGW GCC 3.x (see
11628 GCC PR/17406) by declaring this function with external scope.
11629
11630 2011-09-15 Paul Eggert <eggert@cs.ucla.edu>
11631
11632 * editfns.c (Fformat): Fix bug in text-property fix (Bug#9514).
11633 Don't mishandle (length (format "%%")) and (format "%4000s%%" "").
11634
11635 2011-09-15 Andreas Schwab <schwab@linux-m68k.org>
11636
11637 * editfns.c (Fformat): Correctly handle text properties on "%%".
11638
11639 2011-09-15 Eli Zaretskii <eliz@gnu.org>
11640
11641 * xterm.c (x_draw_composite_glyph_string_foreground):
11642 * w32term.c (x_draw_composite_glyph_string_foreground):
11643 * term.c (encode_terminal_code):
11644 * composite.c (composition_update_it, get_composition_id):
11645 * xdisp.c (get_next_display_element)
11646 (fill_composite_glyph_string): Add comments about special meaning
11647 of TAB characters in a composition.
11648
11649 2011-09-15 Paul Eggert <eggert@cs.ucla.edu>
11650
11651 * editfns.c (Fformat): Fix off-by-1 bug for "%%b" (Bug#9514).
11652 This occurs when processing a multibyte format.
11653 Problem reported by Wolfgang Jenker.
11654
11655 2011-09-15 Johan Bockgård <bojohan@gnu.org>
11656
11657 * xdisp.c (try_cursor_movement): Only check for exact match if
11658 cursor hpos found by set_cursor_from_row is valid. (Bug#9495)
11659
11660 2011-09-14 Paul Eggert <eggert@cs.ucla.edu>
11661
11662 Remove unused external symbols.
11663 * dispextern.h (calc_pixel_width_or_height): Remove decl.
11664 * xdisp.c (calc_pixel_width_or_height): Now static.
11665 * doprnt.c (exprintf) [! (HAVE_X_WINDOWS && USE_X_TOOLKIT)]: Remove.
11666 * indent.c (check_display_width):
11667 * w32term.c: Fix comment to match code.
11668 * xterm.c, xterm.h (x_catching_errors): Remove.
11669
11670 2011-09-14 Paul Eggert <eggert@cs.ucla.edu>
11671
11672 * xselect.c: Use signed conversions more consistently (Bug#9498).
11673 (selection_data_to_lisp_data): Assume incoming selection data are
11674 signed integers, not unsigned. This is to be consistent with
11675 outgoing selection data, which was modified to use signed integers
11676 in as part of the fix to Bug#9196 in response to Jan D.'s comment
11677 in <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9196#32> that X11
11678 expects long, not unsigned long.
11679
11680 2011-09-14 Eli Zaretskii <eliz@gnu.org>
11681
11682 * xdisp.c (try_window_reusing_current_matrix): Fix incorrect
11683 computation of loop end. Reported by Johan Bockgård
11684 <bojohan@gnu.org>.
11685
11686 2011-09-13 Chong Yidong <cyd@stupidchicken.com>
11687
11688 * frame.c (Fother_visible_frames_p): Function deleted.
11689
11690 2011-09-12 Eli Zaretskii <eliz@gnu.org>
11691
11692 * indent.c (compute_motion): Process display vector front to back
11693 rather than the other way around. (Bug#2496)
11694
11695 2011-09-12 Stefan Monnier <monnier@iro.umontreal.ca>
11696
11697 * fileio.c (Finsert_file_contents): Don't assume beg_offset is 0.
11698
11699 2011-09-11 Chong Yidong <cyd@stupidchicken.com>
11700
11701 * minibuf.c (Fread_from_minibuffer): Doc fix.
11702
11703 2011-09-11 Eli Zaretskii <eliz@gnu.org>
11704
11705 * xdisp.c (produce_stretch_glyph): Fix a typo made in changes from
11706 2011-08-30T17:32:44Z!eliz@gnu.org. (Bug#9475)
11707
11708 2011-09-11 Lars Magne Ingebrigtsen <larsi@gnus.org>
11709
11710 * fileio.c (Fvisited_file_modtime): Document `(-1 65535)' as a
11711 value for non-existent files.
11712
11713 2011-09-11 Eli Zaretskii <eliz@gnu.org>
11714
11715 * fileio.c (Finsert_file_contents): If the file cannot be opened,
11716 set its "size" to -1. This will set the modtime_size field of
11717 the corresponding buffer to -1, which is what
11718 verify-visited-file-modtime expects for files that do not exist.
11719 (Bug#9139)
11720
11721 2011-09-11 Paul Eggert <eggert@cs.ucla.edu>
11722
11723 * keymap.h (KEY_DESCRIPTION_SIZE, push_key_description): Move decls
11724 here ...
11725 * lisp.h: ... from here. push_key_description is no longer
11726 defined in keyboard.c, so its declaration should not be in
11727 lisp.h's "Defined in keyboard.c" section, and KEY_DESCRIPTION_SIZE
11728 logically belongs with push_key_description.
11729
11730 2011-09-10 Paul Eggert <eggert@cs.ucla.edu>
11731
11732 * buffer.h: Include <sys/types.h> instead of <time.h>.
11733 Otherwise, off_t wasn't defined on FreeBSD 9.0-BETA2 i386.
11734 Problem reported by Herbert J. Skuhra.
11735
11736 2011-09-10 Lars Magne Ingebrigtsen <larsi@gnus.org>
11737
11738 * xml.c (parse_region): Make the parsing work for
11739 non-comment-starting XML files again (bug#9144).
11740
11741 2011-09-10 Andreas Schwab <schwab@linux-m68k.org>
11742
11743 * image.c (gif_load): Fix calculation of bottom and right corner.
11744 (Bug#9468)
11745
11746 2011-09-10 Eli Zaretskii <eliz@gnu.org>
11747
11748 * xdisp.c (MAX_DISP_SCAN): Decrease to 250. Prevents sluggish
11749 redisplay in small windows.
11750
11751 2011-09-09 Eli Zaretskii <eliz@gnu.org>
11752
11753 * frame.c (x_report_frame_params): Cast to avoid compiler warnings.
11754
11755 2011-09-08 Martin Rudalics <rudalics@gmx.at>
11756
11757 * window.c (Fset_window_prev_buffers, Fset_window_next_buffers):
11758 Operate on live windows only.
11759
11760 2011-09-08 Juanma Barranquero <lekktu@gmail.com>
11761
11762 * emacs.c (my_heap_start): #ifdef to avoid warnings when unused.
11763
11764 2011-09-07 Eli Zaretskii <eliz@gnu.org>
11765
11766 * xdisp.c (move_it_in_display_line_to): Call RESTORE_IT on ppos_it
11767 only under bidi iteration.
11768
11769 2011-09-07 Jan Djärv <jan.h.d@swipnet.se>
11770
11771 * gtkutil.c (xg_make_tool_item): Insert comment about eventbox.
11772
11773 2011-09-06 Paul Eggert <eggert@cs.ucla.edu>
11774
11775 isnan: Fix porting problem to Solaris 10 with bundled gcc.
11776 Without this fix, the command to link temacs failed due to an
11777 undefined symbol __builtin_isnan. This is because
11778 /usr/include/iso/math_c99.h #defines isnan(x) to
11779 __builtin_isnan(x), but the bundled gcc, which identifies itself
11780 as gcc 3.4.3 (csl-sol210-3_4-branch+sol_rpath), does not have
11781 a __builtin_isnan.
11782 * floatfns.c (isnan): #undef, and then #define to a clone of
11783 what's in data.c.
11784 (Fisnan): Always define, since it's always available now.
11785 (syms_of_floatfns): Always define isnan at the Lisp level.
11786
11787 2011-09-06 Paul Eggert <eggert@cs.ucla.edu>
11788
11789 * Makefile.in (gl-stamp): move-if-change now in build-aux (Bug#9169).
11790
11791 2011-09-06 Paul Eggert <eggert@cs.ucla.edu>
11792
11793 * fileio.c: Fix bugs with large file offsets (Bug#9428).
11794 The previous code assumed that file offsets (off_t values) fit in
11795 EMACS_INT variables, which is not true on typical 32-bit hosts.
11796 The code messed up by falsely reporting buffer overflow in cases
11797 such as (insert-file-contents "big" nil 1 2) into an empty buffer
11798 when "big" contains more than 2**29 bytes, even though this
11799 inserts just one byte and does not overflow the buffer.
11800 (Finsert_file_contents): Store file offsets as off_t
11801 values, not as EMACS_INT values. Check for overflow when
11802 converting between EMACS_INT and off_t. When checking for
11803 buffer overflow or for overlap, take the offsets into account.
11804 Don't use EMACS_INT for small values where int suffices.
11805 When checking for overlap, fix a typo: ZV was used where
11806 ZV_BYTE was intended.
11807 (Fwrite_region): Don't assume off_t fits into 'long'.
11808 * buffer.h (struct buffer.modtime_size): Now off_t, not EMACS_INT.
11809
11810 2011-09-05 Michael Albinus <michael.albinus@gmx.de>
11811
11812 * dbusbind.c (xd_signature_cat): Rename from signature_cat.
11813
11814 2011-09-04 Paul Eggert <eggert@cs.ucla.edu>
11815
11816 sprintf-related integer and memory overflow issues (Bug#9412).
11817
11818 * doprnt.c (doprnt): Support printing ptrdiff_t and intmax_t values.
11819 (esprintf, exprintf, evxprintf): New functions.
11820 * keyboard.c (command_loop_level): Now EMACS_INT, not int.
11821 (cmd_error): Kbd macro iterations count is now EMACS_INT, not int.
11822 (modify_event_symbol): Do not assume that the length of
11823 name_alist_or_stem is safe to alloca and fits in int.
11824 (Fexecute_extended_command): Likewise for function name and binding.
11825 (Frecursion_depth): Wrap around reliably on integer overflow.
11826 * keymap.c (push_key_description): First arg is now EMACS_INT, not int,
11827 since some callers pass EMACS_INT values.
11828 (Fsingle_key_description): Don't crash if symbol name contains more
11829 than MAX_ALLOCA bytes.
11830 * minibuf.c (minibuf_level): Now EMACS_INT, not int.
11831 (get_minibuffer): Arg is now EMACS_INT, not int.
11832 * lisp.h (get_minibuffer, push_key_description): Reflect API changes.
11833 (esprintf, exprintf, evxprintf): New decls.
11834 * window.h (command_loop_level, minibuf_level): Reflect API changes.
11835
11836 * dbusbind.c (signature_cat): New function.
11837 (xd_signature, Fdbus_register_signal):
11838 Do not overrun buffer; instead, report string overflow.
11839
11840 * dispnew.c (add_window_display_history): Don't overrun buffer.
11841 Truncate instead; this is OK since it's just a log.
11842
11843 * editfns.c (Fcurrent_time_zone): Don't overrun buffer
11844 even if the time zone offset is outlandishly large.
11845 Don't mishandle offset == INT_MIN.
11846
11847 * emacs.c (main) [NS_IMPL_COCOA]: Don't overrun buffer
11848 when creating daemon; the previous buffer-overflow check was incorrect.
11849
11850 * eval.c (verror): Simplify by rewriting in terms of evxprintf,
11851 which has the guts of the old verror function.
11852
11853 * filelock.c (lock_file_1, lock_file): Don't blindly alloca long name;
11854 use SAFE_ALLOCA instead. Use esprintf to avoid int-overflow issues.
11855
11856 * font.c: Include <float.h>, for DBL_MAX_10_EXP.
11857 (font_unparse_xlfd): Don't blindly alloca long strings.
11858 Don't assume XINT result fits in int, or that XFLOAT_DATA * 10
11859 fits in int, when using sprintf. Use single snprintf to count
11860 length of string rather than counting it via multiple sprintfs;
11861 that's simpler and more reliable.
11862 (font_unparse_fcname): Use it to avoid sprintf buffer overrun.
11863 (generate_otf_features) [0 && HAVE_LIBOTF]: Use esprintf, not
11864 sprintf, in case result does not fit in int.
11865
11866 * fontset.c (num_auto_fontsets): Now printmax_t, not int.
11867 (fontset_from_font): Print it.
11868
11869 * frame.c (tty_frame_count): Now printmax_t, not int.
11870 (make_terminal_frame, set_term_frame_name): Print it.
11871 (x_report_frame_params): In X, window IDs are unsigned long,
11872 not signed long, so print them as unsigned.
11873 (validate_x_resource_name): Check for implausibly long names,
11874 and don't assume name length fits in 'int'.
11875 (x_get_resource_string): Don't blindly alloca invocation name;
11876 use SAFE_ALLOCA. Use esprintf, not sprintf, in case result does
11877 not fit in int.
11878
11879 * gtkutil.c: Include <float.h>, for DBL_MAX_10_EXP.
11880 (xg_check_special_colors, xg_set_geometry):
11881 Make sprintf buffers a bit bigger, to avoid potential buffer overrun.
11882
11883 * lread.c (dir_warning): Don't blindly alloca buffer; use SAFE_ALLOCA.
11884 Use esprintf, not sprintf, in case result does not fit in int.
11885
11886 * macros.c (executing_kbd_macro_iterations): Now EMACS_INT, not int.
11887 (Fend_kbd_macro): Don't mishandle MOST_NEGATIVE_FIXNUM by treating
11888 it as a large positive number.
11889 (Fexecute_kbd_macro): Don't assume repeat count fits in int.
11890 * macros.h (executing_kbd_macro_iterations): Now EMACS_INT, not int.
11891
11892 * nsterm.m ((NSSize)windowWillResize): Use esprintf, not sprintf,
11893 in case result does not fit in int.
11894
11895 * print.c (float_to_string): Detect width overflow more reliably.
11896 (print_object): Make sprintf buffer a bit bigger, to avoid potential
11897 buffer overrun. Don't assume list length fits in 'int'. Treat
11898 print length of 0 as 0, not as infinity; to be consistent with other
11899 uses of print length in this function. Don't overflow print length
11900 index. Don't assume hash table size fits in 'long', or that
11901 vectorlike size fits in 'unsigned long'.
11902
11903 * process.c (make_process): Use printmax_t, not int, to format
11904 process-name gensyms.
11905
11906 * sysdep.c (snprintf) [! HAVE_SNPRINTF]: New function.
11907
11908 * term.c (produce_glyphless_glyph): Make sprintf buffer a bit bigger
11909 to avoid potential buffer overrun.
11910
11911 * xfaces.c (x_update_menu_appearance): Don't overrun buffer
11912 if X resource line is longer than 512 bytes.
11913
11914 * xfns.c (x_window): Make sprintf buffer a bit bigger
11915 to avoid potential buffer overrun.
11916
11917 * xterm.c (x_io_error_quitter): Don't overrun sprintf buffer.
11918
11919 * xterm.h (x_check_errors): Add ATTRIBUTE_FORMAT_PRINTF.
11920
11921 2011-09-04 Paul Eggert <eggert@cs.ucla.edu>
11922
11923 Integer overflow fixes for scrolling, etc.
11924 Without these, Emacs silently mishandles large integers sometimes.
11925 For example, "C-u 4294967297 M-x recenter" was treated as if
11926 it were "C-u 1 M-x recenter" on a typical 64-bit host.
11927
11928 * xdisp.c (try_window_id): Check Emacs fixnum range before
11929 converting to 'int'.
11930
11931 * window.c (window_scroll_line_based, Frecenter):
11932 Check that an Emacs fixnum is in range before assigning it to 'int'.
11933 (Frecenter, Fmove_to_window_line): Use EMACS_INT, not int, for
11934 values converted from Emacs fixnums.
11935 (Frecenter): Don't wrap around a line count if it is out of 'int'
11936 range; instead, treat it as an extreme value.
11937 (Fset_window_configuration, compare_window_configurations):
11938 Use ptrdiff_t, not int, for index that might exceed 2 GiB.
11939
11940 * search.c (Freplace_match): Use ptrdiff_t, not int, for indexes
11941 that can exceed INT_MAX. Check that EMACS_INT value is in range
11942 before assigning it to the (possibly-narrower) index.
11943 (match_limit): Don't assume that a fixnum can fit in 'int'.
11944
11945 * print.c (print_object): Use ptrdiff_t, not int, for index that can
11946 exceed INT_MAX.
11947
11948 * indent.c (position_indentation): Now takes ptrdiff_t, not int.
11949 (Fvertical_motion): Don't wrap around LINES values that don't fit
11950 in 'int'. Instead, treat them as extreme values. This is good
11951 enough for windows, which can't have more than INT_MAX lines anyway.
11952
11953 2011-09-03 Lars Magne Ingebrigtsen <larsi@gnus.org>
11954
11955 * Require libxml/parser.h to avoid compilation warning.
11956
11957 * emacs.c (shut_down_emacs): Call xmlCleanupParser on shutdown.
11958
11959 * xml.c (parse_region): Don't call xmlCleanupParser after parsing,
11960 since this reportedly can destroy thread storage.
11961
11962 2011-08-30 Chong Yidong <cyd@stupidchicken.com>
11963
11964 * syntax.c (find_defun_start): Update all cache variables if
11965 exiting early (Bug#9401).
11966
11967 2011-08-30 Eli Zaretskii <eliz@gnu.org>
11968
11969 * image.c (x_bitmap_pixmap): Cast to int to avoid compiler warnings.
11970
11971 * xdisp.c (produce_stretch_glyph): No longer static, compiled also
11972 when HAVE_WINDOW_SYSTEM is not defined. Support both GUI and TTY
11973 frames. Call tty_append_glyph in the TTY case. (Bug#9402)
11974
11975 * term.c (tty_append_glyph): New function.
11976 (produce_stretch_glyph): Static function and its prototype deleted.
11977
11978 * dispextern.h (produce_stretch_glyph, tty_append_glyph):
11979 Add prototypes.
11980
11981 2011-08-29 Paul Eggert <eggert@cs.ucla.edu>
11982
11983 * image.c (parse_image_spec): Check for nonnegative, not for positive,
11984 when checking :margin (Bug#9390).
11985 (IMAGE_NON_NEGATIVE_INTEGER_VALUE_OR_PAIR):
11986 Rename from IMAGE_POSITIVE_INTEGER_VALUE_OR_PAIR,
11987 so that the name doesn't mislead. All uses changed.
11988
11989 2011-08-28 Johan Bockgård <bojohan@gnu.org>
11990
11991 * term.c (init_tty) [HAVE_GPM]: Move mouse settings after
11992 set_tty_hooks.
11993
11994 2011-08-27 Eli Zaretskii <eliz@gnu.org>
11995
11996 * xdisp.c (move_it_to): Don't bail out early when reaching
11997 position beyond to_charpos, if we are scanning backwards.
11998 (move_it_vertically_backward): When DY == 0, make sure we get to
11999 the first character in the line after the newline.
12000
12001 2011-08-27 Paul Eggert <eggert@cs.ucla.edu>
12002
12003 * ccl.c: Improve and simplify overflow checking (Bug#9196).
12004 (ccl_driver): Do not generate an out-of-range pointer.
12005 (Fccl_execute_on_string): Remove unnecessary check for
12006 integer overflow, noted by Stefan Monnier in
12007 <http://lists.gnu.org/archive/html/emacs-devel/2011-08/msg00979.html>.
12008 Remove a FIXME that didn't need fixing.
12009 Simplify the newly-introduced buffer reallocation code.
12010
12011 2011-08-27 Juanma Barranquero <lekktu@gmail.com>
12012
12013 * makefile.w32-in ($(BLD)/alloc.$(O)): Depend on lib/verify.h.
12014
12015 2011-08-26 Paul Eggert <eggert@cs.ucla.edu>
12016
12017 Integer and memory overflow issues (Bug#9196).
12018
12019 * doc.c (get_doc_string): Rework so that
12020 get_doc_string_buffer_size is the actual buffer size, rather than
12021 being 1 less than the actual buffer size; this makes xpalloc more
12022 convenient.
12023
12024 * image.c (x_allocate_bitmap_record, cache_image):
12025 * xselect.c (Fx_register_dnd_atom):
12026 Simplify previous changes by using xpalloc.
12027
12028 * buffer.c (overlay_str_len): Now ptrdiff_t, not EMACS_INT,
12029 since either will do and ptrdiff_t is convenient with xpalloc.
12030
12031 * charset.c (charset_table_size)
12032 (struct charset_sort_data.priority): Now ptrdiff_t.
12033 (charset_compare): Don't overflow if priorities differ greatly.
12034 (Fsort_charsets): Don't assume list length fits in int.
12035 Check for size-calculation overflow when allocating sort data.
12036 (syms_of_charset): Allocate an initial charset table that is
12037 just under 64 KiB, to avoid problems with glibc malloc and mmap.
12038
12039 * cmds.c (internal_self_insert): Check for size-calculation overflow.
12040
12041 * composite.h (struct composition.glyph_len): Now int, not unsigned.
12042 The actual value is always <= INT_MAX, and leaving it unsigned made
12043 overflow checking harder.
12044
12045 * dispextern.h (struct glyph_matrix.rows_allocated)
12046 (struct face_cache.size): Now ptrdiff_t, for convenience in use
12047 with xpalloc. The values are still always <= INT_MAX.
12048
12049 * indent.c (compute_motion): Adjust to region_cache_forward sig change.
12050
12051 * lisp.h (xnmalloc, xnrealloc, xpalloc): New decls.
12052 (SAFE_NALLOCA): New macro.
12053
12054 * region-cache.c (struct boundary.pos, find_cache_boundary)
12055 (move_cache_gap, insert_cache_boundary, delete_cache_boundaries)
12056 (set_cache_region, invalidate_region_cache)
12057 (revalidate_region_cache, know_region_cache, region_cache_forward)
12058 (region_cache_backward, pp_cache):
12059 Use ptrdiff_t, not EMACS_INT, since either will do. This is needed
12060 so that ptrdiff_t * can be passed to xpalloc.
12061 (struct region_cache): Similarly, for gap_start, gap_len, cache_len,
12062 beg_unchanged, end_unchanged, buffer_beg, buffer_end members.
12063 (pp_cache): Don't assume cache_len fits in int.
12064 * region-cache.h: Adjust extern decls to match.
12065
12066 * search.c (scan_buffer, Freplace_match): Use ptrdiff_t, not
12067 EMACS_INT, since either will do, for xpalloc.
12068
12069 * alloc.c: Include verify.h, and check that int fits in ptrdiff_t.
12070 (xnmalloc, xnrealloc, xpalloc): New functions.
12071
12072 * bidi.c (bidi_shelve_header_size): New constant.
12073 (bidi_cache_ensure_space, bidi_shelve_cache): Use it.
12074 (bidi_cache_ensure_space): Avoid integer overflow when allocating.
12075
12076 * bidi.c (bidi_cache_shrink):
12077 * buffer.c (overlays_at, overlays_in, record_overlay_string)
12078 (overlay_strings):
12079 Don't update size of array until after memory allocation succeeds,
12080 because xmalloc/xrealloc may not return.
12081 (struct sortstrlist.bytes): Now ptrdiff_t, as EMACS_INT doesn't help
12082 now that we have proper integer overflow checking.
12083 (record_overlay_string, overlay_strings): Catch overflows when
12084 calculating size of overlay_str_buf.
12085
12086 * callproc.c (Fcall_process): Check for size overflow when
12087 calculating size of args2.
12088 (child_setup): Avoid overflow by using size_t rather than ptrdiff_t.
12089 Normally we prefer signed values, but sticking with ptrdiff_t would
12090 require adding more-complicated checks.
12091
12092 * ccl.c (Fccl_execute_on_string): Check for memory overflow.
12093 Use ptrdiff_t rather than EMACS_INT where ptrdiff_t will do.
12094 Redo buffer-overflow calculations to avoid integer overflow.
12095 Add a FIXME comment where memory seems to be over-allocated.
12096
12097 * character.c (Fstring): Check for size-calculation overflow.
12098
12099 * coding.c (produce_chars): Redo buffer-overflow calculations to avoid
12100 unnecessary integer overflow. Check for size overflow.
12101 (encode_coding_object): Don't update size until xmalloc succeeds.
12102
12103 * composite.c (get_composition_id): Check for overflow in glyph
12104 length calculations.
12105
12106 Integer and memory overflow fixes for display code.
12107 * dispextern.h (struct glyph_pool.nglyphs): Now ptrdiff_t, not int.
12108 * dispnew.c (adjust_glyph_matrix, realloc_glyph_pool)
12109 (scrolling_window): Check for overflow in size calculations.
12110 (line_draw_cost, realloc_glyph_pool, add_row_entry):
12111 Don't assume glyph table len fits in int.
12112 (struct row_entry.bucket, row_entry_pool_size, row_entry_idx)
12113 (row_table_size): Now ptrdiff_t, not int.
12114 (scrolling_window): Avoid overflow in size calculations.
12115 Don't update size until allocation succeeds.
12116 * fns.c (concat): Check for overflow in size calculations.
12117 (next_almost_prime): Verify NEXT_ALMOST_PRIME_LIMIT.
12118 * lisp.h (RANGED_INTEGERP, TYPE_RANGED_INTEGERP): New macros.
12119 (NEXT_ALMOST_PRIME_LIMIT): New constant.
12120
12121 * doc.c (get_doc_string_buffer_size): Now ptrdiff_t, not int.
12122 (get_doc_string): Check for size calculation overflow.
12123 Don't update size until allocation succeeds.
12124 (get_doc_string, Fsubstitute_command_keys): Use ptrdiff_t, not
12125 EMACS_INT, where ptrdiff_t will do.
12126 (Fsubstitute_command_keys): Check for string overflow.
12127
12128 * editfns.c (set_time_zone_rule): Don't assume environment length
12129 fits in int.
12130 (message_length): Now ptrdiff_t, not int.
12131 (Fmessage_box): Don't update size until allocation succeeds.
12132 Don't assume message length fits in int.
12133 (Fformat): Use ptrdiff_t, not EMACS_INT, where ptrdiff_t will do.
12134
12135 * emacs.c (main): Do not reallocate argv, since there is a null at
12136 the end that can be overwritten, and this way there's no need to
12137 worry about size-calculation overflow.
12138 (sort_args): Check for size-calculation overflow.
12139
12140 * eval.c (init_eval_once, grow_specpdl): Don't update size until
12141 alloc succeeds.
12142 (call_debugger, grow_specpdl): Redo calculations to avoid overflow.
12143
12144 * frame.c (set_menu_bar_lines, x_set_frame_parameters)
12145 (x_set_scroll_bar_width, x_figure_window_size):
12146 Check for integer overflow.
12147 (x_set_alpha): Do not assume XINT fits in int.
12148
12149 * frame.h (struct frame): Use int, not EMACS_INT, where int works.
12150 This is for the members text_lines, text_cols, total_lines, total_cols,
12151 where the system imposes an 'int' limit.
12152
12153 * fringe.c (Fdefine_fringe_bitmap):
12154 Don't update size until alloc works.
12155
12156 * ftfont.c (ftfont_get_open_type_spec, setup_otf_gstring)
12157 (ftfont_shape_by_flt): Check for integer overflow in size calculations.
12158
12159 * gtkutil.c (get_utf8_string, xg_store_widget_in_map):
12160 Check for size-calculation overflow.
12161 (get_utf8_string): Use ptrdiff_t, not size_t, where either will
12162 do, as we prefer signed integers.
12163 (id_to_widget.max_size, id_to_widget.used)
12164 (xg_store_widget_in_map, xg_remove_widget_from_map)
12165 (xg_get_widget_from_map, xg_get_scroll_id_for_window)
12166 (xg_remove_scroll_bar, xg_update_scrollbar_pos):
12167 Use and return ptrdiff_t, not int.
12168 (xg_gtk_scroll_destroy): Don't assume ptrdiff_t fits in int.
12169 * gtkutil.h: Change prototypes to match the above.
12170
12171 * image.c (RANGED_INTEGERP, TYPE_RANGED_INTEGERP): Remove; these
12172 are duplicate now that they've been promoted to lisp.h.
12173 (x_allocate_bitmap_record, x_alloc_image_color)
12174 (make_image_cache, cache_image, xpm_load):
12175 Don't update size until alloc is done.
12176 (xpm_load, lookup_rgb_color, lookup_pixel_color, x_to_xcolors)
12177 (x_detect_edges):
12178 Check for size calculation overflow.
12179 (ct_colors_allocated_max): New constant.
12180 (x_to_xcolors, x_detect_edges): Reorder multiplicands to avoid
12181 overflow.
12182
12183 * keyboard.c (read_char, menu_bar_items, tool_bar_items)
12184 (read_char_x_menu_prompt, read_char_minibuf_menu_width)
12185 (read_char_minibuf_menu_prompt, follow_key, read_key_sequence):
12186 Use ptrdiff_t, not int, to count maps.
12187 (read_char_minibuf_menu_prompt): Check for overflow in size
12188 calculations. Don't update size until allocation succeeds.
12189 Redo calculations to avoid overflow.
12190 * keyboard.h: Change prototypes to match the above.
12191
12192 * keymap.c (cmm_size, current_minor_maps): Use ptrdiff_t, not int,
12193 to count maps.
12194 (current_minor_maps): Check for size calculation overflow.
12195 * keymap.h: Change prototypes to match the above.
12196
12197 * lread.c (read1, init_obarray): Don't update size until alloc done.
12198
12199 * macros.c (Fstart_kbd_macro): Don't update size until alloc done.
12200 (store_kbd_macro_char): Reorder multiplicands to avoid overflow.
12201
12202 * nsterm.h (struct ns_color_table.size, struct ns_color_table.avail):
12203 Now ptrdiff_t, not int.
12204 * nsterm.m (ns_index_color): Use ptrdiff_t, not int, for table indexes.
12205 (ns_draw_fringe_bitmap): Rewrite to avoid overflow.
12206
12207 * process.c (Fnetwork_interface_list): Check for overflow
12208 in size calculation.
12209
12210 * region-cache.c (move_cache_gap): Check for size calculation overflow.
12211
12212 * scroll.c (do_line_insertion_deletion_costs): Check for size calc
12213 overflow. Don't bother calling xmalloc when xrealloc will do.
12214
12215 * search.c (Freplace_match): Check for size calculation overflow.
12216 (Fset_match_data): Don't assume list lengths fit in 'int'.
12217
12218 * sysdep.c (system_process_attributes): Use ptrdiff_t, not int,
12219 for command line length. Do not attempt to address one before the
12220 beginning of an array, as that's not portable.
12221
12222 * term.c (max_frame_lines): Remove; unused.
12223 (encode_terminal_src_size, encode_terminal_dst_size): Now ptrdiff_t,
12224 not int.
12225 (encode_terminal_code, calculate_costs): Check for size
12226 calculation overflow.
12227 (encode_terminal_code): Use ptrdiff_t, not int, to record glyph
12228 table lengths and related sizes. Don't update size until alloc
12229 done. Redo calculations to avoid overflow.
12230 (calculate_costs): Don't bother calling xmalloc when xrealloc will do.
12231
12232 * termcap.c (tgetent): Use ptrdiff_t, not int, to record results of
12233 subtracting pointers.
12234 (gobble_line): Check for overflow more carefully. Don't update size
12235 until alloc done.
12236
12237 * tparam.c (tparam1): Use ptrdiff_t, not int, for sizes.
12238 Don't update size until alloc done.
12239 Redo size calculations to avoid overflow.
12240 Check for size calculation overflow.
12241 (main) [DEBUG]: Fix typo in invoking tparam1.
12242
12243 * xdisp.c (store_mode_line_noprop_char, x_consider_frame_title):
12244 Use ptrdiff_t, not int, for sizes.
12245 (store_mode_line_noprop_char): Don't update size until alloc done.
12246
12247 * xfaces.c (lface_id_to_name_size, Finternal_make_lisp_face):
12248 Use ptrdiff_t, not int, for sizes.
12249 (Finternal_make_lisp_face, cache_face):
12250 Check for size calculation overflow.
12251 (cache_face): Treat size calculation overflows as if they were
12252 memory exhaustion (the usual treatment), rather than aborting.
12253
12254 * xfns.c (x_encode_text, x_set_name_internal)
12255 (Fx_change_window_property): Use ptrdiff_t, not int, to count
12256 sizes, since they can exceed INT_MAX in size. Check for size
12257 calculation overflow.
12258
12259 * xgselect.c (gfds_size): Now ptrdiff_t, for convenience with xpalloc.
12260 (xg_select): Check for size calculation overflow.
12261 Don't update size until alloc done.
12262
12263 * xrdb.c (get_environ_db): Don't assume path length fits in int,
12264 as sprintf is limited to int lengths.
12265
12266 * xselect.c (X_LONG_SIZE, X_SHRT_MAX, X_SHRT_MIN, X_LONG_MAX)
12267 (X_LONG_MIN): New macros.
12268 Use them to make the following changes clearer.
12269 (MAX_SELECTION_QUANTUM): Make the other bounds on this value clearer.
12270 This change doesn't affect the value now, but it may help remind
12271 future maintainers not to raise the value too much later.
12272 (SELECTION_QUANTUM): Remove, replacing with ...
12273 (selection_quantum): ... new function, which avoids overflow.
12274 All uses changed.
12275 (struct selection_data.size): Now ptrdiff_t, not int, to avoid
12276 assumption that selection length fits in 'int'.
12277 (x_reply_selection_request, x_handle_selection_request)
12278 (x_get_window_property, receive_incremental_selection)
12279 (x_get_window_property_as_lisp_data, selection_data_to_lisp_data)
12280 (lisp_data_to_selection_data, clean_local_selection_data):
12281 Use ptrdiff_t, not int, to record length of selection.
12282 (x_reply_selection_request, x_get_window_property)
12283 (receive_incremental_selection, x_property_data_to_lisp):
12284 Redo calculations to avoid overflow.
12285 (x_reply_selection_request): When sending hint, ceiling it at
12286 X_LONG_MAX rather than relying on wraparound overflow to send
12287 something.
12288 (x_get_window_property, receive_incremental_selection)
12289 (lisp_data_to_selection_data, x_property_data_to_lisp):
12290 Check for size-calculation overflow.
12291 (x_get_window_property, receive_incremental_selection)
12292 (lisp_data_to_selection_data, Fx_register_dnd_atom):
12293 Don't store size until memory allocation succeeds.
12294 (x_get_window_property): Plug memory leak on memory exhaustion.
12295 Don't double-block input; malloc is safe here. Don't assume 2**34
12296 - 4 fits in unsigned long. Add an xassert to check
12297 XGetWindowProperty overflow. Be more careful about overflow
12298 calculations, and distinguish size from memory overflow better.
12299 (receive_incremental_selection): When tracing, don't assume
12300 unsigned int is less than INT_MAX.
12301 (x_selection_data_to_lisp_data): Remove unnecessary (and in theory
12302 harmful) conversions of unsigned short to int.
12303 (lisp_data_to_selection_data): Don't assume that integers
12304 in the range -65535 through -1 fit in an X unsigned short.
12305 Don't assume that ULONG_MAX == X_ULONG_MAX. Don't store into
12306 result parameters unless successful. Rely on cons_to_unsigned
12307 to report problems with elements; the old code wasn't right anyway.
12308 (x_check_property_data): Check for int overflow; we cannot use
12309 a wider type due to X limits.
12310 (x_handle_dnd_message): Use unsigned int, to avoid int overflow.
12311
12312 * xsmfns.c (smc_save_yourself_CB): Check for size calc overflow.
12313
12314 * xterm.c (x_color_cells, x_send_scrollbar_event, handle_one_xevent)
12315 (x_term_init): Check for size calculation overflow.
12316 (x_color_cells): Don't store size until memory allocation succeeds.
12317 (handle_one_xevent): Use ptrdiff_t, not int, for byte counts.
12318 Don't assume alloca size is less than MAX_ALLOCA.
12319 (x_term_init): Don't assume length fits in int (sprintf is limited
12320 to int size).
12321
12322 Use ptrdiff_t for composition IDs.
12323 * character.c (lisp_string_width):
12324 * composite.c (composition_table_size, n_compositions)
12325 (get_composition_id, composition_gstring_from_id):
12326 * dispextern.h (struct glyph_string.cmp_id, struct composition_it.id):
12327 * xdisp.c (BUILD_COMPOSITE_GLYPH_STRING):
12328 * window.c (Frecenter):
12329 Use ptrdiff_t, not int, for composition IDs.
12330 * composite.c (get_composition_id): Check for integer overflow.
12331 * composite.h: Adjust prototypes to match the above changes.
12332
12333 Use ptrdiff_t for hash table indexes.
12334 * category.c (hash_get_category_set):
12335 * ccl.c (ccl_driver):
12336 * charset.h (struct charset.hash_index, CHECK_CHARSET_GET_ID):
12337 * coding.c (coding_system_charset_list, detect_coding_system):
12338 * coding.h (struct coding_system.id):
12339 * composite.c (get_composition_id, gstring_lookup_cache):
12340 * fns.c (hash_lookup, hash_put, Fgethash, Fputhash):
12341 * image.c (xpm_get_color_table_h):
12342 * lisp.h (hash_lookup, hash_put):
12343 * minibuf.c (Ftest_completion):
12344 Use ptrdiff_t for hash table indexes, not int (which is too
12345 narrow, on 64-bit hosts) or EMACS_INT (which is too wide, on
12346 32-bit --with-wide-int hosts).
12347
12348 * charset.c (Fdefine_charset_internal): Check for integer overflow.
12349 Add a FIXME comment about memory leaks.
12350 (syms_of_charset): Don't assume xmalloc returns.
12351
12352 Don't assume that stated character widths fit in int.
12353 * character.c (Fchar_width, c_string_width, lisp_string_width):
12354 * character.h (CHAR_WIDTH):
12355 * indent.c (MULTIBYTE_BYTES_WIDTH):
12356 Use sanitize_char_width to avoid undefined and/or bad behavior
12357 with outlandish widths.
12358 * character.h (sanitize_tab_width): Rename from sanitize_width,
12359 now that we have two such functions. All uses changed.
12360 (sanitize_char_width): New inline function.
12361
12362 Don't assume that tab-width fits in int.
12363 * character.h (sanitize_width): New inline function.
12364 (SANE_TAB_WIDTH): New macro.
12365 (ASCII_CHAR_WIDTH): Use it.
12366 * indent.c (sane_tab_width): Remove. All uses replaced by
12367 SANE_TAB_WIDTH (current_buffer).
12368 * xdisp.c (init_iterator): Use SANE_TAB_WIDTH.
12369
12370 * fileio.c: Integer overflow issues with file modes.
12371 (Fset_file_modes, auto_save_1): Don't assume EMACS_INT fits in int.
12372
12373 * charset.c (read_hex): New arg OVERFLOW. All uses changed.
12374 Remove unreachable code.
12375 (read_hex, load_charset_map_from_file): Check for integer overflow.
12376
12377 * xterm.c: Don't go over XClientMessageEvent limit.
12378 (scroll_bar_windows_size): Now ptrdiff_t, as we prefer signed.
12379 (x_send_scroll_bar_event): Likewise. Check that the size does not
12380 exceed limits imposed by XClientMessageEvent, as well as the usual
12381 ptrdiff_t and size_t limits.
12382
12383 * keyboard.c: Overflow, signedness and related fixes.
12384 (make_lispy_movement): Use same integer type in forward decl
12385 that is used in the definition.
12386 (read_key_sequence, keyremap_step):
12387 Change bufsize argument back to int, undoing my 2011-03-30 change.
12388 We prefer signed types, and int is wide enough here.
12389 (parse_tool_bar_item): Don't assume tool_bar_max_label_size is less
12390 than TYPE_MAXIMUM (EMACS_INT) / 2. Don't let the label size grow
12391 larger than STRING_BYTES_BOUND. Use ptrdiff_t for Emacs string
12392 length, not size_t. Use ptrdiff_t for index, not int.
12393 (keyremap_step, read_key_sequence): Redo bufsize check to avoid
12394 possibility of integer overflow.
12395
12396 Overflow, signedness and related fixes for images.
12397
12398 * dispextern.h (struct it.stack[0].u.image.image_id)
12399 (struct_it.image_id, struct image.id, struct image_cache.size)
12400 (struct image_cache.used, struct image_cache.ref_count):
12401 * gtkutil.c (update_frame_tool_bar):
12402 * image.c (x_reference_bitmap, Fimage_size, Fimage_mask_p)
12403 (Fimage_metadata, free_image_cache, clear_image_cache, lookup_image)
12404 (cache_image, mark_image_cache, x_kill_gs_process, Flookup_image):
12405 * nsmenu.m (update_frame_tool_bar):
12406 * xdisp.c (calc_pixel_width_or_height):
12407 * xfns.c (image_cache_refcount):
12408 Image IDs are now ptrdiff_t, not int, to avoid arbitrary limits
12409 on typical 64-bit hosts.
12410
12411 * image.c (RANGED_INTEGERP, TYPE_RANGED_INTEGERP): New macros.
12412 (x_bitmap_pixmap, x_create_x_image_and_pixmap):
12413 Omit unnecessary casts to int.
12414 (parse_image_spec): Check that integers fall into 'int' range
12415 when the callers expect that.
12416 (image_ascent): Redo ascent calculation to avoid int overflow.
12417 (clear_image_cache): Avoid overflow when sqrt (INT_MAX) < nimages.
12418 (lookup_image): Remove unnecessary tests.
12419 (xbm_image_p): Locals are now of int, not EMACS_INT,
12420 since parse_image_check makes sure they fit into int.
12421 (png_load, gif_load, svg_load_image):
12422 Prefer int to unsigned where either will do.
12423 (tiff_handler): New function, combining the cores of the
12424 old tiff_error_handler and tiff_warning_handler.
12425 This function is rewritten to use vsnprintf and thereby avoid
12426 stack buffer overflows. It uses only the features of vsnprintf
12427 that are common to both POSIX and native Microsoft.
12428 (tiff_error_handler, tiff_warning_handler): Use it.
12429 (tiff_load, gif_load, imagemagick_load_image):
12430 Don't assume :index value fits in 'int'.
12431 (gif_load): Omit unnecessary cast to double, and avoid double-rounding.
12432 (imagemagick_load_image): Check that crop parameters fit into
12433 the integer types that MagickCropImage accepts. Don't assume
12434 Vimagemagick_render_type has a nonnegative value. Don't assume
12435 size_t fits in 'long'.
12436 (gs_load): Use printmax_t to print the widest integers possible.
12437 Check for integer overflow when computing image height and width.
12438
12439 2011-08-26 Eli Zaretskii <eliz@gnu.org>
12440
12441 * xdisp.c (redisplay_window): Don't force window start if point
12442 will be invisible in the resulting window. (Bug#9324)
12443
12444 2011-08-25 Eli Zaretskii <eliz@gnu.org>
12445
12446 * xdisp.c (compute_display_string_pos): Return 2 in DISP_PROP when
12447 the display spec is of the form `(space ...)'.
12448 (handle_display_spec): Return the value returned by
12449 handle_single_display_spec, not just 1 or zero.
12450 (handle_single_display_spec): If the display spec is of the form
12451 `(space ...)', and specifies display in the text area, return 2
12452 rather than 1.
12453 (try_cursor_movement): Check for the need to scroll more
12454 accurately, and prefer exact match for point under bidi.
12455 Don't advance `row' beyond the last row of the window.
12456
12457 * dispextern.h (struct bidi_it): Rename the disp_prop_p member
12458 into disp_prop; all users changed.
12459
12460 * bidi.c (bidi_fetch_char): If compute_display_string_pos returns
12461 DISP_PROP = 2, substitute the u+2029 PARAGRAPH SEPARATOR character
12462 for the text covered by the display property.
12463
12464 2011-08-25 Chong Yidong <cyd@stupidchicken.com>
12465
12466 * buffer.c (Fbury_buffer_internal): Rename from Funrecord_buffer.
12467 Change return value to nil.
12468 (Frecord_buffer): Delete unused function.
12469
12470 2011-08-24 Eli Zaretskii <eliz@gnu.org>
12471
12472 * xdisp.c (Fcurrent_bidi_paragraph_direction): For unibyte
12473 buffers, return left-to-right.
12474 (set_cursor_from_row): Consider candidate row a win if its glyph
12475 represents a newline and point is on that newline. Fixes cursor
12476 positioning on the newline at EOL of R2L text within L2R
12477 paragraph, and vice versa.
12478 (try_cursor_movement): Check continued rows, in addition to
12479 continuation rows. Fixes unwarranted scroll when point enters a
12480 continued line of R2L text within an L2R paragraph, or vice versa.
12481 (cursor_row_p): Consider the case of point being equal to
12482 MATRIX_ROW_END_CHARPOS. Prevents cursor being stuck when moving
12483 from the end of a short line to the beginning of a continued line
12484 of R2L text within L2R paragraph.
12485 (RECORD_MAX_MIN_POS): For max_pos, use IT_CHARPOS even for
12486 composed characters.
12487
12488 * bidi.c (bidi_check_type): Use xassert.
12489 (bidi_cache_iterator_state): Update the disp_pos and disp_prop_p
12490 members.
12491
12492 2011-08-23 Eli Zaretskii <eliz@gnu.org>
12493
12494 * bidi.c (bidi_get_type): Abort if we get zero as the bidi type of
12495 a character.
12496
12497 2011-08-23 Chong Yidong <cyd@stupidchicken.com>
12498
12499 * nsfont.m (ns_otf_to_script): Fix typo.
12500
12501 2011-08-22 Kenichi Handa <handa@m17n.org>
12502
12503 * chartab.c (Fset_char_table_extra_slot): Do not inhibit setting a
12504 extra slot even if the purpose is char-code-property-table.
12505
12506 2011-08-23 Eli Zaretskii <eliz@gnu.org>
12507
12508 * xdisp.c (redisplay_window): When computing centering_position,
12509 account for the height of the header line. (Bug#8874)
12510
12511 * dispnew.c (buffer_posn_from_coords): Use buf_charpos_to_bytepos
12512 instead of CHAR_TO_BYTE. Fixes a crash when a completion
12513 candidate is selected by the mouse, and that candidate has a
12514 composed character under the mouse.
12515
12516 * xdisp.c (x_produce_glyphs): Set it->nglyphs to 1. Fixes pixel
12517 coordinates reported by pos-visible-in-window-p for a composed
12518 character in column zero.
12519
12520 2011-08-23 Stefan Monnier <monnier@iro.umontreal.ca>
12521
12522 * cmds.c (Fself_insert_command): Mention post-self-insert-hook.
12523
12524 2011-08-22 Eli Zaretskii <eliz@gnu.org>
12525
12526 * xdisp.c (BUFFER_POS_REACHED_P): If this is a composition,
12527 consider it a hit if to_charpos is anywhere in the range of the
12528 composed buffer positions.
12529
12530 2011-08-22 Chong Yidong <cyd@stupidchicken.com>
12531
12532 * image.c (gif_load): Don't assume that each subimage has the same
12533 dimensions as the base image. Handle disposal method that is
12534 "undefined" by the gif spec (Bug#9335).
12535
12536 2011-08-20 Chong Yidong <cyd@stupidchicken.com>
12537
12538 * eval.c (Fsignal): Handle `debug' symbol in error handler (Bug#9329).
12539 (Fcondition_case): Document `debug' symbol in error handler.
12540
12541 2011-08-19 Eli Zaretskii <eliz@gnu.org>
12542
12543 * xfaces.c (face_at_buffer_position): Avoid repeated evaluation of
12544 face ID by FACE_FROM_ID, and avoid a crash when mouse is moved
12545 from an Org mode buffer to a Speedbar frame.
12546
12547 * xdisp.c (RECORD_MAX_MIN_POS): If the display element comes from
12548 a composition, take its buffer position from IT->cmp_it.charpos.
12549 Fixes cursor positioning at the beginning of a line that begins
12550 with a composed character.
12551
12552 2011-08-18 Eli Zaretskii <eliz@gnu.org>
12553
12554 * bidi.c (bidi_get_type): If bidi_type_table reports zero as the
12555 character bidirectional type, use STRONG_L instead. Fixes crashes
12556 in a buffer produced by `describe-categories'.
12557
12558 * dispextern.h (struct bidi_it): Move disp_pos and disp_prop_p
12559 members before the level stack, so they would be saved and
12560 restored when copying iterator state. Fixes incorrect reordering
12561 around TABs covered by display properties.
12562
12563 2011-08-18 Andreas Schwab <schwab@linux-m68k.org>
12564
12565 * process.c (Fnetwork_interface_list): Correctly determine buffer size.
12566
12567 2011-08-17 Chong Yidong <cyd@stupidchicken.com>
12568
12569 * eval.c (internal_condition_case, internal_condition_case_1)
12570 (internal_condition_case_2, internal_condition_case_n):
12571 Remove unnecessary aborts (Bug#9081).
12572
12573 2011-08-17 Eli Zaretskii <eliz@gnu.org>
12574
12575 * lread.c (Fload) [DOS_NT]: If `openp' returns -2, but the file
12576 has no `load' handler, try opening the file locally. (Bug#9311)
12577
12578 2011-08-16 Ken Brown <kbrown@cornell.edu>
12579
12580 * gmalloc.c: Expand comment.
12581
12582 2011-08-16 Eli Zaretskii <eliz@gnu.org>
12583
12584 * xdisp.c (set_cursor_from_row): Don't accept a previous candidate
12585 if it fails the cursor_row_p test. Fixes cursor positioning at ZV.
12586
12587 2011-08-16 Ken Brown <kbrown@cornell.edu>
12588
12589 Fix memory allocation problems in Cygwin build (Bug#9273).
12590
12591 * unexcw.c ( __malloc_initialized): Declare external variable.
12592 (fixup_executable): Force the dumped emacs to reinitialize malloc.
12593
12594 * gmalloc.c [CYGWIN] (bss_sbrk_heapbase, bss_sbrk_heapinfo):
12595 New variables.
12596 (malloc_initialize_1) [CYGWIN]: Prepare for reinitializing the
12597 dumped emacs.
12598 (_free_internal_nolock) [CYGWIN]: Ignore requests to free storage
12599 in the static heap.
12600 [CYGWIN] (special_realloc): New function.
12601 (_realloc_internal_nolock) [CYGWIN]: Use the new function on
12602 requests to realloc storage in the static heap.
12603
12604 2011-08-15 Paul Eggert <eggert@cs.ucla.edu>
12605
12606 * bidi.c (bidi_initialize): Remove unused local.
12607
12608 2011-08-15 Eli Zaretskii <eliz@gnu.org>
12609
12610 * bidimirror.h:
12611 * biditype.h: Remove file.
12612 * makefile.w32-in ($(BLD)/bidi.$(O)):
12613 * deps.mk (bidi.o): Remove biditype.h and bidimirror.h.
12614
12615 * dispextern.h: Fix a typo in the comment to bidi_type_t.
12616
12617 * chartab.c: Improve commentary for the uniprop_table API.
12618
12619 * bidi.c (bidi_paragraph_init): Support zero value of
12620 bidi_ignore_explicit_marks_for_paragraph_level.
12621 (bidi_initialize): Use uniprop_table instead of including
12622 biditype.h and bidimirror.h.
12623
12624 * xdisp.c (move_it_in_display_line_to): Don't reset pixel
12625 coordinates of the iterator when restoring from ppos_it.
12626 (Bug#9296)
12627
12628 2011-08-14 Kenichi Handa <handa@m17n.org>
12629
12630 * process.c (create_process): Call setup_process_coding_systems
12631 after the pid of the process is set to -1 (Bug#8162).
12632
12633 2011-08-14 Eli Zaretskii <eliz@gnu.org>
12634
12635 * xdisp.c (move_it_in_display_line_to): Don't invoke
12636 IT_RESET_X_ASCENT_DESCENT when iterator position was restored from
12637 ppos_it. Fixes vertical cursor motion when line beginning is
12638 covered by an image. (Bug#9296)
12639
12640 2011-08-14 Jan Djärv <jan.h.d@swipnet.se>
12641
12642 * nsterm.h (ns_run_ascript): Declare.
12643 (NSAPP_DATA2_RUNASSCRIPT): Define.
12644
12645 * nsfns.m (as_script, as_result, as_status): New static variables.
12646 (ns_run_ascript): New function.
12647 (Fns_do_applescript): Set variables as_*. Make an NSApplicationDefined
12648 event with data2 set to NSAPP_DATA2_RUNASSCRIPT, post it and then start
12649 the event loop. Get status from as_status (Bug#7276).
12650
12651 * nsterm.m (sendEvent): If event is NSApplicationDefined and
12652 data2 is NSAPP_DATA2_RUNASSCRIPT, call ns_run_ascript and then exit
12653 the event loop (Bug#7276).
12654
12655 2011-08-14 Andreas Schwab <schwab@linux-m68k.org>
12656
12657 * gnutls.c (QCgnutls_bootprop_priority)
12658 (QCgnutls_bootprop_trustfiles, QCgnutls_bootprop_keylist)
12659 (QCgnutls_bootprop_crlfiles, QCgnutls_bootprop_callbacks)
12660 (QCgnutls_bootprop_loglevel, QCgnutls_bootprop_hostname)
12661 (QCgnutls_bootprop_min_prime_bits, QCgnutls_bootprop_verify_flags)
12662 (QCgnutls_bootprop_verify_hostname_error)
12663 (QCgnutls_bootprop_callbacks_verify): Rename from
12664 Qgnutls_bootprop_..., all uses changed.
12665
12666 * xfaces.c (QCignore_defface): Rename from Qignore_defface, all
12667 uses changed.
12668
12669 2011-08-14 Paul Eggert <eggert@cs.ucla.edu>
12670
12671 * xfaces.c (Qframe_set_background_mode): Now static.
12672 * dispextern.h (Qframe_set_background_mode): Remove decl.
12673
12674 * process.c (Fnetwork_interface_info): Declare local only if needed.
12675
12676 2011-08-13 Jan Djärv <jan.h.d@swipnet.se>
12677
12678 * process.c: Include ifaddrs.h and net/if_dl.h if available (Bug#8477).
12679 (Fnetwork_interface_list): Allocate in increments of bytes instead
12680 of sizeof (struct ifreq). Iterate over ifconf.ifc_req by counting
12681 bytes (Bug#8477). Count bytes correctly when ifr_addr is a struct
12682 sockaddr.
12683 (struct ifflag_def): notrailers is smart on OSX.
12684 (Fnetwork_interface_info): Handle case when ifr_flags is negative.
12685 Get hardware address with getifaddrs if available.
12686
12687 2011-08-12 Eli Zaretskii <eliz@gnu.org>
12688
12689 * xdisp.c (iterate_out_of_display_property): xassert that
12690 IT->position is set to within IT->object's boundaries. Break from
12691 the loop as soon as EOB is reached; avoids infloops in redisplay
12692 when IT->position is set up wrongly due to some bug.
12693 Set IT->current to match the bidi iterator unconditionally.
12694 (push_display_prop): Allow GET_FROM_STRING as IT->method on
12695 entry. Force push_it to save on the stack the current
12696 buffer/string position, to be restored by pop_it. Fix flags in
12697 the iterator structure wrt the object coming from a display
12698 property, as `line-prefix' and `wrap-prefix' are not ``replacing''
12699 properties. (Bug#9284)
12700
12701 2011-08-09 Andreas Schwab <schwab@linux-m68k.org>
12702
12703 * fontset.c (fontset_get_font_group): Add proper type checks.
12704 (Bug#9172)
12705
12706 2011-08-09 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
12707
12708 * unexmacosx.c (print_load_command_name): Add cases LC_FUNCTION_STARTS
12709 and LC_VERSION_MIN_MACOSX.
12710 (copy_linkedit_data) [LC_FUNCTION_STARTS]: New function.
12711 (dump_it) [LC_FUNCTION_STARTS]: Use it.
12712
12713 2011-08-08 Eli Zaretskii <eliz@gnu.org>
12714
12715 * xdisp.c (forward_to_next_line_start): Allow to use the
12716 no-display-properties-and-no-overlays under bidi display.
12717 Set disp_pos in the bidi iterator to avoid searches for display
12718 properties and overlays.
12719
12720 2011-08-08 Chong Yidong <cyd@stupidchicken.com>
12721
12722 * editfns.c (Fset_time_zone_rule): Document relationship with the
12723 setenv function.
12724
12725 * ftfont.c (ftfont_pattern_entity): Copy the extras argument to
12726 the font entity extracted from the cache (Bug#8109).
12727
12728 2011-08-07 Chong Yidong <cyd@stupidchicken.com>
12729
12730 * composite.c (autocmp_chars): Don't reset point. That is done by
12731 restore_point_unwind (Bug#5984).
12732
12733 2011-08-07 Juri Linkov <juri@jurta.org>
12734
12735 * editfns.c (Fformat_time_string): Doc fix, add tag `usage:'
12736 to show the arg `TIME' instead of `TIMEVAL'.
12737
12738 2011-08-06 Eli Zaretskii <eliz@gnu.org>
12739
12740 * xdisp.c (set_cursor_from_row): Fix cursor positioning when a
12741 display property strides EOL and includes a newline, as in
12742 longlines-mode. (Bug#9254)
12743 (move_it_in_display_line_to): Fix vertical-motion in a buffer with
12744 word-wrap under bidirectional display. (Bug#9224)
12745
12746 * bidi.c (bidi_unshelve_cache): Don't reset the cache if JUST_FREE
12747 is non-zero, even if the data buffer is NULL. Fixes a crash in
12748 vertical-motion with longlines-mode. (Bug#9254)
12749
12750 2011-08-05 Eli Zaretskii <eliz@gnu.org>
12751
12752 * bidi.c <bidi_cache_total_alloc>: Now static.
12753 (bidi_initialize): Initialize bidi_cache_total_alloc.
12754
12755 * xdisp.c (display_line): Release buffer allocated for shelved bidi
12756 cache. (Bug#9221)
12757
12758 * bidi.c (bidi_shelve_cache, bidi_unshelve_cache): Track total
12759 amount allocated this far in `bidi_cache_total_alloc'.
12760 (bidi_unshelve_cache): Accept an additional argument JUST_FREE; if
12761 non-zero, only free the data buffer without restoring the cache
12762 contents. All callers changed.
12763
12764 * dispextern.h (bidi_unshelve_cache): Update prototype.
12765
12766 * xdisp.c (SAVE_IT, pos_visible_p, move_it_in_display_line_to)
12767 (move_it_in_display_line, move_it_to)
12768 (move_it_vertically_backward, move_it_by_lines): Replace the call
12769 to xfree to an equivalent call to bidi_unshelve_cache.
12770 (move_it_in_display_line_to): Fix logic of returning
12771 MOVE_POS_MATCH_OR_ZV in the bidi case. (Bug#9224)
12772
12773 2011-08-05 Eli Zaretskii <eliz@gnu.org>
12774
12775 * xdisp.c (set_cursor_from_row): Prefer the candidate glyph that
12776 came from a string character with a `cursor' property. (Bug#9229)
12777
12778 2011-08-04 Jan Djärv <jan.h.d@swipnet.se>
12779
12780 * Makefile.in (LIB_PTHREAD): New variable.
12781 (LIBES): Add LIB_PTHREAD (Bug#9216).
12782
12783 * alloc.c, emacs.c, gmalloc.c, gtkutil.c, keyboard.c, syssignal.h:
12784 Rename HAVE_GTK_AND_PTHREAD to HAVE_PTHREAD (Bug#9216).
12785
12786 2011-08-04 Andreas Schwab <schwab@linux-m68k.org>
12787
12788 * regex.c (re_iswctype): Remove some redundant boolean conversions.
12789
12790 2011-08-04 Jan Djärv <jan.h.d@swipnet.se>
12791
12792 * xterm.c (x_find_topmost_parent): New function.
12793 (x_set_frame_alpha): Find topmost parent window with
12794 x_find_topmost_parent and set the property there also (bug#9181).
12795 (handle_one_xevent): Call x_set_frame_alpha on ReparentNotify.
12796
12797 2011-08-04 Paul Eggert <eggert@cs.ucla.edu>
12798
12799 * callproc.c (Fcall_process): Avoid vfork clobbering
12800 the local vars buffer, coding_systems, current_dir.
12801
12802 2011-08-03 Stefan Monnier <monnier@iro.umontreal.ca>
12803
12804 * keymap.c (Fmake_composed_keymap): Move to subr.el.
12805
12806 2011-08-03 Paul Eggert <eggert@cs.ucla.edu>
12807
12808 * fontset.c (dump_fontset) [FONTSET_DEBUG]: Declare EXTERNALLY_VISIBLE
12809 so that it is not optimized away.
12810
12811 * xdisp.c (compute_display_string_pos): Remove unused local.
12812
12813 2011-08-02 Eli Zaretskii <eliz@gnu.org>
12814
12815 Fix slow cursor motion and scrolling in large buffers with
12816 selective display, like Org Mode buffers. (Bug#9218)
12817
12818 * dispextern.h (struct bidi_it): New member disp_prop_p.
12819
12820 * xdisp.c: Remove one-slot cache of display string positions.
12821 (compute_display_string_pos): Accept an additional argument
12822 DISP_PROP_P; callers changed. Scan at most 5K characters forward
12823 for a display string or property. If found, set DISP_PROP_P
12824 non-zero.
12825
12826 * bidi.c (bidi_fetch_char): Accept an additional argument
12827 DISP_PROP_P, and pass it to compute_display_string_pos.
12828 Only handle text covered by a display string if DISP_PROP_P is returned
12829 non-zero. All callers of bidi_fetch_char changed.
12830
12831 2011-08-02 Stefan Monnier <monnier@iro.umontreal.ca>
12832
12833 * keymap.c (Fdefine_key): Fix Lisp_Object/int mixup; apply some CSE.
12834
12835 2010-12-03 Don March <don@ohspite.net>
12836
12837 * keymap.c (Fdefine_key): Fix non-prefix key error message when
12838 last character M-[char] is translated to ESC [char] (bug#7541).
12839
12840 2011-08-02 Kenichi Handa <handa@m17n.org>
12841
12842 * lisp.h (uniprop_table): Extern it.
12843
12844 * chartab.c (uniprop_table): Make it non-static.
12845
12846 2011-08-01 Eli Zaretskii <eliz@gnu.org>
12847
12848 * xdisp.c (forward_to_next_line_start): Accept additional argument
12849 BIDI_IT_PREV, and store into it the state of the bidi iterator had
12850 on the newline.
12851 (reseat_at_next_visible_line_start): Use the bidi iterator state
12852 returned by forward_to_next_line_start to restore the state of
12853 it->bidi_it after backing up to previous newline. (Bug#9212)
12854
12855 2011-07-30 Andreas Schwab <schwab@linux-m68k.org>
12856
12857 * regex.c (re_comp): Protoize.
12858 (re_exec): Fix return type.
12859 (regexec): Fix type of `ret'. (Bug#9203)
12860
12861 2011-07-28 Paul Eggert <eggert@cs.ucla.edu>
12862
12863 * image.c (check_image_size): Use 1024x1024 if unknown frame (Bug#9189).
12864 This is needed if max-image-size is a floating-point number.
12865
12866 2011-07-28 Andreas Schwab <schwab@linux-m68k.org>
12867
12868 * print.c (print_object): Print empty symbol as ##.
12869
12870 * lread.c (read1): Read ## as empty symbol.
12871
12872 2011-07-28 Alp Aker <alp.tekin.aker@gmail.com>
12873
12874 * nsfns.m (x_set_foreground_color): Set f->foreground_pixel when
12875 setting frame foreground color (Bug#9175).
12876 (x_set_background_color): Likewise.
12877
12878 * nsmenu.m (-setText): Size tooltip dimensions precisely to
12879 contents (Bug#9176).
12880 (EmacsTooltip -init): Remove bezels and add shadows to
12881 tooltip windows.
12882
12883 * nsterm.m (ns_dumpglyphs_stretch): Avoid overwriting left fringe
12884 or scroll bar (Bug#8470).
12885
12886 * nsfont.m (nsfont_open): Remove assignment to voffset and
12887 unnecessary vars hshink, expand, hd, full_height, min_height.
12888 (nsfont_draw): Use s->ybase as baseline for glyph drawing (Bug#8913).
12889
12890 * nsterm.h (nsfont_info): Remove voffset field.
12891
12892 2011-07-28 Alp Aker <alp.tekin.aker@gmail.com>
12893
12894 Implement strike-through and overline on NextStep (Bug#8863).
12895
12896 * nsfont.m (nsfont_open): Use underline position provided by font,
12897 instead of hard-coded value of 2.
12898 (nsfont_draw): Call ns_draw_text_decoration instead.
12899
12900 * nsterm.h: Add declaration for ns_draw_text_decoration.
12901
12902 * nsterm.m (ns_draw_text_decoration): New function for drawing
12903 underline, overline, and strike-through.
12904 (ns_dumpglyphs_image, ns_dumpglyphs_stretch): Add call to
12905 ns_draw_text_decoration. Change treatment of cursor drawing to
12906 accommodate underlining, etc.
12907
12908 2011-07-28 Eli Zaretskii <eliz@gnu.org>
12909
12910 * buffer.c (init_buffer_once): Set bidi-display-reordering to t by
12911 default.
12912
12913 2011-07-28 Paul Eggert <eggert@cs.ucla.edu>
12914
12915 * alloc.c (memory_full) [!SYNC_INPUT]: Fix signal-related race.
12916 Without this fix, if a signal arrives just after memory fills up,
12917 'malloc' might be invoked reentrantly.
12918
12919 * image.c (x_check_image_size) [!HAVE_X_WINDOWS]: Return 1.
12920 In other words, assume that every image size is allowed, on non-X
12921 hosts. This assumption is probably wrong, but it lets Emacs compile.
12922
12923 2011-07-28 Andreas Schwab <schwab@linux-m68k.org>
12924
12925 * regex.c (re_iswctype): Convert return values to boolean.
12926
12927 2011-07-28 Eli Zaretskii <eliz@fencepost.gnu.org>
12928
12929 * xdisp.c (compute_display_string_pos): Don't use cached display
12930 string position if the buffer had its restriction changed.
12931 (Bug#9184)
12932
12933 2011-07-28 Paul Eggert <eggert@cs.ucla.edu>
12934
12935 * callproc.c (Fcall_process): Use 'volatile' to avoid vfork clobbering.
12936
12937 2011-07-28 Paul Eggert <eggert@cs.ucla.edu>
12938
12939 Integer signedness and overflow and related fixes. (Bug#9079)
12940
12941 * bidi.c: Integer size and overflow fixes.
12942 (bidi_cache_size, bidi_cache_idx, bidi_cache_last_idx)
12943 (bidi_cache_start, bidi_cache_fetch_state, bidi_cache_search)
12944 (bidi_cache_find_level_change, bidi_cache_ensure_space)
12945 (bidi_cache_iterator_state, bidi_cache_find, bidi_cache_start_stack)
12946 (bidi_find_other_level_edge):
12947 Use ptrdiff_t instead of EMACS_INT where either will do.
12948 This works better on 32-bit hosts configured --with-wide-int.
12949 (bidi_cache_ensure_space): Check for size-calculation overflow.
12950 Use % rather than repeated addition, for better worst-case speed.
12951 Don't set bidi_cache_size until after xrealloc returns, because it
12952 might not return.
12953 (bidi_dump_cached_states): Use ptrdiff_t, not int, to avoid overflow.
12954 (bidi_cache_ensure_space): Also check that the bidi cache size
12955 does not exceed that of the largest Lisp string or buffer. See Eli
12956 Zaretskii in <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9079#29>.
12957
12958 * alloc.c (__malloc_size_t): Remove.
12959 All uses replaced by size_t. See Andreas Schwab's note
12960 <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9079#8>.
12961
12962 * image.c: Improve checking for integer overflow.
12963 (check_image_size): Assume that f is nonnull, since
12964 it is always nonnull in practice. This is one less thing to
12965 worry about when checking for integer overflow later.
12966 (x_check_image_size): New function, which checks for integer
12967 overflow issues inside X.
12968 (x_create_x_image_and_pixmap, xbm_read_bitmap_data): Use it.
12969 This removes the need for a memory_full check.
12970 (xbm_image_p): Rewrite to avoid integer multiplication overflow.
12971 (Create_Pixmap_From_Bitmap_Data, xbm_load): Use x_check_image_size.
12972 (xbm_read_bitmap_data): Change locals back to 'int', since
12973 their values must fit in 'int'.
12974 (xpm_load_image, png_load, tiff_load):
12975 Invoke x_create_x_image_and_pixmap earlier,
12976 to avoid much needless work if the image is too large.
12977 (tiff_load): Treat overly large images as if
12978 x_create_x_image_and_pixmap failed, not as malloc failures.
12979 (gs_load): Use x_check_image_size.
12980
12981 * gtkutil.c: Omit integer casts.
12982 (xg_get_pixbuf_from_pixmap): Remove unnecessary cast.
12983 (xg_set_toolkit_scroll_bar_thumb): Rewrite to avoid need for cast.
12984
12985 * image.c (png_load): Don't assume height * row_bytes fits in 'int'.
12986
12987 * xfaces.c (Fbitmap_spec_p): Fix integer overflow bug.
12988 Without this fix, (bitmap-spec-p '(34359738368 1 "x"))
12989 would wrongly return t on a 64-bit host.
12990
12991 * dispnew.c (init_display): Use *_RANGE_OVERFLOW macros.
12992 The plain *_OVERFLOW macros run afoul of GCC bug 49705
12993 <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49705>
12994 and therefore cause GCC to emit a bogus diagnostic in some cases.
12995
12996 * image.c: Integer signedness and overflow and related fixes.
12997 This is not an exhaustive set of fixes, but it's time to
12998 record what I've got.
12999 (lookup_pixel_color, check_image_size): Remove redundant decls.
13000 (check_image_size): Don't assume that arbitrary EMACS_INT values
13001 fit in 'int', or that arbitrary 'double' values fit in 'int'.
13002 (x_alloc_image_color, x_create_x_image_and_pixmap, png_load)
13003 (tiff_load, imagemagick_load_image):
13004 Check for overflow in size calculations.
13005 (x_create_x_image_and_pixmap): Remove unnecessary test for
13006 xmalloc returning NULL; that can't happen.
13007 (xbm_read_bitmap_data): Don't assume sizes fit into 'int'.
13008 (xpm_color_bucket): Use better integer hashing function.
13009 (xpm_cache_color): Don't possibly over-allocate memory.
13010 (struct png_memory_storage, tiff_memory_source, tiff_seek_in_memory)
13011 (gif_memory_source):
13012 Use ptrdiff_t, not int or size_t, to record sizes.
13013 (png_load): Don't assume values greater than 2**31 fit in 'int'.
13014 (our_stdio_fill_input_buffer): Prefer ptrdiff_t to size_t when
13015 either works, as we prefer signed integers.
13016 (tiff_read_from_memory, tiff_write_from_memory):
13017 Return tsize_t, not size_t, since that's what the TIFF API wants.
13018 (tiff_read_from_memory): Don't fail simply because the read would
13019 go past EOF; instead, return a short read.
13020 (tiff_load): Omit no-longer-needed casts.
13021 (Fimagemagick_types): Don't assume size fits into 'int'.
13022
13023 Improve hashing quality when configured --with-wide-int.
13024 * fns.c (hash_string): New function, taken from sxhash_string.
13025 Do not discard information about ASCII character case; this
13026 discarding is no longer needed.
13027 (sxhash-string): Use it. Change sig to match it. Caller changed.
13028 * lisp.h: Declare it.
13029 * lread.c (hash_string): Remove, since we now use fns.c's version.
13030 The fns.c version returns a wider integer if --with-wide-int is
13031 specified, so this should help the quality of the hashing a bit.
13032
13033 * emacs.c: Integer overflow minor fix.
13034 (heap_bss_diff): Now uprintmax_t, not unsigned long. All used changed.
13035 Define only if GNU_LINUX.
13036 (main, Fdump_emacs): Set and use heap_bss_diff only if GNU_LINUX.
13037
13038 * dispnew.c: Integer signedness and overflow fixes.
13039 Remove unnecessary forward decls, that were a maintenance hassle.
13040 (history_tick): Now uprintmax_t, so it's more likely to avoid overflow.
13041 All uses changed.
13042 (adjust_glyph_matrix, realloc_glyph_pool, adjust_frame_message_buffer)
13043 (scrolling_window): Use ptrdiff_t, not int, for byte count.
13044 (prepare_desired_row, line_draw_cost):
13045 Use int, not unsigned, where either works.
13046 (save_current_matrix, restore_current_matrix):
13047 Use ptrdiff_t, not size_t, where either works.
13048 (init_display): Check for overflow more accurately, and without
13049 relying on undefined behavior.
13050
13051 * editfns.c (pWIDE, pWIDElen, signed_wide, unsigned_wide):
13052 Remove, replacing with the new symbols in lisp.h. All uses changed.
13053 * fileio.c (make_temp_name):
13054 * filelock.c (lock_file_1, lock_file):
13055 * xdisp.c (message_dolog):
13056 Don't assume PRIdMAX etc. works; this isn't portable to pre-C99 hosts.
13057 Use pMd etc. instead.
13058 * lisp.h (printmax_t, uprintmax_t, pMd, pMu): New types and macros,
13059 replacing the pWIDE etc. symbols removed from editfns.c.
13060
13061 * keyboard.h (num_input_events): Now uintmax_t.
13062 This is (very slightly) less likely to mess up due to wraparound.
13063 All uses changed.
13064
13065 * buffer.c: Integer signedness fixes.
13066 (alloc_buffer_text, enlarge_buffer_text):
13067 Use ptrdiff_t rather than size_t when either will do, as we prefer
13068 signed integers.
13069
13070 * alloc.c: Integer signedness and overflow fixes.
13071 Do not impose an arbitrary 32-bit limit on malloc sizes when debugging.
13072 (__malloc_size_t): Default to size_t, not to int.
13073 (pure_size, pure_bytes_used_before_overflow, stack_copy_size)
13074 (Fgarbage_collect, mark_object_loop_halt, mark_object):
13075 Prefer ptrdiff_t to size_t when either would do, as we prefer
13076 signed integers.
13077 (XMALLOC_OVERRUN_CHECK_OVERHEAD): New macro.
13078 (xmalloc_overrun_check_header, xmalloc_overrun_check_trailer):
13079 Now const. Initialize with values that are in range even if char
13080 is signed.
13081 (XMALLOC_PUT_SIZE, XMALLOC_GET_SIZE): Remove, replacing with ...
13082 (xmalloc_put_size, xmalloc_get_size): New functions. All uses changed.
13083 These functions do the right thing with sizes > 2**32.
13084 (check_depth): Now ptrdiff_t, not int.
13085 (overrun_check_malloc, overrun_check_realloc, overrun_check_free):
13086 Adjust to new way of storing sizes. Check for size overflow bugs
13087 in rest of code.
13088 (STRING_BYTES_MAX): Adjust to new overheads. The old code was
13089 slightly wrong anyway, as it missed one instance of
13090 XMALLOC_OVERRUN_CHECK_OVERHEAD.
13091 (refill_memory_reserve): Omit needless cast to size_t.
13092 (mark_object_loop_halt): Mark as externally visible.
13093
13094 * xselect.c: Integer signedness and overflow fixes.
13095 (Fx_register_dnd_atom, x_handle_dnd_message):
13096 Use ptrdiff_t, not size_t, since we prefer signed.
13097 (Fx_register_dnd_atom): Check for ptrdiff_t (and size_t) overflow.
13098 * xterm.h (struct x_display_info): Use ptrdiff_t, not size_t, for
13099 x_dnd_atoms_size and x_dnd_atoms_length.
13100
13101 * doprnt.c: Prefer signed to unsigned when either works.
13102 * eval.c (verror):
13103 * doprnt.c (doprnt):
13104 * lisp.h (doprnt):
13105 * xdisp.c (vmessage):
13106 Use ptrdiff_t, not size_t, when using or implementing doprnt,
13107 since the sizes cannot exceed ptrdiff_t bounds anyway, and we
13108 prefer signed arithmetic to avoid comparison confusion.
13109 * doprnt.c (doprnt): Avoid a "+ 1" that can't overflow,
13110 but is a bit tricky.
13111
13112 Assume freestanding C89 headers, string.h, stdlib.h.
13113 * data.c, doprnt.c, floatfns.c, print.c:
13114 Include float.h unconditionally.
13115 * gmalloc.c: Assume C89-at-least behavior for preprocessor,
13116 limits.h, stddef.h, string.h. Use memset instead of 'flood'.
13117 * regex.c: Likewise for stddef.h, string.h.
13118 (ISASCII): Remove; can assume it returns 1 now. All uses removed.
13119 * s/aix4-2.h (HAVE_STRING_H): Remove obsolete undef.
13120 * s/ms-w32.h (HAVE_LIMITS_H, HAVE_STRING_H, HAVE_STDLIB_H)
13121 (STDC_HEADERS): Remove obsolete defines.
13122 * sysdep.c: Include limits.h unconditionally.
13123
13124 Assume support for memcmp, memcpy, memmove, memset.
13125 * lisp.h, sysdep.c (memcmp, memcpy, memmove, memset):
13126 * regex.c (memcmp, memcpy):
13127 Remove; we assume C89 now.
13128
13129 * gmalloc.c (memcpy, memset, memmove): Remove; we assume C89 now.
13130 (__malloc_safe_bcopy): Remove; no longer needed.
13131
13132 * lisp.h (struct vectorlike_header, struct Lisp_Subr): Signed sizes.
13133 Use EMACS_INT, not EMACS_UINT, for sizes. The code works equally
13134 well either way, and we prefer signed to unsigned.
13135
13136 2011-07-27 Lars Magne Ingebrigtsen <larsi@gnus.org>
13137
13138 * gnutls.c (emacs_gnutls_read): Don't message anything if the peer
13139 closes the connection while we're reading (bug#9182).
13140
13141 2011-07-25 Jan Djärv <jan.h.d@swipnet.se>
13142
13143 * nsmenu.m (ns_popup_dialog): Add an "ok" button if no buttons
13144 are specified (Bug#9168).
13145
13146 2011-07-25 Paul Eggert <eggert@cs.ucla.edu>
13147
13148 * bidi.c (bidi_dump_cached_states): Fix printf format mismatch.
13149 Found by GCC static checking and --with-wide-int on a 32-bit host.
13150
13151 2011-07-25 Eli Zaretskii <eliz@gnu.org>
13152
13153 * xdisp.c (compute_display_string_pos): Fix logic of caching
13154 previous display string position. Initialize cached_prev_pos to
13155 -1. Fixes slow-down at the beginning of a buffer.
13156
13157 2011-07-24 Eli Zaretskii <eliz@gnu.org>
13158
13159 * xfaces.c (check_lface_attrs) [HAVE_WINDOW_SYSTEM]: Allow `nil'
13160 for attrs[LFACE_FONTSET_INDEX].
13161
13162 2011-07-23 Paul Eggert <eggert@cs.ucla.edu>
13163
13164 * xml.c (parse_region): Remove unused local
13165 that was recently introduced.
13166
13167 2011-07-23 Eli Zaretskii <eliz@gnu.org>
13168
13169 * xfns.c (unwind_create_frame) [GLYPH_DEBUG]: Adapt to changes in
13170 2008-02-22T17:42:09Z!monnier@iro.umontreal.ca.
13171
13172 * xdisp.c (move_it_in_display_line_to): Record the best matching
13173 position for TO_CHARPOS while scanning the line, and restore it on
13174 exit if none of the characters scanned was an exact match.
13175 Fixes vertical-motion and pos-visible-in-window-p under bidi redisplay
13176 when exact match is impossible due to invisible text, and the
13177 lines are truncated.
13178
13179 2011-07-23 Jan Djärv <jan.h.d@swipnet.se>
13180
13181 * nsterm.m (initFrameFromEmacs): Set NSTitledWindowMask in styleMask
13182 for OSX >= 10.7.
13183
13184 2011-07-22 Eli Zaretskii <eliz@gnu.org>
13185
13186 Fix a significant slow-down of cursor motion with C-n, C-p,
13187 C-f/C-b, and C-v/M-v that couldn't keep up with keyboard
13188 auto-repeat under bidi redisplay in fontified buffers.
13189 * xdisp.c (compute_stop_pos_backwards): New function.
13190 (next_element_from_buffer): Call compute_stop_pos_backwards to
13191 find a suitable prev_stop when we find ourselves before
13192 base_level_stop.
13193 (reseat): Don't look for prev_stop, as that could mean a very long
13194 run.
13195 <cached_disp_pos, cached_disp_buffer, cached_disp_modiff>
13196 <cached_disp_overlay_modiff>: Cache for last found display string
13197 position.
13198 (compute_display_string_pos): Return the cached position if asked
13199 about the same buffer in the same area of character positions, and
13200 the buffer wasn't changed since the time the display string
13201 position was cached.
13202
13203 2011-07-22 Eli Zaretskii <eliz@gnu.org>
13204
13205 * xdisp.c (rows_from_pos_range): Don't ignore glyphs whose object
13206 is an integer, which is important for empty lines. (Bug#9149)
13207
13208 2011-07-22 Chong Yidong <cyd@stupidchicken.com>
13209
13210 * frame.c (Fmodify_frame_parameters): In tty case, update the
13211 default face if necessary (Bug#4238).
13212
13213 2011-07-21 Chong Yidong <cyd@stupidchicken.com>
13214
13215 * editfns.c (Fstring_to_char): No need to explain what a character
13216 is in the docstring (Bug#6576).
13217
13218 2011-07-20 Lars Magne Ingebrigtsen <larsi@gnus.org>
13219
13220 * xml.c (parse_region): Make sure we always return a tree.
13221
13222 2011-07-20 HAMANO Kiyoto <khiker.mail@gmail.com>
13223
13224 * xml.c (parse_region): If a document contains only comments,
13225 return that, too.
13226
13227 2011-07-20 Lars Magne Ingebrigtsen <larsi@gnus.org>
13228
13229 * xml.c (make_dom): Return comments, too.
13230
13231 2011-07-19 Paul Eggert <eggert@cs.ucla.edu>
13232
13233 Port to OpenBSD.
13234 See http://lists.gnu.org/archive/html/emacs-devel/2011-07/msg00688.html
13235 and the surrounding thread.
13236 * minibuf.c (read_minibuf_noninteractive): Rewrite to use getchar
13237 rather than fgets, and retry after EINTR. Otherwise, 'emacs
13238 --batch -f byte-compile-file' fails on OpenBSD if an inactivity
13239 timer goes off.
13240 * s/openbsd.h (BROKEN_SIGIO): Define.
13241 * unexelf.c (unexec) [__OpenBSD__]:
13242 Don't update the .mdebug section of the Alpha COFF symbol table.
13243
13244 2011-07-19 Lars Magne Ingebrigtsen <larsi@gnus.org>
13245
13246 * lread.c (syms_of_lread): Clarify when `lexical-binding' is used
13247 (bug#8460).
13248
13249 2011-07-18 Paul Eggert <eggert@cs.ucla.edu>
13250
13251 * fileio.c (Fcopy_file) [!MSDOS]: Tighten created file's mask.
13252 This fixes some race conditions on the permissions of any newly
13253 created file.
13254
13255 * alloc.c (valid_pointer_p): Use pipe, not open.
13256 This fixes some permissions issues when debugging.
13257
13258 * fileio.c (Fcopy_file): Adjust mode if fchown fails. (Bug#9002)
13259 If fchown fails to set both uid and gid, try to set just gid,
13260 as that is sometimes allowed. Adjust the file's mode to eliminate
13261 setuid or setgid bits that are inappropriate if fchown fails.
13262
13263 2011-07-18 Stefan Monnier <monnier@iro.umontreal.ca>
13264
13265 * xdisp.c (next_element_from_string, next_element_from_buffer): Use EQ
13266 to compare Lisp_Objects.
13267 * gnutls.c (syms_of_gnutls): Rename Vgnutls_log_level to
13268 global_gnutls_log_level, don't mistake it for a Lisp_Object.
13269 (init_gnutls_functions, emacs_gnutls_handle_error): Fix up uses.
13270
13271 2011-07-17 Andreas Schwab <schwab@linux-m68k.org>
13272
13273 * lread.c (read_integer): Unread even EOF character.
13274 (read1): Likewise. Properly record start position of symbol.
13275
13276 * lread.c (read1): Read `#:' as empty uninterned symbol if no
13277 symbol character follows.
13278
13279 2011-07-17 Paul Eggert <eggert@cs.ucla.edu>
13280
13281 * fileio.c (Fcopy_file): Pacify gcc re fchown. (Bug#9002)
13282 This works around a problem with the previous change to Fcopy_file.
13283 Recent glibc declares fchown with __attribute__((warn_unused_result)),
13284 and without this change, GCC might complain about discarding
13285 fchown's return value.
13286
13287 2011-07-16 Juanma Barranquero <lekktu@gmail.com>
13288
13289 * makefile.w32-in (GLOBAL_SOURCES): Add gnutls.c (followup to bug#9059).
13290
13291 2011-07-16 Paul Eggert <eggert@cs.ucla.edu>
13292
13293 * fileio.c (Fcopy_file): Don't diagnose fchown failures. (Bug#9002)
13294
13295 2011-07-16 Lars Magne Ingebrigtsen <larsi@gnus.org>
13296
13297 * gnutls.c (syms_of_gnutls): Define `gnutls-log-level' here, since
13298 it's used from the C level.
13299
13300 * process.c: Use the same condition for POLL_FOR_INPUT in both
13301 keyboard.c and process.c (bug#1858).
13302
13303 2011-07-09 Lawrence Mitchell <wence@gmx.li>
13304
13305 * gnutls.c (Qgnutls_bootprop_min_prime_bits): New variable.
13306 (Fgnutls_boot): Use it.
13307
13308 2011-07-15 Andreas Schwab <schwab@linux-m68k.org>
13309
13310 * doc.c (Fsubstitute_command_keys): Revert last change.
13311
13312 2011-07-15 Lars Magne Ingebrigtsen <larsi@gnus.org>
13313
13314 * doc.c (Fsubstitute_command_keys): Clarify that \= really only
13315 quotes the next character, and doesn't affect other longer
13316 sequences (bug#8935).
13317
13318 * lread.c (syms_of_lread): Clarify that is isn't only
13319 `eval-buffer' and `eval-defun' that's affected by
13320 `lexical-binding' (bug#8460).
13321
13322 2011-07-15 Eli Zaretskii <eliz@gnu.org>
13323
13324 * xdisp.c (move_it_in_display_line_to): Fix vertical motion with
13325 bidi redisplay when a line includes both an image and is truncated.
13326
13327 2011-07-14 Paul Eggert <eggert@cs.ucla.edu>
13328
13329 Fix minor problems found by static checking.
13330 * bidi.c (bidi_cache_size): Now EMACS_INT, not size_t.
13331 (elsz): Now a signed constant, not a size_t var. We prefer signed
13332 types to unsigned, to avoid integer comparison confusion. Without
13333 this change, GCC 4.6.1 with -Wunsafe-loop-optimizations complains
13334 "cannot optimize loop, the loop counter may overflow", a symptom
13335 of the confusion.
13336 * indent.c (Fvertical_motion): Mark locals as initialized.
13337 * xdisp.c (reseat_to_string): Fix pointer signedness issue.
13338
13339 2011-07-14 Lars Magne Ingebrigtsen <larsi@gnus.org>
13340
13341 * search.c (Fre_search_backward): Mention `case-fold-search' in
13342 all the re_search_* functions (bug#8138).
13343
13344 * keyboard.c (Fopen_dribble_file): Document when the file is
13345 closed (bug#8056).
13346
13347 2011-07-14 Eli Zaretskii <eliz@gnu.org>
13348
13349 * bidi.c (bidi_dump_cached_states): Fix format of displaying
13350 bidi_cache_idx.
13351
13352 Support bidi reordering of display and overlay strings.
13353 * xdisp.c (compute_display_string_pos)
13354 (compute_display_string_end): Accept additional argument STRING.
13355 (init_iterator, reseat_1): Initialize bidi_it->string.s to NULL.
13356 (reseat_to_string): Initialize bidi_it->string.s and
13357 bidi_it->string.schars.
13358 (Fcurrent_bidi_paragraph_direction): Initialize itb.string.s to
13359 NULL (avoids a crash in bidi_paragraph_init).
13360 Initialize itb.string.lstring.
13361 (init_iterator): Call bidi_init_it only of a valid
13362 buffer position was specified. Initialize paragraph_embedding to
13363 L2R.
13364 (reseat_to_string): Initialize the bidi iterator.
13365 (display_string): If we need to ignore text properties of
13366 LISP_STRING, set IT->stop_charpos to IT->end_charpos. (The
13367 original value of -1 will not work with bidi.)
13368 (compute_display_string_pos): First arg is now struct
13369 `text_pos *'; all callers changed. Support display properties on
13370 Lisp strings.
13371 (compute_display_string_end): Support display properties on Lisp
13372 strings.
13373 (init_iterator, reseat_1, reseat_to_string): Initialize the
13374 string.bufpos member to 0 (zero, for compatibility with IT_CHARPOS
13375 when iterating on a string not from display properties).
13376 (compute_display_string_pos, compute_display_string_end):
13377 Fix calculation of the object to scan. Fixes an error when using
13378 arrow keys.
13379 (next_element_from_buffer): Don't abort when IT_CHARPOS is before
13380 base_level_stop; instead, set base_level_stop to BEGV.
13381 Fixes crashes in vertical-motion.
13382 (next_element_from_buffer): Improve commentary for when
13383 the iterator is before prev_stop.
13384 (init_iterator): Initialize bidi_p from the default value of
13385 bidi-display-reordering, not from buffer-local value. Use the
13386 buffer-local value only if initializing for buffer iteration.
13387 (handle_invisible_prop): Support invisible properties on strings
13388 that are being bidi-reordered.
13389 (set_iterator_to_next): Support bidi reordering of C strings and
13390 Lisp strings.
13391 (next_element_from_string): Support bidi reordering of Lisp
13392 strings.
13393 (handle_stop_backwards): Support Lisp strings as well.
13394 (display_string): Support display of R2L glyph rows.
13395 Use IT_STRING_CHARPOS when displaying from a Lisp string.
13396 (init_iterator): Don't initialize it->bidi_p for strings
13397 here.
13398 (reseat_to_string): Initialize it->bidi_p for strings here.
13399 (next_element_from_string, next_element_from_c_string)
13400 (next_element_from_buffer): Add xassert's for correspondence
13401 between IT's object being iterated and it->bidi_it.string
13402 structure.
13403 (face_before_or_after_it_pos): Support bidi iteration.
13404 (next_element_from_c_string): Handle the case of the first string
13405 character that is not the first one in the visual order.
13406 (get_visually_first_element): New function, refactored from common
13407 parts of next_element_from_buffer, next_element_from_string, and
13408 next_element_from_c_string.
13409 (tool_bar_lines_needed, redisplay_tool_bar)
13410 (display_menu_bar): Force left-to-right direction. Add a FIXME
13411 comment for making that be controlled by a user option.
13412 (push_it, pop_it): Save and restore the state of the
13413 bidi iterator. Save and restore the bidi_p flag.
13414 (pop_it): Iterate out of display property for string iteration as
13415 well.
13416 (iterate_out_of_display_property): Support iteration over strings.
13417 (handle_single_display_spec): Set up it->bidi_it for iteration
13418 over a display string, and call bidi_init_it.
13419 (handle_single_display_spec, next_overlay_string)
13420 (get_overlay_strings_1, push_display_prop): Set up the bidi
13421 iterator for displaying display or overlay strings.
13422 (forward_to_next_line_start): Don't use the shortcut if
13423 bidi-iterating.
13424 (back_to_previous_visible_line_start): If handle_display_prop
13425 pushed the iterator stack, restore the internal state of the bidi
13426 iterator by calling bidi_pop_it same number of times.
13427 (reseat_at_next_visible_line_start): If ON_NEWLINE_P is non-zero,
13428 and we are bidi-iterating, don't decrement the iterator position;
13429 instead, set the first_elt flag in the bidi iterator, to produce
13430 the same effect.
13431 (reseat_1): Remove redundant setting of string_from_display_prop_p.
13432 (push_display_prop): xassert that we are iterating a buffer.
13433 (push_it, pop_it): Save and restore paragraph_embedding member.
13434 (handle_single_display_spec, next_overlay_string)
13435 (get_overlay_strings_1, reseat_1, reseat_to_string)
13436 (push_display_prop): Set up the `unibyte' member of bidi_it.string
13437 correctly. Don't assume unibyte strings are not bidi-reordered.
13438 (compute_display_string_pos)
13439 (compute_display_string_end): Fix handling the case of C string.
13440 (push_it, pop_it): Save and restore from_disp_prop_p.
13441 (handle_single_display_spec, push_display_prop): Set the
13442 from_disp_prop_p flag.
13443 (get_overlay_strings_1): Reset the from_disp_prop_p flag.
13444 (pop_it): Call iterate_out_of_display_property only if we are
13445 popping after iteration over a string that came from a display
13446 property. Fix a typo in popping stretch info. Add an assertion
13447 for verifying that the iterator position is in sync with the bidi
13448 iterator.
13449 (handle_single_display_spec, get_overlay_strings_1)
13450 (push_display_prop): Fix initialization of paragraph direction for
13451 string when that of the parent object is not yet determined.
13452 (reseat_1): Call bidi_init_it to resync the bidi
13453 iterator with IT's position. (Bug#7616)
13454 (find_row_edges): If ROW->start.pos gives position
13455 smaller than min_pos, use it as ROW->minpos. (Bug#7616)
13456 (handle_stop, back_to_previous_visible_line_start, reseat_1):
13457 Reset the from_disp_prop_p flag.
13458 (SAVE_IT, RESTORE_IT): New macros.
13459 (pos_visible_p, face_before_or_after_it_pos)
13460 (back_to_previous_visible_line_start)
13461 (move_it_in_display_line_to, move_it_in_display_line)
13462 (move_it_to, move_it_vertically_backward, move_it_by_lines)
13463 (try_scrolling, redisplay_window, display_line): Use them when
13464 saving a temporary copy of the iterator and restoring it back.
13465 (back_to_previous_visible_line_start, reseat_1)
13466 (init_iterator): Empty the bidi cache "stack".
13467 (move_it_in_display_line_to): If iterator ended up at
13468 EOL, but we never saw any buffer positions smaller than
13469 to_charpos, return MOVE_POS_MATCH_OR_ZV. Fixes vertical cursor
13470 motion in bidi-reordered lines.
13471 (move_it_in_display_line_to): Record prev_method and prev_pos
13472 immediately before the call to set_iterator_to_next. Fixes cursor
13473 motion in bidi-reordered lines with stretch glyphs and strings
13474 displayed in margins. (Bug#8133) (Bug#8867)
13475 Return MOVE_POS_MATCH_OR_ZV only if iterator position is past
13476 TO_CHARPOS.
13477 (pos_visible_p): Support positions in bidi-reordered lines.
13478 Save and restore bidi cache.
13479
13480 * bidi.c (bidi_level_of_next_char): clen should be EMACS_NT, not int.
13481 (bidi_paragraph_info): Delete unused struct.
13482 (bidi_cache_idx, bidi_cache_last_idx): Declare EMACS_INT.
13483 (bidi_cache_start): New variable.
13484 (bidi_cache_reset): Reset bidi_cache_idx to bidi_cache_start, not
13485 to zero.
13486 (bidi_cache_fetch_state, bidi_cache_search)
13487 (bidi_cache_find_level_change, bidi_cache_iterator_state)
13488 (bidi_cache_find, bidi_peek_at_next_level)
13489 (bidi_level_of_next_char, bidi_find_other_level_edge)
13490 (bidi_move_to_visually_next): Compare cache index with
13491 bidi_cache_start rather than with zero.
13492 (bidi_fetch_char): Accept new argument STRING; all callers
13493 changed. Support iteration over a string. Support strings with
13494 display properties. Support unibyte strings. Fix the type of
13495 `len' according to what STRING_CHAR_AND_LENGTH expects.
13496 (bidi_paragraph_init, bidi_resolve_explicit_1)
13497 (bidi_resolve_explicit, bidi_resolve_weak)
13498 (bidi_level_of_next_char, bidi_move_to_visually_next):
13499 Support iteration over a string.
13500 (bidi_set_sor_type, bidi_resolve_explicit_1)
13501 (bidi_resolve_explicit, bidi_type_of_next_char): ignore_bn_limit
13502 can now be zero (for strings); special values 0 and -1 were
13503 changed to -1 and -2, respectively.
13504 (bidi_char_at_pos): New function.
13505 (bidi_paragraph_init, bidi_resolve_explicit, bidi_resolve_weak):
13506 Call it instead of FETCH_MULTIBYTE_CHAR.
13507 (bidi_move_to_visually_next): Abort if charpos or bytepos were not
13508 initialized to valid values.
13509 (bidi_init_it): Don't initialize charpos and bytepos with invalid
13510 values.
13511 (bidi_level_of_next_char): Allow the sentinel "position" to pass
13512 the test for valid cached positions. Fix the logic for looking up
13513 the sentinel state in the cache. GCPRO the Lisp string we are
13514 iterating.
13515 (bidi_push_it, bidi_pop_it): New functions.
13516 (bidi_initialize): Initialize the bidi cache start stack pointer.
13517 (bidi_cache_ensure_space): New function, refactored from part of
13518 bidi_cache_iterator_state. Don't assume the required size is just
13519 one BIDI_CACHE_CHUNK away.
13520 (bidi_cache_start_stack, bidi_push_it): Use IT_STACK_SIZE.
13521 (bidi_count_bytes, bidi_char_at_pos): New functions.
13522 (bidi_cache_search): Don't assume bidi_cache_last_idx is
13523 always valid if bidi_cache_idx is valid.
13524 (bidi_cache_find_level_change): xassert that bidi_cache_last_idx
13525 is valid if it's going to be used.
13526 (bidi_shelve_cache, bidi_unshelve_cache): New functions.
13527 (bidi_cache_fetch_state, bidi_cache_search)
13528 (bidi_cache_find_level_change, bidi_cache_ensure_space)
13529 (bidi_cache_iterator_state, bidi_cache_find)
13530 (bidi_find_other_level_edge, bidi_cache_start_stack):
13531 All variables related to cache indices are now EMACS_INT.
13532
13533 * dispextern.h (struct bidi_string_data): New structure.
13534 (struct bidi_it): New member `string'. Make flag members be 1-bit
13535 fields, and put them last in the struct.
13536 (compute_display_string_pos, compute_display_string_end):
13537 Update prototypes.
13538 (bidi_push_it, bidi_pop_it): Add prototypes.
13539 (struct iterator_stack_entry): New members bidi_p,
13540 paragraph_embedding, and from_disp_prop_p.
13541 (struct it): Member bidi_p is now a bit field 1 bit wide.
13542 (bidi_shelve_cache, bidi_unshelve_cache):
13543 Declare prototypes.
13544
13545 * .gdbinit (xvectype, xvector, xcompiled, xchartable, xboolvector)
13546 (xpr, xfont, xbacktrace): Use "header.size" when accessing vectors
13547 and vector-like objects.
13548
13549 * dispnew.c (buffer_posn_from_coords): Save and restore the bidi
13550 cache around display iteration.
13551
13552 * window.c (Fwindow_end, window_scroll_pixel_based)
13553 (displayed_window_lines, Frecenter): Save and restore the bidi
13554 cache around display iteration.
13555
13556 2011-07-14 Lars Magne Ingebrigtsen <larsi@gnus.org>
13557
13558 * editfns.c (Fdelete_region): Clarify the use of the named
13559 parameters (bug#6788).
13560
13561 2011-07-14 Martin Rudalics <rudalics@gmx.at>
13562
13563 * indent.c (Fvertical_motion): Set and restore w->pointm when
13564 saving and restoring the window's buffer (Bug#9006).
13565
13566 2011-07-13 Lars Magne Ingebrigtsen <larsi@gnus.org>
13567
13568 * editfns.c (Fstring_to_char): Clarify just what is returned
13569 (bug#6576). Text by Eli Zaretskii.
13570
13571 2011-07-13 Juanma Barranquero <lekktu@gmail.com>
13572
13573 * gnutls.c (init_gnutls_functions): Honor gnutls_log_level (bug#9059).
13574
13575 2011-07-13 Eli Zaretskii <eliz@gnu.org>
13576
13577 * buffer.c (mmap_find): Fix a typo.
13578
13579 2011-07-13 Johan Bockgård <bojohan@gnu.org>
13580
13581 Fix execution of x selection hooks.
13582 * xselect.c (Qx_lost_selection_functions)
13583 (Qx_sent_selection_functions): New vars.
13584 (syms_of_xselect): DEFSYM them.
13585 (x_handle_selection_request): Pass Qx_sent_selection_functions
13586 rather than Vx_sent_selection_functions to Frun_hook_with_args.
13587 (x_handle_selection_clear,x_clear_frame_selections):
13588 Pass Qx_lost_selection_functions rather than
13589 Vx_lost_selection_functions to Frun_hook_with_args.
13590
13591 2011-07-13 Paul Eggert <eggert@cs.ucla.edu>
13592
13593 * buffer.c (Fget_buffer_create): Initialize inhibit_shrinking.
13594 The old code sometimes used this field without initializing it.
13595
13596 * alloc.c (gc_sweep): Don't read past end of array.
13597 In theory, the old code could also have corrupted Emacs internals,
13598 though it'd be very unlikely.
13599
13600 2011-07-12 Andreas Schwab <schwab@linux-m68k.org>
13601
13602 * character.c (Fcharacterp): Don't advertise optional ignored
13603 argument. (Bug#4026)
13604
13605 2011-07-12 Lars Magne Ingebrigtsen <larsi@gnus.org>
13606
13607 * keymap.c (syms_of_keymap): Clarify that "modifier" is "modifier
13608 key" (bug#4257).
13609
13610 * window.c (Fset_window_start): Doc fix (bug#4199).
13611 (Fset_window_hscroll): Ditto.
13612
13613 2011-07-12 Paul Eggert <eggert@cs.ucla.edu>
13614
13615 Fix minor new problems caught by GCC 4.6.1.
13616 * term.c (init_tty): Remove unused local.
13617 * xsettings.c (store_monospaced_changed): Define this function only
13618 if (defined HAVE_GSETTINGS || defined HAVE_GCONF), as it's
13619 not used otherwise.
13620
13621 2011-07-12 Chong Yidong <cyd@stupidchicken.com>
13622
13623 * xdisp.c (Vresize_mini_windows): Minor doc fix (Bug#3300).
13624
13625 2011-07-11 Lars Magne Ingebrigtsen <larsi@gnus.org>
13626
13627 * xdisp.c (syms_of_xdisp): Make it explicit that the mini-windows
13628 are the mini-buffer and the echo area (bug#3320).
13629
13630 * term.c (init_tty): Remove support for supdup, c10 and perq
13631 terminals, which are no longer supported (bug#1482).
13632
13633 2011-07-10 Johan Bockgård <bojohan@gnu.org>
13634
13635 * xdisp.c (Ftool_bar_lines_needed): Fix WINDOWP check.
13636
13637 2011-07-10 Jan Djärv <jan.h.d@swipnet.se>
13638
13639 * xmenu.c (menu_highlight_callback): Only pass frame to show_help_event
13640 for non-popups (Bug#3642).
13641
13642 2011-07-10 Andreas Schwab <schwab@linux-m68k.org>
13643
13644 * alloc.c (reset_malloc_hooks): Protoize.
13645 * buffer.c (mmap_init, mmap_find, mmap_free_1, mmap_enlarge)
13646 (mmap_set_vars, mmap_alloc, mmap_free, mmap_realloc): Likewise.
13647 * cm.c (losecursor): Likewise.
13648 * data.c (fmod): Likewise.
13649 * dispnew.c (swap_glyphs_in_rows): Likewise.
13650 * emacs.c (memory_warning_signal): Likewise.
13651 * floatfns.c (float_error): Likewise.
13652 * font.c (check_gstring, check_otf_features, otf_tag_symbol)
13653 (otf_open, font_otf_capability, generate_otf_features)
13654 (font_otf_DeviceTable, font_otf_ValueRecord, font_otf_Anchor):
13655 Likewise.
13656 * image.c (pbm_read_file): Likewise.
13657 * indent.c (string_display_width): Likewise.
13658 * intervals.c (check_for_interval, search_for_interval)
13659 (inc_interval_count, count_intervals, root_interval)
13660 (adjust_intervals_for_insertion, make_new_interval): Likewise.
13661 * lread.c (defalias): Likewise.
13662 * ralloc.c (r_alloc_check): Likewise.
13663 * regex.c (set_image_of_range_1, set_image_of_range)
13664 (regex_grow_registers): Likewise.
13665 * sysdep.c (strerror): Likewise.
13666 * termcap.c (valid_filename_p, tprint, main): Likewise.
13667 * tparam.c (main): Likewise.
13668 * unexhp9k800.c (run_time_remap, save_data_space)
13669 (update_file_ptrs, read_header, write_header, calculate_checksum)
13670 (copy_file, copy_rest, display_header): Likewise.
13671 * widget.c (mark_shell_size_user_specified, create_frame_gcs):
13672 Likewise.
13673 * xdisp.c (check_it): Likewise.
13674 * xfaces.c (register_color, unregister_color, unregister_colors):
13675 Likewise.
13676 * xfns.c (print_fontset_result): Likewise.
13677 * xrdb.c (member, fatal, main): Likewise.
13678
13679 2011-07-10 Paul Eggert <eggert@cs.ucla.edu>
13680
13681 Fix minor problems found by static checking (Bug#9031).
13682 * chartab.c (char_table_set_range, map_sub_char_table):
13683 Remove unused locals.
13684 (uniprop_table): Now static.
13685 * composite.c (_work_char): Remove unused static var.
13686
13687 2011-07-09 Juanma Barranquero <lekktu@gmail.com>
13688
13689 * chartab.c (uniprop_table_uncompress): Remove unused local variable.
13690
13691 2011-07-09 Jan Djärv <jan.h.d@swipnet.se>
13692
13693 * gtkutil.c (qttip_cb): Remove code without function.
13694
13695 2011-07-09 Eli Zaretskii <eliz@gnu.org>
13696
13697 * w32.c (pthread_sigmask): New stub.
13698
13699 2011-07-08 Paul Eggert <eggert@cs.ucla.edu>
13700
13701 Use pthread_sigmask, not sigprocmask (Bug#9010).
13702 sigprocmask is portable only for single-threaded applications, and
13703 Emacs can be multi-threaded when it uses GTK.
13704 * Makefile.in (LIB_PTHREAD_SIGMASK): New macro.
13705 (LIBES): Use it.
13706 * callproc.c (Fcall_process):
13707 * process.c (create_process):
13708 * sysdep.c (sys_sigblock, sys_sigunblock, sys_sigsetmask):
13709 Use pthread_sigmask, not sigprocmask.
13710
13711 2011-07-08 Jan Djärv <jan.h.d@swipnet.se>
13712
13713 * gtkutil.c (qttip_cb): Set line wrap to FALSE for tooltip widget.
13714 (xg_prepare_tooltip): Revert text in x->ttip_lbl, margins was
13715 wrong (Bug#8591).
13716
13717 2011-07-08 Jan Djärv <jan.h.d@swipnet.se>
13718
13719 * gtkutil.c (xg_prepare_tooltip): Fix indentation and comment.
13720 Put text in x->ttip_lbl instead of gtk_tooltip_set_text (Bug#8591).
13721 (xg_hide_tooltip): Fix comment.
13722
13723 * nsterm.m (initFrameFromEmacs): Don't use ns_return_types
13724 in registerServicesMenuSendTypes.
13725 (validRequestorForSendType): Don't check ns_return_types.
13726
13727 * nsfns.m (Fx_open_connection): Put NSStringPboardType into
13728 ns_return_type.
13729
13730 2011-07-08 Jason Rumney <jasonr@gnu.org>
13731
13732 * w32term.c (x_make_frame_visible): Use SH_SHOWNORMAL rather than
13733 SH_SHOW for hidden windows (Bug#5482).
13734
13735 * w32fns.c (w32_wnd_proc) [WM_TIMER, WM_SET_CURSOR]: Avoid using
13736 frame struct members of non-existent frames (Bug#6284).
13737
13738 2011-07-08 Jan Djärv <jan.h.d@swipnet.se>
13739
13740 * nsterm.m (keyDown): Call to wantsToDelayTextChangeNotifications and
13741 variable firstTime not needed on OSX >= 10.6.
13742 (setPosition): setFloatValue:knobProportion: is deprecated on OSX
13743 >= 10.5. Use setKnobProportion, setDoubleValue.
13744
13745 * nsterm.h (MAC_OS_X_VERSION_10_3, MAC_OS_X_VERSION_10_4)
13746 (MAC_OS_X_VERSION_10_5): Define if not defined.
13747 (EmacsView, EmacsTooltip): Implements NSWindowDelegate on OSX >= 10.6.
13748 (EmacsMenu): Implements NSMenuDelegate on OSX >= 10.6.
13749 (EmacsToolbar): Implements NSToolbarDelegate on OSX >= 10.6.
13750
13751 * nsselect.m (ns_string_from_pasteboard): Don't use deprecated methods
13752 cString and lossyCString on OSX >= 10.4.
13753
13754 * nsmenu.m (fillWithWidgetValue): Don't use deprecated method
13755 sizeToFit on OSX >= 10.2.
13756
13757 * nsimage.m (allocInitFromFile): Don't use deprecated method
13758 bestRepresentationForDevice on OSX >= 10.6.
13759
13760 * nsfns.m (check_ns_display_info): Cast to long and use %ld in error
13761 to avoid warning.
13762
13763 * emacs.c: Declare unexec_init_emacs_zone.
13764
13765 * nsgui.h: Fix compiler warning about gnulib redefining verify.
13766
13767 * nsselect.m (ns_get_local_selection): Change to extern (Bug#8842).
13768
13769 * nsmenu.m (ns_update_menubar): Remove useless setDelegate call
13770 on svcsMenu (Bug#8842).
13771
13772 * nsfns.m (Fx_open_connection): Remove NSStringPboardType from
13773 ns_return_types.
13774 (Fns_list_services): Just return Qnil on 10.6, code not working there.
13775
13776 * nsterm.m (QUTF8_STRING): Declare.
13777 (initFrameFromEmacs): Call registerServicesMenuSendTypes.
13778 (validRequestorForSendType): Return type is (id).
13779 Change indexOfObjectIdenticalTo to indexOfObject.
13780 Check if we have local selection before returning self (Bug#8842).
13781 (writeSelectionToPasteboard): Put local selection into paste board
13782 if we have a local selection (Bug#8842).
13783 (syms_of_nsterm): DEFSYM QUTF8_STRING.
13784
13785 * nsterm.h (MAC_OS_X_VERSION_10_6): Define here instead of nsterm.m.
13786 (ns_get_local_selection): Declare.
13787
13788 2011-07-07 Lars Magne Ingebrigtsen <larsi@gnus.org>
13789
13790 * keymap.c (describe_map_tree): Don't insert a double newline at
13791 the end of the buffer (bug#1169) and return whether we inserted
13792 something.
13793
13794 * callint.c (Fcall_interactively): Change "reading args" to
13795 "providing args" to try to clarify what it does (bug#1010).
13796
13797 2011-07-07 Kenichi Handa <handa@m17n.org>
13798
13799 * composite.c (composition_compute_stop_pos): Ignore a static
13800 composition starting before CHARPOS (Bug#8915).
13801
13802 * xdisp.c (handle_composition_prop): Likewise.
13803
13804 2011-07-07 Eli Zaretskii <eliz@gnu.org>
13805
13806 * term.c (produce_glyphs) <xassert>: Allow IT_GLYPHLESS in it->what.
13807 (Bug#9015)
13808
13809 2011-07-07 Kenichi Handa <handa@m17n.org>
13810
13811 * character.h (unicode_category_t): New enum type.
13812
13813 * chartab.c (uniprop_decoder_t, uniprop_encoder_t): New types.
13814 (Qchar_code_property_table): New variable.
13815 (UNIPROP_TABLE_P, UNIPROP_GET_DECODER)
13816 (UNIPROP_COMPRESSED_FORM_P): New macros.
13817 (char_table_ascii): Uncompress the compressed values.
13818 (sub_char_table_ref): New arg is_uniprop. Callers changed.
13819 Uncompress the compressed values.
13820 (sub_char_table_ref_and_range): Likewise.
13821 (char_table_ref_and_range): Uncompress the compressed values.
13822 (sub_char_table_set): New arg is_uniprop. Callers changed.
13823 Uncompress the compressed values.
13824 (sub_char_table_set_range): Args changed. Callers changed.
13825 (char_table_set_range): Adjuted for the above change.
13826 (map_sub_char_table): Delete args default_val and parent. Add arg
13827 top. Give decoded values to a Lisp function.
13828 (map_char_table): Adjust for the above change. Give decoded
13829 values to a Lisp function. Gcpro more variables.
13830 (uniprop_table_uncompress)
13831 (uniprop_decode_value_run_length): New functions.
13832 (uniprop_decoder, uniprop_decoder_count): New variables.
13833 (uniprop_get_decoder, uniprop_encode_value_character)
13834 (uniprop_encode_value_run_length, uniprop_encode_value_numeric):
13835 New functions.
13836 (uniprop_encoder, uniprop_encoder_count): New variables.
13837 (uniprop_get_encoder, uniprop_table)
13838 (Funicode_property_table_internal, Fget_unicode_property_internal)
13839 (Fput_unicode_property_internal): New functions.
13840 (syms_of_chartab): DEFSYM Qchar_code_property_table, defsubr
13841 Sunicode_property_table_internal, Sget_unicode_property_internal,
13842 and Sput_unicode_property_internal. Defvar_lisp
13843 char-code-property-alist.
13844
13845 * composite.c (CHAR_COMPOSABLE_P): Adjust for the change of
13846 Vunicode_category_table.
13847
13848 * font.c (font_range): Adjust for the change of
13849 Vunicode_category_table.
13850
13851 2011-07-07 Dan Nicolaescu <dann@ics.uci.edu>
13852
13853 * m/iris4d.h: Remove file, move contents ...
13854 * s/irix6-5.h: ... here.
13855
13856 2011-07-06 Paul Eggert <eggert@cs.ucla.edu>
13857
13858 Remove unportable assumption about struct layout (Bug#8884).
13859 * alloc.c (mark_buffer):
13860 * buffer.c (reset_buffer_local_variables, Fbuffer_local_variables)
13861 (clone_per_buffer_values): Don't assume that
13862 sizeof (struct buffer) is a multiple of sizeof (Lisp_Object).
13863 This isn't true in general, and it's particularly not true
13864 if Emacs is configured with --with-wide-int.
13865 * buffer.h (FIRST_FIELD_PER_BUFFER, LAST_FIELD_PER_BUFFER):
13866 New macros, used in the buffer.c change.
13867
13868 2011-07-05 Jan Djärv <jan.h.d@swipnet.se>
13869
13870 * xsettings.c: Use both GConf and GSettings if both are available.
13871 (store_config_changed_event): Add comment.
13872 (dpyinfo_valid, store_font_name_changed, map_tool_bar_style)
13873 (store_tool_bar_style_changed): New functions.
13874 (store_monospaced_changed): Add comment. Call dpyinfo_valid.
13875 (struct xsettings): Move font inside HAVE_XFT.
13876 (GSETTINGS_TOOL_BAR_STYLE, GSETTINGS_FONT_NAME): New defines.
13877 (GSETTINGS_MONO_FONT): Rename from SYSTEM_MONO_FONT.
13878 Move inside HAVE_XFT.
13879 (something_changed_gsettingsCB): Rename from something_changedCB.
13880 Check for changes in GSETTINGS_TOOL_BAR_STYLE and GSETTINGS_FONT_NAME
13881 also.
13882 (GCONF_TOOL_BAR_STYLE, GCONF_FONT_NAME): New defines.
13883 (GCONF_MONO_FONT): Rename from SYSTEM_MONO_FONT. Move inside HAVE_XFT.
13884 (something_changed_gconfCB): Rename from something_changedCB.
13885 Check for changes in GCONF_TOOL_BAR_STYLE and GCONF_FONT_NAME also.
13886 (parse_settings): Move check for font inside HAVE_XFT.
13887 (read_settings, apply_xft_settings): Add comment.
13888 (read_and_apply_settings): Add comment. Call map_tool_bar_style and
13889 store_tool_bar_style_changed. Move check for font inside HAVE_XFT and
13890 call store_font_name_changed.
13891 (xft_settings_event): Add comment.
13892 (init_gsettings): Add comment. Get values for GSETTINGS_TOOL_BAR_STYLE
13893 and GSETTINGS_FONT_NAME. Move check for fonts within HAVE_XFT.
13894 (init_gconf): Add comment. Get values for GCONF_TOOL_BAR_STYLE
13895 and GCONF_FONT_NAME. Move check for fonts within HAVE_XFT.
13896 (xsettings_initialize): Call init_gsettings last.
13897 (xsettings_get_system_font, xsettings_get_system_normal_font):
13898 Add comment.
13899
13900 2011-07-05 Paul Eggert <eggert@cs.ucla.edu>
13901
13902 Random fixes. E.g., (random) never returned negative values.
13903 * fns.c (Frandom): Use GET_EMACS_TIME for random seed, and add the
13904 subseconds part to the entropy, as that's a bit more random.
13905 Prefer signed to unsigned, since the signedness doesn't matter and
13906 in general we prefer signed. When given a limit, use a
13907 denominator equal to INTMASK + 1, not to VALMASK + 1, because the
13908 latter isn't right if USE_2_TAGS_FOR_INTS.
13909 * sysdep.c (get_random): Return a value in the range 0..INTMASK,
13910 not 0..VALMASK. Don't discard "excess" bits that random () returns.
13911
13912 2011-07-04 Stefan Monnier <monnier@iro.umontreal.ca>
13913
13914 * textprop.c (text_property_stickiness):
13915 Obey Vtext_property_default_nonsticky.
13916 (syms_of_textprop): Add `display' to Vtext_property_default_nonsticky.
13917 * w32fns.c (syms_of_w32fns):
13918 * xfns.c (syms_of_xfns): Don't Add `display' since it's there by default.
13919
13920 2011-07-04 Paul Eggert <eggert@cs.ucla.edu>
13921
13922 * fileio.c (barf_or_query_if_file_exists): Use S_ISDIR.
13923 This is more efficient than Ffile_directory_p and avoids a minor race.
13924
13925 2011-07-04 Lars Magne Ingebrigtsen <larsi@gnus.org>
13926
13927 * buffer.c (Foverlay_put): Say what the return value is
13928 (bug#7835).
13929
13930 * fileio.c (barf_or_query_if_file_exists): Check first if the file
13931 is a directory before asking whether to use the file name
13932 (bug#7564).
13933 (barf_or_query_if_file_exists): Make the "File is a directory"
13934 error be more correct.
13935
13936 * fns.c (Frequire): Remove the mention of the .gz files, since
13937 that's installation-specific, but keep the mention of
13938 `get-load-suffixes'.
13939
13940 2011-07-04 Paul Eggert <eggert@cs.ucla.edu>
13941
13942 * editfns.c (Fformat_time_string): Don't assume strlen fits in int.
13943 Report string overflow if the output is too long.
13944
13945 2011-07-04 Juanma Barranquero <lekktu@gmail.com>
13946
13947 * gnutls.c (Fgnutls_boot): Don't mention :verify-error.
13948 (syms_of_gnutls): Remove duplicate DEFSYM for
13949 Qgnutls_bootprop_verify_hostname_error, an error for
13950 Qgnutls_bootprop_verify_error (which is no longer used).
13951
13952 * eval.c (find_handler_clause): Remove parameters `sig' and `data',
13953 unused since 2011-01-26T20:02:07Z!monnier@iro.umontreal.ca. All callers changed.
13954 Also (re)move comments that are misplaced or no longer relevant.
13955
13956 2011-07-03 Lars Magne Ingebrigtsen <larsi@gnus.org>
13957
13958 * callint.c (Finteractive): Clarify the meaning of "@" (bug#8813).
13959
13960 2011-07-03 Chong Yidong <cyd@stupidchicken.com>
13961
13962 * xfaces.c (Finternal_merge_in_global_face): Modify the foreground
13963 and background color parameters if they have been changed.
13964
13965 2011-07-03 Lars Magne Ingebrigtsen <larsi@gnus.org>
13966
13967 * editfns.c (Fformat): Clarify the - and 0 flags (bug#6659).
13968
13969 2011-07-03 Paul Eggert <eggert@cs.ucla.edu>
13970
13971 * xsettings.c (SYSTEM_FONT): Define only when used.
13972 No need to define when HAVE_GSETTINGS || !HAVE_XFT.
13973
13974 * keymap.c (access_keymap_1): Now static.
13975
13976 2011-07-02 Chong Yidong <cyd@stupidchicken.com>
13977
13978 * keyboard.c (command_loop_1): If a down-mouse event is unbound,
13979 leave any prefix arg for the up event (Bug#1586).
13980
13981 2011-07-02 Lars Magne Ingebrigtsen <larsi@gnus.org>
13982
13983 * lread.c (syms_of_lread): Mention single symbols defined by
13984 `defvar' or `defconst' (bug#7154).
13985
13986 * fns.c (Frequire): Mention .el.gz files (bug#7314).
13987 (Frequire): Mention get-load-suffixes.
13988
13989 2011-07-02 Martin Rudalics <rudalics@gmx.at>
13990
13991 * window.h (window): Remove clone_number slot.
13992 * window.c (Fwindow_clone_number, Fset_window_clone_number):
13993 Remove.
13994 (make_parent_window, make_window, saved_window)
13995 (Fset_window_configuration, save_window_save): Don't deal with
13996 clone numbers.
13997 * buffer.c (Qclone_number): Remove declaration.
13998 (sort_overlays, overlay_strings): Don't deal with clone numbers.
13999
14000 2011-07-02 Stefan Monnier <monnier@iro.umontreal.ca>
14001
14002 Add multiple inheritance to keymaps.
14003 * keymap.c (Fmake_composed_keymap): New function.
14004 (Fset_keymap_parent): Simplify.
14005 (fix_submap_inheritance): Remove.
14006 (access_keymap_1): New function extracted from access_keymap to handle
14007 embedded parents and handle lists of maps.
14008 (access_keymap): Use it.
14009 (Fkeymap_prompt, map_keymap_internal, map_keymap, store_in_keymap)
14010 (Fcopy_keymap): Handle embedded parents.
14011 (Fcommand_remapping, define_as_prefix): Simplify.
14012 (Fkey_binding): Simplify.
14013 (syms_of_keymap): Move minibuffer-local-completion-map,
14014 minibuffer-local-filename-completion-map,
14015 minibuffer-local-must-match-map, and
14016 minibuffer-local-filename-must-match-map to Elisp.
14017 (syms_of_keymap): Defsubr make-composed-keymap.
14018 * keyboard.c (menu_bar_items): Use map_keymap_canonical.
14019 (parse_menu_item): Trivial simplification.
14020
14021 2011-07-01 Glenn Morris <rgm@gnu.org>
14022
14023 * Makefile.in (SETTINGS_LIBS): Fix typo.
14024
14025 2011-07-01 Kazuhiro Ito <kzhr@d1.dion.ne.jp> (tiny change)
14026
14027 * coding.c (Fencode_coding_string): Record the last coding system
14028 used, as the function doc string says (bug#8738).
14029
14030 2011-07-01 Jan Djärv <jan.h.d@swipnet.se>
14031
14032 * xsettings.c (store_monospaced_changed): Take new font as arg and
14033 check for change against current_mono_font.
14034 (EMACS_TYPE_SETTINGS): Remove this and related defines.
14035 (emacs_settings_constructor, emacs_settings_get_property)
14036 (emacs_settings_set_property, emacs_settings_class_init)
14037 (emacs_settings_init, gsettings_obj): Remove.
14038 (something_changedCB): New function for HAVE_GSETTINGS.
14039 (something_changedCB): HAVE_GCONF: Call store_monospaced_changed
14040 with value as argument.
14041 (init_gsettings): Check that GSETTINGS_SCHEMA exists before calling
14042 g_settings_new (Bug#8967). Do not create gsettings_obj.
14043 Remove calls to g_settings_bind. Connect something_changedCB to
14044 "changed".
14045
14046 * xgselect.c: Add defined (HAVE_GSETTINGS).
14047 (xgselect_initialize): Ditto.
14048
14049 * process.c: Add defined (HAVE_GSETTINGS) for xgselect.h
14050 (wait_reading_process_output): Add defined (HAVE_GSETTINGS) for
14051 xg_select.
14052
14053 2011-07-01 Paul Eggert <eggert@cs.ucla.edu>
14054
14055 * eval.c (struct backtrace): Simplify and port the data structure.
14056 Do not assume that "int nargs : BITS_PER_INT - 2;" produces a
14057 signed bit field, as this assumption is not portable and it makes
14058 Emacs crash when compiled with Sun C 5.8 on sparc. Do not use
14059 "char debug_on_exit : 1" as this is not portable either; instead,
14060 use the portable "unsigned int debug_on_exit : 1". Remove unused
14061 member evalargs. Remove obsolete comments about cc bombing out.
14062
14063 2011-06-30 Jan Djärv <jan.h.d@swipnet.se>
14064
14065 * xsettings.c: Include glib-object.h, gio/gio.h if HAVE_GSETTINGS.
14066 Let HAVE_GSETTINGS override HAVE_GCONF.
14067 (store_monospaced_changed): New function.
14068 (EMACS_SETTINGS): A new type derived from GObject to handle
14069 GSettings notifications.
14070 (emacs_settings_constructor, emacs_settings_get_property)
14071 (emacs_settings_set_property, emacs_settings_class_init):
14072 New functions.
14073 (gsettings_client, gsettings_obj): New variables.
14074 (GSETTINGS_SCHEMA): New define.
14075 (something_changedCB): Call store_monospaced_changed.
14076 (init_gsettings): New function.
14077 (xsettings_initialize): Call init_gsettings.
14078 (syms_of_xsettings): Initialize gsettings_client, gsettings_obj
14079 to NULL.
14080
14081 * Makefile.in (SETTINGS_CFLAGS, SETTINGS_LIBS): Rename from
14082 GCONF_CFLAGS/LIBS.
14083
14084 2011-06-29 Martin Rudalics <rudalics@gmx.at>
14085
14086 * window.c (resize_root_window, grow_mini_window)
14087 (shrink_mini_window): Rename Qresize_root_window to
14088 Qwindow_resize_root_window and Qresize_root_window_vertically to
14089 Qwindow_resize_root_window_vertically.
14090
14091 2011-06-28 Paul Eggert <eggert@cs.ucla.edu>
14092
14093 * gnutls.c (Qgnutls_bootprop_verify_error): Remove unused var.
14094
14095 2011-06-27 Juanma Barranquero <lekktu@gmail.com>
14096
14097 * makefile.w32-in: Redesign dependencies so they reflect more
14098 clearly which files are directly included by each source file,
14099 and not through other includes.
14100
14101 2011-06-27 Martin Rudalics <rudalics@gmx.at>
14102
14103 * buffer.c (Qclone_number): Declare static and DEFSYM it.
14104 (sort_overlays, overlay_strings): When an overlay's clone number
14105 matches the window's clone number process the overlay even if
14106 the overlay's window property doesn't match the current window.
14107
14108 * window.c (Fwindow_vchild): Rename to Fwindow_top_child.
14109 (Fwindow_hchild): Rename to Fwindow_left_child.
14110 (Fwindow_next): Rename to Fwindow_next_sibling.
14111 (Fwindow_prev): Rename to Fwindow_prev_sibling.
14112 (resize_window_check): Rename to window_resize_check.
14113 (resize_window_apply): Rename to window_resize_apply.
14114 (Fresize_window_apply): Rename to Fwindow_resize_apply.
14115 (Fdelete_other_windows_internal, resize_frame_windows)
14116 (Fsplit_window_internal, Fdelete_window_internal)
14117 (grow_mini_window, shrink_mini_window)
14118 (Fresize_mini_window_internal): Fix callers accordingly.
14119
14120 2011-06-26 Jan Djärv <jan.h.d@swipnet.se>
14121
14122 * emacsgtkfixed.h: State that this is only used with Gtk+3.
14123 (emacs_fixed_set_min_size): Remove.
14124 (emacs_fixed_new): Take frame as argument.
14125
14126 * emacsgtkfixed.c: State that this is only used with Gtk+3.
14127 (_EmacsFixedPrivate): Remove minwidth/height.
14128 Add struct frame *f.
14129 (emacs_fixed_init): Initialize priv->f.
14130 (get_parent_class, emacs_fixed_set_min_size): Remove.
14131 (emacs_fixed_new): Set priv->f to argument.
14132 (emacs_fixed_get_preferred_width)
14133 (emacs_fixed_get_preferred_height): Use min_width/height from
14134 frames size_hint to set minimum and natural (Bug#8919).
14135 (XSetWMSizeHints, XSetWMNormalHints): Override these functions
14136 and use min_width/height from frames size_hint to set
14137 min_width/height (Bug#8919).
14138
14139 * gtkutil.c (xg_create_frame_widgets): Pass f to emacs_fixed_new.
14140 (x_wm_set_size_hint): Remove call to emacs_fixed_set_min_size.
14141 Fix indentation.
14142
14143 2011-06-26 Eli Zaretskii <eliz@gnu.org>
14144
14145 * bidi.c (bidi_paragraph_init): Test for ZV_BYTE before calling
14146 bidi_at_paragraph_end, since fast_looking_at doesn't like to be
14147 called at ZV.
14148
14149 2011-06-26 Chong Yidong <cyd@stupidchicken.com>
14150
14151 * process.c (wait_reading_process_output): Bypass select if
14152 waiting for a cell while ignoring keyboard input, and input is
14153 pending. Suggested by Jan Djärv (Bug#8869).
14154
14155 2011-06-25 Paul Eggert <eggert@cs.ucla.edu>
14156
14157 Use gnulib's dup2 module instead of rolling our own.
14158 * sysdep.c (dup2) [!HAVE_DUP2]: Remove; gnulib now does this.
14159
14160 2011-06-25 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
14161
14162 * dispnew.c (scrolling_window): Before scrolling, turn off a
14163 mouse-highlight in the window being scrolled.
14164
14165 2011-06-24 Juanma Barranquero <lekktu@gmail.com>
14166
14167 Move DEFSYM to lisp.h and use everywhere.
14168
14169 * character.h (DEFSYM): Move declaration...
14170 * lisp.h (DEFSYM): ...here.
14171
14172 * gnutls.c:
14173 * minibuf.c:
14174 * w32menu.c:
14175 * w32proc.c:
14176 * w32select.c: Don't include character.h.
14177
14178 * alloc.c (syms_of_alloc):
14179 * buffer.c (syms_of_buffer):
14180 * bytecode.c (syms_of_bytecode):
14181 * callint.c (syms_of_callint):
14182 * casefiddle.c (syms_of_casefiddle):
14183 * casetab.c (init_casetab_once):
14184 * category.c (init_category_once, syms_of_category):
14185 * ccl.c (syms_of_ccl):
14186 * cmds.c (syms_of_cmds):
14187 * composite.c (syms_of_composite):
14188 * dbusbind.c (syms_of_dbusbind):
14189 * dired.c (syms_of_dired):
14190 * dispnew.c (syms_of_display):
14191 * doc.c (syms_of_doc):
14192 * editfns.c (syms_of_editfns):
14193 * emacs.c (syms_of_emacs):
14194 * eval.c (syms_of_eval):
14195 * fileio.c (syms_of_fileio):
14196 * fns.c (syms_of_fns):
14197 * frame.c (syms_of_frame):
14198 * fringe.c (syms_of_fringe):
14199 * insdel.c (syms_of_insdel):
14200 * keymap.c (syms_of_keymap):
14201 * lread.c (init_obarray, syms_of_lread):
14202 * macros.c (syms_of_macros):
14203 * msdos.c (syms_of_msdos):
14204 * print.c (syms_of_print):
14205 * process.c (syms_of_process):
14206 * search.c (syms_of_search):
14207 * sound.c (syms_of_sound):
14208 * syntax.c (init_syntax_once, syms_of_syntax):
14209 * terminal.c (syms_of_terminal):
14210 * textprop.c (syms_of_textprop):
14211 * undo.c (syms_of_undo):
14212 * w32.c (globals_of_w32):
14213 * window.c (syms_of_window):
14214 * xdisp.c (syms_of_xdisp):
14215 * xfaces.c (syms_of_xfaces):
14216 * xfns.c (syms_of_xfns):
14217 * xmenu.c (syms_of_xmenu):
14218 * xsettings.c (syms_of_xsettings):
14219 * xterm.c (syms_of_xterm): Use DEFSYM.
14220
14221 2011-06-24 Teodor Zlatanov <tzz@lifelogs.com>
14222
14223 * gnutls.c (syms_of_gnutls): Use the DEFSYM macro from character.h.
14224
14225 2011-06-23 Paul Eggert <eggert@cs.ucla.edu>
14226
14227 Integer and buffer overflow fixes (Bug#8873).
14228
14229 * print.c (printchar, strout): Check for string overflow.
14230 (PRINTPREPARE, printchar, strout):
14231 Don't set size unless allocation succeeds.
14232
14233 * minibuf.c (read_minibuf_noninteractive): Use ptrdiff_t, not int,
14234 for sizes. Check for string overflow more accurately.
14235 Simplify newline removal at end; this suppresses a GCC 4.6.0 warning.
14236
14237 * macros.c: Integer and buffer overflow fixes.
14238 * keyboard.h (struct keyboard.kbd_macro_bufsize):
14239 * macros.c (Fstart_kbd_macro, store_kbd_macro_char):
14240 Use ptrdiff_t, not int, for sizes.
14241 Don't increment bufsize until after realloc succeeds.
14242 Check for size-calculation overflow.
14243 (Fstart_kbd_macro): Use EMACS_INT, not int, for XINT result.
14244
14245 * lisp.h (DEFVAR_KBOARD): Use offsetof instead of char * finagling.
14246
14247 * lread.c: Integer overflow fixes.
14248 (read_integer): Radix is now EMACS_INT, not int,
14249 to improve quality of diagnostics for out-of-range radices.
14250 Calculate buffer size correctly for out-of-range radices.
14251 (read1): Check for integer overflow in radices, and in
14252 read-circle numbers.
14253 (read_escape): Avoid int overflow.
14254 (Fload, openp, read_buffer_size, read1)
14255 (substitute_object_recurse, read_vector, read_list, map_obarray):
14256 Use ptrdiff_t, not int, for sizes.
14257 (read1): Use EMACS_INT, not int, for sizes.
14258 Check for size overflow.
14259
14260 * image.c (cache_image): Check for size arithmetic overflow.
14261
14262 * lread.c: Integer overflow issues.
14263 (saved_doc_string_size, saved_doc_string_length)
14264 (prev_saved_doc_string_size, prev_saved_doc_string_length):
14265 Now ptrdiff_t, not int.
14266 (read1): Don't assume doc string length fits in int. Check for
14267 out-of-range doc string lengths.
14268 (read_list): Don't assume file position fits in int.
14269 (read_escape): Check for hex character overflow.
14270
14271 2011-06-22 Leo Liu <sdl.web@gmail.com>
14272
14273 * minibuf.c (Fcompleting_read_default, Vcompleting_read_function):
14274 Move to minibuffer.el.
14275
14276 2011-06-22 Paul Eggert <eggert@cs.ucla.edu>
14277
14278 Fixes for GLYPH_DEBUG found by GCC 4.6.0 static checking.
14279 The following patches are for when GLYPH_DEBUG && !XASSERT.
14280 * dispextern.h (trace_redisplay_p, dump_glyph_string):
14281 * dispnew.c (flush_stdout):
14282 * xdisp.c (dump_glyph_row, dump_glyph_matrix, dump_glyph):
14283 Mark as externally visible.
14284 * dispnew.c (check_window_matrix_pointers): Now static.
14285 * dispnew.c (window_to_frame_vpos):
14286 * xfns.c (unwind_create_frame):
14287 * xterm.c (x_check_font): Remove unused local.
14288 * scroll.c (CHECK_BOUNDS):
14289 * xfaces.c (cache_fache): Rename local to avoid shadowing.
14290 * xfns.c, w32fns.c (image_cache_refcount, dpyinfo_refcount): Now static.
14291 * xdisp.c (check_window_end): Now a no-op if !XASSERTS.
14292 (debug_first_unchanged_at_end_vpos, debug_last_unchanged_at_beg_vpos)
14293 (debug_dvpos, debug_dy, debug_delta, debug_delta_bytes, debug_end_vpos):
14294 Now static.
14295 (debug_method_add): Use va_list and vsprintf rather than relying
14296 on undefined behavior with wrong number of arguments.
14297 (dump_glyph, dump_glyph_row, Fdump_glyph_matrix):
14298 Don't assume ptrdiff_t and EMACS_INT are the same width as int.
14299 In this code, it's OK to assume C99 behavior for ptrdiff_t formats
14300 since we're not interested in debugging glyphs with old libraries.
14301 * xfaces.c (cache_face): Move debugging code earlier; this pacifies
14302 GCC 4.6.0's static checking.
14303
14304 2011-06-22 Paul Eggert <eggert@cs.ucla.edu>
14305
14306 Integer overflow and signedness fixes (Bug#8873).
14307 A few related buffer overrun fixes, too.
14308
14309 * font.c (font_score): Use EMACS_INT, not int, to store XINT value.
14310
14311 * dispextern.h (struct face.stipple):
14312 * image.c (x_bitmap_height, x_bitmap_width, x_bitmap_pixmap)
14313 (x_bitmap_mask, x_allocate_bitmap_record)
14314 (x_create_bitmap_from_data, x_create_bitmap_from_file)
14315 (x_destroy_bitmap, x_destroy_all_bitmaps, x_create_bitmap_mask)
14316 (x_create_bitmap_from_xpm_data):
14317 * nsterm.h (struct ns_display_info.bitmaps_size, .bitmaps_last):
14318 * w32term.h (struct w32_display_info.icon_bitmap_id, .bitmaps_size)
14319 (.bitmaps_last):
14320 * xfaces.c (load_pixmap):
14321 * xterm.c (x_bitmap_icon, x_wm_set_icon_pixmap):
14322 * xterm.h (struct x_display_info.icon_bitmap_id, .bitmaps_size)
14323 (.bitmaps_last, struct x_output.icon_bitmap):
14324 Use ptrdiff_t, not int, for bitmap indexes.
14325 (x_allocate_bitmap_record): Check for size overflow.
14326 * dispextern.h, lisp.h: Adjust to API changes elsewhere.
14327
14328 Use ptrdiff_t, not int, for overlay counts.
14329 * buffer.h (overlays_at, sort_overlays, GET_OVERLAYS_AT):
14330 * editfns.c (overlays_around, get_pos_property):
14331 * textprop.c (get_char_property_and_overlay):
14332 * xdisp.c (next_overlay_change, note_mouse_highlight):
14333 * xfaces.c (face_at_buffer_position):
14334 * buffer.c (OVERLAY_COUNT_MAX): New macro.
14335 (overlays_at, overlays_in, sort_overlays, Foverlays_at)
14336 (Fnext_overlay_change, Fprevious_overlay_change)
14337 (mouse_face_overlay_overlaps, Foverlays_in):
14338 Use ptrdiff_t, not int, for sizes.
14339 (overlays_at, overlays_in): Check for size-calculation overflow.
14340
14341 * xterm.c (xim_initialize, same_x_server): Strlen may not fit in int.
14342
14343 * xsmfns.c (smc_save_yourself_CB, x_session_initialize): Avoid strlen.
14344 (x_session_initialize): Do not assume string length fits in int.
14345
14346 * xsettings.c (apply_xft_settings): Fix potential buffer overrun.
14347 This is unlikely, but can occur if DPI is outlandish.
14348
14349 * xsettings.c (Ffont_get_system_normal_font, Ffont_get_system_font):
14350 * xselect.c (Fx_get_atom_name): Avoid need for strlen.
14351
14352 * xrdb.c: Don't assume strlen fits in int; avoid some strlens.
14353 * xrdb.c (magic_file_p, search_magic_path):
14354 Omit last arg SUFFIX; it was always 0. All callers changed.
14355 (magic_file_p): Use ptrdiff_t, not int. Check for size overflow.
14356
14357 * xfont.c (xfont_match): Avoid need for strlen.
14358
14359 * xfns.c: Don't assume strlen fits in int.
14360 (xic_create_fontsetname, x_window): Use ptrdiff_t, not int.
14361
14362 * xdisp.c (message_log_check_duplicate): Return intmax_t,
14363 not unsigned long, as we prefer signed integers. All callers changed.
14364 Detect integer overflow in repeat count.
14365 (message_dolog): Don't assume print length fits in 39 bytes.
14366 (display_mode_element): Don't assume strlen fits in int.
14367
14368 * termcap.c: Don't assume sizes fit in int and never overflow.
14369 (struct termcap_buffer, tgetent): Use ptrdiff_t, not int, for sizes.
14370 (gobble_line): Check for size-calculation overflow.
14371
14372 * minibuf.c (Fread_buffer):
14373 * lread.c (intern, intern_c_string):
14374 * image.c (xpm_scan) [HAVE_NS && !HAVE_XPM]:
14375 Don't assume string length fits in int.
14376
14377 * keyboard.c (parse_tool_bar_item):
14378 * gtkutil.c (style_changed_cb): Avoid need for strlen.
14379
14380 * font.c: Don't assume string length fits in int.
14381 (font_parse_xlfd, font_parse_fcname, font_unparse_fcname):
14382 Use ptrdiff_t, not int.
14383 (font_intern_prop): Don't assume string length fits in int.
14384 Don't assume integer property fits in fixnum.
14385 * font.h (font_intern_prop): 2nd arg is now ptrdiff_t, not int.
14386
14387 * filelock.c: Fix some buffer overrun and integer overflow issues.
14388 (get_boot_time): Don't assume gzip command string fits in 100 bytes.
14389 Reformulate so as not to need the command string.
14390 Invoke gzip -cd rather than gunzip, as it's more portable.
14391 (lock_info_type, lock_file_1, lock_file):
14392 Don't assume pid_t and time_t fit in unsigned long.
14393 (LOCK_PID_MAX): Remove; we now use more-reliable bounds.
14394 (current_lock_owner): Prefer signed type for sizes.
14395 Use memcpy, not strncpy, where memcpy is what is really wanted.
14396 Don't assume (via atoi) that time_t and pid_t fit in int.
14397 Check for time_t and/or pid_t out of range, e.g., via a network share.
14398 Don't alloca where an auto var works fine.
14399
14400 * fileio.c: Fix some integer overflow issues.
14401 (file_name_as_directory, Fexpand_file_name, Fsubstitute_in_file_name):
14402 Don't assume string length fits in int.
14403 (directory_file_name): Don't assume string length fits in long.
14404 (make_temp_name): Don't assume pid fits in int, or that its print
14405 length is less than 20.
14406
14407 * data.c (Fsubr_name): Rewrite to avoid a strlen call.
14408
14409 * coding.c (make_subsidiaries): Don't assume string length fits in int.
14410
14411 * callproc.c (child_setup): Rewrite to avoid two strlen calls.
14412
14413 * process.c (Fformat_network_address): Use EMACS_INT, not EMACS_UINT.
14414 We prefer signed integers, even for size calculations.
14415
14416 * emacs.c: Don't assume string length fits in 'int'.
14417 (DEFINE_DUMMY_FUNCTION, sort_args): Use ptrdiff_t, not int.
14418 (main): Don't invoke strlen when not needed.
14419
14420 * dbusbind.c (XD_ERROR): Don't arbitrarily truncate string.
14421 (XD_DEBUG_MESSAGE): Don't waste a byte.
14422
14423 * callproc.c (getenv_internal_1, getenv_internal)
14424 (Fgetenv_internal):
14425 * buffer.c (init_buffer): Don't assume string length fits in 'int'.
14426
14427 * lread.c (invalid_syntax): Omit length argument.
14428 All uses changed. This doesn't fix a bug, but it simplifies the
14429 code away from its former Hollerith-constant appearance, and it's
14430 one less 'int' to worry about when looking at integer-overflow issues.
14431 (string_to_number): Simplify 2011-04-26 change by invoking xsignal1.
14432
14433 * lisp.h (DEFUN): Remove bogus use of sizeof (struct Lisp_Subr).
14434 This didn't break anything, but it didn't help either.
14435 It's confusing to put a bogus integer in a place where the actual
14436 value does not matter.
14437 (LIST_END_P): Remove unused macro and its bogus comment.
14438 (make_fixnum_or_float): Remove unnecessary cast to EMACS_INT.
14439
14440 * lisp.h (union Lisp_Object.i): EMACS_INT, not EMACS_UINT.
14441 This is for consistency with the ordinary, non-USE_LISP_UNION_TYPE,
14442 implementation.
14443 (struct Lisp_Bool_Vector.size): EMACS_INT, not EMACS_UINT.
14444 We prefer signed types, and the value cannot exceed the EMACS_INT
14445 range anyway (because otherwise the length would not be representable).
14446 (XSET) [USE_LISP_UNION_TYPE]: Use uintptr_t and intptr_t,
14447 not EMACS_UINT and EMACS_INT, when converting pointer to integer.
14448 This avoids a GCC warning when WIDE_EMACS_INT.
14449
14450 * indent.c (sane_tab_width): New function.
14451 (current_column, scan_for_column, Findent_to, position_indentation)
14452 (compute_motion): Use it. This is just for clarity.
14453 (Fcompute_motion): Don't assume hscroll and tab offset fit in int.
14454
14455 * image.c (xbm_image_p): Don't assume stated width, height fit in int.
14456
14457 * lisp.h (lint_assume): New macro.
14458 * composite.c (composition_gstring_put_cache):
14459 * ftfont.c (ftfont_shape_by_flt): Use it to pacify GCC 4.6.0.
14460
14461 * editfns.c, insdel.c:
14462 Omit unnecessary forward decls, to simplify future changes.
14463
14464 * ftfont.c (ftfont_shape_by_flt): Use signed integers for lengths.
14465
14466 * font.c (Ffont_shape_gstring): Don't assume glyph len fits in 'int'.
14467
14468 * fns.c (Ffillarray): Don't assume bool vector size fits in 'int'.
14469 Use much-faster test for byte-length change.
14470 Don't assume string byte-length fits in 'int'.
14471 Check that character arg fits in 'int'.
14472 (mapcar1): Declare byte as byte, for clarity.
14473
14474 * alloc.c (Fmake_bool_vector): Avoid unnecessary multiplication.
14475
14476 * fns.c (concat): Catch string overflow earlier.
14477 Do not rely on integer wraparound.
14478
14479 * dispextern.h (struct it.overlay_strings_charpos)
14480 (struct it.selective): Now EMACS_INT, not int.
14481 * xdisp.c (forward_to_next_line_start)
14482 (back_to_previous_visible_line_start)
14483 (reseat_at_next_visible_line_start, next_element_from_buffer):
14484 Don't arbitrarily truncate the value of 'selective' to int.
14485
14486 * xdisp.c (init_iterator): Use XINT, not XFASTINT; it might be < 0.
14487
14488 * composite.c: Don't truncate sizes to 'int'.
14489 (composition_gstring_p, composition_reseat_it)
14490 (composition_adjust_point): Use EMACS_INT, not int.
14491 (get_composition_id, composition_gstring_put_cache): Use EMACS_INT,
14492 not EMACS_UINT, for indexes.
14493
14494 * category.h (CATEGORY_SET_P): Remove unnecessary cast to EMACS_INT.
14495
14496 * buffer.c: Include <verify.h>.
14497 (struct sortvec.priority, struct sortstr.priority):
14498 Now EMACS_INT, not int.
14499 (compare_overlays, cmp_for_strings): Avoid subtraction overflow.
14500 (struct sortstr.size, record_overlay_string)
14501 (struct sortstrlist.size, struct sortlist.used):
14502 Don't truncate size to int.
14503 (record_overlay_string): Check for size-calculation overflow.
14504 (init_buffer_once): Check at compile-time, not run-time.
14505
14506 2011-06-22 Jim Meyering <meyering@redhat.com>
14507
14508 Don't leak an XBM-image-sized buffer
14509 * image.c (xbm_load): Free the image buffer after using it.
14510
14511 2011-06-21 Paul Eggert <eggert@cs.ucla.edu>
14512
14513 Port to Sun C.
14514 * composite.c (find_automatic_composition): Omit needless 'return 0;'
14515 that Sun C diagnosed.
14516 * fns.c (secure_hash): Fix pointer signedness issue.
14517 * intervals.c (static_offset_intervals): New function.
14518 (offset_intervals): Use it.
14519
14520 2011-06-21 Leo Liu <sdl.web@gmail.com>
14521
14522 * deps.mk (fns.o):
14523 * makefile.w32-in ($(BLD)/fns.$(O)): Include sha256.h and
14524 sha512.h.
14525
14526 * fns.c (secure_hash): Rename from crypto_hash_function and change
14527 the first arg to accept symbols.
14528 (Fsecure_hash): New primitive.
14529 (syms_of_fns): New symbols.
14530
14531 2011-06-20 Deniz Dogan <deniz@dogan.se>
14532
14533 * process.c (Fset_process_buffer): Clarify return value in
14534 docstring.
14535
14536 2011-06-18 Chong Yidong <cyd@stupidchicken.com>
14537
14538 * dispnew.c (add_window_display_history): Use BVAR.
14539
14540 * xdisp.c (debug_method_add): Use BVAR.
14541 (check_window_end, dump_glyph_matrix, dump_glyph)
14542 (dump_glyph_row, dump_glyph_string): Convert arglist to ANSI C.
14543
14544 * xfaces.c (check_lface_attrs, check_lface, dump_realized_face):
14545 Likewise.
14546
14547 * xfns.c (Fx_create_frame, x_create_tip_frame): Delay image cache
14548 check till after the cache is created in init_frame_faces.
14549
14550 2011-06-17 Stefan Monnier <monnier@iro.umontreal.ca>
14551
14552 * fns.c (Fsafe_length): Yet another int/Lisp_Object mixup.
14553
14554 2011-06-16 Paul Eggert <eggert@cs.ucla.edu>
14555
14556 * lisp.h: Include <limits.h>, for INT_MAX, LONG_MAX, LLONG_MAX.
14557 Without this, prin1 mishandles Lisp_Misc_Save_Value printing on
14558 hosts with pre-C99 libraries, because pD is wrongly defined to "t".
14559
14560 Improve buffer-overflow checking (Bug#8873).
14561 * fileio.c (Finsert_file_contents):
14562 * insdel.c (insert_from_buffer_1, replace_range, replace_range_2):
14563 Remove the old (too-loose) buffer overflow checks.
14564 They weren't needed, since make_gap checks for buffer overflow.
14565 * insdel.c (make_gap_larger): Catch buffer overflows that were missed.
14566 The old code merely checked for Emacs fixnum overflow, and relied
14567 on undefined (wraparound) behavior. The new code avoids undefined
14568 behavior, and also checks for ptrdiff_t and/or size_t overflow.
14569
14570 * editfns.c (Finsert_char): Don't dump core with very negative counts.
14571 Tune. Don't use wider integers than needed. Don't use alloca.
14572 Use a bigger 'string' buffer. Rewrite to avoid 'n > 0' test.
14573
14574 * insdel.c (replace_range): Fix buf overflow when insbytes < outgoing.
14575
14576 * insdel.c, lisp.h (buffer_overflow): New function.
14577 (insert_from_buffer_1, replace_range, replace_range_2):
14578 * insdel.c (make_gap_larger):
14579 * editfns.c (Finsert_char):
14580 * fileio.c (Finsert_file_contents): Use it, to normalize wording.
14581
14582 * buffer.h (BUF_BYTES_MAX): Cast to ptrdiff_t so that it's signed.
14583
14584 2011-06-15 Paul Eggert <eggert@cs.ucla.edu>
14585
14586 Integer overflow and signedness fixes (Bug#8873, Bug#8828).
14587
14588 * ccl.c (ASCENDING_ORDER): New macro, to work around GCC bug 43772.
14589 (GET_CCL_RANGE, IN_INT_RANGE): Use it.
14590
14591 * fileio.c: Don't assume EMACS_INT fits in off_t.
14592 (emacs_lseek): New static function.
14593 (Finsert_file_contents, Fwrite_region): Use it.
14594 Use SEEK_SET, SEEK_CUR, SEEK_END as appropriate.
14595
14596 * fns.c (Fload_average): Don't assume 100 * load average fits in int.
14597
14598 * fns.c: Don't overflow int when computing a list length.
14599 * fns.c (QUIT_COUNT_HEURISTIC): New constant.
14600 (Flength, Fsafe_length): Use EMACS_INT, not int, to avoid unwanted
14601 truncation on 64-bit hosts. Check for QUIT every
14602 QUIT_COUNT_HEURISTIC entries rather than every other entry; that's
14603 faster and is responsive enough.
14604 (Flength): Report an error instead of overflowing an integer.
14605 (Fsafe_length): Return a float if the value is not representable
14606 as a fixnum. This shouldn't happen except in contrived situations.
14607 (Fnthcdr, Fsort): Don't assume list length fits in int.
14608 (Fcopy_sequence): Don't assume vector length fits in int.
14609
14610 * alloc.c: Check that resized vectors' lengths fit in fixnums.
14611 (header_size, word_size): New constants.
14612 (allocate_vectorlike): Don't check size overflow here.
14613 (allocate_vector): Check it here instead, since this is the only
14614 caller of allocate_vectorlike that could cause overflow.
14615 Check that the new vector's length is representable as a fixnum.
14616
14617 * fns.c (next_almost_prime): Don't return a multiple of 3 or 5.
14618 The previous code was bogus. For example, next_almost_prime (32)
14619 returned 39, which is undesirable as it is a multiple of 3; and
14620 next_almost_prime (24) returned 25, which is a multiple of 5 so
14621 why was the code bothering to check for multiples of 7?
14622
14623 * bytecode.c (exec_byte_code): Use ptrdiff_t, not int, for vector length.
14624
14625 * eval.c, doprnt.c (SIZE_MAX): Remove; inttypes.h defines this now.
14626
14627 Variadic C functions now count arguments with ptrdiff_t.
14628 This partly undoes my 2011-03-30 change, which replaced int with size_t.
14629 Back then I didn't know that the Emacs coding style prefers signed int.
14630 Also, in the meantime I found a few more instances where arguments
14631 were being counted with int, which may truncate counts on 64-bit
14632 machines, or EMACS_INT, which may be unnecessarily wide.
14633 * lisp.h (struct Lisp_Subr.function.aMANY)
14634 (DEFUN_ARGS_MANY, internal_condition_case_n, safe_call):
14635 Arg counts are now ptrdiff_t, not size_t.
14636 All variadic functions and their callers changed accordingly.
14637 (struct gcpro.nvars): Now size_t, not size_t. All uses changed.
14638 * bytecode.c (exec_byte_code): Check maxdepth for overflow,
14639 to avoid potential buffer overrun. Don't assume arg counts fit in 'int'.
14640 * callint.c (Fcall_interactively): Check arg count for overflow,
14641 to avoid potential buffer overrun. Use signed char, not 'int',
14642 for 'varies' array, so that we needn't bother to check its size
14643 calculation for overflow.
14644 * editfns.c (Fformat): Use ptrdiff_t, not EMACS_INT, to count args.
14645 * eval.c (apply_lambda):
14646 * fns.c (Fmapconcat): Use XFASTINT, not XINT, to get args length.
14647 (struct textprop_rec.argnum): Now ptrdiff_t, not int. All uses changed.
14648 (mapconcat): Use ptrdiff_t, not int and EMACS_INT, to count args.
14649
14650 * callint.c (Fcall_interactively): Don't use index var as event count.
14651
14652 * vm-limit.c (check_memory_limits): Fix incorrect extern function decls.
14653 * mem-limits.h (SIZE): Remove; no longer used.
14654
14655 * xterm.c (x_alloc_nearest_color_1): Prefer int to long when int works.
14656
14657 Remove unnecessary casts.
14658 * xterm.c (x_term_init):
14659 * xfns.c (x_set_border_pixel):
14660 * widget.c (create_frame_gcs): Remove casts to unsigned long etc.
14661 These aren't needed now that we assume ANSI C.
14662
14663 * sound.c (Fplay_sound_internal): Remove cast to unsigned long.
14664 It's more likely to cause problems (due to unsigned overflow)
14665 than to cure them.
14666
14667 * dired.c (Ffile_attributes): Don't use 32-bit hack on 64-bit hosts.
14668
14669 * unexelf.c (unexec): Don't assume BSS addr fits in unsigned.
14670
14671 * xterm.c (handle_one_xevent): Omit unnecessary casts to unsigned.
14672
14673 * keyboard.c (modify_event_symbol): Don't limit alist len to UINT_MAX.
14674
14675 * lisp.h (CHAR_TABLE_SET): Omit now-redundant test.
14676
14677 * lread.c (Fload): Don't compare a possibly-garbage time_t value.
14678
14679 GLYPH_CODE_FACE returns EMACS_INT, not int.
14680 * dispextern.h (merge_faces):
14681 * xfaces.c (merge_faces):
14682 * xdisp.c (get_next_display_element, next_element_from_display_vector):
14683 Don't assume EMACS_INT fits in int.
14684
14685 * character.h (CHAR_VALID_P): Remove unused parameter.
14686 * fontset.c, lisp.h, xdisp.c: All uses changed.
14687
14688 * editfns.c (Ftranslate_region_internal): Omit redundant test.
14689
14690 * fns.c (concat): Minor tuning based on overflow analysis.
14691 This doesn't fix any bugs. Use int to hold character, instead
14692 of constantly refetching from Emacs object. Use XFASTINT, not
14693 XINT, for value known to be a character. Don't bother comparing
14694 a single byte to 0400, as it's always less.
14695
14696 * floatfns.c (Fexpt):
14697 * fileio.c (make_temp_name): Omit unnecessary cast to unsigned.
14698
14699 * editfns.c (Ftranslate_region_internal): Use int, not EMACS_INT
14700 for characters.
14701
14702 * doc.c (get_doc_string): Omit (unsigned)c that mishandled negatives.
14703
14704 * data.c (Faset): If ARRAY is a string, check that NEWELT is a char.
14705 Without this fix, on a 64-bit host (aset S 0 4294967386) would
14706 incorrectly succeed when S was a string, because 4294967386 was
14707 truncated before it was used.
14708
14709 * chartab.c (Fchar_table_range): Use CHARACTERP to check range.
14710 Otherwise, an out-of-range integer could cause undefined behavior
14711 on a 64-bit host.
14712
14713 * composite.c: Use int, not EMACS_INT, for characters.
14714 (fill_gstring_body, composition_compute_stop_pos): Use int, not
14715 EMACS_INT, for values that are known to be in character range.
14716 This doesn't fix any bugs but is the usual style inside Emacs and
14717 may generate better code on 32-bit machines.
14718
14719 Make sure a 64-bit char is never passed to ENCODE_CHAR.
14720 This is for reasons similar to the recent CHAR_STRING fix.
14721 * charset.c (Fencode_char): Check that character arg is actually
14722 a character. Pass an int to ENCODE_CHAR.
14723 * charset.h (ENCODE_CHAR): Verify that the character argument is no
14724 wider than 'int', as a compile-time check to prevent future regressions
14725 in this area.
14726
14727 * character.c (char_string): Remove unnecessary casts.
14728
14729 Make sure a 64-bit char is never passed to CHAR_STRING.
14730 Otherwise, CHAR_STRING would do the wrong thing on a 64-bit platform,
14731 by silently ignoring the top 32 bits, allowing some values
14732 that were far too large to be valid characters.
14733 * character.h: Include <verify.h>.
14734 (CHAR_STRING, CHAR_STRING_ADVANCE): Verify that the character
14735 arguments are no wider than unsigned, as a compile-time check
14736 to prevent future regressions in this area.
14737 * data.c (Faset):
14738 * editfns.c (Fchar_to_string, general_insert_function, Finsert_char)
14739 (Fsubst_char_in_region):
14740 * fns.c (concat):
14741 * xdisp.c (decode_mode_spec_coding):
14742 Adjust to CHAR_STRING's new requirement.
14743 * editfns.c (Finsert_char, Fsubst_char_in_region):
14744 * fns.c (concat): Check that character args are actually
14745 characters. Without this test, these functions did the wrong
14746 thing with wildly out-of-range values on 64-bit hosts.
14747
14748 Remove incorrect casts to 'unsigned' that lose info on 64-bit hosts.
14749 These casts should not be needed on 32-bit hosts, either.
14750 * keyboard.c (read_char):
14751 * lread.c (Fload): Remove casts to unsigned.
14752
14753 * lisp.h (UNSIGNED_CMP): New macro.
14754 This fixes comparison bugs on 64-bit hosts.
14755 (ASCII_CHAR_P): Use it.
14756 * casefiddle.c (casify_object):
14757 * character.h (ASCII_BYTE_P, CHAR_VALID_P)
14758 (SINGLE_BYTE_CHAR_P, CHAR_STRING):
14759 * composite.h (COMPOSITION_ENCODE_RULE_VALID):
14760 * dispextern.h (FACE_FROM_ID):
14761 * keyboard.c (read_char): Use UNSIGNED_CMP.
14762
14763 * xmenu.c (dialog_selection_callback) [!USE_GTK]: Cast to intptr_t,
14764 not to EMACS_INT, to avoid GCC warning.
14765
14766 * xfns.c (x_set_scroll_bar_default_width): Remove unused 'int' locals.
14767
14768 * buffer.h (PTR_BYTE_POS, BUF_PTR_BYTE_POS): Remove harmful cast.
14769 The cast incorrectly truncated 64-bit byte offsets to 32 bits, and
14770 isn't needed on 32-bit machines.
14771
14772 * buffer.c (Fgenerate_new_buffer_name):
14773 Use EMACS_INT for count, not int.
14774 (advance_to_char_boundary): Return EMACS_INT, not int.
14775
14776 * data.c (Qcompiled_function): Now static.
14777
14778 * window.c (window_body_lines): Now static.
14779
14780 * image.c (gif_load): Rename local to avoid shadowing.
14781
14782 * lisp.h (SAFE_ALLOCA_LISP): Check for integer overflow.
14783 (struct Lisp_Save_Value): Use ptrdiff_t, not int, for 'integer' member.
14784 * alloc.c (make_save_value): Integer argument is now of type
14785 ptrdiff_t, not int.
14786 (mark_object): Use ptrdiff_t, not int.
14787 * lisp.h (pD): New macro.
14788 * print.c (print_object): Use it.
14789
14790 * alloc.c: Use EMACS_INT, not int, to count objects.
14791 (total_conses, total_markers, total_symbols, total_vector_size)
14792 (total_free_conses, total_free_markers, total_free_symbols)
14793 (total_free_floats, total_floats, total_free_intervals)
14794 (total_intervals, total_strings, total_free_strings):
14795 Now EMACS_INT, not int. All uses changed.
14796 (Fgarbage_collect): Compute overall total using a double, so that
14797 integer overflow is less likely to be a problem. Check for overflow
14798 when converting back to an integer.
14799 (n_interval_blocks, n_string_blocks, n_float_blocks, n_cons_blocks)
14800 (n_vectors, n_symbol_blocks, n_marker_blocks): Remove.
14801 These were 'int' variables that could overflow on 64-bit hosts;
14802 they were never used, so remove them instead of repairing them.
14803 (nzombies, ngcs, max_live, max_zombies): Now EMACS_INT, not 'int'.
14804 (inhibit_garbage_collection): Set gc_cons_threshold to max value.
14805 Previously, this ceilinged at INT_MAX, but that doesn't work on
14806 64-bit machines.
14807 (allocate_pseudovector): Don't use EMACS_INT when int would do.
14808
14809 * alloc.c (Fmake_bool_vector): Don't assume vector size fits in int.
14810 (allocate_vectorlike): Check for ptrdiff_t overflow.
14811 (mark_vectorlike, mark_char_table, mark_object): Avoid EMACS_UINT
14812 when a (possibly-narrower) signed value would do just as well.
14813 We prefer using signed arithmetic, to avoid comparison confusion.
14814
14815 * alloc.c: Catch some string size overflows that we were missing.
14816 (XMALLOC_OVERRUN_CHECK_SIZE) [!XMALLOC_OVERRUN_CHECK]: Define to 0,
14817 for convenience in STRING_BYTES_MAX.
14818 (STRING_BYTES_MAX): New macro, superseding the old one in lisp.h.
14819 The definition here is exact; the one in lisp.h was approximate.
14820 (allocate_string_data): Check for string overflow. This catches
14821 some instances we weren't catching before. Also, it catches
14822 size_t overflow on (unusual) hosts where SIZE_MAX <= min
14823 (PTRDIFF_MAX, MOST_POSITIVE_FIXNUM), e.g., when size_t is 32 bits
14824 and ptrdiff_t and EMACS_INT are both 64 bits.
14825
14826 * character.c, coding.c, doprnt.c, editfns.c, eval.c:
14827 All uses of STRING_BYTES_MAX replaced by STRING_BYTES_BOUND.
14828 * lisp.h (STRING_BYTES_BOUND): Rename from STRING_BYTES_MAX.
14829
14830 * character.c (string_escape_byte8): Fix nbytes/nchars typo.
14831
14832 * alloc.c (Fmake_string): Check for out-of-range init.
14833
14834 2011-06-15 Stefan Monnier <monnier@iro.umontreal.ca>
14835
14836 * eval.c (Fdefvaralias): Also mark the target as variable-special-p.
14837
14838 2011-06-14 Jan Djärv <jan.h.d@swipnet.se>
14839
14840 * xfns.c (x_set_scroll_bar_default_width): Remove argument to
14841 xg_get_default_scrollbar_width.
14842
14843 * gtkutil.c: Include emacsgtkfixed.h if HAVE_GTK3.
14844 (int_gtk_range_get_value): Move to the scroll bar part of the file.
14845 (style_changed_cb): Call update_theme_scrollbar_width and call
14846 x_set_scroll_bar_default_width and xg_frame_set_char_size for
14847 all frames (Bug#8505).
14848 (xg_create_frame_widgets): Call emacs_fixed_new if HAVE_GTK3 (Bug#8505).
14849 Call gtk_window_set_resizable if HAVE_GTK3.
14850 (x_wm_set_size_hint): Call emacs_fixed_set_min_size with min width
14851 and height if HAVE_GTK3 (Bug#8505).
14852 (scroll_bar_width_for_theme): New variable.
14853 (update_theme_scrollbar_width): New function.
14854 (xg_get_default_scrollbar_width): Move code to
14855 update_theme_scrollbar_width, just return scroll_bar_width_for_theme.
14856 (xg_initialize): Call update_theme_scrollbar_width.
14857
14858 * gtkutil.h (xg_get_default_scrollbar_width): Remove argument.
14859
14860 * emacsgtkfixed.c, emacsgtkfixed.h: New files.
14861
14862 2011-06-12 Martin Rudalics <rudalics@gmx.at>
14863
14864 * frame.c (make_frame): Call other_buffer_safely instead of
14865 other_buffer.
14866
14867 * window.c (temp_output_buffer_show): Call display_buffer with
14868 second argument Vtemp_buffer_show_specifiers and reset latter
14869 immediately after the call.
14870 (Vtemp_buffer_show_specifiers): New variable.
14871 (auto_window_vscroll_p, next_screen_context_lines)
14872 (Vscroll_preserve_screen_position): Remove leading asterisks from
14873 doc-strings.
14874
14875 2011-06-12 Paul Eggert <eggert@cs.ucla.edu>
14876
14877 Fix minor problems found by GCC 4.6.0 static checking.
14878 * buffer.c (Qclone_number): Remove for now, as it's unused.
14879 (record_buffer, Funrecord_buffer): Rename local to avoid shadowing.
14880 (record_buffer): Remove unused local.
14881 * frame.c (other_visible_frames, frame_buffer_list): Now static.
14882 (set_frame_buffer_list): Remove; unused.
14883 * frame.h (other_visible_frames): Remove decl.
14884 * keyboard.h (menu_items_inuse): Declare only if USE_GTK || USE_MOTIF.
14885 * lisp.h (frame_buffer_list, set_frame_buffer_list): Remove decls.
14886 (add_gpm_wait_descriptor, delete_gpm_wait_descriptor): Declare only
14887 if HAVE_GPM.
14888 * menu.c (menu_items_inuse): Now static unless USE_GTK || USE_MOTIF.
14889 * process.c (add_gpm_wait_descriptor, delete_gpm_wait_descriptor):
14890 Define only if HAVE_GPM.
14891 * widget.c (EmacsFrameResize, emacsFrameClassRec): Now static.
14892 (update_hints_inhibit): Remove; never set. All uses removed.
14893 * widgetprv.h (emacsFrameClassRec): Remove decl.
14894 * window.c (delete_deletable_window): Now returns void, since it
14895 wasn't returning anything.
14896 (compare_window_configurations): Remove unused locals.
14897 * xfns.c (x_set_scroll_bar_default_width): Remove unused locals.
14898 * xmenu.c (x_menu_set_in_use): Define only if USE_GTK || USE_MOTIF.
14899 (dialog_selection_callback) [!USE_GTK]: Prefer intptr_t for integers
14900 the same widths as pointers. This follows up on the 2011-05-06 patch.
14901 * xterm.c (x_alloc_lighter_color_for_widget): Define only if USE_LUCID.
14902 * xterm.h: Likewise.
14903 (x_menu_set_in_use): Declare only if USE_GTK || USE_MOTIF.
14904
14905 2011-06-12 Juanma Barranquero <lekktu@gmail.com>
14906
14907 * makefile.w32-in: Update dependencies.
14908 (LISP_H): Add lib/intprops.h.
14909
14910 2011-06-11 Chong Yidong <cyd@stupidchicken.com>
14911
14912 * image.c (gif_load): Add animation frame delay to the metadata.
14913 (syms_of_image): Use DEFSYM. New symbol `delay'.
14914
14915 2011-06-11 Martin Rudalics <rudalics@gmx.at>
14916
14917 * window.c (delete_deletable_window): Re-add.
14918 (Fset_window_configuration): Rewrite to handle dead buffers and
14919 consequently deletable windows.
14920 (window_tree, Fwindow_tree): Remove. Supply functionality in
14921 window.el.
14922 (compare_window_configurations): Simplify code.
14923
14924 2011-06-11 Andreas Schwab <schwab@linux-m68k.org>
14925
14926 * image.c (imagemagick_load_image): Fix type mismatch.
14927 (Fimagemagick_types): Likewise.
14928
14929 * window.h (replace_buffer_in_windows): Declare.
14930
14931 2011-06-11 Martin Rudalics <rudalics@gmx.at>
14932
14933 * buffer.c: New Lisp objects Qbuffer_list_update_hook and
14934 Qclone_number. Remove external declaration of Qdelete_window.
14935 (Fbuffer_list): Rewrite doc-string. Minor restructuring of
14936 code.
14937 (Fget_buffer_create, Fmake_indirect_buffer, Frename_buffer):
14938 Run Qbuffer_list_update_hook if allowed.
14939 (Fother_buffer): Rewrite doc-string. Major rewrite for new
14940 buffer list implementation.
14941 (other_buffer_safely): New function.
14942 (Fkill_buffer): Replace call to replace_buffer_in_all_windows by
14943 calls to replace_buffer_in_windows and
14944 replace_buffer_in_windows_safely. Run Qbuffer_list_update_hook
14945 if allowed.
14946 (record_buffer): Inhibit quitting and rewrite using quittable
14947 functions. Run Qbuffer_list_update_hook if allowed.
14948 (Frecord_buffer, Funrecord_buffer): New functions.
14949 (switch_to_buffer_1, Fswitch_to_buffer): Remove.
14950 Move switch-to-buffer to window.el.
14951 (bury-buffer): Move to window.el.
14952 (Vbuffer_list_update_hook): New variable.
14953
14954 * lisp.h (other_buffer_safely): Add prototype in buffer.c
14955 section.
14956
14957 * window.h (resize_frame_windows): Move up in code.
14958 (Fwindow_frame): Remove EXFUN.
14959 (replace_buffer_in_all_windows): Remove prototype.
14960 (replace_buffer_in_windows_safely): Add prototype.
14961
14962 * window.c: Declare Qdelete_window static again. Move down
14963 declaration of select_count.
14964 (Fnext_window, Fprevious_window): Rewrite doc-strings.
14965 (Fother_window): Move to window.el.
14966 (window_loop): Remove DELETE_BUFFER_WINDOWS and UNSHOW_BUFFER
14967 cases. Add REPLACE_BUFFER_IN_WINDOWS_SAFELY case.
14968 (Fdelete_windows_on, Freplace_buffer_in_windows): Move to
14969 window.el.
14970 (replace_buffer_in_windows): Implement by calling
14971 Qreplace_buffer_in_windows.
14972 (replace_buffer_in_all_windows): Remove with some functionality
14973 moved into replace_buffer_in_windows_safely.
14974 (replace_buffer_in_windows_safely): New function.
14975 (select_window_norecord, select_frame_norecord): Move in front
14976 of run_window_configuration_change_hook. Remove now obsolete
14977 declarations.
14978 (Fset_window_buffer): Rewrite doc-string.
14979 Call Qrecord_window_buffer.
14980 (keys_of_window): Move binding for other-window to window.el.
14981
14982 2011-06-11 Chong Yidong <cyd@stupidchicken.com>
14983
14984 * dispextern.h (struct image): Replace data member, whose int_val
14985 and ptr_val fields were not used by anything, with a single
14986 lisp_val object.
14987
14988 * image.c (Fimage_metadata, make_image, mark_image, tiff_load)
14989 (gif_clear_image, gif_load, imagemagick_load_image)
14990 (gs_clear_image, gs_load): Callers changed.
14991
14992 2011-06-10 Paul Eggert <eggert@cs.ucla.edu>
14993
14994 * buffer.h: Include <time.h>, for time_t.
14995 Needed to build on FreeBSD 8.2. Problem reported by Herbert J. Skuhra.
14996
14997 Fix minor problems found by static checking.
14998
14999 * image.c (PixelGetMagickColor): Declare if ImageMagick headers don't.
15000
15001 Make identifiers static if they are not used in other modules.
15002 * data.c (Qcompiled_function, Qframe, Qvector):
15003 * image.c (QimageMagick, Qsvg):
15004 * minibuf.c (Qmetadata):
15005 * window.c (resize_window_check, resize_root_window): Now static.
15006 * window.h (resize_window_check, resize_root_window): Remove decls.
15007
15008 * window.c (window_deletion_count, delete_deletable_window):
15009 Remove; unused.
15010 (window_body_lines): Now static.
15011 (Fdelete_other_windows_internal): Mark vars as initialized.
15012 Make sure 'resize_failed' is initialized.
15013 (run_window_configuration_change_hook): Rename local to avoid shadowing.
15014 (resize_window_apply): Remove unused local.
15015 * window.h (delete_deletable_window): Remove decl.
15016
15017 * image.c (gif_load, svg_load_image): Rename locals to avoid shadowing.
15018 (imagemagick_load_image): Fix pointer signedness problem by changing
15019 last arg from unsigned char * to char *. All uses changed.
15020 Also, fix a local for similar reasons.
15021 Remove unused locals. Remove locals to avoid shadowing.
15022 (fn_rsvg_handle_free): Remove; unused.
15023 (svg_load, svg_load_image): Fix pointer signedness problem.
15024 (imagemagick_load_image): Don't use garbage pointer image_wand.
15025
15026 * ftfont.c (ftfont_get_metrics, ftfont_drive_otf): Remove unused locals.
15027
15028 2011-06-10 Chong Yidong <cyd@stupidchicken.com>
15029
15030 * image.c (gif_load): Fix omitted cast error introduced by
15031 2011-06-06 change.
15032
15033 2011-06-10 Martin Rudalics <rudalics@gmx.at>
15034
15035 * window.h (resize_proportionally, orig_total_lines)
15036 (orig_top_line): Remove from window structure.
15037 (set_window_height, set_window_width, change_window_heights)
15038 (Fdelete_window): Remove prototypes.
15039 (resize_frame_windows): Remove duplicate declaration.
15040
15041 2011-06-10 Eli Zaretskii <eliz@gnu.org>
15042
15043 * window.h (resize_frame_windows, resize_window_check)
15044 (delete_deletable_window, resize_root_window)
15045 (resize_frame_windows): Declare prototypes.
15046
15047 * window.c (resize_window_apply): Make definition be "static" to
15048 match the prototype.
15049
15050 2011-06-10 Martin Rudalics <rudalics@gmx.at>
15051
15052 * window.c: Remove declarations of Qwindow_size_fixed,
15053 window_min_size_1, window_min_size_2, window_min_size,
15054 size_window, window_fixed_size_p, enlarge_window, delete_window.
15055 Remove static from declaration of Qdelete_window, it's
15056 temporarily needed by Fbury_buffer.
15057 (replace_window): Don't assign orig_top_line and
15058 orig_total_lines.
15059 (Fdelete_window, delete_window): Remove. Window deletion is
15060 handled by window.el.
15061 (window_loop): Remove DELETE_OTHER_WINDOWS case.
15062 Replace Fdelete_window calls with calls to Qdelete_window.
15063 (Fdelete_other_windows): Remove. Deleting other windows is
15064 handled by window.el.
15065 (window_fixed_size_p): Remove. Fixed-sizeness of windows is
15066 handled in window.el.
15067 (window_min_size_2, window_min_size_1, window_min_size): Remove.
15068 Window minimum sizes are handled in window.el.
15069 (shrink_windows, size_window, set_window_height)
15070 (set_window_width, change_window_heights, window_height)
15071 (window_width, CURBEG, CURSIZE, enlarge_window)
15072 (adjust_window_trailing_edge, Fadjust_window_trailing_edge)
15073 (Fenlarge_window, Fshrink_window): Remove. Window resizing is
15074 handled in window.el.
15075 (make_dummy_parent): Rename to make_parent_window and give it a
15076 second argument horflag.
15077 (make_window): Don't set resize_proportionally any more.
15078 (Fsplit_window): Remove. Windows are split in window.el.
15079 (save_restore_action, save_restore_orig_size)
15080 (shrink_window_lowest_first, save_restore_orig_size): Remove.
15081 Resize mini windows in window.el.
15082 (grow_mini_window, shrink_mini_window): Implement by calling
15083 Qresize_root_window_vertically, resize_window_check and
15084 resize_window_apply.
15085 (saved_window, Fset_window_configuration, save_window_save):
15086 Do not handle orig_top_line, orig_total_lines, and
15087 resize_proportionally.
15088 (window_min_height, window_min_width): Move to window.el.
15089 (keys_of_window): Move bindings for delete-other-windows,
15090 split-window, delete-window and enlarge-window to window.el.
15091
15092 * buffer.c: Temporarily extern Qdelete_window.
15093 (Fbury_buffer): Temporarily call Qdelete_window instead of
15094 Fdelete_window (Fbury_buffer will move to window.el soon).
15095
15096 * frame.c (set_menu_bar_lines_1): Remove code handling
15097 orig_top_line and orig_total_lines.
15098
15099 * dispnew.c (adjust_frame_glyphs_initially): Don't use
15100 set_window_height but set heights directly.
15101 (change_frame_size_1): Use resize_frame_windows.
15102
15103 * xdisp.c (init_xdisp): Don't use set_window_height but set
15104 heights directly.
15105
15106 * xfns.c (x_set_menu_bar_lines, x_set_tool_bar_lines):
15107 Use resize_frame_windows instead of change_window_heights and run
15108 run_window_configuration_change_hook.
15109
15110 * w32fns.c (x_set_tool_bar_lines): Use resize_frame_windows
15111 instead of change_window_heights and run
15112 run_window_configuration_change_hook.
15113
15114 2011-06-09 Martin Rudalics <rudalics@gmx.at>
15115
15116 * window.c (replace_window): Rename second argument REPLACEMENT to
15117 NEW. New third argument SETFLAG. Rewrite.
15118 (delete_window, make_dummy_parent): Call replace_window with
15119 third argument 1.
15120 (window_list_1): Move down in code.
15121 (run_window_configuration_change_hook): Move set_buffer part
15122 before select_frame_norecord part in order to unwind correctly.
15123 Rename count1 to count.
15124 (recombine_windows, delete_deletable_window, resize_root_window)
15125 (Fdelete_other_windows_internal)
15126 (Frun_window_configuration_change_hook, make_parent_window)
15127 (resize_window_check, resize_window_apply, Fresize_window_apply)
15128 (resize_frame_windows, Fsplit_window_internal)
15129 (Fdelete_window_internal, Fresize_mini_window_internal):
15130 New functions.
15131 (syms_of_window): New variables Vwindow_splits and Vwindow_nest.
15132
15133 2011-06-08 Martin Rudalics <rudalics@gmx.at>
15134
15135 * window.h (window): Add some new members to window structure -
15136 normal_lines, normal_cols, new_total, new_normal, clone_number,
15137 splits, nest, prev_buffers, next_buffers.
15138 (WINDOW_TOTAL_SIZE): Move here from window.c.
15139 (MIN_SAFE_WINDOW_WIDTH, MIN_SAFE_WINDOW_HEIGHT): Define here.
15140
15141 * window.c (Fwindow_height, Fwindow_width, Fwindow_full_width_p):
15142 Remove.
15143 (make_dummy_parent): Set new members of windows structure.
15144 (make_window): Move down in code. Handle new members of window
15145 structure.
15146 (Fwindow_clone_number, Fwindow_splits, Fset_window_splits)
15147 (Fwindow_nest, Fset_window_nest, Fwindow_new_total)
15148 (Fwindow_normal_size, Fwindow_new_normal, Fwindow_prev_buffers)
15149 (Fset_window_prev_buffers, Fwindow_next_buffers)
15150 (Fset_window_next_buffers, Fset_window_clone_number):
15151 New functions.
15152 (Fwindow_hscroll, Fwindow_at, Fwindow_point, Fwindow_start)
15153 (Fwindow_end, Fwindow_line_height, Fset_window_dedicated_p):
15154 Doc-string fixes.
15155 (Fwindow_parameters, Fwindow_parameter, Fset_window_parameter):
15156 Argument WINDOW can be now internal window too.
15157 (Fwindow_use_time): Move up in code.
15158 (Fget_buffer_window): Rename argument FRAME to ALL-FRAMES.
15159 Rewrite doc-string.
15160 (Fset_window_configuration, saved_window)
15161 (Fcurrent_window_configuration, save_window_save): Handle new
15162 members of window structure.
15163 (WINDOW_TOTAL_SIZE, MIN_SAFE_WINDOW_WIDTH)
15164 (MIN_SAFE_WINDOW_HEIGHT): Move to window.h.
15165 (syms_of_window): New Lisp objects Qrecord_window_buffer,
15166 Qwindow_deletable_p, Qdelete_window, Qreplace_buffer_in_windows,
15167 Qget_mru_window, Qresize_root_window,
15168 Qresize_root_window_vertically, Qsafe, Qabove, Qbelow,
15169 Qauto_buffer_name; staticpro them.
15170
15171 2011-06-07 Martin Rudalics <rudalics@gmx.at>
15172
15173 * window.c (Fwindow_total_size, Fwindow_left_column)
15174 (Fwindow_top_line, window_body_lines, Fwindow_body_size)
15175 (Fwindow_list_1): New functions.
15176 (window_box_text_cols): Replace with window_body_cols.
15177 (Fwindow_width, Fscroll_left, Fscroll_right):
15178 Use window_body_cols instead of window_box_text_cols.
15179 (delete_window, Fset_window_configuration):
15180 Call delete_all_subwindows with window as argument.
15181 (delete_all_subwindows): Take a window as argument and not a
15182 structure. Rewrite.
15183 (window_loop): Remove handling of GET_LRU_WINDOW and
15184 GET_LARGEST_WINDOW.
15185 (Fget_lru_window, Fget_largest_window): Move to window.el.
15186
15187 * window.h: Extern window_body_cols instead of
15188 window_box_text_cols. delete_all_subwindows now takes a
15189 Lisp_Object as argument.
15190
15191 * indent.c (compute_motion, Fcompute_motion):
15192 Use window_body_cols instead of window_box_text_cols.
15193
15194 * frame.c (delete_frame): Call delete_all_subwindows with root
15195 window as argument.
15196
15197 2011-06-07 Daniel Colascione <dan.colascione@gmail.com>
15198
15199 * fns.c (Fputhash): Document return value.
15200
15201 2011-06-06 Chong Yidong <cyd@stupidchicken.com>
15202
15203 * image.c (gif_load): Implement gif89a spec "no disposal" method.
15204
15205 2011-06-06 Paul Eggert <eggert@cs.ucla.edu>
15206
15207 Cons<->int and similar integer overflow fixes (Bug#8794).
15208
15209 Check for overflow when converting integer to cons and back.
15210 * charset.c (Fdefine_charset_internal, Fdecode_char):
15211 Use cons_to_unsigned to catch overflow.
15212 (Fencode_char): Use INTEGER_TO_CONS.
15213 * composite.h (LGLYPH_CODE): Use cons_to_unsigned.
15214 (LGLYPH_SET_CODE): Use INTEGER_TO_CONS.
15215 * data.c (long_to_cons, cons_to_long): Remove.
15216 (cons_to_unsigned, cons_to_signed): New functions.
15217 These signal an error for invalid or out-of-range values.
15218 * dired.c (Ffile_attributes): Use INTEGER_TO_CONS.
15219 * fileio.c (Fset_visited_file_modtime): Use CONS_TO_INTEGER.
15220 * font.c (Ffont_variation_glyphs):
15221 * fontset.c (Finternal_char_font): Use INTEGER_TO_CONS.
15222 * lisp.h: Include <intprops.h>.
15223 (INTEGER_TO_CONS, CONS_TO_INTEGER): New macros.
15224 (cons_to_signed, cons_to_unsigned): New decls.
15225 (long_to_cons, cons_to_long): Remove decls.
15226 * undo.c (record_first_change): Use INTEGER_TO_CONS.
15227 (Fprimitive_undo): Use CONS_TO_INTEGER.
15228 * xfns.c (Fx_window_property): Likewise.
15229 * xselect.c: Include <limits.h>.
15230 (x_own_selection, selection_data_to_lisp_data):
15231 Use INTEGER_TO_CONS.
15232 (x_handle_selection_request, x_handle_selection_clear)
15233 (x_get_foreign_selection, Fx_disown_selection_internal)
15234 (Fx_get_atom_name, x_send_client_event): Use CONS_TO_INTEGER.
15235 (lisp_data_to_selection_data): Use cons_to_unsigned.
15236 (x_fill_property_data): Use cons_to_signed.
15237 Report values out of range.
15238
15239 Check for buffer and string overflow more precisely.
15240 * buffer.h (BUF_BYTES_MAX): New macro.
15241 * lisp.h (STRING_BYTES_MAX): New macro.
15242 * alloc.c (Fmake_string):
15243 * character.c (string_escape_byte8):
15244 * coding.c (coding_alloc_by_realloc):
15245 * doprnt.c (doprnt):
15246 * editfns.c (Fformat):
15247 * eval.c (verror):
15248 Use STRING_BYTES_MAX, not MOST_POSITIVE_FIXNUM,
15249 since they may not be the same number.
15250 * editfns.c (Finsert_char):
15251 * fileio.c (Finsert_file_contents):
15252 Likewise for BUF_BYTES_MAX.
15253
15254 * image.c: Use ptrdiff_t, not int, for sizes.
15255 (slurp_file): Switch from int to ptrdiff_t.
15256 All uses changed.
15257 (slurp_file): Check that file size fits in both size_t (for
15258 malloc) and ptrdiff_t (for sanity and safety).
15259
15260 * fileio.c (Fverify_visited_file_modtime): Avoid time overflow
15261 if b->modtime has its maximal value.
15262
15263 * dired.c (Ffile_attributes): Don't assume EMACS_INT has >32 bits.
15264
15265 Don't assume time_t can fit into int.
15266 * buffer.h (struct buffer.modtime): Now time_t, not int.
15267 * fileio.c (Fvisited_file_modtime): No need for time_t cast now.
15268 * undo.c (Fprimitive_undo): Use time_t, not int, for time_t value.
15269
15270 Minor fixes for signed vs unsigned integers.
15271 * character.h (MAYBE_UNIFY_CHAR):
15272 * charset.c (maybe_unify_char):
15273 * keyboard.c (read_char, reorder_modifiers):
15274 XINT -> XFASTINT, since the integer must be nonnegative.
15275 * ftfont.c (ftfont_spec_pattern):
15276 * keymap.c (access_keymap, silly_event_symbol_error):
15277 XUINT -> XFASTINT, since the integer must be nonnegative.
15278 (Fsingle_key_description, preferred_sequence_p): XUINT -> XINT,
15279 since it makes no difference and we prefer signed.
15280 * keyboard.c (record_char): Use XUINT when all the neighbors do.
15281 (access_keymap): NATNUMP -> INTEGERP, since the integer must be
15282 nonnegative.
15283
15284 2011-06-06 Stefan Monnier <monnier@iro.umontreal.ca>
15285
15286 * window.h (Fwindow_frame): Declare.
15287
15288 2011-06-06 Paul Eggert <eggert@cs.ucla.edu>
15289
15290 * alloc.c: Simplify handling of large-request failures (Bug#8800).
15291 (SPARE_MEMORY): Always define.
15292 (LARGE_REQUEST): Remove.
15293 (memory_full): Use SPARE_MEMORY rather than LARGE_REQUEST.
15294
15295 2011-06-06 Martin Rudalics <rudalics@gmx.at>
15296
15297 * lisp.h: Move EXFUNS for Fframe_root_window,
15298 Fframe_first_window and Fset_frame_selected_window to window.h.
15299
15300 * window.h: Move EXFUNS for Fframe_root_window,
15301 Fframe_first_window and Fset_frame_selected_window here from
15302 lisp.h.
15303
15304 * frame.c (Fwindow_frame, Fframe_first_window)
15305 (Fframe_root_window, Fframe_selected_window)
15306 (Fset_frame_selected_window): Move to window.c.
15307 (Factive_minibuffer_window): Move to minibuf.c.
15308 (Fother_visible_frames_p): New function.
15309
15310 * minibuf.c (Factive_minibuffer_window): Move here from frame.c.
15311
15312 * window.c (decode_window, decode_any_window): Move up in code.
15313 (Fwindowp, Fwindow_live_p): Rewrite doc-strings.
15314 (inhibit_frame_unsplittable): Remove unused variable.
15315 (Fwindow_buffer): Move up and rewrite doc-string.
15316 (Fwindow_parent, Fwindow_vchild, Fwindow_hchild, Fwindow_next)
15317 (Fwindow_prev): New functions.
15318 (Fwindow_frame): Move here from frame.c. Accept any window as
15319 argument.
15320 (Fframe_root_window, Fframe_first_window)
15321 (Fframe_selected_window): Move here from frame.c. Accept frame
15322 or arbitrary window as argument. Update doc-strings.
15323 (Fminibuffer_window): Move up in code.
15324 (Fwindow_minibuffer_p): Move up in code and simplify.
15325 (Fset_frame_selected_window): Move here from frame.c.
15326 Marginal rewrite.
15327 (Fselected_window, select_window, Fselect_window): Move up in
15328 code. Minor doc-string fixes.
15329
15330 2011-06-06 Paul Eggert <eggert@cs.ucla.edu>
15331
15332 * alloc.c (memory_full) [SYSTEM_MALLOC]: Port to MacOS (Bug#8800).
15333 Do not assume that spare memory exists; that assumption is valid
15334 only if SYSTEM_MALLOC.
15335 (LARGE_REQUEST): New macro, so that the issue of large requests
15336 is separated from the issue of spare memory.
15337
15338 2011-06-05 Andreas Schwab <schwab@linux-m68k.org>
15339
15340 * editfns.c (Fformat): Correctly handle zero flag with hexadecimal
15341 format. (Bug#8806)
15342
15343 * gtkutil.c (xg_get_default_scrollbar_width): Avoid warning.
15344
15345 * xfns.c (x_set_scroll_bar_default_width): Move declarations
15346 before statements.
15347
15348 2011-06-05 Jan Djärv <jan.h.d@swipnet.se>
15349
15350 * gtkutil.c (xg_get_default_scrollbar_width): New function.
15351
15352 * gtkutil.h: Declare xg_get_default_scrollbar_width.
15353
15354 * xfns.c (x_set_scroll_bar_default_width): If USE_GTK, get
15355 min width by calling x_set_scroll_bar_default_width (Bug#8505).
15356
15357 2011-06-05 Juanma Barranquero <lekktu@gmail.com>
15358
15359 * xdisp.c (single_display_spec_intangible_p): Remove declaration.
15360
15361 2011-06-04 Chong Yidong <cyd@stupidchicken.com>
15362
15363 * xselect.c (x_clipboard_manager_save): Remove redundant arg.
15364 (x_clipboard_manager_save): Add return value.
15365 (x_clipboard_manager_error_1, x_clipboard_manager_error_2):
15366 New error handlers.
15367 (x_clipboard_manager_save_frame, x_clipboard_manager_save_all):
15368 Obey Vx_select_enable_clipboard_manager. Catch errors in
15369 x_clipboard_manager_save (Bug#8779).
15370 (Vx_select_enable_clipboard_manager): New variable.
15371 (x_get_foreign_selection): Reduce scope of x_catch_errors (Bug#8790).
15372
15373 2011-06-04 Dan Nicolaescu <dann@ics.uci.edu>
15374
15375 * emacs.c (main): Warn when starting a GTK emacs in daemon mode.
15376
15377 2011-06-04 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
15378
15379 * fringe.c (update_window_fringes): Don't update overlay arrow bitmap
15380 in the current matrix if keep_current_p is non-zero.
15381
15382 2011-06-04 Eli Zaretskii <eliz@gnu.org>
15383
15384 * bidi.c (bidi_level_of_next_char): Fix last change.
15385
15386 2011-06-03 Eli Zaretskii <eliz@gnu.org>
15387
15388 Support bidi reordering of text covered by display properties.
15389
15390 * bidi.c (bidi_copy_it): Use offsetof instead of emulating it.
15391 (bidi_fetch_char, bidi_fetch_char_advance): New functions.
15392 (bidi_cache_search, bidi_cache_iterator_state)
15393 (bidi_paragraph_init, bidi_resolve_explicit, bidi_resolve_weak)
15394 (bidi_level_of_next_char, bidi_move_to_visually_next):
15395 Support character positions inside a run of characters covered by a
15396 display string.
15397 (bidi_paragraph_init, bidi_resolve_explicit_1)
15398 (bidi_level_of_next_char): Call bidi_fetch_char and
15399 bidi_fetch_char_advance instead of FETCH_CHAR and
15400 FETCH_CHAR_ADVANCE.
15401 (bidi_init_it): Initialize new members.
15402 (LRE_CHAR, RLE_CHAR, PDF_CHAR, LRO_CHAR, RLO_CHAR): Remove macro
15403 definitions.
15404 (bidi_explicit_dir_char): Lookup character type in bidi_type_table,
15405 instead of using explicit *_CHAR codes.
15406 (bidi_resolve_explicit, bidi_resolve_weak):
15407 Use FETCH_MULTIBYTE_CHAR instead of FETCH_CHAR, as reordering of
15408 bidirectional text is supported only in multibyte buffers.
15409 (bidi_init_it): Accept additional argument FRAME_WINDOW_P and use
15410 it to initialize the frame_window_p member of struct bidi_it.
15411 (bidi_cache_iterator_state, bidi_resolve_explicit_1)
15412 (bidi_resolve_explicit, bidi_resolve_weak)
15413 (bidi_level_of_next_char, bidi_move_to_visually_next): Abort if
15414 bidi_it->nchars is non-positive.
15415 (bidi_level_of_next_char): Don't try to lookup the cache for the
15416 next/previous character if nothing is cached there yet, or if we
15417 were just reseat()'ed to a new position.
15418
15419 * xdisp.c (set_cursor_from_row): Set start and stop points
15420 according to the row's direction when priming the loop that looks
15421 for the glyph on which to display cursor.
15422 (single_display_spec_intangible_p): Function deleted.
15423 (display_prop_intangible_p): Reimplement to call
15424 handle_display_spec instead of single_display_spec_intangible_p.
15425 Accept 3 additional arguments needed by handle_display_spec.
15426 This fixes incorrect cursor motion across display property with complex
15427 values: lists, `(when COND...)' forms, etc.
15428 (single_display_spec_string_p): Support property values that are
15429 lists with the argument STRING its top-level element.
15430 (display_prop_string_p): Fix the condition for processing a
15431 property that is a list to be consistent with handle_display_spec.
15432 (handle_display_spec): New function, refactored from the
15433 last portion of handle_display_prop.
15434 (compute_display_string_pos): Accept additional argument
15435 FRAME_WINDOW_P. Call handle_display_spec to determine whether the
15436 value of a `display' property is a "replacing spec".
15437 (handle_single_display_spec): Accept 2 additional arguments BUFPOS
15438 and FRAME_WINDOW_P. If IT is NULL, don't set up the iterator from
15439 the display property, but just return a value indicating whether
15440 the display property will replace the characters it covers.
15441 (Fcurrent_bidi_paragraph_direction): Initialize the nchars and
15442 frame_window_p members of struct bidi_it.
15443 (compute_display_string_pos, compute_display_string_end):
15444 New functions.
15445 (push_it): Accept second argument POSITION, where pop_it should
15446 jump to continue iteration.
15447 (reseat_1): Initialize bidi_it.disp_pos.
15448
15449 * keyboard.c (adjust_point_for_property): Adjust the call to
15450 display_prop_intangible_p to its new signature.
15451
15452 * dispextern.h (struct bidi_it): New member frame_window_p.
15453 (bidi_init_it): Update prototypes.
15454 (display_prop_intangible_p): Update prototype.
15455 (compute_display_string_pos, compute_display_string_end):
15456 Declare prototypes.
15457 (struct bidi_it): New members nchars and disp_pos. ch_len is now
15458 EMACS_INT.
15459
15460 2011-06-02 Paul Eggert <eggert@cs.ucla.edu>
15461
15462 Malloc failure behavior now depends on size of allocation.
15463 * alloc.c (buffer_memory_full, memory_full): New arg NBYTES.
15464 * lisp.h: Change signatures accordingly.
15465 * alloc.c, buffer.c, editfns.c, menu.c, minibuf.c, xterm.c:
15466 All callers changed. (Bug#8762)
15467
15468 * gnutls.c: Use Emacs's memory allocators.
15469 Without this change, the gnutls library would invoke malloc etc.
15470 directly, which causes problems on non-SYNC_INPUT hosts, and which
15471 runs afoul of improving memory_full behavior. (Bug#8761)
15472 (fn_gnutls_global_set_mem_functions): New macro or function pointer.
15473 (emacs_gnutls_global_init): Use it to specify xmalloc, xrealloc,
15474 xfree instead of the default malloc, realloc, free.
15475 (Fgnutls_boot): No need to check for memory allocation failure,
15476 since xmalloc does that for us.
15477
15478 Remove arbitrary limit of 2**31 entries in hash tables. (Bug#8771)
15479 * category.c (hash_get_category_set):
15480 * ccl.c (ccl_driver):
15481 * charset.c (Fdefine_charset_internal):
15482 * charset.h (struct charset.hash_index):
15483 * composite.c (get_composition_id, gstring_lookup_cache)
15484 (composition_gstring_put_cache):
15485 * composite.h (struct composition.hash_index):
15486 * dispextern.h (struct image.hash):
15487 * fns.c (next_almost_prime, larger_vector, cmpfn_eql)
15488 (cmpfn_equal, cmpfn_user_defined, hashfn_eq, hashfn_eql)
15489 (hashfn_equal, hashfn_user_defined, make_hash_table)
15490 (maybe_resize_hash_table, hash_lookup, hash_put)
15491 (hash_remove_from_table, hash_clear, sweep_weak_table, SXHASH_COMBINE)
15492 (sxhash_string, sxhash_list, sxhash_vector, sxhash_bool_vector)
15493 (Fsxhash, Fgethash, Fputhash, Fmaphash):
15494 * image.c (make_image, search_image_cache, lookup_image)
15495 (xpm_put_color_table_h):
15496 * lisp.h (struct Lisp_Hash_Table):
15497 * minibuf.c (Ftry_completion, Fall_completions, Ftest_completion):
15498 * print.c (print): Use 'EMACS_UINT' and 'EMACS_INT'
15499 for hashes and hash indexes, instead of 'unsigned' and 'int'.
15500 * alloc.c (allocate_vectorlike):
15501 Check for overflow in vector size calculations.
15502 * ccl.c (ccl_driver):
15503 Check for overflow when converting EMACS_INT to int.
15504 * fns.c, image.c: Remove unnecessary static decls that would otherwise
15505 need to be updated by these changes.
15506 * fns.c (make_hash_table, maybe_resize_hash_table):
15507 Check for integer overflow with large hash tables.
15508 (make_hash_table, maybe_resize_hash_table, Fmake_hash_table):
15509 Prefer the faster XFLOAT_DATA to XFLOATINT where either will do.
15510 (SXHASH_REDUCE): New macro.
15511 (sxhash_string, sxhash_list, sxhash_vector, sxhash_bool_vector):
15512 Use it instead of discarding useful hash info with large hash values.
15513 (sxhash_float): New function.
15514 (sxhash): Use it. No more need for "& INTMASK" due to above changes.
15515 * lisp.h (FIXNUM_BITS): New macro, useful for SXHASH_REDUCE etc.
15516 (MOST_NEGATIVE_FIXNUM, MOST_POSITIVE_FIXNUM, INTMASK):
15517 Rewrite to use FIXNUM_BITS, as this simplifies things.
15518 (next_almost_prime, larger_vector, sxhash, hash_lookup, hash_put):
15519 Adjust signatures to match updated version of code.
15520 (consing_since_gc): Now EMACS_INT, since a single hash table can
15521 use more than INT_MAX bytes.
15522
15523 2011-06-01 Dan Nicolaescu <dann@ics.uci.edu>
15524
15525 Make it possible to build with GCC-4.6+ -O2 -flto.
15526
15527 * emacs.c (__malloc_initialize_hook): Mark as EXTERNALLY_VISIBLE.
15528
15529 2011-06-01 Stefan Monnier <monnier@iro.umontreal.ca>
15530
15531 * minibuf.c (get_minibuffer, read_minibuf_unwind):
15532 Call minibuffer-inactive-mode.
15533
15534 2011-05-31 Juanma Barranquero <lekktu@gmail.com>
15535
15536 * makefile.w32-in ($(BLD)/data.$(O), $(BLD)/editfns.$(O)):
15537 Update dependencies.
15538
15539 2011-05-31 Dan Nicolaescu <dann@ics.uci.edu>
15540
15541 * data.c (init_data): Remove code for UTS, this system is not
15542 supported anymore.
15543
15544 2011-05-31 Dan Nicolaescu <dann@ics.uci.edu>
15545
15546 Don't force ./temacs to start in terminal mode.
15547
15548 * frame.c (make_initial_frame): Initialize faces in all cases, not
15549 only when CANNOT_DUMP is defined.
15550 * dispnew.c (init_display): Remove CANNOT_DUMP condition.
15551
15552 2011-05-31 Dan Nicolaescu <dann@ics.uci.edu>
15553
15554 * dispnew.c (add_window_display_history): Use const for the string
15555 pointer. Remove declaration, not needed.
15556
15557 2011-05-31 Paul Eggert <eggert@cs.ucla.edu>
15558
15559 Use 'inline', not 'INLINE'.
15560 <http://lists.gnu.org/archive/html/emacs-devel/2011-05/msg00914.html>
15561 * alloc.c, fontset.c (INLINE): Remove.
15562 * alloc.c, bidi.c, charset.c, coding.c, dispnew.c, fns.c, image.c:
15563 * intervals.c, keyboard.c, process.c, syntax.c, textprop.c, w32term.c:
15564 * xdisp.c, xfaces.c, xterm.c: Replace all uses of INLINE with inline.
15565 * gmalloc.c (register_heapinfo): Use inline unconditionally.
15566 * lisp.h (LISP_MAKE_RVALUE): Use inline, not __inline__.
15567
15568 2011-05-31 Dan Nicolaescu <dann@ics.uci.edu>
15569
15570 Make it possible to run ./temacs.
15571
15572 * callproc.c (set_initial_environment): Remove CANNOT_DUMP code,
15573 syms_of_callproc does the same thing. Remove test for
15574 "initialized", do it in the caller.
15575 * emacs.c (main): Avoid calling set_initial_environment when dumping.
15576
15577 2011-05-31 Stefan Monnier <monnier@iro.umontreal.ca>
15578
15579 * minibuf.c (Finternal_complete_buffer): Return `category' metadata.
15580 (read_minibuf): Use get_minibuffer.
15581 (syms_of_minibuf): Use DEFSYM.
15582 (Qmetadata): New var.
15583 * data.c (Qbuffer): Don't make it static.
15584 (syms_of_data): Use DEFSYM.
15585
15586 2011-05-31 Paul Eggert <eggert@cs.ucla.edu>
15587
15588 * ccl.c (CCL_CODE_RANGE): Allow negative numbers. (Bug#8751)
15589 (CCL_CODE_MIN): New macro.
15590
15591 2011-05-30 Paul Eggert <eggert@cs.ucla.edu>
15592
15593 * alloc.c (lisp_align_malloc): Omit unnecessary val==NULL tests.
15594
15595 * eval.c (Qdebug): Now static.
15596 * lisp.h (Qdebug): Remove decl. This reverts a part of the
15597 2011-04-26T11:26:05Z!dan.colascione@gmail.com that inadvertently undid part of
15598 2011-04-14T06:48:41Z!eggert@cs.ucla.edu.
15599
15600 2011-05-29 Chong Yidong <cyd@stupidchicken.com>
15601
15602 * image.c: Various fixes to ImageMagick code comments.
15603 (Fimagemagick_types): Doc fix.
15604
15605 2011-05-29 Paul Eggert <eggert@cs.ucla.edu>
15606
15607 Minor fixes prompted by GCC 4.6.0 warnings.
15608
15609 * xselect.c (converted_selections, conversion_fail_tag): Now static.
15610
15611 * emacs.c [HAVE_X_WINDOWS]: Include "xterm.h".
15612 (x_clipboard_manager_save_all): Move extern decl to ...
15613 * xterm.h: ... here, so that it can be checked for consistency.
15614
15615 2011-05-29 Chong Yidong <cyd@stupidchicken.com>
15616
15617 * xselect.c (x_clipboard_manager_save_frame)
15618 (x_clipboard_manager_save_all): New functions.
15619 (Fx_clipboard_manager_save): Lisp function deleted.
15620
15621 * emacs.c (Fkill_emacs): Call x_clipboard_manager_save_all.
15622 * frame.c (delete_frame): Call x_clipboard_manager_save_frame.
15623
15624 * xterm.h: Update prototype.
15625
15626 2011-05-28 William Xu <william.xwl@gmail.com>
15627
15628 * nsterm.m (ns_term_shutdown): Synchronize user defaults before
15629 exiting (Bug#8239).
15630
15631 2011-05-28 Jim Meyering <meyering@redhat.com>
15632
15633 Avoid a sign-extension bug in crypto_hash_function.
15634 * fns.c (to_uchar): Define.
15635 (crypto_hash_function): Use it to convert some newly-signed
15636 variables to unsigned, to avoid sign-extension bugs. For example,
15637 without this change, (md5 "truc") would evaluate to
15638 45723a2aff78ff4fff7fff1114760e62 rather than the expected
15639 45723a2af3788c4ff17f8d1114760e62. Reported by Antoine Levitt in
15640 https://lists.gnu.org/archive/html/emacs-devel/2011-05/msg00883.html.
15641
15642 2011-05-27 Paul Eggert <eggert@cs.ucla.edu>
15643
15644 Integer overflow fixes.
15645
15646 * dbusbind.c: Serial number integer overflow fixes.
15647 (CHECK_DBUS_SERIAL_GET_SERIAL): New macro.
15648 (Fdbus_call_method_asynchronously, xd_read_message_1): Use a float
15649 to hold a serial number that is too large for a fixnum.
15650 (Fdbus_method_return_internal, Fdbus_method_error_internal):
15651 Check for serial numbers out of range. Decode any serial number
15652 that was so large that it became a float. (Bug#8722)
15653
15654 * dbusbind.c: Use XFASTINT rather than XUINT, and check for nonneg.
15655 (Fdbus_call_method, Fdbus_call_method_asynchronously):
15656 Use XFASTINT rather than XUINT when numbers are nonnegative.
15657 (xd_append_arg, Fdbus_method_return_internal):
15658 (Fdbus_method_error_internal): Likewise. Also, for unsigned
15659 arguments, check that Lisp number is nonnegative, rather than
15660 silently wrapping negative numbers around. (Bug#8722)
15661 (xd_read_message_1): Don't assume dbus_uint32_t can fit in int.
15662 (Bug#8722)
15663
15664 * data.c (arith_driver, Flsh): Avoid unnecessary casts to EMACS_UINT.
15665
15666 * ccl.c (ccl_driver): Redo slightly to avoid the need for 'unsigned'.
15667
15668 ccl: Add integer overflow checks.
15669 * ccl.c (CCL_CODE_MAX, GET_CCL_RANGE, GET_CCL_CODE, GET_CCL_INT):
15670 (IN_INT_RANGE): New macros.
15671 (ccl_driver): Use them to check for integer overflow when
15672 decoding a CCL program. Many of the new checks are whether XINT (x)
15673 fits in int; it doesn't always, on 64-bit hosts. The new version
15674 doesn't catch all possible integer overflows, but it's an
15675 improvement. (Bug#8719)
15676
15677 * alloc.c (make_event_array): Use XINT, not XUINT.
15678 There's no need for unsigned here.
15679
15680 * mem-limits.h (EXCEEDS_LISP_PTR) [!USE_LSB_TAG]: EMACS_UINT -> uintptr_t
15681 This follows up to the 2011-05-06 change that substituted uintptr_t
15682 for EMACS_INT. This case wasn't caught back then.
15683
15684 Rework Fformat to avoid integer overflow issues.
15685 * editfns.c: Include <float.h> unconditionally, as it's everywhere
15686 now (part of C89). Include <verify.h>.
15687 (MAX_10_EXP, CONVERTED_BYTE_SIZE): Remove; no longer needed.
15688 (pWIDE, pWIDElen, signed_wide, unsigned_wide): New defns.
15689 (Fformat): Avoid the prepass trying to compute sizes; it was only
15690 approximate and thus did not catch overflow reliably. Instead, walk
15691 through the format just once, formatting and computing sizes as we go,
15692 checking for integer overflow at every step, and allocating a larger
15693 buffer as needed. Keep track separately whether the format is
15694 multibyte. Keep only the most-recently calculated precision, rather
15695 than them all. Record whether each argument has been converted to
15696 string. Use EMACS_INT, not int, for byte and char and arg counts.
15697 Support field widths and precisions larger than INT_MAX. Avoid
15698 sprintf's undefined behavior with conversion specifications such as %#d
15699 and %.0c. Fix bug with strchr succeeding on '\0' when looking for
15700 flags. Fix bug with (format "%c" 256.0). Avoid integer overflow when
15701 formatting out-of-range floating point numbers with int
15702 formats. (Bug#8668)
15703
15704 * lisp.h (FIXNUM_OVERFLOW_P): Work even if arg is a NaN.
15705
15706 * data.c: Avoid integer truncation in expressions involving floats.
15707 * data.c: Include <intprops.h>.
15708 (arith_driver): When there's an integer overflow in an expression
15709 involving floating point, convert the integers to floating point
15710 so that the resulting value does not suffer from catastrophic
15711 integer truncation. For example, on a 64-bit host (* 4
15712 most-negative-fixnum 0.5) should yield about -4.6e+18, not zero.
15713 Do not rely on undefined behavior after integer overflow.
15714
15715 merge count_size_as_multibyte, parse_str_to_multibyte
15716 * character.c, character.h (count_size_as_multibyte):
15717 Rename from parse_str_to_multibyte; all uses changed.
15718 Check for integer overflow.
15719 * insdel.c, lisp.h (count_size_as_multibyte): Remove,
15720 since it's now a duplicate of the other. This is more of
15721 a character than a buffer op, so better that it's in character.c.
15722 * fns.c, print.c: Adjust to above changes.
15723
15724 2011-05-27 Stefan Monnier <monnier@iro.umontreal.ca>
15725
15726 * xselect.c (x_convert_selection): Yet another int/Lisp_Object mixup.
15727
15728 2011-05-27 Paul Eggert <eggert@cs.ucla.edu>
15729
15730 * xselect.c: Fix minor problems prompted by GCC 4.6.0 warnings.
15731 (x_handle_selection_request, frame_for_x_selection): Remove unused vars.
15732 (x_clipboard_manager_save): Now static.
15733 (Fx_clipboard_manager_save): Rename local to avoid shadowing.
15734
15735 * fns.c: Fix minor problems prompted by GCC 4.6.0 warnings.
15736 (crypto_hash_function): Now static.
15737 Fix pointer signedness problems. Avoid unnecessary initializations.
15738
15739 2011-05-27 Chong Yidong <cyd@stupidchicken.com>
15740
15741 * termhooks.h (Vselection_alist): Make it terminal-local.
15742
15743 * terminal.c (create_terminal): Initialize it.
15744
15745 * xselect.c: Support for clipboard managers.
15746 (Vselection_alist): Move to termhooks.h as terminal-local var.
15747 (LOCAL_SELECTION): New macro.
15748 (x_atom_to_symbol): Handle x_display_info_for_display fail case.
15749 (symbol_to_x_atom): Remove gratuitous arg.
15750 (x_handle_selection_request, lisp_data_to_selection_data)
15751 (x_get_foreign_selection, Fx_register_dnd_atom): Callers changed.
15752 (x_own_selection, x_get_local_selection, x_convert_selection):
15753 New arg, specifying work frame. Use terminal-local Vselection_alist.
15754 (some_frame_on_display): Delete unused function.
15755 (Fx_own_selection_internal, Fx_get_selection_internal)
15756 (Fx_disown_selection_internal, Fx_selection_owner_p)
15757 (Fx_selection_exists_p): New optional frame arg.
15758 (frame_for_x_selection, Fx_clipboard_manager_save): New functions.
15759 (x_handle_selection_clear): Don't treat other terminals with the
15760 same keyboard specially. Use the terminal-local Vselection_alist.
15761 (x_clear_frame_selections): Use Frun_hook_with_args.
15762
15763 * xterm.c (x_term_init): Intern ATOM and CLIPBOARD_MANAGER atoms.
15764
15765 * xterm.h: Add support for those atoms.
15766
15767 2011-05-26 Chong Yidong <cyd@stupidchicken.com>
15768
15769 * xselect.c: ICCCM-compliant handling of MULTIPLE targets.
15770 (converted_selections, conversion_fail_tag): New global variables.
15771 (x_selection_request_lisp_error): Free the above.
15772 (x_get_local_selection): Remove unnecessary code.
15773 (x_reply_selection_request): Args changed; handle arbitrary array
15774 of converted selections stored in converted_selections.
15775 Separate the XChangeProperty and SelectionNotify steps.
15776 (x_handle_selection_request): Rewrite to handle MULTIPLE target.
15777 (x_convert_selection): New function.
15778 (x_handle_selection_event): Simplify.
15779 (x_get_foreign_selection): Don't ignore incoming requests while
15780 waiting for an answer; this will fail when we implement
15781 SAVE_TARGETS, and seems unnecessary anyway.
15782 (selection_data_to_lisp_data): Recognize ATOM_PAIR type.
15783 (Vx_sent_selection_functions): Doc fix.
15784
15785 2011-05-26 Leo Liu <sdl.web@gmail.com>
15786
15787 * editfns.c (Ftranspose_regions): Allow empty regions. (Bug#8699)
15788
15789 2011-05-25 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
15790
15791 * dispextern.h (struct glyph_row): New member fringe_bitmap_periodic_p.
15792
15793 * dispnew.c (shift_glyph_matrix, scrolling_window): Mark scrolled row
15794 for fringe update if it has periodic bitmap.
15795 (row_equal_p): Also compare left_fringe_offset, right_fringe_offset,
15796 and fringe_bitmap_periodic_p.
15797
15798 * fringe.c (get_fringe_bitmap_data): New function.
15799 (draw_fringe_bitmap_1, update_window_fringes): Use it.
15800 (update_window_fringes): Record periodicity of fringe bitmap in glyph
15801 row. Mark glyph row for fringe update if periodicity changed.
15802
15803 * xdisp.c (try_window_reusing_current_matrix): Don't mark scrolled row
15804 for fringe update unless it has periodic bitmap.
15805
15806 2011-05-25 Kenichi Handa <handa@m17n.org>
15807
15808 * xdisp.c (get_next_display_element): Set correct it->face_id for
15809 a static composition.
15810
15811 2011-05-24 Leo Liu <sdl.web@gmail.com>
15812
15813 * deps.mk (fns.o):
15814 * makefile.w32-in ($(BLD)/fns.$(O)): Include sha1.h.
15815
15816 * fns.c (crypto_hash_function, Fsha1): New function.
15817 (Fmd5): Use crypto_hash_function.
15818 (syms_of_fns): Add Ssha1.
15819
15820 2011-05-22 Paul Eggert <eggert@cs.ucla.edu>
15821
15822 * gnutls.c: Remove unused macros.
15823 (fn_gnutls_transport_set_lowat, fn_gnutls_transport_set_pull_function):
15824 (fn_gnutls_transport_set_push_function) [!WINDOWSNT]:
15825 Remove macros that are defined and never used.
15826 Caught by gcc -Wunused-macros (GCC 4.6.0, Fedora 14).
15827
15828 2011-05-22 Chong Yidong <cyd@stupidchicken.com>
15829
15830 * xselect.c (syms_of_xselect): Remove unused symbol SAVE_TARGETS.
15831 (Fx_get_selection_internal): Minor cleanup.
15832 (Fx_own_selection_internal): Rename arguments for consistency with
15833 select.el.
15834
15835 2011-05-22 Paul Eggert <eggert@cs.ucla.edu>
15836
15837 * xselect.c (QSAVE_TARGETS): New static var, to fix build failure.
15838
15839 2011-05-22 Chong Yidong <cyd@stupidchicken.com>
15840
15841 * xselect.c (syms_of_xselect): Include character.h; use DEFSYM.
15842
15843 2011-05-21 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
15844
15845 * dispnew.c (scrolling_window): Don't exclude the case that the
15846 last enabled row in the desired matrix touches the bottom boundary.
15847
15848 2011-05-21 Glenn Morris <rgm@gnu.org>
15849
15850 * Makefile.in ($(etc)/DOC): Make second command line even shorter.
15851 (SOME_MACHINE_OBJECTS): Replace FONT_OBJ by its maximal expansion,
15852 and add some more files.
15853
15854 2011-05-20 Eli Zaretskii <eliz@gnu.org>
15855
15856 * callproc.c (Fcall_process) [MSDOS]: Fix arguments to
15857 report_file_error introduced by the change from 2011-05-07.
15858
15859 2011-05-20 Paul Eggert <eggert@cs.ucla.edu>
15860
15861 * systime.h (Time): Define only if emacs is defined.
15862 This is to allow ../lib-src/profile.c to be compiled on FreeBSD,
15863 where the include path doesn't have X11/X.h by default. See
15864 <http://lists.gnu.org/archive/html/emacs-devel/2011-05/msg00561.html>.
15865
15866 2011-05-20 Kenichi Handa <handa@m17n.org>
15867
15868 * composite.c (find_automatic_composition): Fix previous change.
15869
15870 2011-05-20 Glenn Morris <rgm@gnu.org>
15871
15872 * lisp.mk: New file, split from Makefile.in.
15873 * Makefile.in (lisp): Move to separate file, inserted by @lisp_frag@.
15874 (shortlisp): Remove.
15875 ($(etc)/DOC): Edit lisp.mk rather than using $shortlisp.
15876
15877 2011-05-19 Glenn Morris <rgm@gnu.org>
15878
15879 * Makefile.in (MSDOS_SUPPORT_REAL, MSDOS_SUPPORT, NS_SUPPORT)
15880 (REAL_MOUSE_SUPPORT, GPM_MOUSE_SUPPORT, MOUSE_SUPPORT, TOOLTIP_SUPPORT)
15881 (BASE_WINDOW_SUPPORT, X_WINDOW_SUPPORT, WINDOW_SUPPORT): Remove.
15882 (lisp): Set the order to that of loadup.el.
15883 (shortlisp): Make it a copy of $lisp.
15884 (SOME_MACHINE_LISP): Remove.
15885 ($(etc)/DOC): Depend just on $lisp, not $SOME_MACHINE_LISP too.
15886 Use just $shortlisp, not $SOME_MACHINE_LISP too.
15887
15888 2011-05-18 Kenichi Handa <handa@m17n.org>
15889
15890 * composite.c (CHAR_COMPOSABLE_P): Add more check for efficiency.
15891 (BACKWARD_CHAR): Wrap the arg STOP by parenthesis.
15892 (find_automatic_composition): Mostly rewrite for efficiency.
15893
15894 2011-05-18 Juanma Barranquero <lekktu@gmail.com>
15895
15896 * makefile.w32-in: Update dependencies.
15897
15898 2011-05-18 Christoph Scholtes <cschol2112@googlemail.com>
15899
15900 * menu.c: Include limits.h (fixes the MS-Windows build broken by
15901 2011-06-18T18:49:19Z!cyd@stupidchicken.com).
15902
15903 2011-05-18 Paul Eggert <eggert@cs.ucla.edu>
15904
15905 Fix some integer overflow issues, such as string length overflow.
15906
15907 * insdel.c (count_size_as_multibyte): Check for string overflow.
15908
15909 * character.c (lisp_string_width): Check for string overflow.
15910 Use EMACS_INT, not int, for string indexes and lengths; in
15911 particular, 2nd arg is now EMACS_INT, not int. Do not crash if
15912 the resulting string length overflows an EMACS_INT; instead,
15913 report a string overflow if no precision given. When checking for
15914 precision exhaustion, use a check that cannot possibly have
15915 integer overflow. (Bug#8675)
15916 * character.h (lisp_string_width): Adjust to new signature.
15917
15918 * alloc.c (string_overflow): New function.
15919 (Fmake_string): Use it. This doesn't change behavior, but saves
15920 a few bytes and will simplify future changes.
15921 * character.c (string_escape_byte8): Likewise.
15922 * lisp.h (string_overflow): New decl.
15923
15924 Fixups, following up to the user-interface timestamp change.
15925 * nsterm.m (last_mouse_movement_time, ns_mouse_position): Use Time
15926 for UI timestamps, instead of unsigned long.
15927 * msdos.c (mouse_get_pos): Likewise.
15928 * w32inevt.c (movement_time, w32_console_mouse_position): Likewise.
15929 * w32gui.h (Time): Define by including "systime.h" rather than by
15930 declaring it ourselves. (Bug#8664)
15931
15932 * dispextern.h (struct image): Don't assume time_t <= unsigned long.
15933 * image.c (clear_image_cache): Likewise.
15934
15935 * term.c (term_mouse_position): Don't assume time_t wraparound.
15936
15937 Be more systematic about user-interface timestamps.
15938 Before, the code sometimes used 'Time', sometimes 'unsigned long',
15939 and sometimes 'EMACS_UINT', to represent these timestamps.
15940 This change causes it to use 'Time' uniformly, as that's what X uses.
15941 This makes the code easier to follow, and makes it easier to catch
15942 integer overflow bugs such as Bug#8664.
15943 * frame.c (Fmouse_position, Fmouse_pixel_position):
15944 Use Time, not unsigned long, for user-interface timestamps.
15945 * keyboard.c (last_event_timestamp, kbd_buffer_get_event): Likewise.
15946 (button_down_time, make_lispy_position, make_lispy_movement): Likewise.
15947 * keyboard.h (last_event_timestamp): Likewise.
15948 * menu.c (Fx_popup_menu) [!HAVE_X_WINDOWS]: Likewise.
15949 * menu.h (xmenu_show): Likewise.
15950 * term.c (term_mouse_position): Likewise.
15951 * termhooks.h (struct input_event.timestamp): Likewise.
15952 (struct terminal.mouse_position_hook): Likewise.
15953 * xmenu.c (create_and_show_popup_menu, xmenu_show): Likewise.
15954 * xterm.c (XTmouse_position, x_scroll_bar_report_motion): Likewise.
15955 * systime.h (Time): New decl. Pull it in from <X11/X.h> if
15956 HAVE_X_WINDOWS, otherwise define it as unsigned long, which is
15957 what it was before.
15958 * menu.h, termhooks.h: Include "systime.h", for Time.
15959
15960 * keyboard.c (make_lispy_event): Fix problem in integer overflow.
15961 Don't assume that the difference between two unsigned long values
15962 can fit into an integer. At this point, we know button_down_time
15963 <= event->timestamp, so the difference must be nonnegative, so
15964 there's no need to cast the result if double-click-time is
15965 nonnegative, as it should be; check that it's nonnegative, just in
15966 case. This bug is triggered when events are more than 2**31 ms
15967 apart (about 25 days). (Bug#8664)
15968
15969 * xselect.c (last_event_timestamp): Remove duplicate decl.
15970 (x_own_selection): Remove needless cast to unsigned long.
15971
15972 * xmenu.c (set_frame_menubar): Use int, not EMACS_UINT, for indexes
15973 that always fit in int. Use a sentinel instead of a counter, to
15974 avoid a temp and to allay GCC's concerns about possible int overflow.
15975 * frame.h (struct frame): Use int for menu_bar_items_used
15976 instead of EMACS_INT, since it always fits in int.
15977
15978 * menu.c (grow_menu_items): Check for int overflow.
15979
15980 * xmenu.c (set_frame_menubar): Don't mishandle vectors with no nils.
15981
15982 * xterm.c: Use EMACS_INT for Emacs modifiers, and int for X modifiers.
15983 Before, the code was not consistent. These values cannot exceed
15984 2**31 - 1 so there's no need to make them unsigned.
15985 (x_x_to_emacs_modifiers): Accept int and return EMACS_INT.
15986 (x_emacs_to_x_modifiers): Accept EMACS_INT and return int.
15987 (x_x_to_emacs_modifiers, x_emacs_to_x_modifiers): Reject non-integers
15988 as modifiers.
15989 * xterm.h (x_x_to_emacs_modifiers): Adjust to signature change.
15990
15991 * lisp.h (XINT) [USE_LISP_UNION_TYPE]: Cast to EMACS_INT.
15992 (XUINT) [USE_LISP_UNION_TYPE]: Cast to EMACS_UINT.
15993 Otherwise, GCC 4.6.0 warns about printf (pI, XINT (...)),
15994 presumably because the widths might not match.
15995
15996 * window.c (size_window): Avoid needless test at loop start.
15997
15998 2011-05-18 Courtney Bane <emacs-bugs-7626@cbane.org> (tiny change)
15999
16000 * term.c (Fresume_tty): Restore hooks before reinitializing (bug#8687).
16001
16002 2011-05-12 Drew Adams <drew.adams@oracle.com>
16003
16004 * textprop.c (Fprevious_single_char_property_change): Doc fix (bug#8655).
16005
16006 2011-05-12 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
16007
16008 * w32term.c (w32_draw_fringe_bitmap): Rename local vars `left' and
16009 `width' to `bar_area_x' and `bar_area_width', respectively.
16010 (x_scroll_run): Take account of fringe background extension.
16011
16012 * xterm.c (x_draw_fringe_bitmap) [USE_TOOLKIT_SCROLL_BARS]:
16013 Rename local vars `left' and `width' to `bar_area_x' and
16014 `bar_area_width', respectively.
16015 (x_scroll_run) [USE_TOOLKIT_SCROLL_BARS]: Take account of fringe
16016 background extension.
16017
16018 2011-05-10 Jim Meyering <meyering@redhat.com>
16019
16020 * xdisp.c (x_intersect_rectangles): Fix typo "the the -> the".
16021
16022 2011-05-10 Juanma Barranquero <lekktu@gmail.com>
16023
16024 * image.c (Finit_image_library): Return t for built-in image types,
16025 like pbm and xbm. (Bug#8640)
16026
16027 2011-05-09 Andreas Schwab <schwab@linux-m68k.org>
16028
16029 * w32menu.c (set_frame_menubar): Fix submenu allocation.
16030
16031 2011-05-07 Eli Zaretskii <eliz@gnu.org>
16032
16033 * w32console.c (Fset_screen_color): Doc fix.
16034 (Fget_screen_color): New function.
16035 (syms_of_ntterm): Defsubr it.
16036
16037 * callproc.c (call_process_cleanup) [MSDOS]: Don't close and
16038 unlink the temporary file if Fcall_process didn't create it in the
16039 first place.
16040 (Fcall_process) [MSDOS]: Don't create tempfile if stdout of the
16041 child process will be redirected to a file specified with `:file'.
16042 Don't try to re-open tempfile in that case, and set fd[0] to -1 as
16043 cue to call_process_cleanup not to close that handle.
16044
16045 2011-05-07 Ben Key <bkey76@gmail.com>
16046
16047 * makefile.w32-in: The bootstrap-temacs rule now makes use of
16048 one of two shell specific rules, either bootstrap-temacs-CMD or
16049 bootstrap-temacs-SH. The bootstrap-temacs-SH rule is identical
16050 to the previous implementation of the bootstrap-temacs rule.
16051 The bootstrap-temacs-CMD rule is similar to the previous
16052 implementation of the bootstrap-temacs rule except that it
16053 makes use of the ESC_CFLAGS variable instead of the CFLAGS
16054 variable.
16055
16056 These changes, along with some changes to nt/configure.bat,
16057 nt/gmake.defs, and nt/nmake.defs, are required to extend my
16058 earlier fix to add support for --cflags and --ldflags options
16059 that include quotes so that it works whether make uses cmd or
16060 sh as the shell.
16061
16062 2011-05-06 Michael Albinus <michael.albinus@gmx.de>
16063
16064 * dbusbind.c (QCdbus_type_unix_fd): Declare static.
16065 (xd_remove_watch): Don't check QCdbus_type_unix_fd for SYMBOLP, it
16066 is a constant.
16067 (Fdbus_init_bus, xd_read_queued_messages): Bus can be a symbol or
16068 a string. Handle both cases.
16069 (Fdbus_call_method_asynchronously, Fdbus_register_signal)
16070 (Fdbus_register_method): Use Qinvalid_function.
16071
16072 2011-05-06 Juanma Barranquero <lekktu@gmail.com>
16073
16074 * makefile.w32-in: Update dependencies.
16075 (LISP_H): Add inttypes.h and stdin.h.
16076 (PROCESS_H): Add unistd.h.
16077
16078 2011-05-06 Eli Zaretskii <eliz@gnu.org>
16079
16080 * lread.c: Include limits.h (fixes the MS-Windows build broken by
16081 2011-05-06T07:13:19Z!eggert@cs.ucla.edu).
16082
16083 2011-05-06 Paul Eggert <eggert@cs.ucla.edu>
16084
16085 * image.c (Finit_image_library) [!HAVE_NTGUI]: Omit unused local.
16086
16087 * term.c (vfatal): Remove stray call to va_end.
16088 It's not needed and the C Standard doesn't allow it here anyway.
16089
16090 Use C99's va_copy to avoid undefined behavior on x86-64 GNU/Linux.
16091 * eval.c (verror): doprnt a copy of ap, not the original. (Bug#8545)
16092
16093 * eval.c (verror): OK to create a string of up to MOST_POSITIVE_FIXNUM
16094 bytes.
16095
16096 * term.c: Don't include <stdarg.h>, as <lisp.h> does that.
16097
16098 * callproc.c (Fcall_process): Use 'volatile' to avoid vfork clobbering.
16099
16100 * process.c (Fformat_network_address): Fix typo: args2 -> *args2.
16101
16102 * xmenu.c (set_frame_menubar): Fix typo: int * -> int (3 times).
16103
16104 * coding.c (detect_coding_charset): Fix typo: * 2 -> *4 (Bug#8601).
16105
16106 * charset.h (struct charset.code_space): Now has 15 elements, not 16.
16107 * charset.c (Fdefine_charset_internal): Don't initialize
16108 charset.code_space[15]. The value was garbage, on hosts with
16109 32-bit int (Bug#8600).
16110
16111 * lread.c (read_integer): Be more consistent with string-to-number.
16112 Use string_to_number to do the actual conversion; this avoids
16113 rounding errors and fixes some other screwups. Without this fix,
16114 for example, #x1fffffffffffffff was misread as -2305843009213693952.
16115 (digit_to_number): Move earlier, for benefit of read_integer.
16116 Return -1 if the digit is out of range for the base, -2 if it is
16117 not a digit in any supported base. (Bug#8602)
16118
16119 * doprnt.c (doprnt): Support arbitrary pI values, such as "I64".
16120
16121 * dispnew.c (scrolling_window): Return 1 if we scrolled,
16122 to match comment at start of function. This also removes a
16123 GCC warning about overflow in a 32+64-bit port.
16124
16125 * lisp.h (EMACS_INT, EMACS_UINT, BITS_PER_EMACS_INT, pI): Simplify.
16126
16127 * dbusbind.c: Do not use XPNTR on a value that may be an integer.
16128 Reported by Stefan Monnier in
16129 <http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00919.html>.
16130 (xd_remove_watch, Fdbus_init_bus, xd_read_queued_messages):
16131 Use SYMBOLP-guarded XSYMBOL, not XPNTR.
16132
16133 * lisp.h (EMACS_INTPTR): Remove. All uses changed to intptr_t.
16134 (EMACS_UINTPTR): Likewise, with uintptr_t.
16135
16136 * lisp.h: Prefer 64-bit EMACS_INT if available.
16137 (EMACS_INT, EMACS_UINT, BITS_PER_EMACS_INT, pI): Define to 64-bit
16138 on 32-bit hosts that have 64-bit int, so that they can access
16139 large files.
16140 However, temporarily disable this change unless the temporary
16141 symbol WIDE_EMACS_INT is defined.
16142
16143 * lread.c, process.c: Do not include <inttypes.h>; lisp.h does it now.
16144
16145 Prefer intptr_t/uintptr_t for integers the same widths as pointers.
16146 This removes an assumption that EMACS_INT and long are the same
16147 width as pointers. The assumption is true for Emacs porting targets
16148 now, but we want to make other targets possible.
16149 * lisp.h: Include <inttypes.h>, for INTPTR_MAX, UINTPTR_MAX.
16150 (EMACS_INTPTR, EMACS_UINTPTR): New macros.
16151 In the rest of the code, change types of integers that hold casted
16152 pointers to EMACS_INTPTR and EMACS_UINTPTR, systematically
16153 replacing EMACS_INT, long, EMACS_UINT, and unsigned long.
16154 (XTYPE): Don't cast arg to EMACS_UINT; normally is not needed.
16155 (XSET): Cast type of XTYPE arg to EMACS_INTPTR; it is needed here.
16156 No need to cast type when ORing.
16157 (XPNTR): Return a value of type EMACS_INTPTR or EMACS_UINTPTR.
16158 * alloc.c (lisp_align_malloc): Remove a no-longer-needed cast.
16159 * doc.c (store_function_docstring): Use EMACS_INTPTR, so as not to
16160 assume EMACS_INT is the same width as char *.
16161 * gtkutil.c (xg_gtk_scroll_destroy, xg_tool_bar_button_cb):
16162 (xg_tool_bar_callback, xg_tool_bar_help_callback, xg_make_tool_item):
16163 Remove no-longer-needed casts.
16164 (xg_create_scroll_bar, xg_tool_bar_button_cb, xg_tool_bar_callback):
16165 (xg_tool_bar_help_callback, xg_make_tool_item):
16166 Use EMACS_INTPTR to hold an integer
16167 that will be cast to void *; this can avoid a GCC warning
16168 if EMACS_INT is not the same width as void *.
16169 * menu.c (find_and_call_menu_selection): Remove no-longer-needed cast.
16170 * xdisp.c (display_echo_area_1, resize_mini_window_1):
16171 (current_message_1, set_message_1):
16172 Use a local to convert to proper width without a cast.
16173 * xmenu.c (dialog_selection_callback): Likewise.
16174
16175 * sysdep.c (get_random): Don't assume EMACS_INT is no wider than long.
16176 Also, don't assume VALBITS / RAND_BITS is less than 5,
16177 and don't rely on undefined behavior when shifting a 1 left into
16178 the sign bit.
16179 * lisp.h (get_random): Change signature to match.
16180
16181 * lread.c (hash_string): Use size_t, not int, for hash computation.
16182 Normally we prefer signed values; but hashing is special, because
16183 it's better to use unsigned division on hash table sizes so that
16184 the remainder is nonnegative. Also, size_t is the natural width
16185 for hashing into memory. The previous code used 'int', which doesn't
16186 retain enough info to hash well into very large tables.
16187 (oblookup, oblookup_last_bucket_number, Funintern): Likewise.
16188
16189 * dbusbind.c: Don't possibly lose pointer info when converting.
16190 (xd_remove_watch, Fdbus_init_bus, xd_read_queued_messages):
16191 Use XPNTR rather than XHASH, so that the high-order bits of
16192 the pointer aren't lost when converting through void *.
16193
16194 * eval.c (Fautoload): Don't double-shift a pointer.
16195
16196 * fns.c (Frandom): Let EMACS_UINT be wider than unsigned long.
16197
16198 2011-05-06 Juanma Barranquero <lekktu@gmail.com>
16199
16200 * gnutls.c (DEF_GNUTLS_FN):
16201 * image.c (DEF_IMGLIB_FN): Make function pointers static.
16202
16203 2011-05-05 Andreas Schwab <schwab@linux-m68k.org>
16204
16205 * lread.c (lisp_file_lexically_bound_p): Stop scanning at end
16206 marker. (Bug#8610)
16207
16208 2011-05-05 Eli Zaretskii <eliz@gnu.org>
16209
16210 * w32heap.c (allocate_heap) [USE_LISP_UNION_TYPE || USE_LSB_TAG]:
16211 New version that can reserve upto 2GB of heap space.
16212
16213 2011-05-05 Chong Yidong <cyd@stupidchicken.com>
16214
16215 * nsfns.m (Fns_read_file_name): Doc fix (Bug#8534).
16216
16217 2011-05-05 Teodor Zlatanov <tzz@lifelogs.com>
16218
16219 * gnutls.c (fn_gnutls_certificate_set_x509_key_file): Add alias to
16220 `gnutls_certificate_set_x509_key_file'.
16221
16222 2011-05-05 Juanma Barranquero <lekktu@gmail.com>
16223
16224 * makefile.w32-in ($(BLD)/image.$(O), $(BLD)/process.$(O)):
16225 Update dependencies.
16226
16227 2011-05-04 Juanma Barranquero <lekktu@gmail.com>
16228
16229 * gnutls.h (emacs_gnutls_write, emacs_gnutls_read):
16230 * gnutls.c (emacs_gnutls_write, emacs_gnutls_read):
16231 Remove unused parameter `fildes'.
16232 * process.c (read_process_output, send_process): Don't pass it.
16233
16234 2011-05-04 Juanma Barranquero <lekktu@gmail.com>
16235
16236 Fix previous change: the library cache is defined in w32.c.
16237 * image.c (CACHE_IMAGE_TYPE) [!HAVE_NTGUI]: Define to noop.
16238 (Finit_image_library): Wrap Vlibrary_cache on "#ifdef HAVE_NTGUI".
16239
16240 2011-05-04 Juanma Barranquero <lekktu@gmail.com>
16241
16242 Implement dynamic loading of GnuTLS on Windows.
16243
16244 * gnutls.h (GNUTLS_EMACS_ERROR_NOT_LOADED): New macro.
16245 (emacs_gnutls_write, emacs_gnutls_read): Mark as extern.
16246 (emacs_gnutls_record_check_pending, emacs_gnutls_transport_set_errno):
16247 Declare.
16248
16249 * gnutls.c (Qgnutls_dll): Define.
16250 (DEF_GNUTLS_FN, LOAD_GNUTLS_FN): New macros.
16251 (gnutls_*): Declare function pointers.
16252 (init_gnutls_functions): New function to initialize function pointers.
16253 (emacs_gnutls_handshake, Fgnutls_error_string, Fgnutls_deinit)
16254 (emacs_gnutls_global_init, Fgnutls_bye): Use function pointers.
16255 (emacs_gnutls_record_check_pending, emacs_gnutls_transport_set_errno):
16256 Wrappers for gnutls_record_check_pending and gnutls_transport_set_errno.
16257 (emacs_gnutls_write, emacs_gnutls_read)
16258 (emacs_gnutls_handle_error, Fgnutls_error_fatalp)
16259 (Fgnutls_available_p): New function.
16260 (Fgnutls_boot): Call Fgnutls_available_p. Use function pointers.
16261 (syms_of_gnutls) <Qgnutls_dll>: Initialize and staticpro it.
16262 (syms_of_gnutls) <Sgnutls_available_p>: defsubr it.
16263
16264 * image.c: Include w32.h.
16265 (Vimage_type_cache): Delete.
16266 (syms_of_image) <Vimage_type_cache>: Don't initialize and staticpro it.
16267 (CACHE_IMAGE_TYPE, Finit_image_library): Use Vlibrary_cache instead.
16268 (w32_delayed_load): Move to w32.c.
16269
16270 * w32.h (VlibraryCache, QCloaded_from, w32_delayed_load): Declare.
16271
16272 * w32.c (QCloaded_from, Vlibrary_cache): Define.
16273 (w32_delayed_load): Move from image.c. When loading a library, record
16274 its filename in the :loaded-from property of the library id.
16275 (globals_of_w32) <QCloaded_from, Vlibrary_cache>:
16276 Initialize and staticpro them.
16277 (emacs_gnutls_pull, emacs_gnutls_push): Call emacs_gnutls_* functions.
16278
16279 * process.c: Include lisp.h before w32.h, not after.
16280 (wait_reading_process_output): Call emacs_gnutls_record_check_pending
16281 instead of gnutls_record_check_pending.
16282
16283 * callproc.c, emacs.c: Include lisp.h before w32.h, not after.
16284
16285 2011-05-04 Teodor Zlatanov <tzz@lifelogs.com>
16286
16287 * gnutls.c (Fgnutls_boot): Support :keylist and :crlfiles options
16288 instead of :keyfiles. Give GnuTLS the keylist and the CRL lists
16289 as passed in.
16290
16291 2011-05-03 Jan Djärv <jan.h.d@swipnet.se>
16292
16293 * xterm.c (x_set_frame_alpha): Do not set property on anything
16294 else than FRAME_X_OUTER_WINDOW (Bug#8608).
16295
16296 2011-05-02 Juanma Barranquero <lekktu@gmail.com>
16297
16298 * sysdep.c (get_tty_size) [WINDOWSNT]: Implement. (Bug#8596)
16299
16300 2011-05-02 Juanma Barranquero <lekktu@gmail.com>
16301
16302 * gnutls.c (Qgnutls_log_level, Qgnutls_code, Qgnutls_anon)
16303 (Qgnutls_x509pki, Qgnutls_e_interrupted, Qgnutls_e_again)
16304 (Qgnutls_e_invalid_session, Qgnutls_e_not_ready_for_handshake)
16305 (gnutls_global_initialized, Qgnutls_bootprop_priority)
16306 (Qgnutls_bootprop_trustfiles, Qgnutls_bootprop_keyfiles)
16307 (Qgnutls_bootprop_callbacks, Qgnutls_bootprop_loglevel)
16308 (Qgnutls_bootprop_hostname, Qgnutls_bootprop_verify_flags)
16309 (Qgnutls_bootprop_verify_error, Qgnutls_bootprop_verify_hostname_error)
16310 (Qgnutls_bootprop_callbacks_verify): Make static.
16311
16312 2011-05-01 Andreas Schwab <schwab@linux-m68k.org>
16313
16314 * callproc.c: Indentation fixup.
16315
16316 * sysdep.c (wait_for_termination_1): Make static.
16317 (wait_for_termination, interruptible_wait_for_termination):
16318 Move after wait_for_termination_1.
16319
16320 2011-05-01 Lars Magne Ingebrigtsen <larsi@gnus.org>
16321
16322 * sysdep.c (interruptible_wait_for_termination): New function
16323 which is like wait_for_termination, but allows keyboard
16324 interruptions.
16325
16326 * callproc.c (Fcall_process): Add (:file "file") as an option for
16327 the STDOUT buffer.
16328 (Fcall_process_region): Ditto.
16329
16330 2011-04-30 Eli Zaretskii <eliz@gnu.org>
16331
16332 * dosfns.c (Fint86, Fdos_memget, Fdos_memput): Use `ASIZE (FOO)'
16333 rather than `XVECTOR (FOO)->size'.
16334
16335 * process.c: Remove HAVE_INTTYPES_H condition from inclusion of
16336 inttypes.h, as a gnulib replacement is used if it not available in
16337 system headers.
16338
16339 2011-04-21 Eli Zaretskii <eliz@gnu.org>
16340
16341 Lift the MOST_POSITIVE_FIXNUM/4 limitation on visited files.
16342 * fileio.c (Finsert_file_contents): Don't limit file size to 1/4
16343 of MOST_POSITIVE_FIXNUM. (Bug#8528)
16344
16345 * coding.c (coding_alloc_by_realloc): Error out if destination
16346 will grow beyond MOST_POSITIVE_FIXNUM.
16347 (decode_coding_emacs_mule): Abort if there isn't enough place in
16348 charbuf for the composition carryover bytes. Reserve an extra
16349 space for up to 2 characters produced in a loop.
16350 (decode_coding_iso_2022): Abort if there isn't enough place in
16351 charbuf for the composition carryover bytes.
16352
16353 2011-04-21 Eli Zaretskii <eliz@gnu.org>
16354
16355 * doprnt.c (doprnt) [!HAVE_LONG_LONG_INT]: Error out instead of
16356 aborting when %lld or %lll format is passed.
16357 [!HAVE_UNSIGNED_LONG_LONG_INT]: Error out instead of aborting when
16358 %llo or %llx format is passed. (Bug#8545)
16359
16360 * window.c (window_scroll_line_based): Use a marker instead of
16361 simple variables to record original value of point. (Bug#7952)
16362
16363 * doprnt.c (doprnt): Fix the case where a multibyte sequence
16364 produced by %s or %c overflows available buffer space. (Bug#8545)
16365
16366 2011-04-28 Paul Eggert <eggert@cs.ucla.edu>
16367
16368 * doprnt.c (doprnt): Omit useless test; int overflow check (Bug#8545).
16369 (SIZE_MAX): Move defn after all includes, as they might #define it.
16370
16371 2011-04-28 Juanma Barranquero <lekktu@gmail.com>
16372
16373 * w32.c (init_environment): Warn about defaulting HOME to C:\.
16374
16375 2011-04-28 Juanma Barranquero <lekktu@gmail.com>
16376
16377 * keyboard.c (Qdelayed_warnings_hook): Define.
16378 (command_loop_1): Run `delayed-warnings-hook'
16379 if Vdelayed_warnings_list is non-nil.
16380 (syms_of_keyboard) <delayed-warnings-hook>: DEFSYM it.
16381 (syms_of_keyboard) <delayed-warnings-list>: DEFVAR_LISP it.
16382
16383 2011-04-28 Eli Zaretskii <eliz@gnu.org>
16384
16385 * doprnt.c (doprnt): Don't return value smaller than the buffer
16386 size if the message was truncated. (Bug#8545).
16387
16388 2011-04-28 Juanma Barranquero <lekktu@gmail.com>
16389
16390 * w32fns.c (Fx_change_window_property, Fx_delete_window_property)
16391 (Fx_window_property): #if-0 the whole functions, not just the bodies.
16392
16393 2011-04-27 Paul Eggert <eggert@cs.ucla.edu>
16394
16395 * doprnt.c (doprnt): Support "ll" length modifier, for long long.
16396
16397 2011-04-27 Juanma Barranquero <lekktu@gmail.com>
16398
16399 * makefile.w32-in: Update dependencies.
16400
16401 2011-04-27 Eli Zaretskii <eliz@gnu.org>
16402
16403 Improve `doprnt' and its usage. (Bug#8545)
16404 * doprnt.c (doprnt): Make sure `format' is never accessed beyond
16405 `format_end'. Remove support for %l as a conversion specifier.
16406 Don't use xrealloc. Improve diagnostics when the %l size modifier
16407 is used. Update the commentary.
16408
16409 * eval.c (verror): Simplify calculation of size_t.
16410
16411 * coding.c (Ffind_operation_coding_system): Fix diagnostic error
16412 messages.
16413
16414 2011-04-27 Yoshiaki Kasahara <kasahara@nc.kyushu-u.ac.jp> (tiny change)
16415
16416 * buffer.c (init_buffer) [USE_MMAP_FOR_BUFFERS]: Adjust to aliasing
16417 change.
16418
16419 2011-04-27 Paul Eggert <eggert@cs.ucla.edu>
16420
16421 * nsmenu.m: Replace all uses of XVECTOR with ASIZE and AREF.
16422 This makes this file independent of the recent pseudovector change.
16423
16424 2011-04-26 Paul Eggert <eggert@cs.ucla.edu>
16425
16426 * keyboard.c (handle_user_signal): Fix pointer signedness problem.
16427
16428 * gnutls.c (emacs_gnutls_handle_error): Remove unused local.
16429 (Fgnutls_boot): gnutls_certificate_verify_peers2 wants unsigned *.
16430 Remove unused local.
16431 (emacs_gnutls_write): Don't use uninitialized rtnval if nbyte <= 0.
16432
16433 * lisp.h: Fix a problem with aliasing and vector headers. (Bug#8546)
16434 GCC 4.6.0 optimizes based on type-based alias analysis.
16435 For example, if b is of type struct buffer * and v of type struct
16436 Lisp_Vector *, then gcc -O2 was incorrectly assuming that &b->size
16437 != &v->size, and therefore "v->size = 1; b->size = 2; return
16438 v->size;" must therefore return 1. This assumption is incorrect
16439 for Emacs, since it type-puns struct Lisp_Vector * with many other
16440 types. To fix this problem, this patch adds a new type struct
16441 vectorlike_header that documents the constraints on layout of vectors
16442 and pseudovectors, and helps optimizing compilers not get fooled
16443 by Emacs's type punning. It also adds the macros XSETTYPED_PVECTYPE
16444 XSETTYPED_PSEUDOVECTOR, TYPED_PSEUDOVECTORP, for similar reasons.
16445 * lisp.h (XSETTYPED_PVECTYPE): New macro, specifying the name of
16446 the size member.
16447 (XSETPVECTYPE): Rewrite in terms of new macro.
16448 (XSETPVECTYPESIZE): New macro, specifying both type and size.
16449 This is a bit clearer, and further avoids the possibility of
16450 undesirable aliasing.
16451 (XSETTYPED_PSEUDOVECTOR): New macro, specifying the size.
16452 (XSETPSEUDOVECTOR): Rewrite in terms of XSETTYPED_PSEUDOVECTOR.
16453 (XSETSUBR): Rewrite in terms of XSETTYPED_PSEUDOVECTOR and XSIZE,
16454 since Lisp_Subr is a special case (no "next" field).
16455 (ASIZE): Now uses header.size rather than size.
16456 All previous uses of XVECTOR (foo)->size replaced to use this macro,
16457 to avoid the hassle of writing XVECTOR (foo)->header.size.
16458 (struct vectorlike_header): New type.
16459 (TYPED_PSEUDOVECTORP): New macro, also specifying the C type of the
16460 object, to help avoid aliasing.
16461 (PSEUDOVECTORP): Rewrite in terms of TYPED_PSEUDOVECTORP.
16462 (SUBRP): Likewise, since Lisp_Subr is a special case.
16463 * lisp.h (struct Lisp_Vector, struct Lisp_Char_Table):
16464 (struct Lisp_Sub_Char_Table, struct Lisp_Bool_Vector):
16465 (struct Lisp_Hash_Table): Combine first two members into a single
16466 struct vectorlike_header member. All uses of "size" and "next" members
16467 changed to be "header.size" and "header.next".
16468 * buffer.h (struct buffer): Likewise.
16469 * font.h (struct font_spec, struct font_entity, struct font): Likewise.
16470 * frame.h (struct frame): Likewise.
16471 * process.h (struct Lisp_Process): Likewise.
16472 * termhooks.h (struct terminal): Likewise.
16473 * window.c (struct save_window_data, struct saved_window): Likewise.
16474 * window.h (struct window): Likewise.
16475 * alloc.c (allocate_buffer, Fmake_bool_vector, allocate_pseudovector):
16476 Use XSETPVECTYPESIZE, not XSETPVECTYPE, to avoid aliasing problems.
16477 * buffer.c (init_buffer_once): Likewise.
16478 * lread.c (defsubr): Use XSETTYPED_PVECTYPE, since Lisp_Subr is a
16479 special case.
16480 * process.c (Fformat_network_address): Use local var for size,
16481 for brevity.
16482
16483 * bytecode.c (exec_byte_code): Don't use XVECTOR before CHECK_VECTOR.
16484
16485 Make the Lisp reader and string-to-float more consistent (Bug#8525)
16486 * data.c (atof): Remove decl; no longer used or needed.
16487 (digit_to_number): Move to lread.c.
16488 (Fstring_to_number): Use new string_to_number function, to be
16489 consistent with how the Lisp reader treats infinities and NaNs.
16490 Do not assume that floating-point numbers represent EMACS_INT
16491 without losing information; this is not true on most 64-bit hosts.
16492 Avoid double-rounding errors, by insisting on integers when
16493 parsing non-base-10 numbers, as the documentation specifies.
16494 * lisp.h (string_to_number): New decl, replacing ...
16495 (isfloat_string): Remove.
16496 * lread.c: Include <inttypes.h>, for uintmax_t and strtoumax.
16497 (read1): Do not accept +. and -. as integers; this
16498 appears to have been a coding error. Similarly, do not accept
16499 strings like +-1e0 as floating point numbers. Do not report
16500 overflow for integer overflows unless the base is not 10 which
16501 means we have no simple and reliable way to continue.
16502 Break out the floating-point parsing into a new
16503 function string_to_number, so that Fstring_to_number parses
16504 floating point numbers consistently with the Lisp reader.
16505 (digit_to_number): Move here from data.c. Make it static inline.
16506 (E_CHAR, EXP_INT): Remove, replacing with ...
16507 (E_EXP): New macro, to solve the "1.0e+" problem mentioned below.
16508 (string_to_number): New function, replacing isfloat_string.
16509 This function checks for valid syntax and produces the resulting
16510 Lisp float number too. Rework it so that string-to-number
16511 no longer mishandles examples like "1.0e+". Use strtoumax,
16512 so that overflow for non-base-10 numbers is reported only when
16513 there's no portable and simple way to convert to floating point.
16514
16515 * textprop.c (set_text_properties_1): Rewrite for clarity,
16516 and to avoid GCC warning about integer overflow.
16517
16518 * intervals.h (struct interval): Use EMACS_INT for members
16519 where EMACS_UINT might cause problems. See
16520 <http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00514.html>.
16521 (CHECK_TOTAL_LENGTH): Remove cast to EMACS_INT; no longer needed.
16522 * intervals.c (interval_deletion_adjustment): Now returns EMACS_INT.
16523 All uses changed.
16524 (offset_intervals): Tell GCC not to worry about length overflow
16525 when negating a negative length.
16526
16527 * alloc.c (overrun_check_malloc, overrun_check_realloc): Now static.
16528 (overrun_check_free): Likewise.
16529
16530 * alloc.c (SDATA_SIZE) [!GC_CHECK_STRING_BYTES]: Avoid runtime check
16531 in the common case where SDATA_DATA_OFFSET is a multiple of Emacs
16532 word size.
16533
16534 * gnutls.c: Fix problems found by GCC 4.6.0 on Ubuntu 10.10.
16535 (gnutls_make_error): Rename local to avoid shadowing.
16536 (gnutls_emacs_global_deinit): ifdef out; not used.
16537 (Fgnutls_boot): Use const for pointer to readonly storage.
16538 Comment out unused local. Fix pointer signedness problems.
16539
16540 * lread.c (openp): Don't stuff size_t into an 'int'.
16541 Use <= on length, not < on length + 1, to avoid GCC 4.6.0 warning
16542 about possible signed overflow.
16543
16544 * gtkutil.c: Fix problems found by GCC 4.6.0 on Ubuntu 10.10.
16545 (GDK_KEY_g): Don't define if already defined.
16546 (xg_prepare_tooltip): Avoid pointer signedness problem.
16547 (xg_set_toolkit_scroll_bar_thumb): Redo to avoid two casts.
16548
16549 * process.c (Fnetwork_interface_info): Avoid left-shift undefined
16550 behavior with 1 << 31. GCC 4.6.0 warns about this on 32-bit hosts.
16551
16552 * xfns.c (Fx_window_property): Simplify a bit,
16553 to make a bit faster and to avoid GCC 4.6.0 warning.
16554 * xselect.c (x_get_window_property, x_handle_dnd_message): Likewise.
16555
16556 * fns.c (internal_equal): Don't assume size_t fits in int.
16557
16558 * alloc.c (compact_small_strings): Tighten assertion a little.
16559
16560 Replace pEd with more-general pI, and fix some printf arg casts.
16561 * lisp.h (pI): New macro, generalizing old pEd macro to other
16562 conversion specifiers. For example, use "...%"pI"d..." rather
16563 than "...%"pEd"...".
16564 (pEd): Remove. All uses replaced with similar uses of pI.
16565 * m/amdx86-64.h, m/ia64.h, m/ibms390x.h: Likewise.
16566 * alloc.c (check_pure_size): Don't overflow by converting size to int.
16567 * bidi.c (bidi_dump_cached_states): Use pI to avoid cast.
16568 * data.c (Fnumber_to_string): Use pI instead of if-then-else-abort.
16569 * dbusbind.c (xd_append_arg): Use pI to avoid cast.
16570 (Fdbus_method_return_internal, Fdbus_method_error_internal): Likewise.
16571 * font.c (font_unparse_xlfd): Avoid potential buffer overrun on
16572 64-bit hosts.
16573 (font_unparse_xlfd, font_unparse_fcname): Use pI to avoid casts.
16574 * keyboard.c (record_char, modify_event_symbol): Use pI to avoid casts.
16575 * print.c (safe_debug_print, print_object): Likewise.
16576 (print_object): Don't overflow by converting EMACS_INT or EMACS_UINT
16577 to int.
16578 Use pI instead of if-then-else-abort. Use %p to avoid casts,
16579 avoiding the 0 flag, which is not portable.
16580 * process.c (Fmake_network_process): Use pI to avoid cast.
16581 * region-cache.c (pp_cache): Likewise.
16582 * xdisp.c (decode_mode_spec): Likewise.
16583 * xrdb.c (x_load_resources) [USE_MOTIF]: Use pI to avoid undefined
16584 behavior on 64-bit hosts with printf arg.
16585 * xselect.c (x_queue_event): Use %p to avoid casts, avoiding 0 flag.
16586 (x_stop_queuing_selection_requests): Likewise.
16587 (x_get_window_property): Don't truncate byte count to an 'int'
16588 when tracing.
16589
16590 * frame.c (frame_name_fnn_p): Get rid of strtol, which isn't right
16591 here, since it parses constructs like leading '-' and spaces,
16592 which are not wanted; and it overflows with large numbers.
16593 Instead, simply match F[0-9]+, which is what is wanted anyway.
16594
16595 * alloc.c: Remove unportable assumptions about struct layout.
16596 (SDATA_SELECTOR, SDATA_DATA_OFFSET): New macros.
16597 (SDATA_OF_STRING, SDATA_SIZE, allocate_string_data):
16598 (allocate_vectorlike, make_pure_vector): Use the new macros,
16599 plus offsetof, to remove unportable assumptions about struct layout.
16600 These assumptions hold on all porting targets that I know of, but
16601 they are not guaranteed, they're easy to remove, and removing them
16602 makes further changes easier.
16603
16604 * alloc.c (BLOCK BYTES): Fix typo by changing "ablock" to "ablocks".
16605 This doesn't fix a bug but makes the code clearer.
16606 (string_overrun_cookie): Now const. Use initializers that
16607 don't formally overflow signed char, to avoid warnings.
16608 (allocate_string_data) [GC_CHECK_STRING_OVERRUN]: Fix typo that
16609 can cause Emacs to crash when string overrun checking is enabled.
16610 (allocate_buffer): Don't assume sizeof (struct buffer) is a
16611 multiple of sizeof (EMACS_INT); it need not be, if
16612 alignof(EMACS_INT) < sizeof (EMACS_INT).
16613 (check_sblock, check_string_bytes, check_string_free_list): Protoize.
16614
16615 2011-04-26 Juanma Barranquero <lekktu@gmail.com>
16616
16617 * keyboard.c (QCrtl): Rename from Qrtl. All uses changed.
16618
16619 2011-04-26 Teodor Zlatanov <tzz@lifelogs.com>
16620
16621 * gnutls.c (emacs_gnutls_handshake): Return an error if we're not
16622 supposed to be handshaking. (Bug#8556)
16623 Reported by Paul Eggert <eggert@cs.ucla.edu>.
16624
16625 2011-04-26 Daniel Colascione <dan.colascione@gmail.com>
16626
16627 * lisp.h (Qdebug): List symbol.
16628 * eval.c (Qdebug): Restore global linkage.
16629 * keyboard.c (debug-on-event): New variable.
16630 (handle_user_signal): Break into debugger when debug-on-event
16631 matches the current signal symbol.
16632
16633 2011-04-25 Dan Nicolaescu <dann@ics.uci.edu>
16634
16635 * alloc.c (check_sblock, check_string_bytes)
16636 (check_string_free_list): Convert to standard C.
16637
16638 2011-04-25 Teodor Zlatanov <tzz@lifelogs.com>
16639
16640 * w32.c (emacs_gnutls_push): Fix typo.
16641
16642 2011-04-25 Eli Zaretskii <eliz@gnu.org>
16643
16644 * gnutls.c (emacs_gnutls_handshake): Avoid compiler warnings about
16645 "cast to pointer from integer of different size".
16646
16647 Improve doprnt and its use in verror. (Bug#8545)
16648 * doprnt.c (doprnt): Document the set of format control sequences
16649 supported by the function. Use SAFE_ALLOCA instead of always
16650 using `alloca'.
16651
16652 * eval.c (verror): Don't limit the buffer size at size_max-1, that
16653 is one byte too soon. Don't use xrealloc; instead xfree and
16654 xmalloc anew.
16655
16656 2011-04-24 Teodor Zlatanov <tzz@lifelogs.com>
16657
16658 * gnutls.h: Add GNUTLS_STAGE_CALLBACKS enum to denote we're in the
16659 callbacks stage.
16660
16661 * gnutls.c: Renamed global_initialized to
16662 gnutls_global_initialized. Added internals for the
16663 :verify-hostname-error, :verify-error, and :verify-flags
16664 parameters of `gnutls-boot' and documented those parameters in the
16665 docstring. Start callback support.
16666 (emacs_gnutls_handshake): Add Woe32 support. Retry handshake
16667 unless a fatal error occurred. Call gnutls_alert_send_appropriate
16668 on error. Return error code.
16669 (emacs_gnutls_write): Call emacs_gnutls_handle_error.
16670 (emacs_gnutls_read): Likewise.
16671 (Fgnutls_boot): Return handshake error code.
16672 (emacs_gnutls_handle_error): New function.
16673 (wsaerror_to_errno): Likewise.
16674
16675 * w32.h (emacs_gnutls_pull): Add prototype.
16676 (emacs_gnutls_push): Likewise.
16677
16678 * w32.c (emacs_gnutls_pull): New function for GnuTLS on Woe32.
16679 (emacs_gnutls_push): Likewise.
16680
16681 2011-04-24 Claudio Bley <claudio.bley@gmail.com> (tiny change)
16682
16683 * process.c (wait_reading_process_output): Check if GnuTLS
16684 buffered some data internally if no FDs are set for TLS
16685 connections.
16686
16687 * makefile.w32-in (OBJ2): Add gnutls.$(O).
16688 (LIBS): Link to USER_LIBS.
16689 ($(BLD)/gnutls.$(0)): New target.
16690
16691 2011-04-24 Eli Zaretskii <eliz@gnu.org>
16692
16693 * xdisp.c (handle_single_display_spec): Rename the
16694 display_replaced_before_p argument into display_replaced_p, to
16695 make it consistent with the commentary. Fix typos in the
16696 commentary.
16697
16698 * textprop.c (syms_of_textprop): Remove dead code.
16699 (copy_text_properties): Delete obsolete commentary about an
16700 interface that was deleted long ago. Fix typos in the description
16701 of arguments.
16702
16703 * msdos.c (XMenuActivate, XMenuAddSelection): Adjust argument list
16704 to changes in oldXMenu/XMenu.h from 2011-04-16.
16705 <menu_help_message, prev_menu_help_message>: Constify.
16706 (IT_menu_make_room): menu->help_text is now `const char **';
16707 adjust.
16708
16709 * msdos.h (XMenuActivate, XMenuAddSelection): Adjust prototypes
16710 to changes in oldXMenu/XMenu.h from 2011-04-16.
16711 (struct XMenu): Declare `help_text' `const char **'.
16712
16713 * xfaces.c <Qunspecified>: Make extern again.
16714
16715 * syntax.c: Include sys/types.h before including regex.h, as
16716 required by POSIX.
16717
16718 * doc.c (get_doc_string): Improve the format passed to `error'.
16719
16720 * doprnt.c (doprnt): Improve commentary.
16721
16722 * term.c (init_tty) [MSDOS]: Fix 1st argument to maybe_fatal.
16723
16724 * Makefile.in (TAGS): Depend on $(M_FILE) and $(S_FILE), and scan
16725 them with etags.
16726
16727 * makefile.w32-in (globals.h): Add a dummy recipe, to make any
16728 changes in globals.h immediately force recompilation.
16729 (TAGS): Depend on $(CURDIR)/m/intel386.h and
16730 $(CURDIR)/s/ms-w32.h.
16731 (TAGS-gmake): Scan $(CURDIR)/m/intel386.h and $(CURDIR)/s/ms-w32.h.
16732
16733 * character.c (Fchar_direction): Function deleted.
16734 (syms_of_character): Don't defsubr it.
16735 <char-direction-table>: Deleted.
16736
16737 2011-04-23 Eli Zaretskii <eliz@gnu.org>
16738
16739 Fix doprnt so it could be used again safely in `verror'. (Bug#8435)
16740 * doprnt.c: Include limits.h.
16741 (SIZE_MAX): New macro.
16742 (doprnt): Return a size_t value. 2nd arg is now size_t.
16743 Many local variables are now size_t instead of int or unsigned.
16744 Improve overflow protection. Support `l' modifier for integer
16745 conversions. Support %l conversion. Don't assume an EMACS_INT
16746 argument for integer conversions and for %c.
16747
16748 * lisp.h (doprnt): Restore prototype.
16749
16750 * makefile.w32-in ($(BLD)/callint.$(O)): Depend on
16751 $(SRC)/character.h.
16752
16753 * Makefile.in (base_obj): Add back doprnt.o.
16754
16755 * deps.mk (doprnt.o): Add back prerequisites.
16756 (callint.o): Depend on character.h.
16757
16758 * eval.c (internal_lisp_condition_case): Include the handler
16759 representation in the error message.
16760 (verror): Call doprnt instead of vsnprintf. Fix an off-by-one bug
16761 when breaking from the loop.
16762
16763 * xdisp.c (vmessage): Call doprnt instead of vsnprintf.
16764
16765 * callint.c (Fcall_interactively): When displaying error message
16766 about invalid control letter, pass the character's codepoint, not
16767 a pointer to its multibyte form. Improve display of the character
16768 in octal and display also its hex code.
16769
16770 * character.c (char_string): Use %x to display the (unsigned)
16771 codepoint of an invalid character, to avoid displaying a bogus
16772 negative value.
16773
16774 * font.c (check_otf_features): Pass SDATA of SYMBOL_NAME to
16775 `error', not SYMBOL_NAME itself.
16776
16777 * coding.c (Fencode_sjis_char, Fencode_big5_char): Use %c for
16778 character arguments to `error'.
16779
16780 * charset.c (check_iso_charset_parameter): Fix incorrect argument
16781 to `error' in error message about FINAL_CHAR argument. Make sure
16782 FINAL_CHAR is a character, and use %c when it is passed as
16783 argument to `error'.
16784
16785 2011-04-23 Eli Zaretskii <eliz@gnu.org>
16786
16787 * s/ms-w32.h (localtime): Redirect to sys_localtime.
16788
16789 * w32.c: Include <time.h>.
16790 (sys_localtime): New function.
16791
16792 2011-04-23 Chong Yidong <cyd@stupidchicken.com>
16793
16794 * xdisp.c (init_xdisp): Initialize echo_area_window (Bug#6451).
16795
16796 * buffer.c (syms_of_buffer): Doc fix (Bug#6902).
16797
16798 2011-04-23 Samuel Thibault <sthibault@debian.org> (tiny change)
16799
16800 * sysdep.c (wait_for_termination): On GNU Hurd, kill returns -1 on
16801 zombies (Bug#8467).
16802
16803 2011-04-19 Eli Zaretskii <eliz@gnu.org>
16804
16805 * syntax.h (SETUP_SYNTAX_TABLE_FOR_OBJECT): Fix setting of
16806 gl_state.e_property when gl_state.object is Qt.
16807
16808 * insdel.c (make_gap_larger): Remove limitation of buffer size
16809 to <= INT_MAX.
16810
16811 2011-04-18 Chong Yidong <cyd@stupidchicken.com>
16812
16813 * xdisp.c (lookup_glyphless_char_display)
16814 (produce_glyphless_glyph): Handle cons cell entry in
16815 glyphless-char-display.
16816 (Vglyphless_char_display): Document it.
16817
16818 * term.c (produce_glyphless_glyph): Handle cons cell entry in
16819 glyphless-char-display.
16820
16821 2011-04-17 Chong Yidong <cyd@stupidchicken.com>
16822
16823 * xdisp.c (get_next_display_element): Remove unnecessary ifdefs.
16824
16825 * termhooks.h (FRAME_WINDOW_P): Remove duplicated definitions.
16826
16827 * dispextern.h (FACE_SUITABLE_FOR_ASCII_CHAR_P): Add missing
16828 definition for no-X builds.
16829
16830 2011-04-16 Paul Eggert <eggert@cs.ucla.edu>
16831
16832 Static checks with GCC 4.6.0 and non-default toolkits.
16833
16834 * s/sol2-6.h, s/unixware.h (PTY_TTY_NAME_SPRINTF): Protoize decl.
16835
16836 * process.c (keyboard_bit_set): Define only if SIGIO.
16837 (send_process_trap): Mark it with NO_RETURN if it doesn't return.
16838 (send_process): Repair possible setjmp clobbering.
16839
16840 * s/usg5-4-common.h (SETUP_SLAVE_PTY): Don't pass extra arg to 'fatal'.
16841
16842 * eval.c: Include <stdio.h>, for vsnprintf on non-GNU/Linux hosts.
16843
16844 * data.c (arith_error): Mark with NO_RETURN if it doesn't return.
16845
16846 * alloc.c (bytes_used_when_full, SPARE_MEMORY, BYTES_USED):
16847 Define only if needed.
16848
16849 * sysdep.c (_FILE_OFFSET_BITS): Make this hack even uglier
16850 by pacifying GCC about it. Maybe it's time to retire it?
16851 * xfaces.c (USG, __TIMEVAL__): Likewise.
16852
16853 * dispextern.h (struct redisplay_interface): Rename param
16854 to avoid shadowing.
16855 * termhooks.h (struct terminal): Likewise.
16856 * xterm.c (xembed_send_message): Likewise.
16857
16858 * insdel.c (make_gap_smaller): Define only if
16859 USE_MMAP_FOR_BUFFERS || REL_ALLOC || DOUG_LEA_MALLOC.
16860
16861 * keyboard.c (read_char): Make a var volatile so longjmp won't clobber
16862 it.
16863
16864 * emacs.c (MAX_HEAP_BSS_DIFF, my_edata): Move to where they're used,
16865 so that we aren't warned about unused symbols.
16866
16867 * xfns.c (Fx_file_dialog): Rename local to avoid shadowing.
16868
16869 * xdisp.c (x_produce_glyphs): Mark var as initialized (Bug#8512).
16870
16871 * xfns.c (x_real_positions): Mark locals as initialized.
16872
16873 * xmenu.c (xmenu_show): Don't use uninitialized vars.
16874
16875 * xterm.c: Fix problems found by static analysis with other toolkits.
16876 (toolkit_scroll_bar_interaction): Define and use only if USE_X_TOOLKIT.
16877 (x_dispatch_event): Declare static if USE_GTK, and
16878 define if USE_GTK || USE_X_TOOLKIT.
16879 (SET_SAVED_BUTTON_EVENT): Define only if USE_X_TOOLKIT || USE_GTK.
16880 * xterm.h (x_dispatch_event): Extern only if USE_X_TOOLKIT.
16881 * xterm.c, xterm.h (x_mouse_leave): Bring this function back, but only
16882 if defined HAVE_MENUS && !defined USE_X_TOOLKIT && !defined USE_GTK.
16883
16884 * xmenu.c (menu_help_callback): Pointer type fixes.
16885 Use const pointers when pointing at readonly data. Avoid pointer
16886 signedness clashes.
16887 (FALSE): Remove unused macro.
16888 (update_frame_menubar): Remove unused decl.
16889
16890 * xfns.c (Fx_hide_tip): Move locals to avoid shadowing.
16891
16892 * menu.c (push_submenu_start, push_submenu_end): Do not define unless
16893 USE_X_TOOLKIT || USE_GTK || HAVE_NS || defined HAVE_NTGUI.
16894 (single_menu_item): Rename local to avoid shadowing.
16895
16896 * keyboard.c (make_lispy_event): Remove unused local var.
16897
16898 * frame.c, frame.h (x_get_resource_string): Bring this back, but
16899 only if HAVE_X_WINDOWS && !USE_X_TOOLKIT.
16900
16901 * bitmaps: Change bitmaps from unsigned char back to the X11
16902 compatible char. Avoid the old compiler warnings about
16903 out-of-range initializers by using, for example, '\xab' rather
16904 than 0xab.
16905
16906 * xgselect.c (xgselect_initialize): Check vs interface
16907 even if ! (defined (USE_GTK) || defined (HAVE_GCONF)).
16908
16909 * xmenu.c (xmenu_show): Rename parm to avoid shadowing.
16910
16911 * xterm.c (x_create_toolkit_scroll_bar): Use const * for pointers
16912 to read-only memory.
16913
16914 * fns.c (vector): Remove; this old hack is no longer needed.
16915
16916 * xsmfns.c (create_client_leader_window): Rename shadowing arg.
16917 Remove unused var.
16918 (gdk_x11_set_sm_client_id) [!USE_GTK]: Don't define.
16919
16920 * xrdb.c (x_load_resources): Omit unused local.
16921
16922 * xfns.c (free_frame_menubar, atof): Remove duplicate decls.
16923 (x_window): Rename locals to avoid shadowing.
16924 (USG): Use the kludged USG macro, to pacify gcc.
16925
16926 * xterm.c (x_alloc_nearest_color_for_widget): Remove; unused.
16927 (x_term_init): Remove local to avoid shadowing.
16928
16929 * xfns.c, xterm.c (_XEditResCheckMessages): Protoize decl.
16930
16931 * xdisp.c, dispextern.h (set_vertical_scroll_bar): Now extern if
16932 USE_TOOLKIT_SCROLL_BARS && !USE_GTK, as xterm.c needs it then.
16933
16934 2011-04-16 Eli Zaretskii <eliz@gnu.org>
16935
16936 * gnutls.c (Fgnutls_boot): Don't pass Lisp_Object to `error'.
16937
16938 Fix regex.c, syntax.c and friends for buffers > 2GB.
16939 * syntax.h (struct gl_state_s): Declare character position members
16940 EMACS_INT.
16941
16942 * syntax.c (update_syntax_table): Declare 2nd argument EMACS_INT.
16943
16944 * textprop.c (verify_interval_modification, interval_of):
16945 Declare arguments EMACS_INT.
16946
16947 * intervals.c (adjust_intervals_for_insertion): Declare arguments
16948 EMACS_INT.
16949
16950 * intervals.h (CHECK_TOTAL_LENGTH): Cast to EMACS_INT, not `int'.
16951
16952 * indent.c (Fvertical_motion): Local variable it_start is now
16953 EMACS_INT.
16954
16955 * regex.c (re_match, re_match_2, re_match_2_internal)
16956 (bcmp_translate, regcomp, regexec, print_double_string)
16957 (group_in_compile_stack, re_search, re_search_2, regex_compile)
16958 (re_compile_pattern, re_exec): Declare arguments and local
16959 variables `size_t' and `ssize_t' and return values `regoff_t', as
16960 appropriate.
16961 (POP_FAILURE_REG_OR_COUNT) <pfreg>: Declare `long'.
16962 (CHECK_INFINITE_LOOP) <failure>: Declare `ssize_t'.
16963 <compile_stack_type>: `size' and `avail' are now `size_t'.
16964
16965 * regex.h <regoff_t>: Use ssize_t, not int.
16966 (re_search, re_search_2, re_match, re_match_2): Arguments that
16967 specify buffer/string position and length are now ssize_t and
16968 size_t. Return type is regoff_t.
16969
16970 2011-04-16 Ben Key <bkey76@gmail.com>
16971
16972 * nsfont.m: Fixed bugs in ns_get_family and
16973 ns_descriptor_to_entity that were caused by using free to
16974 deallocate memory blocks that were allocated by xmalloc (via
16975 xstrdup). This caused Emacs to crash when compiled with
16976 XMALLOC_OVERRUN_CHECK defined (when Emacs was configured with
16977 --enable-checking=xmallocoverrun). xfree is now used to
16978 deallocate these memory blocks.
16979
16980 2011-04-15 Paul Eggert <eggert@cs.ucla.edu>
16981
16982 * sysdep.c (emacs_read): Remove unnecessary check vs MAX_RW_COUNT.
16983
16984 emacs_write: Accept and return EMACS_INT for sizes.
16985 See http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00514.html
16986 et seq.
16987 * gnutls.c, gnutls.h (emacs_gnutls_read, emacs_gnutls_write):
16988 Accept and return EMACS_INT.
16989 (emacs_gnutls_write): Return the number of bytes written on
16990 partial writes.
16991 * sysdep.c, lisp.h (emacs_read, emacs_write): Likewise.
16992 (emacs_read, emacs_write): Remove check for negative size, as the
16993 Emacs source code has been audited now.
16994 * sysdep.c (MAX_RW_COUNT): New macro, to work around kernel bugs.
16995 (emacs_read, emacs_write): Use it.
16996 * process.c (send_process): Adjust to the new signatures of
16997 emacs_write and emacs_gnutls_write. Do not attempt to store
16998 a byte offset into an 'int'; it might overflow.
16999 See http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00483.html
17000
17001 * sound.c: Don't assume sizes fit in 'int'.
17002 (struct sound_device.period_size, alsa_period_size):
17003 Return EMACS_INT, not int.
17004 (struct sound_device.write, vox_write, alsa_write):
17005 Accept EMACS_INT, not int.
17006 (wav_play, au_play): Use EMACS_INT to store sizes and to
17007 record read return values.
17008
17009 2011-04-15 Ben Key <bkey76@gmail.com>
17010
17011 * keyboard.c (Qundefined): Don't declare static since it is used
17012 in nsfns.m.
17013 * xfaces.c (Qbold, Qexpanded, Qitalic, Qcondensed): Don't declare
17014 static since they are used in nsfont.m.
17015
17016 2011-04-15 Stefan Monnier <monnier@iro.umontreal.ca>
17017
17018 * process.c (Qprocessp): Don't declare static.
17019 * lisp.h (Qprocessp): Declare again.
17020
17021 2011-04-15 Juanma Barranquero <lekktu@gmail.com>
17022
17023 * font.c (Qopentype): Don't make static (used from w32uniscribe.c).
17024
17025 2011-04-14 Paul Eggert <eggert@cs.ucla.edu>
17026
17027 Improve C-level modularity by making more things 'static'.
17028
17029 Don't publish debugger-only interfaces to other modules.
17030 * lisp.h (safe_debug_print, debug_output_compilation_hack):
17031 (verify_bytepos, count_markers): Move decls to the only modules
17032 that need them.
17033 * region-cache.h (pp_cache): Likewise.
17034 * window.h (check_all_windows): Likewise.
17035 * marker.c, print.c, region-cache.c, window.c: Decls moved here.
17036
17037 * sysdep.c (croak): Now static, if
17038 defined TIOCNOTTY || defined USG5 || defined CYGWIN.
17039 * syssignal.h (croak): Declare only if not static.
17040
17041 * alloc.c (refill_memory_reserve): Now static if
17042 !defined REL_ALLOC || defined SYSTEM_MALLOC.
17043 * lisp.h (refill_memory_reserve): Declare only if not static.
17044
17045 * xsettings.c, xsettings.h (xsettings_get_system_normal_font):
17046 Define only if USE_LUCID.
17047
17048 * xrdb.c (x_customization_string, x_rm_string): Now static.
17049
17050 * xmenu.c (x_menu_wait_for_event): Export only if USE_MOTIF.
17051 * xterm.h (x_menu_wait_for_event): Declare only if USE_MOTIF.
17052
17053 * xdisp.c (draw_row_with_mouse_face): Now static.
17054 * dispextern.h (draw_row_with_mouse_fave): Remove decl.
17055
17056 * window.h (check_all_windows): Mark externally visible.
17057
17058 * window.c (window_deletion_count): Now static.
17059
17060 * undo.c: Make symbols static if they're not exported.
17061 (last_undo_buffer, last_boundary_position, pending_boundary):
17062 Now static.
17063
17064 * textprop.c (interval_insert_behind_hooks): Now static.
17065 (interval_insert_in_front_hooks): Likewise.
17066
17067 * term.c: Make symbols static if they're not exported.
17068 (tty_turn_off_highlight, get_tty_terminal, max_frame_cols):
17069 (max_frame_lines, tty_set_terminal_modes):
17070 (tty_reset_terminal_modes, tty_turn_off_highlight):
17071 (get_tty_terminal): Now static.
17072 (term_mouse_moveto): Do not define if HAVE_WINDOW_SYSTEM.
17073 * termhooks.h (term_mouse_moveto): Do not declare if
17074 HAVE_WINDOW_SYSTEM.
17075 * dispextern.h (tty_set_terminal_modes, tty_reset_terminal_modes):
17076 (tty_turn_off_highlight, get_tty_terminal): Remove decls.
17077
17078 * sysdep.c: Make symbols static if they're not exported.
17079 (emacs_get_tty, emacs_set_tty, old_fcntl_flags, old_fcntl_owner):
17080 Now static.
17081 (sigprocmask_set, full_mask): Remove; unused.
17082 (wait_debugging): Mark as visible.
17083 * syssignal.h (SIGFULLMASK, full_mask): Remove decls.
17084 * systty.h (emacs_get_tty, emacs_set_tty): Remove decls.
17085
17086 * syntax.c (syntax_temp): Define only if !__GNUC__.
17087
17088 * sound.c (current_sound_device, current_sound): Now static.
17089
17090 * search.c (searchbufs, searchbuf_head): Now static.
17091
17092 * scroll.c (scroll_cost): Remove; unused.
17093 * dispextern.h (scroll_cost): Remove decl.
17094
17095 * region-cache.h (pp_cache): Mark as externally visible.
17096
17097 * process.c: Make symbols static if they're not exported.
17098 (process_tick, update_tick, create_process, chan_process):
17099 (Vprocess_alist, proc_buffered_char, datagram_access):
17100 (fd_callback_data, send_process_frame, process_sent_to): Now static.
17101 (deactivate_process): Mark defn as static, as well as decl.
17102 * lisp.h (create_process): Remove decl.
17103 * process.h (chan_process, Vprocess_alist): Remove decls.
17104
17105 * print.c: Make symbols static if they're not exported.
17106 (print_depth, new_backquote_output, being_printed, print_buffer):
17107 (print_buffer_size, print_buffer_pos, print_buffer_pos_byte):
17108 (print_interval, print_number_index, initial_stderr_stream):
17109 Now static.
17110 * lisp.h (Fprinc): Remove decl.
17111 (debug_output_compilation_hack): Mark as externally visible.
17112
17113 * sysdep.c (croak): Move decl from here to syssignal.h.
17114 * syssignal.h (croak): Put it here, so the API can be checked when
17115 'croak' is called from dissociate_if_controlling_tty.
17116
17117 * minibuf.c: Make symbols static if they're not exported.
17118 (minibuf_save_list, choose_minibuf_frame): Now static.
17119 * lisp.h (choose_minibuf_frame): Remove decl.
17120
17121 * lisp.h (verify_bytepos, count_markers): Mark as externally visible.
17122
17123 * lread.c: Make symbols static if they're not exported.
17124 (read_objects, initial_obarray, oblookup_last_bucket_number):
17125 Now static.
17126 (make_symbol): Remove; unused.
17127 * lisp.h (initial_obarray, make_symbol): Remove decls.
17128
17129 * keyboard.c: Make symbols static if they're not exported.
17130 (single_kboard, recent_keys_index, total_keys, recent_keys):
17131 (this_command_key_count_reset, raw_keybuf, raw_keybuf_count):
17132 (this_single_command_key_start, echoing, last_auto_save):
17133 (read_key_sequence_cmd, dribble, recursive_edit_unwind):
17134 (command_loop, echo_now, keyboard_init_hook, help_char_p):
17135 (quit_throw_to_read_char, command_loop_2, top_level_1, poll_timer):
17136 (Vlispy_mouse_stem, double_click_count):
17137 Now static.
17138 (force_auto_save_soon): Define only if SIGDANGER.
17139 (ignore_mouse_drag_p): Now static if
17140 !defined HAVE_WINDOW_SYSTEM || defined USE_GTK || defined HAVE_NS.
17141 (print_help): Remove; unused.
17142 (stop_character, last_timer_event): Mark as externally visible.
17143 * keyboard.h (ignore_mouse_drag_p): Declare only if
17144 defined HAVE_WINDOW_SYSTEM && !defined USE_GTK && !defined HAVE_NS.
17145 (echo_now, help_char_p, quit_throw_to_read_char): Remove decls.
17146 * lisp.h (echoing): Remove decl.
17147 (force_auto_save_soon): Declare only if SIGDANGER.
17148 * xdisp.c (redisplay_window): Simplify code, to make it more
17149 obvious that ignore_mouse_drag_p is not accessed if !defined
17150 USE_GTK && !defined HAVE_NS.
17151
17152 * intervals.c: Make symbols static if they're not exported.
17153 (merge_properties_sticky, merge_interval_right, delete_interval):
17154 Now static.
17155 * intervals.h (merge_interval_right, delete_interval): Remove decls.
17156
17157 * insdel.c: Make symbols static if they're not exported.
17158 However, leave prepare_to_modify_buffer alone. It's never
17159 called from outside this function, but that appears to be a bug.
17160 (combine_after_change_list, combine_after_change_buffer):
17161 (adjust_after_replace, signal_before_change): Now static.
17162 (adjust_after_replace_noundo): Remove; unused.
17163 * lisp.h (adjust_after_replace, adjust_after_replace_noundo):
17164 (signal_before_change): Remove decls.
17165
17166 * indent.c (val_compute_motion, val_vmotion): Now static.
17167
17168 * image.c: Make symbols static if they're not exported.
17169 * dispextern.h (x_create_bitmap_from_xpm_data): Do not declare
17170 if USE_GTK.
17171 * image.c (x_create_bitmap_from_xpm_data): Do not define if USE_GTK.
17172 (xpm_color_cache, ct_table, ct_colors_allocated): Now static.
17173
17174 * fringe.c (standard_bitmaps): Now static.
17175 (max_used_fringe_bitmap): Now static, unless HAVE_NS.
17176
17177 * frame.c: Make symbols static if they're not exported.
17178 (x_report_frame_params, make_terminal_frame): Now static.
17179 (get_frame_param): Now static, unless HAVE_NS.
17180 (x_fullscreen_adjust): Define if WINDOWSNT, not if HAVE_WINDOW_SYSTEM.
17181 (x_get_resource_string): Remove; not used.
17182 * frame.h (make_terminal_frame, x_report_frame_params):
17183 (x_get_resource_string); Remove decls.
17184 (x_fullscreen_adjust): Declare only if WINDOWSNT.
17185 * lisp.h (get_frame_param): Declare only if HAVE_NS.
17186
17187 * font.c, fontset.c: Make symbols static if they're not exported.
17188 * dispextern.h (FACE_SUITABLE_FOR_ASCII_CHAR_P): New macro.
17189 (FACE_SUITABLE_FOR_CHAR_P): Use it.
17190 * font.c (font_close_object): Now static.
17191 * font.h (font_close_object): Remove.
17192 * fontset.c (FONTSET_OBJLIST): Remove.
17193 (free_realized_fontset) #if-0 the body, which does nothing.
17194 (face_suitable_for_char_p): #if-0, as it's never called.
17195 * fontset.h (face_suitable_for_char_p): Remove decl.
17196 * xfaces.c (face_at_string_position):
17197 Use FACE_SUITABLE_FOR_ASCII_CHAR_P, not FACE_SUITABLE_FOR_CHAR_P,
17198 since 0 is always ASCII.
17199
17200 * fns.c (weak_hash_tables): Now static.
17201
17202 * fileio.c: Make symbols static if they're not exported.
17203 (auto_saving, auto_save_mode_bits, auto_save_error_occurred):
17204 (Vwrite_region_annotation_buffers): Now static.
17205
17206 * eval.c: Make symbols static if they're not exported.
17207 (backtrace_list, lisp_eval_depth, when_entered_debugger): Now static.
17208 * lisp.h (backtrace_list): Remove decl.
17209
17210 * emacs.c: Make symbols static if they're not exported.
17211 (malloc_state_ptr, malloc_using_checking, syms_of_emacs):
17212 (fatal_error_code, fatal_error_signal_hook, standard_args):
17213 Now static.
17214 (fatal_error_signal): Now static, unless FLOAT_CATCH_SIGKILL.
17215 (DEFINE_DUMMY_FUNCTION): Mark function as externally visible.
17216 (__CTOR_LIST__, __DTOR_LIST__): Now externally visible.
17217 * lisp.h (fatal_error_signal_hook): Remove decl.
17218 (fatal_error_signal): Declare only if FLOAT_CATCH_SIGKILL.
17219
17220 * editfns.c: Move a (normally-unused) function to its only use.
17221 * editfns.c, lisp.h (get_operating_system_release): Remove.
17222 * process.c (init_process) [DARWIN_OS]: Do it inline, as it is not
17223 worth the hassle of breaking this out.
17224
17225 * xterm.c: Make symbols static if they're not exported.
17226 (x_raise_frame, x_lower_frame, x_wm_set_window_state):
17227 (x_wm_set_icon_pixmap, x_initialize, XTread_socket_fake_io_error):
17228 (x_destroy_window, x_delete_display):
17229 Now static.
17230 (x_dispatch_event): Now static if ! (USE_MOTIF || USE_X_TOOLKIT).
17231 (x_mouse_leave): Remove; unused.
17232 * xterm.h (x_display_info_for_name, x_raise_frame, x_lower_frame):
17233 (x_destroy_window, x_wm_set_window_state, x_wm_set_icon_pixmap):
17234 (x_delete_display, x_initialize, x_set_border_pixel, x_screen_planes):
17235 Remove decls.
17236 (x_mouse_leave): Declare only if WINDOWSNT.
17237 (x_dispatch_event): Declare only if USE_MOTIF or USE_X_TOOLKIT.
17238 (xic_create_fontsetname): Declare only if HAVE_X_WINDOWS &&
17239 USE_X_TOOLKIT.
17240
17241 * ftxfont.c: Make symbols static if they're not exported.
17242 (ftxfont_driver): Export only if !defined HAVE_XFT && def8ined
17243 HAVE_FREETYPE.
17244 * font.h (ftxfont_driver): Likewise.
17245
17246 * xfns.c: Make symbols static if they're not exported.
17247 (x_last_font_name, x_display_info_for_name):
17248 (x_set_foreground_color, x_set_background_color, x_set_mouse_color):
17249 (x_set_cursor_color, x_set_border_pixel, x_set_border_color):
17250 (x_set_cursor_type, x_set_icon_type, x_set_icon_name):
17251 (x_set_scroll_bar_foreground, x_set_scroll_bar_background):
17252 (x_explicitly_set_name, x_set_title, xic_defaut_fontset, tip_timer):
17253 (last_show_tip_args): Now static.
17254 (xic_defaut_fontset, xic_create_fontsetname): Define only if
17255 defined HAVE_X_WINDOWS && defined USE_X_TOOLKIT
17256 (x_screen_planes): Remove; unused.
17257 * dispextern.h (x_screen_planes): Remove decl.
17258
17259 * dispnew.c: Make symbols static if they're not exported.
17260 * dispextern.h (redraw_garbaged_frames, scrolling):
17261 (increment_row_positions): Remove.
17262 * dispnew.c (new_glyph_matrix, increment_row_positions, scrolling):
17263 (delayed_size_change, glyph_matrix_count, glyph_pool_count):
17264 Now static.
17265 (redraw_garbaged_frames): Remove; unused.
17266
17267 * xfaces.c: Make symbols static if they're not exported.
17268 * dispextern.h (ascii_face_of_lisp_face, free_realized_face):
17269 Remove decls.
17270 * xterm.h (defined_color): Remove decls.
17271 (x_free_dpy_colors): Declare only if USE_X_TOOLKIT.
17272 * xfaces.c (tty_suppress_bold_inverse_default_colors_p):
17273 (menu_face_changed_default, defined_color, free_realized_face):
17274 (x_free_dpy_colors): Define only if USE_X_TOOLKIT.
17275 (ascii_face_of_lisp_face): Remove; unused.
17276
17277 * xdisp.c: Make symbols static if they're not exported.
17278 * dispextern.h (scratch_glyph_row, window_box_edges):
17279 (glyph_to_pixel_coords, set_cursor_from_row):
17280 (get_next_display_element, set_iterator_to_next):
17281 (highlight_trailing_whitespace, frame_to_window_pixel_xy):
17282 (show_mouse_face): Remove decls
17283 * frame.h (message_buf_print): Likewise.
17284 * lisp.h (pop_message, set_message, check_point_in_composition):
17285 Likewise.
17286 * xterm.h (set_vertical_scroll_bar): Likewise.
17287 * xdisp.c (list_of_error, Vmessage_stack, line_number_displayed):
17288 (message_buf_print, scratch_glyph_row, displayed_buffer):
17289 (set_iterator_to_next, pop_message, set_message, set_cursor_from_row):
17290 (get_next_display_element, show_mouse_face, window_box_edges):
17291 (frame_to_window_pixel_xy, check_point_in_composition):
17292 (set_vertical_scroll_bar, highlight_trailing_whitespace): Now static.
17293 (glyph_to_pixel_coords): Remove; unused.
17294
17295 * dired.c (file_name_completion): Now static.
17296
17297 * dbusbind.c (xd_in_read_queued_messages): Now static.
17298
17299 * lisp.h (circular_list_error, FOREACH): Remove; unused.
17300 * data.c (circular_list_error): Remove.
17301
17302 * commands.h (last_point_position, last_point_position_buffer):
17303 (last_point_position_window): Remove decls.
17304 * keyboard.c: Make these variables static.
17305
17306 * coding.h (coding, code_convert_region, encode_coding_gap):
17307 Remove decls.
17308 * coding.c (Vsjis_coding_system, Vbig5_coding_system):
17309 (iso_code_class, detect_coding, code_convert_region): Now static.
17310 (encode_coding_gap): Remove; unused.
17311
17312 * chartab.c (chartab_chars, chartab_bits): Now static.
17313
17314 * charset.h (charset_iso_8859_1): Remove decl.
17315 * charset.c (charset_iso_8859_1, charset_emacs, map_charset_for_dump):
17316 Now static.
17317
17318 * ccl.h (check_ccl_update, Vccl_program_table): Remove decls.
17319 * ccl.c (Vccl_program_table): Now static.
17320 (check_ccl_update): Remove; unused.
17321
17322 * category.c (SET_CATEGORY_SET, set_category_set): Move here.
17323 * category.h: ... from here.
17324 * category.c (check_category_table, set_category_set): Now static.
17325
17326 * casetab.c (Vascii_upcase_table, Vascii_eqv_table): Now static.
17327 * lisp.h: Remove these decls.
17328
17329 * buffer.c (buffer_count): Remove unused var.
17330
17331 * bidi.c (bidi_dump_cached_states): Mark as externally visible,
17332 so that it's not optimized away.
17333 (bidi_ignore_explicit_marks_for_paragraph_level): Likewise.
17334 * dispextern.h (bidi_dump_cached_states): Remove, since it's
17335 exported only to the debugger.
17336
17337 * atimer.c (alarm_signal_handler, run_all_atimers): Now static.
17338 * atimer.h (run_all_atimers): Remove; not exported.
17339
17340 font.c: Make copy_font_spec and merge_font_spec ordinary C functions.
17341 * font.c (copy_font_spec): Rename from Fcopy_font_spec, since it
17342 was inaccessible from Lisp.
17343 (merge_font_spec): Likewise, renaming from Fmerge_font_spec.
17344 * font.c, font.h, fontset.c, xfaces.c, xfont.c: Change all uses.
17345
17346 alloc.c: Import and export fewer symbols, and remove unused items.
17347 * lisp.h (suppress_checking, die): Declare only if ENABLE_CHECKING
17348 is defined.
17349 (suppress_checking): Add EXTERNALLY_VISIBLE attribute, so that
17350 it's not optimized away by whole-program optimization.
17351 (message_enable_multibyte, free_misc): Remove.
17352 (catchlist, handlerlist, mark_backtrace):
17353 Declare only if BYTE_MARK_STACK.
17354 (mark_byte_stack): Likewise, fixing a ifdef-vs-if typo.
17355 * alloc.c (pure): Export only if VIRT_ADDR_VARIES is defined.
17356 (message_enable_multibyte): Remove decl.
17357 (free_misc, interval_free_list, float_block, float_block_index):
17358 (n_float_blocks, float_free_list, cons_block, cons_block_index):
17359 (cons_free_list, last_marked_index):
17360 Now static.
17361 (suppress_checking, die): Define only if ENABLE_CHECKING is defined.
17362 * eval.c (catchlist, handlerlist): Export only if BYTE_MARK_STACK.
17363 (mark_backtrace): Define only if BYTE_MARK_STACK.
17364 * xdisp.c (message_enable_multibyte): Now static.
17365
17366 Declare Lisp_Object Q* variables to be 'static' if not exported.
17367 This makes it easier for human readers (and static analyzers)
17368 to see whether these variables are used from other modules.
17369 * alloc.c, buffer.c, bytecode.c, callint.c, casetab.c, category.c:
17370 * ccl.c, character.c, charset.c, cmds.c, coding.c, composite.c:
17371 * data.c, dbusbind.c, dired.c, editfns.c, eval.c, fileio.c, fns.c:
17372 * font.c, frame.c, fringe.c, ftfont.c, image.c, keyboard.c, keymap.c:
17373 * lread.c, macros.c, minibuf.c, print.c, process.c, search.c:
17374 * sound.c, syntax.c, textprop.c, window.c, xdisp.c, xfaces.c, xfns.c:
17375 * xmenu.c, xselect.c:
17376 Declare Q* vars static if they are not used in other modules.
17377 * ccl.h, character.h, charset.h, coding.h, composite.h, font.h:
17378 * frame.h, intervals.h, keyboard.h, lisp.h, process.h, syntax.h:
17379 Remove decls of unexported vars.
17380 * keyboard.h (EVENT_HEAD_UNMODIFIED): Remove now-unused macro.
17381
17382 * lisp.h (DEFINE_FUNC): Make sname 'static'.
17383
17384 Make Emacs functions such as Fatom 'static' by default.
17385 This makes it easier for human readers (and static analyzers)
17386 to see whether these functions can be called from other modules.
17387 DEFUN now defines a static function. To make the function external
17388 so that it can be used in other C modules, use the new macro DEFUE.
17389 * lisp.h (Funibyte_char_to_multibyte, Fsyntax_table_p):
17390 (Finit_image_library):
17391 (Feval_region, Fbacktrace, Ffetch_bytecode, Fswitch_to_buffer):
17392 (Ffile_executable_p, Fmake_symbolic_link, Fcommand_execute):
17393 (Fget_process, Fdocumentation_property, Fbyte_code, Ffile_attributes):
17394 Remove decls, since these functions are now static.
17395 (Funintern, Fget_internal_run_time): New decls, since these functions
17396 were already external.
17397
17398 * alloc.c, buffer.c, callint.c, callproc.c, casefiddle.c, casetab.c:
17399 * ccl.c, character.c, chartab.c, cmds.c, coding.c, data.c, dispnew.c:
17400 * doc.c, editfns.c, emacs.c, eval.c, fileio.c, filelock.c, floatfns.c:
17401 * fns.c, font.c, fontset.c, frame.c, image.c, indent.c:
17402 * keyboard.c, keymap.c, lread.c:
17403 * macros.c, marker.c, menu.c, minibuf.c, print.c, process.c, search.c:
17404 * syntax.c, term.c, terminal.c, textprop.c, undo.c:
17405 * window.c, xdisp.c, xfaces.c, xfns.c, xmenu.c, xsettings.c:
17406 Mark functions with DEFUE instead of DEFUN,
17407 if they are used in other modules.
17408 * buffer.c (Fset_buffer_major_mode, Fdelete_overlay): New forward
17409 decls for now-static functions.
17410 * buffer.h (Fdelete_overlay): Remove decl.
17411 * callproc.c (Fgetenv_internal): Mark as internal.
17412 * composite.c (Fremove_list_of_text_properties): Remove decl.
17413 (Fcomposition_get_gstring): New forward static decl.
17414 * composite.h (Fcomposite_get_gstring): Remove decl.
17415 * dired.c (Ffile_attributes): New forward static decl.
17416 * doc.c (Fdocumntation_property): New forward static decl.
17417 * eval.c (Ffetch_bytecode): New forward static decl.
17418 (Funintern): Remove extern decl; now in .h file where it belongs.
17419 * fileio.c (Fmake_symbolic_link): New forward static decl.
17420 * image.c (Finit_image_library): New forward static decl.
17421 * insdel.c (Fcombine_after_change_execute): Make forward decl static.
17422 * intervals.h (Fprevious_property_change):
17423 (Fremove_list_of_text_properties): Remove decls.
17424 * keyboard.c (Fthis_command_keys): Remove decl.
17425 (Fcommand_execute): New forward static decl.
17426 * keymap.c (Flookup_key): New forward static decl.
17427 (Fcopy_keymap): Now static.
17428 * keymap.h (Flookup_key): Remove decl.
17429 * process.c (Fget_process): New forward static decl.
17430 (Fprocess_datagram_address): Mark as internal.
17431 * syntax.c (Fsyntax_table_p): New forward static decl.
17432 (skip_chars): Remove duplicate decl.
17433 * textprop.c (Fprevious_property_change): New forward static decl.
17434 * window.c (Fset_window_fringes, Fset_window_scroll_bars):
17435 Now internal.
17436 (Fset_window_margins, Fset_window_vscroll): New forward static decls.
17437 * window.h (Fset_window_vscroll, Fset_window_margins): Remove decls.
17438
17439 * editfns.c (Fformat): Remove unreachable code.
17440
17441 2011-04-14 Andreas Schwab <schwab@linux-m68k.org>
17442
17443 * fileio.c (Finsert_file_contents): Fix typo in 2005-05-13
17444 change. (Bug#8496)
17445
17446 2011-04-13 Eli Zaretskii <eliz@gnu.org>
17447
17448 * xdisp.c (handle_invisible_prop): Don't call bidi_paragraph_init
17449 when at ZV. (Bug#8487)
17450
17451 2011-04-12 Andreas Schwab <schwab@linux-m68k.org>
17452
17453 * charset.c (Fclear_charset_maps): Use xfree instead of free.
17454 (Bug#8437)
17455 * keyboard.c (parse_tool_bar_item): Likewise.
17456 * sound.c (sound_cleanup, alsa_close): Likewise.
17457 * termcap.c (tgetent): Likewise.
17458 * xfns.c (x_default_font_parameter): Likewise.
17459 * xsettings.c (read_and_apply_settings): Likewise.
17460
17461 * alloc.c (overrun_check_malloc, overrun_check_realloc)
17462 (overrun_check_free): Protoize.
17463
17464 2011-04-12 Paul Eggert <eggert@cs.ucla.edu>
17465
17466 * sysdep.c (emacs_read, emacs_write): Check for negative sizes
17467 since callers should never pass a negative size.
17468 Change the signature to match that of plain 'read' and 'write'; see
17469 <http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00397.html>.
17470 * lisp.h: Update prototypes of emacs_write and emacs_read.
17471
17472 2011-04-11 Eli Zaretskii <eliz@gnu.org>
17473
17474 * xdisp.c (redisplay_window): Don't try to determine the character
17475 position of the scroll margin if the window start point w->startp
17476 is outside the buffer's accessible region. (Bug#8468)
17477
17478 2011-04-10 Eli Zaretskii <eliz@gnu.org>
17479
17480 Fix write-region and its subroutines for buffers > 2GB.
17481 * fileio.c (a_write, e_write): Modify declaration of arguments and
17482 local variables to support buffers larger than 2GB.
17483 (Fcopy_file): Use EMACS_INT for return value of emacs_read.
17484
17485 * sysdep.c (emacs_write, emacs_read): Use ssize_t for last
17486 argument, local variables, and return value.
17487
17488 * lisp.h: Update prototypes of emacs_write and emacs_read.
17489
17490 * sound.c (vox_write): Use ssize_t for return value of emacs_write.
17491
17492 2011-04-10 Paul Eggert <eggert@cs.ucla.edu>
17493
17494 * xdisp.c (vmessage): Use memchr, not strnlen, which some hosts lack.
17495
17496 Fix more problems found by GCC 4.6.0's static checks.
17497
17498 * xdisp.c (vmessage): Use a better test for character truncation.
17499
17500 * charset.c (load_charset_map): <, not <=, for optimization,
17501 and to avoid potential problems with integer overflow.
17502 * chartab.c (sub_char_table_set_range, char_table_set_range): Likewise.
17503 * casetab.c (set_identity, shuffle): Likewise.
17504 * editfns.c (Fformat): Likewise.
17505 * syntax.c (skip_chars): Likewise.
17506
17507 * xmenu.c (set_frame_menubar): Allocate smaller local vectors.
17508 This also lets GCC 4.6.0 generate slightly better loop code.
17509
17510 * callint.c (Fcall_interactively): <, not <=, for optimization.
17511 (Fcall_interactively): Count the number of arguments produced,
17512 not the number of arguments given. This is simpler and lets GCC
17513 4.6.0 generate slightly better code.
17514
17515 * ftfont.c: Distingish more carefully between FcChar8 and char.
17516 The previous code passed unsigned char * to a functions like
17517 strlen and xstrcasecmp that expect char *, which does not
17518 conform to the C standard.
17519 (get_adstyle_property, ftfont_pattern_entity): Use FcChar8 for
17520 arguments to FcPatternGetString, and explicitly cast FcChar8 * to
17521 char * when the C standard requires it.
17522
17523 * keyboard.c (read_char): Remove unused var.
17524
17525 * eval.c: Port to Windows vsnprintf (Bug#8435).
17526 Include <limits.h>.
17527 (SIZE_MAX): Define if the headers do not.
17528 (verror): Do not give up if vsnprintf returns a negative count.
17529 Instead, grow the buffer. This ports to Windows vsnprintf, which
17530 does not conform to C99. Problem reported by Eli Zaretskii.
17531 Also, simplify the allocation scheme, by avoiding the need for
17532 calling realloc, and removing the ALLOCATED variable.
17533
17534 * eval.c (verror): Initial buffer size is 4000 (not 200) bytes.
17535
17536 Remove invocations of doprnt, as Emacs now uses vsnprintf.
17537 But keep the doprint source code for now, as we might revamp it
17538 and use it again (Bug#8435).
17539 * lisp.h (doprnt): Remove.
17540 * Makefile.in (base_obj): Remove doprnt.o.
17541 * deps.mk (doprnt.o): Remove.
17542
17543 error: Print 32- and 64-bit integers portably (Bug#8435).
17544 Without this change, on typical 64-bit hosts error ("...%d...", N)
17545 was used to print both 32- and 64-bit integers N, which relied on
17546 undefined behavior.
17547 * lisp.h, m/amdx86-64.h, m/ia64.h, m/ibms390x.h (pEd): New macro.
17548 * lisp.h (error, verror): Mark as printf-like functions.
17549 * eval.c (verror): Use vsnprintf, not doprnt, to do the real work.
17550 Report overflow in size calculations when allocating printf buffer.
17551 Do not truncate output string at its first null byte.
17552 * xdisp.c (vmessage): Use vsnprintf, not doprnt, to do the real work.
17553 Truncate the output at a character boundary, since vsnprintf does not
17554 do that.
17555 * charset.c (check_iso_charset_parameter): Convert internal
17556 character to string before calling 'error', since %c now has the
17557 printf meaning.
17558 * coding.c (Fdecode_sjis_char, Fdecode_big5_char): Avoid int
17559 overflow when computing char to be passed to 'error'. Do not
17560 pass Lisp_Object to 'error'; pass the integer instead.
17561 * nsfns.m (Fns_do_applescript): Use int, not long, since it's
17562 formatted with plain %d.
17563
17564 * eval.c (internal_lisp_condition_case): Don't pass spurious arg.
17565
17566 * keyboard.c (access_keymap_keyremap): Print func name, not garbage.
17567
17568 * coding.c (Fdecode_sjis_char): Don't assume CODE fits in int.
17569
17570 * xterm.c (x_catch_errors): Remove duplicate declaration.
17571
17572 * term.c (maybe_fatal): Mark its 3rd arg as a printf format, too.
17573
17574 * xdisp.c, lisp.h (message_nolog): Remove; unused.
17575
17576 2011-04-10 Jim Meyering <meyering@redhat.com>
17577
17578 use ssize_t and size_t for read- and write-like emacs_gnutls_* functions
17579 * gnutls.c (emacs_gnutls_read): Adjust signature to be more read-like:
17580 return ssize_t not "int", and use size_t as the buffer length.
17581 (emacs_gnutls_write): Likewise, and make the buffer pointer "const".
17582 * gnutls.h: Update declarations.
17583 * process.c (read_process_output): Use ssize_t, to match.
17584 (send_process): Likewise.
17585
17586 2011-04-09 Chong Yidong <cyd@stupidchicken.com>
17587
17588 * image.c (Fimagemagick_types): Doc fix, and comment cleanup.
17589
17590 2011-04-09 Chong Yidong <cyd@stupidchicken.com>
17591
17592 * ftfont.c (get_adstyle_property, ftfont_pattern_entity):
17593 Use unsigned char, to match FcChar8 type definition.
17594
17595 * xterm.c (handle_one_xevent):
17596 * xmenu.c (create_and_show_popup_menu):
17597 * xselect.c (x_decline_selection_request)
17598 (x_reply_selection_request): Avoid type-punned deref of X events.
17599
17600 2011-04-09 Eli Zaretskii <eliz@gnu.org>
17601
17602 Fix some uses of `int' instead of EMACS_INT.
17603 * search.c (string_match_1, fast_string_match)
17604 (fast_c_string_match_ignore_case, fast_string_match_ignore_case)
17605 (scan_buffer, find_next_newline_no_quit)
17606 (find_before_next_newline, search_command, Freplace_match)
17607 (Fmatch_data): Make some `int' variables be EMACS_INT.
17608
17609 * xdisp.c (display_count_lines): 3rd argument and return value now
17610 EMACS_INT. All callers changed.
17611 (pint2hrstr): Last argument is now EMACS_INT.
17612
17613 * coding.c (detect_coding_utf_8, detect_coding_emacs_mule)
17614 (detect_coding_iso_2022, detect_coding_sjis, detect_coding_big5)
17615 (detect_coding_ccl, detect_coding_charset, decode_coding_utf_8)
17616 (decode_coding_utf_16, decode_coding_emacs_mule)
17617 (decode_coding_iso_2022, decode_coding_sjis, decode_coding_big5)
17618 (decode_coding_ccl, decode_coding_charset)
17619 <consumed_chars, consumed_chars_base>: Declare EMACS_INT.
17620 (decode_coding_iso_2022, decode_coding_emacs_mule)
17621 (decode_coding_sjis, decode_coding_big5, decode_coding_charset)
17622 <char_offset, last_offset>: Declare EMACS_INT.
17623 (encode_coding_utf_8, encode_coding_utf_16)
17624 (encode_coding_emacs_mule, encode_invocation_designation)
17625 (encode_designation_at_bol, encode_coding_iso_2022)
17626 (encode_coding_sjis, encode_coding_big5, encode_coding_ccl)
17627 (encode_coding_raw_text, encode_coding_charset) <produced_chars>:
17628 Declare EMACS_INT.
17629 (ASSURE_DESTINATION): Declare more_bytes EMACS_INT.
17630 (encode_invocation_designation): Last argument P_NCHARS is now
17631 EMACS_INT.
17632 (decode_eol): Declare pos_byte, pos, and pos_end EMACS_INT.
17633 (produce_chars): from_nchars and to_nchars are now EMACS_INT.
17634
17635 * coding.h (struct coding_system) <head_ascii>: Declare EMACS_INT.
17636 All users changed.
17637
17638 * ccl.c (Fccl_execute_on_string): Declare some variables
17639 EMACS_INT.
17640
17641 2011-04-08 Samuel Thibault <sthibault@debian.org> (tiny change)
17642
17643 * term.c (init_tty): Fix incorrect ifdef placement (Bug#8450).
17644
17645 2011-03-19 Christoph Scholtes <cschol2112@googlemail.com>
17646
17647 * process.c (Fformat_network_address): Doc fix.
17648
17649 2011-04-08 T.V. Raman <tv.raman.tv@gmail.com> (tiny change)
17650
17651 * xml.c (parse_region): Avoid creating spurious whitespace nodes.
17652
17653 2011-04-08 Chong Yidong <cyd@stupidchicken.com>
17654
17655 * keyboard.c (read_char): Call Lisp function help-form-show,
17656 instead of using internal_with_output_to_temp_buffer.
17657 (Qhelp_form_show): New var.
17658 (syms_of_keyboard): Use DEFSYM macro.
17659
17660 * print.c (internal_with_output_to_temp_buffer): Function deleted.
17661
17662 * lisp.h (internal_with_output_to_temp_buffer): Remove prototype.
17663
17664 2011-04-06 Chong Yidong <cyd@stupidchicken.com>
17665
17666 * process.c (Flist_processes): Remove to Lisp.
17667 (list_processes_1): Delete.
17668
17669 2011-04-06 Eli Zaretskii <eliz@gnu.org>
17670
17671 * msdos.c (careadlinkat, careadlinkatcwd): MS-DOS replacements.
17672
17673 * w32.c (careadlinkat, careadlinkatcwd): New always-fail stubs.
17674
17675 2011-04-06 Paul Eggert <eggert@cs.ucla.edu>
17676
17677 Fix more problems found by GCC 4.6.0's static checks.
17678
17679 * xmenu.c (Fx_popup_dialog): Don't assume string is free of formats.
17680
17681 * menu.c (Fx_popup_menu): Don't assume error_name lacks printf formats.
17682
17683 * lisp.h (message, message_nolog, fatal): Mark as printf-like.
17684
17685 * xdisp.c (vmessage): Mark as a printf-like function.
17686
17687 * term.c (vfatal, maybe_fatal): Mark as printf-like functions.
17688
17689 * sound.c (sound_warning): Don't crash if arg contains a printf format.
17690
17691 * image.c (tiff_error_handler, tiff_warning_handler): Mark as
17692 printf-like functions.
17693 (tiff_load): Add casts to remove these marks before passing them
17694 to system-supplied API.
17695
17696 * eval.c (Fsignal): Remove excess argument to 'fatal'.
17697
17698 * coding.c (EMIT_ONE_BYTE, EMIT_TWO_BYTES): Use unsigned, not int.
17699 This avoids several warnings with gcc -Wstrict-overflow.
17700 (DECODE_COMPOSITION_RULE): If the rule is invalid, goto invalid_code
17701 directly, rather than having caller test rule sign. This avoids
17702 some unnecessary tests.
17703 * composite.h (COMPOSITION_ENCODE_RULE_VALID): New macro.
17704 (COMPOSITION_ENCODE_RULE): Arguments now must be valid. This
17705 affects only one use, in DECODE_COMPOSITION_RULE, which is changed.
17706
17707 * xfont.c (xfont_text_extents): Remove var that was set but not used.
17708 (xfont_open): Avoid unnecessary tests.
17709
17710 * composite.c (composition_gstring_put_cache): Use unsigned integer.
17711
17712 * composite.h, composite.c (composition_gstring_put_cache):
17713 Use EMACS_INT, not int, for length.
17714
17715 * composite.h (COMPOSITION_DECODE_REFS): New macro,
17716 breaking out part of COMPOSITION_DECODE_RULE.
17717 (COMPOSITION_DECODE_RULE): Use it.
17718 * composite.c (get_composition_id): Remove unused local vars,
17719 by using the new macro.
17720
17721 * textprop.c (set_text_properties_1): Change while to do-while,
17722 since the condition is always true at first.
17723
17724 * intervals.c (graft_intervals_into_buffer): Mark var as used.
17725 (interval_deletion_adjustment): Return unsigned value.
17726 All uses changed.
17727
17728 * process.c (list_processes_1, create_pty, read_process_output):
17729 (exec_sentinel): Remove vars that were set but not used.
17730 (create_pty): Remove unnecessary "volatile"s.
17731 (Fnetwork_interface_info): Avoid possibility of int overflow.
17732 (read_process_output): Do adaptive read buffering even if carryover.
17733 (read_process_output): Simplify nbytes computation if buffered.
17734
17735 * bytecode.c (exec_byte_code): Rename local to avoid shadowing.
17736
17737 * syntax.c (scan_words): Remove var that was set but not used.
17738 (update_syntax_table): Use unsigned instead of int.
17739
17740 * lread.c (lisp_file_lexically_bound_p): Use ints rather than endptrs.
17741 (lisp_file_lexically_bound_p, read1): Use unsigned instead of int.
17742 (safe_to_load_p): Make the end-of-loop test the inverse of the in-loop.
17743
17744 * print.c (print_error_message): Avoid int overflow.
17745
17746 * font.c (font_list_entities): Redo for clarity,
17747 so that reader need not know FONT_DPI_INDEX + 1 == FONT_SPACING_INDEX.
17748
17749 * font.c (font_find_for_lface, Ffont_get_glyphs): Remove unused vars.
17750 (font_score): Avoid potential overflow in diff calculation.
17751
17752 * fns.c (substring_both): Remove var that is set but not used.
17753 (sxhash): Redo loop for clarity and to avoid wraparound warning.
17754
17755 * eval.c (funcall_lambda): Rename local to avoid shadowing.
17756
17757 * alloc.c (mark_object_loop_halt, mark_object): Use size_t, not int.
17758 Otherwise, GCC 4.6.0 optimizes the loop check away since the check
17759 can always succeed if overflow has undefined behavior.
17760
17761 * search.c (boyer_moore, wordify): Remove vars set but not used.
17762 (wordify): Omit three unnecessary tests.
17763
17764 * indent.c (MULTIBYTE_BYTES_WIDTH): Don't compute wide_column.
17765 All callers changed. This avoids the need for an unused var.
17766
17767 * casefiddle.c (casify_region): Remove var that is set but not used.
17768
17769 * dired.c (file_name_completion): Remove var that is set but not used.
17770
17771 * fileio.c (Finsert_file_contents): Make EOF condition clearer.
17772
17773 * fileio.c (Finsert_file_contents): Avoid signed integer overflow.
17774 (Finsert_file_contents): Remove unnecessary code checking fd.
17775
17776 * minibuf.c (read_minibuf_noninteractive): Use size_t for sizes.
17777 Check for integer overflow on size calculations.
17778
17779 * buffer.c (Fprevious_overlay_change): Remove var that is set
17780 but not used.
17781
17782 * keyboard.c (menu_bar_items, read_char_minibuf_menu_prompt):
17783 Remove vars that are set but not used.
17784 (timer_check_2): Don't assume timer-list and idle-timer-list are lists.
17785 (timer_check_2): Mark vars as initialized.
17786
17787 * gtkutil.c (xg_get_file_with_chooser): Mark var as initialized.
17788
17789 * image.c (lookup_image): Remove var that is set but not used.
17790 (xbm_load): Use parse_p, for gcc -Werror=unused-but-set-variable.
17791
17792 * fontset.c (Finternal_char_font, Ffontset_info): Remove vars
17793 that are set but not used.
17794
17795 * xfns.c (make_invisible_cursor): Don't return garbage
17796 if XCreateBitmapFromData fails (Bug#8410).
17797
17798 * xselect.c (x_get_local_selection, x_handle_property_notify):
17799 Remove vars that are set but not used.
17800
17801 * xfns.c (x_create_tip_frame): Remove var that is set but not used.
17802 (make_invisible_cursor): Initialize a possibly-uninitialized variable.
17803
17804 * xterm.c (x_scroll_bar_to_input_event) [!USE_GTK]:
17805 Remove var that is set but not used.
17806 (scroll_bar_windows_size): Now size_t, not int.
17807 (x_send_scroll_bar_event): Use size_t, not int, for sizes.
17808 Check for overflow.
17809
17810 * xfaces.c (realize_named_face): Remove vars that are set but not used.
17811 (map_tty_color) [!defined MSDOS]: Likewise.
17812
17813 * term.c (tty_write_glyphs): Use size_t; this avoids overflow warning.
17814
17815 * coding.c: Remove vars that are set but not used.
17816 (DECODE_COMPOSITION_RULE): Remove 2nd arg, which is unused.
17817 All callers changed.
17818 (decode_coding_utf_8, decode_coding_utf_16 decode_coding_emacs_mule):
17819 (decode_coding_iso_2022, encode_coding_sjis, encode_coding_big5):
17820 (decode_coding_charset): Remove vars that are set but not used.
17821
17822 * bytecode.c (Fbyte_code) [!defined BYTE_CODE_SAFE]: Remove var
17823 that is set but not used.
17824
17825 * print.c (print_object): Remove var that is set but not used.
17826
17827 Replace 2 copies of readlink code with 1 gnulib version (Bug#8401).
17828 The gnulib version avoids calling malloc in the usual case,
17829 and on 64-bit hosts doesn't have some arbitrary 32-bit limits.
17830 * fileio.c (Ffile_symlink_p): Use emacs_readlink.
17831 * filelock.c (current_lock_owner): Likewise.
17832 * lisp.h (READLINK_BUFSIZE, emacs_readlink): New function.
17833 * sysdep.c: Include allocator.h, careadlinkat.h.
17834 (emacs_no_realloc_allocator): New static constant.
17835 (emacs_readlink): New function.
17836 * deps.mk (sysdep.o): Depend on ../lib/allocator.h and on
17837 ../lib/careadlinkat.h.
17838
17839 2011-04-04 Stefan Monnier <monnier@iro.umontreal.ca>
17840
17841 * keyboard.c (safe_run_hook_funcall): Fix last change (don't stop at the
17842 first non-nil return value).
17843
17844 2011-04-03 Jan Djärv <jan.h.d@swipnet.se>
17845
17846 * nsterm.m (ns_update_auto_hide_menu_bar): Define MAC_OS_X_VERSION_10_6
17847 if not defined (Bug#8403).
17848
17849 2011-04-02 Juanma Barranquero <lekktu@gmail.com>
17850
17851 * xdisp.c (display_count_lines): Remove parameter `start',
17852 unused since 1998-01-01T02:27:27Z!rms@gnu.org. All callers changed.
17853 (get_char_face_and_encoding): Remove parameter `multibyte_p',
17854 unused since 2008-05-14T01:40:23Z!handa@m17n.org. All callers changed.
17855 (fill_stretch_glyph_string): Remove parameters `row' and `area',
17856 unused at least since Kim's GUI unification at 2003-03-16T20:45:46Z!storm@cua.dk
17857 and thereabouts. All callers changed.
17858 (get_per_char_metric): Remove parameter `f', unused since
17859 2008-05-14T01:40:23Z!handa@m17n.org. All callers changed.
17860
17861 2011-04-02 Jim Meyering <meyering@redhat.com>
17862
17863 do not dereference NULL upon failed strdup
17864 * nsfont.m (ns_descriptor_to_entity): Use xstrdup, not strdup.
17865 (ns_get_family): Likewise.
17866
17867 2011-04-02 Juanma Barranquero <lekktu@gmail.com>
17868
17869 * eval.c (unwind_to_catch) [DEBUG_GCPRO]: Remove redundant assignment.
17870
17871 2011-04-02 Jan Djärv <jan.h.d@swipnet.se>
17872
17873 * nsterm.m (ns_update_auto_hide_menu_bar): Only for OSX 10.6 or
17874 later (Bug#8403).
17875
17876 2011-04-01 Stefan Monnier <monnier@iro.umontreal.ca>
17877
17878 Add lexical binding.
17879
17880 * window.c (Ftemp_output_buffer_show): New fun.
17881 (Fsave_window_excursion):
17882 * print.c (Fwith_output_to_temp_buffer): Move to subr.el.
17883
17884 * lread.c (lisp_file_lexically_bound_p): New function.
17885 (Fload): Bind Qlexical_binding.
17886 (readevalloop): Remove `evalfun' arg.
17887 Bind Qinternal_interpreter_environment.
17888 (Feval_buffer): Bind Qlexical_binding.
17889 (defvar_int, defvar_bool, defvar_lisp_nopro, defvar_kboard):
17890 Mark as dynamic.
17891 (syms_of_lread): Declare `lexical-binding'.
17892
17893 * lisp.h (struct Lisp_Symbol): New field `declared_special'.
17894
17895 * keyboard.c (eval_dyn): New fun.
17896 (menu_item_eval_property): Use it.
17897
17898 * image.c (parse_image_spec): Use Ffunctionp.
17899
17900 * fns.c (concat, mapcar1): Accept byte-code-functions.
17901
17902 * eval.c (Fsetq): Handle lexical vars.
17903 (Fdefun, Fdefmacro, Ffunction): Make closures when needed.
17904 (Fdefconst, Fdefvaralias, Fdefvar): Mark as dynamic.
17905 (FletX, Flet): Obey lexical binding.
17906 (Fcommandp): Handle closures.
17907 (Feval): New `lexical' arg.
17908 (eval_sub): New function extracted from Feval. Use it almost
17909 everywhere where Feval was used. Look up vars in lexical env.
17910 Handle closures.
17911 (Ffunctionp): Move from subr.el.
17912 (Ffuncall): Handle closures.
17913 (apply_lambda): Remove `eval_flags'.
17914 (funcall_lambda): Handle closures and new byte-code-functions.
17915 (Fspecial_variable_p): New function.
17916 (syms_of_eval): Initialize the Vinternal_interpreter_environment var,
17917 but without exporting it to Lisp.
17918
17919 * doc.c (Fdocumentation, store_function_docstring):
17920 * data.c (Finteractive_form): Handle closures.
17921
17922 * callint.c (Fcall_interactively): Preserve lexical-binding mode for
17923 interactive spec.
17924
17925 * bytecode.c (Bstack_ref, Bstack_set, Bstack_set2, BdiscardN):
17926 New byte-codes.
17927 (exec_byte_code): New function extracted from Fbyte_code to handle new
17928 calling convention for byte-code-functions. Add new byte-codes.
17929
17930 * buffer.c (defvar_per_buffer): Set new `declared_special' field.
17931
17932 * alloc.c (Fmake_symbol): Init new `declared_special' field.
17933
17934 2011-03-31 Juanma Barranquero <lekktu@gmail.com>
17935
17936 * xdisp.c (redisplay_internal): Fix prototype.
17937
17938 2011-03-31 Eli Zaretskii <eliz@gnu.org>
17939
17940 * xdisp.c (SCROLL_LIMIT): New macro.
17941 (try_scrolling): Use it when setting scroll_limit.
17942 Limit scrolling to 100 screen lines.
17943 (redisplay_window): Even when falling back on "recentering",
17944 position point in the window according to scroll-conservatively,
17945 scroll-margin, and scroll-*-aggressively variables. (Bug#6671)
17946
17947 (try_scrolling): When point is above the window, allow searching
17948 as far as scroll_max, or one screenful, to compute vertical
17949 distance from PT to the scroll margin position. This prevents
17950 try_scrolling from unnecessarily failing when
17951 scroll-conservatively is set to a value slightly larger than the
17952 window height. Clean up the case of PT below the margin at bottom
17953 of window: scroll_max can no longer be INT_MAX. When aggressive
17954 scrolling is in use, don't let point enter the opposite scroll
17955 margin as result of the scroll.
17956 (syms_of_xdisp) <scroll-conservatively>: Document the
17957 threshold of 100 lines for never-recentering scrolling.
17958
17959 2011-03-31 Juanma Barranquero <lekktu@gmail.com>
17960
17961 * dispextern.h (move_it_by_lines):
17962 * xdisp.c (move_it_by_lines): Remove parameter `need_y_p', unused
17963 since 2000-12-29T14:24:09Z!gerd@gnu.org. All callers changed.
17964 (message_log_check_duplicate): Remove parameters `prev_bol' and
17965 `this_bol', unused since 1998-01-01T02:27:27Z!rms@gnu.org. All callers changed.
17966 (redisplay_internal): Remove parameter `preserve_echo_area',
17967 unused since 1999-07-21T21:43:52Z!gerd@gnu.org. All callers changed.
17968
17969 * indent.c (Fvertical_motion):
17970 * window.c (window_scroll_pixel_based, Frecenter):
17971 Don't pass `need_y_p' to `move_it_by_lines'.
17972
17973 2011-03-30 Stefan Monnier <monnier@iro.umontreal.ca>
17974
17975 * eval.c (struct backtrace): Don't cheat with negative numbers, but do
17976 steal a few bits to be more compact.
17977 (interactive_p, Fbacktrace, Fbacktrace_frame, mark_backtrace):
17978 Remove unneeded casts.
17979
17980 * bytecode.c (Fbyte_code): CAR and CDR can GC.
17981
17982 2011-03-30 Zachary Kanfer <zkanfer@gmail.com> (tiny change)
17983
17984 * keyboard.c (Fexecute_extended_command): Do log the "suggest key
17985 binding" message (bug#7967).
17986
17987 2011-03-30 Paul Eggert <eggert@cs.ucla.edu>
17988
17989 Fix more problems found by GCC 4.6.0's static checks.
17990
17991 * unexelf.c (unexec) [! (defined _SYSTYPE_SYSV || defined __sgi)]:
17992 Remove unused local var.
17993
17994 * editfns.c (Fmessage_box): Remove unused local var.
17995
17996 * xdisp.c (try_window_reusing_current_matrix, x_produce_glyphs):
17997 (note_mode_line_or_margin_highlight, note_mouse_highlight):
17998 Omit unused local vars.
17999 * window.c (shrink_windows): Omit unused local var.
18000 * menu.c (digest_single_submenu): Omit unused local var.
18001 * dispnew.c (update_window) [PERIODIC_PREEMPTION_CHECKING]:
18002 Omit unused local var.
18003
18004 * keyboard.c (parse_modifiers_uncached, parse_modifiers):
18005 Don't assume string length fits in int.
18006 (keyremap_step, read_key_sequence): Use size_t for sizes.
18007 (read_key_sequence): Don't check last_real_key_start redundantly.
18008
18009 * callproc.c (Fcall_process, Fcall_process_region): Use SAFE_ALLOCA
18010 instead of alloca (Bug#8344).
18011
18012 * eval.c (Fbacktrace): Don't assume nargs fits in int.
18013 (Fbacktrace_frame): Don't assume nframes fits in int.
18014
18015 * syntax.c (scan_sexps_forward): Avoid pointer wraparound.
18016
18017 * xterm.c (x_make_frame_visible, same_x_server): Redo to avoid overflow
18018 concerns.
18019
18020 * term.c (produce_glyphless_glyph): Remove unnecessary test.
18021
18022 * cm.c (calccost): Turn while-do into do-while, for clarity.
18023
18024 * keyboard.c (syms_of_keyboard): Use the same style as later
18025 in this function when indexing through an array. This also
18026 works around GCC bug 48267.
18027
18028 * image.c (tiff_load): Fix off-by-one image count (Bug#8336).
18029
18030 * xselect.c (x_check_property_data): Return correct size (Bug#8335).
18031
18032 * chartab.c (sub_char_table_ref_and_range): Redo for slight
18033 efficiency gain, and to bypass a gcc -Wstrict-overflow warning.
18034
18035 * keyboard.c, keyboard.h (num_input_events): Now size_t.
18036 This avoids undefined behavior on integer overflow, and is a bit
18037 more convenient anyway since it is compared to a size_t variable.
18038
18039 Variadic C functions now count arguments with size_t, not int.
18040 This avoids an unnecessary limitation on 64-bit machines, which
18041 caused (substring ...) to crash on large vectors (Bug#8344).
18042 * lisp.h (struct Lisp_Subr.function.aMANY): Now takes size_t, not int.
18043 (DEFUN_ARGS_MANY, internal_condition_case_n, safe_call): Likewise.
18044 All variadic functions and their callers changed accordingly.
18045 (struct gcpro.nvars): Now size_t, not int. All uses changed.
18046 * data.c (arith_driver, float_arith_driver): Likewise.
18047 * editfns.c (general_insert_function): Likewise.
18048 * eval.c (struct backtrace.nargs, interactive_p)
18049 (internal_condition_case_n, run_hook_with_args, apply_lambda)
18050 (funcall_lambda, mark_backtrace): Likewise.
18051 * fns.c (concat): Likewise.
18052 * frame.c (x_set_frame_parameters): Likewise.
18053 * fns.c (get_key_arg): Now accepts and returns size_t, and returns
18054 0 if not found, not -1. All callers changed.
18055
18056 * alloc.c (garbage_collect): Don't assume stack size fits in int.
18057 (stack_copy_size): Now size_t, not int.
18058 (stack_copy, stack_copy_size): Define only if MAX_SAVE_STACK > 0.
18059
18060 2011-03-28 Juanma Barranquero <lekktu@gmail.com>
18061
18062 * coding.c (encode_designation_at_bol): Remove parameter `charbuf_end',
18063 unused since 2002-03-01T01:17:24Z!handa@m17n.org and 2008-02-01T16:01:31Z!miles@gnu.org.
18064 All callers changed.
18065
18066 * lisp.h (multibyte_char_to_unibyte):
18067 * character.c (multibyte_char_to_unibyte): Remove parameter `rev_tbl',
18068 unused since 2002-03-01T01:16:34Z!handa@m17n.org and 2008-02-01T16:01:31Z!miles@gnu.org.
18069 * character.h (CHAR_TO_BYTE8):
18070 * cmds.c (internal_self_insert):
18071 * editfns.c (general_insert_function):
18072 * keymap.c (push_key_description):
18073 * search.c (Freplace_match):
18074 * xdisp.c (message_dolog, set_message_1): All callers changed.
18075
18076 2011-03-28 Stefan Monnier <monnier@iro.umontreal.ca>
18077
18078 * keyboard.c (safe_run_hook_funcall): New function.
18079 (safe_run_hooks_1, safe_run_hooks_error, safe_run_hooks): On error,
18080 don't set the hook to nil, but remove the offending function instead.
18081 (Qcommand_hook_internal): Remove, unused.
18082 (syms_of_keyboard): Don't initialize Qcommand_hook_internal nor define
18083 Vcommand_hook_internal.
18084
18085 * eval.c (enum run_hooks_condition): Remove.
18086 (funcall_nil, funcall_not): New functions.
18087 (run_hook_with_args): Call each function through a `funcall' argument.
18088 Remove `cond' argument, now redundant.
18089 (Frun_hooks, Frun_hook_with_args, Frun_hook_with_args_until_success)
18090 (Frun_hook_with_args_until_failure): Adjust accordingly.
18091 (run_hook_wrapped_funcall, Frun_hook_wrapped): New functions.
18092
18093 2011-03-28 Juanma Barranquero <lekktu@gmail.com>
18094
18095 * dispextern.h (string_buffer_position): Remove declaration.
18096
18097 * print.c (strout): Remove parameter `multibyte', unused since
18098 1999-08-21T19:30:21Z!gerd@gnu.org. All callers changed.
18099
18100 * search.c (boyer_moore): Remove parameters `len', `pos' and `lim',
18101 never used since function introduction in 1998-02-08T21:33:56Z!rms@gnu.org.
18102 All callers changed.
18103
18104 * w32.c (_wsa_errlist): Use braces for struct initializers.
18105
18106 * xdisp.c (string_buffer_position_lim): Remove parameter `w',
18107 never used since function introduction in 2001-03-09T18:41:50Z!gerd@gnu.org.
18108 All callers changed.
18109 (string_buffer_position): Likewise. Also, make static (it's never
18110 used outside xdisp.c).
18111 (cursor_row_p): Remove parameter `w', unused since
18112 2000-10-17T16:08:57Z!gerd@gnu.org. All callers changed.
18113 (decode_mode_spec): Remove parameter `precision', introduced during
18114 Gerd Moellmann's rewrite at 1999-07-21T21:43:52Z!gerd@gnu.org, but never used.
18115 All callers changed.
18116
18117 2011-03-27 Jan Djärv <jan.h.d@swipnet.se>
18118
18119 * nsterm.m (syms_of_nsterm): Use doc: for ns-auto-hide-menu-bar.
18120
18121 2011-03-27 Anders Lindgren <andlind@gmail.com>
18122
18123 * nsterm.m (ns_menu_bar_is_hidden): New variable.
18124 (ns_constrain_all_frames, ns_menu_bar_should_be_hidden)
18125 (ns_update_auto_hide_menu_bar): New functions.
18126 (ns_update_begin): Call ns_update_auto_hide_menu_bar.
18127 (applicationDidBecomeActive): Call ns_update_auto_hide_menu_bar and
18128 ns_constrain_all_frames.
18129 (constrainFrameRect): Return at once if ns_menu_bar_should_be_hidden.
18130 (syms_of_nsterm): DEFVAR ns-auto-hide-menu-bar, init to Qnil.
18131
18132 2011-03-27 Jan Djärv <jan.h.d@swipnet.se>
18133
18134 * nsmenu.m (runDialogAt): Remove argument to timer_check.
18135
18136 2011-03-27 Glenn Morris <rgm@gnu.org>
18137
18138 * syssignal.h: Replace RETSIGTYPE with void.
18139 * atimer.c, data.c, dispnew.c, emacs.c, floatfns.c, keyboard.c:
18140 * keyboard.h, lisp.h, process.c, sysdep.c, xterm.c:
18141 Replace SIGTYPE with void everywhere.
18142 * s/usg5-4-common.h (SIGTYPE): Remove definition.
18143 * s/template.h (SIGTYPE): Remove commented out definition.
18144
18145 2011-03-26 Eli Zaretskii <eliz@gnu.org>
18146
18147 * xdisp.c (redisplay_window): Don't check buffer's clip_changed
18148 flag as a prerequisite for invoking try_scrolling. (Bug#6671)
18149
18150 2011-03-26 Juanma Barranquero <lekktu@gmail.com>
18151
18152 * w32.c (read_unc_volume): Use parameter `henum', instead of
18153 global variable `wget_enum_handle'.
18154
18155 * keymap.c (describe_vector): Remove parameters `indices' and
18156 `char_table_depth', unused since 2002-03-01T01:43:26Z!handa@m17n.org.
18157 (describe_map, Fdescribe_vector): Adjust calls to `describe_vector'.
18158
18159 * keyboard.h (timer_check, show_help_echo): Remove unused parameters.
18160
18161 * keyboard.c (timer_check): Remove parameter `do_it_now',
18162 unused since 1996-04-12T06:01:29Z!rms@gnu.org.
18163 (show_help_echo): Remove parameter `ok_to_overwrite_keystroke_echo',
18164 unused since 2008-04-19T19:30:53Z!monnier@iro.umontreal.ca.
18165
18166 * keyboard.c (read_char):
18167 * w32menu.c (w32_menu_display_help):
18168 * xmenu.c (show_help_event, menu_help_callback):
18169 Adjust calls to `show_help_echo'.
18170
18171 * gtkutil.c (xg_maybe_add_timer):
18172 * keyboard.c (readable_events):
18173 * process.c (wait_reading_process_output):
18174 * xmenu.c (x_menu_wait_for_event): Adjust calls to `timer_check'.
18175
18176 * insdel.c (adjust_markers_gap_motion):
18177 Remove; no-op since 1998-01-02T21:29:48Z!rms@gnu.org.
18178 (gap_left, gap_right): Don't call it.
18179
18180 2011-03-25 Chong Yidong <cyd@stupidchicken.com>
18181
18182 * xdisp.c (handle_fontified_prop): Discard changes to clip_changed
18183 incurred during fontification.
18184
18185 2011-03-25 Juanma Barranquero <lekktu@gmail.com>
18186
18187 * buffer.c (defvar_per_buffer): Remove unused parameter `doc'.
18188 (DEFVAR_PER_BUFFER): Don't pass it.
18189
18190 * dispnew.c (row_equal_p, add_row_entry): Remove unused parameter `w'.
18191 (scrolling_window): Don't pass it.
18192
18193 2011-03-25 Juanma Barranquero <lekktu@gmail.com>
18194
18195 * dispextern.h (glyph_matric): Use #if GLYPH_DEBUG, not #ifdef.
18196
18197 * fileio.c (check_executable) [DOS_NT]: Remove unused variables `len'
18198 and `suffix'.
18199 (Fset_file_selinux_context) [HAVE_LIBSELINUX]: Move here declaration
18200 of variables specific to SELinux and computation of `encoded_absname'.
18201
18202 * image.c (XPutPixel): Remove unused variable `height'.
18203
18204 * keyboard.c (make_lispy_event): Remove unused variable `hpos'.
18205
18206 * unexw32.c (get_section_info): Remove unused variable `section'.
18207
18208 * w32.c (stat): Remove unused variables `drive_root' and `devtype'.
18209 (system_process_attributes): Remove unused variable `sess'.
18210 (sys_read): Remove unused variable `err'.
18211
18212 * w32fns.c (top): Wrap variables with #if GLYPH_DEBUG, not #ifdef.
18213 (w32_wnd_proc): Remove unused variable `isdead'.
18214 (unwind_create_frame): Use #if GLYPH_DEBUG, not #ifdef.
18215 (Fx_server_max_request_size): Remove unused variable `dpyinfo'.
18216 (x_create_tip_frame): Remove unused variable `tem'.
18217
18218 * w32inevt.c (w32_console_read_socket):
18219 Remove unused variable `no_events'.
18220
18221 * w32term.c (x_draw_composite_glyph_string_foreground):
18222 Remove unused variable `width'.
18223
18224 2011-03-24 Juanma Barranquero <lekktu@gmail.com>
18225
18226 * w32term.c (x_set_glyph_string_clipping):
18227 Don't pass uninitialized region to CombineRgn.
18228
18229 2011-03-23 Juanma Barranquero <lekktu@gmail.com>
18230
18231 * w32fns.c (x_set_menu_bar_lines): Remove unused variable `olines'.
18232 (w32_wnd_proc): Pass NULL to Windows API, not uninitialized buffer.
18233 (Fx_close_connection): Remove unused variable `i'.
18234
18235 * w32font.c (w32font_draw): Return number of glyphs.
18236 (w32font_open_internal): Remove unused variable `i'.
18237 (w32font_driver): Add missing initializer.
18238
18239 * w32menu.c (utf8to16): Remove unused variable `utf16'.
18240 (fill_in_menu): Remove unused variable `items_added'.
18241
18242 * w32term.c (last_mouse_press_frame): Remove static global variable.
18243 (w32_clip_to_row): Remove unused variable `f'.
18244 (x_delete_terminal): Remove unused variable `i'.
18245
18246 * w32uniscribe.c (uniscribe_shape): Remove unused variable `nclusters'.
18247 (NOTHING): Remove unused static global variable.
18248 (uniscribe_check_otf): Remove unused variable `table'.
18249 (uniscribe_font_driver): Add missing initializers.
18250
18251 2011-03-23 Julien Danjou <julien@danjou.info>
18252
18253 * term.c (Fsuspend_tty, Fresume_tty):
18254 * minibuf.c (read_minibuf, run_exit_minibuf_hook):
18255 * window.c (temp_output_buffer_show):
18256 * insdel.c (signal_before_change):
18257 * frame.c (Fhandle_switch_frame):
18258 * fileio.c (Fdo_auto_save):
18259 * emacs.c (Fkill_emacs):
18260 * editfns.c (save_excursion_restore):
18261 * cmds.c (internal_self_insert):
18262 * callint.c (Fcall_interactively):
18263 * buffer.c (Fkill_all_local_variables):
18264 * keyboard.c (Fcommand_execute, Fsuspend_emacs, safe_run_hooks_1):
18265 Use Frun_hooks.
18266 (command_loop_1): Use Frun_hooks. Call safe_run_hooks
18267 unconditionally since it does the check itself.
18268
18269 2011-03-23 Paul Eggert <eggert@cs.ucla.edu>
18270
18271 Fix more problems found by GCC 4.5.2's static checks.
18272
18273 * coding.c (encode_coding_raw_text): Avoid unnecessary test
18274 the first time through the loop, since we know p0 < p1 then.
18275 This also avoids a gcc -Wstrict-overflow warning.
18276
18277 * lisp.h (SAFE_ALLOCA, SAFE_ALLOCA_LISP): Avoid 'int' overflow
18278 leading to a memory leak, possible in functions like
18279 load_charset_map_from_file that can allocate an unbounded number
18280 of objects (Bug#8318).
18281
18282 * xmenu.c (set_frame_menubar): Use EMACS_UINT, not int, for indexes
18283 that could (at least in theory) be that large.
18284
18285 * xdisp.c (message_log_check_duplicate): Return unsigned long, not int.
18286 This is less likely to overflow, and avoids undefined behavior if
18287 overflow does occur. All callers changed. Use strtoul to scan
18288 for the unsigned long integer.
18289 (pint2hrstr): Simplify and tune code slightly.
18290 This also avoids a (bogus) GCC warning with gcc -Wstrict-overflow.
18291
18292 * scroll.c (do_scrolling): Work around GCC bug 48228.
18293 See <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48228>.
18294
18295 * frame.c (Fmodify_frame_parameters): Simplify loop counter.
18296 This also avoids a warning with gcc -Wstrict-overflow.
18297 (validate_x_resource_name): Simplify count usage.
18298 This also avoids a warning with gcc -Wstrict-overflow.
18299
18300 * fileio.c (Fcopy_file): Report error if fchown or fchmod
18301 fail (Bug#8306).
18302
18303 * emacs.c (Fdaemon_initialized): Do not ignore I/O errors (Bug#8303).
18304
18305 * process.c (Fmake_network_process): Use socklen_t, not int,
18306 where POSIX says socklen_t is required in portable programs.
18307 This fixes a porting bug on hosts like 64-bit HP-UX, where
18308 socklen_t is wider than int (Bug#8277).
18309 (Fmake_network_process, server_accept_connection):
18310 (wait_reading_process_output, read_process_output):
18311 Likewise.
18312
18313 * process.c: Rename or move locals to avoid shadowing.
18314 (list_processes_1, Fmake_network_process):
18315 (read_process_output_error_handler, exec_sentinel_error_handler):
18316 Rename or move locals.
18317 (Fmake_network_process): Define label "retry_connect" only if needed.
18318 (Fnetwork_interface_info): Fix pointer signedness.
18319 (process_send_signal): Add cast to avoid pointer signedness problem.
18320 (FIRST_PROC_DESC, IF_NON_BLOCKING_CONNECT): Remove unused macros.
18321 (create_process): Use 'volatile' to avoid vfork clobbering (Bug#8298).
18322
18323 Make tparam.h and terminfo.c consistent.
18324 * cm.c (tputs, tgoto, BC, UP): Remove extern decls.
18325 Include tparam.h instead, since it declares them.
18326 * cm.h (PC): Remove extern decl; tparam.h now does this.
18327 * deps.mk (cm.o, terminfo.o): Depend on tparam.h.
18328 * terminfo.c: Include tparam.h, to check interfaces.
18329 (tparm): Make 1st arg a const pointer in decl. Put it at top level.
18330 (tparam): Adjust signature to match interface in tparam.h;
18331 this removes some undefined behavior. Check that outstring and len
18332 are zero, which they always are with Emacs.
18333 * tparam.h (PC, BC, UP): New extern decls.
18334
18335 * xftfont.c (xftfont_shape): Now static, and defined only if needed.
18336 (xftfont_open): Rename locals to avoid shadowing.
18337
18338 * ftfont.c (ftfont_resolve_generic_family): Fix pointer signedness.
18339 (ftfont_otf_capability, ftfont_shape): Omit decls if not needed.
18340 (OTF_TAG_SYM): Omit macro if not needed.
18341 (ftfont_list): Remove unused local.
18342 (get_adstyle_property, ftfont_pattern_entity):
18343 (ftfont_lookup_cache, ftfont_open, ftfont_anchor_point):
18344 Rename locals to avoid shadowing.
18345
18346 * xfont.c (xfont_list_family): Mark var as initialized.
18347
18348 * xml.c (make_dom): Now static.
18349
18350 * composite.c (composition_compute_stop_pos): Rename local to
18351 avoid shadowing.
18352 (composition_reseat_it): Remove unused locals.
18353 (find_automatic_composition, composition_adjust_point): Likewise.
18354 (composition_update_it): Mark var as initialized.
18355 (find_automatic_composition): Mark vars as initialized,
18356 with a FIXME (Bug#8290).
18357
18358 character.h: Rename locals to avoid shadowing.
18359 * character.h (PREV_CHAR_BOUNDARY, FETCH_STRING_CHAR_ADVANCE):
18360 (FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE, FETCH_CHAR_ADVANCE):
18361 (FETCH_CHAR_ADVANCE_NO_CHECK, INC_POS, DEC_POS, BUF_INC_POS):
18362 (BUF_DEC_POS): Be more systematic about renaming local temporaries
18363 to avoid shadowing.
18364
18365 * textprop.c (property_change_between_p): Remove; unused.
18366
18367 * intervals.c (interval_start_pos): Now static.
18368
18369 * intervals.h (CHECK_TOTAL_LENGTH): Avoid empty "else".
18370
18371 * atimer.c (start_atimer, append_atimer_lists, set_alarm):
18372 Rename locals to avoid shadowing.
18373
18374 * sound.c (wav_play, au_play, Fplay_sound_internal):
18375 Fix pointer signedness.
18376 (alsa_choose_format): Remove unused local var.
18377 (wav_play): Initialize a variable to 0, to prevent undefined
18378 behavior (Bug#8278).
18379
18380 * region-cache.c (insert_cache_boundary): Redo var to avoid shadowing.
18381
18382 * region-cache.h (pp_cache): New decl, for gcc -Wmissing-prototypes.
18383
18384 * callproc.c (Fcall_process): Use 'volatile' to avoid vfork
18385 clobbering (Bug#8298).
18386 * sysdep.c (sys_subshell): Likewise.
18387 Previously, the sys_subshell 'volatile' was incorrectly IF_LINTted out.
18388
18389 * lisp.h (child_setup): Now NO_RETURN unless DOS_NT.
18390 This should get cleaned up, so that child_setup has the
18391 same signature on all platforms.
18392
18393 * callproc.c (call_process_cleanup): Now static.
18394 (relocate_fd): Rename locals to avoid shadowing.
18395
18396 2011-03-22 Chong Yidong <cyd@stupidchicken.com>
18397
18398 * xterm.c (x_clear_frame): Remove XClearWindow call. This appears
18399 not to be necessary, and produces flickering.
18400
18401 2011-03-20 Glenn Morris <rgm@gnu.org>
18402
18403 * config.in: Remove file.
18404
18405 2011-03-20 Juanma Barranquero <lekktu@gmail.com>
18406
18407 * minibuf.c (Vcompleting_read_function): Don't declare, global variables
18408 are now in src/globals.h.
18409 (syms_of_minibuf): Remove spurious & from previous change.
18410
18411 2011-03-20 Leo Liu <sdl.web@gmail.com>
18412
18413 * minibuf.c (completing-read-function): New variable.
18414 (completing-read-default): Rename from completing-read.
18415 (completing-read): Call completing-read-function.
18416
18417 2011-03-19 Juanma Barranquero <lekktu@gmail.com>
18418
18419 * xfaces.c (Fx_load_color_file):
18420 Read color file from absolute filename (bug#8250).
18421
18422 2011-03-19 Juanma Barranquero <lekktu@gmail.com>
18423
18424 * makefile.w32-in: Update dependencies.
18425
18426 2011-03-17 Eli Zaretskii <eliz@gnu.org>
18427
18428 * makefile.w32-in ($(BLD)/unexw32.$(O)): Depend on $(SRC)/unexec.h.
18429
18430 2011-03-17 Paul Eggert <eggert@cs.ucla.edu>
18431
18432 Fix more problems found by GCC 4.5.2's static checks.
18433
18434 * process.c (make_serial_process_unwind, send_process_trap):
18435 (sigchld_handler): Now static.
18436
18437 * process.c (allocate_pty): Let PTY_ITERATION declare iteration vars.
18438 That way, the code declares only the vars that it needs.
18439 * s/aix4-2.h (PTY_ITERATION): Declare iteration vars.
18440 * s/cygwin.h (PTY_ITERATION): Likewise.
18441 * s/darwin.h (PTY_ITERATION): Likewise.
18442 * s/gnu-linux.h (PTY_ITERATION): Likewise.
18443
18444 * s/irix6-5.h (PTY_OPEN): Declare stb, to loosen coupling.
18445 * process.c (allocate_pty): Don't declare stb unless it's needed.
18446
18447 * bytecode.c (MAYBE_GC): Rewrite so as not to use empty "else".
18448 (CONSTANTLIM): Remove; unused.
18449 (METER_CODE, Bscan_buffer, Bread_char, Bset_mark):
18450 Define only if needed.
18451
18452 * unexelf.c (unexec): Name an expression,
18453 to avoid gcc -Wbad-function-cast warning.
18454 Use a different way to cause a compilation error if anyone uses
18455 n rather than nn, a way that does not involve shadowing.
18456 (ELF_BSS_SECTION_NAME, OLD_PROGRAM_H): Remove; unused.
18457
18458 * deps.mk (unexalpha.o): Remove; unused.
18459
18460 New file unexec.h, the (simple) interface for unexec (Bug#8267).
18461 * unexec.h: New file.
18462 * deps.mk (emacs.o, unexaix.o, unexcw.o, unexcoff.o, unexelf.o):
18463 (unexhp9k800.o, unexmacosx.o, unexsol.o, unexw32.o):
18464 Depend on unexec.h.
18465 * emacs.c [!defined CANNOT_DUMP]: Include unexec.h.
18466 * unexaix.c, unexcoff.c, unexcw.c, unexelf.c, unexhp9k800.c:
18467 * unexmacosx.c, unexsol.c, unexw32.c: Include unexec.h.
18468 Change as necessary to match prototype in unexec.h.
18469
18470 * syntax.c (Fforward_comment, scan_lists): Rename locals to avoid
18471 shadowing.
18472 (back_comment, skip_chars): Mark vars as initialized.
18473
18474 * character.h (FETCH_STRING_CHAR_ADVANCE_NO_CHECK, BUF_INC_POS):
18475 Rename locals to avoid shadowing.
18476
18477 * lread.c (read1): Rewrite so as not to use empty "else".
18478 (Fload, readevalloop, read1): Rename locals to avoid shadowing.
18479
18480 * print.c (Fredirect_debugging_output): Fix pointer signedess.
18481
18482 * lisp.h (debug_output_compilation_hack): Add decl here, to avoid
18483 warning when compiling print.c.
18484
18485 * font.c (font_unparse_fcname): Abort in an "impossible" situation
18486 instead of using an uninitialized var.
18487 (font_sort_entities): Mark var as initialized.
18488
18489 * character.h (FETCH_CHAR_ADVANCE): Rename locals to avoid shadowing.
18490
18491 * font.c (font_unparse_xlfd): Don't mix pointers to variables with
18492 pointers to constants.
18493 (font_parse_fcname): Remove unused vars.
18494 (font_delete_unmatched): Now static.
18495 (font_get_spec): Remove; unused.
18496 (font_style_to_value, font_prop_validate_style, font_unparse_fcname):
18497 (font_update_drivers, Ffont_get_glyphs, font_add_log):
18498 Rename or move locals to avoid shadowing.
18499
18500 * fns.c (require_nesting_list, require_unwind): Now static.
18501 (Ffillarray): Rename locals to avoid shadowing.
18502
18503 * floatfns.c (domain_error2): Define only if needed.
18504 (Ffrexp, Fldexp): Rename locals to avoid shadowing.
18505
18506 * alloc.c (mark_backtrace): Move decl from here ...
18507 * lisp.h: ... to here, so that it can be checked.
18508
18509 * eval.c (call_debugger, do_debug_on_call, grow_specpdl): Now static.
18510 (Fdefvar): Rewrite so as not to use empty "else".
18511 (lisp_indirect_variable): Name an expression,
18512 to avoid gcc -Wbad-function-cast warning.
18513 (Fdefvar): Rename locals to avoid shadowing.
18514
18515 * callint.c (quotify_arg, quotify_args): Now static.
18516 (Fcall_interactively): Rename locals to avoid shadowing.
18517 Use const pointer when appropriate.
18518
18519 * lisp.h (get_system_name, get_operating_system_release):
18520 Move decls here, to check interfaces.
18521 * process.c (get_operating_system_release): Move decl to lisp.h.
18522 * xrdb.c (get_system_name): Likewise.
18523 * editfns.c (init_editfns, Fuser_login_name, Fuser_uid):
18524 (Fuser_real_uid, Fuser_full_name): Remove unnecessary casts,
18525 some of which prompt warnings from gcc -Wbad-function-cast.
18526 (Fformat_time_string, Fencode_time, Finsert_char):
18527 (Ftranslate_region_internal, Fformat):
18528 Rename or remove local vars to avoid shadowing.
18529 (Ftranslate_region_internal): Mark var as initialized.
18530
18531 * doc.c (Fdocumentation, Fsnarf_documentation): Move locals to
18532 avoid shadowing.
18533
18534 * lisp.h (eassert): Check that the argument compiles, even if
18535 ENABLE_CHECKING is not defined.
18536
18537 * data.c (Findirect_variable): Name an expression, to avoid
18538 gcc -Wbad-function-cast warning.
18539 (default_value, arithcompare, arith_driver, arith_error): Now static.
18540 (store_symval_forwarding): Rename local to avoid shadowing.
18541 (Fmake_variable_buffer_local, Fmake_local_variable):
18542 Mark variables as initialized.
18543 (do_blv_forwarding, do_symval_forwarding): Remove; unused.
18544
18545 * alloc.c (check_cons_list): Do not define unless GC_CHECK_CONS_LIST.
18546 (Fmake_vector, Fvector, Fmake_byte_code, Fgarbage_collect):
18547 Rename locals to avoid shadowing.
18548 (mark_stack): Move local variables into the #ifdef region where
18549 they're used.
18550 (BLOCK_INPUT_ALLOC, UNBLOCK_INPUT_ALLOC): Define only if
18551 ! defined SYSTEM_MALLOC && ! defined SYNC_INPUT, as they are not
18552 needed otherwise.
18553 (CHECK_ALLOCATED): Define only if GC_CHECK_MARKED_OBJECTS.
18554 (GC_STRING_CHARS): Remove; not used.
18555 (Fmemory_limit): Cast sbrk's returned value to char *.
18556
18557 * lisp.h (check_cons_list): Declare if GC_CHECK_CONS_LIST; this
18558 avoids undefined behavior in theory.
18559
18560 * regex.c (IF_LINT): Add defn, for benefit of ../lib-src.
18561
18562 Use functions, not macros, for up- and down-casing (Bug#8254).
18563 * buffer.h (DOWNCASE_TABLE, UPCASE_TABLE, DOWNCASE, UPPERCASEP):
18564 (NOCASEP, LOWERCASEP, UPCASE, UPCASE1): Remove. All callers changed
18565 to use the following functions instead of these macros.
18566 (downcase): Adjust to lack of DOWNCASE_TABLE. Return int, not
18567 EMACS_INT, since callers assume the returned value fits in int.
18568 (upcase1): Likewise, for UPCASE_TABLE.
18569 (uppercasep, lowercasep, upcase): New static inline functions.
18570 * editfns.c (Fchar_equal): Remove no-longer-needed workaround for
18571 the race-condition problem in the old DOWNCASE.
18572
18573 * regex.c (CHARSET_LOOKUP_RANGE_TABLE_RAW, POP_FAILURE_REG_OR_COUNT):
18574 Rename locals to avoid shadowing.
18575 (regex_compile, re_match_2_internal): Move locals to avoid shadowing.
18576 (regex_compile, re_search_2, re_match_2_internal):
18577 Remove unused local vars.
18578 (FREE_VAR): Rewrite so as not to use empty "else",
18579 which gcc can warn about.
18580 (regex_compile, re_match_2_internal): Mark locals as initialized.
18581 (RETALLOC_IF): Define only if needed.
18582 (WORDCHAR_P): Likewise. This one is never needed, but is used
18583 only in a comment talking about a compiler bug, so put inside
18584 the #if 0 of that comment.
18585 (CHARSET_LOOKUP_BITMAP, FAIL_STACK_FULL, RESET_FAIL_STACK):
18586 (PUSH_FAILURE_ELT, BUF_PUSH_3, STOP_ADDR_VSTRING):
18587 Remove; unused.
18588
18589 * search.c (boyer_moore): Rename locals to avoid shadowing.
18590 * character.h (FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE):
18591 (PREV_CHAR_BOUNDARY): Likewise.
18592
18593 * search.c (simple_search): Remove unused var.
18594
18595 * dired.c (compile_pattern): Move decl from here ...
18596 * lisp.h: ... to here, so that it can be checked.
18597 (struct re_registers): New forward decl.
18598
18599 * character.h (INC_POS, DEC_POS): Rename locals to avoid shadowing.
18600
18601 * indent.c (MULTIBYTE_BYTES_WIDTH): New args bytes, width.
18602 All uses changed.
18603 (MULTIBYTE_BYTES_WIDTH, scan_for_column, compute_motion):
18604 Rename locals to avoid shadowing.
18605 (Fvertical_motion): Mark locals as initialized.
18606
18607 * casefiddle.c (casify_object, casify_region): Now static.
18608 (casify_region): Mark local as initialized.
18609
18610 * cmds.c (internal_self_insert): Rename local to avoid shadowing.
18611
18612 * lisp.h (GCPRO2_VAR, GCPRO3_VAR, GCPRO4_VAR, GCPRO5_VAR, GCPRO6_VAR):
18613 New macros, so that the caller can use some names other than
18614 gcpro1, gcpro2, etc.
18615 (GCPRO2, GCPRO3, GCPRO4, GCPRO5, GCPRO6): Reimplement in terms
18616 of the new macros.
18617 (GCPRO1_VAR, UNGCPRO_VAR): Change the meaning of the second
18618 argument, for consistency with GCPRO2_VAR, etc: it is now the
18619 prefix of the variable, not the variable itself. All uses
18620 changed.
18621 * dired.c (directory_files_internal, file_name_completion):
18622 Rename locals to avoid shadowing.
18623
18624 Fix a race condition diagnosed by gcc -Wsequence-point (Bug#8254).
18625 An expression of the form (DOWNCASE (x) == DOWNCASE (y)), found in
18626 dired.c's scmp function, had undefined behavior.
18627 * lisp.h (DOWNCASE_TABLE, UPCASE_TABLE, DOWNCASE, UPPERCASEP):
18628 (NOCASEP, LOWERCASEP, UPCASE, UPCASE1): Move from here ...
18629 * buffer.h: ... to here, because these macros use current_buffer,
18630 and the new implementation with inline functions needs to have
18631 current_buffer in scope now, rather than later when the macros
18632 are used.
18633 (downcase, upcase1): New static inline functions.
18634 (DOWNCASE, UPCASE1): Reimplement using these functions.
18635 This avoids undefined behavior in expressions like
18636 DOWNCASE (x) == DOWNCASE (y), which previously suffered
18637 from race conditions in accessing the global variables
18638 case_temp1 and case_temp2.
18639 * casetab.c (case_temp1, case_temp2): Remove; no longer needed.
18640 * lisp.h (case_temp1, case_temp2): Remove their decls.
18641 * character.h (ASCII_CHAR_P): Move from here ...
18642 * lisp.h: ... to here, so that the inline functions mentioned
18643 above can use them.
18644
18645 * dired.c (directory_files_internal_unwind): Now static.
18646
18647 * fileio.c (file_name_as_directory, directory_file_name):
18648 (barf_or_query_if_file_exists, auto_save_error, auto_save_1):
18649 Now static.
18650 (file_name_as_directory): Use const pointers when appropriate.
18651 (Fexpand_file_name): Likewise. In particular, newdir might
18652 point at constant storage, so make it a const pointer.
18653 (Fmake_directory_internal, Fread_file_name): Remove unused vars.
18654 (Ffile_selinux_context, Fset_file_selinux_context): Fix pointer
18655 signedness issues.
18656 (Fset_file_times, Finsert_file_contents, auto_save_error):
18657 Rename locals to avoid shadowing.
18658
18659 * minibuf.c (choose_minibuf_frame_1): Now static.
18660 (Ftry_completion, Fall_completions): Rename or remove locals
18661 to avoid shadowing.
18662
18663 * marker.c (bytepos_to_charpos): Remove; unused.
18664
18665 * lisp.h (verify_bytepos, count_markers): New decls,
18666 so that gcc does not warn that these functions aren't declared.
18667
18668 * insdel.c (check_markers, make_gap_larger, make_gap_smaller):
18669 (reset_var_on_error, Fcombine_after_change_execute_1): Now static.
18670 (CHECK_MARKERS): Redo to avoid gcc -Wempty-body diagnostic.
18671 (copy_text): Remove unused local var.
18672
18673 * filelock.c (within_one_second): Now static.
18674 (lock_file_1): Rename local to avoid shadowing.
18675
18676 * buffer.c (fix_overlays_before): Mark locals as initialized.
18677 (fix_start_end_in_overlays): Likewise. This function should be
18678 simplified by using pointers-to-pointers, but that's a different
18679 matter.
18680 (switch_to_buffer_1): Now static.
18681 (Fkill_buffer, record_buffer, Fbury_buffer, Fset_buffer_multibyte):
18682 (report_overlay_modification): Rename locals to avoid shadowing.
18683
18684 * sysdep.c (system_process_attributes): Rename vars to avoid shadowing.
18685 Fix pointer signedness issue.
18686 (sys_subshell): Mark local as volatile if checking for lint,
18687 to suppress a gcc -Wclobbered warning that does not seem to be right.
18688 (MAXPATHLEN): Define only if needed.
18689
18690 * process.c (serial_open, serial_configure): Move decls from here ...
18691 * systty.h: ... to here, so that they can be checked.
18692
18693 * fns.c (get_random, seed_random): Move extern decls from here ...
18694 * lisp.h: ... to here, so that they can be checked.
18695
18696 * sysdep.c (reset_io): Now static.
18697 (wait_for_termination_signal): Remove; unused.
18698
18699 * keymap.c (keymap_parent, keymap_memberp, map_keymap_internal):
18700 (copy_keymap_item, append_key, push_text_char_description):
18701 Now static.
18702 (Fwhere_is_internal): Don't test CONSP (sequences) unnecessarily.
18703 (DENSE_TABLE_SIZE): Remove; unused.
18704 (get_keymap, access_keymap, Fdefine_key, Fwhere_is_internal):
18705 (describe_map_tree):
18706 Rename locals to avoid shadowing.
18707
18708 * keyboard.c: Declare functions static if they are not used elsewhere.
18709 (echo_char, echo_dash, cmd_error, top_level_2):
18710 (poll_for_input, handle_async_input): Now static.
18711 (read_char, kbd_buffer_get_event, make_lispy_position):
18712 (make_lispy_event, make_lispy_movement, apply_modifiers):
18713 (decode_keyboard_code, tty_read_avail_input, menu_bar_items):
18714 (parse_tool_bar_item, read_key_sequence, Fread_key_sequence):
18715 (Fread_key_sequence_vector): Rename locals to avoid shadowing.
18716 (read_key_sequence, read_char): Mark locals as initialized.
18717 (Fexit_recursive_edit, Fabort_recursive_edit): Mark with NO_RETURN.
18718
18719 * keyboard.h (make_ctrl_char): New decl.
18720 (mark_kboards): Move decl here ...
18721 * alloc.c (mark_kboards): ... from here.
18722
18723 * lisp.h (force_auto_save_soon): New decl.
18724
18725 * emacs.c (init_cmdargs): Rename local to avoid shadowing.
18726 (DEFINE_DUMMY_FUNCTION): New macro.
18727 (__do_global_ctors, __do_global_ctors_aux, __do_global_dtors, __main):
18728 Use it.
18729 (main): Add casts to avoid warnings
18730 if GCC considers string literals to be constants.
18731
18732 * lisp.h (fatal_error_signal): Add decl, since it's exported.
18733
18734 * dbusbind.c: Pointer signedness fixes.
18735 (xd_signature, xd_append_arg, xd_initialize):
18736 (Fdbus_call_method, Fdbus_call_method_asynchronously):
18737 (Fdbus_method_return_internal, Fdbus_method_error_internal):
18738 (Fdbus_send_signal, xd_read_message_1, Fdbus_register_service):
18739 (Fdbus_register_signal): Use SSDATA when the context wants char *.
18740
18741 * dbusbind.c (Fdbus_init_bus): Add cast to avoid warning
18742 if GCC considers string literals to be constants.
18743 (Fdbus_register_service, Fdbus_register_method): Remove unused vars.
18744
18745 2011-03-16 Stefan Monnier <monnier@iro.umontreal.ca>
18746
18747 * print.c (PRINT_CIRCLE_CANDIDATE_P): New macro.
18748 (print_preprocess, print_object): New macro to fix last change.
18749
18750 * print.c (print_preprocess): Don't forget font objects.
18751
18752 2011-03-16 Juanma Barranquero <lekktu@gmail.com>
18753
18754 * emacs.c (USAGE3): Doc fixes.
18755
18756 2011-03-15 Andreas Schwab <schwab@linux-m68k.org>
18757
18758 * coding.c (detect_coding_iso_2022): Reorganize code to clarify
18759 structure.
18760
18761 2011-03-14 Juanma Barranquero <lekktu@gmail.com>
18762
18763 * lisp.h (VWindow_system, Qfile_name_history):
18764 * keyboard.h (lispy_function_keys) [WINDOWSNT]:
18765 * w32term.h (w32_system_caret_hwnd, w32_system_caret_height)
18766 (w32_system_caret_x, w32_system_caret_y): Declare extern.
18767
18768 * w32select.c: Don't #include "keyboard.h".
18769 (run_protected): Add extern declaration for waiting_for_input.
18770
18771 * w32.c (Qlocal, noninteractive1, inhibit_window_system):
18772 * w32console.c (detect_input_pending, read_input_pending)
18773 (encode_terminal_code):
18774 * w32fns.c (quit_char, lispy_function_keys, Qtooltip)
18775 (w32_system_caret_hwnd, w32_system_caret_height, w32_system_caret_x)
18776 (w32_system_caret_y, Qfile_name_history):
18777 * w32font.c (w32font_driver, QCantialias, QCotf, QClang):
18778 * w32inevt.c (reinvoke_input_signal, lispy_function_keys):
18779 * w32menu.c (Qmenu_bar, QCtoggle, QCradio, Qoverriding_local_map)
18780 (Qoverriding_terminal_local_map, Qmenu_bar_update_hook):
18781 * w32proc.c (Qlocal, report_file_error):
18782 * w32term.c (Vwindow_system, updating_frame):
18783 * w32uniscribe.c (initialized, uniscribe_font_driver):
18784 Remove unneeded extern declarations.
18785
18786 2011-03-14 Chong Yidong <cyd@stupidchicken.com>
18787
18788 * buffer.c (Fmake_indirect_buffer): Fix incorrect assertions.
18789
18790 2011-03-13 Chong Yidong <cyd@stupidchicken.com>
18791
18792 * buffer.h (BUF_BEGV, BUF_BEGV_BYTE, BUF_ZV, BUF_ZV_BYTE, BUF_PT)
18793 (BUF_PT_BYTE): Rewrite to handle indirect buffers (Bug#8219).
18794 These macros can no longer be used for assignment.
18795
18796 * buffer.c (Fget_buffer_create, Fmake_indirect_buffer):
18797 Assign struct members directly, instead of using BUF_BEGV etc.
18798 (record_buffer_markers, fetch_buffer_markers): New functions for
18799 recording and fetching special buffer markers.
18800 (set_buffer_internal_1, set_buffer_temp): Use them.
18801
18802 * lread.c (unreadchar): Use SET_BUF_PT_BOTH.
18803
18804 * insdel.c (adjust_point): Use SET_BUF_PT_BOTH.
18805
18806 * intervals.c (temp_set_point_both): Use SET_BUF_PT_BOTH.
18807 (get_local_map): Use SET_BUF_BEGV_BOTH and SET_BUF_ZV_BOTH.
18808
18809 * xdisp.c (hscroll_window_tree):
18810 (reconsider_clip_changes): Use PT instead of BUF_PT.
18811
18812 2011-03-13 Eli Zaretskii <eliz@gnu.org>
18813
18814 * makefile.w32-in ($(BLD)/editfns.$(O)): Depend on
18815 $(EMACS_ROOT)/lib/intprops.h.
18816
18817 2011-03-13 Paul Eggert <eggert@cs.ucla.edu>
18818
18819 Fix more problems found by GCC 4.5.2's static checks.
18820
18821 * gtkutil.c (xg_get_pixbuf_from_pixmap): Add cast from char *
18822 to unsigned char * to avoid compiler diagnostic.
18823 (xg_free_frame_widgets): Make it clear that a local variable is
18824 needed only if USE_GTK_TOOLTIP.
18825 (gdk_window_get_screen): Make it clear that this macro is needed
18826 only if USE_GTK_TOOLTIP.
18827 (int_gtk_range_get_value): New function, which avoids a diagnostic
18828 from gcc -Wbad-function-cast.
18829 (xg_set_toolkit_scroll_bar_thumb): Use it.
18830 (xg_tool_bar_callback, xg_tool_item_stale_p): Rewrite to avoid
18831 diagnostic from gcc -Wbad-function-cast.
18832 (get_utf8_string, xg_get_file_with_chooser):
18833 Rename locals to avoid shadowing.
18834 (create_dialog): Move locals to avoid shadowing.
18835
18836 * xgselect.c (xg_select): Remove unused var.
18837
18838 * image.c (four_corners_best): Mark locals as initialized.
18839 (gif_load): Initialize transparent_p to zero (Bug#8238).
18840 Mark another local as initialized.
18841 (my_png_error, my_error_exit): Mark with NO_RETURN.
18842
18843 * image.c (clear_image_cache): Now static.
18844 (DIM, HAVE_STDLIB_H_1): Remove unused macros.
18845 (xpm_load): Redo to avoid "discards qualifiers" gcc warning.
18846 (x_edge_detection): Remove unnecessary cast that
18847 gcc -Wbad-function-cast diagnoses.
18848 (gif_load): Fix pointer signedness.
18849 (clear_image_cache, xbm_read_bitmap_data, x_detect_edges):
18850 (jpeg_load, gif_load): Rename locals to avoid shadowing.
18851
18852 2011-03-12 Paul Eggert <eggert@cs.ucla.edu>
18853
18854 Improve quality of tests for time stamp overflow.
18855 For example, without this patch (encode-time 0 0 0 1 1
18856 1152921504606846976) returns the obviously-bogus value (-948597
18857 62170) on my RHEL 5.5 x86-64 host. With the patch, it correctly
18858 reports time overflow. See
18859 <http://lists.gnu.org/archive/html/emacs-devel/2011-03/msg00470.html>.
18860 * deps.mk (editfns.o): Depend on ../lib/intprops.h.
18861 * editfns.c: Include limits.h and intprops.h.
18862 (TIME_T_MIN, TIME_T_MAX): New macros.
18863 (time_overflow): Move earlier, to before first use.
18864 (hi_time, lo_time): New functions, for an accurate test for
18865 out-of-range times.
18866 (Fcurrent_time, Fget_internal_run_time, make_time): Use them.
18867 (Fget_internal_run_time): Don't assume time_t fits in int.
18868 (make_time): Use list2 instead of Fcons twice.
18869 (Fdecode_time): More accurate test for out-of-range times.
18870 (check_tm_member): New function.
18871 (Fencode_time): Use it, to test for out-of-range times.
18872 (lisp_time_argument): Don't rely on undefined left-shift and
18873 right-shift behavior when checking for time stamp overflow.
18874
18875 * editfns.c (time_overflow): New function, refactoring common code.
18876 (Fformat_time_string, Fdecode_time, Fencode_time):
18877 (Fcurrent_time_string): Use it.
18878
18879 Move 'make_time' to be next to its inverse 'lisp_time_argument'.
18880 * dired.c (make_time): Move to ...
18881 * editfns.c (make_time): ... here.
18882 * systime.h: Note the move.
18883
18884 2011-03-12 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
18885
18886 * fringe.c (update_window_fringes): Remove unused variables.
18887
18888 * unexmacosx.c (copy_data_segment): Also copy __got section.
18889 (Bug#8223)
18890
18891 2011-03-12 Eli Zaretskii <eliz@gnu.org>
18892
18893 * termcap.c [MSDOS]: Include "msdos.h".
18894 (find_capability, tgetnum, tgetflag, tgetstr, tputs, tgetent):
18895 Constify `char *' arguments and their references according to
18896 prototypes in tparam.h.
18897
18898 * deps.mk (termcap.o): Depend on tparam.h and msdos.h.
18899
18900 * msdos.c (XMenuAddPane): 3rd argument is `const char *' now.
18901 Adapt all references accordingly.
18902
18903 * msdos.h (XMenuAddPane): 3rd argument is `const char *' now.
18904
18905 2011-03-11 Tom Tromey <tromey@redhat.com>
18906
18907 * buffer.c (syms_of_buffer): Remove obsolete comment.
18908
18909 2011-03-11 Eli Zaretskii <eliz@gnu.org>
18910
18911 * termhooks.h (encode_terminal_code): Declare prototype.
18912
18913 * msdos.c (encode_terminal_code): Don't declare prototype.
18914
18915 * term.c (encode_terminal_code): Now external again, used by
18916 w32console.c and msdos.c.
18917
18918 * makefile.w32-in ($(BLD)/term.$(O), ($(BLD)/tparam.$(O)):
18919 Depend on $(SRC)/tparam.h, see 2011-03-11T07:24:21Z!eggert@cs.ucla.edu.
18920
18921 2011-03-11 Paul Eggert <eggert@cs.ucla.edu>
18922
18923 Fix some minor problems found by GCC 4.5.2's static checks.
18924
18925 * fringe.c (update_window_fringes): Mark locals as initialized
18926 (Bug#8227).
18927 (destroy_fringe_bitmap, init_fringe_bitmap): Now static.
18928
18929 * alloc.c (mark_fringe_data): Move decl from here ...
18930 * lisp.h (mark_fringe_data) [HAVE_WINDOW_SYSTEM]: ... to here,
18931 to check its interface.
18932 (init_fringe_once): Do not declare unless HAVE_WINDOW_SYSTEM.
18933
18934 * fontset.c (free_realized_fontset): Now static.
18935 (Fset_fontset_font): Rename local to avoid shadowing.
18936 (fontset_font): Mark local as initialized.
18937 (FONTSET_SPEC, FONTSET_REPERTORY, RFONT_DEF_REPERTORY): Remove; unused.
18938
18939 * xrdb.c: Include "xterm.h", to check x_load_resources's interface.
18940
18941 * xselect.c (x_disown_buffer_selections): Remove; not used.
18942 (TRACE3) [!defined TRACE_SELECTION]: Remove; not used.
18943 (x_own_selection, Fx_disown_selection_internal): Rename locals
18944 to avoid shadowing.
18945 (x_handle_dnd_message): Remove local to avoid shadowing.
18946
18947 * lisp.h (GCPRO1_VAR, UNGCPRO_VAR): New macros,
18948 so that the caller can use some name other than gcpro1.
18949 (GCPRO1, UNGCPRO): Reimplement in terms of the new macros.
18950 * xfns.c (Fx_create_frame, x_create_tip_frame, Fx_show_tip):
18951 (Fx_backspace_delete_keys_p):
18952 Use them to avoid shadowing, and rename vars to avoid shadowing.
18953 (x_decode_color, x_set_name, x_window): Now static.
18954 (Fx_create_frame): Add braces to silence GCC warning.
18955 (Fx_file_dialog, Fx_select_font): Fix pointer signedness.
18956 (x_real_positions, xg_set_icon_from_xpm_data, x_create_tip_frame):
18957 Remove unused locals.
18958 (Fx_create_frame, x_create_tip_frame, Fx_show_tip):
18959 (Fx_backspace_delete_keys_p): Rename locals to avoid shadowing.
18960 Some of these renamings use the new GCPRO1_VAR and UNGCPRO_VAR
18961 macros.
18962
18963 * xterm.h (x_mouse_leave): New decl.
18964
18965 * xterm.c (x_copy_dpy_color, x_focus_on_frame, x_unfocus_frame):
18966 Remove unused functions.
18967 (x_shift_glyphs_for_insert, XTflash, XTring_bell):
18968 (x_calc_absolute_position): Now static.
18969 (XTread_socket): Don't define label "out" unless it's used.
18970 Don't declare local "event" unless it's used.
18971 (x_iconify_frame, x_free_frame_resources): Don't declare locals
18972 unless they are used.
18973 (XEMBED_VERSION, xembed_set_info): Don't define unless needed.
18974 (x_fatal_error_signal): Remove; not used.
18975 (x_draw_image_foreground, redo_mouse_highlight, XTmouse_position):
18976 (x_scroll_bar_report_motion, handle_one_xevent, x_draw_bar_cursor):
18977 (x_error_catcher, x_connection_closed, x_error_handler):
18978 (x_error_quitter, xembed_send_message, x_iconify_frame):
18979 (my_log_handler): Rename locals to avoid shadowing.
18980 (x_delete_glyphs, x_ins_del_lines): Mark with NO_RETURN.
18981 (x_connection_closed): Tell GCC not to suggest NO_RETURN.
18982
18983 * xfaces.c (clear_face_cache, Fx_list_fonts, Fface_font):
18984 Rename or move locals to avoid shadowing.
18985 (tty_defined_color, merge_face_heights): Now static.
18986 (free_realized_faces_for_fontset): Remove; not used.
18987 (Fx_list_fonts): Mark variable that gcc -Wuninitialized
18988 does not deduce is never used uninitialized.
18989 (STRDUPA, LSTRDUPA, FONT_POINT_SIZE_QUANTUM): Remove; not used.
18990 (LFACEP): Define only if XASSERTS, as it's not needed otherwise.
18991
18992 * terminal.c (store_terminal_param): Now static.
18993
18994 * xmenu.c (menu_highlight_callback): Now static.
18995 (set_frame_menubar): Remove unused local.
18996 (xmenu_show): Rename parameter to avoid shadowing.
18997 (xmenu_show, xdialog_show, xmenu_show): Make local pointers "const"
18998 since they might point to immutable storage.
18999 (next_menubar_widget_id): Declare only if USE_X_TOOLKIT,
19000 since it's unused otherwise.
19001
19002 * xdisp.c (produce_glyphless_glyph): Initialize lower_xoff.
19003 Add a FIXME, since the code still doesn't look right. (Bug#8215)
19004 (Fcurrent_bidi_paragraph_direction): Simplify slightly; this
19005 avoids a gcc -Wuninitialized diagnostic.
19006 (display_line, BUILD_COMPOSITE_GLYPH_STRING, draw_glyphs):
19007 (note_mouse_highlight): Mark variables that gcc -Wuninitialized
19008 does not deduce are never used uninitialized.
19009
19010 * lisp.h (IF_LINT): New macro, copied from ../lib-src/emacsclient.c.
19011
19012 * xdisp.c (redisplay_window): Rename local to avoid shadowing.
19013 * window.c (window_loop, size_window):
19014 (run_window_configuration_change_hook, enlarge_window): Likewise.
19015
19016 * window.c (display_buffer): Now static.
19017 (size_window): Mark variables that gcc -Wuninitialized
19018 does not deduce are never used uninitialized.
19019 * window.h (check_all_windows): New decl, to forestall
19020 gcc -Wmissing-prototypes diagnostic.
19021 * dispextern.h (bidi_dump_cached_states): Likewise.
19022
19023 * charset.h (CHECK_CHARSET_GET_CHARSET): Rename locals to avoid
19024 shadowing.
19025 * charset.c (map_charset_for_dump, Fchar_charset): Likewise.
19026 Include <limits.h>.
19027 (Fsort_charsets): Redo min/max calculation to shorten the code a bit
19028 and to avoid gcc -Wuninitialized warning.
19029 (load_charset_map): Mark variables that gcc -Wuninitialized
19030 does not deduce are never used uninitialized.
19031 (load_charset): Abort instead of using uninitialized var (Bug#8229).
19032
19033 * coding.c (coding_set_source, coding_set_destination):
19034 Use "else { /* comment */ }" rather than "else /* comment */;"
19035 for clarity, and to avoid gcc -Wempty-body warning.
19036 (Fdefine_coding_system_internal): Don't redeclare 'i' inside
19037 a block, when the outer 'i' will do.
19038 (decode_coding_utf_8, decode_coding_utf_16, detect_coding_emacs_mule):
19039 (emacs_mule_char, decode_coding_emacs_mule, detect_coding_iso_2022):
19040 (decode_coding_iso_2022, decode_coding_sjis, decode_coding_big5):
19041 (decode_coding_raw_text, decode_coding_charset, get_translation_table):
19042 (Fdecode_sjis_char, Fdefine_coding_system_internal):
19043 Rename locals to avoid shadowing.
19044 * character.h (FETCH_STRING_CHAR_ADVANCE): Likewise.
19045 * coding.c (emacs_mule_char, encode_invocation_designation):
19046 Now static, since they're not used elsewhere.
19047 (decode_coding_iso_2022): Add "default: abort ();" as a safety check.
19048 (decode_coding_object, encode_coding_object, detect_coding_system):
19049 (decode_coding_emacs_mule): Mark variables that gcc
19050 -Wuninitialized does not deduce are never used uninitialized.
19051 (detect_coding_iso_2022): Initialize a local variable that might
19052 be used uninitialized. Leave a FIXME because it's not clear that
19053 this initialization is needed. (Bug#8211)
19054 (ISO_CODE_LF, ISO_CODE_CR, CODING_ISO_FLAG_EUC_TW_SHIFT):
19055 (ONE_MORE_BYTE_NO_CHECK, UTF_BOM, UTF_16_INVALID_P):
19056 (SHIFT_OUT_OK, ENCODE_CONTROL_SEQUENCE_INTRODUCER):
19057 (ENCODE_DIRECTION_R2L, ENCODE_DIRECTION_L2R):
19058 Remove unused macros.
19059
19060 * category.c (hash_get_category_set): Remove unused local var.
19061 (copy_category_table): Now static, since it's not used elsewhere.
19062 * character.c (string_count_byte8): Likewise.
19063
19064 * ccl.c (CCL_WRITE_STRING, CCL_ENCODE_CHAR, Fccl_execute_on_string):
19065 (Fregister_code_conversion_map): Rename locals to avoid shadowing.
19066
19067 * chartab.c (copy_sub_char_table): Now static, since it's not used
19068 elsewhere.
19069 (sub_char_table_ref_and_range, char_table_ref_and_range):
19070 Rename locals to avoid shadowing.
19071 (ASET_RANGE, GET_SUB_CHAR_TABLE): Remove unused macros.
19072
19073 * bidi.c (bidi_check_type): Now static, since it's not used elsewhere.
19074 (BIDI_BOB): Remove unused macro.
19075
19076 * cm.c (cmgoto): Mark variables that gcc -Wuninitialized does not
19077 deduce are never used uninitialized.
19078 * term.c (encode_terminal_code): Likewise.
19079
19080 * term.c (encode_terminal_code): Now static. Remove unused local.
19081
19082 * tparam.h: New file.
19083 * term.c, tparam.h: Include it.
19084 * deps.mk (term.o, tparam.o): Depend on tparam.h.
19085 * term.c (tputs, tgetent, tgetflag, tgetnum, tparam, tgetstr):
19086 Move these decls to tparam.h, and make them agree with what
19087 is actually in tparam.c. The previous trick of using incompatible
19088 decls in different modules does not conform to the C standard.
19089 All callers of tparam changed to use tparam's actual API.
19090 * tparam.c (tparam1, tparam, tgoto):
19091 Use const pointers where appropriate.
19092
19093 * cm.c (calccost, cmgoto): Use const pointers where appropriate.
19094 * cm.h (struct cm): Likewise.
19095 * dispextern.h (do_line_insertion_deletion_costs): Likewise.
19096 * scroll.c (ins_del_costs, do_line_insertion_deletion_costs): Likewise.
19097 * term.c (tty_ins_del_lines, calculate_costs, struct fkey_table):
19098 (term_get_fkeys_1, append_glyphless_glyph, produce_glyphless_glyph):
19099 (turn_on_face, init_tty): Likewise.
19100 * termchar.h (struct tty_display_info): Likewise.
19101
19102 * term.c (term_mouse_position): Rename local to avoid shadowing.
19103
19104 * alloc.c (mark_ttys): Move decl from here ...
19105 * lisp.h (mark_ttys): ... to here, so that it's checked against defn.
19106
19107 2011-03-11 Andreas Schwab <schwab@linux-m68k.org>
19108
19109 * .gdbinit (pwinx, xbuffer): Fix access to buffer name.
19110
19111 2011-03-09 Juanma Barranquero <lekktu@gmail.com>
19112
19113 * search.c (compile_pattern_1): Remove argument regp, unused since
19114 revid:rms@gnu.org-19941211082627-3x1g1wyqkjmwloig.
19115 (compile_pattern): Don't pass it.
19116
19117 2011-03-08 Jan Djärv <jan.h.d@swipnet.se>
19118
19119 * xterm.h (DEFAULT_GDK_DISPLAY): New define.
19120 (GDK_WINDOW_XID, gtk_widget_get_preferred_size): New defines
19121 for ! HAVE_GTK3.
19122 (GTK_WIDGET_TO_X_WIN): Use GDK_WINDOW_XID.
19123
19124 * xmenu.c (menu_position_func): Call gtk_widget_get_preferred_size.
19125
19126 * gtkutil.c: Include gtkx.h if HAVE_GTK3. If ! HAVE_GTK3, define
19127 gdk_window_get_screen, gdk_window_get_geometry,
19128 gdk_x11_window_lookup_for_display and GDK_KEY_g.
19129 (xg_set_screen): Use DEFAULT_GDK_DISPLAY.
19130 (xg_get_pixbuf_from_pixmap): New function.
19131 (xg_get_pixbuf_from_pix_and_mask): Change parameters from GdkPixmap
19132 to Pixmap, take frame as parameter, remove GdkColormap parameter.
19133 Call xg_get_pixbuf_from_pixmap instead of
19134 gdk_pixbuf_get_from_drawable.
19135 (xg_get_image_for_pixmap): Do not make GdkPixmaps, call
19136 xg_get_pixbuf_from_pix_and_mask with Pixmap parameters instead.
19137 (xg_check_special_colors): Use GtkStyleContext and its functions
19138 for HAVE_GTK3.
19139 (xg_prepare_tooltip, xg_hide_tooltip): Call gdk_window_get_screen.
19140 (xg_prepare_tooltip, create_dialog, menubar_map_cb)
19141 (xg_update_frame_menubar, xg_tool_bar_detach_callback)
19142 (xg_tool_bar_attach_callback, xg_update_tool_bar_sizes):
19143 Call gtk_widget_get_preferred_size.
19144 (xg_frame_resized): gdk_window_get_geometry only takes 5
19145 parameters.
19146 (xg_win_to_widget, xg_event_is_for_menubar):
19147 Call gdk_x11_window_lookup_for_display.
19148 (xg_set_widget_bg): New function.
19149 (delete_cb): New function.
19150 (xg_create_frame_widgets): Connect delete-event to delete_cb.
19151 Call xg_set_widget_bg. Only set background pixmap for ! HAVE_GTK3
19152 (xg_set_background_color): Call xg_set_widget_bg.
19153 (xg_set_frame_icon): Call xg_get_pixbuf_from_pix_and_mask.
19154 (xg_create_scroll_bar): vadj is a GtkAdjustment for HAVE_GTK3.
19155 Only call gtk_range_set_update_policy if ! HAVE_GTK3.
19156 (xg_make_tool_item): Only connect xg_tool_bar_item_expose_callback
19157 if ! HAVE_GTK3.
19158 (update_frame_tool_bar): Call gtk_widget_hide.
19159 (xg_initialize): Use GDK_KEY_g.
19160
19161 * xsmfns.c (gdk_set_sm_client_id): Define to gdk_set_sm_client_id
19162 if ! HAVE_GTK3
19163 (x_session_initialize): Call gdk_x11_set_sm_client_id.
19164
19165 * xterm.c (XFillRectangle): Use cairo routines for HAVE_GTK3.
19166 (x_term_init): Disable Xinput(2) with GDK_CORE_DEVICE_EVENTS.
19167 Load ~/emacs.d/gtkrc only for ! HAVE_GTK3.
19168
19169 2011-03-08 Juanma Barranquero <lekktu@gmail.com>
19170
19171 * w32xfns.c (select_palette): Check success of RealizePalette against
19172 GDI_ERROR, not zero.
19173
19174 See ChangeLog.11 for earlier changes.
19175
19176 ;; Local Variables:
19177 ;; coding: utf-8
19178 ;; End:
19179
19180 Copyright (C) 2011-2012 Free Software Foundation, Inc.
19181
19182 This file is part of GNU Emacs.
19183
19184 GNU Emacs is free software: you can redistribute it and/or modify
19185 it under the terms of the GNU General Public License as published by
19186 the Free Software Foundation, either version 3 of the License, or
19187 (at your option) any later version.
19188
19189 GNU Emacs is distributed in the hope that it will be useful,
19190 but WITHOUT ANY WARRANTY; without even the implied warranty of
19191 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19192 GNU General Public License for more details.
19193
19194 You should have received a copy of the GNU General Public License
19195 along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.