1 2012-10-31 Michael Albinus <michael.albinus@gmx.de>
3 * dbusbind.c: Fix cut'n'waste error. Use HAVE_DBUS_VALIDATE_INTERFACE.
5 2012-10-31 Martin Rudalics <rudalics@gmx.at>
7 * minibuf.c (read_minibuf): Restore current buffer since
8 choose_minibuf_frame calling Fset_frame_selected_window may
11 2012-10-30 Jan Djärv <jan.h.d@swipnet.se>
13 * frame.c (Fframe_pixel_height): Fix documentation (Bug#12733).
15 2012-10-30 Kenichi Handa <handa@gnu.org>
17 * font.c (Ffont_at): If WINDOW is specified and it is not
18 displaying the current buffer, signal an error.
20 2012-10-29 Daniel Colascione <dancol@dancol.org>
22 * cygw32.h, cygw32.c (Qutf_16le, from_unicode, to_unicode): In
23 preparation for fixing bug#12739, move these functions from
26 * coding.h, coding.c: ... to here, and compile them only when
27 WINDOWSNT or CYGWIN. Moving these functions out of cygw32 proper
28 lets us write cygw32-agnostic code for the HAVE_NTGUI case.
30 2012-10-28 Eli Zaretskii <eliz@gnu.org>
32 * w32proc.c (TIMER_TICKS_PER_SEC): New macro.
33 (timer_loop, getitimer, setitimer): Use it instead of
34 CLOCKS_PER_SEC, which is no longer pertinent, since we don't use
36 (w32_get_timer_time): Use 10*TIMER_TICKS_PER_SEC instead of a
39 2012-10-28 Jan Djärv <jan.h.d@swipnet.se>
41 * nsterm.m (NO_APPDEFINED_DATA): New define.
42 (last_appdefined_event_data): New variable
43 (last_appdefined_event): Remove.
44 (ns_select): Initialize t from last_appdefined_event_data instead
45 of [last_appdefined_event data1].
46 (sendEvent:): Save [theEvent data1] to last_appdefined_event_data,
47 remove last_appdefined_event (Bug#12698).
49 2012-10-28 Stefan Monnier <monnier@iro.umontreal.ca>
51 * frame.c (x_set_font): Catch internal error.
53 2012-10-27 Eli Zaretskii <eliz@gnu.org>
55 Avoid overflow in w32 implementation of interval timers.
56 When possible, for ITIMER_PROF count only times the main thread
58 * w32proc.c <struct itimer_data>: 'expire' and 'reload' are now
59 'volatile ULONGLONG' types. All the other data which was
60 previously clock_t is now ULONGLONG. 'terminate' is 'volatile int'.
61 (GetThreadTimes_Proc): New typedef.
62 (w32_get_timer_time): New function, returns a suitable time value
64 (timer_loop): Enter critical section when accessing ULONGLONG
65 values of the itimer_data struct, as these accesses are no longer
66 atomic. Call 'w32_get_timer_time' instead of 'clock'.
67 Remove unused variable.
68 (init_timers): Initialize s_pfn_Get_Thread_Times.
69 (start_timer_thread): Don't assign itimer->caller_thread here.
70 (getitimer): Assign itimer->caller_thread here.
71 (setitimer): Always call getitimer to get the value of ticks_now.
72 (sys_spawnve): Avoid compiler warning about format mismatch.
74 2012-10-26 Eli Zaretskii <eliz@gnu.org>
76 * w32fns.c (w32_wnd_proc) <WM_MOUSEMOVE>: Don't enable tracking of
77 mouse movement events if the menu bar is active. This avoids
78 producing a busy "hour-glass" cursor by Windows if the mouse
79 pointer is positioned over a tooltip shown for some menu item.
81 2012-10-25 Paul Eggert <eggert@cs.ucla.edu>
83 Don't assume process IDs fit in int.
84 * emacs.c (shut_down_emacs) [!DOS_NT]:
85 * sysdep.c (sys_suspend) [SIGTSTP && !MSDOS]:
86 * term.c (dissociate_if_controlling_tty) [!DOS_NT]:
87 Use pid_t, not int, to store process IDs, as 'int'
88 is not wide enough on a few platforms (e.g., AIX and IRIX).
90 2012-10-23 Kenichi Handa <handa@gnu.org>
92 The following change is to make face-font-rescale-alist work
93 correctly for non-ASCII fonts.
95 * font.c (font_open_entity): Don't handle Vface_font_rescale_alist.
96 (font_open_for_lface): Handle Vface_font_rescale_alist.
98 2012-10-23 Chong Yidong <cyd@gnu.org>
100 * xfaces.c (Vfont_list_limit): Move unused variable to faces.el.
102 2012-10-21 Jan Djärv <jan.h.d@swipnet.se>
104 * nsfont.m (nsfont_open, ns_glyph_metrics): Force integer advancement
106 (nsfont_draw): Turn off LCD-smoothing (Bug#11484).
108 * xterm.c (x_focus_changed): Check if daemonp when sending focus in
111 2012-10-21 Glenn Morris <rgm@gnu.org>
113 * lisp.mk (lisp): Add cp51932.el and eucjp-ms.el.
115 2012-10-20 Paul Eggert <eggert@cs.ucla.edu>
118 * frame.c (Fmouse_position, Fmouse_pixel_position):
119 * xdisp.c (produce_stretch_glyph):
120 Declare local vars only when they're needed.
121 This is clearer and avoids a warning on OpenBSD about unused vars.
122 * frame.h (FRAME_WINDOW_P): Always evaluate its argument.
123 This is safer, and avoids OpenBSD warnings about unused vars.
124 * keyboard.c (record_menu_key): Remove unnecessary decl.
125 (poll_timer): Define only if POLL_FOR_INPUT is defined.
126 * unexelf.c (ELFSIZE) [!ElfW]: Do not define if already defined,
127 as our definition clashes with OpenBSD's.
128 * xfaces.c (load_face_colors, check_lface_attrs)
129 (get_lface_attributes_no_remap, get_lface_attributes)
130 (lface_fully_specified_p, x_supports_face_attributes_p)
131 (tty_supports_face_attributes_p, face_fontset, realize_face)
132 (realize_x_face, realize_tty_face):
133 Declare parameters to be Lisp_Object[LFACE_VECTOR_SIZE], not
134 merely Lisp_Object *. This is more informative and avoids
135 a warning on OpenBSD about accessing beyond an object's size.
137 2012-10-20 Chong Yidong <cyd@gnu.org>
139 * lread.c (Fload): Doc fix (Bug#12592).
141 2012-10-19 Kazuhiro Ito <kzhr@d1.dion.ne.jp> (tiny change)
143 * font.c (Ffont_at): Fix previous change.
145 2012-10-19 Eli Zaretskii <eliz@gnu.org>
147 * puresize.h (BASE_PURESIZE): Bump the base value to 1700000.
148 See http://lists.gnu.org/archive/html/emacs-devel/2012-10/msg00593.html
151 * alloc.c (NSTATICS): Decrease to 0x800.
153 2012-10-19 Stefan Monnier <monnier@iro.umontreal.ca>
155 * fns.c (Fnreverse): Include the problem element when signalling an
158 2012-10-18 Jan Djärv <jan.h.d@swipnet.se>
160 * nsterm.m (ns_select): Check writefds before call to
161 FD_ISSET (Bug#12668).
163 2012-10-18 Daniel Colascione <dancol@dancol.org>
165 * alloc.c (NSTATICS): Increase from 0x650 to 0x1000
166 (staticpro): If we run out of staticpro slots, die with an
167 informative error instead of just calling emacs_abort.
169 2012-10-18 Martin Rudalics <rudalics@gmx.at>
171 Fix two flaws reported by Dmitry Antipov.
172 * window.c (Ftemp_output_buffer_show): Remove.
173 (Fwindow_vscroll, Fset_window_vscroll): Use decode_live_window.
174 (syms_of_window): Remove defsubr for Stemp_output_buffer_show.
176 2012-10-17 Eli Zaretskii <eliz@gnu.org>
178 * makefile.w32-in ($(BLD)/w32.$(O)):
179 ($(BLD)/vm-limit.$(O)):
181 ($(BLD)/unexw32.$(O)):
182 ($(BLD)/fileio.$(O)):
183 ($(BLD)/dispnew.$(O)): Update dependencies.
185 * w32term.h (w32_initialize_display_info, initialize_w32_display):
188 * w32proc.c: Include ctype.h.
190 * w32.h (init_environment, check_windows_init_file)
191 (syms_of_ntproc, syms_of_ntterm, dostounix_filename)
192 (unixtodos_filename, init_winsock, srandom, random, sys_pipe)
193 (set_process_dir, sys_spawnve, register_child, sys_sleep, getwd)
194 (sys_link): Add prototypes.
196 * w32.c: Include w32select.h.
197 (sys_access, e_malloc, sys_select): Add prototypes.
198 (emacs_gnutls_pull): 'timeout' is now EMACS_TIME, not struct timeval.
200 * vm-limit.c [WINDOWSNT]: Include w32heap.h.
202 * unexw32.c: Include lisp.h and w32.h.
204 * term.c [WINDOWSNT]: Include w32term.h.
206 * process.c [WINDOWSNT]: Add prototype of sys_select.
208 * fileio.c [WINDOWSNT]: Include w32.h.
210 * dispnew.c [WINDOWSNT]: Include w32.h.
212 * cygw32.c (Fcygwin_convert_path_to_windows)
213 (Fcygwin_convert_path_from_windows): Use EQ to compare 2
214 Lisp_Object values. (Bug#12661)
216 * w32fns.c (w32_msg_pump): Use XIL instead of casting an integer
217 to Lisp_Object. (Bug#12661)
219 2012-10-17 Kenichi Handa <handa@gnu.org>
221 * xdisp.c (reseat_1): Make the information stored in it->cmp_it
224 2012-10-17 Dmitry Antipov <dmantipov@yandex.ru>
226 * buffer.c (Fkill_buffer): When unchaining the marker,
227 reset its buffer pointer to NULL (Bug#12652).
229 2012-10-17 Dmitry Antipov <dmantipov@yandex.ru>
231 Do not verify indirection counters of killed buffers (Bug#12579).
232 * buffer.h (BUFFER_CHECK_INDIRECTION): New macro.
233 * buffer.c (compact_buffer, set_buffer_internal_1): Use it.
235 2012-10-16 Dmitry Antipov <dmantipov@yandex.ru>
237 * alloc.c (Fmake_byte_code): Fix typo in comment.
238 * print.c (print_interval): Define as static to match prototype.
239 * indent.c (disptab_matches_widthtab, recompute_width_table):
242 2012-10-16 Dmitry Antipov <dmantipov@yandex.ru>
244 * editfns.c (get_system_name): Remove.
245 * lisp.h (get_system_name): Remove prototype.
246 * xrdb.c (getenv, getpwuid, getpwnam): Remove prototypes.
247 (get_environ_db): Use Vsystem_name. Avoid call to strlen.
249 2012-10-15 Daniel Colascione <dancol@dancol.org>
251 * dbusbind.c: Add comment explaining reason for previous change.
253 2012-10-15 Martin Rudalics <rudalics@gmx.at>
255 * window.c (Fwindow_end): Rewrite check whether cached position
256 can be used (Bug#12600).
257 (resize_frame_windows, grow_mini_window, shrink_mini_window):
258 Set windows_or_buffers_changed.
260 2012-10-15 Daniel Colascione <dancol@dancol.org>
262 * dbusbind.c: Fix cygw32 build break when compiling with dbus
263 enabled by undefining the symbol "interface", which the platform
264 headers define to something incompatible.
266 2012-10-14 Daniel Colascione <dancol@dancol.org>
268 * image.c (init_tiff_functions, init_imagemagick_functions)
269 (init_svg_functions): Fix cygw32 build break by using these
270 functions only when WINDOWSNT _and_ HAVE_NTGUI.
272 2012-10-14 Jan Djärv <jan.h.d@swipnet.se>
274 * nsterm.m (ns_select): Count fd:s in writefs also (Bug#12422).
276 2012-10-13 Jan Djärv <jan.h.d@swipnet.se>
278 * gtkutil.c (xg_set_widget_bg): Divide by 65535 (Bug#12612).
280 2012-10-13 HANATAKA, Shinya <bogytech@gmail.com> (tiny change)
282 * coding.c (detect_coding): Set coding->id before calling
285 2012-10-13 Andreas Schwab <schwab@linux-m68k.org>
287 * fileio.c: Formatting fixes.
289 2012-10-13 Paul Eggert <eggert@cs.ucla.edu>
291 Fix some stat-related races.
292 * fileio.c (Fwrite_region): Avoid race condition if a file is
293 removed or renamed by some other process immediately after Emacs
294 writes it but before Emacs stats it. Do not assume that stat (or
296 * image.c (slurp_file): Resolve the file name with fopen + fstat
297 rather than stat + fopen.
298 (pbm_read_file) [0]: Remove unused code with stat race.
299 * process.c (allocate_pty) [HAVE_PTYS && !PTY_ITERATION && !PTY_OPEN]:
300 Remove ineffective code with stat race.
302 2012-10-12 Stefan Monnier <monnier@iro.umontreal.ca>
304 * doc.c (get_doc_string): Don't signal an error if the file is missing.
306 2012-10-12 Jan Djärv <jan.h.d@swipnet.se>
308 * nsterm.m (hold_event_q): New static variable.
309 (EV_TRAILER, sendScrollEventAtLoc:fromEvent:): Call hold_event if
311 (hold_event): New function.
312 (ns_read_socket): If hold_event_q have events, store them and
314 (setPosition:portion:whole:): Send SIGIO to ourselves if apploopnr
317 2012-10-12 Juanma Barranquero <lekktu@gmail.com>
319 * makefile.w32-in ($(BLD)/w32select.$(O)): Update dependencies.
321 2012-10-12 Eli Zaretskii <eliz@gnu.org>
323 * makefile.w32-in ($(BLD)/fileio.$(O)): Add sys/file.h.
325 * fileio.c (check_existing): New function.
326 (make_temp_name, Ffile_exists_p, Ffile_writable_p): Call it
327 instead of calling 'stat', when what's needed is to check whether
328 a file exists. This avoids expensive system calls on MS-Windows.
331 * w32.c (init_environment): Call 'check_existing' instead of 'stat'.
333 * lread.c (openp) [WINDOWSNT]: Call 'access' instead of 'stat' to
334 determine whether a file exists and is not a directory.
336 * lisp.h (check_existing): Add prototype.
338 2012-10-12 Jan Djärv <jan.h.d@swipnet.se>
340 * nsfont.m (nsfont_open): Remove font cache, it is not GC correct.
342 2012-10-12 Glenn Morris <rgm@gnu.org>
344 * buffer.c (Fset_buffer): Doc fix. (Bug#12624)
346 2012-10-11 Stefan Monnier <monnier@iro.umontreal.ca>
348 * buffer.c (Fkill_buffer): Null out the overlay list(s) as well.
350 * eval.c (Fautoload): Remember previous autoload status in load-history.
352 2012-10-11 Paul Eggert <eggert@cs.ucla.edu>
354 lread.c, macros.c, marker.c, menu.c, minibuf.c: Use bool for booleans.
355 * lread.c (load_each_byte, new_backquote_flag, readchar)
356 (read_filtered_event, lisp_file_lexically_bound_p)
357 (safe_to_load_version, Fload, complete_filename_p, openp)
358 (build_load_history, readevalloop, read_escape, read1)
359 (string_to_number, read_vector, read_list):
360 * macros.c (Fstart_kbd_macro):
361 * marker.c (CONSIDER):
362 * menu.c (parse_single_submenu, digest_single_submenu)
363 (find_and_return_menu_selection, Fx_popup_menu):
364 * minibuf.c (read_minibuf_noninteractive, read_minibuf)
366 * nsmenu.m (ns_update_menubar, runMenuAt:forFrame:keymaps:):
368 * xmenu.c (set_frame_menubar, create_and_show_popup_menu)
369 (xmenu_show, xdialog_show):
370 Use bool for booleans.
371 * lread.c (safe_to_load_version): Rename from safe_to_load_p,
372 as it's not a predicate. All uses changed. Omit unnecessary
375 2012-10-11 Dmitry Antipov <dmantipov@yandex.ru>
377 * editfns.c (save_excursion_save): Use nil if mark points to nowhere.
378 (save_excursion_restore): Do not restore mark if it was not saved.
380 2012-10-11 Paul Eggert <eggert@cs.ucla.edu>
382 * marker.c (cached_modiff): EMACS_INT, not int.
384 * w32select.c (waiting_for_input): Declare by including "keyboard.h"
385 instead of having a wrong decl.
386 * nsmenu.m (waiting_for_input): Remove wrong decl.
388 2012-10-10 Paul Eggert <eggert@cs.ucla.edu>
390 keyboard.c, keymap.c: Use bool for booleans.
391 * dispnew.c (sit_for): Distinguish between 3-way display_option
392 and boolean do_display.
393 * keyboard.c (single_kboard, this_command_key_count_reset)
394 (waiting_for_input, echoing, immediate_quit, input_pending)
395 (interrupt_input, interrupts_deferred, pop_kboard)
396 (temporarily_switch_to_single_kboard, ignore_mouse_drag_p)
397 (command_loop_1, adjust_point_for_property)
398 (safe_run_hooks_error, input_polling_used, read_char):
399 (help_char_p, readable_events, kbd_buffer_events_waiting)
400 (kbd_buffer_get_event, timer_check_2, make_lispy_event)
401 (lucid_event_type_list_p, get_input_pending):
402 (gobble_input, menu_separator_name_p, menu_bar_item)
403 (parse_menu_item, parse_tool_bar_item, read_char_x_menu_prompt)
404 (read_char_minibuf_menu_prompt, access_keymap_keyremap)
405 (keyremap_step, test_undefined, read_key_sequence)
406 (detect_input_pending, detect_input_pending_ignore_squeezables)
407 (detect_input_pending_run_timers, requeued_events_pending_p)
408 (quit_throw_to_read_char, Fset_input_interrupt_mode):
409 * keymap.c (get_keymap, keymap_parent, keymap_memberp)
410 (access_keymap_1, access_keymap, map_keymap, get_keyelt)
411 (Fdefine_key, Flookup_key, struct accessible_keymaps_data)
412 (accessible_keymaps_1, Fkey_description, push_key_description):
413 (shadow_lookup, struct where_is_internal_data)
414 (where_is_internal, Fwhere_is_internal, where_is_internal_1)
415 (Fdescribe_buffer_bindings, describe_map_tree, struct describe_map_elt)
416 (describe_map, describe_vector):
417 * menu.c (single_menu_item):
418 * nsmenu.m (ns_update_menubar):
419 * process.c (wait_reading_process_output):
420 * search.c (scan_buffer, scan_newline):
421 Use bool for boolean.
422 * keyboard.c (timers_run, swallow_events)
423 (detect_input_pending_run_timers):
424 * process.c (wait_reading_process_output):
425 Use unsigned for counter where wraparound-on-overflow is desired,
426 since unsigned is guaranteed to have that behavior and signed is not.
427 (read_char): Use ptrdiff_t for string length.
428 (get_input_pending): Remove first argument, since it was always
429 the same pointer-to-int (now pointer-to-boolean) &input_pending,
430 and behave as if it had that value. Return new value of
431 input_pending. All callers changed.
432 * keyboard.h (struct kboard): Use unsigned : 1 for boolean member
433 immediate_echo. Use ptrdiff_t for echo_after_prompt, since it's
435 * keymap.c (push_key_description): Omit last arg, which was always 1.
438 * regex.c (immediate_quit) [emacs]: Remove duplicate decl.
440 2012-10-10 Juanma Barranquero <lekktu@gmail.com>
442 * makefile.w32-in ($(BLD)/dispnew.$(O), $(BLD)/indent.$(O))
443 ($(BLD)/term.$(O)): Update dependencies.
445 2012-10-10 Dmitry Antipov <dmantipov@yandex.ru>
447 * alloc.c (mark_object): Use meaningful PVEC_NORMAL_VECTOR.
448 * lisp.h (enum pvec_type): Adjust comments and omit explicit
449 initializer for PVEC_NORMAL_VECTOR.
451 2012-10-10 Paul Eggert <eggert@cs.ucla.edu>
453 Clean out old termopts cruft.
454 * termopts.h (flow_control, meta_key): Remove unused decls.
455 * dispnew.c, indent.c, nsterm.m, term.c, xsettings.c, xsmfns.c:
456 Don't include termopts.h.
458 2012-10-10 Dmitry Antipov <dmantipov@yandex.ru>
460 * alloc.c (gc_sweep): Use pointer-to-a-pointer loop for buffers.
462 2012-10-10 Paul Eggert <eggert@cs.ucla.edu>
464 * commands.h (immediate_quit): Remove duplicate decl.
466 2012-10-09 Jan Djärv <jan.h.d@swipnet.se>
468 * nsfont.m (Vfonts_in_cache): Remove, not needed as font.c handles
470 (nsfont_open): Remove setting of Vfonts_in_cache.
471 (syms_of_nsfont): Remove initialization of Vfonts_in_cache.
473 2012-10-09 Eli Zaretskii <eliz@gnu.org>
475 * w32fns.c (w32_last_error): Change the return value to DWORD, to
476 match what GetLastError returns. Explain why the function is
479 * frame.c (delete_frame): Rename local variable 'tooltip_frame' to
480 'is_tooltip_frame', to avoid confusion with its global namesake.
482 2012-10-08 Daniel Colascione <dancol@dancol.org>
484 * xdisp.c (start_hourglass): Call w32_note_current_window when
485 HAVE_NTGUI, not just WINDOWSNT, resolving a problem in the cygw32
486 build that caused Emacs to display the hourglass cursor forever.
488 * w32fns.c (Fx_display_color_cells): Instead of using NCOLORS,
489 which is broken under remote desktop, calculate the number of
490 colors available for a display based on the display's number of
491 planes and number of bits per pixel per plane. (bug#10397).
493 2012-10-08 Jan Djärv <jan.h.d@swipnet.se>
495 * nsfont.m (Vfonts_in_cache): New variable.
496 (nsfont_open): Use unsignedLongLongValue for cache in case wide ints
497 are used. Add cached fonts to Vfonts_in_cache.
498 (syms_of_nsfont): Initialize and staticpro Vfonts_in_cache.
500 2012-10-08 Juanma Barranquero <lekktu@gmail.com>
502 * makefile.w32-in (LOCAL_FLAGS): Don't define HAVE_NTGUI, it's now
504 (FONT_H): Define after FRAME_H.
505 ($(BLD)/emacs.$(O), $(BLD)/process.$(O), $(BLD)/w32heap.$(O)):
508 * w32term.c: Remove leftover declaration of keyboard_codepage.
510 2012-10-08 Eli Zaretskii <eliz@gnu.org>
512 * makefile.w32-in (FONT_H): Add $(FRAME_H).
513 (W32TERM_H): Add $(ATIMER_H) and $(FRAME_H).
514 ($(BLD)/emacs.$(O), $(BLD)/w32console.$(O)): Update dependencies.
515 (GLOBAL_SOURCES): Add cygw32.c.
516 ($(BLD)/unexw32.$(O)):
518 ($(BLD)/w32console.$(O)):
519 ($(BLD)/w32fns.$(O)):
520 ($(BLD)/w32heap.$(O)):
521 ($(BLD)/w32menu.$(O)):
522 ($(BLD)/w32proc.$(O)): Add w32common.h.
524 * w32fns.c (w32_color_map_lookup, x_to_w32_color): Argument is now
526 (x_to_w32_color): Don't modify the argument, modify a copy instead.
528 2012-10-08 Daniel Colascione <dancol@dancol.org>
530 * w32term.h (WM_EMACS_BRINGTOTOP, WM_EMACS_INPUT_READY)
531 (WM_EMACS_END): Change WM_EMACS_BRINGTOTOP from 22 to 21 to close
532 accidental message numbering hole. Change other messages to
535 * w32select.h (HAVE_W32SELECT): Remove.
537 * w32select.c, w32proc.c, w32menu.c, w32console.c, w32.c: Include
538 w32common.h instead of w32heap.h.
540 * w32heap.h (ROUND_UP, ROUND_DOWN, get_page_size)
541 (get_allocation_unit, get_processor_type, get_w32_major_version)
542 (get_w32_minor_version, sysinfo_cache, osinfo_cache)
543 (w32_major_version, w32_minor_version, w32_build_number, OS_9X)
544 (OS_NT, os_subtype, cache_system_info): Move declarations to
547 * w32heap.c: Include w32common.h.
548 (sysinfo_cache, syspage_mask, osinfo_cache, w32_major_version)
549 (w32_minor_version, w32_build_number, w32_subtype):
550 Remove duplicate definitions.
552 * w32fns.c: Include w32common.h; include w32heap.h only in
555 (Fx_file_dialog): Clarify comment on GetOpenFileName structure.
556 Use `report_file_error' instead of `error' in order to better
557 inform users of what went wrong. Increase NTGUI_UNICODE file
558 dialog box file name length to 32k, the maximum allowed by the NT
561 * w32common.h: New file.
562 (ROUND_UP, ROUND_DOWN, get_page_size)
563 (get_allocation_unit, get_processor_type, get_w32_major_version)
564 (get_w32_minor_version, sysinfo_cache, osinfo_cache)
565 (w32_major_version, w32_minor_version, w32_build_number, OS_9X)
566 (OS_NT, os_subtype, cache_system_info): Move here.
568 * unexw32.c, unexcw.c: Include w32common.h.
570 * emacs.c (main): Use (defined (WINDOWSNT) || defined
571 HAVE_NTGUI) instead of removed HAVE_W32SELECT to decide whether
572 to call syms_of_w32select.
574 * cygw32.h: Remove obsolete EXFUN declarations.
576 * cygw32.c (Qutf_16_le): Rename to Qutf_16le.
578 * Makefile.in (SOME_MACHINE_OBJECTS): Reverse accidental removal
579 of w32inevt.o from SOME_MACHINE_OBJECTS.
581 2012-10-08 Daniel Colascione <dancol@dancol.org>
583 * image.c: Permanent fix for JPEG compilation issue --- limit
584 jpeglib `boolean' redefinition to Cygwin builds.
586 2012-10-08 Eli Zaretskii <eliz@gnu.org>
588 * image.c (CHECK_LIB_AVAILABLE): Remove, no longer used.
590 * emacs.c (DAEMON_MUST_EXEC) [HAVE_NTGUI]: Define this only on
593 2012-10-08 Daniel Colascione <dancol@dancol.org>
595 * xfaces.c, xdisp.c, window.c, w32xfns.c, w32term.h, w32term.c,
596 w32select.h w32select.c, w32proc.c, w32menu.c, w32inevt.c,
597 w32help.c, w32font.c, w32font.c, w32fns.c, w32console.c, w32.h,
598 w32.c, unexw32.c, termhooks.h, process.c, menu.c, keyboard.h,
599 keyboard.c, image.c, frame.h, frame.c, fontset.c, font.h, font.c,
600 emacs.c, dispextern.h, cygw32.h, cygw32.c, conf_post.h,
601 Makefile.in: use HAVE_NTGUI for W32 GUI and WINDOWSNT for the
602 operating system. defined(HAVE_NTGUI) && !defined(WINDOWSNT) is
603 now a supported configuration.
605 * Makefile.in: consolidate image variables into LIBIMAGE; add
606 W32_OBJ and W32_LIBS. Compile new files.
609 (_DebPrint) declare tracing facility for W32 debugging. We need
610 to unify tracing later.
612 (NTGUI_UNICODE) Define when compiling for Cygwin to allow the
613 unconditional use of W32 Unicode functions. Cygwin runs only on
614 100% Unicode operating systems.
616 * cygw32.c: New file. Define Cygwin-specific facilities.
617 (Fcygwin_convert_path_to_windows)
618 (Fcygwin_convert_path_from_windows): New user functions for
619 accessing Cygwin path-munging routines.
621 * cygw32.h: New file.
622 (WCSDATA, to_unicode, from_unicode): Define facilities for storing
623 UTF-16LE strings temporarily inside non-Lisp-visible string
626 (w32_strerror): Just what it says on the tin.
628 * emacs.c: Make the NS fork-then-exec code for daemon-launching
629 also run for Cygwin; both systems have the same problem with using
630 GUI facilities in a forked child. Also call syms_of_cygw32,
631 syms_of_w32select in correct places.
633 (DAEMON_MUST_EXEC): new macro defined to signal that a platform
634 needs fork-then-exec for daemon launching.
636 * font.h: Include frame.h.
638 * image.c: Use the image library cache machinery only when we're
639 compiling for native WINDOWSNT; Cygwin can use shared libraries
640 like any other Unixlike system.
642 * keyboard.c: Clarify a comment regarding the input loop.
644 * menu.c: When NTGUI_UNICODE is defined, use Unicode menu
645 functions directly instead of trying to detect at runtime that our
646 host operating system supports them. We make this change for two
647 reasons: Cygwin lacks support for the multibyte character
648 conversion functions used by the legacy menu code, and Cygwin
649 never needs to rely on non-Unicode APIs.
651 * unexw32.c (hinst): Declare extern.
653 * w32.c: Change header order;
654 (w32_strerror): Move to w32fns.c because we need it for
655 non-WINDOWSNT builds.
657 * w32.h: Add #error macro to make sure we don't include w32.h for
658 Cygwin builds. Remove w32select declarations.
660 * w32console.c (w32_sys_ring_bell, Fset_message_beep): Move to
661 w32fns.c. w32console.c is WINDOWSNT-only.
663 * w32fns.c: Include cygw32.h or w32.h depending on CYGWIN; more
664 NTGUI_UNICODE tweaks. (See above.) Change _snprintf to the more
666 (faked_key, sysinfo_cache, osinfo_cahce, syspage_mask)
667 (w32_major_version, w32_minor_version, w32_build_number)
668 (os_subtype, sound_type): Define here
669 (w32_defined_color): Make color parameter const for consistency
670 with other _defined_color functions.
671 (w32_createwindow): Unconditionally call w32_init_class instead of
672 doing so only when hprevinst is non-NULL. Plumbing hprevinst
673 through the code is complex and unnecessary because class
674 registration is practically free.
675 (w32_name_of_message): New EMACSDEBUG-only function.
676 (Fset_message_beep): Move here
677 (Fx_open_connection): Require that the display name for Windows be
678 "w32" for consistency, emacsclient disambiguation, and maybe, one
679 day, multi-window-system support.
680 (file_dialog_callback): NTGUI_UNICODE changes; encode and decode
681 Cygwin files for W32 GUI facilities, since these clearly don't
684 (w32_strerror, w32_console_toggle_lock_key, w32_kbd_mods_to_emacs)
685 (w32_kbd_patch_key, w32_sys_ring_bell): Move here.
686 (Ssystem_move_file_to_trash): Define only for native WINDOWSNT.
687 (w32_last_error): Remove.
689 * w32font.c: Define _strlwr to strlwr for non-WINDOWSNT builds.
691 * w32heap.c (syspage_mask): Declare here.
692 (cache_system_info): Remove.
694 * w32inevt.c (faked_key): Define globally, not statically.
695 (w32_kbd_mods_to_emacs, w32_kbd_patch_key, faked_key)
696 (w32_console_toggle_lock_key): Move to w32fns.c.
698 * w32menu.c: Include setjmp.h. NTGUI_UNICODE changes throughout.
700 * w32proc.c (_DebPrint): Move to w32fns.c.
701 * w32select.c: Include string.h, stdio.h for Cygwin.
702 * w32select.h: New File.
704 * w32term.c: Include io.h for non-CYGWIN builds; needed for
706 (w32_message_fd): New variable. Under Cygwin, holds the file
707 descriptor the system used to tell us about pending thread
710 (w32_init_term): Remove incorrect calls to fcntl and init_sigio
711 that prevented compilation under non-WINDOWSNT systems.
713 (w32_initialize): Open /dev/windows and assign it to
714 w32_message_fd. Provide w32 feature.
716 * w32term.h: Include frame.h, atimer.h. Declare various frame functions.
717 (WM_EMACS_INPUT_READY): add.
718 (prepend_msg, w32_message_fd): Declare globally.
721 (keyboard_handle): Use only when WINDOWSNT.
722 (notify_msg_ready): New function. Posts a message to the main
723 thread's message queue under CYGWIN, which wakes up the main
724 thread from select(2) by making the /dev/windows file descriptor
725 ready. Under WINDOWSNT, it sets an event the same way the old
728 (post, prepend_msg): Actually call notify_msg_ready instead of
729 setting the input event directly.
731 2012-10-07 Eli Zaretskii <eliz@gnu.org>
733 * ralloc.c (relinquish): If a heap is ready to be relinquished,
734 but it still has blocs in it, don't return it to the system,
735 instead of aborting. (Bug#12402)
737 2012-10-07 Jan Djärv <jan.h.d@swipnet.se>
739 * nsterm.m (ns_dumpglyphs_image): Only draw slice of image (Bug#12506).
741 * nsterm.m (ns_update_auto_hide_menu_bar): Remove defintion of
742 MAC_OS_X_VERSION_10_6.
743 (syms_of_nsterm): Remove comment about Panther and above for
745 * nsterm.h (MAC_OS_X_VERSION_10_3, onTiger): Remove.
746 (EmacsApp): Remove check for >= MAC_OS_X_VERSION_10_4.
747 (struct nsfont_info): Remove check for >= MAC_OS_X_VERSION_10_3.
749 * nsselect.m (ns_string_from_pasteboard): Remove check for >=
750 MAC_OS_X_VERSION_10_4.
752 * nsmenu.m (fillWithWidgetValue:): Remove code for <
753 MAC_OS_X_VERSION_10_2.
755 * nsimage.m (setPixmapData, getPixelAtX, setAlphaAtX): Remove onTiger.
757 * nsfns.m (Fns_list_services): Remove comment and check for OSX < 10.4.
758 (ns_do_applescript): Remove check for >= MAC_OS_X_VERSION_10_4.
760 * nsterm.m (ns_in_resize): Remove (Bug#12479).
761 (ns_resize_handle_rect, mouseDown, mouseUp, mouseDragged): Remove.
762 (ns_clear_frame, sendEvent, windowDidResize, drawRect:):
763 Remove ns_in_resize check.
764 (ns_clear_frame_area): Remove resize handle code.
766 * nsfns.m (ns_in_resize): Remove.
767 (x_set_icon_name, ns_set_name, ns_set_name_as_filename):
768 Remove ns_in_resize check.
770 2012-10-07 Paul Eggert <eggert@cs.ucla.edu>
772 Improve sys_siglist detection.
773 * sysdep.c (sys_siglist, init_signals): Use _sys_siglist if it's
774 defined as a macro, as is done in Solaris.
775 (sys_siglist_entries): New macro.
776 (save_strsignal): Use it.
777 * syssignal.h (safe_strsignal): Now ATTRIBUTE_CONST, to pacify
778 GCC 4.7.2 on Fedora 17 with the fixed sys_siglist detection.
780 2012-10-06 Jan Djärv <jan.h.d@swipnet.se>
782 * nsfns.m (Fx_create_frame): Call x_default_parameter with
783 fullscreen/Fullscreen.
785 * nsterm.h (EmacsView): Rename tbar_height to tibar_height.
788 * nsterm.m (x_make_frame_visible): Check for fullscreen.
789 (ns_fullscreen_hook): Activate old style fullscreen with a timer.
790 (ns_term_init): Set activateIgnoringOtherApps if old style fullscreen.
791 (windowDidResize:): Check for correct window if old style fullscreen.
792 Capitalize word in comment. Remove incorrect comment.
793 (initFrameFromEmacs:): tbar_height renamed tibar_height.
794 (windowDidEnterFullScreen:): Toggle toolbar for fullscreen to fix
795 error in drawing background.
796 (toggleFullScreen:): Remove comment. Rearrange calls.
797 Set toolbar values to zero, save old height in tobar_height.
798 Restore tool bar height when leaving fullscreen.
799 (canBecomeMainWindow): New function.
801 2012-10-06 Paul Eggert <eggert@cs.ucla.edu>
803 * keyboard.c (read_char): Remove unnecessary 'volatile's and label.
805 2012-10-05 Eli Zaretskii <eliz@gnu.org>
807 * w32proc.c (stop_timer_thread): Fix declaration of 'err'.
809 * w32.c (utime): Open the file with FILE_FLAG_BACKUP_SEMANTICS, so
810 that time stamps of directories could also be changed.
811 Don't request the too broad GENERIC_WRITE, only the more restrictive
812 FILE_WRITE_ATTRIBUTES access rights.
814 * fileio.c (Fset_file_times): Special-case ignoring errors for
815 directories only on MSDOS, not on MS-Windows.
817 2012-10-05 Ikumi Keita <ikumi@ikumi.que.jp> (tiny change)
819 * minibuf.c (Fcompleting_read): Doc fix. (Bug#12555)
821 2012-10-04 Eli Zaretskii <eliz@gnu.org>
823 * w32.c (utime): Test for INVALID_HANDLE_VALUE, not for NULL, to
824 see whether CreateFile failed.
826 2012-10-04 Paul Eggert <eggert@cs.ucla.edu>
828 * profiler.c (handle_profiler_signal): Inhibit pending signals too,
829 to avoid similar races.
830 * keyboard.c (pending_signals): Now bool, not int.
832 Port timers to OpenBSD, plus check for timer failures.
833 OpenBSD problem reported by Han Boetes.
834 * profiler.c (setup_cpu_timer): Check for failure of timer_settime
836 (Fprofiler_cpu_stop): Don't assume HAVE_SETITIMER.
837 * syssignal.h (HAVE_ITIMERSPEC): New macro. This is for platforms
838 like OpenBSD, which has timer_settime but does not declare it.
839 OpenBSD does not define SIGEV_SIGNAL, so use that when deciding
840 whether to use itimerspec-related primitives. All uses of
841 HAVE_TIMER_SETTIME replaced with HAVE_ITIMERSPEC.
843 2012-10-02 Paul Eggert <eggert@cs.ucla.edu>
845 * profiler.c (handle_profiler_signal): Fix a malloc race
846 that caused Emacs to hang on Fedora 17 when profiling Lisp.
848 2012-10-02 Jan Djärv <jan.h.d@swipnet.se>
850 * nsterm.m (windowDidEnterFullScreen): Remove fprintf.
852 2012-10-02 Eli Zaretskii <eliz@gnu.org>
854 * w32proc.c (sys_wait): Declare 'signame' 'const char *', to be
855 consistent with the change in return value of 'safe_strsignal'.
857 2012-10-02 Paul Eggert <eggert@cs.ucla.edu>
859 Prefer plain 'static' to 'static inline' (Bug#12541).
860 * bidi.c (bidi_get_type, bidi_check_type, bidi_get_category)
861 (bidi_set_sor_type, bidi_push_embedding_level)
862 (bidi_pop_embedding_level, bidi_remember_char, bidi_copy_it)
863 (bidi_cache_reset, bidi_cache_shrink, bidi_cache_fetch_state)
864 (bidi_cache_search, bidi_cache_ensure_space)
865 (bidi_cache_iterator_state, bidi_cache_find)
866 (bidi_peek_at_next_level, bidi_set_paragraph_end)
867 (bidi_count_bytes, bidi_char_at_pos, bidi_fetch_char)
868 (bidi_explicit_dir_char, bidi_resolve_neutral_1):
869 Now 'static', not 'static inline'.
871 Count overruns when profiling; change units to ns.
872 * profiler.c (handle_profiler_signal): Count sampling intervals, not ms.
873 Give extra weight to samples after overruns, to attempt to count
874 the time more accurately.
875 (setup_cpu_timer): Change sampling interval units from ms to ns, since
876 the underlying primitives nominally do ns.
877 (Fprofiler_cpu_start): Document the change. Mention that
878 the sampling intervals are only approximate.
880 2012-10-02 Stefan Monnier <monnier@iro.umontreal.ca>
882 * frame.c (Fmake_terminal_frame): Prefer safer CONSP over !NILP.
884 * coding.h (ENCODE_FILE, DECODE_FILE, DECODE_SYSTEM): Remove special
885 case for the special 0 coding-system.
887 * buffer.c (Fset_buffer_multibyte): Signal an error instead of widening.
888 (Fmake_overlay): Remove redundant tests.
889 (fix_start_end_in_overlays): Remove redundant recentering.
891 2012-10-02 Juanma Barranquero <lekktu@gmail.com>
893 * makefile.w32-in ($(BLD)/alloc.$(O), $(BLD)/gmalloc.$(O)):
896 2012-10-01 Paul Eggert <eggert@cs.ucla.edu>
898 Fix a malloc race condition involving strsignal.
899 A signal can arrive in the middle of a malloc, and Emacs's signal
900 handler can invoke strsignal, which can invoke malloc, which is
901 not portable. This race condition bug makes Emacs hang on GNU/Linux.
902 Fix it by altering the signal handler so that it does not invoke
904 * emacs.c (shut_down_emacs): Use safe_strsignal, not strsignal.
905 * process.c (status_message): Use const pointer, in case strsignal
906 is #defined to safe_strsignal.
907 * sysdep.c (sys_siglist, init_signals): Always define and
908 initialize a substitute sys_siglist if the system does not define
909 one, even if HAVE_STRSIGNAL.
910 (safe_strsignal): Rename from strsignal. Always define,
911 using sys_siglist. Return a const pointer.
912 * syssignal.h (safe_strsignal): New decl.
913 (strsignal) [!HAVE_STRSIGNAL]: Define in terms of safe_strsignal.
915 2012-10-01 Eli Zaretskii <eliz@gnu.org>
917 * w32proc.c (timer_loop): Fix code that waits for timer
918 expiration, to avoid high CPU usage.
920 2012-10-01 Stefan Monnier <monnier@iro.umontreal.ca>
922 * fns.c (check_hash_table, get_key_arg, maybe_resize_hash_table)
923 (sweep_weak_table): Remove redundant prototypes.
925 2012-10-01 Fabrice Popineau <fabrice.popineau@gmail.com>
927 * emacs.c: Move the inclusion of TERM_HEADER after including
928 windows.h on WINDOWSNT. This avoids compilation problems with
931 2012-10-01 Eli Zaretskii <eliz@gnu.org>
933 * unexw32.c (OFFSET_TO_RVA, RVA_TO_OFFSET)
934 (RVA_TO_SECTION_OFFSET): Encode all macro arguments in parentheses.
935 (RVA_TO_PTR): Cast the result of RVA_TO_OFFSET to 'unsigned char *',
936 as the previous version used 'void *'.
938 * ralloc.c (ROUNDUP): Fix last change.
939 (MEM_ROUNDUP): Don't cast MEM_ALIGN, it is already of type
942 * w32proc.c <disable_itimers>: New static flag.
943 (init_timers): Initialize it to zero, after creating the critical
944 sections used by the timer threads.
945 (term_timers): Set to 1 before deleting the critical sections.
946 (getitimer, setitimer): If disable_itimers is non-zero, return an
947 error indication without doing anything. Reported by Fabrice
948 Popineau <fabrice.popineau@supelec.fr> as part of bug#12544.
949 (alarm) [HAVE_SETITIMER]: Be more conformant to the expected
951 [!HAVE_SETITIMER]: Behave as the previous version that didn't
954 * emacs.c (shut_down_emacs) [WINDOWSNT]: Move the call to
955 term_ntproc after all the other bookkeeping, to get timers working
958 2012-10-01 Paul Eggert <eggert@cs.ucla.edu>
960 * xdisp.c (syms_of_xdisp): Default message-log-max to 1000, not 100.
961 Suggested by Juri Linkov in
962 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00821.html>.
964 Prefer plain 'static' to 'static inline' (Bug#12541).
965 With static functions, modern compilers inline pretty well by
966 themselves; advice from programmers often hurts as much as it helps.
967 On my host (x86-64, Fedora 17, GCC 4.7.2, default 'configure'),
968 this change shrinks the text size of the Emacs executable by 1.1%
969 without affecting CPU significantly in my benchmark.
970 * alloc.c (mem_find, live_string_p, live_cons_p, live_symbol_p)
971 (live_float_p, live_misc_p, live_vector_p, live_buffer_p)
972 (mark_maybe_object, mark_maybe_pointer, bounded_number):
973 * buffer.c (bset_abbrev_mode, bset_abbrev_table)
974 (bset_auto_fill_function, bset_auto_save_file_format)
975 (bset_auto_save_file_name, bset_backed_up, bset_begv_marker)
976 (bset_bidi_display_reordering, bset_buffer_file_coding_system)
977 (bset_cache_long_line_scans, bset_case_fold_search)
978 (bset_ctl_arrow, bset_cursor_in_non_selected_windows)
979 (bset_cursor_type, bset_display_table, bset_extra_line_spacing)
980 (bset_file_format, bset_file_truename, bset_fringe_cursor_alist)
981 (bset_fringe_indicator_alist, bset_fringes_outside_margins)
982 (bset_header_line_format, bset_indicate_buffer_boundaries)
983 (bset_indicate_empty_lines, bset_invisibility_spec)
984 (bset_left_fringe_width, bset_major_mode, bset_mark)
985 (bset_minor_modes, bset_mode_line_format, bset_mode_name)
986 (bset_name, bset_overwrite_mode, bset_pt_marker)
987 (bset_right_fringe_width, bset_save_length)
988 (bset_scroll_bar_width, bset_scroll_down_aggressively)
989 (bset_scroll_up_aggressively, bset_selective_display)
990 (bset_selective_display_ellipses, bset_vertical_scroll_bar_type)
991 (bset_word_wrap, bset_zv_marker, set_buffer_overlays_before)
992 (set_buffer_overlays_after):
993 * category.c (bset_category_table):
994 * charset.c (read_hex):
995 * coding.c (produce_composition, produce_charset)
996 (handle_composition_annotation, handle_charset_annotation)
998 * dispnew.c (swap_glyph_pointers, copy_row_except_pointers)
999 (assign_row, set_frame_matrix_frame, make_current)
1001 * eval.c (set_specpdl_symbol, set_specpdl_old_value):
1002 * fns.c (maybe_resize_hash_table):
1003 * frame.c (fset_buffer_predicate, fset_minibuffer_window):
1004 * gmalloc.c (register_heapinfo):
1005 * image.c (lookup_image_type):
1006 * intervals.c (set_interval_object, set_interval_left)
1007 (set_interval_right, copy_interval_parent, rotate_right)
1008 (rotate_left, balance_possible_root_interval):
1009 * keyboard.c (kset_echo_string, kset_kbd_queue)
1010 (kset_keyboard_translate_table, kset_last_prefix_arg)
1011 (kset_last_repeatable_command, kset_local_function_key_map)
1012 (kset_overriding_terminal_local_map, kset_real_last_command)
1013 (kset_system_key_syms, clear_event, set_prop):
1014 * lread.c (digit_to_number):
1015 * marker.c (attach_marker, live_buffer, set_marker_internal):
1016 * nsterm.m (ns_compute_glyph_string_overhangs):
1017 * process.c (pset_buffer, pset_command)
1018 (pset_decode_coding_system, pset_decoding_buf)
1019 (pset_encode_coding_system, pset_encoding_buf, pset_filter)
1020 (pset_log, pset_mark, pset_name, pset_plist, pset_sentinel)
1021 (pset_status, pset_tty_name, pset_type, pset_write_queue):
1022 * syntax.c (bset_syntax_table, dec_bytepos):
1023 * terminal.c (tset_param_alist):
1024 * textprop.c (interval_has_some_properties)
1025 (interval_has_some_properties_list):
1026 * window.c (wset_combination_limit, wset_dedicated)
1027 (wset_display_table, wset_hchild, wset_left_fringe_width)
1028 (wset_left_margin_cols, wset_new_normal, wset_new_total)
1029 (wset_normal_cols, wset_normal_lines, wset_parent, wset_pointm)
1030 (wset_right_fringe_width, wset_right_margin_cols)
1031 (wset_scroll_bar_width, wset_start, wset_temslot, wset_vchild)
1032 (wset_vertical_scroll_bar_type, wset_window_parameters):
1033 * xdisp.c (wset_base_line_number, wset_base_line_pos)
1034 (wset_column_number_displayed, wset_region_showing)
1035 (window_box_edges, run_window_scroll_functions)
1036 (append_glyph_string_lists, prepend_glyph_string_lists)
1037 (append_glyph_string, set_glyph_string_background_width)
1038 (append_glyph, append_composite_glyph)
1039 (take_vertical_position_into_account):
1040 * xfaces.c (x_create_gc, x_free_gc, merge_face_vectors)
1041 (face_attr_equal_p, lface_equal_p, hash_string_case_insensitive)
1042 (lface_hash, lface_same_font_attributes_p, lookup_face):
1043 * xml.c (libxml2_loaded_p):
1044 * xterm.c (x_set_mode_line_face_gc, x_set_glyph_string_gc)
1045 (x_set_glyph_string_clipping, x_clear_glyph_string_rect):
1046 Now 'static', not 'static inline'.
1049 (bidi_copy_it): Do the whole copy with a single memcpy.
1050 (bidi_char_at_pos): Merge the two STRING_CHAR calls into one.
1052 Revert the FOLLOW-SYMLINKS change for file-attributes.
1053 Doing it right would require several changes to Tramp, and there's
1054 not enough time to get that tested before the freeze today.
1055 * dired.c (directory_files_internal, Ffile_attributes):
1058 * frame.c (x_report_frame_params): Port better to wider ints.
1059 Do not assume that EMACS_UINT is the same width as uprintmax_t,
1060 or that pointers can be printed in 15 decimal digits.
1061 Avoid GCC warnings if EMACS_UINT is wider than a pointer.
1063 2012-09-30 Fabrice Popineau <fabrice.popineau@supelec.fr>
1065 Support x64 build on MS-Windows.
1066 * w32term.h (SCROLL_BAR_PACK, SCROLL_BAR_UNPACK): Define for x64.
1067 (SET_SCROLL_BAR_W32_WINDOW): Cast ID to intptr_t, for
1068 compatibility with x64.
1069 (x_get_focus_frame): Add prototype.
1071 * w32term.c (w32_draw_underwave): Don't use GCC extensions for
1072 defining an XRectangle structure.
1074 * w32proc.c (RVA_TO_PTR, w32_executable_type): Fix pointer
1075 arithmetics for compatibility with x64.
1077 * w32menu.c (add_menu_item): Use UINT_PTR instead of UINT, for
1078 compatibility with x64.
1080 * w32heap.h: Adjust prototypes and declarations.
1082 * w32heap.c (RVA_TO_PTR, allocate_heap, sbrk, init_heap)
1083 (round_heap): Use DWORD_PTR, ptrdiff_t and size_t instead of
1084 DWORD, long, and unsigned long, for compatibility with x64.
1085 (allocate_heap) [_WIN64]: Reserve 32GB of memory.
1086 (sbrk): Argument is now of type ptrdiff_t.
1088 * w32fns.c (HMONITOR): Condition declaration on _WIN32_WINNT being
1090 (w32_msg_pump): Use WPARAM type for 'result'.
1092 * w32.c (init_environment, get_emacs_configuration): Support AMD64
1094 (init_ntproc): Cast arguments of _open_osfhandle to intptr_t, for
1095 compatibility with x64.
1097 * vm-limit.c (lim_data): Now size_t.
1098 (check_memory_limits): Adjust prototypes of real_morecore and
1099 __morecore to receive argument of type ptrdiff_t. Use size_t for
1100 five_percent and data_size.
1102 * unexw32.c: Use DWORD_PTR instead of DWORD for file-scope
1103 variables, for compatibility with x64.
1104 (rva_to_section, offset_to_section, relocate_offset)
1105 (OFFSET_TO_RVA, RVA_TO_OFFSET, RVA_TO_SECTION_OFFSET)
1106 (PTR_TO_RVA, RVA_TO_PTR, OFFSET_TO_PTR, get_section_info)
1107 (copy_executable_and_dump_data): Use DWORD_PTR instead of DWORD
1108 for compatibility with x64.
1110 * sysdep.c (STDERR_FILENO): Define if not already defined.
1112 * ralloc.c (real_morecore): Argument type is now ptrdiff_t.
1113 (__morecore): Argument type is now ptrdiff_t.
1114 (ROUNDUP, MEM_ROUNDUP): Use size_t instead of 'unsigned long'.
1115 (relinquish): Use ptrdiff_t type for 'excess'.
1116 (r_alloc_sbrk): Argument type is now ptrdiff_t.
1118 * makefile.w32-in (HEAPSIZE): Get value from EMACS_HEAPSIZE.
1119 (bootstrap-temacs-CMD, bootstrap-temacs-SH): Use $(EMACS_PURESIZE)
1120 instead of a literal number.
1122 * gmalloc.c [WINDOWSNT]: Include w32heap.h.
1123 (min): Define only if not already defined.
1125 * frame.c (x_report_frame_params): Use EMACS_UINT for the return
1126 value of FRAME_X_WINDOW, to fit a 64-bit pointer on 64-bit Windows
1129 * image.c (x_bitmap_pixmap): Return ptrdiff_t, not int, since
1130 'bitmaps' is a pointer.
1132 * dispextern.h (x_bitmap_pixmap): Adjust prototype.
1134 * alloc.c (gdb_make_enums_visible): Now conditional on __GNUC__.
1136 2012-09-30 Paul Eggert <eggert@cs.ucla.edu>
1138 file-attributes has a new optional arg FOLLOW-SYMLINKS.
1139 * dired.c (directory_files_internal, Ffile_attributes):
1140 New arg follow_symlinks. All uses changed.
1142 2012-09-30 Stefan Monnier <monnier@iro.umontreal.ca>
1144 * .gdbinit (xbacktrace): Adjust to recent "struct backtrace" change.
1146 2012-09-30 Eli Zaretskii <eliz@gnu.org>
1148 Support atimers and CPU profiler via profile.c on MS-Windows.
1149 * w32proc.c (sig_mask, crit_sig): New static variables.
1150 (sys_signal): Support SIGALRM and SIGPROF.
1151 (sigemptyset, sigaddset, sigfillset, sigprocmask)
1152 (pthread_sigmask, setpgrp): Move here from w32.c. sigaddset,
1153 sigfillset, and sigprocmask are no longer no-ops.
1154 (sigismember): New function.
1155 (struct itimer_data): New definition.
1156 (ticks_now, real_itimer, prof_itimer, clocks_min, crit_real)
1157 (crit_prof): New static variables.
1158 (MAX_SINGLE_SLEEP): New definition.
1159 (timer_loop, stop_timer_thread, term_timers, init_timers)
1160 (start_timer_thread, getitimer, setitimer): New functions.
1161 (alarm): No longer a no-op, calls setitimer.
1163 * w32.c (term_ntproc): Call term_timers.
1164 (init_ntproc): Make sure all signals are unblocked at startup, to
1165 erase any traces of dumping. Call init_timers.
1167 * w32fns.c (hourglass_timer, HOURGLASS_ID): Remove.
1168 Windows-specific code to display the hourglass mouse pointer is no
1170 (w32_wnd_proc): Remove code that handled the WM_TIMER message due
1171 to hourglass timer expiration.
1172 (start_hourglass, cancel_hourglass, DEFAULT_HOURGLASS_DELAY):
1173 Remove, no longer used.
1174 (w32_note_current_window, show_hourglass, hide_hourglass):
1175 New functions, in support of hourglass cursor display similar to other
1177 (syms_of_w32fns): Don't initialize hourglass_timer.
1179 * xdisp.c (start_hourglass, cancel_hourglass): Now used on
1181 (start_hourglass) [WINDOWSNT]: Call w32_note_current_window.
1183 * w32.h (init_timers, term_timers): Add prototypes.
1185 2012-09-30 Kenichi Handa <handa@gnu.org>
1187 * coding.c (decode_coding_ccl, encode_coding_ccl): Pay attention
1188 to the buffer relocation which may be caused by ccl_driver.
1190 2012-09-30 Jan Djärv <jan.h.d@swipnet.se>
1192 * xfns.c (Fx_file_dialog): Update comment.
1194 * w32fns.c (Fx_file_dialog): Update comment.
1196 * nsfns.m (Fns_read_file_name): Add argument DIR_ONLY_P.
1197 Initialize panel name field if OSX >= 10.6.
1199 * fileio.c (Fnext_read_file_uses_dialog_p): Add HAVE_NS.
1201 * nsfns.m (ns_frame_parm_handlers): Add x_set_fullscreen.
1203 * nsterm.m (NEW_STYLE_FS): New define.
1204 (ns_fullscreen_hook, windowWillEnterFullScreen)
1205 (windowDidEnterFullScreen, windowWillExitFullScreen)
1206 (windowDidExitFullScreen, toggleFullScreen, handleFS)
1207 (setFSValue): New functions.
1208 (EmacsFSWindow): New implementation.
1209 (canBecomeKeyWindow): New function for EmacsFSWindow.
1210 (ns_create_terminal): Set fullscreen_hook to ns_fullscreen_hook.
1211 (dealloc): Release nonfs_window if in fullscreen.
1212 (updateFrameSize:): Call windowDidMove to update top/left.
1213 (windowWillResize:toSize:): Check if frame is still maximized.
1214 (initFrameFromEmacs:): Initialize fs_state, fs_before_fs,
1215 next_maximized, maximized_width, maximized_height and nonfs_window.
1216 Call setCollectionBehavior if NEW_STYLE_FS. Initialize bwidth and
1218 (windowWillUseStandardFrame:defaultFrame:): Update frame parameter
1219 fullscreen. Set maximized_width/height. Act on next_maximized.
1221 * nsterm.h (MAC_OS_X_VERSION_10_7, MAC_OS_X_VERSION_10_8): New.
1222 (EmacsView): Add variables for fullscreen.
1223 (handleFS, setFSValue, toggleFullScreen): New in EmacsView.
1224 (EmacsFSWindow): New interface for fullscreen.
1226 2012-09-30 Juanma Barranquero <lekktu@gmail.com>
1228 * makefile.w32-in ($(BLD)/profiler.$(O)): Update dependencies.
1230 2012-09-30 Chong Yidong <cyd@gnu.org>
1232 * fns.c (Frandom): Doc fix.
1234 2012-09-30 Martin Rudalics <rudalics@gmx.at>
1236 * window.c (Vwindow_combination_limit): New default value.
1237 (Qwindow_size): New symbol replacing Qtemp_buffer_resize.
1239 2012-09-30 Paul Eggert <eggert@cs.ucla.edu>
1241 * syssignal.h (PROFILER_CPU_SUPPORT): Don't define if PROFILING.
1242 Suggested by Eli Zaretskii in
1243 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00811.html>.
1245 2012-09-30 Eli Zaretskii <eliz@gnu.org>
1247 * profiler.c (Fprofiler_cpu_stop): Use timer_settime only if
1248 HAVE_TIMER_SETTIME is defined.
1250 2012-09-30 Paul Eggert <eggert@cs.ucla.edu>
1252 Profiler improvements: more-accurate timers, overflow checks.
1253 * profiler.c: Don't include stdio.h, limits.h, sys/time.h,
1254 signal.h, setjmp.h. Include systime.h instead.
1255 (saturated_add): New function.
1256 (record_backtrace, current_sample_interval): Use EMACS_INT, not size_t.
1257 (record_backtrace, handle_profiler_signal): Saturate on fixnum overflow.
1258 (profiler_timer, profiler_timer_ok) [HAVE_TIMER_SETTIME]:
1260 (enum profiler_cpu_running): New enum.
1261 (profiler_cpu_running): Now of that enum type, not bool.
1262 All uses changed to store the new value.
1263 (handle_profiler_signal): Rename from sigprof_handler_1,
1264 for consistency with other handlers. Do not check whether
1265 cpu_log is a hash-table if garbage collecting, since it
1266 doesn't matter in that case.
1267 (deliver_profiler_signal): Rename from sigprof_handler,
1268 for consistency with other handlers.
1269 (setup_cpu_timer): New function, with much of what used to be in
1270 Fprofiler_cpu_start. Check for out-of-range argument.
1271 Prefer timer_settime if available, and prefer
1272 thread cputime clocks, then process cputime clocks, then
1273 monotonic clocks, to the old realtime clock. Use make_timeval
1274 to round more-correctly when falling back to setitimer.
1275 (Fprofiler_cpu_start): Use it.
1276 (Fprofiler_cpu_stop): Prefer timer_settime if available.
1277 Don't assume that passing NULL as the 2nd argument of setitimer
1278 is the same as passing a pointer to all-zero storage.
1279 Ignore SIGPROF afterwards.
1280 (malloc_probe): Saturate at MOST_POSITIVE_FIXNUM.
1281 * sysdep.c (emacs_sigaction_init): Also mask out SIGPROF in
1282 non-fatal signal handlers. Ignore SIGPROF on startup.
1283 * syssignal.h (PROFILER_CPU_SUPPORT): Define this macro here, not
1284 in profiler.c, since sysdep.c now uses it.
1286 * sysdep.c (handle_fatal_signal): Bump backtrace size to 40.
1287 Suggested by Eli Zaretskii in
1288 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00796.html>.
1290 2012-09-29 Juanma Barranquero <lekktu@gmail.com>
1292 * makefile.w32-in ($(BLD)/profiler.$(O)): Update dependencies.
1294 2012-09-29 Stefan Monnier <monnier@iro.umontreal.ca>
1296 * lisp.h (struct backtrace): Remove indirection for `function' field.
1297 * xdisp.c (redisplay_internal):
1298 * profiler.c (record_backtrace, sigprof_handler_1):
1299 * alloc.c (Fgarbage_collect):
1300 * eval.c (interactive_p, Fsignal, eval_sub, Ffuncall, Fbacktrace)
1301 (Fbacktrace_frame): Adjust accordingly.
1303 2012-09-28 Glenn Morris <rgm@gnu.org>
1305 * eval.c (Frun_hook_with_args, Frun_hook_with_args_until_success)
1306 (Frun_hook_with_args_until_failure): Doc fixes.
1308 2012-09-28 Eli Zaretskii <eliz@gnu.org>
1310 * xdisp.c (syms_of_xdisp) <Qredisplay_internal>: Rename from
1311 Qautomatic_redisplay and change the symbol name. All users changed.
1313 2012-09-28 Tomohiro Matsuyama <tomo@cx4a.org>
1315 * profiler.c (sigprof_handler): Fix race condition.
1317 2012-09-28 Glenn Morris <rgm@gnu.org>
1319 * lread.c (lisp_file_lexically_bound_p): Handle #! lines. (Bug#12528)
1321 2012-09-27 Paul Eggert <eggert@cs.ucla.edu>
1323 Check more robustly for timer_settime.
1324 * Makefile.in (LIB_TIMER_TIME): New macro.
1326 * atimer.c (alarm_timer, alarm_timer_ok, set_alarm, init_atimer):
1327 Use HAVE_TIMER_SETTIME, not SIGEV_SIGNAL, to decide whether to
1330 2012-09-26 Tomohiro Matsuyama <tomo@cx4a.org>
1332 * profiler.c (Fprofiler_cpu_start): Remove unnecessary flag SA_SIGINFO.
1334 2012-09-26 Juanma Barranquero <lekktu@gmail.com>
1336 * makefile.w32-in ($(BLD)/profiler.$(O)): Update dependencies.
1338 2012-09-26 Paul Eggert <eggert@cs.ucla.edu>
1340 * character.h (MAYBE_UNIFY_CHAR): Remove.
1341 * charset.c, charset.h (maybe_unify_char): Now static.
1342 * charset.c (decode_char): Use maybe_unify_char, not MAYBE_UNIFY_CHAR.
1343 Since this stuff is now private to charset.c, there's no need for
1344 a public macro and no need to inline by hand.
1346 2012-09-26 Tomohiro Matsuyama <tomo@cx4a.org>
1347 Stefan Monnier <monnier@iro.umontreal.ca>
1348 Juanma Barranquero <lekktu@gmail.com>
1350 * profiler.c: New file.
1351 * Makefile.in (base_obj): Add profiler.o.
1352 * makefile.w32-in (OBJ2, GLOBAL_SOURCES): Add profiler.c.
1353 ($(BLD)/profiler.$(O)): New target.
1354 * emacs.c (main): Call syms_of_profiler.
1355 * alloc.c (Qautomatic_gc): New constant.
1356 (MALLOC_PROBE): New macro.
1357 (xmalloc, xzalloc, xrealloc, lisp_malloc, lisp_align_malloc): Use it.
1358 (total_bytes_of_live_objects): New function.
1359 (Fgarbage_collect): Use it. Record itself in backtrace_list.
1360 Call malloc_probe for the memory profiler.
1361 (syms_of_alloc): Define Qautomatic_gc.
1362 * eval.c (eval_sub, Ffuncall): Reorder assignments to avoid
1364 (struct backtrace): Move definition...
1365 * lisp.h (struct backtrace): ..here.
1366 (Qautomatic_gc, profiler_memory_running): Declare vars.
1367 (malloc_probe, syms_of_profiler): Declare functions.
1368 * xdisp.c (Qautomatic_redisplay): New constant.
1369 (redisplay_internal): Record itself in backtrace_list.
1370 (syms_of_xdisp): Define Qautomatic_redisplay.
1372 2012-09-25 Eli Zaretskii <eliz@gnu.org>
1373 2012-09-25 Juanma Barranquero <lekktu@gmail.com>
1375 * makefile.w32-in ($(BLD)/callproc.$(O)): Update dependencies.
1377 2012-09-25 Paul Eggert <eggert@cs.ucla.edu>
1379 Prefer POSIX timers if available.
1380 They avoid a race if the timer is too close to the current time.
1381 * atimer.c (alarm_timer, alarm_timer_ok) [SIGEV_SIGNAL]: New static vars.
1382 (set_alarm) [SIGEV_SIGNAL]: Use POSIX timers if available.
1383 (init_atimer) [SIGEV_SIGNAL]: Initialize them.
1385 2012-09-25 Eli Zaretskii <eliz@gnu.org>
1387 * coding.c (CHAR_STRING_ADVANCE_NO_UNIFY): Make it an alias of
1388 CHAR_STRING_ADVANCE.
1389 (STRING_CHAR_ADVANCE_NO_UNIFY): Make it an alias of
1390 STRING_CHAR_ADVANCE.
1392 2012-09-25 Juanma Barranquero <lekktu@gmail.com>
1394 Move Vlibrary_cache to emacs.c and reset before dumping.
1396 * lisp.h (reset_image_types): Declare.
1397 [WINDOWSNT] (Vlibrary_cache): Declare.
1399 * image.c (reset_image_types): New function.
1401 * emacs.c [WINDOWSNT] (Vlibrary_cache): Move from w32.c.
1402 (syms_of_emacs) [WINDOWSNT] <Vlibrary_cache>: Initialize and staticpro.
1403 (Fdump_emacs): Reset Vlibrary_cache and image_types.
1405 * w32.c (Vlibrary_cache): Do not define; moved to emacs.c
1406 (globals_of_w32) <Vlibrary_cache>: Do not initialize.
1408 * w32.h (Vlibrary_cache): Do not declare.
1410 2012-09-25 Eli Zaretskii <eliz@gnu.org>
1412 * w32proc.c (sys_signal): Handle all signals defined by the
1413 MS-Windows runtime, not just SIGCHLD. Actually install the signal
1414 handlers for signals supported by Windows. Don't override
1415 term_ntproc as the handler for SIGABRT.
1416 (sigaction): Rewrite to call sys_signal instead of duplicating its
1418 (sys_kill): Improve commentary.
1420 * w32.c (term_ntproc): Accept (and ignore) one argument, for
1421 consistency with a signature of a signal handler. All callers
1423 (init_ntproc): Accept an argument DUMPING. If dumping, don't
1424 install term_ntproc as a signal handler for SIGABRT, as that
1425 should be done by the dumped Emacs.
1427 * w32.h (init_ntproc, term_ntproc): Adjust prototypes.
1429 * w32select.c (term_w32select): Protect against repeated
1430 invocation by setting clipboard_owner to NULL after calling
1433 * emacs.c (shut_down_emacs, main): Adapt the calls to init_ntproc
1434 and term_ntproc to their modified signatures.
1436 * character.c (char_string, string_char): Remove calls to
1437 MAYBE_UNIFY_CHAR. See the discussion starting at
1438 http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00433.html
1441 2012-09-25 Chong Yidong <cyd@gnu.org>
1443 * xdisp.c (mode_line_inverse_video): Delete obsolete variable.
1445 2012-09-24 Stefan Monnier <monnier@iro.umontreal.ca>
1447 * bytecode.c (exec_byte_code): Signal an error instead of aborting,
1448 when encountering an unknown bytecode.
1450 2012-09-24 Paul Eggert <eggert@cs.ucla.edu>
1452 image.c, indent.c: Use bool for booleans.
1453 * dispextern.h (struct image_type): Members valid_p, load, init
1454 now return bool, not int. All uses changed.
1455 * image.c: Omit unnecessary static decls.
1456 (x_create_bitmap_mask, x_build_heuristic_mask):
1457 Return void, not int, since callers don't care about the return value.
1458 (x_create_bitmap_mask, define_image_type, valid_image_p)
1459 (struct image_keyword, parse_image_spec, image_spec_value)
1460 (check_image_size, image_background)
1461 (image_background_transparent, x_clear_image_1)
1462 (postprocess_image, lookup_image, x_check_image_size)
1463 (x_create_x_image_and_pixmap, xbm_image_p)
1464 (Create_Pixmap_From_Bitmap_Data, xbm_read_bitmap_data)
1465 (xbm_load_image, xbm_file_p, xbm_load, xpm_lookup_color)
1466 (init_xpm_functions, xpm_valid_color_symbols_p, xpm_image_p)
1467 (xpm_load, xpm_load_image, lookup_rgb_color, lookup_pixel_color)
1468 (x_to_xcolors, x_build_heuristic_mask, pbm_image_p, pbm_load)
1469 (png_image_p, init_png_functions, png_load_body, png_load)
1470 (jpeg_image_p, init_jpeg_functions, jpeg_load_body, jpeg_load)
1471 (tiff_image_p, init_tiff_functions, tiff_load, gif_image_p)
1472 (init_gif_functions, gif_load, imagemagick_image_p)
1473 (imagemagick_load_image, imagemagick_load, svg_image_p)
1474 (init_svg_functions, svg_load, svg_load_image, gs_image_p)
1476 * nsimage.m (ns_load_image):
1477 * nsterm.m (ns_defined_color):
1478 * xfaces.c (tty_lookup_color, tty_defined_color, defined_color):
1479 * xfns.c (x_defined_color):
1480 * xterm.c (x_alloc_lighter_color_for_widget)
1481 (x_alloc_nearest_color_1, x_alloc_nearest_color)
1482 (x_alloc_lighter_color):
1483 * indent.c (disptab_matches_widthtab, current_column)
1484 (scan_for_column, string_display_width, indented_beyond_p)
1485 (compute_motion, vmotion, Fvertical_motion):
1486 Use bool for booleans.
1488 2012-09-24 Chong Yidong <cyd@gnu.org>
1490 * chartab.c (Fset_char_table_default): Obsolete function removed.
1492 2012-09-23 Paul Eggert <eggert@cs.ucla.edu>
1494 Move pid_t related decls out of lisp.h.
1495 * lisp.h, syswait.h (record_child_status_change, wait_for_termination)
1496 (interruptible_wait_for_termination):
1497 Move these decls from lisp.h to syswait.h, since they use pid_t.
1498 Needed on FreeBSD; see Herbert J. Skuhra in
1499 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00571.html>.
1500 * callproc.c: Include syswait.h.
1502 gnutls.c, gtkutil.c: Use bool for boolean.
1503 * gnutls.c (gnutls_global_initialized, init_gnutls_functions)
1504 (emacs_gnutls_handle_error):
1505 * gtkutil.c (xg_check_special_colors, xg_prepare_tooltip)
1506 (xg_hide_tooltip, xg_create_frame_widgets)
1507 (create_dialog, xg_uses_old_file_dialog)
1508 (xg_get_file_with_chooser, xg_get_file_with_selection)
1509 (xg_get_file_name, xg_have_tear_offs, create_menus, xg_create_widget)
1510 (xg_item_label_same_p, xg_update_menubar)
1511 (xg_modify_menubar_widgets, xg_event_is_for_menubar)
1512 (xg_ignore_gtk_scrollbar, xg_set_toolkit_scroll_bar_thumb)
1513 (xg_event_is_for_scrollbar, xg_pack_tool_bar, xg_make_tool_item)
1514 (is_box_type, xg_tool_item_stale_p, xg_update_tool_bar_sizes)
1515 (update_frame_tool_bar, free_frame_tool_bar):
1516 * gtkutil.c, w32term.c, xterm.c (x_wm_set_size_hint):
1517 * nsmenu.m (ns_update_menubar):
1518 * nsmenu.m, w32menu.c, xmenu.c (set_frame_menubar):
1519 * xfns.c (Fx_show_tip) [USE_GTK]:
1520 Use bool for boolean.
1521 * gtkutil.c (xg_update_frame_menubar):
1522 * xmenu.c (update_frame_menubar):
1523 Return void, not int, since caller ignores return value.
1524 * gtkutil.c (xg_change_toolbar_position):
1527 2012-09-23 Juanma Barranquero <lekktu@gmail.com>
1529 * makefile.w32-in (BLOCKINPUT_H): Remove.
1530 (SYSSIGNAL_H): New macro.
1531 ($(BLD)/alloc.$(O), $(BLD)/atimer.$(O), $(BLD)/buffer.$(O))
1532 ($(BLD)/callproc.$(O), $(BLD)/data.$(O), $(BLD)/dired.$(O))
1533 ($(BLD)/dispnew.$(O), $(BLD)/editfns.$(O), $(BLD)/emacs.$(O))
1534 ($(BLD)/eval.$(O), $(BLD)/fileio.$(O), $(BLD)/floatfns.$(O))
1535 ($(BLD)/fns.$(O), $(BLD)/fontset.$(O), $(BLD)/frame.$(O))
1536 ($(BLD)/fringe.$(O), $(BLD)/image.$(O), $(BLD)/insdel.$(O))
1537 ($(BLD)/keyboard.$(O), $(BLD)/keymap.$(O), $(BLD)/lread.$(O))
1538 ($(BLD)/menu.$(O), $(BLD)/w32inevt.$(O), $(BLD)/w32proc.$(O))
1539 ($(BLD)/print.$(O), $(BLD)/process.$(O), $(BLD)/ralloc.$(O))
1540 ($(BLD)/search.$(O), $(BLD)/sound.$(O), $(BLD)/sysdep.$(O))
1541 ($(BLD)/term.$(O), $(BLD)/window.$(O), $(BLD)/xdisp.$(O))
1542 ($(BLD)/xfaces.$(O), $(BLD)/w32fns.$(O), $(BLD)/w32menu.$(O))
1543 ($(BLD)/w32term.$(O), $(BLD)/w32select.$(O), $(BLD)/w32reg.$(O))
1544 ($(BLD)/w32xfns.$(O)): Update dependencies.
1546 2012-09-23 Eli Zaretskii <eliz@gnu.org>
1548 * .gdbinit: Set breakpoint on terminate_due_to_signal, not on
1549 fatal_error_backtrace.
1551 * w32proc.c (sys_kill): Undo last change: don't do anything when
1552 invoked to deliver SIGABRT to our own process. This is now
1553 handled by emacs_raise.
1555 2012-09-23 Juanma Barranquero <lekktu@gmail.com>
1557 * w32term.c (w32_read_socket): Remove leftover reference to
1558 interrupt_input_pending.
1560 2012-09-23 Paul Eggert <eggert@cs.ucla.edu>
1562 Do not use SA_NODEFER.
1563 Problem reported by Dani Moncayo in
1564 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00557.html>.
1566 * sysdep.c (emacs_abort): Do not reset signal handler.
1567 * emacs.c (terminate_due_to_signal): Reset signal handler here.
1568 * sysdep.c (init_signals): Do not use SA_NODEFER. It wasn't
1569 wanted even on POSIXish hosts, and it doesn't work on Windows.
1571 2012-09-23 Jan Djärv <jan.h.d@swipnet.se>
1573 * xterm.c (x_term_init): Call fixup_locale before and after calling
1574 gtk_init (Bug#12392).
1576 2012-09-23 Chong Yidong <cyd@gnu.org>
1578 * w32.c (w32_delayed_load): Remove LIBRARIES argument; always use
1579 Vdynamic_library_alist.
1581 * gnutls.c (init_gnutls_functions): Caller changed; remove arg.
1582 (Fgnutls_available_p): Caller changed.
1584 * xml.c (init_libxml2_functions, Flibxml_parse_html_region)
1585 (Flibxml_parse_xml_region): Likewise.
1587 * dispextern.h (struct image_type): Remove arg from init function.
1589 * image.c (Finit_image_library, lookup_image_type)
1590 (define_image_type): Remove now-unneeded second arg.
1591 (init_xpm_functions, init_png_functions, init_jpeg_functions)
1592 (init_tiff_functions, init_gif_functions, init_svg_functions):
1593 Arglist and w32_delayed_load calling convention changed.
1594 (gs_type): Remove init_gs_functions; there is no such function.
1595 (valid_image_p, make_image): Fix caller to lookup_image_type.
1597 2012-09-23 Paul Eggert <eggert@cs.ucla.edu>
1599 Simplify and avoid signal-handling races (Bug#12471).
1601 * sysdep.c (emacs_abort) [HAVE_NTGUI]:
1602 Avoid recursive loop if there's a fatal error in the function itself.
1603 * atimer.c (pending_atimers):
1604 * blockinput.h: Don't include "atimer.h"; no longer needed.
1605 (interrupt_input_pending): Remove. All uses removed.
1606 pending_signals now counts both atimers and ordinary interrupts.
1607 This is less racy than having three separate pending-signal flags.
1608 (block_input, unblock_input, totally_unblock_input, unblock_input_to)
1610 Rename from their upper-case counterparts BLOCK_INPUT,
1611 UNBLOCK_INPUT, TOTALLY_UNBLOCK_INPUT, UNBLOCK_INPUT_TO,
1612 INPUT_BLOCKED_P, and turn into functions. All uses changed.
1613 This makes it easier to access volatile variables more accurately.
1614 (BLOCK_INPUT_RESIGNAL): Remove. All uses replaced by unblock_input ().
1615 (input_blocked_p): Prefer this to 'interrupt_input_blocked', as
1616 that's more reliable if the code is buggy and sets
1617 interrupt_input_blocked to a negative value. All uses changed.
1618 * atimer.c (deliver_alarm_signal):
1619 Remove. No need to deliver this to the parent; any thread can
1620 handle this signal now. All uses replaced by underlying handler.
1621 * atimer.c (turn_on_atimers):
1622 * dispnew.c (handle_window_change_signal):
1623 * emacs.c (handle_danger_signal):
1624 * keyboard.c (kbd_buffer_get_event):
1625 Don't reestablish signal handler; not needed with sigaction.
1626 * blockinput.h (UNBLOCK_INPUT_TO, TOTALLY_UNBLOCK_INPUT)
1628 Rework to avoid unnecessary accesses to volatile variables.
1629 (UNBLOCK_INPUT_TO): Now a function.
1630 (totally_unblock_input, unblock_input): New decls.
1631 * data.c (handle_arith_signal, deliver_arith_signal): Move to sysdep.c
1632 (init_data): Remove. Necessary stuff now done in init_signal.
1633 * emacs.c, xdisp.c: Include "atimer.h", since we invoke atimer functions.
1634 * emacs.c (handle_fatal_signal, deliver_fatal_signal): Move to sysdep.c.
1635 (fatal_error_code): Remove; no longer needed.
1636 (terminate_due_to_signal): Rename from fatal_error_backtrace, since
1637 it doesn't always backtrace. All uses changed. No need to reset
1638 signal to default, since sigaction and/or die does that for us now.
1639 Use emacs_raise (FOO), not kill (getpid (), FOO).
1640 (main): Check more-accurately whether we're dumping.
1641 Move fatal-error setup to sysdep.c
1642 * floatfns.c: Do not include "syssignal.h"; no longer needed.
1643 * gtkutil.c (xg_get_file_name, xg_get_font):
1644 Remove no-longer-needed signal-mask manipulation.
1645 * keyboard.c, process.c (POLL_FOR_INPUT):
1646 Don't depend on USE_ASYNC_EVENTS, a symbol that is never defined.
1647 * keyboard.c (read_avail_input): Remove.
1648 All uses replaced by gobble_input.
1649 (Ftop_level): Use TOTALLY_UNBLOCK_INPUT rather than open code.
1650 (kbd_buffer_store_event_hold, gobble_input):
1651 (record_asynch_buffer_change) [USABLE_SIGIO]:
1652 (store_user_signal_events):
1653 No need to mess with signal mask.
1654 (gobble_input): If blocking input and there are terminals, simply
1655 set pending_signals to 1 and return. All hooks changed to not
1656 worry about whether input is blocked.
1657 (process_pending_signals): Clear pending_signals before processing
1658 them, in case a signal comes in while we're processing.
1659 By convention callers now test pending_signals before calling us.
1660 (UNBLOCK_INPUT_TO, unblock_input, totally_unblock_input):
1661 New functions, to support changes to blockinput.h.
1662 (handle_input_available_signal): Now extern.
1663 (reinvoke_input_signal): Remove. All uses replaced by
1665 (quit_count): Now volatile, since a signal handler uses it.
1666 (handle_interrupt): Now takes bool IN_SIGNAL_HANDLER as arg.
1667 All callers changed. Block SIGINT only if not already blocked.
1668 Clear sigmask reliably, even if Fsignal returns, which it can.
1669 Omit unnecessary accesses to volatile var.
1670 (quit_throw_to_read_char): No need to restore sigmask.
1671 * keyboard.c (gobble_input, handle_user_signal):
1672 * process.c (wait_reading_process_output):
1673 Call signal-handling code rather than killing ourselves.
1674 * lisp.h: Include <float.h>, for...
1675 (IEEE_FLOATING_POINT): New macro, moved here to avoid duplication.
1676 (pending_signals): Now volatile.
1677 (syms_of_data): Now const if IEEE floating point.
1678 (handle_input_available_signal) [USABLE_SIGIO]:
1679 (terminate_due_to_signal, record_child_status_change): New decls.
1680 * process.c (create_process): Avoid disaster if memory is exhausted
1681 while we're processing a vfork, by tightening the critical section
1683 (send_process_frame, process_sent_to, handle_pipe_signal)
1684 (deliver_pipe_signal): Remove. No longer needed, as Emacs now
1686 (send_process): No need for setjmp/longjmp any more, since the
1687 SIGPIPE stuff is now gone. Instead, report an error if errno
1689 (record_child_status_change): Now extern. PID and W are now args.
1690 Return void, not bool. All callers changed.
1691 * sysdep.c (wait_debugging) [(BSD_SYSTEM || HPUX) && !defined (__GNU__)]:
1692 Remove. All uses removed. This bug should be fixed now in a
1694 (wait_for_termination_1): Use waitpid rather than sigsuspend,
1695 and record the child status change directly. This avoids the
1696 need to futz with the signal mask.
1697 (process_fatal_action): Move here from emacs.c.
1698 (emacs_sigaction_flags): New function, containing
1699 much of what used to be in emacs_sigaction_init.
1700 (emacs_sigaction_init): Use it. Block nonfatal system signals that are
1701 caught by emacs, to make races less likely.
1702 (deliver_process_signal): Rename from handle_on_main_thread.
1704 (BACKTRACE_LIMIT_MAX): Now at top level.
1705 (thread_backtrace_buffer, threadback_backtrace_pointers):
1707 (deliver_thread_signal, deliver_fatal_thread_signal):
1708 New functions, for more-accurate delivery of thread-specific signals.
1709 (handle_fatal_signal, deliver_fatal_signal): Move here from emacs.c.
1710 (deliver_arith_signal): Handle in this thread, not
1711 in the main thread, since it's triggered by this thread.
1712 (maybe_fatal_sig): New function.
1713 (init_signals): New arg DUMPING so that we can be more accurate
1714 about whether we're dumping. Caller changed.
1715 Treat thread-specific signals differently from process-general signals.
1716 Block all signals while handling fatal error; that's safer.
1717 xsignal from SIGFPE only on non-IEEE hosts, treating it as fatal
1719 When batch, ignore SIGHUP, SIGINT, SIGTERM if they were already ignored.
1720 Ignore SIGPIPE unless batch.
1721 (emacs_backtrace): Output backtrace for the appropriate thread,
1722 which is not necessarily the main thread.
1723 * syssignal.h: Include <stdbool.h>.
1724 (emacs_raise): New macro.
1725 * xterm.c (x_connection_signal): Remove; no longer needed
1726 now that we use sigaction.
1727 (x_connection_closed): No need to mess with sigmask now.
1728 (x_initialize): No need to reset SIGPIPE handler here, since
1729 init_signals does this for us now.
1731 2012-09-23 Jan Djärv <jan.h.d@swipnet.se>
1733 * nsterm.m (ns_dumpglyphs_image): dr is a new rect to draw image into,
1734 background rect may be larger (Bug#12245).
1736 2012-09-23 Chong Yidong <cyd@gnu.org>
1738 * keyboard.c (timer_check): Avoid quitting during Fcopy_sequence.
1740 2012-09-22 Paul Eggert <eggert@cs.ucla.edu>
1742 * .gdbinit: Just stop at fatal_error_backtrace.
1743 See Stefan Monnier's request in
1744 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00549.html>.
1745 Remove no-longer-used query of system type.
1747 2012-09-22 Chong Yidong <cyd@gnu.org>
1749 * search.c (Freplace_match): Doc fix (Bug#12325).
1751 * minibuf.c (Finternal_complete_buffer): Doc fix (Bug#12391).
1753 * editfns.c (Fline_beginning_position): Doc fix (Bug#12416).
1754 (Fline_end_position): Doc fix.
1756 * cmds.c (Fforward_char, Fbackward_char): Doc fix (Bug#12414).
1758 2012-09-22 Chong Yidong <cyd@gnu.org>
1760 * dispextern.h (struct image_type): Add new slot, storing a type
1761 initialization function.
1763 * image.c (define_image_type): Call the image initializer function
1764 if it is defined. Arguments and return value changed.
1765 (valid_image_p, make_image): Callers changed.
1766 (xbm_type, xpm_type, pbm_type, png_type, jpeg_type, tiff_type)
1767 (gif_type, imagemagick_type, svg_type, gs_type):
1768 Add initialization functions.
1769 (Finit_image_library): Call lookup_image_type.
1770 (CHECK_LIB_AVAILABLE): Macro deleted.
1771 (lookup_image_type): Call define_image_type here, rather than via
1772 Finit_image_library, and without using CHECK_LIB_AVAILABLE.
1773 (syms_of_image): Move define_image_type calls for xbm_type and
1774 pbm_type to lookup_image_type.
1776 2012-09-22 Eli Zaretskii <eliz@gnu.org>
1778 * keyboard.c (timer_check_2): Move calculation of 'timers' and
1779 'idle_timers' from here ...
1780 (timer_check): ... to here. Use Fcopy_sequence to copy the timer
1781 lists, to avoid infloops when the timer does something stupid,
1782 like reinvoke itself with the same or smaller time-out.
1785 2012-09-22 Martin Rudalics <rudalics@gmx.at>
1787 * window.c (Fsplit_window_internal): Handle only Qt value of
1788 Vwindow_combination_limit separately.
1789 (Qtemp_buffer_resize): New symbol.
1790 (Vwindow_combination_limit): New default value.
1793 2012-09-22 Eli Zaretskii <eliz@gnu.org>
1795 * xdisp.c (next_overlay_string): Initialize it->end_charpos for
1796 the new overlay string. (Bug#10159)
1798 2012-09-22 Paul Eggert <eggert@cs.ucla.edu>
1800 * emacs.c (shut_down_emacs): Don't assume stderr is buffered,
1801 or that fprintf is async-signal-safe. POSIX doesn't require
1804 2012-09-22 Chong Yidong <cyd@gnu.org>
1806 * buffer.c (Fset_buffer_modified_p): Handle indirect buffers
1809 2012-09-22 Kenichi Handa <handa@gnu.org>
1811 * composite.c (composition_reseat_it): Handle the case that a
1812 grapheme cluster is not covered by a single font (Bug#12352).
1814 2012-09-21 Chong Yidong <cyd@gnu.org>
1816 * image.c (define_image_type): Avoid adding duplicate types to
1817 image_types (Bug#12463). Suggested by Jörg Walter.
1819 2012-09-21 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
1821 * unexmacosx.c: Define LC_DATA_IN_CODE if not defined.
1822 (print_load_command_name): Add case LC_DATA_IN_CODE.
1823 (dump_it) [LC_DATA_IN_CODE]: Call copy_linkedit_data.
1825 2012-09-21 Glenn Morris <rgm@gnu.org>
1827 * eval.c (Frun_hook_with_args_until_success)
1828 (Frun_hook_with_args_until_failure): Doc fixes. (Bug#12393)
1830 2012-09-21 Andreas Schwab <schwab@linux-m68k.org>
1832 * fileio.c (Ffile_selinux_context): Only call freecon when
1833 lgetfilecon succeeded.
1834 (Fset_file_selinux_context): Likewise. (Bug#12444)
1836 2012-09-21 Eli Zaretskii <eliz@gnu.org>
1838 * xdisp.c (try_window_reusing_current_matrix): Under bidi
1839 reordering, locate the cursor by calling set_cursor_from_row; if
1840 that fails, clear the desired glyph matrix before returning a
1841 failure indication to the caller. Fixes leaving garbled display
1842 when fast scrolling with a down-key. (Bug#12403)
1843 (compute_stop_pos_backwards): Fix a typo that caused crashes while
1844 scrolling through multibyte text.
1846 2012-09-20 Stefan Monnier <monnier@iro.umontreal.ca>
1848 * alloc.c (mark_object) <PVEC_WINDOW>: Mark prev/next_buffers *after*
1849 calling mark_vectorlike since that's the one that marks the window.
1850 (mark_discard_killed_buffers): Mark the final cdr.
1851 * window.h (struct window): Move prev/next_buffers to the
1852 non-standard fields.
1853 * window.c (make_window): Initialize prev/next_buffers manually.
1855 2012-09-20 Paul Eggert <eggert@cs.ucla.edu>
1857 Omit unused arg EXPECTED from socket hooks.
1858 * keyboard.c (gobble_input, read_avail_input, tty_read_avail_input):
1859 * nsterm.m (ns_term_init):
1860 * termhooks.h (struct terminal.read_socket_hook):
1861 * w32inevt.c (w32_console_read_socket):
1862 * w32term.c (w32_read_socket):
1863 * xterm.c (XTread_socket):
1864 Omit unused arg EXPECTED. All callers changed.
1865 (store_user_signal_events): Return void, not int, since callers no
1866 longer care about the return value. All uses changed.
1868 2012-09-20 Juanma Barranquero <lekktu@gmail.com>
1870 * w32gui.h (XParseGeometry): Do not declare.
1872 2012-09-19 Paul Eggert <eggert@cs.ucla.edu>
1874 * w32inevt.c (w32_console_read_socket): Return -1 on failure, not 0.
1875 Ignore 'expected'. See Eli Zaretskii in
1876 <http://bugs.gnu.org/12471#8> (last line).
1878 * frame.c (read_integer): Remove. All uses replaced by strtol/strtoul.
1879 (XParseGeometry): Now static. Substitute extremal values for
1880 values that are out of range.
1882 2012-09-19 Jan Djärv <jan.h.d@swipnet.se>
1884 * w32xfns.c (read_integer, XParseGeometry): Move to frame.c.
1886 * nsfns.m (XParseGeometry): Remove.
1887 (Fx_create_frame): Call x_set_offset to correctly interpret
1888 top_pos in geometry.
1890 * frame.c (read_integer, XParseGeometry): Move from w32xfns.c.
1891 (Fx_parse_geometry): If there is a space in string, call
1892 Qns_parse_geometry, otherwise do as on other terms (Bug#12368).
1894 2012-09-17 Eli Zaretskii <eliz@gnu.org>
1896 * search.c (scan_buffer): Use character positions in calls to
1897 region_cache_forward and region_cache_backward, not byte
1898 positions. (Bug#12196)
1900 * w32term.c (w32_read_socket): Set pending_signals to 1, like
1901 xterm.c does. Reported by Daniel Colascione <dancol@dancol.org>.
1903 * ralloc.c (r_alloc_init) [!SYSTEM_MALLOC]: Initialize
1904 __malloc_extra_blocks to 32 instead of 64, like alloc.c did in
1905 emacs_blocked_malloc, now deleted.
1907 2012-09-17 Paul Eggert <eggert@cs.ucla.edu>
1909 Remove no-longer-needed Solaris 2.4 vfork bug workaround.
1910 The workaround was for improving performance on Solaris 2.4, but
1911 is getting in the way now. Emacs will still work if someone is
1912 still running Solaris 2.4 in a museum somewhere; Sun dropped
1913 support for Solaris 2.4 in 2003.
1914 * callproc.c (Fcall_process) [HAVE_WORKING_VFORK]:
1915 * process.c (create_process) [HAVE_WORKING_VFORK]:
1916 Omit now-unnecessary workaround for the Solaris 2.4 vfork bug,
1917 since Emacs no longer uses vfork on that platform.
1919 2012-09-17 Glenn Morris <rgm@gnu.org>
1921 * emacs.c: Use COPYRIGHT.
1923 2012-09-16 Paul Eggert <eggert@cs.ucla.edu>
1925 Remove configure's --without-sync-input option (Bug#12450).
1926 When auditing signal-handling in preparation for cleaning it up,
1927 I found that SYNC_INPUT has race conditions and would be a real
1928 pain to fix. Since it's an undocumented and deprecated
1929 configure-time option, now seems like a good time to remove it.
1930 Also see <http://bugs.gnu.org/11080#16>.
1931 * alloc.c (_bytes_used, __malloc_extra_blocks, _malloc_internal)
1932 (_free_internal) [!DOUG_LEA_MALLOC]: Remove decls.
1933 (alloc_mutex) [!SYSTEM_MALLOC && !SYNC_INPUT && HAVE_PTHREAD]:
1934 (malloc_hysteresis):
1935 (check_depth) [XMALLOC_OVERRUN_CHECK]:
1936 (MALLOC_BLOCK_INPUT, MALLOC_UNBLOCK_INPUT):
1937 (__malloc_hook, __realloc_hook, __free_hook, BYTES_USED)
1938 (dont_register_blocks, bytes_used_when_reconsidered)
1939 (bytes_used_when_full, emacs_blocked_free, emacs_blocked_malloc)
1940 (emacs_blocked_realloc, reset_malloc_hooks, uninterrupt_malloc):
1941 [!SYSTEM_MALLOC && !SYNC_INPUT]:
1942 Remove. All uses removed.
1943 (MALLOC_BLOCK_INPUT, MALLOC_UNBLOCK_INPUT): Use a different
1944 implementation, one that depends on whether the new macro
1945 XMALLOC_BLOCK_INPUT_CHECK is defined, not on whether SYNC_INPUT
1947 * atimer.c (run_timers, handle_alarm_signal):
1948 * keyboard.c (pending_signal, poll_for_input_1, poll_for_input)
1949 (handle_async_input, process_pending_signals)
1950 (handle_input_available_signal, init_keyboard):
1951 * nsterm.m (ns_read_socket):
1952 * process.c (wait_reading_process_output):
1953 * regex.c (immediate_quit, IMMEDIATE_QUIT_CHECK):
1954 * sysdep.c (emacs_sigaction_init) [SA_RESTART]:
1956 * xterm.c (XTread_socket):
1958 * conf_post.h (SA_RESTART) [IRIX6_5]: Do not #undef.
1959 * eval.c (handling_signal): Remove. All uses removed.
1960 * lisp.h (ELSE_PENDING_SIGNALS): Remove.
1961 All uses replaced with the SYNC_INPUT version.
1962 (reset_malloc_hooks, uninterrupt_malloc, handling_signal):
1964 * sysdep.c, syssignal.h (main_thread) [FORWARD_SIGNAL_TO_MAIN_THREAD]:
1967 * font.c (Ffont_shape_gstring): Remove unused local.
1969 2012-09-16 Glenn Morris <rgm@gnu.org>
1971 * Makefile.in (clean): No longer run nextstep's clean.
1973 * Makefile.in (ns_appdir, ns_appbindir, ns_appsrc): Remove variables.
1975 (ns-app): Move here from ns.mk, and simplify.
1976 (clean): Simplify nextstep entry.
1977 * ns.mk: Remove file.
1979 2012-09-17 Kenichi Handa <handa@gnu.org>
1981 * font.c (Ffont_shape_gstring): Fix previous change; GLYPHs may
1982 not covert the last few charactes.
1984 2012-09-16 Kenichi Handa <handa@gnu.org>
1986 * font.c (Ffont_shape_gstring): Don't adjust grapheme cluster
1987 here, but just check the validity of glyphs in the glyph-string.
1989 2012-09-16 Martin Rudalics <rudalics@gmx.at>
1991 * window.c (Fwindow_parameter, Fset_window_parameter):
1992 Accept any window as argument (Bug#12452).
1994 2012-09-16 Jan Djärv <jan.h.d@swipnet.se>
1996 * nsfns.m (Fx_open_connection): Move initialization of ns_*_types
1997 to ns_term_init to avoid memory leak.
1999 * nsterm.m (ns_update_begin): Initialize bp after lcokFocus, use
2000 explicit retain/release.
2001 (ns_term_init): Only allow one display. Initialize outerpool and
2004 2012-09-15 Paul Eggert <eggert@cs.ucla.edu>
2006 Port _setjmp fix to POSIXish hosts as well as Microsoft.
2007 * image.c (_setjmp) [!HAVE__SETJMP]: Restore definition, as
2008 it's needed on POSIXish hosts that lack _setjmp. Attempt to solve
2009 the Microsoft problem in a different way, by altering ../nt/config.nt.
2011 2012-09-15 Eli Zaretskii <eliz@gnu.org>
2026 * w16select.c: Remove inclusion of setjmp.h, as it is now included
2027 by lisp.h. This completes removal of setjmp.h inclusion
2028 erroneously announced in the previous commit. (Bug#12446)
2030 * lisp.h [!HAVE__SETJMP, !HAVE_SIGSETJMP]: Make the commentary
2033 * image.c (_setjmp) [!HAVE__SETJMP]: Define only if 'setjmp' is
2034 not defined as a macro. The latter happens on MS-Windows.
2037 2012-09-15 Paul Eggert <eggert@cs.ucla.edu>
2039 Port better to POSIX hosts lacking _setjmp (Bug#12446).
2040 * lisp.h: Include <setjmp.h> here, since we use its symbols here.
2041 Some instances of '#include <setjmp.h>' removed, if the
2042 only reason for the instance was because "lisp.h" was included.
2043 (sys_jmp_buf, sys_setjmp, sys_longjmp): New symbols.
2044 Unless otherwise specified, replace all uses of jmp_buf, _setjmp,
2045 and _longjmp with the new symbols. Emacs already uses _setjmp if
2046 available, so this change affects only POSIXish hosts that have
2047 sigsetjmp but not _setjmp, such as some versions of Solaris and
2048 Unixware. (Also, POSIX-2008 marks _setjmp as obsolescent.)
2049 * image.c (_setjmp, _longjmp) [HAVE_PNG && !HAVE__SETJMP]: New macros.
2050 (png_load_body) [HAVE_PNG]:
2051 (PNG_LONGJMP) [HAVE_PNG && PNG_LIBPNG_VER < 10500]:
2052 (PNG_JMPBUF) [HAVE_PNG && PNG_LIBPNG_VER >= 10500]:
2053 Use _setjmp and _longjmp rather than sys_setjmp and sys_longjmp,
2054 since PNG requires jmp_buf. This is the only exception to the
2055 general rule that we now use sys_setjmp and sys_longjmp.
2056 This exception is OK since this code does not change the signal
2057 mask or longjmp out of a signal handler.
2059 2012-09-14 Paul Eggert <eggert@cs.ucla.edu>
2061 * alloc.c [!SYSTEM_MALLOC && !SYNC_INPUT && HAVE_PTHREAD]:
2062 Include "syssignal.h", for 'main_thread'.
2064 2012-09-14 Dmitry Antipov <dmantipov@yandex.ru>
2066 Avoid out-of-range marker position (Bug#12426).
2067 * insdel.c (replace_range, replace_range_2):
2068 Adjust markers before overlays, as suggested by comments.
2069 (insert_1_both, insert_from_buffer_1, adjust_after_replace):
2070 Remove redundant check before calling offset_intervals.
2072 2012-09-14 Martin Rudalics <rudalics@gmx.at>
2074 * xdisp.c (Fformat_mode_line): Unconditionally save/restore
2075 current buffer (Bug#12387).
2077 2012-09-14 Juanma Barranquero <lekktu@gmail.com>
2079 * makefile.w32-in ($(BLD)/alloc.$(O)): Update dependencies.
2081 2012-09-13 Paul Eggert <eggert@cs.ucla.edu>
2083 Use a more backwards-compatible timer format (Bug#12430).
2084 * keyboard.c (decode_timer): Get PSECS from the 8th (origin-0)
2085 vector element, not from the 4th, since PSECS is now at the end.
2086 (Fcurrent_idle_time): Doc fix.
2088 2012-09-13 Dmitry Antipov <dmantipov@yandex.ru>
2090 Function to mark objects and remove killed buffers at once.
2091 * alloc.c (discard_killed_buffers): Rename to ...
2092 (mark_discard_killed buffers) ... new name. Add marking
2093 of remaining objects. Fix comment. Adjust users.
2094 (mark_object): Do not touch frame buffer lists here.
2095 * frame.c (delete_frame): Reset frame buffer lists here.
2097 2012-09-13 Paul Eggert <eggert@cs.ucla.edu>
2099 Better workaround for GNOME bug when --enable-gcc-warnings.
2100 * emacsgtkfixed.c (G_STATIC_ASSERT): Remove, undoing last change.
2101 Instead, disable -Wunused-local-typedefs. See Dmitry Antipov in
2102 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00335.html>.
2104 Simplify SIGIO usage (Bug#12408).
2105 The code that dealt with SIGIO was crufty and confusing, e.g., it
2106 played tricks like "#undef SIGIO" but these tricks were not used
2107 consistently. Simplify mostly by not #undeffing standard symbols,
2108 e.g., use "defined USABLE_SIGIO" (our symbol, which we can define
2109 or not as we please) rather than "defined SIGIO" (standard symbol
2110 that we probably shouldn't #undef).
2111 * conf_post.h [USG5_4]: Do not include <sys/wait.h> here.
2112 Modules that need it can include it.
2113 [USG5_4 && emacs]: Likewise, do not include the streams stuff here.
2114 * dispextern.h (ignore_sigio): New decl.
2115 * emacs.c (shut_down_emacs): Invoke unrequest_sigio
2116 unconditionally, since it's now a no-op if !USABLE_SIGIO.
2117 * emacs.c (shut_down_emacs):
2118 * keyboard.c (kbd_buffer_store_event_hold):
2119 Use ignore_sigio rather than invoking 'signal' directly.
2120 * keyboard.c (USABLE_FIONREAD && USG5_4): Include <sys/filio.h>,
2122 (FIONREAD, SIGIO): Do not #undef.
2123 (tty_read_avail_input): Use #error rather than a syntax error.
2124 * process.c [USG5_4]: Include <sys/stream.h> and <sys/stropts.h>,
2125 for I_PIPE, used by SETUP_SLAVE_PTY.
2126 (DATAGRAM_SOCKETS): Simplify defn, based on USABLE_FIONREAD.
2127 * sysdep.c (croak): Remove; no longer needed. This bit of
2128 temporary code, with Fred N. Fish's comment that it's temporary,
2129 has been in Emacs since at least 1992!
2130 (init_sigio, reset_sigio, request_sigio, unrequest_sigio):
2131 Arrange for them to be no-ops in all cases when ! USABLE_SIGIO.
2132 * syssignal.h (croak): Remove decl.
2133 (SIGIO, SIGPOO, SIGAIO, SIGPTY): Do not #undef; that's too fragile.
2134 * systty.h [!NO_TERMIO]: Do not include <termio.h>; no longer needed
2135 now that we're termios-only.
2136 (FIONREAD, ASYNC) [BROKEN_FIONREAD]: Do not #undef.
2137 * term.c (dissociate_if_controlling_tty): Use #error rather than
2140 Work around GCC and GNOME bugs when --enable-gcc-warnings.
2141 * emacsgtkfixed.c (G_STATIC_ASSERT): Redefine to use 'verify',
2142 to work around GNOME bug 683906.
2143 * image.c (jpeg_load_body) [HAVE_JPEG && lint]: Pacify gcc -Wclobber.
2144 (struct my_jpeg_error_mgr) [HAVE_JPEG && lint]: New member fp.
2145 This works around GCC bug 54561.
2147 2012-09-12 Paul Eggert <eggert@cs.ucla.edu>
2149 More fixes for 'volatile' and setjmp/longjmp.
2150 * eval.c (Fdefvar, Fcondition_case): Remove unnecessary 'volatile's.
2151 * image.c (struct png_load_context) [HAVE_PNG]: New type.
2152 (png_load_body) [HAVE_PNG]:
2153 (jpeg_load_body) [HAVE_JPEG]:
2154 New function, with most of the old parent function's body.
2155 (png_load) [HAVE_PNG]:
2156 (jpeg_load) [HAVE_JPEG]:
2157 Invoke the new function, to avoid longjmp munging our locals.
2158 (struct my_jpeg_error_mgr) [HAVE_JPEG]: New members cinfo, failure_code.
2159 (my_error_exit) [HAVE_JPEG]: Don't trust 'setjmp' to return 2 when
2160 longjmp is passed 2, as the C standard doesn't guarantee this.
2161 Instead, store the failure code into mgr->failure_code.
2163 2012-09-12 Stefan Monnier <monnier@iro.umontreal.ca>
2165 * keyboard.c (read_char, requeued_events_pending_p, Finput_pending_p)
2166 (Fdiscard_input, quit_throw_to_read_char, init_keyboard)
2167 (syms_of_keyboard): Remove support for unread-command-char.
2169 2012-09-12 Eli Zaretskii <eliz@gnu.org>
2171 * w32proc.c (sys_kill): If PID is our process ID and the signal is
2172 SIGABRT, call emacs_abort. Avoids silently exiting upon assertion
2173 violation. (Bug#12426)
2175 2012-09-12 Paul Eggert <eggert@cs.ucla.edu>
2177 * image.c (jpeg_memory_src): Don't assume string len fits in unsigned.
2179 2012-09-12 Stefan Monnier <monnier@iro.umontreal.ca>
2181 * eval.c: Add `inhibit-debugger'.
2182 (Qinhibit_debugger): New symbol.
2183 (call_debugger): Bind it instead of Qdebug_on_error.
2184 (maybe_call_debugger): Test Vinhibit_debugger.
2185 (syms_of_eval): Define inhibit-debugger.
2186 * xdisp.c (set_message): Don't bind Qinhibit_debug_on_message.
2187 (syms_of_xdisp): Remove inhibit-debug-on-message.
2189 2012-09-11 Paul Eggert <eggert@cs.ucla.edu>
2191 Avoid _setjmp/_longjmp problems with local nonvolatile variables.
2192 If a nonvolatile local variable is written before a _longjmp to
2193 the frame containing the variable, and is read after the _longjmp,
2194 the value read is indeterminate. Some local variables of type
2195 'struct handler' and 'struct catchtag' are used in this way, so
2196 mark each of their slots as volatile if the slot can be set before
2197 _longjmp and read afterwards.
2198 * lisp.h (struct handler): var and chosen_clause are now volatile.
2199 (struct catchtag): val, next, and pdlcount are now volatile.
2201 * bidi.c (bidi_push_it, bidi_pop_it):
2202 * fns.c (copy_hash_table):
2203 * image.c (define_image_type):
2204 * keyboard.c (kbd_buffer_store_event_hold):
2205 * process.c (Fprocess_send_eof):
2206 * xfaces.c (x_create_gc) [HAVE_NS]:
2207 * xgselect.c (xg_select):
2208 Prefer assignment to memcpy when either will do.
2210 * alloc.c (discard_killed_buffers): Tune and simplify a bit.
2211 Use pointer-to-a-pointer to simplify and avoid a NILP check each
2212 time an item is removed. No need to mark this function 'inline';
2213 the compiler knows better than we do.
2215 2012-09-11 Jan Djärv <jan.h.d@swipnet.se>
2217 * nsterm.m (ns_judge_scroll_bars): Pass NO to updateFrameSize.
2218 (updateFrameSize:): Add delay parameter to updateFrameSize, send it
2219 to change_frame_size (Bug#12388).
2220 (windowDidResize:): Pass YES to updateFrameSize.
2222 * nsterm.h: Add delay parameter to updateFrameSize.
2224 2012-09-11 Dmitry Antipov <dmantipov@yandex.ru>
2226 Discard killed buffers from deleted window and frame objects.
2227 This reduces an amount of references to killed buffers and
2228 helps GC to reclaim them faster.
2229 * alloc.c (discard_killed_buffers): New function.
2230 (mark_object): Use it for deleted windows and frames.
2231 (mark_object): If symbol's value is set up for a killed buffer
2232 or deleted frame, restore its global binding.
2233 * data.c (swap_in_global_binding): Add GC notice.
2234 (swap_in_symval_forwarding): Use convenient set_blv_where.
2235 * window.c (wset_next_buffers, wset_prev_buffers): Move ...
2236 * window.h: ... to here.
2238 2012-09-11 Dmitry Antipov <dmantipov@yandex.ru>
2240 Convenient macro to check whether the buffer is live.
2241 * buffer.h (BUFFER_LIVE_P): New macro.
2242 * alloc.c, buffer.c, editfns.c, insdel.c, lread.c, marker.c:
2243 * minibuf.c, print.c, process.c, window.c, xdisp.c: Use it.
2245 2012-09-11 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
2247 * xdisp.c (right_overwritten, right_overwriting): Also handle gstring
2248 composition cases (Bug#12364).
2250 * xterm.c (x_draw_glyph_string): Avoid overwriting inverted left
2251 overhang of succeeding glyphs overlapping box cursor.
2253 * w32term.c (x_draw_glyph_string): Likewise.
2255 2012-09-11 Paul Eggert <eggert@cs.ucla.edu>
2257 Simplify, document, and port floating-point (Bug#12381).
2258 The porting part of this patch fixes bugs on non-IEEE platforms
2259 with frexp, ldexp, logb.
2260 * data.c, lisp.h (Qdomain_error, Qsingularity_error, Qunderflow_error):
2262 * floatfns.c: Simplify discussion of functions that Emacs doesn't
2263 support, by removing commented-out code and briefly listing the
2264 C89 functions excluded. The commented-out stuff was confusing
2265 maintenance, e.g., we thought we needed cbrt but it was commented out.
2266 (logb): Remove decl; no longer needed.
2267 (isfinite): New macro, if not already supplied.
2268 (isnan): Don't replace any existing macro.
2269 (Ffrexp, Fldexp): Define even if !HAVE_COPYSIGN, as frexp and ldexp
2270 are present on all C89 platforms.
2271 (Ffrexp): Do not special-case zero, as frexp does the right thing
2273 (Flogb): Do not use logb, as it doesn't have the desired meaning
2274 on hosts that use non-base-2 floating point. Instead, stick with
2275 frexp, which is C89 anyway. Do not pass an infinity or a NaN to
2276 frexp, to avoid getting an unspecified result.
2278 * xdisp.c (Qinhibit_debug_on_message): Now static.
2280 2012-09-10 Jan Djärv <jan.h.d@swipnet.se>
2282 * nsterm.m (ns_update_begin): Set clip path to whole view by using
2283 NSBezierPath (Bug#12131).
2285 2012-09-10 Chong Yidong <cyd@gnu.org>
2287 * fns.c (Fdelq, Fdelete): Doc fix.
2289 2012-09-10 Paul Eggert <eggert@cs.ucla.edu>
2291 * lisp.h (XSETINT, XSETCONS, XSETVECTOR, XSETSTRING, XSETSYMBOL)
2292 (XSETFLOAT, XSETMISC): Parenthesize macro bodies.
2294 2012-09-09 Stefan Monnier <monnier@iro.umontreal.ca>
2296 * lisp.h (make_lisp_ptr): New macro to replace XSET.
2297 (XSETCONS, XSETVECTOR, XSETSTRING, XSETSYMBOL, XSETFLOAT, XSETMISC):
2300 2012-09-09 Eli Zaretskii <eliz@gnu.org>
2302 * fringe.c (draw_fringe_bitmap_1): Don't reduce the width of the
2303 left fringe if the window has a left margin. This avoids leaving
2304 traces of the cursor because its leftmost pixel is not drawn over.
2306 * dispnew.c (update_window_line): When the left margin area of a
2307 screen line is updated, set the redraw_fringe_bitmaps_p flag of
2308 that screen line. (Bug#12277)
2310 2012-09-09 Paul Eggert <eggert@cs.ucla.edu>
2312 Assume C89 or later for math functions (Bug#12381).
2313 This simplifies the code, and makes it a bit smaller and faster,
2314 and (most important) makes it easier to clean up signal handling
2315 since we can stop worring about floating-point exceptions in
2316 library code. That was a problem before C89, but the problem
2317 went away many years ago on all practical Emacs targets.
2318 * data.c, image.c, lread.c, print.c:
2319 Don't include <math.h>; no longer needed.
2320 * data.c, floatfns.c (IEEE_FLOATING_POINT): Don't worry that it
2321 might be autoconfigured, as that never happens.
2323 * doprnt.c (DBL_MAX_10_EXP):
2324 * print.c (DBL_DIG):
2325 Remove. C89 or later always defines these.
2326 * floatfns.c (HAVE_MATHERR, FLOAT_CHECK_ERRNO, FLOAT_CHECK_DOMAIN)
2327 (in_float, float_error_arg, float_error_arg2, float_error_fn_name)
2328 (arith_error, domain_error, domain_error2):
2329 Remove all this pre-C89 cruft. Do not include <errno.h> as that's
2330 no longer needed -- we simply return what C returns. All uses removed.
2331 (IN_FLOAT, IN_FLOAT2): Remove. All uses replaced with
2333 (FLOAT_TO_INT, FLOAT_TO_INT2, range_error, range_error2):
2334 Remove. All uses expanded, as these macros are no longer used
2335 more than once and are now more trouble than they're worth.
2336 (Ftan): Use tan, not sin / cos.
2337 (Flogb): Assume C89 frexp.
2338 (fmod_float): Assume C89 fmod.
2339 (matherr) [HAVE_MATHERR]: Remove; no longer needed.
2340 (init_floatfns): Remove. All uses removed.
2342 2012-09-08 Jan Djärv <jan.h.d@swipnet.se>
2344 * nsterm.m (ns_draw_fringe_bitmap, ns_dumpglyphs_image): Take back
2345 compositeToPoint for OSX < 10.6 (Bug#12390).
2347 2012-09-08 Paul Eggert <eggert@cs.ucla.edu>
2349 * floatfns.c (Ftan): Use tan (x), not (sin (x) / cos (x)).
2350 This produces more-accurate results.
2352 2012-09-08 Jan Djärv <jan.h.d@swipnet.se>
2354 * nsterm.m (updateFrameSize): Call setFrame: on the view when size
2355 changes (Bug#12088).
2357 2012-09-08 Chong Yidong <cyd@gnu.org>
2359 * syntax.c (Fstring_to_syntax): Doc fix.
2361 2012-09-08 Jan Djärv <jan.h.d@swipnet.se>
2363 * nsterm.m (ns_clip_to_row): Remove code that deals with drawing fringe
2364 in the internal border.
2365 (x_set_window_size): Remove static variables and their usage.
2366 (ns_redraw_scroll_bars): Fix NSTRACE arg.
2367 (ns_after_update_window_line, ns_draw_fringe_bitmap):
2368 Remove fringe/internal border adjustment (Bug#11052).
2369 (ns_draw_fringe_bitmap): Make code more like other terms (xterm.c).
2370 (ns_draw_window_cursor): Remove fringe/internal border adjustment.
2371 (ns_fix_rect_ibw): Remove.
2372 (ns_get_glyph_string_clip_rect): Remove call to ns_fix_rect_ibw.
2373 (ns_dumpglyphs_box_or_relief): Ditto.
2374 (ns_maybe_dumpglyphs_background): Remove fringe/internal border
2376 (ns_dumpglyphs_image): Ditto.
2377 (ns_dumpglyphs_stretch): Fix coding style. Remove fringe/internal
2379 (ns_set_vertical_scroll_bar): Remove variables barOnVeryLeft/Right and
2380 their usage. Add fringe_extended_p and its use as in other terms.
2381 (ns_judge_scroll_bars): Code style fix. Call updateFrameSize if
2382 scroll bar was removed.
2383 (updateFrameSize): New function.
2384 (windowDidResize): Move code to updateFrameSize and call it.
2386 * nsterm.h (EmacsView): Add updateFrameSize.
2388 2012-09-07 Chong Yidong <cyd@gnu.org>
2390 * textprop.c (Fget_text_property): Minor doc fix (Bug#12323).
2392 * data.c (Flocal_variable_if_set_p): Doc fix (Bug#10713).
2394 2012-09-07 Paul Eggert <eggert@cs.ucla.edu>
2396 More signal-handler cleanup (Bug#12327).
2397 * emacs.c (main): Convert three 'signal' calls to 'sigaction' calls.
2398 Problem introduced when merging patches. Noted by Eli Zaretskii in
2399 <http://bugs.gnu.org/12327#67>.
2400 * floatfns.c: Comment fix.
2401 * lisp.h (force_auto_save_soon): Declare regardless of SIGDANGER.
2402 SIGDANGER might not be in scope so "#ifdef SIGDANGER" is not right,
2403 and anyway the declaration is harmless even if SIGDANGER is not defined.
2404 * syssignal.h (SIGIO): Also #undef if (! defined FIONREAD ||
2405 defined BROKEN_FIONREAD). systty.h formerly did this, but other
2406 source files not surprisingly expected syssignal.h to define, or
2407 not define, SIGIO, and it's cleaner to do it that way, for consistency.
2408 Include <sys/ioctl.h>, for FIONREAD.
2409 * systty.h (SIGIO): Do not #undef here; it's now syssignal.h's job.
2410 This eliminates a problem whereby other files mysteriously had
2411 to include "syssignal.h" before including "systty.h" if they
2412 wanted to use "#ifdef SIGIO".
2414 2012-09-07 Eli Zaretskii <eliz@gnu.org>
2416 * w32proc.c (sigaction): New function, emulates Posix 'sigaction'.
2418 * w32.c (sigemptyset): Empty the set.
2419 (sigsetmask, sigmask, sigblock, sigunblock): Remove unused functions.
2421 * alloc.c [ENABLE_CHECKING]: Include signal.h, since we need SIGABRT.
2423 2012-09-07 Dmitry Antipov <dmantipov@yandex.ru>
2425 * alloc.c (mark_buffer): Revert unsafe marking optimization.
2426 (mark_object): Likewise for frame objects.
2428 2012-09-07 Paul Eggert <eggert@cs.ucla.edu>
2430 * syssignal.h (handle_on_main_thread): Always declare,
2431 even if FORWARD_SIGNAL_TO_MAIN_THREAD is not defined.
2432 This ports to platforms without HAVE_PTHREAD.
2434 2012-09-06 Paul Eggert <eggert@cs.ucla.edu>
2436 Signal-handler cleanup (Bug#12327).
2437 Emacs's signal handlers were written in the old 4.2BSD style with
2438 sigblock and sigmask and so forth, and this led to some
2439 inefficiencies and confusion. Rewrite these to use
2440 pthread_sigmask etc. without copying signal sets around. Also,
2441 get rid of the confusing macros 'SIGNAL_THREAD_CHECK' and
2442 'signal', and instead use functions that do not attempt to take
2443 over the system name space. This patch causes Emacs's text
2444 segment to shrink by 0.7% on my platform, Fedora 17 x86-64.
2445 * alloc.c, emacsgtkfixed.c, nsfns.m, widget.c, xmenu.c:
2446 Do not include <signal.h> or "syssignal.h", as these
2447 modules do not use signals.
2448 * atimer.c, callproc.c, data.c, dispnew.c, emacs.c, floatfns.c:
2449 * gtkutil.c, keyboard.c, process.c, sound.c, sysdep.c, term.c, xterm.c:
2450 Do not include <signal.h>, as "syssignal.h" does that for us now.
2451 * atimer.c (sigmask_atimers): New function.
2452 (block_atimers, unblock_atimers): New functions,
2453 replacing the old macros BLOCK_ATIMERS and UNBLOCK_ATIMERS.
2455 * conf_post.h [SIGNAL_H_AHB]: Do not include <signal.h>;
2456 no longer needed here.
2457 * emacs.c (main): Inspect existing signal handler with sigaction,
2458 so that there's no need to block and unblock SIGHUP.
2459 * sysdep.c (struct save_signal): New member 'action', replacing
2460 old member 'handler'.
2461 (save_signal_handlers, restore_signal_handlers):
2462 Use sigaction instead of 'signal' to save and restore.
2463 (get_set_sighandler, set_sighandler) [!WINDOWSNT]:
2464 New function. All users of 'signal' modified to use set_sighandler
2465 if they're writeonly, and to use sys_signal if they're read+write.
2466 (emacs_sigaction_init, forwarded_signal): New functions.
2467 (sys_signal): Remove. All uses replaced by calls to sigaction
2468 and emacs_sigaction_init, or by direct calls to 'signal'.
2469 (sys_sigmask) [!__GNUC__]: Remove; no longer needed.
2470 (sys_sigblock, sys_sigunblock, sys_sigsetmask): Remove;
2471 all uses replaced by pthread_sigmask etc. calls.
2472 * syssignal.h: Include <signal.h>.
2473 (emacs_sigaction_init, forwarded_signal): New decls.
2474 (SIGMASKTYPE): Remove. All uses replaced by its definiens, sigset_t.
2475 (SIGEMPTYMASK): Remove; all uses replaced by its definiens, empty_mask.
2476 (sigmask, sys_sigmask): Remove; no longer needed.
2477 (sigpause): Remove. All uses replaced by its definiens, sigsuspend.
2478 (sigblock, sigunblock, sigfree):
2479 (sigsetmask) [!defined sigsetmask]:
2480 Remove. All uses replaced by pthread_sigmask.
2481 (signal): Remove. Its remaining uses (with SIG_DFL and SIG_IGN)
2482 no longer need to be replaced, and its typical old uses
2483 are now done via emacs_sigaction_init and sigaction.
2484 (sys_sigblock, sys_sigunblock, sys_sigsetmask): Remove decls.
2485 (sys_sigdel): Remove; unused.
2486 (NSIG): Remove a FIXME; the code's fine. Remove an unnecessary ifdef.
2488 2012-09-06 Eli Zaretskii <eliz@gnu.org>
2490 * process.c (CAN_HANDLE_MULTIPLE_CHILDREN): Fix a typo that broke
2491 SIGCHLD handling on systems that don't have WNOHANG. (Bug#12327)
2493 2012-09-06 Dmitry Antipov <dmantipov@yandex.ru>
2495 Explicitly mark buffer_defaults and buffer_local_symbols.
2496 * alloc.c (Fgarbage_collect): Mark buffer_defaults and
2497 mark_local_symbols here.
2498 (mark_object): If GC_CHECK_MARKED_OBJECTS, simplify checking
2499 since special buffers aren't marked here any more.
2500 (allocate_buffer): Chain new buffer with all_buffers here...
2501 * buffer.c (Fget_buffer_create, Fmake_indirect_buffer): ...and
2503 (Vbuffer_defaults, Vbuffer_local_symbols): Remove.
2504 (syms_of_buffer): Remove staticpro of the above.
2505 (init_buffer_once): Set names for buffer_defaults and
2506 buffer_local_symbols.
2508 2012-09-06 Paul Eggert <eggert@cs.ucla.edu>
2510 Use bool for booleans in font-related modules.
2511 * font.c (font_intern_prop, font_style_to_value)
2512 (font_style_symbolic, font_parse_xlfd, font_parse_fcname)
2513 (generate_otf_features, font_check_otf_features, font_check_otf)
2514 (font_match_p, font_list_entities, font_at):
2515 * fontset.c (fontset_id_valid_p, reorder_font_vector
2516 (fontset_find_font, Fset_fontset_font)
2517 (face_suitable_for_char_p) [0]:
2518 * ftfont.c (fc_initialized, ftfont_get_open_type_spec)
2519 (ftfont_open, ftfont_text_extents, ftfont_check_otf):
2520 (m17n_flt_initialized, ftfont_shape_by_flt):
2521 * ftxfont.c (ftxfont_draw_bitmap, ftxfont_draw):
2522 * nsfont.m (nsfont_draw):
2523 * w32font.c (w32font_draw):
2524 * w32term.c (x_draw_glyphless_glyph_string_foreground):
2525 Use bool for booleans.
2526 * font.h: Adjust to above API changes.
2527 (struct font, struct font_driver, struct font_driver_list):
2528 Use bool for booleans.
2529 (struct font): Remove useless member encoding_type.
2531 * fontset.c, xftfont.c: Omit unnecessary static decls.
2533 2012-09-06 Dmitry Antipov <dmantipov@yandex.ru>
2535 * alloc.c (mark_object): Revert window marking code
2536 since it's unsafe for the Fset_window_configuration.
2538 2012-09-05 Paul Eggert <eggert@cs.ucla.edu>
2540 Fix race conditions with signal handlers and errno (Bug#12327).
2541 Be more systematic about preserving errno whenever a signal
2542 handler returns, even if it's not in the main thread. Do this by
2543 renaming signal handlers to distinguish between signal delivery
2544 and signal handling. All uses changed.
2545 * atimer.c (deliver_alarm_signal): Rename from alarm_signal_handler.
2546 * data.c (deliver_arith_signal): Rename from arith_error.
2547 * dispnew.c (deliver_window_change_signal): Rename from
2548 window_change_signal.
2549 * emacs.c (deliver_error_signal): Rename from fatal_error_signal.
2550 (deliver_danger_signal) [SIGDANGER]: Rename from memory_warning_signal.
2551 * keyboard.c (deliver_input_available_signal): Rename from
2552 input_available_signal.
2553 (deliver_user_signal): Rename from handle_user_signal.
2554 (deliver_interrupt_signal): Rename from interrupt_signal.
2555 * process.c (deliver_pipe_signal): Rename from send_process_trap.
2556 (deliver_child_signal): Rename from sigchld_handler.
2557 * atimer.c (handle_alarm_signal):
2558 * data.c (handle_arith_signal):
2559 * dispnew.c (handle_window_change_signal):
2560 * emacs.c (handle_fatal_signal, handle_danger_signal):
2561 * keyboard.c (handle_input_available_signal):
2562 * keyboard.c (handle_user_signal, handle_interrupt_signal):
2563 * process.c (handle_pipe_signal, handle_child_signal):
2564 New functions, with the actual signal-handling code taken from the
2565 original respective signal handlers, sans the sporadic attempts to
2566 preserve errno, since that's now done by handle_on_main_thread.
2567 * atimer.c (alarm_signal_handler): Remove unnecessary decl.
2568 * emacs.c, floatfns.c, lisp.h: Remove unused FLOAT_CATCH_SIGKILL cruft.
2569 * emacs.c (main_thread) [FORWARD_SIGNAL_TO_MAIN_THREAD]:
2571 (main) [FORWARD_SIGNAL_TO_MAIN_THREAD]:
2572 Move initialization of main_thread to sysdep.c's init_signals.
2573 * process.c (waitpid) [!WNOHANG]: #define to wait; that's good enough for
2574 our usage, and simplifies the mainline code.
2575 (record_child_status_change): New static function, as a helper
2576 for handle_child_signal, and with most of the old child handler's
2578 (CAN_HANDLE_MULTIPLE_CHILDREN): New constant.
2579 (handle_child_signal): Use the above.
2580 * sysdep.c (main_thread) [FORWARD_SIGNAL_TO_MAIN_THREAD]:
2581 Moved here from emacs.c.
2582 (init_signals) [FORWARD_SIGNAL_TO_MAIN_THREAD]: Initialize it;
2583 code moved here from emacs.c's main function.
2584 * sysdep.c, syssignal.h (handle_on_main_thread): New function,
2585 replacing the old SIGNAL_THREAD_CHECK. All uses changed.
2586 This lets callers save and restore errno properly.
2588 2012-09-05 Dmitry Antipov <dmantipov@yandex.ru>
2590 Remove redundant or unused things here and there.
2591 * lisp.h (CYCLE_CHECK, CHAR_TABLE_TRANSLATE): Remove.
2592 * conf_post.h (RE_TRANSLATE): Use char_table_translate.
2593 * editfns.c (Fcompare_buffer_substrings): Likewise.
2594 * frame.h (struct terminal, struct font_driver_list):
2595 Remove redundant declarations.
2596 * window.h (Qleft, Qright): Likewise.
2598 2012-09-05 Dmitry Antipov <dmantipov@yandex.ru>
2600 Do not mark objects from deleted buffers, windows and frames.
2601 * alloc.c (mark_buffer): Mark just the buffer if it is dead.
2602 (mark_object): Likewise for windows and frames.
2604 2012-09-05 Dmitry Antipov <dmantipov@yandex.ru>
2606 * alloc.c (valid_lisp_object_p): Treat killed buffers,
2607 buffer_defaults and buffer_local_symbols as valid objects.
2608 Return special value to denote them.
2610 2012-09-05 Paul Eggert <eggert@cs.ucla.edu>
2612 * fileio.c, filelock.c, floatfns.c, fns.c: Use bool for boolean.
2613 * fileio.c (auto_saving, auto_save_error_occurred, make_temp_name)
2614 (Fexpand_file_name, barf_or_query_if_file_exists, Fcopy_file)
2615 (file_name_absolute_p, Fsubstitute_in_file_name):
2616 (check_executable, check_writable, Ffile_accessible_directory_p)
2617 (Fset_file_selinux_context, Fdefault_file_modes)
2618 (Finsert_file_contents, choose_write_coding_system)
2619 (Fwrite_region, build_annotations, a_write, e_write)
2621 * filelock.c (boot_time_initialized, get_boot_time)
2622 (get_boot_time_1, lock_file_1, within_one_second):
2623 * floatfns.c (in_float):
2624 * fns.c (concat, internal_equal, Frequire, base64_encode_1)
2625 (base64_decode_1, cmpfn_eql, cmpfn_user_defined)
2626 (sweep_weak_table, sweep_weak_hash_tables, secure_hash):
2627 * lisp.h (struct Lisp_Hash_Table.cmpfn):
2628 * window.c (compare_window_configurations):
2629 Use bool for booleans.
2630 * fileio.c (auto_saving_dir_umask, auto_saving_mode_bits)
2631 (Fdefault_file_modes): Now mode_t, not int, for modes.
2632 (Fdo_auto_save): Set a boolean to 1 rather than using ++.
2633 (internal_delete_file): Now returns void, not a (boolean) int,
2634 since nobody was looking at the return value.
2635 * lisp.h, window.h: Adjust to above API changes.
2637 * xdisp.c (set_message): Simplify and reindent last change.
2639 2012-09-05 Juanma Barranquero <lekktu@gmail.com>
2641 * makefile.w32-in ($(BLD)/sysdep.$(O)): Update dependencies.
2643 2012-09-04 Lars Ingebrigtsen <larsi@gnus.org>
2645 * eval.c (call_debugger): Make the function non-static so that we
2646 can call it from set_message.
2648 * xdisp.c (set_message): Implement the new variable `debug-on-message'.
2649 (syms_of_xdisp): Defvar it and `inhibit-debug-on-message'.
2651 2012-09-04 Paul Eggert <eggert@cs.ucla.edu>
2653 Give more-useful info on a fatal error (Bug#12328).
2654 * alloc.c [ENABLE_CHECKING]: Do not include <execinfo.h>.
2655 (die) [ENABLE_CHECKING]: Call fatal_error_backtrace instead
2656 of doing the work ourselves.
2657 * emacs.c (fatal_error_signal): Let fatal_error_backtrace
2658 do most of the work.
2659 (fatal_error_backtrace): New function, taken from the guts
2660 of the old fatal_error_signal, but with a new option to output
2662 (shut_down_emacs) [!DOS_NT]: Use strsignal to give more-useful
2663 info about the signal than just its number.
2664 * lisp.h (fatal_error_backtrace, emacs_backtrace): New decls.
2665 * sysdep.c: Include <execinfo.h>
2666 (emacs_backtrace): New function, taken partly from the previous
2667 code of the 'die' function.
2668 (emacs_abort): Call fatal_error_backtrace rather than abort.
2670 2012-09-04 Stefan Monnier <monnier@iro.umontreal.ca>
2672 * lread.c (readevalloop): Call internal-macroexpand-for-load to perform
2673 eager (load-time) macro-expansion.
2674 * lisp.mk (lisp): Add macroexp.
2676 2012-09-04 Paul Eggert <eggert@cs.ucla.edu>
2678 Simplify redefinition of 'abort' (Bug#12316).
2679 Do not try to redefine the 'abort' function. Instead, redo
2680 the code so that it calls 'emacs_abort' rather than 'abort'.
2681 This removes the need for the NO_ABORT configure-time macro
2682 and makes it easier to change the abort code to do a backtrace.
2683 * .gdbinit: Just stop at emacs_abort, not at w32_abort or abort.
2684 * emacs.c (abort) [!DOS_NT && !NO_ABORT]:
2685 Remove; sysdep.c's emacs_abort now takes its place.
2686 * lisp.h (emacs_abort): New decl. All calls from Emacs code to
2687 'abort' changed to use 'emacs_abort'.
2688 * msdos.c (dos_abort) [defined abort]: Remove; not used.
2689 (abort) [!defined abort]: Rename to ...
2690 (emacs_abort): ... new name.
2691 * sysdep.c (emacs_abort) [!HAVE_NTGUI]: New function, taking
2692 the place of the old 'abort' in emacs.c.
2693 * w32.c, w32fns.c (abort): Do not #undef.
2694 * w32.c (emacs_abort): Rename from w32_abort.
2696 2012-09-04 Eli Zaretskii <eliz@gnu.org>
2698 * w32uniscribe.c (uniscribe_shape): Reverse the sign of
2699 offsets[j].dv, since the y axis of the screen coordinates points
2700 down, while the y axis of the font definition coordinates points
2701 up. This fixes display of Arabic diacritics such as KASRA and
2702 KASRATAN. (Bug#11860)
2704 2012-09-04 Paul Eggert <eggert@cs.ucla.edu>
2706 Be more systematic about _setjmp vs setjmp.
2707 * alloc.c (test_setjmp, mark_stack):
2708 * image.c (PNG_LONGJMP) [PNG_LIBPNG_VER < 10500]:
2709 (PNG_JMPBUF) [! (PNG_LIBPNG_VER < 10500)]:
2710 (png_load, my_error_exit, jpeg_load):
2711 * process.c (send_process_trap, send_process):
2712 Uniformly prefer _setjmp and _longjmp to setjmp and longjmp.
2713 The underscored versions are up to 30x faster on some hosts.
2714 Formerly, the code used setjmp+longjmp sometimes and
2715 _setjmp+_longjmp at other times, with no particular reason to
2716 prefer setjmp+longjmp.
2718 2012-09-03 Paul Eggert <eggert@cs.ucla.edu>
2720 Fix minor problem found by static checking.
2721 * buffer.c (Fdelete_all_overlays): Return nil.
2723 2012-09-03 Martin Rudalics <rudalics@gmx.at>
2725 * buffer.c (Fdelete_all_overlays): New function.
2727 2012-09-03 Chong Yidong <cyd@gnu.org>
2729 * gtkutil.c: Add extern decl for Qxft.
2731 2012-09-02 Paul Eggert <eggert@cs.ucla.edu>
2733 * emacs.c, eval.c: Use bool for boolean.
2734 * emacs.c (initialized, inhibit_window_system, running_asynch_code):
2735 (malloc_using_checking) [DOUG_LEA_MALLOC]:
2736 (display_arg) [HAVE_X_WINDOWS || HAVE_NS]:
2737 (noninteractive, no_site_lisp, fatal_error_in_progress, argmatch)
2738 (main, decode_env_path, Fdaemon_initialized):
2739 * eval.c (call_debugger, Finteractive_p, interactive_p):
2740 (unwind_to_catch, Fsignal, wants_debugger, skip_debugger)
2741 (maybe_call_debugger, Fbacktrace):
2742 * process.c (read_process_output, exec_sentinel):
2743 Use bool for booleans.
2744 * emacs.c (shut_down_emacs): Omit unused boolean argument NO_X.
2745 All callers changed.
2746 * eval.c (interactive_p): Omit always-true boolean argument
2747 EXCLUDE_SUBRS_P. All callers changed.
2748 * dispextern.h, lisp.h: Reflect above API changes.
2749 * firstfile.c (dummy): Use the address of 'main', whose signature
2750 won't change, instead of the address of 'initialize', whose
2751 signature just changed from int to bool.
2752 * lisp.h (fatal_error_in_progress): New decl of boolean, moved here ...
2753 * msdos.c (fatal_error_in_progress): ... from here.
2754 * xdisp.c (redisplaying_p): Now a boolean. Set it to 1 instead
2756 (redisplay_internal, unwind_redisplay): Simply clear
2757 REDISPLAYING_P when unwinding, instead of saving its previous,
2758 always-false value and then restoring it.
2760 Clean up some extern decls.
2761 Mostly, this hoists extern decls out of .c files and into .h files.
2762 That way, we're more likely to catch errors if the interfaces change.
2763 * alloc.c [USE_GTK]: Include "gtkutil.h" so that we need not
2764 declare xg_mark_data.
2765 * dispextern.h (x_frame_parm_handlers):
2767 * lisp.h (Qlexical_binding, Qinternal_interpreter_environment)
2768 (Qextra_light, Qlight, Qsemi_light, Qsemi_bold, Qbold, Qextra_bold)
2769 (Qultra_bold, Qoblique, Qitalic):
2770 Move extern decl here from .c file.
2771 * alloc.c (xg_mark_data) [USE_GTK]:
2773 * eval.c (Qlexical_binding):
2774 * fns.c (time) [!HAVE_UNISTD_H]:
2775 * gtkutil.c (Qxft, Qnormal, Qextra_light, Qlight, Qsemi_light)
2776 (Qsemi_bold, Qbold, Qextra_bold, Qultra_bold, Qoblique, Qitalic):
2777 * image.c (Vlibrary_cache, QCloaded_from) [HAVE_NTGUI]:
2778 * lread.c (Qinternal_interpreter_environment):
2779 * minibuf.c (Qbuffer):
2780 * process.c (QCfamily, QCfilter):
2781 * widget.c (free_frame_faces):
2782 * xfaces.c (free_frame_menubar) [USE_X_TOOLKIT]:
2783 * xfont.c (x_clear_errors):
2784 * xterm.c (x_frame_parm_handlers):
2785 Remove now-redundant extern decls.
2786 * keyboard.c, keyboard.h (ignore_mouse_drag_p) [USE_GTK || HAVE_NS]:
2787 * xfaces.c (Qultra_light, Qreverse_oblique, Qreverse_italic):
2789 * xfaces.c: Remove unnecessary static decls.
2790 * xterm.c (updating_frame): Remove decl of nonexistent object.
2792 * Makefile.in (gl-stamp): Don't scan $(SOME_MACHINE_OBJECTS)
2793 when building globals.h, as the objects that are not built on
2794 this host are not needed to compile C files on this host.
2796 2012-09-02 Jan Djärv <jan.h.d@swipnet.se>
2798 * gtkutil.h: Remove prototype for x_wm_set_size_hint.
2800 * frame.h: Add missing prototype for x_wm_set_size_hint.
2802 2012-09-02 Paul Eggert <eggert@cs.ucla.edu>
2804 * doc.c, editfns.c, insdel.c, intervals.c: Use bool for boolean.
2805 * doc.c (read_bytecode_char, get_doc_string, reread_doc_file)
2806 (Fdocumentation, Fdocumentation_property, Fsnarf_documentation)
2807 (Fsubstitute_command_keys):
2808 * editfns.c (region_limit, find_field, Fconstrain_to_field)
2809 (save_excursion_save, save_excursion_restore)
2810 (disassemble_lisp_time, decode_time_components, emacs_nmemftime)
2811 (format_time_string, general_insert_function)
2812 (make_buffer_string, make_buffer_string_both)
2813 (Fsubst_char_in_region, Ftranslate_region_internal, Fformat):
2814 * insdel.c (check_markers, gap_left, adjust_markers_for_insert)
2815 (copy_text, insert_1, insert_1_both, insert_from_string)
2816 (insert_from_string_before_markers, insert_from_string_1)
2817 (insert_from_buffer, insert_from_buffer_1, replace_range)
2818 (replace_range_2, del_range_1, del_range_byte, del_range_both)
2819 (del_range_2, modify_region):
2820 * intervals.c (intervals_equal, balance_possible_root_interval)
2821 (adjust_intervals_for_insertion, merge_properties_sticky)
2822 (graft_intervals_into_buffer, lookup_char_property)
2823 (adjust_for_invis_intang, set_point_both)
2824 (get_property_and_range, compare_string_intervals)
2825 (set_intervals_multibyte_1, set_intervals_multibyte):
2826 * keyboard.c (decode_timer):
2827 Use bool for boolean.
2828 * intervals.h, lisp.h, systime.h: Reflect above API changes.
2829 * editfns.c (struct info): Use 1-bit unsigned bitfields for booleans.
2831 2012-09-02 Chong Yidong <cyd@gnu.org>
2833 * keymap.c (push_key_description): Print M-TAB as C-M-i
2836 2012-09-02 Juanma Barranquero <lekktu@gmail.com>
2838 * makefile.w32-in (CCL_H, W32FONT_H): New macros.
2839 (ATIMER_H, FONT_H, $(BLD)/alloc.$(O), $(BLD)/callproc.$(O))
2840 ($(BLD)/editfns.$(O), $(BLD)/ccl.$(O), $(BLD)/chartab.$(O))
2841 ($(BLD)/coding.$(O), $(BLD)/sysdep.$(O), $(BLD)/fontset.$(O))
2842 ($(BLD)/sysdep.$(O), $(BLD)/w32fns.$(O), $(BLD)/keyboard.$(O))
2843 ($(BLD)/w32term.$(O), $(BLD)/w32menu.$(O), $(BLD)/process.$(O))
2844 ($(BLD)/w32font.$(O), $(BLD)/w32uniscribe.$(O)): Update dependencies.
2846 2012-09-01 Eli Zaretskii <eliz@gnu.org>
2848 * w32uniscribe.c (uniscribe_shape): Handle correctly the case of
2849 more than one grapheme cluster passed to the shaper: compute the
2850 offset adjustment values separately for each cluster. (Bug#11860)
2852 * image.c: Restore mistakenly removed inclusion of w32.h. Without
2853 it, GCC doesn't see prototypes of w32_delayed_load, and complains
2854 about implicit conversions from integer to pointer.
2856 2012-09-01 Daniel Colascione <dancol@dancol.org>
2858 * w32fns.c (x_display_info_for_name): Prevent crash if w32 window
2859 system used too early.
2861 2012-09-01 Paul Eggert <eggert@cs.ucla.edu>
2863 Better seed support for (random).
2864 * emacs.c (main): Call init_random.
2865 * fns.c (Frandom): Set the seed from a string argument, if given.
2866 Remove long-obsolete Gentzel cruft.
2867 * lisp.h, sysdep.c (seed_random): Now takes address and size, not long.
2868 (init_random): New function.
2870 2012-09-01 Daniel Colascione <dancol@dancol.org>
2872 * xterm.h: Add header guards. Declare x_menubar_window_to_frame.
2873 Remove x_set_frame_alpha, x_bitmap_icon, x_make_frame_visible,
2874 x_make_frame_invisible, x_iconify_frame, x_free_frame_resources,
2875 x_wm_set_size_hint, x_query_colors, x_real_positions,
2876 x_set_menu_bar_lines, x_char_width, x_char_height, x_sync,
2877 x_set_tool_bar_lines, x_activate_menubar, and free_frame_menubar,
2878 all of which have been moved to common code.
2880 * xfaces.c: Include TERM_HEADER instead of listing all possible
2881 window-system headers.
2883 * w32xfns.c (x_sync): Correct definition of x_sync (a no-op here)
2886 * w32term.h (FRAME_X_WINDOW): Use FRAME_W32_WINDOW instead of
2887 directly accessing frame internals.
2889 * w32font.h: Include font.h. Define syms_of_w32font and
2892 * process.c: Include TERM_HEADER instead of listing all possible
2893 window-system headers.
2895 * nsterm.h: Remove declarations now in frame.h.
2896 Define FRAME_X_SCREEN, FRAME_X_VISUAL.
2898 * menu.c: Include TERM_HEADER instead of listing all possible
2899 window-system headers.
2901 * keyboard.h: Declare ignore_mouse_drag_p whenever we have a
2904 * keyboard.c: Include TERM_HEADER instead of listing all possible
2905 window-system headers.
2907 * image.c: Include TERM_HEADER instead of listing all possible
2908 window-system headers. Declare Vlibrary_cache when compiling for
2911 * gtkutil.h (xg_list_node_): Include xterm.h to pick up needed
2912 window system declarations.
2914 * frame.h: Move common functions here: set_frame_menubar,
2915 x_set_window_size, x_sync, x_get_focus_frame,
2916 x_set_mouse_position, x_set_mouse_pixel_position,
2917 x_make_frame_visible, x_make_frame_invisible, x_iconify_frame,
2918 x_char_width, x_char_height, x_pixel_width, x_pixel_height,
2919 x_set_frame_alpha, x_set_menu_bar_lines, x_set_tool_bar_lines,
2920 x_activate_menubar, x_real_positions, x_bitmap_icon,
2921 x_set_menu_bar_lines, free_frame_menubar, x_free_frame_resources,
2924 * frame.c: Include TERM_HEADER instead of listing all possible
2925 window-system headers.
2927 * font.c: Include TERM_HEADER instead of listing all possible
2928 window-system headers.
2930 * emacs.c: Include TERM_HEADER.
2932 * dispnew.c: Include TERM_HEADER instead of listing all possible
2933 window-system headers.
2935 * ccl.h: Include character.h.
2937 * Makefile.in: Define WINDOW_SYSTEM_OBJ to hold objects needed for
2938 the current window system; include in list of objects to link into
2941 2012-08-31 Dmitry Antipov <dmantipov@yandex.ru>
2943 Remove mark_ttys function and fix tty_display_info initialization.
2944 * lisp.h (mark_ttys): Remove prototype.
2945 * alloc.c (Fgarbage_collect): Remove redundant (and the only) call
2946 to mark_ttys because all possible values of 'top_frame' slot are
2947 the frames which are reachable from Vframe_list.
2948 * term.c (mark_ttys): Remove.
2949 (init_tty): Safely initialize 'top_frame' slot with Qnil.
2951 2012-08-31 Dmitry Antipov <dmantipov@yandex.ru>
2953 Change struct frame bitfields from unsigned char to unsigned.
2954 * frame.h (struct frame): Change type of 'display_preempted',
2955 'visible', 'iconified', 'has_minibuffer', 'wants_modeline',
2956 'auto_raise', 'auto_lower', 'no_split', 'explicit_name',
2957 'window_sizes_changed', 'mouse_moved' and 'pointer_invisible'
2958 bitfields from unsigned char to unsigned.
2960 2012-08-31 Dmitry Antipov <dmantipov@yandex.ru>
2962 Remove unused member of struct x_output and struct w32_output.
2963 * xterm.h (struct x_output): Remove unused field 'needs_exposure'.
2964 * w32term.h (struct w32_output): Likewise.
2966 2012-08-30 Jan Djärv <jan.h.d@swipnet.se>
2968 * gtkutil.c (x_wm_set_size_hint): Use 1 col for base_width so it
2969 does not become zero (Bug#12234).
2971 2012-08-30 Paul Eggert <eggert@cs.ucla.edu>
2973 * dispnew.c (update_frame_1): Pacify gcc -Wstrict-overflow
2974 for GCC 4.7.1 x86-64.
2976 2012-08-30 Glenn Morris <rgm@gnu.org>
2978 * lread.c (init_lread): For out-of-tree builds, only add the
2979 source directory's site-lisp dir to the load-path if it exists,
2980 consistent with in-tree builds. (Bug#12302)
2982 2012-08-28 Jan Djärv <jan.h.d@swipnet.se>
2984 * nsmenu.m (initWithContentRect:styleMask:backing:defer:): Initialize
2985 button_values to NULL. Call setStykeMask so dialogs get a close button.
2986 (windowShouldClose:): Set window_closed.
2987 (dealloc): New member, free button_values.
2988 (process_dialog:): Make member function. Remove window argument,
2989 replace window with self. Count buttons and allocate and store values
2991 (addButton:value:row:): value is int with the name tag. Call setTag
2992 with tag. Remove return self, declare return value as void.
2993 (addString:row:): Remove return self, declare return value as void.
2994 (addSplit): Remove return self, declare return value as void.
2995 (clicked:): Remove return self, declare return value as void.
2996 Set dialog_return to button_values[seltag]. Code formatting change.
2997 (initFromContents:isQuestion:): Adjust call to process_dialog.
2998 Code formatting change.
2999 (timeout_handler:): Set timer_fired to YES.
3000 (runDialogAt:): Set timer_fired to NO.
3001 Handle click on close button as quit.
3003 * nsterm.h (EmacsDialogPanel): Make timer_fired BOOL.
3004 Add window_closed and button_values. Add void as return value for
3005 add(Button|String|Split). addButton takes int instead of Lisp_Object.
3006 Add process_dialog as new member.
3008 2012-08-28 Eli Zaretskii <eliz@gnu.org>
3010 * ralloc.c (free_bloc): Don't dereference a 'heap' structure if it
3011 is not one of the heaps we manage. (Bug#12242)
3013 2012-08-28 Glenn Morris <rgm@gnu.org>
3015 * eval.c (Fcalled_interactively_p): Doc fix. (Bug#11747)
3017 2012-08-28 Martin Rudalics <rudalics@gmx.at>
3019 * window.c (Fset_window_configuration): Remove handling of
3020 auto-buffer-name window parameter. Install revision of reverted
3023 2012-08-28 Dmitry Antipov <dmantipov@yandex.ru>
3025 Do not allow to set major mode for a dead buffer.
3026 * buffer.c (Fset_buffer_major_mode): Signal an error
3027 if the buffer is dead.
3028 (Fother_buffer, other_buffer_safely): Remove redundant
3031 2012-08-28 Dmitry Antipov <dmantipov@yandex.ru>
3033 Always use set_buffer_if_live to restore original buffer at unwind.
3034 * buffer.h (record_unwind_current_buffer): New function.
3035 * bytecode.c, dispnew.c, editfns.c, fileio.c, fns.c, insdel.c:
3036 * keyboard.c, keymap.c, minibuf.c, print.c, process.c, textprop.c:
3037 * undo.c, window.c: Adjust users.
3038 * buffer.c (set_buffer_if_live): Fix comment.
3040 2012-08-28 Dmitry Antipov <dmantipov@yandex.ru>
3042 Fix usage of set_buffer_internal.
3043 * buffer.h (set_buffer_internal): Make it BUFFER_INLINE.
3044 * buffer.c (set_buffer_if_live): Use set_buffer_internal.
3045 * coding.c (decode_coding): Omit redundant test.
3046 * fileio.c (decide_coding_unwind): Likewise.
3047 * fns.c (secure_hash): Likewise.
3048 * insdel.c (modify_region): Likewise.
3049 * keyboard.c (command_loop_1): Likewise.
3050 * print.c (PRINTFINISH): Likewise.
3051 * xdisp.c (run_window_scroll_functions): Use set_buffer_internal.
3053 2012-08-27 Paul Eggert <eggert@cs.ucla.edu>
3055 * dispnew.c: Use bool for boolean.
3056 (frame_garbaged, display_completed, delayed_size_change)
3057 (fonts_changed_p, add_window_display_history)
3058 (add_frame_display_history, verify_row_hash)
3059 (adjust_glyph_matrix, clear_window_matrices, glyph_row_slice_p)
3060 (row_equal_p, realloc_glyph_pool)
3061 (allocate_matrices_for_frame_redisplay)
3062 (showing_window_margins_p)
3063 (adjust_frame_glyphs_for_frame_redisplay)
3064 (build_frame_matrix_from_leaf_window, make_current)
3065 (mirrored_line_dance, mirror_line_dance, update_frame)
3066 (update_window_tree, update_single_window)
3067 (check_current_matrix_flags, update_window, update_text_area)
3068 (update_window_line, set_window_update_flags, scrolling_window)
3069 (update_frame_1, scrolling, buffer_posn_from_coords)
3070 (do_pending_window_change, change_frame_size)
3071 (change_frame_size_1, sit_for):
3072 Use bool for boolean.
3073 (clear_glyph_matrix_rows): Rename from enable_glyph_matrix_rows,
3074 and remove last int (actually boolean) argument, which was always 0.
3075 All callers changed.
3076 * dispextern.h, frame.h, lisp.h: Reflect above API changes.
3077 * dispextern.h (struct composition_it): Use bool for boolean.
3078 (struct glyph_matrix): Don't assume buffer sizes can fit in 'int'.
3079 (struct bidi_it): Use unsigned:1, not int, for boolean prev_was_pdf.
3080 * dired.c (file_name_completion):
3081 Use bool for boolean. (This was missed in an earlier change.)
3083 2012-08-27 Martin Rudalics <rudalics@gmx.at>
3085 * window.c (Fset_window_configuration): Revert first part of
3088 2012-08-27 Jan Djärv <jan.h.d@swipnet.se>
3090 * nsterm.h (NSPanel): New class variable dialog_return.
3092 * nsmenu.m (initWithContentRect:styleMask:backing:defer:):
3093 Initialize dialog_return.
3094 (windowShouldClose:): Use stop instead of stopModalWithCode.
3095 (clicked:): Ditto, and also set dialog_return (Bug#12258).
3096 (timeout_handler:): Use stop instead of abortModal. Send a dummy
3098 (runDialogAt:): Make ret Lisp_Object. Set it from dialog_return when
3101 2012-08-27 Paul Eggert <eggert@cs.ucla.edu>
3103 * composite.c, data.c, dbusbind.c, dired.c: Use bool for booleans.
3104 * composite.c (find_composition, composition_gstring_p)
3105 (composition_reseat_it, find_automatic_composition):
3106 * data.c (let_shadows_buffer_binding_p)
3107 (let_shadows_global_binding_p, set_internal, make_blv)
3108 (Fmake_variable_buffer_local, Fmake_local_variable)
3109 (Fmake_variable_frame_local, arithcompare, cons_to_unsigned)
3110 (cons_to_signed, arith_driver):
3111 * dbusbind.c (xd_in_read_queued_messages):
3112 * dired.c (directory_files_internal, file_name_completion):
3113 Use bool for booleans.
3114 * dired.c (file_name_completion):
3115 * process.h (fd_callback):
3116 Omit int (actually boolean) argument. It wasn't being used.
3118 * composite.h, lisp.h: Reflect above API changes.
3120 * cmds.c, coding.c: Use bool for booleans.
3121 * cmds.c (move_point, Fself_insert_command):
3122 * coding.h (struct composition status, struct coding_system):
3123 * coding.c (detect_coding_utf_8, encode_coding_utf_8)
3124 (detect_coding_utf_16, encode_coding_utf_16, detect_coding_emacs_mule)
3125 (emacs_mule_char, decode_coding_emacs_mule)
3126 (encode_coding_emacs_mule, detect_coding_iso_2022)
3127 (decode_coding_iso_2022, encode_invocation_designation)
3128 (encode_designation_at_bol, encode_coding_iso_2022)
3129 (detect_coding_sjis, detect_coding_big5, decode_coding_sjis)
3130 (decode_coding_big5, encode_coding_sjis, encode_coding_big5)
3131 (detect_coding_ccl, encode_coding_ccl, decode_coding_raw_text)
3132 (encode_coding_raw_text, detect_coding_charset)
3133 (decode_coding_charset, encode_coding_charset, detect_eol)
3134 (detect_coding, get_translation_table, produce_chars)
3135 (consume_chars, reused_workbuf_in_use)
3136 (make_conversion_work_buffer, code_conversion_save)
3137 (decode_coding_object, encode_coding_object)
3138 (detect_coding_system, char_encodable_p)
3139 (Funencodable_char_position, code_convert_region)
3140 (code_convert_string, code_convert_string_norecord)
3141 (Fset_coding_system_priority):
3142 * fileio.c (Finsert_file_contents):
3143 Use bool for booleans.
3144 * coding.h, lisp.h: Reflect above API changes.
3145 * coding.c: Remove unnecessary static function decls.
3146 (detect_coding): Use unsigned, not signed, to copy an unsigned field.
3147 (decode_coding, encode_coding, decode_coding_gap): Return 'void',
3148 not a boolean 'int', since callers never look at the return value.
3149 (ALLOC_CONVERSION_WORK_AREA): Assume caller returns 'void', not 'int'.
3150 * coding.h (decoding_buffer_size, encoding_buffer_size)
3151 (emacs_mule_string_char): Remove unused extern decls.
3152 (struct iso_2022_spec, struct coding_system):
3153 Use 'unsigned int : 1' for boolean fields, since there's more than one.
3154 (struct emacs_mule_spec): Remove unused field 'full_support'.
3155 All initializations removed.
3156 * cmds.c (internal_self_insert): Don't assume EMACS_INT fits in 'int'.
3158 2012-08-27 Dmitry Antipov <dmantipov@yandex.ru>
3160 Fix spare memory change (Bug#12286).
3161 * alloc.c (mark_maybe_pointer): Handle MEM_TYPE_SPARE.
3162 (valid_lisp_object_p): Likewise.
3164 2012-08-27 Martin Rudalics <rudalics@gmx.at>
3166 * window.c (Fset_window_configuration): Record any window's old
3167 buffer if it's replaced (see Bug#8789). If the new current
3168 buffer doesn't appear in the selected window, go to its old
3171 2012-08-27 Dmitry Antipov <dmantipov@yandex.ru>
3173 Special MEM_TYPE_SPARE to denote reserved memory.
3174 * alloc.c (enum mem_type): New memory type.
3175 (refill_memory_reserve): Use new type for spare memory.
3176 This prevents live_cons_p and live_string_p from incorrect
3177 detection of uninitialized objects from spare memory as live.
3179 2012-08-26 Paul Eggert <eggert@cs.ucla.edu>
3182 * Makefile.in (.PHONY): versioclean -> versionclean.
3184 Remove unused external symbols.
3185 * data.c (Qcons, Qfloat, Qmisc, Qstring, Qvector):
3186 * window.c (Qwindow_valid_p, decode_valid_window):
3187 Now static, not extern.
3188 * data.c (Qinterval): Remove; unused.
3189 (syms_of_data): Do not define 'interval'.
3190 * lisp.h (Qinteger, Qstring, Qmisc, Qvector, Qfloat, Qcons):
3191 * window.h (decode_valid_window):
3194 * character.c, charset.c, chartab.c: Use bool for booleans.
3195 * character.c (lisp_string_width, string_count_byte8)
3196 (string_escape_byte8):
3197 * charset.c (charset_map_loaded, load_charset_map, read_hex):
3198 (load_charset_map_from_file, map_charset_chars)
3199 (Fdefine_charset_internal, define_charset_internal)
3200 (Fdeclare_equiv_charset, find_charsets_in_text)
3201 (Ffind_charset_region, char_charset, Fiso_charset):
3202 * chartab.c (sub_char_table_ref, sub_char_table_ref_and_range)
3203 (sub_char_table_set, sub_char_table_set_range)
3204 (char_table_set_range, optimize_sub_char_table)
3205 (map_sub_char_table):
3206 Use bool for boolean.
3207 * character.c (str_to_unibyte): Omit last boolean argument; it was
3208 always 0. All callers changed.
3209 * character.h, charset.h: Adjust to match previous changes.
3210 * character.h (char_printable_p): Remove decl of nonexistent function.
3211 * charset.h (struct charset): Members code_linear_p, iso_chars_96,
3212 ascii_compatible_p, supplementary_p, compact_codes_p, unified_p
3213 are all boolean, so make them single-bit bitfields.
3215 * lisp.h (ASET): Remove attempt to detect side effects.
3216 It was meant to be temporary and it often doesn't work,
3217 because when IDX has side effects the behavior of IDX==IDX
3218 is undefined. See Stefan Monnier in
3219 <http://lists.gnu.org/archive/html/emacs-devel/2012-08/msg00762.html>.
3221 2012-08-26 Barry OReilly <gundaetiapo@gmail.com> (tiny change)
3223 * lisp.h (functionp): New function (extracted from Ffunctionp).
3224 (FUNCTIONP): Use it.
3225 * eval.c (Ffunctionp): Use it.
3227 2012-08-25 Paul Eggert <eggert@cs.ucla.edu>
3229 * xgselect.c (xg_select): Use auto storage for the GPollFD buffer
3230 as that's faster and simpler than static storage. Don't bother
3231 with the g_main_context_query overhead if g_main_context_pending
3232 says no events are pending.
3233 (gfds, gfds_size): Remove these static vars.
3234 (xgselect_initialize): Remove; no longer needed.
3235 All uses and decls removed.
3237 * emacs.c (fatal_error_signal_hook): Remove.
3238 All uses removed. This leftover from old code was always 0.
3240 * casefiddle.c, casetab.c, category.c: Use bool for boolean.
3241 * casefiddle.c (casify_object, casify_region):
3242 * casetab.c (set_case_table):
3243 * category.c, category.h (word_boundary_p):
3244 * category.h (CHAR_HAS_CATEGORY):
3245 Use bool for booleans, instead of int.
3247 2012-08-25 Eli Zaretskii <eliz@gnu.org>
3249 * makefile.w32-in ($(BLD)/alloc.$(O)): Depend on $(GNU_LIB)/execinfo.h.
3251 2012-08-25 Paul Eggert <eggert@cs.ucla.edu>
3253 On assertion failure, print backtrace if available.
3254 * alloc.c [ENABLE_CHECKING]: Include <execinfo.h>.
3255 (die) [ENABLE_CHECKING]: Print a backtrace if available.
3256 * Makefile.in (LIB_EXECINFO): New macro.
3259 * bytecode.c, callint.c, callproc.c: Use bool for boolean.
3260 * bytecode.c (exec_byte_code):
3261 * callint.c (check_mark, Fcall_interactively):
3262 * callproc.c (Fcall_process, add_env, child_setup, getenv_internal_1)
3263 (getenv_internal, sync_process_alive, call_process_exited):
3264 * lisp.h (USE_SAFE_ALLOCA):
3265 Use bool for booleans, instead of int.
3266 * lisp.h, process.h: Adjust prototypes to match above changes.
3267 * callint.c (Fcall_interactively): Don't assume the mark's
3268 offset fits in 'int'.
3270 2012-08-24 Paul Eggert <eggert@cs.ucla.edu>
3272 * buffer.c, buffer.h: Use bool for boolean.
3273 * buffer.c (reset_buffer_local_variables)
3274 (buffer_lisp_local_variables, Fset_buffer_modified_p)
3275 (Frestore_buffer_modified_p, Fset_buffer_multibyte):
3276 (overlays_at, overlays_in, mouse_face_overlay_overlaps)
3277 (overlay_touches_p, overlay_strings, Foverlay_put)
3278 (report_overlay_modification, call_overlay_mod_hooks):
3279 (mmap_enlarge, mmap_set_vars):
3280 * buffer.h (buffer_has_overlays, uppercasep, lowercasep):
3281 Use bool for booleans, instead of int.
3282 * buffer.c (compact_buffer, mmap_free_1): Return void, not int,
3283 since the 1-or-0 return value is always ignored anyway.
3284 (mmap_initialized_p):
3285 * buffer.h (struct buffer_text.inhibit_shrinking): Now bool, not int.
3286 * buffer.h, lisp.h: Adjust prototypes to match above changes.
3288 2012-08-23 Paul Eggert <eggert@cs.ucla.edu>
3290 * bidi.c: Use bool for boolean.
3291 This is a bit more readable, and makes the text segment of bidi.o
3292 0.4% smaller on my platform (GCC 4.7.1 x86-64, Fedora 15).
3293 Presumably it's faster too.
3294 (bidi_initialized, bidi_ignore_explicit_marks_for_paragraph_level):
3296 (bidi_cache_find_level_change, bidi_cache_iterator_state)
3297 (bidi_unshelve_cache, bidi_init_it, bidi_count_bytes)
3298 (bidi_char_at_pos, bidi_fetch_char, bidi_paragraph_init)
3299 (bidi_explicit_dir_char, bidi_level_of_next_char)
3300 (bidi_find_other_level_edge, bidi_move_to_visually_next):
3301 Use bool for booleans, instead of int.
3302 * dispextern.h (bidi_init_it, bidi_paragraph_init)
3303 (bidi_unshelve_cache): Adjust decls to match code.
3305 2012-08-23 Martin Rudalics <rudalics@gmx.at>
3307 * keyboard.c (Fposn_at_x_y): Do not allow internal window as
3310 2012-08-23 Paul Eggert <eggert@cs.ucla.edu>
3312 * atimer.c, atimer.h (turn_on_atimers): Use bool for boolean.
3313 * atimer.h: Include <stdbool.h>.
3315 2012-08-22 Dan Nicolaescu <dann@gnu.org>
3317 * frame.h (FRAME_W32_P, FRAME_MSDOS_P, FRAME_NS_P): Change to
3318 compile time tests instead of run time tests on systems that do
3320 (FRAME_MAC_P): Remove leftover from deleted code.
3321 * frame.c (syms_of_frame): Remove leftover from deleted code.
3323 2012-08-22 Jan Djärv <jan.h.d@swipnet.se>
3325 * nsterm.m (insertText:): Don't clear modifiers if code is space.
3327 2012-08-22 Paul Eggert <eggert@cs.ucla.edu>
3329 * fontset.c (FONTSET_ADD): Return void, not Lisp_Object.
3330 Otherwise, the compiler complains about (A?B:C) where B is void
3331 and C is Lisp_Object. This fixes an incompatibility with Sun C 5.12.
3332 (fontset_add): Return void, for FONTSET_ADD.
3334 2012-08-21 Paul Eggert <eggert@cs.ucla.edu>
3336 * alloc.c: Use bool for booleans.
3337 (gc_in_progress, abort_on_gc)
3338 (setjmp_tested_p) [!GC_SAVE_REGISTERS_ON_STACK && !GC_SETJMP_WORKS]:
3339 (dont_register_blocks) [GC_MALLOC_CHECK]:
3340 (suppress_checking) [ENABLE_CHECKING]: Now bool, not int.
3341 (check_string_bytes, make_specified_string, memory_full)
3342 (live_string_p, live_cons_p, live_symbol_p, live_float_p)
3343 (live_misc_p, live_vector_p, live_buffer_p, mark_maybe_object)
3344 (mark_stack, valid_pointer_p, make_pure_string)
3345 (Fgarbage_collect, survives_gc_p, gc_sweep):
3346 Use bool for booleans, instead of int.
3347 (test_setjmp) [!GC_SAVE_REGISTERS_ON_STACK && !GC_SETJMP_WORKS]:
3348 Remove unused local.
3349 * alloc.c (PURE_POINTER_P):
3350 * lisp.h (STRING_MULTIBYTE): Document that it returns a boolean.
3351 * editfns.c (Fformat):
3352 * fileio.c (Fexpand_file_name, Fsubstitute_in_file_name)
3354 * fns.c (sweep_weak_table):
3355 * lisp.h (suppress_checking, push_message, survives_gc_p)
3356 (make_pure_string, gc_in_progress, abort_on_gc):
3357 * lread.c (readchar, read1):
3358 * print.c (Fprin1_to_string):
3359 * xdisp.c (push_message):
3360 Use bool for booleans affected directly or indirectly by
3363 Make recently-introduced setters macros.
3364 * fontset.c (set_fontset_id, set_fontset_name, set_fontset_ascii)
3365 (set_fontset_base, set_fontset_frame, set_fontset_nofont_face)
3366 (set_fontset_default, set_fontset_fallback): Rename from their
3367 upper-case counterparts, and make them functions rather than macros.
3368 This is more consistent with the other recently-introduced setters.
3369 These don't need to be inline, since they're local.
3371 2012-08-21 Jan Djärv <jan.h.d@swipnet.se>
3373 * nsterm.m (fd_handler:): Alloc and release a NSAutoreleasePool in
3374 the loop (Bug#12247).
3376 2012-08-21 Paul Eggert <eggert@cs.ucla.edu>
3378 * lisp.h (vcopy): Use memcpy rather than our own loop.
3379 This fixes a performance regression introduced by the recent
3380 addition of vcopy. This means 'vcopy' will need to be modified
3381 for a copying collector, but that's OK. Also, tighten the
3382 checking in the assertion.
3384 2012-08-21 Eli Zaretskii <eliz@gnu.org>
3386 * w32uniscribe.c (uniscribe_shape): Fix producing gstring
3387 components for RTL text (Bug#11860). Adjust X-OFFSET of each
3388 non-base glyph for the width of the base character, according to
3389 what x_draw_composite_glyph_string_foreground expects.
3390 Generate WADJUST value according to composition_gstring_width's
3391 expectations, to produce correct width of the composed character.
3392 Reverse the sign of the DU offset produced by ScriptPlace.
3394 2012-08-21 Paul Eggert <eggert@cs.ucla.edu>
3396 * dbusbind.c (xd_remove_watch): Do not assume C99 comments.
3398 2012-08-21 Dmitry Antipov <dmantipov@yandex.ru>
3400 Avoid direct writes to contents member of struct Lisp_Vector.
3401 * lisp.h (vcopy): New function to copy data into vector.
3402 * dispnew.c (Fframe_or_buffer_changed_p): Use AREF and ASET.
3403 * fns.c (Ffillarray): Use ASET.
3404 * keyboard.c (timer_check_2): Use AREF and ASET.
3405 (append_tool_bar_item, Frecent_keys): Use vcopy.
3406 * lread.c (read_vector): Use ASET.
3407 * msdos.c (Frecent_doskeys): Use vcopy.
3408 * xface.c (Finternal_copy_lisp_face): Use vcopy.
3409 (Finternal_merge_in_global_face): Use ASET and vcopy.
3410 * xfont.c (xfont_list_pattern): Likewise.
3412 2012-08-21 Martin Rudalics <rudalics@gmx.at>
3414 * window.c (Fwindow_point): For the selected window always return
3415 the position of its buffer's point.
3416 (Fset_window_point): For the selected window always go in its
3417 buffer to the specified position.
3419 2012-08-21 Dmitry Antipov <dmantipov@yandex.ru>
3421 Setter macros for fontsets.
3422 * fontset.c (SET_FONTSET_ID, SET_FONTSET_NAME, SET_FONTSET_ASCII)
3423 (SET_FONTSET_BASE, SET_FONTSET_FRAME, SET_FONTSET_NOFONT_FACE)
3424 (SET_FONTSET_DEFAULT, SET_FONTSET_FALLBACK): New macros.
3427 2012-08-20 Glenn Morris <rgm@gnu.org>
3429 * Makefile.in (emacs$(EXEEXT), bootstrap-emacs$(EXEEXT)):
3430 Don't assume that `ln -f' works.
3432 2012-08-20 Eli Zaretskii <eliz@gnu.org>
3434 * .gdbinit: Use "set $dummy = ..." to avoid warnings from GDB 7.5
3435 and later about non-assignments with no effect. See discussion at
3436 http://sourceware.org/ml/gdb-patches/2012-08/msg00518.html for
3439 2012-08-20 Dmitry Antipov <dmantipov@yandex.ru>
3441 Inline setter functions for Lisp_Objects slots of struct specbinding.
3442 * eval.c (set_specpdl_symbol, set_specpdl_old_value): New functions.
3445 2012-08-20 Martin Rudalics <rudalics@gmx.at>
3447 * window.c (select_window): Always make selected window's buffer
3450 2012-08-20 Dmitry Antipov <dmantipov@yandex.ru>
3452 Use AREF and ASET for docstrings of category tables.
3453 * category.h (CATEGORY_DOCSTRING): Use AREF.
3454 (SET_CATEGORY_DOCSTRING): Use ASET.
3455 * category.c (Fdefine_category): Use SET_CATEGORY_DOCSTRING.
3457 2012-08-20 Dmitry Antipov <dmantipov@yandex.ru>
3459 Inline setter functions for hash table members.
3460 * lisp.h (set_hash_key, set_hash_value, set_hash_next)
3461 (set_hash_hash, set_hash_index): Rename with _slot suffix.
3462 (set_hash_key_and_value, set_hash_index, set_hash_next)
3463 (set_hash_hash): New functions.
3464 * charset.c, fns.c: Adjust users.
3466 2012-08-20 Dmitry Antipov <dmantipov@yandex.ru>
3468 Inline getter and setter functions for per-buffer values.
3469 * buffer.h (per_buffer_default, set_per_buffer_default)
3470 (per_buffer_value, set_per_buffer_value): New functions.
3471 (PER_BUFFER_VALUE, PER_BUFFER_DEFAULT): Remove.
3472 * buffer.c, data.c: Adjust users.
3474 2012-08-20 Juanma Barranquero <lekktu@gmail.com>
3476 * makefile.w32-in ($(BLD)/vm-limit.$(O)): Update dependencies.
3478 2012-08-19 Paul Eggert <eggert@cs.ucla.edu>
3480 Rely on <config.h> + <unistd.h> to declare 'environ',
3481 as gnulib does this if the system doesn't.
3482 * callproc.c, editfns.c, process.c (environ) [!USE_CRT_DLL]:
3483 Remove declaration. MS-Windows declares it on stdlib.h which is
3484 included by conf_post.h.
3485 * emacs.c (environ) [DOUG_LEA_MALLOC]:
3486 * vm-limit.c (environ) [ORDINARY_LINK]: Remove decl.
3487 * vm-limit.c: Include <unistd.h>, for 'environ'.
3489 * unexaix.c, unexcoff.c: Include "mem-limits.h".
3490 (start_of_data): Remove decl; mem-limits.h provides it.
3492 * xdisp.c (handle_invisible_prop): Make it a bit faster
3493 and avoid a gcc -Wmaybe-uninitialized diagnostic.
3495 2012-08-19 Chong Yidong <cyd@gnu.org>
3497 * xdisp.c (handle_invisible_prop): Fix ellipses at overlay string
3500 2012-08-19 Andreas Schwab <schwab@linux-m68k.org>
3502 * .gdbinit: Use call instead of set when calling a function in the
3505 * data.c (set_internal): Don't use set_blv_found.
3506 (Fkill_local_variable): Likewise.
3508 2012-08-18 Alp Aker <alp.tekin.aker@gmail.com>
3510 * nsfont.m (ns_ascii_average_width): Ensure the string
3511 ascii_printable is initialized with a null-terminated character
3512 array. Otherwise, it can contain undesired extra characters.
3514 2012-08-18 Paul Eggert <eggert@cs.ucla.edu>
3516 port new setting code to Sun C 5.8 2005/10/13
3517 * chartab.c, lisp.h (char_table_set, char_table_set_range):
3518 Return void, not Lisp_Object. Otherwise, the compiler
3519 complains about (A?B:C) where B is void and C is Lisp_Object
3520 when compiling CHAR_TABLE_SET, due to the recent change to
3521 the API of sub_char_table_set_contents.
3523 2012-08-18 Chong Yidong <cyd@gnu.org>
3525 * xdisp.c (handle_invisible_prop): Obey TEXT_PROP_MEANS_INVISIBLE
3526 for the string case (Bug#3874).
3528 2012-08-18 Paul Eggert <eggert@cs.ucla.edu>
3530 * buffer.h (BSET): Remove (Bug#12215).
3531 Replace all uses with calls to new setter functions.
3532 (bset_bidi_paragraph_direction, bset_case_canon_table)
3533 (bset_case_eqv_table, bset_directory, bset_display_count)
3534 (bset_display_time, bset_downcase_table)
3535 (bset_enable_multibyte_characters, bset_filename, bset_keymap)
3536 (bset_last_selected_window, bset_local_var_alist)
3537 (bset_mark_active, bset_point_before_scroll, bset_read_only)
3538 (bset_truncate_lines, bset_undo_list, bset_upcase_table)
3540 * buffer.c (bset_abbrev_mode, bset_abbrev_table)
3541 (bset_auto_fill_function, bset_auto_save_file_format)
3542 (bset_auto_save_file_name, bset_backed_up, bset_begv_marker)
3543 (bset_bidi_display_reordering, bset_buffer_file_coding_system)
3544 (bset_cache_long_line_scans, bset_case_fold_search)
3545 (bset_ctl_arrow, bset_cursor_in_non_selected_windows)
3546 (bset_cursor_type, bset_display_table, bset_extra_line_spacing)
3547 (bset_file_format, bset_file_truename, bset_fringe_cursor_alist)
3548 (bset_fringe_indicator_alist, bset_fringes_outside_margins)
3549 (bset_header_line_format, bset_indicate_buffer_boundaries)
3550 (bset_indicate_empty_lines, bset_invisibility_spec)
3551 (bset_left_fringe_width, bset_major_mode, bset_mark)
3552 (bset_minor_modes, bset_mode_line_format, bset_mode_name)
3553 (bset_name, bset_overwrite_mode, bset_pt_marker)
3554 (bset_right_fringe_width, bset_save_length)
3555 (bset_scroll_bar_width, bset_scroll_down_aggressively)
3556 (bset_scroll_up_aggressively, bset_selective_display)
3557 (bset_selective_display_ellipses, bset_vertical_scroll_bar_type)
3558 (bset_word_wrap, bset_zv_marker):
3559 * category.c (bset_category_table):
3560 * syntax.c (bset_syntax_table):
3561 New setter functions.
3563 * process.h (PSET): Remove (Bug#12215).
3564 Replace all uses with calls to new setter functions.
3565 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
3566 (PROCESS_INLINE): New macro.
3567 (pset_childp): New setter function.
3568 (pset_gnutls_cred_type) [HAVE_GNUTLS]: New setter function.
3569 * process.c (PROCESS_INLINE):
3570 Define to EXTERN_INLINE, so that the corresponding functions
3571 are compiled into code.
3572 (pset_buffer, pset_command, pset_decode_coding_system)
3573 (pset_decoding_buf, pset_encode_coding_system)
3574 (pset_encoding_buf, pset_filter, pset_log, pset_mark, pset_name)
3575 (pset_plist, pset_sentinel, pset_status, pset_tty_name)
3576 (pset_type, pset_write_queue): New setter functions.
3578 * window.h (WSET): Remove (Bug#12215).
3579 Replace all uses with calls to new setter functions.
3580 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
3581 (WINDOW_INLINE): New macro.
3582 (wset_buffer, wset_frame, wset_left_col, wset_next, wset_prev)
3583 (wset_redisplay_end_trigger, wset_top_line, wset_total_cols)
3584 (wset_total_lines, wset_vertical_scroll_bar)
3585 (wset_window_end_pos, wset_window_end_valid)
3586 (wset_window_end_vpos): New setter functions.
3587 * window.c (WINDOW_INLINE):
3588 Define to EXTERN_INLINE, so that the corresponding functions
3589 are compiled into code.
3590 (wset_combination_limit, wset_dedicated, wset_display_table)
3591 (wset_hchild, wset_left_fringe_width, wset_left_margin_cols)
3592 (wset_new_normal, wset_new_total, wset_next_buffers)
3593 (wset_normal_cols, wset_normal_lines, wset_parent, wset_pointm)
3594 (wset_prev_buffers, wset_right_fringe_width)
3595 (wset_right_margin_cols, wset_scroll_bar_width, wset_start)
3596 (wset_temslot, wset_vchild, wset_vertical_scroll_bar_type)
3597 (wset_window_parameters):
3598 * xdisp.c (wset_base_line_number, wset_base_line_pos)
3599 (wset_column_number_displayed, wset_region_showing):
3600 New setter functions.
3602 * termhooks.h (TSET): Remove (Bug#12215).
3603 Replace all uses with calls to new setter functions.
3604 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
3605 (TERMHOOKS_INLINE): New macro.
3606 (tset_charset_list, tset_selection_alist): New setter functions.
3607 * terminal.c (TERMHOOKS_INLINE):
3608 Define to EXTERN_INLINE, so that the corresponding functions
3609 are compiled into code.
3610 (tset_param_alist): New setter function.
3612 2012-08-17 Paul Eggert <eggert@cs.ucla.edu>
3614 * keyboard.h (KSET): Remove (Bug#12215).
3615 Replace all uses with calls to new setter functions.
3616 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
3617 (KEYBOARD_INLINE): New macro.
3618 (kset_default_minibuffer_frame, kset_defining_kbd_macro)
3619 (kset_input_decode_map, kset_last_command, kset_last_kbd_macro)
3620 (kset_prefix_arg, kset_system_key_alist, kset_window_system):
3621 New setter functions.
3622 * keyboard.c (KEYBOARD_INLINE):
3623 Define to EXTERN_INLINE, so that the corresponding functions
3624 are compiled into code.
3625 (kset_echo_string, kset_kbd_queue)
3626 (kset_keyboard_translate_table, kset_last_prefix_arg)
3627 (kset_last_repeatable_command, kset_local_function_key_map)
3628 (kset_overriding_terminal_local_map, kset_real_last_command)
3629 (kset_system_key_syms): New setter functions.
3631 * frame.h (FSET): Remove (Bug#12215).
3632 Replace all uses with calls to new setter functions.
3633 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
3634 (FRAME_INLINE): New macro.
3635 (fset_buffer_list, fset_buried_buffer_list, fset_condemned_scroll_bars)
3636 (fset_current_tool_bar_string, fset_desired_tool_bar_string)
3637 (fset_face_alist, fset_focus_frame, fset_icon_name, fset_menu_bar_items)
3638 (fset_menu_bar_vector, fset_menu_bar_window, fset_name)
3639 (fset_param_alist, fset_root_window, fset_scroll_bars)
3640 (fset_selected_window, fset_title, fset_tool_bar_items)
3641 (fset_tool_bar_position, fset_tool_bar_window): New functions.
3642 * frame.c (FRAME_INLINE):
3643 Define to EXTERN_INLINE, so that the corresponding functions
3644 are compiled into code.
3645 (fset_buffer_predicate, fset_minibuffer_window): New setter functions.
3647 A few more naming-convention fixes for getters and setters.
3648 * buffer.c (set_buffer_overlays_before): Move here from buffer.h,
3649 and rename from buffer_overlays_set_before.
3650 (set_buffer_overlays_after): Move here from buffer.h, and rename
3651 from buffer_overlays_set_after.
3652 * buffer.h (buffer_intervals): Rename from buffer_get_intervals.
3654 (set_buffer_intervals): Rename from buffer_set_intervals.
3655 * intervals.c (set_interval_object): Move here from intervals.h,
3656 and rename from interval_set_object.
3657 (set_interval_left): Move here from intervals.h, and rename from
3659 (set_interval_right): Move here from intervals.h, and rename from
3661 (copy_interval_parent): Move here from intervals.h, and rename from
3662 interval_copy_parent.
3663 * intervals.h (set_interval_parent): Rename from interval_set_parent.
3664 (set_interval_plist): Rename from interval_set_plist.
3665 Return void, not Lisp_Object, since no caller uses the result.
3666 * lisp.h (string_intervals): Rename from string_get_intervals.
3667 (set_string_intervals): Rename from string_set_intervals.
3669 * lisp.h (set_char_table_extras): Rename from char_table_set_extras.
3670 (set_char_table_contents): Rename from char_table_set_contents.
3671 (set_sub_char_table_contents): Rename from sub_char_table_set_contents.
3672 All uses changed. See the end of
3673 <http://lists.gnu.org/archive/html/emacs-devel/2012-08/msg00549.html>.
3675 * lisp.h (CSET): Remove (Bug#12215).
3676 (set_char_table_ascii, set_char_table_defalt, set_char_table_parent)
3677 (set_char_table_purpose): New functions,
3678 replacing CSET. All uses changed. For example, replace
3679 "CSET (XCHAR_TABLE (char_table), parent, parent);" with
3680 "set_char_table_parent (char_table, parent);".
3681 The old version was confusing because it used the same name
3682 'parent' for two different things.
3684 2012-08-17 Dmitry Antipov <dmantipov@yandex.ru>
3686 Functions to get and set Lisp_Object fields of buffer-local variables.
3687 * lisp.h (blv_found, set_blv_found, blv_value, set_blv_value)
3688 (set_blv_where, set_blv_defcell, set_blv_valcell): New functions.
3689 (BLV_FOUND, SET_BLV_FOUND, BLV_VALUE, SET_BLV_VALUE): Remove.
3690 * data.c, eval.c, frame.c: Adjust users.
3692 2012-08-17 Chong Yidong <cyd@gnu.org>
3694 * xfaces.c (merge_face_vectors): If the target font specfies a
3695 font spec, make the font's attributes take precedence over
3696 directly-specified attributes.
3697 (merge_face_ref): Recognize :font.
3699 2012-08-17 Dmitry Antipov <dmantipov@yandex.ru>
3701 Do not use memcpy for copying intervals.
3702 * intervals.c (reproduce_interval): New function.
3703 (reproduce_tree, reproduce_tree_obj): Use it.
3704 (reproduce_tree_obj): Remove prototype.
3706 2012-08-17 Paul Eggert <eggert@cs.ucla.edu>
3708 * lisp.h (duration_to_sec_usec): Remove unused decl.
3710 2012-08-17 Alp Aker <alp.tekin.aker@gmail.com>
3712 * nsfont.m (ns_ascii_average_width): Send initWithFormat selector
3713 to an allocated instance of NSString, not to the class itself.
3715 2012-08-17 Juanma Barranquero <lekktu@gmail.com>
3717 * makefile.w32-in (C_CTYPE_H): New macro.
3718 (LISP_H, $(BLD)/ccl.$(O), $(BLD)/doc.$(O), $(BLD)/w32console.$(O)):
3719 ($(BLD)/fontset.$(O), $(BLD)/frame.$(O), $(BLD)/composite.$(O)):
3720 ($(BLD)/sysdep.$(O), $(BLD)/w32uniscribe.$(O)): Update dependencies.
3722 2012-08-16 Paul Eggert <eggert@cs.ucla.edu>
3724 Use ASCII tests for character types.
3725 * category.c, dispnew.c, doprnt.c, editfns.c, syntax.c, term.c:
3727 Don't include <ctype.h>; was not needed.
3728 * charset.c, doc.c, fileio.c, font.c, frame.c, gtkutil.c, image.c:
3729 * sysdep.c, xfaces.c:
3730 Include <c-ctype.h> instead of <ctype.h>.
3731 * nsterm.m: Include <c-ctype.h>.
3732 * charset.c (read_hex):
3733 * doc.c (Fsnarf_documentation):
3734 * fileio.c (IS_DRIVE) [WINDOWSNT]:
3735 (DRIVE_LETTER) [DOS_NT]:
3736 (Ffile_name_directory, Fexpand_file_name)
3737 (Fsubstitute_in_file_name):
3738 * font.c (font_parse_xlfd, font_parse_fcname):
3739 * frame.c (x_set_font_backend):
3740 * gtkutil.c (xg_get_font):
3741 * image.c (xbm_scan, xpm_scan, pbm_scan_number):
3742 * nsimage.m (hexchar):
3743 * nsterm.m (ns_xlfd_to_fontname):
3744 * sysdep.c (system_process_attributes):
3745 * xfaces.c (hash_string_case_insensitive):
3746 Use C-locale tests instead of locale-specific tests for character
3747 types, since we want the ASCII interpretation here, not the
3748 interpretation suitable for whatever happens to be the current locale.
3750 2012-08-16 Martin Rudalics <rudalics@gmx.at>
3752 Consistently check windows for validity/liveness
3753 (Bug#11984, Bug#12025, Bug#12026).
3754 * lisp.h (CHECK_VALID_WINDOW): New macro.
3755 * window.c (decode_window): Rename to decode_live_window.
3756 (decode_valid_window, Fwindow_valid_p): New functions.
3757 (Fwindow_frame, Fframe_root_window, Fwindow_minibuffer_p)
3758 (Fframe_first_window, Fframe_selected_window, Fwindow_parent)
3759 (Fwindow_top_child, Fwindow_left_child, Fwindow_next_sibling)
3760 (Fwindow_prev_sibling, Fwindow_combination_limit)
3761 (Fset_window_combination_limit, Fwindow_use_time)
3762 (Fwindow_total_height, Fwindow_total_width, Fwindow_new_total)
3763 (Fwindow_normal_size, Fwindow_new_normal, Fwindow_left_column)
3764 (Fwindow_top_line, Fwindow_body_height, Fwindow_body_width)
3765 (Fwindow_hscroll, Fset_window_hscroll)
3766 (Fwindow_redisplay_end_trigger)
3767 (Fset_window_redisplay_end_trigger, Fwindow_edges)
3768 (Fwindow_pixel_edges, Fwindow_absolute_pixel_edges)
3769 (Fwindow_inside_edges, Fwindow_inside_pixel_edges)
3770 (Fcoordinates_in_window_p, Fwindow_point, Fwindow_start)
3771 (Fwindow_end, Fset_window_point, Fset_window_start)
3772 (Fpos_visible_in_window_p, Fwindow_line_height)
3773 (Fwindow_dedicated_p, Fset_window_dedicated_p)
3774 (Fwindow_prev_buffers, Fset_window_prev_buffers)
3775 (Fwindow_next_buffers, Fwindow_parameters, Fwindow_parameter)
3776 (Fset_window_parameter, Fwindow_display_table)
3777 (Fset_window_display_table, Fdelete_other_windows_internal)
3778 (Fset_window_buffer, Fset_window_new_total)
3779 (Fset_window_new_normal, Fdelete_window_internal)
3780 (Fwindow_text_height, Fset_window_margins, Fwindow_margins)
3781 (Fset_window_fringes, Fwindow_fringes, Fset_window_scroll_bars)
3782 (Fwindow_scroll_bars): Check whether argument window is a valid or
3783 live window. Update doc-strings.
3784 (syms_of_window): New symbol Qwindow_valid_p.
3785 * keyboard.c (Fposn_at_x_y): Check whether argument
3786 frame_or_window denotes a valid window.
3788 2012-08-16 Dmitry Antipov <dmantipov@yandex.ru>
3790 Fix previous char table change.
3791 * lisp.h (CHAR_TABLE_SET): Use sub_char_table_set_contents.
3792 * chartab.c (optimize_sub_char_table): Likewise.
3794 2012-08-16 Chong Yidong <cyd@gnu.org>
3796 * gtkutil.c (xg_get_font): Demand an Xft font (Bug#3228).
3798 * xfont.c (xfont_open):
3799 * xftfont.c (xftfont_open): Set the font's max_width field.
3801 * nsfont.m (nsfont_open): Similar to the Xft backend, set
3802 min_width to space_width and average_width to the average over
3803 printable ASCII characters.
3804 (ns_char_width): Code cleanup.
3805 (ns_ascii_average_width): New utility function.
3807 * font.h (struct font): Update comments.
3809 2012-08-16 Dmitry Antipov <dmantipov@yandex.ru>
3811 Simple interface to set Lisp_Object fields of character tables.
3812 * lisp.h (CSET): New macro.
3813 (char_table_set_extras, char_table_set_contents)
3814 (sub_char_table_set_contents): New function.
3815 * casetab.c, category.c, chartab.c, fns.c, fontset.c, search.c:
3816 * syntax.c: Adjust users.
3818 2012-08-16 Stefan Monnier <monnier@iro.umontreal.ca>
3820 * eval.c (eval_sub): Bind lexical-binding.
3821 * lread.c (Qlexical_binding): Make non-static.
3823 2012-08-15 Jan Djärv <jan.h.d@swipnet.se>
3825 * nsmenu.m (popupSession): Remove.
3826 (pop_down_menu): Remove endModalSession.
3827 (timeout_handler:): New method.
3828 (runDialogAt:): Get next timeout. Start a NSTimer with that timeout.
3829 Call runModalForWindow. Check timer_fired when it returns.
3830 If not set, cancel timer and break out of loop.
3831 Otherwise loop again, with a new timeout.
3833 * nsterm.m: Include fcntl.h if present.
3834 (fd_entry, t_readfds, inNsSelect): Remove.
3835 (select_writefds, select_valid, select_timeout, selfds)
3836 (select_mutex, apploopnr): Add.
3837 (EV_TRAILER): Call kbd_buffer_store_event_hold only if q_event_ptr.
3838 Otherwise call kbd_buffer_store_event.
3839 (ns_send_appdefined): Remove release of fd_entry.
3840 (ns_read_socket): Always send appdefined. Remove inNsSelect check.
3841 Increment and decrement apploopnr.
3842 (ns_select): If no file descriptors, just do a NSTimer.
3843 Otherwise copy read/write masks and start select thread (fd_handler).
3844 Start main loop and wait for application defined event.
3845 Inform select thread to stop selecting after main loop is exited.
3846 (ns_term_init): Create selfds pipe and set non-blocking.
3847 Initialize select_mutex. Start the select thread (fd_handler).
3848 (fd_handler:): Loop forever, wait for info from the main thread
3849 to either start or stop selecting. When select returns, send
3850 and appdefined event.
3851 (sendScrollEventAtLoc:fromEvent:): Check if q_event_ptr is set.
3852 If not call kbd_buffer_store_event.
3854 * nsterm.h (EmacsApp): fd_handler takes id argument.
3855 (EmacsDialogPanel): Add timer_fired and timeout_handler.
3857 * gtkutil.c (xg_mark_data): Use FRAME_X_P.
3859 2012-08-15 Eli Zaretskii <eliz@gnu.org>
3861 * region-cache.c (move_cache_gap): Update gap_len using the actual
3862 growth of the boundaries array. Do not change cache_len.
3865 2012-08-15 Dmitry Antipov <dmantipov@yandex.ru>
3867 Generalize and cleanup font subsystem checks.
3868 * font.h (FONT_DEBUG, font_assert): Remove.
3869 * font.c, fontset.c, w32font.c, xfont.c, xftfont.c:
3870 Change font_assert to eassert. Use eassert where appropriate.
3872 2012-08-15 Dmitry Antipov <dmantipov@yandex.ru>
3874 * gtkutil.c (xg_get_font): Use pango_units_to_double.
3876 2012-08-15 Chong Yidong <cyd@gnu.org>
3878 * gtkutil.c (xg_get_font): Rename from xg_get_font_name.
3879 When using the new font chooser, use gtk_font_chooser_get_font_desc to
3880 extract the font descriptor instead of just the font name.
3881 In that case, return a font spec instead of a string.
3882 (x_last_font_name): Move to this file from xfns.c.
3884 * xfns.c (Fx_select_font): The return value can also be a font
3885 spec. Move x_last_font_name management to gtkutil.c.
3887 * xfaces.c: Make font weight and style symbols non-static.
3889 2012-08-15 Stefan Monnier <monnier@iro.umontreal.ca>
3891 * minibuf.c (read_minibuf): Ignore caller's inhibit-read-only
3894 2012-08-14 Stefan Monnier <monnier@iro.umontreal.ca>
3896 * alloc.c (Fgarbage_collect): Use plural form consistently.
3898 2012-08-14 Eli Zaretskii <eliz@gnu.org>
3900 * keyboard.c (command_loop_1): Reset ignore_mouse_drag_p flag each
3901 iteration through the command loop. Fixes a problem whereby mouse
3902 movements are ignored until the first mouse click.
3904 2012-08-14 Paul Eggert <eggert@cs.ucla.edu>
3906 Use bool, not int, for Lisp booleans.
3907 This is more natural, and on my platform (GCC 4.7.1 x86-64) it
3908 makes Emacs a bit smaller and presumably a bit faster.
3909 * lisp.h: Include <stdbool.h>.
3910 (struct Lisp_Boolfwd, defvar_bool):
3911 * lread.c (defvar_bool): Use bool, not int, for Lisp booleans.
3912 * regex.c [!emacs]: Include <stdbool.h>.
3913 (false, true): Remove; <stdbool.h> does this for us now.
3915 2012-08-14 Chong Yidong <cyd@gnu.org>
3917 * character.c (Fcharacterp): Doc fix (Bug#12076).
3919 * data.c (Findirect_variable): Doc fix (Bug#11040).
3921 * chartab.c (Fmap_char_table): Doc fix (Bug#12061).
3923 * editfns.c (Fformat): Doc fix (Bug#12059).
3924 (Fsave_current_buffer): Doc fix (Bug#11542).
3926 2012-08-14 Barry OReilly <gundaetiapo@gmail.com> (tiny change)
3928 * keyboard.c (access_keymap_keyremap): Accept anonymous functions
3931 2012-08-14 Martin Rudalics <rudalics@gmx.at>
3933 * frame.c (make_frame_without_minibuffer, make_minibuffer_frame)
3934 (delete_frame, Fmake_frame_invisible, Ficonify_frame):
3935 * minibuf.c (choose_minibuf_frame, read_minibuf):
3936 * w32fns.c (x_create_tip_frame):
3937 * xfns.c (x_create_tip_frame): Call set_window_buffer instead of
3938 Fset_window_buffer (Bug#11984, Bug#12025, Bug#12026).
3940 2012-08-14 Paul Eggert <eggert@cs.ucla.edu>
3942 * intervals.c (offset_intervals): Remove obsolete comment.
3944 2012-08-14 Andreas Schwab <schwab@linux-m68k.org>
3946 * gtkutil.c (find_rtl_image, update_frame_tool_bar): Use NILP.
3948 2012-08-14 Gergely Risko <gergely@risko.hu>
3950 * coding.c (decode_coding): Record buffer modification before
3951 disabling undo_list (Bug#11773).
3953 2012-08-14 Dmitry Antipov <dmantipov@yandex.ru>
3955 Revert and cleanup some recent overlay changes.
3956 * buffer.h (enum overlay_type): Remove.
3957 (buffer_get_overlays, buffer_set_overlays): Likewise.
3958 (buffer_set_overlays_before, buffer_set_overlays_after):
3959 New function. Adjust users.
3960 (unchain_both): Add eassert.
3962 2012-08-14 Dmitry Antipov <dmantipov@yandex.ru>
3964 * gtkutil.c (update_frame_tool_bar): Use EQ where appropriate.
3966 2012-08-14 Paul Eggert <eggert@cs.ucla.edu>
3968 * gtkutil.c (xg_mark_data): Don't assume C99.
3970 2012-08-13 Jan Djärv <jan.h.d@swipnet.se>
3972 * gtkutil.c (xg_frame_tb_info): New struct.
3973 (TB_INFO_KEY): New define.
3974 (xg_free_frame_widgets): Free xg_frame_tb_info for frame if present.
3975 (xg_mark_data): Mark Lisp_Objects in xg_frame_tb_info.
3976 (xg_create_tool_bar): Allocate and initialize a xg_frame_tb_info
3978 (update_frame_tool_bar): Return early if data in xg_frame_tb_info
3979 is up to date. Otherwise store new data.
3980 (free_frame_tool_bar): Free xg_frame_tb_info if present.
3982 2012-08-13 Dmitry Antipov <dmantipov@yandex.ru>
3984 Use KSET for write access to Lisp_Object members of struct kboard.
3985 * keyboard.h (KSET): New macro.
3986 * callint.c, category.c, frame.c, keyboard.c, keyboard.h, macros.c:
3987 * msdos.c, nsfns.m, nsterm.m, term.c, w32fns.c, w32term.c, xfns.c:
3988 * xterm.c: Adjust users.
3990 2012-08-13 Dmitry Antipov <dmantipov@yandex.ru>
3992 Use BSET for write access to Lisp_Object members of struct buffer.
3993 * buffer.h (BSET): New macro.
3994 * buffer.c, casetab.c, cmds.c, coding.c, data.c, editfns.c:
3995 * fileio.c, frame.c, indent.c, insdel.c, intervals.c, keymap.c:
3996 * minibuf.c, print.c, process.c, syntax.c, undo.c, w32fns.c:
3997 * window.c, xdisp.c, xfns.c: Adjust users.
3999 2012-08-11 BT Templeton <bpt@hcoop.net> (tiny change)
4001 * lread.c (syms_of_lread): Initialize Vlexical_binding.
4003 2012-08-11 Jan Djärv <jan.h.d@swipnet.se>
4005 * nsterm.m (not_in_argv): New function.
4006 (application:openFile, application:openTempFile:):
4007 (application:openFileWithoutUI:, application:openFiles:): Open file
4008 if not_in_argv returns non-zero (bug#12171).
4010 * gtkutil.c (gtk_font_chooser_dialog_new, GTK_FONT_CHOOSER)
4011 (gtk_font_chooser_set_font, gtk_font_chooser_get_font):
4012 Define for Gtk+ versions less than 3.2.
4013 (xg_get_font_name): Use those functions/macros here.
4014 Reported by Frans Oilinki <moilinki@gmail.com>.
4016 2012-08-11 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
4018 * unexmacosx.c (copy_data_segment): Copy initialized data in
4019 statically linked libraries from input file rather than memory.
4021 * unexmacosx.c (print_load_command_name): Add cases LC_MAIN,
4022 LC_SOURCE_VERSION, and LC_DYLIB_CODE_SIGN_DRS.
4023 (dump_it) [LC_DYLIB_CODE_SIGN_DRS]: Call copy_linkedit_data.
4025 2012-08-10 Glenn Morris <rgm@gnu.org>
4027 * conf_post.h (IF_LINT, lint_assume): Move here from lisp.h.
4028 * lisp.h (IF_LINT, lint_assume): Move to conf_post.h.
4030 2012-08-10 Dmitry Antipov <dmantipov@yandex.ru>
4032 Fix last change to allow compilation with low optimization levels.
4033 * intervals.c (INTERVALS_INLINE): Define to EXTERN_INLINE.
4034 Reported by Jan Djärv <jan.h.d@swipnet.se>.
4036 2012-08-10 Dmitry Antipov <dmantipov@yandex.ru>
4038 Use common inline syntax in intervals.h.
4039 * intervals.h (INTERVALS_INLINE): New macro.
4040 Change all users from LISP_INLINE.
4042 2012-08-10 Dmitry Antipov <dmantipov@yandex.ru>
4044 Define Qnone once for all platforms.
4045 * frame.c (Qnone): Define here.
4046 (syms_of_frame): DEFSYM it.
4047 * lisp.h (Qnone): New declaration.
4048 * nsfns.m, nsterm.h, nsterm.m, w32fns.c, w32font.c:
4049 * xfns.c: Remove duplication. Adjust users.
4051 2012-08-10 Dmitry Antipov <dmantipov@yandex.ru>
4053 Remove unused macros from intervals.h.
4054 * intervals.h (MERGE_INSERTIONS, DISPLAY_INVISIBLE_GLYPH): Remove.
4055 * intervals.c: Adjust comment.
4057 2012-08-10 Eli Zaretskii <eliz@gnu.org>
4059 * w32fns.c <w32_unicode_gui>: New static variable.
4060 (globals_of_w32fns): Initialize it according to os_subtype.
4061 (w32_init_class, w32_msg_pump, w32_wnd_proc): Use it instead of
4064 2012-08-10 Joakim Hårsman <joakim.harsman@gmail.com> (tiny change)
4065 Eli Zaretskii <eliz@gnu.org>
4067 Fix bug #10299 with Unicode characters sent by customized
4068 keyboards created by MSKLC.
4069 * w32fns.c (INIT_WINDOW_CLASS): New macro.
4070 (w32_init_class): Use it to initialize the Emacs class with either
4071 ANSI or Unicode API calls.
4072 (w32_msg_pump): Call GetMessageW and DispatchMessageW on NT and
4074 (w32_wnd_proc): If the character code sent by WM_CHAR or
4075 WM_SYSCHAR is above 255, post a WM_UNICHAR message, not the
4076 original message. Call DefWindowProcW on NT and later.
4078 2012-08-10 Glenn Morris <rgm@gnu.org>
4080 * Makefile.in (config_h): Fix conf_post.h out-of-tree build location.
4082 * lisp.h (DIRECTORY_SEP): Let configure set it.
4084 2012-08-09 Dmitry Antipov <dmantipov@yandex.ru>
4086 Use TSET for write access to Lisp_Object slots of struct terminal.
4087 * termhooks.h (TSET): New macro.
4088 * coding.c, terminal.c, xselect.c: Adjust users.
4090 2012-08-08 Stefan Monnier <monnier@iro.umontreal.ca>
4092 * xdisp.c (safe_eval_handler): Remove prototype. Receive args describing
4093 the failing expression, include them in the error message.
4094 * eval.c (internal_condition_case_n): Pass nargs and args to hfun.
4095 * lisp.h (internal_condition_case_n): Update declaration.
4097 2012-08-08 Dmitry Antipov <dmantipov@yandex.ru>
4099 Inline functions to examine and change buffer overlays.
4100 * buffer.c (unchain_both): New function.
4101 * buffer.h (buffer_get_overlays, buffer_set_overlays):
4102 (buffer_has_overlays): New function.
4103 (enum overlay_type): New enum.
4104 * alloc.c, buffer.c, editfns.c, fileio.c, indent.c:
4105 * insdel.c, intervals.c, print.c, xdisp.c: Adjust users.
4107 2012-08-08 Dmitry Antipov <dmantipov@yandex.ru>
4109 Inline functions to examine and change buffer intervals.
4110 * alloc.c (mark_interval_tree): Remove.
4111 (MARK_INTERVAL_TREE): Simplify.
4112 (UNMARK_BALANCE_INTERVALS): Remove. Adjust users.
4113 * intervals.c (buffer_balance_intervals): New function.
4114 (graft_intervals_into_buffer): Adjust indentation.
4115 (set_intervals_multibyte): Simplify.
4116 * buffer.h (BUF_INTERVALS): Remove.
4117 (buffer_get_intervals, buffer_set_intervals): New function.
4118 * alloc.c, buffer.c, editfns.c, fileio.c, indent.c, insdel.c:
4119 * intervals.c, textprop.c: Adjust users.
4121 2012-08-08 Dmitry Antipov <dmantipov@yandex.ru>
4123 Inline functions to examine and change string intervals.
4124 * lisp.h (STRING_INTERVALS, STRING_SET_INTERVALS): Remove.
4125 (string_get_intervals, string_set_intervals): New function.
4126 * alloc.c, buffer.c, editfns.c, fns.c, insdel.c, intervals.c:
4127 * lread.c, print.c, textprop.c: Adjust users.
4129 2012-08-08 Glenn Morris <rgm@gnu.org>
4131 * lisp.mk (lisp): Remove language/persian.elc.
4133 2012-08-08 Dmitry Antipov <dmantipov@yandex.ru>
4136 * intervals.h (NULL_INTERVAL, DEFAULT_INTERVAL): Remove.
4137 (NULL_INTERVAL_P): Likewise. Adjust users.
4138 (FRONT_STICKY_P, END_NONSTICKY_P, FRONT_NONSTICKY_P):
4139 Adjust comment. Move under #if 0.
4140 * alloc.c, buffer.c, editfns.c, fns.c, insdel.c, intervals.c:
4141 * print.c, syntax.c, textprop.c, xdisp.c: Adjust users.
4143 2012-08-08 Dmitry Antipov <dmantipov@yandex.ru>
4145 Check total length of intervals with eassert.
4146 * intervals.h (CHECK_TOTAL_LENGTH): Remove.
4147 * intervals.c: Change all users to eassert.
4149 2012-08-07 Eli Zaretskii <eliz@gnu.org>
4151 * .gdbinit (xframe, xwindow, nextcons, xcar, xcdr, xlist):
4152 Rename fields to match removal of FGET and WGET and disuse of
4153 INTERNAL_FIELD in Lisp_Cons.
4155 2012-08-07 Dmitry Antipov <dmantipov@yandex.ru>
4157 Revert and cleanup Lisp_Cons, Lisp_Misc and Lisp_Symbol things.
4158 * lisp.h (struct Lisp_Symbol): Change xname to meaningful
4159 name since all xname users are fixed long time ago. Do not
4161 (set_symbol_name, set_symbol_function, set_symbol_plist):
4162 (set_symbol_next, set_overlay_plist): New function.
4163 (struct Lisp_Cons): Do not use INTERNAL_FIELD.
4164 (struct Lisp_Overlay): Likewise.
4165 (CVAR, MVAR, SVAR): Remove.
4166 * alloc.c, buffer.c, buffer.h, bytecode.c, cmds.c, data.c:
4167 * doc.c, eval.c, fns.c, keyboard.c, lread.c, nsselect.m:
4168 * xterm.c: Adjust users.
4169 * .gdbinit: Change to use name field of struct Lisp_Symbol
4172 2012-08-07 Dmitry Antipov <dmantipov@yandex.ru>
4174 Basic functions to set Lisp_Object and pointer slots of intervals.
4175 * intervals.h (interval_set_parent, interval_set_object):
4176 (interval_set_left, interval_set_right, interval_set_plist):
4177 (interval_copy_parent): New function.
4178 (SET_INTERVAL_OBJECT, SET_INTERVAL_PARENT, INTERVAL_PTR_SIZE): Remove.
4179 (RESET_INTERVAL, COPY_INTERVAL_CACHE, MERGE_INTERVAL_CACHE):
4181 (INTERVAL_SIZE): Remove. Adjust users.
4182 * alloc.c, intervals.c, lread.c, textprop.c: Use new functions.
4184 2012-08-07 Dmitry Antipov <dmantipov@yandex.ru>
4186 Drop PGET and revert read access to Lisp_Objects slots of Lisp_Process.
4187 * process.h (PGET): Remove.
4188 (struct Lisp_Process): Do not use INTERNAL_FIELD.
4189 * gnutls.c, print.c, process.c, sysdep.c, w32.c, xdisp.c: Adjust users.
4191 2012-08-07 Dmitry Antipov <dmantipov@yandex.ru>
4193 Drop WGET and revert read access to Lisp_Objects slots of struct window.
4194 * window.h (WGET): Remove.
4195 (struct window): Do not use INTERNAL_FIELD.
4196 * alloc.c, buffer.c, composite.c, dispextern.h, dispnew.c, editfns.c:
4197 * fileio.c, font.c, fontset.c, frame.c, frame.h, fringe.c, indent.c:
4198 * insdel.c, keyboard.c, keymap.c, lisp.h, minibuf.c, msdos.c, nsfns.m:
4199 * nsmenu.m, nsterm.m, print.c, textprop.c, w32fns.c, w32menu.c:
4200 * w32term.c, window.c, xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c:
4203 2012-08-07 Chong Yidong <cyd@gnu.org>
4205 * window.c (Fwindow_edges, Fwindow_pixel_edges)
4206 (Fwindow_absolute_pixel_edges, Fdelete_other_windows_internal)
4207 (Fdelete_window_internal): Signal an error if the window is not on
4208 a live frame (Bug#12025).
4210 2012-08-07 Dmitry Antipov <dmantipov@yandex.ru>
4212 Drop FGET and revert read access to Lisp_Objects slots of struct frame.
4213 * frame.h (FGET): Remove.
4214 (struct frame): Do not use INTERNAL_FIELD.
4215 * buffer.c, data.c, dispnew.c, dosfns.c, eval.c, fontset.c, frame.c:
4216 * fringe.c, gtkutil.c, minibuf.c, msdos.c, nsfns.m, nsmenu.m, nsterm.m:
4217 * print.c, term.c, w32fns.c, w32menu.c, w32term.c, window.c, window.h:
4218 * xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c: Adjust users.
4220 2012-08-06 Juanma Barranquero <lekktu@gmail.com>
4222 * w32.c: Silence compiler warnings.
4223 (map_w32_filename): Remove unused variable `is_fat'.
4224 (chase_symlinks): Add parentheses around expression.
4226 2012-08-06 Glenn Morris <rgm@gnu.org>
4228 * sysdep.c: Respect BROKEN_GETWD.
4230 * dispnew.c (GNU_LIBRARY_PENDING_OUTPUT_COUNT, PENDING_OUTPUT_COUNT):
4231 Let configure handle it.
4232 (stdio_ext.h) [DISPNEW_NEEDS_STDIO_EXT]: Include it.
4234 2012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
4236 Use GCALIGNMENT where appropriate.
4237 * alloc.c (XMALLOC_HEADER_ALIGNMENT, roundup_size):
4238 (union aligned_Lisp_Symbol, union aligned_Lisp_Misc):
4239 (mark_maybe_pointer, pure_alloc): Change to use GCALIGNMENT.
4241 2012-08-06 Eli Zaretskii <eliz@gnu.org>
4243 * w32menu.c (set_frame_menubar, initialize_frame_menubar):
4244 Don't use FRAME_MENU_BAR_ITEMS as an lvalue.
4246 2012-08-06 Stefan Monnier <monnier@iro.umontreal.ca>
4248 * buffer.h (struct buffer): Revert `indirections' to a simple int;
4249 that should be sufficient for everyone.
4251 2012-08-06 Jan Djärv <jan.h.d@swipnet.se>
4253 * keyboard.c (timer_check_2): Add break so timer_check returns next
4256 2012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
4258 Fix Windows build errors introduced after converting to WGET and WSET.
4259 * w32term.c (w32_set_vertical_scroll_bar): Change to use WSET.
4260 Reported by Andy Moreton <andrewjmoreton@gmail.com>.
4262 2012-08-06 Jan Djärv <jan.h.d@swipnet.se>
4264 * nsterm.m (ns_frame_rehighlight): Use FSET.
4266 * nsmenu.m (ns_update_menubar): Use FSET.
4268 2012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
4270 Separate read and write access to Lisp_Object slots of Lisp_Process.
4271 * process.h (PGET, PSET): New macros similar to AREF and ASET.
4272 * gnutls.c, print.c, process.c, sysdep.c, w32.c, xdisp.c: Adjust users.
4274 2012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
4276 Separate read and write access to Lisp_Object slots of struct window.
4277 * window.h (WGET, WSET): New macros similar to AREF and ASET.
4278 * alloc.c, buffer.c, composite.c, dispextern.h, dispnew.c, editfns.c:
4279 * fileio.c, font.c, fontset.c, frame.c, frame.h, fringe.c, indent.c:
4280 * insdel.c, keyboard.c, keymap.c, lisp.h, minibuf.c, msdos.c, nsfns.m:
4281 * nsmenu.m, nsterm.m, print.c, textprop.c, w32fns.c, w32menu.c:
4282 * w32term.c, window.c, xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c:
4285 2012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
4287 Fix Windows build errors introduced after converting to FGET and FSET.
4288 * w32term.c (x_frame_rehighlight, x_scroll_bar_create):
4289 (w32_condemn_scroll_bars, w32_redeem_scroll_bar):
4290 (w32_judge_scroll_bars): Change to use FSET.
4291 Reported by Andy Moreton <andrewjmoreton@gmail.com>.
4293 2012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
4295 Fix replacement typo.
4296 * window.c (replace_window): Set root_window instead of
4297 selected_window. This fixes a total window subsystem
4298 malfunction reported by Bastien Guerry <bzg@gnu.org>.
4300 2012-08-06 Glenn Morris <rgm@gnu.org>
4302 * lisp.mk (lisp): Add language/persian.elc.
4304 2012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
4306 Separate read and write access to Lisp_Object slots of struct frame.
4307 * frame.h (FGET, FSET): New macros similar to AREF and ASET.
4308 * buffer.c, data.c, dispnew.c, dosfns.c, eval.c, fontset.c, frame.c:
4309 * fringe.c, gtkutil.c, minibuf.c, msdos.c, nsfns.m, nsmenu.m, nsterm.m:
4310 * print.c, term.c, w32fns.c, w32menu.c, w32term.c, window.c, window.h:
4311 * xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c: Adjust users.
4313 2012-08-05 Andreas Schwab <schwab@linux-m68k.org>
4315 * emacs.c (decode_env_path): Only use defaulted if WINDOWSNT.
4317 2012-08-05 Dmitry Antipov <dmantipov@yandex.ru>
4319 Generalize common compile-time constants.
4320 * lisp.h (header_size, bool_header_size, word_size): Now here.
4321 (struct Lisp_Vector): Add comment.
4322 (struct Lisp_Bool_Vector): Move up to define handy constants.
4323 (VECSIZE, PSEUDOVECSIZE): Simplify.
4324 (SAFE_ALLOCA_LISP): Use new constant. Adjust indentation.
4325 * buffer.c, buffer.h, bytecode.c, callint.c, eval.c, fns.c:
4326 * font.c, fontset.c, keyboard.c, keymap.c, macros.c, menu.c:
4327 * msdos.c, w32menu.c, w32term.h, window.c, xdisp.c, xfaces.c:
4328 * xfont.c, xmenu.c: Use word_size where appropriate.
4330 2012-08-05 Lawrence Mitchell <wence@gmx.li>
4332 * search.c (Freplace_match): Treat \? in the replacement text
4333 literally (Bug#8161).
4335 2012-08-05 Chong Yidong <cyd@gnu.org>
4337 * term.c (Vsuspend_tty_functions, Vresume_tty_functions):
4338 * frame.c (Vdelete_frame_functions):
4339 * emacs.c (Vkill_emacs_hook): Doc fix.
4341 2012-08-04 Eli Zaretskii <eliz@gnu.org>
4343 * xfns.c (x_set_menu_bar_lines): Fix compilation error in
4344 --with-x-toolkit=no builds.
4345 Reported by Carsten Mattner <carstenmattner@gmail.com>.
4347 2012-08-04 Chong Yidong <cyd@gnu.org>
4349 * syntax.c (Fmodify_syntax_entry): Doc fix.
4351 2012-08-04 Eli Zaretskii <eliz@gnu.org>
4353 Fix startup warnings about ../site-lisp on MS-Windows. (Bug#11959)
4354 * w32.c (init_environment): Change the default values of many
4355 environment variables in dflt_envvars[] to NULL, to avoid pushing
4356 them into environment when they were not already defined.
4357 Remove the code that deletes site-lisp subdirectories from the default
4358 value of EMACSLOADPATH, as it is no longer needed.
4359 (check_windows_init_file): Now external, not static.
4360 Use Vload_path as is, without adding anything, as this function is now
4361 called when Vload_path is already set up.
4363 * w32.h (check_windows_init_file): Add prototype.
4365 * emacs.c (init_cmdargs) [WINDOWSNT]: When running from the build
4366 directory, ignore the /*/i386/ tail in Vinvocation_directory, for
4367 compatibility with Posix platforms.
4368 (main): Move the call to check_windows_init_file to here from
4370 (decode_env_path) [WINDOWSNT]: Expand the %emacs_dir%/ prefix, if
4371 any, in the DEFALT argument into the root of the Emacs build or
4372 installation tree, as appropriate.
4374 * callproc.c (init_callproc_1): Call decode_env_path instead of
4375 doing its equivalent by hand.
4376 (init_callproc): Replace DOS_NT condition with MSDOS, thus letting
4377 the code that sets Vexec_path run on MS-Windows.
4379 * lread.c (init_lread): Add comments to #ifdef's.
4381 * msdos.c (dos_set_window_size, IT_update_begin)
4382 (IT_frame_up_to_date, IT_set_frame_parameters): Use FVAR and WVAR
4383 instead of direct references.
4385 2012-08-04 Paul Eggert <eggert@cs.ucla.edu>
4387 Export DEFAULT_REHASH_* to GDB.
4388 * lisp.h (DEFAULT_REHASH_THRESHOLD, DEFAULT_REHASH_SIZE):
4389 Now constants, not macros.
4391 2012-08-03 Paul Eggert <eggert@cs.ucla.edu>
4393 Remove unnecessary casts involving pointers.
4394 These casts are no longer needed now that we assume C89 or later,
4395 since they involve casting to or from void *.
4396 * alloc.c (make_pure_string, make_pure_c_string, pure_cons)
4397 (make_pure_float, make_pure_vector):
4398 * lisp.h (SAFE_ALLOCA, SAFE_ALLOCA_LISP):
4399 * macros.c (Fstart_kbd_macro):
4400 * menu.c (find_and_return_menu_selection):
4401 * minibuf.c (read_minibuf_noninteractive):
4402 * sysdep.c (closedir):
4403 * xdisp.c (x_produce_glyphs):
4404 * xfaces.c (compare_fonts_by_sort_order):
4405 * xfns.c (x_real_positions, select_visual):
4406 * xselect.c (x_stop_queuing_selection_requests)
4407 (x_get_window_property, x_get_window_property_as_lisp_data):
4408 * xterm.c (x_set_frame_alpha, x_find_modifier_meanings):
4409 Remove unnecessary pointer casts.
4410 * alloc.c (record_xmalloc): New function.
4411 * lisp.h (record_xmalloc): New decl.
4412 (SAFE_ALLOCA): Now takes just one arg -- the size -- and acts
4413 more like a function. This is because the pointer cast is not
4414 needed. All uses changed.
4415 * print.c (print_string, print_error_message): Avoid length recalc.
4417 Improve fix for macroexp crash with debugging (Bug#12118).
4418 * lisp.h (ASET) [ENABLE_CHECKING]: Pay attention to
4419 ARRAY_MARK_FLAG when checking subscripts, because ASET is
4420 not supposed to be invoked from the garbage collector.
4421 See Andreas Schwab in <http://bugs.gnu.org/12118#25>.
4422 (gc_aset): New function, which is like ASET but can be
4423 used in the garbage collector.
4424 (set_hash_key, set_hash_value, set_hash_next, set_hash_hash)
4425 (set_hash_index): Use it instead of ASET.
4427 2012-08-03 Eli Zaretskii <eliz@gnu.org>
4429 Support symlinks on latest versions of MS-Windows.
4430 * w32.c: Include winioctl.h and aclapi.h.
4431 (is_symlink, chase_symlinks, enable_privilege, restore_privilege)
4432 (revert_to_self): Forward declarations of static functions.
4433 <static BOOL g_b_init_get_security_info>:
4434 <g_b_init_create_symbolic_link>: New static flags.
4435 (globals_of_w32): Initialize them to zero.
4436 (GetSecurityInfo_Proc, CreateSymbolicLink_Proc): New typedefs.
4437 (map_w32_filename): Improve commentary. Simplify switch.
4438 (SYMBOLIC_LINK_FLAG_DIRECTORY): Define if not defined in system
4439 headers (most versions of MinGW w32api don't).
4440 (get_security_info, create_symbolic_link)
4441 (get_file_security_desc_by_handle, is_symlink, chase_symlinks):
4443 (sys_access, sys_chmod): Call 'chase_symlinks' to resolve symlinks
4444 in the argument file name.
4445 (sys_access): Call unc_volume_file_attributes only if
4446 GetFileAttributes fails with network-related error codes.
4447 (sys_rename): Diagnose renaming of a symlink when the user doesn't
4448 have the required privileges.
4449 (get_file_security_desc_by_name): Rename from
4450 get_file_security_desc.
4451 (stat_worker): New function, with most of the guts of 'stat', and
4452 with addition of handling of symlinks and support for 'lstat'.
4453 If possible, get file's attributes and security information by
4454 handle, not by name. Produce S_IFLNK bit for symlinks, when
4455 called from 'lstat'.
4456 (stat, lstat): New functions, call 'stat_worker'.
4457 (symlink, readlink, careadlinkat): Rewritten to create and resolve
4458 symlinks when the underlying filesystem supports them.
4460 2012-08-02 Paul Eggert <eggert@cs.ucla.edu>
4462 Fix macroexp crash on Windows with debugging (Bug#12118).
4463 * lisp.h (ASET) [ENABLE_CHECKING]: Ignore ARRAY_MARK_FLAG when
4464 checking subscripts; problem introduced with the recent
4465 "ASET (a, i, v)" rather than "AREF (a, i) = v" patch.
4466 (ARRAY_MARK_FLAG): Now a macro as well as a constant,
4467 since it's used in non-static inline functions now.
4469 * xfaces.c (face_at_buffer_position, face_for_overlay_string):
4470 Don't assume buffer size fits in 'int'. Remove unused local.
4472 Use C99-style 'extern inline' if available.
4473 * buffer.h (BUFFER_INLINE):
4474 * category.h (CATEGORY_INLINE):
4475 * character.h (CHARACTER_INLINE):
4476 * charset.h (CHARSET_INLINE):
4477 * composite.h (COMPOSITE_INLINE):
4478 * dispextern.h (DISPEXTERN_INLINE):
4479 * lisp.h (LISP_INLINE):
4480 * systime.h (SYSTIME_INLINE):
4481 New macro, replacing 'static inline' in this header.
4482 * buffer.h, category.h, character.h, charset.h, composite.h:
4483 * dispextern.h, lisp.h, systime.h:
4484 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
4485 * alloc.c (LISP_INLINE):
4486 * buffer.c (BUFFER_INLINE):
4487 * category.c (CATEGORY_INLINE):
4488 * character.c (CHARACTER_INLINE):
4489 * charset.c (CHARSET_INLINE):
4490 * composite.c (COMPOSITE_INLINE):
4491 * dispnew.c (DISPEXTERN_INLINE):
4492 * sysdep.c (SYSTIME_INLINE):
4493 Define to EXTERN_INLINE, so that the corresponding functions
4494 are compiled into code.
4495 * conf_post.h (INLINE, EXTERN_INLINE, INLINE_HEADER_BEGIN)
4496 (INLINE_HEADER_END): New macros.
4497 * lisp.h (PSEUDOVECTOR_FLAG): Now a macro as well as a constant,
4498 since it's used in non-static inline functions now.
4499 (VALMASK) [!USE_LSB_TAG]: Likewise.
4501 2012-08-02 Glenn Morris <rgm@gnu.org>
4503 * s/: Remove empty directory.
4505 * s/ms-w32.h: Move to ../nt/inc.
4506 * makefile.w32-in (TAGS, TAGS-gmake, MS_W32_H):
4507 Update for new ms-w32.h location.
4509 2012-08-02 Paul Eggert <eggert@cs.ucla.edu>
4512 * syswait.h (WRETCODE): Remove, consistently with ../configure.ac.
4514 2012-08-02 Glenn Morris <rgm@gnu.org>
4516 * nsterm.m (ns_exec_path, ns_load_path): Use SEPCHAR rather than
4517 hard-coding the path separator.
4519 2012-08-01 Paul Eggert <eggert@cs.ucla.edu>
4521 Use "ASET (a, i, v)" rather than "AREF (a, i) = v".
4522 This how ASET and AREF are supposed to work, and makes
4523 it easier to think about future improvements. See
4524 <http://lists.gnu.org/archive/html/emacs-devel/2012-08/msg00026.html>.
4525 * charset.h (set_charset_attr): New function.
4526 All lvalue-style uses of CHARSET_DECODER etc. changed to use it.
4527 * lisp.h (ASET): Rewrite so as not to use AREF in an lvalue style.
4528 (aref_addr): New function. All uses of &AREF(...) changed.
4529 (set_hash_key, set_hash_value, set_hash_next, set_hash_hash)
4530 (set_hash_index): New functions. All lvalue-style uses of
4531 HASH_KEY etc. changed.
4532 * keyboard.c (set_prop): New function. All lvalue-style uses
4535 2012-08-01 Alp Aker <alp.tekin.aker@gmail.com>
4537 * nsterm.m (ns_set_vertical_scroll_bar, ns_redeem_scroll_bar)
4538 (EmacsWindow-accessibilityAttributeValue, EmacsScroller-initFrame:)
4539 (EmacsScroller-dealloc): Adjust to use WVAR. (Bug#12114)
4540 * nsfns.m (ns_set_name_as_filename): Likewise.
4541 * nsmenu.m (ns_update_menubar): Likewise.
4542 * nsselect.m (symbol_to_nsstring): Adjust to use SVAR.
4544 2012-08-01 Eli Zaretskii <eliz@gnu.org>
4546 * .gdbinit (xcar, xcdr, xlist, xwindow, nextcons, xprintsym):
4547 Adapt to latest changes in field names of the corresponding Lisp
4550 * xdisp.c (try_window_id): Use WVAR in IF_DEBUG code.
4552 2012-08-01 Glenn Morris <rgm@gnu.org>
4554 * s/msdos.h: Remove file.
4555 * conf_post.h [MSDOS]: New section, moved from s/msdos.h.
4556 * Makefile.in (S_FILE): Remove.
4557 (config_h): Remove S_FILE.
4559 2012-08-01 Juanma Barranquero <lekktu@gmail.com>
4561 * s/ms-w32.h (DEVICE_SEP, IS_DIRECTORY_SEP, IS_ANY_SEP):
4562 Remove; moved to nt/config.nt.
4564 2012-08-01 Dmitry Antipov <dmantipov@yandex.ru>
4566 Use INTERNAL_FIELD for conses and overlays.
4567 * lisp.h (struct Lisp_Cons): Use INTERNAL_FIELD.
4568 Remove obsolete comment.
4570 (struct Lisp_Overlay): Use INTERNAL_FIELD.
4571 * alloc.c, buffer.c, buffer.h, fns.c: Adjust users.
4573 2012-08-01 Dmitry Antipov <dmantipov@yandex.ru>
4575 Use INTERNAL_FIELD for symbols.
4576 * lisp.h (SVAR): New macro. Adjust users.
4577 * alloc.c, bytecode.c, cmds.c, data.c, doc.c, eval.c:
4578 * fns.c, keyboard.c, lread.c, xterm.c: Users changed.
4580 2012-08-01 Dmitry Antipov <dmantipov@yandex.ru>
4582 Use INTERNAL_FIELD for processes.
4583 * process.h (PVAR): New macro. Adjust style.
4584 (struct Lisp_Process): Change Lisp_Object members to INTERNAL_FIELD.
4585 * print.c, process.c, sysdep.c, w32.c, xdisp.c: Users changed.
4587 2012-08-01 Dmitry Antipov <dmantipov@yandex.ru>
4589 Use INTERNAL_FIELD for windows.
4590 * window.h (WVAR): New macro.
4591 (struct window): Change Lisp_Object members to INTERNAL_FIELD.
4592 * alloc.c, buffer.c, composite.c, dispextern.h, dispnew.c, editfns.c:
4593 * fileio.c, font.c, fontset.c, frame.c, frame.h, fringe.c, indent.c:
4594 * insdel.c, keyboard.c, keymap.c, lisp.h, minibuf.c, nsterm.m, print.c:
4595 * textprop.c, w32fns.c, w32menu.c, w32term.c, window.c, xdisp.c:
4596 * xfaces.c, xfns.c, xmenu.c, xterm.c: Users changed.
4598 2012-08-01 Paul Eggert <eggert@cs.ucla.edu>
4600 * coding.h (CODING_ATTR_FLUSHING): Remove; unused and wouldn't work.
4602 2012-08-01 Glenn Morris <rgm@gnu.org>
4604 * lisp.h (IS_DIRECTORY_SEP, IS_DEVICE_SEP, IS_ANY_SEP):
4605 Move to configure.ac.
4607 2012-08-01 Juanma Barranquero <lekktu@gmail.com>
4609 * makefile.w32-in (CONFIG_H): Update dependencies.
4610 (CONF_POST_H): New macro.
4612 * s/ms-w32.h (SEPCHAR, NULL_DEVICE): Remove; moved to nt/config.nt.
4614 2012-07-31 Glenn Morris <rgm@gnu.org>
4616 * Makefile.in (S_FILE): No longer set by configure.
4618 * conf_post.h (config_opsysfile): Move earlier, so that WINDOWSNT
4620 (alloca.h) [WINDOWSNT]: Don't include it on MS Windows.
4622 * process.h (NULL_DEVICE):
4623 * emacs.c (SEPCHAR):
4624 * editfns.c (USER_FULL_NAME): Let configure set them.
4626 * s/README, s/template.h: Remove files.
4628 * conf_post.h [HPUX]: Undefine HAVE_RANDOM and HAVE_RINT.
4630 * conf_post.h (AMPERSAND_FULL_NAME, subprocesses):
4631 Move to configure.ac.
4633 2012-07-31 Eli Zaretskii <eliz@gnu.org>
4635 * .gdbinit (xframe): Adapt to introduction of FVAR and the
4636 resulting renaming of 'struct frame' members.
4638 * w32menu.c (w32_menu_show): Revert bogus introduction of FVAR.
4640 * fontset.c (dump_fontset): Fix compilation with ENABLE_CHECKING
4641 after introduction of FVAR.
4643 2012-07-31 Jan Djärv <jan.h.d@swipnet.se>
4645 * nsmenu.m (update_frame_tool_bar): Change key from NSObject* to id.
4647 * nsterm.m (ns_draw_fringe_bitmap, ns_dumpglyphs_image): Use drawInRect
4648 instead of compositeToPoint.
4649 (applicationShouldTerminate): Pass NS String literal to NSRunAlertPanel.
4651 * nsfns.m, nsmenu.m, nsterm.m: Adopt to struct frame/FVAR changes.
4653 2012-07-31 Dmitry Antipov <dmantipov@yandex.ru>
4655 Generalize INTERNAL_FIELD between buffers, keyboards and frames.
4656 * lisp.h (INTERNAL_FIELD): New macro.
4657 * buffer.h (BUFFER_INTERNAL_FIELD): Remove.
4658 (BVAR): Change to use INTERNAL_FIELD.
4659 * keyboard.h (KBOARD_INTERNAL_FIELD): Likewise.
4660 (KVAR): Change to use INTERNAL_FIELD.
4661 * frame.h (FVAR): New macro.
4662 (struct frame): Use INTERNAL_FIELD for all Lisp_Object fields.
4663 * alloc.c, buffer.c, data.c, dispnew.c, dosfns.c, eval.c, frame.c:
4664 * fringe.c, gtkutil.c, minibuf.c, nsfns.m, nsterm.m, print.c:
4665 * term.c, w32fns.c, w32menu.c, w32term.c, window.c, window.h:
4666 * xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c: Users changed.
4668 2012-07-31 Dmitry Antipov <dmantipov@yandex.ru>
4670 Miscellaneous fixes for non-default X toolkits.
4671 * xfns.c (Fx_file_dialog): Change to SSDATA to avoid warnings.
4672 * xterm.c (x_frame_of_widget): Remove redundant prototype.
4673 Move under #ifdef USE_LUCID.
4674 (x_create_toolkit_scroll_bar): Adjust scroll_bar_name
4675 definition and usage to avoid warnings.
4677 2012-07-31 Jan Djärv <jan.h.d@swipnet.se>
4679 * nsterm.m (openFiles): Fix previous checkin.
4681 2012-07-31 Paul Eggert <eggert@cs.ucla.edu>
4683 * indent.c (compute_motion): Remove unused local.
4685 2012-07-31 Glenn Morris <rgm@gnu.org>
4687 * s/usg5-4-common.h (wait3, WRETCODE): Let configure set them.
4689 * conf_post.h [USG5_4]:
4690 Move remaining contents of s/usg5-4-common.h here.
4691 * s/usg5-4-common.h: Remove file.
4693 * conf_post.h [IRIX6_5]: Move remaining contents of s/irix6-5.h here.
4694 * s/irix6-5.h: Remove file.
4696 * conf_post.h [DARWIN_OS]: Move remaining contents of s/darwin.h here.
4697 * s/darwin.h: Remove file.
4699 * conf_post.h [HPUX]: Move random, srandom here from s/hpux10-20.h.
4700 * s/hpux10-20.h: Remove file, which is now empty.
4702 2012-07-30 Glenn Morris <rgm@gnu.org>
4704 * conf_post.h: New, split from configure.ac's AH_BOTTOM.
4705 * Makefile.in (config_h): Add conf_post.h.
4706 * makefile.w32-in (CONFIG_H): Add conf_post.h.
4708 2012-07-30 Jan Djärv <jan.h.d@swipnet.se>
4710 * nsterm.m (ns_do_open_file): New variable.
4711 (ns_term_init): Set ns_do_open_file to YES after run returns.
4712 (openFile, openTempFile, openFileWithoutUI, openFiles):
4713 Open files only if ns_do_open_file.
4715 2012-07-30 Paul Eggert <eggert@cs.ucla.edu>
4717 * lisp.h (SWITCH_ENUM_CAST): Remove. All uses removed.
4718 This no-op macro hasn't been needed for many years.
4719 * src/regex.c (SWITCH_ENUM_CAST) [!emacs]: Likewise.
4721 Export DIRECTORY_SEP, TYPEMASK, VALMASK to GDB.
4722 * alloc.c (gdb_make_enums_visible) [USE_LSB_TAG]: Add lsb_bits.
4723 * lisp.h (enum lsb_bits) [USE_LSB_TAG]: New enum, for
4724 gdb_make_enums_visible.
4725 (TYPEMASK, VALMASK) [USE_LSB_TAGS]: Now enum constants, not macros.
4726 (DIRECTORY_SEP): Now a constant, not a macro.
4728 2012-07-30 Eli Zaretskii <eliz@gnu.org>
4730 * w32fns.c (w32_wnd_proc): Pass w32_keyboard_codepage to
4731 w32_kbd_patch_key as the 2nd arg. (Bug#12082)
4733 * w32term.c <w32_keyboard_codepage>: Renamed from
4734 keyboard_codepage and now external. All users changed.
4736 * w32term.h: Add declaration of w32_keyboard_codepage.
4738 * w32inevt.c (w32_kbd_patch_key): Accept an additional argument --
4739 the codepage to translate keys to Unicode. If this argument is
4740 -1, use the value returned by GetConsoleCP. All callers changed.
4742 2012-07-30 Paul Eggert <eggert@cs.ucla.edu>
4744 Update .PHONY listings in makefiles.
4745 * Makefile.in (.PHONY): Add all, mostlyclean, clean,
4746 bootstrap-clean, distclean, maintainer-clean, versioclean,
4749 * lisp.h (STRING_BYTES_BOUND): Cast entire result to ptrdiff_t.
4750 This is a bit clearer. Fix some commentary typos.
4752 2012-07-30 Glenn Morris <rgm@gnu.org>
4754 * s/netbsd.h: Let configure include signal.h if needed.
4755 Remove file, which is now empty.
4757 * s/usg5-4-common.h (_longjmp, _setjmp, TIOCSIGSEND):
4758 Let configure set them.
4759 * s/irix6-5.h (_longjmp, _setjmp, TIOCSIGSEND):
4760 No more need to undefine.
4762 2012-07-30 Andreas Schwab <schwab@linux-m68k.org>
4764 * keymap.c (Fkey_description): Don't remove 0x80 bit from
4765 non-single-byte char when adding meta modifier. (Bug#12090)
4767 2012-07-30 Dmitry Antipov <dmantipov@yandex.ru>
4769 Convert safe_call to use variable number of arguments.
4770 * xdisp.c (safe_call): Convert to use varargs. Adjust users.
4771 (safe_call2): Fix comment.
4772 * lisp.h (safe_call): Adjust prototype.
4773 * coding.c (encode_coding_object): Change to use safe_call2.
4774 * xfaces.c (merge_face_heights): Change to use safe_call1.
4776 2012-07-30 Glenn Morris <rgm@gnu.org>
4778 * s/aix4-2.h (sigmask): No need to undefine it, since syssignal.h
4779 does that unconditionally. Remove file, which is now empty.
4781 * s/freebsd.h, s/gnu-linux.h, s/sol2-6.h, s/unixware.h:
4784 2012-07-30 Paul Eggert <eggert@cs.ucla.edu>
4786 Export to GDB most of lisp.h's remaining object-like macros.
4787 * lisp.h (min, max): Move earlier, because they're used earlier now.
4788 (INTMASK, ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK)
4789 (CHAR_TABLE_STANDARD_SLOTS, CHARTAB_SIZE_BITS_0)
4790 (CHARTAB_SIZE_BITS_1, CHARTAB_SIZE_BITS_2, CHARTAB_SIZE_BITS_3)
4791 (DEFAULT_HASH_SIZE, COMPILED_ARGLIST, COMPILED_BYTECODE)
4792 (COMPILED_CONSTANTS, COMPILED_STACK_DEPTH, COMPILED_DOC_STRING)
4793 (COMPILED_INTERACTIVE, CHAR_ALT, CHAR_SUPER, CHAR_HYPER, CHAR_SHIFT)
4794 (CHAR_CTL, CHAR_META, CHAR_MODIFIER_MASK, CHARACTERBITS)
4795 (MANY, UNEVALLED, FLOAT_TO_STRING_BUFSIZE, MAX_ALLOCA):
4796 Now constants, for GDB. They need not be macros.
4797 (MOST_POSITIVE_FIXNUM, MOST_NEGATIVE_FIXNUM, STRING_BYTES_BOUND):
4798 Now constants, for GDB, as well as macros, for static initializers.
4799 (CHAR_TABLE_STANDARD_SLOTS, CHAR_TABLE_EXTRA_SLOTS):
4800 Move to after the definition of struct Lisp_Char_Table,
4801 since the former now needs that type defined.
4802 (enum CHARTAB_SIZE_BITS, enum CHAR_TABLE_STANDARD_SLOTS)
4803 (enum DEFAULT_HASH_SIZE, enum Lisp_Compiled, enum char_bits)
4804 (enum maxargs, enum FLOAT_TO_STRING_BUFSIZE, enum MAX_ALLOCA):
4805 New enums, for gdb_make_enums_visible.
4806 (GLYPH_MODE_LINE_FACE): Remove; unused.
4807 * alloc.c (STRING_BYTES_MAX): Now a constant, not a macro.
4808 (gdb_make_enums_visible): Add enum CHARTAB_SIZE_BITS, enum
4809 CHAR_TABLE_STANDARD_SLOTS, enum char_bits, enum DEFAULT_HASH_SIZE,
4810 enum FLOAT_TO_STRING_BUFSIZE, enum Lisp_Bits, enum Lisp_Compiled,
4811 enum maxargs, enum MAX_ALLOCA.
4812 (ARRAY_MARK_FLAG_VAL, PSEUDOVECTOR_FLAG_VAL, VALMASK_VAL): Remove.
4813 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Remove;
4814 no longer needed, now that they are done in lisp.h.
4816 2012-07-30 Dmitry Antipov <dmantipov@yandex.ru>
4818 Cleanup string bytes checking.
4819 * alloc.c (GC_STRING_BYTES, CHECK_STRING_BYTES): Remove. Convert
4820 all users to STRING_BYTES or string_bytes if GC_CHECK_STRING_BYTES.
4821 (check_string_bytes): Define to empty if not GC_CHECK_STRING_BYTES.
4822 (check_sblock, compact_small_strings): Simplify.
4824 2012-07-29 Paul Eggert <eggert@cs.ucla.edu>
4826 * lisp.h (LISP_INT_TAG, LISP_INT1_TAG, LISP_STRING_TAG): Remove.
4827 These macros are confusing and no longer need to be defined, as
4828 the enum values now suffice. All uses replaced with definiens.
4829 (Lisp_Int1, Lisp_String): Define directly; this is clearer.
4831 2012-07-29 Juanma Barranquero <lekktu@gmail.com>
4833 * makefile.w32-in (LISP_H, $(BLD)/emacs.$(O), $(BLD)/w32inevt.$(O))
4834 ($(BLD)/w32console.$(O)): Update dependencies.
4836 2012-07-29 Dmitry Antipov <dmantipov@yandex.ru>
4838 Remove HIDE_LISP_IMPLEMENTATION and cleanup cons free list check.
4839 * lisp.h (HIDE_LISP_IMPLEMENTATION): Remove as useless for a long
4841 (CHECK_CONS_LIST): Remove. Convert all users to check_cons_list.
4843 2012-07-29 Jan Djärv <jan.h.d@swipnet.se>
4845 * lread.c (init_lread): Remove if-statement in ifdef HAVE_NS before
4846 setting sitelisp (Bug#12010).
4848 2012-07-29 Eli Zaretskii <eliz@gnu.org>
4850 * w32heap.h (OS_9X): Rename from OS_WINDOWS_95.
4852 * w32heap.c (cache_system_info):
4853 * w32.c (sys_rename):
4854 * w32proc.c (find_child_console, sys_kill): All users changed.
4856 2012-07-29 Paul Eggert <eggert@cs.ucla.edu>
4858 * alloc.c (Fgarbage_collect): Indent as per usual Emacs style.
4860 2012-07-29 Eli Zaretskii <eliz@gnu.org>
4862 * makefile.w32-in (LISP_H): Add $(NT_INC)/stdalign.h.
4864 2012-07-29 Dmitry Antipov <dmantipov@yandex.ru>
4866 Cleanup statistics calculation in Fgarbage_collect.
4867 * alloc.c (Fgarbage_collect): Rename t1 to meaningful start.
4868 Fix zombies percentage calculation. Simplify elapsed time calculation.
4870 2012-07-29 Dmitry Antipov <dmantipov@yandex.ru>
4872 Generalize marker debugging code under MARKER_DEBUG and use eassert.
4873 * insdel.c (CHECK_MARKERS, check_markers_debug_flag): Remove.
4874 (gap_left, gap_right, adjust_markers_for_delete, insert_1_both)
4875 (insert_from_string_1, insert_from_gap, insert_from_buffer_1)
4876 (replace_range, replace_range_2, del_range_2): Change to eassert.
4877 * marker.c (byte_char_debug_check): Adjust style.
4879 2012-07-29 Paul Eggert <eggert@cs.ucla.edu>
4881 Don't use the abbreviation "win" to refer to Windows (Bug#10421).
4882 * regex.c (MAX_BUF_SIZE): Remove some incorrect and
4883 long-ago-commented-out code that talks about "WIN32".
4884 * w32heap.h (OS_WINDOWS_95): Rename from OS_WIN95.
4887 2012-07-28 Paul Eggert <eggert@cs.ucla.edu>
4889 Use Gnulib stdalign module (Bug#9772, Bug#9960).
4890 * alloc.c (XMALLOC_BASE_ALIGNMENT, GC_POINTER_ALIGNMENT, pure_alloc):
4891 Simplify by using alignof.
4892 (pure_alloc) [! USE_LSB_TAG]: Don't over-align EMACS_INT values.
4893 * lisp.h: Include <stdalign.h>.
4894 (GCALIGNMENT): New macro and constant.
4895 (DECL_ALIGN): Remove. All uses replaced by alignas (GCALIGNMENT).
4896 (USE_LSB_TAG): ifdef on alignas, not on DECL_ALIGN.
4897 (stdalign): New macro, if not already defined.
4899 2012-07-28 Eli Zaretskii <eliz@gnu.org>
4901 Fix non-ASCII input in non-GUI frames on MS-Windows. (Bug#12055)
4902 * w32inevt.c: Include w32inevt.h.
4903 (w32_read_console_input): New inline function, calls either
4904 ReadConsoleInputA or ReadConsoleInputW, depending on the value of
4905 w32_console_unicode_input.
4906 (fill_queue): Call w32_read_console_input instead of ReadConsoleInput.
4907 (w32_kbd_patch_key, key_event): Use the codepage returned by
4908 GetConsoleCP, rather than the ANSI codepage returned by GetLocaleInfo.
4909 (key_event): use uChar.UnicodeChar only if
4910 w32_console_unicode_input is non-zero.
4912 * w32console.c: Include w32heap.h.
4913 <w32_console_unicode_input>: New global variable.
4914 (initialize_w32_display): Set w32_console_unicode_input to 1 on NT
4915 family of Windows, zero otherwise.
4917 * w32inevt.h: Declare w32_console_unicode_input.
4919 * xdisp.c (init_iterator): Don't reference tip_frame in a build
4920 --without-x. (Bug#11742)
4922 2012-07-27 Paul Eggert <eggert@cs.ucla.edu>
4924 Adjust GDB to reflect pvec_type changes (Bug#12036).
4925 * .gdbinit (xvectype, xpr, xbacktrace): Adjust to reflect the
4926 2012-07-04 changes to pseudovector representation.
4927 Problem reported by Eli Zaretskii in <http://bugs.gnu.org/12036#30>.
4929 2012-07-27 Michael Albinus <michael.albinus@gmx.de>
4931 * dbusbind.c (XD_DBUS_VALIDATE_BUS_ADDRESS): Canonicalize session
4933 (xd_close_bus, Fdbus_init_bus): Handle reference counter properly.
4935 2012-07-27 Eli Zaretskii <eliz@gnu.org>
4937 * alloc.c (listn): Fix the order the arguments are consed onto the
4940 * lisp.h (enum constype): Use CONSTYPE_HEAP and CONSTYPE_PURE for
4941 enumeration constants, as PURE and HEAP are too general, and clash
4942 with other headers and sources, such as gmalloc.c and the
4943 MS-Windows system headers. All users changed.
4945 2012-07-27 Dmitry Antipov <dmantipov@yandex.ru>
4947 Revert last save_excursion_save and save_excursion_restore changes.
4948 * alloc.c, editfns.c, marker.c, lisp.h: Revert.
4949 Lots of crashes reported by Chong Yidong <cyd@gnu.org>.
4951 2012-07-27 Dmitry Antipov <dmantipov@yandex.ru>
4953 Fix recently-introduced typos in Windows port.
4954 Reported by Martin Rudalics <rudalics@gmx.at>.
4955 * w32.c (init_environment): Replace comma with semicolon.
4956 * w32fns.c (syms_of_w32fns): Add missing parenthesis.
4958 2012-07-27 Paul Eggert <eggert@cs.ucla.edu>
4960 Improve GDB symbol export (Bug#12036).
4961 * .gdbinit (xgetptr, xgetint, xgettype): Set $bugfix in different
4962 arms of an 'if', not using conditional expressions; otherwise GDB
4963 complains about the types in the unevaluated arm when the argument
4964 is an integer literal.
4965 (xgetint): Simplify expression.
4966 * alloc.c (gdb_make_enums_visible): New constant. This ports to
4967 GCC 3.4.2 the export of symbols to GDB. Problem reported by Eli
4968 Zaretskii in <http://bugs.gnu.org/12036#13>.
4969 * lisp.h (PUBLISH_TO_GDB): Remove. All uses removed. No longer
4970 needed now that we have gdb_make_enums_visible.
4971 (enum CHECK_LISP_OBJECT_TYPE, enum Lisp_Bits, enum More_Lisp_Bits)
4972 (enum enum_USE_LSB_TAG):
4973 New enum types, packaging up enums that need to be exported to GDB.
4975 2012-07-27 Dmitry Antipov <dmantipov@yandex.ru>
4977 Utility function to make a list from specified amount of objects.
4978 * lisp.h (enum constype): New datatype.
4979 (listn): New prototype.
4980 * alloc.c (listn): New function.
4981 (Fmemory_use_count, syms_of_alloc): Use it.
4982 * buffer.c (syms_of_buffer): Likewise.
4983 * callint.c (syms_of_callint): Likewise.
4984 * charset.c (define_charset_internal): Likewise.
4985 * coding.c (syms_of_coding): Likewise.
4986 * keymap.c (syms_of_keymap): Likewise.
4987 * search.c (syms_of_search): Likewise.
4988 * syntax.c (syms_of_syntax): Likewise.
4989 * w32.c (init_environment): Likewise.
4990 * w32fns.c (Fw32_battery_status, syms_of_w32fns): Likewise.
4991 * xdisp.c (syms_of_xdisp): Likewise.
4992 * xfns.c (syms_of_xfns): Likewise.
4994 2012-07-27 Dmitry Antipov <dmantipov@yandex.ru>
4996 Fast save_excursion_save and save_excursion_restore.
4997 * lisp.h (struct Lisp_Excursion): New data type.
4998 (PVEC_EXCURSION): New pseudovector type.
4999 (XEXCURSION, XSETEXCURSION, EXCURSIONP): Convenient macros
5000 to deal with it. Adjust comments.
5001 (init_marker, attach_marker): New prototype.
5002 (unchain_marker): Adjust prototype.
5003 * marker.c (attach_marker): Change to global.
5004 (init_marker): New function.
5005 * alloc.c (Fmake_marker, build_marker): Use it.
5006 (build_marker): More easserts.
5007 (mark_object): Handle struct Lisp_Excursion.
5008 * editfns.c (save_excursion_save, save_excursion_restore):
5009 Reimplement to use struct Lisp_Excursion. Add comments.
5011 2012-07-26 Paul Eggert <eggert@cs.ucla.edu>
5013 Fix export of symbols to GDB (Bug#12036).
5014 * alloc.c (ARRAY_MARK_FLAG_VAL, PSEUDOVECTOR_FLAG_VAL, VALMASK_VAL)
5015 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Move these here from
5016 emacs.c, as this is a more-suitable home. Had this been done earlier
5017 the fix for 12036 would have avoided some of the problems noted in
5018 <http://bugs.gnu.org/12036#13> by Eli Zaretskii, as the scope problems
5019 would have been more obvious.
5020 * emacs.c: Do not include <verify.h>; no longer needed.
5021 (gdb_CHECK_LISP_OBJECT_TYPE, gdb_DATA_SEG_BITS)
5022 (gdb_GCTYPEBITS, gdb_USE_LSB_TAG)
5023 (CHECK_LISP_OBJECT_TYPE, DATA_SEG_BITS, GCTYPEBITS, USE_LSB_TAG):
5024 Remove; now done in lisp.h.
5025 * lisp.h (PUBLISH_TO_GDB): New macro.
5026 (GCTYPEBITS, USE_LSB_TAG, CHECK_LISP_OBJECT_TYPE, enum pvec_type)
5027 (DATA_SEG_BITS): Use it.
5028 (GCTYPEBITS, USE_LSB_TAG): Now also an enum, for GDB.
5029 (CHECK_LISP_OBJECT_TYPE, DATA_SEG_BITS): Now just an enum, for GDB.
5030 * mem-limits.h (EXCEEDS_LISP_PTR): Redo so that DATA_SEG_BITS need
5031 not be usable in #if. This simplifies things.
5033 2012-07-26 Juanma Barranquero <lekktu@gmail.com>
5035 * makefile.w32-in ($(BLD)/emacs.$(O)): Update dependencies.
5037 2012-07-26 Paul Eggert <eggert@cs.ucla.edu>
5039 Simplify export of symbols to GDB (Bug#12036).
5040 * .gdbinit (xgetptr, xgetint, xgettype): Don't use "set $bugfix =
5041 $bugfix.i", as this doesn't work (with GDB 7.4.1, anyway).
5042 (xgetptr, xgetint, xgettype, xcoding, xcharset, xprintbytestr):
5043 Adjust to changes in lisp.h and emacs.c, by using
5044 CHECK_LISP_OBJECT_TYPE rather than gdb_use_struct, VALMASK instead
5045 of $valmask, DATA_SEG_BITS instead of gdb_data_seg_bits,
5046 INTTYPEBITS instead of gdb_gctypebits - 1, USE_LSB_TAG instead of
5047 gdb_use_lsb, (1 << GCTYPEBITS) - 1 instead of $tagmask, VALBITS
5048 instead of gdb_valbits.
5049 (xvectype, xvector, xpr, xprintstr, xbacktrace): Similarly, use
5050 PSEUDOVECTOR_FLAG instead of PVEC_FLAG, and ARRAY_MARK_FLAG
5051 instead of gdb_array_mark_flag.
5052 (xboolvector): Get size from $->size, not $->header.size.
5053 Use BOOL_VECTOR_BITS_PER_CHAR rather than mystery constants.
5054 (xreload, hook-run, hookpost-run): Remove.
5055 * emacs.c: Include <verify.h>.
5056 (gdb_use_lsb, gdb_use_struct, gdb_valbits, gdb_gctypebits)
5057 (gdb_data_seg_bits, PVEC_FLAG, gdb_array_mark_flag, gdb_pvec_type):
5059 (gdb_CHECK_LISP_OBJECT_TYPE, gdb_DATA_SEG_BITS, gdb_GCTYPEBITS)
5060 (gdb_USE_LSB_TAG): New enum constants.
5061 (CHECK_LISP_OBJECT_TYPE, DATA_SEG_BITS, GCTYPEBITS, USE_LSB_TAG):
5062 Also define these as enum constants, so they're visible to GDB.
5063 (ARRAY_MARK_FLAG_VAL, PSEUDOVECTOR_FLAG_VAL, VALMASK_VAL): New macros.
5064 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Also define these
5065 as constants, so they're visible to GDB.
5066 * lisp.h (VALBITS, INTTYPEBITS, FIXNUM_BITS, PSEUDOVECTOR_SIZE_BITS)
5067 (PSEUDOVECTOR_SIZE_MASK, PVEC_TYPE_MASK, BOOL_VECTOR_BITS_PER_CHAR):
5068 Now enum constants, not macros, so they're visible to GDB.
5069 (CHECK_LISP_OBJECT_TYPE, DATA_SEG_BITS): Default to 0, as this is
5070 more convenient now. All uses changed.
5071 (VALMASK) [USE_LSB_TAG]: Also define in this case.
5072 * mem-limits.h (EXCEEDS_LISP_PTR): Adjust to DATA_SEG_BITS change.
5074 2012-07-26 Dmitry Antipov <dmantipov@yandex.ru>
5076 Explicitly free restriction data that are not needed anymore.
5077 * editfns.c (save_restriction_restore): Free restriction data.
5079 2012-07-26 Stefan Monnier <monnier@iro.umontreal.ca>
5081 * eval.c (Fautoload_do_load): Rename from do_autoload, export to Lisp,
5082 add argument, tune behavior, and adjust all callers.
5084 2012-07-25 Paul Eggert <eggert@cs.ucla.edu>
5086 Use typedef for EMACS_INT, EMACS_UINT.
5087 * lisp.h, s/ms-w32.h (EMACS_INT, EMACS_UINT): Use typedefs rather
5088 than macros. This simplifies debugging in the usual case, since
5089 it lets GDB show addresses as 'EMACS_INT *' rather than 'long int *'
5090 and it allows expressions involving EMACS_INT casts.
5091 * .gdbinit (xreload): Simplify by using EMACS_INT cast.
5093 2012-07-25 Jan Djärv <jan.h.d@swipnet.se>
5095 * nsterm.m (ns_read_socket): Return early if there is a modal
5098 2012-07-25 Martin Rudalics <rudalics@gmx.at>
5100 * frame.c (Fredirect_frame_focus): In doc-string don't mention
5101 that FOCUS-FRAME can be omitted.
5103 2012-07-25 Dmitry Antipov <dmantipov@yandex.ru>
5105 Adjust buffer text indirection counters at the end of Fkill_buffer.
5106 * buffer.c (Fkill_buffer): Adjust indirection counters when the
5107 buffer is definitely dead. This should really fix an issue reported
5108 by Christoph Scholtes again. (Bug#12007).
5109 (init_buffer_once): Initialize indirection counters of
5110 buffer_defaults and buffer_local_symbols (for sanity and safety).
5112 2012-07-24 Eli Zaretskii <eliz@gnu.org>
5114 * xdisp.c (init_iterator): Don't compute dimensions of truncation
5115 and continuation glyphs on tooltip frames, leave them at zero.
5116 Avoids continued lines in tooltips. (Bug#11832)
5118 2012-07-24 Dmitry Antipov <dmantipov@yandex.ru>
5120 Simplify copy_overlay.
5121 * buffer.c (copy_overlay): Simplify. Use build_marker.
5122 * lisp.h (struct Lisp_Overlay): Restore comment with minor tweaks.
5124 2012-07-23 Eli Zaretskii <eliz@gnu.org>
5126 * print.c (print_object): Don't crash when a frame's name is nil
5127 or invalid. (Bug#12025)
5129 * window.c (decode_any_window): Disable CHECK_LIVE_FRAME test, as
5130 it signals an error when a tooltip frame is being created.
5132 2012-07-23 Dmitry Antipov <dmantipov@yandex.ru>
5134 Cleanup miscellaneous objects allocation and initialization.
5135 * alloc.c (allocate_misc): Change to static. Add argument to
5136 specify the subtype. Adjust comment and users.
5137 (build_overlay): New function.
5138 * buffer.c (copy_overlays, Fmake_overlay): Use it.
5139 * lisp.h (struct Lisp_Overlay): Remove obsolete comment.
5140 (allocate_misc): Remove prototype.
5141 (build_overlay): Add prototype.
5143 2012-07-23 Dmitry Antipov <dmantipov@yandex.ru>
5145 Swap buffer text indirection counters in Fbuffer_swap_text.
5146 * buffer.c (Fbuffer_swap_text): Swap indirections too.
5147 This avoids crash reported by Christoph Scholtes at
5148 http://lists.gnu.org/archive/html/bug-gnu-emacs/2012-07/msg00785.html.
5150 2012-07-22 Jan Djärv <jan.h.d@swipnet.se>
5152 * nsmenu.m (Popdown_data): New struct.
5153 (pop_down_menu): p->pointer is Popdown_data. Release the pool and
5155 (ns_popup_dialog): Use NSAutoreleasePool and pass it to pop_down_menu.
5156 (initWithContentRect): Make imgView and contentView non-static
5157 and autorelease them. Also autorelease img and matrix (Bug#12005).
5158 (dealloc): Remove (Bug#12005).
5160 2012-07-22 Dmitry Antipov <dmantipov@yandex.ru>
5162 Adjust consing_since_gc when objects are explicitly freed.
5163 * alloc.c (GC_DEFAULT_THRESHOLD): New macro.
5164 (Fgarbage_collect): Use it. Change minimum to 1/10 of default.
5165 (free_cons, free_misc): Subtract object size from consing_since_gc.
5167 2012-07-22 Dmitry Antipov <dmantipov@yandex.ru>
5169 Simplify and cleanup markers positioning code.
5170 * marker.c (attach_marker): More useful eassert.
5171 (live_buffer, set_marker_internal): New function.
5172 (Fset_marker, set_marker_restricted): Use set_marker_internal.
5173 (set_marker_both, set_marker_restricted_both): Use live_buffer.
5175 2012-07-22 Paul Eggert <eggert@cs.ucla.edu>
5177 * buffer.h (struct buffer.indirections): Now ptrdiff_t, not int,
5178 as it's limited by the amount of memory, not by INT_MAX.
5180 2012-07-21 Eli Zaretskii <eliz@gnu.org>
5182 * keyboard.c (keys_of_keyboard): Bind language-change to 'ignore'
5183 in special-event-map. See the discussion at
5184 http://lists.gnu.org/archive/html/emacs-devel/2012-06/msg00417.html
5187 * w32menu.c (add_menu_item): Cast to ULONG_PTR when assigning
5188 info.dwItemData. Fixes crashes on 64-bit Windows.
5189 Suggested by Fabrice Popineau <fabrice.popineau@supelec.fr>.
5191 2012-07-21 Jan Djärv <jan.h.d@swipnet.se>
5193 * nsterm.m (accessibilityAttributeValue): New function. (Bug#11134).
5194 (conversationIdentifier): Return value is NSInteger.
5195 * nsterm.m (accessibilityAttributeValue): Surround with NS_IMPL_COCOA.
5197 2012-07-21 Chong Yidong <cyd@gnu.org>
5199 * window.c (decode_any_window): Signal an error if the window is
5200 on a dead frame (Bug#11984).
5202 2012-07-20 Dmitry Antipov <dmantipov@yandex.ru>
5204 Add indirection counting to speed up Fkill_buffer.
5205 * buffer.h (struct buffer): New member.
5206 * buffer.c (Fget_buffer_create): Set indirection counter to 0.
5207 (Fmake_indirect_buffer): Set indirection counter to -1, increment
5208 base buffer indirection counter.
5209 (compact_buffer): If ENABLE_CHECKING, verify indirection counters.
5210 (Fkill_buffer): Adjust indirection counters as needed, don't walk
5211 through buffer list if indirection counter is 0.
5213 2012-07-20 Dmitry Antipov <dmantipov@yandex.ru>
5215 Extend the value returned by Fgarbage_collect with heap statistics.
5216 * alloc.c (Qheap): New symbol.
5217 (syms_of_alloc): DEFSYM it.
5218 (Fgarbage_collect): If DOUG_LEA_MALLOC, add mallinfo data.
5219 (Fmemory_free): Remove.
5220 (syms_of_alloc): Don't defsubr it.
5221 * buffer.c (Fcompact_buffer): Remove.
5222 (syms_of_buffer): Don't defsubr it.
5224 2012-07-20 Dmitry Antipov <dmantipov@yandex.ru>
5226 Make maybe_gc inline.
5227 Verify that inlining is always possible (GCC 4.7.1, -O3 -Winline).
5228 * lisp.h (consing_since_gc, gc_relative_threshold)
5229 (memory_full_cons_threshold): Revert declaration.
5230 (maybe_gc): Remove prototype, define as inline.
5231 * alloc.c: Remove old commented-out code.
5232 (consing_since_gc, gc_relative_threshold)
5233 (memory_full_cons_threshold): Revert to global.
5236 2012-07-20 Dmitry Antipov <dmantipov@yandex.ru>
5238 Simple wrapper for make_unibyte_string, adjust font_open_by_name.
5239 * lisp.h (build_unibyte_string): New function.
5240 * dosfns.c, fileio.c, fns.c, ftfont.c, process.c:
5241 * sysdep.c, w32fns.c, xfns.c: Use it.
5242 * font.c (font_open_by_name): Change 2nd and 3rd args to the only arg
5243 of type Lisp_Object to avoid redundant calls to make_unibyte_string.
5244 Adjust users accordingly.
5245 * font.h (font_open_by_name): Adjust prototype.
5247 2012-07-20 Dmitry Antipov <dmantipov@yandex.ru>
5249 Cleanup calls to Fgarbage_collect.
5250 * lisp.h (maybe_gc): New prototype.
5251 (consing_since_gc, gc_relative_threshold, memory_full_cons_threshold):
5252 Remove declarations.
5253 * alloc.c (maybe_gc): New function.
5254 (consing_since_gc, gc_relative_threshold, memory_full_cons_threshold):
5256 * bytecode.c (MAYBE_GC): Use maybe_gc.
5257 * eval.c (eval_sub, Ffuncall): Likewise.
5258 * keyboard.c (read_char): Likewise. Adjust call to maybe_gc
5259 to avoid dependency from auto-save feature.
5261 2012-07-19 Paul Eggert <eggert@cs.ucla.edu>
5263 * buffer.h (FOR_EACH_BUFFER): Rename from 'for_each_buffer'.
5264 (FOR_EACH_PER_BUFFER_OBJECT_AT): Rename from
5265 'for_each_per_buffer_object_at'.
5266 All uses changed. It's better to use upper-case for macros that
5267 cannot be implemented as functions, to give the reader a clue
5268 that they're special.
5270 2012-07-19 Stefan Monnier <monnier@iro.umontreal.ca>
5272 * alloc.c (Fgarbage_collect): Tweak docstring.
5274 2012-07-19 Dmitry Antipov <dmantipov@yandex.ru>
5276 Tweak the value returned from Fgarbage_collect again.
5277 * alloc.c (Fgarbage_collect): New return value, as confirmed in
5278 http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00418.html.
5279 Adjust documentation.
5280 (total_vector_bytes): Rename to total_vector_slots, adjust
5282 (total_free_vector_bytes): Rename to total_free_vector_slots,
5284 (Qstring_bytes, Qvector_slots): New symbols.
5285 (syms_of_alloc): DEFSYM them.
5287 2012-07-19 Dmitry Antipov <dmantipov@yandex.ru>
5289 Buffer compaction primitive which may be used from Lisp.
5290 * buffer.c (compact_buffer, Fcompact_buffer): New function.
5291 (syms_of_buffer): Register Fcompact_buffer.
5292 * alloc.c (Fgarbage_collect): Use compact_buffer.
5293 * buffer.h (compact_buffer): New prototype.
5294 (struct buffer_text): New member.
5296 2012-07-19 Dmitry Antipov <dmantipov@yandex.ru>
5298 New macro to iterate over all buffers, miscellaneous cleanups.
5299 * lisp.h (all_buffers): Remove declaration.
5300 * buffer.h (all_buffers): Add declaration, with comment.
5301 (for_each_buffer): New macro.
5302 * alloc.c (Fgarbage_collect, mark_object): Use it.
5303 * buffer.c (Fkill_buffer, Fbuffer_swap_text, Fset_buffer_multibyte)
5304 (init_buffer): Likewise.
5305 * data.c (Fset_default): Likewise.
5306 * coding.c (code_conversion_restore): Remove redundant check
5308 * buffer.c (Fkill_buffer): Likewise. Remove obsolete comment.
5310 2012-07-18 Andreas Schwab <schwab@linux-m68k.org>
5312 Fix bug that created negative-length intervals.
5313 * intervals.c (merge_interval_right, merge_interval_left):
5314 Do not zero out this interval if it is absorbed by its children,
5315 as this interval's total length doesn't change in that case. See
5316 <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00403.html>.
5318 2012-07-18 Paul Eggert <eggert@cs.ucla.edu>
5320 * alloc.c (Fmake_bool_vector): Fix off-by-8 bug
5321 when invoking (make-bool-vector N t) and N is a positive
5322 multiple of 8 -- the last 8 bits were mistakenly cleared.
5324 Remove some struct layout assumptions in bool vectors.
5325 * alloc.c (bool_header_size): New constant.
5326 (header_size, word_size): Move earlier, as they're now used earlier.
5327 Use 'word_size' in a few more places, where it's appropriate.
5328 (Fmake_bool_vector, sweep_vectors): Don't assume that there is no
5329 padding before the data member of a bool vector.
5330 (sweep_vectors): Use PSEUDOVECTOR_TYPEP, in an eassert, rather
5331 than doing the check by hand with an abort ().
5333 2012-07-18 Stefan Monnier <monnier@iro.umontreal.ca>
5335 * eval.c (Fdefvar): Don't check constants since we only set the var if
5336 it's not yet defined anyway (bug#11904).
5338 * lisp.h (last_undo_boundary): Declare new var.
5339 * keyboard.c (command_loop_1): Set it.
5340 * cmds.c (Fself_insert_command): Use it to only remove boundaries that
5341 were auto-added by the command loop (bug#11774).
5343 2012-07-18 Andreas Schwab <schwab@linux-m68k.org>
5345 * w32font.c (Qsymbol): Remove local definition.
5346 (syms_of_w32font): Don't DEFSYM it.
5348 2012-07-18 Dmitry Antipov <dmantipov@yandex.ru>
5350 Fix sweep_vectors to handle large bool vectors correctly.
5351 * alloc.c (sweep_vectors): Account total_vector_bytes for
5352 bool vectors larger than VBLOCK_BYTES_MAX.
5354 2012-07-18 Chong Yidong <cyd@gnu.org>
5356 * frame.c (x_set_frame_parameters): Revert bogus change introduced
5357 in 2012-05-25 commit by Paul Eggert (Bug#11738).
5359 2012-07-18 Dmitry Antipov <dmantipov@yandex.ru>
5361 Return more descriptive data from Fgarbage_collect.
5362 Suggested by Stefan Monnier in
5363 http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00369.html.
5364 * alloc.c (bounded_number): New function.
5365 (total_buffers, total_vectors): New variable.
5366 (total_string_size): Rename to total_string_bytes, adjust users.
5367 (total_vector_size): Rename to total_vector_bytes, adjust users.
5368 (sweep_vectors): Account total_vectors and total_vector_bytes.
5369 (Fgarbage_collect): New return value. Adjust documentation.
5370 (gc_sweep): Account total_buffers.
5371 (Fmemory_free, Fmemory_use_counts): Use bounded_number.
5372 (VECTOR_SIZE): Remove.
5373 * data.c (Qfloat, Qvector, Qsymbol, Qstring, Qcons): Make global.
5374 (Qinterval, Qmisc): New symbols.
5375 (syms_of_data): Initialize them.
5376 * lisp.h (Qinterval, Qsymbol, Qstring, Qmisc, Qvector, Qfloat)
5377 (Qcons, Qbuffer): New declarations.
5379 2012-07-17 Paul Eggert <eggert@cs.ucla.edu>
5381 * alloc.c (Fmemory_free): Account for memory-free's own storage.
5382 Round up, not down. Improve doc.
5384 2012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
5386 Restore old code in allocate_string_data to avoid Faset breakage.
5387 Reported by Julien Danjou <julien@danjou.info> in
5388 http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00371.html.
5389 * alloc.c (allocate_string_data): Restore old code with minor
5390 adjustments, fix comment to explain this subtle issue.
5392 2012-07-17 Eli Zaretskii <eliz@gnu.org>
5394 Remove FILE_SYSTEM_CASE.
5395 * s/msdos.h (FILE_SYSTEM_CASE): Don't define.
5397 * fileio.c (FILE_SYSTEM_CASE): Don't define.
5398 (Ffile_name_directory, Fexpand_file_name): Don't use FILE_SYSTEM_CASE.
5399 Fixes problems on MS-DOS with Vtemp_file_name_pattern when
5400 call-process-region passes it through expand-file-name.
5402 * dired.c (file_name_completion): Don't use FILE_SYSTEM_CASE.
5404 2012-07-17 Andreas Schwab <schwab@linux-m68k.org>
5406 Fix crash when creating indirect buffer (Bug#11917)
5407 * buffer.c (buffer_lisp_local_variables): Add argument CLONE.
5408 Don't handle unbound variables specially if non-zero.
5409 (Fbuffer_local_variables): Pass zero.
5410 (clone_per_buffer_values): Pass non-zero.
5412 2012-07-17 Andreas Schwab <schwab@linux-m68k.org>
5414 * gnutls.c (emacs_gnutls_handshake): Revert last change. Add QUIT
5415 to make the loop interruptible.
5417 2012-07-17 Andreas Schwab <schwab@linux-m68k.org>
5419 * gnutls.c (emacs_gnutls_handshake): Only retry if
5420 GNUTLS_E_INTERRUPTED.
5422 2012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
5424 Cleanup and convert miscellaneous checks to eassert.
5425 * alloc.c (mark_interval): Fix comment, partially rephrase
5426 old comment from intervals.h (see below).
5427 * intervals.c (find_interval, adjust_intervals_for_insertion)
5428 (delete_interval, adjust_intervals_for_deletion)
5429 (graft_intervals_into_buffer, temp_set_point_both, copy_intervals):
5431 (adjust_intervals_for_insertion, make_new_interval):
5432 Remove obsolete and unused code.
5433 * intervals.h (struct interval): Remove obsolete comment.
5434 * textprotp.c (erase_properties): Remove unused code.
5435 (Fadd_text_properties, set_text_properties_1, Fremove_text_properties)
5436 (Fremove_list_of_text_properties): Convert to eassert.
5438 2012-07-17 Chong Yidong <cyd@gnu.org>
5440 * editfns.c (Finsert_char): Doc fix.
5442 2012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
5444 Fix previous change to make Fmemory_free always accurate.
5445 * alloc.c (make_interval): Update total_free_intervals.
5446 (make_float): Likewise for total_free_floats.
5447 (free_cons, Fcons): Likewise for total_free_conses.
5448 (SETUP_ON_FREE_LIST, allocate_vector_from_block):
5449 Likewise for total_free_vector_bytes.
5450 (Fmake_symbol): Likewise for total_free_symbols.
5451 (bytes_free): Remove.
5453 2012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
5455 Simple free memory accounting feature.
5456 * alloc.c (bytes_free, total_free_vector_bytes): New variable.
5457 (sweep_vectors): Accumulate size of free vectors.
5458 (Fgarbage_collect): Setup bytes_free.
5459 (Fmemory_free): New function.
5460 (syms_of_alloc): Register it.
5462 2012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
5464 Cleanup overlays checking.
5465 * buffer.h (OVERLAY_VALID): Remove as useless synonym of OVERLAYP.
5466 * buffer.c (overlay_touches_p, recenter_overlay_lists): Change to
5467 eassert and OVERLAYP.
5468 (sort_overlays): Change to use OVERLAYP.
5470 2012-07-16 René Kyllingstad <Rene@Kyllingstad.com> (tiny change)
5472 * editfns.c (Finsert_char): Make it interactive, and make the
5473 second arg optional. Copy interactive spec and docstring from
5476 2012-07-17 Paul Eggert <eggert@cs.ucla.edu>
5478 * floatfns.c (Fabs): Do not wrap fabs inside IN_FLOAT (Bug#11913).
5479 Unlike the other wrapped functions, fabs has an unspecified
5482 2012-07-16 Jan Djärv <jan.h.d@swipnet.se>
5484 * nsterm.m (keyDown): Interpret flags without left/right bits
5485 as the left key (Bug#11670).
5487 2012-07-16 Dmitry Antipov <dmantipov@yandex.ru>
5489 Remove empty and useless init functions.
5490 * lisp.h (init_character_once, init_fns, init_image)
5491 (init_filelock, init_sound): Remove prototype.
5492 * character.c (init_character_once): Remove.
5493 * filelock.c (init_filelock): Likewise.
5494 * fns.c (init_fns): Likewise.
5495 * image.c (init_image): Likewise.
5496 * sound.c (init_sound): Likewise.
5497 * emacs.c (main): Adjust accordingly.
5499 2012-07-16 Dmitry Antipov <dmantipov@yandex.ru>
5501 * gtkutil.h: Tiny cleanups.
5502 (use_old_gtk_file_dialog): Remove useless declaration.
5503 (xg_uses_old_file_dialog): Add suggested const attribute.
5505 2012-07-15 Eli Zaretskii <eliz@gnu.org>
5507 * bidi.c (MAX_STRONG_CHAR_SEARCH): New macro.
5508 (bidi_paragraph_init): Use it to limit search forward for a strong
5509 directional character in abnormally large paragraphs full of
5510 neutral or weak characters. (Bug#11943)
5512 2012-07-15 Stefano Facchini <stefano.facchini@gmail.com> (tiny change)
5514 * gtkutil.c (xg_create_tool_bar): Apply "primary-toolbar" style to
5515 the toolbar (Bug#9451).
5516 (xg_make_tool_item): Give the widget event box a transparent
5519 2012-07-15 Dmitry Antipov <dmantipov@yandex.ru>
5521 Cleanup basic allocation variables and functions.
5522 * alloc.c (ignore_warnings, init_intervals, init_float)
5523 (init_cons, init_symbol, init_marker): Remove.
5524 (interval_block_index): Initialize to INTERVAL_BLOCK_SIZE.
5525 (float_block_index): Initialize to FLOAT_BLOCK_SIZE.
5526 (cons_block_index): Initialize to CONS_BLOCK_SIZE.
5527 (symbol_block_size): Initialize to SYMBOL_BLOCK_SIZE.
5528 (marker_block_index): Initialize to MARKER_BLOCK_SIZE.
5529 (staticidx, init_alloc_once, init_strings, free_ablock):
5530 Remove redundant initialization.
5531 * fns.c (init_weak_hash_tables): Remove.
5532 * lisp.h (init_weak_hash_tables): Remove prototype.
5534 2012-07-15 Dmitry Antipov <dmantipov@yandex.ru>
5536 Use zero_vector where appropriate.
5537 * alloc.c (zero_vector): Define as Lisp_Object. Adjust users
5539 * lisp.h (zero_vector): New declaration.
5540 * font.c (null_vector): Remove.
5541 (syms_of_font): Remove initialization and staticpro.
5542 (font_list_entities, font_find_for_lface): Change to use zero_vector.
5543 * keymap.c (Faccessible_keymaps): Likewise.
5545 2012-07-15 Leo Liu <sdl.web@gmail.com>
5547 * fringe.c: Fix typo in comments.
5549 2012-07-14 Leo Liu <sdl.web@gmail.com>
5551 * fringe.c: Add a new bitmap exclamation-mark.
5553 2012-07-14 Eli Zaretskii <eliz@gnu.org>
5555 * gmalloc.c (GMALLOC_INHIBIT_VALLOC): Don't reference.
5557 * s/msdos.h (BSD_SYSTEM, DATA_START, GC_SETJMP_WORKS, HAVE_MOUSE)
5558 (HAVE_MENUS): Don't define, defined by editing config.in with
5560 (GMALLOC_INHIBIT_VALLOC): Don't define.
5561 (MODE_LINE_BINARY_TEXT): Remove, not used anymore.
5563 2012-07-14 Juanma Barranquero <lekktu@gmail.com>
5565 * s/ms-w32.h (GC_SETJMP_WORKS, GC_MARK_STACK): Set in nt/config.nt.
5567 2012-07-14 Glenn Morris <rgm@gnu.org>
5569 * s/aix4-2.h, s/freebsd.h, s/gnu-linux.h, s/hpux10-20.h:
5570 * s/irix6-5.h, s/netbsd.h, s/sol2-6.h, s/unixware.h:
5571 Let configure set GC_SETJMP_WORKS, GC_MARK_STACK.
5573 2012-07-13 Glenn Morris <rgm@gnu.org>
5575 * s/gnu-linux.h (GC_MARK_SECONDARY_STACK): Let configure set it.
5577 * s/usg5-4-common.h (SETUP_SLAVE_PTY): Let configure set it.
5578 * s/irix6-5.h (SETUP_SLAVE_PTY): No more need to unset it.
5580 2012-07-13 Jan Djärv <jan.h.d@swipnet.se>
5582 * nsterm.m (uRect): Only define if NS_IMPL_GNUSTEP.
5583 (x_free_frame_resources): Pass x_free_frame_resources to NSTRACE.
5584 (ns_lisp_to_color, ns_string_to_lispmod, ns_term_init)
5585 (ns_term_shutdown, requestService, initFrameFromEmacs): Use SSDATA
5587 (ns_exec_path, ns_load_path, changeFont): Put () around assignment used
5588 as boolean expression.
5589 (x_set_window_size): Remove unused variable toolbar.
5590 (ns_get_color_default, ns_mod_to_lisp): Remove.
5591 (ns_mouse_position): Remove unused variables xchar and ychar.
5592 (ns_compute_glyph_string_overhangs): Remove unused variable face.
5593 (ns_set_vertical_scroll_bar): Remove unused variable count.
5594 (ns_delete_terminal): Remove unused variable i.
5595 (ns_term_init): Remove unused variables r, g and b.
5596 (mouseDown): Remove unused variable window.
5597 (windowDidResize): Move definition of theWindow inside NS_IMPL_GNUSTEP.
5598 (initFrameFromEmacs): Remove unused variable vbextra.
5599 (mouseEntered): Remove unused variables p and dpyinfo.
5600 (mouseExited): Remove unused variables p and r.
5601 (ns_define_frame_cursor, ns_clear_frame_area)
5602 (ns_draw_window_cursor, ns_initialize_display_info): Make static.
5603 (menuDown): Assign [sender tag] to variable and cast the variable.
5605 * nsterm.h (menuDown): Add id as type to argument sender.
5606 (ns_display_info_for_name): Add Lisp_Object argument.
5607 (ns_term_init): Add Lisp_Object argument.
5608 (ns_map_event_to_object): Add void argument.
5609 (ns_string_from_pasteboard, ns_string_to_pasteboard): Add correct
5610 prototype with arguments and only declare if __OBJC__.
5611 (nxatoms_of_nsselect): Add void argument.
5612 (ns_lisp_to_cursor_type): Add Lisp_Object argument.
5613 (ns_alloc_autorelease_pool): Add void argument.
5614 (ns_release_autorelease_pool): Add void* argument.
5615 (ns_get_defaults_value): Add const char* argument.
5617 * nsmenu.m (ns_update_menubar, ns_menu_show, process_dialog)
5618 (initFromContents): Use SSDATA where appropriate.
5619 (ns_update_menubar): Add braces to ambigous if-else.
5620 (initWithTitle): Put () around assignment in if statement.
5621 (ns_menu_show): Remove unused variables window and keymap.
5622 (update_frame_tool_bar): Remove unused variable selected_p.
5623 (initWithContentRect): Remove unused variable this_cmd_name.
5625 * nsimage.m (ns_load_image, allocInitFromFile): Use SSDATA where
5627 (setXBMColor): Remove unused variable len.
5628 (setPixmapData): Put () around assignment in loop statement.
5630 * nsfont.m (ns_get_family, ns_lang_to_script, ns_otf_to_script)
5631 (ns_registry_to_script, ns_get_req_script, nsfont_open): Use SSDATA
5633 (ns_get_covering_families, ns_findfonts, nsfont_list_family): Put ()
5634 around assignment in loop statement.
5635 (nsfont_open): Remove unused variable i.
5636 (nsfont_open): Remove unused variable len.
5637 (nsfont_draw): Remove unused variable cs.
5639 * nsfns.m (x_set_icon_name, ns_set_name_internal)
5640 (ns_set_name_as_filename, ns_implicitly_set_icon_type)
5641 (x_set_icon_type, ns_lisp_to_cursor_type, Fns_read_file_name)
5642 (Fns_get_resource, Fns_set_resource, Fx_open_connection)
5643 (Fns_font_name, Fns_perform_service)
5644 (Fns_convert_utf8_nfd_to_nfc, ns_do_applescript)
5645 (Fns_do_applescript, Fx_show_tip): Use SSDATA where appropriate.
5646 (ns_set_name): Remove unused variable view.
5647 (x_set_menu_bar_lines): Remove unused variable olines.
5648 (x_set_tool_bar_lines): Remove unused variable root_window.
5649 (Fns_list_colors): Put () around assignment in while statement.
5650 (Fns_perform_service): Remove unused variable len.
5651 (Fns_display_usable_bounds): Remove unused variable top.
5652 (syms_of_nsfns): Remove unused variable i.
5654 * nsmenu.m (ns_update_menubar): Exchange place of argument 2 and 3 to
5657 2012-07-13 Kalle Kankare <kalle.kankare@iki.fi> (tiny change)
5659 * image.c (Fimagemagick_types): Initialize ex with GetExceptionInfo
5660 and free it with DestroyExceptionInfo (Bug#11558).
5662 2012-07-13 Juanma Barranquero <lekktu@gmail.com>
5664 * s/ms-w32.h (FIRST_PTY_LETTER, HAVE_SOCKETS): Move to nt/config.nt.
5665 (HAVE_ATTRIBUTE_ALIGNED, HAVE_C99_STRTOLD, HAVE___BUILTIN_UNWIND_INIT):
5666 Set here, not in nt/config.nt.
5668 2012-07-13 Eli Zaretskii <eliz@gnu.org>
5670 * xdisp.c (move_it_in_display_line_to): On GUI terminals, allow
5671 cursor overflow into the last glyph on display line when the right
5672 fringe is off. (Bug#11832)
5674 2012-07-13 Paul Eggert <eggert@cs.ucla.edu>
5676 * xdisp.c (produce_special_glyphs): Now static.
5677 * dispextern.h (produce_special_glyphs): Remove decl.
5679 2012-07-13 Glenn Morris <rgm@gnu.org>
5681 * s/bsd-common.h, s/cygwin.h: Remove empty files.
5682 * s/freebsd.h, s/netbsd.h: Do not include bsd-common.h.
5684 * s/usg5-4-common.h (USG, USG5):
5685 * s/template.h (USG5, USG, HPUX, BSD4_2, BSD_SYSTEM):
5686 * s/sol2-6.h (SOLARIS2):
5687 * s/irix6-5.h (IRIX6_5):
5688 * s/hpux10-20.h (USG, USG5, HPUX):
5689 * s/gnu-linux.h (USG, GNU_LINUX):
5690 * s/freebsd.h (BSD_SYSTEM):
5691 * s/darwin.h (BSD4_2, BSD_SYSTEM, DARWIN_OS):
5692 * s/cygwin.h (CYGWIN):
5693 * s/bsd-common.h (BSD_SYSTEM, BSD4_2):
5694 * s/aix4-2.h (USG, USG5, _AIX): Move "system type" macros to configure.
5696 2012-07-13 BT Templeton <bpt@hcoop.net> (tiny change)
5698 * nsfont.m (ns_charset_covers): Don't abort if no bitmap (Bug#11853).
5700 2012-07-13 Glenn Morris <rgm@gnu.org>
5702 * s/usg5-4-common.h (NSIG_MINIMUM): Let configure set it.
5704 * s/gnu-linux.h, s/irix6-5.h: Let configure set ULIMIT_BREAK_VALUE.
5706 * process.c (init_process_emacs): Replace MIN_PTY_KERNEL_VERSION.
5707 * s/darwin.h (MIN_PTY_KERNEL_VERSION): Remove single-use macro.
5709 2012-07-12 Glenn Morris <rgm@gnu.org>
5711 * s/darwin.h (SYSTEM_PURESIZE_EXTRA): Move to configure.
5713 * process.c (init_process_emacs): Rename from init_process.
5714 The old name is also the name of a Mach system call.
5715 * lisp.h, emacs.c: Update for this name change.
5716 * nsgui.h, sysselect.h, s/darwin.h: Remove workaround that is no
5719 2012-07-12 Eli Zaretskii <eliz@gnu.org>
5721 * xdisp.c (insert_left_trunc_glyphs): Fix incorrect size in
5722 memmove call that removes glyphs covered by the left truncation
5723 glyph. Improve commentary.
5724 (display_line): Fix display of continuation glyphs on GUI frames
5725 when the right fringe is turned off and variable-size fonts are
5726 used in the window. Move the code that appends a stretch glyph to
5727 produce_special_glyphs, so that it could be used for truncation
5728 and continuation glyphs alike.
5729 (produce_special_glyphs) [HAVE_WINDOW_SYSTEM]: Produce a stretch
5730 glyph of a suitably computed width, to align the special glyphs at
5731 the window margin. Code moved from display_line. (Bug#11832)
5733 2012-07-12 Glenn Morris <rgm@gnu.org>
5735 * s/aix4-2.h, s/hpux10-20.h: Let configure set NO_EDITRES.
5737 * s/gnu-linux.h, s/hpux10-20.h:
5738 Do not unconditionally define HAVE_XRMSETDATABASE.
5740 * s/gnu-linux.h (UNIX98_PTYS): Let configure set it.
5742 2012-07-12 Paul Eggert <eggert@cs.ucla.edu>
5744 Fix typos that broke OS X build.
5745 Reported by Randal L. Schwartz in
5746 <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00225.html>.
5747 * nsterm.m (ns_timeout): Add missing local decl.
5748 (ns_get_color): snprintf -> sprintf, to fix typo.
5750 2012-07-12 Glenn Morris <rgm@gnu.org>
5752 * src/s/aix4-2.h, src/s/cygwin.h, src/s/darwin.h:
5753 * src/s/gnu-linux.h, src/s/hpux10-20.h, src/s/irix6-5.h:
5754 * src/s/sol2-6.h, src/s/unixware.h, src/s/usg5-4-common.h:
5755 Move PTY_NAME_SPRINTF, PTY_TTY_NAME_SPRINTF to configure.
5757 * s/cygwin.h, s/darwin.h, s/gnu-linux.h, s/irix6-5.h:
5758 Move PTY_OPEN to configure.
5760 * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/darwin.h:
5761 * s/gnu-linux.h, s/hpux10-20.h, s/irix6-5.h, s/template.h:
5762 * s/usg5-4-common.h: Move FIRST_PTY_LETTER, PTY_ITERATION to configure.
5764 2012-07-12 Dmitry Antipov <dmantipov@yandex.ru>
5766 Use empty_unibyte_string where applicable.
5767 * keyboard.c (parse_tool_bar_item): Use empty_unibyte_string.
5768 * lread.c (read1): Likewise.
5769 * xsettings.c (syms_of_xsettings): Likewise.
5771 2012-07-12 Glenn Morris <rgm@gnu.org>
5773 * s/cygwin.h (G_SLICE_ALWAYS_MALLOC):
5774 * s/freebsd.h (BROKEN_PTY_READ_AFTER_EAGAIN):
5775 * s/irix6-5.h (SETPGRP_RELEASES_CTTY, PREFER_VSUSP):
5776 * s/hpux10-20.h (RUN_TIME_REMAP):
5777 * s/bsd-common.h (TABDLY): Move to configure.
5779 * s/hpux10-20.h, s/sol2-6.h: Move XOS_NEEDS_TIME_H to configure.
5781 * s/bsd-common.h, s/darwin.h: Move TAB3 to configure.
5783 * s/aix4-2.h (BROKEN_FIONREAD, BROKEN_SIGAIO, BROKEN_SIGPTY)
5784 (BROKEN_SIGPOLL, BROKEN_GET_CURRENT_DIR_NAME): Let configure set them.
5786 * s/darwin.h (NO_ABORT, NO_MATHERR): Let configure set them.
5788 * s/bsd-common.h, s/cygwin.h, s/gnu-linux.h, s/irix6-5.h:
5789 * s/template.h: Move NARROWPROTO to configure.
5791 2012-07-11 Glenn Morris <rgm@gnu.org>
5793 * s/gnu-linux.h, s/sol2-6.h: No longer define POSIX,
5794 unused since 2011-01-17 change to systty.h.
5796 * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/darwin.h, s/gnu-linux.h:
5797 * s/hpux10-20.h, s/template.h, s/usg5-4-common.h:
5798 Move HAVE_PTYS and HAVE_SOCKETS to configure.
5800 2012-07-11 Paul Eggert <eggert@cs.ucla.edu>
5802 * s/sol2-6.h (HAVE_LIBKSTAT): Remove. (Bug#11914)
5804 2012-07-11 Glenn Morris <rgm@gnu.org>
5806 * s/darwin.h, s/gnu-linux.h, s/template.h:
5807 Move INTERRUPT_INPUT to configure.
5809 2012-07-11 Dmitry Antipov <dmantipov@yandex.ru>
5811 Minor adjustments to interning code.
5812 * lisp.h (intern, intern_c_string): Redefine as static inline
5813 wrappers for intern_1 and intern_c_string_1, respectively.
5814 (intern_1, intern_c_string_1): Rename prototypes.
5815 * lread.c (intern_1, intern_c_string_1, oblookup):
5816 Simplify Vobarray checking.
5817 * font.c (font_intern_prop): Likewise. Adjust comment.
5818 * w32font.c (intern_font_name): Likewise.
5820 2012-07-11 Andreas Schwab <schwab@linux-m68k.org>
5822 * gnutls.c (Fgnutls_boot): Properly parse :keylist argument.
5824 * coding.c (Fdefine_coding_system_internal): Use XCAR/XCDR instead
5825 of Fcar/Fcdr if possible.
5826 * font.c (check_otf_features): Likewise.
5827 * fontset.c (Fnew_fontset): Likewise.
5828 * gnutls.c (Fgnutls_boot): Likewise.
5829 * minibuf.c (read_minibuf): Likewise.
5830 * msdos.c (IT_set_frame_parameters): Likewise.
5831 * xmenu.c (Fx_popup_dialog): Likewise.
5832 * w32menu.c (Fx_popup_dialog): Likewise.
5834 2012-07-11 Glenn Morris <rgm@gnu.org>
5836 * s/bsd-common.h, s/cygwin.h: No need to undefine INTERRUPT_INPUT,
5837 since nothing has defined it on these platforms.
5839 * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/gnu-linux.h:
5840 * s/irix6-5.h: Move SIGNALS_VIA_CHARACTERS to configure.
5842 * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/darwin.h:
5843 * s/gnu-linux.h, s/hpux10-20.h, s/template.h, s/usg5-4-common.h:
5844 Move CLASH_DETECTION to configure.
5846 * s/gnu.h: Remove file, which is now empty.
5848 * s/gnu.h, s/gnu-linux.h:
5849 Move GNU_LIBRARY_PENDING_OUTPUT_COUNT to configure.
5851 2012-07-11 John Wiegley <johnw@newartisans.com>
5853 * alloc.c (mark_memory): Guard the "no_address_safety_analysis"
5854 function attribute, so we only use it if it exists in the
5857 2012-07-11 Dmitry Antipov <dmantipov@yandex.ru>
5859 Avoid call to strlen in fast_c_string_match_ignore_case.
5860 * search.c (fast_c_string_match_ignore_case): Change to use
5861 length argument. Adjust users accordingly.
5862 * lisp.h (fast_c_string_match_ignore_case): Adjust prototype.
5864 2012-07-11 Paul Eggert <eggert@cs.ucla.edu>
5866 Assume mkdir, rmdir.
5867 * sysdep.c (mkdir) [!HAVE_MKDIR]: Remove.
5868 * sysdep.c (rmdir) [!HAVE_RMDIR]: Remove.
5871 * sysdep.c (rename) [!HAVE_RENAME]: Remove.
5874 * s/hpux10-20.h (HAVE_PERROR): Remove.
5875 * sysdep.c (perror) [HPUX && !HAVE_PERROR]:
5876 Remove dummy definition, as this problem was obsolete long ago.
5879 * sysdep.c (strerror) [!HAVE_STRERROR && !WINDOWSNT]: Remove.
5881 2012-07-11 Dmitry Antipov <dmantipov@yandex.ru>
5883 Avoid calls to strlen in font processing functions.
5884 * font.c (font_parse_name, font_parse_xlfd, font_parse_fcname)
5885 (font_open_by_name): Change to use length argument.
5886 Adjust users accordingly.
5887 * font.h (font_open_by_name, font_parse_xlfd, font_unparse_xlfd):
5889 * xfont.c (xfont_decode_coding_xlfd, font_unparse_xlfd):
5890 Change to return ptrdiff_t.
5891 (xfont_list_pattern, xfont_match): Use length returned by
5892 xfont_decode_coding_xlfd.
5893 * xfns.c (x_default_font_parameter): Omit useless xstrdup.
5895 2012-07-11 Glenn Morris <rgm@gnu.org>
5897 * s/darwin.h, s/freebsd.h, s/netbsd.h:
5898 Move DONT_REOPEN_PTY to configure.
5900 * sound.c (DEFAULT_SOUND_DEVICE) [!WINDOWSNT]:
5901 * s/netbsd.h (DEFAULT_SOUND_DEVICE): Let configure set it.
5903 2012-07-10 Paul Eggert <eggert@cs.ucla.edu>
5905 Remove "#define unix" that is no longer needed (Bug#11905).
5906 * s/aix4-2.h (unix): Remove; no longer needed.
5908 EMACS_TIME simplification (Bug#11875).
5909 This replaces macros (which typically do not work in GDB)
5910 with functions, typedefs and enums, making the code easier to debug.
5911 The functional style also makes code easier to read and maintain.
5912 * systime.h: Include <sys/time.h> on all hosts, not just if
5913 WINDOWSNT, since 'struct timeval' is needed in general.
5914 (EMACS_TIME): Now a typedef, not a macro.
5915 (EMACS_TIME_RESOLUTION, LOG10_EMACS_TIME_RESOLUTION): Now constants,
5917 (EMACS_SECS, EMACS_NSECS, EMACS_TIME_SIGN, EMACS_TIME_VALID_P)
5918 (EMACS_TIME_FROM_DOUBLE, EMACS_TIME_TO_DOUBLE, EMACS_TIME_EQ)
5919 (EMACS_TIME_NE, EMACS_TIME_GT, EMACS_TIME_GE, EMACS_TIME_LT)
5920 (EMACS_TIME_LE): Now functions, not macros.
5921 (EMACS_SET_SECS, EMACS_SET_NSECS, EMACS_SET_SECS_NSECS)
5922 (EMACS_SET_USECS, EMACS_SET_SECS_USECS): Remove these macros,
5923 which are not functions. All uses rewritten to use:
5924 (make_emacs_time): New function.
5925 (EMACS_SECS_ADDR, EMACS_SET_INVALID_TIME, EMACS_GET_TIME)
5926 (EMACS_ADD_TIME, EMACS_SUB_TIME): Remove these macros, which are
5927 not functions. All uses rewritten to use the following, respectively:
5928 (emacs_secs_addr, invalid_emacs_time, get_emacs_time)
5929 (add_emacs_time, sub_emacs_time): New functions.
5930 * atimer.c: Don't include <sys/time.h>, as "systime.h" does this.
5931 * fileio.c (Fcopy_file):
5932 * xterm.c (XTflash): Get the current time closer to when it's used.
5933 * makefile.w32-in ($(BLD)/atimer.$(O)): Update dependencies.
5935 * bytecode.c (targets): Suppress -Woverride-init warnings.
5937 Simplify by avoiding confusing use of strncpy etc.
5938 * doc.c (Fsnarf_documentation):
5939 * fileio.c (Ffile_name_directory, Fsubstitute_in_file_name):
5940 * frame.c (Fmake_terminal_frame):
5941 * gtkutil.c (get_utf8_string):
5943 * nsmenu.m (ns_update_menubar):
5944 * regex.c (regerror):
5945 Prefer memcpy to strncpy and strncat when either will do.
5946 * fileio.c (Fsubstitute_in_file_name):
5947 * keyboard.c (MULTI_LETTER_MOD, parse_modifiers_uncached)
5948 (menu_separator_name_p):
5949 * nsmenu.m (ns_update_menubar):
5950 Prefer memcmp to strncmp when either will do.
5951 * nsterm.m: Include <ftoastr.h>.
5953 * s/gnu-linux.h, s/sol2-6.h, s/unixware.h (PTY_TTY_NAME_SPRINTF):
5954 Prefer snprintf to strncpy.
5955 * nsterm.m (ns_term_init):
5956 * widget.c (set_frame_size) [0]: Prefer xstrdup to xmalloc + strncpy.
5957 * nsterm.m (ns_term_init):
5958 Avoid the need for strncpy, by using build_string or
5959 make_unibyte_string directly. Use dtoastr, not snprintf.
5960 * process.c (Fmake_network_process): Diagnose service names that
5961 are too long, rather than silently truncating them or creating
5962 non-null-terminated names.
5963 (Fnetwork_interface_info): Likewise, for interface names.
5964 * sysdep.c (system_process_attributes) [GNU_LINUX]:
5965 Prefer sprintf to strncat.
5966 * xdisp.c (debug_method_add) [GLYPH_DEBUG]:
5967 Prefer vsnprintf to vsprintf + strncpy.
5969 2012-07-10 Glenn Morris <rgm@gnu.org>
5971 * dispnew.c (PENDING_OUTPUT_COUNT) [!__GNU_LIBRARY__]:
5972 Clarify fallback case.
5974 2012-07-10 Dmitry Antipov <dmantipov@yandex.ru>
5976 Use XCAR and XCDR instead of Fcar and Fcdr where possible.
5977 * callint.c, coding.c, doc.c, editfns.c, eval.c, font.c, fontset.c,
5978 * frame.c, gnutls.c, minibuf.c, msdos.c, textprop.c, w32fns.c,
5979 * w32menu.c, window.c, xmenu.c: Change to use XCAR and XCDR
5980 where argument type is known to be a Lisp_Cons.
5982 2012-07-10 Tom Tromey <tromey@redhat.com>
5984 * bytecode.c (BYTE_CODE_THREADED): New macro.
5985 (BYTE_CODES): New macro. Replaces all old byte-code defines.
5986 (enum byte_code_op): New type.
5987 (CASE, NEXT, FIRST, CASE_DEFAULT, CASE_ABORT): New macros.
5988 (exec_byte_code): Use them. Use token threading when applicable.
5990 2012-07-10 Dmitry Antipov <dmantipov@yandex.ru>
5992 Optimize pure C strings initialization.
5993 * lisp.h (make_pure_string): Fix prototype.
5994 (build_pure_c_string): New function, defined as static inline. This
5995 provides a better opportunity to optimize away calls to strlen when
5996 the function is called with compile-time constant argument.
5997 * alloc.c (make_pure_c_string): Fix comment. Change to add nchars
5998 argument, adjust users accordingly. Use build_pure_c_string where
6000 * buffer.c, coding.c, data.c, dbusbind.c, fileio.c, fontset.c, frame.c,
6001 * keyboard.c, keymap.c, lread.c, search.c, syntax.c, w32fns.c, xdisp.c,
6002 * xfaces.c, xfns.c, xterm.c: Use build_pure_c_string where appropriate.
6004 2012-07-10 Dmitry Antipov <dmantipov@yandex.ru>
6006 Avoid calls to strlen in miscellaneous functions.
6007 * buffer.c (init_buffer): Use precalculated len, adjust if needed.
6008 * font.c (Ffont_xlfd_name): Likewise. Change to call make_string.
6009 * lread.c (openp): Likewise.
6011 2012-07-10 Dmitry Antipov <dmantipov@yandex.ru>
6013 Avoid calls to strlen in path processing functions.
6014 * fileio.c (file_name_as_directory): Add comment. Change to add
6015 srclen argument and return the length of result. Adjust users
6017 (directory_file_name): Fix comment. Change to add srclen argument,
6018 swap 1st and 2nd arguments to obey the common convention.
6019 Adjust users accordingly.
6020 * filelock.c (fill_in_lock_file_name): Avoid calls to strlen.
6022 2012-07-10 Glenn Morris <rgm@gnu.org>
6024 * s/cygwin.h, s/darwin.h, s/freebsd.h, s/netbsd.h, s/unixware.h:
6025 Move PENDING_OUTPUT_COUNT definition to configure.
6027 * s/irix6-5.h (DATA_START, DATA_SEG_BITS):
6028 * s/hpux10-20.h (DATA_SEG_BITS, DATA_START):
6029 * s/gnu.h (DATA_START): Move definitions to configure.
6031 * s/irix6-5.h (SETUP_SLAVE_PTY, PTY_NAME_SPRINTF): Drop ifdef guards.
6032 We include usg5-4-common.h, which defines them both.
6034 * s/gnu.h: Don't include fcntl.h (every file in Emacs that uses
6035 O_RDONLY already includes it).
6037 Stop ns builds setting the EMACSLOADPATH environment variable.
6038 * nsterm.m (ns_load_path): Rename from ns_init_paths.
6039 Now it does not set EMACSLOADPATH, just returns the load-path string.
6040 * nsterm.h: Update accordingly.
6041 * lread.c [HAVE_NS]: Include nsterm.h.
6042 (init_lread) [HAVE_NS]: Use ns_load_path.
6043 * emacs.c (main) [HAVE_NS]: No longer call ns_init_paths.
6045 2012-07-09 Glenn Morris <rgm@gnu.org>
6047 * s/gnu.h (SIGNALS_VIA_CHARACTERS): No need to define it here,
6048 since the included bsd-common.h does so.
6050 Stop ns builds setting the EMACSPATH environment variable.
6051 * nsterm.m (ns_exec_path): New function, split from ns_init_paths.
6052 (ns_init_paths): Do not set EMACSPATH.
6053 * nsterm.h (ns_exec_path): Add it.
6054 * callproc.c (init_callproc_1, init_callproc) [HAVE_NS]:
6057 * nsterm.m, nsterm.h (ns_etc_directory): Fix type, empty return.
6059 2012-07-09 Paul Eggert <eggert@cs.ucla.edu>
6061 * process.c (wait_reading_process_output): 'waitchannels' was unset
6062 when read_kbd || !NILP (wait_for_cell); fix this.
6064 Add GCC-style 'const' attribute to functions that can use it.
6065 * character.h (char_resolve_modifier_mask):
6066 * keyboard.h (make_ctrl_char):
6067 * lisp.h (multibyte_char_to_unibyte, multibyte_char_to_unibyte_safe)
6068 (init_character_once, next_almost_prime, init_fns, init_image)
6069 (flush_pending_output, init_sound):
6070 * mem-limits.h (start_of_data):
6071 * menu.h (finish_menu_items):
6072 Add ATTRIBUTE_CONST.
6073 * emacs.c (DEFINE_DUMMY_FUNCTION):
6074 Declare the dummy function with ATTRIBUTE_CONST.
6075 * lisp.h (Fbyteorder, Fmax_char, Fidentity):
6076 Add decls with ATTRIBUTE_CONST.
6078 Minor improvements to make_formatted_string.
6079 * alloc.c (make_formatted_string): Prefer int to ptrdiff_t
6080 where int is good enough, as vsprintf returns an int.
6081 * lisp.h (make_formatted_string): Add ATTRIBUTE_FORMAT_PRINTF.
6083 2012-07-09 Dmitry Antipov <dmantipov@yandex.ru>
6085 Use make_formatted_string to avoid double length calculation.
6086 * lisp.h (make_formatted_string): New prototype.
6087 * alloc.c (make_formatted_string): New function.
6088 * buffer.c (Fgenerate_new_buffer_name): Use it.
6089 * dbusbind.c (syms_of_dbusbind): Likewise.
6090 * editfns.c (Fcurrent_time_zone): Likewise.
6091 * filelock.c (get_boot_time): Likewise.
6092 * frame.c (make_terminal_frame, set_term_frame_name)
6093 (x_report_frame_params): Likewise.
6094 * image.c (gs_load): Likewise.
6095 * minibuf.c (get_minibuffer): Likewise.
6096 * msdos.c (dos_set_window_size): Likewise.
6097 * process.c (make_process): Likewise.
6098 * xdisp.c (ensure_echo_area_buffers): Likewise.
6099 * xsettings.c (apply_xft_settings): Likewise.
6101 2012-07-09 Glenn Morris <rgm@gnu.org>
6103 Stop ns builds polluting the environment with EMACSDATA, EMACSDOC.
6104 * nsterm.m (ns_etc_directory): New function, split from ns_init_paths.
6105 (ns_init_paths): Do not set EMACSDATA, EMACSDOC.
6106 * nsterm.h (ns_etc_directory): Add it.
6107 * callproc.c [HAVE_NS]: Include nsterm.h.
6108 (init_callproc_1, init_callproc) [HAVE_NS]: Use ns_etc_directory.
6110 2012-07-09 Dmitry Antipov <dmantipov@yandex.ru>
6112 Move marker debugging code under MARKER_DEBUG.
6113 * marker.c (MARKER_DEBUG): Move marker debugging code under
6114 #ifdef MARKER_DEBUG because byte_char_debug_check is too slow
6115 for bootstrap with --enable-checking (~3x slowdown reported
6116 by Juanma Barranquero <lekktu@gmail.com>).
6117 (verify_bytepos): Move under #ifdef MARKER_DEBUG.
6119 2012-07-08 Paul Eggert <eggert@cs.ucla.edu>
6121 * systime.h (EMACS_SUB_TIME): Clarify behavior with unsigned time_t.
6122 See <http://bugs.gnu.org/11825#29>.
6124 2012-07-08 Eli Zaretskii <eliz@gnu.org>
6126 * xdisp.c (fill_glyphless_glyph_string): If the face of the glyph
6127 has no font, use the frame's font. (Bug#11813)
6128 (display_line): Add commentary about displaying truncation glyphs
6130 (produce_special_glyphs): Move here from term.c.
6132 * term.c (produce_special_glyphs): Move to xdisp.c.
6134 * dispextern.h (produce_special_glyphs): Move prototype to xdisp.c
6137 2012-07-07 Andreas Schwab <schwab@linux-m68k.org>
6139 * xdisp.c (display_line): Avoid warning about implicit declaration
6142 * frame.c (get_frame_param): Define only if HAVE_WINDOW_SYSTEM.
6144 * lisp.h: Remove empty conditional.
6146 2012-07-07 Paul Eggert <eggert@cs.ucla.edu>
6148 * lread.c (load_path_check): Now static.
6150 Fix some minor --with-ns problems found by static checking.
6151 * frame.c (Ftool_bar_pixel_width) [!FRAME_TOOLBAR_WIDTH]:
6152 (x_set_font) [!HAVE_X_WINDOWS]:
6153 * image.c (xpm_load_image) [HAVE_NS]:
6154 (x_to_xcolors) [!HAVE_X_WINDOWS && !HAVE_NTGUI]:
6155 (x_disable_image) [!HAVE_NS && !HAVE_NTGUI]:
6156 Remove unused local.
6157 (Fx_parse_geometry) [HAVE_NS]: Don't return garbage.
6158 (xpm_load_image) [HAVE_NS && !HAVE_XPM]: Remove unused label.
6159 * image.c (x_create_bitmap_from_file) [HAVE_NS]:
6160 (xpm_load_image, xpm_load) [HAVE_NS && !HAVE_XPM]:
6161 * nsselect.m (symbol_to_nsstring, ns_string_to_pasteboard_internal):
6162 * xfaces.c (Fx_load_color_file) [!HAVE_X_WINDOWS]:
6163 Fix pointer signedness problem.
6164 * xfaces.c (FRAME_X_FONT_TABLE):
6165 * xterm.h (FRAME_X_FONT_TABLE): Remove unused, incompatible macros.
6167 2012-07-07 Glenn Morris <rgm@gnu.org>
6169 * lread.c (load_path_check): New function, split from init_lread.
6170 (init_lread): Reorganize. Motivation:
6171 If EMACSLOADPATH is set, check/warn about that rather than the
6172 defaults, which we are not going to use. Hence we can remove
6173 the turn_off_warning and WINDOWSNT || HAVE_NS tests.
6174 Don't warn if site-lisp directories are missing.
6175 If not installed, start from a blank load-path, since
6176 PATH_LOADSEARCH refers to the eventual installation directories.
6178 2012-07-07 Eli Zaretskii <eliz@gnu.org>
6180 Support truncation and continuation glyphs on GUI frames, when
6181 fringes are disabled. (Bug#11832)
6182 * xdisp.c (init_iterator): Get dimensions of truncation and
6183 continuation glyphs even if on GUI frames.
6184 Adjust it->last_visible_x on GUI frames when the left or right fringes,
6185 or both, are absent.
6186 (start_display, move_it_in_display_line_to): Handle the case of a
6187 GUI frame without a fringe to display continuation or truncation
6189 (insert_left_trunc_glyphs): Support GUI frames: make sure
6190 truncation glyphs overwrite enough glyphs from the current line to
6191 have sufficient space in pixels.
6192 (display_line): Support truncation and continuation glyphs on GUI
6193 frames. If some spare pixels are left on the line after inserting
6194 the truncation glyphs, fill that space with a stretch glyph of a
6195 suitably computed width.
6197 * term.c (produce_special_glyphs): Call PRODUCE_GLYPHS, not
6198 produce_glyphs, to support GUI sessions.
6200 2012-07-07 Paul Eggert <eggert@cs.ucla.edu>
6202 * sysdep.c (ULLONG_MAX): Define if not already defined (Bug#11781).
6204 * sysdep.c (list_system_processes): Port to NetBSD-current (Bug#11797).
6206 Do not require float-time's arg to fit in time_t (Bug#11825).
6207 This works better on hosts where time_t is unsigned, and where
6208 float-time is applied to the (negative) difference between two times.
6209 * editfns.c (decode_time_components): Last arg is now double *,
6210 not int *, and means to store all the result as a double, without
6211 worrying about whether the seconds part fits in time_t.
6212 All callers changed.
6213 (lisp_time_argument): Remove last int * arg, as it's no longer needed.
6214 All callers changed.
6215 (Ffloat_time): Do not fail merely because the specified time falls
6216 outside of time_t range.
6218 2012-07-07 Glenn Morris <rgm@gnu.org>
6220 * s/darwin.h (HAVE_RES_INIT, HAVE_LIBRESOLV):
6221 * s/hpux10-20.h (HAVE_RINT, HAVE_RANDOM):
6222 * s/unixware.h (HAVE_GETWD): Move undefs to configure (effectively).
6224 2012-07-07 Juanma Barranquero <lekktu@gmail.com>
6226 * makefile.w32-in (DISPEXTERN_H, $(BLD)/regex.$(O)):
6227 Update dependencies.
6229 * s/ms-w32.h [_MSC_VER]: Remove strcasecmp, strncasecmp.
6231 2012-07-06 Paul Eggert <eggert@cs.ucla.edu>
6233 Use c_strcasecmp for ASCII case-insensitive comparison (Bug#11786).
6234 * dispextern.h, nsfns.m, nsterm.m: Include <c-strcase.h>.
6235 * dispextern.h (xstrcasecmp): Rewrite using c_strcasecmp.
6236 * nsfns.m (x_get_string_resource): Use c_strncasecmp, not strncasecmp.
6237 * nsterm.m (ns_default): Use c_strcasecmp, not strcasecmp.
6238 * xfaces.c (xstrcasecmp) [!HAVE_STRCASECMP]: Remove.
6240 * xfont.c (compare_font_names): Redo to omit the need for casts.
6242 2012-07-06 Andreas Schwab <schwab@linux-m68k.org>
6244 * xfns.c (Fx_change_window_property): Doc fix.
6245 * w32fns.c (Fx_change_window_property): Doc fix.
6247 * w32fns.c (Fx_window_property): Accept the same arguments as the
6248 X Windows version. Doc fix.
6249 * xfns.c (Fx_window_property): Doc fix. (Bug#11870)
6251 2012-07-06 Juanma Barranquero <lekktu@gmail.com>
6252 Eli Zaretskii <eliz@gnu.org>
6254 * s/ms-w32.h: Settings not specific to Windows moved to nt/config.nt.
6255 Windows-specific code from nt/config.nt moved here.
6256 Obsolete settings removed.
6258 2012-07-06 Paul Eggert <eggert@cs.ucla.edu>
6260 * process.c: Avoid unnecessary calls to gettime.
6261 (wait_reading_process_output): Don't get the time of day
6262 when gobbling data immediately and not waiting, as there's no need
6263 for it in that case. This removes a FIXME.
6265 2012-07-06 Jan Djärv <jan.h.d@swipnet.se>
6267 * gtkutil.c (xg_event_is_for_scrollbar): Assign gwin when HAVE_GTK3
6268 is defined (Bug#11768).
6270 2012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
6272 Fix marker debugging code.
6273 * marker.c (byte_char_debug_check): Do not perform the check
6274 if buffer is not multibyte.
6275 (buf_charpos_to_bytepos, buf_bytepos_to_charpos):
6276 Call byte_char_debug_check with correct arguments.
6278 2012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
6280 Compile marker debugging code only if ENABLE_CHECKING is defined.
6281 * marker.c (byte_char_debug_check, count_markers):
6282 Use only if ENABLE_CHECKING is defined.
6283 (byte_debug_flag): Remove.
6284 (CONSIDER, buf_charpos_to_bytepos, buf_bytepos_to_charpos):
6285 Always call byte_char_debug_check if ENABLE_CHECKING is defined.
6287 2012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
6289 Avoid code repetition in marker-related functions.
6290 * marker.c (attach_marker): New function.
6291 (Fset_marker, set_marker_restricted, set_marker_both)
6292 (set_marker_restricted_both): Use it.
6293 (Fset_marker, set_marker_restricted, Fbuffer_has_markers_at):
6294 Consistently rename charno to charpos.
6295 (marker_position): Add eassert.
6296 (marker_byte_position): Convert to eassert.
6298 2012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
6300 Simplify list operations in unchain_overlay and unchain_marker.
6301 * buffer.c (unchain_overlay): Simplify. Add comment.
6302 * marker.c (unchain_marker): Simplify. Fix comments.
6304 2012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
6306 Introduce fast path for the widely used marker operation.
6307 * alloc.c (build_marker): New function.
6308 * lisp.h (build_marker): New prototype.
6309 * buffer.c (clone_per_buffer_values, Fmake_indirect_buffer): Use it.
6310 * composite.c (autocmp_chars): Likewise.
6311 * editfns.c (buildmark): Remove.
6312 (Fpoint_marker, Fpoint_min_marker, Fpoint_max_marker)
6313 (save_restriction_save): Use build_marker.
6314 * marker.c (buf_charpos_to_bytepos, buf_bytepos_to_charpos): Likewise.
6315 * window.c (save_window_save): Likewise.
6317 2012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
6319 Do not use Fdelete_overlay in delete_all_overlays
6320 to avoid redundant calls to unchain_overlay.
6321 * buffer.c (drop_overlay): New function.
6322 (delete_all_overlays, Fdelete_overlay): Use it.
6323 * minibuf.c (get_minibuffer): Fix comment.
6325 2012-07-06 Paul Eggert <eggert@cs.ucla.edu>
6327 Port to OpenBSD 5.1 amd64.
6328 * sysdep.c [BSD_SYSTEM]: Include <sys/param.h> before <sys/sysctl.h>.
6329 This is needed for OpenBSD, and should be harmless on all BSD systems.
6330 Also, include <sys/sysctl.h>, as it should be available on all
6331 BSD_SYSTEM hosts given that we're already calling sysctl in that case.
6332 (list_system_processes) [__OpenBSD__]: Use DARWIN_OS style mib, but
6333 use p_pid member, not kp_proc.pid.
6335 2012-07-06 Glenn Morris <rgm@gnu.org>
6337 * Makefile.in (emacs$(EXEEXT)): Don't check for load-path shadows.
6339 2012-07-05 Paul Eggert <eggert@cs.ucla.edu>
6341 More xmalloc and related cleanup.
6342 * alloc.c, bidi.c, buffer.c, buffer.h, bytecode.c, callint.c:
6343 * callproc.c, charset.c, coding.c, composite.c, data.c, dispnew.c:
6344 * doc.c, editfns.c, emacs.c, eval.c, fileio.c, filelock.c, fns.c:
6345 * font.c, fontset.c, frame.c, fringe.c, ftfont.c, ftxfont.c, gmalloc.c:
6346 * gtkutil.c, image.c, keyboard.c, keymap.c, lread.c, macros.c, menu.c:
6347 * nsfns.m, nsfont.m, nsmenu.m, nsterm.m, print.c, process.c, ralloc.c:
6348 * regex.c, region-cache.c, scroll.c, search.c, sound.c, syntax.c:
6349 * sysdep.c, term.c, termcap.c, unexmacosx.c, window.c, xdisp.c:
6350 * xfaces.c, xfns.c, xftfont.c, xgselect.c, xmenu.c, xrdb.c, xselect.c:
6352 Omit needless casts involving void * pointers and allocation.
6353 Prefer "P = xmalloc (sizeof *P)" to "P = xmalloc (sizeof (TYPE_OF_P))",
6354 as the former is more robust if P's type is changed.
6355 Prefer xzalloc to xmalloc + memset 0.
6356 Simplify malloc-or-realloc to realloc.
6357 Don't worry about xmalloc returning a null pointer.
6358 Prefer xstrdup to xmalloc + strcpy.
6359 * editfns.c (Fmessage_box): Grow message_text by at least 80 when
6361 * keyboard.c (apply_modifiers_uncached): Prefer local array to
6362 alloca of a constant.
6364 2012-07-05 Eli Zaretskii <eliz@gnu.org>
6366 * xdisp.c (display_line): Fix horizontal pixel coordinates when
6367 hscroll is larger than the line width. Fixes long and futile
6368 looping inside extend_face_to_end_of_line (on a TTY) producing
6369 glyphs that are not needed and thrown away.
6371 2012-07-05 Dmitry Antipov <dmantipov@yandex.ru>
6373 * marker.c (set_marker_restricted_both): Simplify by using
6376 2012-07-05 Paul Eggert <eggert@cs.ucla.edu>
6378 * editfns.c (region_limit): Simplify by using clip_to_bounds.
6380 2012-07-05 Jan Djärv <jan.h.d@swipnet.se>
6382 * gtkutil.c (gtk_scrollbar_new, gtk_box_new): Define when HAVE_GTK3 is
6383 not defined (Bug#11768).
6384 (xg_create_frame_widgets): Use gtk_plug_new_for_display (Bug#11768).
6385 (xg_create_frame_widgets, create_dialog, xg_get_file_with_chooser)
6386 (make_widget_for_menu_item, xg_make_tool_item): Use gtk_box_new
6387 followed by gtk_box_set_homogeneous (Bug#11768).
6388 (xg_update_menu_item): Use GTK_IS_BOX (Bug#11768).
6389 (update_theme_scrollbar_width, xg_create_scroll_bar):
6390 Use gtk_scrollbar_new (Bug#11768).
6391 (xg_event_is_for_scrollbar): Use Gdk Device functions for HAVE_GTK3.
6392 (is_box_type): New function (Bug#11768).
6393 (xg_tool_item_stale_p): Call is_box_type.
6394 (xg_initialize): Get settings by calling gtk_settings_get_for_screen
6395 with default display (Bug#11768).
6397 2012-07-05 Eli Zaretskii <eliz@gnu.org>
6399 * xdisp.c (window_hscroll_limited): New function.
6400 (pos_visible_p, init_iterator): Use it to avoid overflow of pixel
6401 coordinates when window's hscroll is set to insanely large
6404 2012-07-05 Juanma Barranquero <lekktu@gmail.com>
6406 * makefile.w32-in ($(BLD)/dired.$(O), $(BLD)/fileio.$(O)): Fix typo.
6407 ($(BLD)/terminal.$(O), $(BLD)/syntax.$(O)): Update dependencies.
6409 2012-07-05 Dmitry Antipov <dmantipov@yandex.ru>
6412 * lisp.h (xzalloc): New prototype. Omit needless casts.
6413 * alloc.c (xzalloc): New function. Omit needless casts.
6414 * charset.c: Omit needless casts. Convert all calls to
6415 xmalloc with following memset to xzalloc.
6416 * dispnew.c: Likewise.
6417 * fringe.c: Likewise.
6418 * image.c: Likewise.
6419 * sound.c: Likewise.
6421 * w32fns.c: Likewise.
6422 * w32font.c: Likewise.
6423 * w32term.c: Likewise.
6424 * xfaces.c: Likewise.
6426 * xterm.c: Likewise.
6427 * atimer.c: Omit needless casts.
6428 * buffer.c: Likewise.
6429 * callproc.c: Likewise.
6431 * coding.c: Likewise.
6432 * composite.c: Likewise.
6434 * doprnt.c: Likewise.
6435 * editfns.c: Likewise.
6436 * emacs.c: Likewise.
6438 * filelock.c: Likewise.
6440 * gtkutil.c: Likewise.
6441 * keyboard.c: Likewise.
6443 * lread.c: Likewise.
6444 * minibuf.c: Likewise.
6445 * msdos.c: Likewise.
6446 * print.c: Likewise.
6447 * process.c: Likewise.
6448 * region-cache.c: Likewise.
6449 * search.c: Likewise.
6450 * sysdep.c: Likewise.
6451 * termcap.c: Likewise.
6452 * terminal.c: Likewise.
6453 * tparam.c: Likewise.
6454 * w16select.c: Likewise.
6456 * w32reg.c: Likewise.
6457 * w32select.c: Likewise.
6458 * w32uniscribe.c: Likewise.
6459 * widget.c: Likewise.
6460 * xdisp.c: Likewise.
6461 * xmenu.c: Likewise.
6463 * xselect.c: Likewise.
6465 2012-07-05 Paul Eggert <eggert@cs.ucla.edu>
6467 * fileio.c (time_error_value): Check the right error number.
6468 Problem reported by Troels Nielsen in
6469 <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00095.html>.
6471 2012-07-04 Paul Eggert <eggert@cs.ucla.edu>
6473 * window.c (set_window_hscroll): Revert the 100000 hscroll limit.
6474 This should be fixed in a better way; see Eli Zaretskii in
6475 <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00088.html>.
6476 (HSCROLL_MAX): Remove; this is now internal to set_window_hscroll.
6478 * fileio.c (time_error_value): Rename from special_mtime.
6479 The old name's problems were noted by Eli Zaretskii in
6480 <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00087.html>.
6482 * emacs.c (gdb_pvec_type): Change it back to enum pvec_type.
6483 This variable's comment says Emacs needs at least one GDB-visible
6484 symbol of type enum pvec_type, to work around GDB problems.
6485 The symbol's value doesn't matter.
6487 * alloc.c (PSEUDOVECTOR_NBYTES): Remove stray ';'
6488 that causes compilation to fail on pre-C99 compilers.
6490 2012-07-04 Juanma Barranquero <lekktu@gmail.com>
6492 * s/ms-w32.h (LISP_FLOAT_TYPE, HAVE_MEMCMP, HAVE_MEMCPY)
6493 (HAVE_MEMMOVE, HAVE_MEMSET): Don't set, obsolete.
6495 2012-07-04 Dmitry Antipov <dmantipov@yandex.ru>
6497 * buffer.c (init_buffer_once): Fix initialization of
6498 headers for buffer_defaults and buffer_local_symbols.
6499 Reported by Juanma Barranquero <lekktu@gmail.com>.
6501 2012-07-04 Stefan Monnier <monnier@iro.umontreal.ca>
6503 Turn VECTOR_FREE_LIST_FLAG into PVEC_FREE.
6504 * lisp.h (enum pvec_type): Use fewer bits.
6505 (PSEUDOVECTOR_SIZE_BITS): New constant.
6506 (PSEUDOVECTOR_SIZE_MASK, PVEC_TYPE_MASK): Use it.
6507 (XSETPVECTYPESIZE, XSETTYPED_PSEUDOVECTOR, DEFUN): Adapt code to
6508 change in pvec_type.
6509 (PSEUDOVECTOR_TYPEP): New macro.
6510 (TYPED_PSEUDOVECTORP): Use it.
6511 * fns.c (internal_equal): Adapt code to extract pvectype.
6512 * emacs.c (gdb_pvec_type): Update type.
6513 * alloc.c (PSEUDOVECTOR_NBYTES): New macro.
6514 (VECTOR_FREE_LIST_SIZE_MASK): Remove (=> PSEUDOVECTOR_SIZE_MASK).
6515 (VECTOR_FREE_LIST_FLAG): Remove (=> PVEC_FREE).
6516 (SETUP_ON_FREE_LIST): Use XSETPVECTYPESIZE.
6517 (sweep_vectors): Use it. Use local var `total_bytes' instead of
6518 abusing vector->header.next.nbytes.
6519 (live_vector_p): Use PVEC_TYPE.
6520 (mark_object): Adapt code to extract pvectype. Use switch.
6522 2012-07-04 Paul Eggert <eggert@cs.ucla.edu>
6524 * doprnt.c (doprnt): Don't assume string length fits in 'int'.
6525 Tighten new eassert a bit.
6527 2012-07-04 Dmitry Antipov <dmantipov@yandex.ru>
6529 Fix compilation with --enable-gcc-warnings and -O1
6531 * doprnt.c (doprnt): Change type of tem to int, initialize
6532 to avoid compiler warning. Add eassert.
6533 * search.c (simple_search): Initialize match_byte to avoid
6534 compiler warning. Add eassert.
6536 2012-07-04 Paul Eggert <eggert@cs.ucla.edu>
6538 Avoid weird behavior with large horizontal scrolls.
6539 Without this change, for example, large hscroll values would
6540 mess up Emacs's display on Fedora 15 x86, presumably due to
6541 overflows in int calculations in the display code.
6542 Also, if buffers had long lines, Emacs would freeze.
6543 * window.c (HSCROLL_MAX): Reduce to 100000, and make it visible to GDB.
6544 (set_window_hscroll): New function, containing the old guts of
6545 Fset_window_hscroll. Return the clipped value.
6546 (Fset_window_hscroll, Fscroll_left, Fscroll_right): Use it.
6547 This avoids the need to check against PTRDIFF_MAX.
6549 * buffer.c (Fgenerate_new_buffer_name): Fix sprintf format mismatch.
6551 2012-07-04 Dmitry Antipov <dmantipov@yandex.ru>
6553 * buffer.c (Fgenerate_new_buffer_name): Fix type mismatch.
6555 2012-07-04 Paul Eggert <eggert@cs.ucla.edu>
6557 * regex.c: Suppress GCC warning on RHEL 6. (Bug#11207)
6558 Conditionalize the pragmas on GCC 4.5 or later, not GCC 4.3 or later,
6559 since GCC 4.4.6 issues a bogus warning for them.
6561 Fix bugs in file timestamp newness comparisons.
6562 * fileio.c (Ffile_newer_than_file_p):
6563 * lread.c (Fload): Use full timestamp resolution of files,
6564 not just the 1-second resolution, so that files that are only
6565 slightly newer still count as newer.
6566 * fileio.c (Ffile_newer_than_file_p): Don't assume file
6567 timestamps fit in 'int'; this fixes a Y2038 bug on most hosts.
6569 2012-07-03 Paul Eggert <eggert@cs.ucla.edu>
6571 * fileio.c: Improve handling of file time marker. (Bug#11852)
6572 (special_mtime): New function.
6573 (Finsert_file_contents, Fverify_visited_file_modtime):
6574 Use it to set special mtime values consistently.
6576 2012-07-03 Andreas Schwab <schwab@linux-m68k.org>
6578 * fileio.c (Finsert_file_contents): Properly handle st_mtime
6579 marker for non-existing file. (Bug#11852)
6581 2012-07-03 Glenn Morris <rgm@gnu.org>
6583 * lisp.h (Fread_file_name): Restore EXFUN (it's not a normal DEFUN
6584 and did not make it into globals.h).
6586 2012-07-03 Tom Tromey <tromey@redhat.com>
6588 * window.c (Fset_window_margins, Fset_window_fringes)
6589 (Fset_window_scroll_bars, Fset_window_vscroll): No longer static.
6590 * textprop.c (Fprevious_property_change): No longer static.
6591 * syntax.c (Fsyntax_table_p): No longer static.
6592 * process.c (Fget_process, Fprocess_datagram_address): No longer
6594 * keymap.c (Flookup_key, Fcopy_keymap): No longer static.
6595 * keyboard.c (Fcommand_execute): No longer static.
6597 * insdel.c (Fcombine_after_change_execute): No longer static.
6598 * image.c (Finit_image_library): No longer static.
6599 * fileio.c (Fmake_symbolic_link): No longer static.
6600 * eval.c (Ffetch_bytecode): No longer static.
6601 * editfns.c (Fuser_full_name): No longer static.
6602 * doc.c (Fdocumentation_property, Fsnarf_documentation):
6604 * buffer.c (Fset_buffer_major_mode, Fdelete_overlay): No longer
6606 * dired.c (Ffile_attributes): No longer static.
6607 * composite.c (Fcomposition_get_gstring): No longer static.
6608 * callproc.c (Fgetenv_internal): No longer static.
6610 * ccl.h: Remove EXFUNs.
6611 * buffer.h: Remove EXFUNs.
6612 * dispextern.h: Remove EXFUNs.
6613 * intervals.h: Remove EXFUNs.
6614 * fontset.h: Remove EXFUN.
6615 * font.h: Remove EXFUNs.
6616 * dosfns.c (system_process_attributes): Remove EXFUN.
6617 * keymap.h: Remove EXFUNs.
6618 * lisp.h: Remove EXFUNs.
6619 * w32term.h: Remove EXFUNs.
6620 * window.h: Remove EXFUNs.
6621 * xsettings.h: Remove EXFUN.
6622 * xterm.h: Remove EXFUN.
6624 2012-07-03 Glenn Morris <rgm@gnu.org>
6626 * lisp.h (Frandom): Make it visible to C.
6627 * buffer.c (Fgenerate_new_buffer_name): Speed up finding a new
6628 buffer for invisible buffers. (Bug#1229)
6630 2012-07-03 Dmitry Antipov <dmantipov@yandex.ru>
6632 Fix block vector allocation code to allow VECTOR_BLOCK_SIZE
6633 values which aren't power of 2.
6634 * alloc.c (VECTOR_FREE_LIST_SIZE_MASK): New macro.
6635 Verify its value and the value of VECTOR_BLOCK_SIZE. Adjust users
6638 2012-07-03 Stefan Monnier <monnier@iro.umontreal.ca>
6640 * lisp.h (Lisp_Misc, Lisp_Fwd): Move around to group better.
6642 * alloc.c (mark_object): Revert part of last patch to use `switch'.
6644 2012-07-03 Dmitry Antipov <dmantipov@yandex.ru>
6646 * alloc.c (allocate_vector_block): Remove redundant
6647 calls to mallopt if DOUG_LEA_MALLOC is defined.
6648 (allocate_vectorlike): If DOUG_LEA_MALLOC is defined,
6649 avoid calls to mallopt if zero_vector is returned.
6651 2012-07-03 Dmitry Antipov <dmantipov@yandex.ru>
6653 * alloc.c (check_string_bytes): If GC_CHECK_STRING_BYTES
6654 is enabled, avoid dereferencing NULL current_sblock if
6657 2012-07-03 Dmitry Antipov <dmantipov@yandex.ru>
6659 Cleanup basic buffer management.
6660 * buffer.h (struct buffer): Change layout to use generic vector
6661 marking code. Fix some comments. Change type of 'clip_changed'
6662 to bitfield. Remove unused #ifndef old.
6663 (FIRST_FIELD_PER_BUFFER, LAST_FIELD_PER_BUFFER): Remove.
6664 (GET_OVERLAYS_AT): Fix indentation.
6665 (for_each_per_buffer_object_at): New macro.
6666 * buffer.c (clone_per_buffer_values, reset_buffer_local_variables)
6667 (Fbuffer_local_variables): Use it.
6668 (init_buffer_once, syms_of_buffer): Remove unused #ifndef old.
6669 * alloc.c (allocate_buffer): Adjust to match new layout of
6670 struct buffer. Fix comment.
6671 (mark_overlay): New function.
6672 (mark_buffer): Use it. Use mark_vectorlike to mark normal
6673 Lisp area of struct buffer.
6674 (mark_object): Use it. Adjust marking of misc objects
6675 and related comments.
6677 2012-07-02 Paul Eggert <eggert@cs.ucla.edu>
6679 * alloc.c (mark_object): Remove "#ifdef GC_CHECK_MARKED_OBJECTS"
6680 wrapper that is not needed because the wrapped code is a no-op (zero
6681 machine instructions) when GC_CHECK_MARKED_OBJECTS is not defined.
6682 This avoids a -Wunused-macros diagnostic with GCC 4.7.1 x86-64.
6684 2012-07-02 Dmitry Antipov <dmantipov@yandex.ru>
6686 * alloc.c (mark_buffer): Simplify. Remove prototype.
6687 (mark_object): Add comment. Reorganize marking of vector-like
6688 objects. Use CHECK_LIVE for all vector-like objects except buffers
6689 and subroutines when GC_CHECK_MARKED_OBJECTS is defined.
6690 Avoid redundant calls to mark_vectorlike for bool vectors.
6692 2012-06-30 Glenn Morris <rgm@gnu.org>
6694 * nsterm.m (ns_init_paths): Ignore site-lisp if --no-site-lisp.
6696 * epaths.in (PATH_SITELOADSEARCH): New.
6697 * lread.c (init_lread): Use PATH_SITELOADSEARCH.
6698 This is rather than relying on --enable-locallisppath elements
6699 having "site-lisp" in their names. (Bug#10208#25, 11658)
6701 2012-06-30 Eli Zaretskii <eliz@gnu.org>
6703 * w32proc.c (sys_select): Accept and ignore one more argument.
6705 * w32.c (emacs_gnutls_pull): Call select with one more argument.
6707 * sysselect.h [DOS_NT]: Don't include sys/select.h.
6708 (pselect) [!MS_DOS]: Redirect to sys_select.
6710 * sysdep.c: Don't include dos.h and dosfns.h.
6712 * process.c (sys_select):
6713 * msdos.c (sys_select): Accept one more argument and ignore it.
6715 * msdos.c (event_timestamp, sys_select): Use gnulib's gettime;
6716 adapt data types and code to that.
6719 * msdos.c (gettime, settime): Define away the prototypes in dos.h,
6720 which clashes with the gnulib function of the same name.
6722 2012-06-30 Andreas Schwab <schwab@linux-m68k.org>
6724 * font.c (font_style_to_value, font_style_symbolic)
6725 (font_prop_validate_style): Add type checks for values in
6728 * lisp.h (CHECK_RANGED_INTEGER): Make value to check the first
6730 * character.c, charset.c, menu.c, process.c, window.c: Adjust all
6733 2012-06-29 Eli Zaretskii <eliz@gnu.org>
6735 * xdisp.c (try_window_id): Undo last change.
6737 * w32.c (getwd): Adjust commentary about startup_dir.
6738 (init_environment): Always call sys_access, even in non-MSVC
6739 builds. Don't chdir to the directory of the Emacs executable.
6740 This undoes code from 1997 which was justified by the need to
6741 "avoid conflicts when removing and renaming directories". But its
6742 downside was that every relative file name was being interpreted
6743 relative to the directory of the Emacs executable, which can never
6744 be TRT. In particular, it broke sys_access when called with
6745 relative file names.
6746 (sys_access): Map GetLastError to errno.
6748 2012-06-29 Dmitry Antipov <dmantipov@yandex.ru>
6750 * window.h (struct window): Change type of 'fringes_outside_margins'
6751 to bitfield. Fix comment. Adjust users accordingly.
6752 (struct window): Change type of 'window_end_bytepos' to ptrdiff_t.
6754 * xdisp.c (try_window_id): Change type of 'first_vpos' and 'vpos'
6757 2012-06-29 Andreas Schwab <schwab@linux-m68k.org>
6759 * gnutls.c (emacs_gnutls_handshake):
6760 Add QUIT to make the loop interruptible.
6762 2012-06-29 Glenn Morris <rgm@gnu.org>
6764 * charset.c (init_charset): Make lack of etc/charsets fatal.
6766 2012-06-29 Dmitry Antipov <dmantipov@yandex.ru>
6768 * editfns.c (region_limit): Fix type mismatch.
6770 2012-06-29 Dmitry Antipov <dmantipov@yandex.ru>
6772 * nsfns.m: Fix GLYPH_DEBUG usage assuming that it may be
6773 undefined. Convert from xassert to eassert.
6774 * nsmenu.m: Convert from xassert to eassert.
6775 * nsterm.m: Likewise.
6777 2012-06-28 Stefan Monnier <monnier@iro.umontreal.ca>
6779 * editfns.c (region_limit): Clip to narrowing (bug#11770).
6781 2012-06-28 Paul Eggert <eggert@cs.ucla.edu>
6783 Avoid integer overflow on scroll-left and scroll-right.
6784 * window.c (HSCROLL_MAX): New macro.
6785 (Fscroll_left, Fscroll_right): Avoid undefined behavior on integer
6786 overflow when requested scroll falls outside ptrdiff_t range.
6788 2012-06-28 Dmitry Antipov <dmantipov@yandex.ru>
6790 * window.h (struct window): Change type of 'hscroll',
6791 'min_hscroll' and 'last_point' from Lisp_Object to ptrdiff_t,
6792 'last_modified' and 'last_overlay_modified' to EMACS_INT.
6793 Adjust users accordingly.
6794 * xdisp.c (try_cursor_movement): Replace type check with eassert.
6795 * window.c (Fscroll_left, Fscroll_right): Change type of 'hscroll'
6796 from EMACS_INT to ptrdiff_t.
6797 (make_window): Omit redundant initialization.
6799 2012-06-28 Juanma Barranquero <lekktu@gmail.com>
6801 * makefile.w32-in ($(BLD)/regex.$(O)): Update dependencies.
6803 2012-06-28 Dmitry Antipov <dmantipov@yandex.ru>
6805 * window.h (struct window): Change type of 'use_time' and
6806 'sequence_number' from Lisp_Object to int.
6807 * frame.c (make_frame): Adjust users accordingly.
6808 * print.c (print_object): Likewise.
6809 * window.c (select_window, Fwindow_use_time, make_parent_window)
6810 (make_window): Likewise.
6812 2012-06-28 Dmitry Antipov <dmantipov@yandex.ru>
6814 * dispextern.h (GLYPH_DEBUG): Now defined in config.h if
6815 enabled with --enable-checking=[all,glyphs] configure option.
6816 Fix GLYPH_DEBUG usage assuming that it may be undefined,
6817 adjust comments accordingly.
6818 * dispnew.c: Fix GLYPH_DEBUG usage assuming that it may be
6819 undefined, adjust comments accordingly.
6820 * image.c: Likewise.
6821 * scroll.c: Likewise.
6822 * w32fns.c: Likewise.
6823 * w32term.c: Likewise.
6824 * xdisp.c: Likewise.
6825 * xfaces.c: Likewise.
6827 * xterm.c: Likewise.
6829 2012-06-28 Dmitry Antipov <dmantipov@yandex.ru>
6831 Generalize run-time debugging checks.
6832 * dispextern.h (XASSERTS): Remove.
6833 * fontset.c (xassert): Remove.
6834 Convert from xassert to eassert.
6835 * alloc.c: Convert from xassert to eassert.
6837 * dispnew.c: Likewise.
6839 * fringe.c: Likewise.
6840 * ftfont.c: Likewise.
6841 * gtkutil.c: Likewise.
6842 * image.c: Likewise.
6843 * keyboard.c: Likewise.
6845 * process.c: Likewise.
6846 * scroll.c: Likewise.
6847 * sound.c: Likewise.
6849 * w32console.c: Likewise.
6850 * w32fns.c: Likewise.
6851 * w32term.c: Likewise.
6852 * window.c: Likewise.
6853 * xdisp.c: Likewise.
6854 * xfaces.c: Likewise.
6856 * xselect.c: Likewise.
6857 * xterm.c: Likewise.
6859 2012-06-27 Stefan Monnier <monnier@iro.umontreal.ca>
6861 * fns.c (maybe_resize_hash_table): Output message when growing the
6864 2012-06-27 Dmitry Antipov <dmantipov@yandex.ru>
6866 * alloc.c (allocate_string_data): Remove dead code.
6867 * xsettings.c (XSETTINGS_FONT_NAME): Move under HAVE_XFT to
6868 avoid GCC warning about unused macro.
6870 2012-06-27 Dmitry Antipov <dmantipov@yandex.ru>
6872 * alloc.c (allocate_string): Omit intervals initialization.
6873 * alloc.c (make_uninit_multibyte_string): Initialize intervals
6874 as in make_pure_string and make_pure_c_string.
6876 2012-06-27 Dmitry Antipov <dmantipov@yandex.ru>
6878 * alloc.c (allocate_string): Fix last change.
6880 2012-06-27 Dmitry Antipov <dmantipov@yandex.ru>
6882 * alloc.c (allocate_string): Remove two redundant calls
6883 to memset, add explicit initialization where appropriate.
6885 2012-06-27 Glenn Morris <rgm@gnu.org>
6887 * lisp.mk (lisp): Remove paths.elc.
6889 2012-06-27 Chong Yidong <cyd@gnu.org>
6891 * doc.c (Fsubstitute_command_keys): Fix punctuation.
6893 2012-06-26 John Wiegley <johnw@newartisans.com>
6895 * unexmacosx.c (copy_data_segment): Add two section names used
6896 on Mac OS X Lion: __mod_init_func and __mod_term_func.
6898 * alloc.c (mark_memory): Do not check with -faddress-sanitizer
6899 when building with Clang.
6901 2012-06-26 Stefan Monnier <monnier@iro.umontreal.ca>
6903 * eval.c (Fapply): Allow calling it with a single argument.
6905 2012-06-26 Eli Zaretskii <eliz@gnu.org>
6907 * s/ms-w32.h (strcasecmp, strncasecmp) [_MSC_VER]: Redirect to
6908 _stricmp and _strnicmp.
6909 (HAVE_STRCASECMP, HAVE_STRNCASECMP): Define to 1.
6911 2012-06-26 Dmitry Antipov <dmantipov@yandex.ru>
6913 * alloc.c (allocate_window): Zero out non-Lisp part of newly
6915 (allocate_process): Likewise for new process.
6916 (allocate_terminal): Change to use offsetof.
6917 (allocate_frame): Likewise.
6918 * frame.c (make_frame): Omit redundant initialization.
6919 * window.c (make_parent_window): Use memset.
6920 (make_window): Omit redundant initialization.
6921 * process.c (make_process): Omit redundant initialization.
6922 * terminal.c (create_terminal): Likewise.
6924 2012-06-26 Dmitry Antipov <dmantipov@yandex.ru>
6926 * term.c (delete_tty): Remove redundant call to memset.
6928 2012-06-26 Dmitry Antipov <dmantipov@yandex.ru>
6930 * alloc.c: Remove build_string.
6931 * lisp.h: Define build_string as static inline. This provides
6932 a better opportunity to optimize away calls to strlen when the
6933 function is called with compile-time constant argument.
6934 * image.c (imagemagick_error): Convert to build_string.
6935 * w32proc.c (sys_spawnve): Likewise.
6936 * xterm.c (x_term_init): Likewise.
6938 2012-06-26 Paul Eggert <eggert@cs.ucla.edu>
6940 Use sprintf return value instead of invoking strlen on result.
6941 In the old days this wasn't portable, since some sprintf
6942 implementations returned char *. But they died out years ago and
6943 Emacs already assumes sprintf returns int.
6944 Similarly for float_to_string.
6945 This patch speeds up (number-to-string 1000) by 3% on Fedora 15 x86-64.
6946 * ccl.c (ccl_driver):
6947 * character.c (string_escape_byte8):
6948 * data.c (Fnumber_to_string):
6949 * doprnt.c (doprnt):
6950 * print.c (print_object):
6951 * xdisp.c (message_dolog):
6952 * xfns.c (syms_of_xfns):
6953 Use sprintf or float_to_string result to avoid need to call strlen.
6954 * data.c (Fnumber_to_string):
6955 Use make_unibyte_string, since the string must be ASCII.
6956 * lisp.h, print.c (float_to_string): Now returns int length.
6957 * term.c (produce_glyphless_glyph):
6958 Use sprintf result rather than recomputing it.
6960 Clean out last vestiges of the old HAVE_CONFIG_H stuff.
6961 * Makefile.in (ALL_CFLAGS):
6962 * makefile.w32-in (LOCAL_FLAGS): Remove -DHAVE_CONFIG_H.
6963 * gmalloc.c, regex.c: Include <config.h> unconditionally.
6965 2012-06-25 Dmitry Antipov <dmantipov@yandex.ru>
6967 * dispextern.h (xstrcasecmp): Define to library function
6968 strcasecmp if available.
6969 * xfaces.c: Do not use xstrcasecmp if strcasecmp is available.
6971 2012-06-25 Andreas Schwab <schwab@linux-m68k.org>
6973 * keyboard.c (menu_bar_items, menu_bar_item, read_key_sequence):
6974 Avoid comma operator.
6975 * menu.c (push_submenu_start, push_submenu_end)
6976 (push_left_right_boundary, push_menu_pane): Likewise.
6977 * msdos.c (dos_rawgetc): Likewise.
6979 2012-06-25 Dmitry Antipov <dmantipov@yandex.ru>
6981 * xfns.c (xic_create_fontsetname): Remove redundant calls
6984 2012-06-25 Paul Eggert <eggert@cs.ucla.edu>
6986 * gtkutil.c (get_utf8_string): Remove redundant assignment.
6987 sprintf already null-terminates its output.
6989 * xfns.c (x_window): Remove redundant cast.
6991 2012-06-25 Dmitry Antipov <dmantipov@yandex.ru>
6993 * xmenu.c (xmenu_show, xdialog_show): Explicit cast from
6994 `const char *' to `char *' to avoid compiler warning.
6996 2012-06-24 Paul Eggert <eggert@cs.ucla.edu>
6998 * xterm.c (x_term_init): Build proper-sized _XSETTINGS_Snnn string
6999 instead of truncating it to 63 (admittedly a generous limit).
7001 * process.c: Fix spelling and caps in comments.
7003 2012-06-24 Dan Nicolaescu <dann@ics.uci.edu>
7005 * emacs.c (setpgrp): Remove definition, unused.
7006 * sysdep.c (setpgrp): Remove definition, not used in this file.
7008 2012-06-24 Juanma Barranquero <lekktu@gmail.com>
7010 * makefile.w32-in: Update dependencies.
7012 2012-06-24 Eli Zaretskii <eliz@gnu.org>
7014 * makefile.w32-in (TIMESPEC_H): Remove nt/inc/sys/time.h.
7015 (SYSTIME_H): Add nt/inc/sys/time.h.
7017 * systime.h [WINDOWSNT]: Include sys/time.h.
7019 * s/ms-w32.h (struct timespec): Definition moved from
7020 nt/inc/sys/time.h. Suggested by Paul Eggert <eggert@cs.ucla.edu>.
7022 2012-06-24 Paul Eggert <eggert@cs.ucla.edu>
7024 Switch from NO_RETURN to C11's _Noreturn (Bug#11750).
7025 * buffer.h (buffer_slot_type_mismatch):
7026 * data.c (arith_error) [!FORWARD_SIGNAL_TO_MAIN_THREAD]:
7027 * eval.c (unwind_to_catch):
7028 * image.c (my_png_error, my_error_exit):
7029 * keyboard.c (quit_throw_to_read_char, user_error)
7030 (Fexit_recursive_edit, Fabort_recursive_edit):
7031 * lisp.h (die, args_out_of_range, args_out_of_range_3)
7032 (wrong_type_argument, buffer_overflow, __executable_start)
7033 (memory_full, buffer_memory_full, string_overflow, Fthrow)
7034 (xsignal, xsignal0, xsignal1, xsignal2, xsignal3, signal_error)
7035 (error, verror, nsberror, report_file_error, Ftop_level, Fkill_emacs)
7037 (child_setup) [!DOS_NT]:
7038 * lread.c (end_of_file_error, invalid_syntax):
7039 * process.c (send_process_trap) [!FORWARD_SIGNAL_TO_MAIN_THREAD]:
7040 * puresize.h (pure_write_error):
7041 * search.c (matcher_overflow):
7042 * sound.c (sound_perror, alsa_sound_perror):
7043 * sysdep.c, syssignal.h (croak):
7044 * term.c (maybe_fatal, vfatal):
7045 * textprop.c (text_read_only):
7046 * undo.c (user_error):
7047 * unexmacosx.c (unexec_error):
7048 * xterm.c (x_ins_del_lines, x_delete_glyphs):
7049 Use _Noreturn rather than NO_RETURN.
7050 No need for separate decl merely because of _Noreturn.
7051 * sound.c (sound_warning, parse_sound):
7052 Remove unnecessary forward decls.
7054 2012-06-24 Paul Eggert <eggert@cs.ucla.edu>
7056 Fix bug when time_t is unsigned and as wide as intmax_t (Bug#9000).
7057 * lisp.h (WAIT_READING_MAX): New macro.
7058 * dispnew.c (Fsleep_for, sit_for):
7059 * keyboard.c (kbd_buffer_get_event):
7060 * process.c (Faccept_process_output):
7061 Use it to avoid bogus compiler warnings with obsolescent GCC versions.
7062 This improves on the previous patch, which introduced a bug
7063 when time_t is unsigned and as wide as intmax_t.
7064 See <http://bugs.gnu.org/9000#51>.
7066 2012-06-23 Eli Zaretskii <eliz@gnu.org>
7068 * dispnew.c (sit_for, Fsleep_for):
7069 * keyboard.c (kbd_buffer_get_event):
7070 * process.c (Faccept_process_output): Avoid compiler warnings when
7071 comparing a 32-bit time_t with a 64-bit INTMAX_MAX.
7073 2012-06-23 Juanma Barranquero <lekktu@gmail.com>
7075 * makefile.w32-in: Update dependencies.
7077 * w32.c (ltime): Add return type and declare static.
7078 (w32_get_internal_run_time): Remove usused variable `time_100ns'.
7080 2012-06-23 Paul Eggert <eggert@cs.ucla.edu>
7082 * sysdep.c [__FreeBSD__]: Fix more recently-introduced typos.
7083 Privately reported by Herbert J. Skuhra.
7084 (make_lisp_timeval) [__FreeBSD__]: Rename from TIMELIST.
7086 (system_process_attributes) [__FreeBSD__]: Invoke make_lisp_time,
7087 not make_lisp_timeval, when the argument is of type EMACS_TIME.
7089 2012-06-23 Eli Zaretskii <eliz@gnu.org>
7091 * w32proc.c (Fw32_get_locale_info): Fix an off-by-one error in
7092 last argument of make_unibyte_string.
7094 * keyboard.c (kbd_buffer_get_event): Include the codepage and the
7095 language ID in the event parameters.
7097 * w32term.c (w32_read_socket): Put the new keyboard codepage into
7098 event.code, not the obscure "character set ID".
7100 2012-06-23 Chong Yidong <cyd@gnu.org>
7102 * xmenu.c (x_menu_wait_for_event): Adapt GTK3 to new xg_select.
7104 2012-06-23 Eli Zaretskii <eliz@gnu.org>
7106 Fix the MS-Windows build broken by 2012-06-22T21:17:42Z!eggert@cs.ucla.edu.
7107 * w32.c (fdutimens): New function.
7109 * w32proc.c (sys_select): Adapt to change in the EMACS_TIME type.
7111 * s/ms-w32.h (pselect): Redirect to sys_select.
7113 * sysselect.h [WINDOWSNT]: Don't include sys/select.h.
7115 * ralloc.c (r_alloc_inhibit_buffer_relocation): Fix stupid thinko
7116 in the logic of incrementing and decrementing the value of
7117 use_relocatable_buffers.
7119 2012-06-23 Paul Eggert <eggert@cs.ucla.edu>
7121 * sysdep.c [__FreeBSD__]: Fix recently-introduced typos.
7122 Privately reported by Herbert J. Skuhra.
7123 [__FreeBSD__]: Remove "*/" typo after "#include".
7124 (timeval_to_EMACS_TIME) [__FreeBSD__]: New static function.
7125 (TIMEVAL) [__FreeBSD__]: Now a static function rather than a macro.
7126 (TIMEVAL, system_process_attributes) [__FreeBSD__]:
7127 Don't assume EMACS_TIME and struct timeval are the same type.
7129 2012-06-22 Paul Eggert <eggert@cs.ucla.edu>
7131 Support higher-resolution time stamps (Bug#9000).
7132 The time stamps are only nanosecond-resolution at the C level,
7133 since that's the best that any real-world system supports now.
7134 But they are picosecond-resolution at the Lisp level, as that's
7135 easy, and leaves room for future OS improvements.
7137 * Makefile.in (LIB_CLOCK_GETTIME): New macro.
7140 * alloc.c (Fgarbage_collect): Port to higher-res time stamps.
7141 Don't get current time unless it's needed.
7143 * atimer.c: Include <sys/time.h> unconditionally, since gnulib
7144 now provides it if it's absent.
7145 (start_atimer): Port to higher-res time stamps.
7146 Check for time stamp overflow. Don't get current time more
7147 often than is needed.
7149 * buffer.h (struct buffer): Buffer modtime now has high resolution.
7150 Include systime.h, not time.h.
7151 (NONEXISTENT_MODTIME_NSECS, UNKNOWN_MODTIME_NSECS): New macros.
7153 * dired.c: Include stat-time.h.
7154 (Ffile-attributes): File times now have higher resolution.
7156 * dispextern.h [HAVE_WINDOW_SYSTEM]: Include systime.h.
7157 (struct image): Timestamp now has higher resolution.
7159 * dispnew.c (PERIODIC_PREEMPTION_CHECKING): Remove, as Emacs always
7160 has at least microseconds now. All uses removed.
7161 (update_frame, update_single_window, update_window, update_frame_1)
7162 (Fsleep_for, sit_for): Port to higher-resolution time stamps.
7163 (duration_to_sec_usec): Remove; no longer needed.
7165 * editfns.c (time_overflow): Now extern.
7166 (Fcurrent_time, Fget_internal_run_time, make_time, lisp_time_argument)
7167 (float-time, Fformat_time_string, Fcurrent_time_string)
7168 (Fcurrent_time_zone): Accept and generate higher-resolution
7170 (make_time_tail, make_lisp_time, dissassemble_lisp_time)
7171 (decode_time_components, lisp_seconds_argument): New functions.
7172 (make_time): Now static.
7173 (lisp_time_argument): Now returns EMACS_TIME. New arg ppsec.
7174 Report an error if the time is invalid, rather than having the caller
7177 * fileio.c: Include <stat-time.h>
7178 (Fcopy_file): Copy higher-resolution time stamps.
7179 Prefer to set the time stamp via a file descriptor if that works.
7180 (Fset_file_times, Finsert_file_contents, Fwrite_region)
7181 (Fverify_visited_file_modtime, Fclear_visited_file_modtime)
7182 (Fvisited_file_modtime, Fset_visited_file_modtime):
7183 Support higher-resolution time stamps.
7185 * fns.c (Frandom): Use nanoseconds, not microseconds, for seed.
7187 * gtkutil.c (xg_maybe_add_timer): Port to higher-res time stamps.
7189 * image.c (prepare_image_for_display, clear_image_cache)
7190 (lookup_image): Port to higer-resolution time stamps.
7192 * keyboard.c (start_polling, bind_polling_period):
7193 Check for time stamp overflow.
7194 (read_char, kbd_buffer_get_event, timer_start_idle)
7195 (timer_stop_idle, timer_resume_idle, timer_check_2, timer_check)
7196 (Fcurrent_idle_time, init_keyboard, set_waiting_for_input):
7197 Port to higher-resolution time stamps. Do not assume time_t is signed.
7198 (decode_timer): New function. Timers are now vectors of length 9,
7199 not 8, to accommodate the picosecond component.
7200 (timer_check_2): Use it.
7202 * nsterm.m (select_timeout, timeval_subtract): Remove.
7203 (ns_timeout): Use Emacs's facilities for time stamp arithmetic,
7204 as they're a bit more accurate and handle overflow better.
7205 (ns_select): Change prototype to be compatible with pselect.
7206 (ns_select, ns_term_shutdown): Port to ns-resolution time stamps.
7207 * nsterm.h (ns_select): Adjust prototype.
7209 * msdos.c (EMACS_TIME_ZERO_OR_NEG_P): Remove, as it assumes
7210 us-resolution time stamps.
7211 (sys_select): Use the new EMACS_TIME_SIGN macro instead.
7213 * lread.c (read_filtered_event): Port to ns-resolution time stamps.
7215 * lisp.h (time_overflow): New decl.
7216 (wait_reading_process_output): First arg is now intmax_t, not int,
7217 to accommodate larger waits.
7219 * process.h (struct Lisp_Process.read_output_delay):
7220 Now counts nanoseconds, not microseconds.
7221 * process.c (ADAPTIVE_READ_BUFFERING): Don't worry about
7223 (READ_OUTPUT_DELAY_INCREMENT, Faccept_process_output)
7224 (wait_reading_process_output):
7225 Port to ns-resolution time stamps.
7226 (Faccept_process_output, wait_reading_process_output):
7227 Check for time stamp overflow. Do not assume time_t is signed.
7228 (select_wrapper): Remove; we now use pselect.
7229 (Fprocess_attributes): Now generates ns-resolution time stamps.
7231 * sysdep.c: Include utimens.h. Don't include utime.h
7232 or worry about struct utimbuf; gnulib does that for us now.
7233 (gettimeofday): Remove; gnulib provides a substitute.
7234 (make_timeval): New function.
7235 (set_file_times): Now sets ns-resolution time stamps.
7236 New arg FD; all uses changed.
7237 (time_from_jiffies, ltime_from_jiffies, get_up_time)
7238 (system_process_attributes):
7239 Now returns ns-resolution time stamp. All uses changed.
7240 Check for time stamp overflow.
7242 * sysselect.h: Don't depend on HAVE_SYS_SELECT_H; gnulib
7243 provides a substitute now.
7245 * systime.h: Include timespec.h rather than sys/time.h and time.h,
7246 since it guarantees struct timespec.
7247 (EMACS_TIME): Now struct timespec, so that we can support
7248 ns-resolution time stamps.
7249 (EMACS_TIME_RESOLUTION, LOG10_EMACS_TIME_RESOLUTION): New macros.
7250 (EMACS_HAS_USECS): Remove; Emacs always has sub-second time stamps now.
7251 (EMACS_USECS): Remove.
7252 (EMACS_SET_USECS): The underlying time stamp now has ns resolution,
7253 so multiply the arg by 1000 before storing it.
7254 (EMACS_NSECS, EMACS_SECS_ADDR, EMACS_SET_NSECS, EMACS_SET_SECS_NSECS):
7256 (EMACS_GET_TIME, EMACS_ADD_TIME, EMACS_SUB_TIME):
7257 Port to ns-resolution time stamps.
7258 (EMACS_TIME_NEG_P): Remove; replaced by....
7259 (EMACS_TIME_SIGN): New macro.
7260 (EMACS_SET_INVALID_TIME, EMACS_TIME_VALID_P)
7261 (EMACS_TIME_FROM_DOUBLE, EMACS_TIME_TO_DOUBLE): New macros.
7262 (set_file_times, make_time, lisp_time_argument): Adjust signature.
7263 (make_timeval, make_lisp_time, decode_time_components): New decls.
7264 (EMACS_TIME_CMP): Remove; no longer used. Plus, it was buggy, in
7265 that it mishandled time_t overflow. You can't compare by subtracting!
7266 (EMACS_TIME_EQ, EMACS_TIME_NE, EMACS_TIME_GT, EMACS_TIME_GE)
7267 (EMACS_TIME_LT, EMACS_TIME_LE): Rewrite in terms of timespec_cmp.
7269 * term.c: Include <sys/time.h>.
7270 (timeval_to_Time): New function, for proper overflow wraparound.
7271 (term_mouse_position, term_mouse_click): Use it.
7273 * undo.c (record_first_change): Support higher-resolution time stamps
7275 (Fprimitive_undo): Use them when restoring time stamps.
7277 * w32.c (ltime, U64_TO_LISP_TIME, process_times, emacs_gnutls_pull)
7278 (w32_get_internal_run_time):
7279 Port to higher-resolution Emacs time stamps.
7280 (ltime): Now accepts single 64-bit integer, as that's more convenient
7283 * xdisp.c (start_hourglass): Port to ns-resolution time stamps.
7285 * xgselect.c, xgselect.h (xg_select): Add sigmask argument,
7286 for compatibility with pselect. Support ns-resolution time stamps.
7288 * xmenu.c (x_menu_wait_for_event): Support ns-resolution time stamps.
7290 * xselect.c (wait_for_property_change, x_get_foreign_selection):
7291 Check for time stamp overflow, and support ns-resolution time stamps.
7293 * xterm.c: Don't include sys/time.h; gnulib does that for us now.
7294 Don't worry about whether HAVE_TIMEVAL and HAVE_SELECT are set.
7295 (timeval_subtract): Remove; no longer needed.
7296 (XTflash, XTring_bell, x_wait_for_event):
7297 Port to ns-resolution time stamps. Don't assume time_t is signed.
7299 2012-06-22 Chong Yidong <cyd@gnu.org>
7301 * xdisp.c (x_consider_frame_title): Revert last change.
7303 2012-06-22 Eli Zaretskii <eliz@gnu.org>
7305 * alloc.c (NSTATICS): Enlarge to 0x650. Otherwise, Emacs compiled
7306 with -DENABLE_CHECKING -DXASSERTS -DGLYPH_DEBUG=1 -DBYTE_CODE_METER
7307 aborts in staticpro during startup. (Without -DBYTE_CODE_METER,
7308 staticidx goes up to 1597 out of 1600 = 0x640.)
7310 2012-06-20 Paul Eggert <eggert@cs.ucla.edu>
7312 * fileio.c (Fdefault_file_modes): Block input while fiddling with umask.
7313 Otherwise, the umask might be mistakenly 0 while handling input signals.
7315 2012-06-19 Stefan Monnier <monnier@iro.umontreal.ca>
7317 * minibuf.c (Fread_string): Bind minibuffer-completion-table.
7319 2012-06-19 Dmitry Antipov <dmantipov@yandex.ru>
7321 * alloc.c, bytecode.c, ccl.c, coding.c, composite.c, data.c, dosfns.c:
7322 * font.c, image.c, keyboard.c, lread.c, menu.c, minibuf.c, msdos.c:
7323 * print.c, syntax.c, window.c, xmenu.c, xselect.c: Replace direct
7324 access to `contents' member of Lisp_Vector objects with AREF and ASET
7327 2012-06-19 Chong Yidong <cyd@gnu.org>
7329 * frame.c (delete_frame): When selecting a frame on a different
7330 text terminal, do not alter the terminal's top-frame.
7332 * xdisp.c (format_mode_line_unwind_data): Record the target
7333 frame's selected window and its terminal's top-frame.
7334 (unwind_format_mode_line): Restore them.
7335 (x_consider_frame_title, display_mode_line, Fformat_mode_line):
7337 (x_consider_frame_title): Do not condition on HAVE_WINDOW_SYSTEM,
7338 since tty frames can be explicitly named.
7339 (prepare_menu_bars): Likewise.
7341 * term.c (Ftty_top_frame): New function.
7343 2012-06-18 Paul Eggert <eggert@cs.ucla.edu>
7345 Port byte-code-meter to modern targets.
7346 * bytecode.c (METER_CODE) [BYTE_CODE_METER]: Don't assume
7347 !CHECK_LISP_OBJECT_TYPE && !USE_LSB_TAG. Problem with
7348 CHECK_LISP_OBJECT_TYPE reported by Dmitry Antipov in
7349 <http://lists.gnu.org/archive/html/emacs-devel/2012-06/msg00282.html>.
7350 (METER_1, METER_2): Simplify.
7352 2012-06-18 Stefan Monnier <monnier@iro.umontreal.ca>
7354 * data.c (Fdefalias): Return `symbol' (bug#11686).
7356 2012-06-18 Martin Rudalics <rudalics@gmx.at>
7358 * buffer.c (Fkill_buffer): Don't throw an error when the buffer
7359 gets killed during executing of this function (Bug#11665).
7360 Try to always return Qt when the buffer has been actually killed.
7361 (Vkill_buffer_query_functions): In doc-string say that functions
7362 run by this hook should not change the current buffer.
7364 2012-06-18 Paul Eggert <eggert@cs.ucla.edu>
7366 Fix recently-introduced process.c problems found by static checking.
7367 * process.c (write_queue_push, write_queue_pop, send_process):
7368 Use ptrdiff_t, not int or EMACS_INT, for buffer lengths and offsets.
7369 (write_queue_pop): Fix pointer signedness problem.
7370 (send_process): Remove unused local.
7372 2012-06-17 Chong Yidong <cyd@gnu.org>
7374 * xdisp.c (redisplay_internal): No need to redisplay terminal
7375 frames that are not on top.
7377 2012-06-17 Troels Nielsen <bn.troels@gmail.com>
7379 * process.c (make_process): Initialize write_queue.
7380 (write_queue_push, write_queue_pop): New functions.
7381 (send_process): Use them to maintain correct ordering of process
7384 2012-06-17 Paul Eggert <eggert@cs.ucla.edu>
7386 * lisp.h (eassert): Assume C89 or later.
7387 This removes the need for CHECK.
7388 (CHECK): Remove. Its comments about always evaluating its
7389 argument were confusing, as 'eassert' typically does not evaluate
7392 * coding.c (produce_chars): Use ptrdiff_t, not int.
7394 * xterm.c (x_draw_underwave): Check for integer overflow.
7395 This pacifies gcc 4.7.0 -Wunsafe-loop-optimizations on x86-64.
7397 2012-06-17 Jan Djärv <jan.h.d@swipnet.se>
7399 * nsterm.m (x_free_frame_resources): Move xfree so freed memory isn't
7400 referenced (Bug#11583).
7402 2012-06-16 Aurelien Aptel <aurelien.aptel@gmail.com>
7404 Implement wave-style variant of underlining.
7405 * dispextern.h (face_underline_type): New enum.
7406 (face): Add field for underline type.
7407 * nsterm.m (ns_draw_underwave): New function.
7408 (ns_draw_text_decoration): Use it.
7409 * w32term.c (w32_restore_glyph_string_clip, w32_draw_underwave):
7411 (x_draw_glyph_string): Use them.
7412 * xfaces.c (Qline, Qwave): New Lisp objects.
7413 (check_lface_attrs, merge_face_ref)
7414 (Finternal_set_lisp_face_attribute, realize_x_face):
7415 Handle wave-style underline face attributes.
7416 * xterm.c (x_draw_underwave): New function.
7417 (x_draw_glyph_string): Use it.
7419 2012-06-16 Juanma Barranquero <lekktu@gmail.com>
7421 * makefile.w32-in ($(BLD)/emacs.$(O), $(BLD)/fringe.$(O))
7422 ($(BLD)/xml.$(O), $(BLD)/intervals.$(O), $(BLD)/macros.$(O))
7423 ($(BLD)/minibuf.$(O), $(BLD)/regex.$(O), $(BLD)/region-cache.$(O))
7424 ($(BLD)/textprop.$(O), $(BLD)/undo.$(O), $(BLD)/window.$(O))
7425 ($(BLD)/w32select.$(O)): Update dependencies.
7427 2012-06-16 Andreas Schwab <schwab@linux-m68k.org>
7429 * buffer.h (FETCH_MULTIBYTE_CHAR): Define as inline.
7430 (BUF_FETCH_MULTIBYTE_CHAR): Likewise.
7431 * character.c (_fetch_multibyte_char_p): Remove.
7432 * alloc.c: Include "character.h" before "buffer.h".
7434 * buffer.c: Likewise.
7435 * bytecode.c: Likewise.
7436 * callint.c: Likewise.
7437 * callproc.c: Likewise.
7438 * casefiddle.c: Likewise.
7439 * casetab.c: Likewise.
7440 * category.c: Likewise.
7442 * coding.c: Likewise.
7443 * composite.c: Likewise.
7444 * dired.c: Likewise.
7445 * dispnew.c: Likewise.
7447 * dosfns.c: Likewise.
7448 * editfns.c: Likewise.
7449 * emacs.c: Likewise.
7450 * fileio.c: Likewise.
7451 * filelock.c: Likewise.
7453 * fontset.c: Likewise.
7454 * fringe.c: Likewise.
7455 * indent.c: Likewise.
7456 * insdel.c: Likewise.
7457 * intervals.c: Likewise.
7458 * keyboard.c: Likewise.
7459 * keymap.c: Likewise.
7460 * lread.c: Likewise.
7461 * macros.c: Likewise.
7462 * marker.c: Likewise.
7463 * minibuf.c: Likewise.
7464 * nsfns.m: Likewise.
7465 * nsmenu.m: Likewise.
7466 * print.c: Likewise.
7467 * process.c: Likewise.
7468 * regex.c: Likewise.
7469 * region-cache.c: Likewise.
7470 * search.c: Likewise.
7471 * syntax.c: Likewise.
7473 * textprop.c: Likewise.
7475 * unexsol.c: Likewise.
7476 * w16select.c: Likewise.
7477 * w32fns.c: Likewise.
7478 * w32menu.c: Likewise.
7479 * window.c: Likewise.
7480 * xdisp.c: Likewise.
7482 * xmenu.c: Likewise.
7484 * xselect.c: Likewise.
7486 2012-06-16 Eli Zaretskii <eliz@gnu.org>
7488 * xdisp.c (set_cursor_from_row): Don't dereference glyphs_end.
7489 If all the glyphs of the glyph row came from strings, and we have no
7490 cursor positioning clues, put the cursor on the first glyph of the
7492 (handle_face_prop): Use chunk-relative overlay string index when
7493 indexing into it->string_overlays array. (Bug#11653)
7494 (set_cursor_from_row): Use the leftmost glyph as GLYPH_BEFORE, not
7495 the rightmost. (Bug#11720)
7497 2012-06-16 Andreas Schwab <schwab@linux-m68k.org>
7499 * category.h (CHAR_HAS_CATEGORY): Define as inline.
7500 (CATEGORY_MEMBER): Enforce 1/0 value.
7501 * category.c (_temp_category_set): Remove.
7503 2012-06-16 Eli Zaretskii <eliz@gnu.org>
7505 * window.c (Fdelete_other_windows_internal)
7506 (Fdelete_window_internal): Don't access frame's mouse highlight
7507 info of the initial frame. (Bug#11677)
7509 2012-06-14 Paul Eggert <eggert@cs.ucla.edu>
7511 * .gdbinit (xgetint): Fix recently-introduced paren typo.
7512 Assume USE_2_TAGS_FOR_INTS.
7513 (xreload): Adjust $tagmask width to match recent lisp.h change.
7515 Simplify lisp.h in minor ways that should not affect code.
7516 * lisp.h (USE_2_TAGS_FOR_INTS): Remove, as it was always defined.
7517 (LISP_INT_TAG, case_Lisp_Int, LISP_STRING_TAG, LISP_INT_TAG_P)
7518 (LISP_INT1_TAG, enum Lisp_Type, XINT, XUINT, make_number):
7519 Simplify under the assumption that USE_2_TAGS_FOR_INTS is defined.
7520 (INTTYPEBITS): New macro, for clarity.
7521 (INTMASK, MOST_POSITIVE_FIXNUM): Use it.
7522 (LISP_INT1_TAG, LISP_STRING_TAG, LISP_INT_TAG_P):
7523 Simplify now that USE_LSB_TAG is always defined.
7524 (TYPEMASK, XINT) [USE_LSB_TAG]: Remove unnecessary cast.
7525 (make_number) [!USE_LSB_TAG]: Use INTMASK; that's simpler.
7527 2012-06-13 Juanma Barranquero <lekktu@gmail.com>
7529 * makefile.w32-in ($(BLD)/data.$(O)): Update dependencies.
7531 2012-06-13 Glenn Morris <rgm@gnu.org>
7533 * s/bsd-common.h (BSD4_3):
7534 * s/usg5-4-common.h (USG5_4): No longer define; unused.
7536 2012-06-13 Andreas Schwab <schwab@linux-m68k.org>
7538 * lisp.h (Lisp_Object) [CHECK_LISP_OBJECT_TYPE]: Define as struct
7541 (XHASH, XTYPE, XINT, XUINT, make_number, XSET, XPNTR, XUNTAG):
7543 * emacs.c (gdb_use_struct): Rename from gdb_use_union.
7544 * .gdbinit: Check gdb_use_struct instead of gdb_use_union.
7545 * alloc.c (widen_to_Lisp_Object): Remove.
7546 (mark_memory): Use XIL instead of widen_to_Lisp_Object.
7547 * frame.c (delete_frame): Remove outdated comment.
7548 * w32fns.c (Fw32_register_hot_key): Use XLI instead of checking
7549 USE_LISP_UNION_TYPE.
7550 (Fw32_unregister_hot_key): Likewise.
7551 (Fw32_toggle_lock_key): Likewise.
7552 * w32menu.c (add_menu_item): Likewise.
7553 (w32_menu_display_help): Use XIL instead of checking
7554 USE_LISP_UNION_TYPE.
7555 * w32heap.c (allocate_heap): Don't check USE_LISP_UNION_TYPE.
7556 (init_heap): Likewise.
7557 * w32term.c (w32_read_socket): Update comment.
7559 2012-06-13 Glenn Morris <rgm@gnu.org>
7561 * s/usg5-4-common.h, src/s/unixware.h:
7562 Remove define/undef of HAVE_SYSV_SIGPAUSE (not used since 2010-05-04).
7564 * s/gnu.h (POSIX_SIGNALS): Remove (not used since 2010-05-04).
7566 2012-06-13 Paul Eggert <eggert@cs.ucla.edu>
7568 USE_LISP_UNION_TYPE + USE_LSB_TAG cleanup (Bug#11604)
7569 * alloc.c (make_number) [!defined make_number]:
7570 Remove, as lisp.h always defines this now.
7571 (mark_maybe_pointer): Simplify since USE_LSB_TAG is always defined now.
7572 (roundup_size): Verify that it is a power of 2.
7573 * data.c (Fmake_variable_buffer_local, Fmake_local_variable):
7574 * ftfont.c (ftfont_driver): Use LISP_INITIALLY_ZERO.
7575 * lisp.h (USE_LSB_TAG): Allow the builder to compile with
7576 -DUSE_LSB_TAG=0, to override the automatically-selected default.
7577 USE_LSB_TAG now is always defined to be either 0 or 1.
7579 (union Lisp_Object): Don't worry about WORDS_BIGENDIAN; the
7580 code works fine either way, and efficiency is not a concern here,
7581 as the union type is for debugging, not for production.
7582 (LISP_MAKE_RVALUE, make_number) [USE_LISP_UNION_TYPE]:
7583 Use an inline function on all platforms when using the union type,
7584 since this is simpler and 'static inline' can be used portably
7586 (LISP_INITIALLY_ZERO): New macro.
7587 (XFASTINT, XSETFASTINT) [USE_LISP_UNION_TYPE]: Remove.
7588 (XSET) [USE_LISP_UNION_TYPE]: Don't overparenthesize.
7590 2012-06-12 Glenn Morris <rgm@gnu.org>
7592 * s/gnu-kfreebsd.h, s/hpux11.h, s/openbsd.h, s/sol2-10.h: Remove files.
7594 * s/gnu-linux.h (HAVE_PROCFS): Move to configure.
7596 * s/hpux10-20.h, s/openbsd.h, s/usg5-4-common.h:
7597 Move BROKEN_SIGIO to configure.
7599 * s/bsd-common.h, s/darwin.h, s/gnu-kfreebsd.h, s/hpux10-20.h:
7600 Move NO_TERMIO to configure.
7602 2012-06-12 Chong Yidong <cyd@gnu.org>
7604 * image.c (imagemagick_load_image): Use MagickFlattenImage if
7605 MagickMergeImageLayers is undefined. Use pixel pusher loop if
7606 MagickExportImagePixels is undefined.
7608 2012-06-12 Paul Eggert <eggert@cs.ucla.edu>
7610 * image.c (imagemagick_load_image): Remove unused label.
7612 2012-06-11 Glenn Morris <rgm@gnu.org>
7614 * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/darwin.h:
7615 * s/gnu-kfreebsd.h, s/gnu-linux.h, s/gnu.h, s/hpux10-20.h:
7616 * s/irix6-5.h, s/ms-w32.h, s/msdos.h, s/template.h:
7617 * s/usg5-4-common.h: Move SYSTEM_TYPE to configure.
7619 2012-06-11 Stefan Monnier <monnier@iro.umontreal.ca>
7621 * alloc.c (make_byte_code): New function.
7622 (Fmake_byte_code): Use it. Don't purify here.
7623 * lread.c (read1): Use it as well to avoid extra allocation.
7625 2012-06-11 Chong Yidong <cyd@gnu.org>
7627 * image.c (imagemagick_load_image): Implement transparency.
7629 2012-06-10 Andreas Schwab <schwab@linux-m68k.org>
7631 * regex.c (at_begline_loc_p): Also recognize `(?N:' and correctly
7632 account for preceding backslashes. (Bug#11663)
7634 2012-06-09 Chong Yidong <cyd@gnu.org>
7636 * term.c: Support italics in capable terminals (Bug#9652).
7637 (no_color_bit): Replace unused NC_BLINK with NC_ITALIC.
7638 (turn_on_face): Output using TS_enter_italic_mode if available.
7639 Don't handle unused blinking and alt-charset cases.
7640 (turn_off_face): Handle italic case; discard unused tty_blinking_p
7641 and tty_alt_charset_p cases.
7642 (tty_capable_p, init_tty): Support italics.
7644 * termchar.h (struct tty_display_info): Add field for italics.
7645 Remove unused blink field.
7647 * xfaces.c (tty_supports_face_attributes_p, realize_tty_face):
7650 * dispextern.h: Replace unused TTY_CAP_BLINK with TTY_CAP_ITALIC.
7651 (struct face): Remove unused fields tty_dim_p, tty_blinking_p, and
7652 tty_alt_charset_p. Add tty_italic_p.
7654 2012-06-09 Michael Albinus <michael.albinus@gmx.de>
7656 * dbusbind.c (XD_BASIC_DBUS_TYPE): Use dbus_type_is_valid and
7657 dbus_type_is_basic if available.
7658 (xd_extract_signed, xd_extract_unsigned): Rename from
7659 extract_signed and extract_unsigned, respectively. Adapt callers.
7661 2012-06-09 Chong Yidong <cyd@gnu.org>
7663 * xfaces.c (face_for_overlay_string): Handle face remapping (Bug#2066).
7665 * fringe.c (Fset_fringe_bitmap_face): Handle the noninteractive
7668 2012-06-08 Paul Eggert <eggert@cs.ucla.edu>
7670 * xdisp.c (vmessage): Treat frame message as multibyte.
7671 Without this change, (let ((§ 1)) (make-variable-buffer-local '§))
7672 would generate the diagnostic "Making \302\247 buffer-local while
7675 2012-06-08 Eli Zaretskii <eliz@gnu.org>
7677 * dispnew.c (showing_window_margins_p): Undo last change, which
7678 was done due to an inadvertent commit.
7679 (adjust_frame_glyphs_for_frame_redisplay): Do call
7680 showing_window_margins_p.
7682 2012-06-08 Stefan Monnier <monnier@iro.umontreal.ca>
7684 * eval.c (Fmake_var_non_special): New primitive.
7685 (syms_of_eval): Defsubr it.
7686 * lread.c (syms_of_lread): Mark `values' as lexically scoped.
7688 2012-06-08 Juanma Barranquero <lekktu@gmail.com>
7690 * dispnew.c (showing_window_margins_p): Wrap in #if 0 to prevent unused
7691 function warning (the only call is inside #if 0 since 2012-06-08T08:44:45Z!eliz@gnu.org).
7693 2012-06-08 Eli Zaretskii <eliz@gnu.org>
7695 * alloc.c (allocate_vectorlike): Fix last change.
7697 2012-06-08 Dmitry Antipov <dmantipov@yandex.ru>
7699 Block-based vector allocation of small vectors.
7700 * lisp.h (struct vectorlike_header): New field `nbytes',
7701 adjust comment accordingly.
7702 * alloc.c (enum mem_type): New type `MEM_TYPE_VECTOR_BLOCK'
7703 to denote vector blocks. Adjust users (live_vector_p,
7704 mark_maybe_pointer, valid_lisp_object_p) accordingly.
7705 (COMMON_MULTIPLE): Move outside #if USE_LSB_TAG.
7706 (VECTOR_BLOCK_SIZE, vroundup, VECTOR_BLOCK_BYTES),
7707 (VBLOCK_BYTES_MIN, VBLOCK_BYTES_MAX, VECTOR_MAX_FREE_LIST_INDEX),
7708 (VECTOR_FREE_LIST_FLAG, ADVANCE, VINDEX, SETUP_ON_FREE_LIST),
7709 (VECTOR_SIZE, VECTOR_IN_BLOCK): New macros.
7710 (roundup_size): New constant.
7711 (struct vector_block): New data type.
7712 (vector_blocks, vector_free_lists, zero_vector): New variables.
7713 (all_vectors): Rename to `large_vectors'.
7714 (allocate_vector_from_block, init_vectors, allocate_vector_from_block)
7715 (sweep_vectors): New functions.
7716 (allocate_vectorlike): Return `zero_vector' as the only vector of
7717 0 items. Allocate new vector from block if vector size is less than
7718 or equal to VBLOCK_BYTES_MAX.
7719 (Fgarbage_collect): Move all vector sweeping code to sweep_vectors.
7720 (init_alloc_once): Add call to init_vectors.
7722 2012-06-08 Stefan Monnier <monnier@iro.umontreal.ca>
7724 * eval.c (Fmacroexpand): Stop if the macro returns the same form.
7726 2012-06-07 Paul Eggert <eggert@cs.ucla.edu>
7728 * doprnt.c (doprnt): Truncate multibyte char correctly.
7729 Without this change, doprnt (buf, 2, "%s", FORMAT_END, AP)
7730 would mishandle a string argument "Xc" if X was a multibyte
7731 character of length 2: it would truncate after X's first byte
7732 rather than including all of X.
7734 2012-06-06 Chong Yidong <cyd@gnu.org>
7736 * buffer.c (word_wrap): Doc fix.
7738 2012-06-04 Paul Eggert <eggert@cs.ucla.edu>
7740 * xdisp.c (note_mode_line_or_margin_highlight): Pacify gcc -Wall.
7742 2012-06-03 Glenn Morris <rgm@gnu.org>
7744 * xdisp.c (tool-bar-style): Doc fix.
7746 2012-06-03 Ulrich Müller <ulm@gentoo.org>
7748 * Makefile.in (PAXCTL): Define.
7749 (temacs$(EXEEXT)): Disable memory randomization for the temacs
7750 binary via PaX flags if the paxctl utility is available.
7751 (emacs$(EXEEXT), bootstrap-emacs$(EXEEXT)):
7752 Restore PaX flags to their default. (Bug#11398)
7754 2012-06-03 Chong Yidong <cyd@gnu.org>
7756 * xdisp.c (decode_mode_spec_coding): Display a space for a unibyte
7759 2012-06-03 Chong Yidong <cyd@gnu.org>
7761 * xdisp.c (calc_pixel_width_or_height): Use Fbuffer_local_value.
7762 (note_mode_line_or_margin_highlight): If there is no help echo,
7763 use mode-line-default-help-echo. Handle the case where the mouse
7764 position is past the end of the mode line string.
7766 * buffer.c (buffer_local_value_1): New function, split from
7767 Fbuffer_local_value; can return Qunbound.
7768 (Fbuffer_local_value): Use it.
7769 (Vmode_line_format): Docstring tweaks.
7771 2012-06-02 Paul Eggert <eggert@cs.ucla.edu>
7773 * sysdep.c (system_process_attributes): Improve comment.
7775 2012-06-02 Stefan Monnier <monnier@iro.umontreal.ca>
7777 * keyboard.c: Export real-this-command to Elisp.
7778 (syms_of_keyboard): Rename real_this_command to Vreal_this_command
7779 and DEFVAR it. Update all users.
7781 2012-06-02 Paul Eggert <eggert@cs.ucla.edu>
7783 * minibuf.c (Fassoc_string): Remove duplicate declaration.
7785 * sysdep.c (system_process_attributes) [SOLARIS2 && HAVE_PROCFS]:
7786 Convert pctcpu and pctmem to Lisp float properly.
7787 Let the compiler fold better, as 100.0/0x8000 is exact.
7789 2012-06-02 Andreas Schwab <schwab@linux-m68k.org>
7791 * alloc.c (CONS_BLOCK_SIZE): Account for padding at the end of
7794 2012-06-01 Paul Eggert <eggert@cs.ucla.edu>
7796 * xfns.c (x_set_tool_bar_lines) [USE_GTK]: Adjust to bitfield change.
7798 2012-06-01 Dmitry Antipov <dmantipov@yandex.ru>
7800 For a 'struct window', replace some Lisp_Object fields to
7801 bitfields where appropriate, remove unused fields.
7802 * window.h (struct window): Remove unused 'last_mark_x' and
7803 'last_mark_y' fields. Rename 'mini_p' field to 'mini',
7804 change its type from Lisp_Object to bitfield.
7805 Change type of 'force_start', 'optional_new_start',
7806 'last_had_star', 'update_mode_line' and 'start_at_line_beg'
7807 fields from Lisp_Object to bitfield. Adjust users accordingly.
7809 2012-05-31 Paul Eggert <eggert@cs.ucla.edu>
7811 Pacify gcc -Wdouble-precision when using Xaw.
7812 * xterm.c (xaw_jump_callback, x_set_toolkit_scroll_bar_thumb)
7813 [HAVE_X_WINDOWS && USE_TOOLKIT_SCROLL_BARS && !USE_MOTIF && !USE_GTK]:
7814 Use 'float' consistently, rather than 'float' in most places
7815 and 'double' in a couple of places.
7817 2012-05-31 Eli Zaretskii <eliz@gnu.org>
7819 * xdisp.c (handle_stop): Detect whether we have overlay strings
7820 loaded by testing it->current.overlay_string_index to be
7821 non-negative, instead of checking whether n_overlay_strings is
7822 positive. (Bug#11587)
7824 2012-05-31 Chong Yidong <cyd@gnu.org>
7826 * keymap.c (describe_map_tree): Revert 2011-07-07 change (Bug#1169).
7828 * doc.c (Fsubstitute_command_keys): Doc fix.
7830 2012-05-31 Eli Zaretskii <eliz@gnu.org>
7832 * search.c (search_buffer): Remove calls to
7833 r_alloc_inhibit_buffer_relocation, as it is now called by
7834 maybe_unify_char, which was the cause of relocation of buffer text
7837 2012-05-31 Eli Zaretskii <eliz@gnu.org>
7839 * charset.c (maybe_unify_char): Inhibit relocation of buffer text
7840 for the duration of call to load_charset, to avoid problems with
7841 callers of maybe_unify_char that access buffer text through C
7844 * ralloc.c (r_alloc_inhibit_buffer_relocation): Increment and
7845 decrement the inhibition flag, instead of just setting or
7848 2012-05-31 Paul Eggert <eggert@cs.ucla.edu>
7850 Remove obsolete '#define static' cruft.
7851 * s/hpux10-20.h (_FILE_OFFSET_BITS): Don't #undef.
7852 This #undef was "temporary" in 2000; it is no longer needed
7853 now that '#define static' has gone away.
7854 * xfns.c, xterm.h (gray_bitmap_width, gray_bitmap_height)
7855 (gray_bitmap_bits): Remove; no longer needed.
7856 All uses replaced with definiens.
7857 * xterm.c: Include "bitmaps/gray.xbm".
7859 2012-05-30 Paul Eggert <eggert@cs.ucla.edu>
7861 Clean up __executable_start, monstartup when --enable-profiling.
7862 The following changes affect the code only when profiling.
7863 * dispnew.c (__executable_start): Rename from safe_bcopy.
7864 Define only on platforms that need it.
7865 * emacs.c: Include <sys/gmon.h> when profiling.
7866 (_mcleanup): Remove decl, since <sys/gmon.h> does it now.
7867 (__executable_start): Remove decl, since lisp.h does it now.
7868 (safe_bcopy): Remove decl; no longer has that name.
7869 (main): Coalesce #if into single bit of code, for simplicity.
7870 Cast pointers to uintptr_t, since standard libraries want integers
7872 * lisp.h (__executable_start): New decl.
7874 2012-05-31 Glenn Morris <rgm@gnu.org>
7876 * image.c (Fimagemagick_types): Doc fix.
7878 2012-05-30 Jim Meyering <meyering@redhat.com>
7880 * callproc.c (Fcall_process_region): Include directory component
7881 in mkstemp error message (Bug#11586).
7883 2012-05-30 Paul Eggert <eggert@cs.ucla.edu>
7885 * alloc.c, lisp.h (make_pure_vector): Now static.
7887 2012-05-30 Stefan Monnier <monnier@iro.umontreal.ca>
7889 * eval.c (Fdefun, Fdefmacro, Vmacro_declaration_function):
7890 Move to byte-run.el.
7891 (Fautoload): Do the hash-doc more carefully.
7892 * data.c (Fdefalias): Purify definition, except for keymaps.
7893 (Qdefun): Move from eval.c.
7894 * lisp.h (Qdefun): Remove.
7895 * lread.c (read1): Tiny simplification.
7897 2012-05-29 Troels Nielsen <bn.troels@gmail.com>
7899 Do not create empty overlays with the evaporate property (Bug#9642).
7900 * buffer.c (Fmove_overlay): Reinstate the earlier fix for
7901 Bug#9642, but explicitly check that the buffer the overlay would
7902 be moved to is live and rearrange lines to make sure that errors
7903 will not put the overlay in an inconsistent state.
7904 (Fdelete_overlay): Cosmetics.
7906 2012-05-28 Eli Zaretskii <eliz@gnu.org>
7908 * w32term.c (my_bring_window_to_top): New function.
7909 (x_raise_frame): Use handle returned by DeferWindowPos, which
7910 could be different from the original one.
7911 Call my_bring_window_to_top instead of my_set_foreground_window.
7914 * w32fns.c (w32_wnd_proc): Accept and process WM_EMACS_BRINGTOTOP
7915 by calling BringWindowToTop.
7917 * w32term.h (WM_EMACS_BRINGTOTOP): New message.
7918 (WM_EMACS_END): Increase by one.
7920 2012-05-28 Paul Eggert <eggert@cs.ucla.edu>
7922 * bidi.c (bidi_mirror_char): Put eassert before conversion to int.
7923 This avoids undefined behavior that might cause the eassert
7924 to not catch an out-of-range value.
7926 2012-05-28 Juanma Barranquero <lekktu@gmail.com>
7928 * makefile.w32-in ($(BLD)/w32inevt.$(O), $(BLD)/w32console.$(O)):
7929 Update dependencies.
7931 2012-05-27 Eli Zaretskii <eliz@gnu.org>
7933 * bidi.c (bidi_mirror_char): Fix last change.
7935 2012-05-27 Andreas Schwab <schwab@linux-m68k.org>
7937 * unexmacosx.c (copy_data_segment): Truncate after 16 characters
7938 when referring to sectname field in printf format.
7940 2012-05-27 Paul Eggert <eggert@cs.ucla.edu>
7942 * lisp.h [REL_ALLOC]: Omit duplicate prototypes.
7943 Only r_alloc_inhibit_buffer_relocation needed to be added;
7944 the others were already declared.
7946 * bidi.c (bidi_mirror_char): Don't possibly truncate the integer
7947 before checking whether it's out of range. Put the check inside
7949 <http://lists.gnu.org/archive/html/emacs-devel/2012-05/msg00485.html>.
7951 2012-05-27 Ken Brown <kbrown@cornell.edu>
7953 * callproc.c (Fcall_process): Restore a line that was accidentally
7954 commented out in the 2011-02-13 change (bug#11547).
7956 2012-05-27 Eli Zaretskii <eliz@gnu.org>
7958 * lisp.h [REL_ALLOC]: Add prototypes for external functions
7959 defined on ralloc.c.
7961 * buffer.c [REL_ALLOC]: Remove prototypes of
7962 r_alloc_reset_variable, r_alloc, r_re_alloc, and r_alloc_free,
7963 they are now on lisp.h.
7965 * ralloc.c (r_alloc_inhibit_buffer_relocation): New function.
7967 * search.c (search_buffer): Use it to inhibit relocation of buffer
7968 text while re_search_2 is doing its job, because re_search_2 is
7969 passed C pointers to buffer text. (Bug#11519)
7971 * msdos.c (internal_terminal_init) <Vwindow_system_version>:
7974 * xdisp.c (move_it_to): Under MOVE_TO_Y, when restoring iterator
7975 state after an additional call to move_it_in_display_line_to, keep
7976 the values of it->max_ascent and it->max_descent found for the
7978 (pos_visible_p): Revert the comparison against bottom_y to what it
7979 was in revid eliz@gnu.org-20120513182235-4p6386j761ld0nwb.
7982 2012-05-26 Paul Eggert <eggert@cs.ucla.edu>
7984 Fix coding-related core dumps with gcc -ftrapv.
7985 The code was computing A - B, where A and B are pointers, and B is
7986 random garbage. This can lead to core dumps on platforms that
7987 have special pointer registers, and it also leads to core dumps on
7988 x86-64 when compiled with gcc -ftrapv. The fix is to compute
7989 A - B only when B is initialized properly.
7990 * coding.c (coding_set_source, coding_set_destination): Return void.
7991 (coding_change_source, coding_change_destinations): New functions,
7992 with the old behaviors of coding_set_source and coding_set_destination.
7993 All callers that need an offset changed to use these new functions.
7995 2012-05-26 Glenn Morris <rgm@gnu.org>
7997 * nsterm.m (ns_init_paths): Don't mess with INFOPATH. (Bug#2791)
7999 2012-05-26 Eli Zaretskii <eliz@gnu.org>
8001 Extend mouse support on W32 text-mode console.
8002 * xdisp.c (draw_row_with_mouse_face):
8003 Call tty_draw_row_with_mouse_face for WINDOWSNT as well.
8005 * w32console.c: Include window.h.
8006 (w32con_write_glyphs_with_face, tty_draw_row_with_mouse_face):
8008 (initialize_w32_display): Initialize mouse-highlight data.
8010 * w32inevt.c: Include termchar.h and window.h.
8011 (do_mouse_event): Support mouse-autoselect-window. When the mouse
8012 moves, call note_mouse_highlight. If help_echo changed, call
8013 gen_help_event to produce help-echo message in the echo area.
8014 Call clear_mouse_face if mouse_face_hidden is set in the mouse
8017 2012-05-26 Paul Eggert <eggert@cs.ucla.edu>
8019 * lread.c (read1): Simplify slightly to avoid an overflow warning
8020 with GCC 4.7.0 on x86-64.
8022 2012-05-26 Eli Zaretskii <eliz@gnu.org>
8024 * bidi.c (bidi_mirror_char): Revert last change: an int is
8025 definitely wide enough here.
8027 2012-05-25 Paul Eggert <eggert@cs.ucla.edu>
8029 Fix integer width and related bugs (Bug#9874).
8030 * alloc.c (pure_bytes_used_lisp, pure_bytes_used_non_lisp):
8031 (allocate_vectorlike, buffer_memory_full, struct sdata, SDATA_SIZE)
8032 (string_bytes, check_sblock, allocate_string_data):
8033 (compact_small_strings, Fmake_bool_vector, make_string)
8034 (make_unibyte_string, make_multibyte_string)
8035 (make_string_from_bytes, make_specified_string)
8036 (allocate_vectorlike, Fmake_vector, find_string_data_in_pure)
8037 (make_pure_string, make_pure_c_string, make_pure_vector, Fpurecopy)
8039 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8040 (allocate_pseudovector):
8041 Use int, not EMACS_INT, where int is wide enough.
8042 (inhibit_garbage_collection, Fgarbage_collect):
8043 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8044 * bidi.c (bidi_mirror_char): Use EMACS_INT, not int, where
8045 int might not be wide enough.
8046 (bidi_cache_search, bidi_cache_find, bidi_init_it)
8047 (bidi_count_bytes, bidi_char_at_pos, bidi_fetch_char)
8048 (bidi_at_paragraph_end, bidi_find_paragraph_start)
8049 (bidi_paragraph_init, bidi_resolve_explicit, bidi_resolve_weak)
8050 (bidi_level_of_next_char, bidi_move_to_visually_next):
8051 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8052 * buffer.c (copy_overlays, Fgenerate_new_buffer_name)
8053 (Fkill_buffer, Fset_buffer_major_mode)
8054 (advance_to_char_boundary, Fbuffer_swap_text)
8055 (Fset_buffer_multibyte, overlays_at, overlays_in)
8056 (overlay_touches_p, struct sortvec, record_overlay_string)
8057 (overlay_strings, recenter_overlay_lists)
8058 (adjust_overlays_for_insert, adjust_overlays_for_delete)
8059 (fix_start_end_in_overlays, fix_overlays_before, modify_overlay)
8060 (Fmove_overlay, Fnext_overlay_change, Fprevious_overlay_change)
8061 (Foverlay_recenter, last_overlay_modification_hooks_used)
8062 (report_overlay_modification, evaporate_overlays, enlarge_buffer_text):
8063 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8064 (validate_region): Omit unnecessary test for b <= e,
8065 since that's guaranteed by the previous test.
8066 (adjust_overlays_for_delete): Avoid pos + length overflow.
8067 (Fmove_overlay, Fdelete_overlay, add_overlay_mod_hooklist)
8068 (report_overlay_modification):
8069 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8070 (Foverlays_at, Fnext_overlay_change, Fprevious_overlay_change):
8071 Omit pointer cast, which isn't needed anyway, and doesn't work
8072 after the EMACS_INT -> ptrdiff_t change.
8073 (Fmove_overlay): Clip BEG and END to ptrdiff_t to avoid overflow.
8074 * buffer.h: Adjust decls to match defn changes elsewhere.
8075 (struct buffer_text, struct buffer):
8076 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8077 Use EMACS_INT, not int, where int might not be wide enough.
8078 * bytecode.c (unmark_byte_stack, exec_byte_code): Use ptrdiff_t,
8079 not int, to avoid needless 32-bit limit on 64-bit hosts.
8080 (exec_byte_code): Use tighter memory-full test, one that checks
8081 for alloca overflow. Don't compute the address of the object just
8082 before an array, as that's not portable. Use EMACS_INT, not
8083 ptrdiff_t or int, where ptrdiff_t or int might not be wide enough.
8084 * callint.c (Fcall_interactively):
8085 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8086 * callproc.c (call_process_kill, Fcall_process):
8087 Don't assume pid_t fits into an Emacs fixnum.
8088 (call_process_cleanup, Fcall_process, child_setup):
8089 Don't assume pid_t fits into int.
8090 (call_process_cleanup, Fcall_process, delete_temp_file)
8091 (Fcall_process_region):
8092 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8093 (Fcall_process): Simplify handling of volatile integers.
8094 Use int, not EMACS_INT, where int will do.
8095 * casefiddle.c (casify_object, casify_region, operate_on_word)
8096 (Fupcase_word, Fdowncase_word, Fcapitalize_word):
8097 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8098 (casify_object): Avoid integer overflow when overallocating buffer.
8099 * casetab.c (set_identity, shuffle): Prefer int to unsigned when
8100 either works. Use lint_assume to convince GCC 4.6.1 that it's OK.
8101 * category.c (Fchar_category_set): Don't assume fixnum fits in int.
8102 * category.h (CATEGORYP): Don't assume arg is nonnegative.
8103 * ccl.c (GET_CCL_INT): Remove; no longer needed, since the
8104 integers are now checked earlier. All uses replaced with XINT.
8106 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8107 For CCL_MapSingle, check that content and value are in int range.
8108 (ccl_driver, Fregister_code_conversion_map):
8109 Check that Vcode_version_map_vector is a vector.
8110 (resolve_symbol_ccl_program): Check that vector header is in range.
8111 Always copy the vector, so that we can check its contents reliably
8112 now rather than having to recheck each instruction as it's being
8113 executed. Check that vector words fit in 'int'.
8114 (ccl_get_compiled_code, Fregister_ccl_program)
8115 (Fregister_code_conversion_map): Use ptrdiff_t, not int, for
8116 program indexes, to avoid needless 32-bit limit on 64-bit hosts.
8117 (Fccl_execute, Fccl_execute_on_string): Check that initial reg
8118 contents are in range.
8119 (Fccl_execute_on_string): Check that status is in range.
8120 * ccl.h (struct ccl_program.idx): Now ptrdiff_t, not int.
8121 * character.c (char_resolve_modifier_mask, Fchar_resolve_modifiers):
8122 Accept and return EMACS_INT, not int, because callers can pass values
8124 (c_string_width, strwidth, lisp_string_width, chars_in_text)
8125 (multibyte_chars_in_text, parse_str_as_multibyte)
8126 (str_as_multibyte, count_size_as_multibyte, str_to_multibyte)
8127 (str_as_unibyte, str_to_unibyte, string_count_byte8)
8128 (string_escape_byte8, Fget_byte):
8129 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8130 (Funibyte_string): Use CHECK_RANGED_INTEGER, not CHECK_NATNUM, to
8131 avoid mishandling large integers.
8132 * character.h: Adjust decls to match defn changes elsewhere.
8133 * charset.c (load_charset_map_from_file, find_charsets_in_text)
8134 (Ffind_charset_region):
8135 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8136 (load_charset_map_from_file): Redo idx calculation to avoid overflow.
8137 (load_charset_map_from_vector, Fdefine_charset_internal):
8138 Don't assume fixnum fits in int.
8139 (load_charset_map_from_vector, Fmap_charset_chars):
8140 Remove now-unnecessary CHECK_NATNUMs.
8141 (Fdefine_charset_internal): Check ranges here, more carefully.
8142 Don't rely on undefined behavior with signed left shift overflow.
8143 Don't assume unsigned int fits into fixnum, or that fixnum fits
8144 into unsigned int. Don't require max_code to be a valid fixnum;
8145 that's not true for gb10830 4-byte on a 32-bit host. Allow
8146 invalid_code to be a cons, for the same reason. Require code_offset
8147 to be a character. Avoid int overflow if max_char is close
8149 (CODE_POINT_TO_INDEX): On 32-bit hosts, return int, not unsigned;
8150 this is intended anyway and avoids some undefined behavior.
8151 (load_charset_map): Pass unsigned, not int, as 2nd arg of
8152 INDEX_TO_CODE_POINT, as that's what it expects.
8153 (Funify_charset, encode_char): Don't stuff unsigned vals into int vars.
8154 * charset.h (DECODE_CHAR): Return int, not unsigned;
8155 this is what was intended anyway, and it avoids undefined behavior.
8156 (CHARSET_OFFSET): Remove unused macro, instead of fixing its
8157 integer-overflow issues.
8158 (ENCODE_CHAR): Return unsigned on all hosts, not just on 32-bit hosts.
8159 Formerly, it returned EMACS_INT on 64-bit hosts in the common case
8160 where the argument is EMACS_INT, and this behavior is not intended.
8161 * chartab.c (Fmake_char_table, Fset_char_table_range)
8162 (uniprop_get_decoder, uniprop_get_encoder):
8163 Don't assume fixnum fits in int.
8164 * cmds.c (move_point): New function, that does the gist of
8165 Fforward_char and Fbackward_char, but does so while checking
8166 for integer overflow more accurately.
8167 (Fforward_char, Fbackward_char): Use it.
8168 (Fforward_line, Fend_of_line, internal_self_insert)
8169 (internal_self_insert):
8170 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8171 Fix a FIXME, by checking for integer overflow when calculating
8172 target_clm and actual_clm.
8173 * coding.c (detect_coding_XXX, encode_coding_XXX, CODING_DECODE_CHAR)
8174 (CODING_ENCODE_CHAR, CODING_CHAR_CHARSET, CODING_CHAR_CHARSET_P)
8175 (ASSURE_DESTINATION, coding_alloc_by_realloc)
8176 (coding_alloc_by_making_gap, alloc_destination)
8177 (detect_coding_utf_8, encode_coding_utf_8, decode_coding_utf_16)
8178 (encode_coding_utf_16, detect_coding_emacs_mule)
8179 (decode_coding_emacs_mule, encode_coding_emacs_mule)
8180 (detect_coding_iso_2022, decode_coding_iso_2022)
8181 (encode_invocation_designation, encode_designation_at_bol)
8182 (encode_coding_iso_2022, detect_coding_sjis, detect_coding_big5)
8183 (decode_coding_sjis, decode_coding_big5, encode_coding_sjis)
8184 (encode_coding_big5, detect_coding_ccl, decode_coding_ccl)
8185 (encode_coding_ccl, encode_coding_raw_text)
8186 (detect_coding_charset, decode_coding_charset)
8187 (encode_coding_charset, detect_eol, decode_eol, produce_chars)
8188 (produce_composition, produce_charset, produce_annotation)
8189 (decode_coding, handle_composition_annotation)
8190 (handle_charset_annotation, consume_chars, decode_coding_gap)
8191 (decode_coding_object, encode_coding_object, detect_coding_system)
8192 (Ffind_coding_systems_region_internal, Fcheck_coding_systems_region)
8193 (code_convert_region, code_convert_string)
8194 (Fdefine_coding_system_internal)
8195 (coding_set_source, coding_set_destination):
8196 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8197 (setup_iso_safe_charsets, consume_chars, Funencodable_char_position)
8198 (Fdefine_coding_system_internal):
8199 Don't assume fixnums fit in int.
8200 (decode_coding_gap, decode_coding_object, encode_coding_object)
8201 (Fread_coding_system, Fdetect_coding_region)
8202 (Funencodable_char_position, Fcheck_coding_systems_region)
8203 (get_translation, handle_composition_annotation, consume_chars):
8204 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8205 (consume_chars): Rewrite to not calculate an address outside buffer.
8206 (Ffind_operation_coding_system): NATNUMP can eval its arg twice.
8207 Don't access memory outside of the args array.
8208 (Fdefine_coding_system_internal): Check for charset-id overflow.
8209 (ENCODE_ISO_CHARACTER): Use unsigned, not int, to store the unsigned
8210 result of ENCODE_CHAR.
8211 * coding.h: Adjust decls to match defn changes elsewhere.
8212 (struct coding_system):
8213 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8214 * composite.c (get_composition_id, find_composition)
8215 (run_composition_function, update_compositions)
8216 (compose_text, composition_gstring_put_cache)
8217 (composition_gstring_p, composition_gstring_width)
8218 (fill_gstring_header, fill_gstring_body, autocmp_chars)
8219 (composition_compute_stop_pos, composition_reseat_it)
8220 (composition_update_it, struct position_record)
8221 (find_automatic_composition, composition_adjust_point)
8222 (Fcomposition_get_gstring, Ffind_composition_internal):
8223 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8224 (update_compositions):
8225 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8226 * composite.h: Adjust decls to match defn changes elsewhere.
8227 (struct composition):
8228 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8229 * data.c (let_shadows_buffer_binding_p, let_shadows_global_binding_p):
8230 Do not attempt to compute the address of the object just before a
8231 buffer; this is not portable.
8233 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8234 (Faset): Use int, not EMACS_INT, where int is wide enough.
8235 (Fstring_to_number): Don't assume fixnums fit in int.
8236 (Frem): Don't assume arg is nonnegative.
8237 * dbusbind.c (xd_append_arg): Check for integers out of range.
8238 (Fdbus_call_method): Don't overflow the timeout int.
8239 (extract_signed, extract_unsigned): New functions.
8240 (XD_CHECK_DBUS_SERIAL): Remove; superseded by extract_unsigned.
8241 (xd_get_connection_references): Return ptrdiff_t, not int.
8243 (xd_signature, xd_append_arg, xd_retrieve_arg, Fdbus_message_internal)
8244 (xd_read_message_1):
8245 Use int, not unsigned, where the dbus API uses int.
8246 (Fdbus_message_internal): Don't overflow mtype.
8247 (syms_of_dbusbind): Allocate right-sized buffer for integers.
8248 * dired.c (directory_files_internal, file_name_completion, scmp)
8249 (file_name_completion_stat):
8250 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8251 (file_name_completion): Don't overflow matchcount.
8252 (file_name_completion_stat): Use SAFE_ALLOCA, not alloca.
8253 * dispextern.h: Adjust decls to match defn changes elsewhere.
8254 (struct text_pos, struct glyph, struct bidi_saved_info)
8255 (struct bidi_string_data, struct bidi_it, struct composition_it)
8257 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8258 (struct display_pos, struct composition_it, struct it):
8259 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8260 * dispnew.c (increment_matrix_positions)
8261 (increment_row_positions, mode_line_string)
8262 (marginal_area_string):
8263 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8264 (change_frame_size_1, Fredisplay, Fframe_or_buffer_changed_p):
8265 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8266 (duration_to_sec_usec): New function, to check for overflow better.
8267 (Fsleep_for, sit_for): Use it.
8268 * doc.c (get_doc_string, store_function_docstring):
8269 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8270 (get_doc_string, Fsnarf_documentation):
8271 Use int, not EMACS_INT, where int is wide enough.
8273 Use SAFE_ALLOCA, not alloca.
8274 Check for overflow when converting EMACS_INT to off_t.
8275 * doprnt.c (doprnt):
8276 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8277 * editfns.c (init_editfns, Fuser_uid, Fuser_real_uid):
8278 Don't assume uid_t fits into fixnum.
8279 (buildmark, Fgoto_char, overlays_around, find_field, Fdelete_field)
8280 (Ffield_string, Ffield_string_no_properties, Ffield_beginning)
8281 (Ffield_end, Fconstrain_to_field, Fline_beginning_position)
8282 (Fline_end_position, Fprevious_char, Fchar_after, Fchar_before)
8283 (general_insert_function)
8284 (Finsert_char, make_buffer_string, make_buffer_string_both)
8285 (update_buffer_properties, Fbuffer_substring)
8286 (Fbuffer_substring_no_properties, Fcompare_buffer_substrings)
8287 (Fsubst_char_in_region, check_translation)
8288 (Ftranslate_region_internal, save_restriction_restore, Fformat)
8289 (transpose_markers, Ftranspose_regions):
8290 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8291 (clip_to_bounds): Move to lisp.h as an inline function).
8292 (Fconstrain_to_field): Don't assume integers are nonnegative.
8293 (Fline_beginning_position, Fsave_excursion, Fsave_current_buffer):
8294 (Fsubst_char_in_region, Fsave_restriction):
8295 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8296 (Femacs_pid): Don't assume pid_t fits into fixnum.
8297 (lo_time): Use int, not EMACS_INT, when int suffices.
8298 (lisp_time_argument): Check for usec out of range.
8299 (Fencode_time): Don't assume fixnum fits in int.
8300 (Fuser_login_name, Fuser_full_name): Signal an error
8301 if a uid argument is out of range, rather than relying on
8303 (Fformat_time_string): Remove now-unnecessary check.
8304 lisp_time_argument checks for out-of-range usec now.
8305 Use ptrdiff_t, not size_t, where ptrdiff_t will do.
8306 * emacs.c (gdb_valbits, gdb_gctypebits): Now int, not EMACS_INT.
8307 (gdb_data_seg_bits): Now uintptr_t, not EMACS_INT.
8308 (PVEC_FLAG, gdb_array_mark_flag): Now ptrdiff_t, not EMACS_INT.
8309 (init_cmdargs, Fdump_emacs):
8310 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8311 (Fkill_emacs): Don't assume fixnum fits in int; instead, take just
8312 the bottom (typically) 32 bits of the fixnum.
8313 * eval.c (specpdl_size, call_debugger):
8314 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8315 (when_entered_debugger, Fbacktrace_debug):
8316 Don't assume fixnum can fit in int.
8317 (Fdefvaralias, Fdefvar): Do not attempt to compute the address of
8318 the object just before a buffer; this is not portable.
8319 (FletX, Flet, Funwind_protect, do_autoload, Feval, funcall_lambda)
8320 (grow_specpdl, unbind_to):
8321 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8322 (Fapply, apply_lambda): Don't assume ptrdiff_t can hold fixnum.
8323 (grow_specpdl): Simplify allocation by using xpalloc.
8324 (Fprog1, Fprog2): Don't assume list length fits in int. Simplify.
8325 * fileio.c (Ffind_file_name_handler, Fcopy_file, Frename_file)
8326 (Finsert_file_contents, Fwrite_region, Fdo_auto_save):
8327 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8328 (Ffind_file_name_handler, non_regular_inserted, Finsert_file_contents)
8330 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8331 (Fcopy_file, non_regular_nbytes, read_non_regular)
8332 (Finsert_file_contents):
8333 Use int, not EMACS_INT, where int is wide enough.
8334 (READ_BUF_SIZE): Verify that it fits in int.
8335 (Finsert_file_contents): Check that counts are in proper range,
8336 rather than assuming fixnums fit into ptrdiff_t etc.
8337 Don't assume fixnums fit into int.
8338 * floatfns.c (Fexpt): Avoid undefined signed * signed overflow.
8339 * fns.c (Fcompare_strings, Fstring_lessp, struct textprop_rec, concat)
8340 (string_char_byte_cache_charpos, string_char_byte_cache_bytepos)
8341 (string_char_to_byte, string_byte_to_char)
8342 (string_make_multibyte, string_to_multibyte)
8343 (string_make_unibyte, Fstring_as_unibyte, Fstring_as_multibyte)
8344 (Fstring_to_unibyte, Fsubstring, Fsubstring_no_properties)
8345 (substring_both, Fdelete, internal_equal, Ffillarray)
8346 (Fclear_string, mapcar1)
8347 (Fbase64_encode_region, Fbase64_encode_string, base64_encode_1)
8348 (Fbase64_decode_region, Fbase64_decode_string, base64_decode_1)
8349 (larger_vector, make_hash_table, maybe_resize_hash_table)
8350 (hash_lookup, hash_remove_from_table, hash_clear, sweep_weak_table)
8351 (Fmaphash, secure_hash):
8352 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8353 (concat): Check for string index and length overflow.
8354 (Fmapconcat): Don't assume fixnums fit into ptrdiff_t.
8356 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8357 (larger_vector): New API (vec, incr_min, size_max) replaces old
8358 one (vec, new_size, init). This catches size overflow.
8359 INIT was removed because it was always Qnil.
8360 All callers changed.
8361 (INDEX_SIZE_BOUND): New macro, which calculates more precisely
8362 the upper bound on a hash table index size.
8363 (make_hash_table, maybe_resize_hash_table): Use it.
8364 (secure_hash): Computer start_byte and end_byte only after
8365 they're known to be in ptrdiff_t range.
8366 * font.c (font_intern_prop, font_at, font_range, Ffont_shape_gstring)
8367 (Ffont_get_glyphs, Ffont_at):
8368 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8369 (font_style_to_value, font_prop_validate_style, font_expand_wildcards)
8370 (Flist_fonts, Fopen_font):
8371 Don't assume fixnum can fit in int.
8372 (check_gstring): Don't assume index can fit in int.
8373 (font_match_p): Check that fixnum is a character, not a nonnegative
8374 fixnum, since the later code needs to stuff it into an int.
8375 (font_find_for_lface): Use SAFE_ALLOCA_LISP, not alloca.
8376 (font_fill_lglyph_metrics): Use unsigned, not EMACS_INT, to avoid
8377 conversion overflow issues.
8378 (Fopen_font): Check for integer out of range.
8379 (Ffont_get_glyphs): Don't assume index can fit in int.
8380 * font.h: Adjust decls to match defn changes elsewhere.
8381 * fontset.c (reorder_font_vector): Redo score calculation to avoid
8383 (num_auto_fontsets, fontset_from_font): Use ptrdiff_t, not
8384 printmax_t, where ptrdiff_t is wide enough.
8385 (Finternal_char_font):
8386 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8387 * frame.c (Fset_mouse_position, Fset_mouse_pixel_position)
8388 (Fset_frame_height, Fset_frame_width, Fset_frame_size)
8389 (Fset_frame_position, x_set_frame_parameters)
8390 (x_set_line_spacing, x_set_border_width)
8391 (x_set_internal_border_width, x_set_alpha, x_figure_window_size):
8392 Check that fixnums are in proper range for system types.
8393 (frame_name_fnn_p, Fframe_parameter, Fmodify_frame_parameters):
8394 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8395 (Fmodify_frame_parameters): Don't assume fixnum fits in int.
8396 Use SAFE_ALLOCA_LISP, not alloca.
8397 * frame.h (struct frame): Use intptr_t, not EMACS_INT, where
8398 intptr_t is wide enough.
8399 * fringe.c (lookup_fringe_bitmap, get_logical_fringe_bitmap)
8400 (Fdefine_fringe_bitmap): Don't assume fixnum fits in int.
8401 (Ffringe_bitmaps_at_pos): Don't assume index fits in int.
8402 Check for fixnum out of range.
8403 * ftfont.c (ftfont_list): Don't assume index fits in int.
8404 Check that fixnums are in proper range for system types.
8405 (ftfont_shape_by_flt):
8406 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8407 * gnutls.c (emacs_gnutls_write, emacs_gnutls_read):
8408 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8409 (Fgnutls_error_fatalp, Fgnutls_error_string, Fgnutls_boot):
8410 Check that fixnums are in proper range for system types.
8411 * gnutls.h: Adjust decls to match defn changes elsewhere.
8412 * gtkutil.c (xg_dialog_run):
8413 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8414 (update_frame_tool_bar):
8415 Check that fixnums are in proper range for system types.
8416 * image.c (parse_image_spec): Redo count calculation to avoid overflow.
8417 (lookup_image): Check that fixnums are in range for system types.
8418 * indent.c (last_known_column, last_known_column_point):
8419 (current_column_bol_cache):
8420 (skip_invisible, current_column, check_display_width):
8421 (check_display_width, scan_for_column, current_column_1)
8422 (Findent_to, Fcurrent_indentation, position_indentation)
8423 (indented_beyond_p, Fmove_to_column, compute_motion):
8424 (Fcompute_motion, Fvertical_motion):
8425 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8426 (last_known_column_modified): Use EMACS_INT, not int.
8427 (check_display_width):
8429 Check that fixnums and floats are in proper range for system types.
8430 (compute_motion): Don't assume index or fixnum fits in int.
8431 (compute_motion, Fcompute_motion):
8432 Use int, not EMACS_INT, when it is wide enough.
8433 (vmotion): Omit local var start_hpos that is always 0; that way
8434 we don't need to worry about overflow in expressions involving it.
8435 * indent.h: Adjust decls to match defn changes elsewhere.
8437 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8438 Use int, not EMACS_INT, where int is wide enough.
8439 Remove unused members ovstring_chars_done and tab_offset;
8441 * insdel.c (move_gap, move_gap_both, gap_left, gap_right)
8442 (adjust_markers_for_delete, adjust_markers_for_insert, adjust_point)
8443 (adjust_markers_for_replace, make_gap_larger, make_gap_smaller)
8444 (make_gap, copy_text, insert, insert_and_inherit)
8445 (insert_before_markers, insert_before_markers_and_inherit)
8446 (insert_1, count_combining_before, count_combining_after)
8447 (insert_1_both, insert_from_string)
8448 (insert_from_string_before_markers, insert_from_string_1)
8449 (insert_from_gap, insert_from_buffer, insert_from_buffer_1)
8450 (adjust_after_replace, adjust_after_insert, replace_range)
8451 (replace_range_2, del_range, del_range_1, del_range_byte)
8452 (del_range_both, del_range_2, modify_region)
8453 (prepare_to_modify_buffer, signal_before_change)
8454 (signal_after_change, Fcombine_after_change_execute):
8455 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8456 * intervals.c (traverse_intervals, rotate_right, rotate_left)
8457 (balance_an_interval, split_interval_right, split_interval_left)
8458 (find_interval, next_interval, update_interval)
8459 (adjust_intervals_for_insertion, delete_node, delete_interval)
8460 (interval_deletion_adjustment, adjust_intervals_for_deletion)
8461 (static_offset_intervals, offset_intervals)
8462 (merge_interval_right, merge_interval_left, make_new_interval)
8463 (graft_intervals_into_buffer, temp_set_point_both)
8464 (temp_set_point, set_point, adjust_for_invis_intang)
8465 (set_point_both, move_if_not_intangible, get_property_and_range)
8466 (get_local_map, copy_intervals, copy_intervals_to_string)
8467 (compare_string_intervals, set_intervals_multibyte_1):
8468 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8469 * intervals.h: Adjust decls to match defn changes elsewhere.
8471 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8472 * keyboard.c (this_command_key_count, this_single_command_key_start)
8473 (before_command_key_count, before_command_echo_length, echo_now)
8474 (echo_length, recursive_edit_1, Frecursive_edit, Ftrack_mouse)
8475 (command_loop_1, safe_run_hooks, read_char, timer_check_2)
8476 (menu_item_eval_property, read_key_sequence, Fread_key_sequence)
8477 (Fread_key_sequence_vector, Fexecute_extended_command, Fsuspend_emacs):
8478 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8479 (last_non_minibuf_size, last_point_position, echo_truncate)
8480 (command_loop_1, adjust_point_for_property, read_char, gen_help_event)
8481 (make_lispy_position, make_lispy_event, parse_modifiers_uncached)
8482 (parse_modifiers, modify_event_symbol, Fexecute_extended_command)
8483 (stuff_buffered_input):
8484 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8485 (last_auto_save, command_loop_1, read_char):
8486 Use EMACS_INT, not int, to avoid integer overflow.
8487 (record_char): Avoid overflow in total_keys computation.
8488 (parse_modifiers_uncached): Redo index calculation to avoid overflow.
8489 * keyboard.h: Adjust decls to match defn changes elsewhere.
8490 * keymap.c (Fdefine_key, Fcurrent_active_maps, accessible_keymaps_1)
8491 (Fkey_description, Fdescribe_vector, Flookup_key):
8492 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8493 (click_position): New function, to check that positions are in range.
8494 (Fcurrent_active_maps):
8496 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8497 (Faccessible_keymaps, Fkey_description):
8498 (preferred_sequence_p):
8499 Don't assume fixnum can fit into int.
8500 (Fkey_description): Use SAFE_ALLOCA_LISP, not alloca.
8501 Check for integer overflow in size calculations.
8502 (Ftext_char_description): Use CHECK_CHARACTER, not CHECK_NUMBER, to
8503 avoid mishandling large integers.
8504 * lisp.h: Adjust decls to match defn changes elsewhere.
8505 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, struct Lisp_String)
8506 (struct vectorlike_header, struct Lisp_Subr, struct Lisp_Hash_Table)
8507 (struct Lisp_Marker):
8508 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8509 (clip_to_bounds): Now an inline function, moved here from editfns.c.
8510 (GLYPH_CODE_P): Check for overflow in system types, subsuming the
8511 need for GLYPH_CODE_CHAR_VALID_P and doing proper checking ourselves.
8512 All callers changed.
8513 (GLYPH_CODE_CHAR, GLYPH_CODE_FACE):
8514 Assume the arg has valid form, since it always does.
8515 (TYPE_RANGED_INTEGERP): Avoid bug when checking against a wide
8516 unsigned integer system type.
8517 (CHECK_RANGED_INTEGER, CHECK_TYPE_RANGED_INTEGER): New macros.
8518 (struct catchtag, specpdl_size, SPECPDL_INDEX, USE_SAFE_ALLOCA):
8519 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8520 (struct catchtag): Use EMACS_INT, not int, since it may be a fixnum.
8521 (duration_to_sec_usec): New decl.
8522 * lread.c (read_from_string_index, read_from_string_index_byte)
8523 (read_from_string_limit, readchar, unreadchar, openp)
8524 (read_internal_start, read1, oblookup):
8525 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8526 (Fload, readevalloop, Feval_buffer, Feval_region):
8527 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8528 (openp): Check for out-of-range argument to 'access'.
8529 (read1): Use int, not EMACS_INT, where int is wide enough.
8530 Don't assume fixnum fits into int.
8531 Fix off-by-one error that can read outside a buffer.
8532 (read_filtered_event): Use duration_to_sec_usec
8533 to do proper overflow checking on durations.
8534 * macros.c (Fstart_kbd_macro): Use xpalloc to check for overflow
8535 in size calculation.
8536 (Fexecute_kbd_macro):
8537 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8538 * marker.c (cached_charpos, cached_bytepos, CONSIDER)
8539 (byte_char_debug_check, buf_charpos_to_bytepos, verify_bytepos)
8540 (buf_bytepos_to_charpos, Fset_marker, set_marker_restricted)
8541 (set_marker_both, set_marker_restricted_both, marker_position)
8542 (marker_byte_position, Fbuffer_has_markers_at):
8543 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8544 (Fset_marker, set_marker_restricted): Don't assume fixnum fits in int.
8545 * menu.c (ensure_menu_items): Rename from grow_menu_items.
8546 It now merely ensures that the menu is large enough, without
8547 necessarily growing it, as this avoids some integer overflow issues.
8548 All callers changed.
8549 (keymap_panes, parse_single_submenu, Fx_popup_menu):
8550 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8551 (parse_single_submenu, Fx_popup_menu): Don't assume fixnum fits in int.
8552 Use SAFE_ALLOCA_LISP, not alloca.
8553 (find_and_return_menu_selection): Avoid unnecessary casts of pointers
8554 to EMACS_INT. Check that fixnums are in proper range for system types.
8555 * minibuf.c (minibuf_prompt_width, string_to_object)
8556 (Fminibuffer_contents, Fminibuffer_contents_no_properties)
8557 (Fminibuffer_completion_contents, Ftry_completion, Fall_completions):
8558 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8559 (get_minibuffer, read_minibuf_unwind):
8560 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8561 (read_minibuf): Omit unnecessary arg BACKUP_N, which is always nil;
8562 this simplifies overflow checking. All callers changed.
8563 (read_minibuf, Fread_buffer, Ftry_completion, Fall_completions)
8565 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8566 * nsfns.m (check_ns_display_info): Don't assume fixnum fits in long.
8567 (x_set_menu_bar_lines, x_set_tool_bar_lines, Fx_create_frame):
8568 Check that fixnums are in proper range for system types.
8569 (Fx_create_frame, Fx_show_tip):
8570 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8571 * nsfont.m (ns_findfonts, nsfont_list_family):
8572 Don't assume fixnum fits in long.
8573 * nsmenu.m (ns_update_menubar, ns_menu_show, ns_popup_dialog):
8574 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8575 (ns_update_menubar): Use intptr_t, not EMACS_INT, when intptr_t is
8577 * nsselect.m (ns_get_local_selection, clean_local_selection_data):
8578 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8579 * print.c (print_buffer_size, print_buffer_pos, print_buffer_pos_byte)
8580 (PRINTDECLARE, PRINTPREPARE):
8581 (strout, print_string):
8582 (print, print_preprocess, print_check_string_charset_prop)
8584 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8586 (temp_output_buffer_setup, Fprin1_to_string, print_object):
8587 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8588 (PRINTPREPARE): Use int, not ptrdiff_t, where int is wide enough.
8589 (printchar, strout): Use xpalloc to catch size calculation overflow.
8590 (Fexternal_debugging_output): Don't overflow EMACS_INT->int conversion.
8591 (print_error_message): Use SAFE_ALLOCA, not alloca.
8592 (print_object): Use int, not EMACS_INT, where int is wide enough.
8593 (print_depth, new_backquote_output, print_number_index):
8594 Use ptrdiff_t, not int, where int might not be wide enough.
8595 * process.c (Fdelete_process): Don't assume pid fits into EMACS_INT.
8596 (Fset_process_window_size, Fformat_network_address)
8597 (get_lisp_to_sockaddr_size, set_socket_option, Fmake_network_process)
8599 Check that fixnums are in proper range for system types.
8600 (Fsignal_process): Simplify by avoiding a goto.
8601 Check for process-ids out of pid_t range rather than relying on
8603 (process_tick, update_tick): Use EMACS_INT, not int.
8604 (Fformat_network_address, read_process_output, send_process)
8605 (Fprocess_send_region, status_notify):
8606 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8607 (Fformat_network_address, Fmake_serial_process, Fmake_network_process)
8608 (wait_reading_process_output, read_process_output, exec_sentinel):
8609 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8610 (conv_lisp_to_sockaddr): Don't assume fixnums fit into int.
8611 (Faccept_process_output): Use duration_to_sec_usec to do proper
8612 overflow checking on durations.
8613 (emacs_get_tty_pgrp, Fprocess_running_child_p, process_send_signal):
8614 Don't assume pid_t fits in int.
8615 * process.h (struct Lisp_Process): Members tick and update_tick
8616 are now of type EMACS_INT, not int.
8617 * puresize.h (PURESIZE_RATIO): Shrink this to 8/6 on 32-bit hosts
8618 configured --with-wide-int.
8619 * scroll.c (calculate_scrolling, calculate_direct_scrolling)
8620 (line_ins_del): Use int, not EMACS_INT, where int is wide enough.
8621 * search.c (looking_at_1, string_match_1):
8622 (fast_string_match, fast_c_string_match_ignore_case)
8623 (fast_string_match_ignore_case, fast_looking_at, scan_buffer)
8624 (scan_newline, find_before_next_newline, search_command)
8625 (trivial_regexp_p, search_buffer, simple_search, boyer_moore)
8626 (set_search_regs, wordify):
8629 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8630 (string_match_1, search_buffer, set_search_regs):
8632 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8633 (wordify): Check for overflow in size calculation.
8634 (Freplace_match): Avoid potential buffer overflow in search_regs.start.
8635 (Fset_match_data): Don't assume fixnum fits in ptrdiff_t.
8636 Check that fixnums are in proper range for system types.
8637 * sound.c (struct sound_device)
8638 (wav_play, au_play, vox_write, alsa_period_size, alsa_write):
8639 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8640 (Fplay_sound_internal):
8641 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8642 * syntax.c (struct lisp_parse_state, find_start_modiff)
8643 (Finternal_describe_syntax_value, scan_lists, scan_sexps_forward):
8644 (Fparse_partial_sexp):
8645 Don't assume fixnums can fit in int.
8646 (struct lisp_parse_state, find_start_pos, find_start_value)
8647 (find_start_value_byte, find_start_begv)
8648 (update_syntax_table, char_quoted, dec_bytepos)
8649 (find_defun_start, prev_char_comend_first, back_comment):
8650 (scan_words, skip_chars, skip_syntaxes, forw_comment, Fforward_comment)
8651 (scan_lists, Fbackward_prefix_chars, scan_sexps_forward):
8652 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8653 (Finternal_describe_syntax_value): Check that match_lisp is a
8654 character, not an integer, since the code stuffs it into int.
8655 (scan_words, scan_sexps_forward):
8656 Check that fixnums are in proper range for system types.
8658 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8659 (scan_sexps_forward):
8660 Use CHARACTERP, not INTEGERP, since the value must fit into int.
8661 (Fparse_partial_sexp): Fix doc; element 8 is not ignored.
8662 * syntax.h: Adjust decls to match defn changes elsewhere.
8663 (struct gl_state_s):
8664 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8665 (SETUP_SYNTAX_TABLE_FOR_OBJECT): Use PTRDIFF_MAX, not
8666 MOST_POSITIVE_FIXNUM.
8667 * sysdep.c (wait_for_termination_1, wait_for_termination)
8668 (interruptible_wait_for_termination, mkdir):
8669 Don't assume pid_t fits in int; on 64-bit AIX pid_t is 64-bit.
8670 (emacs_read, emacs_write):
8671 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8672 (system_process_attributes): Don't assume uid_t, gid_t, EMACS_INT,
8673 and double all fit in int.
8674 * term.c (set_tty_color_mode):
8675 Check that fixnums are in proper range for system types.
8676 * termhooks.h (struct input_event):
8677 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8678 * textprop.c (validate_interval_range, interval_of)
8679 (Fadd_text_properties, set_text_properties_1)
8680 (Fremove_text_properties, Fremove_list_of_text_properties)
8681 (Ftext_property_any, Ftext_property_not_all)
8682 (copy_text_properties, text_property_list, extend_property_ranges)
8683 (verify_interval_modification):
8684 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8685 (Fnext_single_char_property_change)
8686 (Fprevious_single_char_property_change):
8687 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8688 (copy_text_properties):
8689 Check for integer overflow in index calculation.
8690 * undo.c (last_boundary_position, record_point, record_insert)
8691 (record_delete, record_marker_adjustment, record_change)
8692 (record_property_change):
8693 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8694 (truncate_undo_list, Fprimitive_undo): Don't assume fixnum fits in int.
8695 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8696 * w32fns.c (Fx_create_frame, x_create_tip_frame, Fx_show_tip)
8697 (Fx_hide_tip, Fx_file_dialog):
8698 * w32menu.c (set_frame_menubar):
8699 Use ptrdiff_t, not int, for consistency with rest of code.
8700 * window.c (window_scroll_preserve_hpos, window_scroll_preserve_vpos)
8701 (select_window, Fdelete_other_windows_internal)
8702 (window_scroll_pixel_based, window_scroll_line_based)
8703 (Frecenter, Fset_window_configuration):
8704 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8705 (Fset_window_hscroll, run_window_configuration_change_hook)
8706 (set_window_buffer, temp_output_buffer_show, scroll_command)
8707 (Fscroll_other_window, Frecenter):
8708 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8709 (Fwindow_line_height, window_scroll, Fscroll_left, Fscroll_right):
8710 Don't assume fixnum fits in int.
8711 (Fset_window_scroll_bars):
8712 Check that fixnums are in proper range for system types.
8713 * xdisp.c (help_echo_pos, pos_visible_p, string_pos_nchars_ahead)
8714 (string_pos, c_string_pos, number_of_chars, init_iterator)
8715 (in_ellipses_for_invisible_text_p, init_from_display_pos)
8716 (compute_stop_pos, next_overlay_change, compute_display_string_pos)
8717 (compute_display_string_end, handle_face_prop)
8718 (face_before_or_after_it_pos, handle_invisible_prop)
8719 (handle_display_prop, handle_display_spec, handle_single_display_spec)
8720 (display_prop_intangible_p, string_buffer_position_lim)
8721 (string_buffer_position, handle_composition_prop, load_overlay_strings)
8722 (get_overlay_strings_1, get_overlay_strings)
8723 (iterate_out_of_display_property, forward_to_next_line_start)
8724 (back_to_previous_visible_line_start, reseat, reseat_to_string)
8725 (get_next_display_element, set_iterator_to_next)
8726 (get_visually_first_element, compute_stop_pos_backwards)
8727 (handle_stop_backwards, next_element_from_buffer)
8728 (move_it_in_display_line_to, move_it_in_display_line)
8729 (move_it_to, move_it_vertically_backward, move_it_by_lines)
8730 (add_to_log, message_dolog, message_log_check_duplicate)
8731 (message2, message2_nolog, message3, message3_nolog
8732 (with_echo_area_buffer, display_echo_area_1, resize_mini_window_1)
8733 (current_message_1, truncate_echo_area, truncate_message_1)
8734 (set_message, set_message_1, store_mode_line_noprop)
8735 (hscroll_window_tree, debug_delta, debug_delta_bytes, debug_end_vpos)
8736 (text_outside_line_unchanged_p, check_point_in_composition)
8737 (reconsider_clip_changes)
8738 (redisplay_internal, set_cursor_from_row, try_scrolling)
8739 (try_cursor_movement, set_vertical_scroll_bar, redisplay_window)
8740 (redisplay_window, find_last_unchanged_at_beg_row)
8741 (find_first_unchanged_at_end_row, row_containing_pos, try_window_id)
8742 (trailing_whitespace_p, find_row_edges, display_line)
8743 (RECORD_MAX_MIN_POS, Fcurrent_bidi_paragraph_direction)
8744 (display_mode_element, store_mode_line_string)
8745 (pint2str, pint2hrstr, decode_mode_spec)
8746 (display_count_lines, display_string, draw_glyphs)
8747 (x_produce_glyphs, x_insert_glyphs)
8748 (rows_from_pos_range, mouse_face_from_buffer_pos)
8749 (fast_find_string_pos, mouse_face_from_string_pos)
8750 (note_mode_line_or_margin_highlight, note_mouse_highlight):
8751 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8752 (safe_call, init_from_display_pos, handle_fontified_prop)
8753 (handle_single_display_spec, load_overlay_strings)
8754 (with_echo_area_buffer, setup_echo_area_for_printing)
8755 (display_echo_area, echo_area_display)
8756 (x_consider_frame_title, prepare_menu_bars, update_menu_bar)
8757 (update_tool_bar, hscroll_window_tree, redisplay_internal)
8758 (redisplay_window, dump_glyph_row, display_mode_line)
8759 (Fformat_mode_line, decode_mode_spec, on_hot_spot_p):
8760 (handle_display_spec, display_prop_string_p):
8761 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8762 (handle_single_display_spec, build_desired_tool_bar_string)
8763 (redisplay_tool_bar, scroll_window_tree, Fdump_glyph_matrix)
8764 (get_specified_cursor_type):
8765 Check that fixnums are in proper range for system types.
8766 (struct overlay_entry, resize_mini_window, Fdump_glyph_row)
8767 (Flookup_image_map):
8768 Don't assume fixnums fit in int.
8769 (compare_overlay_entries):
8770 Avoid mishandling comparisons due to subtraction overflow.
8771 (load_overlay_strings): Use SAFE_NALLOCA, not alloca.
8772 (last_escape_glyph_face_id, last_glyphless_glyph_face_id):
8773 (handle_tool_bar_click):
8774 Use int, not unsigned, since we prefer signed and the signedness
8775 doesn't matter here.
8776 (get_next_display_element, next_element_from_display_vector):
8777 Use int, not EMACS_INT, when int is wide enough.
8778 (start_hourglass): Use duration_to_sec_usec to do proper
8779 overflow checking on durations.
8780 * xfaces.c (Fbitmap_spec_p):
8781 Check that fixnums are in proper range for system types.
8782 (compare_fonts_by_sort_order):
8783 Avoid mishandling comparisons due to subtraction overflow.
8784 (Fx_family_fonts, realize_basic_faces):
8785 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8787 Don't assume fixnum fits in int.
8788 Use SAFE_ALLOCA_LISP, not alloca.
8789 (merge_face_heights): Remove unnecessary cast to EMACS_INT.
8790 (Finternal_make_lisp_face): Don't allocate more than MAX_FACE_ID.
8791 (face_at_buffer_position, face_for_overlay_string)
8792 (face_at_string_position):
8793 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8794 (merge_faces): Use int, not EMACS_INT, where int is wide enough.
8795 * xfns.c (x_set_menu_bar_lines, x_set_tool_bar_lines, x_icon_verify)
8797 Check that fixnums are in proper range for system types.
8798 (Fx_create_frame, x_create_tip_frame, Fx_show_tip)
8799 (Fx_hide_tip, Fx_file_dialog, Fx_select_font):
8800 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8801 (Fx_change_window_property): Don't assume fixnums fit in int.
8802 * xfont.c (xfont_chars_supported):
8803 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8804 * xmenu.c (Fx_popup_dialog, set_frame_menubar)
8805 (create_and_show_popup_menu, create_and_show_dialog, xmenu_show):
8806 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8807 * xml.c (parse_region):
8808 * xrdb.c (magic_file_p):
8809 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8810 * xselect.c (TRACE1): Don't assume pid_t promotes to int.
8811 (x_get_local_selection, x_reply_selection_request)
8812 (x_handle_selection_request, wait_for_property_change):
8813 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8814 (selection_data_to_lisp_data): Use short, not EMACS_INT, where
8815 short is wide enough.
8816 (x_send_client_event): Don't assume fixnum fits in int.
8817 * xterm.c (x_x_to_emacs_modifiers):
8818 Don't assume EMACS_INT overflows nicely into int.
8819 (x_emacs_to_x_modifiers): Use EMACS_INT, not int, because values
8821 (handle_one_xevent): NATNUMP can eval its arg twice.
8822 (x_connection_closed):
8823 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8824 * xterm.h: Adjust decls to match defn changes elsewhere.
8825 (struct scroll_bar): Use struct vectorlike_header
8826 rather than rolling our own approximation.
8827 (SCROLL_BAR_VEC_SIZE): Remove; not used.
8829 2012-05-25 Glenn Morris <rgm@gnu.org>
8831 * lisp.mk (lisp): Update for more files being compiled now.
8833 2012-05-25 Stefan Monnier <monnier@iro.umontreal.ca>
8835 * lread.c: Remove `read_pure' which makes no difference.
8836 (read_pure): Remove var.
8837 (unreadpure): Remove function.
8838 (readevalloop): Don't call read_list with -1 flag.
8839 (read1, read_vector): Don't test read_pure any more.
8840 (read_list): Simplify.
8842 * fileio.c, character.h: Minor style tweaks.
8844 2012-05-24 Dmitry Antipov <dmantipov@yandex.ru>
8846 * window.h (clip_changed): Remove useless declaration.
8848 2012-05-22 Juanma Barranquero <lekktu@gmail.com>
8850 * makefile.w32-in: Follow-up to 2012-05-22T16:20:27Z!eggert@cs.ucla.edu.
8851 (TAGS, TAGS-gmake, CONFIG_H): Remove further references to m/intel386.h.
8853 2012-05-22 Paul Eggert <eggert@cs.ucla.edu>
8856 This directory predates autoconf and is no longer needed nowadays.
8857 Move its few remaining bits of functionality to where they're needed.
8858 * m/README, m/alpha.h, m/amdx86-64.h, m/ia64.h, m/ibmrs6000.h:
8859 * m/ibms390x.h, m/intel386.h, m/m68k.h, m/macppc.h, m/sparc.h:
8860 * m/template.h: Remove.
8861 * Makefile.in (M_FILE): Remove. All uses removed.
8862 * alloc.c (POINTERS_MIGHT_HIDE_IN_OBJECTS):
8863 * lisp.h (USE_LSB_TAG):
8864 * mem-limits.h (EXCEEDS_LISP_PTR):
8865 Use VAL_MAX, not VALBITS, in #if.
8866 * lisp.h (EMACS_INT_MAX): New macro, useful in #if.
8867 (EMACS_UINT): Define unconditionally now.
8868 (BITS_PER_CHAR, BITS_PER_SHORT, BITS_PER_INT, BITS_PER_LONG)
8869 (BITS_PER_EMACS_INT): New constants, replacing
8870 what used to be in config.h, but not useful in #if.
8871 (GCTYPEBITS, VALBITS): Define unconditionally, since m/* files don't
8872 define them any more.
8873 (VAL_MAX): New macro.
8875 * puresize.h (PURESIZE_RATIO): Use EMACS_INT_MAX, not
8876 BITS_PER_EMACS_INT, in #if.
8877 * s/aix4-2.h (BROKEN_FIONREAD, BROKEN_SIGAIO, BROKEN_SIGPTY)
8878 (BROKEN_SIGPOLL): Move here from m/ibmrs6000.h, which was removed.
8879 * s/gnu-linux.h (ULIMIT_BREAK_VALUE) [__i386__]:
8880 * s/ms-w32.h (DATA_START):
8881 Move here from removed file m/intel386.h.
8882 * s/gnu.h (NLIST_STRUCT): Remove undef; 'configure' does this.
8883 * s/irix6-5.h (_LP64): Remove; lisp.h no longer needs this.
8885 2012-05-21 Paul Eggert <eggert@cs.ucla.edu>
8887 Assume C89 or later.
8888 * alloc.c, buffer.c, lisp.h: Replace POINTER_TYPE with void.
8889 * alloc.c (overrun_check_malloc, overrun_check_realloc, xmalloc)
8891 * buffer.c (mmap_free_1, mmap_enlarge): Omit needless casts.
8892 * editfns.c, fns.c, gmalloc.c, insdel.c, sysdep.c, termcap.c (NULL):
8893 * textprop.c, tparam.c (NULL): Remove.
8894 * ralloc.c, vm-limit.c (POINTER): Assume void * works.
8895 * regex.c (SIGN_EXTEND_CHAR): Assume signed char works.
8896 * regex.h (_RE_ARGS): Remove. All uses rewritten to use prototypes.
8897 * unexelf.c (ElfBitsW): Assume c89 preprocessor or better.
8898 * xterm.c (input_signal_count): Assume volatile works.
8900 2012-05-21 Ken Brown <kbrown@cornell.edu>
8902 * xgselect.c (xg_select): Fix first argument in call to 'select'
8905 2012-05-20 Ken Brown <kbrown@cornell.edu>
8907 * gmalloc.c (_free_internal_nolock, _realloc_internal_nolock)
8908 [CYGWIN]: Cast ptr to (char *) before comparing to _heapbase.
8910 2012-05-19 Ken Brown <kbrown@cornell.edu>
8912 * xfns.c (x_in_use): Remove `static' qualifier.
8913 * xterm.h (x_in_use): Declare.
8914 * xgselect.c: Include xterm.h.
8915 (xg_select): Test `x_in_use' instead of `inhibit_window_system'
8916 and `display_arg' (bug#9754).
8918 2012-05-19 Paul Eggert <eggert@cs.ucla.edu>
8920 * s/ms-w32.h (HAVE_GETDOMAINNAME): Remove; not needed.
8922 * m/vax.h: Remove; no longer needed since HAVE_FTIME is being removed.
8923 * s/ms-w32.h (HAVE_FTIME): Remove; not needed.
8925 2012-05-18 Eli Zaretskii <eliz@gnu.org>
8927 Fix compilation with -DGLYPH_DEBUG=1 on MS-Windows.
8929 * w32term.c [GLYPH_DEBUG]: Add prototype for x_check_font.
8930 (x_check_font) [GLYPH_DEBUG]: New function, copied from xterm.c.
8932 * w32fns.c (unwind_create_frame) [GLYPH_DEBUG]: Fix broken
8933 reference to image_cache->refcount.
8934 (x_create_tip_frame): Fix broken use of FRAME_IMAGE_CACHE.
8936 2012-05-17 Juri Linkov <juri@jurta.org>
8938 * search.c (Fword_search_regexp, Fword_search_backward)
8939 (Fword_search_forward, Fword_search_backward_lax)
8940 (Fword_search_forward_lax): Move functions to isearch.el
8941 (bug#10145, bug#11381).
8943 2012-05-16 Paul Eggert <eggert@cs.ucla.edu>
8945 * xgselect.c (xg_select): Just invoke 'select' if -nw (Bug#9754).
8947 2012-05-15 Stefan Monnier <monnier@iro.umontreal.ca>
8949 * lread.c (init_obarray): Declare Qt and Qnil as special.
8951 2012-05-14 Glenn Morris <rgm@gnu.org>
8953 * nsterm.m (ns_init_paths): Fix typo ("libexec" not "lib-exec").
8954 Put "libexec" before "bin", for the sake of init_callproc_1.
8956 2012-05-14 Paul Eggert <eggert@cs.ucla.edu>
8958 * keyboard.c (kbd_buffer_get_event) [!HAVE_DBUS]: Omit unused local.
8960 * unexaix.c: Port to more-recent AIX compilers.
8961 (report_error, report_error_1, make_hdr, copy_sym)
8962 (mark_x, adjust_lnnoptrs, unrelocate_symbols):
8963 Make arguments const char *, not char *, to avoid violations of C
8964 standard and to fix some AIX warnings reported by Gilles Pion.
8966 2012-05-14 Eli Zaretskii <eliz@gnu.org>
8968 * xdisp.c (handle_stop): Don't call get_overlay_strings_1 if we
8969 already have overlays loaded.
8970 (handle_single_display_spec): Before returning without displaying
8971 fringe bitmap, synchronize the bidi iterator with the main display
8972 iterator, by calling iterate_out_of_display_property.
8973 (iterate_out_of_display_property): Detect buffer iteration by
8974 testing that it->string is a Lisp string.
8975 (get_next_display_element): When the current object is exhausted,
8976 and there's something on it->stack, call set_iterator_to_next to
8977 proceed with what's on the stack, instead of returning zero.
8978 (set_iterator_to_next): If called at the end of a Lisp string,
8979 proceed to consider_string_end without incrementing string
8980 position. Don't increment display vector index past the end of
8981 the display vector. (Bug#11417)
8982 (pos_visible_p): Don't report a position visible when move_it_to
8983 stopped at the last line of window, which happens to be scanned
8984 backwards by the bidi iteration. (Bug#11464)
8986 2012-05-14 Eli Zaretskii <eliz@gnu.org>
8988 * xdisp.c (handle_single_display_spec): Return 1 for left-margin
8989 and right-margin display specs even if the spec is invalid or we
8990 are on a TTY, and thus unable to display on the fringes.
8991 That's because the text with the property will not be displayed anyway,
8992 so we need to signal to the caller that this is a "replacing"
8993 display spec. This fixes display when the spec is invalid or we
8996 2012-05-14 Paul Eggert <eggert@cs.ucla.edu>
8998 * unexaix.c (make_hdr): Fix typo in prototype.
8999 This bug broke the build on AIX. Problem reported by Gilles Pion.
9001 2012-05-14 Michael Albinus <michael.albinus@gmx.de>
9003 * keyboard.c (kbd_buffer_get_event): Read special events also in
9004 batch mode. (Bug#11415)
9006 2012-05-12 Glenn Morris <rgm@gnu.org>
9008 * ns.mk: Update for ns_appbindir no longer having trailing "/".
9010 2012-05-12 Eli Zaretskii <eliz@gnu.org>
9012 * lisp.mk (lisp): Add newcomment.elc.
9014 2012-05-12 Glenn Morris <rgm@gnu.org>
9016 * Makefile.in (MKDIR_P): New, set by configure.
9017 * ns.mk (${ns_appdir}, ${ns_appbindir}Emacs): Use $MKDIR_P.
9019 2012-05-11 Paul Eggert <eggert@cs.ucla.edu>
9021 Remove unused function hourglass_started.
9022 * dispextern.h (hourglass_started):
9023 * w32fns.c (hourglass_started):
9024 * xdisp.c (hourglass_started): Remove.
9026 2012-05-10 Juanma Barranquero <lekktu@gmail.com>
9028 * makefile.w32-in ($(BLD)/gmalloc.$(O), $(BLD)/w32menu.$(O)):
9029 Update dependencies.
9031 2012-05-10 Paul Eggert <eggert@cs.ucla.edu>
9033 * xgselect.c (xg_select): Put maxfds+1 into a var.
9034 This is slightly clearer, and pacifies Ubuntu 12.04 gcc.
9036 * sound.c (DEFAULT_ALSA_SOUND_DEVICE): Define only if HAVE_ALSA.
9038 2012-05-10 Dave Abrahams <dave@boostpro.com>
9040 * filelock.c (syms_of_filelock): New boolean create-lockfiles.
9041 (lock_file): If create_lockfiles is 0, do nothing. (Bug#11227)
9043 2012-05-09 Michael Albinus <michael.albinus@gmx.de>
9045 * dbusbind.c (xd_registered_buses): New internal Lisp object.
9046 Rename all occurences of Vdbus_registered_buses to xd_registered_buses.
9047 (syms_of_dbusbind): Remove declaration of Vdbus_registered_buses.
9048 Initialize xd_registered_buses.
9050 2012-05-09 Paul Eggert <eggert@cs.ucla.edu>
9052 Untag more efficiently if USE_LSB_TAG.
9053 This is based on a proposal by YAMAMOTO Mitsuharu in
9054 <http://lists.gnu.org/archive/html/emacs-devel/2008-01/msg01876.html>.
9055 For an admittedly artificial (nth 8000 longlist) benchmark on
9056 Fedora 15 x86-64, this yields a 25% CPU speedup. Also, it shrinks
9057 Emacs's overall text size by 1%.
9058 * lisp.h (XUNTAG): New macro.
9059 (XCONS, XVECTOR, XSTRING, XSYMBOL, XFLOAT, XMISC, XPROCESS, XWINDOW)
9060 (XTERMINAL, XSUBR, XBUFFER, XCHAR_TABLE, XSUB_CHAR_TABLE, XBOOL_VECTOR)
9061 (XSETTYPED_PSEUDOVECTOR, XHASH_TABLE, TYPED_PSEUDOVECTORP): Use it.
9062 * eval.c (Fautoload):
9063 * font.h (XFONT_SPEC, XFONT_ENTITY, XFONT_OBJECT):
9064 * frame.h (XFRAME): Use XUNTAG.
9066 Port recent dbusbind.c changes to 32-bit --with-wide-int.
9067 * dbusbind.c (xd_append_arg, xd_retrieve_arg, Fdbus_message_internal):
9068 Remove unportable assumptions about print widths of types like
9070 (xd_get_connection_address, Fdbus_init_bus): Cast Emacs integer to
9071 intptr_t when converting between pointer and integer, to avoid GCC
9072 warnings about wrong width.
9074 2012-05-09 Eli Zaretskii <eliz@gnu.org>
9076 * w32proc.c (new_child): Force Windows to reserve only 64KB of
9077 stack for each reader_thread, instead of defaulting to 8MB
9078 determined by the linker. This avoids failures in creating
9079 subprocesses on Windows 7, see the discussion in this thread:
9080 http://lists.gnu.org/archive/html/emacs-devel/2012-03/msg00119.html.
9082 2012-05-07 Jérémy Compostella <jeremy.compostella@gmail.com>
9084 Fix up display of the *Minibuf-0* buffer in the mini window.
9085 * keyboard.c (read_char): Don't clear the echo area if there's no
9087 * xdisp.c (redisplay_internal): Redisplay the mini window (with the
9088 contents of *Minibuf-0*) if there's no message displayed in its stead.
9090 2012-05-07 Michael Albinus <michael.albinus@gmx.de>
9092 * dbusbind.c (XD_DEBUG_MESSAGE): Don't print message twice in
9095 2012-05-06 Chong Yidong <cyd@gnu.org>
9097 * lisp.mk (lisp): Update.
9099 2012-05-05 Jim Meyering <meyering@redhat.com>
9101 * w32font.c (fill_in_logfont): NUL-terminate a string (Bug#11372).
9103 2012-05-04 Stefan Monnier <monnier@iro.umontreal.ca>
9105 * data.c (PUT_ERROR): New macro.
9106 (syms_of_data): Use it. Add new error type `user-error'.
9107 * undo.c (user_error): New function.
9108 (Fprimitive_undo): Use it.
9109 * print.c (print_error_message): Adjust print style for `user-error'.
9110 * keyboard.c (user_error): New function.
9111 (Fexit_recursive_edit, Fabort_recursive_edit): Use it.
9113 2012-05-03 Paul Eggert <eggert@cs.ucla.edu>
9115 Do not limit current-time-string to years 1000..9999.
9116 * editfns.c (TM_YEAR_IN_ASCTIME_RANGE): Remove.
9117 (Fcurrent_time_string): Support any year that is supported by the
9118 underlying localtime representation. Don't use asctime, as it
9119 has undefined behavior for years outside the range -999..9999.
9121 2012-05-02 Paul Eggert <eggert@cs.ucla.edu>
9123 Fix race conditions involving setenv, gmtime, localtime, asctime.
9124 Without this fix, interrupts could mess up code that uses these
9125 nonreentrant functions, since setting TZ invalidates existing
9126 tm_zone or tzname values, and since most of these functions return
9127 pointers to static storage.
9128 * editfns.c (format_time_string, Fdecode_time, Fencode_time)
9129 (Fcurrent_time_string, Fcurrent_time_zone, Fset_time_zone_rule):
9130 Grow the critical sections to include not just invoking
9131 localtime/gmtime, but also accessing these functions' results
9132 including their tm_zone values if any, and any related TZ setting.
9133 (format_time_string): Last arg is now struct tm *, not struct tm **,
9134 so that the struct tm is saved in the critical section.
9135 All callers changed. Simplify allocation of initial buffer, partly
9136 motivated by the fact that memory allocation needs to be outside
9137 the critical section.
9139 2012-05-02 Dmitry Antipov <dmantipov@yandex.ru>
9141 * intervals.c (adjust_intervals_for_insertion): Initialize `newi'
9142 with RESET_INTERVAL.
9144 * buffer.c (Fget_buffer_create, Fmake_indirect_buffer):
9145 Remove duplicated buffer name initialization.
9147 2012-05-02 Jim Meyering <jim@meyering.net>
9149 * xterm.c (x_term_init): Use memcpy instead of strncpy (Bug#11373).
9151 * xfns.c (x_window): Use xstrdup (Bug#11375).
9153 2012-05-02 Eli Zaretskii <eliz@gnu.org>
9155 * xdisp.c (pos_visible_p): If already at a newline from the
9156 display string before the 'while' loop, don't walk back the glyphs
9157 from it3.glyph_row. Solves assertion violation when the display
9158 string begins with a newline (egg.el). (Bug#11367)
9160 2012-05-01 Stefan Monnier <monnier@iro.umontreal.ca>
9162 * keyboard.c (Fexecute_extended_command, Vsuggest_key_bindings):
9165 2012-05-01 Glenn Morris <rgm@gnu.org>
9167 * syssignal.h: Remove reference to BROKEN_SIGINFO (last used in
9168 s/ptx4.h), BROKEN_SIGTSTP (last used in m/ustation.h, m/dpx2.h),
9169 and BROKEN_SIGURG (was in s/gnu-linux.h prior to 2008-02-10).
9170 All were removed before 23.1.
9172 * dispnew.c: Remove HAVE_LIBNCURSES test;
9173 it is always true on relevant platforms.
9175 * Makefile.in (LD_SWITCH_X_SITE_RPATH):
9176 Rename from LD_SWITCH_X_SITE_AUX_RPATH.
9178 * Makefile.in (LD_SWITCH_X_SITE_AUX): Remove; no longer used.
9180 2012-04-30 Andreas Schwab <schwab@linux-m68k.org>
9182 * .gdbinit (xpr): Remove checks for no longer existing misc types.
9183 (xintfwd, xboolfwd, xobjfwd, xbufobjfwd, xkbobjfwd, xbuflocal):
9186 2012-04-28 Paul Eggert <eggert@cs.ucla.edu>
9188 Do not avoid creating empty evaporating overlays (Bug#9642).
9189 * buffer.c (Fmove_overlay): Revert the change of 2012-04-23.
9190 That is, do not delete an evaporating overlay if it becomes
9191 empty after its bounds are adjusted to fit within its buffer.
9192 This fix caused other problems, and I'm reverting it until we get
9193 to the bottom of them.
9195 2012-04-27 Chong Yidong <cyd@gnu.org>
9197 * xselect.c (x_convert_selection): Initialize a pointer (Bug#11315).
9199 2012-04-27 Eli Zaretskii <eliz@gnu.org>
9201 * xdisp.c (pos_visible_p): If the window start position is beyond
9202 ZV, start the display from buffer beginning. Prevents assertion
9203 violation in init_iterator when the minibuffer window is scrolled
9206 * window.c (window_scroll_pixel_based): Likewise.
9208 2012-04-27 Chong Yidong <cyd@gnu.org>
9210 * keymap.c (where_is_internal): Doc fix (Bug#10872).
9212 2012-04-27 Glenn Morris <rgm@gnu.org>
9214 * fileio.c (Fcopy_file, Fset_file_selinux_context):
9215 Ignore ENOTSUP failures from setfilecon functions. (Bug#11245)
9217 2012-04-27 Eli Zaretskii <eliz@gnu.org>
9219 * dispnew.c (swap_glyph_pointers, copy_row_except_pointers):
9220 Don't overrun array limits of glyph row's used[] array. (Bug#11288)
9222 2012-04-26 Eli Zaretskii <eliz@gnu.org>
9224 * xdisp.c (IT_DISPLAYING_WHITESPACE): In addition to the loaded
9225 display element, check also the underlying string or buffer
9226 character. (Bug#11341)
9228 * w32menu.c: Include w32heap.h.
9229 (add_menu_item): If the call to AppendMenuW (via
9230 unicode_append_menu) fails, disable Unicode menus only if we are
9231 running on Windows 9X/Me.
9233 2012-04-24 Andreas Schwab <schwab@linux-m68k.org>
9235 * .gdbinit (xpr): Handle USE_2_TAGS_FOR_INTS.
9236 (xgetint): Add missing shift for LSB tags.
9238 2012-04-24 Martin Rudalics <rudalics@gmx.at>
9240 * keyboard.c (read_char): Don't wipe echo area for select window
9241 events: These might get delayed via `mouse-autoselect-window'
9244 2012-04-24 Juanma Barranquero <lekktu@gmail.com>
9246 * gnutls.c (init_gnutls_functions): Protect against (unlikely)
9247 manipulation of :loaded-from data.
9249 2012-04-23 Juanma Barranquero <lekktu@gmail.com>
9251 * gnutls.c (init_gnutls_functions): The value of :loaded-from is
9252 now a cons (bug#11311).
9254 2012-04-23 Paul Eggert <eggert@cs.ucla.edu>
9256 Do not create empty overlays with the evaporate property (Bug#9642).
9257 * buffer.c (Fmove_overlay): Delete an evaporating overlay
9258 if it becomes empty after its bounds are adjusted to fit within
9259 its buffer. Without this fix, in a nonempty buffer (let ((o
9260 (make-overlay 1 2))) (overlay-put o 'evaporate t) (move-overlay o 0 1))
9261 yields an empty overlay that has the evaporate property, which is
9262 not supposed to happen.
9264 Fix minor GTK3 problems found by static checking.
9265 * emacsgtkfixed.c (EMACS_TYPE_FIXED, EMACS_FIXED, EmacsFixed)
9266 (EmacsFixedPrivate, EmacsFixedClass, struct _EmacsFixed)
9267 (struct _EmacsFixedClass, emacs_fixed_get_type):
9268 Move decls here from emacsgtkfixed.h, since they needn't be public.
9269 (emacs_fixed_get_type): Now static.
9270 (emacs_fixed_class_init): Omit unused local.
9271 (emacs_fixed_child_type): Remove; unused.
9272 * emacsgtkfixed.h (EMACS_TYPE_FIXED, EMACS_FIXED, EmacsFixed)
9273 (EmacsFixedPrivate, EmacsFixedClass, struct _EmacsFixed)
9274 (struct _EmacsFixedClass): Move to emacsgtkfixed.c.
9275 (EMACS_FIXED_CLASS, EMACS_IS_FIXED, EMACS_IS_FIXED_CLASS)
9276 (EMACS_FIXED_GET_CLASS): Remove; unused.
9277 * gtkutil.c (xg_create_frame_widgets) [!HAVE_GTK3]: Omit unused local.
9279 * keyboard.c (handle_async_input): Define only if SYNC_INPUT || SIGIO.
9280 Problem reported by Juanma Barranquero for Windows -Wunused-function.
9282 2012-04-22 Paul Eggert <eggert@cs.ucla.edu>
9284 Modernize and clean up gmalloc.c to assume C89 (Bug#9119).
9285 * gmalloc.c (_MALLOC_INTERNAL, _MALLOC_H, _PP, __ptr_t)
9286 (__malloc_size_t, __malloc_ptrdiff_t):
9287 Remove. All uses removed, replaced by the definiens if needed,
9288 since we can assume C89 or better now.
9289 Include <stdint.h>, for PTRDIFF_MAX, uintptr_t.
9290 (protect_malloc_state, align, get_contiguous_space)
9291 (malloc_atfork_handler_prepare, malloc_atfork_handler_parent)
9292 (malloc_atfork_handler_child, malloc_enable_thread)
9293 (malloc_initialize_1, __malloc_initialize, morecore_nolock)
9294 (_malloc_internal_nolock, _malloc_internal, malloc, _malloc)
9295 (_free, _realloc, _free_internal_nolock, _free_internal, free, cfree)
9296 (special_realloc, _realloc_internal_nolock, _realloc_internal)
9297 (realloc, calloc, __default_morecore, memalign, valloc, checkhdr)
9298 (freehook, mallochook, reallochook, mabort, mcheck, mprobe):
9299 Define using prototypes, not old style.
9300 (align, _malloc_internal_nolock, _free_internal_nolock, memalign):
9301 Don't assume ptrdiff_t and uintptr_t are no wider than unsigned long.
9302 (align): Don't assume that signed integer overflow wraps around.
9303 Omit unused local var.
9304 (malloc_initialize_1, morecore_nolock, _malloc_internal_nolock)
9305 (_free_internal_nolock, memalign, mallochook, reallochook):
9306 Omit no-longer-needed casts.
9307 (valloc): Use getpagesize, not __getpagesize.
9308 (MAGICWORD, MAGICFREE): Now randomish size_t values, not 32-bit.
9309 (struct hdr): The 'magic' member is now size_t, not unsigned long.
9311 * dbusbind.c (XD_DBUS_VALIDATE_OBJECT): Define only if needed.
9313 2012-04-22 Michael Albinus <michael.albinus@gmx.de>
9315 Move functions from C to Lisp. Make non-blocking method calls
9316 the default. Implement further D-Bus standard interfaces.
9318 * dbusbind.c (DBUS_NUM_MESSAGE_TYPES): Declare.
9319 (QCdbus_request_name_allow_replacement)
9320 (QCdbus_request_name_replace_existing)
9321 (QCdbus_request_name_do_not_queue)
9322 (QCdbus_request_name_reply_primary_owner)
9323 (QCdbus_request_name_reply_in_queue)
9324 (QCdbus_request_name_reply_exists)
9325 (QCdbus_request_name_reply_already_owner): Move to dbus.el.
9326 (QCdbus_registered_serial, QCdbus_registered_method)
9327 (QCdbus_registered_signal): New Lisp objects.
9328 (XD_DEBUG_MESSAGE): Use sizeof.
9329 (XD_MESSAGE_TYPE_TO_STRING, XD_OBJECT_TO_STRING)
9330 (XD_DBUS_VALIDATE_BUS_ADDRESS, XD_DBUS_VALIDATE_OBJECT)
9331 (XD_DBUS_VALIDATE_BUS_NAME, XD_DBUS_VALIDATE_PATH)
9332 (XD_DBUS_VALIDATE_INTERFACE, XD_DBUS_VALIDATE_MEMBER): New macros.
9333 (XD_CHECK_DBUS_SERIAL): Rename from CHECK_DBUS_SERIAL_GET_SERIAL.
9334 (xd_signature, xd_append_arg): Allow float for integer types.
9335 (xd_get_connection_references): New function.
9336 (xd_get_connection_address): Rename from xd_initialize.
9337 Return cached address.
9338 (xd_remove_watch): Do not unset $DBUS_SESSION_BUS_ADDRESS.
9339 (xd_close_bus): Rename from Fdbus_close_bus. Not needed on Lisp
9341 (Fdbus_init_bus): New optional arg PRIVATE. Cache address.
9342 Return number of refcounts.
9343 (Fdbus_get_unique_name): Make stronger parameter check.
9344 (Fdbus_message_internal): New defun.
9345 (Fdbus_call_method, Fdbus_call_method_asynchronously)
9346 (Fdbus_method_return_internal, Fdbus_method_error_internal)
9347 (Fdbus_send_signal, Fdbus_register_service)
9348 (Fdbus_register_signal, Fdbus_register_method): Move to dbus.el.
9349 (xd_read_message_1): Obey new structure of Vdbus_registered_objects.
9350 (xd_read_queued_messages): Obey new structure of Vdbus_registered_buses.
9351 (Vdbus_compiled_version, Vdbus_runtime_version)
9352 (Vdbus_message_type_invalid, Vdbus_message_type_method_call)
9353 (Vdbus_message_type_method_return, Vdbus_message_type_error)
9354 (Vdbus_message_type_signal): New defvars.
9355 (Vdbus_registered_buses, Vdbus_registered_objects_table):
9358 2012-04-22 Paul Eggert <eggert@cs.ucla.edu>
9360 Fix GC_MALLOC_CHECK debugging output on 64-bit hosts.
9361 * alloc.c (emacs_blocked_malloc) [GC_MALLOC_CHECK]:
9362 Do not assume ptrdiff_t is the same width as 'int'.
9364 * alloc.c: Handle unusual debugging option combinations.
9365 (GC_CHECK_MARKED_OBJECTS): Undef if ! GC_MARK_STACK,
9366 since the two debugging options are incompatible.
9367 (GC_MALLOC_CHECK): Similarly, undef if GC_CHECK_MARKED_OBJECTS
9369 (mem_init, mem_insert, mem_insert_fixup):
9370 Define if GC_MARK_STACK || GC_MALLOC_CHECK.
9371 (NEED_MEM_INSERT): Remove; no longer needed.
9373 2012-04-22 Leo Liu <sdl.web@gmail.com>
9375 * sysdep.c (list_system_processes): Support Darwin (Bug#5725).
9377 2012-04-22 Paul Eggert <eggert@cs.ucla.edu>
9379 * sysdep.c [__FreeBSD__]: Minor cleanups.
9380 (list_system_processes, system_process_attributes) [__FreeBSD__]:
9381 Use Emacs indenting style more consistently. Avoid some casts.
9382 Use 'double' consistently rather than mixing 'float' and 'double'.
9384 2012-04-21 Eduard Wiebe <usenet@pusto.de>
9386 * sysdep.c (list_system_processes, system_process_attributes):
9387 Add implementation for FreeBSD (Bug#5243).
9389 2012-04-21 Andreas Schwab <schwab@linux-m68k.org>
9391 * lisp.mk (lisp): Update.
9393 2012-04-20 Paul Eggert <eggert@cs.ucla.edu>
9395 * keyboard.c (process_pending_signals): Define only if SYNC_INPUT.
9396 It is never used otherwise.
9398 2012-04-20 Stefan Monnier <monnier@iro.umontreal.ca>
9400 * print.c (print_preprocess): Only check print_depth if print-circle
9402 (print_object): Check for cycles even when print-circle is nil and
9403 print-gensym is t, but only check print_depth if print-circle is nil.
9405 2012-04-20 Chong Yidong <cyd@gnu.org>
9407 * process.c (wait_reading_process_output): If EIO occurs on a pty,
9408 set the status to "failed" and ensure that sentinel is run.
9410 2012-04-20 Glenn Morris <rgm@gnu.org>
9412 * process.c (Fset_process_inherit_coding_system_flag)
9413 (Fset_process_query_on_exit_flag): Doc fix (mention return value).
9414 (Fmake_network_process, Fmake_serial_process): Doc fix.
9416 2012-04-20 Eli Zaretskii <eliz@gnu.org>
9418 * xdisp.c (string_buffer_position_lim): Limit starting position to
9420 (set_cursor_from_row): If called for a mode-line or header-line
9421 row, return zero immediately.
9422 (try_cursor_movement): If inside continuation line, don't back up
9423 farther than the first row after the header line, if any.
9424 Don't consider the header-line row as "partially visible", even if
9425 MATRIX_ROW_PARTIALLY_VISIBLE_P returns non-zero. (Bug#11261)
9427 2012-04-20 Atsuo Ohki <ohki@gssm.otsuka.tsukuba.ac.jp> (tiny change)
9429 * lread.c (lisp_file_lexically_bound_p): Fix hang at ";-*-\n"
9432 2012-04-20 Teodor Zlatanov <tzz@lifelogs.com>
9433 2012-04-18 Paul Eggert <eggert@cs.ucla.edu>
9435 configure: new option --enable-gcc-warnings (Bug#11207)
9436 * Makefile.in (C_WARNINGS_SWITCH): Remove.
9437 (WARN_CFLAGS, WERROR_CFLAGS): New macros.
9438 (ALL_CFLAGS): Use new macros rather than old.
9439 * process.c: Ignore -Wstrict-overflow to work around GCC bug 52904.
9440 * regex.c: Ignore -Wstrict-overflow. If !emacs, also ignore
9441 -Wunused-but-set-variable, -Wunused-function, -Wunused-macros,
9442 -Wunused-result, -Wunused-variable. This should go away once
9443 the Emacs and Gnulib regex code is merged.
9444 (xmalloc, xrealloc): Now static.
9446 2012-04-17 Paul Eggert <eggert@cs.ucla.edu>
9448 * dired.c (Fsystem_groups): Remove unused local.
9450 2012-04-17 Glenn Morris <rgm@gnu.org>
9452 * dired.c (Fsystem_users): Doc fix.
9454 2012-04-17 Dmitry Antipov <dmantipov@yandex.ru>
9456 * dired.c (Fsystem_users, Fsystem_groups): New functions. (Bug#7900)
9457 (syms_of_dired): Add them.
9459 2012-04-16 Paul Eggert <eggert@cs.ucla.edu>
9461 Fix minor alloc.c problems found by static checking.
9462 * alloc.c (_malloc_internal, _free_internal) [!DOUG_LEA_MALLOC]:
9463 New extern decls, to avoid calling undeclared functions.
9464 (dont_register_blocks): Define if ((!SYSTEM_MALLOC && !SYNC_INPUT)
9465 && GC_MALLOC_CHECK), not if ((GC_MARK_STACK || defined
9466 GC_MALLOC_CHECK) && GC_MALLOC_CHECK), to match when it's used.
9467 (NEED_MEM_INSERT): New macro.
9468 (mem_insert, mem_insert_fixup) [!NEED_MEM_INSERT]: Remove; unused.
9469 Remove one incorrect comment and fix another.
9471 Fix minor ralloc.c problems found by static checking.
9472 See http://lists.gnu.org/archive/html/emacs-devel/2011-12/msg00720.html
9473 * ralloc.c (ALIGNED, ROUND_TO_PAGE, HEAP_PTR_SIZE)
9474 (r_alloc_size_in_use, r_alloc_freeze, r_alloc_thaw): Remove; unused.
9475 (r_alloc_sbrk): Now static.
9477 Improve ralloc.c interface checking.
9478 See http://lists.gnu.org/archive/html/emacs-devel/2011-12/msg00720.html
9479 * buffer.c (ralloc_reset_variable, r_alloc, r_re_alloc)
9480 (r_alloc_free) [REL_ALLOC]: Move decls from here ...
9481 * lisp.h (r_alloc, r_alloc_free, r_re_alloc, r_alloc_reset_variable)
9482 [REL_ALLOC]: ... to here, to check interface.
9483 * m/ia64.h (r_alloc, r_alloc_free) [REL_ALLOC && !_MALLOC_INTERNAL]:
9484 Remove decls. This fixes an "It stinks!".
9486 * alloc.c (which_symbols): Fix alignment issue / type clash.
9488 2012-04-15 Andreas Schwab <schwab@linux-m68k.org>
9490 * lisp.h (struct Lisp_Symbol): Remove explicit padding.
9491 (struct Lisp_Misc_Any): Likewise.
9492 (struct Lisp_Free): Likewise.
9493 * alloc.c (union aligned_Lisp_Symbol): Define.
9494 (SYMBOL_BLOCK_SIZE, struct symbol_block): Use union
9495 aligned_Lisp_Symbol instead of struct Lisp_Symbol.
9496 (union aligned_Lisp_Misc): Define.
9497 (MARKER_BLOCK_SIZE, struct marker_block): Use union
9498 aligned_Lisp_Misc instead of union Lisp_Misc.
9499 (Fmake_symbol, allocate_misc, gc_sweep): Adjust.
9501 2012-04-14 Paul Eggert <eggert@cs.ucla.edu>
9503 Make GC_MAKE_GCPROS_NOOPS the default (Bug#9926).
9504 * lisp.h (GC_MARK_STACK): Default to GC_MAKE_GCPROS_NOOPS.
9505 * s/cygwin.h, s/darwin.h, s/freebsd.h, s/gnu.h, s/irix6-5.h, s/msdos.h:
9506 * s/netbsd.h, s/sol2-6.h:
9507 Remove definition of GC_MARK_STACK, since the default now works.
9508 * s/aix4-2.h, s/hpux10-20.h, s/unixware.h:
9509 Define GC_MARK_STACK to GC_USE_GCPROS_AS_BEFORE, since that's
9510 no longer the default.
9511 * s/gnu-linux.h (GC_MARK_STACK): Adjust to change in default.
9513 2012-04-14 Atsuo Ohki <ohki@gssm.otsuka.tsukuba.ac.jp> (tiny change)
9515 * lread.c (lisp_file_lexically_bound_p):
9516 Fix hang at ";-*-\n" (bug#11238).
9518 2012-04-14 Eli Zaretskii <eliz@gnu.org>
9520 * xdisp.c (find_last_unchanged_at_beg_row): Don't consider a row
9521 "unchanged" if its end.pos is beyond ZV. (Bug#11199)
9523 2012-04-14 Jan Djärv <jan.h.d@swipnet.se>
9525 * nsterm.m (constrainFrameRect): Always constrain when there is only
9526 one screen (Bug#10962).
9528 2012-04-13 Ken Brown <kbrown@cornell.edu>
9530 * s/cygwin.h (PTY_OPEN): Don't try to close a bogus file descriptor.
9532 2012-04-13 Reuben Thomas <rrt@sc3d.org>
9534 * indent.c (Fmove_to_column): Change interactive spec (Bug#739).
9536 2012-04-11 Daniel Colascione <dancol@dancol.org>
9538 * s/cygwin.h: The vfork the #define in cygwin.h was protecting
9539 against is gone. It's better to use vfork now so that when Cygwin
9540 gains a new, working vfork, we use it automatically (bug#10398).
9542 2012-04-11 Stefan Monnier <monnier@iro.umontreal.ca>
9544 * window.c (save_window_save): Obey window-point-insertion-type.
9546 2012-04-11 Glenn Morris <rgm@gnu.org>
9548 * Makefile.in (GNUSTEP_CFLAGS): Rename from C_SWITCH_X_SYSTEM.
9550 2012-04-11 Stefan Monnier <monnier@iro.umontreal.ca>
9552 * alloc.c (lisp_align_malloc): Remove unneeded prototype.
9554 2012-04-10 Jason S. Cornez <jcornez@ravenpack.com> (tiny change)
9556 * keyboard.c: Override inhibit-quit after the third C-g (bug#6585).
9557 (force_quit_count): New var.
9558 (handle_interrupt): Use it.
9560 2012-04-10 Juanma Barranquero <lekktu@gmail.com>
9562 * w32.c (w32_delayed_load): Record the full path of the library
9563 being loaded (bug#10424).
9565 2012-04-09 Glenn Morris <rgm@gnu.org>
9567 * doc.c (Fsnarf_documentation): Check variables, functions are bound,
9568 not just in the obarray, before snarfing them. (Bug#11036)
9570 * Makefile.in ($(leimdir)/leim-list.el):
9571 Pass EMACS rather than BUILT_EMACS.
9573 2012-04-09 Teodor Zlatanov <tzz@lifelogs.com>
9575 * process.c (make_process):
9576 * process.h: Add integer `gnutls_handshakes_tried' member to
9579 * gnutls.h: Add `GNUTLS_EMACS_HANDSHAKES_LIMIT' upper limit.
9580 Add convenience `GNUTLS_LOG2i' macro.
9582 * gnutls.c (gnutls_log_function2i): Convenience log function.
9583 (emacs_gnutls_read): Use new log functions,
9584 `gnutls_handshakes_tried' process member, and
9585 `GNUTLS_EMACS_HANDSHAKES_LIMIT' to limit the number of handshake
9586 attempts per process (connection).
9588 2012-04-09 Chong Yidong <cyd@gnu.org>
9590 * eval.c (Fuser_variable_p, user_variable_p_eh)
9591 (lisp_indirect_variable): Functions deleted.
9592 (Fdefvar): Caller changed.
9594 * callint.c (Finteractive, Fcall_interactively):
9595 * minibuf.c (Fread_variable): Callers changed.
9597 2012-04-09 Eli Zaretskii <eliz@gnu.org>
9599 * xdisp.c (set_cursor_from_row): If the display string appears in
9600 the buffer at position that is closer to point than the position
9601 after the display string, display the cursor on the first glyph of
9602 the display string. Fixes cursor display when a 'display' text
9603 property immediately follows invisible text. (Bug#11094)
9605 2012-04-09 Paul Eggert <eggert@cs.ucla.edu>
9607 composite.c: use 'double' consistently
9608 * composite.c (get_composition_id): Use 'double' consistently
9609 instead of converting 'float' to 'double' and vice versa; this is
9610 easier to understand and avoids a GCC warning.
9612 2012-04-09 Glenn Morris <rgm@gnu.org>
9614 * Makefile.in: Generate leim-list with bootstrap-emacs, in
9615 preparation for dumping it with emacs. (Bug#4789)
9616 (leimdir): New variable.
9617 ($(leimdir)/leim-list.el): New rule.
9618 (emacs$(EXEEXT)): Depend on leim-list.el.
9620 * buffer.c (Qucs_set_table_for_input): Remove. (Bug#9821)
9621 (Fget_buffer_create): Don't call Qucs_set_table_for_input.
9622 (init_buffer_once, syms_of_buffer): Remove Qucs_set_table_for_input.
9624 2012-04-08 Andreas Schwab <schwab@linux-m68k.org>
9626 * lisp.h (struct Lisp_Symbol): Add explicit padding to ensure
9629 2012-04-07 Juanma Barranquero <lekktu@gmail.com>
9631 * xml.c (init_libxml2_functions) [WINDOWSNT]:
9632 Remove unused local variable.
9634 2012-04-07 Paul Eggert <eggert@cs.ucla.edu>
9636 Avoid unnecessary pointer scanning in garbage collection (Bug#10780).
9637 * alloc.c (POINTERS_MIGHT_HIDE_IN_OBJECTS): New macro.
9638 (mark_memory): Mark Lisp_Objects only if pointers might hide in
9639 objects, as mark_maybe_pointer will catch them otherwise.
9640 (GC_LISP_OBJECT_ALIGNMENT): Remove; no longer needed.
9641 * s/gnu-linux.h (GC_LISP_OBJECT_ALIGNMENT) [__mc68000__]: Likewise.
9643 2012-04-07 Paul Eggert <eggert@cs.ucla.edu>
9645 Fix typo that broke non-Windows builds.
9646 * xml.c (libxml2_loaded_p) [!!WINDOWSNT]: 'inine' -> 'inline'.
9648 2012-04-07 Eli Zaretskii <eliz@gnu.org>
9650 Support building on MS-Windows with libxml2.
9652 * makefile.w32-in (OBJ2): Add xml.$(O).
9653 (GLOBAL_SOURCES): Add xml.c.
9654 ($(BLD)/xml.$(O)): New dependency list.
9656 * xml.c (DEF_XML2_FN, LOAD_XML2_FN) [WINDOWSNT]: New macros.
9657 (fn_htmlReadMemory, fn_xmlReadMemory, fn_xmlDocGetRootElement)
9658 (fn_xmlFreeDoc, fn_xmlCleanupParser, fn_xmlCheckVersion)
9659 [!WINDOWSNT]: New macros.
9660 (init_libxml2_functions, libxml2_loaded_p): New functions.
9661 (parse_region): Call fn_xmlCheckVersion instead of using the macro
9662 LIBXML_TEST_VERSION. Call libxml2 functions via the fn_* macros.
9663 (xml_cleanup_parser): New function, export for fn_xmlCleanupParser.
9664 Calls xmlCleanupParser only if libxml2 was loaded (or statically
9666 (Flibxml_parse_html_region, Flibxml_parse_xml_region):
9667 Call init_libxml2_functions before calling libxml2 functions.
9668 (syms_of_xml) <Qlibxml2_dll>: DEFSYM it.
9670 * emacs.c: Don't include libxml/parser.h.
9671 (shut_down_emacs): Call xml_cleanup_parser, instead of calling
9672 xmlCleanupParser directly.
9674 * lisp.h [HAVE_LIBXML2]: Add prototype for xml_cleanup_parser.
9676 2012-04-07 Eli Zaretskii <eliz@gnu.org>
9678 * indent.c (Fvertical_motion): If there is a display string at
9679 point, use it.vpos to compute how many lines to backtrack after
9680 move_it_to point. (Bug#11133)
9682 2012-04-06 Eli Zaretskii <eliz@gnu.org>
9684 * buffer.h (FETCH_CHAR, FETCH_MULTIBYTE_CHAR):
9685 * character.h (STRING_CHAR, STRING_CHAR_AND_LENGTH): Add comments
9686 about subtle differences between FETCH_CHAR* and STRING_CHAR*
9687 macros related to unification of CJK characters. For the details,
9688 see the discussion following the message here:
9689 http://debbugs.gnu.org/cgi/bugreport.cgi?bug=11073#14.
9691 2012-04-04 Chong Yidong <cyd@gnu.org>
9693 * keyboard.c (Vdelayed_warnings_list): Doc fix.
9695 2012-04-01 Eli Zaretskii <eliz@gnu.org>
9697 * w32menu.c (simple_dialog_show, add_menu_item): Use SAFE_ALLOCA
9698 instead of alloca. (Bug#11138)
9700 2012-04-01 Andreas Schwab <schwab@linux-m68k.org>
9702 * w32menu.c (is_simple_dialog): Properly check lisp types.
9705 2012-03-31 Eli Zaretskii <eliz@gnu.org>
9707 * xdisp.c (move_it_by_lines): When DVPOS is positive, and the
9708 position we get to after a call to move_it_to fails the
9709 IS_POS_VALID_AFTER_MOVE_P test, move to the next buffer position
9710 only if we wind up in a string from display property. (Bug#11063)
9712 * window.c (Fdelete_other_windows_internal): Invalidate the row
9713 and column information about mouse highlight, so that redisplay
9714 restores it after reallocating the glyph matrices. (Bug#7464)
9716 * xdisp.c (set_cursor_from_row): If `cursor' property on a display
9717 string comes from a `display' text property, use the buffer
9718 position of that property as if we actually saw that position in
9720 (move_it_by_lines): Remove the assertion that
9721 "it->current_x == 0 && it->hpos == 0" which can be legitimately
9722 violated when there's a before-string at the beginning of a line.
9725 2012-03-30 Eli Zaretskii <eliz@gnu.org>
9727 * xdisp.c (append_space_for_newline): If the default face was
9728 remapped, use the remapped face for the appended newline.
9729 (extend_face_to_end_of_line): Use the remapped default face for
9730 extending the face to the end of the line.
9731 (display_line): Call extend_face_to_end_of_line when the default
9732 face was remapped. (Bug#11068)
9734 2012-03-29 Eli Zaretskii <eliz@gnu.org>
9736 * s/ms-w32.h: Discourage from defining HAVE_GETCWD.
9738 2012-03-28 Stefan Monnier <monnier@iro.umontreal.ca>
9740 * keyboard.c (safe_run_hooks_error): Don't unquote strings.
9742 2012-03-27 Glenn Morris <rgm@gnu.org>
9744 * search.c (Fword_search_backward_lax, Fword_search_forward_lax):
9747 2012-03-26 Kenichi Handa <handa@m17n.org>
9749 * dispextern.h (struct glyph): Fix previous change. Change the
9750 bit length of glyphless.ch to 25 (Bug#11082).
9752 2012-03-26 Chong Yidong <cyd@gnu.org>
9754 * keyboard.c (Vselection_inhibit_update_commands): New variable.
9755 (command_loop_1): Use it; inhibit selection update for
9756 handle-select-window too (Bug#8996).
9758 2012-03-25 Fabrice Popineau <fabrice.popineau@supelec.fr>
9760 * w32heap.c (_heap_init, _heap_term): Remove dead MSVC-specific code.
9762 2012-03-25 Kenichi Handa <handa@m17n.org>
9764 * dispextern.h (struct glyph): Change the bit length of
9765 glyphless.ch to 22 to make the member glyphless fit in 32 bits.
9767 2012-03-24 Eli Zaretskii <eliz@gnu.org>
9769 * s/ms-w32.h (tzname): Include time.h before redirecting to
9770 _tzname. Fixes the MSVC build. (Bug#9960)
9772 2012-03-24 Andreas Schwab <schwab@linux-m68k.org>
9774 * xdisp.c (produce_glyphless_glyph): Limit length of acronym to 6
9777 * xterm.c (XTread_socket): Only modify handling_signal if
9778 !SYNC_INPUT. (Bug#11080)
9780 2012-03-23 Eli Zaretskii <eliz@gnu.org>
9782 * bidi.c (bidi_fetch_char): Use STRING_CHAR_AND_LENGTH instead of
9783 FETCH_MULTIBYTE_CHAR followed by CHAR_BYTES. Prevents crashes
9784 when fetching a multibyte character consumes more bytes than
9785 CHAR_BYTES returns, due to unification of CJK characters in
9786 string_char. (Bug#11073)
9788 2012-03-23 Troels Nielsen <bn.troels@gmail.com> (tiny change)
9790 * process.c (wait_reading_process_output): Handle pty disconnect
9791 by refraining from sending oneself a SIGCHLD (bug#10933).
9793 2012-03-22 Chong Yidong <cyd@gnu.org>
9795 * dispextern.h (struct it): New member string_from_prefix_prop_p.
9797 * xdisp.c (push_prefix_prop): Rename from push_display_prop.
9798 Mark string as coming from a prefix property.
9799 (handle_face_prop): Use default face for prefix strings (Bug#4281).
9800 (pop_it, reseat_1): Save and restore string_from_prefix_prop_p.
9802 2012-03-21 Chong Yidong <cyd@gnu.org>
9804 * xfaces.c (Vface_remapping_alist): Doc fix.
9806 2012-03-20 Eli Zaretskii <eliz@gnu.org>
9808 * w32proc.c (Fw32_set_console_codepage)
9809 (Fw32_set_console_output_codepage, Fw32_get_codepage_charset):
9812 2012-03-20 Chong Yidong <cyd@gnu.org>
9814 * dispnew.c (Fredisplay, Vredisplay_preemption_period): Update doc
9815 to reflect default non-nil value of redisplay-dont-pause.
9817 2012-03-19 Kenichi Handa <handa@m17n.org>
9819 * ftfont.c (ftfont_drive_otf): Mask bits of character code to make
9820 it fit in a valid range (Bug#11003).
9822 2012-03-18 Eli Zaretskii <eliz@gnu.org>
9824 * xdisp.c (cursor_row_p): Even if the glyph row ends in a string
9825 that is not from display property, accept the row as a "cursor
9826 row" if one of the string's character has a non-nil `cursor'
9827 property. Fixes cursor positioning when there are newlines in
9828 overlay strings, e.g. in icomplete.el. (Bug#11035)
9830 2012-03-12 Paul Eggert <eggert@cs.ucla.edu>
9832 * buffer.c (compare_overlays): Don't assume args differ (Bug#6830).
9834 2012-03-12 Chong Yidong <cyd@gnu.org>
9836 * eval.c (inhibit_lisp_code): Rename from
9837 inhibit_window_configuration_change_hook; move from window.c.
9839 * xfns.c (unwind_create_frame_1, Fx_create_frame):
9840 * window.c (run_window_configuration_change_hook)
9841 (syms_of_window): Callers changed.
9843 2012-03-11 Chong Yidong <cyd@gnu.org>
9845 * keymap.c (Fkey_description): Doc fix (Bug#9700).
9847 * editfns.c (Fconstrain_to_field): Doc fix (Bug#9452).
9849 2012-03-10 Chong Yidong <cyd@gnu.org>
9851 * frame.c (other_visible_frames): Don't assume the selected frame
9852 is visible (Bug#10955).
9854 2012-03-09 Stefan Monnier <monnier@iro.umontreal.ca>
9856 * buffer.c (compare_overlays): Avoid qsort's instability (bug#6830).
9858 2012-03-08 Jan Djärv <jan.h.d@swipnet.se>
9860 * gtkutil.c (x_wm_set_size_hint): Use one row in call to
9861 FRAME_TEXT_LINES_TO_PIXEL_HEIGHT so base_height is greater than
9864 2012-03-03 Glenn Morris <rgm@gnu.org>
9866 * alloc.c (Fgarbage_collect, misc-objects-consed): Doc fixes.
9868 2012-03-02 Eli Zaretskii <eliz@gnu.org>
9870 * xdisp.c (try_window_reusing_current_matrix): Don't move cursor
9871 position past the first glyph_row that ends at ZV. (Bug#10902)
9872 (redisplay_window, next_element_from_string): Fix typos in
9874 (redisplay_window): Pass to move_it_vertically the margin in
9875 pixels, not in screen lines.
9877 2012-03-02 Glenn Morris <rgm@gnu.org>
9879 * buffer.c (buffer-list-update-hook): Doc fix.
9881 2012-02-29 Eli Zaretskii <eliz@gnu.org>
9883 * xdisp.c (get_overlay_strings_1): Under bidi redisplay, call
9884 push_it before setting up the iterator for the first overlay
9885 string, even if we have an empty string loaded.
9886 (next_overlay_string): If there's an empty string on the iterator
9887 stack, pop the stack. (Bug#10903)
9889 2012-02-25 Paul Eggert <eggert@cs.ucla.edu>
9891 Generalize fix for crash due to non-contiguous EMACS_INT (Bug#10780).
9892 Suggested by Stefan Monnier in
9893 <http://lists.gnu.org/archive/html/emacs-devel/2012-02/msg00692.html>.
9894 * alloc.c (widen_to_Lisp_Object): New static function.
9895 (mark_memory): Also mark Lisp_Objects by fetching pointer words
9896 and widening them to Lisp_Objects. This would work even if
9897 USE_LSB_TAG is defined and wide integers are used, which might
9898 happen in a future version of Emacs.
9900 2012-02-25 Chong Yidong <cyd@gnu.org>
9902 * fileio.c (Ffile_selinux_context, Fset_file_selinux_context):
9905 * xselect.c (Fx_selection_exists_p): Doc fix.
9906 (x_clipboard_manager_save_all): Print an informative message
9907 before saving to clipboard manager.
9909 2012-02-24 Chong Yidong <cyd@gnu.org>
9911 * keyboard.c (process_special_events): Handle all X selection
9912 requests in kbd_buffer, not just the next one (Bug#8869).
9914 2012-02-23 Chong Yidong <cyd@gnu.org>
9916 * xfns.c (Fx_create_frame): Avoid window-configuration-change-hook
9917 call when setting menu-bar-lines and tool-bar-lines parameters.
9918 (unwind_create_frame_1): New helper function.
9920 * window.c (inhibit_window_configuration_change_hook): New var.
9921 (run_window_configuration_change_hook): Obey it.
9922 (syms_of_window): Initialize it.
9924 2012-02-22 Chong Yidong <cyd@gnu.org>
9926 * xterm.c (x_draw_image_relief): Add missing type check for
9927 Vtool_bar_button_margin (Bug#10743).
9929 2012-02-21 Chong Yidong <cyd@gnu.org>
9931 * fileio.c (Vfile_name_handler_alist): Doc fix.
9933 * buffer.c (Fget_file_buffer): Protect against invalid file
9934 handler return value.
9936 2012-02-20 Paul Eggert <eggert@cs.ucla.edu>
9938 * .gdbinit (xreload): Don't assume EMACS_INT fits in 'long'
9939 when computing $valmask.
9941 Fix crash due to non-contiguous EMACS_INT (Bug#10780).
9942 * lisp.h (VALBITS): Move definition up, so that USE_LSB_TAG can use it.
9943 (USE_LSB_TAG): Do not define if UINTPTR_MAX >> VALBITS == 0.
9944 It's useless in that case, and it can cause problems on hosts
9945 that allocate halves of EMACS_INT values separately.
9946 Reported by Dan Horák. Diagnosed by Andreas Schwab in
9947 <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=10780#30>.
9948 * mem-limits.h (EXCEEDS_LISP_PTR): Define to 0 on hosts where
9949 UINTPTR_MAX >> VALBITS == 0. This is required by the above change;
9950 it avoids undefined behavior on hosts where shifting right by more
9951 than the word width has undefined behavior.
9953 2012-02-19 Chong Yidong <cyd@gnu.org>
9955 * fileio.c (Ffile_name_directory, Ffile_name_nondirectory)
9956 (Funhandled_file_name_directory, Ffile_name_as_directory)
9957 (Fdirectory_file_name, Fexpand_file_name)
9958 (Fsubstitute_in_file_name): Protect against invalid file handler
9959 return values (Bug#10845).
9961 2012-02-18 Eli Zaretskii <eliz@gnu.org>
9963 * .gdbinit (pitx): Fix incorrect references to fields of the
9966 2012-02-17 Chong Yidong <cyd@gnu.org>
9968 * syntax.c (Fscan_lists): Doc fix (Bug#10833).
9970 2012-02-15 Paul Eggert <eggert@cs.ucla.edu>
9972 * image.c (MAX_IMAGE_SIZE): Increase from 6.0 to 10.0; see
9973 <http://lists.gnu.org/archive/html/emacs-devel/2012-02/msg00540.html>.
9975 2012-02-15 Chong Yidong <cyd@gnu.org>
9977 * eval.c (Fdefvar, Fdefconst): Doc fix; note that the variable is
9978 marked as special. Also, starting docstrings with * is obsolete.
9980 2012-02-13 Andreas Schwab <schwab@linux-m68k.org>
9982 * gnutls.c (emacs_gnutls_write): Fix last change.
9984 2012-02-13 Lars Ingebrigtsen <larsi@gnus.org>
9986 * gnutls.c (emacs_gnutls_write): Set errno appropriately for
9989 2012-02-13 Stefan Monnier <monnier@iro.umontreal.ca>
9991 * keymap.c (Fsingle_key_description): Handle char ranges.
9993 2012-02-12 Chong Yidong <cyd@gnu.org>
9995 * xdisp.c (handle_stop): Avoid assigning -1 to it->face_id here,
9996 as that creates a dangerous corner case.
9998 * window.c (Fdelete_window_internal): Invalidate the mouse
9999 highlight (Bug#9904).
10001 2012-02-12 Glenn Morris <rgm@gnu.org>
10003 * xselect.c (Fx_own_selection_internal)
10004 (Fx_get_selection_internal, Fx_disown_selection_internal)
10005 (Fx_selection_owner_p, Fx_selection_exists_p): Doc fixes.
10006 * nsselect.m (Fx_own_selection_internal)
10007 (Fx_disown_selection_internal, Fx_selection_exists_p)
10008 (Fx_selection_owner_p, Fx_get_selection_internal):
10009 Sync docs and argument specs with the xselect.c versions.
10011 2012-02-11 Lars Ingebrigtsen <larsi@gnus.org>
10013 * gnutls.c (emacs_gnutls_write): Don't infloop if sendto fails.
10015 2012-02-11 Eli Zaretskii <eliz@gnu.org>
10017 * w32select.c (Fx_selection_exists_p): Sync doc string and
10018 argument list with xselect.c. (Bug#10783)
10020 * w16select.c (Fx_selection_exists_p): Sync doc string and
10021 argument list with xselect.c. (Bug#10783)
10023 2012-02-10 Glenn Morris <rgm@gnu.org>
10025 * fns.c (Fsecure_hash): Doc fix.
10027 2012-02-09 Kenichi Handa <handa@m17n.org>
10029 * coding.c (produce_chars): Fix updating of src_end (Bug#10701).
10031 2012-02-07 Chong Yidong <cyd@gnu.org>
10033 * buffer.c (Fbuffer_local_variables)
10034 (buffer_lisp_local_variables): Handle unbound vars correctly;
10035 don't let Qunbound leak into Lisp.
10037 2012-02-07 Glenn Morris <rgm@gnu.org>
10039 * image.c (Fimagemagick_types): Doc fix.
10041 * image.c (imagemagick-render-type): Change it from a lisp object
10042 to an integer. Move the doc here from the lisp manual.
10043 Treat all values not equal to 0 the same.
10045 2012-02-06 Chong Yidong <cyd@gnu.org>
10047 * doc.c (store_function_docstring): Avoid applying docstring of
10048 alias to base function (Bug#2603).
10050 2012-02-04 Andreas Schwab <schwab@linux-m68k.org>
10052 * .gdbinit (pp1, pv1): Remove redundant defines.
10055 2012-02-04 Chong Yidong <cyd@gnu.org>
10057 * nsterm.m: Declare a global (Bug#10694).
10059 2012-02-04 Eli Zaretskii <eliz@gnu.org>
10061 * w32.c (get_emacs_configuration_options):
10062 Include --enable-checking, if specified, in the return value.
10064 2012-02-04 Martin Rudalics <rudalics@gmx.at>
10066 * dispnew.c (change_frame_size_1): Calculate new_frame_total_cols
10067 after rounding frame sizes. (Bug#9723)
10069 2012-02-04 Eli Zaretskii <eliz@gnu.org>
10071 * keyboard.c (adjust_point_for_property): Don't position point
10072 before BEGV. (Bug#10696)
10074 2012-02-03 Paul Eggert <eggert@cs.ucla.edu>
10076 Handle overflow when computing char display width (Bug#9496).
10077 * character.c (char_width): Return EMACS_INT, not int.
10078 (char_width, c_string_width): Check for overflow when
10079 computing the width; this is possible now that individual
10080 characters can have unbounded width. Problem introduced
10081 by merge from Emacs 23 on 2012-01-19.
10083 2012-02-02 Michael Albinus <michael.albinus@gmx.de>
10085 * dbusbind.c (Fdbus_register_method): Mention the return value
10086 :ignore in the docstring.
10088 2012-02-02 Glenn Morris <rgm@gnu.org>
10090 * callproc.c (Fcall_process, Fcall_process_region): Doc fix.
10092 * nsterm.m (syms_of_nsterm) <x-toolkit-scroll-bars>:
10093 Unconditionally set to t. (Bug#10673)
10094 * nsterm.m (syms_of_nsterm) <x-toolkit-scroll-bars>:
10095 * w32term.c (syms_of_w32term) <x-toolkit-scroll-bars>:
10096 * xterm.c (syms_of_xterm) <x-toolkit-scroll-bars>: Doc fix.
10098 2012-02-02 Kenichi Handa <handa@m17n.org>
10100 (x_produce_glyphs): Cancel previous change. If cmp->glyph_len is
10101 0, do not call append_composite_glyph.
10103 2012-02-02 Kenichi Handa <handa@m17n.org>
10105 * xdisp.c (BUILD_COMPOSITE_GLYPH_STRING): Initialize first_s to
10107 (x_produce_glyphs): If the component of a composition is a null
10108 string, set it->pixel_width to 1 to avoid zero-width glyph.
10110 2012-02-01 Eli Zaretskii <eliz@gnu.org>
10112 * ralloc.c (resize_bloc, r_alloc_sbrk): Don't call memmove if its
10113 first 2 arguments are identical. This makes inserting large
10114 output from a subprocess an order of magnitude faster on
10115 MS-Windows, where all sbrk'ed memory is always contiguous.
10117 2012-01-31 Glenn Morris <rgm@gnu.org>
10119 * nsterm.m (syms_of_nsterm) <x-toolkit-scroll-bars>:
10120 * w32term.c (syms_of_w32term) <x-toolkit-scroll-bars>:
10121 * xterm.c (syms_of_xterm) <x-toolkit-scroll-bars>: Sync docs.
10123 2012-01-29 Glenn Morris <rgm@gnu.org>
10125 * gnutls.c (syms_of_gnutls): More doc (from etc/NEWS).
10127 2012-01-28 Samuel Thibault <sthibault@debian.org> (tiny change)
10129 * s/gnu.h: Define POSIX_SIGNALS (Bug#10552).
10131 2012-01-28 Chong Yidong <cyd@gnu.org>
10133 * minibuf.c (syms_of_minibuf): Doc fix (Bug#10550).
10135 2012-01-26 Chong Yidong <cyd@gnu.org>
10137 * keyboard.c (Vecho_keystrokes): Document zero value (Bug#10503).
10139 * search.c (Fsearch_forward, Fsearch_backward): Document negative
10140 repeat counts (Bug#10507).
10142 2012-01-26 Glenn Morris <rgm@gnu.org>
10144 * lread.c (syms_of_lread): Doc fix.
10146 2012-01-25 HIROSHI OOTA <nil@mad.dog.cx> (tiny change)
10148 * coding.c (encode_designation_at_bol): Change return value to
10151 2012-01-25 Chong Yidong <cyd@gnu.org>
10153 * eval.c (Fuser_variable_p): Doc fix; mention custom-variable-p.
10155 2012-01-21 Chong Yidong <cyd@gnu.org>
10157 * floatfns.c (Fcopysign): Make the second argument non-optional,
10158 since nil is not allowed anyway.
10160 2012-01-21 Andreas Schwab <schwab@linux-m68k.org>
10162 * process.c (read_process_output): Use p instead of XPROCESS (proc).
10163 (send_process): Likewise.
10165 2012-01-19 Martin Rudalics <rudalics@gmx.at>
10167 * window.c (save_window_save, Fcurrent_window_configuration)
10168 (Vwindow_persistent_parameters): Do not use Qstate.
10169 Rewrite doc-strings.
10171 2012-01-19 Kenichi Handa <handa@m17n.org>
10173 * character.c (char_width): New function.
10174 (Fchar_width, c_string_width, lisp_string_width):
10175 Use char_width (Bug#9496).
10177 2012-01-16 Martin Rudalics <rudalics@gmx.at>
10179 * window.c (Vwindow_persistent_parameters): New variable.
10180 (Fset_window_configuration, save_window_save): Handle persistent
10183 2012-01-14 Eli Zaretskii <eliz@gnu.org>
10185 * w32fns.c (signal_user_input): Don't do a QUIT, to avoid
10186 thrashing the stack of the thread. (Bug#9087)
10188 2012-01-12 Paul Eggert <eggert@cs.ucla.edu>
10190 * xdisp.c (rows_from_pos_range): Add parens as per gcc -Wparentheses.
10192 2012-01-11 Eli Zaretskii <eliz@gnu.org>
10194 * xdisp.c (rows_from_pos_range): Handle the case where the
10195 highlight ends on a newline. (Bug#10464)
10196 (mouse_face_from_buffer_pos): Fix off-by-one error in calculating
10197 he end column for display of highlight that ends on a newline
10200 2012-01-11 Glenn Morris <rgm@gnu.org>
10202 * lread.c (init_lread): If no-site-lisp, remove site-lisp dirs
10203 from load-path also when installation-directory is nil. (Bug#10208)
10205 2012-01-10 Glenn Morris <rgm@gnu.org>
10207 * emacs.c (syms_of_emacs) <installation-directory>: Doc fix.
10209 * epaths.in (PATH_LOADSEARCH, PATH_EXEC, PATH_DATA, PATH_DOC):
10210 Update template values to be closer to their typical values these days.
10212 2012-01-09 Eli Zaretskii <eliz@gnu.org>
10214 * xdisp.c (rows_from_pos_range): Accept additional argument
10215 DISP_STRING, and accept any glyph in a row whose object is that
10216 string as eligible for mouse highlight. Fixes mouse highlight of
10217 display strings from overlays. (Bug#10464)
10219 2012-01-07 Paul Eggert <eggert@cs.ucla.edu>
10221 emacs: fix an auto-save permissions race condition (Bug#10400)
10222 * fileio.c (auto_saving_dir_umask): New static var.
10223 (Fmake_directory_internal): Use it.
10224 (do_auto_save_make_dir): Set it, instead of invoking chmod after
10225 creating the directory. The old code temporarily assigns
10226 too-generous permissions to the directory.
10227 (do_auto_save_eh): Clear it.
10228 (Fdo_auto_save): Catch all errors, not just file errors, so
10229 that the var is always cleared.
10231 2012-01-07 Eli Zaretskii <eliz@gnu.org>
10233 * search.c (scan_buffer): Pass character positions to
10234 know_region_cache, not byte positions. (Bug#6540)
10236 2012-01-07 LynX <_LynX@bk.ru> (tiny change)
10238 * w32.c (sys_rename): Report EXDEV when rename of a directory
10239 fails because the target is on another logical disk. (Bug#10284)
10241 2012-01-07 David Benjamin <davidben@mit.edu> (tiny change)
10243 * xterm.c (x_embed_request_focus): New function.
10245 * xterm.h: Add prototype.
10247 * xfns.c (Fx_focus_frame): Use it for embedded frames (Bug#9977).
10249 2012-01-05 Glenn Morris <rgm@gnu.org>
10251 * emacs.c (emacs_copyright): Update short copyright year to 2012.
10253 2012-01-01 Eli Zaretskii <eliz@gnu.org>
10255 * gnutls.c (init_gnutls_functions): Load gnutls_check_version.
10256 Load gnutls_transport_set_lowat only if GnuTLS version is below
10258 (emacs_gnutls_handshake): Call gnutls_transport_set_lowat only for
10259 GnuTLS versions below 2.11.1.
10261 2011-12-31 Antoine Levitt <antoine.levitt@gmail.com>
10263 * xdisp.c (syms_of_xdisp) <window-scroll-functions>: Add warning
10264 to the doc string advising against its use for altering the way
10265 windows are scrolled.
10267 2011-12-28 Kenichi Handa <handa@m17n.org>
10269 * coding.c (Fdefine_coding_system_internal): Make an utf-8 base
10270 coding-system ASCII compatible only when it does not produce BOM
10271 on encoding (Bug#10383).
10273 2011-12-26 Jan Djärv <jan.h.d@swipnet.se>
10275 * xmenu.c (x_menu_wait_for_event): Use xg_select for Gtk3 so menus
10277 (create_and_show_popup_menu): Always use menu_position_func for
10280 2011-12-24 Andreas Schwab <schwab@linux-m68k.org>
10282 * callint.c (Fcall_interactively): Don't truncate prompt string.
10284 2011-12-23 Eli Zaretskii <eliz@gnu.org>
10286 * xdisp.c (handle_invisible_prop): Handle correctly an invisible
10287 property that ends at ZV, so that the bidi iteration could be
10288 resumed from there (after widening). (Bug#10360)
10290 2011-12-22 Jan Djärv <jan.h.d@swipnet.se>
10292 * nsfont.m (ns_spec_to_descriptor): Do not autorelease fdesc.
10294 2011-12-21 Jan Djärv <jan.h.d@swipnet.se>
10296 * nsterm.m (x_free_frame_resources):
10297 Release f->output_data.ns->miniimage.
10298 (ns_index_color): Fix indentation. Do not retain
10299 color_table->colors[i].
10301 * nsmenu.m (ns_update_menubar): Call free_menubar_widget_value_tree
10304 * nsfns.m (x_set_background_color): Assign return value from
10305 ns_index_color to face-background instead of NSColor*.
10306 (ns_implicitly_set_icon_type): Fix indentation.
10307 Change assignment in for loop to comparison.
10309 * emacs.c (ns_pool): New variable.
10310 (main): Assign ns_pool.
10311 (Fkill_emacs): Call ns_release_autorelease_pool.
10313 * nsfont.m (ns_spec_to_descriptor): Fix indentation,
10314 autorelease fdesc, release fdAttrs and tdict.
10315 (ns_get_covering_families): Release charset.
10316 (ns_findfonts): Release NSFontDescriptor created with new.
10317 (ns_uni_to_glyphs): Fix indentation.
10318 (setString): Release attrStr before assigning new value.
10320 2011-12-18 Jan Djärv <jan.h.d@swipnet.se>
10322 * nsmenu.m (NSMenuDidBeginTrackingNotification): Declare if OSX < 10.5
10324 (trackingNotification): Surround with ifdef NS_IMPL_COCOA.
10325 (syms_of_nsmenu): Set trackingMenu to 1 if not NS_IMPL_COCOA.
10327 2011-12-18 David Reitter <reitter@cmu.edu>
10329 * nsterm.m (ns_term_init): Subscribe for notifications
10330 NSMenuDidBeginTrackingNotification and NSMenuDidEndTrackingNotification
10331 to method trackingNotification in EmacsMenu.
10333 * nsmenu.m (trackingMenu): New variable.
10334 (trackingNotification): New method (from Aquamacs).
10335 (menuNeedsUpdate): Expand comment and return if trackingMenu is 0,
10336 from Aquamacs (Bug#7030).
10338 2011-12-18 Jan Djärv <jan.h.d@swipnet.se>
10340 * nsselect.m (CUT_BUFFER_SUPPORT): Remove define.
10341 (symbol_to_nsstring): Fix indentation.
10342 (ns_symbol_to_pb): New function.
10343 (Fns_get_selection_internal): Rename from Fns_get_cut_buffer_internal.
10344 (Fns_rotate_cut_buffers_internal): Remove.
10345 (Fns_store_selection_internal): Rename from
10346 Fns_store_cut_buffer_internal.
10347 (ns_get_foreign_selection, Fx_own_selection_internal)
10348 (Fx_disown_selection_internal, Fx_selection_exists_p)
10349 (Fns_get_selection_internal, Fns_store_selection_internal):
10350 Use ns_symbol_to_pb and check if return value is nil.
10351 (syms_of_nsselect): Remove ifdef CUT_BUFFER_SUPPORT. Remove defsubr
10352 Sns_rotate_cut_buffers_internal. Sns_get_cut_buffer_internal
10353 renamed to Sns_get_selection_internal, Sns_store_cut_buffer_internal
10354 renamed to Sns_store_selection_internal.
10355 (ns_handle_selection_request): Move code to Fx_own_selection_internal
10356 and remove this function.
10357 (ns_handle_selection_clear): Remove, never used.
10358 (Fx_own_selection_internal): Move code from ns_handle_selection_request
10361 2011-12-17 Ken Brown <kbrown@cornell.edu>
10363 * fileio.c (check_writable) [CYGWIN]: Return non-zero if UID or
10364 GID is unknown (Bug#10257).
10366 2011-12-17 Paul Eggert <eggert@cs.ucla.edu>
10368 * s/gnu-linux.h: Fix mark_memory typo (Bug#10286).
10369 (GC_MARK_SECONDARY_STACK): Omit removed 3rd arg to mark_memory,
10370 which caused a build failure on GNU/Linux IA-64. This problem was
10371 introduced by my 2011-10-07 patch.
10373 2011-12-15 Juri Linkov <juri@jurta.org>
10375 * image.c (imagemagick_error): New function. (Bug#10112)
10376 (imagemagick_load_image): Comment out `MagickSetResolution' call.
10377 Use `imagemagick_error' where ImageMagick functions return
10379 (Fimagemagick_types): Add `Fnreverse' to return the list in the
10382 2011-12-15 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
10384 * xftfont.c (xftfont_draw): Use the font metrics of s->font to
10385 fill background (Bug#8992).
10387 2011-12-13 Martin Rudalics <rudalics@gmx.at>
10389 * window.c (Vwindow_combination_resize)
10390 (Vwindow_combination_limit): Use t instead of non-nil in
10392 (Vrecenter_redisplay): Add first sentence of doc-string on
10394 (Frecenter): Fix doc-string typo.
10396 2011-12-11 Kenichi Handa <handa@m17n.org>
10398 * coding.c (Funencodable_char_position): Pay attention to the
10399 buffer text relocation (Bug#9389).
10401 2011-12-10 Jan Djärv <jan.h.d@swipnet.se>
10403 * xterm.c (x_term_init): Move call to gdk_window_add_filter before
10404 gtk_init (Bug#10100).
10406 2011-12-10 Eli Zaretskii <eliz@gnu.org>
10408 * xdisp.c (RECORD_MAX_MIN_POS): Use IT->cmp_it.charpos only if
10409 IT->string is nil. (Bug#10263)
10411 2011-12-10 Jan Djärv <jan.h.d@swipnet.se>
10413 * nsterm.h (x_free_frame_resources): Declare.
10415 * nsfns.m (ns_get_defaults_value): New function (Bug#10103).
10416 (Fns_get_resource, x_get_string_resource): Call ns_get_defaults_value.
10418 * nsterm.h (ns_get_defaults_value): Declare.
10420 * nsterm.m (ns_default): Call ns_get_defaults_value.
10422 2011-12-09 Eli Zaretskii <eliz@gnu.org>
10424 * xdisp.c (try_scrolling): Don't set scroll_down_p if dy is zero.
10427 2011-12-09 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
10429 * unexelf.c (unexec) [NS_IMPL_GNUSTEP]: Take account of the case
10430 that where the value of an _OBJC_* symbol points to is in the .bss
10431 section (Bug#10240).
10433 2011-12-08 Kazuhiro Ito <kzhr@d1.dion.ne.jp> (tiny change)
10435 * coding.c (encode_coding_ccl): Check (charbuf < charbuf_end)
10436 after the loop to call ccl_driver at least once (Bug#8619).
10438 2011-12-08 Kenichi Handa <handa@m17n.org>
10440 * ftfont.c (get_adstyle_property): Fix previous change
10443 2011-12-07 Juanma Barranquero <lekktu@gmail.com>
10445 * w32.c (init_environment): If no_site_lisp, remove site-lisp
10446 dirs from the default value of EMACSLOADPATH (bug#10208).
10448 2011-12-07 Glenn Morris <rgm@gnu.org>
10450 * lread.c (init_lread): If no_site_lisp, exclude site-lisp/ in
10451 installation and source directories as well. (Bug#10208)
10453 2011-12-06 Chong Yidong <cyd@gnu.org>
10455 * minibuf.c (Fread_from_minibuffer): Doc fix (Bug#10228).
10457 2011-12-06 Glenn Morris <rgm@gnu.org>
10459 * process.c (start_process_unwind): Treat any pid <= 0, except -2,
10460 as an error, not just -1. (Bug#10217)
10462 2011-12-05 Chong Yidong <cyd@gnu.org>
10464 * keyboard.c (process_special_events): New function.
10465 (swallow_events, Finput_pending_p): Use it (Bug#10195).
10467 2011-12-05 Paul Eggert <eggert@cs.ucla.edu>
10469 * coding.c (encode_designation_at_bol): Don't use uninitialized
10470 local variable (Bug#9318).
10472 2011-12-05 Kenichi Handa <handa@m17n.org>
10474 * ftfont.c (get_adstyle_property): If the font is not BDF nor PCF,
10475 return Qnil (Bug#8046, Bug#10193).
10477 2011-12-05 Kenichi Handa <handa@m17n.org>
10479 * coding.c (encode_designation_at_bol): New args charbuf_end and
10480 dst. Return the number of produced bytes. Callers changed.
10481 (coding_set_source): Return how many bytes coding->source was
10483 (coding_set_destination): Return how many bytes
10484 coding->destination was relocated.
10485 (CODING_DECODE_CHAR, CODING_ENCODE_CHAR, CODING_CHAR_CHARSET)
10486 (CODING_CHAR_CHARSET_P): Adjust for the avove changes.
10488 2011-12-05 Kazuhiro Ito <kzhr@d1.dion.ne.jp> (tiny change)
10490 * coding.c (CODING_CHAR_CHARSET_P): New macro.
10491 (encode_coding_emacs_mule, encode_coding_iso_2022): Use the above
10494 2011-12-05 Andreas Schwab <schwab@linux-m68k.org>
10496 The following changes are to fix Bug#9318.
10498 * coding.c (CODING_ENCODE_CHAR, CODING_CHAR_CHARSET): New macros.
10499 (encode_coding_emacs_mule, ENCODE_ISO_CHARACTER)
10500 (encode_coding_iso_2022, encode_coding_sjis)
10501 (encode_coding_big5, encode_coding_charset): Use the above macros.
10503 2011-12-05 Juanma Barranquero <lekktu@gmail.com>
10505 * lisp.h (process_quit_flag): Fix external declaration.
10507 2011-12-04 Stefan Monnier <monnier@iro.umontreal.ca>
10509 Don't macro-inline non-performance-critical code.
10510 * eval.c (process_quit_flag): New function.
10511 * lisp.h (QUIT): Use it.
10513 2011-12-04 Jan Djärv <jan.h.d@swipnet.se>
10515 * nsfns.m (get_geometry_from_preferences): New function.
10516 (Fx_create_frame): Call get_geometry_from_preferences (Bug#10103).
10518 2011-12-04 Andreas Schwab <schwab@linux-m68k.org>
10520 * emacs.c (Qkill_emacs): Define.
10521 (syms_of_emacs): Initialize it.
10522 * keyboard.c (interrupt_signal): Don't call Fkill_emacs here, set
10523 Qquit_flag to `kill-emacs' instead.
10524 (quit_throw_to_read_char): Add parameter `from_signal'.
10525 All callers changed. Call Fkill_emacs if requested and safe.
10526 * lisp.h (QUIT): Call Fkill_emacs if requested.
10528 2011-12-03 Jan Djärv <jan.h.d@swipnet.se>
10530 * widget.c (update_wm_hints): Return if wmshell is null.
10531 (widget_update_wm_size_hints): New function.
10533 * widget.h (widget_update_wm_size_hints): Declare.
10535 * xterm.c (x_wm_set_size_hint): If USE_X_TOOLKIT, call
10536 widget_update_wm_size_hints (Bug#10104).
10538 2011-12-03 Eli Zaretskii <eliz@gnu.org>
10540 * xdisp.c (handle_invisible_prop): If the invisible text ends just
10541 before a newline, prepare the bidi iterator for consuming the
10542 newline, and keep the current paragraph direction. (Bug#10183)
10543 (redisplay_window): Don't let `margin' become negative. (Bug#10192)
10545 2011-12-02 Juri Linkov <juri@jurta.org>
10547 * search.c (Fword_search_regexp): New Lisp function created from
10548 `wordify'. Change type of arg `lax' from `int' to `Lisp_Object'.
10549 (Fword_search_backward, Fword_search_forward)
10550 (Fword_search_backward_lax, Fword_search_forward_lax):
10551 Use `Fword_search_regexp' instead of `wordify'. Doc fix.
10552 (syms_of_search): Define `Sword_search_regexp'. (Bug#10145)
10554 2011-12-01 Stefan Monnier <monnier@iro.umontreal.ca>
10556 * fileio.c (Finsert_file_contents): Move after-change-function call
10557 to before the "handled:" label, since all "goto handled" appear in
10558 cases where the *-change-functions have already been properly called
10561 2011-12-01 Andreas Schwab <schwab@linux-m68k.org>
10563 * keyboard.c (interrupt_signal): Don't call kill-emacs when
10564 waiting for input. (Bug#10169)
10566 2011-11-30 Eli Zaretskii <eliz@gnu.org>
10568 * dispnew.c (adjust_glyph_matrix): Remove the assertion that
10569 verifies glyph row's hash code--we have just reallocated the
10570 glyphs, so their contents can be complete garbage. (Bug#10164)
10572 2011-11-30 Juanma Barranquero <lekktu@gmail.com>
10574 * dispnew.c (adjust_glyph_matrix) [XASSERTS]: Add missing check.
10576 2011-11-30 Eli Zaretskii <eliz@gnu.org>
10578 * dispnew.c (adjust_glyph_matrix) [XASSERTS]: Ensure ROW's
10579 attributes are tested _before_ calling verify_row_hash, to protect
10580 against GCC re-ordering of the tests. (Bug#10164)
10582 2011-11-29 Jan Djärv <jan.h.d@swipnet.se>
10584 * xterm.h (struct x_output): net_wm_state_hidden_seen is new.
10586 * xterm.c (handle_one_xevent): Only set async_visible and friends
10587 if net_wm_state_hidden_seen is non-zero (Bug#10002)
10588 (get_current_wm_state): Set net_wm_state_hidden_seen to 1 if
10589 _NET_WM_STATE_HIDDEN is in NET_WM_STATE.
10591 2011-11-28 Paul Eggert <eggert@cs.ucla.edu>
10593 Remove GCPRO-related macros that exist only to avoid shadowing locals.
10594 * lisp.h (GCPRO1_VAR, GCPRO2_VAR, GCPRO3_VAR, GCPRO4_VAR, GCPRO5_VAR)
10595 (GCPRO6_VAR, UNGCPRO_VAR): Remove. See
10596 <http://lists.gnu.org/archive/html/emacs-diffs/2011-11/msg00265.html>.
10597 All uses changed to use GCPRO1 etc.
10598 (GCPRO1, GCPRO2, GCPRO3, GCPRO4, GCPRO5, GCPRO6, UNGCPRO):
10599 Revert to old implementation (i.e., before 2011-03-11).
10601 2011-11-28 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
10603 * dispnew.c (scrolling_window): Truncate overlaps in copy destination
10604 of scroll runs so as to avoid assigning disabled bogus rows and
10605 unnecessary graphics copy operations.
10607 2011-11-27 Eli Zaretskii <eliz@gnu.org>
10609 * s/ms-w32.h (utimbuf) [_MSC_VER]: Don't define.
10610 (snprintf) [_MSC_VER]: Redirect to _snprintf.
10611 (strtoll) [_MSC_VER]: Redirect to _strtoi64.
10612 (malloc, free, realloc, calloc): Redirect to e_* only when
10615 * lisp.h (GCTYPEBITS): Move before first use.
10616 (ALIGN_GCTYPEBITS) [_MSC_VER]: Define.
10617 (DECL_ALIGN) [_MSC_VER]: Use it, as MSVC doesn't like bit ops in
10618 this macro definition.
10620 * s/ms-w32.h (tzname): Redirect to _tzname for all values of
10623 2011-11-27 Jan Djärv <jan.h.d@swipnet.se>
10625 * gtkutil.c (xg_create_frame_widgets):
10626 Call gtk_window_set_has_resize_grip (FALSE) if that function is
10627 present with Gtk+ 2.0.
10629 2011-11-26 Paul Eggert <eggert@cs.ucla.edu>
10631 * fileio.c (Finsert_file_contents): Undo previous change; see
10632 <http://lists.gnu.org/archive/html/emacs-diffs/2011-11/msg00265.html>.
10634 2011-11-26 Paul Eggert <eggert@cs.ucla.edu>
10636 Rename locals to avoid shadowing.
10637 * fileio.c (Finsert_file_contents):
10638 Rename inner 'gcpro1' to 'inner_gcpro1' to avoid shadowing.
10639 * process.c (wait_reading_process_output):
10640 Rename inner 'proc' to 'p' to avoid shadowing.
10641 Indent for consistency with usual Emacs style.
10643 2011-11-25 Eli Zaretskii <eliz@gnu.org>
10645 * xdisp.c (redisplay_window): If cursor row is not fully visible
10646 after recentering, and scroll-conservatively is set to a large
10647 number, scroll window by a few more lines to make the cursor fully
10648 visible and out of scroll-margin. (Bug#10105)
10649 (start_display): Don't move to the next line if the display should
10650 start at a newline that is part of a display vector or an overlay
10651 string. (Bug#10119)
10653 2011-11-24 Juri Linkov <juri@jurta.org>
10655 * image.c (imagemagick_load_image): Move `MagickSetResolution' down
10656 after the `MagickPingImage' call. (Bug#10112)
10658 2011-11-23 Chong Yidong <cyd@gnu.org>
10660 * window.c (Fcoordinates_in_window_p): Accept only live windows.
10662 2011-11-23 Martin Rudalics <rudalics@gmx.at>
10664 * buffer.c (Fkill_buffer): Run replace_buffer_in_windows before
10665 making another buffer current. (Bug#10114)
10667 2011-11-23 Glenn Morris <rgm@gnu.org>
10669 * font.c (font_find_for_lface) [HAVE_NS]: Ignore case. (Bug#2526)
10671 2011-11-23 Chong Yidong <cyd@gnu.org>
10673 * xdisp.c (compute_stop_pos): Check validity of end_charpos before
10674 using it (Bug#5984).
10676 2011-11-22 Eli Zaretskii <eliz@gnu.org>
10678 * dispnew.c (adjust_glyph_matrix): Don't verify hash code of mode-
10679 and header-lines, as they don't have one computed for them.
10682 * .gdbinit (prow): Make displayed values more self-explaining.
10683 Add row's hash code.
10685 2011-11-21 Lars Magne Ingebrigtsen <larsi@gnus.org>
10687 * process.c (wait_reading_process_output): Fix asynchrounous
10688 GnuTLS socket handling on some versions of the GnuTLS library.
10689 (wait_reading_process_output): Add comment and URL.
10691 2011-11-21 Jan Djärv <jan.h.d@swipnet.se>
10693 * xterm.c (x_clear_frame): Reinstate the XClearWindow call.
10695 2011-11-21 Chong Yidong <cyd@gnu.org>
10697 * window.c (Fnext_window, Fprevious_window): Doc fix.
10699 2011-11-20 Stefan Monnier <monnier@iro.umontreal.ca>
10701 * window.c (get_phys_cursor_glyph): Fix Lisp_Object/int mixup.
10703 2011-11-20 Juanma Barranquero <lekktu@gmail.com>
10705 * nsfont.m (syms_of_nsfont) <ns-reg-to-script>: Fix typo.
10707 2011-11-20 Martin Rudalics <rudalics@gmx.at>
10709 * window.c (Fset_window_combination_limit): Rename argument
10711 (Vwindow_combination_limit): Remove "status" from doc-string.
10713 2011-11-20 Andreas Schwab <schwab@linux-m68k.org>
10715 * m/ibms390.h: Remove.
10716 * m/ibms390x.h: Don't include "ibms390.h".
10718 2011-11-20 Stefan Monnier <monnier@iro.umontreal.ca>
10720 * fileio.c (Finsert_file_contents): Add missing gcpro1 variable.
10721 Suggested by Dmitry Antipov <dmantipov@yandex.ru>.
10723 2011-11-20 Juanma Barranquero <lekktu@gmail.com>
10725 * casetab.c (Fset_case_table):
10726 * charset.c (Fcharset_after): Fix typos.
10728 2011-11-20 Paul Eggert <eggert@cs.ucla.edu>
10730 Standardize on VIRT_ADDR_VARIES behavior (Bug#10042).
10731 Otherwise, valgrind does not work on some platforms.
10732 Problem reported by Andreas Schwab in
10733 <http://lists.gnu.org/archive/html/emacs-devel/2011-11/msg00081.html>.
10734 * puresize.h (pure, PURE_P): Always behave as if VIRT_ADDR_VARIES
10735 is set, removing the need for VIRT_ADDRESS_VARIES.
10736 (PURE_P): Use a more-efficient implementation that needs just one
10737 comparison, not two: on x86-64 with GCC 4.6.2, this cut down the
10738 number of instructions from 6 (xorl, cmpq, jge, xorl, cmpq, setge)
10739 to 4 (xorl, subq, cmpq, setbe).
10740 * alloc.c (pure): Always extern now, since that's the
10741 VIRT_ADDR_VARIES behavior.
10742 (PURE_POINTER_P): Use a single comparison, not two, for
10743 consistency with the new puresize.h.
10744 * lisp.h (PNTR_COMPARISON_TYPE): Remove; no longer needed.
10745 * m/ibms390.h, m/intel386.h, m/template.h, s/cygwin.h, s/hpux10-20.h:
10746 Remove VIRT_ADDR_VARIES no longer needed.
10748 2011-11-19 Eli Zaretskii <eliz@gnu.org>
10750 * xdisp.c (x_write_glyphs, draw_phys_cursor_glyph)
10751 (erase_phys_cursor, update_window_cursor, show_mouse_face)
10752 (cursor_in_mouse_face_p): If the cursor position is out of bounds,
10753 behave as if the cursor position were at the window margin.
10755 * window.c (get_phys_cursor_glyph): If the window is hscrolled,
10756 and the cursor position is out of bounds, behave as if the cursor
10757 position were at the window margin. (Bug#10075)
10759 2011-11-18 Chong Yidong <cyd@gnu.org>
10761 * window.c (Fwindow_combination_limit): Make first argument
10762 non-optional, since it is meaningless for live windows like the
10765 2011-11-18 Dmitry Antipov <dmantipov@yandex.ru>
10767 * keymap.c (Fwhere_is_internal): Add missing RETURN_UNGCPROs.
10769 2011-11-18 Stefan Monnier <monnier@iro.umontreal.ca>
10771 * intervals.c: Fix grafting over the whole buffer (bug#10071).
10772 (graft_intervals_into_buffer): Simplify.
10774 2011-11-18 Eli Zaretskii <eliz@gnu.org>
10776 * dispnew.c (swap_glyph_pointers): Swap the used[] arrays and the
10777 hash values of the two rows.
10778 (copy_row_except_pointers): Preserve the used[] arrays and the
10779 hash values of the two rows. (Bug#10035)
10780 (add_row_entry): Add xassert to verify that ROW's hash code is valid.
10782 * xdisp.c (row_hash): New function, body extracted from
10783 compute_line_metrics.
10784 (compute_line_metrics): Call row_hash, instead of computing the
10787 * dispnew.c (verify_row_hash): Call row_hash for computing the
10788 hash code of a row, instead of duplicating code from xdisp.c.
10790 * dispextern.h (row_hash): Add prototype.
10792 2011-11-18 Tassilo Horn <tassilo@member.fsf.org>
10794 * frame.c (delete_frame): Don't delete the terminal when the last
10795 X frame is closed if emacs is built with GTK toolkit.
10797 2011-11-17 Juanma Barranquero <lekktu@gmail.com>
10799 * window.c (syms_of_window) <window-combination-resize>: Fix typo.
10801 2011-11-17 Martin Rudalics <rudalics@gmx.at>
10803 * window.c (Vwindow_splits): Rename to
10804 Vwindow_combination_resize. Suggested by Juri Linkov.
10805 (Fsplit_window_internal): Use Vwindow_combination_resize instead
10808 2011-11-16 Juanma Barranquero <lekktu@gmail.com>
10810 * nsfns.m (Fns_font_name):
10811 * window.c (syms_of_window) <window-combination-limit>: Fix typos.
10813 2011-11-16 Martin Rudalics <rudalics@gmx.at>
10815 * window.h (window): Rename slot "nest" to "combination_limit".
10816 * window.c (Fwindow_nest): Rename to Fwindow_combination_limit.
10817 (Fset_window_nest): Rename to Fset_window_combination_limit.
10818 (Vwindow_nest): Rename to Vwindow_combination_limit.
10819 (recombine_windows, make_parent_window, make_window)
10820 (Fsplit_window_internal, saved_window)
10821 (Fset_window_configuration, save_window_save): Rename all
10822 occurrences of window_nest to window_combination_limit.
10824 2011-11-15 Juanma Barranquero <lekktu@gmail.com>
10826 * image.c (imagemagick_load_image): Fix typo.
10828 2011-11-14 Eli Zaretskii <eliz@gnu.org>
10830 * xdisp.c (display_line): Move the call to
10831 highlight_trailing_whitespace before the call to
10832 compute_line_metrics, since the latter needs to see the final
10833 faces of all the glyphs to compute ROW's hash value.
10834 Fixes assertion violations in row_equal_p. (Bug#10035)
10836 2011-11-14 Juanma Barranquero <lekktu@gmail.com>
10838 * w32proc.c (reader_thread): Don't check pending input if cp->fd < 0,
10839 just return (bug#10044).
10841 2011-11-12 Eli Zaretskii <eliz@gnu.org>
10843 * makefile.w32-in (HEAPSIZE): New variable, allows to build temacs
10844 with user-defined heap size. Bump the default size of the temacs
10845 heap to 27MB, to avoid memory warning when running temacs.
10846 ($(TEMACS)): Use HEAPSIZE instead of a hardcoded value.
10848 * dispnew.c (scrolling_window): Fix incorrect indices in accessing
10849 current_matrix and desired_matrix. (Bug#9990)
10850 (verify_row_hash) [XASSERTS]: New function.
10851 (adjust_glyph_matrix, row_equal_p): Use it in xassert to verify
10852 that the hash value of glyph rows is correct.
10854 2011-11-12 Martin Rudalics <rudalics@gmx.at>
10856 * window.h (window): Remove splits slot.
10857 * window.c (Fwindow_splits, Fset_window_splits): Remove.
10858 (Fdelete_other_windows_internal, make_parent_window)
10859 (make_window, Fsplit_window_internal, Fdelete_window_internal)
10860 (Fset_window_configuration, save_window_save): Don't deal with
10861 split status of windows.
10862 (saved_window): Remove splits slot.
10863 (Vwindow_splits): Rewrite doc-string.
10865 2011-11-11 Jan Djärv <jan.h.d@swipnet.se>
10867 * xfns.c (unwind_create_frame):
10868 * nsfns.m (unwind_create_frame):
10869 * w32fns.c (unwind_create_frame): Use Fmemq to check if frame is in
10870 Vframe_list (Bug#9999).
10872 2011-11-11 Dmitry Antipov <dmantipov@yandex.ru>
10874 * xdisp.c (syms_of_xdisp): Remove duplicated definition of Qtext.
10876 2011-11-11 Kenichi Handa <handa@m17n.org>
10878 * callproc.c (Fcall_process): Set the member dst_multibyte of
10881 2011-11-11 Johan Bockgård <bojohan@gnu.org>
10883 * xdisp.c (fill_composite_glyph_string): Always set s->face, to
10884 avoid a crash (bug#9496).
10886 2011-11-09 Chong Yidong <cyd@gnu.org>
10888 * window.c (Fwindow_inside_edges, Fwindow_inside_pixel_edges)
10889 (Fwindow_inside_absolute_pixel_edges): Only allow live windows.
10891 2011-11-08 Paul Eggert <eggert@cs.ucla.edu>
10893 * s/gnu.h (GC_MARK_STACK): Define to GC_MAKE_GCPROS_NOOPS (Bug#9926).
10895 2011-11-08 Paul Eggert <eggert@cs.ucla.edu>
10897 Avoid some portability problems by eschewing 'extern inline' functions.
10898 The trivial performance wins aren't worth the portability hassles; see
10899 <http://lists.gnu.org/archive/html/emacs-devel/2011-11/msg00084.html>
10901 * dispextern.h (window_box, window_box_height, window_text_bottom_y)
10902 (window_box_width, window_box_left, window_box_left_offset)
10903 (window_box_right, window_box_right_offset): Undo previous change,
10904 by removing the "extern"s.
10905 * intervals.c (adjust_intervals_for_insertion)
10906 (adjust_intervals_for_deletion): Undo previous change,
10907 making these static again.
10908 (offset_intervals, temp_set_point_both, temp_set_point)
10909 (copy_intervals_to_string): No longer inline.
10910 * xdisp.c (window_text_bottom_y, window_box_width)
10911 (window_box_height, window_box_left_offset)
10912 (window_box_right_offset, window_box_left, window_box_right)
10913 (window_box): No longer inline.
10915 2011-11-08 Chong Yidong <cyd@gnu.org>
10917 * window.c (Fwindow_left_column, Fwindow_top_line): Doc fix.
10918 (Fwindow_body_height, Fwindow_body_width): Move from Lisp.
10919 Signal an error if not a live window.
10920 (Fwindow_total_width, Fwindow_total_height): Move from Lisp.
10921 (Fwindow_total_size, Fwindow_body_size): Move to Lisp.
10923 2011-11-07 Juanma Barranquero <lekktu@gmail.com>
10925 * lisp.h (syms_of_abbrev): Remove declaration.
10926 Reported by CHENG Gao <chenggao@royau.me>.
10928 2011-11-07 Eli Zaretskii <eliz@gnu.org>
10930 * w32.c (check_windows_init_file): Don't look for term/w32-win.el
10931 if Vpurify_flag is non-nil. Fixes a crash when running w32 build
10932 of temacs in GUI mode.
10934 2011-11-07 Martin Rudalics <rudalics@gmx.at>
10936 * window.h: Declare delete_all_child_windows instead of
10937 delete_all_subwindows.
10938 * window.c (Fwindow_nest, Fset_window_nest)
10939 (Fset_window_new_total, Fset_window_new_normal)
10940 (Fwindow_resize_apply): Don't use term subwindow in doc-strings.
10941 (delete_all_subwindows): Rename to delete_all_child_windows.
10942 (Fdelete_other_windows_internal, Fset_window_configuration):
10943 Call delete_all_child_windows instead of delete_all_subwindows.
10944 * frame.c (delete_frame): Call delete_all_child_windows instead
10945 of delete_all_subwindows.
10947 2011-11-07 Paul Eggert <eggert@cs.ucla.edu>
10949 * alloc.c (DEADP): New macro, for porting to GNU/Hurd (Bug#9926).
10950 This is also needed for porting to any host where GC_MARK_STACK is
10951 not GC_MAKE_GCPROS_NOOPS.
10952 (which_symbols): Use it.
10954 2011-11-07 Kenichi Handa <handa@m17n.org>
10956 * coding.c (coding_set_destination): Check coding->src_pos only
10957 when coding->src_object is a buffer (bug#9910).
10959 * process.c (send_process): Set the member src_multibyte of coding
10960 to 0 (bug#9911) when sending a unibyte text.
10962 * callproc.c (Fcall_process): Set the member src_multibyte of
10963 process_coding to 0 (bug#9912).
10965 2011-11-06 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
10967 * xmenu.c (cleanup_widget_value_tree): New function.
10968 (xmenu_show, xdialog_show): Use it in record_unwind_protect instead of
10969 calling free_menubar_widget_value_tree directly (Bug#9830).
10971 2011-11-06 Paul Eggert <eggert@cs.ucla.edu>
10973 Fix some portability problems with 'inline'.
10974 * dispextern.h (window_box, window_box_height, window_text_bottom_y)
10975 (window_box_width, window_box_left, window_box_left_offset)
10976 (window_box_right, window_box_right_offset): Declare extern.
10977 Otherwise, these inline functions do not conform to C99 and
10978 are miscompiled by Microsoft compilers. Reported by Eli Zaretskii in
10979 <http://lists.gnu.org/archive/html/emacs-devel/2011-11/msg00084.html>.
10980 * intervals.c (adjust_intervals_for_insertion)
10981 (adjust_intervals_for_deletion): Now extern, because otherwise the
10982 extern inline functions 'offset_intervals' couldn't refer to it.
10983 (static_offset_intervals): Remove.
10984 (offset_intervals): Rewrite using the old contents of
10985 static_offset_intervals. The old version didn't conform to C99
10986 because an extern inline function contained a reference to an
10987 identifier with static linkage.
10989 2011-11-06 Andreas Schwab <schwab@linux-m68k.org>
10991 * keyboard.c (interrupt_signal): Don't call kill-emacs while in
10994 2011-11-06 Eli Zaretskii <eliz@gnu.org>
10996 * xdisp.c (init_iterator, reseat_to_string): Don't set the
10997 iterator's bidi_p flag if Vpurify_flag is non-nil. (Bug#9963)
10998 (Fcurrent_bidi_paragraph_direction): If Vpurify_flag is non-nil,
10999 return Qleft_to_right.
11001 2011-11-06 Chong Yidong <cyd@gnu.org>
11003 * window.c (Fwindow_live_p, Fwindow_frame, Fframe_root_window)
11004 (Fminibuffer_window, Fwindow_buffer, Fwindow_splits)
11005 (Fset_window_splits, Fwindow_nest, Fset_window_nest)
11006 (Fwindow_use_time, Fwindow_total_size, Fwindow_normal_size)
11007 (Fwindow_new_normal, Fwindow_left_column, Fwindow_top_line)
11008 (Fwindow_margins, Fwindow_fringes, Fwindow_scroll_bars)
11009 (Fwindow_vscroll): Doc fix.
11010 (Fwindow_top_child, Fwindow_left_child): Eliminate a nil default
11011 argument, since it makes no sense to pass a live window and for
11012 consistency with window-child.
11014 2011-11-05 Christoph Scholtes <cschol2112@googlemail.com>
11016 * makefile.w32-in ($(TEMACS), (gl-stamp)): Use $(THISDIR) to
11019 2011-11-05 Jason Rumney <jasonr@gnu.org>
11021 * w32font.c (font_matches_spec): Filter out non-Japanese kana fonts.
11022 (add_font_entity_to_list): Filter out non-Japanese Shift-JIS
11024 (add_font_entity_to_list): Fix logic errors in mixed boolean and
11025 bitwise arithmetic preventing use of unicode-sip and non-truetype
11028 2011-11-05 Eli Zaretskii <eliz@gnu.org>
11030 * s/ms-w32.h (fstat, stat, utime): Move redirections to
11033 * w32fns.c (x_create_tip_frame, Fx_create_frame): Rearrange
11034 initialization code to keep similarity to xfns.c after changes
11037 2011-11-05 Jan Djärv <jan.h.d@swipnet.se>
11039 * nsfns.m: Declare image_cache_refcount if GLYPH_DEBUG.
11040 (unwind_create_frame): New function (Bug#9943).
11041 (Fx_create_frame): Restructure code to be more similar to the one in
11042 xfns.c. Call record_unwind_protect with unwind_create_frame (Bug#9943).
11043 Initialize image_cache_refcount if GLYPH_DEBUG (Bug#9943).
11044 Move terminal->reference_count++ just before making the frame official
11047 * nsterm.m (x_free_frame_resources): New function.
11048 (x_destroy_window): Move code to x_free_frame_resources.
11050 * xfns.c (unwind_create_frame): Fix comment.
11051 (Fx_create_frame, x_create_tip_frame):
11052 Move terminal->reference_count++ just before making the frame
11053 official. Move initialization of image_cache_refcount and
11054 dpyinfo_refcount before calling init_frame_faces (Bug#9943).
11056 2011-11-05 Eli Zaretskii <eliz@gnu.org>
11058 Support MSVC build with newer versions of Visual Studio.
11059 * makefile.w32-in (TAGS-gmake): Don't use $(patsubst ...), as
11060 Nmake barfs on that. Use $(OBJ*_c) variables instead, defined on
11063 * lisp.h (ENUM_BF): New macro, for enumerated types in bitfields,
11064 which are not supported by MSVC.
11065 (Lisp_Symbol, Lisp_Misc_Any, Lisp_Marker, Lisp_Misc_Overlay)
11066 (Lisp_Save_Value, Lisp_Free): Use ENUM_BF for enumerated types in
11068 (Lisp_Object) [USE_LISP_UNION_TYPE]: Use ENUM_BF for enumerated
11069 types in bitfields.
11070 (DEFUN) [_MSC_VER]: Define in a different way for MSVC.
11072 * w32fns.c [_MSC_VER]: DECLARE_HANDLE for any MSVC version.
11074 2011-11-05 Fabrice Popineau <fabrice.popineau@supelec.fr> (tiny change)
11076 Support MSVC build with newer versions of Visual Studio.
11077 * w32.c: Don't include w32api.h for MSVC.
11078 (init_environment) [_MSC_VER]: Call sys_access, not _access.
11080 * s/ms-w32.h <sigset_t, ssize_t> [_MSC_VER]: Typedefs for MSVC.
11081 [_MSC_VER]: Include sys/timeb.h, sys/stat.h, and signal.h.
11082 (fstat, stat, utime) [_MSC_VER]: Redirect to their sys_* cousins.
11083 (malloc, free, realloc, calloc) [_MSC_VER]: Always redirect to the
11085 (alloca) [_MSC_VER]: Define to _alloca.
11087 * lisp.h (DECL_ALIGN) [_MSC_VER]: Define for MSVC.
11089 * regex.c <re_char> [_MSC_VER]: A separate definition for MSVC.
11091 2011-11-04 Eli Zaretskii <eliz@gnu.org>
11093 * xdisp.c (note_mouse_highlight): If either of
11094 previous/next-single-property-change returns nil, treat that as
11095 the beginning or the end of the buffer. (Bug#9955)
11097 2011-11-04 Jan Djärv <jan.h.d@swipnet.se>
11099 * gtkutil.c (xg_make_tool_item): Add callbacks if one of wimage or
11100 label is not null (Bug#9951).
11101 (xg_tool_item_stale_p): Handle the fact that wimage and/or wlbl
11104 2011-11-04 Eli Zaretskii <eliz@gnu.org>
11106 * window.c (Fwindow_body_size): Mention in the doc string that the
11107 return value is in frame's canonical units. (Bug#9949)
11109 2011-11-03 Eli Zaretskii <eliz@gnu.org>
11111 * xdisp.c (note_mouse_highlight): Initialize `area'. (Bug#9947)
11113 * w32fns.c (unwind_create_frame): If needed, free the glyph
11114 matrices of the partially constructed frame. (Bug#9943)
11115 * xfns.c (unwind_create_frame): Likewise.
11117 2011-11-01 Eli Zaretskii <eliz@gnu.org>
11119 * xdisp.c (mouse_face_from_buffer_pos): Fix a typo in a comment.
11120 Don't stop backward scan on the continuation glyph, even though
11121 its CHARPOS is positive.
11122 (mouse_face_from_buffer_pos, note_mouse_highlight):
11123 Rename cover_string to disp_string.
11125 2011-11-01 Martin Rudalics <rudalics@gmx.at>
11127 * window.c (temp_output_buffer_show): Don't use
11128 Vtemp_buffer_show_specifiers.
11129 (Vtemp_buffer_show_specifiers): Remove unused variable.
11131 2011-10-30 Eli Zaretskii <eliz@gnu.org>
11133 * xdisp.c (try_cursor_movement): Make sure ROW isn't decremented
11134 past the beginning of the current glyph matrix.
11136 2011-10-30 Adam Sjøgren <asjo@koldfront.dk> (tiny change)
11138 * xterm.c: Include X11/Xproto.h if HAVE_GTK3.
11139 (x_error_handler): Ignore BadMatch for X_SetInputFocus for
11140 HAVE_GTK3 (Bug#9869).
11142 * gtkutil.c (xg_win_to_widget, xg_event_is_for_menubar): Initialize
11143 type to GDK_NOTHING so valgrind does not complain (Bug#9901).
11145 * xterm.h (x_display_info): Add Xatom_net_wm_state_hidden (Bug#9893).
11147 * xterm.c: Declare x_handle_net_wm_state to return int.
11148 (handle_one_xevent): Check if we are iconified but don't have
11149 _NET_WM_STATE_HIDDEN. If do, treat as deiconify (Bug#9893).
11150 (get_current_wm_state): Return non-zero if not hidden,
11151 check for _NET_WM_STATE_HIDDEN (Bug#9893).
11152 (do_ewmh_fullscreen): Ignore return value from get_current_wm_state.
11153 (x_handle_net_wm_state): Return what get_current_wm_state returns.
11154 (x_term_init): Initialize dpyinfo->Xatom_net_wm_state_hidden.
11156 2011-10-29 Paul Eggert <eggert@cs.ucla.edu>
11158 * alloc.c (which_symbols): Declare EXTERNALLY_VISIBLE,
11159 so that this new function doesn't get optimized away by a
11160 whole-program optimizer. Make the 2nd arg EMACS_INT, not int.
11162 2011-10-29 Andreas Schwab <schwab@linux-m68k.org>
11164 * frame.h (MOUSE_HL_INFO): Remove excess parens.
11166 2011-10-29 Eli Zaretskii <eliz@gnu.org>
11168 Fix the `xbytecode' command.
11169 * .gdbinit (xprintbytestr): New command.
11170 (xwhichsymbols): Rename from `which'; all callers changed.
11171 (xbytecode): Print the byte-code string as well.
11173 2011-10-29 Kim Storm <storm@cua.dk>
11175 * alloc.c (which_symbols): New function.
11177 2011-10-29 Andreas Schwab <schwab@linux-m68k.org>
11179 * minibuf.c (read_minibuf_noninteractive): Allow reading empty
11182 2011-10-29 Glenn Morris <rgm@gnu.org>
11184 * process.c (wait_reading_process_output): Revert 2009-08-30 change.
11185 Not clear what it was for, and it causes various bugs. (Bug#9839)
11187 2011-10-28 Eli Zaretskii <eliz@gnu.org>
11189 * xdisp.c (note_mouse_highlight): Initialize `part', to avoid a
11190 possible random value that matches one of those tested as
11191 condition to clear the mouse face.
11193 2011-10-28 Chong Yidong <cyd@gnu.org>
11195 * xdisp.c (note_mouse_highlight): Fix use of uninitialized var.
11197 2011-10-28 Dan Nicolaescu <dann@ics.uci.edu>
11199 * window.c (make_window): Initialize phys_cursor_on_p.
11201 2011-10-28 Stefan Monnier <monnier@iro.umontreal.ca>
11203 * lisp.h (struct Lisp_Symbol): Update comments.
11205 2011-10-28 Juanma Barranquero <lekktu@gmail.com>
11207 * w32font.c (w32_load_unicows_or_gdi32): Add missing return.
11209 2011-10-28 Eli Zaretskii <eliz@gnu.org>
11211 Fix Emacs on Windows 9X (bug#8562). Thanks to oslsachem
11212 <oslsachem@gmail.com> for helping to debug this.
11214 * w32font.c (g_b_init_is_w9x, g_b_init_get_outline_metrics_w)
11215 (g_b_init_get_text_metrics_w, g_b_init_get_glyph_outline_w)
11216 (g_b_init_get_glyph_outline_w): New static variables.
11217 (GetOutlineTextMetricsW_Proc, GetTextMetricsW_Proc)
11218 (GetGlyphOutlineW_Proc): New typedefs.
11219 (w32_load_unicows_or_gdi32, get_outline_metrics_w)
11220 (get_text_metrics_w, get_glyph_outline_w, globals_of_w32font):
11222 (w32font_open_internal, compute_metrics):
11223 Call get_outline_metrics_w, get_text_metrics_w, and get_glyph_outline_w
11224 instead of calling the "wide" APIs directly.
11226 * emacs.c (main) [HAVE_NTGUI]: Call globals_of_w32font.
11228 * w32.h (syms_of_w32font): Add prototype.
11230 2011-10-27 Juanma Barranquero <lekktu@gmail.com>
11232 * window.c (Fframe_root_window, Fframe_first_window, Fwindow_end)
11233 (Fframe_selected_window, Ftemp_output_buffer_show, Fnext_window)
11234 (Fdelete_window_internal, Fwindow_parameters): Fix typos in docstrings.
11235 (Fmove_to_window_line): Doc fix.
11237 2011-10-27 Chong Yidong <cyd@gnu.org>
11239 * process.c (make_process): Set gnutls_state to NULL.
11241 * gnutls.c (emacs_gnutls_deinit): Deinit the gnutls_state if it is
11242 non-NULL, regardless of GNUTLS_INITSTAGE.
11243 (Fgnutls_boot): Cleanups. Call emacs_gnutls_deinit if we signal
11244 an error. Set process slots as soon as we allocate them.
11246 * gnutls.h (GNUTLS_LOG, GNUTLS_LOG2): Fix macros.
11248 2011-10-27 Chong Yidong <cyd@gnu.org>
11250 * gnutls.c (emacs_gnutls_deinit): New function.
11251 Deallocate credentials structures as well as calling gnutls_deinit.
11252 (Fgnutls_deinit, Fgnutls_boot): Use it.
11254 * process.c (make_process): Initialize GnuTLS credentials to NULL.
11255 (deactivate_process): Call emacs_gnutls_deinit.
11257 2011-10-27 Juanma Barranquero <lekktu@gmail.com>
11259 * image.c (x_create_x_image_and_pixmap):
11260 * w32.c (sys_rename, w32_delayed_load):
11261 * w32font.c (fill_in_logfont):
11262 * w32reg.c (x_get_string_resource): Silence compiler warnings.
11264 2011-10-26 Juanma Barranquero <lekktu@gmail.com>
11266 * w32fns.c (w32_default_color_map): New function,
11267 extracted from Fw32_default_color_map.
11268 (Fw32_default_color_map, Fx_open_connection): Use it. (Bug#9785)
11270 2011-10-25 Paul Eggert <eggert@cs.ucla.edu>
11272 * dispextern.h (Fcontrolling_tty_p): New decl (Bug#6649 part 2).
11274 2011-10-25 Stefan Monnier <monnier@iro.umontreal.ca>
11276 * keyboard.c (test_undefined): New function (bug#9751).
11277 (read_key_sequence): Use it to detect when a key is bound to `undefined'.
11279 2011-10-25 Enami Tsugutomo <tsugutomo.enami@jp.sony.com>
11281 * sysdep.c (init_sys_modes): Fix the check for the controlling
11282 terminal (Bug#6649).
11284 2011-10-20 Eli Zaretskii <eliz@gnu.org>
11286 * dispextern.h (struct bidi_it): New member next_en_type.
11288 * bidi.c (bidi_line_init): Initialize the next_en_type member.
11289 (bidi_resolve_explicit_1): When next_en_pos is valid for the
11290 current character, check also for next_en_type being WEAK_EN.
11291 (bidi_resolve_weak): Don't enter the expensive loop if the current
11292 position is before next_en_pos. Record the bidi type of the first
11293 non-ET, non-BN character we find, in addition to its position.
11294 (bidi_level_of_next_char): Invalidate next_en_type when
11295 next_en_pos is over-stepped.
11297 2011-10-20 Paul Eggert <eggert@cs.ucla.edu>
11299 Time zone name fixes for non-ASCII locales (Bug#641, Bug#9794)
11300 * editfns.c: Rewrite current-time-zone so that it invokes
11301 the equivalent of (format-time-string "%Z") to get the time zone name.
11302 This fixes a bug when the time zone name contains characters that
11303 need converting from the system time locale to Emacs internal format.
11304 This fixes a shortcoming that I introduced in my 1999-10-19 patch:
11305 that patch fixed format-time-string to do the conversion, but
11306 I forgot to fix current-time-zone.
11307 (format_time_string): New function, containing most of
11308 what Fformat_time_string used to contain.
11309 (Fformat_time_string): Rewrite in terms of format_time_string.
11310 This doesn't change this function's behavior.
11311 (current-time-zone): Rewrite to use format_time_string.
11312 This fixes the bug reported by Michael Schierl in
11313 <http://lists.gnu.org/archive/html/emacs-devel/2007-06/msg00334.html>.
11314 Jason Rumney's 2007-06-07 change worked around this bug, but
11316 * systime.h (tzname, timezone): Remove no-longer-used declarations.
11318 2011-10-19 Eli Zaretskii <eliz@gnu.org>
11320 * xdisp.c (start_display): If the character at POS is displayed
11321 via a display vector, reset IT->current.dpvec_index to zero.
11322 (try_window_reusing_current_matrix): If a line ends in a display
11323 vector or the next line starts in a display vector, continue
11324 redrawing the window even though the character position of
11325 start_row was reached.
11328 2011-10-18 Chong Yidong <cyd@gnu.org>
11330 * xdisp.c (get_next_display_element): Handle U+2010 and U+2011
11331 with nobreak-char-display too.
11333 2011-10-18 Eli Zaretskii <eliz@gnu.org>
11335 Fix part 3 of bug#9771.
11336 * bidi.c (bidi_line_init): Initialize next_en_pos to zero, not -1.
11337 (bidi_resolve_neutral): Don't enter the expensive loop looking for
11338 non-neutral characters if the current character is a paragraph
11339 separator (a.k.a. Newline). This avoids running the same
11340 expensive loop twice, once when we consume the preceding newline
11341 and the other time when the line actually needs to be displayed.
11342 Avoid the loop when we see neutrals on the base embedding level
11343 following a character whose directionality is the same as the
11344 paragraph's. This avoids running the expensive loop when a line
11345 ends in a long sequence of neutrals, like control characters.
11346 Add assertion against STRONG_AL type. Slightly rearrange code
11347 that determines the type of a neutral given the first non-neutral
11349 (bidi_level_of_next_char): Set next_en_pos to zero when
11350 invalidating its info.
11352 2011-10-17 Eli Zaretskii <eliz@gnu.org>
11354 * xdisp.c (push_display_prop): Determine whether to record string
11355 or buffer position by IT->string, not by IT->method. Allow
11356 GET_FROM_DISPLAY_VECTOR as IT->method on entry. (Bug#9771, part 4)
11357 (move_it_vertically_backward): Don't look for character position
11358 immediately after the newline when in a continuation line.
11361 2011-10-15 Martin Rudalics <rudalics@gmx.at>
11363 * window.c (coordinates_in_window): Rewrite and delabelize
11364 vertical border check. (Bug#5357) (Bug#9618)
11366 2011-10-14 Stefan Monnier <monnier@iro.umontreal.ca>
11368 * xterm.c (frame_highlight, frame_unhighlight): Ignore unexplained
11369 errors in XSetWindowBorder (bug#9310).
11371 2011-10-13 Dmitry Antipov <dmantipov@yandex.ru>
11373 * editfns.c (Fset_time_zone_rule): Replace free with xfree to
11374 avoid crash when xmalloc overrun checking is enabled.
11376 2011-10-13 Eli Zaretskii <eliz@gnu.org>
11378 * xdisp.c (Fcurrent_bidi_paragraph_direction): Initialize
11379 itb.paragraph_dir to NEUTRAL_DIR. Fixes an occasional incorrect
11380 cursor motion with <left> and <right> arrow keys.
11382 * bidi.c (bidi_init_it): Don't initialize paragraph_dir here, as
11383 some callers set that themselves.
11385 2011-10-12 Eli Zaretskii <eliz@gnu.org>
11387 * xdisp.c (find_row_edges): Handle the case where ROW comes from a
11388 display string and the previous row comes from the same string and
11389 is empty. (Bug#9739) (Bug#9738)
11391 2011-10-12 Stefan Monnier <monnier@iro.umontreal.ca>
11393 * doc.c (get_doc_string): Encode file name (bug#9735).
11395 2011-10-12 Eli Zaretskii <eliz@gnu.org>
11397 * bidi.c (bidi_level_of_next_char):
11398 * xdisp.c (get_visually_first_element): Remove old incorrect
11399 comments regarding the Unicode Line Separator character.
11401 * bidi.c (bidi_init_it): Initialize paragraph_dir to NEUTRAL_DIR.
11403 2011-10-12 Dmitry Antipov <dmantipov@yandex.ru>
11405 * alloc.c (Fgc_status): Do not access beyond zombies array
11406 boundary if nzombies > MAX_ZOMBIES.
11407 * alloc.c (dump_zombies): Add missing format specifier.
11409 2011-10-12 Paul Eggert <eggert@cs.ucla.edu>
11411 * xdisp.c (set_cursor_from_row): Simplify conditionals,
11412 to pacify GCC 4.6.1 x86-64 with -O2 -Wstrict-overflow.
11414 * lread.c (read_escape): Allow hex escapes as large as ?\xfffffff.
11415 Some packages use them to denote characters with modifiers.
11417 2011-10-11 Andreas Schwab <schwab@linux-m68k.org>
11419 * lisp.h (GCPRO1_VAR, GCPRO2_VAR, GCPRO3_VAR, GCPRO4_VAR)
11420 (GCPRO5_VAR, GCPRO6_VAR, UNGCPRO_VAR): Add whitespace to avoid
11421 matching a pp-number. Rename parameter var to var1.
11423 2011-10-11 Stefan Monnier <monnier@iro.umontreal.ca>
11425 * minibuf.c (Finternal_complete_buffer): Fix last change (bug#9709).
11427 2011-10-08 Glenn Morris <rgm@gnu.org>
11429 * callint.c (Fcall_interactively): Give a more explicit error for the
11430 'c' case with a non-character input. (Bug#8479)
11432 2011-10-08 Eli Zaretskii <eliz@gnu.org>
11434 * xdisp.c (hscroll_window_tree): Support hscroll in right-to-left
11436 (set_cursor_from_row): Fix cursor positioning in mixed L2R+R2L
11437 lines that are hscrolled on the left.
11439 * dispnew.c (buffer_posn_from_coords): Account for a possible
11440 presence of header-line. (Bug#4426)
11442 2011-10-07 Stefan Monnier <monnier@iro.umontreal.ca>
11444 * buffer.c (syms_of_buffer) <enable-multibyte-characters>:
11445 Don't advertise functionality which we discourage or doesn't work.
11447 2011-10-07 Paul Eggert <eggert@cs.ucla.edu>
11449 * alloc.c (GC_LISP_OBJECT_ALIGNMENT): Use offsetof, not __alignof__
11450 or sizeof. __alignof__ gives the wrong answer on Fedora x86-64
11451 with GCC 4.6.1 when configured with CC='gcc -m32' --with-wide-int;
11452 this makes Emacs dump core during garbage collection on rare
11453 occasions. sizeof is obviously inferior to offsetof here, so
11454 stick with offsetof.
11455 (GC_POINTER_ALIGNMENT): New macro.
11456 (mark_memory): Omit 3rd (offset) arg; caller changed.
11457 Don't assume EMACS_INT alignment is the same as pointer alignment.
11459 2011-10-03 Stefan Monnier <monnier@iro.umontreal.ca>
11461 * keyboard.c (read_key_sequence_remapped): New var.
11462 (read_key_sequence): Compute remapping in the right buffer.
11463 (command_loop_1): Use read_key_sequence's remapping directly.
11465 2011-10-02 Stefan Monnier <monnier@iro.umontreal.ca>
11467 * dired.c (file_name_completion): Don't expand file name.
11468 (Ffile_name_completion, Ffile_name_all_completions): Expand file name
11469 before checking file name handler.
11471 * minibuf.c (Finternal_complete_buffer): Only show internal buffers if
11472 they've been requested explicitly (bug#9591).
11474 2011-10-01 Andreas Schwab <schwab@linux-m68k.org>
11476 * keymap.c (Fsingle_key_description): Use make_specified_string
11477 instead of build_string to build string from push_key_description.
11480 2011-09-30 Paul Eggert <eggert@cs.ucla.edu>
11482 * buffer.h (struct buffer): Use time_t, not int, for a time stamp.
11483 This fixes a Y2038 bug on 64-bit hosts.
11484 * buffer.c (reset_buffer):
11485 * fileio.c (Fdo_auto_save, Fset_buffer_auto_saved)
11486 (Fclear_buffer_auto_save_failure):
11487 Use 0, not -1, to represent an unset failure time, since time_t
11488 might not be signed.
11490 Remove dependency on glibc malloc internals.
11491 * alloc.c (XMALLOC_OVERRUN_CHECK_OVERHEAD, XMALLOC_OVERRUN_CHECK_SIZE):
11492 Move back here from lisp.h, but with their new implementations.
11493 (XMALLOC_BASE_ALIGNMENT, COMMON_MULTIPLE, XMALLOC_HEADER_ALIGNMENT)
11494 (XMALLOC_OVERRUN_SIZE_SIZE): Move these new lisp.h macros here.
11495 * charset.c (charset_table_init): New static var.
11496 (syms_of_charset): Use it instead of xmalloc. This removes a
11497 dependency on glibc malloc internals. See Eli Zaretskii's comment in
11498 <http://lists.gnu.org/archive/html/emacs-devel/2011-09/msg00815.html>.
11499 * lisp.h (XMALLOC_OVERRUN_CHECK_OVERHEAD, XMALLOC_OVERRUN_CHECK_SIZE):
11500 Move back to alloc.c.
11501 (XMALLOC_BASE_ALIGNMENT, COMMON_MULTIPLE, XMALLOC_HEADER_ALIGNMENT)
11502 (XMALLOC_OVERRUN_SIZE_SIZE): Move to alloc.c.
11504 2011-09-30 Jan Djärv <jan.h.d@swipnet.se>
11506 * nsterm.m (windowDidResize): Call x_set_window_size only when
11507 ns_in_resize is true. Otherwise set pixelwidth/height and
11508 call change_frame_size (Bug#9628).
11510 2011-09-30 Paul Eggert <eggert@cs.ucla.edu>
11512 Port --enable-checking=all to Fedora 14 x86-64.
11513 * charset.c (syms_of_charset): Also account for glibc malloc's
11514 internal overhead when calculating the initial malloc maximum.
11516 Port --enable-checking=all to Fedora 14 x86.
11517 * alloc.c (XMALLOC_OVERRUN_CHECK_OVERHEAD, XMALLOC_OVERRUN_CHECK_SIZE):
11519 (xmalloc_put_size, xmalloc_get_size, overrun_check_malloc)
11520 (overrun_check_realloc, overrun_check_free):
11521 Use XMALLOC_OVERRUN_SIZE_SIZE, not sizeof (size_t).
11522 That way, xmalloc returns a properly-aligned pointer even if
11523 XMALLOC_OVERRUN_CHECK is defined. The old debugging code happened
11524 to align OK on typical 64-bit hosts, but not on Fedora 14 x86.
11525 * charset.c (syms_of_charset): Take XMALLOC_OVERRUN_CHECK_OVERHEAD
11526 into account when calculating the initial malloc maximum.
11527 * lisp.h (XMALLOC_OVERRUN_CHECK_OVERHEAD, XMALLOC_OVERRUN_CHECK_SIZE):
11528 Move here from alloc.c, so that charset.c can use it too.
11529 Properly align; the old code wasn't right for common 32-bit hosts
11530 when configured with --enable-checking=all.
11531 (XMALLOC_BASE_ALIGNMENT, COMMON_MULTIPLE, XMALLOC_HEADER_ALIGNMENT)
11532 (XMALLOC_OVERRUN_SIZE_SIZE): New macros.
11534 2011-09-29 Eli Zaretskii <eliz@gnu.org>
11536 * sysdep.c (snprintf) [!EOVERFLOW]: If EOVERFLOW is not defined,
11539 2011-09-28 Eli Zaretskii <eliz@gnu.org>
11541 * xdisp.c (compute_display_string_end): If there's no display
11542 string at CHARPOS, return -1.
11544 * bidi.c (bidi_fetch_char): When compute_display_string_end
11545 returns a negative value, treat the character as a normal
11546 character not covered by a display string. (Bug#9624)
11548 2011-09-28 Juanma Barranquero <lekktu@gmail.com>
11550 * lread.c (Fread_from_string): Fix typo in docstring.
11552 2011-09-27 Eli Zaretskii <eliz@gnu.org>
11554 * xdisp.c (handle_invisible_prop): If invisible text ends on a
11555 newline, reseat the iterator instead of bidi-iterating there one
11556 character at a time. (Bug#9610)
11557 (BUFFER_POS_REACHED_P, move_it_in_display_line_to): Bail when past
11558 TO_CHARPOS if the bidi iterator is at base embedding level.
11560 2011-09-27 Andreas Schwab <schwab@linux-m68k.org>
11562 * lread.c (readevalloop): Use correct code for NBSP.
11563 (read1): Likewise. (Bug#9608)
11565 2011-09-25 Michael Albinus <michael.albinus@gmx.de>
11567 * dbusbind.c (Fdbus_register_signal): When service is not
11568 registered, use nil in Vdbus_registered_objects_table. (Bug#9581)
11570 2011-09-25 Glenn Morris <rgm@gnu.org>
11572 * buffer.c (truncate-lines): Doc fix.
11574 2011-09-24 Chong Yidong <cyd@stupidchicken.com>
11576 * window.c (Fwindow_prev_buffers, Fset_window_prev_buffers)
11577 (Fset_window_next_buffers): Doc fix.
11579 2011-09-24 Glenn Morris <rgm@gnu.org>
11581 * minibuf.c (read_minibuf): Disable line truncation. (Bug#5715)
11583 2011-09-24 Paul Eggert <eggert@cs.ucla.edu>
11585 Fix minor problems found by static checking.
11586 * xdisp.c (string_from_display_spec): Don't assume vecsize fits in int.
11587 * indent.c (Fvertical_motion): Fix == vs = typo.
11589 2011-09-24 Eli Zaretskii <eliz@gnu.org>
11591 * dispnew.c (syms_of_display) <redisplay-dont-pause>:
11592 Default value is now t. Doc fix.
11594 * indent.c (Fvertical_motion): Compute and apply the overshoot
11595 logic when moving up, not only when moving down. Fix the
11596 confusing name and values of the it_overshoot_expected variable;
11597 logic changes accordingly. (Bug#9254) (Bug#9549)
11599 * xdisp.c (pos_visible_p): Produce correct pixel coordinates when
11600 CHARPOS is covered by a display string which includes newlines.
11601 (move_it_vertically_backward): Avoid inflooping when START_CHARPOS
11602 is covered by a display string with embedded newlines.
11604 2011-09-24 Michael Albinus <michael.albinus@gmx.de>
11606 * dbusbind.c (Fdbus_register_signal): Add match rule to
11607 Vdbus_registered_objects_table. (Bug#9581)
11608 (Fdbus_register_method, Vdbus_registered_objects_table):
11611 2011-09-24 Jim Meyering <meyering@redhat.com>
11613 do not ignore write error for any output size
11614 The previous change was incomplete.
11615 While it makes emacs --batch detect the vast majority of stdout
11616 write failures, errors were still ignored whenever the output size is
11617 k * (BUFSIZ+1) - 4. E.g., on a system with BUFSIZ of 4096,
11618 $ emacs --batch --eval '(print (format "%4093d" 0))' > /dev/full \
11619 && echo FAIL: ignored write error
11620 FAIL: ignored write error
11621 $ emacs --batch --eval '(print (format "%20481d" 0))' > /dev/full \
11622 && echo FAIL: ignored write error
11623 FAIL: ignored write error
11624 * emacs.c (Fkill_emacs): Also test ferror. (Bug#9574)
11626 2011-09-23 Andreas Schwab <schwab@linux-m68k.org>
11628 * emacs.c (Fkill_emacs): In noninteractive mode exit
11629 non-successfully if a write error occurred on stdout. (Bug#9574)
11631 2011-09-21 Eli Zaretskii <eliz@gnu.org>
11633 * xdisp.c (pop_it): Allow it->object that is a cons cell to pass
11636 * dispextern.h (struct it): Update the comment documenting what
11639 2011-09-20 Eli Zaretskii <eliz@gnu.org>
11641 * xdisp.c (set_cursor_from_row): If the row ends in a newline from
11642 a display string, extend search for cursor position to end of row.
11643 (find_row_edges): If the row ends in a newline from a display
11644 string, increment its MATRIX_ROW_END_CHARPOS by one. (Bug#9549)
11645 Handle the case of a display string with multiple newlines.
11646 (Fcurrent_bidi_paragraph_direction): Fix search for previous
11647 non-empty line. Fixes confusing cursor motion with arrow keys at
11648 the beginning of a line that starts with whitespace.
11650 2011-09-19 Lars Magne Ingebrigtsen <larsi@gnus.org>
11652 * lread.c (Fread_from_string): Document what FINAL-STRING-INDEX is
11655 2011-09-18 Chong Yidong <cyd@stupidchicken.com>
11657 * xfns.c (Fx_create_frame): Handle the bitmapIcon resource as
11658 boolean (Bug#9154).
11660 2011-09-18 Eli Zaretskii <eliz@gnu.org>
11662 * xdisp.c (display_line): Record maximum and minimum buffer
11663 positions even if no glyphs were produced (e.g., by a zero-width
11664 stretch). Fixes bug#9530 on a TTY. Under word-wrap, don't record
11665 buffer positions that will be removed from the glyph row because
11667 (produce_stretch_glyph): Fix a bug in :align-to on a TTY when the
11668 column is beyond frame width: don't subtract 1 "pixel" when
11669 computing width of the stretch.
11670 (reseat_at_next_visible_line_start): Undo the change made on
11671 2011-09-17 that saved paragraph information and restored it after
11672 the call to `reseat'. (Bug#9545)
11674 2011-09-18 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
11676 * xdisp.c (expose_window): Save original value of phys_cursor_on_p
11677 and turn window cursor on if cleared (Bug#9415).
11679 2011-09-18 Andreas Schwab <schwab@linux-m68k.org>
11681 * search.c (boyer_moore): Take unibyte characters from pattern
11682 literally. (Bug#9458)
11684 2011-09-18 Eli Zaretskii <eliz@gnu.org>
11686 * xdisp.c (reseat_at_next_visible_line_start): Fix last change.
11688 2011-09-18 Paul Eggert <eggert@cs.ucla.edu>
11690 Fix minor problem found by static checking.
11691 * xdisp.c (reseat_at_next_visible_line_start): Mark locals as
11692 initialized, to pacify gcc -Wuninitialized.
11694 * fileio.c: Report proper errno when syscall falls.
11695 (Finsert_file_contents): Save and restore errno,
11696 so that report_file_error outputs the correct diagnostic.
11697 (Fwrite_region) [CLASH_DETECTION]: Likewise.
11699 2011-09-18 Eli Zaretskii <eliz@gnu.org>
11701 * .gdbinit (pgx): Fix references to fields of `struct glyph'.
11703 2011-09-17 Eli Zaretskii <eliz@gnu.org>
11705 * xdisp.c (produce_stretch_glyph): Another fix for changes made on
11706 2011-08-30T17:32:44Z!eliz@gnu.org. (Bug#9530)
11708 2011-09-17 Eli Zaretskii <eliz@gnu.org>
11710 * xdisp.c (reseat_at_next_visible_line_start): Keep information
11711 about the current paragraph and restore it after the call to reseat.
11713 * bidi.c (MAX_PARAGRAPH_SEARCH): New macro.
11714 (bidi_find_paragraph_start): Search back for paragraph beginning
11715 at most MAX_PARAGRAPH_SEARCH lines; if not found, return BEGV_BYTE.
11716 (bidi_move_to_visually_next): Only trigger paragraph-related
11717 computations when the last character is a newline or at EOB, not
11718 just any NEUTRAL_B. (Bug#9470)
11720 * xdisp.c (set_cursor_from_row): Don't invoke special treatment of
11721 truncated lines if point is covered by a display string. (Bug#9524)
11723 2011-09-16 Paul Eggert <eggert@cs.ucla.edu>
11725 * xselect.c: Relax test for outgoing X longs (Bug#9498).
11726 (cons_to_x_long): New function.
11727 (lisp_data_to_selection_data): Use it. Correct the test for
11728 short-versus-long data; it was negated. Break out of vector
11729 loop, for efficiency, when a long datum is discovered.
11731 2011-09-16 Stefan Monnier <monnier@iro.umontreal.ca>
11733 * eval.c (Fquote): Document its non-consing behavior (bug#9482).
11735 2011-09-16 Eli Zaretskii <eliz@gnu.org>
11737 * image.c (tiff_handler): Work around a bug in MinGW GCC 3.x (see
11738 GCC PR/17406) by declaring this function with external scope.
11740 2011-09-15 Paul Eggert <eggert@cs.ucla.edu>
11742 * editfns.c (Fformat): Fix bug in text-property fix (Bug#9514).
11743 Don't mishandle (length (format "%%")) and (format "%4000s%%" "").
11745 2011-09-15 Andreas Schwab <schwab@linux-m68k.org>
11747 * editfns.c (Fformat): Correctly handle text properties on "%%".
11749 2011-09-15 Eli Zaretskii <eliz@gnu.org>
11751 * xterm.c (x_draw_composite_glyph_string_foreground):
11752 * w32term.c (x_draw_composite_glyph_string_foreground):
11753 * term.c (encode_terminal_code):
11754 * composite.c (composition_update_it, get_composition_id):
11755 * xdisp.c (get_next_display_element)
11756 (fill_composite_glyph_string): Add comments about special meaning
11757 of TAB characters in a composition.
11759 2011-09-15 Paul Eggert <eggert@cs.ucla.edu>
11761 * editfns.c (Fformat): Fix off-by-1 bug for "%%b" (Bug#9514).
11762 This occurs when processing a multibyte format.
11763 Problem reported by Wolfgang Jenker.
11765 2011-09-15 Johan Bockgård <bojohan@gnu.org>
11767 * xdisp.c (try_cursor_movement): Only check for exact match if
11768 cursor hpos found by set_cursor_from_row is valid. (Bug#9495)
11770 2011-09-14 Paul Eggert <eggert@cs.ucla.edu>
11772 Remove unused external symbols.
11773 * dispextern.h (calc_pixel_width_or_height): Remove decl.
11774 * xdisp.c (calc_pixel_width_or_height): Now static.
11775 * doprnt.c (exprintf) [! (HAVE_X_WINDOWS && USE_X_TOOLKIT)]: Remove.
11776 * indent.c (check_display_width):
11777 * w32term.c: Fix comment to match code.
11778 * xterm.c, xterm.h (x_catching_errors): Remove.
11780 2011-09-14 Paul Eggert <eggert@cs.ucla.edu>
11782 * xselect.c: Use signed conversions more consistently (Bug#9498).
11783 (selection_data_to_lisp_data): Assume incoming selection data are
11784 signed integers, not unsigned. This is to be consistent with
11785 outgoing selection data, which was modified to use signed integers
11786 in as part of the fix to Bug#9196 in response to Jan D.'s comment
11787 in <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9196#32> that X11
11788 expects long, not unsigned long.
11790 2011-09-14 Eli Zaretskii <eliz@gnu.org>
11792 * xdisp.c (try_window_reusing_current_matrix): Fix incorrect
11793 computation of loop end. Reported by Johan Bockgård
11796 2011-09-13 Chong Yidong <cyd@stupidchicken.com>
11798 * frame.c (Fother_visible_frames_p): Function deleted.
11800 2011-09-12 Eli Zaretskii <eliz@gnu.org>
11802 * indent.c (compute_motion): Process display vector front to back
11803 rather than the other way around. (Bug#2496)
11805 2011-09-12 Stefan Monnier <monnier@iro.umontreal.ca>
11807 * fileio.c (Finsert_file_contents): Don't assume beg_offset is 0.
11809 2011-09-11 Chong Yidong <cyd@stupidchicken.com>
11811 * minibuf.c (Fread_from_minibuffer): Doc fix.
11813 2011-09-11 Eli Zaretskii <eliz@gnu.org>
11815 * xdisp.c (produce_stretch_glyph): Fix a typo made in changes from
11816 2011-08-30T17:32:44Z!eliz@gnu.org. (Bug#9475)
11818 2011-09-11 Lars Magne Ingebrigtsen <larsi@gnus.org>
11820 * fileio.c (Fvisited_file_modtime): Document `(-1 65535)' as a
11821 value for non-existent files.
11823 2011-09-11 Eli Zaretskii <eliz@gnu.org>
11825 * fileio.c (Finsert_file_contents): If the file cannot be opened,
11826 set its "size" to -1. This will set the modtime_size field of
11827 the corresponding buffer to -1, which is what
11828 verify-visited-file-modtime expects for files that do not exist.
11831 2011-09-11 Paul Eggert <eggert@cs.ucla.edu>
11833 * keymap.h (KEY_DESCRIPTION_SIZE, push_key_description): Move decls
11835 * lisp.h: ... from here. push_key_description is no longer
11836 defined in keyboard.c, so its declaration should not be in
11837 lisp.h's "Defined in keyboard.c" section, and KEY_DESCRIPTION_SIZE
11838 logically belongs with push_key_description.
11840 2011-09-10 Paul Eggert <eggert@cs.ucla.edu>
11842 * buffer.h: Include <sys/types.h> instead of <time.h>.
11843 Otherwise, off_t wasn't defined on FreeBSD 9.0-BETA2 i386.
11844 Problem reported by Herbert J. Skuhra.
11846 2011-09-10 Lars Magne Ingebrigtsen <larsi@gnus.org>
11848 * xml.c (parse_region): Make the parsing work for
11849 non-comment-starting XML files again (bug#9144).
11851 2011-09-10 Andreas Schwab <schwab@linux-m68k.org>
11853 * image.c (gif_load): Fix calculation of bottom and right corner.
11856 2011-09-10 Eli Zaretskii <eliz@gnu.org>
11858 * xdisp.c (MAX_DISP_SCAN): Decrease to 250. Prevents sluggish
11859 redisplay in small windows.
11861 2011-09-09 Eli Zaretskii <eliz@gnu.org>
11863 * frame.c (x_report_frame_params): Cast to avoid compiler warnings.
11865 2011-09-08 Martin Rudalics <rudalics@gmx.at>
11867 * window.c (Fset_window_prev_buffers, Fset_window_next_buffers):
11868 Operate on live windows only.
11870 2011-09-08 Juanma Barranquero <lekktu@gmail.com>
11872 * emacs.c (my_heap_start): #ifdef to avoid warnings when unused.
11874 2011-09-07 Eli Zaretskii <eliz@gnu.org>
11876 * xdisp.c (move_it_in_display_line_to): Call RESTORE_IT on ppos_it
11877 only under bidi iteration.
11879 2011-09-07 Jan Djärv <jan.h.d@swipnet.se>
11881 * gtkutil.c (xg_make_tool_item): Insert comment about eventbox.
11883 2011-09-06 Paul Eggert <eggert@cs.ucla.edu>
11885 isnan: Fix porting problem to Solaris 10 with bundled gcc.
11886 Without this fix, the command to link temacs failed due to an
11887 undefined symbol __builtin_isnan. This is because
11888 /usr/include/iso/math_c99.h #defines isnan(x) to
11889 __builtin_isnan(x), but the bundled gcc, which identifies itself
11890 as gcc 3.4.3 (csl-sol210-3_4-branch+sol_rpath), does not have
11892 * floatfns.c (isnan): #undef, and then #define to a clone of
11894 (Fisnan): Always define, since it's always available now.
11895 (syms_of_floatfns): Always define isnan at the Lisp level.
11897 2011-09-06 Paul Eggert <eggert@cs.ucla.edu>
11899 * Makefile.in (gl-stamp): move-if-change now in build-aux (Bug#9169).
11901 2011-09-06 Paul Eggert <eggert@cs.ucla.edu>
11903 * fileio.c: Fix bugs with large file offsets (Bug#9428).
11904 The previous code assumed that file offsets (off_t values) fit in
11905 EMACS_INT variables, which is not true on typical 32-bit hosts.
11906 The code messed up by falsely reporting buffer overflow in cases
11907 such as (insert-file-contents "big" nil 1 2) into an empty buffer
11908 when "big" contains more than 2**29 bytes, even though this
11909 inserts just one byte and does not overflow the buffer.
11910 (Finsert_file_contents): Store file offsets as off_t
11911 values, not as EMACS_INT values. Check for overflow when
11912 converting between EMACS_INT and off_t. When checking for
11913 buffer overflow or for overlap, take the offsets into account.
11914 Don't use EMACS_INT for small values where int suffices.
11915 When checking for overlap, fix a typo: ZV was used where
11916 ZV_BYTE was intended.
11917 (Fwrite_region): Don't assume off_t fits into 'long'.
11918 * buffer.h (struct buffer.modtime_size): Now off_t, not EMACS_INT.
11920 2011-09-05 Michael Albinus <michael.albinus@gmx.de>
11922 * dbusbind.c (xd_signature_cat): Rename from signature_cat.
11924 2011-09-04 Paul Eggert <eggert@cs.ucla.edu>
11926 sprintf-related integer and memory overflow issues (Bug#9412).
11928 * doprnt.c (doprnt): Support printing ptrdiff_t and intmax_t values.
11929 (esprintf, exprintf, evxprintf): New functions.
11930 * keyboard.c (command_loop_level): Now EMACS_INT, not int.
11931 (cmd_error): Kbd macro iterations count is now EMACS_INT, not int.
11932 (modify_event_symbol): Do not assume that the length of
11933 name_alist_or_stem is safe to alloca and fits in int.
11934 (Fexecute_extended_command): Likewise for function name and binding.
11935 (Frecursion_depth): Wrap around reliably on integer overflow.
11936 * keymap.c (push_key_description): First arg is now EMACS_INT, not int,
11937 since some callers pass EMACS_INT values.
11938 (Fsingle_key_description): Don't crash if symbol name contains more
11939 than MAX_ALLOCA bytes.
11940 * minibuf.c (minibuf_level): Now EMACS_INT, not int.
11941 (get_minibuffer): Arg is now EMACS_INT, not int.
11942 * lisp.h (get_minibuffer, push_key_description): Reflect API changes.
11943 (esprintf, exprintf, evxprintf): New decls.
11944 * window.h (command_loop_level, minibuf_level): Reflect API changes.
11946 * dbusbind.c (signature_cat): New function.
11947 (xd_signature, Fdbus_register_signal):
11948 Do not overrun buffer; instead, report string overflow.
11950 * dispnew.c (add_window_display_history): Don't overrun buffer.
11951 Truncate instead; this is OK since it's just a log.
11953 * editfns.c (Fcurrent_time_zone): Don't overrun buffer
11954 even if the time zone offset is outlandishly large.
11955 Don't mishandle offset == INT_MIN.
11957 * emacs.c (main) [NS_IMPL_COCOA]: Don't overrun buffer
11958 when creating daemon; the previous buffer-overflow check was incorrect.
11960 * eval.c (verror): Simplify by rewriting in terms of evxprintf,
11961 which has the guts of the old verror function.
11963 * filelock.c (lock_file_1, lock_file): Don't blindly alloca long name;
11964 use SAFE_ALLOCA instead. Use esprintf to avoid int-overflow issues.
11966 * font.c: Include <float.h>, for DBL_MAX_10_EXP.
11967 (font_unparse_xlfd): Don't blindly alloca long strings.
11968 Don't assume XINT result fits in int, or that XFLOAT_DATA * 10
11969 fits in int, when using sprintf. Use single snprintf to count
11970 length of string rather than counting it via multiple sprintfs;
11971 that's simpler and more reliable.
11972 (font_unparse_fcname): Use it to avoid sprintf buffer overrun.
11973 (generate_otf_features) [0 && HAVE_LIBOTF]: Use esprintf, not
11974 sprintf, in case result does not fit in int.
11976 * fontset.c (num_auto_fontsets): Now printmax_t, not int.
11977 (fontset_from_font): Print it.
11979 * frame.c (tty_frame_count): Now printmax_t, not int.
11980 (make_terminal_frame, set_term_frame_name): Print it.
11981 (x_report_frame_params): In X, window IDs are unsigned long,
11982 not signed long, so print them as unsigned.
11983 (validate_x_resource_name): Check for implausibly long names,
11984 and don't assume name length fits in 'int'.
11985 (x_get_resource_string): Don't blindly alloca invocation name;
11986 use SAFE_ALLOCA. Use esprintf, not sprintf, in case result does
11989 * gtkutil.c: Include <float.h>, for DBL_MAX_10_EXP.
11990 (xg_check_special_colors, xg_set_geometry):
11991 Make sprintf buffers a bit bigger, to avoid potential buffer overrun.
11993 * lread.c (dir_warning): Don't blindly alloca buffer; use SAFE_ALLOCA.
11994 Use esprintf, not sprintf, in case result does not fit in int.
11996 * macros.c (executing_kbd_macro_iterations): Now EMACS_INT, not int.
11997 (Fend_kbd_macro): Don't mishandle MOST_NEGATIVE_FIXNUM by treating
11998 it as a large positive number.
11999 (Fexecute_kbd_macro): Don't assume repeat count fits in int.
12000 * macros.h (executing_kbd_macro_iterations): Now EMACS_INT, not int.
12002 * nsterm.m ((NSSize)windowWillResize): Use esprintf, not sprintf,
12003 in case result does not fit in int.
12005 * print.c (float_to_string): Detect width overflow more reliably.
12006 (print_object): Make sprintf buffer a bit bigger, to avoid potential
12007 buffer overrun. Don't assume list length fits in 'int'. Treat
12008 print length of 0 as 0, not as infinity; to be consistent with other
12009 uses of print length in this function. Don't overflow print length
12010 index. Don't assume hash table size fits in 'long', or that
12011 vectorlike size fits in 'unsigned long'.
12013 * process.c (make_process): Use printmax_t, not int, to format
12014 process-name gensyms.
12016 * sysdep.c (snprintf) [! HAVE_SNPRINTF]: New function.
12018 * term.c (produce_glyphless_glyph): Make sprintf buffer a bit bigger
12019 to avoid potential buffer overrun.
12021 * xfaces.c (x_update_menu_appearance): Don't overrun buffer
12022 if X resource line is longer than 512 bytes.
12024 * xfns.c (x_window): Make sprintf buffer a bit bigger
12025 to avoid potential buffer overrun.
12027 * xterm.c (x_io_error_quitter): Don't overrun sprintf buffer.
12029 * xterm.h (x_check_errors): Add ATTRIBUTE_FORMAT_PRINTF.
12031 2011-09-04 Paul Eggert <eggert@cs.ucla.edu>
12033 Integer overflow fixes for scrolling, etc.
12034 Without these, Emacs silently mishandles large integers sometimes.
12035 For example, "C-u 4294967297 M-x recenter" was treated as if
12036 it were "C-u 1 M-x recenter" on a typical 64-bit host.
12038 * xdisp.c (try_window_id): Check Emacs fixnum range before
12039 converting to 'int'.
12041 * window.c (window_scroll_line_based, Frecenter):
12042 Check that an Emacs fixnum is in range before assigning it to 'int'.
12043 (Frecenter, Fmove_to_window_line): Use EMACS_INT, not int, for
12044 values converted from Emacs fixnums.
12045 (Frecenter): Don't wrap around a line count if it is out of 'int'
12046 range; instead, treat it as an extreme value.
12047 (Fset_window_configuration, compare_window_configurations):
12048 Use ptrdiff_t, not int, for index that might exceed 2 GiB.
12050 * search.c (Freplace_match): Use ptrdiff_t, not int, for indexes
12051 that can exceed INT_MAX. Check that EMACS_INT value is in range
12052 before assigning it to the (possibly-narrower) index.
12053 (match_limit): Don't assume that a fixnum can fit in 'int'.
12055 * print.c (print_object): Use ptrdiff_t, not int, for index that can
12058 * indent.c (position_indentation): Now takes ptrdiff_t, not int.
12059 (Fvertical_motion): Don't wrap around LINES values that don't fit
12060 in 'int'. Instead, treat them as extreme values. This is good
12061 enough for windows, which can't have more than INT_MAX lines anyway.
12063 2011-09-03 Lars Magne Ingebrigtsen <larsi@gnus.org>
12065 * Require libxml/parser.h to avoid compilation warning.
12067 * emacs.c (shut_down_emacs): Call xmlCleanupParser on shutdown.
12069 * xml.c (parse_region): Don't call xmlCleanupParser after parsing,
12070 since this reportedly can destroy thread storage.
12072 2011-08-30 Chong Yidong <cyd@stupidchicken.com>
12074 * syntax.c (find_defun_start): Update all cache variables if
12075 exiting early (Bug#9401).
12077 2011-08-30 Eli Zaretskii <eliz@gnu.org>
12079 * image.c (x_bitmap_pixmap): Cast to int to avoid compiler warnings.
12081 * xdisp.c (produce_stretch_glyph): No longer static, compiled also
12082 when HAVE_WINDOW_SYSTEM is not defined. Support both GUI and TTY
12083 frames. Call tty_append_glyph in the TTY case. (Bug#9402)
12085 * term.c (tty_append_glyph): New function.
12086 (produce_stretch_glyph): Static function and its prototype deleted.
12088 * dispextern.h (produce_stretch_glyph, tty_append_glyph):
12091 2011-08-29 Paul Eggert <eggert@cs.ucla.edu>
12093 * image.c (parse_image_spec): Check for nonnegative, not for positive,
12094 when checking :margin (Bug#9390).
12095 (IMAGE_NON_NEGATIVE_INTEGER_VALUE_OR_PAIR):
12096 Rename from IMAGE_POSITIVE_INTEGER_VALUE_OR_PAIR,
12097 so that the name doesn't mislead. All uses changed.
12099 2011-08-28 Johan Bockgård <bojohan@gnu.org>
12101 * term.c (init_tty) [HAVE_GPM]: Move mouse settings after
12104 2011-08-27 Eli Zaretskii <eliz@gnu.org>
12106 * xdisp.c (move_it_to): Don't bail out early when reaching
12107 position beyond to_charpos, if we are scanning backwards.
12108 (move_it_vertically_backward): When DY == 0, make sure we get to
12109 the first character in the line after the newline.
12111 2011-08-27 Paul Eggert <eggert@cs.ucla.edu>
12113 * ccl.c: Improve and simplify overflow checking (Bug#9196).
12114 (ccl_driver): Do not generate an out-of-range pointer.
12115 (Fccl_execute_on_string): Remove unnecessary check for
12116 integer overflow, noted by Stefan Monnier in
12117 <http://lists.gnu.org/archive/html/emacs-devel/2011-08/msg00979.html>.
12118 Remove a FIXME that didn't need fixing.
12119 Simplify the newly-introduced buffer reallocation code.
12121 2011-08-27 Juanma Barranquero <lekktu@gmail.com>
12123 * makefile.w32-in ($(BLD)/alloc.$(O)): Depend on lib/verify.h.
12125 2011-08-26 Paul Eggert <eggert@cs.ucla.edu>
12127 Integer and memory overflow issues (Bug#9196).
12129 * doc.c (get_doc_string): Rework so that
12130 get_doc_string_buffer_size is the actual buffer size, rather than
12131 being 1 less than the actual buffer size; this makes xpalloc more
12134 * image.c (x_allocate_bitmap_record, cache_image):
12135 * xselect.c (Fx_register_dnd_atom):
12136 Simplify previous changes by using xpalloc.
12138 * buffer.c (overlay_str_len): Now ptrdiff_t, not EMACS_INT,
12139 since either will do and ptrdiff_t is convenient with xpalloc.
12141 * charset.c (charset_table_size)
12142 (struct charset_sort_data.priority): Now ptrdiff_t.
12143 (charset_compare): Don't overflow if priorities differ greatly.
12144 (Fsort_charsets): Don't assume list length fits in int.
12145 Check for size-calculation overflow when allocating sort data.
12146 (syms_of_charset): Allocate an initial charset table that is
12147 just under 64 KiB, to avoid problems with glibc malloc and mmap.
12149 * cmds.c (internal_self_insert): Check for size-calculation overflow.
12151 * composite.h (struct composition.glyph_len): Now int, not unsigned.
12152 The actual value is always <= INT_MAX, and leaving it unsigned made
12153 overflow checking harder.
12155 * dispextern.h (struct glyph_matrix.rows_allocated)
12156 (struct face_cache.size): Now ptrdiff_t, for convenience in use
12157 with xpalloc. The values are still always <= INT_MAX.
12159 * indent.c (compute_motion): Adjust to region_cache_forward sig change.
12161 * lisp.h (xnmalloc, xnrealloc, xpalloc): New decls.
12162 (SAFE_NALLOCA): New macro.
12164 * region-cache.c (struct boundary.pos, find_cache_boundary)
12165 (move_cache_gap, insert_cache_boundary, delete_cache_boundaries)
12166 (set_cache_region, invalidate_region_cache)
12167 (revalidate_region_cache, know_region_cache, region_cache_forward)
12168 (region_cache_backward, pp_cache):
12169 Use ptrdiff_t, not EMACS_INT, since either will do. This is needed
12170 so that ptrdiff_t * can be passed to xpalloc.
12171 (struct region_cache): Similarly, for gap_start, gap_len, cache_len,
12172 beg_unchanged, end_unchanged, buffer_beg, buffer_end members.
12173 (pp_cache): Don't assume cache_len fits in int.
12174 * region-cache.h: Adjust extern decls to match.
12176 * search.c (scan_buffer, Freplace_match): Use ptrdiff_t, not
12177 EMACS_INT, since either will do, for xpalloc.
12179 * alloc.c: Include verify.h, and check that int fits in ptrdiff_t.
12180 (xnmalloc, xnrealloc, xpalloc): New functions.
12182 * bidi.c (bidi_shelve_header_size): New constant.
12183 (bidi_cache_ensure_space, bidi_shelve_cache): Use it.
12184 (bidi_cache_ensure_space): Avoid integer overflow when allocating.
12186 * bidi.c (bidi_cache_shrink):
12187 * buffer.c (overlays_at, overlays_in, record_overlay_string)
12189 Don't update size of array until after memory allocation succeeds,
12190 because xmalloc/xrealloc may not return.
12191 (struct sortstrlist.bytes): Now ptrdiff_t, as EMACS_INT doesn't help
12192 now that we have proper integer overflow checking.
12193 (record_overlay_string, overlay_strings): Catch overflows when
12194 calculating size of overlay_str_buf.
12196 * callproc.c (Fcall_process): Check for size overflow when
12197 calculating size of args2.
12198 (child_setup): Avoid overflow by using size_t rather than ptrdiff_t.
12199 Normally we prefer signed values, but sticking with ptrdiff_t would
12200 require adding more-complicated checks.
12202 * ccl.c (Fccl_execute_on_string): Check for memory overflow.
12203 Use ptrdiff_t rather than EMACS_INT where ptrdiff_t will do.
12204 Redo buffer-overflow calculations to avoid integer overflow.
12205 Add a FIXME comment where memory seems to be over-allocated.
12207 * character.c (Fstring): Check for size-calculation overflow.
12209 * coding.c (produce_chars): Redo buffer-overflow calculations to avoid
12210 unnecessary integer overflow. Check for size overflow.
12211 (encode_coding_object): Don't update size until xmalloc succeeds.
12213 * composite.c (get_composition_id): Check for overflow in glyph
12214 length calculations.
12216 Integer and memory overflow fixes for display code.
12217 * dispextern.h (struct glyph_pool.nglyphs): Now ptrdiff_t, not int.
12218 * dispnew.c (adjust_glyph_matrix, realloc_glyph_pool)
12219 (scrolling_window): Check for overflow in size calculations.
12220 (line_draw_cost, realloc_glyph_pool, add_row_entry):
12221 Don't assume glyph table len fits in int.
12222 (struct row_entry.bucket, row_entry_pool_size, row_entry_idx)
12223 (row_table_size): Now ptrdiff_t, not int.
12224 (scrolling_window): Avoid overflow in size calculations.
12225 Don't update size until allocation succeeds.
12226 * fns.c (concat): Check for overflow in size calculations.
12227 (next_almost_prime): Verify NEXT_ALMOST_PRIME_LIMIT.
12228 * lisp.h (RANGED_INTEGERP, TYPE_RANGED_INTEGERP): New macros.
12229 (NEXT_ALMOST_PRIME_LIMIT): New constant.
12231 * doc.c (get_doc_string_buffer_size): Now ptrdiff_t, not int.
12232 (get_doc_string): Check for size calculation overflow.
12233 Don't update size until allocation succeeds.
12234 (get_doc_string, Fsubstitute_command_keys): Use ptrdiff_t, not
12235 EMACS_INT, where ptrdiff_t will do.
12236 (Fsubstitute_command_keys): Check for string overflow.
12238 * editfns.c (set_time_zone_rule): Don't assume environment length
12240 (message_length): Now ptrdiff_t, not int.
12241 (Fmessage_box): Don't update size until allocation succeeds.
12242 Don't assume message length fits in int.
12243 (Fformat): Use ptrdiff_t, not EMACS_INT, where ptrdiff_t will do.
12245 * emacs.c (main): Do not reallocate argv, since there is a null at
12246 the end that can be overwritten, and this way there's no need to
12247 worry about size-calculation overflow.
12248 (sort_args): Check for size-calculation overflow.
12250 * eval.c (init_eval_once, grow_specpdl): Don't update size until
12252 (call_debugger, grow_specpdl): Redo calculations to avoid overflow.
12254 * frame.c (set_menu_bar_lines, x_set_frame_parameters)
12255 (x_set_scroll_bar_width, x_figure_window_size):
12256 Check for integer overflow.
12257 (x_set_alpha): Do not assume XINT fits in int.
12259 * frame.h (struct frame): Use int, not EMACS_INT, where int works.
12260 This is for the members text_lines, text_cols, total_lines, total_cols,
12261 where the system imposes an 'int' limit.
12263 * fringe.c (Fdefine_fringe_bitmap):
12264 Don't update size until alloc works.
12266 * ftfont.c (ftfont_get_open_type_spec, setup_otf_gstring)
12267 (ftfont_shape_by_flt): Check for integer overflow in size calculations.
12269 * gtkutil.c (get_utf8_string, xg_store_widget_in_map):
12270 Check for size-calculation overflow.
12271 (get_utf8_string): Use ptrdiff_t, not size_t, where either will
12272 do, as we prefer signed integers.
12273 (id_to_widget.max_size, id_to_widget.used)
12274 (xg_store_widget_in_map, xg_remove_widget_from_map)
12275 (xg_get_widget_from_map, xg_get_scroll_id_for_window)
12276 (xg_remove_scroll_bar, xg_update_scrollbar_pos):
12277 Use and return ptrdiff_t, not int.
12278 (xg_gtk_scroll_destroy): Don't assume ptrdiff_t fits in int.
12279 * gtkutil.h: Change prototypes to match the above.
12281 * image.c (RANGED_INTEGERP, TYPE_RANGED_INTEGERP): Remove; these
12282 are duplicate now that they've been promoted to lisp.h.
12283 (x_allocate_bitmap_record, x_alloc_image_color)
12284 (make_image_cache, cache_image, xpm_load):
12285 Don't update size until alloc is done.
12286 (xpm_load, lookup_rgb_color, lookup_pixel_color, x_to_xcolors)
12288 Check for size calculation overflow.
12289 (ct_colors_allocated_max): New constant.
12290 (x_to_xcolors, x_detect_edges): Reorder multiplicands to avoid
12293 * keyboard.c (read_char, menu_bar_items, tool_bar_items)
12294 (read_char_x_menu_prompt, read_char_minibuf_menu_width)
12295 (read_char_minibuf_menu_prompt, follow_key, read_key_sequence):
12296 Use ptrdiff_t, not int, to count maps.
12297 (read_char_minibuf_menu_prompt): Check for overflow in size
12298 calculations. Don't update size until allocation succeeds.
12299 Redo calculations to avoid overflow.
12300 * keyboard.h: Change prototypes to match the above.
12302 * keymap.c (cmm_size, current_minor_maps): Use ptrdiff_t, not int,
12304 (current_minor_maps): Check for size calculation overflow.
12305 * keymap.h: Change prototypes to match the above.
12307 * lread.c (read1, init_obarray): Don't update size until alloc done.
12309 * macros.c (Fstart_kbd_macro): Don't update size until alloc done.
12310 (store_kbd_macro_char): Reorder multiplicands to avoid overflow.
12312 * nsterm.h (struct ns_color_table.size, struct ns_color_table.avail):
12313 Now ptrdiff_t, not int.
12314 * nsterm.m (ns_index_color): Use ptrdiff_t, not int, for table indexes.
12315 (ns_draw_fringe_bitmap): Rewrite to avoid overflow.
12317 * process.c (Fnetwork_interface_list): Check for overflow
12318 in size calculation.
12320 * region-cache.c (move_cache_gap): Check for size calculation overflow.
12322 * scroll.c (do_line_insertion_deletion_costs): Check for size calc
12323 overflow. Don't bother calling xmalloc when xrealloc will do.
12325 * search.c (Freplace_match): Check for size calculation overflow.
12326 (Fset_match_data): Don't assume list lengths fit in 'int'.
12328 * sysdep.c (system_process_attributes): Use ptrdiff_t, not int,
12329 for command line length. Do not attempt to address one before the
12330 beginning of an array, as that's not portable.
12332 * term.c (max_frame_lines): Remove; unused.
12333 (encode_terminal_src_size, encode_terminal_dst_size): Now ptrdiff_t,
12335 (encode_terminal_code, calculate_costs): Check for size
12336 calculation overflow.
12337 (encode_terminal_code): Use ptrdiff_t, not int, to record glyph
12338 table lengths and related sizes. Don't update size until alloc
12339 done. Redo calculations to avoid overflow.
12340 (calculate_costs): Don't bother calling xmalloc when xrealloc will do.
12342 * termcap.c (tgetent): Use ptrdiff_t, not int, to record results of
12343 subtracting pointers.
12344 (gobble_line): Check for overflow more carefully. Don't update size
12347 * tparam.c (tparam1): Use ptrdiff_t, not int, for sizes.
12348 Don't update size until alloc done.
12349 Redo size calculations to avoid overflow.
12350 Check for size calculation overflow.
12351 (main) [DEBUG]: Fix typo in invoking tparam1.
12353 * xdisp.c (store_mode_line_noprop_char, x_consider_frame_title):
12354 Use ptrdiff_t, not int, for sizes.
12355 (store_mode_line_noprop_char): Don't update size until alloc done.
12357 * xfaces.c (lface_id_to_name_size, Finternal_make_lisp_face):
12358 Use ptrdiff_t, not int, for sizes.
12359 (Finternal_make_lisp_face, cache_face):
12360 Check for size calculation overflow.
12361 (cache_face): Treat size calculation overflows as if they were
12362 memory exhaustion (the usual treatment), rather than aborting.
12364 * xfns.c (x_encode_text, x_set_name_internal)
12365 (Fx_change_window_property): Use ptrdiff_t, not int, to count
12366 sizes, since they can exceed INT_MAX in size. Check for size
12367 calculation overflow.
12369 * xgselect.c (gfds_size): Now ptrdiff_t, for convenience with xpalloc.
12370 (xg_select): Check for size calculation overflow.
12371 Don't update size until alloc done.
12373 * xrdb.c (get_environ_db): Don't assume path length fits in int,
12374 as sprintf is limited to int lengths.
12376 * xselect.c (X_LONG_SIZE, X_SHRT_MAX, X_SHRT_MIN, X_LONG_MAX)
12377 (X_LONG_MIN): New macros.
12378 Use them to make the following changes clearer.
12379 (MAX_SELECTION_QUANTUM): Make the other bounds on this value clearer.
12380 This change doesn't affect the value now, but it may help remind
12381 future maintainers not to raise the value too much later.
12382 (SELECTION_QUANTUM): Remove, replacing with ...
12383 (selection_quantum): ... new function, which avoids overflow.
12385 (struct selection_data.size): Now ptrdiff_t, not int, to avoid
12386 assumption that selection length fits in 'int'.
12387 (x_reply_selection_request, x_handle_selection_request)
12388 (x_get_window_property, receive_incremental_selection)
12389 (x_get_window_property_as_lisp_data, selection_data_to_lisp_data)
12390 (lisp_data_to_selection_data, clean_local_selection_data):
12391 Use ptrdiff_t, not int, to record length of selection.
12392 (x_reply_selection_request, x_get_window_property)
12393 (receive_incremental_selection, x_property_data_to_lisp):
12394 Redo calculations to avoid overflow.
12395 (x_reply_selection_request): When sending hint, ceiling it at
12396 X_LONG_MAX rather than relying on wraparound overflow to send
12398 (x_get_window_property, receive_incremental_selection)
12399 (lisp_data_to_selection_data, x_property_data_to_lisp):
12400 Check for size-calculation overflow.
12401 (x_get_window_property, receive_incremental_selection)
12402 (lisp_data_to_selection_data, Fx_register_dnd_atom):
12403 Don't store size until memory allocation succeeds.
12404 (x_get_window_property): Plug memory leak on memory exhaustion.
12405 Don't double-block input; malloc is safe here. Don't assume 2**34
12406 - 4 fits in unsigned long. Add an xassert to check
12407 XGetWindowProperty overflow. Be more careful about overflow
12408 calculations, and distinguish size from memory overflow better.
12409 (receive_incremental_selection): When tracing, don't assume
12410 unsigned int is less than INT_MAX.
12411 (x_selection_data_to_lisp_data): Remove unnecessary (and in theory
12412 harmful) conversions of unsigned short to int.
12413 (lisp_data_to_selection_data): Don't assume that integers
12414 in the range -65535 through -1 fit in an X unsigned short.
12415 Don't assume that ULONG_MAX == X_ULONG_MAX. Don't store into
12416 result parameters unless successful. Rely on cons_to_unsigned
12417 to report problems with elements; the old code wasn't right anyway.
12418 (x_check_property_data): Check for int overflow; we cannot use
12419 a wider type due to X limits.
12420 (x_handle_dnd_message): Use unsigned int, to avoid int overflow.
12422 * xsmfns.c (smc_save_yourself_CB): Check for size calc overflow.
12424 * xterm.c (x_color_cells, x_send_scrollbar_event, handle_one_xevent)
12425 (x_term_init): Check for size calculation overflow.
12426 (x_color_cells): Don't store size until memory allocation succeeds.
12427 (handle_one_xevent): Use ptrdiff_t, not int, for byte counts.
12428 Don't assume alloca size is less than MAX_ALLOCA.
12429 (x_term_init): Don't assume length fits in int (sprintf is limited
12432 Use ptrdiff_t for composition IDs.
12433 * character.c (lisp_string_width):
12434 * composite.c (composition_table_size, n_compositions)
12435 (get_composition_id, composition_gstring_from_id):
12436 * dispextern.h (struct glyph_string.cmp_id, struct composition_it.id):
12437 * xdisp.c (BUILD_COMPOSITE_GLYPH_STRING):
12438 * window.c (Frecenter):
12439 Use ptrdiff_t, not int, for composition IDs.
12440 * composite.c (get_composition_id): Check for integer overflow.
12441 * composite.h: Adjust prototypes to match the above changes.
12443 Use ptrdiff_t for hash table indexes.
12444 * category.c (hash_get_category_set):
12445 * ccl.c (ccl_driver):
12446 * charset.h (struct charset.hash_index, CHECK_CHARSET_GET_ID):
12447 * coding.c (coding_system_charset_list, detect_coding_system):
12448 * coding.h (struct coding_system.id):
12449 * composite.c (get_composition_id, gstring_lookup_cache):
12450 * fns.c (hash_lookup, hash_put, Fgethash, Fputhash):
12451 * image.c (xpm_get_color_table_h):
12452 * lisp.h (hash_lookup, hash_put):
12453 * minibuf.c (Ftest_completion):
12454 Use ptrdiff_t for hash table indexes, not int (which is too
12455 narrow, on 64-bit hosts) or EMACS_INT (which is too wide, on
12456 32-bit --with-wide-int hosts).
12458 * charset.c (Fdefine_charset_internal): Check for integer overflow.
12459 Add a FIXME comment about memory leaks.
12460 (syms_of_charset): Don't assume xmalloc returns.
12462 Don't assume that stated character widths fit in int.
12463 * character.c (Fchar_width, c_string_width, lisp_string_width):
12464 * character.h (CHAR_WIDTH):
12465 * indent.c (MULTIBYTE_BYTES_WIDTH):
12466 Use sanitize_char_width to avoid undefined and/or bad behavior
12467 with outlandish widths.
12468 * character.h (sanitize_tab_width): Rename from sanitize_width,
12469 now that we have two such functions. All uses changed.
12470 (sanitize_char_width): New inline function.
12472 Don't assume that tab-width fits in int.
12473 * character.h (sanitize_width): New inline function.
12474 (SANE_TAB_WIDTH): New macro.
12475 (ASCII_CHAR_WIDTH): Use it.
12476 * indent.c (sane_tab_width): Remove. All uses replaced by
12477 SANE_TAB_WIDTH (current_buffer).
12478 * xdisp.c (init_iterator): Use SANE_TAB_WIDTH.
12480 * fileio.c: Integer overflow issues with file modes.
12481 (Fset_file_modes, auto_save_1): Don't assume EMACS_INT fits in int.
12483 * charset.c (read_hex): New arg OVERFLOW. All uses changed.
12484 Remove unreachable code.
12485 (read_hex, load_charset_map_from_file): Check for integer overflow.
12487 * xterm.c: Don't go over XClientMessageEvent limit.
12488 (scroll_bar_windows_size): Now ptrdiff_t, as we prefer signed.
12489 (x_send_scroll_bar_event): Likewise. Check that the size does not
12490 exceed limits imposed by XClientMessageEvent, as well as the usual
12491 ptrdiff_t and size_t limits.
12493 * keyboard.c: Overflow, signedness and related fixes.
12494 (make_lispy_movement): Use same integer type in forward decl
12495 that is used in the definition.
12496 (read_key_sequence, keyremap_step):
12497 Change bufsize argument back to int, undoing my 2011-03-30 change.
12498 We prefer signed types, and int is wide enough here.
12499 (parse_tool_bar_item): Don't assume tool_bar_max_label_size is less
12500 than TYPE_MAXIMUM (EMACS_INT) / 2. Don't let the label size grow
12501 larger than STRING_BYTES_BOUND. Use ptrdiff_t for Emacs string
12502 length, not size_t. Use ptrdiff_t for index, not int.
12503 (keyremap_step, read_key_sequence): Redo bufsize check to avoid
12504 possibility of integer overflow.
12506 Overflow, signedness and related fixes for images.
12508 * dispextern.h (struct it.stack[0].u.image.image_id)
12509 (struct_it.image_id, struct image.id, struct image_cache.size)
12510 (struct image_cache.used, struct image_cache.ref_count):
12511 * gtkutil.c (update_frame_tool_bar):
12512 * image.c (x_reference_bitmap, Fimage_size, Fimage_mask_p)
12513 (Fimage_metadata, free_image_cache, clear_image_cache, lookup_image)
12514 (cache_image, mark_image_cache, x_kill_gs_process, Flookup_image):
12515 * nsmenu.m (update_frame_tool_bar):
12516 * xdisp.c (calc_pixel_width_or_height):
12517 * xfns.c (image_cache_refcount):
12518 Image IDs are now ptrdiff_t, not int, to avoid arbitrary limits
12519 on typical 64-bit hosts.
12521 * image.c (RANGED_INTEGERP, TYPE_RANGED_INTEGERP): New macros.
12522 (x_bitmap_pixmap, x_create_x_image_and_pixmap):
12523 Omit unnecessary casts to int.
12524 (parse_image_spec): Check that integers fall into 'int' range
12525 when the callers expect that.
12526 (image_ascent): Redo ascent calculation to avoid int overflow.
12527 (clear_image_cache): Avoid overflow when sqrt (INT_MAX) < nimages.
12528 (lookup_image): Remove unnecessary tests.
12529 (xbm_image_p): Locals are now of int, not EMACS_INT,
12530 since parse_image_check makes sure they fit into int.
12531 (png_load, gif_load, svg_load_image):
12532 Prefer int to unsigned where either will do.
12533 (tiff_handler): New function, combining the cores of the
12534 old tiff_error_handler and tiff_warning_handler.
12535 This function is rewritten to use vsnprintf and thereby avoid
12536 stack buffer overflows. It uses only the features of vsnprintf
12537 that are common to both POSIX and native Microsoft.
12538 (tiff_error_handler, tiff_warning_handler): Use it.
12539 (tiff_load, gif_load, imagemagick_load_image):
12540 Don't assume :index value fits in 'int'.
12541 (gif_load): Omit unnecessary cast to double, and avoid double-rounding.
12542 (imagemagick_load_image): Check that crop parameters fit into
12543 the integer types that MagickCropImage accepts. Don't assume
12544 Vimagemagick_render_type has a nonnegative value. Don't assume
12545 size_t fits in 'long'.
12546 (gs_load): Use printmax_t to print the widest integers possible.
12547 Check for integer overflow when computing image height and width.
12549 2011-08-26 Eli Zaretskii <eliz@gnu.org>
12551 * xdisp.c (redisplay_window): Don't force window start if point
12552 will be invisible in the resulting window. (Bug#9324)
12554 2011-08-25 Eli Zaretskii <eliz@gnu.org>
12556 * xdisp.c (compute_display_string_pos): Return 2 in DISP_PROP when
12557 the display spec is of the form `(space ...)'.
12558 (handle_display_spec): Return the value returned by
12559 handle_single_display_spec, not just 1 or zero.
12560 (handle_single_display_spec): If the display spec is of the form
12561 `(space ...)', and specifies display in the text area, return 2
12563 (try_cursor_movement): Check for the need to scroll more
12564 accurately, and prefer exact match for point under bidi.
12565 Don't advance `row' beyond the last row of the window.
12567 * dispextern.h (struct bidi_it): Rename the disp_prop_p member
12568 into disp_prop; all users changed.
12570 * bidi.c (bidi_fetch_char): If compute_display_string_pos returns
12571 DISP_PROP = 2, substitute the u+2029 PARAGRAPH SEPARATOR character
12572 for the text covered by the display property.
12574 2011-08-25 Chong Yidong <cyd@stupidchicken.com>
12576 * buffer.c (Fbury_buffer_internal): Rename from Funrecord_buffer.
12577 Change return value to nil.
12578 (Frecord_buffer): Delete unused function.
12580 2011-08-24 Eli Zaretskii <eliz@gnu.org>
12582 * xdisp.c (Fcurrent_bidi_paragraph_direction): For unibyte
12583 buffers, return left-to-right.
12584 (set_cursor_from_row): Consider candidate row a win if its glyph
12585 represents a newline and point is on that newline. Fixes cursor
12586 positioning on the newline at EOL of R2L text within L2R
12587 paragraph, and vice versa.
12588 (try_cursor_movement): Check continued rows, in addition to
12589 continuation rows. Fixes unwarranted scroll when point enters a
12590 continued line of R2L text within an L2R paragraph, or vice versa.
12591 (cursor_row_p): Consider the case of point being equal to
12592 MATRIX_ROW_END_CHARPOS. Prevents cursor being stuck when moving
12593 from the end of a short line to the beginning of a continued line
12594 of R2L text within L2R paragraph.
12595 (RECORD_MAX_MIN_POS): For max_pos, use IT_CHARPOS even for
12596 composed characters.
12598 * bidi.c (bidi_check_type): Use xassert.
12599 (bidi_cache_iterator_state): Update the disp_pos and disp_prop_p
12602 2011-08-23 Eli Zaretskii <eliz@gnu.org>
12604 * bidi.c (bidi_get_type): Abort if we get zero as the bidi type of
12607 2011-08-23 Chong Yidong <cyd@stupidchicken.com>
12609 * nsfont.m (ns_otf_to_script): Fix typo.
12611 2011-08-22 Kenichi Handa <handa@m17n.org>
12613 * chartab.c (Fset_char_table_extra_slot): Do not inhibit setting a
12614 extra slot even if the purpose is char-code-property-table.
12616 2011-08-23 Eli Zaretskii <eliz@gnu.org>
12618 * xdisp.c (redisplay_window): When computing centering_position,
12619 account for the height of the header line. (Bug#8874)
12621 * dispnew.c (buffer_posn_from_coords): Use buf_charpos_to_bytepos
12622 instead of CHAR_TO_BYTE. Fixes a crash when a completion
12623 candidate is selected by the mouse, and that candidate has a
12624 composed character under the mouse.
12626 * xdisp.c (x_produce_glyphs): Set it->nglyphs to 1. Fixes pixel
12627 coordinates reported by pos-visible-in-window-p for a composed
12628 character in column zero.
12630 2011-08-23 Stefan Monnier <monnier@iro.umontreal.ca>
12632 * cmds.c (Fself_insert_command): Mention post-self-insert-hook.
12634 2011-08-22 Eli Zaretskii <eliz@gnu.org>
12636 * xdisp.c (BUFFER_POS_REACHED_P): If this is a composition,
12637 consider it a hit if to_charpos is anywhere in the range of the
12638 composed buffer positions.
12640 2011-08-22 Chong Yidong <cyd@stupidchicken.com>
12642 * image.c (gif_load): Don't assume that each subimage has the same
12643 dimensions as the base image. Handle disposal method that is
12644 "undefined" by the gif spec (Bug#9335).
12646 2011-08-20 Chong Yidong <cyd@stupidchicken.com>
12648 * eval.c (Fsignal): Handle `debug' symbol in error handler (Bug#9329).
12649 (Fcondition_case): Document `debug' symbol in error handler.
12651 2011-08-19 Eli Zaretskii <eliz@gnu.org>
12653 * xfaces.c (face_at_buffer_position): Avoid repeated evaluation of
12654 face ID by FACE_FROM_ID, and avoid a crash when mouse is moved
12655 from an Org mode buffer to a Speedbar frame.
12657 * xdisp.c (RECORD_MAX_MIN_POS): If the display element comes from
12658 a composition, take its buffer position from IT->cmp_it.charpos.
12659 Fixes cursor positioning at the beginning of a line that begins
12660 with a composed character.
12662 2011-08-18 Eli Zaretskii <eliz@gnu.org>
12664 * bidi.c (bidi_get_type): If bidi_type_table reports zero as the
12665 character bidirectional type, use STRONG_L instead. Fixes crashes
12666 in a buffer produced by `describe-categories'.
12668 * dispextern.h (struct bidi_it): Move disp_pos and disp_prop_p
12669 members before the level stack, so they would be saved and
12670 restored when copying iterator state. Fixes incorrect reordering
12671 around TABs covered by display properties.
12673 2011-08-18 Andreas Schwab <schwab@linux-m68k.org>
12675 * process.c (Fnetwork_interface_list): Correctly determine buffer size.
12677 2011-08-17 Chong Yidong <cyd@stupidchicken.com>
12679 * eval.c (internal_condition_case, internal_condition_case_1)
12680 (internal_condition_case_2, internal_condition_case_n):
12681 Remove unnecessary aborts (Bug#9081).
12683 2011-08-17 Eli Zaretskii <eliz@gnu.org>
12685 * lread.c (Fload) [DOS_NT]: If `openp' returns -2, but the file
12686 has no `load' handler, try opening the file locally. (Bug#9311)
12688 2011-08-16 Ken Brown <kbrown@cornell.edu>
12690 * gmalloc.c: Expand comment.
12692 2011-08-16 Eli Zaretskii <eliz@gnu.org>
12694 * xdisp.c (set_cursor_from_row): Don't accept a previous candidate
12695 if it fails the cursor_row_p test. Fixes cursor positioning at ZV.
12697 2011-08-16 Ken Brown <kbrown@cornell.edu>
12699 Fix memory allocation problems in Cygwin build (Bug#9273).
12701 * unexcw.c ( __malloc_initialized): Declare external variable.
12702 (fixup_executable): Force the dumped emacs to reinitialize malloc.
12704 * gmalloc.c [CYGWIN] (bss_sbrk_heapbase, bss_sbrk_heapinfo):
12706 (malloc_initialize_1) [CYGWIN]: Prepare for reinitializing the
12708 (_free_internal_nolock) [CYGWIN]: Ignore requests to free storage
12709 in the static heap.
12710 [CYGWIN] (special_realloc): New function.
12711 (_realloc_internal_nolock) [CYGWIN]: Use the new function on
12712 requests to realloc storage in the static heap.
12714 2011-08-15 Paul Eggert <eggert@cs.ucla.edu>
12716 * bidi.c (bidi_initialize): Remove unused local.
12718 2011-08-15 Eli Zaretskii <eliz@gnu.org>
12721 * biditype.h: Remove file.
12722 * makefile.w32-in ($(BLD)/bidi.$(O)):
12723 * deps.mk (bidi.o): Remove biditype.h and bidimirror.h.
12725 * dispextern.h: Fix a typo in the comment to bidi_type_t.
12727 * chartab.c: Improve commentary for the uniprop_table API.
12729 * bidi.c (bidi_paragraph_init): Support zero value of
12730 bidi_ignore_explicit_marks_for_paragraph_level.
12731 (bidi_initialize): Use uniprop_table instead of including
12732 biditype.h and bidimirror.h.
12734 * xdisp.c (move_it_in_display_line_to): Don't reset pixel
12735 coordinates of the iterator when restoring from ppos_it.
12738 2011-08-14 Kenichi Handa <handa@m17n.org>
12740 * process.c (create_process): Call setup_process_coding_systems
12741 after the pid of the process is set to -1 (Bug#8162).
12743 2011-08-14 Eli Zaretskii <eliz@gnu.org>
12745 * xdisp.c (move_it_in_display_line_to): Don't invoke
12746 IT_RESET_X_ASCENT_DESCENT when iterator position was restored from
12747 ppos_it. Fixes vertical cursor motion when line beginning is
12748 covered by an image. (Bug#9296)
12750 2011-08-14 Jan Djärv <jan.h.d@swipnet.se>
12752 * nsterm.h (ns_run_ascript): Declare.
12753 (NSAPP_DATA2_RUNASSCRIPT): Define.
12755 * nsfns.m (as_script, as_result, as_status): New static variables.
12756 (ns_run_ascript): New function.
12757 (Fns_do_applescript): Set variables as_*. Make an NSApplicationDefined
12758 event with data2 set to NSAPP_DATA2_RUNASSCRIPT, post it and then start
12759 the event loop. Get status from as_status (Bug#7276).
12761 * nsterm.m (sendEvent): If event is NSApplicationDefined and
12762 data2 is NSAPP_DATA2_RUNASSCRIPT, call ns_run_ascript and then exit
12763 the event loop (Bug#7276).
12765 2011-08-14 Andreas Schwab <schwab@linux-m68k.org>
12767 * gnutls.c (QCgnutls_bootprop_priority)
12768 (QCgnutls_bootprop_trustfiles, QCgnutls_bootprop_keylist)
12769 (QCgnutls_bootprop_crlfiles, QCgnutls_bootprop_callbacks)
12770 (QCgnutls_bootprop_loglevel, QCgnutls_bootprop_hostname)
12771 (QCgnutls_bootprop_min_prime_bits, QCgnutls_bootprop_verify_flags)
12772 (QCgnutls_bootprop_verify_hostname_error)
12773 (QCgnutls_bootprop_callbacks_verify): Rename from
12774 Qgnutls_bootprop_..., all uses changed.
12776 * xfaces.c (QCignore_defface): Rename from Qignore_defface, all
12779 2011-08-14 Paul Eggert <eggert@cs.ucla.edu>
12781 * xfaces.c (Qframe_set_background_mode): Now static.
12782 * dispextern.h (Qframe_set_background_mode): Remove decl.
12784 * process.c (Fnetwork_interface_info): Declare local only if needed.
12786 2011-08-13 Jan Djärv <jan.h.d@swipnet.se>
12788 * process.c: Include ifaddrs.h and net/if_dl.h if available (Bug#8477).
12789 (Fnetwork_interface_list): Allocate in increments of bytes instead
12790 of sizeof (struct ifreq). Iterate over ifconf.ifc_req by counting
12791 bytes (Bug#8477). Count bytes correctly when ifr_addr is a struct
12793 (struct ifflag_def): notrailers is smart on OSX.
12794 (Fnetwork_interface_info): Handle case when ifr_flags is negative.
12795 Get hardware address with getifaddrs if available.
12797 2011-08-12 Eli Zaretskii <eliz@gnu.org>
12799 * xdisp.c (iterate_out_of_display_property): xassert that
12800 IT->position is set to within IT->object's boundaries. Break from
12801 the loop as soon as EOB is reached; avoids infloops in redisplay
12802 when IT->position is set up wrongly due to some bug.
12803 Set IT->current to match the bidi iterator unconditionally.
12804 (push_display_prop): Allow GET_FROM_STRING as IT->method on
12805 entry. Force push_it to save on the stack the current
12806 buffer/string position, to be restored by pop_it. Fix flags in
12807 the iterator structure wrt the object coming from a display
12808 property, as `line-prefix' and `wrap-prefix' are not ``replacing''
12809 properties. (Bug#9284)
12811 2011-08-09 Andreas Schwab <schwab@linux-m68k.org>
12813 * fontset.c (fontset_get_font_group): Add proper type checks.
12816 2011-08-09 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
12818 * unexmacosx.c (print_load_command_name): Add cases LC_FUNCTION_STARTS
12819 and LC_VERSION_MIN_MACOSX.
12820 (copy_linkedit_data) [LC_FUNCTION_STARTS]: New function.
12821 (dump_it) [LC_FUNCTION_STARTS]: Use it.
12823 2011-08-08 Eli Zaretskii <eliz@gnu.org>
12825 * xdisp.c (forward_to_next_line_start): Allow to use the
12826 no-display-properties-and-no-overlays under bidi display.
12827 Set disp_pos in the bidi iterator to avoid searches for display
12828 properties and overlays.
12830 2011-08-08 Chong Yidong <cyd@stupidchicken.com>
12832 * editfns.c (Fset_time_zone_rule): Document relationship with the
12835 * ftfont.c (ftfont_pattern_entity): Copy the extras argument to
12836 the font entity extracted from the cache (Bug#8109).
12838 2011-08-07 Chong Yidong <cyd@stupidchicken.com>
12840 * composite.c (autocmp_chars): Don't reset point. That is done by
12841 restore_point_unwind (Bug#5984).
12843 2011-08-07 Juri Linkov <juri@jurta.org>
12845 * editfns.c (Fformat_time_string): Doc fix, add tag `usage:'
12846 to show the arg `TIME' instead of `TIMEVAL'.
12848 2011-08-06 Eli Zaretskii <eliz@gnu.org>
12850 * xdisp.c (set_cursor_from_row): Fix cursor positioning when a
12851 display property strides EOL and includes a newline, as in
12852 longlines-mode. (Bug#9254)
12853 (move_it_in_display_line_to): Fix vertical-motion in a buffer with
12854 word-wrap under bidirectional display. (Bug#9224)
12856 * bidi.c (bidi_unshelve_cache): Don't reset the cache if JUST_FREE
12857 is non-zero, even if the data buffer is NULL. Fixes a crash in
12858 vertical-motion with longlines-mode. (Bug#9254)
12860 2011-08-05 Eli Zaretskii <eliz@gnu.org>
12862 * bidi.c <bidi_cache_total_alloc>: Now static.
12863 (bidi_initialize): Initialize bidi_cache_total_alloc.
12865 * xdisp.c (display_line): Release buffer allocated for shelved bidi
12868 * bidi.c (bidi_shelve_cache, bidi_unshelve_cache): Track total
12869 amount allocated this far in `bidi_cache_total_alloc'.
12870 (bidi_unshelve_cache): Accept an additional argument JUST_FREE; if
12871 non-zero, only free the data buffer without restoring the cache
12872 contents. All callers changed.
12874 * dispextern.h (bidi_unshelve_cache): Update prototype.
12876 * xdisp.c (SAVE_IT, pos_visible_p, move_it_in_display_line_to)
12877 (move_it_in_display_line, move_it_to)
12878 (move_it_vertically_backward, move_it_by_lines): Replace the call
12879 to xfree to an equivalent call to bidi_unshelve_cache.
12880 (move_it_in_display_line_to): Fix logic of returning
12881 MOVE_POS_MATCH_OR_ZV in the bidi case. (Bug#9224)
12883 2011-08-05 Eli Zaretskii <eliz@gnu.org>
12885 * xdisp.c (set_cursor_from_row): Prefer the candidate glyph that
12886 came from a string character with a `cursor' property. (Bug#9229)
12888 2011-08-04 Jan Djärv <jan.h.d@swipnet.se>
12890 * Makefile.in (LIB_PTHREAD): New variable.
12891 (LIBES): Add LIB_PTHREAD (Bug#9216).
12893 * alloc.c, emacs.c, gmalloc.c, gtkutil.c, keyboard.c, syssignal.h:
12894 Rename HAVE_GTK_AND_PTHREAD to HAVE_PTHREAD (Bug#9216).
12896 2011-08-04 Andreas Schwab <schwab@linux-m68k.org>
12898 * regex.c (re_iswctype): Remove some redundant boolean conversions.
12900 2011-08-04 Jan Djärv <jan.h.d@swipnet.se>
12902 * xterm.c (x_find_topmost_parent): New function.
12903 (x_set_frame_alpha): Find topmost parent window with
12904 x_find_topmost_parent and set the property there also (bug#9181).
12905 (handle_one_xevent): Call x_set_frame_alpha on ReparentNotify.
12907 2011-08-04 Paul Eggert <eggert@cs.ucla.edu>
12909 * callproc.c (Fcall_process): Avoid vfork clobbering
12910 the local vars buffer, coding_systems, current_dir.
12912 2011-08-03 Stefan Monnier <monnier@iro.umontreal.ca>
12914 * keymap.c (Fmake_composed_keymap): Move to subr.el.
12916 2011-08-03 Paul Eggert <eggert@cs.ucla.edu>
12918 * fontset.c (dump_fontset) [FONTSET_DEBUG]: Declare EXTERNALLY_VISIBLE
12919 so that it is not optimized away.
12921 * xdisp.c (compute_display_string_pos): Remove unused local.
12923 2011-08-02 Eli Zaretskii <eliz@gnu.org>
12925 Fix slow cursor motion and scrolling in large buffers with
12926 selective display, like Org Mode buffers. (Bug#9218)
12928 * dispextern.h (struct bidi_it): New member disp_prop_p.
12930 * xdisp.c: Remove one-slot cache of display string positions.
12931 (compute_display_string_pos): Accept an additional argument
12932 DISP_PROP_P; callers changed. Scan at most 5K characters forward
12933 for a display string or property. If found, set DISP_PROP_P
12936 * bidi.c (bidi_fetch_char): Accept an additional argument
12937 DISP_PROP_P, and pass it to compute_display_string_pos.
12938 Only handle text covered by a display string if DISP_PROP_P is returned
12939 non-zero. All callers of bidi_fetch_char changed.
12941 2011-08-02 Stefan Monnier <monnier@iro.umontreal.ca>
12943 * keymap.c (Fdefine_key): Fix Lisp_Object/int mixup; apply some CSE.
12945 2010-12-03 Don March <don@ohspite.net>
12947 * keymap.c (Fdefine_key): Fix non-prefix key error message when
12948 last character M-[char] is translated to ESC [char] (bug#7541).
12950 2011-08-02 Kenichi Handa <handa@m17n.org>
12952 * lisp.h (uniprop_table): Extern it.
12954 * chartab.c (uniprop_table): Make it non-static.
12956 2011-08-01 Eli Zaretskii <eliz@gnu.org>
12958 * xdisp.c (forward_to_next_line_start): Accept additional argument
12959 BIDI_IT_PREV, and store into it the state of the bidi iterator had
12961 (reseat_at_next_visible_line_start): Use the bidi iterator state
12962 returned by forward_to_next_line_start to restore the state of
12963 it->bidi_it after backing up to previous newline. (Bug#9212)
12965 2011-07-30 Andreas Schwab <schwab@linux-m68k.org>
12967 * regex.c (re_comp): Protoize.
12968 (re_exec): Fix return type.
12969 (regexec): Fix type of `ret'. (Bug#9203)
12971 2011-07-28 Paul Eggert <eggert@cs.ucla.edu>
12973 * image.c (check_image_size): Use 1024x1024 if unknown frame (Bug#9189).
12974 This is needed if max-image-size is a floating-point number.
12976 2011-07-28 Andreas Schwab <schwab@linux-m68k.org>
12978 * print.c (print_object): Print empty symbol as ##.
12980 * lread.c (read1): Read ## as empty symbol.
12982 2011-07-28 Alp Aker <alp.tekin.aker@gmail.com>
12984 * nsfns.m (x_set_foreground_color): Set f->foreground_pixel when
12985 setting frame foreground color (Bug#9175).
12986 (x_set_background_color): Likewise.
12988 * nsmenu.m (-setText): Size tooltip dimensions precisely to
12989 contents (Bug#9176).
12990 (EmacsTooltip -init): Remove bezels and add shadows to
12993 * nsterm.m (ns_dumpglyphs_stretch): Avoid overwriting left fringe
12994 or scroll bar (Bug#8470).
12996 * nsfont.m (nsfont_open): Remove assignment to voffset and
12997 unnecessary vars hshink, expand, hd, full_height, min_height.
12998 (nsfont_draw): Use s->ybase as baseline for glyph drawing (Bug#8913).
13000 * nsterm.h (nsfont_info): Remove voffset field.
13002 2011-07-28 Alp Aker <alp.tekin.aker@gmail.com>
13004 Implement strike-through and overline on NextStep (Bug#8863).
13006 * nsfont.m (nsfont_open): Use underline position provided by font,
13007 instead of hard-coded value of 2.
13008 (nsfont_draw): Call ns_draw_text_decoration instead.
13010 * nsterm.h: Add declaration for ns_draw_text_decoration.
13012 * nsterm.m (ns_draw_text_decoration): New function for drawing
13013 underline, overline, and strike-through.
13014 (ns_dumpglyphs_image, ns_dumpglyphs_stretch): Add call to
13015 ns_draw_text_decoration. Change treatment of cursor drawing to
13016 accommodate underlining, etc.
13018 2011-07-28 Eli Zaretskii <eliz@gnu.org>
13020 * buffer.c (init_buffer_once): Set bidi-display-reordering to t by
13023 2011-07-28 Paul Eggert <eggert@cs.ucla.edu>
13025 * alloc.c (memory_full) [!SYNC_INPUT]: Fix signal-related race.
13026 Without this fix, if a signal arrives just after memory fills up,
13027 'malloc' might be invoked reentrantly.
13029 * image.c (x_check_image_size) [!HAVE_X_WINDOWS]: Return 1.
13030 In other words, assume that every image size is allowed, on non-X
13031 hosts. This assumption is probably wrong, but it lets Emacs compile.
13033 2011-07-28 Andreas Schwab <schwab@linux-m68k.org>
13035 * regex.c (re_iswctype): Convert return values to boolean.
13037 2011-07-28 Eli Zaretskii <eliz@fencepost.gnu.org>
13039 * xdisp.c (compute_display_string_pos): Don't use cached display
13040 string position if the buffer had its restriction changed.
13043 2011-07-28 Paul Eggert <eggert@cs.ucla.edu>
13045 * callproc.c (Fcall_process): Use 'volatile' to avoid vfork clobbering.
13047 2011-07-28 Paul Eggert <eggert@cs.ucla.edu>
13049 Integer signedness and overflow and related fixes. (Bug#9079)
13051 * bidi.c: Integer size and overflow fixes.
13052 (bidi_cache_size, bidi_cache_idx, bidi_cache_last_idx)
13053 (bidi_cache_start, bidi_cache_fetch_state, bidi_cache_search)
13054 (bidi_cache_find_level_change, bidi_cache_ensure_space)
13055 (bidi_cache_iterator_state, bidi_cache_find, bidi_cache_start_stack)
13056 (bidi_find_other_level_edge):
13057 Use ptrdiff_t instead of EMACS_INT where either will do.
13058 This works better on 32-bit hosts configured --with-wide-int.
13059 (bidi_cache_ensure_space): Check for size-calculation overflow.
13060 Use % rather than repeated addition, for better worst-case speed.
13061 Don't set bidi_cache_size until after xrealloc returns, because it
13063 (bidi_dump_cached_states): Use ptrdiff_t, not int, to avoid overflow.
13064 (bidi_cache_ensure_space): Also check that the bidi cache size
13065 does not exceed that of the largest Lisp string or buffer. See Eli
13066 Zaretskii in <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9079#29>.
13068 * alloc.c (__malloc_size_t): Remove.
13069 All uses replaced by size_t. See Andreas Schwab's note
13070 <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9079#8>.
13072 * image.c: Improve checking for integer overflow.
13073 (check_image_size): Assume that f is nonnull, since
13074 it is always nonnull in practice. This is one less thing to
13075 worry about when checking for integer overflow later.
13076 (x_check_image_size): New function, which checks for integer
13077 overflow issues inside X.
13078 (x_create_x_image_and_pixmap, xbm_read_bitmap_data): Use it.
13079 This removes the need for a memory_full check.
13080 (xbm_image_p): Rewrite to avoid integer multiplication overflow.
13081 (Create_Pixmap_From_Bitmap_Data, xbm_load): Use x_check_image_size.
13082 (xbm_read_bitmap_data): Change locals back to 'int', since
13083 their values must fit in 'int'.
13084 (xpm_load_image, png_load, tiff_load):
13085 Invoke x_create_x_image_and_pixmap earlier,
13086 to avoid much needless work if the image is too large.
13087 (tiff_load): Treat overly large images as if
13088 x_create_x_image_and_pixmap failed, not as malloc failures.
13089 (gs_load): Use x_check_image_size.
13091 * gtkutil.c: Omit integer casts.
13092 (xg_get_pixbuf_from_pixmap): Remove unnecessary cast.
13093 (xg_set_toolkit_scroll_bar_thumb): Rewrite to avoid need for cast.
13095 * image.c (png_load): Don't assume height * row_bytes fits in 'int'.
13097 * xfaces.c (Fbitmap_spec_p): Fix integer overflow bug.
13098 Without this fix, (bitmap-spec-p '(34359738368 1 "x"))
13099 would wrongly return t on a 64-bit host.
13101 * dispnew.c (init_display): Use *_RANGE_OVERFLOW macros.
13102 The plain *_OVERFLOW macros run afoul of GCC bug 49705
13103 <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49705>
13104 and therefore cause GCC to emit a bogus diagnostic in some cases.
13106 * image.c: Integer signedness and overflow and related fixes.
13107 This is not an exhaustive set of fixes, but it's time to
13108 record what I've got.
13109 (lookup_pixel_color, check_image_size): Remove redundant decls.
13110 (check_image_size): Don't assume that arbitrary EMACS_INT values
13111 fit in 'int', or that arbitrary 'double' values fit in 'int'.
13112 (x_alloc_image_color, x_create_x_image_and_pixmap, png_load)
13113 (tiff_load, imagemagick_load_image):
13114 Check for overflow in size calculations.
13115 (x_create_x_image_and_pixmap): Remove unnecessary test for
13116 xmalloc returning NULL; that can't happen.
13117 (xbm_read_bitmap_data): Don't assume sizes fit into 'int'.
13118 (xpm_color_bucket): Use better integer hashing function.
13119 (xpm_cache_color): Don't possibly over-allocate memory.
13120 (struct png_memory_storage, tiff_memory_source, tiff_seek_in_memory)
13121 (gif_memory_source):
13122 Use ptrdiff_t, not int or size_t, to record sizes.
13123 (png_load): Don't assume values greater than 2**31 fit in 'int'.
13124 (our_stdio_fill_input_buffer): Prefer ptrdiff_t to size_t when
13125 either works, as we prefer signed integers.
13126 (tiff_read_from_memory, tiff_write_from_memory):
13127 Return tsize_t, not size_t, since that's what the TIFF API wants.
13128 (tiff_read_from_memory): Don't fail simply because the read would
13129 go past EOF; instead, return a short read.
13130 (tiff_load): Omit no-longer-needed casts.
13131 (Fimagemagick_types): Don't assume size fits into 'int'.
13133 Improve hashing quality when configured --with-wide-int.
13134 * fns.c (hash_string): New function, taken from sxhash_string.
13135 Do not discard information about ASCII character case; this
13136 discarding is no longer needed.
13137 (sxhash-string): Use it. Change sig to match it. Caller changed.
13138 * lisp.h: Declare it.
13139 * lread.c (hash_string): Remove, since we now use fns.c's version.
13140 The fns.c version returns a wider integer if --with-wide-int is
13141 specified, so this should help the quality of the hashing a bit.
13143 * emacs.c: Integer overflow minor fix.
13144 (heap_bss_diff): Now uprintmax_t, not unsigned long. All used changed.
13145 Define only if GNU_LINUX.
13146 (main, Fdump_emacs): Set and use heap_bss_diff only if GNU_LINUX.
13148 * dispnew.c: Integer signedness and overflow fixes.
13149 Remove unnecessary forward decls, that were a maintenance hassle.
13150 (history_tick): Now uprintmax_t, so it's more likely to avoid overflow.
13152 (adjust_glyph_matrix, realloc_glyph_pool, adjust_frame_message_buffer)
13153 (scrolling_window): Use ptrdiff_t, not int, for byte count.
13154 (prepare_desired_row, line_draw_cost):
13155 Use int, not unsigned, where either works.
13156 (save_current_matrix, restore_current_matrix):
13157 Use ptrdiff_t, not size_t, where either works.
13158 (init_display): Check for overflow more accurately, and without
13159 relying on undefined behavior.
13161 * editfns.c (pWIDE, pWIDElen, signed_wide, unsigned_wide):
13162 Remove, replacing with the new symbols in lisp.h. All uses changed.
13163 * fileio.c (make_temp_name):
13164 * filelock.c (lock_file_1, lock_file):
13165 * xdisp.c (message_dolog):
13166 Don't assume PRIdMAX etc. works; this isn't portable to pre-C99 hosts.
13167 Use pMd etc. instead.
13168 * lisp.h (printmax_t, uprintmax_t, pMd, pMu): New types and macros,
13169 replacing the pWIDE etc. symbols removed from editfns.c.
13171 * keyboard.h (num_input_events): Now uintmax_t.
13172 This is (very slightly) less likely to mess up due to wraparound.
13175 * buffer.c: Integer signedness fixes.
13176 (alloc_buffer_text, enlarge_buffer_text):
13177 Use ptrdiff_t rather than size_t when either will do, as we prefer
13180 * alloc.c: Integer signedness and overflow fixes.
13181 Do not impose an arbitrary 32-bit limit on malloc sizes when debugging.
13182 (__malloc_size_t): Default to size_t, not to int.
13183 (pure_size, pure_bytes_used_before_overflow, stack_copy_size)
13184 (Fgarbage_collect, mark_object_loop_halt, mark_object):
13185 Prefer ptrdiff_t to size_t when either would do, as we prefer
13187 (XMALLOC_OVERRUN_CHECK_OVERHEAD): New macro.
13188 (xmalloc_overrun_check_header, xmalloc_overrun_check_trailer):
13189 Now const. Initialize with values that are in range even if char
13191 (XMALLOC_PUT_SIZE, XMALLOC_GET_SIZE): Remove, replacing with ...
13192 (xmalloc_put_size, xmalloc_get_size): New functions. All uses changed.
13193 These functions do the right thing with sizes > 2**32.
13194 (check_depth): Now ptrdiff_t, not int.
13195 (overrun_check_malloc, overrun_check_realloc, overrun_check_free):
13196 Adjust to new way of storing sizes. Check for size overflow bugs
13198 (STRING_BYTES_MAX): Adjust to new overheads. The old code was
13199 slightly wrong anyway, as it missed one instance of
13200 XMALLOC_OVERRUN_CHECK_OVERHEAD.
13201 (refill_memory_reserve): Omit needless cast to size_t.
13202 (mark_object_loop_halt): Mark as externally visible.
13204 * xselect.c: Integer signedness and overflow fixes.
13205 (Fx_register_dnd_atom, x_handle_dnd_message):
13206 Use ptrdiff_t, not size_t, since we prefer signed.
13207 (Fx_register_dnd_atom): Check for ptrdiff_t (and size_t) overflow.
13208 * xterm.h (struct x_display_info): Use ptrdiff_t, not size_t, for
13209 x_dnd_atoms_size and x_dnd_atoms_length.
13211 * doprnt.c: Prefer signed to unsigned when either works.
13213 * doprnt.c (doprnt):
13215 * xdisp.c (vmessage):
13216 Use ptrdiff_t, not size_t, when using or implementing doprnt,
13217 since the sizes cannot exceed ptrdiff_t bounds anyway, and we
13218 prefer signed arithmetic to avoid comparison confusion.
13219 * doprnt.c (doprnt): Avoid a "+ 1" that can't overflow,
13220 but is a bit tricky.
13222 Assume freestanding C89 headers, string.h, stdlib.h.
13223 * data.c, doprnt.c, floatfns.c, print.c:
13224 Include float.h unconditionally.
13225 * gmalloc.c: Assume C89-at-least behavior for preprocessor,
13226 limits.h, stddef.h, string.h. Use memset instead of 'flood'.
13227 * regex.c: Likewise for stddef.h, string.h.
13228 (ISASCII): Remove; can assume it returns 1 now. All uses removed.
13229 * s/aix4-2.h (HAVE_STRING_H): Remove obsolete undef.
13230 * s/ms-w32.h (HAVE_LIMITS_H, HAVE_STRING_H, HAVE_STDLIB_H)
13231 (STDC_HEADERS): Remove obsolete defines.
13232 * sysdep.c: Include limits.h unconditionally.
13234 Assume support for memcmp, memcpy, memmove, memset.
13235 * lisp.h, sysdep.c (memcmp, memcpy, memmove, memset):
13236 * regex.c (memcmp, memcpy):
13237 Remove; we assume C89 now.
13239 * gmalloc.c (memcpy, memset, memmove): Remove; we assume C89 now.
13240 (__malloc_safe_bcopy): Remove; no longer needed.
13242 * lisp.h (struct vectorlike_header, struct Lisp_Subr): Signed sizes.
13243 Use EMACS_INT, not EMACS_UINT, for sizes. The code works equally
13244 well either way, and we prefer signed to unsigned.
13246 2011-07-27 Lars Magne Ingebrigtsen <larsi@gnus.org>
13248 * gnutls.c (emacs_gnutls_read): Don't message anything if the peer
13249 closes the connection while we're reading (bug#9182).
13251 2011-07-25 Jan Djärv <jan.h.d@swipnet.se>
13253 * nsmenu.m (ns_popup_dialog): Add an "ok" button if no buttons
13254 are specified (Bug#9168).
13256 2011-07-25 Paul Eggert <eggert@cs.ucla.edu>
13258 * bidi.c (bidi_dump_cached_states): Fix printf format mismatch.
13259 Found by GCC static checking and --with-wide-int on a 32-bit host.
13261 2011-07-25 Eli Zaretskii <eliz@gnu.org>
13263 * xdisp.c (compute_display_string_pos): Fix logic of caching
13264 previous display string position. Initialize cached_prev_pos to
13265 -1. Fixes slow-down at the beginning of a buffer.
13267 2011-07-24 Eli Zaretskii <eliz@gnu.org>
13269 * xfaces.c (check_lface_attrs) [HAVE_WINDOW_SYSTEM]: Allow `nil'
13270 for attrs[LFACE_FONTSET_INDEX].
13272 2011-07-23 Paul Eggert <eggert@cs.ucla.edu>
13274 * xml.c (parse_region): Remove unused local
13275 that was recently introduced.
13277 2011-07-23 Eli Zaretskii <eliz@gnu.org>
13279 * xfns.c (unwind_create_frame) [GLYPH_DEBUG]: Adapt to changes in
13280 2008-02-22T17:42:09Z!monnier@iro.umontreal.ca.
13282 * xdisp.c (move_it_in_display_line_to): Record the best matching
13283 position for TO_CHARPOS while scanning the line, and restore it on
13284 exit if none of the characters scanned was an exact match.
13285 Fixes vertical-motion and pos-visible-in-window-p under bidi redisplay
13286 when exact match is impossible due to invisible text, and the
13287 lines are truncated.
13289 2011-07-23 Jan Djärv <jan.h.d@swipnet.se>
13291 * nsterm.m (initFrameFromEmacs): Set NSTitledWindowMask in styleMask
13294 2011-07-22 Eli Zaretskii <eliz@gnu.org>
13296 Fix a significant slow-down of cursor motion with C-n, C-p,
13297 C-f/C-b, and C-v/M-v that couldn't keep up with keyboard
13298 auto-repeat under bidi redisplay in fontified buffers.
13299 * xdisp.c (compute_stop_pos_backwards): New function.
13300 (next_element_from_buffer): Call compute_stop_pos_backwards to
13301 find a suitable prev_stop when we find ourselves before
13303 (reseat): Don't look for prev_stop, as that could mean a very long
13305 <cached_disp_pos, cached_disp_buffer, cached_disp_modiff>
13306 <cached_disp_overlay_modiff>: Cache for last found display string
13308 (compute_display_string_pos): Return the cached position if asked
13309 about the same buffer in the same area of character positions, and
13310 the buffer wasn't changed since the time the display string
13311 position was cached.
13313 2011-07-22 Eli Zaretskii <eliz@gnu.org>
13315 * xdisp.c (rows_from_pos_range): Don't ignore glyphs whose object
13316 is an integer, which is important for empty lines. (Bug#9149)
13318 2011-07-22 Chong Yidong <cyd@stupidchicken.com>
13320 * frame.c (Fmodify_frame_parameters): In tty case, update the
13321 default face if necessary (Bug#4238).
13323 2011-07-21 Chong Yidong <cyd@stupidchicken.com>
13325 * editfns.c (Fstring_to_char): No need to explain what a character
13326 is in the docstring (Bug#6576).
13328 2011-07-20 Lars Magne Ingebrigtsen <larsi@gnus.org>
13330 * xml.c (parse_region): Make sure we always return a tree.
13332 2011-07-20 HAMANO Kiyoto <khiker.mail@gmail.com>
13334 * xml.c (parse_region): If a document contains only comments,
13337 2011-07-20 Lars Magne Ingebrigtsen <larsi@gnus.org>
13339 * xml.c (make_dom): Return comments, too.
13341 2011-07-19 Paul Eggert <eggert@cs.ucla.edu>
13344 See http://lists.gnu.org/archive/html/emacs-devel/2011-07/msg00688.html
13345 and the surrounding thread.
13346 * minibuf.c (read_minibuf_noninteractive): Rewrite to use getchar
13347 rather than fgets, and retry after EINTR. Otherwise, 'emacs
13348 --batch -f byte-compile-file' fails on OpenBSD if an inactivity
13350 * s/openbsd.h (BROKEN_SIGIO): Define.
13351 * unexelf.c (unexec) [__OpenBSD__]:
13352 Don't update the .mdebug section of the Alpha COFF symbol table.
13354 2011-07-19 Lars Magne Ingebrigtsen <larsi@gnus.org>
13356 * lread.c (syms_of_lread): Clarify when `lexical-binding' is used
13359 2011-07-18 Paul Eggert <eggert@cs.ucla.edu>
13361 * fileio.c (Fcopy_file) [!MSDOS]: Tighten created file's mask.
13362 This fixes some race conditions on the permissions of any newly
13365 * alloc.c (valid_pointer_p): Use pipe, not open.
13366 This fixes some permissions issues when debugging.
13368 * fileio.c (Fcopy_file): Adjust mode if fchown fails. (Bug#9002)
13369 If fchown fails to set both uid and gid, try to set just gid,
13370 as that is sometimes allowed. Adjust the file's mode to eliminate
13371 setuid or setgid bits that are inappropriate if fchown fails.
13373 2011-07-18 Stefan Monnier <monnier@iro.umontreal.ca>
13375 * xdisp.c (next_element_from_string, next_element_from_buffer): Use EQ
13376 to compare Lisp_Objects.
13377 * gnutls.c (syms_of_gnutls): Rename Vgnutls_log_level to
13378 global_gnutls_log_level, don't mistake it for a Lisp_Object.
13379 (init_gnutls_functions, emacs_gnutls_handle_error): Fix up uses.
13381 2011-07-17 Andreas Schwab <schwab@linux-m68k.org>
13383 * lread.c (read_integer): Unread even EOF character.
13384 (read1): Likewise. Properly record start position of symbol.
13386 * lread.c (read1): Read `#:' as empty uninterned symbol if no
13387 symbol character follows.
13389 2011-07-17 Paul Eggert <eggert@cs.ucla.edu>
13391 * fileio.c (Fcopy_file): Pacify gcc re fchown. (Bug#9002)
13392 This works around a problem with the previous change to Fcopy_file.
13393 Recent glibc declares fchown with __attribute__((warn_unused_result)),
13394 and without this change, GCC might complain about discarding
13395 fchown's return value.
13397 2011-07-16 Juanma Barranquero <lekktu@gmail.com>
13399 * makefile.w32-in (GLOBAL_SOURCES): Add gnutls.c (followup to bug#9059).
13401 2011-07-16 Paul Eggert <eggert@cs.ucla.edu>
13403 * fileio.c (Fcopy_file): Don't diagnose fchown failures. (Bug#9002)
13405 2011-07-16 Lars Magne Ingebrigtsen <larsi@gnus.org>
13407 * gnutls.c (syms_of_gnutls): Define `gnutls-log-level' here, since
13408 it's used from the C level.
13410 * process.c: Use the same condition for POLL_FOR_INPUT in both
13411 keyboard.c and process.c (bug#1858).
13413 2011-07-09 Lawrence Mitchell <wence@gmx.li>
13415 * gnutls.c (Qgnutls_bootprop_min_prime_bits): New variable.
13416 (Fgnutls_boot): Use it.
13418 2011-07-15 Andreas Schwab <schwab@linux-m68k.org>
13420 * doc.c (Fsubstitute_command_keys): Revert last change.
13422 2011-07-15 Lars Magne Ingebrigtsen <larsi@gnus.org>
13424 * doc.c (Fsubstitute_command_keys): Clarify that \= really only
13425 quotes the next character, and doesn't affect other longer
13426 sequences (bug#8935).
13428 * lread.c (syms_of_lread): Clarify that is isn't only
13429 `eval-buffer' and `eval-defun' that's affected by
13430 `lexical-binding' (bug#8460).
13432 2011-07-15 Eli Zaretskii <eliz@gnu.org>
13434 * xdisp.c (move_it_in_display_line_to): Fix vertical motion with
13435 bidi redisplay when a line includes both an image and is truncated.
13437 2011-07-14 Paul Eggert <eggert@cs.ucla.edu>
13439 Fix minor problems found by static checking.
13440 * bidi.c (bidi_cache_size): Now EMACS_INT, not size_t.
13441 (elsz): Now a signed constant, not a size_t var. We prefer signed
13442 types to unsigned, to avoid integer comparison confusion. Without
13443 this change, GCC 4.6.1 with -Wunsafe-loop-optimizations complains
13444 "cannot optimize loop, the loop counter may overflow", a symptom
13446 * indent.c (Fvertical_motion): Mark locals as initialized.
13447 * xdisp.c (reseat_to_string): Fix pointer signedness issue.
13449 2011-07-14 Lars Magne Ingebrigtsen <larsi@gnus.org>
13451 * search.c (Fre_search_backward): Mention `case-fold-search' in
13452 all the re_search_* functions (bug#8138).
13454 * keyboard.c (Fopen_dribble_file): Document when the file is
13457 2011-07-14 Eli Zaretskii <eliz@gnu.org>
13459 * bidi.c (bidi_dump_cached_states): Fix format of displaying
13462 Support bidi reordering of display and overlay strings.
13463 * xdisp.c (compute_display_string_pos)
13464 (compute_display_string_end): Accept additional argument STRING.
13465 (init_iterator, reseat_1): Initialize bidi_it->string.s to NULL.
13466 (reseat_to_string): Initialize bidi_it->string.s and
13467 bidi_it->string.schars.
13468 (Fcurrent_bidi_paragraph_direction): Initialize itb.string.s to
13469 NULL (avoids a crash in bidi_paragraph_init).
13470 Initialize itb.string.lstring.
13471 (init_iterator): Call bidi_init_it only of a valid
13472 buffer position was specified. Initialize paragraph_embedding to
13474 (reseat_to_string): Initialize the bidi iterator.
13475 (display_string): If we need to ignore text properties of
13476 LISP_STRING, set IT->stop_charpos to IT->end_charpos. (The
13477 original value of -1 will not work with bidi.)
13478 (compute_display_string_pos): First arg is now struct
13479 `text_pos *'; all callers changed. Support display properties on
13481 (compute_display_string_end): Support display properties on Lisp
13483 (init_iterator, reseat_1, reseat_to_string): Initialize the
13484 string.bufpos member to 0 (zero, for compatibility with IT_CHARPOS
13485 when iterating on a string not from display properties).
13486 (compute_display_string_pos, compute_display_string_end):
13487 Fix calculation of the object to scan. Fixes an error when using
13489 (next_element_from_buffer): Don't abort when IT_CHARPOS is before
13490 base_level_stop; instead, set base_level_stop to BEGV.
13491 Fixes crashes in vertical-motion.
13492 (next_element_from_buffer): Improve commentary for when
13493 the iterator is before prev_stop.
13494 (init_iterator): Initialize bidi_p from the default value of
13495 bidi-display-reordering, not from buffer-local value. Use the
13496 buffer-local value only if initializing for buffer iteration.
13497 (handle_invisible_prop): Support invisible properties on strings
13498 that are being bidi-reordered.
13499 (set_iterator_to_next): Support bidi reordering of C strings and
13501 (next_element_from_string): Support bidi reordering of Lisp
13503 (handle_stop_backwards): Support Lisp strings as well.
13504 (display_string): Support display of R2L glyph rows.
13505 Use IT_STRING_CHARPOS when displaying from a Lisp string.
13506 (init_iterator): Don't initialize it->bidi_p for strings
13508 (reseat_to_string): Initialize it->bidi_p for strings here.
13509 (next_element_from_string, next_element_from_c_string)
13510 (next_element_from_buffer): Add xassert's for correspondence
13511 between IT's object being iterated and it->bidi_it.string
13513 (face_before_or_after_it_pos): Support bidi iteration.
13514 (next_element_from_c_string): Handle the case of the first string
13515 character that is not the first one in the visual order.
13516 (get_visually_first_element): New function, refactored from common
13517 parts of next_element_from_buffer, next_element_from_string, and
13518 next_element_from_c_string.
13519 (tool_bar_lines_needed, redisplay_tool_bar)
13520 (display_menu_bar): Force left-to-right direction. Add a FIXME
13521 comment for making that be controlled by a user option.
13522 (push_it, pop_it): Save and restore the state of the
13523 bidi iterator. Save and restore the bidi_p flag.
13524 (pop_it): Iterate out of display property for string iteration as
13526 (iterate_out_of_display_property): Support iteration over strings.
13527 (handle_single_display_spec): Set up it->bidi_it for iteration
13528 over a display string, and call bidi_init_it.
13529 (handle_single_display_spec, next_overlay_string)
13530 (get_overlay_strings_1, push_display_prop): Set up the bidi
13531 iterator for displaying display or overlay strings.
13532 (forward_to_next_line_start): Don't use the shortcut if
13534 (back_to_previous_visible_line_start): If handle_display_prop
13535 pushed the iterator stack, restore the internal state of the bidi
13536 iterator by calling bidi_pop_it same number of times.
13537 (reseat_at_next_visible_line_start): If ON_NEWLINE_P is non-zero,
13538 and we are bidi-iterating, don't decrement the iterator position;
13539 instead, set the first_elt flag in the bidi iterator, to produce
13541 (reseat_1): Remove redundant setting of string_from_display_prop_p.
13542 (push_display_prop): xassert that we are iterating a buffer.
13543 (push_it, pop_it): Save and restore paragraph_embedding member.
13544 (handle_single_display_spec, next_overlay_string)
13545 (get_overlay_strings_1, reseat_1, reseat_to_string)
13546 (push_display_prop): Set up the `unibyte' member of bidi_it.string
13547 correctly. Don't assume unibyte strings are not bidi-reordered.
13548 (compute_display_string_pos)
13549 (compute_display_string_end): Fix handling the case of C string.
13550 (push_it, pop_it): Save and restore from_disp_prop_p.
13551 (handle_single_display_spec, push_display_prop): Set the
13552 from_disp_prop_p flag.
13553 (get_overlay_strings_1): Reset the from_disp_prop_p flag.
13554 (pop_it): Call iterate_out_of_display_property only if we are
13555 popping after iteration over a string that came from a display
13556 property. Fix a typo in popping stretch info. Add an assertion
13557 for verifying that the iterator position is in sync with the bidi
13559 (handle_single_display_spec, get_overlay_strings_1)
13560 (push_display_prop): Fix initialization of paragraph direction for
13561 string when that of the parent object is not yet determined.
13562 (reseat_1): Call bidi_init_it to resync the bidi
13563 iterator with IT's position. (Bug#7616)
13564 (find_row_edges): If ROW->start.pos gives position
13565 smaller than min_pos, use it as ROW->minpos. (Bug#7616)
13566 (handle_stop, back_to_previous_visible_line_start, reseat_1):
13567 Reset the from_disp_prop_p flag.
13568 (SAVE_IT, RESTORE_IT): New macros.
13569 (pos_visible_p, face_before_or_after_it_pos)
13570 (back_to_previous_visible_line_start)
13571 (move_it_in_display_line_to, move_it_in_display_line)
13572 (move_it_to, move_it_vertically_backward, move_it_by_lines)
13573 (try_scrolling, redisplay_window, display_line): Use them when
13574 saving a temporary copy of the iterator and restoring it back.
13575 (back_to_previous_visible_line_start, reseat_1)
13576 (init_iterator): Empty the bidi cache "stack".
13577 (move_it_in_display_line_to): If iterator ended up at
13578 EOL, but we never saw any buffer positions smaller than
13579 to_charpos, return MOVE_POS_MATCH_OR_ZV. Fixes vertical cursor
13580 motion in bidi-reordered lines.
13581 (move_it_in_display_line_to): Record prev_method and prev_pos
13582 immediately before the call to set_iterator_to_next. Fixes cursor
13583 motion in bidi-reordered lines with stretch glyphs and strings
13584 displayed in margins. (Bug#8133) (Bug#8867)
13585 Return MOVE_POS_MATCH_OR_ZV only if iterator position is past
13587 (pos_visible_p): Support positions in bidi-reordered lines.
13588 Save and restore bidi cache.
13590 * bidi.c (bidi_level_of_next_char): clen should be EMACS_NT, not int.
13591 (bidi_paragraph_info): Delete unused struct.
13592 (bidi_cache_idx, bidi_cache_last_idx): Declare EMACS_INT.
13593 (bidi_cache_start): New variable.
13594 (bidi_cache_reset): Reset bidi_cache_idx to bidi_cache_start, not
13596 (bidi_cache_fetch_state, bidi_cache_search)
13597 (bidi_cache_find_level_change, bidi_cache_iterator_state)
13598 (bidi_cache_find, bidi_peek_at_next_level)
13599 (bidi_level_of_next_char, bidi_find_other_level_edge)
13600 (bidi_move_to_visually_next): Compare cache index with
13601 bidi_cache_start rather than with zero.
13602 (bidi_fetch_char): Accept new argument STRING; all callers
13603 changed. Support iteration over a string. Support strings with
13604 display properties. Support unibyte strings. Fix the type of
13605 `len' according to what STRING_CHAR_AND_LENGTH expects.
13606 (bidi_paragraph_init, bidi_resolve_explicit_1)
13607 (bidi_resolve_explicit, bidi_resolve_weak)
13608 (bidi_level_of_next_char, bidi_move_to_visually_next):
13609 Support iteration over a string.
13610 (bidi_set_sor_type, bidi_resolve_explicit_1)
13611 (bidi_resolve_explicit, bidi_type_of_next_char): ignore_bn_limit
13612 can now be zero (for strings); special values 0 and -1 were
13613 changed to -1 and -2, respectively.
13614 (bidi_char_at_pos): New function.
13615 (bidi_paragraph_init, bidi_resolve_explicit, bidi_resolve_weak):
13616 Call it instead of FETCH_MULTIBYTE_CHAR.
13617 (bidi_move_to_visually_next): Abort if charpos or bytepos were not
13618 initialized to valid values.
13619 (bidi_init_it): Don't initialize charpos and bytepos with invalid
13621 (bidi_level_of_next_char): Allow the sentinel "position" to pass
13622 the test for valid cached positions. Fix the logic for looking up
13623 the sentinel state in the cache. GCPRO the Lisp string we are
13625 (bidi_push_it, bidi_pop_it): New functions.
13626 (bidi_initialize): Initialize the bidi cache start stack pointer.
13627 (bidi_cache_ensure_space): New function, refactored from part of
13628 bidi_cache_iterator_state. Don't assume the required size is just
13629 one BIDI_CACHE_CHUNK away.
13630 (bidi_cache_start_stack, bidi_push_it): Use IT_STACK_SIZE.
13631 (bidi_count_bytes, bidi_char_at_pos): New functions.
13632 (bidi_cache_search): Don't assume bidi_cache_last_idx is
13633 always valid if bidi_cache_idx is valid.
13634 (bidi_cache_find_level_change): xassert that bidi_cache_last_idx
13635 is valid if it's going to be used.
13636 (bidi_shelve_cache, bidi_unshelve_cache): New functions.
13637 (bidi_cache_fetch_state, bidi_cache_search)
13638 (bidi_cache_find_level_change, bidi_cache_ensure_space)
13639 (bidi_cache_iterator_state, bidi_cache_find)
13640 (bidi_find_other_level_edge, bidi_cache_start_stack):
13641 All variables related to cache indices are now EMACS_INT.
13643 * dispextern.h (struct bidi_string_data): New structure.
13644 (struct bidi_it): New member `string'. Make flag members be 1-bit
13645 fields, and put them last in the struct.
13646 (compute_display_string_pos, compute_display_string_end):
13648 (bidi_push_it, bidi_pop_it): Add prototypes.
13649 (struct iterator_stack_entry): New members bidi_p,
13650 paragraph_embedding, and from_disp_prop_p.
13651 (struct it): Member bidi_p is now a bit field 1 bit wide.
13652 (bidi_shelve_cache, bidi_unshelve_cache):
13653 Declare prototypes.
13655 * .gdbinit (xvectype, xvector, xcompiled, xchartable, xboolvector)
13656 (xpr, xfont, xbacktrace): Use "header.size" when accessing vectors
13657 and vector-like objects.
13659 * dispnew.c (buffer_posn_from_coords): Save and restore the bidi
13660 cache around display iteration.
13662 * window.c (Fwindow_end, window_scroll_pixel_based)
13663 (displayed_window_lines, Frecenter): Save and restore the bidi
13664 cache around display iteration.
13666 2011-07-14 Lars Magne Ingebrigtsen <larsi@gnus.org>
13668 * editfns.c (Fdelete_region): Clarify the use of the named
13669 parameters (bug#6788).
13671 2011-07-14 Martin Rudalics <rudalics@gmx.at>
13673 * indent.c (Fvertical_motion): Set and restore w->pointm when
13674 saving and restoring the window's buffer (Bug#9006).
13676 2011-07-13 Lars Magne Ingebrigtsen <larsi@gnus.org>
13678 * editfns.c (Fstring_to_char): Clarify just what is returned
13679 (bug#6576). Text by Eli Zaretskii.
13681 2011-07-13 Juanma Barranquero <lekktu@gmail.com>
13683 * gnutls.c (init_gnutls_functions): Honor gnutls_log_level (bug#9059).
13685 2011-07-13 Eli Zaretskii <eliz@gnu.org>
13687 * buffer.c (mmap_find): Fix a typo.
13689 2011-07-13 Johan Bockgård <bojohan@gnu.org>
13691 Fix execution of x selection hooks.
13692 * xselect.c (Qx_lost_selection_functions)
13693 (Qx_sent_selection_functions): New vars.
13694 (syms_of_xselect): DEFSYM them.
13695 (x_handle_selection_request): Pass Qx_sent_selection_functions
13696 rather than Vx_sent_selection_functions to Frun_hook_with_args.
13697 (x_handle_selection_clear,x_clear_frame_selections):
13698 Pass Qx_lost_selection_functions rather than
13699 Vx_lost_selection_functions to Frun_hook_with_args.
13701 2011-07-13 Paul Eggert <eggert@cs.ucla.edu>
13703 * buffer.c (Fget_buffer_create): Initialize inhibit_shrinking.
13704 The old code sometimes used this field without initializing it.
13706 * alloc.c (gc_sweep): Don't read past end of array.
13707 In theory, the old code could also have corrupted Emacs internals,
13708 though it'd be very unlikely.
13710 2011-07-12 Andreas Schwab <schwab@linux-m68k.org>
13712 * character.c (Fcharacterp): Don't advertise optional ignored
13713 argument. (Bug#4026)
13715 2011-07-12 Lars Magne Ingebrigtsen <larsi@gnus.org>
13717 * keymap.c (syms_of_keymap): Clarify that "modifier" is "modifier
13720 * window.c (Fset_window_start): Doc fix (bug#4199).
13721 (Fset_window_hscroll): Ditto.
13723 2011-07-12 Paul Eggert <eggert@cs.ucla.edu>
13725 Fix minor new problems caught by GCC 4.6.1.
13726 * term.c (init_tty): Remove unused local.
13727 * xsettings.c (store_monospaced_changed): Define this function only
13728 if (defined HAVE_GSETTINGS || defined HAVE_GCONF), as it's
13729 not used otherwise.
13731 2011-07-12 Chong Yidong <cyd@stupidchicken.com>
13733 * xdisp.c (Vresize_mini_windows): Minor doc fix (Bug#3300).
13735 2011-07-11 Lars Magne Ingebrigtsen <larsi@gnus.org>
13737 * xdisp.c (syms_of_xdisp): Make it explicit that the mini-windows
13738 are the mini-buffer and the echo area (bug#3320).
13740 * term.c (init_tty): Remove support for supdup, c10 and perq
13741 terminals, which are no longer supported (bug#1482).
13743 2011-07-10 Johan Bockgård <bojohan@gnu.org>
13745 * xdisp.c (Ftool_bar_lines_needed): Fix WINDOWP check.
13747 2011-07-10 Jan Djärv <jan.h.d@swipnet.se>
13749 * xmenu.c (menu_highlight_callback): Only pass frame to show_help_event
13750 for non-popups (Bug#3642).
13752 2011-07-10 Andreas Schwab <schwab@linux-m68k.org>
13754 * alloc.c (reset_malloc_hooks): Protoize.
13755 * buffer.c (mmap_init, mmap_find, mmap_free_1, mmap_enlarge)
13756 (mmap_set_vars, mmap_alloc, mmap_free, mmap_realloc): Likewise.
13757 * cm.c (losecursor): Likewise.
13758 * data.c (fmod): Likewise.
13759 * dispnew.c (swap_glyphs_in_rows): Likewise.
13760 * emacs.c (memory_warning_signal): Likewise.
13761 * floatfns.c (float_error): Likewise.
13762 * font.c (check_gstring, check_otf_features, otf_tag_symbol)
13763 (otf_open, font_otf_capability, generate_otf_features)
13764 (font_otf_DeviceTable, font_otf_ValueRecord, font_otf_Anchor):
13766 * image.c (pbm_read_file): Likewise.
13767 * indent.c (string_display_width): Likewise.
13768 * intervals.c (check_for_interval, search_for_interval)
13769 (inc_interval_count, count_intervals, root_interval)
13770 (adjust_intervals_for_insertion, make_new_interval): Likewise.
13771 * lread.c (defalias): Likewise.
13772 * ralloc.c (r_alloc_check): Likewise.
13773 * regex.c (set_image_of_range_1, set_image_of_range)
13774 (regex_grow_registers): Likewise.
13775 * sysdep.c (strerror): Likewise.
13776 * termcap.c (valid_filename_p, tprint, main): Likewise.
13777 * tparam.c (main): Likewise.
13778 * unexhp9k800.c (run_time_remap, save_data_space)
13779 (update_file_ptrs, read_header, write_header, calculate_checksum)
13780 (copy_file, copy_rest, display_header): Likewise.
13781 * widget.c (mark_shell_size_user_specified, create_frame_gcs):
13783 * xdisp.c (check_it): Likewise.
13784 * xfaces.c (register_color, unregister_color, unregister_colors):
13786 * xfns.c (print_fontset_result): Likewise.
13787 * xrdb.c (member, fatal, main): Likewise.
13789 2011-07-10 Paul Eggert <eggert@cs.ucla.edu>
13791 Fix minor problems found by static checking (Bug#9031).
13792 * chartab.c (char_table_set_range, map_sub_char_table):
13793 Remove unused locals.
13794 (uniprop_table): Now static.
13795 * composite.c (_work_char): Remove unused static var.
13797 2011-07-09 Juanma Barranquero <lekktu@gmail.com>
13799 * chartab.c (uniprop_table_uncompress): Remove unused local variable.
13801 2011-07-09 Jan Djärv <jan.h.d@swipnet.se>
13803 * gtkutil.c (qttip_cb): Remove code without function.
13805 2011-07-09 Eli Zaretskii <eliz@gnu.org>
13807 * w32.c (pthread_sigmask): New stub.
13809 2011-07-08 Paul Eggert <eggert@cs.ucla.edu>
13811 Use pthread_sigmask, not sigprocmask (Bug#9010).
13812 sigprocmask is portable only for single-threaded applications, and
13813 Emacs can be multi-threaded when it uses GTK.
13814 * Makefile.in (LIB_PTHREAD_SIGMASK): New macro.
13816 * callproc.c (Fcall_process):
13817 * process.c (create_process):
13818 * sysdep.c (sys_sigblock, sys_sigunblock, sys_sigsetmask):
13819 Use pthread_sigmask, not sigprocmask.
13821 2011-07-08 Jan Djärv <jan.h.d@swipnet.se>
13823 * gtkutil.c (qttip_cb): Set line wrap to FALSE for tooltip widget.
13824 (xg_prepare_tooltip): Revert text in x->ttip_lbl, margins was
13827 2011-07-08 Jan Djärv <jan.h.d@swipnet.se>
13829 * gtkutil.c (xg_prepare_tooltip): Fix indentation and comment.
13830 Put text in x->ttip_lbl instead of gtk_tooltip_set_text (Bug#8591).
13831 (xg_hide_tooltip): Fix comment.
13833 * nsterm.m (initFrameFromEmacs): Don't use ns_return_types
13834 in registerServicesMenuSendTypes.
13835 (validRequestorForSendType): Don't check ns_return_types.
13837 * nsfns.m (Fx_open_connection): Put NSStringPboardType into
13840 2011-07-08 Jason Rumney <jasonr@gnu.org>
13842 * w32term.c (x_make_frame_visible): Use SH_SHOWNORMAL rather than
13843 SH_SHOW for hidden windows (Bug#5482).
13845 * w32fns.c (w32_wnd_proc) [WM_TIMER, WM_SET_CURSOR]: Avoid using
13846 frame struct members of non-existent frames (Bug#6284).
13848 2011-07-08 Jan Djärv <jan.h.d@swipnet.se>
13850 * nsterm.m (keyDown): Call to wantsToDelayTextChangeNotifications and
13851 variable firstTime not needed on OSX >= 10.6.
13852 (setPosition): setFloatValue:knobProportion: is deprecated on OSX
13853 >= 10.5. Use setKnobProportion, setDoubleValue.
13855 * nsterm.h (MAC_OS_X_VERSION_10_3, MAC_OS_X_VERSION_10_4)
13856 (MAC_OS_X_VERSION_10_5): Define if not defined.
13857 (EmacsView, EmacsTooltip): Implements NSWindowDelegate on OSX >= 10.6.
13858 (EmacsMenu): Implements NSMenuDelegate on OSX >= 10.6.
13859 (EmacsToolbar): Implements NSToolbarDelegate on OSX >= 10.6.
13861 * nsselect.m (ns_string_from_pasteboard): Don't use deprecated methods
13862 cString and lossyCString on OSX >= 10.4.
13864 * nsmenu.m (fillWithWidgetValue): Don't use deprecated method
13865 sizeToFit on OSX >= 10.2.
13867 * nsimage.m (allocInitFromFile): Don't use deprecated method
13868 bestRepresentationForDevice on OSX >= 10.6.
13870 * nsfns.m (check_ns_display_info): Cast to long and use %ld in error
13873 * emacs.c: Declare unexec_init_emacs_zone.
13875 * nsgui.h: Fix compiler warning about gnulib redefining verify.
13877 * nsselect.m (ns_get_local_selection): Change to extern (Bug#8842).
13879 * nsmenu.m (ns_update_menubar): Remove useless setDelegate call
13880 on svcsMenu (Bug#8842).
13882 * nsfns.m (Fx_open_connection): Remove NSStringPboardType from
13884 (Fns_list_services): Just return Qnil on 10.6, code not working there.
13886 * nsterm.m (QUTF8_STRING): Declare.
13887 (initFrameFromEmacs): Call registerServicesMenuSendTypes.
13888 (validRequestorForSendType): Return type is (id).
13889 Change indexOfObjectIdenticalTo to indexOfObject.
13890 Check if we have local selection before returning self (Bug#8842).
13891 (writeSelectionToPasteboard): Put local selection into paste board
13892 if we have a local selection (Bug#8842).
13893 (syms_of_nsterm): DEFSYM QUTF8_STRING.
13895 * nsterm.h (MAC_OS_X_VERSION_10_6): Define here instead of nsterm.m.
13896 (ns_get_local_selection): Declare.
13898 2011-07-07 Lars Magne Ingebrigtsen <larsi@gnus.org>
13900 * keymap.c (describe_map_tree): Don't insert a double newline at
13901 the end of the buffer (bug#1169) and return whether we inserted
13904 * callint.c (Fcall_interactively): Change "reading args" to
13905 "providing args" to try to clarify what it does (bug#1010).
13907 2011-07-07 Kenichi Handa <handa@m17n.org>
13909 * composite.c (composition_compute_stop_pos): Ignore a static
13910 composition starting before CHARPOS (Bug#8915).
13912 * xdisp.c (handle_composition_prop): Likewise.
13914 2011-07-07 Eli Zaretskii <eliz@gnu.org>
13916 * term.c (produce_glyphs) <xassert>: Allow IT_GLYPHLESS in it->what.
13919 2011-07-07 Kenichi Handa <handa@m17n.org>
13921 * character.h (unicode_category_t): New enum type.
13923 * chartab.c (uniprop_decoder_t, uniprop_encoder_t): New types.
13924 (Qchar_code_property_table): New variable.
13925 (UNIPROP_TABLE_P, UNIPROP_GET_DECODER)
13926 (UNIPROP_COMPRESSED_FORM_P): New macros.
13927 (char_table_ascii): Uncompress the compressed values.
13928 (sub_char_table_ref): New arg is_uniprop. Callers changed.
13929 Uncompress the compressed values.
13930 (sub_char_table_ref_and_range): Likewise.
13931 (char_table_ref_and_range): Uncompress the compressed values.
13932 (sub_char_table_set): New arg is_uniprop. Callers changed.
13933 Uncompress the compressed values.
13934 (sub_char_table_set_range): Args changed. Callers changed.
13935 (char_table_set_range): Adjuted for the above change.
13936 (map_sub_char_table): Delete args default_val and parent. Add arg
13937 top. Give decoded values to a Lisp function.
13938 (map_char_table): Adjust for the above change. Give decoded
13939 values to a Lisp function. Gcpro more variables.
13940 (uniprop_table_uncompress)
13941 (uniprop_decode_value_run_length): New functions.
13942 (uniprop_decoder, uniprop_decoder_count): New variables.
13943 (uniprop_get_decoder, uniprop_encode_value_character)
13944 (uniprop_encode_value_run_length, uniprop_encode_value_numeric):
13946 (uniprop_encoder, uniprop_encoder_count): New variables.
13947 (uniprop_get_encoder, uniprop_table)
13948 (Funicode_property_table_internal, Fget_unicode_property_internal)
13949 (Fput_unicode_property_internal): New functions.
13950 (syms_of_chartab): DEFSYM Qchar_code_property_table, defsubr
13951 Sunicode_property_table_internal, Sget_unicode_property_internal,
13952 and Sput_unicode_property_internal. Defvar_lisp
13953 char-code-property-alist.
13955 * composite.c (CHAR_COMPOSABLE_P): Adjust for the change of
13956 Vunicode_category_table.
13958 * font.c (font_range): Adjust for the change of
13959 Vunicode_category_table.
13961 2011-07-07 Dan Nicolaescu <dann@ics.uci.edu>
13963 * m/iris4d.h: Remove file, move contents ...
13964 * s/irix6-5.h: ... here.
13966 2011-07-06 Paul Eggert <eggert@cs.ucla.edu>
13968 Remove unportable assumption about struct layout (Bug#8884).
13969 * alloc.c (mark_buffer):
13970 * buffer.c (reset_buffer_local_variables, Fbuffer_local_variables)
13971 (clone_per_buffer_values): Don't assume that
13972 sizeof (struct buffer) is a multiple of sizeof (Lisp_Object).
13973 This isn't true in general, and it's particularly not true
13974 if Emacs is configured with --with-wide-int.
13975 * buffer.h (FIRST_FIELD_PER_BUFFER, LAST_FIELD_PER_BUFFER):
13976 New macros, used in the buffer.c change.
13978 2011-07-05 Jan Djärv <jan.h.d@swipnet.se>
13980 * xsettings.c: Use both GConf and GSettings if both are available.
13981 (store_config_changed_event): Add comment.
13982 (dpyinfo_valid, store_font_name_changed, map_tool_bar_style)
13983 (store_tool_bar_style_changed): New functions.
13984 (store_monospaced_changed): Add comment. Call dpyinfo_valid.
13985 (struct xsettings): Move font inside HAVE_XFT.
13986 (GSETTINGS_TOOL_BAR_STYLE, GSETTINGS_FONT_NAME): New defines.
13987 (GSETTINGS_MONO_FONT): Rename from SYSTEM_MONO_FONT.
13988 Move inside HAVE_XFT.
13989 (something_changed_gsettingsCB): Rename from something_changedCB.
13990 Check for changes in GSETTINGS_TOOL_BAR_STYLE and GSETTINGS_FONT_NAME
13992 (GCONF_TOOL_BAR_STYLE, GCONF_FONT_NAME): New defines.
13993 (GCONF_MONO_FONT): Rename from SYSTEM_MONO_FONT. Move inside HAVE_XFT.
13994 (something_changed_gconfCB): Rename from something_changedCB.
13995 Check for changes in GCONF_TOOL_BAR_STYLE and GCONF_FONT_NAME also.
13996 (parse_settings): Move check for font inside HAVE_XFT.
13997 (read_settings, apply_xft_settings): Add comment.
13998 (read_and_apply_settings): Add comment. Call map_tool_bar_style and
13999 store_tool_bar_style_changed. Move check for font inside HAVE_XFT and
14000 call store_font_name_changed.
14001 (xft_settings_event): Add comment.
14002 (init_gsettings): Add comment. Get values for GSETTINGS_TOOL_BAR_STYLE
14003 and GSETTINGS_FONT_NAME. Move check for fonts within HAVE_XFT.
14004 (init_gconf): Add comment. Get values for GCONF_TOOL_BAR_STYLE
14005 and GCONF_FONT_NAME. Move check for fonts within HAVE_XFT.
14006 (xsettings_initialize): Call init_gsettings last.
14007 (xsettings_get_system_font, xsettings_get_system_normal_font):
14010 2011-07-05 Paul Eggert <eggert@cs.ucla.edu>
14012 Random fixes. E.g., (random) never returned negative values.
14013 * fns.c (Frandom): Use GET_EMACS_TIME for random seed, and add the
14014 subseconds part to the entropy, as that's a bit more random.
14015 Prefer signed to unsigned, since the signedness doesn't matter and
14016 in general we prefer signed. When given a limit, use a
14017 denominator equal to INTMASK + 1, not to VALMASK + 1, because the
14018 latter isn't right if USE_2_TAGS_FOR_INTS.
14019 * sysdep.c (get_random): Return a value in the range 0..INTMASK,
14020 not 0..VALMASK. Don't discard "excess" bits that random () returns.
14022 2011-07-04 Stefan Monnier <monnier@iro.umontreal.ca>
14024 * textprop.c (text_property_stickiness):
14025 Obey Vtext_property_default_nonsticky.
14026 (syms_of_textprop): Add `display' to Vtext_property_default_nonsticky.
14027 * w32fns.c (syms_of_w32fns):
14028 * xfns.c (syms_of_xfns): Don't Add `display' since it's there by default.
14030 2011-07-04 Paul Eggert <eggert@cs.ucla.edu>
14032 * fileio.c (barf_or_query_if_file_exists): Use S_ISDIR.
14033 This is more efficient than Ffile_directory_p and avoids a minor race.
14035 2011-07-04 Lars Magne Ingebrigtsen <larsi@gnus.org>
14037 * buffer.c (Foverlay_put): Say what the return value is
14040 * fileio.c (barf_or_query_if_file_exists): Check first if the file
14041 is a directory before asking whether to use the file name
14043 (barf_or_query_if_file_exists): Make the "File is a directory"
14044 error be more correct.
14046 * fns.c (Frequire): Remove the mention of the .gz files, since
14047 that's installation-specific, but keep the mention of
14048 `get-load-suffixes'.
14050 2011-07-04 Paul Eggert <eggert@cs.ucla.edu>
14052 * editfns.c (Fformat_time_string): Don't assume strlen fits in int.
14053 Report string overflow if the output is too long.
14055 2011-07-04 Juanma Barranquero <lekktu@gmail.com>
14057 * gnutls.c (Fgnutls_boot): Don't mention :verify-error.
14058 (syms_of_gnutls): Remove duplicate DEFSYM for
14059 Qgnutls_bootprop_verify_hostname_error, an error for
14060 Qgnutls_bootprop_verify_error (which is no longer used).
14062 * eval.c (find_handler_clause): Remove parameters `sig' and `data',
14063 unused since 2011-01-26T20:02:07Z!monnier@iro.umontreal.ca. All callers changed.
14064 Also (re)move comments that are misplaced or no longer relevant.
14066 2011-07-03 Lars Magne Ingebrigtsen <larsi@gnus.org>
14068 * callint.c (Finteractive): Clarify the meaning of "@" (bug#8813).
14070 2011-07-03 Chong Yidong <cyd@stupidchicken.com>
14072 * xfaces.c (Finternal_merge_in_global_face): Modify the foreground
14073 and background color parameters if they have been changed.
14075 2011-07-03 Lars Magne Ingebrigtsen <larsi@gnus.org>
14077 * editfns.c (Fformat): Clarify the - and 0 flags (bug#6659).
14079 2011-07-03 Paul Eggert <eggert@cs.ucla.edu>
14081 * xsettings.c (SYSTEM_FONT): Define only when used.
14082 No need to define when HAVE_GSETTINGS || !HAVE_XFT.
14084 * keymap.c (access_keymap_1): Now static.
14086 2011-07-02 Chong Yidong <cyd@stupidchicken.com>
14088 * keyboard.c (command_loop_1): If a down-mouse event is unbound,
14089 leave any prefix arg for the up event (Bug#1586).
14091 2011-07-02 Lars Magne Ingebrigtsen <larsi@gnus.org>
14093 * lread.c (syms_of_lread): Mention single symbols defined by
14094 `defvar' or `defconst' (bug#7154).
14096 * fns.c (Frequire): Mention .el.gz files (bug#7314).
14097 (Frequire): Mention get-load-suffixes.
14099 2011-07-02 Martin Rudalics <rudalics@gmx.at>
14101 * window.h (window): Remove clone_number slot.
14102 * window.c (Fwindow_clone_number, Fset_window_clone_number):
14104 (make_parent_window, make_window, saved_window)
14105 (Fset_window_configuration, save_window_save): Don't deal with
14107 * buffer.c (Qclone_number): Remove declaration.
14108 (sort_overlays, overlay_strings): Don't deal with clone numbers.
14110 2011-07-02 Stefan Monnier <monnier@iro.umontreal.ca>
14112 Add multiple inheritance to keymaps.
14113 * keymap.c (Fmake_composed_keymap): New function.
14114 (Fset_keymap_parent): Simplify.
14115 (fix_submap_inheritance): Remove.
14116 (access_keymap_1): New function extracted from access_keymap to handle
14117 embedded parents and handle lists of maps.
14118 (access_keymap): Use it.
14119 (Fkeymap_prompt, map_keymap_internal, map_keymap, store_in_keymap)
14120 (Fcopy_keymap): Handle embedded parents.
14121 (Fcommand_remapping, define_as_prefix): Simplify.
14122 (Fkey_binding): Simplify.
14123 (syms_of_keymap): Move minibuffer-local-completion-map,
14124 minibuffer-local-filename-completion-map,
14125 minibuffer-local-must-match-map, and
14126 minibuffer-local-filename-must-match-map to Elisp.
14127 (syms_of_keymap): Defsubr make-composed-keymap.
14128 * keyboard.c (menu_bar_items): Use map_keymap_canonical.
14129 (parse_menu_item): Trivial simplification.
14131 2011-07-01 Glenn Morris <rgm@gnu.org>
14133 * Makefile.in (SETTINGS_LIBS): Fix typo.
14135 2011-07-01 Kazuhiro Ito <kzhr@d1.dion.ne.jp> (tiny change)
14137 * coding.c (Fencode_coding_string): Record the last coding system
14138 used, as the function doc string says (bug#8738).
14140 2011-07-01 Jan Djärv <jan.h.d@swipnet.se>
14142 * xsettings.c (store_monospaced_changed): Take new font as arg and
14143 check for change against current_mono_font.
14144 (EMACS_TYPE_SETTINGS): Remove this and related defines.
14145 (emacs_settings_constructor, emacs_settings_get_property)
14146 (emacs_settings_set_property, emacs_settings_class_init)
14147 (emacs_settings_init, gsettings_obj): Remove.
14148 (something_changedCB): New function for HAVE_GSETTINGS.
14149 (something_changedCB): HAVE_GCONF: Call store_monospaced_changed
14150 with value as argument.
14151 (init_gsettings): Check that GSETTINGS_SCHEMA exists before calling
14152 g_settings_new (Bug#8967). Do not create gsettings_obj.
14153 Remove calls to g_settings_bind. Connect something_changedCB to
14156 * xgselect.c: Add defined (HAVE_GSETTINGS).
14157 (xgselect_initialize): Ditto.
14159 * process.c: Add defined (HAVE_GSETTINGS) for xgselect.h
14160 (wait_reading_process_output): Add defined (HAVE_GSETTINGS) for
14163 2011-07-01 Paul Eggert <eggert@cs.ucla.edu>
14165 * eval.c (struct backtrace): Simplify and port the data structure.
14166 Do not assume that "int nargs : BITS_PER_INT - 2;" produces a
14167 signed bit field, as this assumption is not portable and it makes
14168 Emacs crash when compiled with Sun C 5.8 on sparc. Do not use
14169 "char debug_on_exit : 1" as this is not portable either; instead,
14170 use the portable "unsigned int debug_on_exit : 1". Remove unused
14171 member evalargs. Remove obsolete comments about cc bombing out.
14173 2011-06-30 Jan Djärv <jan.h.d@swipnet.se>
14175 * xsettings.c: Include glib-object.h, gio/gio.h if HAVE_GSETTINGS.
14176 Let HAVE_GSETTINGS override HAVE_GCONF.
14177 (store_monospaced_changed): New function.
14178 (EMACS_SETTINGS): A new type derived from GObject to handle
14179 GSettings notifications.
14180 (emacs_settings_constructor, emacs_settings_get_property)
14181 (emacs_settings_set_property, emacs_settings_class_init):
14183 (gsettings_client, gsettings_obj): New variables.
14184 (GSETTINGS_SCHEMA): New define.
14185 (something_changedCB): Call store_monospaced_changed.
14186 (init_gsettings): New function.
14187 (xsettings_initialize): Call init_gsettings.
14188 (syms_of_xsettings): Initialize gsettings_client, gsettings_obj
14191 * Makefile.in (SETTINGS_CFLAGS, SETTINGS_LIBS): Rename from
14194 2011-06-29 Martin Rudalics <rudalics@gmx.at>
14196 * window.c (resize_root_window, grow_mini_window)
14197 (shrink_mini_window): Rename Qresize_root_window to
14198 Qwindow_resize_root_window and Qresize_root_window_vertically to
14199 Qwindow_resize_root_window_vertically.
14201 2011-06-28 Paul Eggert <eggert@cs.ucla.edu>
14203 * gnutls.c (Qgnutls_bootprop_verify_error): Remove unused var.
14205 2011-06-27 Juanma Barranquero <lekktu@gmail.com>
14207 * makefile.w32-in: Redesign dependencies so they reflect more
14208 clearly which files are directly included by each source file,
14209 and not through other includes.
14211 2011-06-27 Martin Rudalics <rudalics@gmx.at>
14213 * buffer.c (Qclone_number): Declare static and DEFSYM it.
14214 (sort_overlays, overlay_strings): When an overlay's clone number
14215 matches the window's clone number process the overlay even if
14216 the overlay's window property doesn't match the current window.
14218 * window.c (Fwindow_vchild): Rename to Fwindow_top_child.
14219 (Fwindow_hchild): Rename to Fwindow_left_child.
14220 (Fwindow_next): Rename to Fwindow_next_sibling.
14221 (Fwindow_prev): Rename to Fwindow_prev_sibling.
14222 (resize_window_check): Rename to window_resize_check.
14223 (resize_window_apply): Rename to window_resize_apply.
14224 (Fresize_window_apply): Rename to Fwindow_resize_apply.
14225 (Fdelete_other_windows_internal, resize_frame_windows)
14226 (Fsplit_window_internal, Fdelete_window_internal)
14227 (grow_mini_window, shrink_mini_window)
14228 (Fresize_mini_window_internal): Fix callers accordingly.
14230 2011-06-26 Jan Djärv <jan.h.d@swipnet.se>
14232 * emacsgtkfixed.h: State that this is only used with Gtk+3.
14233 (emacs_fixed_set_min_size): Remove.
14234 (emacs_fixed_new): Take frame as argument.
14236 * emacsgtkfixed.c: State that this is only used with Gtk+3.
14237 (_EmacsFixedPrivate): Remove minwidth/height.
14238 Add struct frame *f.
14239 (emacs_fixed_init): Initialize priv->f.
14240 (get_parent_class, emacs_fixed_set_min_size): Remove.
14241 (emacs_fixed_new): Set priv->f to argument.
14242 (emacs_fixed_get_preferred_width)
14243 (emacs_fixed_get_preferred_height): Use min_width/height from
14244 frames size_hint to set minimum and natural (Bug#8919).
14245 (XSetWMSizeHints, XSetWMNormalHints): Override these functions
14246 and use min_width/height from frames size_hint to set
14247 min_width/height (Bug#8919).
14249 * gtkutil.c (xg_create_frame_widgets): Pass f to emacs_fixed_new.
14250 (x_wm_set_size_hint): Remove call to emacs_fixed_set_min_size.
14253 2011-06-26 Eli Zaretskii <eliz@gnu.org>
14255 * bidi.c (bidi_paragraph_init): Test for ZV_BYTE before calling
14256 bidi_at_paragraph_end, since fast_looking_at doesn't like to be
14259 2011-06-26 Chong Yidong <cyd@stupidchicken.com>
14261 * process.c (wait_reading_process_output): Bypass select if
14262 waiting for a cell while ignoring keyboard input, and input is
14263 pending. Suggested by Jan Djärv (Bug#8869).
14265 2011-06-25 Paul Eggert <eggert@cs.ucla.edu>
14267 Use gnulib's dup2 module instead of rolling our own.
14268 * sysdep.c (dup2) [!HAVE_DUP2]: Remove; gnulib now does this.
14270 2011-06-25 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
14272 * dispnew.c (scrolling_window): Before scrolling, turn off a
14273 mouse-highlight in the window being scrolled.
14275 2011-06-24 Juanma Barranquero <lekktu@gmail.com>
14277 Move DEFSYM to lisp.h and use everywhere.
14279 * character.h (DEFSYM): Move declaration...
14280 * lisp.h (DEFSYM): ...here.
14286 * w32select.c: Don't include character.h.
14288 * alloc.c (syms_of_alloc):
14289 * buffer.c (syms_of_buffer):
14290 * bytecode.c (syms_of_bytecode):
14291 * callint.c (syms_of_callint):
14292 * casefiddle.c (syms_of_casefiddle):
14293 * casetab.c (init_casetab_once):
14294 * category.c (init_category_once, syms_of_category):
14295 * ccl.c (syms_of_ccl):
14296 * cmds.c (syms_of_cmds):
14297 * composite.c (syms_of_composite):
14298 * dbusbind.c (syms_of_dbusbind):
14299 * dired.c (syms_of_dired):
14300 * dispnew.c (syms_of_display):
14301 * doc.c (syms_of_doc):
14302 * editfns.c (syms_of_editfns):
14303 * emacs.c (syms_of_emacs):
14304 * eval.c (syms_of_eval):
14305 * fileio.c (syms_of_fileio):
14306 * fns.c (syms_of_fns):
14307 * frame.c (syms_of_frame):
14308 * fringe.c (syms_of_fringe):
14309 * insdel.c (syms_of_insdel):
14310 * keymap.c (syms_of_keymap):
14311 * lread.c (init_obarray, syms_of_lread):
14312 * macros.c (syms_of_macros):
14313 * msdos.c (syms_of_msdos):
14314 * print.c (syms_of_print):
14315 * process.c (syms_of_process):
14316 * search.c (syms_of_search):
14317 * sound.c (syms_of_sound):
14318 * syntax.c (init_syntax_once, syms_of_syntax):
14319 * terminal.c (syms_of_terminal):
14320 * textprop.c (syms_of_textprop):
14321 * undo.c (syms_of_undo):
14322 * w32.c (globals_of_w32):
14323 * window.c (syms_of_window):
14324 * xdisp.c (syms_of_xdisp):
14325 * xfaces.c (syms_of_xfaces):
14326 * xfns.c (syms_of_xfns):
14327 * xmenu.c (syms_of_xmenu):
14328 * xsettings.c (syms_of_xsettings):
14329 * xterm.c (syms_of_xterm): Use DEFSYM.
14331 2011-06-24 Teodor Zlatanov <tzz@lifelogs.com>
14333 * gnutls.c (syms_of_gnutls): Use the DEFSYM macro from character.h.
14335 2011-06-23 Paul Eggert <eggert@cs.ucla.edu>
14337 Integer and buffer overflow fixes (Bug#8873).
14339 * print.c (printchar, strout): Check for string overflow.
14340 (PRINTPREPARE, printchar, strout):
14341 Don't set size unless allocation succeeds.
14343 * minibuf.c (read_minibuf_noninteractive): Use ptrdiff_t, not int,
14344 for sizes. Check for string overflow more accurately.
14345 Simplify newline removal at end; this suppresses a GCC 4.6.0 warning.
14347 * macros.c: Integer and buffer overflow fixes.
14348 * keyboard.h (struct keyboard.kbd_macro_bufsize):
14349 * macros.c (Fstart_kbd_macro, store_kbd_macro_char):
14350 Use ptrdiff_t, not int, for sizes.
14351 Don't increment bufsize until after realloc succeeds.
14352 Check for size-calculation overflow.
14353 (Fstart_kbd_macro): Use EMACS_INT, not int, for XINT result.
14355 * lisp.h (DEFVAR_KBOARD): Use offsetof instead of char * finagling.
14357 * lread.c: Integer overflow fixes.
14358 (read_integer): Radix is now EMACS_INT, not int,
14359 to improve quality of diagnostics for out-of-range radices.
14360 Calculate buffer size correctly for out-of-range radices.
14361 (read1): Check for integer overflow in radices, and in
14362 read-circle numbers.
14363 (read_escape): Avoid int overflow.
14364 (Fload, openp, read_buffer_size, read1)
14365 (substitute_object_recurse, read_vector, read_list, map_obarray):
14366 Use ptrdiff_t, not int, for sizes.
14367 (read1): Use EMACS_INT, not int, for sizes.
14368 Check for size overflow.
14370 * image.c (cache_image): Check for size arithmetic overflow.
14372 * lread.c: Integer overflow issues.
14373 (saved_doc_string_size, saved_doc_string_length)
14374 (prev_saved_doc_string_size, prev_saved_doc_string_length):
14375 Now ptrdiff_t, not int.
14376 (read1): Don't assume doc string length fits in int. Check for
14377 out-of-range doc string lengths.
14378 (read_list): Don't assume file position fits in int.
14379 (read_escape): Check for hex character overflow.
14381 2011-06-22 Leo Liu <sdl.web@gmail.com>
14383 * minibuf.c (Fcompleting_read_default, Vcompleting_read_function):
14384 Move to minibuffer.el.
14386 2011-06-22 Paul Eggert <eggert@cs.ucla.edu>
14388 Fixes for GLYPH_DEBUG found by GCC 4.6.0 static checking.
14389 The following patches are for when GLYPH_DEBUG && !XASSERT.
14390 * dispextern.h (trace_redisplay_p, dump_glyph_string):
14391 * dispnew.c (flush_stdout):
14392 * xdisp.c (dump_glyph_row, dump_glyph_matrix, dump_glyph):
14393 Mark as externally visible.
14394 * dispnew.c (check_window_matrix_pointers): Now static.
14395 * dispnew.c (window_to_frame_vpos):
14396 * xfns.c (unwind_create_frame):
14397 * xterm.c (x_check_font): Remove unused local.
14398 * scroll.c (CHECK_BOUNDS):
14399 * xfaces.c (cache_fache): Rename local to avoid shadowing.
14400 * xfns.c, w32fns.c (image_cache_refcount, dpyinfo_refcount): Now static.
14401 * xdisp.c (check_window_end): Now a no-op if !XASSERTS.
14402 (debug_first_unchanged_at_end_vpos, debug_last_unchanged_at_beg_vpos)
14403 (debug_dvpos, debug_dy, debug_delta, debug_delta_bytes, debug_end_vpos):
14405 (debug_method_add): Use va_list and vsprintf rather than relying
14406 on undefined behavior with wrong number of arguments.
14407 (dump_glyph, dump_glyph_row, Fdump_glyph_matrix):
14408 Don't assume ptrdiff_t and EMACS_INT are the same width as int.
14409 In this code, it's OK to assume C99 behavior for ptrdiff_t formats
14410 since we're not interested in debugging glyphs with old libraries.
14411 * xfaces.c (cache_face): Move debugging code earlier; this pacifies
14412 GCC 4.6.0's static checking.
14414 2011-06-22 Paul Eggert <eggert@cs.ucla.edu>
14416 Integer overflow and signedness fixes (Bug#8873).
14417 A few related buffer overrun fixes, too.
14419 * font.c (font_score): Use EMACS_INT, not int, to store XINT value.
14421 * dispextern.h (struct face.stipple):
14422 * image.c (x_bitmap_height, x_bitmap_width, x_bitmap_pixmap)
14423 (x_bitmap_mask, x_allocate_bitmap_record)
14424 (x_create_bitmap_from_data, x_create_bitmap_from_file)
14425 (x_destroy_bitmap, x_destroy_all_bitmaps, x_create_bitmap_mask)
14426 (x_create_bitmap_from_xpm_data):
14427 * nsterm.h (struct ns_display_info.bitmaps_size, .bitmaps_last):
14428 * w32term.h (struct w32_display_info.icon_bitmap_id, .bitmaps_size)
14430 * xfaces.c (load_pixmap):
14431 * xterm.c (x_bitmap_icon, x_wm_set_icon_pixmap):
14432 * xterm.h (struct x_display_info.icon_bitmap_id, .bitmaps_size)
14433 (.bitmaps_last, struct x_output.icon_bitmap):
14434 Use ptrdiff_t, not int, for bitmap indexes.
14435 (x_allocate_bitmap_record): Check for size overflow.
14436 * dispextern.h, lisp.h: Adjust to API changes elsewhere.
14438 Use ptrdiff_t, not int, for overlay counts.
14439 * buffer.h (overlays_at, sort_overlays, GET_OVERLAYS_AT):
14440 * editfns.c (overlays_around, get_pos_property):
14441 * textprop.c (get_char_property_and_overlay):
14442 * xdisp.c (next_overlay_change, note_mouse_highlight):
14443 * xfaces.c (face_at_buffer_position):
14444 * buffer.c (OVERLAY_COUNT_MAX): New macro.
14445 (overlays_at, overlays_in, sort_overlays, Foverlays_at)
14446 (Fnext_overlay_change, Fprevious_overlay_change)
14447 (mouse_face_overlay_overlaps, Foverlays_in):
14448 Use ptrdiff_t, not int, for sizes.
14449 (overlays_at, overlays_in): Check for size-calculation overflow.
14451 * xterm.c (xim_initialize, same_x_server): Strlen may not fit in int.
14453 * xsmfns.c (smc_save_yourself_CB, x_session_initialize): Avoid strlen.
14454 (x_session_initialize): Do not assume string length fits in int.
14456 * xsettings.c (apply_xft_settings): Fix potential buffer overrun.
14457 This is unlikely, but can occur if DPI is outlandish.
14459 * xsettings.c (Ffont_get_system_normal_font, Ffont_get_system_font):
14460 * xselect.c (Fx_get_atom_name): Avoid need for strlen.
14462 * xrdb.c: Don't assume strlen fits in int; avoid some strlens.
14463 * xrdb.c (magic_file_p, search_magic_path):
14464 Omit last arg SUFFIX; it was always 0. All callers changed.
14465 (magic_file_p): Use ptrdiff_t, not int. Check for size overflow.
14467 * xfont.c (xfont_match): Avoid need for strlen.
14469 * xfns.c: Don't assume strlen fits in int.
14470 (xic_create_fontsetname, x_window): Use ptrdiff_t, not int.
14472 * xdisp.c (message_log_check_duplicate): Return intmax_t,
14473 not unsigned long, as we prefer signed integers. All callers changed.
14474 Detect integer overflow in repeat count.
14475 (message_dolog): Don't assume print length fits in 39 bytes.
14476 (display_mode_element): Don't assume strlen fits in int.
14478 * termcap.c: Don't assume sizes fit in int and never overflow.
14479 (struct termcap_buffer, tgetent): Use ptrdiff_t, not int, for sizes.
14480 (gobble_line): Check for size-calculation overflow.
14482 * minibuf.c (Fread_buffer):
14483 * lread.c (intern, intern_c_string):
14484 * image.c (xpm_scan) [HAVE_NS && !HAVE_XPM]:
14485 Don't assume string length fits in int.
14487 * keyboard.c (parse_tool_bar_item):
14488 * gtkutil.c (style_changed_cb): Avoid need for strlen.
14490 * font.c: Don't assume string length fits in int.
14491 (font_parse_xlfd, font_parse_fcname, font_unparse_fcname):
14492 Use ptrdiff_t, not int.
14493 (font_intern_prop): Don't assume string length fits in int.
14494 Don't assume integer property fits in fixnum.
14495 * font.h (font_intern_prop): 2nd arg is now ptrdiff_t, not int.
14497 * filelock.c: Fix some buffer overrun and integer overflow issues.
14498 (get_boot_time): Don't assume gzip command string fits in 100 bytes.
14499 Reformulate so as not to need the command string.
14500 Invoke gzip -cd rather than gunzip, as it's more portable.
14501 (lock_info_type, lock_file_1, lock_file):
14502 Don't assume pid_t and time_t fit in unsigned long.
14503 (LOCK_PID_MAX): Remove; we now use more-reliable bounds.
14504 (current_lock_owner): Prefer signed type for sizes.
14505 Use memcpy, not strncpy, where memcpy is what is really wanted.
14506 Don't assume (via atoi) that time_t and pid_t fit in int.
14507 Check for time_t and/or pid_t out of range, e.g., via a network share.
14508 Don't alloca where an auto var works fine.
14510 * fileio.c: Fix some integer overflow issues.
14511 (file_name_as_directory, Fexpand_file_name, Fsubstitute_in_file_name):
14512 Don't assume string length fits in int.
14513 (directory_file_name): Don't assume string length fits in long.
14514 (make_temp_name): Don't assume pid fits in int, or that its print
14515 length is less than 20.
14517 * data.c (Fsubr_name): Rewrite to avoid a strlen call.
14519 * coding.c (make_subsidiaries): Don't assume string length fits in int.
14521 * callproc.c (child_setup): Rewrite to avoid two strlen calls.
14523 * process.c (Fformat_network_address): Use EMACS_INT, not EMACS_UINT.
14524 We prefer signed integers, even for size calculations.
14526 * emacs.c: Don't assume string length fits in 'int'.
14527 (DEFINE_DUMMY_FUNCTION, sort_args): Use ptrdiff_t, not int.
14528 (main): Don't invoke strlen when not needed.
14530 * dbusbind.c (XD_ERROR): Don't arbitrarily truncate string.
14531 (XD_DEBUG_MESSAGE): Don't waste a byte.
14533 * callproc.c (getenv_internal_1, getenv_internal)
14534 (Fgetenv_internal):
14535 * buffer.c (init_buffer): Don't assume string length fits in 'int'.
14537 * lread.c (invalid_syntax): Omit length argument.
14538 All uses changed. This doesn't fix a bug, but it simplifies the
14539 code away from its former Hollerith-constant appearance, and it's
14540 one less 'int' to worry about when looking at integer-overflow issues.
14541 (string_to_number): Simplify 2011-04-26 change by invoking xsignal1.
14543 * lisp.h (DEFUN): Remove bogus use of sizeof (struct Lisp_Subr).
14544 This didn't break anything, but it didn't help either.
14545 It's confusing to put a bogus integer in a place where the actual
14546 value does not matter.
14547 (LIST_END_P): Remove unused macro and its bogus comment.
14548 (make_fixnum_or_float): Remove unnecessary cast to EMACS_INT.
14550 * lisp.h (union Lisp_Object.i): EMACS_INT, not EMACS_UINT.
14551 This is for consistency with the ordinary, non-USE_LISP_UNION_TYPE,
14553 (struct Lisp_Bool_Vector.size): EMACS_INT, not EMACS_UINT.
14554 We prefer signed types, and the value cannot exceed the EMACS_INT
14555 range anyway (because otherwise the length would not be representable).
14556 (XSET) [USE_LISP_UNION_TYPE]: Use uintptr_t and intptr_t,
14557 not EMACS_UINT and EMACS_INT, when converting pointer to integer.
14558 This avoids a GCC warning when WIDE_EMACS_INT.
14560 * indent.c (sane_tab_width): New function.
14561 (current_column, scan_for_column, Findent_to, position_indentation)
14562 (compute_motion): Use it. This is just for clarity.
14563 (Fcompute_motion): Don't assume hscroll and tab offset fit in int.
14565 * image.c (xbm_image_p): Don't assume stated width, height fit in int.
14567 * lisp.h (lint_assume): New macro.
14568 * composite.c (composition_gstring_put_cache):
14569 * ftfont.c (ftfont_shape_by_flt): Use it to pacify GCC 4.6.0.
14571 * editfns.c, insdel.c:
14572 Omit unnecessary forward decls, to simplify future changes.
14574 * ftfont.c (ftfont_shape_by_flt): Use signed integers for lengths.
14576 * font.c (Ffont_shape_gstring): Don't assume glyph len fits in 'int'.
14578 * fns.c (Ffillarray): Don't assume bool vector size fits in 'int'.
14579 Use much-faster test for byte-length change.
14580 Don't assume string byte-length fits in 'int'.
14581 Check that character arg fits in 'int'.
14582 (mapcar1): Declare byte as byte, for clarity.
14584 * alloc.c (Fmake_bool_vector): Avoid unnecessary multiplication.
14586 * fns.c (concat): Catch string overflow earlier.
14587 Do not rely on integer wraparound.
14589 * dispextern.h (struct it.overlay_strings_charpos)
14590 (struct it.selective): Now EMACS_INT, not int.
14591 * xdisp.c (forward_to_next_line_start)
14592 (back_to_previous_visible_line_start)
14593 (reseat_at_next_visible_line_start, next_element_from_buffer):
14594 Don't arbitrarily truncate the value of 'selective' to int.
14596 * xdisp.c (init_iterator): Use XINT, not XFASTINT; it might be < 0.
14598 * composite.c: Don't truncate sizes to 'int'.
14599 (composition_gstring_p, composition_reseat_it)
14600 (composition_adjust_point): Use EMACS_INT, not int.
14601 (get_composition_id, composition_gstring_put_cache): Use EMACS_INT,
14602 not EMACS_UINT, for indexes.
14604 * category.h (CATEGORY_SET_P): Remove unnecessary cast to EMACS_INT.
14606 * buffer.c: Include <verify.h>.
14607 (struct sortvec.priority, struct sortstr.priority):
14608 Now EMACS_INT, not int.
14609 (compare_overlays, cmp_for_strings): Avoid subtraction overflow.
14610 (struct sortstr.size, record_overlay_string)
14611 (struct sortstrlist.size, struct sortlist.used):
14612 Don't truncate size to int.
14613 (record_overlay_string): Check for size-calculation overflow.
14614 (init_buffer_once): Check at compile-time, not run-time.
14616 2011-06-22 Jim Meyering <meyering@redhat.com>
14618 Don't leak an XBM-image-sized buffer
14619 * image.c (xbm_load): Free the image buffer after using it.
14621 2011-06-21 Paul Eggert <eggert@cs.ucla.edu>
14624 * composite.c (find_automatic_composition): Omit needless 'return 0;'
14625 that Sun C diagnosed.
14626 * fns.c (secure_hash): Fix pointer signedness issue.
14627 * intervals.c (static_offset_intervals): New function.
14628 (offset_intervals): Use it.
14630 2011-06-21 Leo Liu <sdl.web@gmail.com>
14633 * makefile.w32-in ($(BLD)/fns.$(O)): Include sha256.h and
14636 * fns.c (secure_hash): Rename from crypto_hash_function and change
14637 the first arg to accept symbols.
14638 (Fsecure_hash): New primitive.
14639 (syms_of_fns): New symbols.
14641 2011-06-20 Deniz Dogan <deniz@dogan.se>
14643 * process.c (Fset_process_buffer): Clarify return value in
14646 2011-06-18 Chong Yidong <cyd@stupidchicken.com>
14648 * dispnew.c (add_window_display_history): Use BVAR.
14650 * xdisp.c (debug_method_add): Use BVAR.
14651 (check_window_end, dump_glyph_matrix, dump_glyph)
14652 (dump_glyph_row, dump_glyph_string): Convert arglist to ANSI C.
14654 * xfaces.c (check_lface_attrs, check_lface, dump_realized_face):
14657 * xfns.c (Fx_create_frame, x_create_tip_frame): Delay image cache
14658 check till after the cache is created in init_frame_faces.
14660 2011-06-17 Stefan Monnier <monnier@iro.umontreal.ca>
14662 * fns.c (Fsafe_length): Yet another int/Lisp_Object mixup.
14664 2011-06-16 Paul Eggert <eggert@cs.ucla.edu>
14666 * lisp.h: Include <limits.h>, for INT_MAX, LONG_MAX, LLONG_MAX.
14667 Without this, prin1 mishandles Lisp_Misc_Save_Value printing on
14668 hosts with pre-C99 libraries, because pD is wrongly defined to "t".
14670 Improve buffer-overflow checking (Bug#8873).
14671 * fileio.c (Finsert_file_contents):
14672 * insdel.c (insert_from_buffer_1, replace_range, replace_range_2):
14673 Remove the old (too-loose) buffer overflow checks.
14674 They weren't needed, since make_gap checks for buffer overflow.
14675 * insdel.c (make_gap_larger): Catch buffer overflows that were missed.
14676 The old code merely checked for Emacs fixnum overflow, and relied
14677 on undefined (wraparound) behavior. The new code avoids undefined
14678 behavior, and also checks for ptrdiff_t and/or size_t overflow.
14680 * editfns.c (Finsert_char): Don't dump core with very negative counts.
14681 Tune. Don't use wider integers than needed. Don't use alloca.
14682 Use a bigger 'string' buffer. Rewrite to avoid 'n > 0' test.
14684 * insdel.c (replace_range): Fix buf overflow when insbytes < outgoing.
14686 * insdel.c, lisp.h (buffer_overflow): New function.
14687 (insert_from_buffer_1, replace_range, replace_range_2):
14688 * insdel.c (make_gap_larger):
14689 * editfns.c (Finsert_char):
14690 * fileio.c (Finsert_file_contents): Use it, to normalize wording.
14692 * buffer.h (BUF_BYTES_MAX): Cast to ptrdiff_t so that it's signed.
14694 2011-06-15 Paul Eggert <eggert@cs.ucla.edu>
14696 Integer overflow and signedness fixes (Bug#8873, Bug#8828).
14698 * ccl.c (ASCENDING_ORDER): New macro, to work around GCC bug 43772.
14699 (GET_CCL_RANGE, IN_INT_RANGE): Use it.
14701 * fileio.c: Don't assume EMACS_INT fits in off_t.
14702 (emacs_lseek): New static function.
14703 (Finsert_file_contents, Fwrite_region): Use it.
14704 Use SEEK_SET, SEEK_CUR, SEEK_END as appropriate.
14706 * fns.c (Fload_average): Don't assume 100 * load average fits in int.
14708 * fns.c: Don't overflow int when computing a list length.
14709 * fns.c (QUIT_COUNT_HEURISTIC): New constant.
14710 (Flength, Fsafe_length): Use EMACS_INT, not int, to avoid unwanted
14711 truncation on 64-bit hosts. Check for QUIT every
14712 QUIT_COUNT_HEURISTIC entries rather than every other entry; that's
14713 faster and is responsive enough.
14714 (Flength): Report an error instead of overflowing an integer.
14715 (Fsafe_length): Return a float if the value is not representable
14716 as a fixnum. This shouldn't happen except in contrived situations.
14717 (Fnthcdr, Fsort): Don't assume list length fits in int.
14718 (Fcopy_sequence): Don't assume vector length fits in int.
14720 * alloc.c: Check that resized vectors' lengths fit in fixnums.
14721 (header_size, word_size): New constants.
14722 (allocate_vectorlike): Don't check size overflow here.
14723 (allocate_vector): Check it here instead, since this is the only
14724 caller of allocate_vectorlike that could cause overflow.
14725 Check that the new vector's length is representable as a fixnum.
14727 * fns.c (next_almost_prime): Don't return a multiple of 3 or 5.
14728 The previous code was bogus. For example, next_almost_prime (32)
14729 returned 39, which is undesirable as it is a multiple of 3; and
14730 next_almost_prime (24) returned 25, which is a multiple of 5 so
14731 why was the code bothering to check for multiples of 7?
14733 * bytecode.c (exec_byte_code): Use ptrdiff_t, not int, for vector length.
14735 * eval.c, doprnt.c (SIZE_MAX): Remove; inttypes.h defines this now.
14737 Variadic C functions now count arguments with ptrdiff_t.
14738 This partly undoes my 2011-03-30 change, which replaced int with size_t.
14739 Back then I didn't know that the Emacs coding style prefers signed int.
14740 Also, in the meantime I found a few more instances where arguments
14741 were being counted with int, which may truncate counts on 64-bit
14742 machines, or EMACS_INT, which may be unnecessarily wide.
14743 * lisp.h (struct Lisp_Subr.function.aMANY)
14744 (DEFUN_ARGS_MANY, internal_condition_case_n, safe_call):
14745 Arg counts are now ptrdiff_t, not size_t.
14746 All variadic functions and their callers changed accordingly.
14747 (struct gcpro.nvars): Now size_t, not size_t. All uses changed.
14748 * bytecode.c (exec_byte_code): Check maxdepth for overflow,
14749 to avoid potential buffer overrun. Don't assume arg counts fit in 'int'.
14750 * callint.c (Fcall_interactively): Check arg count for overflow,
14751 to avoid potential buffer overrun. Use signed char, not 'int',
14752 for 'varies' array, so that we needn't bother to check its size
14753 calculation for overflow.
14754 * editfns.c (Fformat): Use ptrdiff_t, not EMACS_INT, to count args.
14755 * eval.c (apply_lambda):
14756 * fns.c (Fmapconcat): Use XFASTINT, not XINT, to get args length.
14757 (struct textprop_rec.argnum): Now ptrdiff_t, not int. All uses changed.
14758 (mapconcat): Use ptrdiff_t, not int and EMACS_INT, to count args.
14760 * callint.c (Fcall_interactively): Don't use index var as event count.
14762 * vm-limit.c (check_memory_limits): Fix incorrect extern function decls.
14763 * mem-limits.h (SIZE): Remove; no longer used.
14765 * xterm.c (x_alloc_nearest_color_1): Prefer int to long when int works.
14767 Remove unnecessary casts.
14768 * xterm.c (x_term_init):
14769 * xfns.c (x_set_border_pixel):
14770 * widget.c (create_frame_gcs): Remove casts to unsigned long etc.
14771 These aren't needed now that we assume ANSI C.
14773 * sound.c (Fplay_sound_internal): Remove cast to unsigned long.
14774 It's more likely to cause problems (due to unsigned overflow)
14777 * dired.c (Ffile_attributes): Don't use 32-bit hack on 64-bit hosts.
14779 * unexelf.c (unexec): Don't assume BSS addr fits in unsigned.
14781 * xterm.c (handle_one_xevent): Omit unnecessary casts to unsigned.
14783 * keyboard.c (modify_event_symbol): Don't limit alist len to UINT_MAX.
14785 * lisp.h (CHAR_TABLE_SET): Omit now-redundant test.
14787 * lread.c (Fload): Don't compare a possibly-garbage time_t value.
14789 GLYPH_CODE_FACE returns EMACS_INT, not int.
14790 * dispextern.h (merge_faces):
14791 * xfaces.c (merge_faces):
14792 * xdisp.c (get_next_display_element, next_element_from_display_vector):
14793 Don't assume EMACS_INT fits in int.
14795 * character.h (CHAR_VALID_P): Remove unused parameter.
14796 * fontset.c, lisp.h, xdisp.c: All uses changed.
14798 * editfns.c (Ftranslate_region_internal): Omit redundant test.
14800 * fns.c (concat): Minor tuning based on overflow analysis.
14801 This doesn't fix any bugs. Use int to hold character, instead
14802 of constantly refetching from Emacs object. Use XFASTINT, not
14803 XINT, for value known to be a character. Don't bother comparing
14804 a single byte to 0400, as it's always less.
14806 * floatfns.c (Fexpt):
14807 * fileio.c (make_temp_name): Omit unnecessary cast to unsigned.
14809 * editfns.c (Ftranslate_region_internal): Use int, not EMACS_INT
14812 * doc.c (get_doc_string): Omit (unsigned)c that mishandled negatives.
14814 * data.c (Faset): If ARRAY is a string, check that NEWELT is a char.
14815 Without this fix, on a 64-bit host (aset S 0 4294967386) would
14816 incorrectly succeed when S was a string, because 4294967386 was
14817 truncated before it was used.
14819 * chartab.c (Fchar_table_range): Use CHARACTERP to check range.
14820 Otherwise, an out-of-range integer could cause undefined behavior
14823 * composite.c: Use int, not EMACS_INT, for characters.
14824 (fill_gstring_body, composition_compute_stop_pos): Use int, not
14825 EMACS_INT, for values that are known to be in character range.
14826 This doesn't fix any bugs but is the usual style inside Emacs and
14827 may generate better code on 32-bit machines.
14829 Make sure a 64-bit char is never passed to ENCODE_CHAR.
14830 This is for reasons similar to the recent CHAR_STRING fix.
14831 * charset.c (Fencode_char): Check that character arg is actually
14832 a character. Pass an int to ENCODE_CHAR.
14833 * charset.h (ENCODE_CHAR): Verify that the character argument is no
14834 wider than 'int', as a compile-time check to prevent future regressions
14837 * character.c (char_string): Remove unnecessary casts.
14839 Make sure a 64-bit char is never passed to CHAR_STRING.
14840 Otherwise, CHAR_STRING would do the wrong thing on a 64-bit platform,
14841 by silently ignoring the top 32 bits, allowing some values
14842 that were far too large to be valid characters.
14843 * character.h: Include <verify.h>.
14844 (CHAR_STRING, CHAR_STRING_ADVANCE): Verify that the character
14845 arguments are no wider than unsigned, as a compile-time check
14846 to prevent future regressions in this area.
14848 * editfns.c (Fchar_to_string, general_insert_function, Finsert_char)
14849 (Fsubst_char_in_region):
14851 * xdisp.c (decode_mode_spec_coding):
14852 Adjust to CHAR_STRING's new requirement.
14853 * editfns.c (Finsert_char, Fsubst_char_in_region):
14854 * fns.c (concat): Check that character args are actually
14855 characters. Without this test, these functions did the wrong
14856 thing with wildly out-of-range values on 64-bit hosts.
14858 Remove incorrect casts to 'unsigned' that lose info on 64-bit hosts.
14859 These casts should not be needed on 32-bit hosts, either.
14860 * keyboard.c (read_char):
14861 * lread.c (Fload): Remove casts to unsigned.
14863 * lisp.h (UNSIGNED_CMP): New macro.
14864 This fixes comparison bugs on 64-bit hosts.
14865 (ASCII_CHAR_P): Use it.
14866 * casefiddle.c (casify_object):
14867 * character.h (ASCII_BYTE_P, CHAR_VALID_P)
14868 (SINGLE_BYTE_CHAR_P, CHAR_STRING):
14869 * composite.h (COMPOSITION_ENCODE_RULE_VALID):
14870 * dispextern.h (FACE_FROM_ID):
14871 * keyboard.c (read_char): Use UNSIGNED_CMP.
14873 * xmenu.c (dialog_selection_callback) [!USE_GTK]: Cast to intptr_t,
14874 not to EMACS_INT, to avoid GCC warning.
14876 * xfns.c (x_set_scroll_bar_default_width): Remove unused 'int' locals.
14878 * buffer.h (PTR_BYTE_POS, BUF_PTR_BYTE_POS): Remove harmful cast.
14879 The cast incorrectly truncated 64-bit byte offsets to 32 bits, and
14880 isn't needed on 32-bit machines.
14882 * buffer.c (Fgenerate_new_buffer_name):
14883 Use EMACS_INT for count, not int.
14884 (advance_to_char_boundary): Return EMACS_INT, not int.
14886 * data.c (Qcompiled_function): Now static.
14888 * window.c (window_body_lines): Now static.
14890 * image.c (gif_load): Rename local to avoid shadowing.
14892 * lisp.h (SAFE_ALLOCA_LISP): Check for integer overflow.
14893 (struct Lisp_Save_Value): Use ptrdiff_t, not int, for 'integer' member.
14894 * alloc.c (make_save_value): Integer argument is now of type
14895 ptrdiff_t, not int.
14896 (mark_object): Use ptrdiff_t, not int.
14897 * lisp.h (pD): New macro.
14898 * print.c (print_object): Use it.
14900 * alloc.c: Use EMACS_INT, not int, to count objects.
14901 (total_conses, total_markers, total_symbols, total_vector_size)
14902 (total_free_conses, total_free_markers, total_free_symbols)
14903 (total_free_floats, total_floats, total_free_intervals)
14904 (total_intervals, total_strings, total_free_strings):
14905 Now EMACS_INT, not int. All uses changed.
14906 (Fgarbage_collect): Compute overall total using a double, so that
14907 integer overflow is less likely to be a problem. Check for overflow
14908 when converting back to an integer.
14909 (n_interval_blocks, n_string_blocks, n_float_blocks, n_cons_blocks)
14910 (n_vectors, n_symbol_blocks, n_marker_blocks): Remove.
14911 These were 'int' variables that could overflow on 64-bit hosts;
14912 they were never used, so remove them instead of repairing them.
14913 (nzombies, ngcs, max_live, max_zombies): Now EMACS_INT, not 'int'.
14914 (inhibit_garbage_collection): Set gc_cons_threshold to max value.
14915 Previously, this ceilinged at INT_MAX, but that doesn't work on
14917 (allocate_pseudovector): Don't use EMACS_INT when int would do.
14919 * alloc.c (Fmake_bool_vector): Don't assume vector size fits in int.
14920 (allocate_vectorlike): Check for ptrdiff_t overflow.
14921 (mark_vectorlike, mark_char_table, mark_object): Avoid EMACS_UINT
14922 when a (possibly-narrower) signed value would do just as well.
14923 We prefer using signed arithmetic, to avoid comparison confusion.
14925 * alloc.c: Catch some string size overflows that we were missing.
14926 (XMALLOC_OVERRUN_CHECK_SIZE) [!XMALLOC_OVERRUN_CHECK]: Define to 0,
14927 for convenience in STRING_BYTES_MAX.
14928 (STRING_BYTES_MAX): New macro, superseding the old one in lisp.h.
14929 The definition here is exact; the one in lisp.h was approximate.
14930 (allocate_string_data): Check for string overflow. This catches
14931 some instances we weren't catching before. Also, it catches
14932 size_t overflow on (unusual) hosts where SIZE_MAX <= min
14933 (PTRDIFF_MAX, MOST_POSITIVE_FIXNUM), e.g., when size_t is 32 bits
14934 and ptrdiff_t and EMACS_INT are both 64 bits.
14936 * character.c, coding.c, doprnt.c, editfns.c, eval.c:
14937 All uses of STRING_BYTES_MAX replaced by STRING_BYTES_BOUND.
14938 * lisp.h (STRING_BYTES_BOUND): Rename from STRING_BYTES_MAX.
14940 * character.c (string_escape_byte8): Fix nbytes/nchars typo.
14942 * alloc.c (Fmake_string): Check for out-of-range init.
14944 2011-06-15 Stefan Monnier <monnier@iro.umontreal.ca>
14946 * eval.c (Fdefvaralias): Also mark the target as variable-special-p.
14948 2011-06-14 Jan Djärv <jan.h.d@swipnet.se>
14950 * xfns.c (x_set_scroll_bar_default_width): Remove argument to
14951 xg_get_default_scrollbar_width.
14953 * gtkutil.c: Include emacsgtkfixed.h if HAVE_GTK3.
14954 (int_gtk_range_get_value): Move to the scroll bar part of the file.
14955 (style_changed_cb): Call update_theme_scrollbar_width and call
14956 x_set_scroll_bar_default_width and xg_frame_set_char_size for
14957 all frames (Bug#8505).
14958 (xg_create_frame_widgets): Call emacs_fixed_new if HAVE_GTK3 (Bug#8505).
14959 Call gtk_window_set_resizable if HAVE_GTK3.
14960 (x_wm_set_size_hint): Call emacs_fixed_set_min_size with min width
14961 and height if HAVE_GTK3 (Bug#8505).
14962 (scroll_bar_width_for_theme): New variable.
14963 (update_theme_scrollbar_width): New function.
14964 (xg_get_default_scrollbar_width): Move code to
14965 update_theme_scrollbar_width, just return scroll_bar_width_for_theme.
14966 (xg_initialize): Call update_theme_scrollbar_width.
14968 * gtkutil.h (xg_get_default_scrollbar_width): Remove argument.
14970 * emacsgtkfixed.c, emacsgtkfixed.h: New files.
14972 2011-06-12 Martin Rudalics <rudalics@gmx.at>
14974 * frame.c (make_frame): Call other_buffer_safely instead of
14977 * window.c (temp_output_buffer_show): Call display_buffer with
14978 second argument Vtemp_buffer_show_specifiers and reset latter
14979 immediately after the call.
14980 (Vtemp_buffer_show_specifiers): New variable.
14981 (auto_window_vscroll_p, next_screen_context_lines)
14982 (Vscroll_preserve_screen_position): Remove leading asterisks from
14985 2011-06-12 Paul Eggert <eggert@cs.ucla.edu>
14987 Fix minor problems found by GCC 4.6.0 static checking.
14988 * buffer.c (Qclone_number): Remove for now, as it's unused.
14989 (record_buffer, Funrecord_buffer): Rename local to avoid shadowing.
14990 (record_buffer): Remove unused local.
14991 * frame.c (other_visible_frames, frame_buffer_list): Now static.
14992 (set_frame_buffer_list): Remove; unused.
14993 * frame.h (other_visible_frames): Remove decl.
14994 * keyboard.h (menu_items_inuse): Declare only if USE_GTK || USE_MOTIF.
14995 * lisp.h (frame_buffer_list, set_frame_buffer_list): Remove decls.
14996 (add_gpm_wait_descriptor, delete_gpm_wait_descriptor): Declare only
14998 * menu.c (menu_items_inuse): Now static unless USE_GTK || USE_MOTIF.
14999 * process.c (add_gpm_wait_descriptor, delete_gpm_wait_descriptor):
15000 Define only if HAVE_GPM.
15001 * widget.c (EmacsFrameResize, emacsFrameClassRec): Now static.
15002 (update_hints_inhibit): Remove; never set. All uses removed.
15003 * widgetprv.h (emacsFrameClassRec): Remove decl.
15004 * window.c (delete_deletable_window): Now returns void, since it
15005 wasn't returning anything.
15006 (compare_window_configurations): Remove unused locals.
15007 * xfns.c (x_set_scroll_bar_default_width): Remove unused locals.
15008 * xmenu.c (x_menu_set_in_use): Define only if USE_GTK || USE_MOTIF.
15009 (dialog_selection_callback) [!USE_GTK]: Prefer intptr_t for integers
15010 the same widths as pointers. This follows up on the 2011-05-06 patch.
15011 * xterm.c (x_alloc_lighter_color_for_widget): Define only if USE_LUCID.
15012 * xterm.h: Likewise.
15013 (x_menu_set_in_use): Declare only if USE_GTK || USE_MOTIF.
15015 2011-06-12 Juanma Barranquero <lekktu@gmail.com>
15017 * makefile.w32-in: Update dependencies.
15018 (LISP_H): Add lib/intprops.h.
15020 2011-06-11 Chong Yidong <cyd@stupidchicken.com>
15022 * image.c (gif_load): Add animation frame delay to the metadata.
15023 (syms_of_image): Use DEFSYM. New symbol `delay'.
15025 2011-06-11 Martin Rudalics <rudalics@gmx.at>
15027 * window.c (delete_deletable_window): Re-add.
15028 (Fset_window_configuration): Rewrite to handle dead buffers and
15029 consequently deletable windows.
15030 (window_tree, Fwindow_tree): Remove. Supply functionality in
15032 (compare_window_configurations): Simplify code.
15034 2011-06-11 Andreas Schwab <schwab@linux-m68k.org>
15036 * image.c (imagemagick_load_image): Fix type mismatch.
15037 (Fimagemagick_types): Likewise.
15039 * window.h (replace_buffer_in_windows): Declare.
15041 2011-06-11 Martin Rudalics <rudalics@gmx.at>
15043 * buffer.c: New Lisp objects Qbuffer_list_update_hook and
15044 Qclone_number. Remove external declaration of Qdelete_window.
15045 (Fbuffer_list): Rewrite doc-string. Minor restructuring of
15047 (Fget_buffer_create, Fmake_indirect_buffer, Frename_buffer):
15048 Run Qbuffer_list_update_hook if allowed.
15049 (Fother_buffer): Rewrite doc-string. Major rewrite for new
15050 buffer list implementation.
15051 (other_buffer_safely): New function.
15052 (Fkill_buffer): Replace call to replace_buffer_in_all_windows by
15053 calls to replace_buffer_in_windows and
15054 replace_buffer_in_windows_safely. Run Qbuffer_list_update_hook
15056 (record_buffer): Inhibit quitting and rewrite using quittable
15057 functions. Run Qbuffer_list_update_hook if allowed.
15058 (Frecord_buffer, Funrecord_buffer): New functions.
15059 (switch_to_buffer_1, Fswitch_to_buffer): Remove.
15060 Move switch-to-buffer to window.el.
15061 (bury-buffer): Move to window.el.
15062 (Vbuffer_list_update_hook): New variable.
15064 * lisp.h (other_buffer_safely): Add prototype in buffer.c
15067 * window.h (resize_frame_windows): Move up in code.
15068 (Fwindow_frame): Remove EXFUN.
15069 (replace_buffer_in_all_windows): Remove prototype.
15070 (replace_buffer_in_windows_safely): Add prototype.
15072 * window.c: Declare Qdelete_window static again. Move down
15073 declaration of select_count.
15074 (Fnext_window, Fprevious_window): Rewrite doc-strings.
15075 (Fother_window): Move to window.el.
15076 (window_loop): Remove DELETE_BUFFER_WINDOWS and UNSHOW_BUFFER
15077 cases. Add REPLACE_BUFFER_IN_WINDOWS_SAFELY case.
15078 (Fdelete_windows_on, Freplace_buffer_in_windows): Move to
15080 (replace_buffer_in_windows): Implement by calling
15081 Qreplace_buffer_in_windows.
15082 (replace_buffer_in_all_windows): Remove with some functionality
15083 moved into replace_buffer_in_windows_safely.
15084 (replace_buffer_in_windows_safely): New function.
15085 (select_window_norecord, select_frame_norecord): Move in front
15086 of run_window_configuration_change_hook. Remove now obsolete
15088 (Fset_window_buffer): Rewrite doc-string.
15089 Call Qrecord_window_buffer.
15090 (keys_of_window): Move binding for other-window to window.el.
15092 2011-06-11 Chong Yidong <cyd@stupidchicken.com>
15094 * dispextern.h (struct image): Replace data member, whose int_val
15095 and ptr_val fields were not used by anything, with a single
15098 * image.c (Fimage_metadata, make_image, mark_image, tiff_load)
15099 (gif_clear_image, gif_load, imagemagick_load_image)
15100 (gs_clear_image, gs_load): Callers changed.
15102 2011-06-10 Paul Eggert <eggert@cs.ucla.edu>
15104 * buffer.h: Include <time.h>, for time_t.
15105 Needed to build on FreeBSD 8.2. Problem reported by Herbert J. Skuhra.
15107 Fix minor problems found by static checking.
15109 * image.c (PixelGetMagickColor): Declare if ImageMagick headers don't.
15111 Make identifiers static if they are not used in other modules.
15112 * data.c (Qcompiled_function, Qframe, Qvector):
15113 * image.c (QimageMagick, Qsvg):
15114 * minibuf.c (Qmetadata):
15115 * window.c (resize_window_check, resize_root_window): Now static.
15116 * window.h (resize_window_check, resize_root_window): Remove decls.
15118 * window.c (window_deletion_count, delete_deletable_window):
15120 (window_body_lines): Now static.
15121 (Fdelete_other_windows_internal): Mark vars as initialized.
15122 Make sure 'resize_failed' is initialized.
15123 (run_window_configuration_change_hook): Rename local to avoid shadowing.
15124 (resize_window_apply): Remove unused local.
15125 * window.h (delete_deletable_window): Remove decl.
15127 * image.c (gif_load, svg_load_image): Rename locals to avoid shadowing.
15128 (imagemagick_load_image): Fix pointer signedness problem by changing
15129 last arg from unsigned char * to char *. All uses changed.
15130 Also, fix a local for similar reasons.
15131 Remove unused locals. Remove locals to avoid shadowing.
15132 (fn_rsvg_handle_free): Remove; unused.
15133 (svg_load, svg_load_image): Fix pointer signedness problem.
15134 (imagemagick_load_image): Don't use garbage pointer image_wand.
15136 * ftfont.c (ftfont_get_metrics, ftfont_drive_otf): Remove unused locals.
15138 2011-06-10 Chong Yidong <cyd@stupidchicken.com>
15140 * image.c (gif_load): Fix omitted cast error introduced by
15143 2011-06-10 Martin Rudalics <rudalics@gmx.at>
15145 * window.h (resize_proportionally, orig_total_lines)
15146 (orig_top_line): Remove from window structure.
15147 (set_window_height, set_window_width, change_window_heights)
15148 (Fdelete_window): Remove prototypes.
15149 (resize_frame_windows): Remove duplicate declaration.
15151 2011-06-10 Eli Zaretskii <eliz@gnu.org>
15153 * window.h (resize_frame_windows, resize_window_check)
15154 (delete_deletable_window, resize_root_window)
15155 (resize_frame_windows): Declare prototypes.
15157 * window.c (resize_window_apply): Make definition be "static" to
15158 match the prototype.
15160 2011-06-10 Martin Rudalics <rudalics@gmx.at>
15162 * window.c: Remove declarations of Qwindow_size_fixed,
15163 window_min_size_1, window_min_size_2, window_min_size,
15164 size_window, window_fixed_size_p, enlarge_window, delete_window.
15165 Remove static from declaration of Qdelete_window, it's
15166 temporarily needed by Fbury_buffer.
15167 (replace_window): Don't assign orig_top_line and
15169 (Fdelete_window, delete_window): Remove. Window deletion is
15170 handled by window.el.
15171 (window_loop): Remove DELETE_OTHER_WINDOWS case.
15172 Replace Fdelete_window calls with calls to Qdelete_window.
15173 (Fdelete_other_windows): Remove. Deleting other windows is
15174 handled by window.el.
15175 (window_fixed_size_p): Remove. Fixed-sizeness of windows is
15176 handled in window.el.
15177 (window_min_size_2, window_min_size_1, window_min_size): Remove.
15178 Window minimum sizes are handled in window.el.
15179 (shrink_windows, size_window, set_window_height)
15180 (set_window_width, change_window_heights, window_height)
15181 (window_width, CURBEG, CURSIZE, enlarge_window)
15182 (adjust_window_trailing_edge, Fadjust_window_trailing_edge)
15183 (Fenlarge_window, Fshrink_window): Remove. Window resizing is
15184 handled in window.el.
15185 (make_dummy_parent): Rename to make_parent_window and give it a
15186 second argument horflag.
15187 (make_window): Don't set resize_proportionally any more.
15188 (Fsplit_window): Remove. Windows are split in window.el.
15189 (save_restore_action, save_restore_orig_size)
15190 (shrink_window_lowest_first, save_restore_orig_size): Remove.
15191 Resize mini windows in window.el.
15192 (grow_mini_window, shrink_mini_window): Implement by calling
15193 Qresize_root_window_vertically, resize_window_check and
15194 resize_window_apply.
15195 (saved_window, Fset_window_configuration, save_window_save):
15196 Do not handle orig_top_line, orig_total_lines, and
15197 resize_proportionally.
15198 (window_min_height, window_min_width): Move to window.el.
15199 (keys_of_window): Move bindings for delete-other-windows,
15200 split-window, delete-window and enlarge-window to window.el.
15202 * buffer.c: Temporarily extern Qdelete_window.
15203 (Fbury_buffer): Temporarily call Qdelete_window instead of
15204 Fdelete_window (Fbury_buffer will move to window.el soon).
15206 * frame.c (set_menu_bar_lines_1): Remove code handling
15207 orig_top_line and orig_total_lines.
15209 * dispnew.c (adjust_frame_glyphs_initially): Don't use
15210 set_window_height but set heights directly.
15211 (change_frame_size_1): Use resize_frame_windows.
15213 * xdisp.c (init_xdisp): Don't use set_window_height but set
15216 * xfns.c (x_set_menu_bar_lines, x_set_tool_bar_lines):
15217 Use resize_frame_windows instead of change_window_heights and run
15218 run_window_configuration_change_hook.
15220 * w32fns.c (x_set_tool_bar_lines): Use resize_frame_windows
15221 instead of change_window_heights and run
15222 run_window_configuration_change_hook.
15224 2011-06-09 Martin Rudalics <rudalics@gmx.at>
15226 * window.c (replace_window): Rename second argument REPLACEMENT to
15227 NEW. New third argument SETFLAG. Rewrite.
15228 (delete_window, make_dummy_parent): Call replace_window with
15230 (window_list_1): Move down in code.
15231 (run_window_configuration_change_hook): Move set_buffer part
15232 before select_frame_norecord part in order to unwind correctly.
15233 Rename count1 to count.
15234 (recombine_windows, delete_deletable_window, resize_root_window)
15235 (Fdelete_other_windows_internal)
15236 (Frun_window_configuration_change_hook, make_parent_window)
15237 (resize_window_check, resize_window_apply, Fresize_window_apply)
15238 (resize_frame_windows, Fsplit_window_internal)
15239 (Fdelete_window_internal, Fresize_mini_window_internal):
15241 (syms_of_window): New variables Vwindow_splits and Vwindow_nest.
15243 2011-06-08 Martin Rudalics <rudalics@gmx.at>
15245 * window.h (window): Add some new members to window structure -
15246 normal_lines, normal_cols, new_total, new_normal, clone_number,
15247 splits, nest, prev_buffers, next_buffers.
15248 (WINDOW_TOTAL_SIZE): Move here from window.c.
15249 (MIN_SAFE_WINDOW_WIDTH, MIN_SAFE_WINDOW_HEIGHT): Define here.
15251 * window.c (Fwindow_height, Fwindow_width, Fwindow_full_width_p):
15253 (make_dummy_parent): Set new members of windows structure.
15254 (make_window): Move down in code. Handle new members of window
15256 (Fwindow_clone_number, Fwindow_splits, Fset_window_splits)
15257 (Fwindow_nest, Fset_window_nest, Fwindow_new_total)
15258 (Fwindow_normal_size, Fwindow_new_normal, Fwindow_prev_buffers)
15259 (Fset_window_prev_buffers, Fwindow_next_buffers)
15260 (Fset_window_next_buffers, Fset_window_clone_number):
15262 (Fwindow_hscroll, Fwindow_at, Fwindow_point, Fwindow_start)
15263 (Fwindow_end, Fwindow_line_height, Fset_window_dedicated_p):
15265 (Fwindow_parameters, Fwindow_parameter, Fset_window_parameter):
15266 Argument WINDOW can be now internal window too.
15267 (Fwindow_use_time): Move up in code.
15268 (Fget_buffer_window): Rename argument FRAME to ALL-FRAMES.
15269 Rewrite doc-string.
15270 (Fset_window_configuration, saved_window)
15271 (Fcurrent_window_configuration, save_window_save): Handle new
15272 members of window structure.
15273 (WINDOW_TOTAL_SIZE, MIN_SAFE_WINDOW_WIDTH)
15274 (MIN_SAFE_WINDOW_HEIGHT): Move to window.h.
15275 (syms_of_window): New Lisp objects Qrecord_window_buffer,
15276 Qwindow_deletable_p, Qdelete_window, Qreplace_buffer_in_windows,
15277 Qget_mru_window, Qresize_root_window,
15278 Qresize_root_window_vertically, Qsafe, Qabove, Qbelow,
15279 Qauto_buffer_name; staticpro them.
15281 2011-06-07 Martin Rudalics <rudalics@gmx.at>
15283 * window.c (Fwindow_total_size, Fwindow_left_column)
15284 (Fwindow_top_line, window_body_lines, Fwindow_body_size)
15285 (Fwindow_list_1): New functions.
15286 (window_box_text_cols): Replace with window_body_cols.
15287 (Fwindow_width, Fscroll_left, Fscroll_right):
15288 Use window_body_cols instead of window_box_text_cols.
15289 (delete_window, Fset_window_configuration):
15290 Call delete_all_subwindows with window as argument.
15291 (delete_all_subwindows): Take a window as argument and not a
15292 structure. Rewrite.
15293 (window_loop): Remove handling of GET_LRU_WINDOW and
15294 GET_LARGEST_WINDOW.
15295 (Fget_lru_window, Fget_largest_window): Move to window.el.
15297 * window.h: Extern window_body_cols instead of
15298 window_box_text_cols. delete_all_subwindows now takes a
15299 Lisp_Object as argument.
15301 * indent.c (compute_motion, Fcompute_motion):
15302 Use window_body_cols instead of window_box_text_cols.
15304 * frame.c (delete_frame): Call delete_all_subwindows with root
15305 window as argument.
15307 2011-06-07 Daniel Colascione <dan.colascione@gmail.com>
15309 * fns.c (Fputhash): Document return value.
15311 2011-06-06 Chong Yidong <cyd@stupidchicken.com>
15313 * image.c (gif_load): Implement gif89a spec "no disposal" method.
15315 2011-06-06 Paul Eggert <eggert@cs.ucla.edu>
15317 Cons<->int and similar integer overflow fixes (Bug#8794).
15319 Check for overflow when converting integer to cons and back.
15320 * charset.c (Fdefine_charset_internal, Fdecode_char):
15321 Use cons_to_unsigned to catch overflow.
15322 (Fencode_char): Use INTEGER_TO_CONS.
15323 * composite.h (LGLYPH_CODE): Use cons_to_unsigned.
15324 (LGLYPH_SET_CODE): Use INTEGER_TO_CONS.
15325 * data.c (long_to_cons, cons_to_long): Remove.
15326 (cons_to_unsigned, cons_to_signed): New functions.
15327 These signal an error for invalid or out-of-range values.
15328 * dired.c (Ffile_attributes): Use INTEGER_TO_CONS.
15329 * fileio.c (Fset_visited_file_modtime): Use CONS_TO_INTEGER.
15330 * font.c (Ffont_variation_glyphs):
15331 * fontset.c (Finternal_char_font): Use INTEGER_TO_CONS.
15332 * lisp.h: Include <intprops.h>.
15333 (INTEGER_TO_CONS, CONS_TO_INTEGER): New macros.
15334 (cons_to_signed, cons_to_unsigned): New decls.
15335 (long_to_cons, cons_to_long): Remove decls.
15336 * undo.c (record_first_change): Use INTEGER_TO_CONS.
15337 (Fprimitive_undo): Use CONS_TO_INTEGER.
15338 * xfns.c (Fx_window_property): Likewise.
15339 * xselect.c: Include <limits.h>.
15340 (x_own_selection, selection_data_to_lisp_data):
15341 Use INTEGER_TO_CONS.
15342 (x_handle_selection_request, x_handle_selection_clear)
15343 (x_get_foreign_selection, Fx_disown_selection_internal)
15344 (Fx_get_atom_name, x_send_client_event): Use CONS_TO_INTEGER.
15345 (lisp_data_to_selection_data): Use cons_to_unsigned.
15346 (x_fill_property_data): Use cons_to_signed.
15347 Report values out of range.
15349 Check for buffer and string overflow more precisely.
15350 * buffer.h (BUF_BYTES_MAX): New macro.
15351 * lisp.h (STRING_BYTES_MAX): New macro.
15352 * alloc.c (Fmake_string):
15353 * character.c (string_escape_byte8):
15354 * coding.c (coding_alloc_by_realloc):
15355 * doprnt.c (doprnt):
15356 * editfns.c (Fformat):
15358 Use STRING_BYTES_MAX, not MOST_POSITIVE_FIXNUM,
15359 since they may not be the same number.
15360 * editfns.c (Finsert_char):
15361 * fileio.c (Finsert_file_contents):
15362 Likewise for BUF_BYTES_MAX.
15364 * image.c: Use ptrdiff_t, not int, for sizes.
15365 (slurp_file): Switch from int to ptrdiff_t.
15367 (slurp_file): Check that file size fits in both size_t (for
15368 malloc) and ptrdiff_t (for sanity and safety).
15370 * fileio.c (Fverify_visited_file_modtime): Avoid time overflow
15371 if b->modtime has its maximal value.
15373 * dired.c (Ffile_attributes): Don't assume EMACS_INT has >32 bits.
15375 Don't assume time_t can fit into int.
15376 * buffer.h (struct buffer.modtime): Now time_t, not int.
15377 * fileio.c (Fvisited_file_modtime): No need for time_t cast now.
15378 * undo.c (Fprimitive_undo): Use time_t, not int, for time_t value.
15380 Minor fixes for signed vs unsigned integers.
15381 * character.h (MAYBE_UNIFY_CHAR):
15382 * charset.c (maybe_unify_char):
15383 * keyboard.c (read_char, reorder_modifiers):
15384 XINT -> XFASTINT, since the integer must be nonnegative.
15385 * ftfont.c (ftfont_spec_pattern):
15386 * keymap.c (access_keymap, silly_event_symbol_error):
15387 XUINT -> XFASTINT, since the integer must be nonnegative.
15388 (Fsingle_key_description, preferred_sequence_p): XUINT -> XINT,
15389 since it makes no difference and we prefer signed.
15390 * keyboard.c (record_char): Use XUINT when all the neighbors do.
15391 (access_keymap): NATNUMP -> INTEGERP, since the integer must be
15394 2011-06-06 Stefan Monnier <monnier@iro.umontreal.ca>
15396 * window.h (Fwindow_frame): Declare.
15398 2011-06-06 Paul Eggert <eggert@cs.ucla.edu>
15400 * alloc.c: Simplify handling of large-request failures (Bug#8800).
15401 (SPARE_MEMORY): Always define.
15402 (LARGE_REQUEST): Remove.
15403 (memory_full): Use SPARE_MEMORY rather than LARGE_REQUEST.
15405 2011-06-06 Martin Rudalics <rudalics@gmx.at>
15407 * lisp.h: Move EXFUNS for Fframe_root_window,
15408 Fframe_first_window and Fset_frame_selected_window to window.h.
15410 * window.h: Move EXFUNS for Fframe_root_window,
15411 Fframe_first_window and Fset_frame_selected_window here from
15414 * frame.c (Fwindow_frame, Fframe_first_window)
15415 (Fframe_root_window, Fframe_selected_window)
15416 (Fset_frame_selected_window): Move to window.c.
15417 (Factive_minibuffer_window): Move to minibuf.c.
15418 (Fother_visible_frames_p): New function.
15420 * minibuf.c (Factive_minibuffer_window): Move here from frame.c.
15422 * window.c (decode_window, decode_any_window): Move up in code.
15423 (Fwindowp, Fwindow_live_p): Rewrite doc-strings.
15424 (inhibit_frame_unsplittable): Remove unused variable.
15425 (Fwindow_buffer): Move up and rewrite doc-string.
15426 (Fwindow_parent, Fwindow_vchild, Fwindow_hchild, Fwindow_next)
15427 (Fwindow_prev): New functions.
15428 (Fwindow_frame): Move here from frame.c. Accept any window as
15430 (Fframe_root_window, Fframe_first_window)
15431 (Fframe_selected_window): Move here from frame.c. Accept frame
15432 or arbitrary window as argument. Update doc-strings.
15433 (Fminibuffer_window): Move up in code.
15434 (Fwindow_minibuffer_p): Move up in code and simplify.
15435 (Fset_frame_selected_window): Move here from frame.c.
15437 (Fselected_window, select_window, Fselect_window): Move up in
15438 code. Minor doc-string fixes.
15440 2011-06-06 Paul Eggert <eggert@cs.ucla.edu>
15442 * alloc.c (memory_full) [SYSTEM_MALLOC]: Port to MacOS (Bug#8800).
15443 Do not assume that spare memory exists; that assumption is valid
15444 only if SYSTEM_MALLOC.
15445 (LARGE_REQUEST): New macro, so that the issue of large requests
15446 is separated from the issue of spare memory.
15448 2011-06-05 Andreas Schwab <schwab@linux-m68k.org>
15450 * editfns.c (Fformat): Correctly handle zero flag with hexadecimal
15453 * gtkutil.c (xg_get_default_scrollbar_width): Avoid warning.
15455 * xfns.c (x_set_scroll_bar_default_width): Move declarations
15458 2011-06-05 Jan Djärv <jan.h.d@swipnet.se>
15460 * gtkutil.c (xg_get_default_scrollbar_width): New function.
15462 * gtkutil.h: Declare xg_get_default_scrollbar_width.
15464 * xfns.c (x_set_scroll_bar_default_width): If USE_GTK, get
15465 min width by calling x_set_scroll_bar_default_width (Bug#8505).
15467 2011-06-05 Juanma Barranquero <lekktu@gmail.com>
15469 * xdisp.c (single_display_spec_intangible_p): Remove declaration.
15471 2011-06-04 Chong Yidong <cyd@stupidchicken.com>
15473 * xselect.c (x_clipboard_manager_save): Remove redundant arg.
15474 (x_clipboard_manager_save): Add return value.
15475 (x_clipboard_manager_error_1, x_clipboard_manager_error_2):
15476 New error handlers.
15477 (x_clipboard_manager_save_frame, x_clipboard_manager_save_all):
15478 Obey Vx_select_enable_clipboard_manager. Catch errors in
15479 x_clipboard_manager_save (Bug#8779).
15480 (Vx_select_enable_clipboard_manager): New variable.
15481 (x_get_foreign_selection): Reduce scope of x_catch_errors (Bug#8790).
15483 2011-06-04 Dan Nicolaescu <dann@ics.uci.edu>
15485 * emacs.c (main): Warn when starting a GTK emacs in daemon mode.
15487 2011-06-04 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
15489 * fringe.c (update_window_fringes): Don't update overlay arrow bitmap
15490 in the current matrix if keep_current_p is non-zero.
15492 2011-06-04 Eli Zaretskii <eliz@gnu.org>
15494 * bidi.c (bidi_level_of_next_char): Fix last change.
15496 2011-06-03 Eli Zaretskii <eliz@gnu.org>
15498 Support bidi reordering of text covered by display properties.
15500 * bidi.c (bidi_copy_it): Use offsetof instead of emulating it.
15501 (bidi_fetch_char, bidi_fetch_char_advance): New functions.
15502 (bidi_cache_search, bidi_cache_iterator_state)
15503 (bidi_paragraph_init, bidi_resolve_explicit, bidi_resolve_weak)
15504 (bidi_level_of_next_char, bidi_move_to_visually_next):
15505 Support character positions inside a run of characters covered by a
15507 (bidi_paragraph_init, bidi_resolve_explicit_1)
15508 (bidi_level_of_next_char): Call bidi_fetch_char and
15509 bidi_fetch_char_advance instead of FETCH_CHAR and
15510 FETCH_CHAR_ADVANCE.
15511 (bidi_init_it): Initialize new members.
15512 (LRE_CHAR, RLE_CHAR, PDF_CHAR, LRO_CHAR, RLO_CHAR): Remove macro
15514 (bidi_explicit_dir_char): Lookup character type in bidi_type_table,
15515 instead of using explicit *_CHAR codes.
15516 (bidi_resolve_explicit, bidi_resolve_weak):
15517 Use FETCH_MULTIBYTE_CHAR instead of FETCH_CHAR, as reordering of
15518 bidirectional text is supported only in multibyte buffers.
15519 (bidi_init_it): Accept additional argument FRAME_WINDOW_P and use
15520 it to initialize the frame_window_p member of struct bidi_it.
15521 (bidi_cache_iterator_state, bidi_resolve_explicit_1)
15522 (bidi_resolve_explicit, bidi_resolve_weak)
15523 (bidi_level_of_next_char, bidi_move_to_visually_next): Abort if
15524 bidi_it->nchars is non-positive.
15525 (bidi_level_of_next_char): Don't try to lookup the cache for the
15526 next/previous character if nothing is cached there yet, or if we
15527 were just reseat()'ed to a new position.
15529 * xdisp.c (set_cursor_from_row): Set start and stop points
15530 according to the row's direction when priming the loop that looks
15531 for the glyph on which to display cursor.
15532 (single_display_spec_intangible_p): Function deleted.
15533 (display_prop_intangible_p): Reimplement to call
15534 handle_display_spec instead of single_display_spec_intangible_p.
15535 Accept 3 additional arguments needed by handle_display_spec.
15536 This fixes incorrect cursor motion across display property with complex
15537 values: lists, `(when COND...)' forms, etc.
15538 (single_display_spec_string_p): Support property values that are
15539 lists with the argument STRING its top-level element.
15540 (display_prop_string_p): Fix the condition for processing a
15541 property that is a list to be consistent with handle_display_spec.
15542 (handle_display_spec): New function, refactored from the
15543 last portion of handle_display_prop.
15544 (compute_display_string_pos): Accept additional argument
15545 FRAME_WINDOW_P. Call handle_display_spec to determine whether the
15546 value of a `display' property is a "replacing spec".
15547 (handle_single_display_spec): Accept 2 additional arguments BUFPOS
15548 and FRAME_WINDOW_P. If IT is NULL, don't set up the iterator from
15549 the display property, but just return a value indicating whether
15550 the display property will replace the characters it covers.
15551 (Fcurrent_bidi_paragraph_direction): Initialize the nchars and
15552 frame_window_p members of struct bidi_it.
15553 (compute_display_string_pos, compute_display_string_end):
15555 (push_it): Accept second argument POSITION, where pop_it should
15556 jump to continue iteration.
15557 (reseat_1): Initialize bidi_it.disp_pos.
15559 * keyboard.c (adjust_point_for_property): Adjust the call to
15560 display_prop_intangible_p to its new signature.
15562 * dispextern.h (struct bidi_it): New member frame_window_p.
15563 (bidi_init_it): Update prototypes.
15564 (display_prop_intangible_p): Update prototype.
15565 (compute_display_string_pos, compute_display_string_end):
15566 Declare prototypes.
15567 (struct bidi_it): New members nchars and disp_pos. ch_len is now
15570 2011-06-02 Paul Eggert <eggert@cs.ucla.edu>
15572 Malloc failure behavior now depends on size of allocation.
15573 * alloc.c (buffer_memory_full, memory_full): New arg NBYTES.
15574 * lisp.h: Change signatures accordingly.
15575 * alloc.c, buffer.c, editfns.c, menu.c, minibuf.c, xterm.c:
15576 All callers changed. (Bug#8762)
15578 * gnutls.c: Use Emacs's memory allocators.
15579 Without this change, the gnutls library would invoke malloc etc.
15580 directly, which causes problems on non-SYNC_INPUT hosts, and which
15581 runs afoul of improving memory_full behavior. (Bug#8761)
15582 (fn_gnutls_global_set_mem_functions): New macro or function pointer.
15583 (emacs_gnutls_global_init): Use it to specify xmalloc, xrealloc,
15584 xfree instead of the default malloc, realloc, free.
15585 (Fgnutls_boot): No need to check for memory allocation failure,
15586 since xmalloc does that for us.
15588 Remove arbitrary limit of 2**31 entries in hash tables. (Bug#8771)
15589 * category.c (hash_get_category_set):
15590 * ccl.c (ccl_driver):
15591 * charset.c (Fdefine_charset_internal):
15592 * charset.h (struct charset.hash_index):
15593 * composite.c (get_composition_id, gstring_lookup_cache)
15594 (composition_gstring_put_cache):
15595 * composite.h (struct composition.hash_index):
15596 * dispextern.h (struct image.hash):
15597 * fns.c (next_almost_prime, larger_vector, cmpfn_eql)
15598 (cmpfn_equal, cmpfn_user_defined, hashfn_eq, hashfn_eql)
15599 (hashfn_equal, hashfn_user_defined, make_hash_table)
15600 (maybe_resize_hash_table, hash_lookup, hash_put)
15601 (hash_remove_from_table, hash_clear, sweep_weak_table, SXHASH_COMBINE)
15602 (sxhash_string, sxhash_list, sxhash_vector, sxhash_bool_vector)
15603 (Fsxhash, Fgethash, Fputhash, Fmaphash):
15604 * image.c (make_image, search_image_cache, lookup_image)
15605 (xpm_put_color_table_h):
15606 * lisp.h (struct Lisp_Hash_Table):
15607 * minibuf.c (Ftry_completion, Fall_completions, Ftest_completion):
15608 * print.c (print): Use 'EMACS_UINT' and 'EMACS_INT'
15609 for hashes and hash indexes, instead of 'unsigned' and 'int'.
15610 * alloc.c (allocate_vectorlike):
15611 Check for overflow in vector size calculations.
15612 * ccl.c (ccl_driver):
15613 Check for overflow when converting EMACS_INT to int.
15614 * fns.c, image.c: Remove unnecessary static decls that would otherwise
15615 need to be updated by these changes.
15616 * fns.c (make_hash_table, maybe_resize_hash_table):
15617 Check for integer overflow with large hash tables.
15618 (make_hash_table, maybe_resize_hash_table, Fmake_hash_table):
15619 Prefer the faster XFLOAT_DATA to XFLOATINT where either will do.
15620 (SXHASH_REDUCE): New macro.
15621 (sxhash_string, sxhash_list, sxhash_vector, sxhash_bool_vector):
15622 Use it instead of discarding useful hash info with large hash values.
15623 (sxhash_float): New function.
15624 (sxhash): Use it. No more need for "& INTMASK" due to above changes.
15625 * lisp.h (FIXNUM_BITS): New macro, useful for SXHASH_REDUCE etc.
15626 (MOST_NEGATIVE_FIXNUM, MOST_POSITIVE_FIXNUM, INTMASK):
15627 Rewrite to use FIXNUM_BITS, as this simplifies things.
15628 (next_almost_prime, larger_vector, sxhash, hash_lookup, hash_put):
15629 Adjust signatures to match updated version of code.
15630 (consing_since_gc): Now EMACS_INT, since a single hash table can
15631 use more than INT_MAX bytes.
15633 2011-06-01 Dan Nicolaescu <dann@ics.uci.edu>
15635 Make it possible to build with GCC-4.6+ -O2 -flto.
15637 * emacs.c (__malloc_initialize_hook): Mark as EXTERNALLY_VISIBLE.
15639 2011-06-01 Stefan Monnier <monnier@iro.umontreal.ca>
15641 * minibuf.c (get_minibuffer, read_minibuf_unwind):
15642 Call minibuffer-inactive-mode.
15644 2011-05-31 Juanma Barranquero <lekktu@gmail.com>
15646 * makefile.w32-in ($(BLD)/data.$(O), $(BLD)/editfns.$(O)):
15647 Update dependencies.
15649 2011-05-31 Dan Nicolaescu <dann@ics.uci.edu>
15651 * data.c (init_data): Remove code for UTS, this system is not
15654 2011-05-31 Dan Nicolaescu <dann@ics.uci.edu>
15656 Don't force ./temacs to start in terminal mode.
15658 * frame.c (make_initial_frame): Initialize faces in all cases, not
15659 only when CANNOT_DUMP is defined.
15660 * dispnew.c (init_display): Remove CANNOT_DUMP condition.
15662 2011-05-31 Dan Nicolaescu <dann@ics.uci.edu>
15664 * dispnew.c (add_window_display_history): Use const for the string
15665 pointer. Remove declaration, not needed.
15667 2011-05-31 Paul Eggert <eggert@cs.ucla.edu>
15669 Use 'inline', not 'INLINE'.
15670 <http://lists.gnu.org/archive/html/emacs-devel/2011-05/msg00914.html>
15671 * alloc.c, fontset.c (INLINE): Remove.
15672 * alloc.c, bidi.c, charset.c, coding.c, dispnew.c, fns.c, image.c:
15673 * intervals.c, keyboard.c, process.c, syntax.c, textprop.c, w32term.c:
15674 * xdisp.c, xfaces.c, xterm.c: Replace all uses of INLINE with inline.
15675 * gmalloc.c (register_heapinfo): Use inline unconditionally.
15676 * lisp.h (LISP_MAKE_RVALUE): Use inline, not __inline__.
15678 2011-05-31 Dan Nicolaescu <dann@ics.uci.edu>
15680 Make it possible to run ./temacs.
15682 * callproc.c (set_initial_environment): Remove CANNOT_DUMP code,
15683 syms_of_callproc does the same thing. Remove test for
15684 "initialized", do it in the caller.
15685 * emacs.c (main): Avoid calling set_initial_environment when dumping.
15687 2011-05-31 Stefan Monnier <monnier@iro.umontreal.ca>
15689 * minibuf.c (Finternal_complete_buffer): Return `category' metadata.
15690 (read_minibuf): Use get_minibuffer.
15691 (syms_of_minibuf): Use DEFSYM.
15692 (Qmetadata): New var.
15693 * data.c (Qbuffer): Don't make it static.
15694 (syms_of_data): Use DEFSYM.
15696 2011-05-31 Paul Eggert <eggert@cs.ucla.edu>
15698 * ccl.c (CCL_CODE_RANGE): Allow negative numbers. (Bug#8751)
15699 (CCL_CODE_MIN): New macro.
15701 2011-05-30 Paul Eggert <eggert@cs.ucla.edu>
15703 * alloc.c (lisp_align_malloc): Omit unnecessary val==NULL tests.
15705 * eval.c (Qdebug): Now static.
15706 * lisp.h (Qdebug): Remove decl. This reverts a part of the
15707 2011-04-26T11:26:05Z!dan.colascione@gmail.com that inadvertently undid part of
15708 2011-04-14T06:48:41Z!eggert@cs.ucla.edu.
15710 2011-05-29 Chong Yidong <cyd@stupidchicken.com>
15712 * image.c: Various fixes to ImageMagick code comments.
15713 (Fimagemagick_types): Doc fix.
15715 2011-05-29 Paul Eggert <eggert@cs.ucla.edu>
15717 Minor fixes prompted by GCC 4.6.0 warnings.
15719 * xselect.c (converted_selections, conversion_fail_tag): Now static.
15721 * emacs.c [HAVE_X_WINDOWS]: Include "xterm.h".
15722 (x_clipboard_manager_save_all): Move extern decl to ...
15723 * xterm.h: ... here, so that it can be checked for consistency.
15725 2011-05-29 Chong Yidong <cyd@stupidchicken.com>
15727 * xselect.c (x_clipboard_manager_save_frame)
15728 (x_clipboard_manager_save_all): New functions.
15729 (Fx_clipboard_manager_save): Lisp function deleted.
15731 * emacs.c (Fkill_emacs): Call x_clipboard_manager_save_all.
15732 * frame.c (delete_frame): Call x_clipboard_manager_save_frame.
15734 * xterm.h: Update prototype.
15736 2011-05-28 William Xu <william.xwl@gmail.com>
15738 * nsterm.m (ns_term_shutdown): Synchronize user defaults before
15739 exiting (Bug#8239).
15741 2011-05-28 Jim Meyering <meyering@redhat.com>
15743 Avoid a sign-extension bug in crypto_hash_function.
15744 * fns.c (to_uchar): Define.
15745 (crypto_hash_function): Use it to convert some newly-signed
15746 variables to unsigned, to avoid sign-extension bugs. For example,
15747 without this change, (md5 "truc") would evaluate to
15748 45723a2aff78ff4fff7fff1114760e62 rather than the expected
15749 45723a2af3788c4ff17f8d1114760e62. Reported by Antoine Levitt in
15750 https://lists.gnu.org/archive/html/emacs-devel/2011-05/msg00883.html.
15752 2011-05-27 Paul Eggert <eggert@cs.ucla.edu>
15754 Integer overflow fixes.
15756 * dbusbind.c: Serial number integer overflow fixes.
15757 (CHECK_DBUS_SERIAL_GET_SERIAL): New macro.
15758 (Fdbus_call_method_asynchronously, xd_read_message_1): Use a float
15759 to hold a serial number that is too large for a fixnum.
15760 (Fdbus_method_return_internal, Fdbus_method_error_internal):
15761 Check for serial numbers out of range. Decode any serial number
15762 that was so large that it became a float. (Bug#8722)
15764 * dbusbind.c: Use XFASTINT rather than XUINT, and check for nonneg.
15765 (Fdbus_call_method, Fdbus_call_method_asynchronously):
15766 Use XFASTINT rather than XUINT when numbers are nonnegative.
15767 (xd_append_arg, Fdbus_method_return_internal):
15768 (Fdbus_method_error_internal): Likewise. Also, for unsigned
15769 arguments, check that Lisp number is nonnegative, rather than
15770 silently wrapping negative numbers around. (Bug#8722)
15771 (xd_read_message_1): Don't assume dbus_uint32_t can fit in int.
15774 * data.c (arith_driver, Flsh): Avoid unnecessary casts to EMACS_UINT.
15776 * ccl.c (ccl_driver): Redo slightly to avoid the need for 'unsigned'.
15778 ccl: Add integer overflow checks.
15779 * ccl.c (CCL_CODE_MAX, GET_CCL_RANGE, GET_CCL_CODE, GET_CCL_INT):
15780 (IN_INT_RANGE): New macros.
15781 (ccl_driver): Use them to check for integer overflow when
15782 decoding a CCL program. Many of the new checks are whether XINT (x)
15783 fits in int; it doesn't always, on 64-bit hosts. The new version
15784 doesn't catch all possible integer overflows, but it's an
15785 improvement. (Bug#8719)
15787 * alloc.c (make_event_array): Use XINT, not XUINT.
15788 There's no need for unsigned here.
15790 * mem-limits.h (EXCEEDS_LISP_PTR) [!USE_LSB_TAG]: EMACS_UINT -> uintptr_t
15791 This follows up to the 2011-05-06 change that substituted uintptr_t
15792 for EMACS_INT. This case wasn't caught back then.
15794 Rework Fformat to avoid integer overflow issues.
15795 * editfns.c: Include <float.h> unconditionally, as it's everywhere
15796 now (part of C89). Include <verify.h>.
15797 (MAX_10_EXP, CONVERTED_BYTE_SIZE): Remove; no longer needed.
15798 (pWIDE, pWIDElen, signed_wide, unsigned_wide): New defns.
15799 (Fformat): Avoid the prepass trying to compute sizes; it was only
15800 approximate and thus did not catch overflow reliably. Instead, walk
15801 through the format just once, formatting and computing sizes as we go,
15802 checking for integer overflow at every step, and allocating a larger
15803 buffer as needed. Keep track separately whether the format is
15804 multibyte. Keep only the most-recently calculated precision, rather
15805 than them all. Record whether each argument has been converted to
15806 string. Use EMACS_INT, not int, for byte and char and arg counts.
15807 Support field widths and precisions larger than INT_MAX. Avoid
15808 sprintf's undefined behavior with conversion specifications such as %#d
15809 and %.0c. Fix bug with strchr succeeding on '\0' when looking for
15810 flags. Fix bug with (format "%c" 256.0). Avoid integer overflow when
15811 formatting out-of-range floating point numbers with int
15812 formats. (Bug#8668)
15814 * lisp.h (FIXNUM_OVERFLOW_P): Work even if arg is a NaN.
15816 * data.c: Avoid integer truncation in expressions involving floats.
15817 * data.c: Include <intprops.h>.
15818 (arith_driver): When there's an integer overflow in an expression
15819 involving floating point, convert the integers to floating point
15820 so that the resulting value does not suffer from catastrophic
15821 integer truncation. For example, on a 64-bit host (* 4
15822 most-negative-fixnum 0.5) should yield about -4.6e+18, not zero.
15823 Do not rely on undefined behavior after integer overflow.
15825 merge count_size_as_multibyte, parse_str_to_multibyte
15826 * character.c, character.h (count_size_as_multibyte):
15827 Rename from parse_str_to_multibyte; all uses changed.
15828 Check for integer overflow.
15829 * insdel.c, lisp.h (count_size_as_multibyte): Remove,
15830 since it's now a duplicate of the other. This is more of
15831 a character than a buffer op, so better that it's in character.c.
15832 * fns.c, print.c: Adjust to above changes.
15834 2011-05-27 Stefan Monnier <monnier@iro.umontreal.ca>
15836 * xselect.c (x_convert_selection): Yet another int/Lisp_Object mixup.
15838 2011-05-27 Paul Eggert <eggert@cs.ucla.edu>
15840 * xselect.c: Fix minor problems prompted by GCC 4.6.0 warnings.
15841 (x_handle_selection_request, frame_for_x_selection): Remove unused vars.
15842 (x_clipboard_manager_save): Now static.
15843 (Fx_clipboard_manager_save): Rename local to avoid shadowing.
15845 * fns.c: Fix minor problems prompted by GCC 4.6.0 warnings.
15846 (crypto_hash_function): Now static.
15847 Fix pointer signedness problems. Avoid unnecessary initializations.
15849 2011-05-27 Chong Yidong <cyd@stupidchicken.com>
15851 * termhooks.h (Vselection_alist): Make it terminal-local.
15853 * terminal.c (create_terminal): Initialize it.
15855 * xselect.c: Support for clipboard managers.
15856 (Vselection_alist): Move to termhooks.h as terminal-local var.
15857 (LOCAL_SELECTION): New macro.
15858 (x_atom_to_symbol): Handle x_display_info_for_display fail case.
15859 (symbol_to_x_atom): Remove gratuitous arg.
15860 (x_handle_selection_request, lisp_data_to_selection_data)
15861 (x_get_foreign_selection, Fx_register_dnd_atom): Callers changed.
15862 (x_own_selection, x_get_local_selection, x_convert_selection):
15863 New arg, specifying work frame. Use terminal-local Vselection_alist.
15864 (some_frame_on_display): Delete unused function.
15865 (Fx_own_selection_internal, Fx_get_selection_internal)
15866 (Fx_disown_selection_internal, Fx_selection_owner_p)
15867 (Fx_selection_exists_p): New optional frame arg.
15868 (frame_for_x_selection, Fx_clipboard_manager_save): New functions.
15869 (x_handle_selection_clear): Don't treat other terminals with the
15870 same keyboard specially. Use the terminal-local Vselection_alist.
15871 (x_clear_frame_selections): Use Frun_hook_with_args.
15873 * xterm.c (x_term_init): Intern ATOM and CLIPBOARD_MANAGER atoms.
15875 * xterm.h: Add support for those atoms.
15877 2011-05-26 Chong Yidong <cyd@stupidchicken.com>
15879 * xselect.c: ICCCM-compliant handling of MULTIPLE targets.
15880 (converted_selections, conversion_fail_tag): New global variables.
15881 (x_selection_request_lisp_error): Free the above.
15882 (x_get_local_selection): Remove unnecessary code.
15883 (x_reply_selection_request): Args changed; handle arbitrary array
15884 of converted selections stored in converted_selections.
15885 Separate the XChangeProperty and SelectionNotify steps.
15886 (x_handle_selection_request): Rewrite to handle MULTIPLE target.
15887 (x_convert_selection): New function.
15888 (x_handle_selection_event): Simplify.
15889 (x_get_foreign_selection): Don't ignore incoming requests while
15890 waiting for an answer; this will fail when we implement
15891 SAVE_TARGETS, and seems unnecessary anyway.
15892 (selection_data_to_lisp_data): Recognize ATOM_PAIR type.
15893 (Vx_sent_selection_functions): Doc fix.
15895 2011-05-26 Leo Liu <sdl.web@gmail.com>
15897 * editfns.c (Ftranspose_regions): Allow empty regions. (Bug#8699)
15899 2011-05-25 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
15901 * dispextern.h (struct glyph_row): New member fringe_bitmap_periodic_p.
15903 * dispnew.c (shift_glyph_matrix, scrolling_window): Mark scrolled row
15904 for fringe update if it has periodic bitmap.
15905 (row_equal_p): Also compare left_fringe_offset, right_fringe_offset,
15906 and fringe_bitmap_periodic_p.
15908 * fringe.c (get_fringe_bitmap_data): New function.
15909 (draw_fringe_bitmap_1, update_window_fringes): Use it.
15910 (update_window_fringes): Record periodicity of fringe bitmap in glyph
15911 row. Mark glyph row for fringe update if periodicity changed.
15913 * xdisp.c (try_window_reusing_current_matrix): Don't mark scrolled row
15914 for fringe update unless it has periodic bitmap.
15916 2011-05-25 Kenichi Handa <handa@m17n.org>
15918 * xdisp.c (get_next_display_element): Set correct it->face_id for
15919 a static composition.
15921 2011-05-24 Leo Liu <sdl.web@gmail.com>
15924 * makefile.w32-in ($(BLD)/fns.$(O)): Include sha1.h.
15926 * fns.c (crypto_hash_function, Fsha1): New function.
15927 (Fmd5): Use crypto_hash_function.
15928 (syms_of_fns): Add Ssha1.
15930 2011-05-22 Paul Eggert <eggert@cs.ucla.edu>
15932 * gnutls.c: Remove unused macros.
15933 (fn_gnutls_transport_set_lowat, fn_gnutls_transport_set_pull_function):
15934 (fn_gnutls_transport_set_push_function) [!WINDOWSNT]:
15935 Remove macros that are defined and never used.
15936 Caught by gcc -Wunused-macros (GCC 4.6.0, Fedora 14).
15938 2011-05-22 Chong Yidong <cyd@stupidchicken.com>
15940 * xselect.c (syms_of_xselect): Remove unused symbol SAVE_TARGETS.
15941 (Fx_get_selection_internal): Minor cleanup.
15942 (Fx_own_selection_internal): Rename arguments for consistency with
15945 2011-05-22 Paul Eggert <eggert@cs.ucla.edu>
15947 * xselect.c (QSAVE_TARGETS): New static var, to fix build failure.
15949 2011-05-22 Chong Yidong <cyd@stupidchicken.com>
15951 * xselect.c (syms_of_xselect): Include character.h; use DEFSYM.
15953 2011-05-21 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
15955 * dispnew.c (scrolling_window): Don't exclude the case that the
15956 last enabled row in the desired matrix touches the bottom boundary.
15958 2011-05-21 Glenn Morris <rgm@gnu.org>
15960 * Makefile.in ($(etc)/DOC): Make second command line even shorter.
15961 (SOME_MACHINE_OBJECTS): Replace FONT_OBJ by its maximal expansion,
15962 and add some more files.
15964 2011-05-20 Eli Zaretskii <eliz@gnu.org>
15966 * callproc.c (Fcall_process) [MSDOS]: Fix arguments to
15967 report_file_error introduced by the change from 2011-05-07.
15969 2011-05-20 Paul Eggert <eggert@cs.ucla.edu>
15971 * systime.h (Time): Define only if emacs is defined.
15972 This is to allow ../lib-src/profile.c to be compiled on FreeBSD,
15973 where the include path doesn't have X11/X.h by default. See
15974 <http://lists.gnu.org/archive/html/emacs-devel/2011-05/msg00561.html>.
15976 2011-05-20 Kenichi Handa <handa@m17n.org>
15978 * composite.c (find_automatic_composition): Fix previous change.
15980 2011-05-20 Glenn Morris <rgm@gnu.org>
15982 * lisp.mk: New file, split from Makefile.in.
15983 * Makefile.in (lisp): Move to separate file, inserted by @lisp_frag@.
15984 (shortlisp): Remove.
15985 ($(etc)/DOC): Edit lisp.mk rather than using $shortlisp.
15987 2011-05-19 Glenn Morris <rgm@gnu.org>
15989 * Makefile.in (MSDOS_SUPPORT_REAL, MSDOS_SUPPORT, NS_SUPPORT)
15990 (REAL_MOUSE_SUPPORT, GPM_MOUSE_SUPPORT, MOUSE_SUPPORT, TOOLTIP_SUPPORT)
15991 (BASE_WINDOW_SUPPORT, X_WINDOW_SUPPORT, WINDOW_SUPPORT): Remove.
15992 (lisp): Set the order to that of loadup.el.
15993 (shortlisp): Make it a copy of $lisp.
15994 (SOME_MACHINE_LISP): Remove.
15995 ($(etc)/DOC): Depend just on $lisp, not $SOME_MACHINE_LISP too.
15996 Use just $shortlisp, not $SOME_MACHINE_LISP too.
15998 2011-05-18 Kenichi Handa <handa@m17n.org>
16000 * composite.c (CHAR_COMPOSABLE_P): Add more check for efficiency.
16001 (BACKWARD_CHAR): Wrap the arg STOP by parenthesis.
16002 (find_automatic_composition): Mostly rewrite for efficiency.
16004 2011-05-18 Juanma Barranquero <lekktu@gmail.com>
16006 * makefile.w32-in: Update dependencies.
16008 2011-05-18 Christoph Scholtes <cschol2112@googlemail.com>
16010 * menu.c: Include limits.h (fixes the MS-Windows build broken by
16011 2011-06-18T18:49:19Z!cyd@stupidchicken.com).
16013 2011-05-18 Paul Eggert <eggert@cs.ucla.edu>
16015 Fix some integer overflow issues, such as string length overflow.
16017 * insdel.c (count_size_as_multibyte): Check for string overflow.
16019 * character.c (lisp_string_width): Check for string overflow.
16020 Use EMACS_INT, not int, for string indexes and lengths; in
16021 particular, 2nd arg is now EMACS_INT, not int. Do not crash if
16022 the resulting string length overflows an EMACS_INT; instead,
16023 report a string overflow if no precision given. When checking for
16024 precision exhaustion, use a check that cannot possibly have
16025 integer overflow. (Bug#8675)
16026 * character.h (lisp_string_width): Adjust to new signature.
16028 * alloc.c (string_overflow): New function.
16029 (Fmake_string): Use it. This doesn't change behavior, but saves
16030 a few bytes and will simplify future changes.
16031 * character.c (string_escape_byte8): Likewise.
16032 * lisp.h (string_overflow): New decl.
16034 Fixups, following up to the user-interface timestamp change.
16035 * nsterm.m (last_mouse_movement_time, ns_mouse_position): Use Time
16036 for UI timestamps, instead of unsigned long.
16037 * msdos.c (mouse_get_pos): Likewise.
16038 * w32inevt.c (movement_time, w32_console_mouse_position): Likewise.
16039 * w32gui.h (Time): Define by including "systime.h" rather than by
16040 declaring it ourselves. (Bug#8664)
16042 * dispextern.h (struct image): Don't assume time_t <= unsigned long.
16043 * image.c (clear_image_cache): Likewise.
16045 * term.c (term_mouse_position): Don't assume time_t wraparound.
16047 Be more systematic about user-interface timestamps.
16048 Before, the code sometimes used 'Time', sometimes 'unsigned long',
16049 and sometimes 'EMACS_UINT', to represent these timestamps.
16050 This change causes it to use 'Time' uniformly, as that's what X uses.
16051 This makes the code easier to follow, and makes it easier to catch
16052 integer overflow bugs such as Bug#8664.
16053 * frame.c (Fmouse_position, Fmouse_pixel_position):
16054 Use Time, not unsigned long, for user-interface timestamps.
16055 * keyboard.c (last_event_timestamp, kbd_buffer_get_event): Likewise.
16056 (button_down_time, make_lispy_position, make_lispy_movement): Likewise.
16057 * keyboard.h (last_event_timestamp): Likewise.
16058 * menu.c (Fx_popup_menu) [!HAVE_X_WINDOWS]: Likewise.
16059 * menu.h (xmenu_show): Likewise.
16060 * term.c (term_mouse_position): Likewise.
16061 * termhooks.h (struct input_event.timestamp): Likewise.
16062 (struct terminal.mouse_position_hook): Likewise.
16063 * xmenu.c (create_and_show_popup_menu, xmenu_show): Likewise.
16064 * xterm.c (XTmouse_position, x_scroll_bar_report_motion): Likewise.
16065 * systime.h (Time): New decl. Pull it in from <X11/X.h> if
16066 HAVE_X_WINDOWS, otherwise define it as unsigned long, which is
16067 what it was before.
16068 * menu.h, termhooks.h: Include "systime.h", for Time.
16070 * keyboard.c (make_lispy_event): Fix problem in integer overflow.
16071 Don't assume that the difference between two unsigned long values
16072 can fit into an integer. At this point, we know button_down_time
16073 <= event->timestamp, so the difference must be nonnegative, so
16074 there's no need to cast the result if double-click-time is
16075 nonnegative, as it should be; check that it's nonnegative, just in
16076 case. This bug is triggered when events are more than 2**31 ms
16077 apart (about 25 days). (Bug#8664)
16079 * xselect.c (last_event_timestamp): Remove duplicate decl.
16080 (x_own_selection): Remove needless cast to unsigned long.
16082 * xmenu.c (set_frame_menubar): Use int, not EMACS_UINT, for indexes
16083 that always fit in int. Use a sentinel instead of a counter, to
16084 avoid a temp and to allay GCC's concerns about possible int overflow.
16085 * frame.h (struct frame): Use int for menu_bar_items_used
16086 instead of EMACS_INT, since it always fits in int.
16088 * menu.c (grow_menu_items): Check for int overflow.
16090 * xmenu.c (set_frame_menubar): Don't mishandle vectors with no nils.
16092 * xterm.c: Use EMACS_INT for Emacs modifiers, and int for X modifiers.
16093 Before, the code was not consistent. These values cannot exceed
16094 2**31 - 1 so there's no need to make them unsigned.
16095 (x_x_to_emacs_modifiers): Accept int and return EMACS_INT.
16096 (x_emacs_to_x_modifiers): Accept EMACS_INT and return int.
16097 (x_x_to_emacs_modifiers, x_emacs_to_x_modifiers): Reject non-integers
16099 * xterm.h (x_x_to_emacs_modifiers): Adjust to signature change.
16101 * lisp.h (XINT) [USE_LISP_UNION_TYPE]: Cast to EMACS_INT.
16102 (XUINT) [USE_LISP_UNION_TYPE]: Cast to EMACS_UINT.
16103 Otherwise, GCC 4.6.0 warns about printf (pI, XINT (...)),
16104 presumably because the widths might not match.
16106 * window.c (size_window): Avoid needless test at loop start.
16108 2011-05-18 Courtney Bane <emacs-bugs-7626@cbane.org> (tiny change)
16110 * term.c (Fresume_tty): Restore hooks before reinitializing (bug#8687).
16112 2011-05-12 Drew Adams <drew.adams@oracle.com>
16114 * textprop.c (Fprevious_single_char_property_change): Doc fix (bug#8655).
16116 2011-05-12 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
16118 * w32term.c (w32_draw_fringe_bitmap): Rename local vars `left' and
16119 `width' to `bar_area_x' and `bar_area_width', respectively.
16120 (x_scroll_run): Take account of fringe background extension.
16122 * xterm.c (x_draw_fringe_bitmap) [USE_TOOLKIT_SCROLL_BARS]:
16123 Rename local vars `left' and `width' to `bar_area_x' and
16124 `bar_area_width', respectively.
16125 (x_scroll_run) [USE_TOOLKIT_SCROLL_BARS]: Take account of fringe
16126 background extension.
16128 2011-05-10 Jim Meyering <meyering@redhat.com>
16130 * xdisp.c (x_intersect_rectangles): Fix typo "the the -> the".
16132 2011-05-10 Juanma Barranquero <lekktu@gmail.com>
16134 * image.c (Finit_image_library): Return t for built-in image types,
16135 like pbm and xbm. (Bug#8640)
16137 2011-05-09 Andreas Schwab <schwab@linux-m68k.org>
16139 * w32menu.c (set_frame_menubar): Fix submenu allocation.
16141 2011-05-07 Eli Zaretskii <eliz@gnu.org>
16143 * w32console.c (Fset_screen_color): Doc fix.
16144 (Fget_screen_color): New function.
16145 (syms_of_ntterm): Defsubr it.
16147 * callproc.c (call_process_cleanup) [MSDOS]: Don't close and
16148 unlink the temporary file if Fcall_process didn't create it in the
16150 (Fcall_process) [MSDOS]: Don't create tempfile if stdout of the
16151 child process will be redirected to a file specified with `:file'.
16152 Don't try to re-open tempfile in that case, and set fd[0] to -1 as
16153 cue to call_process_cleanup not to close that handle.
16155 2011-05-07 Ben Key <bkey76@gmail.com>
16157 * makefile.w32-in: The bootstrap-temacs rule now makes use of
16158 one of two shell specific rules, either bootstrap-temacs-CMD or
16159 bootstrap-temacs-SH. The bootstrap-temacs-SH rule is identical
16160 to the previous implementation of the bootstrap-temacs rule.
16161 The bootstrap-temacs-CMD rule is similar to the previous
16162 implementation of the bootstrap-temacs rule except that it
16163 makes use of the ESC_CFLAGS variable instead of the CFLAGS
16166 These changes, along with some changes to nt/configure.bat,
16167 nt/gmake.defs, and nt/nmake.defs, are required to extend my
16168 earlier fix to add support for --cflags and --ldflags options
16169 that include quotes so that it works whether make uses cmd or
16172 2011-05-06 Michael Albinus <michael.albinus@gmx.de>
16174 * dbusbind.c (QCdbus_type_unix_fd): Declare static.
16175 (xd_remove_watch): Don't check QCdbus_type_unix_fd for SYMBOLP, it
16177 (Fdbus_init_bus, xd_read_queued_messages): Bus can be a symbol or
16178 a string. Handle both cases.
16179 (Fdbus_call_method_asynchronously, Fdbus_register_signal)
16180 (Fdbus_register_method): Use Qinvalid_function.
16182 2011-05-06 Juanma Barranquero <lekktu@gmail.com>
16184 * makefile.w32-in: Update dependencies.
16185 (LISP_H): Add inttypes.h and stdin.h.
16186 (PROCESS_H): Add unistd.h.
16188 2011-05-06 Eli Zaretskii <eliz@gnu.org>
16190 * lread.c: Include limits.h (fixes the MS-Windows build broken by
16191 2011-05-06T07:13:19Z!eggert@cs.ucla.edu).
16193 2011-05-06 Paul Eggert <eggert@cs.ucla.edu>
16195 * image.c (Finit_image_library) [!HAVE_NTGUI]: Omit unused local.
16197 * term.c (vfatal): Remove stray call to va_end.
16198 It's not needed and the C Standard doesn't allow it here anyway.
16200 Use C99's va_copy to avoid undefined behavior on x86-64 GNU/Linux.
16201 * eval.c (verror): doprnt a copy of ap, not the original. (Bug#8545)
16203 * eval.c (verror): OK to create a string of up to MOST_POSITIVE_FIXNUM
16206 * term.c: Don't include <stdarg.h>, as <lisp.h> does that.
16208 * callproc.c (Fcall_process): Use 'volatile' to avoid vfork clobbering.
16210 * process.c (Fformat_network_address): Fix typo: args2 -> *args2.
16212 * xmenu.c (set_frame_menubar): Fix typo: int * -> int (3 times).
16214 * coding.c (detect_coding_charset): Fix typo: * 2 -> *4 (Bug#8601).
16216 * charset.h (struct charset.code_space): Now has 15 elements, not 16.
16217 * charset.c (Fdefine_charset_internal): Don't initialize
16218 charset.code_space[15]. The value was garbage, on hosts with
16219 32-bit int (Bug#8600).
16221 * lread.c (read_integer): Be more consistent with string-to-number.
16222 Use string_to_number to do the actual conversion; this avoids
16223 rounding errors and fixes some other screwups. Without this fix,
16224 for example, #x1fffffffffffffff was misread as -2305843009213693952.
16225 (digit_to_number): Move earlier, for benefit of read_integer.
16226 Return -1 if the digit is out of range for the base, -2 if it is
16227 not a digit in any supported base. (Bug#8602)
16229 * doprnt.c (doprnt): Support arbitrary pI values, such as "I64".
16231 * dispnew.c (scrolling_window): Return 1 if we scrolled,
16232 to match comment at start of function. This also removes a
16233 GCC warning about overflow in a 32+64-bit port.
16235 * lisp.h (EMACS_INT, EMACS_UINT, BITS_PER_EMACS_INT, pI): Simplify.
16237 * dbusbind.c: Do not use XPNTR on a value that may be an integer.
16238 Reported by Stefan Monnier in
16239 <http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00919.html>.
16240 (xd_remove_watch, Fdbus_init_bus, xd_read_queued_messages):
16241 Use SYMBOLP-guarded XSYMBOL, not XPNTR.
16243 * lisp.h (EMACS_INTPTR): Remove. All uses changed to intptr_t.
16244 (EMACS_UINTPTR): Likewise, with uintptr_t.
16246 * lisp.h: Prefer 64-bit EMACS_INT if available.
16247 (EMACS_INT, EMACS_UINT, BITS_PER_EMACS_INT, pI): Define to 64-bit
16248 on 32-bit hosts that have 64-bit int, so that they can access
16250 However, temporarily disable this change unless the temporary
16251 symbol WIDE_EMACS_INT is defined.
16253 * lread.c, process.c: Do not include <inttypes.h>; lisp.h does it now.
16255 Prefer intptr_t/uintptr_t for integers the same widths as pointers.
16256 This removes an assumption that EMACS_INT and long are the same
16257 width as pointers. The assumption is true for Emacs porting targets
16258 now, but we want to make other targets possible.
16259 * lisp.h: Include <inttypes.h>, for INTPTR_MAX, UINTPTR_MAX.
16260 (EMACS_INTPTR, EMACS_UINTPTR): New macros.
16261 In the rest of the code, change types of integers that hold casted
16262 pointers to EMACS_INTPTR and EMACS_UINTPTR, systematically
16263 replacing EMACS_INT, long, EMACS_UINT, and unsigned long.
16264 (XTYPE): Don't cast arg to EMACS_UINT; normally is not needed.
16265 (XSET): Cast type of XTYPE arg to EMACS_INTPTR; it is needed here.
16266 No need to cast type when ORing.
16267 (XPNTR): Return a value of type EMACS_INTPTR or EMACS_UINTPTR.
16268 * alloc.c (lisp_align_malloc): Remove a no-longer-needed cast.
16269 * doc.c (store_function_docstring): Use EMACS_INTPTR, so as not to
16270 assume EMACS_INT is the same width as char *.
16271 * gtkutil.c (xg_gtk_scroll_destroy, xg_tool_bar_button_cb):
16272 (xg_tool_bar_callback, xg_tool_bar_help_callback, xg_make_tool_item):
16273 Remove no-longer-needed casts.
16274 (xg_create_scroll_bar, xg_tool_bar_button_cb, xg_tool_bar_callback):
16275 (xg_tool_bar_help_callback, xg_make_tool_item):
16276 Use EMACS_INTPTR to hold an integer
16277 that will be cast to void *; this can avoid a GCC warning
16278 if EMACS_INT is not the same width as void *.
16279 * menu.c (find_and_call_menu_selection): Remove no-longer-needed cast.
16280 * xdisp.c (display_echo_area_1, resize_mini_window_1):
16281 (current_message_1, set_message_1):
16282 Use a local to convert to proper width without a cast.
16283 * xmenu.c (dialog_selection_callback): Likewise.
16285 * sysdep.c (get_random): Don't assume EMACS_INT is no wider than long.
16286 Also, don't assume VALBITS / RAND_BITS is less than 5,
16287 and don't rely on undefined behavior when shifting a 1 left into
16289 * lisp.h (get_random): Change signature to match.
16291 * lread.c (hash_string): Use size_t, not int, for hash computation.
16292 Normally we prefer signed values; but hashing is special, because
16293 it's better to use unsigned division on hash table sizes so that
16294 the remainder is nonnegative. Also, size_t is the natural width
16295 for hashing into memory. The previous code used 'int', which doesn't
16296 retain enough info to hash well into very large tables.
16297 (oblookup, oblookup_last_bucket_number, Funintern): Likewise.
16299 * dbusbind.c: Don't possibly lose pointer info when converting.
16300 (xd_remove_watch, Fdbus_init_bus, xd_read_queued_messages):
16301 Use XPNTR rather than XHASH, so that the high-order bits of
16302 the pointer aren't lost when converting through void *.
16304 * eval.c (Fautoload): Don't double-shift a pointer.
16306 * fns.c (Frandom): Let EMACS_UINT be wider than unsigned long.
16308 2011-05-06 Juanma Barranquero <lekktu@gmail.com>
16310 * gnutls.c (DEF_GNUTLS_FN):
16311 * image.c (DEF_IMGLIB_FN): Make function pointers static.
16313 2011-05-05 Andreas Schwab <schwab@linux-m68k.org>
16315 * lread.c (lisp_file_lexically_bound_p): Stop scanning at end
16318 2011-05-05 Eli Zaretskii <eliz@gnu.org>
16320 * w32heap.c (allocate_heap) [USE_LISP_UNION_TYPE || USE_LSB_TAG]:
16321 New version that can reserve upto 2GB of heap space.
16323 2011-05-05 Chong Yidong <cyd@stupidchicken.com>
16325 * nsfns.m (Fns_read_file_name): Doc fix (Bug#8534).
16327 2011-05-05 Teodor Zlatanov <tzz@lifelogs.com>
16329 * gnutls.c (fn_gnutls_certificate_set_x509_key_file): Add alias to
16330 `gnutls_certificate_set_x509_key_file'.
16332 2011-05-05 Juanma Barranquero <lekktu@gmail.com>
16334 * makefile.w32-in ($(BLD)/image.$(O), $(BLD)/process.$(O)):
16335 Update dependencies.
16337 2011-05-04 Juanma Barranquero <lekktu@gmail.com>
16339 * gnutls.h (emacs_gnutls_write, emacs_gnutls_read):
16340 * gnutls.c (emacs_gnutls_write, emacs_gnutls_read):
16341 Remove unused parameter `fildes'.
16342 * process.c (read_process_output, send_process): Don't pass it.
16344 2011-05-04 Juanma Barranquero <lekktu@gmail.com>
16346 Fix previous change: the library cache is defined in w32.c.
16347 * image.c (CACHE_IMAGE_TYPE) [!HAVE_NTGUI]: Define to noop.
16348 (Finit_image_library): Wrap Vlibrary_cache on "#ifdef HAVE_NTGUI".
16350 2011-05-04 Juanma Barranquero <lekktu@gmail.com>
16352 Implement dynamic loading of GnuTLS on Windows.
16354 * gnutls.h (GNUTLS_EMACS_ERROR_NOT_LOADED): New macro.
16355 (emacs_gnutls_write, emacs_gnutls_read): Mark as extern.
16356 (emacs_gnutls_record_check_pending, emacs_gnutls_transport_set_errno):
16359 * gnutls.c (Qgnutls_dll): Define.
16360 (DEF_GNUTLS_FN, LOAD_GNUTLS_FN): New macros.
16361 (gnutls_*): Declare function pointers.
16362 (init_gnutls_functions): New function to initialize function pointers.
16363 (emacs_gnutls_handshake, Fgnutls_error_string, Fgnutls_deinit)
16364 (emacs_gnutls_global_init, Fgnutls_bye): Use function pointers.
16365 (emacs_gnutls_record_check_pending, emacs_gnutls_transport_set_errno):
16366 Wrappers for gnutls_record_check_pending and gnutls_transport_set_errno.
16367 (emacs_gnutls_write, emacs_gnutls_read)
16368 (emacs_gnutls_handle_error, Fgnutls_error_fatalp)
16369 (Fgnutls_available_p): New function.
16370 (Fgnutls_boot): Call Fgnutls_available_p. Use function pointers.
16371 (syms_of_gnutls) <Qgnutls_dll>: Initialize and staticpro it.
16372 (syms_of_gnutls) <Sgnutls_available_p>: defsubr it.
16374 * image.c: Include w32.h.
16375 (Vimage_type_cache): Delete.
16376 (syms_of_image) <Vimage_type_cache>: Don't initialize and staticpro it.
16377 (CACHE_IMAGE_TYPE, Finit_image_library): Use Vlibrary_cache instead.
16378 (w32_delayed_load): Move to w32.c.
16380 * w32.h (VlibraryCache, QCloaded_from, w32_delayed_load): Declare.
16382 * w32.c (QCloaded_from, Vlibrary_cache): Define.
16383 (w32_delayed_load): Move from image.c. When loading a library, record
16384 its filename in the :loaded-from property of the library id.
16385 (globals_of_w32) <QCloaded_from, Vlibrary_cache>:
16386 Initialize and staticpro them.
16387 (emacs_gnutls_pull, emacs_gnutls_push): Call emacs_gnutls_* functions.
16389 * process.c: Include lisp.h before w32.h, not after.
16390 (wait_reading_process_output): Call emacs_gnutls_record_check_pending
16391 instead of gnutls_record_check_pending.
16393 * callproc.c, emacs.c: Include lisp.h before w32.h, not after.
16395 2011-05-04 Teodor Zlatanov <tzz@lifelogs.com>
16397 * gnutls.c (Fgnutls_boot): Support :keylist and :crlfiles options
16398 instead of :keyfiles. Give GnuTLS the keylist and the CRL lists
16401 2011-05-03 Jan Djärv <jan.h.d@swipnet.se>
16403 * xterm.c (x_set_frame_alpha): Do not set property on anything
16404 else than FRAME_X_OUTER_WINDOW (Bug#8608).
16406 2011-05-02 Juanma Barranquero <lekktu@gmail.com>
16408 * sysdep.c (get_tty_size) [WINDOWSNT]: Implement. (Bug#8596)
16410 2011-05-02 Juanma Barranquero <lekktu@gmail.com>
16412 * gnutls.c (Qgnutls_log_level, Qgnutls_code, Qgnutls_anon)
16413 (Qgnutls_x509pki, Qgnutls_e_interrupted, Qgnutls_e_again)
16414 (Qgnutls_e_invalid_session, Qgnutls_e_not_ready_for_handshake)
16415 (gnutls_global_initialized, Qgnutls_bootprop_priority)
16416 (Qgnutls_bootprop_trustfiles, Qgnutls_bootprop_keyfiles)
16417 (Qgnutls_bootprop_callbacks, Qgnutls_bootprop_loglevel)
16418 (Qgnutls_bootprop_hostname, Qgnutls_bootprop_verify_flags)
16419 (Qgnutls_bootprop_verify_error, Qgnutls_bootprop_verify_hostname_error)
16420 (Qgnutls_bootprop_callbacks_verify): Make static.
16422 2011-05-01 Andreas Schwab <schwab@linux-m68k.org>
16424 * callproc.c: Indentation fixup.
16426 * sysdep.c (wait_for_termination_1): Make static.
16427 (wait_for_termination, interruptible_wait_for_termination):
16428 Move after wait_for_termination_1.
16430 2011-05-01 Lars Magne Ingebrigtsen <larsi@gnus.org>
16432 * sysdep.c (interruptible_wait_for_termination): New function
16433 which is like wait_for_termination, but allows keyboard
16436 * callproc.c (Fcall_process): Add (:file "file") as an option for
16438 (Fcall_process_region): Ditto.
16440 2011-04-30 Eli Zaretskii <eliz@gnu.org>
16442 * dosfns.c (Fint86, Fdos_memget, Fdos_memput): Use `ASIZE (FOO)'
16443 rather than `XVECTOR (FOO)->size'.
16445 * process.c: Remove HAVE_INTTYPES_H condition from inclusion of
16446 inttypes.h, as a gnulib replacement is used if it not available in
16449 2011-04-21 Eli Zaretskii <eliz@gnu.org>
16451 Lift the MOST_POSITIVE_FIXNUM/4 limitation on visited files.
16452 * fileio.c (Finsert_file_contents): Don't limit file size to 1/4
16453 of MOST_POSITIVE_FIXNUM. (Bug#8528)
16455 * coding.c (coding_alloc_by_realloc): Error out if destination
16456 will grow beyond MOST_POSITIVE_FIXNUM.
16457 (decode_coding_emacs_mule): Abort if there isn't enough place in
16458 charbuf for the composition carryover bytes. Reserve an extra
16459 space for up to 2 characters produced in a loop.
16460 (decode_coding_iso_2022): Abort if there isn't enough place in
16461 charbuf for the composition carryover bytes.
16463 2011-04-21 Eli Zaretskii <eliz@gnu.org>
16465 * doprnt.c (doprnt) [!HAVE_LONG_LONG_INT]: Error out instead of
16466 aborting when %lld or %lll format is passed.
16467 [!HAVE_UNSIGNED_LONG_LONG_INT]: Error out instead of aborting when
16468 %llo or %llx format is passed. (Bug#8545)
16470 * window.c (window_scroll_line_based): Use a marker instead of
16471 simple variables to record original value of point. (Bug#7952)
16473 * doprnt.c (doprnt): Fix the case where a multibyte sequence
16474 produced by %s or %c overflows available buffer space. (Bug#8545)
16476 2011-04-28 Paul Eggert <eggert@cs.ucla.edu>
16478 * doprnt.c (doprnt): Omit useless test; int overflow check (Bug#8545).
16479 (SIZE_MAX): Move defn after all includes, as they might #define it.
16481 2011-04-28 Juanma Barranquero <lekktu@gmail.com>
16483 * w32.c (init_environment): Warn about defaulting HOME to C:\.
16485 2011-04-28 Juanma Barranquero <lekktu@gmail.com>
16487 * keyboard.c (Qdelayed_warnings_hook): Define.
16488 (command_loop_1): Run `delayed-warnings-hook'
16489 if Vdelayed_warnings_list is non-nil.
16490 (syms_of_keyboard) <delayed-warnings-hook>: DEFSYM it.
16491 (syms_of_keyboard) <delayed-warnings-list>: DEFVAR_LISP it.
16493 2011-04-28 Eli Zaretskii <eliz@gnu.org>
16495 * doprnt.c (doprnt): Don't return value smaller than the buffer
16496 size if the message was truncated. (Bug#8545).
16498 2011-04-28 Juanma Barranquero <lekktu@gmail.com>
16500 * w32fns.c (Fx_change_window_property, Fx_delete_window_property)
16501 (Fx_window_property): #if-0 the whole functions, not just the bodies.
16503 2011-04-27 Paul Eggert <eggert@cs.ucla.edu>
16505 * doprnt.c (doprnt): Support "ll" length modifier, for long long.
16507 2011-04-27 Juanma Barranquero <lekktu@gmail.com>
16509 * makefile.w32-in: Update dependencies.
16511 2011-04-27 Eli Zaretskii <eliz@gnu.org>
16513 Improve `doprnt' and its usage. (Bug#8545)
16514 * doprnt.c (doprnt): Make sure `format' is never accessed beyond
16515 `format_end'. Remove support for %l as a conversion specifier.
16516 Don't use xrealloc. Improve diagnostics when the %l size modifier
16517 is used. Update the commentary.
16519 * eval.c (verror): Simplify calculation of size_t.
16521 * coding.c (Ffind_operation_coding_system): Fix diagnostic error
16524 2011-04-27 Yoshiaki Kasahara <kasahara@nc.kyushu-u.ac.jp> (tiny change)
16526 * buffer.c (init_buffer) [USE_MMAP_FOR_BUFFERS]: Adjust to aliasing
16529 2011-04-27 Paul Eggert <eggert@cs.ucla.edu>
16531 * nsmenu.m: Replace all uses of XVECTOR with ASIZE and AREF.
16532 This makes this file independent of the recent pseudovector change.
16534 2011-04-26 Paul Eggert <eggert@cs.ucla.edu>
16536 * keyboard.c (handle_user_signal): Fix pointer signedness problem.
16538 * gnutls.c (emacs_gnutls_handle_error): Remove unused local.
16539 (Fgnutls_boot): gnutls_certificate_verify_peers2 wants unsigned *.
16540 Remove unused local.
16541 (emacs_gnutls_write): Don't use uninitialized rtnval if nbyte <= 0.
16543 * lisp.h: Fix a problem with aliasing and vector headers. (Bug#8546)
16544 GCC 4.6.0 optimizes based on type-based alias analysis.
16545 For example, if b is of type struct buffer * and v of type struct
16546 Lisp_Vector *, then gcc -O2 was incorrectly assuming that &b->size
16547 != &v->size, and therefore "v->size = 1; b->size = 2; return
16548 v->size;" must therefore return 1. This assumption is incorrect
16549 for Emacs, since it type-puns struct Lisp_Vector * with many other
16550 types. To fix this problem, this patch adds a new type struct
16551 vectorlike_header that documents the constraints on layout of vectors
16552 and pseudovectors, and helps optimizing compilers not get fooled
16553 by Emacs's type punning. It also adds the macros XSETTYPED_PVECTYPE
16554 XSETTYPED_PSEUDOVECTOR, TYPED_PSEUDOVECTORP, for similar reasons.
16555 * lisp.h (XSETTYPED_PVECTYPE): New macro, specifying the name of
16557 (XSETPVECTYPE): Rewrite in terms of new macro.
16558 (XSETPVECTYPESIZE): New macro, specifying both type and size.
16559 This is a bit clearer, and further avoids the possibility of
16560 undesirable aliasing.
16561 (XSETTYPED_PSEUDOVECTOR): New macro, specifying the size.
16562 (XSETPSEUDOVECTOR): Rewrite in terms of XSETTYPED_PSEUDOVECTOR.
16563 (XSETSUBR): Rewrite in terms of XSETTYPED_PSEUDOVECTOR and XSIZE,
16564 since Lisp_Subr is a special case (no "next" field).
16565 (ASIZE): Now uses header.size rather than size.
16566 All previous uses of XVECTOR (foo)->size replaced to use this macro,
16567 to avoid the hassle of writing XVECTOR (foo)->header.size.
16568 (struct vectorlike_header): New type.
16569 (TYPED_PSEUDOVECTORP): New macro, also specifying the C type of the
16570 object, to help avoid aliasing.
16571 (PSEUDOVECTORP): Rewrite in terms of TYPED_PSEUDOVECTORP.
16572 (SUBRP): Likewise, since Lisp_Subr is a special case.
16573 * lisp.h (struct Lisp_Vector, struct Lisp_Char_Table):
16574 (struct Lisp_Sub_Char_Table, struct Lisp_Bool_Vector):
16575 (struct Lisp_Hash_Table): Combine first two members into a single
16576 struct vectorlike_header member. All uses of "size" and "next" members
16577 changed to be "header.size" and "header.next".
16578 * buffer.h (struct buffer): Likewise.
16579 * font.h (struct font_spec, struct font_entity, struct font): Likewise.
16580 * frame.h (struct frame): Likewise.
16581 * process.h (struct Lisp_Process): Likewise.
16582 * termhooks.h (struct terminal): Likewise.
16583 * window.c (struct save_window_data, struct saved_window): Likewise.
16584 * window.h (struct window): Likewise.
16585 * alloc.c (allocate_buffer, Fmake_bool_vector, allocate_pseudovector):
16586 Use XSETPVECTYPESIZE, not XSETPVECTYPE, to avoid aliasing problems.
16587 * buffer.c (init_buffer_once): Likewise.
16588 * lread.c (defsubr): Use XSETTYPED_PVECTYPE, since Lisp_Subr is a
16590 * process.c (Fformat_network_address): Use local var for size,
16593 * bytecode.c (exec_byte_code): Don't use XVECTOR before CHECK_VECTOR.
16595 Make the Lisp reader and string-to-float more consistent (Bug#8525)
16596 * data.c (atof): Remove decl; no longer used or needed.
16597 (digit_to_number): Move to lread.c.
16598 (Fstring_to_number): Use new string_to_number function, to be
16599 consistent with how the Lisp reader treats infinities and NaNs.
16600 Do not assume that floating-point numbers represent EMACS_INT
16601 without losing information; this is not true on most 64-bit hosts.
16602 Avoid double-rounding errors, by insisting on integers when
16603 parsing non-base-10 numbers, as the documentation specifies.
16604 * lisp.h (string_to_number): New decl, replacing ...
16605 (isfloat_string): Remove.
16606 * lread.c: Include <inttypes.h>, for uintmax_t and strtoumax.
16607 (read1): Do not accept +. and -. as integers; this
16608 appears to have been a coding error. Similarly, do not accept
16609 strings like +-1e0 as floating point numbers. Do not report
16610 overflow for integer overflows unless the base is not 10 which
16611 means we have no simple and reliable way to continue.
16612 Break out the floating-point parsing into a new
16613 function string_to_number, so that Fstring_to_number parses
16614 floating point numbers consistently with the Lisp reader.
16615 (digit_to_number): Move here from data.c. Make it static inline.
16616 (E_CHAR, EXP_INT): Remove, replacing with ...
16617 (E_EXP): New macro, to solve the "1.0e+" problem mentioned below.
16618 (string_to_number): New function, replacing isfloat_string.
16619 This function checks for valid syntax and produces the resulting
16620 Lisp float number too. Rework it so that string-to-number
16621 no longer mishandles examples like "1.0e+". Use strtoumax,
16622 so that overflow for non-base-10 numbers is reported only when
16623 there's no portable and simple way to convert to floating point.
16625 * textprop.c (set_text_properties_1): Rewrite for clarity,
16626 and to avoid GCC warning about integer overflow.
16628 * intervals.h (struct interval): Use EMACS_INT for members
16629 where EMACS_UINT might cause problems. See
16630 <http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00514.html>.
16631 (CHECK_TOTAL_LENGTH): Remove cast to EMACS_INT; no longer needed.
16632 * intervals.c (interval_deletion_adjustment): Now returns EMACS_INT.
16634 (offset_intervals): Tell GCC not to worry about length overflow
16635 when negating a negative length.
16637 * alloc.c (overrun_check_malloc, overrun_check_realloc): Now static.
16638 (overrun_check_free): Likewise.
16640 * alloc.c (SDATA_SIZE) [!GC_CHECK_STRING_BYTES]: Avoid runtime check
16641 in the common case where SDATA_DATA_OFFSET is a multiple of Emacs
16644 * gnutls.c: Fix problems found by GCC 4.6.0 on Ubuntu 10.10.
16645 (gnutls_make_error): Rename local to avoid shadowing.
16646 (gnutls_emacs_global_deinit): ifdef out; not used.
16647 (Fgnutls_boot): Use const for pointer to readonly storage.
16648 Comment out unused local. Fix pointer signedness problems.
16650 * lread.c (openp): Don't stuff size_t into an 'int'.
16651 Use <= on length, not < on length + 1, to avoid GCC 4.6.0 warning
16652 about possible signed overflow.
16654 * gtkutil.c: Fix problems found by GCC 4.6.0 on Ubuntu 10.10.
16655 (GDK_KEY_g): Don't define if already defined.
16656 (xg_prepare_tooltip): Avoid pointer signedness problem.
16657 (xg_set_toolkit_scroll_bar_thumb): Redo to avoid two casts.
16659 * process.c (Fnetwork_interface_info): Avoid left-shift undefined
16660 behavior with 1 << 31. GCC 4.6.0 warns about this on 32-bit hosts.
16662 * xfns.c (Fx_window_property): Simplify a bit,
16663 to make a bit faster and to avoid GCC 4.6.0 warning.
16664 * xselect.c (x_get_window_property, x_handle_dnd_message): Likewise.
16666 * fns.c (internal_equal): Don't assume size_t fits in int.
16668 * alloc.c (compact_small_strings): Tighten assertion a little.
16670 Replace pEd with more-general pI, and fix some printf arg casts.
16671 * lisp.h (pI): New macro, generalizing old pEd macro to other
16672 conversion specifiers. For example, use "...%"pI"d..." rather
16673 than "...%"pEd"...".
16674 (pEd): Remove. All uses replaced with similar uses of pI.
16675 * m/amdx86-64.h, m/ia64.h, m/ibms390x.h: Likewise.
16676 * alloc.c (check_pure_size): Don't overflow by converting size to int.
16677 * bidi.c (bidi_dump_cached_states): Use pI to avoid cast.
16678 * data.c (Fnumber_to_string): Use pI instead of if-then-else-abort.
16679 * dbusbind.c (xd_append_arg): Use pI to avoid cast.
16680 (Fdbus_method_return_internal, Fdbus_method_error_internal): Likewise.
16681 * font.c (font_unparse_xlfd): Avoid potential buffer overrun on
16683 (font_unparse_xlfd, font_unparse_fcname): Use pI to avoid casts.
16684 * keyboard.c (record_char, modify_event_symbol): Use pI to avoid casts.
16685 * print.c (safe_debug_print, print_object): Likewise.
16686 (print_object): Don't overflow by converting EMACS_INT or EMACS_UINT
16688 Use pI instead of if-then-else-abort. Use %p to avoid casts,
16689 avoiding the 0 flag, which is not portable.
16690 * process.c (Fmake_network_process): Use pI to avoid cast.
16691 * region-cache.c (pp_cache): Likewise.
16692 * xdisp.c (decode_mode_spec): Likewise.
16693 * xrdb.c (x_load_resources) [USE_MOTIF]: Use pI to avoid undefined
16694 behavior on 64-bit hosts with printf arg.
16695 * xselect.c (x_queue_event): Use %p to avoid casts, avoiding 0 flag.
16696 (x_stop_queuing_selection_requests): Likewise.
16697 (x_get_window_property): Don't truncate byte count to an 'int'
16700 * frame.c (frame_name_fnn_p): Get rid of strtol, which isn't right
16701 here, since it parses constructs like leading '-' and spaces,
16702 which are not wanted; and it overflows with large numbers.
16703 Instead, simply match F[0-9]+, which is what is wanted anyway.
16705 * alloc.c: Remove unportable assumptions about struct layout.
16706 (SDATA_SELECTOR, SDATA_DATA_OFFSET): New macros.
16707 (SDATA_OF_STRING, SDATA_SIZE, allocate_string_data):
16708 (allocate_vectorlike, make_pure_vector): Use the new macros,
16709 plus offsetof, to remove unportable assumptions about struct layout.
16710 These assumptions hold on all porting targets that I know of, but
16711 they are not guaranteed, they're easy to remove, and removing them
16712 makes further changes easier.
16714 * alloc.c (BLOCK BYTES): Fix typo by changing "ablock" to "ablocks".
16715 This doesn't fix a bug but makes the code clearer.
16716 (string_overrun_cookie): Now const. Use initializers that
16717 don't formally overflow signed char, to avoid warnings.
16718 (allocate_string_data) [GC_CHECK_STRING_OVERRUN]: Fix typo that
16719 can cause Emacs to crash when string overrun checking is enabled.
16720 (allocate_buffer): Don't assume sizeof (struct buffer) is a
16721 multiple of sizeof (EMACS_INT); it need not be, if
16722 alignof(EMACS_INT) < sizeof (EMACS_INT).
16723 (check_sblock, check_string_bytes, check_string_free_list): Protoize.
16725 2011-04-26 Juanma Barranquero <lekktu@gmail.com>
16727 * keyboard.c (QCrtl): Rename from Qrtl. All uses changed.
16729 2011-04-26 Teodor Zlatanov <tzz@lifelogs.com>
16731 * gnutls.c (emacs_gnutls_handshake): Return an error if we're not
16732 supposed to be handshaking. (Bug#8556)
16733 Reported by Paul Eggert <eggert@cs.ucla.edu>.
16735 2011-04-26 Daniel Colascione <dan.colascione@gmail.com>
16737 * lisp.h (Qdebug): List symbol.
16738 * eval.c (Qdebug): Restore global linkage.
16739 * keyboard.c (debug-on-event): New variable.
16740 (handle_user_signal): Break into debugger when debug-on-event
16741 matches the current signal symbol.
16743 2011-04-25 Dan Nicolaescu <dann@ics.uci.edu>
16745 * alloc.c (check_sblock, check_string_bytes)
16746 (check_string_free_list): Convert to standard C.
16748 2011-04-25 Teodor Zlatanov <tzz@lifelogs.com>
16750 * w32.c (emacs_gnutls_push): Fix typo.
16752 2011-04-25 Eli Zaretskii <eliz@gnu.org>
16754 * gnutls.c (emacs_gnutls_handshake): Avoid compiler warnings about
16755 "cast to pointer from integer of different size".
16757 Improve doprnt and its use in verror. (Bug#8545)
16758 * doprnt.c (doprnt): Document the set of format control sequences
16759 supported by the function. Use SAFE_ALLOCA instead of always
16762 * eval.c (verror): Don't limit the buffer size at size_max-1, that
16763 is one byte too soon. Don't use xrealloc; instead xfree and
16766 2011-04-24 Teodor Zlatanov <tzz@lifelogs.com>
16768 * gnutls.h: Add GNUTLS_STAGE_CALLBACKS enum to denote we're in the
16771 * gnutls.c: Renamed global_initialized to
16772 gnutls_global_initialized. Added internals for the
16773 :verify-hostname-error, :verify-error, and :verify-flags
16774 parameters of `gnutls-boot' and documented those parameters in the
16775 docstring. Start callback support.
16776 (emacs_gnutls_handshake): Add Woe32 support. Retry handshake
16777 unless a fatal error occurred. Call gnutls_alert_send_appropriate
16778 on error. Return error code.
16779 (emacs_gnutls_write): Call emacs_gnutls_handle_error.
16780 (emacs_gnutls_read): Likewise.
16781 (Fgnutls_boot): Return handshake error code.
16782 (emacs_gnutls_handle_error): New function.
16783 (wsaerror_to_errno): Likewise.
16785 * w32.h (emacs_gnutls_pull): Add prototype.
16786 (emacs_gnutls_push): Likewise.
16788 * w32.c (emacs_gnutls_pull): New function for GnuTLS on Woe32.
16789 (emacs_gnutls_push): Likewise.
16791 2011-04-24 Claudio Bley <claudio.bley@gmail.com> (tiny change)
16793 * process.c (wait_reading_process_output): Check if GnuTLS
16794 buffered some data internally if no FDs are set for TLS
16797 * makefile.w32-in (OBJ2): Add gnutls.$(O).
16798 (LIBS): Link to USER_LIBS.
16799 ($(BLD)/gnutls.$(0)): New target.
16801 2011-04-24 Eli Zaretskii <eliz@gnu.org>
16803 * xdisp.c (handle_single_display_spec): Rename the
16804 display_replaced_before_p argument into display_replaced_p, to
16805 make it consistent with the commentary. Fix typos in the
16808 * textprop.c (syms_of_textprop): Remove dead code.
16809 (copy_text_properties): Delete obsolete commentary about an
16810 interface that was deleted long ago. Fix typos in the description
16813 * msdos.c (XMenuActivate, XMenuAddSelection): Adjust argument list
16814 to changes in oldXMenu/XMenu.h from 2011-04-16.
16815 <menu_help_message, prev_menu_help_message>: Constify.
16816 (IT_menu_make_room): menu->help_text is now `const char **';
16819 * msdos.h (XMenuActivate, XMenuAddSelection): Adjust prototypes
16820 to changes in oldXMenu/XMenu.h from 2011-04-16.
16821 (struct XMenu): Declare `help_text' `const char **'.
16823 * xfaces.c <Qunspecified>: Make extern again.
16825 * syntax.c: Include sys/types.h before including regex.h, as
16828 * doc.c (get_doc_string): Improve the format passed to `error'.
16830 * doprnt.c (doprnt): Improve commentary.
16832 * term.c (init_tty) [MSDOS]: Fix 1st argument to maybe_fatal.
16834 * Makefile.in (TAGS): Depend on $(M_FILE) and $(S_FILE), and scan
16837 * makefile.w32-in (globals.h): Add a dummy recipe, to make any
16838 changes in globals.h immediately force recompilation.
16839 (TAGS): Depend on $(CURDIR)/m/intel386.h and
16840 $(CURDIR)/s/ms-w32.h.
16841 (TAGS-gmake): Scan $(CURDIR)/m/intel386.h and $(CURDIR)/s/ms-w32.h.
16843 * character.c (Fchar_direction): Function deleted.
16844 (syms_of_character): Don't defsubr it.
16845 <char-direction-table>: Deleted.
16847 2011-04-23 Eli Zaretskii <eliz@gnu.org>
16849 Fix doprnt so it could be used again safely in `verror'. (Bug#8435)
16850 * doprnt.c: Include limits.h.
16851 (SIZE_MAX): New macro.
16852 (doprnt): Return a size_t value. 2nd arg is now size_t.
16853 Many local variables are now size_t instead of int or unsigned.
16854 Improve overflow protection. Support `l' modifier for integer
16855 conversions. Support %l conversion. Don't assume an EMACS_INT
16856 argument for integer conversions and for %c.
16858 * lisp.h (doprnt): Restore prototype.
16860 * makefile.w32-in ($(BLD)/callint.$(O)): Depend on
16861 $(SRC)/character.h.
16863 * Makefile.in (base_obj): Add back doprnt.o.
16865 * deps.mk (doprnt.o): Add back prerequisites.
16866 (callint.o): Depend on character.h.
16868 * eval.c (internal_lisp_condition_case): Include the handler
16869 representation in the error message.
16870 (verror): Call doprnt instead of vsnprintf. Fix an off-by-one bug
16871 when breaking from the loop.
16873 * xdisp.c (vmessage): Call doprnt instead of vsnprintf.
16875 * callint.c (Fcall_interactively): When displaying error message
16876 about invalid control letter, pass the character's codepoint, not
16877 a pointer to its multibyte form. Improve display of the character
16878 in octal and display also its hex code.
16880 * character.c (char_string): Use %x to display the (unsigned)
16881 codepoint of an invalid character, to avoid displaying a bogus
16884 * font.c (check_otf_features): Pass SDATA of SYMBOL_NAME to
16885 `error', not SYMBOL_NAME itself.
16887 * coding.c (Fencode_sjis_char, Fencode_big5_char): Use %c for
16888 character arguments to `error'.
16890 * charset.c (check_iso_charset_parameter): Fix incorrect argument
16891 to `error' in error message about FINAL_CHAR argument. Make sure
16892 FINAL_CHAR is a character, and use %c when it is passed as
16893 argument to `error'.
16895 2011-04-23 Eli Zaretskii <eliz@gnu.org>
16897 * s/ms-w32.h (localtime): Redirect to sys_localtime.
16899 * w32.c: Include <time.h>.
16900 (sys_localtime): New function.
16902 2011-04-23 Chong Yidong <cyd@stupidchicken.com>
16904 * xdisp.c (init_xdisp): Initialize echo_area_window (Bug#6451).
16906 * buffer.c (syms_of_buffer): Doc fix (Bug#6902).
16908 2011-04-23 Samuel Thibault <sthibault@debian.org> (tiny change)
16910 * sysdep.c (wait_for_termination): On GNU Hurd, kill returns -1 on
16911 zombies (Bug#8467).
16913 2011-04-19 Eli Zaretskii <eliz@gnu.org>
16915 * syntax.h (SETUP_SYNTAX_TABLE_FOR_OBJECT): Fix setting of
16916 gl_state.e_property when gl_state.object is Qt.
16918 * insdel.c (make_gap_larger): Remove limitation of buffer size
16921 2011-04-18 Chong Yidong <cyd@stupidchicken.com>
16923 * xdisp.c (lookup_glyphless_char_display)
16924 (produce_glyphless_glyph): Handle cons cell entry in
16925 glyphless-char-display.
16926 (Vglyphless_char_display): Document it.
16928 * term.c (produce_glyphless_glyph): Handle cons cell entry in
16929 glyphless-char-display.
16931 2011-04-17 Chong Yidong <cyd@stupidchicken.com>
16933 * xdisp.c (get_next_display_element): Remove unnecessary ifdefs.
16935 * termhooks.h (FRAME_WINDOW_P): Remove duplicated definitions.
16937 * dispextern.h (FACE_SUITABLE_FOR_ASCII_CHAR_P): Add missing
16938 definition for no-X builds.
16940 2011-04-16 Paul Eggert <eggert@cs.ucla.edu>
16942 Static checks with GCC 4.6.0 and non-default toolkits.
16944 * s/sol2-6.h, s/unixware.h (PTY_TTY_NAME_SPRINTF): Protoize decl.
16946 * process.c (keyboard_bit_set): Define only if SIGIO.
16947 (send_process_trap): Mark it with NO_RETURN if it doesn't return.
16948 (send_process): Repair possible setjmp clobbering.
16950 * s/usg5-4-common.h (SETUP_SLAVE_PTY): Don't pass extra arg to 'fatal'.
16952 * eval.c: Include <stdio.h>, for vsnprintf on non-GNU/Linux hosts.
16954 * data.c (arith_error): Mark with NO_RETURN if it doesn't return.
16956 * alloc.c (bytes_used_when_full, SPARE_MEMORY, BYTES_USED):
16957 Define only if needed.
16959 * sysdep.c (_FILE_OFFSET_BITS): Make this hack even uglier
16960 by pacifying GCC about it. Maybe it's time to retire it?
16961 * xfaces.c (USG, __TIMEVAL__): Likewise.
16963 * dispextern.h (struct redisplay_interface): Rename param
16964 to avoid shadowing.
16965 * termhooks.h (struct terminal): Likewise.
16966 * xterm.c (xembed_send_message): Likewise.
16968 * insdel.c (make_gap_smaller): Define only if
16969 USE_MMAP_FOR_BUFFERS || REL_ALLOC || DOUG_LEA_MALLOC.
16971 * keyboard.c (read_char): Make a var volatile so longjmp won't clobber
16974 * emacs.c (MAX_HEAP_BSS_DIFF, my_edata): Move to where they're used,
16975 so that we aren't warned about unused symbols.
16977 * xfns.c (Fx_file_dialog): Rename local to avoid shadowing.
16979 * xdisp.c (x_produce_glyphs): Mark var as initialized (Bug#8512).
16981 * xfns.c (x_real_positions): Mark locals as initialized.
16983 * xmenu.c (xmenu_show): Don't use uninitialized vars.
16985 * xterm.c: Fix problems found by static analysis with other toolkits.
16986 (toolkit_scroll_bar_interaction): Define and use only if USE_X_TOOLKIT.
16987 (x_dispatch_event): Declare static if USE_GTK, and
16988 define if USE_GTK || USE_X_TOOLKIT.
16989 (SET_SAVED_BUTTON_EVENT): Define only if USE_X_TOOLKIT || USE_GTK.
16990 * xterm.h (x_dispatch_event): Extern only if USE_X_TOOLKIT.
16991 * xterm.c, xterm.h (x_mouse_leave): Bring this function back, but only
16992 if defined HAVE_MENUS && !defined USE_X_TOOLKIT && !defined USE_GTK.
16994 * xmenu.c (menu_help_callback): Pointer type fixes.
16995 Use const pointers when pointing at readonly data. Avoid pointer
16996 signedness clashes.
16997 (FALSE): Remove unused macro.
16998 (update_frame_menubar): Remove unused decl.
17000 * xfns.c (Fx_hide_tip): Move locals to avoid shadowing.
17002 * menu.c (push_submenu_start, push_submenu_end): Do not define unless
17003 USE_X_TOOLKIT || USE_GTK || HAVE_NS || defined HAVE_NTGUI.
17004 (single_menu_item): Rename local to avoid shadowing.
17006 * keyboard.c (make_lispy_event): Remove unused local var.
17008 * frame.c, frame.h (x_get_resource_string): Bring this back, but
17009 only if HAVE_X_WINDOWS && !USE_X_TOOLKIT.
17011 * bitmaps: Change bitmaps from unsigned char back to the X11
17012 compatible char. Avoid the old compiler warnings about
17013 out-of-range initializers by using, for example, '\xab' rather
17016 * xgselect.c (xgselect_initialize): Check vs interface
17017 even if ! (defined (USE_GTK) || defined (HAVE_GCONF)).
17019 * xmenu.c (xmenu_show): Rename parm to avoid shadowing.
17021 * xterm.c (x_create_toolkit_scroll_bar): Use const * for pointers
17022 to read-only memory.
17024 * fns.c (vector): Remove; this old hack is no longer needed.
17026 * xsmfns.c (create_client_leader_window): Rename shadowing arg.
17028 (gdk_x11_set_sm_client_id) [!USE_GTK]: Don't define.
17030 * xrdb.c (x_load_resources): Omit unused local.
17032 * xfns.c (free_frame_menubar, atof): Remove duplicate decls.
17033 (x_window): Rename locals to avoid shadowing.
17034 (USG): Use the kludged USG macro, to pacify gcc.
17036 * xterm.c (x_alloc_nearest_color_for_widget): Remove; unused.
17037 (x_term_init): Remove local to avoid shadowing.
17039 * xfns.c, xterm.c (_XEditResCheckMessages): Protoize decl.
17041 * xdisp.c, dispextern.h (set_vertical_scroll_bar): Now extern if
17042 USE_TOOLKIT_SCROLL_BARS && !USE_GTK, as xterm.c needs it then.
17044 2011-04-16 Eli Zaretskii <eliz@gnu.org>
17046 * gnutls.c (Fgnutls_boot): Don't pass Lisp_Object to `error'.
17048 Fix regex.c, syntax.c and friends for buffers > 2GB.
17049 * syntax.h (struct gl_state_s): Declare character position members
17052 * syntax.c (update_syntax_table): Declare 2nd argument EMACS_INT.
17054 * textprop.c (verify_interval_modification, interval_of):
17055 Declare arguments EMACS_INT.
17057 * intervals.c (adjust_intervals_for_insertion): Declare arguments
17060 * intervals.h (CHECK_TOTAL_LENGTH): Cast to EMACS_INT, not `int'.
17062 * indent.c (Fvertical_motion): Local variable it_start is now
17065 * regex.c (re_match, re_match_2, re_match_2_internal)
17066 (bcmp_translate, regcomp, regexec, print_double_string)
17067 (group_in_compile_stack, re_search, re_search_2, regex_compile)
17068 (re_compile_pattern, re_exec): Declare arguments and local
17069 variables `size_t' and `ssize_t' and return values `regoff_t', as
17071 (POP_FAILURE_REG_OR_COUNT) <pfreg>: Declare `long'.
17072 (CHECK_INFINITE_LOOP) <failure>: Declare `ssize_t'.
17073 <compile_stack_type>: `size' and `avail' are now `size_t'.
17075 * regex.h <regoff_t>: Use ssize_t, not int.
17076 (re_search, re_search_2, re_match, re_match_2): Arguments that
17077 specify buffer/string position and length are now ssize_t and
17078 size_t. Return type is regoff_t.
17080 2011-04-16 Ben Key <bkey76@gmail.com>
17082 * nsfont.m: Fixed bugs in ns_get_family and
17083 ns_descriptor_to_entity that were caused by using free to
17084 deallocate memory blocks that were allocated by xmalloc (via
17085 xstrdup). This caused Emacs to crash when compiled with
17086 XMALLOC_OVERRUN_CHECK defined (when Emacs was configured with
17087 --enable-checking=xmallocoverrun). xfree is now used to
17088 deallocate these memory blocks.
17090 2011-04-15 Paul Eggert <eggert@cs.ucla.edu>
17092 * sysdep.c (emacs_read): Remove unnecessary check vs MAX_RW_COUNT.
17094 emacs_write: Accept and return EMACS_INT for sizes.
17095 See http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00514.html
17097 * gnutls.c, gnutls.h (emacs_gnutls_read, emacs_gnutls_write):
17098 Accept and return EMACS_INT.
17099 (emacs_gnutls_write): Return the number of bytes written on
17101 * sysdep.c, lisp.h (emacs_read, emacs_write): Likewise.
17102 (emacs_read, emacs_write): Remove check for negative size, as the
17103 Emacs source code has been audited now.
17104 * sysdep.c (MAX_RW_COUNT): New macro, to work around kernel bugs.
17105 (emacs_read, emacs_write): Use it.
17106 * process.c (send_process): Adjust to the new signatures of
17107 emacs_write and emacs_gnutls_write. Do not attempt to store
17108 a byte offset into an 'int'; it might overflow.
17109 See http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00483.html
17111 * sound.c: Don't assume sizes fit in 'int'.
17112 (struct sound_device.period_size, alsa_period_size):
17113 Return EMACS_INT, not int.
17114 (struct sound_device.write, vox_write, alsa_write):
17115 Accept EMACS_INT, not int.
17116 (wav_play, au_play): Use EMACS_INT to store sizes and to
17117 record read return values.
17119 2011-04-15 Ben Key <bkey76@gmail.com>
17121 * keyboard.c (Qundefined): Don't declare static since it is used
17123 * xfaces.c (Qbold, Qexpanded, Qitalic, Qcondensed): Don't declare
17124 static since they are used in nsfont.m.
17126 2011-04-15 Stefan Monnier <monnier@iro.umontreal.ca>
17128 * process.c (Qprocessp): Don't declare static.
17129 * lisp.h (Qprocessp): Declare again.
17131 2011-04-15 Juanma Barranquero <lekktu@gmail.com>
17133 * font.c (Qopentype): Don't make static (used from w32uniscribe.c).
17135 2011-04-14 Paul Eggert <eggert@cs.ucla.edu>
17137 Improve C-level modularity by making more things 'static'.
17139 Don't publish debugger-only interfaces to other modules.
17140 * lisp.h (safe_debug_print, debug_output_compilation_hack):
17141 (verify_bytepos, count_markers): Move decls to the only modules
17143 * region-cache.h (pp_cache): Likewise.
17144 * window.h (check_all_windows): Likewise.
17145 * marker.c, print.c, region-cache.c, window.c: Decls moved here.
17147 * sysdep.c (croak): Now static, if
17148 defined TIOCNOTTY || defined USG5 || defined CYGWIN.
17149 * syssignal.h (croak): Declare only if not static.
17151 * alloc.c (refill_memory_reserve): Now static if
17152 !defined REL_ALLOC || defined SYSTEM_MALLOC.
17153 * lisp.h (refill_memory_reserve): Declare only if not static.
17155 * xsettings.c, xsettings.h (xsettings_get_system_normal_font):
17156 Define only if USE_LUCID.
17158 * xrdb.c (x_customization_string, x_rm_string): Now static.
17160 * xmenu.c (x_menu_wait_for_event): Export only if USE_MOTIF.
17161 * xterm.h (x_menu_wait_for_event): Declare only if USE_MOTIF.
17163 * xdisp.c (draw_row_with_mouse_face): Now static.
17164 * dispextern.h (draw_row_with_mouse_fave): Remove decl.
17166 * window.h (check_all_windows): Mark externally visible.
17168 * window.c (window_deletion_count): Now static.
17170 * undo.c: Make symbols static if they're not exported.
17171 (last_undo_buffer, last_boundary_position, pending_boundary):
17174 * textprop.c (interval_insert_behind_hooks): Now static.
17175 (interval_insert_in_front_hooks): Likewise.
17177 * term.c: Make symbols static if they're not exported.
17178 (tty_turn_off_highlight, get_tty_terminal, max_frame_cols):
17179 (max_frame_lines, tty_set_terminal_modes):
17180 (tty_reset_terminal_modes, tty_turn_off_highlight):
17181 (get_tty_terminal): Now static.
17182 (term_mouse_moveto): Do not define if HAVE_WINDOW_SYSTEM.
17183 * termhooks.h (term_mouse_moveto): Do not declare if
17184 HAVE_WINDOW_SYSTEM.
17185 * dispextern.h (tty_set_terminal_modes, tty_reset_terminal_modes):
17186 (tty_turn_off_highlight, get_tty_terminal): Remove decls.
17188 * sysdep.c: Make symbols static if they're not exported.
17189 (emacs_get_tty, emacs_set_tty, old_fcntl_flags, old_fcntl_owner):
17191 (sigprocmask_set, full_mask): Remove; unused.
17192 (wait_debugging): Mark as visible.
17193 * syssignal.h (SIGFULLMASK, full_mask): Remove decls.
17194 * systty.h (emacs_get_tty, emacs_set_tty): Remove decls.
17196 * syntax.c (syntax_temp): Define only if !__GNUC__.
17198 * sound.c (current_sound_device, current_sound): Now static.
17200 * search.c (searchbufs, searchbuf_head): Now static.
17202 * scroll.c (scroll_cost): Remove; unused.
17203 * dispextern.h (scroll_cost): Remove decl.
17205 * region-cache.h (pp_cache): Mark as externally visible.
17207 * process.c: Make symbols static if they're not exported.
17208 (process_tick, update_tick, create_process, chan_process):
17209 (Vprocess_alist, proc_buffered_char, datagram_access):
17210 (fd_callback_data, send_process_frame, process_sent_to): Now static.
17211 (deactivate_process): Mark defn as static, as well as decl.
17212 * lisp.h (create_process): Remove decl.
17213 * process.h (chan_process, Vprocess_alist): Remove decls.
17215 * print.c: Make symbols static if they're not exported.
17216 (print_depth, new_backquote_output, being_printed, print_buffer):
17217 (print_buffer_size, print_buffer_pos, print_buffer_pos_byte):
17218 (print_interval, print_number_index, initial_stderr_stream):
17220 * lisp.h (Fprinc): Remove decl.
17221 (debug_output_compilation_hack): Mark as externally visible.
17223 * sysdep.c (croak): Move decl from here to syssignal.h.
17224 * syssignal.h (croak): Put it here, so the API can be checked when
17225 'croak' is called from dissociate_if_controlling_tty.
17227 * minibuf.c: Make symbols static if they're not exported.
17228 (minibuf_save_list, choose_minibuf_frame): Now static.
17229 * lisp.h (choose_minibuf_frame): Remove decl.
17231 * lisp.h (verify_bytepos, count_markers): Mark as externally visible.
17233 * lread.c: Make symbols static if they're not exported.
17234 (read_objects, initial_obarray, oblookup_last_bucket_number):
17236 (make_symbol): Remove; unused.
17237 * lisp.h (initial_obarray, make_symbol): Remove decls.
17239 * keyboard.c: Make symbols static if they're not exported.
17240 (single_kboard, recent_keys_index, total_keys, recent_keys):
17241 (this_command_key_count_reset, raw_keybuf, raw_keybuf_count):
17242 (this_single_command_key_start, echoing, last_auto_save):
17243 (read_key_sequence_cmd, dribble, recursive_edit_unwind):
17244 (command_loop, echo_now, keyboard_init_hook, help_char_p):
17245 (quit_throw_to_read_char, command_loop_2, top_level_1, poll_timer):
17246 (Vlispy_mouse_stem, double_click_count):
17248 (force_auto_save_soon): Define only if SIGDANGER.
17249 (ignore_mouse_drag_p): Now static if
17250 !defined HAVE_WINDOW_SYSTEM || defined USE_GTK || defined HAVE_NS.
17251 (print_help): Remove; unused.
17252 (stop_character, last_timer_event): Mark as externally visible.
17253 * keyboard.h (ignore_mouse_drag_p): Declare only if
17254 defined HAVE_WINDOW_SYSTEM && !defined USE_GTK && !defined HAVE_NS.
17255 (echo_now, help_char_p, quit_throw_to_read_char): Remove decls.
17256 * lisp.h (echoing): Remove decl.
17257 (force_auto_save_soon): Declare only if SIGDANGER.
17258 * xdisp.c (redisplay_window): Simplify code, to make it more
17259 obvious that ignore_mouse_drag_p is not accessed if !defined
17260 USE_GTK && !defined HAVE_NS.
17262 * intervals.c: Make symbols static if they're not exported.
17263 (merge_properties_sticky, merge_interval_right, delete_interval):
17265 * intervals.h (merge_interval_right, delete_interval): Remove decls.
17267 * insdel.c: Make symbols static if they're not exported.
17268 However, leave prepare_to_modify_buffer alone. It's never
17269 called from outside this function, but that appears to be a bug.
17270 (combine_after_change_list, combine_after_change_buffer):
17271 (adjust_after_replace, signal_before_change): Now static.
17272 (adjust_after_replace_noundo): Remove; unused.
17273 * lisp.h (adjust_after_replace, adjust_after_replace_noundo):
17274 (signal_before_change): Remove decls.
17276 * indent.c (val_compute_motion, val_vmotion): Now static.
17278 * image.c: Make symbols static if they're not exported.
17279 * dispextern.h (x_create_bitmap_from_xpm_data): Do not declare
17281 * image.c (x_create_bitmap_from_xpm_data): Do not define if USE_GTK.
17282 (xpm_color_cache, ct_table, ct_colors_allocated): Now static.
17284 * fringe.c (standard_bitmaps): Now static.
17285 (max_used_fringe_bitmap): Now static, unless HAVE_NS.
17287 * frame.c: Make symbols static if they're not exported.
17288 (x_report_frame_params, make_terminal_frame): Now static.
17289 (get_frame_param): Now static, unless HAVE_NS.
17290 (x_fullscreen_adjust): Define if WINDOWSNT, not if HAVE_WINDOW_SYSTEM.
17291 (x_get_resource_string): Remove; not used.
17292 * frame.h (make_terminal_frame, x_report_frame_params):
17293 (x_get_resource_string); Remove decls.
17294 (x_fullscreen_adjust): Declare only if WINDOWSNT.
17295 * lisp.h (get_frame_param): Declare only if HAVE_NS.
17297 * font.c, fontset.c: Make symbols static if they're not exported.
17298 * dispextern.h (FACE_SUITABLE_FOR_ASCII_CHAR_P): New macro.
17299 (FACE_SUITABLE_FOR_CHAR_P): Use it.
17300 * font.c (font_close_object): Now static.
17301 * font.h (font_close_object): Remove.
17302 * fontset.c (FONTSET_OBJLIST): Remove.
17303 (free_realized_fontset) #if-0 the body, which does nothing.
17304 (face_suitable_for_char_p): #if-0, as it's never called.
17305 * fontset.h (face_suitable_for_char_p): Remove decl.
17306 * xfaces.c (face_at_string_position):
17307 Use FACE_SUITABLE_FOR_ASCII_CHAR_P, not FACE_SUITABLE_FOR_CHAR_P,
17308 since 0 is always ASCII.
17310 * fns.c (weak_hash_tables): Now static.
17312 * fileio.c: Make symbols static if they're not exported.
17313 (auto_saving, auto_save_mode_bits, auto_save_error_occurred):
17314 (Vwrite_region_annotation_buffers): Now static.
17316 * eval.c: Make symbols static if they're not exported.
17317 (backtrace_list, lisp_eval_depth, when_entered_debugger): Now static.
17318 * lisp.h (backtrace_list): Remove decl.
17320 * emacs.c: Make symbols static if they're not exported.
17321 (malloc_state_ptr, malloc_using_checking, syms_of_emacs):
17322 (fatal_error_code, fatal_error_signal_hook, standard_args):
17324 (fatal_error_signal): Now static, unless FLOAT_CATCH_SIGKILL.
17325 (DEFINE_DUMMY_FUNCTION): Mark function as externally visible.
17326 (__CTOR_LIST__, __DTOR_LIST__): Now externally visible.
17327 * lisp.h (fatal_error_signal_hook): Remove decl.
17328 (fatal_error_signal): Declare only if FLOAT_CATCH_SIGKILL.
17330 * editfns.c: Move a (normally-unused) function to its only use.
17331 * editfns.c, lisp.h (get_operating_system_release): Remove.
17332 * process.c (init_process) [DARWIN_OS]: Do it inline, as it is not
17333 worth the hassle of breaking this out.
17335 * xterm.c: Make symbols static if they're not exported.
17336 (x_raise_frame, x_lower_frame, x_wm_set_window_state):
17337 (x_wm_set_icon_pixmap, x_initialize, XTread_socket_fake_io_error):
17338 (x_destroy_window, x_delete_display):
17340 (x_dispatch_event): Now static if ! (USE_MOTIF || USE_X_TOOLKIT).
17341 (x_mouse_leave): Remove; unused.
17342 * xterm.h (x_display_info_for_name, x_raise_frame, x_lower_frame):
17343 (x_destroy_window, x_wm_set_window_state, x_wm_set_icon_pixmap):
17344 (x_delete_display, x_initialize, x_set_border_pixel, x_screen_planes):
17346 (x_mouse_leave): Declare only if WINDOWSNT.
17347 (x_dispatch_event): Declare only if USE_MOTIF or USE_X_TOOLKIT.
17348 (xic_create_fontsetname): Declare only if HAVE_X_WINDOWS &&
17351 * ftxfont.c: Make symbols static if they're not exported.
17352 (ftxfont_driver): Export only if !defined HAVE_XFT && def8ined
17354 * font.h (ftxfont_driver): Likewise.
17356 * xfns.c: Make symbols static if they're not exported.
17357 (x_last_font_name, x_display_info_for_name):
17358 (x_set_foreground_color, x_set_background_color, x_set_mouse_color):
17359 (x_set_cursor_color, x_set_border_pixel, x_set_border_color):
17360 (x_set_cursor_type, x_set_icon_type, x_set_icon_name):
17361 (x_set_scroll_bar_foreground, x_set_scroll_bar_background):
17362 (x_explicitly_set_name, x_set_title, xic_defaut_fontset, tip_timer):
17363 (last_show_tip_args): Now static.
17364 (xic_defaut_fontset, xic_create_fontsetname): Define only if
17365 defined HAVE_X_WINDOWS && defined USE_X_TOOLKIT
17366 (x_screen_planes): Remove; unused.
17367 * dispextern.h (x_screen_planes): Remove decl.
17369 * dispnew.c: Make symbols static if they're not exported.
17370 * dispextern.h (redraw_garbaged_frames, scrolling):
17371 (increment_row_positions): Remove.
17372 * dispnew.c (new_glyph_matrix, increment_row_positions, scrolling):
17373 (delayed_size_change, glyph_matrix_count, glyph_pool_count):
17375 (redraw_garbaged_frames): Remove; unused.
17377 * xfaces.c: Make symbols static if they're not exported.
17378 * dispextern.h (ascii_face_of_lisp_face, free_realized_face):
17380 * xterm.h (defined_color): Remove decls.
17381 (x_free_dpy_colors): Declare only if USE_X_TOOLKIT.
17382 * xfaces.c (tty_suppress_bold_inverse_default_colors_p):
17383 (menu_face_changed_default, defined_color, free_realized_face):
17384 (x_free_dpy_colors): Define only if USE_X_TOOLKIT.
17385 (ascii_face_of_lisp_face): Remove; unused.
17387 * xdisp.c: Make symbols static if they're not exported.
17388 * dispextern.h (scratch_glyph_row, window_box_edges):
17389 (glyph_to_pixel_coords, set_cursor_from_row):
17390 (get_next_display_element, set_iterator_to_next):
17391 (highlight_trailing_whitespace, frame_to_window_pixel_xy):
17392 (show_mouse_face): Remove decls
17393 * frame.h (message_buf_print): Likewise.
17394 * lisp.h (pop_message, set_message, check_point_in_composition):
17396 * xterm.h (set_vertical_scroll_bar): Likewise.
17397 * xdisp.c (list_of_error, Vmessage_stack, line_number_displayed):
17398 (message_buf_print, scratch_glyph_row, displayed_buffer):
17399 (set_iterator_to_next, pop_message, set_message, set_cursor_from_row):
17400 (get_next_display_element, show_mouse_face, window_box_edges):
17401 (frame_to_window_pixel_xy, check_point_in_composition):
17402 (set_vertical_scroll_bar, highlight_trailing_whitespace): Now static.
17403 (glyph_to_pixel_coords): Remove; unused.
17405 * dired.c (file_name_completion): Now static.
17407 * dbusbind.c (xd_in_read_queued_messages): Now static.
17409 * lisp.h (circular_list_error, FOREACH): Remove; unused.
17410 * data.c (circular_list_error): Remove.
17412 * commands.h (last_point_position, last_point_position_buffer):
17413 (last_point_position_window): Remove decls.
17414 * keyboard.c: Make these variables static.
17416 * coding.h (coding, code_convert_region, encode_coding_gap):
17418 * coding.c (Vsjis_coding_system, Vbig5_coding_system):
17419 (iso_code_class, detect_coding, code_convert_region): Now static.
17420 (encode_coding_gap): Remove; unused.
17422 * chartab.c (chartab_chars, chartab_bits): Now static.
17424 * charset.h (charset_iso_8859_1): Remove decl.
17425 * charset.c (charset_iso_8859_1, charset_emacs, map_charset_for_dump):
17428 * ccl.h (check_ccl_update, Vccl_program_table): Remove decls.
17429 * ccl.c (Vccl_program_table): Now static.
17430 (check_ccl_update): Remove; unused.
17432 * category.c (SET_CATEGORY_SET, set_category_set): Move here.
17433 * category.h: ... from here.
17434 * category.c (check_category_table, set_category_set): Now static.
17436 * casetab.c (Vascii_upcase_table, Vascii_eqv_table): Now static.
17437 * lisp.h: Remove these decls.
17439 * buffer.c (buffer_count): Remove unused var.
17441 * bidi.c (bidi_dump_cached_states): Mark as externally visible,
17442 so that it's not optimized away.
17443 (bidi_ignore_explicit_marks_for_paragraph_level): Likewise.
17444 * dispextern.h (bidi_dump_cached_states): Remove, since it's
17445 exported only to the debugger.
17447 * atimer.c (alarm_signal_handler, run_all_atimers): Now static.
17448 * atimer.h (run_all_atimers): Remove; not exported.
17450 font.c: Make copy_font_spec and merge_font_spec ordinary C functions.
17451 * font.c (copy_font_spec): Rename from Fcopy_font_spec, since it
17452 was inaccessible from Lisp.
17453 (merge_font_spec): Likewise, renaming from Fmerge_font_spec.
17454 * font.c, font.h, fontset.c, xfaces.c, xfont.c: Change all uses.
17456 alloc.c: Import and export fewer symbols, and remove unused items.
17457 * lisp.h (suppress_checking, die): Declare only if ENABLE_CHECKING
17459 (suppress_checking): Add EXTERNALLY_VISIBLE attribute, so that
17460 it's not optimized away by whole-program optimization.
17461 (message_enable_multibyte, free_misc): Remove.
17462 (catchlist, handlerlist, mark_backtrace):
17463 Declare only if BYTE_MARK_STACK.
17464 (mark_byte_stack): Likewise, fixing a ifdef-vs-if typo.
17465 * alloc.c (pure): Export only if VIRT_ADDR_VARIES is defined.
17466 (message_enable_multibyte): Remove decl.
17467 (free_misc, interval_free_list, float_block, float_block_index):
17468 (n_float_blocks, float_free_list, cons_block, cons_block_index):
17469 (cons_free_list, last_marked_index):
17471 (suppress_checking, die): Define only if ENABLE_CHECKING is defined.
17472 * eval.c (catchlist, handlerlist): Export only if BYTE_MARK_STACK.
17473 (mark_backtrace): Define only if BYTE_MARK_STACK.
17474 * xdisp.c (message_enable_multibyte): Now static.
17476 Declare Lisp_Object Q* variables to be 'static' if not exported.
17477 This makes it easier for human readers (and static analyzers)
17478 to see whether these variables are used from other modules.
17479 * alloc.c, buffer.c, bytecode.c, callint.c, casetab.c, category.c:
17480 * ccl.c, character.c, charset.c, cmds.c, coding.c, composite.c:
17481 * data.c, dbusbind.c, dired.c, editfns.c, eval.c, fileio.c, fns.c:
17482 * font.c, frame.c, fringe.c, ftfont.c, image.c, keyboard.c, keymap.c:
17483 * lread.c, macros.c, minibuf.c, print.c, process.c, search.c:
17484 * sound.c, syntax.c, textprop.c, window.c, xdisp.c, xfaces.c, xfns.c:
17485 * xmenu.c, xselect.c:
17486 Declare Q* vars static if they are not used in other modules.
17487 * ccl.h, character.h, charset.h, coding.h, composite.h, font.h:
17488 * frame.h, intervals.h, keyboard.h, lisp.h, process.h, syntax.h:
17489 Remove decls of unexported vars.
17490 * keyboard.h (EVENT_HEAD_UNMODIFIED): Remove now-unused macro.
17492 * lisp.h (DEFINE_FUNC): Make sname 'static'.
17494 Make Emacs functions such as Fatom 'static' by default.
17495 This makes it easier for human readers (and static analyzers)
17496 to see whether these functions can be called from other modules.
17497 DEFUN now defines a static function. To make the function external
17498 so that it can be used in other C modules, use the new macro DEFUE.
17499 * lisp.h (Funibyte_char_to_multibyte, Fsyntax_table_p):
17500 (Finit_image_library):
17501 (Feval_region, Fbacktrace, Ffetch_bytecode, Fswitch_to_buffer):
17502 (Ffile_executable_p, Fmake_symbolic_link, Fcommand_execute):
17503 (Fget_process, Fdocumentation_property, Fbyte_code, Ffile_attributes):
17504 Remove decls, since these functions are now static.
17505 (Funintern, Fget_internal_run_time): New decls, since these functions
17506 were already external.
17508 * alloc.c, buffer.c, callint.c, callproc.c, casefiddle.c, casetab.c:
17509 * ccl.c, character.c, chartab.c, cmds.c, coding.c, data.c, dispnew.c:
17510 * doc.c, editfns.c, emacs.c, eval.c, fileio.c, filelock.c, floatfns.c:
17511 * fns.c, font.c, fontset.c, frame.c, image.c, indent.c:
17512 * keyboard.c, keymap.c, lread.c:
17513 * macros.c, marker.c, menu.c, minibuf.c, print.c, process.c, search.c:
17514 * syntax.c, term.c, terminal.c, textprop.c, undo.c:
17515 * window.c, xdisp.c, xfaces.c, xfns.c, xmenu.c, xsettings.c:
17516 Mark functions with DEFUE instead of DEFUN,
17517 if they are used in other modules.
17518 * buffer.c (Fset_buffer_major_mode, Fdelete_overlay): New forward
17519 decls for now-static functions.
17520 * buffer.h (Fdelete_overlay): Remove decl.
17521 * callproc.c (Fgetenv_internal): Mark as internal.
17522 * composite.c (Fremove_list_of_text_properties): Remove decl.
17523 (Fcomposition_get_gstring): New forward static decl.
17524 * composite.h (Fcomposite_get_gstring): Remove decl.
17525 * dired.c (Ffile_attributes): New forward static decl.
17526 * doc.c (Fdocumntation_property): New forward static decl.
17527 * eval.c (Ffetch_bytecode): New forward static decl.
17528 (Funintern): Remove extern decl; now in .h file where it belongs.
17529 * fileio.c (Fmake_symbolic_link): New forward static decl.
17530 * image.c (Finit_image_library): New forward static decl.
17531 * insdel.c (Fcombine_after_change_execute): Make forward decl static.
17532 * intervals.h (Fprevious_property_change):
17533 (Fremove_list_of_text_properties): Remove decls.
17534 * keyboard.c (Fthis_command_keys): Remove decl.
17535 (Fcommand_execute): New forward static decl.
17536 * keymap.c (Flookup_key): New forward static decl.
17537 (Fcopy_keymap): Now static.
17538 * keymap.h (Flookup_key): Remove decl.
17539 * process.c (Fget_process): New forward static decl.
17540 (Fprocess_datagram_address): Mark as internal.
17541 * syntax.c (Fsyntax_table_p): New forward static decl.
17542 (skip_chars): Remove duplicate decl.
17543 * textprop.c (Fprevious_property_change): New forward static decl.
17544 * window.c (Fset_window_fringes, Fset_window_scroll_bars):
17546 (Fset_window_margins, Fset_window_vscroll): New forward static decls.
17547 * window.h (Fset_window_vscroll, Fset_window_margins): Remove decls.
17549 * editfns.c (Fformat): Remove unreachable code.
17551 2011-04-14 Andreas Schwab <schwab@linux-m68k.org>
17553 * fileio.c (Finsert_file_contents): Fix typo in 2005-05-13
17556 2011-04-13 Eli Zaretskii <eliz@gnu.org>
17558 * xdisp.c (handle_invisible_prop): Don't call bidi_paragraph_init
17559 when at ZV. (Bug#8487)
17561 2011-04-12 Andreas Schwab <schwab@linux-m68k.org>
17563 * charset.c (Fclear_charset_maps): Use xfree instead of free.
17565 * keyboard.c (parse_tool_bar_item): Likewise.
17566 * sound.c (sound_cleanup, alsa_close): Likewise.
17567 * termcap.c (tgetent): Likewise.
17568 * xfns.c (x_default_font_parameter): Likewise.
17569 * xsettings.c (read_and_apply_settings): Likewise.
17571 * alloc.c (overrun_check_malloc, overrun_check_realloc)
17572 (overrun_check_free): Protoize.
17574 2011-04-12 Paul Eggert <eggert@cs.ucla.edu>
17576 * sysdep.c (emacs_read, emacs_write): Check for negative sizes
17577 since callers should never pass a negative size.
17578 Change the signature to match that of plain 'read' and 'write'; see
17579 <http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00397.html>.
17580 * lisp.h: Update prototypes of emacs_write and emacs_read.
17582 2011-04-11 Eli Zaretskii <eliz@gnu.org>
17584 * xdisp.c (redisplay_window): Don't try to determine the character
17585 position of the scroll margin if the window start point w->startp
17586 is outside the buffer's accessible region. (Bug#8468)
17588 2011-04-10 Eli Zaretskii <eliz@gnu.org>
17590 Fix write-region and its subroutines for buffers > 2GB.
17591 * fileio.c (a_write, e_write): Modify declaration of arguments and
17592 local variables to support buffers larger than 2GB.
17593 (Fcopy_file): Use EMACS_INT for return value of emacs_read.
17595 * sysdep.c (emacs_write, emacs_read): Use ssize_t for last
17596 argument, local variables, and return value.
17598 * lisp.h: Update prototypes of emacs_write and emacs_read.
17600 * sound.c (vox_write): Use ssize_t for return value of emacs_write.
17602 2011-04-10 Paul Eggert <eggert@cs.ucla.edu>
17604 * xdisp.c (vmessage): Use memchr, not strnlen, which some hosts lack.
17606 Fix more problems found by GCC 4.6.0's static checks.
17608 * xdisp.c (vmessage): Use a better test for character truncation.
17610 * charset.c (load_charset_map): <, not <=, for optimization,
17611 and to avoid potential problems with integer overflow.
17612 * chartab.c (sub_char_table_set_range, char_table_set_range): Likewise.
17613 * casetab.c (set_identity, shuffle): Likewise.
17614 * editfns.c (Fformat): Likewise.
17615 * syntax.c (skip_chars): Likewise.
17617 * xmenu.c (set_frame_menubar): Allocate smaller local vectors.
17618 This also lets GCC 4.6.0 generate slightly better loop code.
17620 * callint.c (Fcall_interactively): <, not <=, for optimization.
17621 (Fcall_interactively): Count the number of arguments produced,
17622 not the number of arguments given. This is simpler and lets GCC
17623 4.6.0 generate slightly better code.
17625 * ftfont.c: Distingish more carefully between FcChar8 and char.
17626 The previous code passed unsigned char * to a functions like
17627 strlen and xstrcasecmp that expect char *, which does not
17628 conform to the C standard.
17629 (get_adstyle_property, ftfont_pattern_entity): Use FcChar8 for
17630 arguments to FcPatternGetString, and explicitly cast FcChar8 * to
17631 char * when the C standard requires it.
17633 * keyboard.c (read_char): Remove unused var.
17635 * eval.c: Port to Windows vsnprintf (Bug#8435).
17636 Include <limits.h>.
17637 (SIZE_MAX): Define if the headers do not.
17638 (verror): Do not give up if vsnprintf returns a negative count.
17639 Instead, grow the buffer. This ports to Windows vsnprintf, which
17640 does not conform to C99. Problem reported by Eli Zaretskii.
17641 Also, simplify the allocation scheme, by avoiding the need for
17642 calling realloc, and removing the ALLOCATED variable.
17644 * eval.c (verror): Initial buffer size is 4000 (not 200) bytes.
17646 Remove invocations of doprnt, as Emacs now uses vsnprintf.
17647 But keep the doprint source code for now, as we might revamp it
17648 and use it again (Bug#8435).
17649 * lisp.h (doprnt): Remove.
17650 * Makefile.in (base_obj): Remove doprnt.o.
17651 * deps.mk (doprnt.o): Remove.
17653 error: Print 32- and 64-bit integers portably (Bug#8435).
17654 Without this change, on typical 64-bit hosts error ("...%d...", N)
17655 was used to print both 32- and 64-bit integers N, which relied on
17656 undefined behavior.
17657 * lisp.h, m/amdx86-64.h, m/ia64.h, m/ibms390x.h (pEd): New macro.
17658 * lisp.h (error, verror): Mark as printf-like functions.
17659 * eval.c (verror): Use vsnprintf, not doprnt, to do the real work.
17660 Report overflow in size calculations when allocating printf buffer.
17661 Do not truncate output string at its first null byte.
17662 * xdisp.c (vmessage): Use vsnprintf, not doprnt, to do the real work.
17663 Truncate the output at a character boundary, since vsnprintf does not
17665 * charset.c (check_iso_charset_parameter): Convert internal
17666 character to string before calling 'error', since %c now has the
17668 * coding.c (Fdecode_sjis_char, Fdecode_big5_char): Avoid int
17669 overflow when computing char to be passed to 'error'. Do not
17670 pass Lisp_Object to 'error'; pass the integer instead.
17671 * nsfns.m (Fns_do_applescript): Use int, not long, since it's
17672 formatted with plain %d.
17674 * eval.c (internal_lisp_condition_case): Don't pass spurious arg.
17676 * keyboard.c (access_keymap_keyremap): Print func name, not garbage.
17678 * coding.c (Fdecode_sjis_char): Don't assume CODE fits in int.
17680 * xterm.c (x_catch_errors): Remove duplicate declaration.
17682 * term.c (maybe_fatal): Mark its 3rd arg as a printf format, too.
17684 * xdisp.c, lisp.h (message_nolog): Remove; unused.
17686 2011-04-10 Jim Meyering <meyering@redhat.com>
17688 use ssize_t and size_t for read- and write-like emacs_gnutls_* functions
17689 * gnutls.c (emacs_gnutls_read): Adjust signature to be more read-like:
17690 return ssize_t not "int", and use size_t as the buffer length.
17691 (emacs_gnutls_write): Likewise, and make the buffer pointer "const".
17692 * gnutls.h: Update declarations.
17693 * process.c (read_process_output): Use ssize_t, to match.
17694 (send_process): Likewise.
17696 2011-04-09 Chong Yidong <cyd@stupidchicken.com>
17698 * image.c (Fimagemagick_types): Doc fix, and comment cleanup.
17700 2011-04-09 Chong Yidong <cyd@stupidchicken.com>
17702 * ftfont.c (get_adstyle_property, ftfont_pattern_entity):
17703 Use unsigned char, to match FcChar8 type definition.
17705 * xterm.c (handle_one_xevent):
17706 * xmenu.c (create_and_show_popup_menu):
17707 * xselect.c (x_decline_selection_request)
17708 (x_reply_selection_request): Avoid type-punned deref of X events.
17710 2011-04-09 Eli Zaretskii <eliz@gnu.org>
17712 Fix some uses of `int' instead of EMACS_INT.
17713 * search.c (string_match_1, fast_string_match)
17714 (fast_c_string_match_ignore_case, fast_string_match_ignore_case)
17715 (scan_buffer, find_next_newline_no_quit)
17716 (find_before_next_newline, search_command, Freplace_match)
17717 (Fmatch_data): Make some `int' variables be EMACS_INT.
17719 * xdisp.c (display_count_lines): 3rd argument and return value now
17720 EMACS_INT. All callers changed.
17721 (pint2hrstr): Last argument is now EMACS_INT.
17723 * coding.c (detect_coding_utf_8, detect_coding_emacs_mule)
17724 (detect_coding_iso_2022, detect_coding_sjis, detect_coding_big5)
17725 (detect_coding_ccl, detect_coding_charset, decode_coding_utf_8)
17726 (decode_coding_utf_16, decode_coding_emacs_mule)
17727 (decode_coding_iso_2022, decode_coding_sjis, decode_coding_big5)
17728 (decode_coding_ccl, decode_coding_charset)
17729 <consumed_chars, consumed_chars_base>: Declare EMACS_INT.
17730 (decode_coding_iso_2022, decode_coding_emacs_mule)
17731 (decode_coding_sjis, decode_coding_big5, decode_coding_charset)
17732 <char_offset, last_offset>: Declare EMACS_INT.
17733 (encode_coding_utf_8, encode_coding_utf_16)
17734 (encode_coding_emacs_mule, encode_invocation_designation)
17735 (encode_designation_at_bol, encode_coding_iso_2022)
17736 (encode_coding_sjis, encode_coding_big5, encode_coding_ccl)
17737 (encode_coding_raw_text, encode_coding_charset) <produced_chars>:
17739 (ASSURE_DESTINATION): Declare more_bytes EMACS_INT.
17740 (encode_invocation_designation): Last argument P_NCHARS is now
17742 (decode_eol): Declare pos_byte, pos, and pos_end EMACS_INT.
17743 (produce_chars): from_nchars and to_nchars are now EMACS_INT.
17745 * coding.h (struct coding_system) <head_ascii>: Declare EMACS_INT.
17748 * ccl.c (Fccl_execute_on_string): Declare some variables
17751 2011-04-08 Samuel Thibault <sthibault@debian.org> (tiny change)
17753 * term.c (init_tty): Fix incorrect ifdef placement (Bug#8450).
17755 2011-03-19 Christoph Scholtes <cschol2112@googlemail.com>
17757 * process.c (Fformat_network_address): Doc fix.
17759 2011-04-08 T.V. Raman <tv.raman.tv@gmail.com> (tiny change)
17761 * xml.c (parse_region): Avoid creating spurious whitespace nodes.
17763 2011-04-08 Chong Yidong <cyd@stupidchicken.com>
17765 * keyboard.c (read_char): Call Lisp function help-form-show,
17766 instead of using internal_with_output_to_temp_buffer.
17767 (Qhelp_form_show): New var.
17768 (syms_of_keyboard): Use DEFSYM macro.
17770 * print.c (internal_with_output_to_temp_buffer): Function deleted.
17772 * lisp.h (internal_with_output_to_temp_buffer): Remove prototype.
17774 2011-04-06 Chong Yidong <cyd@stupidchicken.com>
17776 * process.c (Flist_processes): Remove to Lisp.
17777 (list_processes_1): Delete.
17779 2011-04-06 Eli Zaretskii <eliz@gnu.org>
17781 * msdos.c (careadlinkat, careadlinkatcwd): MS-DOS replacements.
17783 * w32.c (careadlinkat, careadlinkatcwd): New always-fail stubs.
17785 2011-04-06 Paul Eggert <eggert@cs.ucla.edu>
17787 Fix more problems found by GCC 4.6.0's static checks.
17789 * xmenu.c (Fx_popup_dialog): Don't assume string is free of formats.
17791 * menu.c (Fx_popup_menu): Don't assume error_name lacks printf formats.
17793 * lisp.h (message, message_nolog, fatal): Mark as printf-like.
17795 * xdisp.c (vmessage): Mark as a printf-like function.
17797 * term.c (vfatal, maybe_fatal): Mark as printf-like functions.
17799 * sound.c (sound_warning): Don't crash if arg contains a printf format.
17801 * image.c (tiff_error_handler, tiff_warning_handler): Mark as
17802 printf-like functions.
17803 (tiff_load): Add casts to remove these marks before passing them
17804 to system-supplied API.
17806 * eval.c (Fsignal): Remove excess argument to 'fatal'.
17808 * coding.c (EMIT_ONE_BYTE, EMIT_TWO_BYTES): Use unsigned, not int.
17809 This avoids several warnings with gcc -Wstrict-overflow.
17810 (DECODE_COMPOSITION_RULE): If the rule is invalid, goto invalid_code
17811 directly, rather than having caller test rule sign. This avoids
17812 some unnecessary tests.
17813 * composite.h (COMPOSITION_ENCODE_RULE_VALID): New macro.
17814 (COMPOSITION_ENCODE_RULE): Arguments now must be valid. This
17815 affects only one use, in DECODE_COMPOSITION_RULE, which is changed.
17817 * xfont.c (xfont_text_extents): Remove var that was set but not used.
17818 (xfont_open): Avoid unnecessary tests.
17820 * composite.c (composition_gstring_put_cache): Use unsigned integer.
17822 * composite.h, composite.c (composition_gstring_put_cache):
17823 Use EMACS_INT, not int, for length.
17825 * composite.h (COMPOSITION_DECODE_REFS): New macro,
17826 breaking out part of COMPOSITION_DECODE_RULE.
17827 (COMPOSITION_DECODE_RULE): Use it.
17828 * composite.c (get_composition_id): Remove unused local vars,
17829 by using the new macro.
17831 * textprop.c (set_text_properties_1): Change while to do-while,
17832 since the condition is always true at first.
17834 * intervals.c (graft_intervals_into_buffer): Mark var as used.
17835 (interval_deletion_adjustment): Return unsigned value.
17838 * process.c (list_processes_1, create_pty, read_process_output):
17839 (exec_sentinel): Remove vars that were set but not used.
17840 (create_pty): Remove unnecessary "volatile"s.
17841 (Fnetwork_interface_info): Avoid possibility of int overflow.
17842 (read_process_output): Do adaptive read buffering even if carryover.
17843 (read_process_output): Simplify nbytes computation if buffered.
17845 * bytecode.c (exec_byte_code): Rename local to avoid shadowing.
17847 * syntax.c (scan_words): Remove var that was set but not used.
17848 (update_syntax_table): Use unsigned instead of int.
17850 * lread.c (lisp_file_lexically_bound_p): Use ints rather than endptrs.
17851 (lisp_file_lexically_bound_p, read1): Use unsigned instead of int.
17852 (safe_to_load_p): Make the end-of-loop test the inverse of the in-loop.
17854 * print.c (print_error_message): Avoid int overflow.
17856 * font.c (font_list_entities): Redo for clarity,
17857 so that reader need not know FONT_DPI_INDEX + 1 == FONT_SPACING_INDEX.
17859 * font.c (font_find_for_lface, Ffont_get_glyphs): Remove unused vars.
17860 (font_score): Avoid potential overflow in diff calculation.
17862 * fns.c (substring_both): Remove var that is set but not used.
17863 (sxhash): Redo loop for clarity and to avoid wraparound warning.
17865 * eval.c (funcall_lambda): Rename local to avoid shadowing.
17867 * alloc.c (mark_object_loop_halt, mark_object): Use size_t, not int.
17868 Otherwise, GCC 4.6.0 optimizes the loop check away since the check
17869 can always succeed if overflow has undefined behavior.
17871 * search.c (boyer_moore, wordify): Remove vars set but not used.
17872 (wordify): Omit three unnecessary tests.
17874 * indent.c (MULTIBYTE_BYTES_WIDTH): Don't compute wide_column.
17875 All callers changed. This avoids the need for an unused var.
17877 * casefiddle.c (casify_region): Remove var that is set but not used.
17879 * dired.c (file_name_completion): Remove var that is set but not used.
17881 * fileio.c (Finsert_file_contents): Make EOF condition clearer.
17883 * fileio.c (Finsert_file_contents): Avoid signed integer overflow.
17884 (Finsert_file_contents): Remove unnecessary code checking fd.
17886 * minibuf.c (read_minibuf_noninteractive): Use size_t for sizes.
17887 Check for integer overflow on size calculations.
17889 * buffer.c (Fprevious_overlay_change): Remove var that is set
17892 * keyboard.c (menu_bar_items, read_char_minibuf_menu_prompt):
17893 Remove vars that are set but not used.
17894 (timer_check_2): Don't assume timer-list and idle-timer-list are lists.
17895 (timer_check_2): Mark vars as initialized.
17897 * gtkutil.c (xg_get_file_with_chooser): Mark var as initialized.
17899 * image.c (lookup_image): Remove var that is set but not used.
17900 (xbm_load): Use parse_p, for gcc -Werror=unused-but-set-variable.
17902 * fontset.c (Finternal_char_font, Ffontset_info): Remove vars
17903 that are set but not used.
17905 * xfns.c (make_invisible_cursor): Don't return garbage
17906 if XCreateBitmapFromData fails (Bug#8410).
17908 * xselect.c (x_get_local_selection, x_handle_property_notify):
17909 Remove vars that are set but not used.
17911 * xfns.c (x_create_tip_frame): Remove var that is set but not used.
17912 (make_invisible_cursor): Initialize a possibly-uninitialized variable.
17914 * xterm.c (x_scroll_bar_to_input_event) [!USE_GTK]:
17915 Remove var that is set but not used.
17916 (scroll_bar_windows_size): Now size_t, not int.
17917 (x_send_scroll_bar_event): Use size_t, not int, for sizes.
17918 Check for overflow.
17920 * xfaces.c (realize_named_face): Remove vars that are set but not used.
17921 (map_tty_color) [!defined MSDOS]: Likewise.
17923 * term.c (tty_write_glyphs): Use size_t; this avoids overflow warning.
17925 * coding.c: Remove vars that are set but not used.
17926 (DECODE_COMPOSITION_RULE): Remove 2nd arg, which is unused.
17927 All callers changed.
17928 (decode_coding_utf_8, decode_coding_utf_16 decode_coding_emacs_mule):
17929 (decode_coding_iso_2022, encode_coding_sjis, encode_coding_big5):
17930 (decode_coding_charset): Remove vars that are set but not used.
17932 * bytecode.c (Fbyte_code) [!defined BYTE_CODE_SAFE]: Remove var
17933 that is set but not used.
17935 * print.c (print_object): Remove var that is set but not used.
17937 Replace 2 copies of readlink code with 1 gnulib version (Bug#8401).
17938 The gnulib version avoids calling malloc in the usual case,
17939 and on 64-bit hosts doesn't have some arbitrary 32-bit limits.
17940 * fileio.c (Ffile_symlink_p): Use emacs_readlink.
17941 * filelock.c (current_lock_owner): Likewise.
17942 * lisp.h (READLINK_BUFSIZE, emacs_readlink): New function.
17943 * sysdep.c: Include allocator.h, careadlinkat.h.
17944 (emacs_no_realloc_allocator): New static constant.
17945 (emacs_readlink): New function.
17946 * deps.mk (sysdep.o): Depend on ../lib/allocator.h and on
17947 ../lib/careadlinkat.h.
17949 2011-04-04 Stefan Monnier <monnier@iro.umontreal.ca>
17951 * keyboard.c (safe_run_hook_funcall): Fix last change (don't stop at the
17952 first non-nil return value).
17954 2011-04-03 Jan Djärv <jan.h.d@swipnet.se>
17956 * nsterm.m (ns_update_auto_hide_menu_bar): Define MAC_OS_X_VERSION_10_6
17957 if not defined (Bug#8403).
17959 2011-04-02 Juanma Barranquero <lekktu@gmail.com>
17961 * xdisp.c (display_count_lines): Remove parameter `start',
17962 unused since 1998-01-01T02:27:27Z!rms@gnu.org. All callers changed.
17963 (get_char_face_and_encoding): Remove parameter `multibyte_p',
17964 unused since 2008-05-14T01:40:23Z!handa@m17n.org. All callers changed.
17965 (fill_stretch_glyph_string): Remove parameters `row' and `area',
17966 unused at least since Kim's GUI unification at 2003-03-16T20:45:46Z!storm@cua.dk
17967 and thereabouts. All callers changed.
17968 (get_per_char_metric): Remove parameter `f', unused since
17969 2008-05-14T01:40:23Z!handa@m17n.org. All callers changed.
17971 2011-04-02 Jim Meyering <meyering@redhat.com>
17973 do not dereference NULL upon failed strdup
17974 * nsfont.m (ns_descriptor_to_entity): Use xstrdup, not strdup.
17975 (ns_get_family): Likewise.
17977 2011-04-02 Juanma Barranquero <lekktu@gmail.com>
17979 * eval.c (unwind_to_catch) [DEBUG_GCPRO]: Remove redundant assignment.
17981 2011-04-02 Jan Djärv <jan.h.d@swipnet.se>
17983 * nsterm.m (ns_update_auto_hide_menu_bar): Only for OSX 10.6 or
17986 2011-04-01 Stefan Monnier <monnier@iro.umontreal.ca>
17988 Add lexical binding.
17990 * window.c (Ftemp_output_buffer_show): New fun.
17991 (Fsave_window_excursion):
17992 * print.c (Fwith_output_to_temp_buffer): Move to subr.el.
17994 * lread.c (lisp_file_lexically_bound_p): New function.
17995 (Fload): Bind Qlexical_binding.
17996 (readevalloop): Remove `evalfun' arg.
17997 Bind Qinternal_interpreter_environment.
17998 (Feval_buffer): Bind Qlexical_binding.
17999 (defvar_int, defvar_bool, defvar_lisp_nopro, defvar_kboard):
18001 (syms_of_lread): Declare `lexical-binding'.
18003 * lisp.h (struct Lisp_Symbol): New field `declared_special'.
18005 * keyboard.c (eval_dyn): New fun.
18006 (menu_item_eval_property): Use it.
18008 * image.c (parse_image_spec): Use Ffunctionp.
18010 * fns.c (concat, mapcar1): Accept byte-code-functions.
18012 * eval.c (Fsetq): Handle lexical vars.
18013 (Fdefun, Fdefmacro, Ffunction): Make closures when needed.
18014 (Fdefconst, Fdefvaralias, Fdefvar): Mark as dynamic.
18015 (FletX, Flet): Obey lexical binding.
18016 (Fcommandp): Handle closures.
18017 (Feval): New `lexical' arg.
18018 (eval_sub): New function extracted from Feval. Use it almost
18019 everywhere where Feval was used. Look up vars in lexical env.
18021 (Ffunctionp): Move from subr.el.
18022 (Ffuncall): Handle closures.
18023 (apply_lambda): Remove `eval_flags'.
18024 (funcall_lambda): Handle closures and new byte-code-functions.
18025 (Fspecial_variable_p): New function.
18026 (syms_of_eval): Initialize the Vinternal_interpreter_environment var,
18027 but without exporting it to Lisp.
18029 * doc.c (Fdocumentation, store_function_docstring):
18030 * data.c (Finteractive_form): Handle closures.
18032 * callint.c (Fcall_interactively): Preserve lexical-binding mode for
18035 * bytecode.c (Bstack_ref, Bstack_set, Bstack_set2, BdiscardN):
18037 (exec_byte_code): New function extracted from Fbyte_code to handle new
18038 calling convention for byte-code-functions. Add new byte-codes.
18040 * buffer.c (defvar_per_buffer): Set new `declared_special' field.
18042 * alloc.c (Fmake_symbol): Init new `declared_special' field.
18044 2011-03-31 Juanma Barranquero <lekktu@gmail.com>
18046 * xdisp.c (redisplay_internal): Fix prototype.
18048 2011-03-31 Eli Zaretskii <eliz@gnu.org>
18050 * xdisp.c (SCROLL_LIMIT): New macro.
18051 (try_scrolling): Use it when setting scroll_limit.
18052 Limit scrolling to 100 screen lines.
18053 (redisplay_window): Even when falling back on "recentering",
18054 position point in the window according to scroll-conservatively,
18055 scroll-margin, and scroll-*-aggressively variables. (Bug#6671)
18057 (try_scrolling): When point is above the window, allow searching
18058 as far as scroll_max, or one screenful, to compute vertical
18059 distance from PT to the scroll margin position. This prevents
18060 try_scrolling from unnecessarily failing when
18061 scroll-conservatively is set to a value slightly larger than the
18062 window height. Clean up the case of PT below the margin at bottom
18063 of window: scroll_max can no longer be INT_MAX. When aggressive
18064 scrolling is in use, don't let point enter the opposite scroll
18065 margin as result of the scroll.
18066 (syms_of_xdisp) <scroll-conservatively>: Document the
18067 threshold of 100 lines for never-recentering scrolling.
18069 2011-03-31 Juanma Barranquero <lekktu@gmail.com>
18071 * dispextern.h (move_it_by_lines):
18072 * xdisp.c (move_it_by_lines): Remove parameter `need_y_p', unused
18073 since 2000-12-29T14:24:09Z!gerd@gnu.org. All callers changed.
18074 (message_log_check_duplicate): Remove parameters `prev_bol' and
18075 `this_bol', unused since 1998-01-01T02:27:27Z!rms@gnu.org. All callers changed.
18076 (redisplay_internal): Remove parameter `preserve_echo_area',
18077 unused since 1999-07-21T21:43:52Z!gerd@gnu.org. All callers changed.
18079 * indent.c (Fvertical_motion):
18080 * window.c (window_scroll_pixel_based, Frecenter):
18081 Don't pass `need_y_p' to `move_it_by_lines'.
18083 2011-03-30 Stefan Monnier <monnier@iro.umontreal.ca>
18085 * eval.c (struct backtrace): Don't cheat with negative numbers, but do
18086 steal a few bits to be more compact.
18087 (interactive_p, Fbacktrace, Fbacktrace_frame, mark_backtrace):
18088 Remove unneeded casts.
18090 * bytecode.c (Fbyte_code): CAR and CDR can GC.
18092 2011-03-30 Zachary Kanfer <zkanfer@gmail.com> (tiny change)
18094 * keyboard.c (Fexecute_extended_command): Do log the "suggest key
18095 binding" message (bug#7967).
18097 2011-03-30 Paul Eggert <eggert@cs.ucla.edu>
18099 Fix more problems found by GCC 4.6.0's static checks.
18101 * unexelf.c (unexec) [! (defined _SYSTYPE_SYSV || defined __sgi)]:
18102 Remove unused local var.
18104 * editfns.c (Fmessage_box): Remove unused local var.
18106 * xdisp.c (try_window_reusing_current_matrix, x_produce_glyphs):
18107 (note_mode_line_or_margin_highlight, note_mouse_highlight):
18108 Omit unused local vars.
18109 * window.c (shrink_windows): Omit unused local var.
18110 * menu.c (digest_single_submenu): Omit unused local var.
18111 * dispnew.c (update_window) [PERIODIC_PREEMPTION_CHECKING]:
18112 Omit unused local var.
18114 * keyboard.c (parse_modifiers_uncached, parse_modifiers):
18115 Don't assume string length fits in int.
18116 (keyremap_step, read_key_sequence): Use size_t for sizes.
18117 (read_key_sequence): Don't check last_real_key_start redundantly.
18119 * callproc.c (Fcall_process, Fcall_process_region): Use SAFE_ALLOCA
18120 instead of alloca (Bug#8344).
18122 * eval.c (Fbacktrace): Don't assume nargs fits in int.
18123 (Fbacktrace_frame): Don't assume nframes fits in int.
18125 * syntax.c (scan_sexps_forward): Avoid pointer wraparound.
18127 * xterm.c (x_make_frame_visible, same_x_server): Redo to avoid overflow
18130 * term.c (produce_glyphless_glyph): Remove unnecessary test.
18132 * cm.c (calccost): Turn while-do into do-while, for clarity.
18134 * keyboard.c (syms_of_keyboard): Use the same style as later
18135 in this function when indexing through an array. This also
18136 works around GCC bug 48267.
18138 * image.c (tiff_load): Fix off-by-one image count (Bug#8336).
18140 * xselect.c (x_check_property_data): Return correct size (Bug#8335).
18142 * chartab.c (sub_char_table_ref_and_range): Redo for slight
18143 efficiency gain, and to bypass a gcc -Wstrict-overflow warning.
18145 * keyboard.c, keyboard.h (num_input_events): Now size_t.
18146 This avoids undefined behavior on integer overflow, and is a bit
18147 more convenient anyway since it is compared to a size_t variable.
18149 Variadic C functions now count arguments with size_t, not int.
18150 This avoids an unnecessary limitation on 64-bit machines, which
18151 caused (substring ...) to crash on large vectors (Bug#8344).
18152 * lisp.h (struct Lisp_Subr.function.aMANY): Now takes size_t, not int.
18153 (DEFUN_ARGS_MANY, internal_condition_case_n, safe_call): Likewise.
18154 All variadic functions and their callers changed accordingly.
18155 (struct gcpro.nvars): Now size_t, not int. All uses changed.
18156 * data.c (arith_driver, float_arith_driver): Likewise.
18157 * editfns.c (general_insert_function): Likewise.
18158 * eval.c (struct backtrace.nargs, interactive_p)
18159 (internal_condition_case_n, run_hook_with_args, apply_lambda)
18160 (funcall_lambda, mark_backtrace): Likewise.
18161 * fns.c (concat): Likewise.
18162 * frame.c (x_set_frame_parameters): Likewise.
18163 * fns.c (get_key_arg): Now accepts and returns size_t, and returns
18164 0 if not found, not -1. All callers changed.
18166 * alloc.c (garbage_collect): Don't assume stack size fits in int.
18167 (stack_copy_size): Now size_t, not int.
18168 (stack_copy, stack_copy_size): Define only if MAX_SAVE_STACK > 0.
18170 2011-03-28 Juanma Barranquero <lekktu@gmail.com>
18172 * coding.c (encode_designation_at_bol): Remove parameter `charbuf_end',
18173 unused since 2002-03-01T01:17:24Z!handa@m17n.org and 2008-02-01T16:01:31Z!miles@gnu.org.
18174 All callers changed.
18176 * lisp.h (multibyte_char_to_unibyte):
18177 * character.c (multibyte_char_to_unibyte): Remove parameter `rev_tbl',
18178 unused since 2002-03-01T01:16:34Z!handa@m17n.org and 2008-02-01T16:01:31Z!miles@gnu.org.
18179 * character.h (CHAR_TO_BYTE8):
18180 * cmds.c (internal_self_insert):
18181 * editfns.c (general_insert_function):
18182 * keymap.c (push_key_description):
18183 * search.c (Freplace_match):
18184 * xdisp.c (message_dolog, set_message_1): All callers changed.
18186 2011-03-28 Stefan Monnier <monnier@iro.umontreal.ca>
18188 * keyboard.c (safe_run_hook_funcall): New function.
18189 (safe_run_hooks_1, safe_run_hooks_error, safe_run_hooks): On error,
18190 don't set the hook to nil, but remove the offending function instead.
18191 (Qcommand_hook_internal): Remove, unused.
18192 (syms_of_keyboard): Don't initialize Qcommand_hook_internal nor define
18193 Vcommand_hook_internal.
18195 * eval.c (enum run_hooks_condition): Remove.
18196 (funcall_nil, funcall_not): New functions.
18197 (run_hook_with_args): Call each function through a `funcall' argument.
18198 Remove `cond' argument, now redundant.
18199 (Frun_hooks, Frun_hook_with_args, Frun_hook_with_args_until_success)
18200 (Frun_hook_with_args_until_failure): Adjust accordingly.
18201 (run_hook_wrapped_funcall, Frun_hook_wrapped): New functions.
18203 2011-03-28 Juanma Barranquero <lekktu@gmail.com>
18205 * dispextern.h (string_buffer_position): Remove declaration.
18207 * print.c (strout): Remove parameter `multibyte', unused since
18208 1999-08-21T19:30:21Z!gerd@gnu.org. All callers changed.
18210 * search.c (boyer_moore): Remove parameters `len', `pos' and `lim',
18211 never used since function introduction in 1998-02-08T21:33:56Z!rms@gnu.org.
18212 All callers changed.
18214 * w32.c (_wsa_errlist): Use braces for struct initializers.
18216 * xdisp.c (string_buffer_position_lim): Remove parameter `w',
18217 never used since function introduction in 2001-03-09T18:41:50Z!gerd@gnu.org.
18218 All callers changed.
18219 (string_buffer_position): Likewise. Also, make static (it's never
18220 used outside xdisp.c).
18221 (cursor_row_p): Remove parameter `w', unused since
18222 2000-10-17T16:08:57Z!gerd@gnu.org. All callers changed.
18223 (decode_mode_spec): Remove parameter `precision', introduced during
18224 Gerd Moellmann's rewrite at 1999-07-21T21:43:52Z!gerd@gnu.org, but never used.
18225 All callers changed.
18227 2011-03-27 Jan Djärv <jan.h.d@swipnet.se>
18229 * nsterm.m (syms_of_nsterm): Use doc: for ns-auto-hide-menu-bar.
18231 2011-03-27 Anders Lindgren <andlind@gmail.com>
18233 * nsterm.m (ns_menu_bar_is_hidden): New variable.
18234 (ns_constrain_all_frames, ns_menu_bar_should_be_hidden)
18235 (ns_update_auto_hide_menu_bar): New functions.
18236 (ns_update_begin): Call ns_update_auto_hide_menu_bar.
18237 (applicationDidBecomeActive): Call ns_update_auto_hide_menu_bar and
18238 ns_constrain_all_frames.
18239 (constrainFrameRect): Return at once if ns_menu_bar_should_be_hidden.
18240 (syms_of_nsterm): DEFVAR ns-auto-hide-menu-bar, init to Qnil.
18242 2011-03-27 Jan Djärv <jan.h.d@swipnet.se>
18244 * nsmenu.m (runDialogAt): Remove argument to timer_check.
18246 2011-03-27 Glenn Morris <rgm@gnu.org>
18248 * syssignal.h: Replace RETSIGTYPE with void.
18249 * atimer.c, data.c, dispnew.c, emacs.c, floatfns.c, keyboard.c:
18250 * keyboard.h, lisp.h, process.c, sysdep.c, xterm.c:
18251 Replace SIGTYPE with void everywhere.
18252 * s/usg5-4-common.h (SIGTYPE): Remove definition.
18253 * s/template.h (SIGTYPE): Remove commented out definition.
18255 2011-03-26 Eli Zaretskii <eliz@gnu.org>
18257 * xdisp.c (redisplay_window): Don't check buffer's clip_changed
18258 flag as a prerequisite for invoking try_scrolling. (Bug#6671)
18260 2011-03-26 Juanma Barranquero <lekktu@gmail.com>
18262 * w32.c (read_unc_volume): Use parameter `henum', instead of
18263 global variable `wget_enum_handle'.
18265 * keymap.c (describe_vector): Remove parameters `indices' and
18266 `char_table_depth', unused since 2002-03-01T01:43:26Z!handa@m17n.org.
18267 (describe_map, Fdescribe_vector): Adjust calls to `describe_vector'.
18269 * keyboard.h (timer_check, show_help_echo): Remove unused parameters.
18271 * keyboard.c (timer_check): Remove parameter `do_it_now',
18272 unused since 1996-04-12T06:01:29Z!rms@gnu.org.
18273 (show_help_echo): Remove parameter `ok_to_overwrite_keystroke_echo',
18274 unused since 2008-04-19T19:30:53Z!monnier@iro.umontreal.ca.
18276 * keyboard.c (read_char):
18277 * w32menu.c (w32_menu_display_help):
18278 * xmenu.c (show_help_event, menu_help_callback):
18279 Adjust calls to `show_help_echo'.
18281 * gtkutil.c (xg_maybe_add_timer):
18282 * keyboard.c (readable_events):
18283 * process.c (wait_reading_process_output):
18284 * xmenu.c (x_menu_wait_for_event): Adjust calls to `timer_check'.
18286 * insdel.c (adjust_markers_gap_motion):
18287 Remove; no-op since 1998-01-02T21:29:48Z!rms@gnu.org.
18288 (gap_left, gap_right): Don't call it.
18290 2011-03-25 Chong Yidong <cyd@stupidchicken.com>
18292 * xdisp.c (handle_fontified_prop): Discard changes to clip_changed
18293 incurred during fontification.
18295 2011-03-25 Juanma Barranquero <lekktu@gmail.com>
18297 * buffer.c (defvar_per_buffer): Remove unused parameter `doc'.
18298 (DEFVAR_PER_BUFFER): Don't pass it.
18300 * dispnew.c (row_equal_p, add_row_entry): Remove unused parameter `w'.
18301 (scrolling_window): Don't pass it.
18303 2011-03-25 Juanma Barranquero <lekktu@gmail.com>
18305 * dispextern.h (glyph_matric): Use #if GLYPH_DEBUG, not #ifdef.
18307 * fileio.c (check_executable) [DOS_NT]: Remove unused variables `len'
18309 (Fset_file_selinux_context) [HAVE_LIBSELINUX]: Move here declaration
18310 of variables specific to SELinux and computation of `encoded_absname'.
18312 * image.c (XPutPixel): Remove unused variable `height'.
18314 * keyboard.c (make_lispy_event): Remove unused variable `hpos'.
18316 * unexw32.c (get_section_info): Remove unused variable `section'.
18318 * w32.c (stat): Remove unused variables `drive_root' and `devtype'.
18319 (system_process_attributes): Remove unused variable `sess'.
18320 (sys_read): Remove unused variable `err'.
18322 * w32fns.c (top): Wrap variables with #if GLYPH_DEBUG, not #ifdef.
18323 (w32_wnd_proc): Remove unused variable `isdead'.
18324 (unwind_create_frame): Use #if GLYPH_DEBUG, not #ifdef.
18325 (Fx_server_max_request_size): Remove unused variable `dpyinfo'.
18326 (x_create_tip_frame): Remove unused variable `tem'.
18328 * w32inevt.c (w32_console_read_socket):
18329 Remove unused variable `no_events'.
18331 * w32term.c (x_draw_composite_glyph_string_foreground):
18332 Remove unused variable `width'.
18334 2011-03-24 Juanma Barranquero <lekktu@gmail.com>
18336 * w32term.c (x_set_glyph_string_clipping):
18337 Don't pass uninitialized region to CombineRgn.
18339 2011-03-23 Juanma Barranquero <lekktu@gmail.com>
18341 * w32fns.c (x_set_menu_bar_lines): Remove unused variable `olines'.
18342 (w32_wnd_proc): Pass NULL to Windows API, not uninitialized buffer.
18343 (Fx_close_connection): Remove unused variable `i'.
18345 * w32font.c (w32font_draw): Return number of glyphs.
18346 (w32font_open_internal): Remove unused variable `i'.
18347 (w32font_driver): Add missing initializer.
18349 * w32menu.c (utf8to16): Remove unused variable `utf16'.
18350 (fill_in_menu): Remove unused variable `items_added'.
18352 * w32term.c (last_mouse_press_frame): Remove static global variable.
18353 (w32_clip_to_row): Remove unused variable `f'.
18354 (x_delete_terminal): Remove unused variable `i'.
18356 * w32uniscribe.c (uniscribe_shape): Remove unused variable `nclusters'.
18357 (NOTHING): Remove unused static global variable.
18358 (uniscribe_check_otf): Remove unused variable `table'.
18359 (uniscribe_font_driver): Add missing initializers.
18361 2011-03-23 Julien Danjou <julien@danjou.info>
18363 * term.c (Fsuspend_tty, Fresume_tty):
18364 * minibuf.c (read_minibuf, run_exit_minibuf_hook):
18365 * window.c (temp_output_buffer_show):
18366 * insdel.c (signal_before_change):
18367 * frame.c (Fhandle_switch_frame):
18368 * fileio.c (Fdo_auto_save):
18369 * emacs.c (Fkill_emacs):
18370 * editfns.c (save_excursion_restore):
18371 * cmds.c (internal_self_insert):
18372 * callint.c (Fcall_interactively):
18373 * buffer.c (Fkill_all_local_variables):
18374 * keyboard.c (Fcommand_execute, Fsuspend_emacs, safe_run_hooks_1):
18376 (command_loop_1): Use Frun_hooks. Call safe_run_hooks
18377 unconditionally since it does the check itself.
18379 2011-03-23 Paul Eggert <eggert@cs.ucla.edu>
18381 Fix more problems found by GCC 4.5.2's static checks.
18383 * coding.c (encode_coding_raw_text): Avoid unnecessary test
18384 the first time through the loop, since we know p0 < p1 then.
18385 This also avoids a gcc -Wstrict-overflow warning.
18387 * lisp.h (SAFE_ALLOCA, SAFE_ALLOCA_LISP): Avoid 'int' overflow
18388 leading to a memory leak, possible in functions like
18389 load_charset_map_from_file that can allocate an unbounded number
18390 of objects (Bug#8318).
18392 * xmenu.c (set_frame_menubar): Use EMACS_UINT, not int, for indexes
18393 that could (at least in theory) be that large.
18395 * xdisp.c (message_log_check_duplicate): Return unsigned long, not int.
18396 This is less likely to overflow, and avoids undefined behavior if
18397 overflow does occur. All callers changed. Use strtoul to scan
18398 for the unsigned long integer.
18399 (pint2hrstr): Simplify and tune code slightly.
18400 This also avoids a (bogus) GCC warning with gcc -Wstrict-overflow.
18402 * scroll.c (do_scrolling): Work around GCC bug 48228.
18403 See <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48228>.
18405 * frame.c (Fmodify_frame_parameters): Simplify loop counter.
18406 This also avoids a warning with gcc -Wstrict-overflow.
18407 (validate_x_resource_name): Simplify count usage.
18408 This also avoids a warning with gcc -Wstrict-overflow.
18410 * fileio.c (Fcopy_file): Report error if fchown or fchmod
18413 * emacs.c (Fdaemon_initialized): Do not ignore I/O errors (Bug#8303).
18415 * process.c (Fmake_network_process): Use socklen_t, not int,
18416 where POSIX says socklen_t is required in portable programs.
18417 This fixes a porting bug on hosts like 64-bit HP-UX, where
18418 socklen_t is wider than int (Bug#8277).
18419 (Fmake_network_process, server_accept_connection):
18420 (wait_reading_process_output, read_process_output):
18423 * process.c: Rename or move locals to avoid shadowing.
18424 (list_processes_1, Fmake_network_process):
18425 (read_process_output_error_handler, exec_sentinel_error_handler):
18426 Rename or move locals.
18427 (Fmake_network_process): Define label "retry_connect" only if needed.
18428 (Fnetwork_interface_info): Fix pointer signedness.
18429 (process_send_signal): Add cast to avoid pointer signedness problem.
18430 (FIRST_PROC_DESC, IF_NON_BLOCKING_CONNECT): Remove unused macros.
18431 (create_process): Use 'volatile' to avoid vfork clobbering (Bug#8298).
18433 Make tparam.h and terminfo.c consistent.
18434 * cm.c (tputs, tgoto, BC, UP): Remove extern decls.
18435 Include tparam.h instead, since it declares them.
18436 * cm.h (PC): Remove extern decl; tparam.h now does this.
18437 * deps.mk (cm.o, terminfo.o): Depend on tparam.h.
18438 * terminfo.c: Include tparam.h, to check interfaces.
18439 (tparm): Make 1st arg a const pointer in decl. Put it at top level.
18440 (tparam): Adjust signature to match interface in tparam.h;
18441 this removes some undefined behavior. Check that outstring and len
18442 are zero, which they always are with Emacs.
18443 * tparam.h (PC, BC, UP): New extern decls.
18445 * xftfont.c (xftfont_shape): Now static, and defined only if needed.
18446 (xftfont_open): Rename locals to avoid shadowing.
18448 * ftfont.c (ftfont_resolve_generic_family): Fix pointer signedness.
18449 (ftfont_otf_capability, ftfont_shape): Omit decls if not needed.
18450 (OTF_TAG_SYM): Omit macro if not needed.
18451 (ftfont_list): Remove unused local.
18452 (get_adstyle_property, ftfont_pattern_entity):
18453 (ftfont_lookup_cache, ftfont_open, ftfont_anchor_point):
18454 Rename locals to avoid shadowing.
18456 * xfont.c (xfont_list_family): Mark var as initialized.
18458 * xml.c (make_dom): Now static.
18460 * composite.c (composition_compute_stop_pos): Rename local to
18462 (composition_reseat_it): Remove unused locals.
18463 (find_automatic_composition, composition_adjust_point): Likewise.
18464 (composition_update_it): Mark var as initialized.
18465 (find_automatic_composition): Mark vars as initialized,
18466 with a FIXME (Bug#8290).
18468 character.h: Rename locals to avoid shadowing.
18469 * character.h (PREV_CHAR_BOUNDARY, FETCH_STRING_CHAR_ADVANCE):
18470 (FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE, FETCH_CHAR_ADVANCE):
18471 (FETCH_CHAR_ADVANCE_NO_CHECK, INC_POS, DEC_POS, BUF_INC_POS):
18472 (BUF_DEC_POS): Be more systematic about renaming local temporaries
18473 to avoid shadowing.
18475 * textprop.c (property_change_between_p): Remove; unused.
18477 * intervals.c (interval_start_pos): Now static.
18479 * intervals.h (CHECK_TOTAL_LENGTH): Avoid empty "else".
18481 * atimer.c (start_atimer, append_atimer_lists, set_alarm):
18482 Rename locals to avoid shadowing.
18484 * sound.c (wav_play, au_play, Fplay_sound_internal):
18485 Fix pointer signedness.
18486 (alsa_choose_format): Remove unused local var.
18487 (wav_play): Initialize a variable to 0, to prevent undefined
18488 behavior (Bug#8278).
18490 * region-cache.c (insert_cache_boundary): Redo var to avoid shadowing.
18492 * region-cache.h (pp_cache): New decl, for gcc -Wmissing-prototypes.
18494 * callproc.c (Fcall_process): Use 'volatile' to avoid vfork
18495 clobbering (Bug#8298).
18496 * sysdep.c (sys_subshell): Likewise.
18497 Previously, the sys_subshell 'volatile' was incorrectly IF_LINTted out.
18499 * lisp.h (child_setup): Now NO_RETURN unless DOS_NT.
18500 This should get cleaned up, so that child_setup has the
18501 same signature on all platforms.
18503 * callproc.c (call_process_cleanup): Now static.
18504 (relocate_fd): Rename locals to avoid shadowing.
18506 2011-03-22 Chong Yidong <cyd@stupidchicken.com>
18508 * xterm.c (x_clear_frame): Remove XClearWindow call. This appears
18509 not to be necessary, and produces flickering.
18511 2011-03-20 Glenn Morris <rgm@gnu.org>
18513 * config.in: Remove file.
18515 2011-03-20 Juanma Barranquero <lekktu@gmail.com>
18517 * minibuf.c (Vcompleting_read_function): Don't declare, global variables
18518 are now in src/globals.h.
18519 (syms_of_minibuf): Remove spurious & from previous change.
18521 2011-03-20 Leo Liu <sdl.web@gmail.com>
18523 * minibuf.c (completing-read-function): New variable.
18524 (completing-read-default): Rename from completing-read.
18525 (completing-read): Call completing-read-function.
18527 2011-03-19 Juanma Barranquero <lekktu@gmail.com>
18529 * xfaces.c (Fx_load_color_file):
18530 Read color file from absolute filename (bug#8250).
18532 2011-03-19 Juanma Barranquero <lekktu@gmail.com>
18534 * makefile.w32-in: Update dependencies.
18536 2011-03-17 Eli Zaretskii <eliz@gnu.org>
18538 * makefile.w32-in ($(BLD)/unexw32.$(O)): Depend on $(SRC)/unexec.h.
18540 2011-03-17 Paul Eggert <eggert@cs.ucla.edu>
18542 Fix more problems found by GCC 4.5.2's static checks.
18544 * process.c (make_serial_process_unwind, send_process_trap):
18545 (sigchld_handler): Now static.
18547 * process.c (allocate_pty): Let PTY_ITERATION declare iteration vars.
18548 That way, the code declares only the vars that it needs.
18549 * s/aix4-2.h (PTY_ITERATION): Declare iteration vars.
18550 * s/cygwin.h (PTY_ITERATION): Likewise.
18551 * s/darwin.h (PTY_ITERATION): Likewise.
18552 * s/gnu-linux.h (PTY_ITERATION): Likewise.
18554 * s/irix6-5.h (PTY_OPEN): Declare stb, to loosen coupling.
18555 * process.c (allocate_pty): Don't declare stb unless it's needed.
18557 * bytecode.c (MAYBE_GC): Rewrite so as not to use empty "else".
18558 (CONSTANTLIM): Remove; unused.
18559 (METER_CODE, Bscan_buffer, Bread_char, Bset_mark):
18560 Define only if needed.
18562 * unexelf.c (unexec): Name an expression,
18563 to avoid gcc -Wbad-function-cast warning.
18564 Use a different way to cause a compilation error if anyone uses
18565 n rather than nn, a way that does not involve shadowing.
18566 (ELF_BSS_SECTION_NAME, OLD_PROGRAM_H): Remove; unused.
18568 * deps.mk (unexalpha.o): Remove; unused.
18570 New file unexec.h, the (simple) interface for unexec (Bug#8267).
18571 * unexec.h: New file.
18572 * deps.mk (emacs.o, unexaix.o, unexcw.o, unexcoff.o, unexelf.o):
18573 (unexhp9k800.o, unexmacosx.o, unexsol.o, unexw32.o):
18574 Depend on unexec.h.
18575 * emacs.c [!defined CANNOT_DUMP]: Include unexec.h.
18576 * unexaix.c, unexcoff.c, unexcw.c, unexelf.c, unexhp9k800.c:
18577 * unexmacosx.c, unexsol.c, unexw32.c: Include unexec.h.
18578 Change as necessary to match prototype in unexec.h.
18580 * syntax.c (Fforward_comment, scan_lists): Rename locals to avoid
18582 (back_comment, skip_chars): Mark vars as initialized.
18584 * character.h (FETCH_STRING_CHAR_ADVANCE_NO_CHECK, BUF_INC_POS):
18585 Rename locals to avoid shadowing.
18587 * lread.c (read1): Rewrite so as not to use empty "else".
18588 (Fload, readevalloop, read1): Rename locals to avoid shadowing.
18590 * print.c (Fredirect_debugging_output): Fix pointer signedess.
18592 * lisp.h (debug_output_compilation_hack): Add decl here, to avoid
18593 warning when compiling print.c.
18595 * font.c (font_unparse_fcname): Abort in an "impossible" situation
18596 instead of using an uninitialized var.
18597 (font_sort_entities): Mark var as initialized.
18599 * character.h (FETCH_CHAR_ADVANCE): Rename locals to avoid shadowing.
18601 * font.c (font_unparse_xlfd): Don't mix pointers to variables with
18602 pointers to constants.
18603 (font_parse_fcname): Remove unused vars.
18604 (font_delete_unmatched): Now static.
18605 (font_get_spec): Remove; unused.
18606 (font_style_to_value, font_prop_validate_style, font_unparse_fcname):
18607 (font_update_drivers, Ffont_get_glyphs, font_add_log):
18608 Rename or move locals to avoid shadowing.
18610 * fns.c (require_nesting_list, require_unwind): Now static.
18611 (Ffillarray): Rename locals to avoid shadowing.
18613 * floatfns.c (domain_error2): Define only if needed.
18614 (Ffrexp, Fldexp): Rename locals to avoid shadowing.
18616 * alloc.c (mark_backtrace): Move decl from here ...
18617 * lisp.h: ... to here, so that it can be checked.
18619 * eval.c (call_debugger, do_debug_on_call, grow_specpdl): Now static.
18620 (Fdefvar): Rewrite so as not to use empty "else".
18621 (lisp_indirect_variable): Name an expression,
18622 to avoid gcc -Wbad-function-cast warning.
18623 (Fdefvar): Rename locals to avoid shadowing.
18625 * callint.c (quotify_arg, quotify_args): Now static.
18626 (Fcall_interactively): Rename locals to avoid shadowing.
18627 Use const pointer when appropriate.
18629 * lisp.h (get_system_name, get_operating_system_release):
18630 Move decls here, to check interfaces.
18631 * process.c (get_operating_system_release): Move decl to lisp.h.
18632 * xrdb.c (get_system_name): Likewise.
18633 * editfns.c (init_editfns, Fuser_login_name, Fuser_uid):
18634 (Fuser_real_uid, Fuser_full_name): Remove unnecessary casts,
18635 some of which prompt warnings from gcc -Wbad-function-cast.
18636 (Fformat_time_string, Fencode_time, Finsert_char):
18637 (Ftranslate_region_internal, Fformat):
18638 Rename or remove local vars to avoid shadowing.
18639 (Ftranslate_region_internal): Mark var as initialized.
18641 * doc.c (Fdocumentation, Fsnarf_documentation): Move locals to
18644 * lisp.h (eassert): Check that the argument compiles, even if
18645 ENABLE_CHECKING is not defined.
18647 * data.c (Findirect_variable): Name an expression, to avoid
18648 gcc -Wbad-function-cast warning.
18649 (default_value, arithcompare, arith_driver, arith_error): Now static.
18650 (store_symval_forwarding): Rename local to avoid shadowing.
18651 (Fmake_variable_buffer_local, Fmake_local_variable):
18652 Mark variables as initialized.
18653 (do_blv_forwarding, do_symval_forwarding): Remove; unused.
18655 * alloc.c (check_cons_list): Do not define unless GC_CHECK_CONS_LIST.
18656 (Fmake_vector, Fvector, Fmake_byte_code, Fgarbage_collect):
18657 Rename locals to avoid shadowing.
18658 (mark_stack): Move local variables into the #ifdef region where
18660 (BLOCK_INPUT_ALLOC, UNBLOCK_INPUT_ALLOC): Define only if
18661 ! defined SYSTEM_MALLOC && ! defined SYNC_INPUT, as they are not
18663 (CHECK_ALLOCATED): Define only if GC_CHECK_MARKED_OBJECTS.
18664 (GC_STRING_CHARS): Remove; not used.
18665 (Fmemory_limit): Cast sbrk's returned value to char *.
18667 * lisp.h (check_cons_list): Declare if GC_CHECK_CONS_LIST; this
18668 avoids undefined behavior in theory.
18670 * regex.c (IF_LINT): Add defn, for benefit of ../lib-src.
18672 Use functions, not macros, for up- and down-casing (Bug#8254).
18673 * buffer.h (DOWNCASE_TABLE, UPCASE_TABLE, DOWNCASE, UPPERCASEP):
18674 (NOCASEP, LOWERCASEP, UPCASE, UPCASE1): Remove. All callers changed
18675 to use the following functions instead of these macros.
18676 (downcase): Adjust to lack of DOWNCASE_TABLE. Return int, not
18677 EMACS_INT, since callers assume the returned value fits in int.
18678 (upcase1): Likewise, for UPCASE_TABLE.
18679 (uppercasep, lowercasep, upcase): New static inline functions.
18680 * editfns.c (Fchar_equal): Remove no-longer-needed workaround for
18681 the race-condition problem in the old DOWNCASE.
18683 * regex.c (CHARSET_LOOKUP_RANGE_TABLE_RAW, POP_FAILURE_REG_OR_COUNT):
18684 Rename locals to avoid shadowing.
18685 (regex_compile, re_match_2_internal): Move locals to avoid shadowing.
18686 (regex_compile, re_search_2, re_match_2_internal):
18687 Remove unused local vars.
18688 (FREE_VAR): Rewrite so as not to use empty "else",
18689 which gcc can warn about.
18690 (regex_compile, re_match_2_internal): Mark locals as initialized.
18691 (RETALLOC_IF): Define only if needed.
18692 (WORDCHAR_P): Likewise. This one is never needed, but is used
18693 only in a comment talking about a compiler bug, so put inside
18694 the #if 0 of that comment.
18695 (CHARSET_LOOKUP_BITMAP, FAIL_STACK_FULL, RESET_FAIL_STACK):
18696 (PUSH_FAILURE_ELT, BUF_PUSH_3, STOP_ADDR_VSTRING):
18699 * search.c (boyer_moore): Rename locals to avoid shadowing.
18700 * character.h (FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE):
18701 (PREV_CHAR_BOUNDARY): Likewise.
18703 * search.c (simple_search): Remove unused var.
18705 * dired.c (compile_pattern): Move decl from here ...
18706 * lisp.h: ... to here, so that it can be checked.
18707 (struct re_registers): New forward decl.
18709 * character.h (INC_POS, DEC_POS): Rename locals to avoid shadowing.
18711 * indent.c (MULTIBYTE_BYTES_WIDTH): New args bytes, width.
18713 (MULTIBYTE_BYTES_WIDTH, scan_for_column, compute_motion):
18714 Rename locals to avoid shadowing.
18715 (Fvertical_motion): Mark locals as initialized.
18717 * casefiddle.c (casify_object, casify_region): Now static.
18718 (casify_region): Mark local as initialized.
18720 * cmds.c (internal_self_insert): Rename local to avoid shadowing.
18722 * lisp.h (GCPRO2_VAR, GCPRO3_VAR, GCPRO4_VAR, GCPRO5_VAR, GCPRO6_VAR):
18723 New macros, so that the caller can use some names other than
18724 gcpro1, gcpro2, etc.
18725 (GCPRO2, GCPRO3, GCPRO4, GCPRO5, GCPRO6): Reimplement in terms
18727 (GCPRO1_VAR, UNGCPRO_VAR): Change the meaning of the second
18728 argument, for consistency with GCPRO2_VAR, etc: it is now the
18729 prefix of the variable, not the variable itself. All uses
18731 * dired.c (directory_files_internal, file_name_completion):
18732 Rename locals to avoid shadowing.
18734 Fix a race condition diagnosed by gcc -Wsequence-point (Bug#8254).
18735 An expression of the form (DOWNCASE (x) == DOWNCASE (y)), found in
18736 dired.c's scmp function, had undefined behavior.
18737 * lisp.h (DOWNCASE_TABLE, UPCASE_TABLE, DOWNCASE, UPPERCASEP):
18738 (NOCASEP, LOWERCASEP, UPCASE, UPCASE1): Move from here ...
18739 * buffer.h: ... to here, because these macros use current_buffer,
18740 and the new implementation with inline functions needs to have
18741 current_buffer in scope now, rather than later when the macros
18743 (downcase, upcase1): New static inline functions.
18744 (DOWNCASE, UPCASE1): Reimplement using these functions.
18745 This avoids undefined behavior in expressions like
18746 DOWNCASE (x) == DOWNCASE (y), which previously suffered
18747 from race conditions in accessing the global variables
18748 case_temp1 and case_temp2.
18749 * casetab.c (case_temp1, case_temp2): Remove; no longer needed.
18750 * lisp.h (case_temp1, case_temp2): Remove their decls.
18751 * character.h (ASCII_CHAR_P): Move from here ...
18752 * lisp.h: ... to here, so that the inline functions mentioned
18753 above can use them.
18755 * dired.c (directory_files_internal_unwind): Now static.
18757 * fileio.c (file_name_as_directory, directory_file_name):
18758 (barf_or_query_if_file_exists, auto_save_error, auto_save_1):
18760 (file_name_as_directory): Use const pointers when appropriate.
18761 (Fexpand_file_name): Likewise. In particular, newdir might
18762 point at constant storage, so make it a const pointer.
18763 (Fmake_directory_internal, Fread_file_name): Remove unused vars.
18764 (Ffile_selinux_context, Fset_file_selinux_context): Fix pointer
18766 (Fset_file_times, Finsert_file_contents, auto_save_error):
18767 Rename locals to avoid shadowing.
18769 * minibuf.c (choose_minibuf_frame_1): Now static.
18770 (Ftry_completion, Fall_completions): Rename or remove locals
18771 to avoid shadowing.
18773 * marker.c (bytepos_to_charpos): Remove; unused.
18775 * lisp.h (verify_bytepos, count_markers): New decls,
18776 so that gcc does not warn that these functions aren't declared.
18778 * insdel.c (check_markers, make_gap_larger, make_gap_smaller):
18779 (reset_var_on_error, Fcombine_after_change_execute_1): Now static.
18780 (CHECK_MARKERS): Redo to avoid gcc -Wempty-body diagnostic.
18781 (copy_text): Remove unused local var.
18783 * filelock.c (within_one_second): Now static.
18784 (lock_file_1): Rename local to avoid shadowing.
18786 * buffer.c (fix_overlays_before): Mark locals as initialized.
18787 (fix_start_end_in_overlays): Likewise. This function should be
18788 simplified by using pointers-to-pointers, but that's a different
18790 (switch_to_buffer_1): Now static.
18791 (Fkill_buffer, record_buffer, Fbury_buffer, Fset_buffer_multibyte):
18792 (report_overlay_modification): Rename locals to avoid shadowing.
18794 * sysdep.c (system_process_attributes): Rename vars to avoid shadowing.
18795 Fix pointer signedness issue.
18796 (sys_subshell): Mark local as volatile if checking for lint,
18797 to suppress a gcc -Wclobbered warning that does not seem to be right.
18798 (MAXPATHLEN): Define only if needed.
18800 * process.c (serial_open, serial_configure): Move decls from here ...
18801 * systty.h: ... to here, so that they can be checked.
18803 * fns.c (get_random, seed_random): Move extern decls from here ...
18804 * lisp.h: ... to here, so that they can be checked.
18806 * sysdep.c (reset_io): Now static.
18807 (wait_for_termination_signal): Remove; unused.
18809 * keymap.c (keymap_parent, keymap_memberp, map_keymap_internal):
18810 (copy_keymap_item, append_key, push_text_char_description):
18812 (Fwhere_is_internal): Don't test CONSP (sequences) unnecessarily.
18813 (DENSE_TABLE_SIZE): Remove; unused.
18814 (get_keymap, access_keymap, Fdefine_key, Fwhere_is_internal):
18815 (describe_map_tree):
18816 Rename locals to avoid shadowing.
18818 * keyboard.c: Declare functions static if they are not used elsewhere.
18819 (echo_char, echo_dash, cmd_error, top_level_2):
18820 (poll_for_input, handle_async_input): Now static.
18821 (read_char, kbd_buffer_get_event, make_lispy_position):
18822 (make_lispy_event, make_lispy_movement, apply_modifiers):
18823 (decode_keyboard_code, tty_read_avail_input, menu_bar_items):
18824 (parse_tool_bar_item, read_key_sequence, Fread_key_sequence):
18825 (Fread_key_sequence_vector): Rename locals to avoid shadowing.
18826 (read_key_sequence, read_char): Mark locals as initialized.
18827 (Fexit_recursive_edit, Fabort_recursive_edit): Mark with NO_RETURN.
18829 * keyboard.h (make_ctrl_char): New decl.
18830 (mark_kboards): Move decl here ...
18831 * alloc.c (mark_kboards): ... from here.
18833 * lisp.h (force_auto_save_soon): New decl.
18835 * emacs.c (init_cmdargs): Rename local to avoid shadowing.
18836 (DEFINE_DUMMY_FUNCTION): New macro.
18837 (__do_global_ctors, __do_global_ctors_aux, __do_global_dtors, __main):
18839 (main): Add casts to avoid warnings
18840 if GCC considers string literals to be constants.
18842 * lisp.h (fatal_error_signal): Add decl, since it's exported.
18844 * dbusbind.c: Pointer signedness fixes.
18845 (xd_signature, xd_append_arg, xd_initialize):
18846 (Fdbus_call_method, Fdbus_call_method_asynchronously):
18847 (Fdbus_method_return_internal, Fdbus_method_error_internal):
18848 (Fdbus_send_signal, xd_read_message_1, Fdbus_register_service):
18849 (Fdbus_register_signal): Use SSDATA when the context wants char *.
18851 * dbusbind.c (Fdbus_init_bus): Add cast to avoid warning
18852 if GCC considers string literals to be constants.
18853 (Fdbus_register_service, Fdbus_register_method): Remove unused vars.
18855 2011-03-16 Stefan Monnier <monnier@iro.umontreal.ca>
18857 * print.c (PRINT_CIRCLE_CANDIDATE_P): New macro.
18858 (print_preprocess, print_object): New macro to fix last change.
18860 * print.c (print_preprocess): Don't forget font objects.
18862 2011-03-16 Juanma Barranquero <lekktu@gmail.com>
18864 * emacs.c (USAGE3): Doc fixes.
18866 2011-03-15 Andreas Schwab <schwab@linux-m68k.org>
18868 * coding.c (detect_coding_iso_2022): Reorganize code to clarify
18871 2011-03-14 Juanma Barranquero <lekktu@gmail.com>
18873 * lisp.h (VWindow_system, Qfile_name_history):
18874 * keyboard.h (lispy_function_keys) [WINDOWSNT]:
18875 * w32term.h (w32_system_caret_hwnd, w32_system_caret_height)
18876 (w32_system_caret_x, w32_system_caret_y): Declare extern.
18878 * w32select.c: Don't #include "keyboard.h".
18879 (run_protected): Add extern declaration for waiting_for_input.
18881 * w32.c (Qlocal, noninteractive1, inhibit_window_system):
18882 * w32console.c (detect_input_pending, read_input_pending)
18883 (encode_terminal_code):
18884 * w32fns.c (quit_char, lispy_function_keys, Qtooltip)
18885 (w32_system_caret_hwnd, w32_system_caret_height, w32_system_caret_x)
18886 (w32_system_caret_y, Qfile_name_history):
18887 * w32font.c (w32font_driver, QCantialias, QCotf, QClang):
18888 * w32inevt.c (reinvoke_input_signal, lispy_function_keys):
18889 * w32menu.c (Qmenu_bar, QCtoggle, QCradio, Qoverriding_local_map)
18890 (Qoverriding_terminal_local_map, Qmenu_bar_update_hook):
18891 * w32proc.c (Qlocal, report_file_error):
18892 * w32term.c (Vwindow_system, updating_frame):
18893 * w32uniscribe.c (initialized, uniscribe_font_driver):
18894 Remove unneeded extern declarations.
18896 2011-03-14 Chong Yidong <cyd@stupidchicken.com>
18898 * buffer.c (Fmake_indirect_buffer): Fix incorrect assertions.
18900 2011-03-13 Chong Yidong <cyd@stupidchicken.com>
18902 * buffer.h (BUF_BEGV, BUF_BEGV_BYTE, BUF_ZV, BUF_ZV_BYTE, BUF_PT)
18903 (BUF_PT_BYTE): Rewrite to handle indirect buffers (Bug#8219).
18904 These macros can no longer be used for assignment.
18906 * buffer.c (Fget_buffer_create, Fmake_indirect_buffer):
18907 Assign struct members directly, instead of using BUF_BEGV etc.
18908 (record_buffer_markers, fetch_buffer_markers): New functions for
18909 recording and fetching special buffer markers.
18910 (set_buffer_internal_1, set_buffer_temp): Use them.
18912 * lread.c (unreadchar): Use SET_BUF_PT_BOTH.
18914 * insdel.c (adjust_point): Use SET_BUF_PT_BOTH.
18916 * intervals.c (temp_set_point_both): Use SET_BUF_PT_BOTH.
18917 (get_local_map): Use SET_BUF_BEGV_BOTH and SET_BUF_ZV_BOTH.
18919 * xdisp.c (hscroll_window_tree):
18920 (reconsider_clip_changes): Use PT instead of BUF_PT.
18922 2011-03-13 Eli Zaretskii <eliz@gnu.org>
18924 * makefile.w32-in ($(BLD)/editfns.$(O)): Depend on
18925 $(EMACS_ROOT)/lib/intprops.h.
18927 2011-03-13 Paul Eggert <eggert@cs.ucla.edu>
18929 Fix more problems found by GCC 4.5.2's static checks.
18931 * gtkutil.c (xg_get_pixbuf_from_pixmap): Add cast from char *
18932 to unsigned char * to avoid compiler diagnostic.
18933 (xg_free_frame_widgets): Make it clear that a local variable is
18934 needed only if USE_GTK_TOOLTIP.
18935 (gdk_window_get_screen): Make it clear that this macro is needed
18936 only if USE_GTK_TOOLTIP.
18937 (int_gtk_range_get_value): New function, which avoids a diagnostic
18938 from gcc -Wbad-function-cast.
18939 (xg_set_toolkit_scroll_bar_thumb): Use it.
18940 (xg_tool_bar_callback, xg_tool_item_stale_p): Rewrite to avoid
18941 diagnostic from gcc -Wbad-function-cast.
18942 (get_utf8_string, xg_get_file_with_chooser):
18943 Rename locals to avoid shadowing.
18944 (create_dialog): Move locals to avoid shadowing.
18946 * xgselect.c (xg_select): Remove unused var.
18948 * image.c (four_corners_best): Mark locals as initialized.
18949 (gif_load): Initialize transparent_p to zero (Bug#8238).
18950 Mark another local as initialized.
18951 (my_png_error, my_error_exit): Mark with NO_RETURN.
18953 * image.c (clear_image_cache): Now static.
18954 (DIM, HAVE_STDLIB_H_1): Remove unused macros.
18955 (xpm_load): Redo to avoid "discards qualifiers" gcc warning.
18956 (x_edge_detection): Remove unnecessary cast that
18957 gcc -Wbad-function-cast diagnoses.
18958 (gif_load): Fix pointer signedness.
18959 (clear_image_cache, xbm_read_bitmap_data, x_detect_edges):
18960 (jpeg_load, gif_load): Rename locals to avoid shadowing.
18962 2011-03-12 Paul Eggert <eggert@cs.ucla.edu>
18964 Improve quality of tests for time stamp overflow.
18965 For example, without this patch (encode-time 0 0 0 1 1
18966 1152921504606846976) returns the obviously-bogus value (-948597
18967 62170) on my RHEL 5.5 x86-64 host. With the patch, it correctly
18968 reports time overflow. See
18969 <http://lists.gnu.org/archive/html/emacs-devel/2011-03/msg00470.html>.
18970 * deps.mk (editfns.o): Depend on ../lib/intprops.h.
18971 * editfns.c: Include limits.h and intprops.h.
18972 (TIME_T_MIN, TIME_T_MAX): New macros.
18973 (time_overflow): Move earlier, to before first use.
18974 (hi_time, lo_time): New functions, for an accurate test for
18975 out-of-range times.
18976 (Fcurrent_time, Fget_internal_run_time, make_time): Use them.
18977 (Fget_internal_run_time): Don't assume time_t fits in int.
18978 (make_time): Use list2 instead of Fcons twice.
18979 (Fdecode_time): More accurate test for out-of-range times.
18980 (check_tm_member): New function.
18981 (Fencode_time): Use it, to test for out-of-range times.
18982 (lisp_time_argument): Don't rely on undefined left-shift and
18983 right-shift behavior when checking for time stamp overflow.
18985 * editfns.c (time_overflow): New function, refactoring common code.
18986 (Fformat_time_string, Fdecode_time, Fencode_time):
18987 (Fcurrent_time_string): Use it.
18989 Move 'make_time' to be next to its inverse 'lisp_time_argument'.
18990 * dired.c (make_time): Move to ...
18991 * editfns.c (make_time): ... here.
18992 * systime.h: Note the move.
18994 2011-03-12 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
18996 * fringe.c (update_window_fringes): Remove unused variables.
18998 * unexmacosx.c (copy_data_segment): Also copy __got section.
19001 2011-03-12 Eli Zaretskii <eliz@gnu.org>
19003 * termcap.c [MSDOS]: Include "msdos.h".
19004 (find_capability, tgetnum, tgetflag, tgetstr, tputs, tgetent):
19005 Constify `char *' arguments and their references according to
19006 prototypes in tparam.h.
19008 * deps.mk (termcap.o): Depend on tparam.h and msdos.h.
19010 * msdos.c (XMenuAddPane): 3rd argument is `const char *' now.
19011 Adapt all references accordingly.
19013 * msdos.h (XMenuAddPane): 3rd argument is `const char *' now.
19015 2011-03-11 Tom Tromey <tromey@redhat.com>
19017 * buffer.c (syms_of_buffer): Remove obsolete comment.
19019 2011-03-11 Eli Zaretskii <eliz@gnu.org>
19021 * termhooks.h (encode_terminal_code): Declare prototype.
19023 * msdos.c (encode_terminal_code): Don't declare prototype.
19025 * term.c (encode_terminal_code): Now external again, used by
19026 w32console.c and msdos.c.
19028 * makefile.w32-in ($(BLD)/term.$(O), ($(BLD)/tparam.$(O)):
19029 Depend on $(SRC)/tparam.h, see 2011-03-11T07:24:21Z!eggert@cs.ucla.edu.
19031 2011-03-11 Paul Eggert <eggert@cs.ucla.edu>
19033 Fix some minor problems found by GCC 4.5.2's static checks.
19035 * fringe.c (update_window_fringes): Mark locals as initialized
19037 (destroy_fringe_bitmap, init_fringe_bitmap): Now static.
19039 * alloc.c (mark_fringe_data): Move decl from here ...
19040 * lisp.h (mark_fringe_data) [HAVE_WINDOW_SYSTEM]: ... to here,
19041 to check its interface.
19042 (init_fringe_once): Do not declare unless HAVE_WINDOW_SYSTEM.
19044 * fontset.c (free_realized_fontset): Now static.
19045 (Fset_fontset_font): Rename local to avoid shadowing.
19046 (fontset_font): Mark local as initialized.
19047 (FONTSET_SPEC, FONTSET_REPERTORY, RFONT_DEF_REPERTORY): Remove; unused.
19049 * xrdb.c: Include "xterm.h", to check x_load_resources's interface.
19051 * xselect.c (x_disown_buffer_selections): Remove; not used.
19052 (TRACE3) [!defined TRACE_SELECTION]: Remove; not used.
19053 (x_own_selection, Fx_disown_selection_internal): Rename locals
19054 to avoid shadowing.
19055 (x_handle_dnd_message): Remove local to avoid shadowing.
19057 * lisp.h (GCPRO1_VAR, UNGCPRO_VAR): New macros,
19058 so that the caller can use some name other than gcpro1.
19059 (GCPRO1, UNGCPRO): Reimplement in terms of the new macros.
19060 * xfns.c (Fx_create_frame, x_create_tip_frame, Fx_show_tip):
19061 (Fx_backspace_delete_keys_p):
19062 Use them to avoid shadowing, and rename vars to avoid shadowing.
19063 (x_decode_color, x_set_name, x_window): Now static.
19064 (Fx_create_frame): Add braces to silence GCC warning.
19065 (Fx_file_dialog, Fx_select_font): Fix pointer signedness.
19066 (x_real_positions, xg_set_icon_from_xpm_data, x_create_tip_frame):
19067 Remove unused locals.
19068 (Fx_create_frame, x_create_tip_frame, Fx_show_tip):
19069 (Fx_backspace_delete_keys_p): Rename locals to avoid shadowing.
19070 Some of these renamings use the new GCPRO1_VAR and UNGCPRO_VAR
19073 * xterm.h (x_mouse_leave): New decl.
19075 * xterm.c (x_copy_dpy_color, x_focus_on_frame, x_unfocus_frame):
19076 Remove unused functions.
19077 (x_shift_glyphs_for_insert, XTflash, XTring_bell):
19078 (x_calc_absolute_position): Now static.
19079 (XTread_socket): Don't define label "out" unless it's used.
19080 Don't declare local "event" unless it's used.
19081 (x_iconify_frame, x_free_frame_resources): Don't declare locals
19082 unless they are used.
19083 (XEMBED_VERSION, xembed_set_info): Don't define unless needed.
19084 (x_fatal_error_signal): Remove; not used.
19085 (x_draw_image_foreground, redo_mouse_highlight, XTmouse_position):
19086 (x_scroll_bar_report_motion, handle_one_xevent, x_draw_bar_cursor):
19087 (x_error_catcher, x_connection_closed, x_error_handler):
19088 (x_error_quitter, xembed_send_message, x_iconify_frame):
19089 (my_log_handler): Rename locals to avoid shadowing.
19090 (x_delete_glyphs, x_ins_del_lines): Mark with NO_RETURN.
19091 (x_connection_closed): Tell GCC not to suggest NO_RETURN.
19093 * xfaces.c (clear_face_cache, Fx_list_fonts, Fface_font):
19094 Rename or move locals to avoid shadowing.
19095 (tty_defined_color, merge_face_heights): Now static.
19096 (free_realized_faces_for_fontset): Remove; not used.
19097 (Fx_list_fonts): Mark variable that gcc -Wuninitialized
19098 does not deduce is never used uninitialized.
19099 (STRDUPA, LSTRDUPA, FONT_POINT_SIZE_QUANTUM): Remove; not used.
19100 (LFACEP): Define only if XASSERTS, as it's not needed otherwise.
19102 * terminal.c (store_terminal_param): Now static.
19104 * xmenu.c (menu_highlight_callback): Now static.
19105 (set_frame_menubar): Remove unused local.
19106 (xmenu_show): Rename parameter to avoid shadowing.
19107 (xmenu_show, xdialog_show, xmenu_show): Make local pointers "const"
19108 since they might point to immutable storage.
19109 (next_menubar_widget_id): Declare only if USE_X_TOOLKIT,
19110 since it's unused otherwise.
19112 * xdisp.c (produce_glyphless_glyph): Initialize lower_xoff.
19113 Add a FIXME, since the code still doesn't look right. (Bug#8215)
19114 (Fcurrent_bidi_paragraph_direction): Simplify slightly; this
19115 avoids a gcc -Wuninitialized diagnostic.
19116 (display_line, BUILD_COMPOSITE_GLYPH_STRING, draw_glyphs):
19117 (note_mouse_highlight): Mark variables that gcc -Wuninitialized
19118 does not deduce are never used uninitialized.
19120 * lisp.h (IF_LINT): New macro, copied from ../lib-src/emacsclient.c.
19122 * xdisp.c (redisplay_window): Rename local to avoid shadowing.
19123 * window.c (window_loop, size_window):
19124 (run_window_configuration_change_hook, enlarge_window): Likewise.
19126 * window.c (display_buffer): Now static.
19127 (size_window): Mark variables that gcc -Wuninitialized
19128 does not deduce are never used uninitialized.
19129 * window.h (check_all_windows): New decl, to forestall
19130 gcc -Wmissing-prototypes diagnostic.
19131 * dispextern.h (bidi_dump_cached_states): Likewise.
19133 * charset.h (CHECK_CHARSET_GET_CHARSET): Rename locals to avoid
19135 * charset.c (map_charset_for_dump, Fchar_charset): Likewise.
19136 Include <limits.h>.
19137 (Fsort_charsets): Redo min/max calculation to shorten the code a bit
19138 and to avoid gcc -Wuninitialized warning.
19139 (load_charset_map): Mark variables that gcc -Wuninitialized
19140 does not deduce are never used uninitialized.
19141 (load_charset): Abort instead of using uninitialized var (Bug#8229).
19143 * coding.c (coding_set_source, coding_set_destination):
19144 Use "else { /* comment */ }" rather than "else /* comment */;"
19145 for clarity, and to avoid gcc -Wempty-body warning.
19146 (Fdefine_coding_system_internal): Don't redeclare 'i' inside
19147 a block, when the outer 'i' will do.
19148 (decode_coding_utf_8, decode_coding_utf_16, detect_coding_emacs_mule):
19149 (emacs_mule_char, decode_coding_emacs_mule, detect_coding_iso_2022):
19150 (decode_coding_iso_2022, decode_coding_sjis, decode_coding_big5):
19151 (decode_coding_raw_text, decode_coding_charset, get_translation_table):
19152 (Fdecode_sjis_char, Fdefine_coding_system_internal):
19153 Rename locals to avoid shadowing.
19154 * character.h (FETCH_STRING_CHAR_ADVANCE): Likewise.
19155 * coding.c (emacs_mule_char, encode_invocation_designation):
19156 Now static, since they're not used elsewhere.
19157 (decode_coding_iso_2022): Add "default: abort ();" as a safety check.
19158 (decode_coding_object, encode_coding_object, detect_coding_system):
19159 (decode_coding_emacs_mule): Mark variables that gcc
19160 -Wuninitialized does not deduce are never used uninitialized.
19161 (detect_coding_iso_2022): Initialize a local variable that might
19162 be used uninitialized. Leave a FIXME because it's not clear that
19163 this initialization is needed. (Bug#8211)
19164 (ISO_CODE_LF, ISO_CODE_CR, CODING_ISO_FLAG_EUC_TW_SHIFT):
19165 (ONE_MORE_BYTE_NO_CHECK, UTF_BOM, UTF_16_INVALID_P):
19166 (SHIFT_OUT_OK, ENCODE_CONTROL_SEQUENCE_INTRODUCER):
19167 (ENCODE_DIRECTION_R2L, ENCODE_DIRECTION_L2R):
19168 Remove unused macros.
19170 * category.c (hash_get_category_set): Remove unused local var.
19171 (copy_category_table): Now static, since it's not used elsewhere.
19172 * character.c (string_count_byte8): Likewise.
19174 * ccl.c (CCL_WRITE_STRING, CCL_ENCODE_CHAR, Fccl_execute_on_string):
19175 (Fregister_code_conversion_map): Rename locals to avoid shadowing.
19177 * chartab.c (copy_sub_char_table): Now static, since it's not used
19179 (sub_char_table_ref_and_range, char_table_ref_and_range):
19180 Rename locals to avoid shadowing.
19181 (ASET_RANGE, GET_SUB_CHAR_TABLE): Remove unused macros.
19183 * bidi.c (bidi_check_type): Now static, since it's not used elsewhere.
19184 (BIDI_BOB): Remove unused macro.
19186 * cm.c (cmgoto): Mark variables that gcc -Wuninitialized does not
19187 deduce are never used uninitialized.
19188 * term.c (encode_terminal_code): Likewise.
19190 * term.c (encode_terminal_code): Now static. Remove unused local.
19192 * tparam.h: New file.
19193 * term.c, tparam.h: Include it.
19194 * deps.mk (term.o, tparam.o): Depend on tparam.h.
19195 * term.c (tputs, tgetent, tgetflag, tgetnum, tparam, tgetstr):
19196 Move these decls to tparam.h, and make them agree with what
19197 is actually in tparam.c. The previous trick of using incompatible
19198 decls in different modules does not conform to the C standard.
19199 All callers of tparam changed to use tparam's actual API.
19200 * tparam.c (tparam1, tparam, tgoto):
19201 Use const pointers where appropriate.
19203 * cm.c (calccost, cmgoto): Use const pointers where appropriate.
19204 * cm.h (struct cm): Likewise.
19205 * dispextern.h (do_line_insertion_deletion_costs): Likewise.
19206 * scroll.c (ins_del_costs, do_line_insertion_deletion_costs): Likewise.
19207 * term.c (tty_ins_del_lines, calculate_costs, struct fkey_table):
19208 (term_get_fkeys_1, append_glyphless_glyph, produce_glyphless_glyph):
19209 (turn_on_face, init_tty): Likewise.
19210 * termchar.h (struct tty_display_info): Likewise.
19212 * term.c (term_mouse_position): Rename local to avoid shadowing.
19214 * alloc.c (mark_ttys): Move decl from here ...
19215 * lisp.h (mark_ttys): ... to here, so that it's checked against defn.
19217 2011-03-11 Andreas Schwab <schwab@linux-m68k.org>
19219 * .gdbinit (pwinx, xbuffer): Fix access to buffer name.
19221 2011-03-09 Juanma Barranquero <lekktu@gmail.com>
19223 * search.c (compile_pattern_1): Remove argument regp, unused since
19224 revid:rms@gnu.org-19941211082627-3x1g1wyqkjmwloig.
19225 (compile_pattern): Don't pass it.
19227 2011-03-08 Jan Djärv <jan.h.d@swipnet.se>
19229 * xterm.h (DEFAULT_GDK_DISPLAY): New define.
19230 (GDK_WINDOW_XID, gtk_widget_get_preferred_size): New defines
19232 (GTK_WIDGET_TO_X_WIN): Use GDK_WINDOW_XID.
19234 * xmenu.c (menu_position_func): Call gtk_widget_get_preferred_size.
19236 * gtkutil.c: Include gtkx.h if HAVE_GTK3. If ! HAVE_GTK3, define
19237 gdk_window_get_screen, gdk_window_get_geometry,
19238 gdk_x11_window_lookup_for_display and GDK_KEY_g.
19239 (xg_set_screen): Use DEFAULT_GDK_DISPLAY.
19240 (xg_get_pixbuf_from_pixmap): New function.
19241 (xg_get_pixbuf_from_pix_and_mask): Change parameters from GdkPixmap
19242 to Pixmap, take frame as parameter, remove GdkColormap parameter.
19243 Call xg_get_pixbuf_from_pixmap instead of
19244 gdk_pixbuf_get_from_drawable.
19245 (xg_get_image_for_pixmap): Do not make GdkPixmaps, call
19246 xg_get_pixbuf_from_pix_and_mask with Pixmap parameters instead.
19247 (xg_check_special_colors): Use GtkStyleContext and its functions
19249 (xg_prepare_tooltip, xg_hide_tooltip): Call gdk_window_get_screen.
19250 (xg_prepare_tooltip, create_dialog, menubar_map_cb)
19251 (xg_update_frame_menubar, xg_tool_bar_detach_callback)
19252 (xg_tool_bar_attach_callback, xg_update_tool_bar_sizes):
19253 Call gtk_widget_get_preferred_size.
19254 (xg_frame_resized): gdk_window_get_geometry only takes 5
19256 (xg_win_to_widget, xg_event_is_for_menubar):
19257 Call gdk_x11_window_lookup_for_display.
19258 (xg_set_widget_bg): New function.
19259 (delete_cb): New function.
19260 (xg_create_frame_widgets): Connect delete-event to delete_cb.
19261 Call xg_set_widget_bg. Only set background pixmap for ! HAVE_GTK3
19262 (xg_set_background_color): Call xg_set_widget_bg.
19263 (xg_set_frame_icon): Call xg_get_pixbuf_from_pix_and_mask.
19264 (xg_create_scroll_bar): vadj is a GtkAdjustment for HAVE_GTK3.
19265 Only call gtk_range_set_update_policy if ! HAVE_GTK3.
19266 (xg_make_tool_item): Only connect xg_tool_bar_item_expose_callback
19268 (update_frame_tool_bar): Call gtk_widget_hide.
19269 (xg_initialize): Use GDK_KEY_g.
19271 * xsmfns.c (gdk_set_sm_client_id): Define to gdk_set_sm_client_id
19273 (x_session_initialize): Call gdk_x11_set_sm_client_id.
19275 * xterm.c (XFillRectangle): Use cairo routines for HAVE_GTK3.
19276 (x_term_init): Disable Xinput(2) with GDK_CORE_DEVICE_EVENTS.
19277 Load ~/emacs.d/gtkrc only for ! HAVE_GTK3.
19279 2011-03-08 Juanma Barranquero <lekktu@gmail.com>
19281 * w32xfns.c (select_palette): Check success of RealizePalette against
19282 GDI_ERROR, not zero.
19284 See ChangeLog.11 for earlier changes.
19286 ;; Local Variables:
19290 Copyright (C) 2011-2012 Free Software Foundation, Inc.
19292 This file is part of GNU Emacs.
19294 GNU Emacs is free software: you can redistribute it and/or modify
19295 it under the terms of the GNU General Public License as published by
19296 the Free Software Foundation, either version 3 of the License, or
19297 (at your option) any later version.
19299 GNU Emacs is distributed in the hope that it will be useful,
19300 but WITHOUT ANY WARRANTY; without even the implied warranty of
19301 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19302 GNU General Public License for more details.
19304 You should have received a copy of the GNU General Public License
19305 along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.