1 2012-11-03 Paul Eggert <eggert@cs.ucla.edu>
3 Omit duplicate definitions no longer needed with gcc -g3.
4 * lisp.h (GCTYPEBITS, GCALIGNMENT, ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG)
5 (VALMASK, MOST_POSITIVE_FIXNUM, MOST_NEGATIVE_FIXNUM):
6 Define only as macros. There's no longer any need to also define
7 these symbols as enums or as constants, since we now assume
8 gcc -g3 when debugging.
10 2012-11-03 Chong Yidong <cyd@gnu.org>
12 * process.c (wait_reading_process_output): Clean up the last
15 2012-11-03 Jim Paris <jim@jtan.com> (tiny change)
17 * process.c (wait_reading_process_output): Avoid a race condition
18 with SIGIO delivery (Bug#11536).
20 2012-11-03 Chong Yidong <cyd@gnu.org>
22 * buffer.c (cursor_type): Untabify docstring.
24 2012-11-03 Dmitry Antipov <dmantipov@yandex.ru>
26 * frame.h (struct frame): Drop can_have_scroll_bars member
27 which is meaningless for a long time. Adjust comments.
28 (FRAME_CAN_HAVE_SCROLL_BARS): Remove.
29 * frame.c, nsfns.m, term.c, w32fns.c, xfns.c: Adjust users.
31 2012-11-03 Dmitry Antipov <dmantipov@yandex.ru>
33 * window.c (decode_next_window_args): Update window arg after
34 calling decode_live_window and so fix crash reported at
35 http://lists.gnu.org/archive/html/emacs-devel/2012-11/msg00035.html
36 by Juanma Barranquero <lekktu@gmail.com>.
37 (Fwindow_body_width, Fwindow_body_height): Simplify a bit.
38 * font.c (Ffont_at): Likewise.
40 2012-11-01 Jan Djärv <jan.h.d@swipnet.se>
42 * widget.c (resize_cb): New function.
43 (EmacsFrameRealize): Add resize_cb as event handler (Bug#12733).
44 (EmacsFrameResize): Check if all is up to date before changing frame
47 2012-11-02 Eli Zaretskii <eliz@gnu.org>
49 Implement backtrace output for fatal errors on MS-Windows.
50 * w32fns.c (CaptureStackBackTrace_proc): New typedef.
51 (BACKTRACE_LIMIT_MAX): New macro.
52 (w32_backtrace): New function.
53 (emacs_abort): Use w32_backtrace when the user chooses not to
54 attach a debugger. Update the text of the abort dialog.
56 2012-11-02 Dmitry Antipov <dmantipov@yandex.ru>
58 Window-related stuff cleanup here and there.
59 * dispnew.c (Finternal_show_cursor, Finternal_show_cursor_p):
60 Use decode_any_window.
61 * fringe.c (Ffringe_bitmaps_at_pos): Likewise.
62 * xdisp.c (Fformat_mode_line): Likewise.
63 * font.c (Ffont_at): Use decode_live_window.
64 * indent.c (Fcompute_motion, Fvertical_motion): Likewise.
65 * window.c (decode_next_window_args): Likewise.
66 (decode_any_window): Remove static.
67 * window.h (decode_any_window): Add prototype.
68 * lisp.h (CHECK_VALID_WINDOW, CHECK_LIVE_WINDOW): Move from here...
69 * window.h: ...to here, redefine via WINDOW_VALID_P and WINDOW_LIVE_P,
72 2012-11-02 Dmitry Antipov <dmantipov@yandex.ru>
74 Remove pad from struct input_event.
75 * termhooks.h (struct input_event): Remove padding field.
77 * keyboard.c (event_to_kboard): Simplify because frame_or_window
78 member is never cons for a long time. Adjust comment.
79 (mark_kboards): Adjust because SELECTION_REQUEST_EVENT and
80 SELECTION_CLEAR_EVENT has no Lisp_Objects to mark. Add comment.
81 * xterm.c (handle_one_xevent): Do not initialize frame_or_window
82 field of SELECTION_REQUEST_EVENT and SELECTION_CLEAR_EVENT.
84 2012-11-01 Eli Zaretskii <eliz@gnu.org>
86 * w32proc.c (getpgrp, setpgid): New functions. (Bug#12776)
88 2012-10-31 Paul Eggert <eggert@cs.ucla.edu>
90 Fix crash when using Emacs as commit editor for git (Bug#12697).
91 * callproc.c (setpgrp): Remove macro, as we now use setpgid
92 and it is configured in conf_post.h.
93 (Fcall_process): Don't invoke both setsid and setpgid; the former
94 is enough, if it exists.
95 * callproc.c (Fcall_process, child_setup):
96 * process.c (create_process): Use setpgid.
97 * conf_post.h (setpgid) [!HAVE_SETPGID]: New macro, which substitutes
99 * dispnew.c (init_display): Initialize the foreground group
100 if we are running a tty display.
101 * emacs.c (main): Do not worry about setpgrp; init_display does it now.
102 * lisp.h (init_foreground_group): New decl.
103 * sysdep.c (inherited_pgroup): New static var.
104 (init_foreground_group, tcsetpgrp_without_stopping)
105 (narrow_foreground_group, widen_foreground_group): New functions.
106 (init_sys_modes): Narrow foreground group.
107 (reset_sys_modes): Widen foreground group.
109 2012-10-31 Michael Albinus <michael.albinus@gmx.de>
111 * dbusbind.c: Fix cut'n'waste error. Use HAVE_DBUS_VALIDATE_INTERFACE.
113 2012-10-31 Martin Rudalics <rudalics@gmx.at>
115 * minibuf.c (read_minibuf): Restore current buffer since
116 choose_minibuf_frame calling Fset_frame_selected_window may
117 change it (Bug#12766).
119 2012-10-30 Jan Djärv <jan.h.d@swipnet.se>
121 * frame.c (Fframe_pixel_height): Fix documentation (Bug#12733).
123 2012-10-30 Kenichi Handa <handa@gnu.org>
125 * font.c (Ffont_at): If WINDOW is specified and it is not
126 displaying the current buffer, signal an error.
128 2012-10-29 Daniel Colascione <dancol@dancol.org>
130 * cygw32.h, cygw32.c (Qutf_16le, from_unicode, to_unicode): In
131 preparation for fixing bug#12739, move these functions from
134 * coding.h, coding.c: ... to here, and compile them only when
135 WINDOWSNT or CYGWIN. Moving these functions out of cygw32 proper
136 lets us write cygw32-agnostic code for the HAVE_NTGUI case.
138 2012-10-28 Eli Zaretskii <eliz@gnu.org>
140 * w32proc.c (TIMER_TICKS_PER_SEC): New macro.
141 (timer_loop, getitimer, setitimer): Use it instead of
142 CLOCKS_PER_SEC, which is no longer pertinent, since we don't use
144 (w32_get_timer_time): Use 10*TIMER_TICKS_PER_SEC instead of a
147 2012-10-28 Jan Djärv <jan.h.d@swipnet.se>
149 * nsterm.m (NO_APPDEFINED_DATA): New define.
150 (last_appdefined_event_data): New variable
151 (last_appdefined_event): Remove.
152 (ns_select): Initialize t from last_appdefined_event_data instead
153 of [last_appdefined_event data1].
154 (sendEvent:): Save [theEvent data1] to last_appdefined_event_data,
155 remove last_appdefined_event (Bug#12698).
157 2012-10-28 Stefan Monnier <monnier@iro.umontreal.ca>
159 * frame.c (x_set_font): Catch internal error.
161 2012-10-27 Eli Zaretskii <eliz@gnu.org>
163 Avoid overflow in w32 implementation of interval timers.
164 When possible, for ITIMER_PROF count only times the main thread
166 * w32proc.c <struct itimer_data>: 'expire' and 'reload' are now
167 'volatile ULONGLONG' types. All the other data which was
168 previously clock_t is now ULONGLONG. 'terminate' is 'volatile int'.
169 (GetThreadTimes_Proc): New typedef.
170 (w32_get_timer_time): New function, returns a suitable time value
172 (timer_loop): Enter critical section when accessing ULONGLONG
173 values of the itimer_data struct, as these accesses are no longer
174 atomic. Call 'w32_get_timer_time' instead of 'clock'.
175 Remove unused variable.
176 (init_timers): Initialize s_pfn_Get_Thread_Times.
177 (start_timer_thread): Don't assign itimer->caller_thread here.
178 (getitimer): Assign itimer->caller_thread here.
179 (setitimer): Always call getitimer to get the value of ticks_now.
180 (sys_spawnve): Avoid compiler warning about format mismatch.
182 2012-10-26 Eli Zaretskii <eliz@gnu.org>
184 * w32fns.c (w32_wnd_proc) <WM_MOUSEMOVE>: Don't enable tracking of
185 mouse movement events if the menu bar is active. This avoids
186 producing a busy "hour-glass" cursor by Windows if the mouse
187 pointer is positioned over a tooltip shown for some menu item.
189 2012-10-25 Paul Eggert <eggert@cs.ucla.edu>
191 Don't assume process IDs fit in int.
192 * emacs.c (shut_down_emacs) [!DOS_NT]:
193 * sysdep.c (sys_suspend) [SIGTSTP && !MSDOS]:
194 * term.c (dissociate_if_controlling_tty) [!DOS_NT]:
195 Use pid_t, not int, to store process IDs, as 'int'
196 is not wide enough on a few platforms (e.g., AIX and IRIX).
198 2012-10-23 Kenichi Handa <handa@gnu.org>
200 The following change is to make face-font-rescale-alist work
201 correctly for non-ASCII fonts.
203 * font.c (font_open_entity): Don't handle Vface_font_rescale_alist.
204 (font_open_for_lface): Handle Vface_font_rescale_alist.
206 2012-10-23 Chong Yidong <cyd@gnu.org>
208 * xfaces.c (Vfont_list_limit): Move unused variable to faces.el.
210 2012-10-21 Jan Djärv <jan.h.d@swipnet.se>
212 * nsfont.m (nsfont_open, ns_glyph_metrics): Force integer advancement
214 (nsfont_draw): Turn off LCD-smoothing (Bug#11484).
216 * xterm.c (x_focus_changed): Check if daemonp when sending focus in
219 2012-10-21 Glenn Morris <rgm@gnu.org>
221 * lisp.mk (lisp): Add cp51932.el and eucjp-ms.el.
223 2012-10-20 Paul Eggert <eggert@cs.ucla.edu>
226 * frame.c (Fmouse_position, Fmouse_pixel_position):
227 * xdisp.c (produce_stretch_glyph):
228 Declare local vars only when they're needed.
229 This is clearer and avoids a warning on OpenBSD about unused vars.
230 * frame.h (FRAME_WINDOW_P): Always evaluate its argument.
231 This is safer, and avoids OpenBSD warnings about unused vars.
232 * keyboard.c (record_menu_key): Remove unnecessary decl.
233 (poll_timer): Define only if POLL_FOR_INPUT is defined.
234 * unexelf.c (ELFSIZE) [!ElfW]: Do not define if already defined,
235 as our definition clashes with OpenBSD's.
236 * xfaces.c (load_face_colors, check_lface_attrs)
237 (get_lface_attributes_no_remap, get_lface_attributes)
238 (lface_fully_specified_p, x_supports_face_attributes_p)
239 (tty_supports_face_attributes_p, face_fontset, realize_face)
240 (realize_x_face, realize_tty_face):
241 Declare parameters to be Lisp_Object[LFACE_VECTOR_SIZE], not
242 merely Lisp_Object *. This is more informative and avoids
243 a warning on OpenBSD about accessing beyond an object's size.
245 2012-10-20 Chong Yidong <cyd@gnu.org>
247 * lread.c (Fload): Doc fix (Bug#12592).
249 2012-10-19 Kazuhiro Ito <kzhr@d1.dion.ne.jp> (tiny change)
251 * font.c (Ffont_at): Fix previous change.
253 2012-10-19 Eli Zaretskii <eliz@gnu.org>
255 * puresize.h (BASE_PURESIZE): Bump the base value to 1700000.
256 See http://lists.gnu.org/archive/html/emacs-devel/2012-10/msg00593.html
259 * alloc.c (NSTATICS): Decrease to 0x800.
261 2012-10-19 Stefan Monnier <monnier@iro.umontreal.ca>
263 * fns.c (Fnreverse): Include the problem element when signalling an
266 2012-10-18 Jan Djärv <jan.h.d@swipnet.se>
268 * nsterm.m (ns_select): Check writefds before call to
269 FD_ISSET (Bug#12668).
271 2012-10-18 Daniel Colascione <dancol@dancol.org>
273 * alloc.c (NSTATICS): Increase from 0x650 to 0x1000
274 (staticpro): If we run out of staticpro slots, die with an
275 informative error instead of just calling emacs_abort.
277 2012-10-18 Martin Rudalics <rudalics@gmx.at>
279 Fix two flaws reported by Dmitry Antipov.
280 * window.c (Ftemp_output_buffer_show): Remove.
281 (Fwindow_vscroll, Fset_window_vscroll): Use decode_live_window.
282 (syms_of_window): Remove defsubr for Stemp_output_buffer_show.
284 2012-10-17 Eli Zaretskii <eliz@gnu.org>
286 * makefile.w32-in ($(BLD)/w32.$(O)):
287 ($(BLD)/vm-limit.$(O)):
289 ($(BLD)/unexw32.$(O)):
290 ($(BLD)/fileio.$(O)):
291 ($(BLD)/dispnew.$(O)): Update dependencies.
293 * w32term.h (w32_initialize_display_info, initialize_w32_display):
296 * w32proc.c: Include ctype.h.
298 * w32.h (init_environment, check_windows_init_file)
299 (syms_of_ntproc, syms_of_ntterm, dostounix_filename)
300 (unixtodos_filename, init_winsock, srandom, random, sys_pipe)
301 (set_process_dir, sys_spawnve, register_child, sys_sleep, getwd)
302 (sys_link): Add prototypes.
304 * w32.c: Include w32select.h.
305 (sys_access, e_malloc, sys_select): Add prototypes.
306 (emacs_gnutls_pull): 'timeout' is now EMACS_TIME, not struct timeval.
308 * vm-limit.c [WINDOWSNT]: Include w32heap.h.
310 * unexw32.c: Include lisp.h and w32.h.
312 * term.c [WINDOWSNT]: Include w32term.h.
314 * process.c [WINDOWSNT]: Add prototype of sys_select.
316 * fileio.c [WINDOWSNT]: Include w32.h.
318 * dispnew.c [WINDOWSNT]: Include w32.h.
320 * cygw32.c (Fcygwin_convert_path_to_windows)
321 (Fcygwin_convert_path_from_windows): Use EQ to compare 2
322 Lisp_Object values. (Bug#12661)
324 * w32fns.c (w32_msg_pump): Use XIL instead of casting an integer
325 to Lisp_Object. (Bug#12661)
327 2012-10-17 Kenichi Handa <handa@gnu.org>
329 * xdisp.c (reseat_1): Make the information stored in it->cmp_it
332 2012-10-17 Dmitry Antipov <dmantipov@yandex.ru>
334 * buffer.c (Fkill_buffer): When unchaining the marker,
335 reset its buffer pointer to NULL (Bug#12652).
337 2012-10-17 Dmitry Antipov <dmantipov@yandex.ru>
339 Do not verify indirection counters of killed buffers (Bug#12579).
340 * buffer.h (BUFFER_CHECK_INDIRECTION): New macro.
341 * buffer.c (compact_buffer, set_buffer_internal_1): Use it.
343 2012-10-16 Dmitry Antipov <dmantipov@yandex.ru>
345 * alloc.c (Fmake_byte_code): Fix typo in comment.
346 * print.c (print_interval): Define as static to match prototype.
347 * indent.c (disptab_matches_widthtab, recompute_width_table):
350 2012-10-16 Dmitry Antipov <dmantipov@yandex.ru>
352 * editfns.c (get_system_name): Remove.
353 * lisp.h (get_system_name): Remove prototype.
354 * xrdb.c (getenv, getpwuid, getpwnam): Remove prototypes.
355 (get_environ_db): Use Vsystem_name. Avoid call to strlen.
357 2012-10-15 Daniel Colascione <dancol@dancol.org>
359 * dbusbind.c: Add comment explaining reason for previous change.
361 2012-10-15 Martin Rudalics <rudalics@gmx.at>
363 * window.c (Fwindow_end): Rewrite check whether cached position
364 can be used (Bug#12600).
365 (resize_frame_windows, grow_mini_window, shrink_mini_window):
366 Set windows_or_buffers_changed.
368 2012-10-15 Daniel Colascione <dancol@dancol.org>
370 * dbusbind.c: Fix cygw32 build break when compiling with dbus
371 enabled by undefining the symbol "interface", which the platform
372 headers define to something incompatible.
374 2012-10-14 Daniel Colascione <dancol@dancol.org>
376 * image.c (init_tiff_functions, init_imagemagick_functions)
377 (init_svg_functions): Fix cygw32 build break by using these
378 functions only when WINDOWSNT _and_ HAVE_NTGUI.
380 2012-10-14 Jan Djärv <jan.h.d@swipnet.se>
382 * nsterm.m (ns_select): Count fd:s in writefs also (Bug#12422).
384 2012-10-13 Jan Djärv <jan.h.d@swipnet.se>
386 * gtkutil.c (xg_set_widget_bg): Divide by 65535 (Bug#12612).
388 2012-10-13 HANATAKA, Shinya <bogytech@gmail.com> (tiny change)
390 * coding.c (detect_coding): Set coding->id before calling
393 2012-10-13 Andreas Schwab <schwab@linux-m68k.org>
395 * fileio.c: Formatting fixes.
397 2012-10-13 Paul Eggert <eggert@cs.ucla.edu>
399 Fix some stat-related races.
400 * fileio.c (Fwrite_region): Avoid race condition if a file is
401 removed or renamed by some other process immediately after Emacs
402 writes it but before Emacs stats it. Do not assume that stat (or
404 * image.c (slurp_file): Resolve the file name with fopen + fstat
405 rather than stat + fopen.
406 (pbm_read_file) [0]: Remove unused code with stat race.
407 * process.c (allocate_pty) [HAVE_PTYS && !PTY_ITERATION && !PTY_OPEN]:
408 Remove ineffective code with stat race.
410 2012-10-12 Stefan Monnier <monnier@iro.umontreal.ca>
412 * doc.c (get_doc_string): Don't signal an error if the file is missing.
414 2012-10-12 Jan Djärv <jan.h.d@swipnet.se>
416 * nsterm.m (hold_event_q): New static variable.
417 (EV_TRAILER, sendScrollEventAtLoc:fromEvent:): Call hold_event if
419 (hold_event): New function.
420 (ns_read_socket): If hold_event_q have events, store them and
422 (setPosition:portion:whole:): Send SIGIO to ourselves if apploopnr
425 2012-10-12 Juanma Barranquero <lekktu@gmail.com>
427 * makefile.w32-in ($(BLD)/w32select.$(O)): Update dependencies.
429 2012-10-12 Eli Zaretskii <eliz@gnu.org>
431 * makefile.w32-in ($(BLD)/fileio.$(O)): Add sys/file.h.
433 * fileio.c (check_existing): New function.
434 (make_temp_name, Ffile_exists_p, Ffile_writable_p): Call it
435 instead of calling 'stat', when what's needed is to check whether
436 a file exists. This avoids expensive system calls on MS-Windows.
439 * w32.c (init_environment): Call 'check_existing' instead of 'stat'.
441 * lread.c (openp) [WINDOWSNT]: Call 'access' instead of 'stat' to
442 determine whether a file exists and is not a directory.
444 * lisp.h (check_existing): Add prototype.
446 2012-10-12 Jan Djärv <jan.h.d@swipnet.se>
448 * nsfont.m (nsfont_open): Remove font cache, it is not GC correct.
450 2012-10-12 Glenn Morris <rgm@gnu.org>
452 * buffer.c (Fset_buffer): Doc fix. (Bug#12624)
454 2012-10-11 Stefan Monnier <monnier@iro.umontreal.ca>
456 * buffer.c (Fkill_buffer): Null out the overlay list(s) as well.
458 * eval.c (Fautoload): Remember previous autoload status in load-history.
460 2012-10-11 Paul Eggert <eggert@cs.ucla.edu>
462 lread.c, macros.c, marker.c, menu.c, minibuf.c: Use bool for booleans.
463 * lread.c (load_each_byte, new_backquote_flag, readchar)
464 (read_filtered_event, lisp_file_lexically_bound_p)
465 (safe_to_load_version, Fload, complete_filename_p, openp)
466 (build_load_history, readevalloop, read_escape, read1)
467 (string_to_number, read_vector, read_list):
468 * macros.c (Fstart_kbd_macro):
469 * marker.c (CONSIDER):
470 * menu.c (parse_single_submenu, digest_single_submenu)
471 (find_and_return_menu_selection, Fx_popup_menu):
472 * minibuf.c (read_minibuf_noninteractive, read_minibuf)
474 * nsmenu.m (ns_update_menubar, runMenuAt:forFrame:keymaps:):
476 * xmenu.c (set_frame_menubar, create_and_show_popup_menu)
477 (xmenu_show, xdialog_show):
478 Use bool for booleans.
479 * lread.c (safe_to_load_version): Rename from safe_to_load_p,
480 as it's not a predicate. All uses changed. Omit unnecessary
483 2012-10-11 Dmitry Antipov <dmantipov@yandex.ru>
485 * editfns.c (save_excursion_save): Use nil if mark points to nowhere.
486 (save_excursion_restore): Do not restore mark if it was not saved.
488 2012-10-11 Paul Eggert <eggert@cs.ucla.edu>
490 * marker.c (cached_modiff): EMACS_INT, not int.
492 * w32select.c (waiting_for_input): Declare by including "keyboard.h"
493 instead of having a wrong decl.
494 * nsmenu.m (waiting_for_input): Remove wrong decl.
496 2012-10-10 Paul Eggert <eggert@cs.ucla.edu>
498 keyboard.c, keymap.c: Use bool for booleans.
499 * dispnew.c (sit_for): Distinguish between 3-way display_option
500 and boolean do_display.
501 * keyboard.c (single_kboard, this_command_key_count_reset)
502 (waiting_for_input, echoing, immediate_quit, input_pending)
503 (interrupt_input, interrupts_deferred, pop_kboard)
504 (temporarily_switch_to_single_kboard, ignore_mouse_drag_p)
505 (command_loop_1, adjust_point_for_property)
506 (safe_run_hooks_error, input_polling_used, read_char):
507 (help_char_p, readable_events, kbd_buffer_events_waiting)
508 (kbd_buffer_get_event, timer_check_2, make_lispy_event)
509 (lucid_event_type_list_p, get_input_pending):
510 (gobble_input, menu_separator_name_p, menu_bar_item)
511 (parse_menu_item, parse_tool_bar_item, read_char_x_menu_prompt)
512 (read_char_minibuf_menu_prompt, access_keymap_keyremap)
513 (keyremap_step, test_undefined, read_key_sequence)
514 (detect_input_pending, detect_input_pending_ignore_squeezables)
515 (detect_input_pending_run_timers, requeued_events_pending_p)
516 (quit_throw_to_read_char, Fset_input_interrupt_mode):
517 * keymap.c (get_keymap, keymap_parent, keymap_memberp)
518 (access_keymap_1, access_keymap, map_keymap, get_keyelt)
519 (Fdefine_key, Flookup_key, struct accessible_keymaps_data)
520 (accessible_keymaps_1, Fkey_description, push_key_description):
521 (shadow_lookup, struct where_is_internal_data)
522 (where_is_internal, Fwhere_is_internal, where_is_internal_1)
523 (Fdescribe_buffer_bindings, describe_map_tree, struct describe_map_elt)
524 (describe_map, describe_vector):
525 * menu.c (single_menu_item):
526 * nsmenu.m (ns_update_menubar):
527 * process.c (wait_reading_process_output):
528 * search.c (scan_buffer, scan_newline):
529 Use bool for boolean.
530 * keyboard.c (timers_run, swallow_events)
531 (detect_input_pending_run_timers):
532 * process.c (wait_reading_process_output):
533 Use unsigned for counter where wraparound-on-overflow is desired,
534 since unsigned is guaranteed to have that behavior and signed is not.
535 (read_char): Use ptrdiff_t for string length.
536 (get_input_pending): Remove first argument, since it was always
537 the same pointer-to-int (now pointer-to-boolean) &input_pending,
538 and behave as if it had that value. Return new value of
539 input_pending. All callers changed.
540 * keyboard.h (struct kboard): Use unsigned : 1 for boolean member
541 immediate_echo. Use ptrdiff_t for echo_after_prompt, since it's
543 * keymap.c (push_key_description): Omit last arg, which was always 1.
546 * regex.c (immediate_quit) [emacs]: Remove duplicate decl.
548 2012-10-10 Juanma Barranquero <lekktu@gmail.com>
550 * makefile.w32-in ($(BLD)/dispnew.$(O), $(BLD)/indent.$(O))
551 ($(BLD)/term.$(O)): Update dependencies.
553 2012-10-10 Dmitry Antipov <dmantipov@yandex.ru>
555 * alloc.c (mark_object): Use meaningful PVEC_NORMAL_VECTOR.
556 * lisp.h (enum pvec_type): Adjust comments and omit explicit
557 initializer for PVEC_NORMAL_VECTOR.
559 2012-10-10 Paul Eggert <eggert@cs.ucla.edu>
561 Clean out old termopts cruft.
562 * termopts.h (flow_control, meta_key): Remove unused decls.
563 * dispnew.c, indent.c, nsterm.m, term.c, xsettings.c, xsmfns.c:
564 Don't include termopts.h.
566 2012-10-10 Dmitry Antipov <dmantipov@yandex.ru>
568 * alloc.c (gc_sweep): Use pointer-to-a-pointer loop for buffers.
570 2012-10-10 Paul Eggert <eggert@cs.ucla.edu>
572 * commands.h (immediate_quit): Remove duplicate decl.
574 2012-10-09 Jan Djärv <jan.h.d@swipnet.se>
576 * nsfont.m (Vfonts_in_cache): Remove, not needed as font.c handles
578 (nsfont_open): Remove setting of Vfonts_in_cache.
579 (syms_of_nsfont): Remove initialization of Vfonts_in_cache.
581 2012-10-09 Eli Zaretskii <eliz@gnu.org>
583 * w32fns.c (w32_last_error): Change the return value to DWORD, to
584 match what GetLastError returns. Explain why the function is
587 * frame.c (delete_frame): Rename local variable 'tooltip_frame' to
588 'is_tooltip_frame', to avoid confusion with its global namesake.
590 2012-10-08 Daniel Colascione <dancol@dancol.org>
592 * xdisp.c (start_hourglass): Call w32_note_current_window when
593 HAVE_NTGUI, not just WINDOWSNT, resolving a problem in the cygw32
594 build that caused Emacs to display the hourglass cursor forever.
596 * w32fns.c (Fx_display_color_cells): Instead of using NCOLORS,
597 which is broken under remote desktop, calculate the number of
598 colors available for a display based on the display's number of
599 planes and number of bits per pixel per plane. (bug#10397).
601 2012-10-08 Jan Djärv <jan.h.d@swipnet.se>
603 * nsfont.m (Vfonts_in_cache): New variable.
604 (nsfont_open): Use unsignedLongLongValue for cache in case wide ints
605 are used. Add cached fonts to Vfonts_in_cache.
606 (syms_of_nsfont): Initialize and staticpro Vfonts_in_cache.
608 2012-10-08 Juanma Barranquero <lekktu@gmail.com>
610 * makefile.w32-in (LOCAL_FLAGS): Don't define HAVE_NTGUI, it's now
612 (FONT_H): Define after FRAME_H.
613 ($(BLD)/emacs.$(O), $(BLD)/process.$(O), $(BLD)/w32heap.$(O)):
616 * w32term.c: Remove leftover declaration of keyboard_codepage.
618 2012-10-08 Eli Zaretskii <eliz@gnu.org>
620 * makefile.w32-in (FONT_H): Add $(FRAME_H).
621 (W32TERM_H): Add $(ATIMER_H) and $(FRAME_H).
622 ($(BLD)/emacs.$(O), $(BLD)/w32console.$(O)): Update dependencies.
623 (GLOBAL_SOURCES): Add cygw32.c.
624 ($(BLD)/unexw32.$(O)):
626 ($(BLD)/w32console.$(O)):
627 ($(BLD)/w32fns.$(O)):
628 ($(BLD)/w32heap.$(O)):
629 ($(BLD)/w32menu.$(O)):
630 ($(BLD)/w32proc.$(O)): Add w32common.h.
632 * w32fns.c (w32_color_map_lookup, x_to_w32_color): Argument is now
634 (x_to_w32_color): Don't modify the argument, modify a copy instead.
636 2012-10-08 Daniel Colascione <dancol@dancol.org>
638 * w32term.h (WM_EMACS_BRINGTOTOP, WM_EMACS_INPUT_READY)
639 (WM_EMACS_END): Change WM_EMACS_BRINGTOTOP from 22 to 21 to close
640 accidental message numbering hole. Change other messages to
643 * w32select.h (HAVE_W32SELECT): Remove.
645 * w32select.c, w32proc.c, w32menu.c, w32console.c, w32.c: Include
646 w32common.h instead of w32heap.h.
648 * w32heap.h (ROUND_UP, ROUND_DOWN, get_page_size)
649 (get_allocation_unit, get_processor_type, get_w32_major_version)
650 (get_w32_minor_version, sysinfo_cache, osinfo_cache)
651 (w32_major_version, w32_minor_version, w32_build_number, OS_9X)
652 (OS_NT, os_subtype, cache_system_info): Move declarations to
655 * w32heap.c: Include w32common.h.
656 (sysinfo_cache, syspage_mask, osinfo_cache, w32_major_version)
657 (w32_minor_version, w32_build_number, w32_subtype):
658 Remove duplicate definitions.
660 * w32fns.c: Include w32common.h; include w32heap.h only in
663 (Fx_file_dialog): Clarify comment on GetOpenFileName structure.
664 Use `report_file_error' instead of `error' in order to better
665 inform users of what went wrong. Increase NTGUI_UNICODE file
666 dialog box file name length to 32k, the maximum allowed by the NT
669 * w32common.h: New file.
670 (ROUND_UP, ROUND_DOWN, get_page_size)
671 (get_allocation_unit, get_processor_type, get_w32_major_version)
672 (get_w32_minor_version, sysinfo_cache, osinfo_cache)
673 (w32_major_version, w32_minor_version, w32_build_number, OS_9X)
674 (OS_NT, os_subtype, cache_system_info): Move here.
676 * unexw32.c, unexcw.c: Include w32common.h.
678 * emacs.c (main): Use (defined (WINDOWSNT) || defined
679 HAVE_NTGUI) instead of removed HAVE_W32SELECT to decide whether
680 to call syms_of_w32select.
682 * cygw32.h: Remove obsolete EXFUN declarations.
684 * cygw32.c (Qutf_16_le): Rename to Qutf_16le.
686 * Makefile.in (SOME_MACHINE_OBJECTS): Reverse accidental removal
687 of w32inevt.o from SOME_MACHINE_OBJECTS.
689 2012-10-08 Daniel Colascione <dancol@dancol.org>
691 * image.c: Permanent fix for JPEG compilation issue --- limit
692 jpeglib `boolean' redefinition to Cygwin builds.
694 2012-10-08 Eli Zaretskii <eliz@gnu.org>
696 * image.c (CHECK_LIB_AVAILABLE): Remove, no longer used.
698 * emacs.c (DAEMON_MUST_EXEC) [HAVE_NTGUI]: Define this only on
701 2012-10-08 Daniel Colascione <dancol@dancol.org>
703 * xfaces.c, xdisp.c, window.c, w32xfns.c, w32term.h, w32term.c,
704 w32select.h w32select.c, w32proc.c, w32menu.c, w32inevt.c,
705 w32help.c, w32font.c, w32font.c, w32fns.c, w32console.c, w32.h,
706 w32.c, unexw32.c, termhooks.h, process.c, menu.c, keyboard.h,
707 keyboard.c, image.c, frame.h, frame.c, fontset.c, font.h, font.c,
708 emacs.c, dispextern.h, cygw32.h, cygw32.c, conf_post.h,
709 Makefile.in: use HAVE_NTGUI for W32 GUI and WINDOWSNT for the
710 operating system. defined(HAVE_NTGUI) && !defined(WINDOWSNT) is
711 now a supported configuration.
713 * Makefile.in: consolidate image variables into LIBIMAGE; add
714 W32_OBJ and W32_LIBS. Compile new files.
717 (_DebPrint) declare tracing facility for W32 debugging. We need
718 to unify tracing later.
720 (NTGUI_UNICODE) Define when compiling for Cygwin to allow the
721 unconditional use of W32 Unicode functions. Cygwin runs only on
722 100% Unicode operating systems.
724 * cygw32.c: New file. Define Cygwin-specific facilities.
725 (Fcygwin_convert_path_to_windows)
726 (Fcygwin_convert_path_from_windows): New user functions for
727 accessing Cygwin path-munging routines.
729 * cygw32.h: New file.
730 (WCSDATA, to_unicode, from_unicode): Define facilities for storing
731 UTF-16LE strings temporarily inside non-Lisp-visible string
734 (w32_strerror): Just what it says on the tin.
736 * emacs.c: Make the NS fork-then-exec code for daemon-launching
737 also run for Cygwin; both systems have the same problem with using
738 GUI facilities in a forked child. Also call syms_of_cygw32,
739 syms_of_w32select in correct places.
741 (DAEMON_MUST_EXEC): new macro defined to signal that a platform
742 needs fork-then-exec for daemon launching.
744 * font.h: Include frame.h.
746 * image.c: Use the image library cache machinery only when we're
747 compiling for native WINDOWSNT; Cygwin can use shared libraries
748 like any other Unixlike system.
750 * keyboard.c: Clarify a comment regarding the input loop.
752 * menu.c: When NTGUI_UNICODE is defined, use Unicode menu
753 functions directly instead of trying to detect at runtime that our
754 host operating system supports them. We make this change for two
755 reasons: Cygwin lacks support for the multibyte character
756 conversion functions used by the legacy menu code, and Cygwin
757 never needs to rely on non-Unicode APIs.
759 * unexw32.c (hinst): Declare extern.
761 * w32.c: Change header order;
762 (w32_strerror): Move to w32fns.c because we need it for
763 non-WINDOWSNT builds.
765 * w32.h: Add #error macro to make sure we don't include w32.h for
766 Cygwin builds. Remove w32select declarations.
768 * w32console.c (w32_sys_ring_bell, Fset_message_beep): Move to
769 w32fns.c. w32console.c is WINDOWSNT-only.
771 * w32fns.c: Include cygw32.h or w32.h depending on CYGWIN; more
772 NTGUI_UNICODE tweaks. (See above.) Change _snprintf to the more
774 (faked_key, sysinfo_cache, osinfo_cahce, syspage_mask)
775 (w32_major_version, w32_minor_version, w32_build_number)
776 (os_subtype, sound_type): Define here
777 (w32_defined_color): Make color parameter const for consistency
778 with other _defined_color functions.
779 (w32_createwindow): Unconditionally call w32_init_class instead of
780 doing so only when hprevinst is non-NULL. Plumbing hprevinst
781 through the code is complex and unnecessary because class
782 registration is practically free.
783 (w32_name_of_message): New EMACSDEBUG-only function.
784 (Fset_message_beep): Move here
785 (Fx_open_connection): Require that the display name for Windows be
786 "w32" for consistency, emacsclient disambiguation, and maybe, one
787 day, multi-window-system support.
788 (file_dialog_callback): NTGUI_UNICODE changes; encode and decode
789 Cygwin files for W32 GUI facilities, since these clearly don't
792 (w32_strerror, w32_console_toggle_lock_key, w32_kbd_mods_to_emacs)
793 (w32_kbd_patch_key, w32_sys_ring_bell): Move here.
794 (Ssystem_move_file_to_trash): Define only for native WINDOWSNT.
795 (w32_last_error): Remove.
797 * w32font.c: Define _strlwr to strlwr for non-WINDOWSNT builds.
799 * w32heap.c (syspage_mask): Declare here.
800 (cache_system_info): Remove.
802 * w32inevt.c (faked_key): Define globally, not statically.
803 (w32_kbd_mods_to_emacs, w32_kbd_patch_key, faked_key)
804 (w32_console_toggle_lock_key): Move to w32fns.c.
806 * w32menu.c: Include setjmp.h. NTGUI_UNICODE changes throughout.
808 * w32proc.c (_DebPrint): Move to w32fns.c.
809 * w32select.c: Include string.h, stdio.h for Cygwin.
810 * w32select.h: New File.
812 * w32term.c: Include io.h for non-CYGWIN builds; needed for
814 (w32_message_fd): New variable. Under Cygwin, holds the file
815 descriptor the system used to tell us about pending thread
818 (w32_init_term): Remove incorrect calls to fcntl and init_sigio
819 that prevented compilation under non-WINDOWSNT systems.
821 (w32_initialize): Open /dev/windows and assign it to
822 w32_message_fd. Provide w32 feature.
824 * w32term.h: Include frame.h, atimer.h. Declare various frame functions.
825 (WM_EMACS_INPUT_READY): add.
826 (prepend_msg, w32_message_fd): Declare globally.
829 (keyboard_handle): Use only when WINDOWSNT.
830 (notify_msg_ready): New function. Posts a message to the main
831 thread's message queue under CYGWIN, which wakes up the main
832 thread from select(2) by making the /dev/windows file descriptor
833 ready. Under WINDOWSNT, it sets an event the same way the old
836 (post, prepend_msg): Actually call notify_msg_ready instead of
837 setting the input event directly.
839 2012-10-07 Eli Zaretskii <eliz@gnu.org>
841 * ralloc.c (relinquish): If a heap is ready to be relinquished,
842 but it still has blocs in it, don't return it to the system,
843 instead of aborting. (Bug#12402)
845 2012-10-07 Jan Djärv <jan.h.d@swipnet.se>
847 * nsterm.m (ns_dumpglyphs_image): Only draw slice of image (Bug#12506).
849 * nsterm.m (ns_update_auto_hide_menu_bar): Remove defintion of
850 MAC_OS_X_VERSION_10_6.
851 (syms_of_nsterm): Remove comment about Panther and above for
853 * nsterm.h (MAC_OS_X_VERSION_10_3, onTiger): Remove.
854 (EmacsApp): Remove check for >= MAC_OS_X_VERSION_10_4.
855 (struct nsfont_info): Remove check for >= MAC_OS_X_VERSION_10_3.
857 * nsselect.m (ns_string_from_pasteboard): Remove check for >=
858 MAC_OS_X_VERSION_10_4.
860 * nsmenu.m (fillWithWidgetValue:): Remove code for <
861 MAC_OS_X_VERSION_10_2.
863 * nsimage.m (setPixmapData, getPixelAtX, setAlphaAtX): Remove onTiger.
865 * nsfns.m (Fns_list_services): Remove comment and check for OSX < 10.4.
866 (ns_do_applescript): Remove check for >= MAC_OS_X_VERSION_10_4.
868 * nsterm.m (ns_in_resize): Remove (Bug#12479).
869 (ns_resize_handle_rect, mouseDown, mouseUp, mouseDragged): Remove.
870 (ns_clear_frame, sendEvent, windowDidResize, drawRect:):
871 Remove ns_in_resize check.
872 (ns_clear_frame_area): Remove resize handle code.
874 * nsfns.m (ns_in_resize): Remove.
875 (x_set_icon_name, ns_set_name, ns_set_name_as_filename):
876 Remove ns_in_resize check.
878 2012-10-07 Paul Eggert <eggert@cs.ucla.edu>
880 Improve sys_siglist detection.
881 * sysdep.c (sys_siglist, init_signals): Use _sys_siglist if it's
882 defined as a macro, as is done in Solaris.
883 (sys_siglist_entries): New macro.
884 (save_strsignal): Use it.
885 * syssignal.h (safe_strsignal): Now ATTRIBUTE_CONST, to pacify
886 GCC 4.7.2 on Fedora 17 with the fixed sys_siglist detection.
888 2012-10-06 Jan Djärv <jan.h.d@swipnet.se>
890 * nsfns.m (Fx_create_frame): Call x_default_parameter with
891 fullscreen/Fullscreen.
893 * nsterm.h (EmacsView): Rename tbar_height to tibar_height.
896 * nsterm.m (x_make_frame_visible): Check for fullscreen.
897 (ns_fullscreen_hook): Activate old style fullscreen with a timer.
898 (ns_term_init): Set activateIgnoringOtherApps if old style fullscreen.
899 (windowDidResize:): Check for correct window if old style fullscreen.
900 Capitalize word in comment. Remove incorrect comment.
901 (initFrameFromEmacs:): tbar_height renamed tibar_height.
902 (windowDidEnterFullScreen:): Toggle toolbar for fullscreen to fix
903 error in drawing background.
904 (toggleFullScreen:): Remove comment. Rearrange calls.
905 Set toolbar values to zero, save old height in tobar_height.
906 Restore tool bar height when leaving fullscreen.
907 (canBecomeMainWindow): New function.
909 2012-10-06 Paul Eggert <eggert@cs.ucla.edu>
911 * keyboard.c (read_char): Remove unnecessary 'volatile's and label.
913 2012-10-05 Eli Zaretskii <eliz@gnu.org>
915 * w32proc.c (stop_timer_thread): Fix declaration of 'err'.
917 * w32.c (utime): Open the file with FILE_FLAG_BACKUP_SEMANTICS, so
918 that time stamps of directories could also be changed.
919 Don't request the too broad GENERIC_WRITE, only the more restrictive
920 FILE_WRITE_ATTRIBUTES access rights.
922 * fileio.c (Fset_file_times): Special-case ignoring errors for
923 directories only on MSDOS, not on MS-Windows.
925 2012-10-05 Ikumi Keita <ikumi@ikumi.que.jp> (tiny change)
927 * minibuf.c (Fcompleting_read): Doc fix. (Bug#12555)
929 2012-10-04 Eli Zaretskii <eliz@gnu.org>
931 * w32.c (utime): Test for INVALID_HANDLE_VALUE, not for NULL, to
932 see whether CreateFile failed.
934 2012-10-04 Paul Eggert <eggert@cs.ucla.edu>
936 * profiler.c (handle_profiler_signal): Inhibit pending signals too,
937 to avoid similar races.
938 * keyboard.c (pending_signals): Now bool, not int.
940 Port timers to OpenBSD, plus check for timer failures.
941 OpenBSD problem reported by Han Boetes.
942 * profiler.c (setup_cpu_timer): Check for failure of timer_settime
944 (Fprofiler_cpu_stop): Don't assume HAVE_SETITIMER.
945 * syssignal.h (HAVE_ITIMERSPEC): New macro. This is for platforms
946 like OpenBSD, which has timer_settime but does not declare it.
947 OpenBSD does not define SIGEV_SIGNAL, so use that when deciding
948 whether to use itimerspec-related primitives. All uses of
949 HAVE_TIMER_SETTIME replaced with HAVE_ITIMERSPEC.
951 2012-10-02 Paul Eggert <eggert@cs.ucla.edu>
953 * profiler.c (handle_profiler_signal): Fix a malloc race
954 that caused Emacs to hang on Fedora 17 when profiling Lisp.
956 2012-10-02 Jan Djärv <jan.h.d@swipnet.se>
958 * nsterm.m (windowDidEnterFullScreen): Remove fprintf.
960 2012-10-02 Eli Zaretskii <eliz@gnu.org>
962 * w32proc.c (sys_wait): Declare 'signame' 'const char *', to be
963 consistent with the change in return value of 'safe_strsignal'.
965 2012-10-02 Paul Eggert <eggert@cs.ucla.edu>
967 Prefer plain 'static' to 'static inline' (Bug#12541).
968 * bidi.c (bidi_get_type, bidi_check_type, bidi_get_category)
969 (bidi_set_sor_type, bidi_push_embedding_level)
970 (bidi_pop_embedding_level, bidi_remember_char, bidi_copy_it)
971 (bidi_cache_reset, bidi_cache_shrink, bidi_cache_fetch_state)
972 (bidi_cache_search, bidi_cache_ensure_space)
973 (bidi_cache_iterator_state, bidi_cache_find)
974 (bidi_peek_at_next_level, bidi_set_paragraph_end)
975 (bidi_count_bytes, bidi_char_at_pos, bidi_fetch_char)
976 (bidi_explicit_dir_char, bidi_resolve_neutral_1):
977 Now 'static', not 'static inline'.
979 Count overruns when profiling; change units to ns.
980 * profiler.c (handle_profiler_signal): Count sampling intervals, not ms.
981 Give extra weight to samples after overruns, to attempt to count
982 the time more accurately.
983 (setup_cpu_timer): Change sampling interval units from ms to ns, since
984 the underlying primitives nominally do ns.
985 (Fprofiler_cpu_start): Document the change. Mention that
986 the sampling intervals are only approximate.
988 2012-10-02 Stefan Monnier <monnier@iro.umontreal.ca>
990 * frame.c (Fmake_terminal_frame): Prefer safer CONSP over !NILP.
992 * coding.h (ENCODE_FILE, DECODE_FILE, DECODE_SYSTEM): Remove special
993 case for the special 0 coding-system.
995 * buffer.c (Fset_buffer_multibyte): Signal an error instead of widening.
996 (Fmake_overlay): Remove redundant tests.
997 (fix_start_end_in_overlays): Remove redundant recentering.
999 2012-10-02 Juanma Barranquero <lekktu@gmail.com>
1001 * makefile.w32-in ($(BLD)/alloc.$(O), $(BLD)/gmalloc.$(O)):
1002 Update dependencies.
1004 2012-10-01 Paul Eggert <eggert@cs.ucla.edu>
1006 Fix a malloc race condition involving strsignal.
1007 A signal can arrive in the middle of a malloc, and Emacs's signal
1008 handler can invoke strsignal, which can invoke malloc, which is
1009 not portable. This race condition bug makes Emacs hang on GNU/Linux.
1010 Fix it by altering the signal handler so that it does not invoke
1012 * emacs.c (shut_down_emacs): Use safe_strsignal, not strsignal.
1013 * process.c (status_message): Use const pointer, in case strsignal
1014 is #defined to safe_strsignal.
1015 * sysdep.c (sys_siglist, init_signals): Always define and
1016 initialize a substitute sys_siglist if the system does not define
1017 one, even if HAVE_STRSIGNAL.
1018 (safe_strsignal): Rename from strsignal. Always define,
1019 using sys_siglist. Return a const pointer.
1020 * syssignal.h (safe_strsignal): New decl.
1021 (strsignal) [!HAVE_STRSIGNAL]: Define in terms of safe_strsignal.
1023 2012-10-01 Eli Zaretskii <eliz@gnu.org>
1025 * w32proc.c (timer_loop): Fix code that waits for timer
1026 expiration, to avoid high CPU usage.
1028 2012-10-01 Stefan Monnier <monnier@iro.umontreal.ca>
1030 * fns.c (check_hash_table, get_key_arg, maybe_resize_hash_table)
1031 (sweep_weak_table): Remove redundant prototypes.
1033 2012-10-01 Fabrice Popineau <fabrice.popineau@gmail.com>
1035 * emacs.c: Move the inclusion of TERM_HEADER after including
1036 windows.h on WINDOWSNT. This avoids compilation problems with
1039 2012-10-01 Eli Zaretskii <eliz@gnu.org>
1041 * unexw32.c (OFFSET_TO_RVA, RVA_TO_OFFSET)
1042 (RVA_TO_SECTION_OFFSET): Encode all macro arguments in parentheses.
1043 (RVA_TO_PTR): Cast the result of RVA_TO_OFFSET to 'unsigned char *',
1044 as the previous version used 'void *'.
1046 * ralloc.c (ROUNDUP): Fix last change.
1047 (MEM_ROUNDUP): Don't cast MEM_ALIGN, it is already of type
1050 * w32proc.c <disable_itimers>: New static flag.
1051 (init_timers): Initialize it to zero, after creating the critical
1052 sections used by the timer threads.
1053 (term_timers): Set to 1 before deleting the critical sections.
1054 (getitimer, setitimer): If disable_itimers is non-zero, return an
1055 error indication without doing anything. Reported by Fabrice
1056 Popineau <fabrice.popineau@supelec.fr> as part of bug#12544.
1057 (alarm) [HAVE_SETITIMER]: Be more conformant to the expected
1059 [!HAVE_SETITIMER]: Behave as the previous version that didn't
1062 * emacs.c (shut_down_emacs) [WINDOWSNT]: Move the call to
1063 term_ntproc after all the other bookkeeping, to get timers working
1064 as long as possible.
1066 2012-10-01 Paul Eggert <eggert@cs.ucla.edu>
1068 * xdisp.c (syms_of_xdisp): Default message-log-max to 1000, not 100.
1069 Suggested by Juri Linkov in
1070 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00821.html>.
1072 Prefer plain 'static' to 'static inline' (Bug#12541).
1073 With static functions, modern compilers inline pretty well by
1074 themselves; advice from programmers often hurts as much as it helps.
1075 On my host (x86-64, Fedora 17, GCC 4.7.2, default 'configure'),
1076 this change shrinks the text size of the Emacs executable by 1.1%
1077 without affecting CPU significantly in my benchmark.
1078 * alloc.c (mem_find, live_string_p, live_cons_p, live_symbol_p)
1079 (live_float_p, live_misc_p, live_vector_p, live_buffer_p)
1080 (mark_maybe_object, mark_maybe_pointer, bounded_number):
1081 * buffer.c (bset_abbrev_mode, bset_abbrev_table)
1082 (bset_auto_fill_function, bset_auto_save_file_format)
1083 (bset_auto_save_file_name, bset_backed_up, bset_begv_marker)
1084 (bset_bidi_display_reordering, bset_buffer_file_coding_system)
1085 (bset_cache_long_line_scans, bset_case_fold_search)
1086 (bset_ctl_arrow, bset_cursor_in_non_selected_windows)
1087 (bset_cursor_type, bset_display_table, bset_extra_line_spacing)
1088 (bset_file_format, bset_file_truename, bset_fringe_cursor_alist)
1089 (bset_fringe_indicator_alist, bset_fringes_outside_margins)
1090 (bset_header_line_format, bset_indicate_buffer_boundaries)
1091 (bset_indicate_empty_lines, bset_invisibility_spec)
1092 (bset_left_fringe_width, bset_major_mode, bset_mark)
1093 (bset_minor_modes, bset_mode_line_format, bset_mode_name)
1094 (bset_name, bset_overwrite_mode, bset_pt_marker)
1095 (bset_right_fringe_width, bset_save_length)
1096 (bset_scroll_bar_width, bset_scroll_down_aggressively)
1097 (bset_scroll_up_aggressively, bset_selective_display)
1098 (bset_selective_display_ellipses, bset_vertical_scroll_bar_type)
1099 (bset_word_wrap, bset_zv_marker, set_buffer_overlays_before)
1100 (set_buffer_overlays_after):
1101 * category.c (bset_category_table):
1102 * charset.c (read_hex):
1103 * coding.c (produce_composition, produce_charset)
1104 (handle_composition_annotation, handle_charset_annotation)
1106 * dispnew.c (swap_glyph_pointers, copy_row_except_pointers)
1107 (assign_row, set_frame_matrix_frame, make_current)
1109 * eval.c (set_specpdl_symbol, set_specpdl_old_value):
1110 * fns.c (maybe_resize_hash_table):
1111 * frame.c (fset_buffer_predicate, fset_minibuffer_window):
1112 * gmalloc.c (register_heapinfo):
1113 * image.c (lookup_image_type):
1114 * intervals.c (set_interval_object, set_interval_left)
1115 (set_interval_right, copy_interval_parent, rotate_right)
1116 (rotate_left, balance_possible_root_interval):
1117 * keyboard.c (kset_echo_string, kset_kbd_queue)
1118 (kset_keyboard_translate_table, kset_last_prefix_arg)
1119 (kset_last_repeatable_command, kset_local_function_key_map)
1120 (kset_overriding_terminal_local_map, kset_real_last_command)
1121 (kset_system_key_syms, clear_event, set_prop):
1122 * lread.c (digit_to_number):
1123 * marker.c (attach_marker, live_buffer, set_marker_internal):
1124 * nsterm.m (ns_compute_glyph_string_overhangs):
1125 * process.c (pset_buffer, pset_command)
1126 (pset_decode_coding_system, pset_decoding_buf)
1127 (pset_encode_coding_system, pset_encoding_buf, pset_filter)
1128 (pset_log, pset_mark, pset_name, pset_plist, pset_sentinel)
1129 (pset_status, pset_tty_name, pset_type, pset_write_queue):
1130 * syntax.c (bset_syntax_table, dec_bytepos):
1131 * terminal.c (tset_param_alist):
1132 * textprop.c (interval_has_some_properties)
1133 (interval_has_some_properties_list):
1134 * window.c (wset_combination_limit, wset_dedicated)
1135 (wset_display_table, wset_hchild, wset_left_fringe_width)
1136 (wset_left_margin_cols, wset_new_normal, wset_new_total)
1137 (wset_normal_cols, wset_normal_lines, wset_parent, wset_pointm)
1138 (wset_right_fringe_width, wset_right_margin_cols)
1139 (wset_scroll_bar_width, wset_start, wset_temslot, wset_vchild)
1140 (wset_vertical_scroll_bar_type, wset_window_parameters):
1141 * xdisp.c (wset_base_line_number, wset_base_line_pos)
1142 (wset_column_number_displayed, wset_region_showing)
1143 (window_box_edges, run_window_scroll_functions)
1144 (append_glyph_string_lists, prepend_glyph_string_lists)
1145 (append_glyph_string, set_glyph_string_background_width)
1146 (append_glyph, append_composite_glyph)
1147 (take_vertical_position_into_account):
1148 * xfaces.c (x_create_gc, x_free_gc, merge_face_vectors)
1149 (face_attr_equal_p, lface_equal_p, hash_string_case_insensitive)
1150 (lface_hash, lface_same_font_attributes_p, lookup_face):
1151 * xml.c (libxml2_loaded_p):
1152 * xterm.c (x_set_mode_line_face_gc, x_set_glyph_string_gc)
1153 (x_set_glyph_string_clipping, x_clear_glyph_string_rect):
1154 Now 'static', not 'static inline'.
1157 (bidi_copy_it): Do the whole copy with a single memcpy.
1158 (bidi_char_at_pos): Merge the two STRING_CHAR calls into one.
1160 Revert the FOLLOW-SYMLINKS change for file-attributes.
1161 Doing it right would require several changes to Tramp, and there's
1162 not enough time to get that tested before the freeze today.
1163 * dired.c (directory_files_internal, Ffile_attributes):
1166 * frame.c (x_report_frame_params): Port better to wider ints.
1167 Do not assume that EMACS_UINT is the same width as uprintmax_t,
1168 or that pointers can be printed in 15 decimal digits.
1169 Avoid GCC warnings if EMACS_UINT is wider than a pointer.
1171 2012-09-30 Fabrice Popineau <fabrice.popineau@supelec.fr>
1173 Support x64 build on MS-Windows.
1174 * w32term.h (SCROLL_BAR_PACK, SCROLL_BAR_UNPACK): Define for x64.
1175 (SET_SCROLL_BAR_W32_WINDOW): Cast ID to intptr_t, for
1176 compatibility with x64.
1177 (x_get_focus_frame): Add prototype.
1179 * w32term.c (w32_draw_underwave): Don't use GCC extensions for
1180 defining an XRectangle structure.
1182 * w32proc.c (RVA_TO_PTR, w32_executable_type): Fix pointer
1183 arithmetics for compatibility with x64.
1185 * w32menu.c (add_menu_item): Use UINT_PTR instead of UINT, for
1186 compatibility with x64.
1188 * w32heap.h: Adjust prototypes and declarations.
1190 * w32heap.c (RVA_TO_PTR, allocate_heap, sbrk, init_heap)
1191 (round_heap): Use DWORD_PTR, ptrdiff_t and size_t instead of
1192 DWORD, long, and unsigned long, for compatibility with x64.
1193 (allocate_heap) [_WIN64]: Reserve 32GB of memory.
1194 (sbrk): Argument is now of type ptrdiff_t.
1196 * w32fns.c (HMONITOR): Condition declaration on _WIN32_WINNT being
1198 (w32_msg_pump): Use WPARAM type for 'result'.
1200 * w32.c (init_environment, get_emacs_configuration): Support AMD64
1202 (init_ntproc): Cast arguments of _open_osfhandle to intptr_t, for
1203 compatibility with x64.
1205 * vm-limit.c (lim_data): Now size_t.
1206 (check_memory_limits): Adjust prototypes of real_morecore and
1207 __morecore to receive argument of type ptrdiff_t. Use size_t for
1208 five_percent and data_size.
1210 * unexw32.c: Use DWORD_PTR instead of DWORD for file-scope
1211 variables, for compatibility with x64.
1212 (rva_to_section, offset_to_section, relocate_offset)
1213 (OFFSET_TO_RVA, RVA_TO_OFFSET, RVA_TO_SECTION_OFFSET)
1214 (PTR_TO_RVA, RVA_TO_PTR, OFFSET_TO_PTR, get_section_info)
1215 (copy_executable_and_dump_data): Use DWORD_PTR instead of DWORD
1216 for compatibility with x64.
1218 * sysdep.c (STDERR_FILENO): Define if not already defined.
1220 * ralloc.c (real_morecore): Argument type is now ptrdiff_t.
1221 (__morecore): Argument type is now ptrdiff_t.
1222 (ROUNDUP, MEM_ROUNDUP): Use size_t instead of 'unsigned long'.
1223 (relinquish): Use ptrdiff_t type for 'excess'.
1224 (r_alloc_sbrk): Argument type is now ptrdiff_t.
1226 * makefile.w32-in (HEAPSIZE): Get value from EMACS_HEAPSIZE.
1227 (bootstrap-temacs-CMD, bootstrap-temacs-SH): Use $(EMACS_PURESIZE)
1228 instead of a literal number.
1230 * gmalloc.c [WINDOWSNT]: Include w32heap.h.
1231 (min): Define only if not already defined.
1233 * frame.c (x_report_frame_params): Use EMACS_UINT for the return
1234 value of FRAME_X_WINDOW, to fit a 64-bit pointer on 64-bit Windows
1237 * image.c (x_bitmap_pixmap): Return ptrdiff_t, not int, since
1238 'bitmaps' is a pointer.
1240 * dispextern.h (x_bitmap_pixmap): Adjust prototype.
1242 * alloc.c (gdb_make_enums_visible): Now conditional on __GNUC__.
1244 2012-09-30 Paul Eggert <eggert@cs.ucla.edu>
1246 file-attributes has a new optional arg FOLLOW-SYMLINKS.
1247 * dired.c (directory_files_internal, Ffile_attributes):
1248 New arg follow_symlinks. All uses changed.
1250 2012-09-30 Stefan Monnier <monnier@iro.umontreal.ca>
1252 * .gdbinit (xbacktrace): Adjust to recent "struct backtrace" change.
1254 2012-09-30 Eli Zaretskii <eliz@gnu.org>
1256 Support atimers and CPU profiler via profile.c on MS-Windows.
1257 * w32proc.c (sig_mask, crit_sig): New static variables.
1258 (sys_signal): Support SIGALRM and SIGPROF.
1259 (sigemptyset, sigaddset, sigfillset, sigprocmask)
1260 (pthread_sigmask, setpgrp): Move here from w32.c. sigaddset,
1261 sigfillset, and sigprocmask are no longer no-ops.
1262 (sigismember): New function.
1263 (struct itimer_data): New definition.
1264 (ticks_now, real_itimer, prof_itimer, clocks_min, crit_real)
1265 (crit_prof): New static variables.
1266 (MAX_SINGLE_SLEEP): New definition.
1267 (timer_loop, stop_timer_thread, term_timers, init_timers)
1268 (start_timer_thread, getitimer, setitimer): New functions.
1269 (alarm): No longer a no-op, calls setitimer.
1271 * w32.c (term_ntproc): Call term_timers.
1272 (init_ntproc): Make sure all signals are unblocked at startup, to
1273 erase any traces of dumping. Call init_timers.
1275 * w32fns.c (hourglass_timer, HOURGLASS_ID): Remove.
1276 Windows-specific code to display the hourglass mouse pointer is no
1278 (w32_wnd_proc): Remove code that handled the WM_TIMER message due
1279 to hourglass timer expiration.
1280 (start_hourglass, cancel_hourglass, DEFAULT_HOURGLASS_DELAY):
1281 Remove, no longer used.
1282 (w32_note_current_window, show_hourglass, hide_hourglass):
1283 New functions, in support of hourglass cursor display similar to other
1285 (syms_of_w32fns): Don't initialize hourglass_timer.
1287 * xdisp.c (start_hourglass, cancel_hourglass): Now used on
1289 (start_hourglass) [WINDOWSNT]: Call w32_note_current_window.
1291 * w32.h (init_timers, term_timers): Add prototypes.
1293 2012-09-30 Kenichi Handa <handa@gnu.org>
1295 * coding.c (decode_coding_ccl, encode_coding_ccl): Pay attention
1296 to the buffer relocation which may be caused by ccl_driver.
1298 2012-09-30 Jan Djärv <jan.h.d@swipnet.se>
1300 * xfns.c (Fx_file_dialog): Update comment.
1302 * w32fns.c (Fx_file_dialog): Update comment.
1304 * nsfns.m (Fns_read_file_name): Add argument DIR_ONLY_P.
1305 Initialize panel name field if OSX >= 10.6.
1307 * fileio.c (Fnext_read_file_uses_dialog_p): Add HAVE_NS.
1309 * nsfns.m (ns_frame_parm_handlers): Add x_set_fullscreen.
1311 * nsterm.m (NEW_STYLE_FS): New define.
1312 (ns_fullscreen_hook, windowWillEnterFullScreen)
1313 (windowDidEnterFullScreen, windowWillExitFullScreen)
1314 (windowDidExitFullScreen, toggleFullScreen, handleFS)
1315 (setFSValue): New functions.
1316 (EmacsFSWindow): New implementation.
1317 (canBecomeKeyWindow): New function for EmacsFSWindow.
1318 (ns_create_terminal): Set fullscreen_hook to ns_fullscreen_hook.
1319 (dealloc): Release nonfs_window if in fullscreen.
1320 (updateFrameSize:): Call windowDidMove to update top/left.
1321 (windowWillResize:toSize:): Check if frame is still maximized.
1322 (initFrameFromEmacs:): Initialize fs_state, fs_before_fs,
1323 next_maximized, maximized_width, maximized_height and nonfs_window.
1324 Call setCollectionBehavior if NEW_STYLE_FS. Initialize bwidth and
1326 (windowWillUseStandardFrame:defaultFrame:): Update frame parameter
1327 fullscreen. Set maximized_width/height. Act on next_maximized.
1329 * nsterm.h (MAC_OS_X_VERSION_10_7, MAC_OS_X_VERSION_10_8): New.
1330 (EmacsView): Add variables for fullscreen.
1331 (handleFS, setFSValue, toggleFullScreen): New in EmacsView.
1332 (EmacsFSWindow): New interface for fullscreen.
1334 2012-09-30 Juanma Barranquero <lekktu@gmail.com>
1336 * makefile.w32-in ($(BLD)/profiler.$(O)): Update dependencies.
1338 2012-09-30 Chong Yidong <cyd@gnu.org>
1340 * fns.c (Frandom): Doc fix.
1342 2012-09-30 Martin Rudalics <rudalics@gmx.at>
1344 * window.c (Vwindow_combination_limit): New default value.
1345 (Qwindow_size): New symbol replacing Qtemp_buffer_resize.
1347 2012-09-30 Paul Eggert <eggert@cs.ucla.edu>
1349 * syssignal.h (PROFILER_CPU_SUPPORT): Don't define if PROFILING.
1350 Suggested by Eli Zaretskii in
1351 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00811.html>.
1353 2012-09-30 Eli Zaretskii <eliz@gnu.org>
1355 * profiler.c (Fprofiler_cpu_stop): Use timer_settime only if
1356 HAVE_TIMER_SETTIME is defined.
1358 2012-09-30 Paul Eggert <eggert@cs.ucla.edu>
1360 Profiler improvements: more-accurate timers, overflow checks.
1361 * profiler.c: Don't include stdio.h, limits.h, sys/time.h,
1362 signal.h, setjmp.h. Include systime.h instead.
1363 (saturated_add): New function.
1364 (record_backtrace, current_sample_interval): Use EMACS_INT, not size_t.
1365 (record_backtrace, handle_profiler_signal): Saturate on fixnum overflow.
1366 (profiler_timer, profiler_timer_ok) [HAVE_TIMER_SETTIME]:
1368 (enum profiler_cpu_running): New enum.
1369 (profiler_cpu_running): Now of that enum type, not bool.
1370 All uses changed to store the new value.
1371 (handle_profiler_signal): Rename from sigprof_handler_1,
1372 for consistency with other handlers. Do not check whether
1373 cpu_log is a hash-table if garbage collecting, since it
1374 doesn't matter in that case.
1375 (deliver_profiler_signal): Rename from sigprof_handler,
1376 for consistency with other handlers.
1377 (setup_cpu_timer): New function, with much of what used to be in
1378 Fprofiler_cpu_start. Check for out-of-range argument.
1379 Prefer timer_settime if available, and prefer
1380 thread cputime clocks, then process cputime clocks, then
1381 monotonic clocks, to the old realtime clock. Use make_timeval
1382 to round more-correctly when falling back to setitimer.
1383 (Fprofiler_cpu_start): Use it.
1384 (Fprofiler_cpu_stop): Prefer timer_settime if available.
1385 Don't assume that passing NULL as the 2nd argument of setitimer
1386 is the same as passing a pointer to all-zero storage.
1387 Ignore SIGPROF afterwards.
1388 (malloc_probe): Saturate at MOST_POSITIVE_FIXNUM.
1389 * sysdep.c (emacs_sigaction_init): Also mask out SIGPROF in
1390 non-fatal signal handlers. Ignore SIGPROF on startup.
1391 * syssignal.h (PROFILER_CPU_SUPPORT): Define this macro here, not
1392 in profiler.c, since sysdep.c now uses it.
1394 * sysdep.c (handle_fatal_signal): Bump backtrace size to 40.
1395 Suggested by Eli Zaretskii in
1396 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00796.html>.
1398 2012-09-29 Juanma Barranquero <lekktu@gmail.com>
1400 * makefile.w32-in ($(BLD)/profiler.$(O)): Update dependencies.
1402 2012-09-29 Stefan Monnier <monnier@iro.umontreal.ca>
1404 * lisp.h (struct backtrace): Remove indirection for `function' field.
1405 * xdisp.c (redisplay_internal):
1406 * profiler.c (record_backtrace, sigprof_handler_1):
1407 * alloc.c (Fgarbage_collect):
1408 * eval.c (interactive_p, Fsignal, eval_sub, Ffuncall, Fbacktrace)
1409 (Fbacktrace_frame): Adjust accordingly.
1411 2012-09-28 Glenn Morris <rgm@gnu.org>
1413 * eval.c (Frun_hook_with_args, Frun_hook_with_args_until_success)
1414 (Frun_hook_with_args_until_failure): Doc fixes.
1416 2012-09-28 Eli Zaretskii <eliz@gnu.org>
1418 * xdisp.c (syms_of_xdisp) <Qredisplay_internal>: Rename from
1419 Qautomatic_redisplay and change the symbol name. All users changed.
1421 2012-09-28 Tomohiro Matsuyama <tomo@cx4a.org>
1423 * profiler.c (sigprof_handler): Fix race condition.
1425 2012-09-28 Glenn Morris <rgm@gnu.org>
1427 * lread.c (lisp_file_lexically_bound_p): Handle #! lines. (Bug#12528)
1429 2012-09-27 Paul Eggert <eggert@cs.ucla.edu>
1431 Check more robustly for timer_settime.
1432 * Makefile.in (LIB_TIMER_TIME): New macro.
1434 * atimer.c (alarm_timer, alarm_timer_ok, set_alarm, init_atimer):
1435 Use HAVE_TIMER_SETTIME, not SIGEV_SIGNAL, to decide whether to
1438 2012-09-26 Tomohiro Matsuyama <tomo@cx4a.org>
1440 * profiler.c (Fprofiler_cpu_start): Remove unnecessary flag SA_SIGINFO.
1442 2012-09-26 Juanma Barranquero <lekktu@gmail.com>
1444 * makefile.w32-in ($(BLD)/profiler.$(O)): Update dependencies.
1446 2012-09-26 Paul Eggert <eggert@cs.ucla.edu>
1448 * character.h (MAYBE_UNIFY_CHAR): Remove.
1449 * charset.c, charset.h (maybe_unify_char): Now static.
1450 * charset.c (decode_char): Use maybe_unify_char, not MAYBE_UNIFY_CHAR.
1451 Since this stuff is now private to charset.c, there's no need for
1452 a public macro and no need to inline by hand.
1454 2012-09-26 Tomohiro Matsuyama <tomo@cx4a.org>
1455 Stefan Monnier <monnier@iro.umontreal.ca>
1456 Juanma Barranquero <lekktu@gmail.com>
1458 * profiler.c: New file.
1459 * Makefile.in (base_obj): Add profiler.o.
1460 * makefile.w32-in (OBJ2, GLOBAL_SOURCES): Add profiler.c.
1461 ($(BLD)/profiler.$(O)): New target.
1462 * emacs.c (main): Call syms_of_profiler.
1463 * alloc.c (Qautomatic_gc): New constant.
1464 (MALLOC_PROBE): New macro.
1465 (xmalloc, xzalloc, xrealloc, lisp_malloc, lisp_align_malloc): Use it.
1466 (total_bytes_of_live_objects): New function.
1467 (Fgarbage_collect): Use it. Record itself in backtrace_list.
1468 Call malloc_probe for the memory profiler.
1469 (syms_of_alloc): Define Qautomatic_gc.
1470 * eval.c (eval_sub, Ffuncall): Reorder assignments to avoid
1472 (struct backtrace): Move definition...
1473 * lisp.h (struct backtrace): ..here.
1474 (Qautomatic_gc, profiler_memory_running): Declare vars.
1475 (malloc_probe, syms_of_profiler): Declare functions.
1476 * xdisp.c (Qautomatic_redisplay): New constant.
1477 (redisplay_internal): Record itself in backtrace_list.
1478 (syms_of_xdisp): Define Qautomatic_redisplay.
1480 2012-09-25 Eli Zaretskii <eliz@gnu.org>
1481 2012-09-25 Juanma Barranquero <lekktu@gmail.com>
1483 * makefile.w32-in ($(BLD)/callproc.$(O)): Update dependencies.
1485 2012-09-25 Paul Eggert <eggert@cs.ucla.edu>
1487 Prefer POSIX timers if available.
1488 They avoid a race if the timer is too close to the current time.
1489 * atimer.c (alarm_timer, alarm_timer_ok) [SIGEV_SIGNAL]: New static vars.
1490 (set_alarm) [SIGEV_SIGNAL]: Use POSIX timers if available.
1491 (init_atimer) [SIGEV_SIGNAL]: Initialize them.
1493 2012-09-25 Eli Zaretskii <eliz@gnu.org>
1495 * coding.c (CHAR_STRING_ADVANCE_NO_UNIFY): Make it an alias of
1496 CHAR_STRING_ADVANCE.
1497 (STRING_CHAR_ADVANCE_NO_UNIFY): Make it an alias of
1498 STRING_CHAR_ADVANCE.
1500 2012-09-25 Juanma Barranquero <lekktu@gmail.com>
1502 Move Vlibrary_cache to emacs.c and reset before dumping.
1504 * lisp.h (reset_image_types): Declare.
1505 [WINDOWSNT] (Vlibrary_cache): Declare.
1507 * image.c (reset_image_types): New function.
1509 * emacs.c [WINDOWSNT] (Vlibrary_cache): Move from w32.c.
1510 (syms_of_emacs) [WINDOWSNT] <Vlibrary_cache>: Initialize and staticpro.
1511 (Fdump_emacs): Reset Vlibrary_cache and image_types.
1513 * w32.c (Vlibrary_cache): Do not define; moved to emacs.c
1514 (globals_of_w32) <Vlibrary_cache>: Do not initialize.
1516 * w32.h (Vlibrary_cache): Do not declare.
1518 2012-09-25 Eli Zaretskii <eliz@gnu.org>
1520 * w32proc.c (sys_signal): Handle all signals defined by the
1521 MS-Windows runtime, not just SIGCHLD. Actually install the signal
1522 handlers for signals supported by Windows. Don't override
1523 term_ntproc as the handler for SIGABRT.
1524 (sigaction): Rewrite to call sys_signal instead of duplicating its
1526 (sys_kill): Improve commentary.
1528 * w32.c (term_ntproc): Accept (and ignore) one argument, for
1529 consistency with a signature of a signal handler. All callers
1531 (init_ntproc): Accept an argument DUMPING. If dumping, don't
1532 install term_ntproc as a signal handler for SIGABRT, as that
1533 should be done by the dumped Emacs.
1535 * w32.h (init_ntproc, term_ntproc): Adjust prototypes.
1537 * w32select.c (term_w32select): Protect against repeated
1538 invocation by setting clipboard_owner to NULL after calling
1541 * emacs.c (shut_down_emacs, main): Adapt the calls to init_ntproc
1542 and term_ntproc to their modified signatures.
1544 * character.c (char_string, string_char): Remove calls to
1545 MAYBE_UNIFY_CHAR. See the discussion starting at
1546 http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00433.html
1549 2012-09-25 Chong Yidong <cyd@gnu.org>
1551 * xdisp.c (mode_line_inverse_video): Delete obsolete variable.
1553 2012-09-24 Stefan Monnier <monnier@iro.umontreal.ca>
1555 * bytecode.c (exec_byte_code): Signal an error instead of aborting,
1556 when encountering an unknown bytecode.
1558 2012-09-24 Paul Eggert <eggert@cs.ucla.edu>
1560 image.c, indent.c: Use bool for booleans.
1561 * dispextern.h (struct image_type): Members valid_p, load, init
1562 now return bool, not int. All uses changed.
1563 * image.c: Omit unnecessary static decls.
1564 (x_create_bitmap_mask, x_build_heuristic_mask):
1565 Return void, not int, since callers don't care about the return value.
1566 (x_create_bitmap_mask, define_image_type, valid_image_p)
1567 (struct image_keyword, parse_image_spec, image_spec_value)
1568 (check_image_size, image_background)
1569 (image_background_transparent, x_clear_image_1)
1570 (postprocess_image, lookup_image, x_check_image_size)
1571 (x_create_x_image_and_pixmap, xbm_image_p)
1572 (Create_Pixmap_From_Bitmap_Data, xbm_read_bitmap_data)
1573 (xbm_load_image, xbm_file_p, xbm_load, xpm_lookup_color)
1574 (init_xpm_functions, xpm_valid_color_symbols_p, xpm_image_p)
1575 (xpm_load, xpm_load_image, lookup_rgb_color, lookup_pixel_color)
1576 (x_to_xcolors, x_build_heuristic_mask, pbm_image_p, pbm_load)
1577 (png_image_p, init_png_functions, png_load_body, png_load)
1578 (jpeg_image_p, init_jpeg_functions, jpeg_load_body, jpeg_load)
1579 (tiff_image_p, init_tiff_functions, tiff_load, gif_image_p)
1580 (init_gif_functions, gif_load, imagemagick_image_p)
1581 (imagemagick_load_image, imagemagick_load, svg_image_p)
1582 (init_svg_functions, svg_load, svg_load_image, gs_image_p)
1584 * nsimage.m (ns_load_image):
1585 * nsterm.m (ns_defined_color):
1586 * xfaces.c (tty_lookup_color, tty_defined_color, defined_color):
1587 * xfns.c (x_defined_color):
1588 * xterm.c (x_alloc_lighter_color_for_widget)
1589 (x_alloc_nearest_color_1, x_alloc_nearest_color)
1590 (x_alloc_lighter_color):
1591 * indent.c (disptab_matches_widthtab, current_column)
1592 (scan_for_column, string_display_width, indented_beyond_p)
1593 (compute_motion, vmotion, Fvertical_motion):
1594 Use bool for booleans.
1596 2012-09-24 Chong Yidong <cyd@gnu.org>
1598 * chartab.c (Fset_char_table_default): Obsolete function removed.
1600 2012-09-23 Paul Eggert <eggert@cs.ucla.edu>
1602 Move pid_t related decls out of lisp.h.
1603 * lisp.h, syswait.h (record_child_status_change, wait_for_termination)
1604 (interruptible_wait_for_termination):
1605 Move these decls from lisp.h to syswait.h, since they use pid_t.
1606 Needed on FreeBSD; see Herbert J. Skuhra in
1607 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00571.html>.
1608 * callproc.c: Include syswait.h.
1610 gnutls.c, gtkutil.c: Use bool for boolean.
1611 * gnutls.c (gnutls_global_initialized, init_gnutls_functions)
1612 (emacs_gnutls_handle_error):
1613 * gtkutil.c (xg_check_special_colors, xg_prepare_tooltip)
1614 (xg_hide_tooltip, xg_create_frame_widgets)
1615 (create_dialog, xg_uses_old_file_dialog)
1616 (xg_get_file_with_chooser, xg_get_file_with_selection)
1617 (xg_get_file_name, xg_have_tear_offs, create_menus, xg_create_widget)
1618 (xg_item_label_same_p, xg_update_menubar)
1619 (xg_modify_menubar_widgets, xg_event_is_for_menubar)
1620 (xg_ignore_gtk_scrollbar, xg_set_toolkit_scroll_bar_thumb)
1621 (xg_event_is_for_scrollbar, xg_pack_tool_bar, xg_make_tool_item)
1622 (is_box_type, xg_tool_item_stale_p, xg_update_tool_bar_sizes)
1623 (update_frame_tool_bar, free_frame_tool_bar):
1624 * gtkutil.c, w32term.c, xterm.c (x_wm_set_size_hint):
1625 * nsmenu.m (ns_update_menubar):
1626 * nsmenu.m, w32menu.c, xmenu.c (set_frame_menubar):
1627 * xfns.c (Fx_show_tip) [USE_GTK]:
1628 Use bool for boolean.
1629 * gtkutil.c (xg_update_frame_menubar):
1630 * xmenu.c (update_frame_menubar):
1631 Return void, not int, since caller ignores return value.
1632 * gtkutil.c (xg_change_toolbar_position):
1635 2012-09-23 Juanma Barranquero <lekktu@gmail.com>
1637 * makefile.w32-in (BLOCKINPUT_H): Remove.
1638 (SYSSIGNAL_H): New macro.
1639 ($(BLD)/alloc.$(O), $(BLD)/atimer.$(O), $(BLD)/buffer.$(O))
1640 ($(BLD)/callproc.$(O), $(BLD)/data.$(O), $(BLD)/dired.$(O))
1641 ($(BLD)/dispnew.$(O), $(BLD)/editfns.$(O), $(BLD)/emacs.$(O))
1642 ($(BLD)/eval.$(O), $(BLD)/fileio.$(O), $(BLD)/floatfns.$(O))
1643 ($(BLD)/fns.$(O), $(BLD)/fontset.$(O), $(BLD)/frame.$(O))
1644 ($(BLD)/fringe.$(O), $(BLD)/image.$(O), $(BLD)/insdel.$(O))
1645 ($(BLD)/keyboard.$(O), $(BLD)/keymap.$(O), $(BLD)/lread.$(O))
1646 ($(BLD)/menu.$(O), $(BLD)/w32inevt.$(O), $(BLD)/w32proc.$(O))
1647 ($(BLD)/print.$(O), $(BLD)/process.$(O), $(BLD)/ralloc.$(O))
1648 ($(BLD)/search.$(O), $(BLD)/sound.$(O), $(BLD)/sysdep.$(O))
1649 ($(BLD)/term.$(O), $(BLD)/window.$(O), $(BLD)/xdisp.$(O))
1650 ($(BLD)/xfaces.$(O), $(BLD)/w32fns.$(O), $(BLD)/w32menu.$(O))
1651 ($(BLD)/w32term.$(O), $(BLD)/w32select.$(O), $(BLD)/w32reg.$(O))
1652 ($(BLD)/w32xfns.$(O)): Update dependencies.
1654 2012-09-23 Eli Zaretskii <eliz@gnu.org>
1656 * .gdbinit: Set breakpoint on terminate_due_to_signal, not on
1657 fatal_error_backtrace.
1659 * w32proc.c (sys_kill): Undo last change: don't do anything when
1660 invoked to deliver SIGABRT to our own process. This is now
1661 handled by emacs_raise.
1663 2012-09-23 Juanma Barranquero <lekktu@gmail.com>
1665 * w32term.c (w32_read_socket): Remove leftover reference to
1666 interrupt_input_pending.
1668 2012-09-23 Paul Eggert <eggert@cs.ucla.edu>
1670 Do not use SA_NODEFER.
1671 Problem reported by Dani Moncayo in
1672 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00557.html>.
1674 * sysdep.c (emacs_abort): Do not reset signal handler.
1675 * emacs.c (terminate_due_to_signal): Reset signal handler here.
1676 * sysdep.c (init_signals): Do not use SA_NODEFER. It wasn't
1677 wanted even on POSIXish hosts, and it doesn't work on Windows.
1679 2012-09-23 Jan Djärv <jan.h.d@swipnet.se>
1681 * xterm.c (x_term_init): Call fixup_locale before and after calling
1682 gtk_init (Bug#12392).
1684 2012-09-23 Chong Yidong <cyd@gnu.org>
1686 * w32.c (w32_delayed_load): Remove LIBRARIES argument; always use
1687 Vdynamic_library_alist.
1689 * gnutls.c (init_gnutls_functions): Caller changed; remove arg.
1690 (Fgnutls_available_p): Caller changed.
1692 * xml.c (init_libxml2_functions, Flibxml_parse_html_region)
1693 (Flibxml_parse_xml_region): Likewise.
1695 * dispextern.h (struct image_type): Remove arg from init function.
1697 * image.c (Finit_image_library, lookup_image_type)
1698 (define_image_type): Remove now-unneeded second arg.
1699 (init_xpm_functions, init_png_functions, init_jpeg_functions)
1700 (init_tiff_functions, init_gif_functions, init_svg_functions):
1701 Arglist and w32_delayed_load calling convention changed.
1702 (gs_type): Remove init_gs_functions; there is no such function.
1703 (valid_image_p, make_image): Fix caller to lookup_image_type.
1705 2012-09-23 Paul Eggert <eggert@cs.ucla.edu>
1707 Simplify and avoid signal-handling races (Bug#12471).
1709 * sysdep.c (emacs_abort) [HAVE_NTGUI]:
1710 Avoid recursive loop if there's a fatal error in the function itself.
1711 * atimer.c (pending_atimers):
1712 * blockinput.h: Don't include "atimer.h"; no longer needed.
1713 (interrupt_input_pending): Remove. All uses removed.
1714 pending_signals now counts both atimers and ordinary interrupts.
1715 This is less racy than having three separate pending-signal flags.
1716 (block_input, unblock_input, totally_unblock_input, unblock_input_to)
1718 Rename from their upper-case counterparts BLOCK_INPUT,
1719 UNBLOCK_INPUT, TOTALLY_UNBLOCK_INPUT, UNBLOCK_INPUT_TO,
1720 INPUT_BLOCKED_P, and turn into functions. All uses changed.
1721 This makes it easier to access volatile variables more accurately.
1722 (BLOCK_INPUT_RESIGNAL): Remove. All uses replaced by unblock_input ().
1723 (input_blocked_p): Prefer this to 'interrupt_input_blocked', as
1724 that's more reliable if the code is buggy and sets
1725 interrupt_input_blocked to a negative value. All uses changed.
1726 * atimer.c (deliver_alarm_signal):
1727 Remove. No need to deliver this to the parent; any thread can
1728 handle this signal now. All uses replaced by underlying handler.
1729 * atimer.c (turn_on_atimers):
1730 * dispnew.c (handle_window_change_signal):
1731 * emacs.c (handle_danger_signal):
1732 * keyboard.c (kbd_buffer_get_event):
1733 Don't reestablish signal handler; not needed with sigaction.
1734 * blockinput.h (UNBLOCK_INPUT_TO, TOTALLY_UNBLOCK_INPUT)
1736 Rework to avoid unnecessary accesses to volatile variables.
1737 (UNBLOCK_INPUT_TO): Now a function.
1738 (totally_unblock_input, unblock_input): New decls.
1739 * data.c (handle_arith_signal, deliver_arith_signal): Move to sysdep.c
1740 (init_data): Remove. Necessary stuff now done in init_signal.
1741 * emacs.c, xdisp.c: Include "atimer.h", since we invoke atimer functions.
1742 * emacs.c (handle_fatal_signal, deliver_fatal_signal): Move to sysdep.c.
1743 (fatal_error_code): Remove; no longer needed.
1744 (terminate_due_to_signal): Rename from fatal_error_backtrace, since
1745 it doesn't always backtrace. All uses changed. No need to reset
1746 signal to default, since sigaction and/or die does that for us now.
1747 Use emacs_raise (FOO), not kill (getpid (), FOO).
1748 (main): Check more-accurately whether we're dumping.
1749 Move fatal-error setup to sysdep.c
1750 * floatfns.c: Do not include "syssignal.h"; no longer needed.
1751 * gtkutil.c (xg_get_file_name, xg_get_font):
1752 Remove no-longer-needed signal-mask manipulation.
1753 * keyboard.c, process.c (POLL_FOR_INPUT):
1754 Don't depend on USE_ASYNC_EVENTS, a symbol that is never defined.
1755 * keyboard.c (read_avail_input): Remove.
1756 All uses replaced by gobble_input.
1757 (Ftop_level): Use TOTALLY_UNBLOCK_INPUT rather than open code.
1758 (kbd_buffer_store_event_hold, gobble_input):
1759 (record_asynch_buffer_change) [USABLE_SIGIO]:
1760 (store_user_signal_events):
1761 No need to mess with signal mask.
1762 (gobble_input): If blocking input and there are terminals, simply
1763 set pending_signals to 1 and return. All hooks changed to not
1764 worry about whether input is blocked.
1765 (process_pending_signals): Clear pending_signals before processing
1766 them, in case a signal comes in while we're processing.
1767 By convention callers now test pending_signals before calling us.
1768 (UNBLOCK_INPUT_TO, unblock_input, totally_unblock_input):
1769 New functions, to support changes to blockinput.h.
1770 (handle_input_available_signal): Now extern.
1771 (reinvoke_input_signal): Remove. All uses replaced by
1773 (quit_count): Now volatile, since a signal handler uses it.
1774 (handle_interrupt): Now takes bool IN_SIGNAL_HANDLER as arg.
1775 All callers changed. Block SIGINT only if not already blocked.
1776 Clear sigmask reliably, even if Fsignal returns, which it can.
1777 Omit unnecessary accesses to volatile var.
1778 (quit_throw_to_read_char): No need to restore sigmask.
1779 * keyboard.c (gobble_input, handle_user_signal):
1780 * process.c (wait_reading_process_output):
1781 Call signal-handling code rather than killing ourselves.
1782 * lisp.h: Include <float.h>, for...
1783 (IEEE_FLOATING_POINT): New macro, moved here to avoid duplication.
1784 (pending_signals): Now volatile.
1785 (syms_of_data): Now const if IEEE floating point.
1786 (handle_input_available_signal) [USABLE_SIGIO]:
1787 (terminate_due_to_signal, record_child_status_change): New decls.
1788 * process.c (create_process): Avoid disaster if memory is exhausted
1789 while we're processing a vfork, by tightening the critical section
1791 (send_process_frame, process_sent_to, handle_pipe_signal)
1792 (deliver_pipe_signal): Remove. No longer needed, as Emacs now
1794 (send_process): No need for setjmp/longjmp any more, since the
1795 SIGPIPE stuff is now gone. Instead, report an error if errno
1797 (record_child_status_change): Now extern. PID and W are now args.
1798 Return void, not bool. All callers changed.
1799 * sysdep.c (wait_debugging) [(BSD_SYSTEM || HPUX) && !defined (__GNU__)]:
1800 Remove. All uses removed. This bug should be fixed now in a
1802 (wait_for_termination_1): Use waitpid rather than sigsuspend,
1803 and record the child status change directly. This avoids the
1804 need to futz with the signal mask.
1805 (process_fatal_action): Move here from emacs.c.
1806 (emacs_sigaction_flags): New function, containing
1807 much of what used to be in emacs_sigaction_init.
1808 (emacs_sigaction_init): Use it. Block nonfatal system signals that are
1809 caught by emacs, to make races less likely.
1810 (deliver_process_signal): Rename from handle_on_main_thread.
1812 (BACKTRACE_LIMIT_MAX): Now at top level.
1813 (thread_backtrace_buffer, threadback_backtrace_pointers):
1815 (deliver_thread_signal, deliver_fatal_thread_signal):
1816 New functions, for more-accurate delivery of thread-specific signals.
1817 (handle_fatal_signal, deliver_fatal_signal): Move here from emacs.c.
1818 (deliver_arith_signal): Handle in this thread, not
1819 in the main thread, since it's triggered by this thread.
1820 (maybe_fatal_sig): New function.
1821 (init_signals): New arg DUMPING so that we can be more accurate
1822 about whether we're dumping. Caller changed.
1823 Treat thread-specific signals differently from process-general signals.
1824 Block all signals while handling fatal error; that's safer.
1825 xsignal from SIGFPE only on non-IEEE hosts, treating it as fatal
1827 When batch, ignore SIGHUP, SIGINT, SIGTERM if they were already ignored.
1828 Ignore SIGPIPE unless batch.
1829 (emacs_backtrace): Output backtrace for the appropriate thread,
1830 which is not necessarily the main thread.
1831 * syssignal.h: Include <stdbool.h>.
1832 (emacs_raise): New macro.
1833 * xterm.c (x_connection_signal): Remove; no longer needed
1834 now that we use sigaction.
1835 (x_connection_closed): No need to mess with sigmask now.
1836 (x_initialize): No need to reset SIGPIPE handler here, since
1837 init_signals does this for us now.
1839 2012-09-23 Jan Djärv <jan.h.d@swipnet.se>
1841 * nsterm.m (ns_dumpglyphs_image): dr is a new rect to draw image into,
1842 background rect may be larger (Bug#12245).
1844 2012-09-23 Chong Yidong <cyd@gnu.org>
1846 * keyboard.c (timer_check): Avoid quitting during Fcopy_sequence.
1848 2012-09-22 Paul Eggert <eggert@cs.ucla.edu>
1850 * .gdbinit: Just stop at fatal_error_backtrace.
1851 See Stefan Monnier's request in
1852 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00549.html>.
1853 Remove no-longer-used query of system type.
1855 2012-09-22 Chong Yidong <cyd@gnu.org>
1857 * search.c (Freplace_match): Doc fix (Bug#12325).
1859 * minibuf.c (Finternal_complete_buffer): Doc fix (Bug#12391).
1861 * editfns.c (Fline_beginning_position): Doc fix (Bug#12416).
1862 (Fline_end_position): Doc fix.
1864 * cmds.c (Fforward_char, Fbackward_char): Doc fix (Bug#12414).
1866 2012-09-22 Chong Yidong <cyd@gnu.org>
1868 * dispextern.h (struct image_type): Add new slot, storing a type
1869 initialization function.
1871 * image.c (define_image_type): Call the image initializer function
1872 if it is defined. Arguments and return value changed.
1873 (valid_image_p, make_image): Callers changed.
1874 (xbm_type, xpm_type, pbm_type, png_type, jpeg_type, tiff_type)
1875 (gif_type, imagemagick_type, svg_type, gs_type):
1876 Add initialization functions.
1877 (Finit_image_library): Call lookup_image_type.
1878 (CHECK_LIB_AVAILABLE): Macro deleted.
1879 (lookup_image_type): Call define_image_type here, rather than via
1880 Finit_image_library, and without using CHECK_LIB_AVAILABLE.
1881 (syms_of_image): Move define_image_type calls for xbm_type and
1882 pbm_type to lookup_image_type.
1884 2012-09-22 Eli Zaretskii <eliz@gnu.org>
1886 * keyboard.c (timer_check_2): Move calculation of 'timers' and
1887 'idle_timers' from here ...
1888 (timer_check): ... to here. Use Fcopy_sequence to copy the timer
1889 lists, to avoid infloops when the timer does something stupid,
1890 like reinvoke itself with the same or smaller time-out.
1893 2012-09-22 Martin Rudalics <rudalics@gmx.at>
1895 * window.c (Fsplit_window_internal): Handle only Qt value of
1896 Vwindow_combination_limit separately.
1897 (Qtemp_buffer_resize): New symbol.
1898 (Vwindow_combination_limit): New default value.
1901 2012-09-22 Eli Zaretskii <eliz@gnu.org>
1903 * xdisp.c (next_overlay_string): Initialize it->end_charpos for
1904 the new overlay string. (Bug#10159)
1906 2012-09-22 Paul Eggert <eggert@cs.ucla.edu>
1908 * emacs.c (shut_down_emacs): Don't assume stderr is buffered,
1909 or that fprintf is async-signal-safe. POSIX doesn't require
1912 2012-09-22 Chong Yidong <cyd@gnu.org>
1914 * buffer.c (Fset_buffer_modified_p): Handle indirect buffers
1917 2012-09-22 Kenichi Handa <handa@gnu.org>
1919 * composite.c (composition_reseat_it): Handle the case that a
1920 grapheme cluster is not covered by a single font (Bug#12352).
1922 2012-09-21 Chong Yidong <cyd@gnu.org>
1924 * image.c (define_image_type): Avoid adding duplicate types to
1925 image_types (Bug#12463). Suggested by Jörg Walter.
1927 2012-09-21 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
1929 * unexmacosx.c: Define LC_DATA_IN_CODE if not defined.
1930 (print_load_command_name): Add case LC_DATA_IN_CODE.
1931 (dump_it) [LC_DATA_IN_CODE]: Call copy_linkedit_data.
1933 2012-09-21 Glenn Morris <rgm@gnu.org>
1935 * eval.c (Frun_hook_with_args_until_success)
1936 (Frun_hook_with_args_until_failure): Doc fixes. (Bug#12393)
1938 2012-09-21 Andreas Schwab <schwab@linux-m68k.org>
1940 * fileio.c (Ffile_selinux_context): Only call freecon when
1941 lgetfilecon succeeded.
1942 (Fset_file_selinux_context): Likewise. (Bug#12444)
1944 2012-09-21 Eli Zaretskii <eliz@gnu.org>
1946 * xdisp.c (try_window_reusing_current_matrix): Under bidi
1947 reordering, locate the cursor by calling set_cursor_from_row; if
1948 that fails, clear the desired glyph matrix before returning a
1949 failure indication to the caller. Fixes leaving garbled display
1950 when fast scrolling with a down-key. (Bug#12403)
1951 (compute_stop_pos_backwards): Fix a typo that caused crashes while
1952 scrolling through multibyte text.
1954 2012-09-20 Stefan Monnier <monnier@iro.umontreal.ca>
1956 * alloc.c (mark_object) <PVEC_WINDOW>: Mark prev/next_buffers *after*
1957 calling mark_vectorlike since that's the one that marks the window.
1958 (mark_discard_killed_buffers): Mark the final cdr.
1959 * window.h (struct window): Move prev/next_buffers to the
1960 non-standard fields.
1961 * window.c (make_window): Initialize prev/next_buffers manually.
1963 2012-09-20 Paul Eggert <eggert@cs.ucla.edu>
1965 Omit unused arg EXPECTED from socket hooks.
1966 * keyboard.c (gobble_input, read_avail_input, tty_read_avail_input):
1967 * nsterm.m (ns_term_init):
1968 * termhooks.h (struct terminal.read_socket_hook):
1969 * w32inevt.c (w32_console_read_socket):
1970 * w32term.c (w32_read_socket):
1971 * xterm.c (XTread_socket):
1972 Omit unused arg EXPECTED. All callers changed.
1973 (store_user_signal_events): Return void, not int, since callers no
1974 longer care about the return value. All uses changed.
1976 2012-09-20 Juanma Barranquero <lekktu@gmail.com>
1978 * w32gui.h (XParseGeometry): Do not declare.
1980 2012-09-19 Paul Eggert <eggert@cs.ucla.edu>
1982 * w32inevt.c (w32_console_read_socket): Return -1 on failure, not 0.
1983 Ignore 'expected'. See Eli Zaretskii in
1984 <http://bugs.gnu.org/12471#8> (last line).
1986 * frame.c (read_integer): Remove. All uses replaced by strtol/strtoul.
1987 (XParseGeometry): Now static. Substitute extremal values for
1988 values that are out of range.
1990 2012-09-19 Jan Djärv <jan.h.d@swipnet.se>
1992 * w32xfns.c (read_integer, XParseGeometry): Move to frame.c.
1994 * nsfns.m (XParseGeometry): Remove.
1995 (Fx_create_frame): Call x_set_offset to correctly interpret
1996 top_pos in geometry.
1998 * frame.c (read_integer, XParseGeometry): Move from w32xfns.c.
1999 (Fx_parse_geometry): If there is a space in string, call
2000 Qns_parse_geometry, otherwise do as on other terms (Bug#12368).
2002 2012-09-17 Eli Zaretskii <eliz@gnu.org>
2004 * search.c (scan_buffer): Use character positions in calls to
2005 region_cache_forward and region_cache_backward, not byte
2006 positions. (Bug#12196)
2008 * w32term.c (w32_read_socket): Set pending_signals to 1, like
2009 xterm.c does. Reported by Daniel Colascione <dancol@dancol.org>.
2011 * ralloc.c (r_alloc_init) [!SYSTEM_MALLOC]: Initialize
2012 __malloc_extra_blocks to 32 instead of 64, like alloc.c did in
2013 emacs_blocked_malloc, now deleted.
2015 2012-09-17 Paul Eggert <eggert@cs.ucla.edu>
2017 Remove no-longer-needed Solaris 2.4 vfork bug workaround.
2018 The workaround was for improving performance on Solaris 2.4, but
2019 is getting in the way now. Emacs will still work if someone is
2020 still running Solaris 2.4 in a museum somewhere; Sun dropped
2021 support for Solaris 2.4 in 2003.
2022 * callproc.c (Fcall_process) [HAVE_WORKING_VFORK]:
2023 * process.c (create_process) [HAVE_WORKING_VFORK]:
2024 Omit now-unnecessary workaround for the Solaris 2.4 vfork bug,
2025 since Emacs no longer uses vfork on that platform.
2027 2012-09-17 Glenn Morris <rgm@gnu.org>
2029 * emacs.c: Use COPYRIGHT.
2031 2012-09-16 Paul Eggert <eggert@cs.ucla.edu>
2033 Remove configure's --without-sync-input option (Bug#12450).
2034 When auditing signal-handling in preparation for cleaning it up,
2035 I found that SYNC_INPUT has race conditions and would be a real
2036 pain to fix. Since it's an undocumented and deprecated
2037 configure-time option, now seems like a good time to remove it.
2038 Also see <http://bugs.gnu.org/11080#16>.
2039 * alloc.c (_bytes_used, __malloc_extra_blocks, _malloc_internal)
2040 (_free_internal) [!DOUG_LEA_MALLOC]: Remove decls.
2041 (alloc_mutex) [!SYSTEM_MALLOC && !SYNC_INPUT && HAVE_PTHREAD]:
2042 (malloc_hysteresis):
2043 (check_depth) [XMALLOC_OVERRUN_CHECK]:
2044 (MALLOC_BLOCK_INPUT, MALLOC_UNBLOCK_INPUT):
2045 (__malloc_hook, __realloc_hook, __free_hook, BYTES_USED)
2046 (dont_register_blocks, bytes_used_when_reconsidered)
2047 (bytes_used_when_full, emacs_blocked_free, emacs_blocked_malloc)
2048 (emacs_blocked_realloc, reset_malloc_hooks, uninterrupt_malloc):
2049 [!SYSTEM_MALLOC && !SYNC_INPUT]:
2050 Remove. All uses removed.
2051 (MALLOC_BLOCK_INPUT, MALLOC_UNBLOCK_INPUT): Use a different
2052 implementation, one that depends on whether the new macro
2053 XMALLOC_BLOCK_INPUT_CHECK is defined, not on whether SYNC_INPUT
2055 * atimer.c (run_timers, handle_alarm_signal):
2056 * keyboard.c (pending_signal, poll_for_input_1, poll_for_input)
2057 (handle_async_input, process_pending_signals)
2058 (handle_input_available_signal, init_keyboard):
2059 * nsterm.m (ns_read_socket):
2060 * process.c (wait_reading_process_output):
2061 * regex.c (immediate_quit, IMMEDIATE_QUIT_CHECK):
2062 * sysdep.c (emacs_sigaction_init) [SA_RESTART]:
2064 * xterm.c (XTread_socket):
2066 * conf_post.h (SA_RESTART) [IRIX6_5]: Do not #undef.
2067 * eval.c (handling_signal): Remove. All uses removed.
2068 * lisp.h (ELSE_PENDING_SIGNALS): Remove.
2069 All uses replaced with the SYNC_INPUT version.
2070 (reset_malloc_hooks, uninterrupt_malloc, handling_signal):
2072 * sysdep.c, syssignal.h (main_thread) [FORWARD_SIGNAL_TO_MAIN_THREAD]:
2075 * font.c (Ffont_shape_gstring): Remove unused local.
2077 2012-09-16 Glenn Morris <rgm@gnu.org>
2079 * Makefile.in (clean): No longer run nextstep's clean.
2081 * Makefile.in (ns_appdir, ns_appbindir, ns_appsrc): Remove variables.
2083 (ns-app): Move here from ns.mk, and simplify.
2084 (clean): Simplify nextstep entry.
2085 * ns.mk: Remove file.
2087 2012-09-17 Kenichi Handa <handa@gnu.org>
2089 * font.c (Ffont_shape_gstring): Fix previous change; GLYPHs may
2090 not covert the last few charactes.
2092 2012-09-16 Kenichi Handa <handa@gnu.org>
2094 * font.c (Ffont_shape_gstring): Don't adjust grapheme cluster
2095 here, but just check the validity of glyphs in the glyph-string.
2097 2012-09-16 Martin Rudalics <rudalics@gmx.at>
2099 * window.c (Fwindow_parameter, Fset_window_parameter):
2100 Accept any window as argument (Bug#12452).
2102 2012-09-16 Jan Djärv <jan.h.d@swipnet.se>
2104 * nsfns.m (Fx_open_connection): Move initialization of ns_*_types
2105 to ns_term_init to avoid memory leak.
2107 * nsterm.m (ns_update_begin): Initialize bp after lcokFocus, use
2108 explicit retain/release.
2109 (ns_term_init): Only allow one display. Initialize outerpool and
2112 2012-09-15 Paul Eggert <eggert@cs.ucla.edu>
2114 Port _setjmp fix to POSIXish hosts as well as Microsoft.
2115 * image.c (_setjmp) [!HAVE__SETJMP]: Restore definition, as
2116 it's needed on POSIXish hosts that lack _setjmp. Attempt to solve
2117 the Microsoft problem in a different way, by altering ../nt/config.nt.
2119 2012-09-15 Eli Zaretskii <eliz@gnu.org>
2134 * w16select.c: Remove inclusion of setjmp.h, as it is now included
2135 by lisp.h. This completes removal of setjmp.h inclusion
2136 erroneously announced in the previous commit. (Bug#12446)
2138 * lisp.h [!HAVE__SETJMP, !HAVE_SIGSETJMP]: Make the commentary
2141 * image.c (_setjmp) [!HAVE__SETJMP]: Define only if 'setjmp' is
2142 not defined as a macro. The latter happens on MS-Windows.
2145 2012-09-15 Paul Eggert <eggert@cs.ucla.edu>
2147 Port better to POSIX hosts lacking _setjmp (Bug#12446).
2148 * lisp.h: Include <setjmp.h> here, since we use its symbols here.
2149 Some instances of '#include <setjmp.h>' removed, if the
2150 only reason for the instance was because "lisp.h" was included.
2151 (sys_jmp_buf, sys_setjmp, sys_longjmp): New symbols.
2152 Unless otherwise specified, replace all uses of jmp_buf, _setjmp,
2153 and _longjmp with the new symbols. Emacs already uses _setjmp if
2154 available, so this change affects only POSIXish hosts that have
2155 sigsetjmp but not _setjmp, such as some versions of Solaris and
2156 Unixware. (Also, POSIX-2008 marks _setjmp as obsolescent.)
2157 * image.c (_setjmp, _longjmp) [HAVE_PNG && !HAVE__SETJMP]: New macros.
2158 (png_load_body) [HAVE_PNG]:
2159 (PNG_LONGJMP) [HAVE_PNG && PNG_LIBPNG_VER < 10500]:
2160 (PNG_JMPBUF) [HAVE_PNG && PNG_LIBPNG_VER >= 10500]:
2161 Use _setjmp and _longjmp rather than sys_setjmp and sys_longjmp,
2162 since PNG requires jmp_buf. This is the only exception to the
2163 general rule that we now use sys_setjmp and sys_longjmp.
2164 This exception is OK since this code does not change the signal
2165 mask or longjmp out of a signal handler.
2167 2012-09-14 Paul Eggert <eggert@cs.ucla.edu>
2169 * alloc.c [!SYSTEM_MALLOC && !SYNC_INPUT && HAVE_PTHREAD]:
2170 Include "syssignal.h", for 'main_thread'.
2172 2012-09-14 Dmitry Antipov <dmantipov@yandex.ru>
2174 Avoid out-of-range marker position (Bug#12426).
2175 * insdel.c (replace_range, replace_range_2):
2176 Adjust markers before overlays, as suggested by comments.
2177 (insert_1_both, insert_from_buffer_1, adjust_after_replace):
2178 Remove redundant check before calling offset_intervals.
2180 2012-09-14 Martin Rudalics <rudalics@gmx.at>
2182 * xdisp.c (Fformat_mode_line): Unconditionally save/restore
2183 current buffer (Bug#12387).
2185 2012-09-14 Juanma Barranquero <lekktu@gmail.com>
2187 * makefile.w32-in ($(BLD)/alloc.$(O)): Update dependencies.
2189 2012-09-13 Paul Eggert <eggert@cs.ucla.edu>
2191 Use a more backwards-compatible timer format (Bug#12430).
2192 * keyboard.c (decode_timer): Get PSECS from the 8th (origin-0)
2193 vector element, not from the 4th, since PSECS is now at the end.
2194 (Fcurrent_idle_time): Doc fix.
2196 2012-09-13 Dmitry Antipov <dmantipov@yandex.ru>
2198 Function to mark objects and remove killed buffers at once.
2199 * alloc.c (discard_killed_buffers): Rename to ...
2200 (mark_discard_killed buffers) ... new name. Add marking
2201 of remaining objects. Fix comment. Adjust users.
2202 (mark_object): Do not touch frame buffer lists here.
2203 * frame.c (delete_frame): Reset frame buffer lists here.
2205 2012-09-13 Paul Eggert <eggert@cs.ucla.edu>
2207 Better workaround for GNOME bug when --enable-gcc-warnings.
2208 * emacsgtkfixed.c (G_STATIC_ASSERT): Remove, undoing last change.
2209 Instead, disable -Wunused-local-typedefs. See Dmitry Antipov in
2210 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00335.html>.
2212 Simplify SIGIO usage (Bug#12408).
2213 The code that dealt with SIGIO was crufty and confusing, e.g., it
2214 played tricks like "#undef SIGIO" but these tricks were not used
2215 consistently. Simplify mostly by not #undeffing standard symbols,
2216 e.g., use "defined USABLE_SIGIO" (our symbol, which we can define
2217 or not as we please) rather than "defined SIGIO" (standard symbol
2218 that we probably shouldn't #undef).
2219 * conf_post.h [USG5_4]: Do not include <sys/wait.h> here.
2220 Modules that need it can include it.
2221 [USG5_4 && emacs]: Likewise, do not include the streams stuff here.
2222 * dispextern.h (ignore_sigio): New decl.
2223 * emacs.c (shut_down_emacs): Invoke unrequest_sigio
2224 unconditionally, since it's now a no-op if !USABLE_SIGIO.
2225 * emacs.c (shut_down_emacs):
2226 * keyboard.c (kbd_buffer_store_event_hold):
2227 Use ignore_sigio rather than invoking 'signal' directly.
2228 * keyboard.c (USABLE_FIONREAD && USG5_4): Include <sys/filio.h>,
2230 (FIONREAD, SIGIO): Do not #undef.
2231 (tty_read_avail_input): Use #error rather than a syntax error.
2232 * process.c [USG5_4]: Include <sys/stream.h> and <sys/stropts.h>,
2233 for I_PIPE, used by SETUP_SLAVE_PTY.
2234 (DATAGRAM_SOCKETS): Simplify defn, based on USABLE_FIONREAD.
2235 * sysdep.c (croak): Remove; no longer needed. This bit of
2236 temporary code, with Fred N. Fish's comment that it's temporary,
2237 has been in Emacs since at least 1992!
2238 (init_sigio, reset_sigio, request_sigio, unrequest_sigio):
2239 Arrange for them to be no-ops in all cases when ! USABLE_SIGIO.
2240 * syssignal.h (croak): Remove decl.
2241 (SIGIO, SIGPOO, SIGAIO, SIGPTY): Do not #undef; that's too fragile.
2242 * systty.h [!NO_TERMIO]: Do not include <termio.h>; no longer needed
2243 now that we're termios-only.
2244 (FIONREAD, ASYNC) [BROKEN_FIONREAD]: Do not #undef.
2245 * term.c (dissociate_if_controlling_tty): Use #error rather than
2248 Work around GCC and GNOME bugs when --enable-gcc-warnings.
2249 * emacsgtkfixed.c (G_STATIC_ASSERT): Redefine to use 'verify',
2250 to work around GNOME bug 683906.
2251 * image.c (jpeg_load_body) [HAVE_JPEG && lint]: Pacify gcc -Wclobber.
2252 (struct my_jpeg_error_mgr) [HAVE_JPEG && lint]: New member fp.
2253 This works around GCC bug 54561.
2255 2012-09-12 Paul Eggert <eggert@cs.ucla.edu>
2257 More fixes for 'volatile' and setjmp/longjmp.
2258 * eval.c (Fdefvar, Fcondition_case): Remove unnecessary 'volatile's.
2259 * image.c (struct png_load_context) [HAVE_PNG]: New type.
2260 (png_load_body) [HAVE_PNG]:
2261 (jpeg_load_body) [HAVE_JPEG]:
2262 New function, with most of the old parent function's body.
2263 (png_load) [HAVE_PNG]:
2264 (jpeg_load) [HAVE_JPEG]:
2265 Invoke the new function, to avoid longjmp munging our locals.
2266 (struct my_jpeg_error_mgr) [HAVE_JPEG]: New members cinfo, failure_code.
2267 (my_error_exit) [HAVE_JPEG]: Don't trust 'setjmp' to return 2 when
2268 longjmp is passed 2, as the C standard doesn't guarantee this.
2269 Instead, store the failure code into mgr->failure_code.
2271 2012-09-12 Stefan Monnier <monnier@iro.umontreal.ca>
2273 * keyboard.c (read_char, requeued_events_pending_p, Finput_pending_p)
2274 (Fdiscard_input, quit_throw_to_read_char, init_keyboard)
2275 (syms_of_keyboard): Remove support for unread-command-char.
2277 2012-09-12 Eli Zaretskii <eliz@gnu.org>
2279 * w32proc.c (sys_kill): If PID is our process ID and the signal is
2280 SIGABRT, call emacs_abort. Avoids silently exiting upon assertion
2281 violation. (Bug#12426)
2283 2012-09-12 Paul Eggert <eggert@cs.ucla.edu>
2285 * image.c (jpeg_memory_src): Don't assume string len fits in unsigned.
2287 2012-09-12 Stefan Monnier <monnier@iro.umontreal.ca>
2289 * eval.c: Add `inhibit-debugger'.
2290 (Qinhibit_debugger): New symbol.
2291 (call_debugger): Bind it instead of Qdebug_on_error.
2292 (maybe_call_debugger): Test Vinhibit_debugger.
2293 (syms_of_eval): Define inhibit-debugger.
2294 * xdisp.c (set_message): Don't bind Qinhibit_debug_on_message.
2295 (syms_of_xdisp): Remove inhibit-debug-on-message.
2297 2012-09-11 Paul Eggert <eggert@cs.ucla.edu>
2299 Avoid _setjmp/_longjmp problems with local nonvolatile variables.
2300 If a nonvolatile local variable is written before a _longjmp to
2301 the frame containing the variable, and is read after the _longjmp,
2302 the value read is indeterminate. Some local variables of type
2303 'struct handler' and 'struct catchtag' are used in this way, so
2304 mark each of their slots as volatile if the slot can be set before
2305 _longjmp and read afterwards.
2306 * lisp.h (struct handler): var and chosen_clause are now volatile.
2307 (struct catchtag): val, next, and pdlcount are now volatile.
2309 * bidi.c (bidi_push_it, bidi_pop_it):
2310 * fns.c (copy_hash_table):
2311 * image.c (define_image_type):
2312 * keyboard.c (kbd_buffer_store_event_hold):
2313 * process.c (Fprocess_send_eof):
2314 * xfaces.c (x_create_gc) [HAVE_NS]:
2315 * xgselect.c (xg_select):
2316 Prefer assignment to memcpy when either will do.
2318 * alloc.c (discard_killed_buffers): Tune and simplify a bit.
2319 Use pointer-to-a-pointer to simplify and avoid a NILP check each
2320 time an item is removed. No need to mark this function 'inline';
2321 the compiler knows better than we do.
2323 2012-09-11 Jan Djärv <jan.h.d@swipnet.se>
2325 * nsterm.m (ns_judge_scroll_bars): Pass NO to updateFrameSize.
2326 (updateFrameSize:): Add delay parameter to updateFrameSize, send it
2327 to change_frame_size (Bug#12388).
2328 (windowDidResize:): Pass YES to updateFrameSize.
2330 * nsterm.h: Add delay parameter to updateFrameSize.
2332 2012-09-11 Dmitry Antipov <dmantipov@yandex.ru>
2334 Discard killed buffers from deleted window and frame objects.
2335 This reduces an amount of references to killed buffers and
2336 helps GC to reclaim them faster.
2337 * alloc.c (discard_killed_buffers): New function.
2338 (mark_object): Use it for deleted windows and frames.
2339 (mark_object): If symbol's value is set up for a killed buffer
2340 or deleted frame, restore its global binding.
2341 * data.c (swap_in_global_binding): Add GC notice.
2342 (swap_in_symval_forwarding): Use convenient set_blv_where.
2343 * window.c (wset_next_buffers, wset_prev_buffers): Move ...
2344 * window.h: ... to here.
2346 2012-09-11 Dmitry Antipov <dmantipov@yandex.ru>
2348 Convenient macro to check whether the buffer is live.
2349 * buffer.h (BUFFER_LIVE_P): New macro.
2350 * alloc.c, buffer.c, editfns.c, insdel.c, lread.c, marker.c:
2351 * minibuf.c, print.c, process.c, window.c, xdisp.c: Use it.
2353 2012-09-11 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
2355 * xdisp.c (right_overwritten, right_overwriting): Also handle gstring
2356 composition cases (Bug#12364).
2358 * xterm.c (x_draw_glyph_string): Avoid overwriting inverted left
2359 overhang of succeeding glyphs overlapping box cursor.
2361 * w32term.c (x_draw_glyph_string): Likewise.
2363 2012-09-11 Paul Eggert <eggert@cs.ucla.edu>
2365 Simplify, document, and port floating-point (Bug#12381).
2366 The porting part of this patch fixes bugs on non-IEEE platforms
2367 with frexp, ldexp, logb.
2368 * data.c, lisp.h (Qdomain_error, Qsingularity_error, Qunderflow_error):
2370 * floatfns.c: Simplify discussion of functions that Emacs doesn't
2371 support, by removing commented-out code and briefly listing the
2372 C89 functions excluded. The commented-out stuff was confusing
2373 maintenance, e.g., we thought we needed cbrt but it was commented out.
2374 (logb): Remove decl; no longer needed.
2375 (isfinite): New macro, if not already supplied.
2376 (isnan): Don't replace any existing macro.
2377 (Ffrexp, Fldexp): Define even if !HAVE_COPYSIGN, as frexp and ldexp
2378 are present on all C89 platforms.
2379 (Ffrexp): Do not special-case zero, as frexp does the right thing
2381 (Flogb): Do not use logb, as it doesn't have the desired meaning
2382 on hosts that use non-base-2 floating point. Instead, stick with
2383 frexp, which is C89 anyway. Do not pass an infinity or a NaN to
2384 frexp, to avoid getting an unspecified result.
2386 * xdisp.c (Qinhibit_debug_on_message): Now static.
2388 2012-09-10 Jan Djärv <jan.h.d@swipnet.se>
2390 * nsterm.m (ns_update_begin): Set clip path to whole view by using
2391 NSBezierPath (Bug#12131).
2393 2012-09-10 Chong Yidong <cyd@gnu.org>
2395 * fns.c (Fdelq, Fdelete): Doc fix.
2397 2012-09-10 Paul Eggert <eggert@cs.ucla.edu>
2399 * lisp.h (XSETINT, XSETCONS, XSETVECTOR, XSETSTRING, XSETSYMBOL)
2400 (XSETFLOAT, XSETMISC): Parenthesize macro bodies.
2402 2012-09-09 Stefan Monnier <monnier@iro.umontreal.ca>
2404 * lisp.h (make_lisp_ptr): New macro to replace XSET.
2405 (XSETCONS, XSETVECTOR, XSETSTRING, XSETSYMBOL, XSETFLOAT, XSETMISC):
2408 2012-09-09 Eli Zaretskii <eliz@gnu.org>
2410 * fringe.c (draw_fringe_bitmap_1): Don't reduce the width of the
2411 left fringe if the window has a left margin. This avoids leaving
2412 traces of the cursor because its leftmost pixel is not drawn over.
2414 * dispnew.c (update_window_line): When the left margin area of a
2415 screen line is updated, set the redraw_fringe_bitmaps_p flag of
2416 that screen line. (Bug#12277)
2418 2012-09-09 Paul Eggert <eggert@cs.ucla.edu>
2420 Assume C89 or later for math functions (Bug#12381).
2421 This simplifies the code, and makes it a bit smaller and faster,
2422 and (most important) makes it easier to clean up signal handling
2423 since we can stop worring about floating-point exceptions in
2424 library code. That was a problem before C89, but the problem
2425 went away many years ago on all practical Emacs targets.
2426 * data.c, image.c, lread.c, print.c:
2427 Don't include <math.h>; no longer needed.
2428 * data.c, floatfns.c (IEEE_FLOATING_POINT): Don't worry that it
2429 might be autoconfigured, as that never happens.
2431 * doprnt.c (DBL_MAX_10_EXP):
2432 * print.c (DBL_DIG):
2433 Remove. C89 or later always defines these.
2434 * floatfns.c (HAVE_MATHERR, FLOAT_CHECK_ERRNO, FLOAT_CHECK_DOMAIN)
2435 (in_float, float_error_arg, float_error_arg2, float_error_fn_name)
2436 (arith_error, domain_error, domain_error2):
2437 Remove all this pre-C89 cruft. Do not include <errno.h> as that's
2438 no longer needed -- we simply return what C returns. All uses removed.
2439 (IN_FLOAT, IN_FLOAT2): Remove. All uses replaced with
2441 (FLOAT_TO_INT, FLOAT_TO_INT2, range_error, range_error2):
2442 Remove. All uses expanded, as these macros are no longer used
2443 more than once and are now more trouble than they're worth.
2444 (Ftan): Use tan, not sin / cos.
2445 (Flogb): Assume C89 frexp.
2446 (fmod_float): Assume C89 fmod.
2447 (matherr) [HAVE_MATHERR]: Remove; no longer needed.
2448 (init_floatfns): Remove. All uses removed.
2450 2012-09-08 Jan Djärv <jan.h.d@swipnet.se>
2452 * nsterm.m (ns_draw_fringe_bitmap, ns_dumpglyphs_image): Take back
2453 compositeToPoint for OSX < 10.6 (Bug#12390).
2455 2012-09-08 Paul Eggert <eggert@cs.ucla.edu>
2457 * floatfns.c (Ftan): Use tan (x), not (sin (x) / cos (x)).
2458 This produces more-accurate results.
2460 2012-09-08 Jan Djärv <jan.h.d@swipnet.se>
2462 * nsterm.m (updateFrameSize): Call setFrame: on the view when size
2463 changes (Bug#12088).
2465 2012-09-08 Chong Yidong <cyd@gnu.org>
2467 * syntax.c (Fstring_to_syntax): Doc fix.
2469 2012-09-08 Jan Djärv <jan.h.d@swipnet.se>
2471 * nsterm.m (ns_clip_to_row): Remove code that deals with drawing fringe
2472 in the internal border.
2473 (x_set_window_size): Remove static variables and their usage.
2474 (ns_redraw_scroll_bars): Fix NSTRACE arg.
2475 (ns_after_update_window_line, ns_draw_fringe_bitmap):
2476 Remove fringe/internal border adjustment (Bug#11052).
2477 (ns_draw_fringe_bitmap): Make code more like other terms (xterm.c).
2478 (ns_draw_window_cursor): Remove fringe/internal border adjustment.
2479 (ns_fix_rect_ibw): Remove.
2480 (ns_get_glyph_string_clip_rect): Remove call to ns_fix_rect_ibw.
2481 (ns_dumpglyphs_box_or_relief): Ditto.
2482 (ns_maybe_dumpglyphs_background): Remove fringe/internal border
2484 (ns_dumpglyphs_image): Ditto.
2485 (ns_dumpglyphs_stretch): Fix coding style. Remove fringe/internal
2487 (ns_set_vertical_scroll_bar): Remove variables barOnVeryLeft/Right and
2488 their usage. Add fringe_extended_p and its use as in other terms.
2489 (ns_judge_scroll_bars): Code style fix. Call updateFrameSize if
2490 scroll bar was removed.
2491 (updateFrameSize): New function.
2492 (windowDidResize): Move code to updateFrameSize and call it.
2494 * nsterm.h (EmacsView): Add updateFrameSize.
2496 2012-09-07 Chong Yidong <cyd@gnu.org>
2498 * textprop.c (Fget_text_property): Minor doc fix (Bug#12323).
2500 * data.c (Flocal_variable_if_set_p): Doc fix (Bug#10713).
2502 2012-09-07 Paul Eggert <eggert@cs.ucla.edu>
2504 More signal-handler cleanup (Bug#12327).
2505 * emacs.c (main): Convert three 'signal' calls to 'sigaction' calls.
2506 Problem introduced when merging patches. Noted by Eli Zaretskii in
2507 <http://bugs.gnu.org/12327#67>.
2508 * floatfns.c: Comment fix.
2509 * lisp.h (force_auto_save_soon): Declare regardless of SIGDANGER.
2510 SIGDANGER might not be in scope so "#ifdef SIGDANGER" is not right,
2511 and anyway the declaration is harmless even if SIGDANGER is not defined.
2512 * syssignal.h (SIGIO): Also #undef if (! defined FIONREAD ||
2513 defined BROKEN_FIONREAD). systty.h formerly did this, but other
2514 source files not surprisingly expected syssignal.h to define, or
2515 not define, SIGIO, and it's cleaner to do it that way, for consistency.
2516 Include <sys/ioctl.h>, for FIONREAD.
2517 * systty.h (SIGIO): Do not #undef here; it's now syssignal.h's job.
2518 This eliminates a problem whereby other files mysteriously had
2519 to include "syssignal.h" before including "systty.h" if they
2520 wanted to use "#ifdef SIGIO".
2522 2012-09-07 Eli Zaretskii <eliz@gnu.org>
2524 * w32proc.c (sigaction): New function, emulates Posix 'sigaction'.
2526 * w32.c (sigemptyset): Empty the set.
2527 (sigsetmask, sigmask, sigblock, sigunblock): Remove unused functions.
2529 * alloc.c [ENABLE_CHECKING]: Include signal.h, since we need SIGABRT.
2531 2012-09-07 Dmitry Antipov <dmantipov@yandex.ru>
2533 * alloc.c (mark_buffer): Revert unsafe marking optimization.
2534 (mark_object): Likewise for frame objects.
2536 2012-09-07 Paul Eggert <eggert@cs.ucla.edu>
2538 * syssignal.h (handle_on_main_thread): Always declare,
2539 even if FORWARD_SIGNAL_TO_MAIN_THREAD is not defined.
2540 This ports to platforms without HAVE_PTHREAD.
2542 2012-09-06 Paul Eggert <eggert@cs.ucla.edu>
2544 Signal-handler cleanup (Bug#12327).
2545 Emacs's signal handlers were written in the old 4.2BSD style with
2546 sigblock and sigmask and so forth, and this led to some
2547 inefficiencies and confusion. Rewrite these to use
2548 pthread_sigmask etc. without copying signal sets around. Also,
2549 get rid of the confusing macros 'SIGNAL_THREAD_CHECK' and
2550 'signal', and instead use functions that do not attempt to take
2551 over the system name space. This patch causes Emacs's text
2552 segment to shrink by 0.7% on my platform, Fedora 17 x86-64.
2553 * alloc.c, emacsgtkfixed.c, nsfns.m, widget.c, xmenu.c:
2554 Do not include <signal.h> or "syssignal.h", as these
2555 modules do not use signals.
2556 * atimer.c, callproc.c, data.c, dispnew.c, emacs.c, floatfns.c:
2557 * gtkutil.c, keyboard.c, process.c, sound.c, sysdep.c, term.c, xterm.c:
2558 Do not include <signal.h>, as "syssignal.h" does that for us now.
2559 * atimer.c (sigmask_atimers): New function.
2560 (block_atimers, unblock_atimers): New functions,
2561 replacing the old macros BLOCK_ATIMERS and UNBLOCK_ATIMERS.
2563 * conf_post.h [SIGNAL_H_AHB]: Do not include <signal.h>;
2564 no longer needed here.
2565 * emacs.c (main): Inspect existing signal handler with sigaction,
2566 so that there's no need to block and unblock SIGHUP.
2567 * sysdep.c (struct save_signal): New member 'action', replacing
2568 old member 'handler'.
2569 (save_signal_handlers, restore_signal_handlers):
2570 Use sigaction instead of 'signal' to save and restore.
2571 (get_set_sighandler, set_sighandler) [!WINDOWSNT]:
2572 New function. All users of 'signal' modified to use set_sighandler
2573 if they're writeonly, and to use sys_signal if they're read+write.
2574 (emacs_sigaction_init, forwarded_signal): New functions.
2575 (sys_signal): Remove. All uses replaced by calls to sigaction
2576 and emacs_sigaction_init, or by direct calls to 'signal'.
2577 (sys_sigmask) [!__GNUC__]: Remove; no longer needed.
2578 (sys_sigblock, sys_sigunblock, sys_sigsetmask): Remove;
2579 all uses replaced by pthread_sigmask etc. calls.
2580 * syssignal.h: Include <signal.h>.
2581 (emacs_sigaction_init, forwarded_signal): New decls.
2582 (SIGMASKTYPE): Remove. All uses replaced by its definiens, sigset_t.
2583 (SIGEMPTYMASK): Remove; all uses replaced by its definiens, empty_mask.
2584 (sigmask, sys_sigmask): Remove; no longer needed.
2585 (sigpause): Remove. All uses replaced by its definiens, sigsuspend.
2586 (sigblock, sigunblock, sigfree):
2587 (sigsetmask) [!defined sigsetmask]:
2588 Remove. All uses replaced by pthread_sigmask.
2589 (signal): Remove. Its remaining uses (with SIG_DFL and SIG_IGN)
2590 no longer need to be replaced, and its typical old uses
2591 are now done via emacs_sigaction_init and sigaction.
2592 (sys_sigblock, sys_sigunblock, sys_sigsetmask): Remove decls.
2593 (sys_sigdel): Remove; unused.
2594 (NSIG): Remove a FIXME; the code's fine. Remove an unnecessary ifdef.
2596 2012-09-06 Eli Zaretskii <eliz@gnu.org>
2598 * process.c (CAN_HANDLE_MULTIPLE_CHILDREN): Fix a typo that broke
2599 SIGCHLD handling on systems that don't have WNOHANG. (Bug#12327)
2601 2012-09-06 Dmitry Antipov <dmantipov@yandex.ru>
2603 Explicitly mark buffer_defaults and buffer_local_symbols.
2604 * alloc.c (Fgarbage_collect): Mark buffer_defaults and
2605 mark_local_symbols here.
2606 (mark_object): If GC_CHECK_MARKED_OBJECTS, simplify checking
2607 since special buffers aren't marked here any more.
2608 (allocate_buffer): Chain new buffer with all_buffers here...
2609 * buffer.c (Fget_buffer_create, Fmake_indirect_buffer): ...and
2611 (Vbuffer_defaults, Vbuffer_local_symbols): Remove.
2612 (syms_of_buffer): Remove staticpro of the above.
2613 (init_buffer_once): Set names for buffer_defaults and
2614 buffer_local_symbols.
2616 2012-09-06 Paul Eggert <eggert@cs.ucla.edu>
2618 Use bool for booleans in font-related modules.
2619 * font.c (font_intern_prop, font_style_to_value)
2620 (font_style_symbolic, font_parse_xlfd, font_parse_fcname)
2621 (generate_otf_features, font_check_otf_features, font_check_otf)
2622 (font_match_p, font_list_entities, font_at):
2623 * fontset.c (fontset_id_valid_p, reorder_font_vector
2624 (fontset_find_font, Fset_fontset_font)
2625 (face_suitable_for_char_p) [0]:
2626 * ftfont.c (fc_initialized, ftfont_get_open_type_spec)
2627 (ftfont_open, ftfont_text_extents, ftfont_check_otf):
2628 (m17n_flt_initialized, ftfont_shape_by_flt):
2629 * ftxfont.c (ftxfont_draw_bitmap, ftxfont_draw):
2630 * nsfont.m (nsfont_draw):
2631 * w32font.c (w32font_draw):
2632 * w32term.c (x_draw_glyphless_glyph_string_foreground):
2633 Use bool for booleans.
2634 * font.h: Adjust to above API changes.
2635 (struct font, struct font_driver, struct font_driver_list):
2636 Use bool for booleans.
2637 (struct font): Remove useless member encoding_type.
2639 * fontset.c, xftfont.c: Omit unnecessary static decls.
2641 2012-09-06 Dmitry Antipov <dmantipov@yandex.ru>
2643 * alloc.c (mark_object): Revert window marking code
2644 since it's unsafe for the Fset_window_configuration.
2646 2012-09-05 Paul Eggert <eggert@cs.ucla.edu>
2648 Fix race conditions with signal handlers and errno (Bug#12327).
2649 Be more systematic about preserving errno whenever a signal
2650 handler returns, even if it's not in the main thread. Do this by
2651 renaming signal handlers to distinguish between signal delivery
2652 and signal handling. All uses changed.
2653 * atimer.c (deliver_alarm_signal): Rename from alarm_signal_handler.
2654 * data.c (deliver_arith_signal): Rename from arith_error.
2655 * dispnew.c (deliver_window_change_signal): Rename from
2656 window_change_signal.
2657 * emacs.c (deliver_error_signal): Rename from fatal_error_signal.
2658 (deliver_danger_signal) [SIGDANGER]: Rename from memory_warning_signal.
2659 * keyboard.c (deliver_input_available_signal): Rename from
2660 input_available_signal.
2661 (deliver_user_signal): Rename from handle_user_signal.
2662 (deliver_interrupt_signal): Rename from interrupt_signal.
2663 * process.c (deliver_pipe_signal): Rename from send_process_trap.
2664 (deliver_child_signal): Rename from sigchld_handler.
2665 * atimer.c (handle_alarm_signal):
2666 * data.c (handle_arith_signal):
2667 * dispnew.c (handle_window_change_signal):
2668 * emacs.c (handle_fatal_signal, handle_danger_signal):
2669 * keyboard.c (handle_input_available_signal):
2670 * keyboard.c (handle_user_signal, handle_interrupt_signal):
2671 * process.c (handle_pipe_signal, handle_child_signal):
2672 New functions, with the actual signal-handling code taken from the
2673 original respective signal handlers, sans the sporadic attempts to
2674 preserve errno, since that's now done by handle_on_main_thread.
2675 * atimer.c (alarm_signal_handler): Remove unnecessary decl.
2676 * emacs.c, floatfns.c, lisp.h: Remove unused FLOAT_CATCH_SIGKILL cruft.
2677 * emacs.c (main_thread) [FORWARD_SIGNAL_TO_MAIN_THREAD]:
2679 (main) [FORWARD_SIGNAL_TO_MAIN_THREAD]:
2680 Move initialization of main_thread to sysdep.c's init_signals.
2681 * process.c (waitpid) [!WNOHANG]: #define to wait; that's good enough for
2682 our usage, and simplifies the mainline code.
2683 (record_child_status_change): New static function, as a helper
2684 for handle_child_signal, and with most of the old child handler's
2686 (CAN_HANDLE_MULTIPLE_CHILDREN): New constant.
2687 (handle_child_signal): Use the above.
2688 * sysdep.c (main_thread) [FORWARD_SIGNAL_TO_MAIN_THREAD]:
2689 Moved here from emacs.c.
2690 (init_signals) [FORWARD_SIGNAL_TO_MAIN_THREAD]: Initialize it;
2691 code moved here from emacs.c's main function.
2692 * sysdep.c, syssignal.h (handle_on_main_thread): New function,
2693 replacing the old SIGNAL_THREAD_CHECK. All uses changed.
2694 This lets callers save and restore errno properly.
2696 2012-09-05 Dmitry Antipov <dmantipov@yandex.ru>
2698 Remove redundant or unused things here and there.
2699 * lisp.h (CYCLE_CHECK, CHAR_TABLE_TRANSLATE): Remove.
2700 * conf_post.h (RE_TRANSLATE): Use char_table_translate.
2701 * editfns.c (Fcompare_buffer_substrings): Likewise.
2702 * frame.h (struct terminal, struct font_driver_list):
2703 Remove redundant declarations.
2704 * window.h (Qleft, Qright): Likewise.
2706 2012-09-05 Dmitry Antipov <dmantipov@yandex.ru>
2708 Do not mark objects from deleted buffers, windows and frames.
2709 * alloc.c (mark_buffer): Mark just the buffer if it is dead.
2710 (mark_object): Likewise for windows and frames.
2712 2012-09-05 Dmitry Antipov <dmantipov@yandex.ru>
2714 * alloc.c (valid_lisp_object_p): Treat killed buffers,
2715 buffer_defaults and buffer_local_symbols as valid objects.
2716 Return special value to denote them.
2718 2012-09-05 Paul Eggert <eggert@cs.ucla.edu>
2720 * fileio.c, filelock.c, floatfns.c, fns.c: Use bool for boolean.
2721 * fileio.c (auto_saving, auto_save_error_occurred, make_temp_name)
2722 (Fexpand_file_name, barf_or_query_if_file_exists, Fcopy_file)
2723 (file_name_absolute_p, Fsubstitute_in_file_name):
2724 (check_executable, check_writable, Ffile_accessible_directory_p)
2725 (Fset_file_selinux_context, Fdefault_file_modes)
2726 (Finsert_file_contents, choose_write_coding_system)
2727 (Fwrite_region, build_annotations, a_write, e_write)
2729 * filelock.c (boot_time_initialized, get_boot_time)
2730 (get_boot_time_1, lock_file_1, within_one_second):
2731 * floatfns.c (in_float):
2732 * fns.c (concat, internal_equal, Frequire, base64_encode_1)
2733 (base64_decode_1, cmpfn_eql, cmpfn_user_defined)
2734 (sweep_weak_table, sweep_weak_hash_tables, secure_hash):
2735 * lisp.h (struct Lisp_Hash_Table.cmpfn):
2736 * window.c (compare_window_configurations):
2737 Use bool for booleans.
2738 * fileio.c (auto_saving_dir_umask, auto_saving_mode_bits)
2739 (Fdefault_file_modes): Now mode_t, not int, for modes.
2740 (Fdo_auto_save): Set a boolean to 1 rather than using ++.
2741 (internal_delete_file): Now returns void, not a (boolean) int,
2742 since nobody was looking at the return value.
2743 * lisp.h, window.h: Adjust to above API changes.
2745 * xdisp.c (set_message): Simplify and reindent last change.
2747 2012-09-05 Juanma Barranquero <lekktu@gmail.com>
2749 * makefile.w32-in ($(BLD)/sysdep.$(O)): Update dependencies.
2751 2012-09-04 Lars Ingebrigtsen <larsi@gnus.org>
2753 * eval.c (call_debugger): Make the function non-static so that we
2754 can call it from set_message.
2756 * xdisp.c (set_message): Implement the new variable `debug-on-message'.
2757 (syms_of_xdisp): Defvar it and `inhibit-debug-on-message'.
2759 2012-09-04 Paul Eggert <eggert@cs.ucla.edu>
2761 Give more-useful info on a fatal error (Bug#12328).
2762 * alloc.c [ENABLE_CHECKING]: Do not include <execinfo.h>.
2763 (die) [ENABLE_CHECKING]: Call fatal_error_backtrace instead
2764 of doing the work ourselves.
2765 * emacs.c (fatal_error_signal): Let fatal_error_backtrace
2766 do most of the work.
2767 (fatal_error_backtrace): New function, taken from the guts
2768 of the old fatal_error_signal, but with a new option to output
2770 (shut_down_emacs) [!DOS_NT]: Use strsignal to give more-useful
2771 info about the signal than just its number.
2772 * lisp.h (fatal_error_backtrace, emacs_backtrace): New decls.
2773 * sysdep.c: Include <execinfo.h>
2774 (emacs_backtrace): New function, taken partly from the previous
2775 code of the 'die' function.
2776 (emacs_abort): Call fatal_error_backtrace rather than abort.
2778 2012-09-04 Stefan Monnier <monnier@iro.umontreal.ca>
2780 * lread.c (readevalloop): Call internal-macroexpand-for-load to perform
2781 eager (load-time) macro-expansion.
2782 * lisp.mk (lisp): Add macroexp.
2784 2012-09-04 Paul Eggert <eggert@cs.ucla.edu>
2786 Simplify redefinition of 'abort' (Bug#12316).
2787 Do not try to redefine the 'abort' function. Instead, redo
2788 the code so that it calls 'emacs_abort' rather than 'abort'.
2789 This removes the need for the NO_ABORT configure-time macro
2790 and makes it easier to change the abort code to do a backtrace.
2791 * .gdbinit: Just stop at emacs_abort, not at w32_abort or abort.
2792 * emacs.c (abort) [!DOS_NT && !NO_ABORT]:
2793 Remove; sysdep.c's emacs_abort now takes its place.
2794 * lisp.h (emacs_abort): New decl. All calls from Emacs code to
2795 'abort' changed to use 'emacs_abort'.
2796 * msdos.c (dos_abort) [defined abort]: Remove; not used.
2797 (abort) [!defined abort]: Rename to ...
2798 (emacs_abort): ... new name.
2799 * sysdep.c (emacs_abort) [!HAVE_NTGUI]: New function, taking
2800 the place of the old 'abort' in emacs.c.
2801 * w32.c, w32fns.c (abort): Do not #undef.
2802 * w32.c (emacs_abort): Rename from w32_abort.
2804 2012-09-04 Eli Zaretskii <eliz@gnu.org>
2806 * w32uniscribe.c (uniscribe_shape): Reverse the sign of
2807 offsets[j].dv, since the y axis of the screen coordinates points
2808 down, while the y axis of the font definition coordinates points
2809 up. This fixes display of Arabic diacritics such as KASRA and
2810 KASRATAN. (Bug#11860)
2812 2012-09-04 Paul Eggert <eggert@cs.ucla.edu>
2814 Be more systematic about _setjmp vs setjmp.
2815 * alloc.c (test_setjmp, mark_stack):
2816 * image.c (PNG_LONGJMP) [PNG_LIBPNG_VER < 10500]:
2817 (PNG_JMPBUF) [! (PNG_LIBPNG_VER < 10500)]:
2818 (png_load, my_error_exit, jpeg_load):
2819 * process.c (send_process_trap, send_process):
2820 Uniformly prefer _setjmp and _longjmp to setjmp and longjmp.
2821 The underscored versions are up to 30x faster on some hosts.
2822 Formerly, the code used setjmp+longjmp sometimes and
2823 _setjmp+_longjmp at other times, with no particular reason to
2824 prefer setjmp+longjmp.
2826 2012-09-03 Paul Eggert <eggert@cs.ucla.edu>
2828 Fix minor problem found by static checking.
2829 * buffer.c (Fdelete_all_overlays): Return nil.
2831 2012-09-03 Martin Rudalics <rudalics@gmx.at>
2833 * buffer.c (Fdelete_all_overlays): New function.
2835 2012-09-03 Chong Yidong <cyd@gnu.org>
2837 * gtkutil.c: Add extern decl for Qxft.
2839 2012-09-02 Paul Eggert <eggert@cs.ucla.edu>
2841 * emacs.c, eval.c: Use bool for boolean.
2842 * emacs.c (initialized, inhibit_window_system, running_asynch_code):
2843 (malloc_using_checking) [DOUG_LEA_MALLOC]:
2844 (display_arg) [HAVE_X_WINDOWS || HAVE_NS]:
2845 (noninteractive, no_site_lisp, fatal_error_in_progress, argmatch)
2846 (main, decode_env_path, Fdaemon_initialized):
2847 * eval.c (call_debugger, Finteractive_p, interactive_p):
2848 (unwind_to_catch, Fsignal, wants_debugger, skip_debugger)
2849 (maybe_call_debugger, Fbacktrace):
2850 * process.c (read_process_output, exec_sentinel):
2851 Use bool for booleans.
2852 * emacs.c (shut_down_emacs): Omit unused boolean argument NO_X.
2853 All callers changed.
2854 * eval.c (interactive_p): Omit always-true boolean argument
2855 EXCLUDE_SUBRS_P. All callers changed.
2856 * dispextern.h, lisp.h: Reflect above API changes.
2857 * firstfile.c (dummy): Use the address of 'main', whose signature
2858 won't change, instead of the address of 'initialize', whose
2859 signature just changed from int to bool.
2860 * lisp.h (fatal_error_in_progress): New decl of boolean, moved here ...
2861 * msdos.c (fatal_error_in_progress): ... from here.
2862 * xdisp.c (redisplaying_p): Now a boolean. Set it to 1 instead
2864 (redisplay_internal, unwind_redisplay): Simply clear
2865 REDISPLAYING_P when unwinding, instead of saving its previous,
2866 always-false value and then restoring it.
2868 Clean up some extern decls.
2869 Mostly, this hoists extern decls out of .c files and into .h files.
2870 That way, we're more likely to catch errors if the interfaces change.
2871 * alloc.c [USE_GTK]: Include "gtkutil.h" so that we need not
2872 declare xg_mark_data.
2873 * dispextern.h (x_frame_parm_handlers):
2875 * lisp.h (Qlexical_binding, Qinternal_interpreter_environment)
2876 (Qextra_light, Qlight, Qsemi_light, Qsemi_bold, Qbold, Qextra_bold)
2877 (Qultra_bold, Qoblique, Qitalic):
2878 Move extern decl here from .c file.
2879 * alloc.c (xg_mark_data) [USE_GTK]:
2881 * eval.c (Qlexical_binding):
2882 * fns.c (time) [!HAVE_UNISTD_H]:
2883 * gtkutil.c (Qxft, Qnormal, Qextra_light, Qlight, Qsemi_light)
2884 (Qsemi_bold, Qbold, Qextra_bold, Qultra_bold, Qoblique, Qitalic):
2885 * image.c (Vlibrary_cache, QCloaded_from) [HAVE_NTGUI]:
2886 * lread.c (Qinternal_interpreter_environment):
2887 * minibuf.c (Qbuffer):
2888 * process.c (QCfamily, QCfilter):
2889 * widget.c (free_frame_faces):
2890 * xfaces.c (free_frame_menubar) [USE_X_TOOLKIT]:
2891 * xfont.c (x_clear_errors):
2892 * xterm.c (x_frame_parm_handlers):
2893 Remove now-redundant extern decls.
2894 * keyboard.c, keyboard.h (ignore_mouse_drag_p) [USE_GTK || HAVE_NS]:
2895 * xfaces.c (Qultra_light, Qreverse_oblique, Qreverse_italic):
2897 * xfaces.c: Remove unnecessary static decls.
2898 * xterm.c (updating_frame): Remove decl of nonexistent object.
2900 * Makefile.in (gl-stamp): Don't scan $(SOME_MACHINE_OBJECTS)
2901 when building globals.h, as the objects that are not built on
2902 this host are not needed to compile C files on this host.
2904 2012-09-02 Jan Djärv <jan.h.d@swipnet.se>
2906 * gtkutil.h: Remove prototype for x_wm_set_size_hint.
2908 * frame.h: Add missing prototype for x_wm_set_size_hint.
2910 2012-09-02 Paul Eggert <eggert@cs.ucla.edu>
2912 * doc.c, editfns.c, insdel.c, intervals.c: Use bool for boolean.
2913 * doc.c (read_bytecode_char, get_doc_string, reread_doc_file)
2914 (Fdocumentation, Fdocumentation_property, Fsnarf_documentation)
2915 (Fsubstitute_command_keys):
2916 * editfns.c (region_limit, find_field, Fconstrain_to_field)
2917 (save_excursion_save, save_excursion_restore)
2918 (disassemble_lisp_time, decode_time_components, emacs_nmemftime)
2919 (format_time_string, general_insert_function)
2920 (make_buffer_string, make_buffer_string_both)
2921 (Fsubst_char_in_region, Ftranslate_region_internal, Fformat):
2922 * insdel.c (check_markers, gap_left, adjust_markers_for_insert)
2923 (copy_text, insert_1, insert_1_both, insert_from_string)
2924 (insert_from_string_before_markers, insert_from_string_1)
2925 (insert_from_buffer, insert_from_buffer_1, replace_range)
2926 (replace_range_2, del_range_1, del_range_byte, del_range_both)
2927 (del_range_2, modify_region):
2928 * intervals.c (intervals_equal, balance_possible_root_interval)
2929 (adjust_intervals_for_insertion, merge_properties_sticky)
2930 (graft_intervals_into_buffer, lookup_char_property)
2931 (adjust_for_invis_intang, set_point_both)
2932 (get_property_and_range, compare_string_intervals)
2933 (set_intervals_multibyte_1, set_intervals_multibyte):
2934 * keyboard.c (decode_timer):
2935 Use bool for boolean.
2936 * intervals.h, lisp.h, systime.h: Reflect above API changes.
2937 * editfns.c (struct info): Use 1-bit unsigned bitfields for booleans.
2939 2012-09-02 Chong Yidong <cyd@gnu.org>
2941 * keymap.c (push_key_description): Print M-TAB as C-M-i
2944 2012-09-02 Juanma Barranquero <lekktu@gmail.com>
2946 * makefile.w32-in (CCL_H, W32FONT_H): New macros.
2947 (ATIMER_H, FONT_H, $(BLD)/alloc.$(O), $(BLD)/callproc.$(O))
2948 ($(BLD)/editfns.$(O), $(BLD)/ccl.$(O), $(BLD)/chartab.$(O))
2949 ($(BLD)/coding.$(O), $(BLD)/sysdep.$(O), $(BLD)/fontset.$(O))
2950 ($(BLD)/sysdep.$(O), $(BLD)/w32fns.$(O), $(BLD)/keyboard.$(O))
2951 ($(BLD)/w32term.$(O), $(BLD)/w32menu.$(O), $(BLD)/process.$(O))
2952 ($(BLD)/w32font.$(O), $(BLD)/w32uniscribe.$(O)): Update dependencies.
2954 2012-09-01 Eli Zaretskii <eliz@gnu.org>
2956 * w32uniscribe.c (uniscribe_shape): Handle correctly the case of
2957 more than one grapheme cluster passed to the shaper: compute the
2958 offset adjustment values separately for each cluster. (Bug#11860)
2960 * image.c: Restore mistakenly removed inclusion of w32.h. Without
2961 it, GCC doesn't see prototypes of w32_delayed_load, and complains
2962 about implicit conversions from integer to pointer.
2964 2012-09-01 Daniel Colascione <dancol@dancol.org>
2966 * w32fns.c (x_display_info_for_name): Prevent crash if w32 window
2967 system used too early.
2969 2012-09-01 Paul Eggert <eggert@cs.ucla.edu>
2971 Better seed support for (random).
2972 * emacs.c (main): Call init_random.
2973 * fns.c (Frandom): Set the seed from a string argument, if given.
2974 Remove long-obsolete Gentzel cruft.
2975 * lisp.h, sysdep.c (seed_random): Now takes address and size, not long.
2976 (init_random): New function.
2978 2012-09-01 Daniel Colascione <dancol@dancol.org>
2980 * xterm.h: Add header guards. Declare x_menubar_window_to_frame.
2981 Remove x_set_frame_alpha, x_bitmap_icon, x_make_frame_visible,
2982 x_make_frame_invisible, x_iconify_frame, x_free_frame_resources,
2983 x_wm_set_size_hint, x_query_colors, x_real_positions,
2984 x_set_menu_bar_lines, x_char_width, x_char_height, x_sync,
2985 x_set_tool_bar_lines, x_activate_menubar, and free_frame_menubar,
2986 all of which have been moved to common code.
2988 * xfaces.c: Include TERM_HEADER instead of listing all possible
2989 window-system headers.
2991 * w32xfns.c (x_sync): Correct definition of x_sync (a no-op here)
2994 * w32term.h (FRAME_X_WINDOW): Use FRAME_W32_WINDOW instead of
2995 directly accessing frame internals.
2997 * w32font.h: Include font.h. Define syms_of_w32font and
3000 * process.c: Include TERM_HEADER instead of listing all possible
3001 window-system headers.
3003 * nsterm.h: Remove declarations now in frame.h.
3004 Define FRAME_X_SCREEN, FRAME_X_VISUAL.
3006 * menu.c: Include TERM_HEADER instead of listing all possible
3007 window-system headers.
3009 * keyboard.h: Declare ignore_mouse_drag_p whenever we have a
3012 * keyboard.c: Include TERM_HEADER instead of listing all possible
3013 window-system headers.
3015 * image.c: Include TERM_HEADER instead of listing all possible
3016 window-system headers. Declare Vlibrary_cache when compiling for
3019 * gtkutil.h (xg_list_node_): Include xterm.h to pick up needed
3020 window system declarations.
3022 * frame.h: Move common functions here: set_frame_menubar,
3023 x_set_window_size, x_sync, x_get_focus_frame,
3024 x_set_mouse_position, x_set_mouse_pixel_position,
3025 x_make_frame_visible, x_make_frame_invisible, x_iconify_frame,
3026 x_char_width, x_char_height, x_pixel_width, x_pixel_height,
3027 x_set_frame_alpha, x_set_menu_bar_lines, x_set_tool_bar_lines,
3028 x_activate_menubar, x_real_positions, x_bitmap_icon,
3029 x_set_menu_bar_lines, free_frame_menubar, x_free_frame_resources,
3032 * frame.c: Include TERM_HEADER instead of listing all possible
3033 window-system headers.
3035 * font.c: Include TERM_HEADER instead of listing all possible
3036 window-system headers.
3038 * emacs.c: Include TERM_HEADER.
3040 * dispnew.c: Include TERM_HEADER instead of listing all possible
3041 window-system headers.
3043 * ccl.h: Include character.h.
3045 * Makefile.in: Define WINDOW_SYSTEM_OBJ to hold objects needed for
3046 the current window system; include in list of objects to link into
3049 2012-08-31 Dmitry Antipov <dmantipov@yandex.ru>
3051 Remove mark_ttys function and fix tty_display_info initialization.
3052 * lisp.h (mark_ttys): Remove prototype.
3053 * alloc.c (Fgarbage_collect): Remove redundant (and the only) call
3054 to mark_ttys because all possible values of 'top_frame' slot are
3055 the frames which are reachable from Vframe_list.
3056 * term.c (mark_ttys): Remove.
3057 (init_tty): Safely initialize 'top_frame' slot with Qnil.
3059 2012-08-31 Dmitry Antipov <dmantipov@yandex.ru>
3061 Change struct frame bitfields from unsigned char to unsigned.
3062 * frame.h (struct frame): Change type of 'display_preempted',
3063 'visible', 'iconified', 'has_minibuffer', 'wants_modeline',
3064 'auto_raise', 'auto_lower', 'no_split', 'explicit_name',
3065 'window_sizes_changed', 'mouse_moved' and 'pointer_invisible'
3066 bitfields from unsigned char to unsigned.
3068 2012-08-31 Dmitry Antipov <dmantipov@yandex.ru>
3070 Remove unused member of struct x_output and struct w32_output.
3071 * xterm.h (struct x_output): Remove unused field 'needs_exposure'.
3072 * w32term.h (struct w32_output): Likewise.
3074 2012-08-30 Jan Djärv <jan.h.d@swipnet.se>
3076 * gtkutil.c (x_wm_set_size_hint): Use 1 col for base_width so it
3077 does not become zero (Bug#12234).
3079 2012-08-30 Paul Eggert <eggert@cs.ucla.edu>
3081 * dispnew.c (update_frame_1): Pacify gcc -Wstrict-overflow
3082 for GCC 4.7.1 x86-64.
3084 2012-08-30 Glenn Morris <rgm@gnu.org>
3086 * lread.c (init_lread): For out-of-tree builds, only add the
3087 source directory's site-lisp dir to the load-path if it exists,
3088 consistent with in-tree builds. (Bug#12302)
3090 2012-08-28 Jan Djärv <jan.h.d@swipnet.se>
3092 * nsmenu.m (initWithContentRect:styleMask:backing:defer:): Initialize
3093 button_values to NULL. Call setStykeMask so dialogs get a close button.
3094 (windowShouldClose:): Set window_closed.
3095 (dealloc): New member, free button_values.
3096 (process_dialog:): Make member function. Remove window argument,
3097 replace window with self. Count buttons and allocate and store values
3099 (addButton:value:row:): value is int with the name tag. Call setTag
3100 with tag. Remove return self, declare return value as void.
3101 (addString:row:): Remove return self, declare return value as void.
3102 (addSplit): Remove return self, declare return value as void.
3103 (clicked:): Remove return self, declare return value as void.
3104 Set dialog_return to button_values[seltag]. Code formatting change.
3105 (initFromContents:isQuestion:): Adjust call to process_dialog.
3106 Code formatting change.
3107 (timeout_handler:): Set timer_fired to YES.
3108 (runDialogAt:): Set timer_fired to NO.
3109 Handle click on close button as quit.
3111 * nsterm.h (EmacsDialogPanel): Make timer_fired BOOL.
3112 Add window_closed and button_values. Add void as return value for
3113 add(Button|String|Split). addButton takes int instead of Lisp_Object.
3114 Add process_dialog as new member.
3116 2012-08-28 Eli Zaretskii <eliz@gnu.org>
3118 * ralloc.c (free_bloc): Don't dereference a 'heap' structure if it
3119 is not one of the heaps we manage. (Bug#12242)
3121 2012-08-28 Glenn Morris <rgm@gnu.org>
3123 * eval.c (Fcalled_interactively_p): Doc fix. (Bug#11747)
3125 2012-08-28 Martin Rudalics <rudalics@gmx.at>
3127 * window.c (Fset_window_configuration): Remove handling of
3128 auto-buffer-name window parameter. Install revision of reverted
3131 2012-08-28 Dmitry Antipov <dmantipov@yandex.ru>
3133 Do not allow to set major mode for a dead buffer.
3134 * buffer.c (Fset_buffer_major_mode): Signal an error
3135 if the buffer is dead.
3136 (Fother_buffer, other_buffer_safely): Remove redundant
3139 2012-08-28 Dmitry Antipov <dmantipov@yandex.ru>
3141 Always use set_buffer_if_live to restore original buffer at unwind.
3142 * buffer.h (record_unwind_current_buffer): New function.
3143 * bytecode.c, dispnew.c, editfns.c, fileio.c, fns.c, insdel.c:
3144 * keyboard.c, keymap.c, minibuf.c, print.c, process.c, textprop.c:
3145 * undo.c, window.c: Adjust users.
3146 * buffer.c (set_buffer_if_live): Fix comment.
3148 2012-08-28 Dmitry Antipov <dmantipov@yandex.ru>
3150 Fix usage of set_buffer_internal.
3151 * buffer.h (set_buffer_internal): Make it BUFFER_INLINE.
3152 * buffer.c (set_buffer_if_live): Use set_buffer_internal.
3153 * coding.c (decode_coding): Omit redundant test.
3154 * fileio.c (decide_coding_unwind): Likewise.
3155 * fns.c (secure_hash): Likewise.
3156 * insdel.c (modify_region): Likewise.
3157 * keyboard.c (command_loop_1): Likewise.
3158 * print.c (PRINTFINISH): Likewise.
3159 * xdisp.c (run_window_scroll_functions): Use set_buffer_internal.
3161 2012-08-27 Paul Eggert <eggert@cs.ucla.edu>
3163 * dispnew.c: Use bool for boolean.
3164 (frame_garbaged, display_completed, delayed_size_change)
3165 (fonts_changed_p, add_window_display_history)
3166 (add_frame_display_history, verify_row_hash)
3167 (adjust_glyph_matrix, clear_window_matrices, glyph_row_slice_p)
3168 (row_equal_p, realloc_glyph_pool)
3169 (allocate_matrices_for_frame_redisplay)
3170 (showing_window_margins_p)
3171 (adjust_frame_glyphs_for_frame_redisplay)
3172 (build_frame_matrix_from_leaf_window, make_current)
3173 (mirrored_line_dance, mirror_line_dance, update_frame)
3174 (update_window_tree, update_single_window)
3175 (check_current_matrix_flags, update_window, update_text_area)
3176 (update_window_line, set_window_update_flags, scrolling_window)
3177 (update_frame_1, scrolling, buffer_posn_from_coords)
3178 (do_pending_window_change, change_frame_size)
3179 (change_frame_size_1, sit_for):
3180 Use bool for boolean.
3181 (clear_glyph_matrix_rows): Rename from enable_glyph_matrix_rows,
3182 and remove last int (actually boolean) argument, which was always 0.
3183 All callers changed.
3184 * dispextern.h, frame.h, lisp.h: Reflect above API changes.
3185 * dispextern.h (struct composition_it): Use bool for boolean.
3186 (struct glyph_matrix): Don't assume buffer sizes can fit in 'int'.
3187 (struct bidi_it): Use unsigned:1, not int, for boolean prev_was_pdf.
3188 * dired.c (file_name_completion):
3189 Use bool for boolean. (This was missed in an earlier change.)
3191 2012-08-27 Martin Rudalics <rudalics@gmx.at>
3193 * window.c (Fset_window_configuration): Revert first part of
3196 2012-08-27 Jan Djärv <jan.h.d@swipnet.se>
3198 * nsterm.h (NSPanel): New class variable dialog_return.
3200 * nsmenu.m (initWithContentRect:styleMask:backing:defer:):
3201 Initialize dialog_return.
3202 (windowShouldClose:): Use stop instead of stopModalWithCode.
3203 (clicked:): Ditto, and also set dialog_return (Bug#12258).
3204 (timeout_handler:): Use stop instead of abortModal. Send a dummy
3206 (runDialogAt:): Make ret Lisp_Object. Set it from dialog_return when
3209 2012-08-27 Paul Eggert <eggert@cs.ucla.edu>
3211 * composite.c, data.c, dbusbind.c, dired.c: Use bool for booleans.
3212 * composite.c (find_composition, composition_gstring_p)
3213 (composition_reseat_it, find_automatic_composition):
3214 * data.c (let_shadows_buffer_binding_p)
3215 (let_shadows_global_binding_p, set_internal, make_blv)
3216 (Fmake_variable_buffer_local, Fmake_local_variable)
3217 (Fmake_variable_frame_local, arithcompare, cons_to_unsigned)
3218 (cons_to_signed, arith_driver):
3219 * dbusbind.c (xd_in_read_queued_messages):
3220 * dired.c (directory_files_internal, file_name_completion):
3221 Use bool for booleans.
3222 * dired.c (file_name_completion):
3223 * process.h (fd_callback):
3224 Omit int (actually boolean) argument. It wasn't being used.
3226 * composite.h, lisp.h: Reflect above API changes.
3228 * cmds.c, coding.c: Use bool for booleans.
3229 * cmds.c (move_point, Fself_insert_command):
3230 * coding.h (struct composition status, struct coding_system):
3231 * coding.c (detect_coding_utf_8, encode_coding_utf_8)
3232 (detect_coding_utf_16, encode_coding_utf_16, detect_coding_emacs_mule)
3233 (emacs_mule_char, decode_coding_emacs_mule)
3234 (encode_coding_emacs_mule, detect_coding_iso_2022)
3235 (decode_coding_iso_2022, encode_invocation_designation)
3236 (encode_designation_at_bol, encode_coding_iso_2022)
3237 (detect_coding_sjis, detect_coding_big5, decode_coding_sjis)
3238 (decode_coding_big5, encode_coding_sjis, encode_coding_big5)
3239 (detect_coding_ccl, encode_coding_ccl, decode_coding_raw_text)
3240 (encode_coding_raw_text, detect_coding_charset)
3241 (decode_coding_charset, encode_coding_charset, detect_eol)
3242 (detect_coding, get_translation_table, produce_chars)
3243 (consume_chars, reused_workbuf_in_use)
3244 (make_conversion_work_buffer, code_conversion_save)
3245 (decode_coding_object, encode_coding_object)
3246 (detect_coding_system, char_encodable_p)
3247 (Funencodable_char_position, code_convert_region)
3248 (code_convert_string, code_convert_string_norecord)
3249 (Fset_coding_system_priority):
3250 * fileio.c (Finsert_file_contents):
3251 Use bool for booleans.
3252 * coding.h, lisp.h: Reflect above API changes.
3253 * coding.c: Remove unnecessary static function decls.
3254 (detect_coding): Use unsigned, not signed, to copy an unsigned field.
3255 (decode_coding, encode_coding, decode_coding_gap): Return 'void',
3256 not a boolean 'int', since callers never look at the return value.
3257 (ALLOC_CONVERSION_WORK_AREA): Assume caller returns 'void', not 'int'.
3258 * coding.h (decoding_buffer_size, encoding_buffer_size)
3259 (emacs_mule_string_char): Remove unused extern decls.
3260 (struct iso_2022_spec, struct coding_system):
3261 Use 'unsigned int : 1' for boolean fields, since there's more than one.
3262 (struct emacs_mule_spec): Remove unused field 'full_support'.
3263 All initializations removed.
3264 * cmds.c (internal_self_insert): Don't assume EMACS_INT fits in 'int'.
3266 2012-08-27 Dmitry Antipov <dmantipov@yandex.ru>
3268 Fix spare memory change (Bug#12286).
3269 * alloc.c (mark_maybe_pointer): Handle MEM_TYPE_SPARE.
3270 (valid_lisp_object_p): Likewise.
3272 2012-08-27 Martin Rudalics <rudalics@gmx.at>
3274 * window.c (Fset_window_configuration): Record any window's old
3275 buffer if it's replaced (see Bug#8789). If the new current
3276 buffer doesn't appear in the selected window, go to its old
3279 2012-08-27 Dmitry Antipov <dmantipov@yandex.ru>
3281 Special MEM_TYPE_SPARE to denote reserved memory.
3282 * alloc.c (enum mem_type): New memory type.
3283 (refill_memory_reserve): Use new type for spare memory.
3284 This prevents live_cons_p and live_string_p from incorrect
3285 detection of uninitialized objects from spare memory as live.
3287 2012-08-26 Paul Eggert <eggert@cs.ucla.edu>
3290 * Makefile.in (.PHONY): versioclean -> versionclean.
3292 Remove unused external symbols.
3293 * data.c (Qcons, Qfloat, Qmisc, Qstring, Qvector):
3294 * window.c (Qwindow_valid_p, decode_valid_window):
3295 Now static, not extern.
3296 * data.c (Qinterval): Remove; unused.
3297 (syms_of_data): Do not define 'interval'.
3298 * lisp.h (Qinteger, Qstring, Qmisc, Qvector, Qfloat, Qcons):
3299 * window.h (decode_valid_window):
3302 * character.c, charset.c, chartab.c: Use bool for booleans.
3303 * character.c (lisp_string_width, string_count_byte8)
3304 (string_escape_byte8):
3305 * charset.c (charset_map_loaded, load_charset_map, read_hex):
3306 (load_charset_map_from_file, map_charset_chars)
3307 (Fdefine_charset_internal, define_charset_internal)
3308 (Fdeclare_equiv_charset, find_charsets_in_text)
3309 (Ffind_charset_region, char_charset, Fiso_charset):
3310 * chartab.c (sub_char_table_ref, sub_char_table_ref_and_range)
3311 (sub_char_table_set, sub_char_table_set_range)
3312 (char_table_set_range, optimize_sub_char_table)
3313 (map_sub_char_table):
3314 Use bool for boolean.
3315 * character.c (str_to_unibyte): Omit last boolean argument; it was
3316 always 0. All callers changed.
3317 * character.h, charset.h: Adjust to match previous changes.
3318 * character.h (char_printable_p): Remove decl of nonexistent function.
3319 * charset.h (struct charset): Members code_linear_p, iso_chars_96,
3320 ascii_compatible_p, supplementary_p, compact_codes_p, unified_p
3321 are all boolean, so make them single-bit bitfields.
3323 * lisp.h (ASET): Remove attempt to detect side effects.
3324 It was meant to be temporary and it often doesn't work,
3325 because when IDX has side effects the behavior of IDX==IDX
3326 is undefined. See Stefan Monnier in
3327 <http://lists.gnu.org/archive/html/emacs-devel/2012-08/msg00762.html>.
3329 2012-08-26 Barry OReilly <gundaetiapo@gmail.com> (tiny change)
3331 * lisp.h (functionp): New function (extracted from Ffunctionp).
3332 (FUNCTIONP): Use it.
3333 * eval.c (Ffunctionp): Use it.
3335 2012-08-25 Paul Eggert <eggert@cs.ucla.edu>
3337 * xgselect.c (xg_select): Use auto storage for the GPollFD buffer
3338 as that's faster and simpler than static storage. Don't bother
3339 with the g_main_context_query overhead if g_main_context_pending
3340 says no events are pending.
3341 (gfds, gfds_size): Remove these static vars.
3342 (xgselect_initialize): Remove; no longer needed.
3343 All uses and decls removed.
3345 * emacs.c (fatal_error_signal_hook): Remove.
3346 All uses removed. This leftover from old code was always 0.
3348 * casefiddle.c, casetab.c, category.c: Use bool for boolean.
3349 * casefiddle.c (casify_object, casify_region):
3350 * casetab.c (set_case_table):
3351 * category.c, category.h (word_boundary_p):
3352 * category.h (CHAR_HAS_CATEGORY):
3353 Use bool for booleans, instead of int.
3355 2012-08-25 Eli Zaretskii <eliz@gnu.org>
3357 * makefile.w32-in ($(BLD)/alloc.$(O)): Depend on $(GNU_LIB)/execinfo.h.
3359 2012-08-25 Paul Eggert <eggert@cs.ucla.edu>
3361 On assertion failure, print backtrace if available.
3362 * alloc.c [ENABLE_CHECKING]: Include <execinfo.h>.
3363 (die) [ENABLE_CHECKING]: Print a backtrace if available.
3364 * Makefile.in (LIB_EXECINFO): New macro.
3367 * bytecode.c, callint.c, callproc.c: Use bool for boolean.
3368 * bytecode.c (exec_byte_code):
3369 * callint.c (check_mark, Fcall_interactively):
3370 * callproc.c (Fcall_process, add_env, child_setup, getenv_internal_1)
3371 (getenv_internal, sync_process_alive, call_process_exited):
3372 * lisp.h (USE_SAFE_ALLOCA):
3373 Use bool for booleans, instead of int.
3374 * lisp.h, process.h: Adjust prototypes to match above changes.
3375 * callint.c (Fcall_interactively): Don't assume the mark's
3376 offset fits in 'int'.
3378 2012-08-24 Paul Eggert <eggert@cs.ucla.edu>
3380 * buffer.c, buffer.h: Use bool for boolean.
3381 * buffer.c (reset_buffer_local_variables)
3382 (buffer_lisp_local_variables, Fset_buffer_modified_p)
3383 (Frestore_buffer_modified_p, Fset_buffer_multibyte):
3384 (overlays_at, overlays_in, mouse_face_overlay_overlaps)
3385 (overlay_touches_p, overlay_strings, Foverlay_put)
3386 (report_overlay_modification, call_overlay_mod_hooks):
3387 (mmap_enlarge, mmap_set_vars):
3388 * buffer.h (buffer_has_overlays, uppercasep, lowercasep):
3389 Use bool for booleans, instead of int.
3390 * buffer.c (compact_buffer, mmap_free_1): Return void, not int,
3391 since the 1-or-0 return value is always ignored anyway.
3392 (mmap_initialized_p):
3393 * buffer.h (struct buffer_text.inhibit_shrinking): Now bool, not int.
3394 * buffer.h, lisp.h: Adjust prototypes to match above changes.
3396 2012-08-23 Paul Eggert <eggert@cs.ucla.edu>
3398 * bidi.c: Use bool for boolean.
3399 This is a bit more readable, and makes the text segment of bidi.o
3400 0.4% smaller on my platform (GCC 4.7.1 x86-64, Fedora 15).
3401 Presumably it's faster too.
3402 (bidi_initialized, bidi_ignore_explicit_marks_for_paragraph_level):
3404 (bidi_cache_find_level_change, bidi_cache_iterator_state)
3405 (bidi_unshelve_cache, bidi_init_it, bidi_count_bytes)
3406 (bidi_char_at_pos, bidi_fetch_char, bidi_paragraph_init)
3407 (bidi_explicit_dir_char, bidi_level_of_next_char)
3408 (bidi_find_other_level_edge, bidi_move_to_visually_next):
3409 Use bool for booleans, instead of int.
3410 * dispextern.h (bidi_init_it, bidi_paragraph_init)
3411 (bidi_unshelve_cache): Adjust decls to match code.
3413 2012-08-23 Martin Rudalics <rudalics@gmx.at>
3415 * keyboard.c (Fposn_at_x_y): Do not allow internal window as
3418 2012-08-23 Paul Eggert <eggert@cs.ucla.edu>
3420 * atimer.c, atimer.h (turn_on_atimers): Use bool for boolean.
3421 * atimer.h: Include <stdbool.h>.
3423 2012-08-22 Dan Nicolaescu <dann@gnu.org>
3425 * frame.h (FRAME_W32_P, FRAME_MSDOS_P, FRAME_NS_P): Change to
3426 compile time tests instead of run time tests on systems that do
3428 (FRAME_MAC_P): Remove leftover from deleted code.
3429 * frame.c (syms_of_frame): Remove leftover from deleted code.
3431 2012-08-22 Jan Djärv <jan.h.d@swipnet.se>
3433 * nsterm.m (insertText:): Don't clear modifiers if code is space.
3435 2012-08-22 Paul Eggert <eggert@cs.ucla.edu>
3437 * fontset.c (FONTSET_ADD): Return void, not Lisp_Object.
3438 Otherwise, the compiler complains about (A?B:C) where B is void
3439 and C is Lisp_Object. This fixes an incompatibility with Sun C 5.12.
3440 (fontset_add): Return void, for FONTSET_ADD.
3442 2012-08-21 Paul Eggert <eggert@cs.ucla.edu>
3444 * alloc.c: Use bool for booleans.
3445 (gc_in_progress, abort_on_gc)
3446 (setjmp_tested_p) [!GC_SAVE_REGISTERS_ON_STACK && !GC_SETJMP_WORKS]:
3447 (dont_register_blocks) [GC_MALLOC_CHECK]:
3448 (suppress_checking) [ENABLE_CHECKING]: Now bool, not int.
3449 (check_string_bytes, make_specified_string, memory_full)
3450 (live_string_p, live_cons_p, live_symbol_p, live_float_p)
3451 (live_misc_p, live_vector_p, live_buffer_p, mark_maybe_object)
3452 (mark_stack, valid_pointer_p, make_pure_string)
3453 (Fgarbage_collect, survives_gc_p, gc_sweep):
3454 Use bool for booleans, instead of int.
3455 (test_setjmp) [!GC_SAVE_REGISTERS_ON_STACK && !GC_SETJMP_WORKS]:
3456 Remove unused local.
3457 * alloc.c (PURE_POINTER_P):
3458 * lisp.h (STRING_MULTIBYTE): Document that it returns a boolean.
3459 * editfns.c (Fformat):
3460 * fileio.c (Fexpand_file_name, Fsubstitute_in_file_name)
3462 * fns.c (sweep_weak_table):
3463 * lisp.h (suppress_checking, push_message, survives_gc_p)
3464 (make_pure_string, gc_in_progress, abort_on_gc):
3465 * lread.c (readchar, read1):
3466 * print.c (Fprin1_to_string):
3467 * xdisp.c (push_message):
3468 Use bool for booleans affected directly or indirectly by
3471 Make recently-introduced setters macros.
3472 * fontset.c (set_fontset_id, set_fontset_name, set_fontset_ascii)
3473 (set_fontset_base, set_fontset_frame, set_fontset_nofont_face)
3474 (set_fontset_default, set_fontset_fallback): Rename from their
3475 upper-case counterparts, and make them functions rather than macros.
3476 This is more consistent with the other recently-introduced setters.
3477 These don't need to be inline, since they're local.
3479 2012-08-21 Jan Djärv <jan.h.d@swipnet.se>
3481 * nsterm.m (fd_handler:): Alloc and release a NSAutoreleasePool in
3482 the loop (Bug#12247).
3484 2012-08-21 Paul Eggert <eggert@cs.ucla.edu>
3486 * lisp.h (vcopy): Use memcpy rather than our own loop.
3487 This fixes a performance regression introduced by the recent
3488 addition of vcopy. This means 'vcopy' will need to be modified
3489 for a copying collector, but that's OK. Also, tighten the
3490 checking in the assertion.
3492 2012-08-21 Eli Zaretskii <eliz@gnu.org>
3494 * w32uniscribe.c (uniscribe_shape): Fix producing gstring
3495 components for RTL text (Bug#11860). Adjust X-OFFSET of each
3496 non-base glyph for the width of the base character, according to
3497 what x_draw_composite_glyph_string_foreground expects.
3498 Generate WADJUST value according to composition_gstring_width's
3499 expectations, to produce correct width of the composed character.
3500 Reverse the sign of the DU offset produced by ScriptPlace.
3502 2012-08-21 Paul Eggert <eggert@cs.ucla.edu>
3504 * dbusbind.c (xd_remove_watch): Do not assume C99 comments.
3506 2012-08-21 Dmitry Antipov <dmantipov@yandex.ru>
3508 Avoid direct writes to contents member of struct Lisp_Vector.
3509 * lisp.h (vcopy): New function to copy data into vector.
3510 * dispnew.c (Fframe_or_buffer_changed_p): Use AREF and ASET.
3511 * fns.c (Ffillarray): Use ASET.
3512 * keyboard.c (timer_check_2): Use AREF and ASET.
3513 (append_tool_bar_item, Frecent_keys): Use vcopy.
3514 * lread.c (read_vector): Use ASET.
3515 * msdos.c (Frecent_doskeys): Use vcopy.
3516 * xface.c (Finternal_copy_lisp_face): Use vcopy.
3517 (Finternal_merge_in_global_face): Use ASET and vcopy.
3518 * xfont.c (xfont_list_pattern): Likewise.
3520 2012-08-21 Martin Rudalics <rudalics@gmx.at>
3522 * window.c (Fwindow_point): For the selected window always return
3523 the position of its buffer's point.
3524 (Fset_window_point): For the selected window always go in its
3525 buffer to the specified position.
3527 2012-08-21 Dmitry Antipov <dmantipov@yandex.ru>
3529 Setter macros for fontsets.
3530 * fontset.c (SET_FONTSET_ID, SET_FONTSET_NAME, SET_FONTSET_ASCII)
3531 (SET_FONTSET_BASE, SET_FONTSET_FRAME, SET_FONTSET_NOFONT_FACE)
3532 (SET_FONTSET_DEFAULT, SET_FONTSET_FALLBACK): New macros.
3535 2012-08-20 Glenn Morris <rgm@gnu.org>
3537 * Makefile.in (emacs$(EXEEXT), bootstrap-emacs$(EXEEXT)):
3538 Don't assume that `ln -f' works.
3540 2012-08-20 Eli Zaretskii <eliz@gnu.org>
3542 * .gdbinit: Use "set $dummy = ..." to avoid warnings from GDB 7.5
3543 and later about non-assignments with no effect. See discussion at
3544 http://sourceware.org/ml/gdb-patches/2012-08/msg00518.html for
3547 2012-08-20 Dmitry Antipov <dmantipov@yandex.ru>
3549 Inline setter functions for Lisp_Objects slots of struct specbinding.
3550 * eval.c (set_specpdl_symbol, set_specpdl_old_value): New functions.
3553 2012-08-20 Martin Rudalics <rudalics@gmx.at>
3555 * window.c (select_window): Always make selected window's buffer
3558 2012-08-20 Dmitry Antipov <dmantipov@yandex.ru>
3560 Use AREF and ASET for docstrings of category tables.
3561 * category.h (CATEGORY_DOCSTRING): Use AREF.
3562 (SET_CATEGORY_DOCSTRING): Use ASET.
3563 * category.c (Fdefine_category): Use SET_CATEGORY_DOCSTRING.
3565 2012-08-20 Dmitry Antipov <dmantipov@yandex.ru>
3567 Inline setter functions for hash table members.
3568 * lisp.h (set_hash_key, set_hash_value, set_hash_next)
3569 (set_hash_hash, set_hash_index): Rename with _slot suffix.
3570 (set_hash_key_and_value, set_hash_index, set_hash_next)
3571 (set_hash_hash): New functions.
3572 * charset.c, fns.c: Adjust users.
3574 2012-08-20 Dmitry Antipov <dmantipov@yandex.ru>
3576 Inline getter and setter functions for per-buffer values.
3577 * buffer.h (per_buffer_default, set_per_buffer_default)
3578 (per_buffer_value, set_per_buffer_value): New functions.
3579 (PER_BUFFER_VALUE, PER_BUFFER_DEFAULT): Remove.
3580 * buffer.c, data.c: Adjust users.
3582 2012-08-20 Juanma Barranquero <lekktu@gmail.com>
3584 * makefile.w32-in ($(BLD)/vm-limit.$(O)): Update dependencies.
3586 2012-08-19 Paul Eggert <eggert@cs.ucla.edu>
3588 Rely on <config.h> + <unistd.h> to declare 'environ',
3589 as gnulib does this if the system doesn't.
3590 * callproc.c, editfns.c, process.c (environ) [!USE_CRT_DLL]:
3591 Remove declaration. MS-Windows declares it on stdlib.h which is
3592 included by conf_post.h.
3593 * emacs.c (environ) [DOUG_LEA_MALLOC]:
3594 * vm-limit.c (environ) [ORDINARY_LINK]: Remove decl.
3595 * vm-limit.c: Include <unistd.h>, for 'environ'.
3597 * unexaix.c, unexcoff.c: Include "mem-limits.h".
3598 (start_of_data): Remove decl; mem-limits.h provides it.
3600 * xdisp.c (handle_invisible_prop): Make it a bit faster
3601 and avoid a gcc -Wmaybe-uninitialized diagnostic.
3603 2012-08-19 Chong Yidong <cyd@gnu.org>
3605 * xdisp.c (handle_invisible_prop): Fix ellipses at overlay string
3608 2012-08-19 Andreas Schwab <schwab@linux-m68k.org>
3610 * .gdbinit: Use call instead of set when calling a function in the
3613 * data.c (set_internal): Don't use set_blv_found.
3614 (Fkill_local_variable): Likewise.
3616 2012-08-18 Alp Aker <alp.tekin.aker@gmail.com>
3618 * nsfont.m (ns_ascii_average_width): Ensure the string
3619 ascii_printable is initialized with a null-terminated character
3620 array. Otherwise, it can contain undesired extra characters.
3622 2012-08-18 Paul Eggert <eggert@cs.ucla.edu>
3624 port new setting code to Sun C 5.8 2005/10/13
3625 * chartab.c, lisp.h (char_table_set, char_table_set_range):
3626 Return void, not Lisp_Object. Otherwise, the compiler
3627 complains about (A?B:C) where B is void and C is Lisp_Object
3628 when compiling CHAR_TABLE_SET, due to the recent change to
3629 the API of sub_char_table_set_contents.
3631 2012-08-18 Chong Yidong <cyd@gnu.org>
3633 * xdisp.c (handle_invisible_prop): Obey TEXT_PROP_MEANS_INVISIBLE
3634 for the string case (Bug#3874).
3636 2012-08-18 Paul Eggert <eggert@cs.ucla.edu>
3638 * buffer.h (BSET): Remove (Bug#12215).
3639 Replace all uses with calls to new setter functions.
3640 (bset_bidi_paragraph_direction, bset_case_canon_table)
3641 (bset_case_eqv_table, bset_directory, bset_display_count)
3642 (bset_display_time, bset_downcase_table)
3643 (bset_enable_multibyte_characters, bset_filename, bset_keymap)
3644 (bset_last_selected_window, bset_local_var_alist)
3645 (bset_mark_active, bset_point_before_scroll, bset_read_only)
3646 (bset_truncate_lines, bset_undo_list, bset_upcase_table)
3648 * buffer.c (bset_abbrev_mode, bset_abbrev_table)
3649 (bset_auto_fill_function, bset_auto_save_file_format)
3650 (bset_auto_save_file_name, bset_backed_up, bset_begv_marker)
3651 (bset_bidi_display_reordering, bset_buffer_file_coding_system)
3652 (bset_cache_long_line_scans, bset_case_fold_search)
3653 (bset_ctl_arrow, bset_cursor_in_non_selected_windows)
3654 (bset_cursor_type, bset_display_table, bset_extra_line_spacing)
3655 (bset_file_format, bset_file_truename, bset_fringe_cursor_alist)
3656 (bset_fringe_indicator_alist, bset_fringes_outside_margins)
3657 (bset_header_line_format, bset_indicate_buffer_boundaries)
3658 (bset_indicate_empty_lines, bset_invisibility_spec)
3659 (bset_left_fringe_width, bset_major_mode, bset_mark)
3660 (bset_minor_modes, bset_mode_line_format, bset_mode_name)
3661 (bset_name, bset_overwrite_mode, bset_pt_marker)
3662 (bset_right_fringe_width, bset_save_length)
3663 (bset_scroll_bar_width, bset_scroll_down_aggressively)
3664 (bset_scroll_up_aggressively, bset_selective_display)
3665 (bset_selective_display_ellipses, bset_vertical_scroll_bar_type)
3666 (bset_word_wrap, bset_zv_marker):
3667 * category.c (bset_category_table):
3668 * syntax.c (bset_syntax_table):
3669 New setter functions.
3671 * process.h (PSET): Remove (Bug#12215).
3672 Replace all uses with calls to new setter functions.
3673 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
3674 (PROCESS_INLINE): New macro.
3675 (pset_childp): New setter function.
3676 (pset_gnutls_cred_type) [HAVE_GNUTLS]: New setter function.
3677 * process.c (PROCESS_INLINE):
3678 Define to EXTERN_INLINE, so that the corresponding functions
3679 are compiled into code.
3680 (pset_buffer, pset_command, pset_decode_coding_system)
3681 (pset_decoding_buf, pset_encode_coding_system)
3682 (pset_encoding_buf, pset_filter, pset_log, pset_mark, pset_name)
3683 (pset_plist, pset_sentinel, pset_status, pset_tty_name)
3684 (pset_type, pset_write_queue): New setter functions.
3686 * window.h (WSET): Remove (Bug#12215).
3687 Replace all uses with calls to new setter functions.
3688 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
3689 (WINDOW_INLINE): New macro.
3690 (wset_buffer, wset_frame, wset_left_col, wset_next, wset_prev)
3691 (wset_redisplay_end_trigger, wset_top_line, wset_total_cols)
3692 (wset_total_lines, wset_vertical_scroll_bar)
3693 (wset_window_end_pos, wset_window_end_valid)
3694 (wset_window_end_vpos): New setter functions.
3695 * window.c (WINDOW_INLINE):
3696 Define to EXTERN_INLINE, so that the corresponding functions
3697 are compiled into code.
3698 (wset_combination_limit, wset_dedicated, wset_display_table)
3699 (wset_hchild, wset_left_fringe_width, wset_left_margin_cols)
3700 (wset_new_normal, wset_new_total, wset_next_buffers)
3701 (wset_normal_cols, wset_normal_lines, wset_parent, wset_pointm)
3702 (wset_prev_buffers, wset_right_fringe_width)
3703 (wset_right_margin_cols, wset_scroll_bar_width, wset_start)
3704 (wset_temslot, wset_vchild, wset_vertical_scroll_bar_type)
3705 (wset_window_parameters):
3706 * xdisp.c (wset_base_line_number, wset_base_line_pos)
3707 (wset_column_number_displayed, wset_region_showing):
3708 New setter functions.
3710 * termhooks.h (TSET): Remove (Bug#12215).
3711 Replace all uses with calls to new setter functions.
3712 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
3713 (TERMHOOKS_INLINE): New macro.
3714 (tset_charset_list, tset_selection_alist): New setter functions.
3715 * terminal.c (TERMHOOKS_INLINE):
3716 Define to EXTERN_INLINE, so that the corresponding functions
3717 are compiled into code.
3718 (tset_param_alist): New setter function.
3720 2012-08-17 Paul Eggert <eggert@cs.ucla.edu>
3722 * keyboard.h (KSET): Remove (Bug#12215).
3723 Replace all uses with calls to new setter functions.
3724 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
3725 (KEYBOARD_INLINE): New macro.
3726 (kset_default_minibuffer_frame, kset_defining_kbd_macro)
3727 (kset_input_decode_map, kset_last_command, kset_last_kbd_macro)
3728 (kset_prefix_arg, kset_system_key_alist, kset_window_system):
3729 New setter functions.
3730 * keyboard.c (KEYBOARD_INLINE):
3731 Define to EXTERN_INLINE, so that the corresponding functions
3732 are compiled into code.
3733 (kset_echo_string, kset_kbd_queue)
3734 (kset_keyboard_translate_table, kset_last_prefix_arg)
3735 (kset_last_repeatable_command, kset_local_function_key_map)
3736 (kset_overriding_terminal_local_map, kset_real_last_command)
3737 (kset_system_key_syms): New setter functions.
3739 * frame.h (FSET): Remove (Bug#12215).
3740 Replace all uses with calls to new setter functions.
3741 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
3742 (FRAME_INLINE): New macro.
3743 (fset_buffer_list, fset_buried_buffer_list, fset_condemned_scroll_bars)
3744 (fset_current_tool_bar_string, fset_desired_tool_bar_string)
3745 (fset_face_alist, fset_focus_frame, fset_icon_name, fset_menu_bar_items)
3746 (fset_menu_bar_vector, fset_menu_bar_window, fset_name)
3747 (fset_param_alist, fset_root_window, fset_scroll_bars)
3748 (fset_selected_window, fset_title, fset_tool_bar_items)
3749 (fset_tool_bar_position, fset_tool_bar_window): New functions.
3750 * frame.c (FRAME_INLINE):
3751 Define to EXTERN_INLINE, so that the corresponding functions
3752 are compiled into code.
3753 (fset_buffer_predicate, fset_minibuffer_window): New setter functions.
3755 A few more naming-convention fixes for getters and setters.
3756 * buffer.c (set_buffer_overlays_before): Move here from buffer.h,
3757 and rename from buffer_overlays_set_before.
3758 (set_buffer_overlays_after): Move here from buffer.h, and rename
3759 from buffer_overlays_set_after.
3760 * buffer.h (buffer_intervals): Rename from buffer_get_intervals.
3762 (set_buffer_intervals): Rename from buffer_set_intervals.
3763 * intervals.c (set_interval_object): Move here from intervals.h,
3764 and rename from interval_set_object.
3765 (set_interval_left): Move here from intervals.h, and rename from
3767 (set_interval_right): Move here from intervals.h, and rename from
3769 (copy_interval_parent): Move here from intervals.h, and rename from
3770 interval_copy_parent.
3771 * intervals.h (set_interval_parent): Rename from interval_set_parent.
3772 (set_interval_plist): Rename from interval_set_plist.
3773 Return void, not Lisp_Object, since no caller uses the result.
3774 * lisp.h (string_intervals): Rename from string_get_intervals.
3775 (set_string_intervals): Rename from string_set_intervals.
3777 * lisp.h (set_char_table_extras): Rename from char_table_set_extras.
3778 (set_char_table_contents): Rename from char_table_set_contents.
3779 (set_sub_char_table_contents): Rename from sub_char_table_set_contents.
3780 All uses changed. See the end of
3781 <http://lists.gnu.org/archive/html/emacs-devel/2012-08/msg00549.html>.
3783 * lisp.h (CSET): Remove (Bug#12215).
3784 (set_char_table_ascii, set_char_table_defalt, set_char_table_parent)
3785 (set_char_table_purpose): New functions,
3786 replacing CSET. All uses changed. For example, replace
3787 "CSET (XCHAR_TABLE (char_table), parent, parent);" with
3788 "set_char_table_parent (char_table, parent);".
3789 The old version was confusing because it used the same name
3790 'parent' for two different things.
3792 2012-08-17 Dmitry Antipov <dmantipov@yandex.ru>
3794 Functions to get and set Lisp_Object fields of buffer-local variables.
3795 * lisp.h (blv_found, set_blv_found, blv_value, set_blv_value)
3796 (set_blv_where, set_blv_defcell, set_blv_valcell): New functions.
3797 (BLV_FOUND, SET_BLV_FOUND, BLV_VALUE, SET_BLV_VALUE): Remove.
3798 * data.c, eval.c, frame.c: Adjust users.
3800 2012-08-17 Chong Yidong <cyd@gnu.org>
3802 * xfaces.c (merge_face_vectors): If the target font specfies a
3803 font spec, make the font's attributes take precedence over
3804 directly-specified attributes.
3805 (merge_face_ref): Recognize :font.
3807 2012-08-17 Dmitry Antipov <dmantipov@yandex.ru>
3809 Do not use memcpy for copying intervals.
3810 * intervals.c (reproduce_interval): New function.
3811 (reproduce_tree, reproduce_tree_obj): Use it.
3812 (reproduce_tree_obj): Remove prototype.
3814 2012-08-17 Paul Eggert <eggert@cs.ucla.edu>
3816 * lisp.h (duration_to_sec_usec): Remove unused decl.
3818 2012-08-17 Alp Aker <alp.tekin.aker@gmail.com>
3820 * nsfont.m (ns_ascii_average_width): Send initWithFormat selector
3821 to an allocated instance of NSString, not to the class itself.
3823 2012-08-17 Juanma Barranquero <lekktu@gmail.com>
3825 * makefile.w32-in (C_CTYPE_H): New macro.
3826 (LISP_H, $(BLD)/ccl.$(O), $(BLD)/doc.$(O), $(BLD)/w32console.$(O)):
3827 ($(BLD)/fontset.$(O), $(BLD)/frame.$(O), $(BLD)/composite.$(O)):
3828 ($(BLD)/sysdep.$(O), $(BLD)/w32uniscribe.$(O)): Update dependencies.
3830 2012-08-16 Paul Eggert <eggert@cs.ucla.edu>
3832 Use ASCII tests for character types.
3833 * category.c, dispnew.c, doprnt.c, editfns.c, syntax.c, term.c:
3835 Don't include <ctype.h>; was not needed.
3836 * charset.c, doc.c, fileio.c, font.c, frame.c, gtkutil.c, image.c:
3837 * sysdep.c, xfaces.c:
3838 Include <c-ctype.h> instead of <ctype.h>.
3839 * nsterm.m: Include <c-ctype.h>.
3840 * charset.c (read_hex):
3841 * doc.c (Fsnarf_documentation):
3842 * fileio.c (IS_DRIVE) [WINDOWSNT]:
3843 (DRIVE_LETTER) [DOS_NT]:
3844 (Ffile_name_directory, Fexpand_file_name)
3845 (Fsubstitute_in_file_name):
3846 * font.c (font_parse_xlfd, font_parse_fcname):
3847 * frame.c (x_set_font_backend):
3848 * gtkutil.c (xg_get_font):
3849 * image.c (xbm_scan, xpm_scan, pbm_scan_number):
3850 * nsimage.m (hexchar):
3851 * nsterm.m (ns_xlfd_to_fontname):
3852 * sysdep.c (system_process_attributes):
3853 * xfaces.c (hash_string_case_insensitive):
3854 Use C-locale tests instead of locale-specific tests for character
3855 types, since we want the ASCII interpretation here, not the
3856 interpretation suitable for whatever happens to be the current locale.
3858 2012-08-16 Martin Rudalics <rudalics@gmx.at>
3860 Consistently check windows for validity/liveness
3861 (Bug#11984, Bug#12025, Bug#12026).
3862 * lisp.h (CHECK_VALID_WINDOW): New macro.
3863 * window.c (decode_window): Rename to decode_live_window.
3864 (decode_valid_window, Fwindow_valid_p): New functions.
3865 (Fwindow_frame, Fframe_root_window, Fwindow_minibuffer_p)
3866 (Fframe_first_window, Fframe_selected_window, Fwindow_parent)
3867 (Fwindow_top_child, Fwindow_left_child, Fwindow_next_sibling)
3868 (Fwindow_prev_sibling, Fwindow_combination_limit)
3869 (Fset_window_combination_limit, Fwindow_use_time)
3870 (Fwindow_total_height, Fwindow_total_width, Fwindow_new_total)
3871 (Fwindow_normal_size, Fwindow_new_normal, Fwindow_left_column)
3872 (Fwindow_top_line, Fwindow_body_height, Fwindow_body_width)
3873 (Fwindow_hscroll, Fset_window_hscroll)
3874 (Fwindow_redisplay_end_trigger)
3875 (Fset_window_redisplay_end_trigger, Fwindow_edges)
3876 (Fwindow_pixel_edges, Fwindow_absolute_pixel_edges)
3877 (Fwindow_inside_edges, Fwindow_inside_pixel_edges)
3878 (Fcoordinates_in_window_p, Fwindow_point, Fwindow_start)
3879 (Fwindow_end, Fset_window_point, Fset_window_start)
3880 (Fpos_visible_in_window_p, Fwindow_line_height)
3881 (Fwindow_dedicated_p, Fset_window_dedicated_p)
3882 (Fwindow_prev_buffers, Fset_window_prev_buffers)
3883 (Fwindow_next_buffers, Fwindow_parameters, Fwindow_parameter)
3884 (Fset_window_parameter, Fwindow_display_table)
3885 (Fset_window_display_table, Fdelete_other_windows_internal)
3886 (Fset_window_buffer, Fset_window_new_total)
3887 (Fset_window_new_normal, Fdelete_window_internal)
3888 (Fwindow_text_height, Fset_window_margins, Fwindow_margins)
3889 (Fset_window_fringes, Fwindow_fringes, Fset_window_scroll_bars)
3890 (Fwindow_scroll_bars): Check whether argument window is a valid or
3891 live window. Update doc-strings.
3892 (syms_of_window): New symbol Qwindow_valid_p.
3893 * keyboard.c (Fposn_at_x_y): Check whether argument
3894 frame_or_window denotes a valid window.
3896 2012-08-16 Dmitry Antipov <dmantipov@yandex.ru>
3898 Fix previous char table change.
3899 * lisp.h (CHAR_TABLE_SET): Use sub_char_table_set_contents.
3900 * chartab.c (optimize_sub_char_table): Likewise.
3902 2012-08-16 Chong Yidong <cyd@gnu.org>
3904 * gtkutil.c (xg_get_font): Demand an Xft font (Bug#3228).
3906 * xfont.c (xfont_open):
3907 * xftfont.c (xftfont_open): Set the font's max_width field.
3909 * nsfont.m (nsfont_open): Similar to the Xft backend, set
3910 min_width to space_width and average_width to the average over
3911 printable ASCII characters.
3912 (ns_char_width): Code cleanup.
3913 (ns_ascii_average_width): New utility function.
3915 * font.h (struct font): Update comments.
3917 2012-08-16 Dmitry Antipov <dmantipov@yandex.ru>
3919 Simple interface to set Lisp_Object fields of character tables.
3920 * lisp.h (CSET): New macro.
3921 (char_table_set_extras, char_table_set_contents)
3922 (sub_char_table_set_contents): New function.
3923 * casetab.c, category.c, chartab.c, fns.c, fontset.c, search.c:
3924 * syntax.c: Adjust users.
3926 2012-08-16 Stefan Monnier <monnier@iro.umontreal.ca>
3928 * eval.c (eval_sub): Bind lexical-binding.
3929 * lread.c (Qlexical_binding): Make non-static.
3931 2012-08-15 Jan Djärv <jan.h.d@swipnet.se>
3933 * nsmenu.m (popupSession): Remove.
3934 (pop_down_menu): Remove endModalSession.
3935 (timeout_handler:): New method.
3936 (runDialogAt:): Get next timeout. Start a NSTimer with that timeout.
3937 Call runModalForWindow. Check timer_fired when it returns.
3938 If not set, cancel timer and break out of loop.
3939 Otherwise loop again, with a new timeout.
3941 * nsterm.m: Include fcntl.h if present.
3942 (fd_entry, t_readfds, inNsSelect): Remove.
3943 (select_writefds, select_valid, select_timeout, selfds)
3944 (select_mutex, apploopnr): Add.
3945 (EV_TRAILER): Call kbd_buffer_store_event_hold only if q_event_ptr.
3946 Otherwise call kbd_buffer_store_event.
3947 (ns_send_appdefined): Remove release of fd_entry.
3948 (ns_read_socket): Always send appdefined. Remove inNsSelect check.
3949 Increment and decrement apploopnr.
3950 (ns_select): If no file descriptors, just do a NSTimer.
3951 Otherwise copy read/write masks and start select thread (fd_handler).
3952 Start main loop and wait for application defined event.
3953 Inform select thread to stop selecting after main loop is exited.
3954 (ns_term_init): Create selfds pipe and set non-blocking.
3955 Initialize select_mutex. Start the select thread (fd_handler).
3956 (fd_handler:): Loop forever, wait for info from the main thread
3957 to either start or stop selecting. When select returns, send
3958 and appdefined event.
3959 (sendScrollEventAtLoc:fromEvent:): Check if q_event_ptr is set.
3960 If not call kbd_buffer_store_event.
3962 * nsterm.h (EmacsApp): fd_handler takes id argument.
3963 (EmacsDialogPanel): Add timer_fired and timeout_handler.
3965 * gtkutil.c (xg_mark_data): Use FRAME_X_P.
3967 2012-08-15 Eli Zaretskii <eliz@gnu.org>
3969 * region-cache.c (move_cache_gap): Update gap_len using the actual
3970 growth of the boundaries array. Do not change cache_len.
3973 2012-08-15 Dmitry Antipov <dmantipov@yandex.ru>
3975 Generalize and cleanup font subsystem checks.
3976 * font.h (FONT_DEBUG, font_assert): Remove.
3977 * font.c, fontset.c, w32font.c, xfont.c, xftfont.c:
3978 Change font_assert to eassert. Use eassert where appropriate.
3980 2012-08-15 Dmitry Antipov <dmantipov@yandex.ru>
3982 * gtkutil.c (xg_get_font): Use pango_units_to_double.
3984 2012-08-15 Chong Yidong <cyd@gnu.org>
3986 * gtkutil.c (xg_get_font): Rename from xg_get_font_name.
3987 When using the new font chooser, use gtk_font_chooser_get_font_desc to
3988 extract the font descriptor instead of just the font name.
3989 In that case, return a font spec instead of a string.
3990 (x_last_font_name): Move to this file from xfns.c.
3992 * xfns.c (Fx_select_font): The return value can also be a font
3993 spec. Move x_last_font_name management to gtkutil.c.
3995 * xfaces.c: Make font weight and style symbols non-static.
3997 2012-08-15 Stefan Monnier <monnier@iro.umontreal.ca>
3999 * minibuf.c (read_minibuf): Ignore caller's inhibit-read-only
4002 2012-08-14 Stefan Monnier <monnier@iro.umontreal.ca>
4004 * alloc.c (Fgarbage_collect): Use plural form consistently.
4006 2012-08-14 Eli Zaretskii <eliz@gnu.org>
4008 * keyboard.c (command_loop_1): Reset ignore_mouse_drag_p flag each
4009 iteration through the command loop. Fixes a problem whereby mouse
4010 movements are ignored until the first mouse click.
4012 2012-08-14 Paul Eggert <eggert@cs.ucla.edu>
4014 Use bool, not int, for Lisp booleans.
4015 This is more natural, and on my platform (GCC 4.7.1 x86-64) it
4016 makes Emacs a bit smaller and presumably a bit faster.
4017 * lisp.h: Include <stdbool.h>.
4018 (struct Lisp_Boolfwd, defvar_bool):
4019 * lread.c (defvar_bool): Use bool, not int, for Lisp booleans.
4020 * regex.c [!emacs]: Include <stdbool.h>.
4021 (false, true): Remove; <stdbool.h> does this for us now.
4023 2012-08-14 Chong Yidong <cyd@gnu.org>
4025 * character.c (Fcharacterp): Doc fix (Bug#12076).
4027 * data.c (Findirect_variable): Doc fix (Bug#11040).
4029 * chartab.c (Fmap_char_table): Doc fix (Bug#12061).
4031 * editfns.c (Fformat): Doc fix (Bug#12059).
4032 (Fsave_current_buffer): Doc fix (Bug#11542).
4034 2012-08-14 Barry OReilly <gundaetiapo@gmail.com> (tiny change)
4036 * keyboard.c (access_keymap_keyremap): Accept anonymous functions
4039 2012-08-14 Martin Rudalics <rudalics@gmx.at>
4041 * frame.c (make_frame_without_minibuffer, make_minibuffer_frame)
4042 (delete_frame, Fmake_frame_invisible, Ficonify_frame):
4043 * minibuf.c (choose_minibuf_frame, read_minibuf):
4044 * w32fns.c (x_create_tip_frame):
4045 * xfns.c (x_create_tip_frame): Call set_window_buffer instead of
4046 Fset_window_buffer (Bug#11984, Bug#12025, Bug#12026).
4048 2012-08-14 Paul Eggert <eggert@cs.ucla.edu>
4050 * intervals.c (offset_intervals): Remove obsolete comment.
4052 2012-08-14 Andreas Schwab <schwab@linux-m68k.org>
4054 * gtkutil.c (find_rtl_image, update_frame_tool_bar): Use NILP.
4056 2012-08-14 Gergely Risko <gergely@risko.hu>
4058 * coding.c (decode_coding): Record buffer modification before
4059 disabling undo_list (Bug#11773).
4061 2012-08-14 Dmitry Antipov <dmantipov@yandex.ru>
4063 Revert and cleanup some recent overlay changes.
4064 * buffer.h (enum overlay_type): Remove.
4065 (buffer_get_overlays, buffer_set_overlays): Likewise.
4066 (buffer_set_overlays_before, buffer_set_overlays_after):
4067 New function. Adjust users.
4068 (unchain_both): Add eassert.
4070 2012-08-14 Dmitry Antipov <dmantipov@yandex.ru>
4072 * gtkutil.c (update_frame_tool_bar): Use EQ where appropriate.
4074 2012-08-14 Paul Eggert <eggert@cs.ucla.edu>
4076 * gtkutil.c (xg_mark_data): Don't assume C99.
4078 2012-08-13 Jan Djärv <jan.h.d@swipnet.se>
4080 * gtkutil.c (xg_frame_tb_info): New struct.
4081 (TB_INFO_KEY): New define.
4082 (xg_free_frame_widgets): Free xg_frame_tb_info for frame if present.
4083 (xg_mark_data): Mark Lisp_Objects in xg_frame_tb_info.
4084 (xg_create_tool_bar): Allocate and initialize a xg_frame_tb_info
4086 (update_frame_tool_bar): Return early if data in xg_frame_tb_info
4087 is up to date. Otherwise store new data.
4088 (free_frame_tool_bar): Free xg_frame_tb_info if present.
4090 2012-08-13 Dmitry Antipov <dmantipov@yandex.ru>
4092 Use KSET for write access to Lisp_Object members of struct kboard.
4093 * keyboard.h (KSET): New macro.
4094 * callint.c, category.c, frame.c, keyboard.c, keyboard.h, macros.c:
4095 * msdos.c, nsfns.m, nsterm.m, term.c, w32fns.c, w32term.c, xfns.c:
4096 * xterm.c: Adjust users.
4098 2012-08-13 Dmitry Antipov <dmantipov@yandex.ru>
4100 Use BSET for write access to Lisp_Object members of struct buffer.
4101 * buffer.h (BSET): New macro.
4102 * buffer.c, casetab.c, cmds.c, coding.c, data.c, editfns.c:
4103 * fileio.c, frame.c, indent.c, insdel.c, intervals.c, keymap.c:
4104 * minibuf.c, print.c, process.c, syntax.c, undo.c, w32fns.c:
4105 * window.c, xdisp.c, xfns.c: Adjust users.
4107 2012-08-11 BT Templeton <bpt@hcoop.net> (tiny change)
4109 * lread.c (syms_of_lread): Initialize Vlexical_binding.
4111 2012-08-11 Jan Djärv <jan.h.d@swipnet.se>
4113 * nsterm.m (not_in_argv): New function.
4114 (application:openFile, application:openTempFile:):
4115 (application:openFileWithoutUI:, application:openFiles:): Open file
4116 if not_in_argv returns non-zero (bug#12171).
4118 * gtkutil.c (gtk_font_chooser_dialog_new, GTK_FONT_CHOOSER)
4119 (gtk_font_chooser_set_font, gtk_font_chooser_get_font):
4120 Define for Gtk+ versions less than 3.2.
4121 (xg_get_font_name): Use those functions/macros here.
4122 Reported by Frans Oilinki <moilinki@gmail.com>.
4124 2012-08-11 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
4126 * unexmacosx.c (copy_data_segment): Copy initialized data in
4127 statically linked libraries from input file rather than memory.
4129 * unexmacosx.c (print_load_command_name): Add cases LC_MAIN,
4130 LC_SOURCE_VERSION, and LC_DYLIB_CODE_SIGN_DRS.
4131 (dump_it) [LC_DYLIB_CODE_SIGN_DRS]: Call copy_linkedit_data.
4133 2012-08-10 Glenn Morris <rgm@gnu.org>
4135 * conf_post.h (IF_LINT, lint_assume): Move here from lisp.h.
4136 * lisp.h (IF_LINT, lint_assume): Move to conf_post.h.
4138 2012-08-10 Dmitry Antipov <dmantipov@yandex.ru>
4140 Fix last change to allow compilation with low optimization levels.
4141 * intervals.c (INTERVALS_INLINE): Define to EXTERN_INLINE.
4142 Reported by Jan Djärv <jan.h.d@swipnet.se>.
4144 2012-08-10 Dmitry Antipov <dmantipov@yandex.ru>
4146 Use common inline syntax in intervals.h.
4147 * intervals.h (INTERVALS_INLINE): New macro.
4148 Change all users from LISP_INLINE.
4150 2012-08-10 Dmitry Antipov <dmantipov@yandex.ru>
4152 Define Qnone once for all platforms.
4153 * frame.c (Qnone): Define here.
4154 (syms_of_frame): DEFSYM it.
4155 * lisp.h (Qnone): New declaration.
4156 * nsfns.m, nsterm.h, nsterm.m, w32fns.c, w32font.c:
4157 * xfns.c: Remove duplication. Adjust users.
4159 2012-08-10 Dmitry Antipov <dmantipov@yandex.ru>
4161 Remove unused macros from intervals.h.
4162 * intervals.h (MERGE_INSERTIONS, DISPLAY_INVISIBLE_GLYPH): Remove.
4163 * intervals.c: Adjust comment.
4165 2012-08-10 Eli Zaretskii <eliz@gnu.org>
4167 * w32fns.c <w32_unicode_gui>: New static variable.
4168 (globals_of_w32fns): Initialize it according to os_subtype.
4169 (w32_init_class, w32_msg_pump, w32_wnd_proc): Use it instead of
4172 2012-08-10 Joakim Hårsman <joakim.harsman@gmail.com> (tiny change)
4173 Eli Zaretskii <eliz@gnu.org>
4175 Fix bug #10299 with Unicode characters sent by customized
4176 keyboards created by MSKLC.
4177 * w32fns.c (INIT_WINDOW_CLASS): New macro.
4178 (w32_init_class): Use it to initialize the Emacs class with either
4179 ANSI or Unicode API calls.
4180 (w32_msg_pump): Call GetMessageW and DispatchMessageW on NT and
4182 (w32_wnd_proc): If the character code sent by WM_CHAR or
4183 WM_SYSCHAR is above 255, post a WM_UNICHAR message, not the
4184 original message. Call DefWindowProcW on NT and later.
4186 2012-08-10 Glenn Morris <rgm@gnu.org>
4188 * Makefile.in (config_h): Fix conf_post.h out-of-tree build location.
4190 * lisp.h (DIRECTORY_SEP): Let configure set it.
4192 2012-08-09 Dmitry Antipov <dmantipov@yandex.ru>
4194 Use TSET for write access to Lisp_Object slots of struct terminal.
4195 * termhooks.h (TSET): New macro.
4196 * coding.c, terminal.c, xselect.c: Adjust users.
4198 2012-08-08 Stefan Monnier <monnier@iro.umontreal.ca>
4200 * xdisp.c (safe_eval_handler): Remove prototype. Receive args describing
4201 the failing expression, include them in the error message.
4202 * eval.c (internal_condition_case_n): Pass nargs and args to hfun.
4203 * lisp.h (internal_condition_case_n): Update declaration.
4205 2012-08-08 Dmitry Antipov <dmantipov@yandex.ru>
4207 Inline functions to examine and change buffer overlays.
4208 * buffer.c (unchain_both): New function.
4209 * buffer.h (buffer_get_overlays, buffer_set_overlays):
4210 (buffer_has_overlays): New function.
4211 (enum overlay_type): New enum.
4212 * alloc.c, buffer.c, editfns.c, fileio.c, indent.c:
4213 * insdel.c, intervals.c, print.c, xdisp.c: Adjust users.
4215 2012-08-08 Dmitry Antipov <dmantipov@yandex.ru>
4217 Inline functions to examine and change buffer intervals.
4218 * alloc.c (mark_interval_tree): Remove.
4219 (MARK_INTERVAL_TREE): Simplify.
4220 (UNMARK_BALANCE_INTERVALS): Remove. Adjust users.
4221 * intervals.c (buffer_balance_intervals): New function.
4222 (graft_intervals_into_buffer): Adjust indentation.
4223 (set_intervals_multibyte): Simplify.
4224 * buffer.h (BUF_INTERVALS): Remove.
4225 (buffer_get_intervals, buffer_set_intervals): New function.
4226 * alloc.c, buffer.c, editfns.c, fileio.c, indent.c, insdel.c:
4227 * intervals.c, textprop.c: Adjust users.
4229 2012-08-08 Dmitry Antipov <dmantipov@yandex.ru>
4231 Inline functions to examine and change string intervals.
4232 * lisp.h (STRING_INTERVALS, STRING_SET_INTERVALS): Remove.
4233 (string_get_intervals, string_set_intervals): New function.
4234 * alloc.c, buffer.c, editfns.c, fns.c, insdel.c, intervals.c:
4235 * lread.c, print.c, textprop.c: Adjust users.
4237 2012-08-08 Glenn Morris <rgm@gnu.org>
4239 * lisp.mk (lisp): Remove language/persian.elc.
4241 2012-08-08 Dmitry Antipov <dmantipov@yandex.ru>
4244 * intervals.h (NULL_INTERVAL, DEFAULT_INTERVAL): Remove.
4245 (NULL_INTERVAL_P): Likewise. Adjust users.
4246 (FRONT_STICKY_P, END_NONSTICKY_P, FRONT_NONSTICKY_P):
4247 Adjust comment. Move under #if 0.
4248 * alloc.c, buffer.c, editfns.c, fns.c, insdel.c, intervals.c:
4249 * print.c, syntax.c, textprop.c, xdisp.c: Adjust users.
4251 2012-08-08 Dmitry Antipov <dmantipov@yandex.ru>
4253 Check total length of intervals with eassert.
4254 * intervals.h (CHECK_TOTAL_LENGTH): Remove.
4255 * intervals.c: Change all users to eassert.
4257 2012-08-07 Eli Zaretskii <eliz@gnu.org>
4259 * .gdbinit (xframe, xwindow, nextcons, xcar, xcdr, xlist):
4260 Rename fields to match removal of FGET and WGET and disuse of
4261 INTERNAL_FIELD in Lisp_Cons.
4263 2012-08-07 Dmitry Antipov <dmantipov@yandex.ru>
4265 Revert and cleanup Lisp_Cons, Lisp_Misc and Lisp_Symbol things.
4266 * lisp.h (struct Lisp_Symbol): Change xname to meaningful
4267 name since all xname users are fixed long time ago. Do not
4269 (set_symbol_name, set_symbol_function, set_symbol_plist):
4270 (set_symbol_next, set_overlay_plist): New function.
4271 (struct Lisp_Cons): Do not use INTERNAL_FIELD.
4272 (struct Lisp_Overlay): Likewise.
4273 (CVAR, MVAR, SVAR): Remove.
4274 * alloc.c, buffer.c, buffer.h, bytecode.c, cmds.c, data.c:
4275 * doc.c, eval.c, fns.c, keyboard.c, lread.c, nsselect.m:
4276 * xterm.c: Adjust users.
4277 * .gdbinit: Change to use name field of struct Lisp_Symbol
4280 2012-08-07 Dmitry Antipov <dmantipov@yandex.ru>
4282 Basic functions to set Lisp_Object and pointer slots of intervals.
4283 * intervals.h (interval_set_parent, interval_set_object):
4284 (interval_set_left, interval_set_right, interval_set_plist):
4285 (interval_copy_parent): New function.
4286 (SET_INTERVAL_OBJECT, SET_INTERVAL_PARENT, INTERVAL_PTR_SIZE): Remove.
4287 (RESET_INTERVAL, COPY_INTERVAL_CACHE, MERGE_INTERVAL_CACHE):
4289 (INTERVAL_SIZE): Remove. Adjust users.
4290 * alloc.c, intervals.c, lread.c, textprop.c: Use new functions.
4292 2012-08-07 Dmitry Antipov <dmantipov@yandex.ru>
4294 Drop PGET and revert read access to Lisp_Objects slots of Lisp_Process.
4295 * process.h (PGET): Remove.
4296 (struct Lisp_Process): Do not use INTERNAL_FIELD.
4297 * gnutls.c, print.c, process.c, sysdep.c, w32.c, xdisp.c: Adjust users.
4299 2012-08-07 Dmitry Antipov <dmantipov@yandex.ru>
4301 Drop WGET and revert read access to Lisp_Objects slots of struct window.
4302 * window.h (WGET): Remove.
4303 (struct window): Do not use INTERNAL_FIELD.
4304 * alloc.c, buffer.c, composite.c, dispextern.h, dispnew.c, editfns.c:
4305 * fileio.c, font.c, fontset.c, frame.c, frame.h, fringe.c, indent.c:
4306 * insdel.c, keyboard.c, keymap.c, lisp.h, minibuf.c, msdos.c, nsfns.m:
4307 * nsmenu.m, nsterm.m, print.c, textprop.c, w32fns.c, w32menu.c:
4308 * w32term.c, window.c, xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c:
4311 2012-08-07 Chong Yidong <cyd@gnu.org>
4313 * window.c (Fwindow_edges, Fwindow_pixel_edges)
4314 (Fwindow_absolute_pixel_edges, Fdelete_other_windows_internal)
4315 (Fdelete_window_internal): Signal an error if the window is not on
4316 a live frame (Bug#12025).
4318 2012-08-07 Dmitry Antipov <dmantipov@yandex.ru>
4320 Drop FGET and revert read access to Lisp_Objects slots of struct frame.
4321 * frame.h (FGET): Remove.
4322 (struct frame): Do not use INTERNAL_FIELD.
4323 * buffer.c, data.c, dispnew.c, dosfns.c, eval.c, fontset.c, frame.c:
4324 * fringe.c, gtkutil.c, minibuf.c, msdos.c, nsfns.m, nsmenu.m, nsterm.m:
4325 * print.c, term.c, w32fns.c, w32menu.c, w32term.c, window.c, window.h:
4326 * xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c: Adjust users.
4328 2012-08-06 Juanma Barranquero <lekktu@gmail.com>
4330 * w32.c: Silence compiler warnings.
4331 (map_w32_filename): Remove unused variable `is_fat'.
4332 (chase_symlinks): Add parentheses around expression.
4334 2012-08-06 Glenn Morris <rgm@gnu.org>
4336 * sysdep.c: Respect BROKEN_GETWD.
4338 * dispnew.c (GNU_LIBRARY_PENDING_OUTPUT_COUNT, PENDING_OUTPUT_COUNT):
4339 Let configure handle it.
4340 (stdio_ext.h) [DISPNEW_NEEDS_STDIO_EXT]: Include it.
4342 2012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
4344 Use GCALIGNMENT where appropriate.
4345 * alloc.c (XMALLOC_HEADER_ALIGNMENT, roundup_size):
4346 (union aligned_Lisp_Symbol, union aligned_Lisp_Misc):
4347 (mark_maybe_pointer, pure_alloc): Change to use GCALIGNMENT.
4349 2012-08-06 Eli Zaretskii <eliz@gnu.org>
4351 * w32menu.c (set_frame_menubar, initialize_frame_menubar):
4352 Don't use FRAME_MENU_BAR_ITEMS as an lvalue.
4354 2012-08-06 Stefan Monnier <monnier@iro.umontreal.ca>
4356 * buffer.h (struct buffer): Revert `indirections' to a simple int;
4357 that should be sufficient for everyone.
4359 2012-08-06 Jan Djärv <jan.h.d@swipnet.se>
4361 * keyboard.c (timer_check_2): Add break so timer_check returns next
4364 2012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
4366 Fix Windows build errors introduced after converting to WGET and WSET.
4367 * w32term.c (w32_set_vertical_scroll_bar): Change to use WSET.
4368 Reported by Andy Moreton <andrewjmoreton@gmail.com>.
4370 2012-08-06 Jan Djärv <jan.h.d@swipnet.se>
4372 * nsterm.m (ns_frame_rehighlight): Use FSET.
4374 * nsmenu.m (ns_update_menubar): Use FSET.
4376 2012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
4378 Separate read and write access to Lisp_Object slots of Lisp_Process.
4379 * process.h (PGET, PSET): New macros similar to AREF and ASET.
4380 * gnutls.c, print.c, process.c, sysdep.c, w32.c, xdisp.c: Adjust users.
4382 2012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
4384 Separate read and write access to Lisp_Object slots of struct window.
4385 * window.h (WGET, WSET): New macros similar to AREF and ASET.
4386 * alloc.c, buffer.c, composite.c, dispextern.h, dispnew.c, editfns.c:
4387 * fileio.c, font.c, fontset.c, frame.c, frame.h, fringe.c, indent.c:
4388 * insdel.c, keyboard.c, keymap.c, lisp.h, minibuf.c, msdos.c, nsfns.m:
4389 * nsmenu.m, nsterm.m, print.c, textprop.c, w32fns.c, w32menu.c:
4390 * w32term.c, window.c, xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c:
4393 2012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
4395 Fix Windows build errors introduced after converting to FGET and FSET.
4396 * w32term.c (x_frame_rehighlight, x_scroll_bar_create):
4397 (w32_condemn_scroll_bars, w32_redeem_scroll_bar):
4398 (w32_judge_scroll_bars): Change to use FSET.
4399 Reported by Andy Moreton <andrewjmoreton@gmail.com>.
4401 2012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
4403 Fix replacement typo.
4404 * window.c (replace_window): Set root_window instead of
4405 selected_window. This fixes a total window subsystem
4406 malfunction reported by Bastien Guerry <bzg@gnu.org>.
4408 2012-08-06 Glenn Morris <rgm@gnu.org>
4410 * lisp.mk (lisp): Add language/persian.elc.
4412 2012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
4414 Separate read and write access to Lisp_Object slots of struct frame.
4415 * frame.h (FGET, FSET): New macros similar to AREF and ASET.
4416 * buffer.c, data.c, dispnew.c, dosfns.c, eval.c, fontset.c, frame.c:
4417 * fringe.c, gtkutil.c, minibuf.c, msdos.c, nsfns.m, nsmenu.m, nsterm.m:
4418 * print.c, term.c, w32fns.c, w32menu.c, w32term.c, window.c, window.h:
4419 * xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c: Adjust users.
4421 2012-08-05 Andreas Schwab <schwab@linux-m68k.org>
4423 * emacs.c (decode_env_path): Only use defaulted if WINDOWSNT.
4425 2012-08-05 Dmitry Antipov <dmantipov@yandex.ru>
4427 Generalize common compile-time constants.
4428 * lisp.h (header_size, bool_header_size, word_size): Now here.
4429 (struct Lisp_Vector): Add comment.
4430 (struct Lisp_Bool_Vector): Move up to define handy constants.
4431 (VECSIZE, PSEUDOVECSIZE): Simplify.
4432 (SAFE_ALLOCA_LISP): Use new constant. Adjust indentation.
4433 * buffer.c, buffer.h, bytecode.c, callint.c, eval.c, fns.c:
4434 * font.c, fontset.c, keyboard.c, keymap.c, macros.c, menu.c:
4435 * msdos.c, w32menu.c, w32term.h, window.c, xdisp.c, xfaces.c:
4436 * xfont.c, xmenu.c: Use word_size where appropriate.
4438 2012-08-05 Lawrence Mitchell <wence@gmx.li>
4440 * search.c (Freplace_match): Treat \? in the replacement text
4441 literally (Bug#8161).
4443 2012-08-05 Chong Yidong <cyd@gnu.org>
4445 * term.c (Vsuspend_tty_functions, Vresume_tty_functions):
4446 * frame.c (Vdelete_frame_functions):
4447 * emacs.c (Vkill_emacs_hook): Doc fix.
4449 2012-08-04 Eli Zaretskii <eliz@gnu.org>
4451 * xfns.c (x_set_menu_bar_lines): Fix compilation error in
4452 --with-x-toolkit=no builds.
4453 Reported by Carsten Mattner <carstenmattner@gmail.com>.
4455 2012-08-04 Chong Yidong <cyd@gnu.org>
4457 * syntax.c (Fmodify_syntax_entry): Doc fix.
4459 2012-08-04 Eli Zaretskii <eliz@gnu.org>
4461 Fix startup warnings about ../site-lisp on MS-Windows. (Bug#11959)
4462 * w32.c (init_environment): Change the default values of many
4463 environment variables in dflt_envvars[] to NULL, to avoid pushing
4464 them into environment when they were not already defined.
4465 Remove the code that deletes site-lisp subdirectories from the default
4466 value of EMACSLOADPATH, as it is no longer needed.
4467 (check_windows_init_file): Now external, not static.
4468 Use Vload_path as is, without adding anything, as this function is now
4469 called when Vload_path is already set up.
4471 * w32.h (check_windows_init_file): Add prototype.
4473 * emacs.c (init_cmdargs) [WINDOWSNT]: When running from the build
4474 directory, ignore the /*/i386/ tail in Vinvocation_directory, for
4475 compatibility with Posix platforms.
4476 (main): Move the call to check_windows_init_file to here from
4478 (decode_env_path) [WINDOWSNT]: Expand the %emacs_dir%/ prefix, if
4479 any, in the DEFALT argument into the root of the Emacs build or
4480 installation tree, as appropriate.
4482 * callproc.c (init_callproc_1): Call decode_env_path instead of
4483 doing its equivalent by hand.
4484 (init_callproc): Replace DOS_NT condition with MSDOS, thus letting
4485 the code that sets Vexec_path run on MS-Windows.
4487 * lread.c (init_lread): Add comments to #ifdef's.
4489 * msdos.c (dos_set_window_size, IT_update_begin)
4490 (IT_frame_up_to_date, IT_set_frame_parameters): Use FVAR and WVAR
4491 instead of direct references.
4493 2012-08-04 Paul Eggert <eggert@cs.ucla.edu>
4495 Export DEFAULT_REHASH_* to GDB.
4496 * lisp.h (DEFAULT_REHASH_THRESHOLD, DEFAULT_REHASH_SIZE):
4497 Now constants, not macros.
4499 2012-08-03 Paul Eggert <eggert@cs.ucla.edu>
4501 Remove unnecessary casts involving pointers.
4502 These casts are no longer needed now that we assume C89 or later,
4503 since they involve casting to or from void *.
4504 * alloc.c (make_pure_string, make_pure_c_string, pure_cons)
4505 (make_pure_float, make_pure_vector):
4506 * lisp.h (SAFE_ALLOCA, SAFE_ALLOCA_LISP):
4507 * macros.c (Fstart_kbd_macro):
4508 * menu.c (find_and_return_menu_selection):
4509 * minibuf.c (read_minibuf_noninteractive):
4510 * sysdep.c (closedir):
4511 * xdisp.c (x_produce_glyphs):
4512 * xfaces.c (compare_fonts_by_sort_order):
4513 * xfns.c (x_real_positions, select_visual):
4514 * xselect.c (x_stop_queuing_selection_requests)
4515 (x_get_window_property, x_get_window_property_as_lisp_data):
4516 * xterm.c (x_set_frame_alpha, x_find_modifier_meanings):
4517 Remove unnecessary pointer casts.
4518 * alloc.c (record_xmalloc): New function.
4519 * lisp.h (record_xmalloc): New decl.
4520 (SAFE_ALLOCA): Now takes just one arg -- the size -- and acts
4521 more like a function. This is because the pointer cast is not
4522 needed. All uses changed.
4523 * print.c (print_string, print_error_message): Avoid length recalc.
4525 Improve fix for macroexp crash with debugging (Bug#12118).
4526 * lisp.h (ASET) [ENABLE_CHECKING]: Pay attention to
4527 ARRAY_MARK_FLAG when checking subscripts, because ASET is
4528 not supposed to be invoked from the garbage collector.
4529 See Andreas Schwab in <http://bugs.gnu.org/12118#25>.
4530 (gc_aset): New function, which is like ASET but can be
4531 used in the garbage collector.
4532 (set_hash_key, set_hash_value, set_hash_next, set_hash_hash)
4533 (set_hash_index): Use it instead of ASET.
4535 2012-08-03 Eli Zaretskii <eliz@gnu.org>
4537 Support symlinks on latest versions of MS-Windows.
4538 * w32.c: Include winioctl.h and aclapi.h.
4539 (is_symlink, chase_symlinks, enable_privilege, restore_privilege)
4540 (revert_to_self): Forward declarations of static functions.
4541 <static BOOL g_b_init_get_security_info>:
4542 <g_b_init_create_symbolic_link>: New static flags.
4543 (globals_of_w32): Initialize them to zero.
4544 (GetSecurityInfo_Proc, CreateSymbolicLink_Proc): New typedefs.
4545 (map_w32_filename): Improve commentary. Simplify switch.
4546 (SYMBOLIC_LINK_FLAG_DIRECTORY): Define if not defined in system
4547 headers (most versions of MinGW w32api don't).
4548 (get_security_info, create_symbolic_link)
4549 (get_file_security_desc_by_handle, is_symlink, chase_symlinks):
4551 (sys_access, sys_chmod): Call 'chase_symlinks' to resolve symlinks
4552 in the argument file name.
4553 (sys_access): Call unc_volume_file_attributes only if
4554 GetFileAttributes fails with network-related error codes.
4555 (sys_rename): Diagnose renaming of a symlink when the user doesn't
4556 have the required privileges.
4557 (get_file_security_desc_by_name): Rename from
4558 get_file_security_desc.
4559 (stat_worker): New function, with most of the guts of 'stat', and
4560 with addition of handling of symlinks and support for 'lstat'.
4561 If possible, get file's attributes and security information by
4562 handle, not by name. Produce S_IFLNK bit for symlinks, when
4563 called from 'lstat'.
4564 (stat, lstat): New functions, call 'stat_worker'.
4565 (symlink, readlink, careadlinkat): Rewritten to create and resolve
4566 symlinks when the underlying filesystem supports them.
4568 2012-08-02 Paul Eggert <eggert@cs.ucla.edu>
4570 Fix macroexp crash on Windows with debugging (Bug#12118).
4571 * lisp.h (ASET) [ENABLE_CHECKING]: Ignore ARRAY_MARK_FLAG when
4572 checking subscripts; problem introduced with the recent
4573 "ASET (a, i, v)" rather than "AREF (a, i) = v" patch.
4574 (ARRAY_MARK_FLAG): Now a macro as well as a constant,
4575 since it's used in non-static inline functions now.
4577 * xfaces.c (face_at_buffer_position, face_for_overlay_string):
4578 Don't assume buffer size fits in 'int'. Remove unused local.
4580 Use C99-style 'extern inline' if available.
4581 * buffer.h (BUFFER_INLINE):
4582 * category.h (CATEGORY_INLINE):
4583 * character.h (CHARACTER_INLINE):
4584 * charset.h (CHARSET_INLINE):
4585 * composite.h (COMPOSITE_INLINE):
4586 * dispextern.h (DISPEXTERN_INLINE):
4587 * lisp.h (LISP_INLINE):
4588 * systime.h (SYSTIME_INLINE):
4589 New macro, replacing 'static inline' in this header.
4590 * buffer.h, category.h, character.h, charset.h, composite.h:
4591 * dispextern.h, lisp.h, systime.h:
4592 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
4593 * alloc.c (LISP_INLINE):
4594 * buffer.c (BUFFER_INLINE):
4595 * category.c (CATEGORY_INLINE):
4596 * character.c (CHARACTER_INLINE):
4597 * charset.c (CHARSET_INLINE):
4598 * composite.c (COMPOSITE_INLINE):
4599 * dispnew.c (DISPEXTERN_INLINE):
4600 * sysdep.c (SYSTIME_INLINE):
4601 Define to EXTERN_INLINE, so that the corresponding functions
4602 are compiled into code.
4603 * conf_post.h (INLINE, EXTERN_INLINE, INLINE_HEADER_BEGIN)
4604 (INLINE_HEADER_END): New macros.
4605 * lisp.h (PSEUDOVECTOR_FLAG): Now a macro as well as a constant,
4606 since it's used in non-static inline functions now.
4607 (VALMASK) [!USE_LSB_TAG]: Likewise.
4609 2012-08-02 Glenn Morris <rgm@gnu.org>
4611 * s/: Remove empty directory.
4613 * s/ms-w32.h: Move to ../nt/inc.
4614 * makefile.w32-in (TAGS, TAGS-gmake, MS_W32_H):
4615 Update for new ms-w32.h location.
4617 2012-08-02 Paul Eggert <eggert@cs.ucla.edu>
4620 * syswait.h (WRETCODE): Remove, consistently with ../configure.ac.
4622 2012-08-02 Glenn Morris <rgm@gnu.org>
4624 * nsterm.m (ns_exec_path, ns_load_path): Use SEPCHAR rather than
4625 hard-coding the path separator.
4627 2012-08-01 Paul Eggert <eggert@cs.ucla.edu>
4629 Use "ASET (a, i, v)" rather than "AREF (a, i) = v".
4630 This how ASET and AREF are supposed to work, and makes
4631 it easier to think about future improvements. See
4632 <http://lists.gnu.org/archive/html/emacs-devel/2012-08/msg00026.html>.
4633 * charset.h (set_charset_attr): New function.
4634 All lvalue-style uses of CHARSET_DECODER etc. changed to use it.
4635 * lisp.h (ASET): Rewrite so as not to use AREF in an lvalue style.
4636 (aref_addr): New function. All uses of &AREF(...) changed.
4637 (set_hash_key, set_hash_value, set_hash_next, set_hash_hash)
4638 (set_hash_index): New functions. All lvalue-style uses of
4639 HASH_KEY etc. changed.
4640 * keyboard.c (set_prop): New function. All lvalue-style uses
4643 2012-08-01 Alp Aker <alp.tekin.aker@gmail.com>
4645 * nsterm.m (ns_set_vertical_scroll_bar, ns_redeem_scroll_bar)
4646 (EmacsWindow-accessibilityAttributeValue, EmacsScroller-initFrame:)
4647 (EmacsScroller-dealloc): Adjust to use WVAR. (Bug#12114)
4648 * nsfns.m (ns_set_name_as_filename): Likewise.
4649 * nsmenu.m (ns_update_menubar): Likewise.
4650 * nsselect.m (symbol_to_nsstring): Adjust to use SVAR.
4652 2012-08-01 Eli Zaretskii <eliz@gnu.org>
4654 * .gdbinit (xcar, xcdr, xlist, xwindow, nextcons, xprintsym):
4655 Adapt to latest changes in field names of the corresponding Lisp
4658 * xdisp.c (try_window_id): Use WVAR in IF_DEBUG code.
4660 2012-08-01 Glenn Morris <rgm@gnu.org>
4662 * s/msdos.h: Remove file.
4663 * conf_post.h [MSDOS]: New section, moved from s/msdos.h.
4664 * Makefile.in (S_FILE): Remove.
4665 (config_h): Remove S_FILE.
4667 2012-08-01 Juanma Barranquero <lekktu@gmail.com>
4669 * s/ms-w32.h (DEVICE_SEP, IS_DIRECTORY_SEP, IS_ANY_SEP):
4670 Remove; moved to nt/config.nt.
4672 2012-08-01 Dmitry Antipov <dmantipov@yandex.ru>
4674 Use INTERNAL_FIELD for conses and overlays.
4675 * lisp.h (struct Lisp_Cons): Use INTERNAL_FIELD.
4676 Remove obsolete comment.
4678 (struct Lisp_Overlay): Use INTERNAL_FIELD.
4679 * alloc.c, buffer.c, buffer.h, fns.c: Adjust users.
4681 2012-08-01 Dmitry Antipov <dmantipov@yandex.ru>
4683 Use INTERNAL_FIELD for symbols.
4684 * lisp.h (SVAR): New macro. Adjust users.
4685 * alloc.c, bytecode.c, cmds.c, data.c, doc.c, eval.c:
4686 * fns.c, keyboard.c, lread.c, xterm.c: Users changed.
4688 2012-08-01 Dmitry Antipov <dmantipov@yandex.ru>
4690 Use INTERNAL_FIELD for processes.
4691 * process.h (PVAR): New macro. Adjust style.
4692 (struct Lisp_Process): Change Lisp_Object members to INTERNAL_FIELD.
4693 * print.c, process.c, sysdep.c, w32.c, xdisp.c: Users changed.
4695 2012-08-01 Dmitry Antipov <dmantipov@yandex.ru>
4697 Use INTERNAL_FIELD for windows.
4698 * window.h (WVAR): New macro.
4699 (struct window): Change Lisp_Object members to INTERNAL_FIELD.
4700 * alloc.c, buffer.c, composite.c, dispextern.h, dispnew.c, editfns.c:
4701 * fileio.c, font.c, fontset.c, frame.c, frame.h, fringe.c, indent.c:
4702 * insdel.c, keyboard.c, keymap.c, lisp.h, minibuf.c, nsterm.m, print.c:
4703 * textprop.c, w32fns.c, w32menu.c, w32term.c, window.c, xdisp.c:
4704 * xfaces.c, xfns.c, xmenu.c, xterm.c: Users changed.
4706 2012-08-01 Paul Eggert <eggert@cs.ucla.edu>
4708 * coding.h (CODING_ATTR_FLUSHING): Remove; unused and wouldn't work.
4710 2012-08-01 Glenn Morris <rgm@gnu.org>
4712 * lisp.h (IS_DIRECTORY_SEP, IS_DEVICE_SEP, IS_ANY_SEP):
4713 Move to configure.ac.
4715 2012-08-01 Juanma Barranquero <lekktu@gmail.com>
4717 * makefile.w32-in (CONFIG_H): Update dependencies.
4718 (CONF_POST_H): New macro.
4720 * s/ms-w32.h (SEPCHAR, NULL_DEVICE): Remove; moved to nt/config.nt.
4722 2012-07-31 Glenn Morris <rgm@gnu.org>
4724 * Makefile.in (S_FILE): No longer set by configure.
4726 * conf_post.h (config_opsysfile): Move earlier, so that WINDOWSNT
4728 (alloca.h) [WINDOWSNT]: Don't include it on MS Windows.
4730 * process.h (NULL_DEVICE):
4731 * emacs.c (SEPCHAR):
4732 * editfns.c (USER_FULL_NAME): Let configure set them.
4734 * s/README, s/template.h: Remove files.
4736 * conf_post.h [HPUX]: Undefine HAVE_RANDOM and HAVE_RINT.
4738 * conf_post.h (AMPERSAND_FULL_NAME, subprocesses):
4739 Move to configure.ac.
4741 2012-07-31 Eli Zaretskii <eliz@gnu.org>
4743 * .gdbinit (xframe): Adapt to introduction of FVAR and the
4744 resulting renaming of 'struct frame' members.
4746 * w32menu.c (w32_menu_show): Revert bogus introduction of FVAR.
4748 * fontset.c (dump_fontset): Fix compilation with ENABLE_CHECKING
4749 after introduction of FVAR.
4751 2012-07-31 Jan Djärv <jan.h.d@swipnet.se>
4753 * nsmenu.m (update_frame_tool_bar): Change key from NSObject* to id.
4755 * nsterm.m (ns_draw_fringe_bitmap, ns_dumpglyphs_image): Use drawInRect
4756 instead of compositeToPoint.
4757 (applicationShouldTerminate): Pass NS String literal to NSRunAlertPanel.
4759 * nsfns.m, nsmenu.m, nsterm.m: Adopt to struct frame/FVAR changes.
4761 2012-07-31 Dmitry Antipov <dmantipov@yandex.ru>
4763 Generalize INTERNAL_FIELD between buffers, keyboards and frames.
4764 * lisp.h (INTERNAL_FIELD): New macro.
4765 * buffer.h (BUFFER_INTERNAL_FIELD): Remove.
4766 (BVAR): Change to use INTERNAL_FIELD.
4767 * keyboard.h (KBOARD_INTERNAL_FIELD): Likewise.
4768 (KVAR): Change to use INTERNAL_FIELD.
4769 * frame.h (FVAR): New macro.
4770 (struct frame): Use INTERNAL_FIELD for all Lisp_Object fields.
4771 * alloc.c, buffer.c, data.c, dispnew.c, dosfns.c, eval.c, frame.c:
4772 * fringe.c, gtkutil.c, minibuf.c, nsfns.m, nsterm.m, print.c:
4773 * term.c, w32fns.c, w32menu.c, w32term.c, window.c, window.h:
4774 * xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c: Users changed.
4776 2012-07-31 Dmitry Antipov <dmantipov@yandex.ru>
4778 Miscellaneous fixes for non-default X toolkits.
4779 * xfns.c (Fx_file_dialog): Change to SSDATA to avoid warnings.
4780 * xterm.c (x_frame_of_widget): Remove redundant prototype.
4781 Move under #ifdef USE_LUCID.
4782 (x_create_toolkit_scroll_bar): Adjust scroll_bar_name
4783 definition and usage to avoid warnings.
4785 2012-07-31 Jan Djärv <jan.h.d@swipnet.se>
4787 * nsterm.m (openFiles): Fix previous checkin.
4789 2012-07-31 Paul Eggert <eggert@cs.ucla.edu>
4791 * indent.c (compute_motion): Remove unused local.
4793 2012-07-31 Glenn Morris <rgm@gnu.org>
4795 * s/usg5-4-common.h (wait3, WRETCODE): Let configure set them.
4797 * conf_post.h [USG5_4]:
4798 Move remaining contents of s/usg5-4-common.h here.
4799 * s/usg5-4-common.h: Remove file.
4801 * conf_post.h [IRIX6_5]: Move remaining contents of s/irix6-5.h here.
4802 * s/irix6-5.h: Remove file.
4804 * conf_post.h [DARWIN_OS]: Move remaining contents of s/darwin.h here.
4805 * s/darwin.h: Remove file.
4807 * conf_post.h [HPUX]: Move random, srandom here from s/hpux10-20.h.
4808 * s/hpux10-20.h: Remove file, which is now empty.
4810 2012-07-30 Glenn Morris <rgm@gnu.org>
4812 * conf_post.h: New, split from configure.ac's AH_BOTTOM.
4813 * Makefile.in (config_h): Add conf_post.h.
4814 * makefile.w32-in (CONFIG_H): Add conf_post.h.
4816 2012-07-30 Jan Djärv <jan.h.d@swipnet.se>
4818 * nsterm.m (ns_do_open_file): New variable.
4819 (ns_term_init): Set ns_do_open_file to YES after run returns.
4820 (openFile, openTempFile, openFileWithoutUI, openFiles):
4821 Open files only if ns_do_open_file.
4823 2012-07-30 Paul Eggert <eggert@cs.ucla.edu>
4825 * lisp.h (SWITCH_ENUM_CAST): Remove. All uses removed.
4826 This no-op macro hasn't been needed for many years.
4827 * src/regex.c (SWITCH_ENUM_CAST) [!emacs]: Likewise.
4829 Export DIRECTORY_SEP, TYPEMASK, VALMASK to GDB.
4830 * alloc.c (gdb_make_enums_visible) [USE_LSB_TAG]: Add lsb_bits.
4831 * lisp.h (enum lsb_bits) [USE_LSB_TAG]: New enum, for
4832 gdb_make_enums_visible.
4833 (TYPEMASK, VALMASK) [USE_LSB_TAGS]: Now enum constants, not macros.
4834 (DIRECTORY_SEP): Now a constant, not a macro.
4836 2012-07-30 Eli Zaretskii <eliz@gnu.org>
4838 * w32fns.c (w32_wnd_proc): Pass w32_keyboard_codepage to
4839 w32_kbd_patch_key as the 2nd arg. (Bug#12082)
4841 * w32term.c <w32_keyboard_codepage>: Renamed from
4842 keyboard_codepage and now external. All users changed.
4844 * w32term.h: Add declaration of w32_keyboard_codepage.
4846 * w32inevt.c (w32_kbd_patch_key): Accept an additional argument --
4847 the codepage to translate keys to Unicode. If this argument is
4848 -1, use the value returned by GetConsoleCP. All callers changed.
4850 2012-07-30 Paul Eggert <eggert@cs.ucla.edu>
4852 Update .PHONY listings in makefiles.
4853 * Makefile.in (.PHONY): Add all, mostlyclean, clean,
4854 bootstrap-clean, distclean, maintainer-clean, versioclean,
4857 * lisp.h (STRING_BYTES_BOUND): Cast entire result to ptrdiff_t.
4858 This is a bit clearer. Fix some commentary typos.
4860 2012-07-30 Glenn Morris <rgm@gnu.org>
4862 * s/netbsd.h: Let configure include signal.h if needed.
4863 Remove file, which is now empty.
4865 * s/usg5-4-common.h (_longjmp, _setjmp, TIOCSIGSEND):
4866 Let configure set them.
4867 * s/irix6-5.h (_longjmp, _setjmp, TIOCSIGSEND):
4868 No more need to undefine.
4870 2012-07-30 Andreas Schwab <schwab@linux-m68k.org>
4872 * keymap.c (Fkey_description): Don't remove 0x80 bit from
4873 non-single-byte char when adding meta modifier. (Bug#12090)
4875 2012-07-30 Dmitry Antipov <dmantipov@yandex.ru>
4877 Convert safe_call to use variable number of arguments.
4878 * xdisp.c (safe_call): Convert to use varargs. Adjust users.
4879 (safe_call2): Fix comment.
4880 * lisp.h (safe_call): Adjust prototype.
4881 * coding.c (encode_coding_object): Change to use safe_call2.
4882 * xfaces.c (merge_face_heights): Change to use safe_call1.
4884 2012-07-30 Glenn Morris <rgm@gnu.org>
4886 * s/aix4-2.h (sigmask): No need to undefine it, since syssignal.h
4887 does that unconditionally. Remove file, which is now empty.
4889 * s/freebsd.h, s/gnu-linux.h, s/sol2-6.h, s/unixware.h:
4892 2012-07-30 Paul Eggert <eggert@cs.ucla.edu>
4894 Export to GDB most of lisp.h's remaining object-like macros.
4895 * lisp.h (min, max): Move earlier, because they're used earlier now.
4896 (INTMASK, ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK)
4897 (CHAR_TABLE_STANDARD_SLOTS, CHARTAB_SIZE_BITS_0)
4898 (CHARTAB_SIZE_BITS_1, CHARTAB_SIZE_BITS_2, CHARTAB_SIZE_BITS_3)
4899 (DEFAULT_HASH_SIZE, COMPILED_ARGLIST, COMPILED_BYTECODE)
4900 (COMPILED_CONSTANTS, COMPILED_STACK_DEPTH, COMPILED_DOC_STRING)
4901 (COMPILED_INTERACTIVE, CHAR_ALT, CHAR_SUPER, CHAR_HYPER, CHAR_SHIFT)
4902 (CHAR_CTL, CHAR_META, CHAR_MODIFIER_MASK, CHARACTERBITS)
4903 (MANY, UNEVALLED, FLOAT_TO_STRING_BUFSIZE, MAX_ALLOCA):
4904 Now constants, for GDB. They need not be macros.
4905 (MOST_POSITIVE_FIXNUM, MOST_NEGATIVE_FIXNUM, STRING_BYTES_BOUND):
4906 Now constants, for GDB, as well as macros, for static initializers.
4907 (CHAR_TABLE_STANDARD_SLOTS, CHAR_TABLE_EXTRA_SLOTS):
4908 Move to after the definition of struct Lisp_Char_Table,
4909 since the former now needs that type defined.
4910 (enum CHARTAB_SIZE_BITS, enum CHAR_TABLE_STANDARD_SLOTS)
4911 (enum DEFAULT_HASH_SIZE, enum Lisp_Compiled, enum char_bits)
4912 (enum maxargs, enum FLOAT_TO_STRING_BUFSIZE, enum MAX_ALLOCA):
4913 New enums, for gdb_make_enums_visible.
4914 (GLYPH_MODE_LINE_FACE): Remove; unused.
4915 * alloc.c (STRING_BYTES_MAX): Now a constant, not a macro.
4916 (gdb_make_enums_visible): Add enum CHARTAB_SIZE_BITS, enum
4917 CHAR_TABLE_STANDARD_SLOTS, enum char_bits, enum DEFAULT_HASH_SIZE,
4918 enum FLOAT_TO_STRING_BUFSIZE, enum Lisp_Bits, enum Lisp_Compiled,
4919 enum maxargs, enum MAX_ALLOCA.
4920 (ARRAY_MARK_FLAG_VAL, PSEUDOVECTOR_FLAG_VAL, VALMASK_VAL): Remove.
4921 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Remove;
4922 no longer needed, now that they are done in lisp.h.
4924 2012-07-30 Dmitry Antipov <dmantipov@yandex.ru>
4926 Cleanup string bytes checking.
4927 * alloc.c (GC_STRING_BYTES, CHECK_STRING_BYTES): Remove. Convert
4928 all users to STRING_BYTES or string_bytes if GC_CHECK_STRING_BYTES.
4929 (check_string_bytes): Define to empty if not GC_CHECK_STRING_BYTES.
4930 (check_sblock, compact_small_strings): Simplify.
4932 2012-07-29 Paul Eggert <eggert@cs.ucla.edu>
4934 * lisp.h (LISP_INT_TAG, LISP_INT1_TAG, LISP_STRING_TAG): Remove.
4935 These macros are confusing and no longer need to be defined, as
4936 the enum values now suffice. All uses replaced with definiens.
4937 (Lisp_Int1, Lisp_String): Define directly; this is clearer.
4939 2012-07-29 Juanma Barranquero <lekktu@gmail.com>
4941 * makefile.w32-in (LISP_H, $(BLD)/emacs.$(O), $(BLD)/w32inevt.$(O))
4942 ($(BLD)/w32console.$(O)): Update dependencies.
4944 2012-07-29 Dmitry Antipov <dmantipov@yandex.ru>
4946 Remove HIDE_LISP_IMPLEMENTATION and cleanup cons free list check.
4947 * lisp.h (HIDE_LISP_IMPLEMENTATION): Remove as useless for a long
4949 (CHECK_CONS_LIST): Remove. Convert all users to check_cons_list.
4951 2012-07-29 Jan Djärv <jan.h.d@swipnet.se>
4953 * lread.c (init_lread): Remove if-statement in ifdef HAVE_NS before
4954 setting sitelisp (Bug#12010).
4956 2012-07-29 Eli Zaretskii <eliz@gnu.org>
4958 * w32heap.h (OS_9X): Rename from OS_WINDOWS_95.
4960 * w32heap.c (cache_system_info):
4961 * w32.c (sys_rename):
4962 * w32proc.c (find_child_console, sys_kill): All users changed.
4964 2012-07-29 Paul Eggert <eggert@cs.ucla.edu>
4966 * alloc.c (Fgarbage_collect): Indent as per usual Emacs style.
4968 2012-07-29 Eli Zaretskii <eliz@gnu.org>
4970 * makefile.w32-in (LISP_H): Add $(NT_INC)/stdalign.h.
4972 2012-07-29 Dmitry Antipov <dmantipov@yandex.ru>
4974 Cleanup statistics calculation in Fgarbage_collect.
4975 * alloc.c (Fgarbage_collect): Rename t1 to meaningful start.
4976 Fix zombies percentage calculation. Simplify elapsed time calculation.
4978 2012-07-29 Dmitry Antipov <dmantipov@yandex.ru>
4980 Generalize marker debugging code under MARKER_DEBUG and use eassert.
4981 * insdel.c (CHECK_MARKERS, check_markers_debug_flag): Remove.
4982 (gap_left, gap_right, adjust_markers_for_delete, insert_1_both)
4983 (insert_from_string_1, insert_from_gap, insert_from_buffer_1)
4984 (replace_range, replace_range_2, del_range_2): Change to eassert.
4985 * marker.c (byte_char_debug_check): Adjust style.
4987 2012-07-29 Paul Eggert <eggert@cs.ucla.edu>
4989 Don't use the abbreviation "win" to refer to Windows (Bug#10421).
4990 * regex.c (MAX_BUF_SIZE): Remove some incorrect and
4991 long-ago-commented-out code that talks about "WIN32".
4992 * w32heap.h (OS_WINDOWS_95): Rename from OS_WIN95.
4995 2012-07-28 Paul Eggert <eggert@cs.ucla.edu>
4997 Use Gnulib stdalign module (Bug#9772, Bug#9960).
4998 * alloc.c (XMALLOC_BASE_ALIGNMENT, GC_POINTER_ALIGNMENT, pure_alloc):
4999 Simplify by using alignof.
5000 (pure_alloc) [! USE_LSB_TAG]: Don't over-align EMACS_INT values.
5001 * lisp.h: Include <stdalign.h>.
5002 (GCALIGNMENT): New macro and constant.
5003 (DECL_ALIGN): Remove. All uses replaced by alignas (GCALIGNMENT).
5004 (USE_LSB_TAG): ifdef on alignas, not on DECL_ALIGN.
5005 (stdalign): New macro, if not already defined.
5007 2012-07-28 Eli Zaretskii <eliz@gnu.org>
5009 Fix non-ASCII input in non-GUI frames on MS-Windows. (Bug#12055)
5010 * w32inevt.c: Include w32inevt.h.
5011 (w32_read_console_input): New inline function, calls either
5012 ReadConsoleInputA or ReadConsoleInputW, depending on the value of
5013 w32_console_unicode_input.
5014 (fill_queue): Call w32_read_console_input instead of ReadConsoleInput.
5015 (w32_kbd_patch_key, key_event): Use the codepage returned by
5016 GetConsoleCP, rather than the ANSI codepage returned by GetLocaleInfo.
5017 (key_event): use uChar.UnicodeChar only if
5018 w32_console_unicode_input is non-zero.
5020 * w32console.c: Include w32heap.h.
5021 <w32_console_unicode_input>: New global variable.
5022 (initialize_w32_display): Set w32_console_unicode_input to 1 on NT
5023 family of Windows, zero otherwise.
5025 * w32inevt.h: Declare w32_console_unicode_input.
5027 * xdisp.c (init_iterator): Don't reference tip_frame in a build
5028 --without-x. (Bug#11742)
5030 2012-07-27 Paul Eggert <eggert@cs.ucla.edu>
5032 Adjust GDB to reflect pvec_type changes (Bug#12036).
5033 * .gdbinit (xvectype, xpr, xbacktrace): Adjust to reflect the
5034 2012-07-04 changes to pseudovector representation.
5035 Problem reported by Eli Zaretskii in <http://bugs.gnu.org/12036#30>.
5037 2012-07-27 Michael Albinus <michael.albinus@gmx.de>
5039 * dbusbind.c (XD_DBUS_VALIDATE_BUS_ADDRESS): Canonicalize session
5041 (xd_close_bus, Fdbus_init_bus): Handle reference counter properly.
5043 2012-07-27 Eli Zaretskii <eliz@gnu.org>
5045 * alloc.c (listn): Fix the order the arguments are consed onto the
5048 * lisp.h (enum constype): Use CONSTYPE_HEAP and CONSTYPE_PURE for
5049 enumeration constants, as PURE and HEAP are too general, and clash
5050 with other headers and sources, such as gmalloc.c and the
5051 MS-Windows system headers. All users changed.
5053 2012-07-27 Dmitry Antipov <dmantipov@yandex.ru>
5055 Revert last save_excursion_save and save_excursion_restore changes.
5056 * alloc.c, editfns.c, marker.c, lisp.h: Revert.
5057 Lots of crashes reported by Chong Yidong <cyd@gnu.org>.
5059 2012-07-27 Dmitry Antipov <dmantipov@yandex.ru>
5061 Fix recently-introduced typos in Windows port.
5062 Reported by Martin Rudalics <rudalics@gmx.at>.
5063 * w32.c (init_environment): Replace comma with semicolon.
5064 * w32fns.c (syms_of_w32fns): Add missing parenthesis.
5066 2012-07-27 Paul Eggert <eggert@cs.ucla.edu>
5068 Improve GDB symbol export (Bug#12036).
5069 * .gdbinit (xgetptr, xgetint, xgettype): Set $bugfix in different
5070 arms of an 'if', not using conditional expressions; otherwise GDB
5071 complains about the types in the unevaluated arm when the argument
5072 is an integer literal.
5073 (xgetint): Simplify expression.
5074 * alloc.c (gdb_make_enums_visible): New constant. This ports to
5075 GCC 3.4.2 the export of symbols to GDB. Problem reported by Eli
5076 Zaretskii in <http://bugs.gnu.org/12036#13>.
5077 * lisp.h (PUBLISH_TO_GDB): Remove. All uses removed. No longer
5078 needed now that we have gdb_make_enums_visible.
5079 (enum CHECK_LISP_OBJECT_TYPE, enum Lisp_Bits, enum More_Lisp_Bits)
5080 (enum enum_USE_LSB_TAG):
5081 New enum types, packaging up enums that need to be exported to GDB.
5083 2012-07-27 Dmitry Antipov <dmantipov@yandex.ru>
5085 Utility function to make a list from specified amount of objects.
5086 * lisp.h (enum constype): New datatype.
5087 (listn): New prototype.
5088 * alloc.c (listn): New function.
5089 (Fmemory_use_count, syms_of_alloc): Use it.
5090 * buffer.c (syms_of_buffer): Likewise.
5091 * callint.c (syms_of_callint): Likewise.
5092 * charset.c (define_charset_internal): Likewise.
5093 * coding.c (syms_of_coding): Likewise.
5094 * keymap.c (syms_of_keymap): Likewise.
5095 * search.c (syms_of_search): Likewise.
5096 * syntax.c (syms_of_syntax): Likewise.
5097 * w32.c (init_environment): Likewise.
5098 * w32fns.c (Fw32_battery_status, syms_of_w32fns): Likewise.
5099 * xdisp.c (syms_of_xdisp): Likewise.
5100 * xfns.c (syms_of_xfns): Likewise.
5102 2012-07-27 Dmitry Antipov <dmantipov@yandex.ru>
5104 Fast save_excursion_save and save_excursion_restore.
5105 * lisp.h (struct Lisp_Excursion): New data type.
5106 (PVEC_EXCURSION): New pseudovector type.
5107 (XEXCURSION, XSETEXCURSION, EXCURSIONP): Convenient macros
5108 to deal with it. Adjust comments.
5109 (init_marker, attach_marker): New prototype.
5110 (unchain_marker): Adjust prototype.
5111 * marker.c (attach_marker): Change to global.
5112 (init_marker): New function.
5113 * alloc.c (Fmake_marker, build_marker): Use it.
5114 (build_marker): More easserts.
5115 (mark_object): Handle struct Lisp_Excursion.
5116 * editfns.c (save_excursion_save, save_excursion_restore):
5117 Reimplement to use struct Lisp_Excursion. Add comments.
5119 2012-07-26 Paul Eggert <eggert@cs.ucla.edu>
5121 Fix export of symbols to GDB (Bug#12036).
5122 * alloc.c (ARRAY_MARK_FLAG_VAL, PSEUDOVECTOR_FLAG_VAL, VALMASK_VAL)
5123 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Move these here from
5124 emacs.c, as this is a more-suitable home. Had this been done earlier
5125 the fix for 12036 would have avoided some of the problems noted in
5126 <http://bugs.gnu.org/12036#13> by Eli Zaretskii, as the scope problems
5127 would have been more obvious.
5128 * emacs.c: Do not include <verify.h>; no longer needed.
5129 (gdb_CHECK_LISP_OBJECT_TYPE, gdb_DATA_SEG_BITS)
5130 (gdb_GCTYPEBITS, gdb_USE_LSB_TAG)
5131 (CHECK_LISP_OBJECT_TYPE, DATA_SEG_BITS, GCTYPEBITS, USE_LSB_TAG):
5132 Remove; now done in lisp.h.
5133 * lisp.h (PUBLISH_TO_GDB): New macro.
5134 (GCTYPEBITS, USE_LSB_TAG, CHECK_LISP_OBJECT_TYPE, enum pvec_type)
5135 (DATA_SEG_BITS): Use it.
5136 (GCTYPEBITS, USE_LSB_TAG): Now also an enum, for GDB.
5137 (CHECK_LISP_OBJECT_TYPE, DATA_SEG_BITS): Now just an enum, for GDB.
5138 * mem-limits.h (EXCEEDS_LISP_PTR): Redo so that DATA_SEG_BITS need
5139 not be usable in #if. This simplifies things.
5141 2012-07-26 Juanma Barranquero <lekktu@gmail.com>
5143 * makefile.w32-in ($(BLD)/emacs.$(O)): Update dependencies.
5145 2012-07-26 Paul Eggert <eggert@cs.ucla.edu>
5147 Simplify export of symbols to GDB (Bug#12036).
5148 * .gdbinit (xgetptr, xgetint, xgettype): Don't use "set $bugfix =
5149 $bugfix.i", as this doesn't work (with GDB 7.4.1, anyway).
5150 (xgetptr, xgetint, xgettype, xcoding, xcharset, xprintbytestr):
5151 Adjust to changes in lisp.h and emacs.c, by using
5152 CHECK_LISP_OBJECT_TYPE rather than gdb_use_struct, VALMASK instead
5153 of $valmask, DATA_SEG_BITS instead of gdb_data_seg_bits,
5154 INTTYPEBITS instead of gdb_gctypebits - 1, USE_LSB_TAG instead of
5155 gdb_use_lsb, (1 << GCTYPEBITS) - 1 instead of $tagmask, VALBITS
5156 instead of gdb_valbits.
5157 (xvectype, xvector, xpr, xprintstr, xbacktrace): Similarly, use
5158 PSEUDOVECTOR_FLAG instead of PVEC_FLAG, and ARRAY_MARK_FLAG
5159 instead of gdb_array_mark_flag.
5160 (xboolvector): Get size from $->size, not $->header.size.
5161 Use BOOL_VECTOR_BITS_PER_CHAR rather than mystery constants.
5162 (xreload, hook-run, hookpost-run): Remove.
5163 * emacs.c: Include <verify.h>.
5164 (gdb_use_lsb, gdb_use_struct, gdb_valbits, gdb_gctypebits)
5165 (gdb_data_seg_bits, PVEC_FLAG, gdb_array_mark_flag, gdb_pvec_type):
5167 (gdb_CHECK_LISP_OBJECT_TYPE, gdb_DATA_SEG_BITS, gdb_GCTYPEBITS)
5168 (gdb_USE_LSB_TAG): New enum constants.
5169 (CHECK_LISP_OBJECT_TYPE, DATA_SEG_BITS, GCTYPEBITS, USE_LSB_TAG):
5170 Also define these as enum constants, so they're visible to GDB.
5171 (ARRAY_MARK_FLAG_VAL, PSEUDOVECTOR_FLAG_VAL, VALMASK_VAL): New macros.
5172 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Also define these
5173 as constants, so they're visible to GDB.
5174 * lisp.h (VALBITS, INTTYPEBITS, FIXNUM_BITS, PSEUDOVECTOR_SIZE_BITS)
5175 (PSEUDOVECTOR_SIZE_MASK, PVEC_TYPE_MASK, BOOL_VECTOR_BITS_PER_CHAR):
5176 Now enum constants, not macros, so they're visible to GDB.
5177 (CHECK_LISP_OBJECT_TYPE, DATA_SEG_BITS): Default to 0, as this is
5178 more convenient now. All uses changed.
5179 (VALMASK) [USE_LSB_TAG]: Also define in this case.
5180 * mem-limits.h (EXCEEDS_LISP_PTR): Adjust to DATA_SEG_BITS change.
5182 2012-07-26 Dmitry Antipov <dmantipov@yandex.ru>
5184 Explicitly free restriction data that are not needed anymore.
5185 * editfns.c (save_restriction_restore): Free restriction data.
5187 2012-07-26 Stefan Monnier <monnier@iro.umontreal.ca>
5189 * eval.c (Fautoload_do_load): Rename from do_autoload, export to Lisp,
5190 add argument, tune behavior, and adjust all callers.
5192 2012-07-25 Paul Eggert <eggert@cs.ucla.edu>
5194 Use typedef for EMACS_INT, EMACS_UINT.
5195 * lisp.h, s/ms-w32.h (EMACS_INT, EMACS_UINT): Use typedefs rather
5196 than macros. This simplifies debugging in the usual case, since
5197 it lets GDB show addresses as 'EMACS_INT *' rather than 'long int *'
5198 and it allows expressions involving EMACS_INT casts.
5199 * .gdbinit (xreload): Simplify by using EMACS_INT cast.
5201 2012-07-25 Jan Djärv <jan.h.d@swipnet.se>
5203 * nsterm.m (ns_read_socket): Return early if there is a modal
5206 2012-07-25 Martin Rudalics <rudalics@gmx.at>
5208 * frame.c (Fredirect_frame_focus): In doc-string don't mention
5209 that FOCUS-FRAME can be omitted.
5211 2012-07-25 Dmitry Antipov <dmantipov@yandex.ru>
5213 Adjust buffer text indirection counters at the end of Fkill_buffer.
5214 * buffer.c (Fkill_buffer): Adjust indirection counters when the
5215 buffer is definitely dead. This should really fix an issue reported
5216 by Christoph Scholtes again. (Bug#12007).
5217 (init_buffer_once): Initialize indirection counters of
5218 buffer_defaults and buffer_local_symbols (for sanity and safety).
5220 2012-07-24 Eli Zaretskii <eliz@gnu.org>
5222 * xdisp.c (init_iterator): Don't compute dimensions of truncation
5223 and continuation glyphs on tooltip frames, leave them at zero.
5224 Avoids continued lines in tooltips. (Bug#11832)
5226 2012-07-24 Dmitry Antipov <dmantipov@yandex.ru>
5228 Simplify copy_overlay.
5229 * buffer.c (copy_overlay): Simplify. Use build_marker.
5230 * lisp.h (struct Lisp_Overlay): Restore comment with minor tweaks.
5232 2012-07-23 Eli Zaretskii <eliz@gnu.org>
5234 * print.c (print_object): Don't crash when a frame's name is nil
5235 or invalid. (Bug#12025)
5237 * window.c (decode_any_window): Disable CHECK_LIVE_FRAME test, as
5238 it signals an error when a tooltip frame is being created.
5240 2012-07-23 Dmitry Antipov <dmantipov@yandex.ru>
5242 Cleanup miscellaneous objects allocation and initialization.
5243 * alloc.c (allocate_misc): Change to static. Add argument to
5244 specify the subtype. Adjust comment and users.
5245 (build_overlay): New function.
5246 * buffer.c (copy_overlays, Fmake_overlay): Use it.
5247 * lisp.h (struct Lisp_Overlay): Remove obsolete comment.
5248 (allocate_misc): Remove prototype.
5249 (build_overlay): Add prototype.
5251 2012-07-23 Dmitry Antipov <dmantipov@yandex.ru>
5253 Swap buffer text indirection counters in Fbuffer_swap_text.
5254 * buffer.c (Fbuffer_swap_text): Swap indirections too.
5255 This avoids crash reported by Christoph Scholtes at
5256 http://lists.gnu.org/archive/html/bug-gnu-emacs/2012-07/msg00785.html.
5258 2012-07-22 Jan Djärv <jan.h.d@swipnet.se>
5260 * nsmenu.m (Popdown_data): New struct.
5261 (pop_down_menu): p->pointer is Popdown_data. Release the pool and
5263 (ns_popup_dialog): Use NSAutoreleasePool and pass it to pop_down_menu.
5264 (initWithContentRect): Make imgView and contentView non-static
5265 and autorelease them. Also autorelease img and matrix (Bug#12005).
5266 (dealloc): Remove (Bug#12005).
5268 2012-07-22 Dmitry Antipov <dmantipov@yandex.ru>
5270 Adjust consing_since_gc when objects are explicitly freed.
5271 * alloc.c (GC_DEFAULT_THRESHOLD): New macro.
5272 (Fgarbage_collect): Use it. Change minimum to 1/10 of default.
5273 (free_cons, free_misc): Subtract object size from consing_since_gc.
5275 2012-07-22 Dmitry Antipov <dmantipov@yandex.ru>
5277 Simplify and cleanup markers positioning code.
5278 * marker.c (attach_marker): More useful eassert.
5279 (live_buffer, set_marker_internal): New function.
5280 (Fset_marker, set_marker_restricted): Use set_marker_internal.
5281 (set_marker_both, set_marker_restricted_both): Use live_buffer.
5283 2012-07-22 Paul Eggert <eggert@cs.ucla.edu>
5285 * buffer.h (struct buffer.indirections): Now ptrdiff_t, not int,
5286 as it's limited by the amount of memory, not by INT_MAX.
5288 2012-07-21 Eli Zaretskii <eliz@gnu.org>
5290 * keyboard.c (keys_of_keyboard): Bind language-change to 'ignore'
5291 in special-event-map. See the discussion at
5292 http://lists.gnu.org/archive/html/emacs-devel/2012-06/msg00417.html
5295 * w32menu.c (add_menu_item): Cast to ULONG_PTR when assigning
5296 info.dwItemData. Fixes crashes on 64-bit Windows.
5297 Suggested by Fabrice Popineau <fabrice.popineau@supelec.fr>.
5299 2012-07-21 Jan Djärv <jan.h.d@swipnet.se>
5301 * nsterm.m (accessibilityAttributeValue): New function. (Bug#11134).
5302 (conversationIdentifier): Return value is NSInteger.
5303 * nsterm.m (accessibilityAttributeValue): Surround with NS_IMPL_COCOA.
5305 2012-07-21 Chong Yidong <cyd@gnu.org>
5307 * window.c (decode_any_window): Signal an error if the window is
5308 on a dead frame (Bug#11984).
5310 2012-07-20 Dmitry Antipov <dmantipov@yandex.ru>
5312 Add indirection counting to speed up Fkill_buffer.
5313 * buffer.h (struct buffer): New member.
5314 * buffer.c (Fget_buffer_create): Set indirection counter to 0.
5315 (Fmake_indirect_buffer): Set indirection counter to -1, increment
5316 base buffer indirection counter.
5317 (compact_buffer): If ENABLE_CHECKING, verify indirection counters.
5318 (Fkill_buffer): Adjust indirection counters as needed, don't walk
5319 through buffer list if indirection counter is 0.
5321 2012-07-20 Dmitry Antipov <dmantipov@yandex.ru>
5323 Extend the value returned by Fgarbage_collect with heap statistics.
5324 * alloc.c (Qheap): New symbol.
5325 (syms_of_alloc): DEFSYM it.
5326 (Fgarbage_collect): If DOUG_LEA_MALLOC, add mallinfo data.
5327 (Fmemory_free): Remove.
5328 (syms_of_alloc): Don't defsubr it.
5329 * buffer.c (Fcompact_buffer): Remove.
5330 (syms_of_buffer): Don't defsubr it.
5332 2012-07-20 Dmitry Antipov <dmantipov@yandex.ru>
5334 Make maybe_gc inline.
5335 Verify that inlining is always possible (GCC 4.7.1, -O3 -Winline).
5336 * lisp.h (consing_since_gc, gc_relative_threshold)
5337 (memory_full_cons_threshold): Revert declaration.
5338 (maybe_gc): Remove prototype, define as inline.
5339 * alloc.c: Remove old commented-out code.
5340 (consing_since_gc, gc_relative_threshold)
5341 (memory_full_cons_threshold): Revert to global.
5344 2012-07-20 Dmitry Antipov <dmantipov@yandex.ru>
5346 Simple wrapper for make_unibyte_string, adjust font_open_by_name.
5347 * lisp.h (build_unibyte_string): New function.
5348 * dosfns.c, fileio.c, fns.c, ftfont.c, process.c:
5349 * sysdep.c, w32fns.c, xfns.c: Use it.
5350 * font.c (font_open_by_name): Change 2nd and 3rd args to the only arg
5351 of type Lisp_Object to avoid redundant calls to make_unibyte_string.
5352 Adjust users accordingly.
5353 * font.h (font_open_by_name): Adjust prototype.
5355 2012-07-20 Dmitry Antipov <dmantipov@yandex.ru>
5357 Cleanup calls to Fgarbage_collect.
5358 * lisp.h (maybe_gc): New prototype.
5359 (consing_since_gc, gc_relative_threshold, memory_full_cons_threshold):
5360 Remove declarations.
5361 * alloc.c (maybe_gc): New function.
5362 (consing_since_gc, gc_relative_threshold, memory_full_cons_threshold):
5364 * bytecode.c (MAYBE_GC): Use maybe_gc.
5365 * eval.c (eval_sub, Ffuncall): Likewise.
5366 * keyboard.c (read_char): Likewise. Adjust call to maybe_gc
5367 to avoid dependency from auto-save feature.
5369 2012-07-19 Paul Eggert <eggert@cs.ucla.edu>
5371 * buffer.h (FOR_EACH_BUFFER): Rename from 'for_each_buffer'.
5372 (FOR_EACH_PER_BUFFER_OBJECT_AT): Rename from
5373 'for_each_per_buffer_object_at'.
5374 All uses changed. It's better to use upper-case for macros that
5375 cannot be implemented as functions, to give the reader a clue
5376 that they're special.
5378 2012-07-19 Stefan Monnier <monnier@iro.umontreal.ca>
5380 * alloc.c (Fgarbage_collect): Tweak docstring.
5382 2012-07-19 Dmitry Antipov <dmantipov@yandex.ru>
5384 Tweak the value returned from Fgarbage_collect again.
5385 * alloc.c (Fgarbage_collect): New return value, as confirmed in
5386 http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00418.html.
5387 Adjust documentation.
5388 (total_vector_bytes): Rename to total_vector_slots, adjust
5390 (total_free_vector_bytes): Rename to total_free_vector_slots,
5392 (Qstring_bytes, Qvector_slots): New symbols.
5393 (syms_of_alloc): DEFSYM them.
5395 2012-07-19 Dmitry Antipov <dmantipov@yandex.ru>
5397 Buffer compaction primitive which may be used from Lisp.
5398 * buffer.c (compact_buffer, Fcompact_buffer): New function.
5399 (syms_of_buffer): Register Fcompact_buffer.
5400 * alloc.c (Fgarbage_collect): Use compact_buffer.
5401 * buffer.h (compact_buffer): New prototype.
5402 (struct buffer_text): New member.
5404 2012-07-19 Dmitry Antipov <dmantipov@yandex.ru>
5406 New macro to iterate over all buffers, miscellaneous cleanups.
5407 * lisp.h (all_buffers): Remove declaration.
5408 * buffer.h (all_buffers): Add declaration, with comment.
5409 (for_each_buffer): New macro.
5410 * alloc.c (Fgarbage_collect, mark_object): Use it.
5411 * buffer.c (Fkill_buffer, Fbuffer_swap_text, Fset_buffer_multibyte)
5412 (init_buffer): Likewise.
5413 * data.c (Fset_default): Likewise.
5414 * coding.c (code_conversion_restore): Remove redundant check
5416 * buffer.c (Fkill_buffer): Likewise. Remove obsolete comment.
5418 2012-07-18 Andreas Schwab <schwab@linux-m68k.org>
5420 Fix bug that created negative-length intervals.
5421 * intervals.c (merge_interval_right, merge_interval_left):
5422 Do not zero out this interval if it is absorbed by its children,
5423 as this interval's total length doesn't change in that case. See
5424 <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00403.html>.
5426 2012-07-18 Paul Eggert <eggert@cs.ucla.edu>
5428 * alloc.c (Fmake_bool_vector): Fix off-by-8 bug
5429 when invoking (make-bool-vector N t) and N is a positive
5430 multiple of 8 -- the last 8 bits were mistakenly cleared.
5432 Remove some struct layout assumptions in bool vectors.
5433 * alloc.c (bool_header_size): New constant.
5434 (header_size, word_size): Move earlier, as they're now used earlier.
5435 Use 'word_size' in a few more places, where it's appropriate.
5436 (Fmake_bool_vector, sweep_vectors): Don't assume that there is no
5437 padding before the data member of a bool vector.
5438 (sweep_vectors): Use PSEUDOVECTOR_TYPEP, in an eassert, rather
5439 than doing the check by hand with an abort ().
5441 2012-07-18 Stefan Monnier <monnier@iro.umontreal.ca>
5443 * eval.c (Fdefvar): Don't check constants since we only set the var if
5444 it's not yet defined anyway (bug#11904).
5446 * lisp.h (last_undo_boundary): Declare new var.
5447 * keyboard.c (command_loop_1): Set it.
5448 * cmds.c (Fself_insert_command): Use it to only remove boundaries that
5449 were auto-added by the command loop (bug#11774).
5451 2012-07-18 Andreas Schwab <schwab@linux-m68k.org>
5453 * w32font.c (Qsymbol): Remove local definition.
5454 (syms_of_w32font): Don't DEFSYM it.
5456 2012-07-18 Dmitry Antipov <dmantipov@yandex.ru>
5458 Fix sweep_vectors to handle large bool vectors correctly.
5459 * alloc.c (sweep_vectors): Account total_vector_bytes for
5460 bool vectors larger than VBLOCK_BYTES_MAX.
5462 2012-07-18 Chong Yidong <cyd@gnu.org>
5464 * frame.c (x_set_frame_parameters): Revert bogus change introduced
5465 in 2012-05-25 commit by Paul Eggert (Bug#11738).
5467 2012-07-18 Dmitry Antipov <dmantipov@yandex.ru>
5469 Return more descriptive data from Fgarbage_collect.
5470 Suggested by Stefan Monnier in
5471 http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00369.html.
5472 * alloc.c (bounded_number): New function.
5473 (total_buffers, total_vectors): New variable.
5474 (total_string_size): Rename to total_string_bytes, adjust users.
5475 (total_vector_size): Rename to total_vector_bytes, adjust users.
5476 (sweep_vectors): Account total_vectors and total_vector_bytes.
5477 (Fgarbage_collect): New return value. Adjust documentation.
5478 (gc_sweep): Account total_buffers.
5479 (Fmemory_free, Fmemory_use_counts): Use bounded_number.
5480 (VECTOR_SIZE): Remove.
5481 * data.c (Qfloat, Qvector, Qsymbol, Qstring, Qcons): Make global.
5482 (Qinterval, Qmisc): New symbols.
5483 (syms_of_data): Initialize them.
5484 * lisp.h (Qinterval, Qsymbol, Qstring, Qmisc, Qvector, Qfloat)
5485 (Qcons, Qbuffer): New declarations.
5487 2012-07-17 Paul Eggert <eggert@cs.ucla.edu>
5489 * alloc.c (Fmemory_free): Account for memory-free's own storage.
5490 Round up, not down. Improve doc.
5492 2012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
5494 Restore old code in allocate_string_data to avoid Faset breakage.
5495 Reported by Julien Danjou <julien@danjou.info> in
5496 http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00371.html.
5497 * alloc.c (allocate_string_data): Restore old code with minor
5498 adjustments, fix comment to explain this subtle issue.
5500 2012-07-17 Eli Zaretskii <eliz@gnu.org>
5502 Remove FILE_SYSTEM_CASE.
5503 * s/msdos.h (FILE_SYSTEM_CASE): Don't define.
5505 * fileio.c (FILE_SYSTEM_CASE): Don't define.
5506 (Ffile_name_directory, Fexpand_file_name): Don't use FILE_SYSTEM_CASE.
5507 Fixes problems on MS-DOS with Vtemp_file_name_pattern when
5508 call-process-region passes it through expand-file-name.
5510 * dired.c (file_name_completion): Don't use FILE_SYSTEM_CASE.
5512 2012-07-17 Andreas Schwab <schwab@linux-m68k.org>
5514 Fix crash when creating indirect buffer (Bug#11917)
5515 * buffer.c (buffer_lisp_local_variables): Add argument CLONE.
5516 Don't handle unbound variables specially if non-zero.
5517 (Fbuffer_local_variables): Pass zero.
5518 (clone_per_buffer_values): Pass non-zero.
5520 2012-07-17 Andreas Schwab <schwab@linux-m68k.org>
5522 * gnutls.c (emacs_gnutls_handshake): Revert last change. Add QUIT
5523 to make the loop interruptible.
5525 2012-07-17 Andreas Schwab <schwab@linux-m68k.org>
5527 * gnutls.c (emacs_gnutls_handshake): Only retry if
5528 GNUTLS_E_INTERRUPTED.
5530 2012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
5532 Cleanup and convert miscellaneous checks to eassert.
5533 * alloc.c (mark_interval): Fix comment, partially rephrase
5534 old comment from intervals.h (see below).
5535 * intervals.c (find_interval, adjust_intervals_for_insertion)
5536 (delete_interval, adjust_intervals_for_deletion)
5537 (graft_intervals_into_buffer, temp_set_point_both, copy_intervals):
5539 (adjust_intervals_for_insertion, make_new_interval):
5540 Remove obsolete and unused code.
5541 * intervals.h (struct interval): Remove obsolete comment.
5542 * textprotp.c (erase_properties): Remove unused code.
5543 (Fadd_text_properties, set_text_properties_1, Fremove_text_properties)
5544 (Fremove_list_of_text_properties): Convert to eassert.
5546 2012-07-17 Chong Yidong <cyd@gnu.org>
5548 * editfns.c (Finsert_char): Doc fix.
5550 2012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
5552 Fix previous change to make Fmemory_free always accurate.
5553 * alloc.c (make_interval): Update total_free_intervals.
5554 (make_float): Likewise for total_free_floats.
5555 (free_cons, Fcons): Likewise for total_free_conses.
5556 (SETUP_ON_FREE_LIST, allocate_vector_from_block):
5557 Likewise for total_free_vector_bytes.
5558 (Fmake_symbol): Likewise for total_free_symbols.
5559 (bytes_free): Remove.
5561 2012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
5563 Simple free memory accounting feature.
5564 * alloc.c (bytes_free, total_free_vector_bytes): New variable.
5565 (sweep_vectors): Accumulate size of free vectors.
5566 (Fgarbage_collect): Setup bytes_free.
5567 (Fmemory_free): New function.
5568 (syms_of_alloc): Register it.
5570 2012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
5572 Cleanup overlays checking.
5573 * buffer.h (OVERLAY_VALID): Remove as useless synonym of OVERLAYP.
5574 * buffer.c (overlay_touches_p, recenter_overlay_lists): Change to
5575 eassert and OVERLAYP.
5576 (sort_overlays): Change to use OVERLAYP.
5578 2012-07-16 René Kyllingstad <Rene@Kyllingstad.com> (tiny change)
5580 * editfns.c (Finsert_char): Make it interactive, and make the
5581 second arg optional. Copy interactive spec and docstring from
5584 2012-07-17 Paul Eggert <eggert@cs.ucla.edu>
5586 * floatfns.c (Fabs): Do not wrap fabs inside IN_FLOAT (Bug#11913).
5587 Unlike the other wrapped functions, fabs has an unspecified
5590 2012-07-16 Jan Djärv <jan.h.d@swipnet.se>
5592 * nsterm.m (keyDown): Interpret flags without left/right bits
5593 as the left key (Bug#11670).
5595 2012-07-16 Dmitry Antipov <dmantipov@yandex.ru>
5597 Remove empty and useless init functions.
5598 * lisp.h (init_character_once, init_fns, init_image)
5599 (init_filelock, init_sound): Remove prototype.
5600 * character.c (init_character_once): Remove.
5601 * filelock.c (init_filelock): Likewise.
5602 * fns.c (init_fns): Likewise.
5603 * image.c (init_image): Likewise.
5604 * sound.c (init_sound): Likewise.
5605 * emacs.c (main): Adjust accordingly.
5607 2012-07-16 Dmitry Antipov <dmantipov@yandex.ru>
5609 * gtkutil.h: Tiny cleanups.
5610 (use_old_gtk_file_dialog): Remove useless declaration.
5611 (xg_uses_old_file_dialog): Add suggested const attribute.
5613 2012-07-15 Eli Zaretskii <eliz@gnu.org>
5615 * bidi.c (MAX_STRONG_CHAR_SEARCH): New macro.
5616 (bidi_paragraph_init): Use it to limit search forward for a strong
5617 directional character in abnormally large paragraphs full of
5618 neutral or weak characters. (Bug#11943)
5620 2012-07-15 Stefano Facchini <stefano.facchini@gmail.com> (tiny change)
5622 * gtkutil.c (xg_create_tool_bar): Apply "primary-toolbar" style to
5623 the toolbar (Bug#9451).
5624 (xg_make_tool_item): Give the widget event box a transparent
5627 2012-07-15 Dmitry Antipov <dmantipov@yandex.ru>
5629 Cleanup basic allocation variables and functions.
5630 * alloc.c (ignore_warnings, init_intervals, init_float)
5631 (init_cons, init_symbol, init_marker): Remove.
5632 (interval_block_index): Initialize to INTERVAL_BLOCK_SIZE.
5633 (float_block_index): Initialize to FLOAT_BLOCK_SIZE.
5634 (cons_block_index): Initialize to CONS_BLOCK_SIZE.
5635 (symbol_block_size): Initialize to SYMBOL_BLOCK_SIZE.
5636 (marker_block_index): Initialize to MARKER_BLOCK_SIZE.
5637 (staticidx, init_alloc_once, init_strings, free_ablock):
5638 Remove redundant initialization.
5639 * fns.c (init_weak_hash_tables): Remove.
5640 * lisp.h (init_weak_hash_tables): Remove prototype.
5642 2012-07-15 Dmitry Antipov <dmantipov@yandex.ru>
5644 Use zero_vector where appropriate.
5645 * alloc.c (zero_vector): Define as Lisp_Object. Adjust users
5647 * lisp.h (zero_vector): New declaration.
5648 * font.c (null_vector): Remove.
5649 (syms_of_font): Remove initialization and staticpro.
5650 (font_list_entities, font_find_for_lface): Change to use zero_vector.
5651 * keymap.c (Faccessible_keymaps): Likewise.
5653 2012-07-15 Leo Liu <sdl.web@gmail.com>
5655 * fringe.c: Fix typo in comments.
5657 2012-07-14 Leo Liu <sdl.web@gmail.com>
5659 * fringe.c: Add a new bitmap exclamation-mark.
5661 2012-07-14 Eli Zaretskii <eliz@gnu.org>
5663 * gmalloc.c (GMALLOC_INHIBIT_VALLOC): Don't reference.
5665 * s/msdos.h (BSD_SYSTEM, DATA_START, GC_SETJMP_WORKS, HAVE_MOUSE)
5666 (HAVE_MENUS): Don't define, defined by editing config.in with
5668 (GMALLOC_INHIBIT_VALLOC): Don't define.
5669 (MODE_LINE_BINARY_TEXT): Remove, not used anymore.
5671 2012-07-14 Juanma Barranquero <lekktu@gmail.com>
5673 * s/ms-w32.h (GC_SETJMP_WORKS, GC_MARK_STACK): Set in nt/config.nt.
5675 2012-07-14 Glenn Morris <rgm@gnu.org>
5677 * s/aix4-2.h, s/freebsd.h, s/gnu-linux.h, s/hpux10-20.h:
5678 * s/irix6-5.h, s/netbsd.h, s/sol2-6.h, s/unixware.h:
5679 Let configure set GC_SETJMP_WORKS, GC_MARK_STACK.
5681 2012-07-13 Glenn Morris <rgm@gnu.org>
5683 * s/gnu-linux.h (GC_MARK_SECONDARY_STACK): Let configure set it.
5685 * s/usg5-4-common.h (SETUP_SLAVE_PTY): Let configure set it.
5686 * s/irix6-5.h (SETUP_SLAVE_PTY): No more need to unset it.
5688 2012-07-13 Jan Djärv <jan.h.d@swipnet.se>
5690 * nsterm.m (uRect): Only define if NS_IMPL_GNUSTEP.
5691 (x_free_frame_resources): Pass x_free_frame_resources to NSTRACE.
5692 (ns_lisp_to_color, ns_string_to_lispmod, ns_term_init)
5693 (ns_term_shutdown, requestService, initFrameFromEmacs): Use SSDATA
5695 (ns_exec_path, ns_load_path, changeFont): Put () around assignment used
5696 as boolean expression.
5697 (x_set_window_size): Remove unused variable toolbar.
5698 (ns_get_color_default, ns_mod_to_lisp): Remove.
5699 (ns_mouse_position): Remove unused variables xchar and ychar.
5700 (ns_compute_glyph_string_overhangs): Remove unused variable face.
5701 (ns_set_vertical_scroll_bar): Remove unused variable count.
5702 (ns_delete_terminal): Remove unused variable i.
5703 (ns_term_init): Remove unused variables r, g and b.
5704 (mouseDown): Remove unused variable window.
5705 (windowDidResize): Move definition of theWindow inside NS_IMPL_GNUSTEP.
5706 (initFrameFromEmacs): Remove unused variable vbextra.
5707 (mouseEntered): Remove unused variables p and dpyinfo.
5708 (mouseExited): Remove unused variables p and r.
5709 (ns_define_frame_cursor, ns_clear_frame_area)
5710 (ns_draw_window_cursor, ns_initialize_display_info): Make static.
5711 (menuDown): Assign [sender tag] to variable and cast the variable.
5713 * nsterm.h (menuDown): Add id as type to argument sender.
5714 (ns_display_info_for_name): Add Lisp_Object argument.
5715 (ns_term_init): Add Lisp_Object argument.
5716 (ns_map_event_to_object): Add void argument.
5717 (ns_string_from_pasteboard, ns_string_to_pasteboard): Add correct
5718 prototype with arguments and only declare if __OBJC__.
5719 (nxatoms_of_nsselect): Add void argument.
5720 (ns_lisp_to_cursor_type): Add Lisp_Object argument.
5721 (ns_alloc_autorelease_pool): Add void argument.
5722 (ns_release_autorelease_pool): Add void* argument.
5723 (ns_get_defaults_value): Add const char* argument.
5725 * nsmenu.m (ns_update_menubar, ns_menu_show, process_dialog)
5726 (initFromContents): Use SSDATA where appropriate.
5727 (ns_update_menubar): Add braces to ambigous if-else.
5728 (initWithTitle): Put () around assignment in if statement.
5729 (ns_menu_show): Remove unused variables window and keymap.
5730 (update_frame_tool_bar): Remove unused variable selected_p.
5731 (initWithContentRect): Remove unused variable this_cmd_name.
5733 * nsimage.m (ns_load_image, allocInitFromFile): Use SSDATA where
5735 (setXBMColor): Remove unused variable len.
5736 (setPixmapData): Put () around assignment in loop statement.
5738 * nsfont.m (ns_get_family, ns_lang_to_script, ns_otf_to_script)
5739 (ns_registry_to_script, ns_get_req_script, nsfont_open): Use SSDATA
5741 (ns_get_covering_families, ns_findfonts, nsfont_list_family): Put ()
5742 around assignment in loop statement.
5743 (nsfont_open): Remove unused variable i.
5744 (nsfont_open): Remove unused variable len.
5745 (nsfont_draw): Remove unused variable cs.
5747 * nsfns.m (x_set_icon_name, ns_set_name_internal)
5748 (ns_set_name_as_filename, ns_implicitly_set_icon_type)
5749 (x_set_icon_type, ns_lisp_to_cursor_type, Fns_read_file_name)
5750 (Fns_get_resource, Fns_set_resource, Fx_open_connection)
5751 (Fns_font_name, Fns_perform_service)
5752 (Fns_convert_utf8_nfd_to_nfc, ns_do_applescript)
5753 (Fns_do_applescript, Fx_show_tip): Use SSDATA where appropriate.
5754 (ns_set_name): Remove unused variable view.
5755 (x_set_menu_bar_lines): Remove unused variable olines.
5756 (x_set_tool_bar_lines): Remove unused variable root_window.
5757 (Fns_list_colors): Put () around assignment in while statement.
5758 (Fns_perform_service): Remove unused variable len.
5759 (Fns_display_usable_bounds): Remove unused variable top.
5760 (syms_of_nsfns): Remove unused variable i.
5762 * nsmenu.m (ns_update_menubar): Exchange place of argument 2 and 3 to
5765 2012-07-13 Kalle Kankare <kalle.kankare@iki.fi> (tiny change)
5767 * image.c (Fimagemagick_types): Initialize ex with GetExceptionInfo
5768 and free it with DestroyExceptionInfo (Bug#11558).
5770 2012-07-13 Juanma Barranquero <lekktu@gmail.com>
5772 * s/ms-w32.h (FIRST_PTY_LETTER, HAVE_SOCKETS): Move to nt/config.nt.
5773 (HAVE_ATTRIBUTE_ALIGNED, HAVE_C99_STRTOLD, HAVE___BUILTIN_UNWIND_INIT):
5774 Set here, not in nt/config.nt.
5776 2012-07-13 Eli Zaretskii <eliz@gnu.org>
5778 * xdisp.c (move_it_in_display_line_to): On GUI terminals, allow
5779 cursor overflow into the last glyph on display line when the right
5780 fringe is off. (Bug#11832)
5782 2012-07-13 Paul Eggert <eggert@cs.ucla.edu>
5784 * xdisp.c (produce_special_glyphs): Now static.
5785 * dispextern.h (produce_special_glyphs): Remove decl.
5787 2012-07-13 Glenn Morris <rgm@gnu.org>
5789 * s/bsd-common.h, s/cygwin.h: Remove empty files.
5790 * s/freebsd.h, s/netbsd.h: Do not include bsd-common.h.
5792 * s/usg5-4-common.h (USG, USG5):
5793 * s/template.h (USG5, USG, HPUX, BSD4_2, BSD_SYSTEM):
5794 * s/sol2-6.h (SOLARIS2):
5795 * s/irix6-5.h (IRIX6_5):
5796 * s/hpux10-20.h (USG, USG5, HPUX):
5797 * s/gnu-linux.h (USG, GNU_LINUX):
5798 * s/freebsd.h (BSD_SYSTEM):
5799 * s/darwin.h (BSD4_2, BSD_SYSTEM, DARWIN_OS):
5800 * s/cygwin.h (CYGWIN):
5801 * s/bsd-common.h (BSD_SYSTEM, BSD4_2):
5802 * s/aix4-2.h (USG, USG5, _AIX): Move "system type" macros to configure.
5804 2012-07-13 BT Templeton <bpt@hcoop.net> (tiny change)
5806 * nsfont.m (ns_charset_covers): Don't abort if no bitmap (Bug#11853).
5808 2012-07-13 Glenn Morris <rgm@gnu.org>
5810 * s/usg5-4-common.h (NSIG_MINIMUM): Let configure set it.
5812 * s/gnu-linux.h, s/irix6-5.h: Let configure set ULIMIT_BREAK_VALUE.
5814 * process.c (init_process_emacs): Replace MIN_PTY_KERNEL_VERSION.
5815 * s/darwin.h (MIN_PTY_KERNEL_VERSION): Remove single-use macro.
5817 2012-07-12 Glenn Morris <rgm@gnu.org>
5819 * s/darwin.h (SYSTEM_PURESIZE_EXTRA): Move to configure.
5821 * process.c (init_process_emacs): Rename from init_process.
5822 The old name is also the name of a Mach system call.
5823 * lisp.h, emacs.c: Update for this name change.
5824 * nsgui.h, sysselect.h, s/darwin.h: Remove workaround that is no
5827 2012-07-12 Eli Zaretskii <eliz@gnu.org>
5829 * xdisp.c (insert_left_trunc_glyphs): Fix incorrect size in
5830 memmove call that removes glyphs covered by the left truncation
5831 glyph. Improve commentary.
5832 (display_line): Fix display of continuation glyphs on GUI frames
5833 when the right fringe is turned off and variable-size fonts are
5834 used in the window. Move the code that appends a stretch glyph to
5835 produce_special_glyphs, so that it could be used for truncation
5836 and continuation glyphs alike.
5837 (produce_special_glyphs) [HAVE_WINDOW_SYSTEM]: Produce a stretch
5838 glyph of a suitably computed width, to align the special glyphs at
5839 the window margin. Code moved from display_line. (Bug#11832)
5841 2012-07-12 Glenn Morris <rgm@gnu.org>
5843 * s/aix4-2.h, s/hpux10-20.h: Let configure set NO_EDITRES.
5845 * s/gnu-linux.h, s/hpux10-20.h:
5846 Do not unconditionally define HAVE_XRMSETDATABASE.
5848 * s/gnu-linux.h (UNIX98_PTYS): Let configure set it.
5850 2012-07-12 Paul Eggert <eggert@cs.ucla.edu>
5852 Fix typos that broke OS X build.
5853 Reported by Randal L. Schwartz in
5854 <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00225.html>.
5855 * nsterm.m (ns_timeout): Add missing local decl.
5856 (ns_get_color): snprintf -> sprintf, to fix typo.
5858 2012-07-12 Glenn Morris <rgm@gnu.org>
5860 * src/s/aix4-2.h, src/s/cygwin.h, src/s/darwin.h:
5861 * src/s/gnu-linux.h, src/s/hpux10-20.h, src/s/irix6-5.h:
5862 * src/s/sol2-6.h, src/s/unixware.h, src/s/usg5-4-common.h:
5863 Move PTY_NAME_SPRINTF, PTY_TTY_NAME_SPRINTF to configure.
5865 * s/cygwin.h, s/darwin.h, s/gnu-linux.h, s/irix6-5.h:
5866 Move PTY_OPEN to configure.
5868 * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/darwin.h:
5869 * s/gnu-linux.h, s/hpux10-20.h, s/irix6-5.h, s/template.h:
5870 * s/usg5-4-common.h: Move FIRST_PTY_LETTER, PTY_ITERATION to configure.
5872 2012-07-12 Dmitry Antipov <dmantipov@yandex.ru>
5874 Use empty_unibyte_string where applicable.
5875 * keyboard.c (parse_tool_bar_item): Use empty_unibyte_string.
5876 * lread.c (read1): Likewise.
5877 * xsettings.c (syms_of_xsettings): Likewise.
5879 2012-07-12 Glenn Morris <rgm@gnu.org>
5881 * s/cygwin.h (G_SLICE_ALWAYS_MALLOC):
5882 * s/freebsd.h (BROKEN_PTY_READ_AFTER_EAGAIN):
5883 * s/irix6-5.h (SETPGRP_RELEASES_CTTY, PREFER_VSUSP):
5884 * s/hpux10-20.h (RUN_TIME_REMAP):
5885 * s/bsd-common.h (TABDLY): Move to configure.
5887 * s/hpux10-20.h, s/sol2-6.h: Move XOS_NEEDS_TIME_H to configure.
5889 * s/bsd-common.h, s/darwin.h: Move TAB3 to configure.
5891 * s/aix4-2.h (BROKEN_FIONREAD, BROKEN_SIGAIO, BROKEN_SIGPTY)
5892 (BROKEN_SIGPOLL, BROKEN_GET_CURRENT_DIR_NAME): Let configure set them.
5894 * s/darwin.h (NO_ABORT, NO_MATHERR): Let configure set them.
5896 * s/bsd-common.h, s/cygwin.h, s/gnu-linux.h, s/irix6-5.h:
5897 * s/template.h: Move NARROWPROTO to configure.
5899 2012-07-11 Glenn Morris <rgm@gnu.org>
5901 * s/gnu-linux.h, s/sol2-6.h: No longer define POSIX,
5902 unused since 2011-01-17 change to systty.h.
5904 * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/darwin.h, s/gnu-linux.h:
5905 * s/hpux10-20.h, s/template.h, s/usg5-4-common.h:
5906 Move HAVE_PTYS and HAVE_SOCKETS to configure.
5908 2012-07-11 Paul Eggert <eggert@cs.ucla.edu>
5910 * s/sol2-6.h (HAVE_LIBKSTAT): Remove. (Bug#11914)
5912 2012-07-11 Glenn Morris <rgm@gnu.org>
5914 * s/darwin.h, s/gnu-linux.h, s/template.h:
5915 Move INTERRUPT_INPUT to configure.
5917 2012-07-11 Dmitry Antipov <dmantipov@yandex.ru>
5919 Minor adjustments to interning code.
5920 * lisp.h (intern, intern_c_string): Redefine as static inline
5921 wrappers for intern_1 and intern_c_string_1, respectively.
5922 (intern_1, intern_c_string_1): Rename prototypes.
5923 * lread.c (intern_1, intern_c_string_1, oblookup):
5924 Simplify Vobarray checking.
5925 * font.c (font_intern_prop): Likewise. Adjust comment.
5926 * w32font.c (intern_font_name): Likewise.
5928 2012-07-11 Andreas Schwab <schwab@linux-m68k.org>
5930 * gnutls.c (Fgnutls_boot): Properly parse :keylist argument.
5932 * coding.c (Fdefine_coding_system_internal): Use XCAR/XCDR instead
5933 of Fcar/Fcdr if possible.
5934 * font.c (check_otf_features): Likewise.
5935 * fontset.c (Fnew_fontset): Likewise.
5936 * gnutls.c (Fgnutls_boot): Likewise.
5937 * minibuf.c (read_minibuf): Likewise.
5938 * msdos.c (IT_set_frame_parameters): Likewise.
5939 * xmenu.c (Fx_popup_dialog): Likewise.
5940 * w32menu.c (Fx_popup_dialog): Likewise.
5942 2012-07-11 Glenn Morris <rgm@gnu.org>
5944 * s/bsd-common.h, s/cygwin.h: No need to undefine INTERRUPT_INPUT,
5945 since nothing has defined it on these platforms.
5947 * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/gnu-linux.h:
5948 * s/irix6-5.h: Move SIGNALS_VIA_CHARACTERS to configure.
5950 * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/darwin.h:
5951 * s/gnu-linux.h, s/hpux10-20.h, s/template.h, s/usg5-4-common.h:
5952 Move CLASH_DETECTION to configure.
5954 * s/gnu.h: Remove file, which is now empty.
5956 * s/gnu.h, s/gnu-linux.h:
5957 Move GNU_LIBRARY_PENDING_OUTPUT_COUNT to configure.
5959 2012-07-11 John Wiegley <johnw@newartisans.com>
5961 * alloc.c (mark_memory): Guard the "no_address_safety_analysis"
5962 function attribute, so we only use it if it exists in the
5965 2012-07-11 Dmitry Antipov <dmantipov@yandex.ru>
5967 Avoid call to strlen in fast_c_string_match_ignore_case.
5968 * search.c (fast_c_string_match_ignore_case): Change to use
5969 length argument. Adjust users accordingly.
5970 * lisp.h (fast_c_string_match_ignore_case): Adjust prototype.
5972 2012-07-11 Paul Eggert <eggert@cs.ucla.edu>
5974 Assume mkdir, rmdir.
5975 * sysdep.c (mkdir) [!HAVE_MKDIR]: Remove.
5976 * sysdep.c (rmdir) [!HAVE_RMDIR]: Remove.
5979 * sysdep.c (rename) [!HAVE_RENAME]: Remove.
5982 * s/hpux10-20.h (HAVE_PERROR): Remove.
5983 * sysdep.c (perror) [HPUX && !HAVE_PERROR]:
5984 Remove dummy definition, as this problem was obsolete long ago.
5987 * sysdep.c (strerror) [!HAVE_STRERROR && !WINDOWSNT]: Remove.
5989 2012-07-11 Dmitry Antipov <dmantipov@yandex.ru>
5991 Avoid calls to strlen in font processing functions.
5992 * font.c (font_parse_name, font_parse_xlfd, font_parse_fcname)
5993 (font_open_by_name): Change to use length argument.
5994 Adjust users accordingly.
5995 * font.h (font_open_by_name, font_parse_xlfd, font_unparse_xlfd):
5997 * xfont.c (xfont_decode_coding_xlfd, font_unparse_xlfd):
5998 Change to return ptrdiff_t.
5999 (xfont_list_pattern, xfont_match): Use length returned by
6000 xfont_decode_coding_xlfd.
6001 * xfns.c (x_default_font_parameter): Omit useless xstrdup.
6003 2012-07-11 Glenn Morris <rgm@gnu.org>
6005 * s/darwin.h, s/freebsd.h, s/netbsd.h:
6006 Move DONT_REOPEN_PTY to configure.
6008 * sound.c (DEFAULT_SOUND_DEVICE) [!WINDOWSNT]:
6009 * s/netbsd.h (DEFAULT_SOUND_DEVICE): Let configure set it.
6011 2012-07-10 Paul Eggert <eggert@cs.ucla.edu>
6013 Remove "#define unix" that is no longer needed (Bug#11905).
6014 * s/aix4-2.h (unix): Remove; no longer needed.
6016 EMACS_TIME simplification (Bug#11875).
6017 This replaces macros (which typically do not work in GDB)
6018 with functions, typedefs and enums, making the code easier to debug.
6019 The functional style also makes code easier to read and maintain.
6020 * systime.h: Include <sys/time.h> on all hosts, not just if
6021 WINDOWSNT, since 'struct timeval' is needed in general.
6022 (EMACS_TIME): Now a typedef, not a macro.
6023 (EMACS_TIME_RESOLUTION, LOG10_EMACS_TIME_RESOLUTION): Now constants,
6025 (EMACS_SECS, EMACS_NSECS, EMACS_TIME_SIGN, EMACS_TIME_VALID_P)
6026 (EMACS_TIME_FROM_DOUBLE, EMACS_TIME_TO_DOUBLE, EMACS_TIME_EQ)
6027 (EMACS_TIME_NE, EMACS_TIME_GT, EMACS_TIME_GE, EMACS_TIME_LT)
6028 (EMACS_TIME_LE): Now functions, not macros.
6029 (EMACS_SET_SECS, EMACS_SET_NSECS, EMACS_SET_SECS_NSECS)
6030 (EMACS_SET_USECS, EMACS_SET_SECS_USECS): Remove these macros,
6031 which are not functions. All uses rewritten to use:
6032 (make_emacs_time): New function.
6033 (EMACS_SECS_ADDR, EMACS_SET_INVALID_TIME, EMACS_GET_TIME)
6034 (EMACS_ADD_TIME, EMACS_SUB_TIME): Remove these macros, which are
6035 not functions. All uses rewritten to use the following, respectively:
6036 (emacs_secs_addr, invalid_emacs_time, get_emacs_time)
6037 (add_emacs_time, sub_emacs_time): New functions.
6038 * atimer.c: Don't include <sys/time.h>, as "systime.h" does this.
6039 * fileio.c (Fcopy_file):
6040 * xterm.c (XTflash): Get the current time closer to when it's used.
6041 * makefile.w32-in ($(BLD)/atimer.$(O)): Update dependencies.
6043 * bytecode.c (targets): Suppress -Woverride-init warnings.
6045 Simplify by avoiding confusing use of strncpy etc.
6046 * doc.c (Fsnarf_documentation):
6047 * fileio.c (Ffile_name_directory, Fsubstitute_in_file_name):
6048 * frame.c (Fmake_terminal_frame):
6049 * gtkutil.c (get_utf8_string):
6051 * nsmenu.m (ns_update_menubar):
6052 * regex.c (regerror):
6053 Prefer memcpy to strncpy and strncat when either will do.
6054 * fileio.c (Fsubstitute_in_file_name):
6055 * keyboard.c (MULTI_LETTER_MOD, parse_modifiers_uncached)
6056 (menu_separator_name_p):
6057 * nsmenu.m (ns_update_menubar):
6058 Prefer memcmp to strncmp when either will do.
6059 * nsterm.m: Include <ftoastr.h>.
6061 * s/gnu-linux.h, s/sol2-6.h, s/unixware.h (PTY_TTY_NAME_SPRINTF):
6062 Prefer snprintf to strncpy.
6063 * nsterm.m (ns_term_init):
6064 * widget.c (set_frame_size) [0]: Prefer xstrdup to xmalloc + strncpy.
6065 * nsterm.m (ns_term_init):
6066 Avoid the need for strncpy, by using build_string or
6067 make_unibyte_string directly. Use dtoastr, not snprintf.
6068 * process.c (Fmake_network_process): Diagnose service names that
6069 are too long, rather than silently truncating them or creating
6070 non-null-terminated names.
6071 (Fnetwork_interface_info): Likewise, for interface names.
6072 * sysdep.c (system_process_attributes) [GNU_LINUX]:
6073 Prefer sprintf to strncat.
6074 * xdisp.c (debug_method_add) [GLYPH_DEBUG]:
6075 Prefer vsnprintf to vsprintf + strncpy.
6077 2012-07-10 Glenn Morris <rgm@gnu.org>
6079 * dispnew.c (PENDING_OUTPUT_COUNT) [!__GNU_LIBRARY__]:
6080 Clarify fallback case.
6082 2012-07-10 Dmitry Antipov <dmantipov@yandex.ru>
6084 Use XCAR and XCDR instead of Fcar and Fcdr where possible.
6085 * callint.c, coding.c, doc.c, editfns.c, eval.c, font.c, fontset.c,
6086 * frame.c, gnutls.c, minibuf.c, msdos.c, textprop.c, w32fns.c,
6087 * w32menu.c, window.c, xmenu.c: Change to use XCAR and XCDR
6088 where argument type is known to be a Lisp_Cons.
6090 2012-07-10 Tom Tromey <tromey@redhat.com>
6092 * bytecode.c (BYTE_CODE_THREADED): New macro.
6093 (BYTE_CODES): New macro. Replaces all old byte-code defines.
6094 (enum byte_code_op): New type.
6095 (CASE, NEXT, FIRST, CASE_DEFAULT, CASE_ABORT): New macros.
6096 (exec_byte_code): Use them. Use token threading when applicable.
6098 2012-07-10 Dmitry Antipov <dmantipov@yandex.ru>
6100 Optimize pure C strings initialization.
6101 * lisp.h (make_pure_string): Fix prototype.
6102 (build_pure_c_string): New function, defined as static inline. This
6103 provides a better opportunity to optimize away calls to strlen when
6104 the function is called with compile-time constant argument.
6105 * alloc.c (make_pure_c_string): Fix comment. Change to add nchars
6106 argument, adjust users accordingly. Use build_pure_c_string where
6108 * buffer.c, coding.c, data.c, dbusbind.c, fileio.c, fontset.c, frame.c,
6109 * keyboard.c, keymap.c, lread.c, search.c, syntax.c, w32fns.c, xdisp.c,
6110 * xfaces.c, xfns.c, xterm.c: Use build_pure_c_string where appropriate.
6112 2012-07-10 Dmitry Antipov <dmantipov@yandex.ru>
6114 Avoid calls to strlen in miscellaneous functions.
6115 * buffer.c (init_buffer): Use precalculated len, adjust if needed.
6116 * font.c (Ffont_xlfd_name): Likewise. Change to call make_string.
6117 * lread.c (openp): Likewise.
6119 2012-07-10 Dmitry Antipov <dmantipov@yandex.ru>
6121 Avoid calls to strlen in path processing functions.
6122 * fileio.c (file_name_as_directory): Add comment. Change to add
6123 srclen argument and return the length of result. Adjust users
6125 (directory_file_name): Fix comment. Change to add srclen argument,
6126 swap 1st and 2nd arguments to obey the common convention.
6127 Adjust users accordingly.
6128 * filelock.c (fill_in_lock_file_name): Avoid calls to strlen.
6130 2012-07-10 Glenn Morris <rgm@gnu.org>
6132 * s/cygwin.h, s/darwin.h, s/freebsd.h, s/netbsd.h, s/unixware.h:
6133 Move PENDING_OUTPUT_COUNT definition to configure.
6135 * s/irix6-5.h (DATA_START, DATA_SEG_BITS):
6136 * s/hpux10-20.h (DATA_SEG_BITS, DATA_START):
6137 * s/gnu.h (DATA_START): Move definitions to configure.
6139 * s/irix6-5.h (SETUP_SLAVE_PTY, PTY_NAME_SPRINTF): Drop ifdef guards.
6140 We include usg5-4-common.h, which defines them both.
6142 * s/gnu.h: Don't include fcntl.h (every file in Emacs that uses
6143 O_RDONLY already includes it).
6145 Stop ns builds setting the EMACSLOADPATH environment variable.
6146 * nsterm.m (ns_load_path): Rename from ns_init_paths.
6147 Now it does not set EMACSLOADPATH, just returns the load-path string.
6148 * nsterm.h: Update accordingly.
6149 * lread.c [HAVE_NS]: Include nsterm.h.
6150 (init_lread) [HAVE_NS]: Use ns_load_path.
6151 * emacs.c (main) [HAVE_NS]: No longer call ns_init_paths.
6153 2012-07-09 Glenn Morris <rgm@gnu.org>
6155 * s/gnu.h (SIGNALS_VIA_CHARACTERS): No need to define it here,
6156 since the included bsd-common.h does so.
6158 Stop ns builds setting the EMACSPATH environment variable.
6159 * nsterm.m (ns_exec_path): New function, split from ns_init_paths.
6160 (ns_init_paths): Do not set EMACSPATH.
6161 * nsterm.h (ns_exec_path): Add it.
6162 * callproc.c (init_callproc_1, init_callproc) [HAVE_NS]:
6165 * nsterm.m, nsterm.h (ns_etc_directory): Fix type, empty return.
6167 2012-07-09 Paul Eggert <eggert@cs.ucla.edu>
6169 * process.c (wait_reading_process_output): 'waitchannels' was unset
6170 when read_kbd || !NILP (wait_for_cell); fix this.
6172 Add GCC-style 'const' attribute to functions that can use it.
6173 * character.h (char_resolve_modifier_mask):
6174 * keyboard.h (make_ctrl_char):
6175 * lisp.h (multibyte_char_to_unibyte, multibyte_char_to_unibyte_safe)
6176 (init_character_once, next_almost_prime, init_fns, init_image)
6177 (flush_pending_output, init_sound):
6178 * mem-limits.h (start_of_data):
6179 * menu.h (finish_menu_items):
6180 Add ATTRIBUTE_CONST.
6181 * emacs.c (DEFINE_DUMMY_FUNCTION):
6182 Declare the dummy function with ATTRIBUTE_CONST.
6183 * lisp.h (Fbyteorder, Fmax_char, Fidentity):
6184 Add decls with ATTRIBUTE_CONST.
6186 Minor improvements to make_formatted_string.
6187 * alloc.c (make_formatted_string): Prefer int to ptrdiff_t
6188 where int is good enough, as vsprintf returns an int.
6189 * lisp.h (make_formatted_string): Add ATTRIBUTE_FORMAT_PRINTF.
6191 2012-07-09 Dmitry Antipov <dmantipov@yandex.ru>
6193 Use make_formatted_string to avoid double length calculation.
6194 * lisp.h (make_formatted_string): New prototype.
6195 * alloc.c (make_formatted_string): New function.
6196 * buffer.c (Fgenerate_new_buffer_name): Use it.
6197 * dbusbind.c (syms_of_dbusbind): Likewise.
6198 * editfns.c (Fcurrent_time_zone): Likewise.
6199 * filelock.c (get_boot_time): Likewise.
6200 * frame.c (make_terminal_frame, set_term_frame_name)
6201 (x_report_frame_params): Likewise.
6202 * image.c (gs_load): Likewise.
6203 * minibuf.c (get_minibuffer): Likewise.
6204 * msdos.c (dos_set_window_size): Likewise.
6205 * process.c (make_process): Likewise.
6206 * xdisp.c (ensure_echo_area_buffers): Likewise.
6207 * xsettings.c (apply_xft_settings): Likewise.
6209 2012-07-09 Glenn Morris <rgm@gnu.org>
6211 Stop ns builds polluting the environment with EMACSDATA, EMACSDOC.
6212 * nsterm.m (ns_etc_directory): New function, split from ns_init_paths.
6213 (ns_init_paths): Do not set EMACSDATA, EMACSDOC.
6214 * nsterm.h (ns_etc_directory): Add it.
6215 * callproc.c [HAVE_NS]: Include nsterm.h.
6216 (init_callproc_1, init_callproc) [HAVE_NS]: Use ns_etc_directory.
6218 2012-07-09 Dmitry Antipov <dmantipov@yandex.ru>
6220 Move marker debugging code under MARKER_DEBUG.
6221 * marker.c (MARKER_DEBUG): Move marker debugging code under
6222 #ifdef MARKER_DEBUG because byte_char_debug_check is too slow
6223 for bootstrap with --enable-checking (~3x slowdown reported
6224 by Juanma Barranquero <lekktu@gmail.com>).
6225 (verify_bytepos): Move under #ifdef MARKER_DEBUG.
6227 2012-07-08 Paul Eggert <eggert@cs.ucla.edu>
6229 * systime.h (EMACS_SUB_TIME): Clarify behavior with unsigned time_t.
6230 See <http://bugs.gnu.org/11825#29>.
6232 2012-07-08 Eli Zaretskii <eliz@gnu.org>
6234 * xdisp.c (fill_glyphless_glyph_string): If the face of the glyph
6235 has no font, use the frame's font. (Bug#11813)
6236 (display_line): Add commentary about displaying truncation glyphs
6238 (produce_special_glyphs): Move here from term.c.
6240 * term.c (produce_special_glyphs): Move to xdisp.c.
6242 * dispextern.h (produce_special_glyphs): Move prototype to xdisp.c
6245 2012-07-07 Andreas Schwab <schwab@linux-m68k.org>
6247 * xdisp.c (display_line): Avoid warning about implicit declaration
6250 * frame.c (get_frame_param): Define only if HAVE_WINDOW_SYSTEM.
6252 * lisp.h: Remove empty conditional.
6254 2012-07-07 Paul Eggert <eggert@cs.ucla.edu>
6256 * lread.c (load_path_check): Now static.
6258 Fix some minor --with-ns problems found by static checking.
6259 * frame.c (Ftool_bar_pixel_width) [!FRAME_TOOLBAR_WIDTH]:
6260 (x_set_font) [!HAVE_X_WINDOWS]:
6261 * image.c (xpm_load_image) [HAVE_NS]:
6262 (x_to_xcolors) [!HAVE_X_WINDOWS && !HAVE_NTGUI]:
6263 (x_disable_image) [!HAVE_NS && !HAVE_NTGUI]:
6264 Remove unused local.
6265 (Fx_parse_geometry) [HAVE_NS]: Don't return garbage.
6266 (xpm_load_image) [HAVE_NS && !HAVE_XPM]: Remove unused label.
6267 * image.c (x_create_bitmap_from_file) [HAVE_NS]:
6268 (xpm_load_image, xpm_load) [HAVE_NS && !HAVE_XPM]:
6269 * nsselect.m (symbol_to_nsstring, ns_string_to_pasteboard_internal):
6270 * xfaces.c (Fx_load_color_file) [!HAVE_X_WINDOWS]:
6271 Fix pointer signedness problem.
6272 * xfaces.c (FRAME_X_FONT_TABLE):
6273 * xterm.h (FRAME_X_FONT_TABLE): Remove unused, incompatible macros.
6275 2012-07-07 Glenn Morris <rgm@gnu.org>
6277 * lread.c (load_path_check): New function, split from init_lread.
6278 (init_lread): Reorganize. Motivation:
6279 If EMACSLOADPATH is set, check/warn about that rather than the
6280 defaults, which we are not going to use. Hence we can remove
6281 the turn_off_warning and WINDOWSNT || HAVE_NS tests.
6282 Don't warn if site-lisp directories are missing.
6283 If not installed, start from a blank load-path, since
6284 PATH_LOADSEARCH refers to the eventual installation directories.
6286 2012-07-07 Eli Zaretskii <eliz@gnu.org>
6288 Support truncation and continuation glyphs on GUI frames, when
6289 fringes are disabled. (Bug#11832)
6290 * xdisp.c (init_iterator): Get dimensions of truncation and
6291 continuation glyphs even if on GUI frames.
6292 Adjust it->last_visible_x on GUI frames when the left or right fringes,
6293 or both, are absent.
6294 (start_display, move_it_in_display_line_to): Handle the case of a
6295 GUI frame without a fringe to display continuation or truncation
6297 (insert_left_trunc_glyphs): Support GUI frames: make sure
6298 truncation glyphs overwrite enough glyphs from the current line to
6299 have sufficient space in pixels.
6300 (display_line): Support truncation and continuation glyphs on GUI
6301 frames. If some spare pixels are left on the line after inserting
6302 the truncation glyphs, fill that space with a stretch glyph of a
6303 suitably computed width.
6305 * term.c (produce_special_glyphs): Call PRODUCE_GLYPHS, not
6306 produce_glyphs, to support GUI sessions.
6308 2012-07-07 Paul Eggert <eggert@cs.ucla.edu>
6310 * sysdep.c (ULLONG_MAX): Define if not already defined (Bug#11781).
6312 * sysdep.c (list_system_processes): Port to NetBSD-current (Bug#11797).
6314 Do not require float-time's arg to fit in time_t (Bug#11825).
6315 This works better on hosts where time_t is unsigned, and where
6316 float-time is applied to the (negative) difference between two times.
6317 * editfns.c (decode_time_components): Last arg is now double *,
6318 not int *, and means to store all the result as a double, without
6319 worrying about whether the seconds part fits in time_t.
6320 All callers changed.
6321 (lisp_time_argument): Remove last int * arg, as it's no longer needed.
6322 All callers changed.
6323 (Ffloat_time): Do not fail merely because the specified time falls
6324 outside of time_t range.
6326 2012-07-07 Glenn Morris <rgm@gnu.org>
6328 * s/darwin.h (HAVE_RES_INIT, HAVE_LIBRESOLV):
6329 * s/hpux10-20.h (HAVE_RINT, HAVE_RANDOM):
6330 * s/unixware.h (HAVE_GETWD): Move undefs to configure (effectively).
6332 2012-07-07 Juanma Barranquero <lekktu@gmail.com>
6334 * makefile.w32-in (DISPEXTERN_H, $(BLD)/regex.$(O)):
6335 Update dependencies.
6337 * s/ms-w32.h [_MSC_VER]: Remove strcasecmp, strncasecmp.
6339 2012-07-06 Paul Eggert <eggert@cs.ucla.edu>
6341 Use c_strcasecmp for ASCII case-insensitive comparison (Bug#11786).
6342 * dispextern.h, nsfns.m, nsterm.m: Include <c-strcase.h>.
6343 * dispextern.h (xstrcasecmp): Rewrite using c_strcasecmp.
6344 * nsfns.m (x_get_string_resource): Use c_strncasecmp, not strncasecmp.
6345 * nsterm.m (ns_default): Use c_strcasecmp, not strcasecmp.
6346 * xfaces.c (xstrcasecmp) [!HAVE_STRCASECMP]: Remove.
6348 * xfont.c (compare_font_names): Redo to omit the need for casts.
6350 2012-07-06 Andreas Schwab <schwab@linux-m68k.org>
6352 * xfns.c (Fx_change_window_property): Doc fix.
6353 * w32fns.c (Fx_change_window_property): Doc fix.
6355 * w32fns.c (Fx_window_property): Accept the same arguments as the
6356 X Windows version. Doc fix.
6357 * xfns.c (Fx_window_property): Doc fix. (Bug#11870)
6359 2012-07-06 Juanma Barranquero <lekktu@gmail.com>
6360 Eli Zaretskii <eliz@gnu.org>
6362 * s/ms-w32.h: Settings not specific to Windows moved to nt/config.nt.
6363 Windows-specific code from nt/config.nt moved here.
6364 Obsolete settings removed.
6366 2012-07-06 Paul Eggert <eggert@cs.ucla.edu>
6368 * process.c: Avoid unnecessary calls to gettime.
6369 (wait_reading_process_output): Don't get the time of day
6370 when gobbling data immediately and not waiting, as there's no need
6371 for it in that case. This removes a FIXME.
6373 2012-07-06 Jan Djärv <jan.h.d@swipnet.se>
6375 * gtkutil.c (xg_event_is_for_scrollbar): Assign gwin when HAVE_GTK3
6376 is defined (Bug#11768).
6378 2012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
6380 Fix marker debugging code.
6381 * marker.c (byte_char_debug_check): Do not perform the check
6382 if buffer is not multibyte.
6383 (buf_charpos_to_bytepos, buf_bytepos_to_charpos):
6384 Call byte_char_debug_check with correct arguments.
6386 2012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
6388 Compile marker debugging code only if ENABLE_CHECKING is defined.
6389 * marker.c (byte_char_debug_check, count_markers):
6390 Use only if ENABLE_CHECKING is defined.
6391 (byte_debug_flag): Remove.
6392 (CONSIDER, buf_charpos_to_bytepos, buf_bytepos_to_charpos):
6393 Always call byte_char_debug_check if ENABLE_CHECKING is defined.
6395 2012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
6397 Avoid code repetition in marker-related functions.
6398 * marker.c (attach_marker): New function.
6399 (Fset_marker, set_marker_restricted, set_marker_both)
6400 (set_marker_restricted_both): Use it.
6401 (Fset_marker, set_marker_restricted, Fbuffer_has_markers_at):
6402 Consistently rename charno to charpos.
6403 (marker_position): Add eassert.
6404 (marker_byte_position): Convert to eassert.
6406 2012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
6408 Simplify list operations in unchain_overlay and unchain_marker.
6409 * buffer.c (unchain_overlay): Simplify. Add comment.
6410 * marker.c (unchain_marker): Simplify. Fix comments.
6412 2012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
6414 Introduce fast path for the widely used marker operation.
6415 * alloc.c (build_marker): New function.
6416 * lisp.h (build_marker): New prototype.
6417 * buffer.c (clone_per_buffer_values, Fmake_indirect_buffer): Use it.
6418 * composite.c (autocmp_chars): Likewise.
6419 * editfns.c (buildmark): Remove.
6420 (Fpoint_marker, Fpoint_min_marker, Fpoint_max_marker)
6421 (save_restriction_save): Use build_marker.
6422 * marker.c (buf_charpos_to_bytepos, buf_bytepos_to_charpos): Likewise.
6423 * window.c (save_window_save): Likewise.
6425 2012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
6427 Do not use Fdelete_overlay in delete_all_overlays
6428 to avoid redundant calls to unchain_overlay.
6429 * buffer.c (drop_overlay): New function.
6430 (delete_all_overlays, Fdelete_overlay): Use it.
6431 * minibuf.c (get_minibuffer): Fix comment.
6433 2012-07-06 Paul Eggert <eggert@cs.ucla.edu>
6435 Port to OpenBSD 5.1 amd64.
6436 * sysdep.c [BSD_SYSTEM]: Include <sys/param.h> before <sys/sysctl.h>.
6437 This is needed for OpenBSD, and should be harmless on all BSD systems.
6438 Also, include <sys/sysctl.h>, as it should be available on all
6439 BSD_SYSTEM hosts given that we're already calling sysctl in that case.
6440 (list_system_processes) [__OpenBSD__]: Use DARWIN_OS style mib, but
6441 use p_pid member, not kp_proc.pid.
6443 2012-07-06 Glenn Morris <rgm@gnu.org>
6445 * Makefile.in (emacs$(EXEEXT)): Don't check for load-path shadows.
6447 2012-07-05 Paul Eggert <eggert@cs.ucla.edu>
6449 More xmalloc and related cleanup.
6450 * alloc.c, bidi.c, buffer.c, buffer.h, bytecode.c, callint.c:
6451 * callproc.c, charset.c, coding.c, composite.c, data.c, dispnew.c:
6452 * doc.c, editfns.c, emacs.c, eval.c, fileio.c, filelock.c, fns.c:
6453 * font.c, fontset.c, frame.c, fringe.c, ftfont.c, ftxfont.c, gmalloc.c:
6454 * gtkutil.c, image.c, keyboard.c, keymap.c, lread.c, macros.c, menu.c:
6455 * nsfns.m, nsfont.m, nsmenu.m, nsterm.m, print.c, process.c, ralloc.c:
6456 * regex.c, region-cache.c, scroll.c, search.c, sound.c, syntax.c:
6457 * sysdep.c, term.c, termcap.c, unexmacosx.c, window.c, xdisp.c:
6458 * xfaces.c, xfns.c, xftfont.c, xgselect.c, xmenu.c, xrdb.c, xselect.c:
6460 Omit needless casts involving void * pointers and allocation.
6461 Prefer "P = xmalloc (sizeof *P)" to "P = xmalloc (sizeof (TYPE_OF_P))",
6462 as the former is more robust if P's type is changed.
6463 Prefer xzalloc to xmalloc + memset 0.
6464 Simplify malloc-or-realloc to realloc.
6465 Don't worry about xmalloc returning a null pointer.
6466 Prefer xstrdup to xmalloc + strcpy.
6467 * editfns.c (Fmessage_box): Grow message_text by at least 80 when
6469 * keyboard.c (apply_modifiers_uncached): Prefer local array to
6470 alloca of a constant.
6472 2012-07-05 Eli Zaretskii <eliz@gnu.org>
6474 * xdisp.c (display_line): Fix horizontal pixel coordinates when
6475 hscroll is larger than the line width. Fixes long and futile
6476 looping inside extend_face_to_end_of_line (on a TTY) producing
6477 glyphs that are not needed and thrown away.
6479 2012-07-05 Dmitry Antipov <dmantipov@yandex.ru>
6481 * marker.c (set_marker_restricted_both): Simplify by using
6484 2012-07-05 Paul Eggert <eggert@cs.ucla.edu>
6486 * editfns.c (region_limit): Simplify by using clip_to_bounds.
6488 2012-07-05 Jan Djärv <jan.h.d@swipnet.se>
6490 * gtkutil.c (gtk_scrollbar_new, gtk_box_new): Define when HAVE_GTK3 is
6491 not defined (Bug#11768).
6492 (xg_create_frame_widgets): Use gtk_plug_new_for_display (Bug#11768).
6493 (xg_create_frame_widgets, create_dialog, xg_get_file_with_chooser)
6494 (make_widget_for_menu_item, xg_make_tool_item): Use gtk_box_new
6495 followed by gtk_box_set_homogeneous (Bug#11768).
6496 (xg_update_menu_item): Use GTK_IS_BOX (Bug#11768).
6497 (update_theme_scrollbar_width, xg_create_scroll_bar):
6498 Use gtk_scrollbar_new (Bug#11768).
6499 (xg_event_is_for_scrollbar): Use Gdk Device functions for HAVE_GTK3.
6500 (is_box_type): New function (Bug#11768).
6501 (xg_tool_item_stale_p): Call is_box_type.
6502 (xg_initialize): Get settings by calling gtk_settings_get_for_screen
6503 with default display (Bug#11768).
6505 2012-07-05 Eli Zaretskii <eliz@gnu.org>
6507 * xdisp.c (window_hscroll_limited): New function.
6508 (pos_visible_p, init_iterator): Use it to avoid overflow of pixel
6509 coordinates when window's hscroll is set to insanely large
6512 2012-07-05 Juanma Barranquero <lekktu@gmail.com>
6514 * makefile.w32-in ($(BLD)/dired.$(O), $(BLD)/fileio.$(O)): Fix typo.
6515 ($(BLD)/terminal.$(O), $(BLD)/syntax.$(O)): Update dependencies.
6517 2012-07-05 Dmitry Antipov <dmantipov@yandex.ru>
6520 * lisp.h (xzalloc): New prototype. Omit needless casts.
6521 * alloc.c (xzalloc): New function. Omit needless casts.
6522 * charset.c: Omit needless casts. Convert all calls to
6523 xmalloc with following memset to xzalloc.
6524 * dispnew.c: Likewise.
6525 * fringe.c: Likewise.
6526 * image.c: Likewise.
6527 * sound.c: Likewise.
6529 * w32fns.c: Likewise.
6530 * w32font.c: Likewise.
6531 * w32term.c: Likewise.
6532 * xfaces.c: Likewise.
6534 * xterm.c: Likewise.
6535 * atimer.c: Omit needless casts.
6536 * buffer.c: Likewise.
6537 * callproc.c: Likewise.
6539 * coding.c: Likewise.
6540 * composite.c: Likewise.
6542 * doprnt.c: Likewise.
6543 * editfns.c: Likewise.
6544 * emacs.c: Likewise.
6546 * filelock.c: Likewise.
6548 * gtkutil.c: Likewise.
6549 * keyboard.c: Likewise.
6551 * lread.c: Likewise.
6552 * minibuf.c: Likewise.
6553 * msdos.c: Likewise.
6554 * print.c: Likewise.
6555 * process.c: Likewise.
6556 * region-cache.c: Likewise.
6557 * search.c: Likewise.
6558 * sysdep.c: Likewise.
6559 * termcap.c: Likewise.
6560 * terminal.c: Likewise.
6561 * tparam.c: Likewise.
6562 * w16select.c: Likewise.
6564 * w32reg.c: Likewise.
6565 * w32select.c: Likewise.
6566 * w32uniscribe.c: Likewise.
6567 * widget.c: Likewise.
6568 * xdisp.c: Likewise.
6569 * xmenu.c: Likewise.
6571 * xselect.c: Likewise.
6573 2012-07-05 Paul Eggert <eggert@cs.ucla.edu>
6575 * fileio.c (time_error_value): Check the right error number.
6576 Problem reported by Troels Nielsen in
6577 <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00095.html>.
6579 2012-07-04 Paul Eggert <eggert@cs.ucla.edu>
6581 * window.c (set_window_hscroll): Revert the 100000 hscroll limit.
6582 This should be fixed in a better way; see Eli Zaretskii in
6583 <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00088.html>.
6584 (HSCROLL_MAX): Remove; this is now internal to set_window_hscroll.
6586 * fileio.c (time_error_value): Rename from special_mtime.
6587 The old name's problems were noted by Eli Zaretskii in
6588 <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00087.html>.
6590 * emacs.c (gdb_pvec_type): Change it back to enum pvec_type.
6591 This variable's comment says Emacs needs at least one GDB-visible
6592 symbol of type enum pvec_type, to work around GDB problems.
6593 The symbol's value doesn't matter.
6595 * alloc.c (PSEUDOVECTOR_NBYTES): Remove stray ';'
6596 that causes compilation to fail on pre-C99 compilers.
6598 2012-07-04 Juanma Barranquero <lekktu@gmail.com>
6600 * s/ms-w32.h (LISP_FLOAT_TYPE, HAVE_MEMCMP, HAVE_MEMCPY)
6601 (HAVE_MEMMOVE, HAVE_MEMSET): Don't set, obsolete.
6603 2012-07-04 Dmitry Antipov <dmantipov@yandex.ru>
6605 * buffer.c (init_buffer_once): Fix initialization of
6606 headers for buffer_defaults and buffer_local_symbols.
6607 Reported by Juanma Barranquero <lekktu@gmail.com>.
6609 2012-07-04 Stefan Monnier <monnier@iro.umontreal.ca>
6611 Turn VECTOR_FREE_LIST_FLAG into PVEC_FREE.
6612 * lisp.h (enum pvec_type): Use fewer bits.
6613 (PSEUDOVECTOR_SIZE_BITS): New constant.
6614 (PSEUDOVECTOR_SIZE_MASK, PVEC_TYPE_MASK): Use it.
6615 (XSETPVECTYPESIZE, XSETTYPED_PSEUDOVECTOR, DEFUN): Adapt code to
6616 change in pvec_type.
6617 (PSEUDOVECTOR_TYPEP): New macro.
6618 (TYPED_PSEUDOVECTORP): Use it.
6619 * fns.c (internal_equal): Adapt code to extract pvectype.
6620 * emacs.c (gdb_pvec_type): Update type.
6621 * alloc.c (PSEUDOVECTOR_NBYTES): New macro.
6622 (VECTOR_FREE_LIST_SIZE_MASK): Remove (=> PSEUDOVECTOR_SIZE_MASK).
6623 (VECTOR_FREE_LIST_FLAG): Remove (=> PVEC_FREE).
6624 (SETUP_ON_FREE_LIST): Use XSETPVECTYPESIZE.
6625 (sweep_vectors): Use it. Use local var `total_bytes' instead of
6626 abusing vector->header.next.nbytes.
6627 (live_vector_p): Use PVEC_TYPE.
6628 (mark_object): Adapt code to extract pvectype. Use switch.
6630 2012-07-04 Paul Eggert <eggert@cs.ucla.edu>
6632 * doprnt.c (doprnt): Don't assume string length fits in 'int'.
6633 Tighten new eassert a bit.
6635 2012-07-04 Dmitry Antipov <dmantipov@yandex.ru>
6637 Fix compilation with --enable-gcc-warnings and -O1
6639 * doprnt.c (doprnt): Change type of tem to int, initialize
6640 to avoid compiler warning. Add eassert.
6641 * search.c (simple_search): Initialize match_byte to avoid
6642 compiler warning. Add eassert.
6644 2012-07-04 Paul Eggert <eggert@cs.ucla.edu>
6646 Avoid weird behavior with large horizontal scrolls.
6647 Without this change, for example, large hscroll values would
6648 mess up Emacs's display on Fedora 15 x86, presumably due to
6649 overflows in int calculations in the display code.
6650 Also, if buffers had long lines, Emacs would freeze.
6651 * window.c (HSCROLL_MAX): Reduce to 100000, and make it visible to GDB.
6652 (set_window_hscroll): New function, containing the old guts of
6653 Fset_window_hscroll. Return the clipped value.
6654 (Fset_window_hscroll, Fscroll_left, Fscroll_right): Use it.
6655 This avoids the need to check against PTRDIFF_MAX.
6657 * buffer.c (Fgenerate_new_buffer_name): Fix sprintf format mismatch.
6659 2012-07-04 Dmitry Antipov <dmantipov@yandex.ru>
6661 * buffer.c (Fgenerate_new_buffer_name): Fix type mismatch.
6663 2012-07-04 Paul Eggert <eggert@cs.ucla.edu>
6665 * regex.c: Suppress GCC warning on RHEL 6. (Bug#11207)
6666 Conditionalize the pragmas on GCC 4.5 or later, not GCC 4.3 or later,
6667 since GCC 4.4.6 issues a bogus warning for them.
6669 Fix bugs in file timestamp newness comparisons.
6670 * fileio.c (Ffile_newer_than_file_p):
6671 * lread.c (Fload): Use full timestamp resolution of files,
6672 not just the 1-second resolution, so that files that are only
6673 slightly newer still count as newer.
6674 * fileio.c (Ffile_newer_than_file_p): Don't assume file
6675 timestamps fit in 'int'; this fixes a Y2038 bug on most hosts.
6677 2012-07-03 Paul Eggert <eggert@cs.ucla.edu>
6679 * fileio.c: Improve handling of file time marker. (Bug#11852)
6680 (special_mtime): New function.
6681 (Finsert_file_contents, Fverify_visited_file_modtime):
6682 Use it to set special mtime values consistently.
6684 2012-07-03 Andreas Schwab <schwab@linux-m68k.org>
6686 * fileio.c (Finsert_file_contents): Properly handle st_mtime
6687 marker for non-existing file. (Bug#11852)
6689 2012-07-03 Glenn Morris <rgm@gnu.org>
6691 * lisp.h (Fread_file_name): Restore EXFUN (it's not a normal DEFUN
6692 and did not make it into globals.h).
6694 2012-07-03 Tom Tromey <tromey@redhat.com>
6696 * window.c (Fset_window_margins, Fset_window_fringes)
6697 (Fset_window_scroll_bars, Fset_window_vscroll): No longer static.
6698 * textprop.c (Fprevious_property_change): No longer static.
6699 * syntax.c (Fsyntax_table_p): No longer static.
6700 * process.c (Fget_process, Fprocess_datagram_address): No longer
6702 * keymap.c (Flookup_key, Fcopy_keymap): No longer static.
6703 * keyboard.c (Fcommand_execute): No longer static.
6705 * insdel.c (Fcombine_after_change_execute): No longer static.
6706 * image.c (Finit_image_library): No longer static.
6707 * fileio.c (Fmake_symbolic_link): No longer static.
6708 * eval.c (Ffetch_bytecode): No longer static.
6709 * editfns.c (Fuser_full_name): No longer static.
6710 * doc.c (Fdocumentation_property, Fsnarf_documentation):
6712 * buffer.c (Fset_buffer_major_mode, Fdelete_overlay): No longer
6714 * dired.c (Ffile_attributes): No longer static.
6715 * composite.c (Fcomposition_get_gstring): No longer static.
6716 * callproc.c (Fgetenv_internal): No longer static.
6718 * ccl.h: Remove EXFUNs.
6719 * buffer.h: Remove EXFUNs.
6720 * dispextern.h: Remove EXFUNs.
6721 * intervals.h: Remove EXFUNs.
6722 * fontset.h: Remove EXFUN.
6723 * font.h: Remove EXFUNs.
6724 * dosfns.c (system_process_attributes): Remove EXFUN.
6725 * keymap.h: Remove EXFUNs.
6726 * lisp.h: Remove EXFUNs.
6727 * w32term.h: Remove EXFUNs.
6728 * window.h: Remove EXFUNs.
6729 * xsettings.h: Remove EXFUN.
6730 * xterm.h: Remove EXFUN.
6732 2012-07-03 Glenn Morris <rgm@gnu.org>
6734 * lisp.h (Frandom): Make it visible to C.
6735 * buffer.c (Fgenerate_new_buffer_name): Speed up finding a new
6736 buffer for invisible buffers. (Bug#1229)
6738 2012-07-03 Dmitry Antipov <dmantipov@yandex.ru>
6740 Fix block vector allocation code to allow VECTOR_BLOCK_SIZE
6741 values which aren't power of 2.
6742 * alloc.c (VECTOR_FREE_LIST_SIZE_MASK): New macro.
6743 Verify its value and the value of VECTOR_BLOCK_SIZE. Adjust users
6746 2012-07-03 Stefan Monnier <monnier@iro.umontreal.ca>
6748 * lisp.h (Lisp_Misc, Lisp_Fwd): Move around to group better.
6750 * alloc.c (mark_object): Revert part of last patch to use `switch'.
6752 2012-07-03 Dmitry Antipov <dmantipov@yandex.ru>
6754 * alloc.c (allocate_vector_block): Remove redundant
6755 calls to mallopt if DOUG_LEA_MALLOC is defined.
6756 (allocate_vectorlike): If DOUG_LEA_MALLOC is defined,
6757 avoid calls to mallopt if zero_vector is returned.
6759 2012-07-03 Dmitry Antipov <dmantipov@yandex.ru>
6761 * alloc.c (check_string_bytes): If GC_CHECK_STRING_BYTES
6762 is enabled, avoid dereferencing NULL current_sblock if
6765 2012-07-03 Dmitry Antipov <dmantipov@yandex.ru>
6767 Cleanup basic buffer management.
6768 * buffer.h (struct buffer): Change layout to use generic vector
6769 marking code. Fix some comments. Change type of 'clip_changed'
6770 to bitfield. Remove unused #ifndef old.
6771 (FIRST_FIELD_PER_BUFFER, LAST_FIELD_PER_BUFFER): Remove.
6772 (GET_OVERLAYS_AT): Fix indentation.
6773 (for_each_per_buffer_object_at): New macro.
6774 * buffer.c (clone_per_buffer_values, reset_buffer_local_variables)
6775 (Fbuffer_local_variables): Use it.
6776 (init_buffer_once, syms_of_buffer): Remove unused #ifndef old.
6777 * alloc.c (allocate_buffer): Adjust to match new layout of
6778 struct buffer. Fix comment.
6779 (mark_overlay): New function.
6780 (mark_buffer): Use it. Use mark_vectorlike to mark normal
6781 Lisp area of struct buffer.
6782 (mark_object): Use it. Adjust marking of misc objects
6783 and related comments.
6785 2012-07-02 Paul Eggert <eggert@cs.ucla.edu>
6787 * alloc.c (mark_object): Remove "#ifdef GC_CHECK_MARKED_OBJECTS"
6788 wrapper that is not needed because the wrapped code is a no-op (zero
6789 machine instructions) when GC_CHECK_MARKED_OBJECTS is not defined.
6790 This avoids a -Wunused-macros diagnostic with GCC 4.7.1 x86-64.
6792 2012-07-02 Dmitry Antipov <dmantipov@yandex.ru>
6794 * alloc.c (mark_buffer): Simplify. Remove prototype.
6795 (mark_object): Add comment. Reorganize marking of vector-like
6796 objects. Use CHECK_LIVE for all vector-like objects except buffers
6797 and subroutines when GC_CHECK_MARKED_OBJECTS is defined.
6798 Avoid redundant calls to mark_vectorlike for bool vectors.
6800 2012-06-30 Glenn Morris <rgm@gnu.org>
6802 * nsterm.m (ns_init_paths): Ignore site-lisp if --no-site-lisp.
6804 * epaths.in (PATH_SITELOADSEARCH): New.
6805 * lread.c (init_lread): Use PATH_SITELOADSEARCH.
6806 This is rather than relying on --enable-locallisppath elements
6807 having "site-lisp" in their names. (Bug#10208#25, 11658)
6809 2012-06-30 Eli Zaretskii <eliz@gnu.org>
6811 * w32proc.c (sys_select): Accept and ignore one more argument.
6813 * w32.c (emacs_gnutls_pull): Call select with one more argument.
6815 * sysselect.h [DOS_NT]: Don't include sys/select.h.
6816 (pselect) [!MS_DOS]: Redirect to sys_select.
6818 * sysdep.c: Don't include dos.h and dosfns.h.
6820 * process.c (sys_select):
6821 * msdos.c (sys_select): Accept one more argument and ignore it.
6823 * msdos.c (event_timestamp, sys_select): Use gnulib's gettime;
6824 adapt data types and code to that.
6827 * msdos.c (gettime, settime): Define away the prototypes in dos.h,
6828 which clashes with the gnulib function of the same name.
6830 2012-06-30 Andreas Schwab <schwab@linux-m68k.org>
6832 * font.c (font_style_to_value, font_style_symbolic)
6833 (font_prop_validate_style): Add type checks for values in
6836 * lisp.h (CHECK_RANGED_INTEGER): Make value to check the first
6838 * character.c, charset.c, menu.c, process.c, window.c: Adjust all
6841 2012-06-29 Eli Zaretskii <eliz@gnu.org>
6843 * xdisp.c (try_window_id): Undo last change.
6845 * w32.c (getwd): Adjust commentary about startup_dir.
6846 (init_environment): Always call sys_access, even in non-MSVC
6847 builds. Don't chdir to the directory of the Emacs executable.
6848 This undoes code from 1997 which was justified by the need to
6849 "avoid conflicts when removing and renaming directories". But its
6850 downside was that every relative file name was being interpreted
6851 relative to the directory of the Emacs executable, which can never
6852 be TRT. In particular, it broke sys_access when called with
6853 relative file names.
6854 (sys_access): Map GetLastError to errno.
6856 2012-06-29 Dmitry Antipov <dmantipov@yandex.ru>
6858 * window.h (struct window): Change type of 'fringes_outside_margins'
6859 to bitfield. Fix comment. Adjust users accordingly.
6860 (struct window): Change type of 'window_end_bytepos' to ptrdiff_t.
6862 * xdisp.c (try_window_id): Change type of 'first_vpos' and 'vpos'
6865 2012-06-29 Andreas Schwab <schwab@linux-m68k.org>
6867 * gnutls.c (emacs_gnutls_handshake):
6868 Add QUIT to make the loop interruptible.
6870 2012-06-29 Glenn Morris <rgm@gnu.org>
6872 * charset.c (init_charset): Make lack of etc/charsets fatal.
6874 2012-06-29 Dmitry Antipov <dmantipov@yandex.ru>
6876 * editfns.c (region_limit): Fix type mismatch.
6878 2012-06-29 Dmitry Antipov <dmantipov@yandex.ru>
6880 * nsfns.m: Fix GLYPH_DEBUG usage assuming that it may be
6881 undefined. Convert from xassert to eassert.
6882 * nsmenu.m: Convert from xassert to eassert.
6883 * nsterm.m: Likewise.
6885 2012-06-28 Stefan Monnier <monnier@iro.umontreal.ca>
6887 * editfns.c (region_limit): Clip to narrowing (bug#11770).
6889 2012-06-28 Paul Eggert <eggert@cs.ucla.edu>
6891 Avoid integer overflow on scroll-left and scroll-right.
6892 * window.c (HSCROLL_MAX): New macro.
6893 (Fscroll_left, Fscroll_right): Avoid undefined behavior on integer
6894 overflow when requested scroll falls outside ptrdiff_t range.
6896 2012-06-28 Dmitry Antipov <dmantipov@yandex.ru>
6898 * window.h (struct window): Change type of 'hscroll',
6899 'min_hscroll' and 'last_point' from Lisp_Object to ptrdiff_t,
6900 'last_modified' and 'last_overlay_modified' to EMACS_INT.
6901 Adjust users accordingly.
6902 * xdisp.c (try_cursor_movement): Replace type check with eassert.
6903 * window.c (Fscroll_left, Fscroll_right): Change type of 'hscroll'
6904 from EMACS_INT to ptrdiff_t.
6905 (make_window): Omit redundant initialization.
6907 2012-06-28 Juanma Barranquero <lekktu@gmail.com>
6909 * makefile.w32-in ($(BLD)/regex.$(O)): Update dependencies.
6911 2012-06-28 Dmitry Antipov <dmantipov@yandex.ru>
6913 * window.h (struct window): Change type of 'use_time' and
6914 'sequence_number' from Lisp_Object to int.
6915 * frame.c (make_frame): Adjust users accordingly.
6916 * print.c (print_object): Likewise.
6917 * window.c (select_window, Fwindow_use_time, make_parent_window)
6918 (make_window): Likewise.
6920 2012-06-28 Dmitry Antipov <dmantipov@yandex.ru>
6922 * dispextern.h (GLYPH_DEBUG): Now defined in config.h if
6923 enabled with --enable-checking=[all,glyphs] configure option.
6924 Fix GLYPH_DEBUG usage assuming that it may be undefined,
6925 adjust comments accordingly.
6926 * dispnew.c: Fix GLYPH_DEBUG usage assuming that it may be
6927 undefined, adjust comments accordingly.
6928 * image.c: Likewise.
6929 * scroll.c: Likewise.
6930 * w32fns.c: Likewise.
6931 * w32term.c: Likewise.
6932 * xdisp.c: Likewise.
6933 * xfaces.c: Likewise.
6935 * xterm.c: Likewise.
6937 2012-06-28 Dmitry Antipov <dmantipov@yandex.ru>
6939 Generalize run-time debugging checks.
6940 * dispextern.h (XASSERTS): Remove.
6941 * fontset.c (xassert): Remove.
6942 Convert from xassert to eassert.
6943 * alloc.c: Convert from xassert to eassert.
6945 * dispnew.c: Likewise.
6947 * fringe.c: Likewise.
6948 * ftfont.c: Likewise.
6949 * gtkutil.c: Likewise.
6950 * image.c: Likewise.
6951 * keyboard.c: Likewise.
6953 * process.c: Likewise.
6954 * scroll.c: Likewise.
6955 * sound.c: Likewise.
6957 * w32console.c: Likewise.
6958 * w32fns.c: Likewise.
6959 * w32term.c: Likewise.
6960 * window.c: Likewise.
6961 * xdisp.c: Likewise.
6962 * xfaces.c: Likewise.
6964 * xselect.c: Likewise.
6965 * xterm.c: Likewise.
6967 2012-06-27 Stefan Monnier <monnier@iro.umontreal.ca>
6969 * fns.c (maybe_resize_hash_table): Output message when growing the
6972 2012-06-27 Dmitry Antipov <dmantipov@yandex.ru>
6974 * alloc.c (allocate_string_data): Remove dead code.
6975 * xsettings.c (XSETTINGS_FONT_NAME): Move under HAVE_XFT to
6976 avoid GCC warning about unused macro.
6978 2012-06-27 Dmitry Antipov <dmantipov@yandex.ru>
6980 * alloc.c (allocate_string): Omit intervals initialization.
6981 * alloc.c (make_uninit_multibyte_string): Initialize intervals
6982 as in make_pure_string and make_pure_c_string.
6984 2012-06-27 Dmitry Antipov <dmantipov@yandex.ru>
6986 * alloc.c (allocate_string): Fix last change.
6988 2012-06-27 Dmitry Antipov <dmantipov@yandex.ru>
6990 * alloc.c (allocate_string): Remove two redundant calls
6991 to memset, add explicit initialization where appropriate.
6993 2012-06-27 Glenn Morris <rgm@gnu.org>
6995 * lisp.mk (lisp): Remove paths.elc.
6997 2012-06-27 Chong Yidong <cyd@gnu.org>
6999 * doc.c (Fsubstitute_command_keys): Fix punctuation.
7001 2012-06-26 John Wiegley <johnw@newartisans.com>
7003 * unexmacosx.c (copy_data_segment): Add two section names used
7004 on Mac OS X Lion: __mod_init_func and __mod_term_func.
7006 * alloc.c (mark_memory): Do not check with -faddress-sanitizer
7007 when building with Clang.
7009 2012-06-26 Stefan Monnier <monnier@iro.umontreal.ca>
7011 * eval.c (Fapply): Allow calling it with a single argument.
7013 2012-06-26 Eli Zaretskii <eliz@gnu.org>
7015 * s/ms-w32.h (strcasecmp, strncasecmp) [_MSC_VER]: Redirect to
7016 _stricmp and _strnicmp.
7017 (HAVE_STRCASECMP, HAVE_STRNCASECMP): Define to 1.
7019 2012-06-26 Dmitry Antipov <dmantipov@yandex.ru>
7021 * alloc.c (allocate_window): Zero out non-Lisp part of newly
7023 (allocate_process): Likewise for new process.
7024 (allocate_terminal): Change to use offsetof.
7025 (allocate_frame): Likewise.
7026 * frame.c (make_frame): Omit redundant initialization.
7027 * window.c (make_parent_window): Use memset.
7028 (make_window): Omit redundant initialization.
7029 * process.c (make_process): Omit redundant initialization.
7030 * terminal.c (create_terminal): Likewise.
7032 2012-06-26 Dmitry Antipov <dmantipov@yandex.ru>
7034 * term.c (delete_tty): Remove redundant call to memset.
7036 2012-06-26 Dmitry Antipov <dmantipov@yandex.ru>
7038 * alloc.c: Remove build_string.
7039 * lisp.h: Define build_string as static inline. This provides
7040 a better opportunity to optimize away calls to strlen when the
7041 function is called with compile-time constant argument.
7042 * image.c (imagemagick_error): Convert to build_string.
7043 * w32proc.c (sys_spawnve): Likewise.
7044 * xterm.c (x_term_init): Likewise.
7046 2012-06-26 Paul Eggert <eggert@cs.ucla.edu>
7048 Use sprintf return value instead of invoking strlen on result.
7049 In the old days this wasn't portable, since some sprintf
7050 implementations returned char *. But they died out years ago and
7051 Emacs already assumes sprintf returns int.
7052 Similarly for float_to_string.
7053 This patch speeds up (number-to-string 1000) by 3% on Fedora 15 x86-64.
7054 * ccl.c (ccl_driver):
7055 * character.c (string_escape_byte8):
7056 * data.c (Fnumber_to_string):
7057 * doprnt.c (doprnt):
7058 * print.c (print_object):
7059 * xdisp.c (message_dolog):
7060 * xfns.c (syms_of_xfns):
7061 Use sprintf or float_to_string result to avoid need to call strlen.
7062 * data.c (Fnumber_to_string):
7063 Use make_unibyte_string, since the string must be ASCII.
7064 * lisp.h, print.c (float_to_string): Now returns int length.
7065 * term.c (produce_glyphless_glyph):
7066 Use sprintf result rather than recomputing it.
7068 Clean out last vestiges of the old HAVE_CONFIG_H stuff.
7069 * Makefile.in (ALL_CFLAGS):
7070 * makefile.w32-in (LOCAL_FLAGS): Remove -DHAVE_CONFIG_H.
7071 * gmalloc.c, regex.c: Include <config.h> unconditionally.
7073 2012-06-25 Dmitry Antipov <dmantipov@yandex.ru>
7075 * dispextern.h (xstrcasecmp): Define to library function
7076 strcasecmp if available.
7077 * xfaces.c: Do not use xstrcasecmp if strcasecmp is available.
7079 2012-06-25 Andreas Schwab <schwab@linux-m68k.org>
7081 * keyboard.c (menu_bar_items, menu_bar_item, read_key_sequence):
7082 Avoid comma operator.
7083 * menu.c (push_submenu_start, push_submenu_end)
7084 (push_left_right_boundary, push_menu_pane): Likewise.
7085 * msdos.c (dos_rawgetc): Likewise.
7087 2012-06-25 Dmitry Antipov <dmantipov@yandex.ru>
7089 * xfns.c (xic_create_fontsetname): Remove redundant calls
7092 2012-06-25 Paul Eggert <eggert@cs.ucla.edu>
7094 * gtkutil.c (get_utf8_string): Remove redundant assignment.
7095 sprintf already null-terminates its output.
7097 * xfns.c (x_window): Remove redundant cast.
7099 2012-06-25 Dmitry Antipov <dmantipov@yandex.ru>
7101 * xmenu.c (xmenu_show, xdialog_show): Explicit cast from
7102 `const char *' to `char *' to avoid compiler warning.
7104 2012-06-24 Paul Eggert <eggert@cs.ucla.edu>
7106 * xterm.c (x_term_init): Build proper-sized _XSETTINGS_Snnn string
7107 instead of truncating it to 63 (admittedly a generous limit).
7109 * process.c: Fix spelling and caps in comments.
7111 2012-06-24 Dan Nicolaescu <dann@ics.uci.edu>
7113 * emacs.c (setpgrp): Remove definition, unused.
7114 * sysdep.c (setpgrp): Remove definition, not used in this file.
7116 2012-06-24 Juanma Barranquero <lekktu@gmail.com>
7118 * makefile.w32-in: Update dependencies.
7120 2012-06-24 Eli Zaretskii <eliz@gnu.org>
7122 * makefile.w32-in (TIMESPEC_H): Remove nt/inc/sys/time.h.
7123 (SYSTIME_H): Add nt/inc/sys/time.h.
7125 * systime.h [WINDOWSNT]: Include sys/time.h.
7127 * s/ms-w32.h (struct timespec): Definition moved from
7128 nt/inc/sys/time.h. Suggested by Paul Eggert <eggert@cs.ucla.edu>.
7130 2012-06-24 Paul Eggert <eggert@cs.ucla.edu>
7132 Switch from NO_RETURN to C11's _Noreturn (Bug#11750).
7133 * buffer.h (buffer_slot_type_mismatch):
7134 * data.c (arith_error) [!FORWARD_SIGNAL_TO_MAIN_THREAD]:
7135 * eval.c (unwind_to_catch):
7136 * image.c (my_png_error, my_error_exit):
7137 * keyboard.c (quit_throw_to_read_char, user_error)
7138 (Fexit_recursive_edit, Fabort_recursive_edit):
7139 * lisp.h (die, args_out_of_range, args_out_of_range_3)
7140 (wrong_type_argument, buffer_overflow, __executable_start)
7141 (memory_full, buffer_memory_full, string_overflow, Fthrow)
7142 (xsignal, xsignal0, xsignal1, xsignal2, xsignal3, signal_error)
7143 (error, verror, nsberror, report_file_error, Ftop_level, Fkill_emacs)
7145 (child_setup) [!DOS_NT]:
7146 * lread.c (end_of_file_error, invalid_syntax):
7147 * process.c (send_process_trap) [!FORWARD_SIGNAL_TO_MAIN_THREAD]:
7148 * puresize.h (pure_write_error):
7149 * search.c (matcher_overflow):
7150 * sound.c (sound_perror, alsa_sound_perror):
7151 * sysdep.c, syssignal.h (croak):
7152 * term.c (maybe_fatal, vfatal):
7153 * textprop.c (text_read_only):
7154 * undo.c (user_error):
7155 * unexmacosx.c (unexec_error):
7156 * xterm.c (x_ins_del_lines, x_delete_glyphs):
7157 Use _Noreturn rather than NO_RETURN.
7158 No need for separate decl merely because of _Noreturn.
7159 * sound.c (sound_warning, parse_sound):
7160 Remove unnecessary forward decls.
7162 2012-06-24 Paul Eggert <eggert@cs.ucla.edu>
7164 Fix bug when time_t is unsigned and as wide as intmax_t (Bug#9000).
7165 * lisp.h (WAIT_READING_MAX): New macro.
7166 * dispnew.c (Fsleep_for, sit_for):
7167 * keyboard.c (kbd_buffer_get_event):
7168 * process.c (Faccept_process_output):
7169 Use it to avoid bogus compiler warnings with obsolescent GCC versions.
7170 This improves on the previous patch, which introduced a bug
7171 when time_t is unsigned and as wide as intmax_t.
7172 See <http://bugs.gnu.org/9000#51>.
7174 2012-06-23 Eli Zaretskii <eliz@gnu.org>
7176 * dispnew.c (sit_for, Fsleep_for):
7177 * keyboard.c (kbd_buffer_get_event):
7178 * process.c (Faccept_process_output): Avoid compiler warnings when
7179 comparing a 32-bit time_t with a 64-bit INTMAX_MAX.
7181 2012-06-23 Juanma Barranquero <lekktu@gmail.com>
7183 * makefile.w32-in: Update dependencies.
7185 * w32.c (ltime): Add return type and declare static.
7186 (w32_get_internal_run_time): Remove usused variable `time_100ns'.
7188 2012-06-23 Paul Eggert <eggert@cs.ucla.edu>
7190 * sysdep.c [__FreeBSD__]: Fix more recently-introduced typos.
7191 Privately reported by Herbert J. Skuhra.
7192 (make_lisp_timeval) [__FreeBSD__]: Rename from TIMELIST.
7194 (system_process_attributes) [__FreeBSD__]: Invoke make_lisp_time,
7195 not make_lisp_timeval, when the argument is of type EMACS_TIME.
7197 2012-06-23 Eli Zaretskii <eliz@gnu.org>
7199 * w32proc.c (Fw32_get_locale_info): Fix an off-by-one error in
7200 last argument of make_unibyte_string.
7202 * keyboard.c (kbd_buffer_get_event): Include the codepage and the
7203 language ID in the event parameters.
7205 * w32term.c (w32_read_socket): Put the new keyboard codepage into
7206 event.code, not the obscure "character set ID".
7208 2012-06-23 Chong Yidong <cyd@gnu.org>
7210 * xmenu.c (x_menu_wait_for_event): Adapt GTK3 to new xg_select.
7212 2012-06-23 Eli Zaretskii <eliz@gnu.org>
7214 Fix the MS-Windows build broken by 2012-06-22T21:17:42Z!eggert@cs.ucla.edu.
7215 * w32.c (fdutimens): New function.
7217 * w32proc.c (sys_select): Adapt to change in the EMACS_TIME type.
7219 * s/ms-w32.h (pselect): Redirect to sys_select.
7221 * sysselect.h [WINDOWSNT]: Don't include sys/select.h.
7223 * ralloc.c (r_alloc_inhibit_buffer_relocation): Fix stupid thinko
7224 in the logic of incrementing and decrementing the value of
7225 use_relocatable_buffers.
7227 2012-06-23 Paul Eggert <eggert@cs.ucla.edu>
7229 * sysdep.c [__FreeBSD__]: Fix recently-introduced typos.
7230 Privately reported by Herbert J. Skuhra.
7231 [__FreeBSD__]: Remove "*/" typo after "#include".
7232 (timeval_to_EMACS_TIME) [__FreeBSD__]: New static function.
7233 (TIMEVAL) [__FreeBSD__]: Now a static function rather than a macro.
7234 (TIMEVAL, system_process_attributes) [__FreeBSD__]:
7235 Don't assume EMACS_TIME and struct timeval are the same type.
7237 2012-06-22 Paul Eggert <eggert@cs.ucla.edu>
7239 Support higher-resolution time stamps (Bug#9000).
7240 The time stamps are only nanosecond-resolution at the C level,
7241 since that's the best that any real-world system supports now.
7242 But they are picosecond-resolution at the Lisp level, as that's
7243 easy, and leaves room for future OS improvements.
7245 * Makefile.in (LIB_CLOCK_GETTIME): New macro.
7248 * alloc.c (Fgarbage_collect): Port to higher-res time stamps.
7249 Don't get current time unless it's needed.
7251 * atimer.c: Include <sys/time.h> unconditionally, since gnulib
7252 now provides it if it's absent.
7253 (start_atimer): Port to higher-res time stamps.
7254 Check for time stamp overflow. Don't get current time more
7255 often than is needed.
7257 * buffer.h (struct buffer): Buffer modtime now has high resolution.
7258 Include systime.h, not time.h.
7259 (NONEXISTENT_MODTIME_NSECS, UNKNOWN_MODTIME_NSECS): New macros.
7261 * dired.c: Include stat-time.h.
7262 (Ffile-attributes): File times now have higher resolution.
7264 * dispextern.h [HAVE_WINDOW_SYSTEM]: Include systime.h.
7265 (struct image): Timestamp now has higher resolution.
7267 * dispnew.c (PERIODIC_PREEMPTION_CHECKING): Remove, as Emacs always
7268 has at least microseconds now. All uses removed.
7269 (update_frame, update_single_window, update_window, update_frame_1)
7270 (Fsleep_for, sit_for): Port to higher-resolution time stamps.
7271 (duration_to_sec_usec): Remove; no longer needed.
7273 * editfns.c (time_overflow): Now extern.
7274 (Fcurrent_time, Fget_internal_run_time, make_time, lisp_time_argument)
7275 (float-time, Fformat_time_string, Fcurrent_time_string)
7276 (Fcurrent_time_zone): Accept and generate higher-resolution
7278 (make_time_tail, make_lisp_time, dissassemble_lisp_time)
7279 (decode_time_components, lisp_seconds_argument): New functions.
7280 (make_time): Now static.
7281 (lisp_time_argument): Now returns EMACS_TIME. New arg ppsec.
7282 Report an error if the time is invalid, rather than having the caller
7285 * fileio.c: Include <stat-time.h>
7286 (Fcopy_file): Copy higher-resolution time stamps.
7287 Prefer to set the time stamp via a file descriptor if that works.
7288 (Fset_file_times, Finsert_file_contents, Fwrite_region)
7289 (Fverify_visited_file_modtime, Fclear_visited_file_modtime)
7290 (Fvisited_file_modtime, Fset_visited_file_modtime):
7291 Support higher-resolution time stamps.
7293 * fns.c (Frandom): Use nanoseconds, not microseconds, for seed.
7295 * gtkutil.c (xg_maybe_add_timer): Port to higher-res time stamps.
7297 * image.c (prepare_image_for_display, clear_image_cache)
7298 (lookup_image): Port to higer-resolution time stamps.
7300 * keyboard.c (start_polling, bind_polling_period):
7301 Check for time stamp overflow.
7302 (read_char, kbd_buffer_get_event, timer_start_idle)
7303 (timer_stop_idle, timer_resume_idle, timer_check_2, timer_check)
7304 (Fcurrent_idle_time, init_keyboard, set_waiting_for_input):
7305 Port to higher-resolution time stamps. Do not assume time_t is signed.
7306 (decode_timer): New function. Timers are now vectors of length 9,
7307 not 8, to accommodate the picosecond component.
7308 (timer_check_2): Use it.
7310 * nsterm.m (select_timeout, timeval_subtract): Remove.
7311 (ns_timeout): Use Emacs's facilities for time stamp arithmetic,
7312 as they're a bit more accurate and handle overflow better.
7313 (ns_select): Change prototype to be compatible with pselect.
7314 (ns_select, ns_term_shutdown): Port to ns-resolution time stamps.
7315 * nsterm.h (ns_select): Adjust prototype.
7317 * msdos.c (EMACS_TIME_ZERO_OR_NEG_P): Remove, as it assumes
7318 us-resolution time stamps.
7319 (sys_select): Use the new EMACS_TIME_SIGN macro instead.
7321 * lread.c (read_filtered_event): Port to ns-resolution time stamps.
7323 * lisp.h (time_overflow): New decl.
7324 (wait_reading_process_output): First arg is now intmax_t, not int,
7325 to accommodate larger waits.
7327 * process.h (struct Lisp_Process.read_output_delay):
7328 Now counts nanoseconds, not microseconds.
7329 * process.c (ADAPTIVE_READ_BUFFERING): Don't worry about
7331 (READ_OUTPUT_DELAY_INCREMENT, Faccept_process_output)
7332 (wait_reading_process_output):
7333 Port to ns-resolution time stamps.
7334 (Faccept_process_output, wait_reading_process_output):
7335 Check for time stamp overflow. Do not assume time_t is signed.
7336 (select_wrapper): Remove; we now use pselect.
7337 (Fprocess_attributes): Now generates ns-resolution time stamps.
7339 * sysdep.c: Include utimens.h. Don't include utime.h
7340 or worry about struct utimbuf; gnulib does that for us now.
7341 (gettimeofday): Remove; gnulib provides a substitute.
7342 (make_timeval): New function.
7343 (set_file_times): Now sets ns-resolution time stamps.
7344 New arg FD; all uses changed.
7345 (time_from_jiffies, ltime_from_jiffies, get_up_time)
7346 (system_process_attributes):
7347 Now returns ns-resolution time stamp. All uses changed.
7348 Check for time stamp overflow.
7350 * sysselect.h: Don't depend on HAVE_SYS_SELECT_H; gnulib
7351 provides a substitute now.
7353 * systime.h: Include timespec.h rather than sys/time.h and time.h,
7354 since it guarantees struct timespec.
7355 (EMACS_TIME): Now struct timespec, so that we can support
7356 ns-resolution time stamps.
7357 (EMACS_TIME_RESOLUTION, LOG10_EMACS_TIME_RESOLUTION): New macros.
7358 (EMACS_HAS_USECS): Remove; Emacs always has sub-second time stamps now.
7359 (EMACS_USECS): Remove.
7360 (EMACS_SET_USECS): The underlying time stamp now has ns resolution,
7361 so multiply the arg by 1000 before storing it.
7362 (EMACS_NSECS, EMACS_SECS_ADDR, EMACS_SET_NSECS, EMACS_SET_SECS_NSECS):
7364 (EMACS_GET_TIME, EMACS_ADD_TIME, EMACS_SUB_TIME):
7365 Port to ns-resolution time stamps.
7366 (EMACS_TIME_NEG_P): Remove; replaced by....
7367 (EMACS_TIME_SIGN): New macro.
7368 (EMACS_SET_INVALID_TIME, EMACS_TIME_VALID_P)
7369 (EMACS_TIME_FROM_DOUBLE, EMACS_TIME_TO_DOUBLE): New macros.
7370 (set_file_times, make_time, lisp_time_argument): Adjust signature.
7371 (make_timeval, make_lisp_time, decode_time_components): New decls.
7372 (EMACS_TIME_CMP): Remove; no longer used. Plus, it was buggy, in
7373 that it mishandled time_t overflow. You can't compare by subtracting!
7374 (EMACS_TIME_EQ, EMACS_TIME_NE, EMACS_TIME_GT, EMACS_TIME_GE)
7375 (EMACS_TIME_LT, EMACS_TIME_LE): Rewrite in terms of timespec_cmp.
7377 * term.c: Include <sys/time.h>.
7378 (timeval_to_Time): New function, for proper overflow wraparound.
7379 (term_mouse_position, term_mouse_click): Use it.
7381 * undo.c (record_first_change): Support higher-resolution time stamps
7383 (Fprimitive_undo): Use them when restoring time stamps.
7385 * w32.c (ltime, U64_TO_LISP_TIME, process_times, emacs_gnutls_pull)
7386 (w32_get_internal_run_time):
7387 Port to higher-resolution Emacs time stamps.
7388 (ltime): Now accepts single 64-bit integer, as that's more convenient
7391 * xdisp.c (start_hourglass): Port to ns-resolution time stamps.
7393 * xgselect.c, xgselect.h (xg_select): Add sigmask argument,
7394 for compatibility with pselect. Support ns-resolution time stamps.
7396 * xmenu.c (x_menu_wait_for_event): Support ns-resolution time stamps.
7398 * xselect.c (wait_for_property_change, x_get_foreign_selection):
7399 Check for time stamp overflow, and support ns-resolution time stamps.
7401 * xterm.c: Don't include sys/time.h; gnulib does that for us now.
7402 Don't worry about whether HAVE_TIMEVAL and HAVE_SELECT are set.
7403 (timeval_subtract): Remove; no longer needed.
7404 (XTflash, XTring_bell, x_wait_for_event):
7405 Port to ns-resolution time stamps. Don't assume time_t is signed.
7407 2012-06-22 Chong Yidong <cyd@gnu.org>
7409 * xdisp.c (x_consider_frame_title): Revert last change.
7411 2012-06-22 Eli Zaretskii <eliz@gnu.org>
7413 * alloc.c (NSTATICS): Enlarge to 0x650. Otherwise, Emacs compiled
7414 with -DENABLE_CHECKING -DXASSERTS -DGLYPH_DEBUG=1 -DBYTE_CODE_METER
7415 aborts in staticpro during startup. (Without -DBYTE_CODE_METER,
7416 staticidx goes up to 1597 out of 1600 = 0x640.)
7418 2012-06-20 Paul Eggert <eggert@cs.ucla.edu>
7420 * fileio.c (Fdefault_file_modes): Block input while fiddling with umask.
7421 Otherwise, the umask might be mistakenly 0 while handling input signals.
7423 2012-06-19 Stefan Monnier <monnier@iro.umontreal.ca>
7425 * minibuf.c (Fread_string): Bind minibuffer-completion-table.
7427 2012-06-19 Dmitry Antipov <dmantipov@yandex.ru>
7429 * alloc.c, bytecode.c, ccl.c, coding.c, composite.c, data.c, dosfns.c:
7430 * font.c, image.c, keyboard.c, lread.c, menu.c, minibuf.c, msdos.c:
7431 * print.c, syntax.c, window.c, xmenu.c, xselect.c: Replace direct
7432 access to `contents' member of Lisp_Vector objects with AREF and ASET
7435 2012-06-19 Chong Yidong <cyd@gnu.org>
7437 * frame.c (delete_frame): When selecting a frame on a different
7438 text terminal, do not alter the terminal's top-frame.
7440 * xdisp.c (format_mode_line_unwind_data): Record the target
7441 frame's selected window and its terminal's top-frame.
7442 (unwind_format_mode_line): Restore them.
7443 (x_consider_frame_title, display_mode_line, Fformat_mode_line):
7445 (x_consider_frame_title): Do not condition on HAVE_WINDOW_SYSTEM,
7446 since tty frames can be explicitly named.
7447 (prepare_menu_bars): Likewise.
7449 * term.c (Ftty_top_frame): New function.
7451 2012-06-18 Paul Eggert <eggert@cs.ucla.edu>
7453 Port byte-code-meter to modern targets.
7454 * bytecode.c (METER_CODE) [BYTE_CODE_METER]: Don't assume
7455 !CHECK_LISP_OBJECT_TYPE && !USE_LSB_TAG. Problem with
7456 CHECK_LISP_OBJECT_TYPE reported by Dmitry Antipov in
7457 <http://lists.gnu.org/archive/html/emacs-devel/2012-06/msg00282.html>.
7458 (METER_1, METER_2): Simplify.
7460 2012-06-18 Stefan Monnier <monnier@iro.umontreal.ca>
7462 * data.c (Fdefalias): Return `symbol' (bug#11686).
7464 2012-06-18 Martin Rudalics <rudalics@gmx.at>
7466 * buffer.c (Fkill_buffer): Don't throw an error when the buffer
7467 gets killed during executing of this function (Bug#11665).
7468 Try to always return Qt when the buffer has been actually killed.
7469 (Vkill_buffer_query_functions): In doc-string say that functions
7470 run by this hook should not change the current buffer.
7472 2012-06-18 Paul Eggert <eggert@cs.ucla.edu>
7474 Fix recently-introduced process.c problems found by static checking.
7475 * process.c (write_queue_push, write_queue_pop, send_process):
7476 Use ptrdiff_t, not int or EMACS_INT, for buffer lengths and offsets.
7477 (write_queue_pop): Fix pointer signedness problem.
7478 (send_process): Remove unused local.
7480 2012-06-17 Chong Yidong <cyd@gnu.org>
7482 * xdisp.c (redisplay_internal): No need to redisplay terminal
7483 frames that are not on top.
7485 2012-06-17 Troels Nielsen <bn.troels@gmail.com>
7487 * process.c (make_process): Initialize write_queue.
7488 (write_queue_push, write_queue_pop): New functions.
7489 (send_process): Use them to maintain correct ordering of process
7492 2012-06-17 Paul Eggert <eggert@cs.ucla.edu>
7494 * lisp.h (eassert): Assume C89 or later.
7495 This removes the need for CHECK.
7496 (CHECK): Remove. Its comments about always evaluating its
7497 argument were confusing, as 'eassert' typically does not evaluate
7500 * coding.c (produce_chars): Use ptrdiff_t, not int.
7502 * xterm.c (x_draw_underwave): Check for integer overflow.
7503 This pacifies gcc 4.7.0 -Wunsafe-loop-optimizations on x86-64.
7505 2012-06-17 Jan Djärv <jan.h.d@swipnet.se>
7507 * nsterm.m (x_free_frame_resources): Move xfree so freed memory isn't
7508 referenced (Bug#11583).
7510 2012-06-16 Aurelien Aptel <aurelien.aptel@gmail.com>
7512 Implement wave-style variant of underlining.
7513 * dispextern.h (face_underline_type): New enum.
7514 (face): Add field for underline type.
7515 * nsterm.m (ns_draw_underwave): New function.
7516 (ns_draw_text_decoration): Use it.
7517 * w32term.c (w32_restore_glyph_string_clip, w32_draw_underwave):
7519 (x_draw_glyph_string): Use them.
7520 * xfaces.c (Qline, Qwave): New Lisp objects.
7521 (check_lface_attrs, merge_face_ref)
7522 (Finternal_set_lisp_face_attribute, realize_x_face):
7523 Handle wave-style underline face attributes.
7524 * xterm.c (x_draw_underwave): New function.
7525 (x_draw_glyph_string): Use it.
7527 2012-06-16 Juanma Barranquero <lekktu@gmail.com>
7529 * makefile.w32-in ($(BLD)/emacs.$(O), $(BLD)/fringe.$(O))
7530 ($(BLD)/xml.$(O), $(BLD)/intervals.$(O), $(BLD)/macros.$(O))
7531 ($(BLD)/minibuf.$(O), $(BLD)/regex.$(O), $(BLD)/region-cache.$(O))
7532 ($(BLD)/textprop.$(O), $(BLD)/undo.$(O), $(BLD)/window.$(O))
7533 ($(BLD)/w32select.$(O)): Update dependencies.
7535 2012-06-16 Andreas Schwab <schwab@linux-m68k.org>
7537 * buffer.h (FETCH_MULTIBYTE_CHAR): Define as inline.
7538 (BUF_FETCH_MULTIBYTE_CHAR): Likewise.
7539 * character.c (_fetch_multibyte_char_p): Remove.
7540 * alloc.c: Include "character.h" before "buffer.h".
7542 * buffer.c: Likewise.
7543 * bytecode.c: Likewise.
7544 * callint.c: Likewise.
7545 * callproc.c: Likewise.
7546 * casefiddle.c: Likewise.
7547 * casetab.c: Likewise.
7548 * category.c: Likewise.
7550 * coding.c: Likewise.
7551 * composite.c: Likewise.
7552 * dired.c: Likewise.
7553 * dispnew.c: Likewise.
7555 * dosfns.c: Likewise.
7556 * editfns.c: Likewise.
7557 * emacs.c: Likewise.
7558 * fileio.c: Likewise.
7559 * filelock.c: Likewise.
7561 * fontset.c: Likewise.
7562 * fringe.c: Likewise.
7563 * indent.c: Likewise.
7564 * insdel.c: Likewise.
7565 * intervals.c: Likewise.
7566 * keyboard.c: Likewise.
7567 * keymap.c: Likewise.
7568 * lread.c: Likewise.
7569 * macros.c: Likewise.
7570 * marker.c: Likewise.
7571 * minibuf.c: Likewise.
7572 * nsfns.m: Likewise.
7573 * nsmenu.m: Likewise.
7574 * print.c: Likewise.
7575 * process.c: Likewise.
7576 * regex.c: Likewise.
7577 * region-cache.c: Likewise.
7578 * search.c: Likewise.
7579 * syntax.c: Likewise.
7581 * textprop.c: Likewise.
7583 * unexsol.c: Likewise.
7584 * w16select.c: Likewise.
7585 * w32fns.c: Likewise.
7586 * w32menu.c: Likewise.
7587 * window.c: Likewise.
7588 * xdisp.c: Likewise.
7590 * xmenu.c: Likewise.
7592 * xselect.c: Likewise.
7594 2012-06-16 Eli Zaretskii <eliz@gnu.org>
7596 * xdisp.c (set_cursor_from_row): Don't dereference glyphs_end.
7597 If all the glyphs of the glyph row came from strings, and we have no
7598 cursor positioning clues, put the cursor on the first glyph of the
7600 (handle_face_prop): Use chunk-relative overlay string index when
7601 indexing into it->string_overlays array. (Bug#11653)
7602 (set_cursor_from_row): Use the leftmost glyph as GLYPH_BEFORE, not
7603 the rightmost. (Bug#11720)
7605 2012-06-16 Andreas Schwab <schwab@linux-m68k.org>
7607 * category.h (CHAR_HAS_CATEGORY): Define as inline.
7608 (CATEGORY_MEMBER): Enforce 1/0 value.
7609 * category.c (_temp_category_set): Remove.
7611 2012-06-16 Eli Zaretskii <eliz@gnu.org>
7613 * window.c (Fdelete_other_windows_internal)
7614 (Fdelete_window_internal): Don't access frame's mouse highlight
7615 info of the initial frame. (Bug#11677)
7617 2012-06-14 Paul Eggert <eggert@cs.ucla.edu>
7619 * .gdbinit (xgetint): Fix recently-introduced paren typo.
7620 Assume USE_2_TAGS_FOR_INTS.
7621 (xreload): Adjust $tagmask width to match recent lisp.h change.
7623 Simplify lisp.h in minor ways that should not affect code.
7624 * lisp.h (USE_2_TAGS_FOR_INTS): Remove, as it was always defined.
7625 (LISP_INT_TAG, case_Lisp_Int, LISP_STRING_TAG, LISP_INT_TAG_P)
7626 (LISP_INT1_TAG, enum Lisp_Type, XINT, XUINT, make_number):
7627 Simplify under the assumption that USE_2_TAGS_FOR_INTS is defined.
7628 (INTTYPEBITS): New macro, for clarity.
7629 (INTMASK, MOST_POSITIVE_FIXNUM): Use it.
7630 (LISP_INT1_TAG, LISP_STRING_TAG, LISP_INT_TAG_P):
7631 Simplify now that USE_LSB_TAG is always defined.
7632 (TYPEMASK, XINT) [USE_LSB_TAG]: Remove unnecessary cast.
7633 (make_number) [!USE_LSB_TAG]: Use INTMASK; that's simpler.
7635 2012-06-13 Juanma Barranquero <lekktu@gmail.com>
7637 * makefile.w32-in ($(BLD)/data.$(O)): Update dependencies.
7639 2012-06-13 Glenn Morris <rgm@gnu.org>
7641 * s/bsd-common.h (BSD4_3):
7642 * s/usg5-4-common.h (USG5_4): No longer define; unused.
7644 2012-06-13 Andreas Schwab <schwab@linux-m68k.org>
7646 * lisp.h (Lisp_Object) [CHECK_LISP_OBJECT_TYPE]: Define as struct
7649 (XHASH, XTYPE, XINT, XUINT, make_number, XSET, XPNTR, XUNTAG):
7651 * emacs.c (gdb_use_struct): Rename from gdb_use_union.
7652 * .gdbinit: Check gdb_use_struct instead of gdb_use_union.
7653 * alloc.c (widen_to_Lisp_Object): Remove.
7654 (mark_memory): Use XIL instead of widen_to_Lisp_Object.
7655 * frame.c (delete_frame): Remove outdated comment.
7656 * w32fns.c (Fw32_register_hot_key): Use XLI instead of checking
7657 USE_LISP_UNION_TYPE.
7658 (Fw32_unregister_hot_key): Likewise.
7659 (Fw32_toggle_lock_key): Likewise.
7660 * w32menu.c (add_menu_item): Likewise.
7661 (w32_menu_display_help): Use XIL instead of checking
7662 USE_LISP_UNION_TYPE.
7663 * w32heap.c (allocate_heap): Don't check USE_LISP_UNION_TYPE.
7664 (init_heap): Likewise.
7665 * w32term.c (w32_read_socket): Update comment.
7667 2012-06-13 Glenn Morris <rgm@gnu.org>
7669 * s/usg5-4-common.h, src/s/unixware.h:
7670 Remove define/undef of HAVE_SYSV_SIGPAUSE (not used since 2010-05-04).
7672 * s/gnu.h (POSIX_SIGNALS): Remove (not used since 2010-05-04).
7674 2012-06-13 Paul Eggert <eggert@cs.ucla.edu>
7676 USE_LISP_UNION_TYPE + USE_LSB_TAG cleanup (Bug#11604)
7677 * alloc.c (make_number) [!defined make_number]:
7678 Remove, as lisp.h always defines this now.
7679 (mark_maybe_pointer): Simplify since USE_LSB_TAG is always defined now.
7680 (roundup_size): Verify that it is a power of 2.
7681 * data.c (Fmake_variable_buffer_local, Fmake_local_variable):
7682 * ftfont.c (ftfont_driver): Use LISP_INITIALLY_ZERO.
7683 * lisp.h (USE_LSB_TAG): Allow the builder to compile with
7684 -DUSE_LSB_TAG=0, to override the automatically-selected default.
7685 USE_LSB_TAG now is always defined to be either 0 or 1.
7687 (union Lisp_Object): Don't worry about WORDS_BIGENDIAN; the
7688 code works fine either way, and efficiency is not a concern here,
7689 as the union type is for debugging, not for production.
7690 (LISP_MAKE_RVALUE, make_number) [USE_LISP_UNION_TYPE]:
7691 Use an inline function on all platforms when using the union type,
7692 since this is simpler and 'static inline' can be used portably
7694 (LISP_INITIALLY_ZERO): New macro.
7695 (XFASTINT, XSETFASTINT) [USE_LISP_UNION_TYPE]: Remove.
7696 (XSET) [USE_LISP_UNION_TYPE]: Don't overparenthesize.
7698 2012-06-12 Glenn Morris <rgm@gnu.org>
7700 * s/gnu-kfreebsd.h, s/hpux11.h, s/openbsd.h, s/sol2-10.h: Remove files.
7702 * s/gnu-linux.h (HAVE_PROCFS): Move to configure.
7704 * s/hpux10-20.h, s/openbsd.h, s/usg5-4-common.h:
7705 Move BROKEN_SIGIO to configure.
7707 * s/bsd-common.h, s/darwin.h, s/gnu-kfreebsd.h, s/hpux10-20.h:
7708 Move NO_TERMIO to configure.
7710 2012-06-12 Chong Yidong <cyd@gnu.org>
7712 * image.c (imagemagick_load_image): Use MagickFlattenImage if
7713 MagickMergeImageLayers is undefined. Use pixel pusher loop if
7714 MagickExportImagePixels is undefined.
7716 2012-06-12 Paul Eggert <eggert@cs.ucla.edu>
7718 * image.c (imagemagick_load_image): Remove unused label.
7720 2012-06-11 Glenn Morris <rgm@gnu.org>
7722 * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/darwin.h:
7723 * s/gnu-kfreebsd.h, s/gnu-linux.h, s/gnu.h, s/hpux10-20.h:
7724 * s/irix6-5.h, s/ms-w32.h, s/msdos.h, s/template.h:
7725 * s/usg5-4-common.h: Move SYSTEM_TYPE to configure.
7727 2012-06-11 Stefan Monnier <monnier@iro.umontreal.ca>
7729 * alloc.c (make_byte_code): New function.
7730 (Fmake_byte_code): Use it. Don't purify here.
7731 * lread.c (read1): Use it as well to avoid extra allocation.
7733 2012-06-11 Chong Yidong <cyd@gnu.org>
7735 * image.c (imagemagick_load_image): Implement transparency.
7737 2012-06-10 Andreas Schwab <schwab@linux-m68k.org>
7739 * regex.c (at_begline_loc_p): Also recognize `(?N:' and correctly
7740 account for preceding backslashes. (Bug#11663)
7742 2012-06-09 Chong Yidong <cyd@gnu.org>
7744 * term.c: Support italics in capable terminals (Bug#9652).
7745 (no_color_bit): Replace unused NC_BLINK with NC_ITALIC.
7746 (turn_on_face): Output using TS_enter_italic_mode if available.
7747 Don't handle unused blinking and alt-charset cases.
7748 (turn_off_face): Handle italic case; discard unused tty_blinking_p
7749 and tty_alt_charset_p cases.
7750 (tty_capable_p, init_tty): Support italics.
7752 * termchar.h (struct tty_display_info): Add field for italics.
7753 Remove unused blink field.
7755 * xfaces.c (tty_supports_face_attributes_p, realize_tty_face):
7758 * dispextern.h: Replace unused TTY_CAP_BLINK with TTY_CAP_ITALIC.
7759 (struct face): Remove unused fields tty_dim_p, tty_blinking_p, and
7760 tty_alt_charset_p. Add tty_italic_p.
7762 2012-06-09 Michael Albinus <michael.albinus@gmx.de>
7764 * dbusbind.c (XD_BASIC_DBUS_TYPE): Use dbus_type_is_valid and
7765 dbus_type_is_basic if available.
7766 (xd_extract_signed, xd_extract_unsigned): Rename from
7767 extract_signed and extract_unsigned, respectively. Adapt callers.
7769 2012-06-09 Chong Yidong <cyd@gnu.org>
7771 * xfaces.c (face_for_overlay_string): Handle face remapping (Bug#2066).
7773 * fringe.c (Fset_fringe_bitmap_face): Handle the noninteractive
7776 2012-06-08 Paul Eggert <eggert@cs.ucla.edu>
7778 * xdisp.c (vmessage): Treat frame message as multibyte.
7779 Without this change, (let ((§ 1)) (make-variable-buffer-local '§))
7780 would generate the diagnostic "Making \302\247 buffer-local while
7783 2012-06-08 Eli Zaretskii <eliz@gnu.org>
7785 * dispnew.c (showing_window_margins_p): Undo last change, which
7786 was done due to an inadvertent commit.
7787 (adjust_frame_glyphs_for_frame_redisplay): Do call
7788 showing_window_margins_p.
7790 2012-06-08 Stefan Monnier <monnier@iro.umontreal.ca>
7792 * eval.c (Fmake_var_non_special): New primitive.
7793 (syms_of_eval): Defsubr it.
7794 * lread.c (syms_of_lread): Mark `values' as lexically scoped.
7796 2012-06-08 Juanma Barranquero <lekktu@gmail.com>
7798 * dispnew.c (showing_window_margins_p): Wrap in #if 0 to prevent unused
7799 function warning (the only call is inside #if 0 since 2012-06-08T08:44:45Z!eliz@gnu.org).
7801 2012-06-08 Eli Zaretskii <eliz@gnu.org>
7803 * alloc.c (allocate_vectorlike): Fix last change.
7805 2012-06-08 Dmitry Antipov <dmantipov@yandex.ru>
7807 Block-based vector allocation of small vectors.
7808 * lisp.h (struct vectorlike_header): New field `nbytes',
7809 adjust comment accordingly.
7810 * alloc.c (enum mem_type): New type `MEM_TYPE_VECTOR_BLOCK'
7811 to denote vector blocks. Adjust users (live_vector_p,
7812 mark_maybe_pointer, valid_lisp_object_p) accordingly.
7813 (COMMON_MULTIPLE): Move outside #if USE_LSB_TAG.
7814 (VECTOR_BLOCK_SIZE, vroundup, VECTOR_BLOCK_BYTES),
7815 (VBLOCK_BYTES_MIN, VBLOCK_BYTES_MAX, VECTOR_MAX_FREE_LIST_INDEX),
7816 (VECTOR_FREE_LIST_FLAG, ADVANCE, VINDEX, SETUP_ON_FREE_LIST),
7817 (VECTOR_SIZE, VECTOR_IN_BLOCK): New macros.
7818 (roundup_size): New constant.
7819 (struct vector_block): New data type.
7820 (vector_blocks, vector_free_lists, zero_vector): New variables.
7821 (all_vectors): Rename to `large_vectors'.
7822 (allocate_vector_from_block, init_vectors, allocate_vector_from_block)
7823 (sweep_vectors): New functions.
7824 (allocate_vectorlike): Return `zero_vector' as the only vector of
7825 0 items. Allocate new vector from block if vector size is less than
7826 or equal to VBLOCK_BYTES_MAX.
7827 (Fgarbage_collect): Move all vector sweeping code to sweep_vectors.
7828 (init_alloc_once): Add call to init_vectors.
7830 2012-06-08 Stefan Monnier <monnier@iro.umontreal.ca>
7832 * eval.c (Fmacroexpand): Stop if the macro returns the same form.
7834 2012-06-07 Paul Eggert <eggert@cs.ucla.edu>
7836 * doprnt.c (doprnt): Truncate multibyte char correctly.
7837 Without this change, doprnt (buf, 2, "%s", FORMAT_END, AP)
7838 would mishandle a string argument "Xc" if X was a multibyte
7839 character of length 2: it would truncate after X's first byte
7840 rather than including all of X.
7842 2012-06-06 Chong Yidong <cyd@gnu.org>
7844 * buffer.c (word_wrap): Doc fix.
7846 2012-06-04 Paul Eggert <eggert@cs.ucla.edu>
7848 * xdisp.c (note_mode_line_or_margin_highlight): Pacify gcc -Wall.
7850 2012-06-03 Glenn Morris <rgm@gnu.org>
7852 * xdisp.c (tool-bar-style): Doc fix.
7854 2012-06-03 Ulrich Müller <ulm@gentoo.org>
7856 * Makefile.in (PAXCTL): Define.
7857 (temacs$(EXEEXT)): Disable memory randomization for the temacs
7858 binary via PaX flags if the paxctl utility is available.
7859 (emacs$(EXEEXT), bootstrap-emacs$(EXEEXT)):
7860 Restore PaX flags to their default. (Bug#11398)
7862 2012-06-03 Chong Yidong <cyd@gnu.org>
7864 * xdisp.c (decode_mode_spec_coding): Display a space for a unibyte
7867 2012-06-03 Chong Yidong <cyd@gnu.org>
7869 * xdisp.c (calc_pixel_width_or_height): Use Fbuffer_local_value.
7870 (note_mode_line_or_margin_highlight): If there is no help echo,
7871 use mode-line-default-help-echo. Handle the case where the mouse
7872 position is past the end of the mode line string.
7874 * buffer.c (buffer_local_value_1): New function, split from
7875 Fbuffer_local_value; can return Qunbound.
7876 (Fbuffer_local_value): Use it.
7877 (Vmode_line_format): Docstring tweaks.
7879 2012-06-02 Paul Eggert <eggert@cs.ucla.edu>
7881 * sysdep.c (system_process_attributes): Improve comment.
7883 2012-06-02 Stefan Monnier <monnier@iro.umontreal.ca>
7885 * keyboard.c: Export real-this-command to Elisp.
7886 (syms_of_keyboard): Rename real_this_command to Vreal_this_command
7887 and DEFVAR it. Update all users.
7889 2012-06-02 Paul Eggert <eggert@cs.ucla.edu>
7891 * minibuf.c (Fassoc_string): Remove duplicate declaration.
7893 * sysdep.c (system_process_attributes) [SOLARIS2 && HAVE_PROCFS]:
7894 Convert pctcpu and pctmem to Lisp float properly.
7895 Let the compiler fold better, as 100.0/0x8000 is exact.
7897 2012-06-02 Andreas Schwab <schwab@linux-m68k.org>
7899 * alloc.c (CONS_BLOCK_SIZE): Account for padding at the end of
7902 2012-06-01 Paul Eggert <eggert@cs.ucla.edu>
7904 * xfns.c (x_set_tool_bar_lines) [USE_GTK]: Adjust to bitfield change.
7906 2012-06-01 Dmitry Antipov <dmantipov@yandex.ru>
7908 For a 'struct window', replace some Lisp_Object fields to
7909 bitfields where appropriate, remove unused fields.
7910 * window.h (struct window): Remove unused 'last_mark_x' and
7911 'last_mark_y' fields. Rename 'mini_p' field to 'mini',
7912 change its type from Lisp_Object to bitfield.
7913 Change type of 'force_start', 'optional_new_start',
7914 'last_had_star', 'update_mode_line' and 'start_at_line_beg'
7915 fields from Lisp_Object to bitfield. Adjust users accordingly.
7917 2012-05-31 Paul Eggert <eggert@cs.ucla.edu>
7919 Pacify gcc -Wdouble-precision when using Xaw.
7920 * xterm.c (xaw_jump_callback, x_set_toolkit_scroll_bar_thumb)
7921 [HAVE_X_WINDOWS && USE_TOOLKIT_SCROLL_BARS && !USE_MOTIF && !USE_GTK]:
7922 Use 'float' consistently, rather than 'float' in most places
7923 and 'double' in a couple of places.
7925 2012-05-31 Eli Zaretskii <eliz@gnu.org>
7927 * xdisp.c (handle_stop): Detect whether we have overlay strings
7928 loaded by testing it->current.overlay_string_index to be
7929 non-negative, instead of checking whether n_overlay_strings is
7930 positive. (Bug#11587)
7932 2012-05-31 Chong Yidong <cyd@gnu.org>
7934 * keymap.c (describe_map_tree): Revert 2011-07-07 change (Bug#1169).
7936 * doc.c (Fsubstitute_command_keys): Doc fix.
7938 2012-05-31 Eli Zaretskii <eliz@gnu.org>
7940 * search.c (search_buffer): Remove calls to
7941 r_alloc_inhibit_buffer_relocation, as it is now called by
7942 maybe_unify_char, which was the cause of relocation of buffer text
7945 2012-05-31 Eli Zaretskii <eliz@gnu.org>
7947 * charset.c (maybe_unify_char): Inhibit relocation of buffer text
7948 for the duration of call to load_charset, to avoid problems with
7949 callers of maybe_unify_char that access buffer text through C
7952 * ralloc.c (r_alloc_inhibit_buffer_relocation): Increment and
7953 decrement the inhibition flag, instead of just setting or
7956 2012-05-31 Paul Eggert <eggert@cs.ucla.edu>
7958 Remove obsolete '#define static' cruft.
7959 * s/hpux10-20.h (_FILE_OFFSET_BITS): Don't #undef.
7960 This #undef was "temporary" in 2000; it is no longer needed
7961 now that '#define static' has gone away.
7962 * xfns.c, xterm.h (gray_bitmap_width, gray_bitmap_height)
7963 (gray_bitmap_bits): Remove; no longer needed.
7964 All uses replaced with definiens.
7965 * xterm.c: Include "bitmaps/gray.xbm".
7967 2012-05-30 Paul Eggert <eggert@cs.ucla.edu>
7969 Clean up __executable_start, monstartup when --enable-profiling.
7970 The following changes affect the code only when profiling.
7971 * dispnew.c (__executable_start): Rename from safe_bcopy.
7972 Define only on platforms that need it.
7973 * emacs.c: Include <sys/gmon.h> when profiling.
7974 (_mcleanup): Remove decl, since <sys/gmon.h> does it now.
7975 (__executable_start): Remove decl, since lisp.h does it now.
7976 (safe_bcopy): Remove decl; no longer has that name.
7977 (main): Coalesce #if into single bit of code, for simplicity.
7978 Cast pointers to uintptr_t, since standard libraries want integers
7980 * lisp.h (__executable_start): New decl.
7982 2012-05-31 Glenn Morris <rgm@gnu.org>
7984 * image.c (Fimagemagick_types): Doc fix.
7986 2012-05-30 Jim Meyering <meyering@redhat.com>
7988 * callproc.c (Fcall_process_region): Include directory component
7989 in mkstemp error message (Bug#11586).
7991 2012-05-30 Paul Eggert <eggert@cs.ucla.edu>
7993 * alloc.c, lisp.h (make_pure_vector): Now static.
7995 2012-05-30 Stefan Monnier <monnier@iro.umontreal.ca>
7997 * eval.c (Fdefun, Fdefmacro, Vmacro_declaration_function):
7998 Move to byte-run.el.
7999 (Fautoload): Do the hash-doc more carefully.
8000 * data.c (Fdefalias): Purify definition, except for keymaps.
8001 (Qdefun): Move from eval.c.
8002 * lisp.h (Qdefun): Remove.
8003 * lread.c (read1): Tiny simplification.
8005 2012-05-29 Troels Nielsen <bn.troels@gmail.com>
8007 Do not create empty overlays with the evaporate property (Bug#9642).
8008 * buffer.c (Fmove_overlay): Reinstate the earlier fix for
8009 Bug#9642, but explicitly check that the buffer the overlay would
8010 be moved to is live and rearrange lines to make sure that errors
8011 will not put the overlay in an inconsistent state.
8012 (Fdelete_overlay): Cosmetics.
8014 2012-05-28 Eli Zaretskii <eliz@gnu.org>
8016 * w32term.c (my_bring_window_to_top): New function.
8017 (x_raise_frame): Use handle returned by DeferWindowPos, which
8018 could be different from the original one.
8019 Call my_bring_window_to_top instead of my_set_foreground_window.
8022 * w32fns.c (w32_wnd_proc): Accept and process WM_EMACS_BRINGTOTOP
8023 by calling BringWindowToTop.
8025 * w32term.h (WM_EMACS_BRINGTOTOP): New message.
8026 (WM_EMACS_END): Increase by one.
8028 2012-05-28 Paul Eggert <eggert@cs.ucla.edu>
8030 * bidi.c (bidi_mirror_char): Put eassert before conversion to int.
8031 This avoids undefined behavior that might cause the eassert
8032 to not catch an out-of-range value.
8034 2012-05-28 Juanma Barranquero <lekktu@gmail.com>
8036 * makefile.w32-in ($(BLD)/w32inevt.$(O), $(BLD)/w32console.$(O)):
8037 Update dependencies.
8039 2012-05-27 Eli Zaretskii <eliz@gnu.org>
8041 * bidi.c (bidi_mirror_char): Fix last change.
8043 2012-05-27 Andreas Schwab <schwab@linux-m68k.org>
8045 * unexmacosx.c (copy_data_segment): Truncate after 16 characters
8046 when referring to sectname field in printf format.
8048 2012-05-27 Paul Eggert <eggert@cs.ucla.edu>
8050 * lisp.h [REL_ALLOC]: Omit duplicate prototypes.
8051 Only r_alloc_inhibit_buffer_relocation needed to be added;
8052 the others were already declared.
8054 * bidi.c (bidi_mirror_char): Don't possibly truncate the integer
8055 before checking whether it's out of range. Put the check inside
8057 <http://lists.gnu.org/archive/html/emacs-devel/2012-05/msg00485.html>.
8059 2012-05-27 Ken Brown <kbrown@cornell.edu>
8061 * callproc.c (Fcall_process): Restore a line that was accidentally
8062 commented out in the 2011-02-13 change (bug#11547).
8064 2012-05-27 Eli Zaretskii <eliz@gnu.org>
8066 * lisp.h [REL_ALLOC]: Add prototypes for external functions
8067 defined on ralloc.c.
8069 * buffer.c [REL_ALLOC]: Remove prototypes of
8070 r_alloc_reset_variable, r_alloc, r_re_alloc, and r_alloc_free,
8071 they are now on lisp.h.
8073 * ralloc.c (r_alloc_inhibit_buffer_relocation): New function.
8075 * search.c (search_buffer): Use it to inhibit relocation of buffer
8076 text while re_search_2 is doing its job, because re_search_2 is
8077 passed C pointers to buffer text. (Bug#11519)
8079 * msdos.c (internal_terminal_init) <Vwindow_system_version>:
8082 * xdisp.c (move_it_to): Under MOVE_TO_Y, when restoring iterator
8083 state after an additional call to move_it_in_display_line_to, keep
8084 the values of it->max_ascent and it->max_descent found for the
8086 (pos_visible_p): Revert the comparison against bottom_y to what it
8087 was in revid eliz@gnu.org-20120513182235-4p6386j761ld0nwb.
8090 2012-05-26 Paul Eggert <eggert@cs.ucla.edu>
8092 Fix coding-related core dumps with gcc -ftrapv.
8093 The code was computing A - B, where A and B are pointers, and B is
8094 random garbage. This can lead to core dumps on platforms that
8095 have special pointer registers, and it also leads to core dumps on
8096 x86-64 when compiled with gcc -ftrapv. The fix is to compute
8097 A - B only when B is initialized properly.
8098 * coding.c (coding_set_source, coding_set_destination): Return void.
8099 (coding_change_source, coding_change_destinations): New functions,
8100 with the old behaviors of coding_set_source and coding_set_destination.
8101 All callers that need an offset changed to use these new functions.
8103 2012-05-26 Glenn Morris <rgm@gnu.org>
8105 * nsterm.m (ns_init_paths): Don't mess with INFOPATH. (Bug#2791)
8107 2012-05-26 Eli Zaretskii <eliz@gnu.org>
8109 Extend mouse support on W32 text-mode console.
8110 * xdisp.c (draw_row_with_mouse_face):
8111 Call tty_draw_row_with_mouse_face for WINDOWSNT as well.
8113 * w32console.c: Include window.h.
8114 (w32con_write_glyphs_with_face, tty_draw_row_with_mouse_face):
8116 (initialize_w32_display): Initialize mouse-highlight data.
8118 * w32inevt.c: Include termchar.h and window.h.
8119 (do_mouse_event): Support mouse-autoselect-window. When the mouse
8120 moves, call note_mouse_highlight. If help_echo changed, call
8121 gen_help_event to produce help-echo message in the echo area.
8122 Call clear_mouse_face if mouse_face_hidden is set in the mouse
8125 2012-05-26 Paul Eggert <eggert@cs.ucla.edu>
8127 * lread.c (read1): Simplify slightly to avoid an overflow warning
8128 with GCC 4.7.0 on x86-64.
8130 2012-05-26 Eli Zaretskii <eliz@gnu.org>
8132 * bidi.c (bidi_mirror_char): Revert last change: an int is
8133 definitely wide enough here.
8135 2012-05-25 Paul Eggert <eggert@cs.ucla.edu>
8137 Fix integer width and related bugs (Bug#9874).
8138 * alloc.c (pure_bytes_used_lisp, pure_bytes_used_non_lisp):
8139 (allocate_vectorlike, buffer_memory_full, struct sdata, SDATA_SIZE)
8140 (string_bytes, check_sblock, allocate_string_data):
8141 (compact_small_strings, Fmake_bool_vector, make_string)
8142 (make_unibyte_string, make_multibyte_string)
8143 (make_string_from_bytes, make_specified_string)
8144 (allocate_vectorlike, Fmake_vector, find_string_data_in_pure)
8145 (make_pure_string, make_pure_c_string, make_pure_vector, Fpurecopy)
8147 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8148 (allocate_pseudovector):
8149 Use int, not EMACS_INT, where int is wide enough.
8150 (inhibit_garbage_collection, Fgarbage_collect):
8151 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8152 * bidi.c (bidi_mirror_char): Use EMACS_INT, not int, where
8153 int might not be wide enough.
8154 (bidi_cache_search, bidi_cache_find, bidi_init_it)
8155 (bidi_count_bytes, bidi_char_at_pos, bidi_fetch_char)
8156 (bidi_at_paragraph_end, bidi_find_paragraph_start)
8157 (bidi_paragraph_init, bidi_resolve_explicit, bidi_resolve_weak)
8158 (bidi_level_of_next_char, bidi_move_to_visually_next):
8159 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8160 * buffer.c (copy_overlays, Fgenerate_new_buffer_name)
8161 (Fkill_buffer, Fset_buffer_major_mode)
8162 (advance_to_char_boundary, Fbuffer_swap_text)
8163 (Fset_buffer_multibyte, overlays_at, overlays_in)
8164 (overlay_touches_p, struct sortvec, record_overlay_string)
8165 (overlay_strings, recenter_overlay_lists)
8166 (adjust_overlays_for_insert, adjust_overlays_for_delete)
8167 (fix_start_end_in_overlays, fix_overlays_before, modify_overlay)
8168 (Fmove_overlay, Fnext_overlay_change, Fprevious_overlay_change)
8169 (Foverlay_recenter, last_overlay_modification_hooks_used)
8170 (report_overlay_modification, evaporate_overlays, enlarge_buffer_text):
8171 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8172 (validate_region): Omit unnecessary test for b <= e,
8173 since that's guaranteed by the previous test.
8174 (adjust_overlays_for_delete): Avoid pos + length overflow.
8175 (Fmove_overlay, Fdelete_overlay, add_overlay_mod_hooklist)
8176 (report_overlay_modification):
8177 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8178 (Foverlays_at, Fnext_overlay_change, Fprevious_overlay_change):
8179 Omit pointer cast, which isn't needed anyway, and doesn't work
8180 after the EMACS_INT -> ptrdiff_t change.
8181 (Fmove_overlay): Clip BEG and END to ptrdiff_t to avoid overflow.
8182 * buffer.h: Adjust decls to match defn changes elsewhere.
8183 (struct buffer_text, struct buffer):
8184 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8185 Use EMACS_INT, not int, where int might not be wide enough.
8186 * bytecode.c (unmark_byte_stack, exec_byte_code): Use ptrdiff_t,
8187 not int, to avoid needless 32-bit limit on 64-bit hosts.
8188 (exec_byte_code): Use tighter memory-full test, one that checks
8189 for alloca overflow. Don't compute the address of the object just
8190 before an array, as that's not portable. Use EMACS_INT, not
8191 ptrdiff_t or int, where ptrdiff_t or int might not be wide enough.
8192 * callint.c (Fcall_interactively):
8193 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8194 * callproc.c (call_process_kill, Fcall_process):
8195 Don't assume pid_t fits into an Emacs fixnum.
8196 (call_process_cleanup, Fcall_process, child_setup):
8197 Don't assume pid_t fits into int.
8198 (call_process_cleanup, Fcall_process, delete_temp_file)
8199 (Fcall_process_region):
8200 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8201 (Fcall_process): Simplify handling of volatile integers.
8202 Use int, not EMACS_INT, where int will do.
8203 * casefiddle.c (casify_object, casify_region, operate_on_word)
8204 (Fupcase_word, Fdowncase_word, Fcapitalize_word):
8205 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8206 (casify_object): Avoid integer overflow when overallocating buffer.
8207 * casetab.c (set_identity, shuffle): Prefer int to unsigned when
8208 either works. Use lint_assume to convince GCC 4.6.1 that it's OK.
8209 * category.c (Fchar_category_set): Don't assume fixnum fits in int.
8210 * category.h (CATEGORYP): Don't assume arg is nonnegative.
8211 * ccl.c (GET_CCL_INT): Remove; no longer needed, since the
8212 integers are now checked earlier. All uses replaced with XINT.
8214 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8215 For CCL_MapSingle, check that content and value are in int range.
8216 (ccl_driver, Fregister_code_conversion_map):
8217 Check that Vcode_version_map_vector is a vector.
8218 (resolve_symbol_ccl_program): Check that vector header is in range.
8219 Always copy the vector, so that we can check its contents reliably
8220 now rather than having to recheck each instruction as it's being
8221 executed. Check that vector words fit in 'int'.
8222 (ccl_get_compiled_code, Fregister_ccl_program)
8223 (Fregister_code_conversion_map): Use ptrdiff_t, not int, for
8224 program indexes, to avoid needless 32-bit limit on 64-bit hosts.
8225 (Fccl_execute, Fccl_execute_on_string): Check that initial reg
8226 contents are in range.
8227 (Fccl_execute_on_string): Check that status is in range.
8228 * ccl.h (struct ccl_program.idx): Now ptrdiff_t, not int.
8229 * character.c (char_resolve_modifier_mask, Fchar_resolve_modifiers):
8230 Accept and return EMACS_INT, not int, because callers can pass values
8232 (c_string_width, strwidth, lisp_string_width, chars_in_text)
8233 (multibyte_chars_in_text, parse_str_as_multibyte)
8234 (str_as_multibyte, count_size_as_multibyte, str_to_multibyte)
8235 (str_as_unibyte, str_to_unibyte, string_count_byte8)
8236 (string_escape_byte8, Fget_byte):
8237 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8238 (Funibyte_string): Use CHECK_RANGED_INTEGER, not CHECK_NATNUM, to
8239 avoid mishandling large integers.
8240 * character.h: Adjust decls to match defn changes elsewhere.
8241 * charset.c (load_charset_map_from_file, find_charsets_in_text)
8242 (Ffind_charset_region):
8243 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8244 (load_charset_map_from_file): Redo idx calculation to avoid overflow.
8245 (load_charset_map_from_vector, Fdefine_charset_internal):
8246 Don't assume fixnum fits in int.
8247 (load_charset_map_from_vector, Fmap_charset_chars):
8248 Remove now-unnecessary CHECK_NATNUMs.
8249 (Fdefine_charset_internal): Check ranges here, more carefully.
8250 Don't rely on undefined behavior with signed left shift overflow.
8251 Don't assume unsigned int fits into fixnum, or that fixnum fits
8252 into unsigned int. Don't require max_code to be a valid fixnum;
8253 that's not true for gb10830 4-byte on a 32-bit host. Allow
8254 invalid_code to be a cons, for the same reason. Require code_offset
8255 to be a character. Avoid int overflow if max_char is close
8257 (CODE_POINT_TO_INDEX): On 32-bit hosts, return int, not unsigned;
8258 this is intended anyway and avoids some undefined behavior.
8259 (load_charset_map): Pass unsigned, not int, as 2nd arg of
8260 INDEX_TO_CODE_POINT, as that's what it expects.
8261 (Funify_charset, encode_char): Don't stuff unsigned vals into int vars.
8262 * charset.h (DECODE_CHAR): Return int, not unsigned;
8263 this is what was intended anyway, and it avoids undefined behavior.
8264 (CHARSET_OFFSET): Remove unused macro, instead of fixing its
8265 integer-overflow issues.
8266 (ENCODE_CHAR): Return unsigned on all hosts, not just on 32-bit hosts.
8267 Formerly, it returned EMACS_INT on 64-bit hosts in the common case
8268 where the argument is EMACS_INT, and this behavior is not intended.
8269 * chartab.c (Fmake_char_table, Fset_char_table_range)
8270 (uniprop_get_decoder, uniprop_get_encoder):
8271 Don't assume fixnum fits in int.
8272 * cmds.c (move_point): New function, that does the gist of
8273 Fforward_char and Fbackward_char, but does so while checking
8274 for integer overflow more accurately.
8275 (Fforward_char, Fbackward_char): Use it.
8276 (Fforward_line, Fend_of_line, internal_self_insert)
8277 (internal_self_insert):
8278 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8279 Fix a FIXME, by checking for integer overflow when calculating
8280 target_clm and actual_clm.
8281 * coding.c (detect_coding_XXX, encode_coding_XXX, CODING_DECODE_CHAR)
8282 (CODING_ENCODE_CHAR, CODING_CHAR_CHARSET, CODING_CHAR_CHARSET_P)
8283 (ASSURE_DESTINATION, coding_alloc_by_realloc)
8284 (coding_alloc_by_making_gap, alloc_destination)
8285 (detect_coding_utf_8, encode_coding_utf_8, decode_coding_utf_16)
8286 (encode_coding_utf_16, detect_coding_emacs_mule)
8287 (decode_coding_emacs_mule, encode_coding_emacs_mule)
8288 (detect_coding_iso_2022, decode_coding_iso_2022)
8289 (encode_invocation_designation, encode_designation_at_bol)
8290 (encode_coding_iso_2022, detect_coding_sjis, detect_coding_big5)
8291 (decode_coding_sjis, decode_coding_big5, encode_coding_sjis)
8292 (encode_coding_big5, detect_coding_ccl, decode_coding_ccl)
8293 (encode_coding_ccl, encode_coding_raw_text)
8294 (detect_coding_charset, decode_coding_charset)
8295 (encode_coding_charset, detect_eol, decode_eol, produce_chars)
8296 (produce_composition, produce_charset, produce_annotation)
8297 (decode_coding, handle_composition_annotation)
8298 (handle_charset_annotation, consume_chars, decode_coding_gap)
8299 (decode_coding_object, encode_coding_object, detect_coding_system)
8300 (Ffind_coding_systems_region_internal, Fcheck_coding_systems_region)
8301 (code_convert_region, code_convert_string)
8302 (Fdefine_coding_system_internal)
8303 (coding_set_source, coding_set_destination):
8304 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8305 (setup_iso_safe_charsets, consume_chars, Funencodable_char_position)
8306 (Fdefine_coding_system_internal):
8307 Don't assume fixnums fit in int.
8308 (decode_coding_gap, decode_coding_object, encode_coding_object)
8309 (Fread_coding_system, Fdetect_coding_region)
8310 (Funencodable_char_position, Fcheck_coding_systems_region)
8311 (get_translation, handle_composition_annotation, consume_chars):
8312 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8313 (consume_chars): Rewrite to not calculate an address outside buffer.
8314 (Ffind_operation_coding_system): NATNUMP can eval its arg twice.
8315 Don't access memory outside of the args array.
8316 (Fdefine_coding_system_internal): Check for charset-id overflow.
8317 (ENCODE_ISO_CHARACTER): Use unsigned, not int, to store the unsigned
8318 result of ENCODE_CHAR.
8319 * coding.h: Adjust decls to match defn changes elsewhere.
8320 (struct coding_system):
8321 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8322 * composite.c (get_composition_id, find_composition)
8323 (run_composition_function, update_compositions)
8324 (compose_text, composition_gstring_put_cache)
8325 (composition_gstring_p, composition_gstring_width)
8326 (fill_gstring_header, fill_gstring_body, autocmp_chars)
8327 (composition_compute_stop_pos, composition_reseat_it)
8328 (composition_update_it, struct position_record)
8329 (find_automatic_composition, composition_adjust_point)
8330 (Fcomposition_get_gstring, Ffind_composition_internal):
8331 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8332 (update_compositions):
8333 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8334 * composite.h: Adjust decls to match defn changes elsewhere.
8335 (struct composition):
8336 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8337 * data.c (let_shadows_buffer_binding_p, let_shadows_global_binding_p):
8338 Do not attempt to compute the address of the object just before a
8339 buffer; this is not portable.
8341 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8342 (Faset): Use int, not EMACS_INT, where int is wide enough.
8343 (Fstring_to_number): Don't assume fixnums fit in int.
8344 (Frem): Don't assume arg is nonnegative.
8345 * dbusbind.c (xd_append_arg): Check for integers out of range.
8346 (Fdbus_call_method): Don't overflow the timeout int.
8347 (extract_signed, extract_unsigned): New functions.
8348 (XD_CHECK_DBUS_SERIAL): Remove; superseded by extract_unsigned.
8349 (xd_get_connection_references): Return ptrdiff_t, not int.
8351 (xd_signature, xd_append_arg, xd_retrieve_arg, Fdbus_message_internal)
8352 (xd_read_message_1):
8353 Use int, not unsigned, where the dbus API uses int.
8354 (Fdbus_message_internal): Don't overflow mtype.
8355 (syms_of_dbusbind): Allocate right-sized buffer for integers.
8356 * dired.c (directory_files_internal, file_name_completion, scmp)
8357 (file_name_completion_stat):
8358 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8359 (file_name_completion): Don't overflow matchcount.
8360 (file_name_completion_stat): Use SAFE_ALLOCA, not alloca.
8361 * dispextern.h: Adjust decls to match defn changes elsewhere.
8362 (struct text_pos, struct glyph, struct bidi_saved_info)
8363 (struct bidi_string_data, struct bidi_it, struct composition_it)
8365 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8366 (struct display_pos, struct composition_it, struct it):
8367 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8368 * dispnew.c (increment_matrix_positions)
8369 (increment_row_positions, mode_line_string)
8370 (marginal_area_string):
8371 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8372 (change_frame_size_1, Fredisplay, Fframe_or_buffer_changed_p):
8373 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8374 (duration_to_sec_usec): New function, to check for overflow better.
8375 (Fsleep_for, sit_for): Use it.
8376 * doc.c (get_doc_string, store_function_docstring):
8377 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8378 (get_doc_string, Fsnarf_documentation):
8379 Use int, not EMACS_INT, where int is wide enough.
8381 Use SAFE_ALLOCA, not alloca.
8382 Check for overflow when converting EMACS_INT to off_t.
8383 * doprnt.c (doprnt):
8384 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8385 * editfns.c (init_editfns, Fuser_uid, Fuser_real_uid):
8386 Don't assume uid_t fits into fixnum.
8387 (buildmark, Fgoto_char, overlays_around, find_field, Fdelete_field)
8388 (Ffield_string, Ffield_string_no_properties, Ffield_beginning)
8389 (Ffield_end, Fconstrain_to_field, Fline_beginning_position)
8390 (Fline_end_position, Fprevious_char, Fchar_after, Fchar_before)
8391 (general_insert_function)
8392 (Finsert_char, make_buffer_string, make_buffer_string_both)
8393 (update_buffer_properties, Fbuffer_substring)
8394 (Fbuffer_substring_no_properties, Fcompare_buffer_substrings)
8395 (Fsubst_char_in_region, check_translation)
8396 (Ftranslate_region_internal, save_restriction_restore, Fformat)
8397 (transpose_markers, Ftranspose_regions):
8398 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8399 (clip_to_bounds): Move to lisp.h as an inline function).
8400 (Fconstrain_to_field): Don't assume integers are nonnegative.
8401 (Fline_beginning_position, Fsave_excursion, Fsave_current_buffer):
8402 (Fsubst_char_in_region, Fsave_restriction):
8403 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8404 (Femacs_pid): Don't assume pid_t fits into fixnum.
8405 (lo_time): Use int, not EMACS_INT, when int suffices.
8406 (lisp_time_argument): Check for usec out of range.
8407 (Fencode_time): Don't assume fixnum fits in int.
8408 (Fuser_login_name, Fuser_full_name): Signal an error
8409 if a uid argument is out of range, rather than relying on
8411 (Fformat_time_string): Remove now-unnecessary check.
8412 lisp_time_argument checks for out-of-range usec now.
8413 Use ptrdiff_t, not size_t, where ptrdiff_t will do.
8414 * emacs.c (gdb_valbits, gdb_gctypebits): Now int, not EMACS_INT.
8415 (gdb_data_seg_bits): Now uintptr_t, not EMACS_INT.
8416 (PVEC_FLAG, gdb_array_mark_flag): Now ptrdiff_t, not EMACS_INT.
8417 (init_cmdargs, Fdump_emacs):
8418 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8419 (Fkill_emacs): Don't assume fixnum fits in int; instead, take just
8420 the bottom (typically) 32 bits of the fixnum.
8421 * eval.c (specpdl_size, call_debugger):
8422 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8423 (when_entered_debugger, Fbacktrace_debug):
8424 Don't assume fixnum can fit in int.
8425 (Fdefvaralias, Fdefvar): Do not attempt to compute the address of
8426 the object just before a buffer; this is not portable.
8427 (FletX, Flet, Funwind_protect, do_autoload, Feval, funcall_lambda)
8428 (grow_specpdl, unbind_to):
8429 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8430 (Fapply, apply_lambda): Don't assume ptrdiff_t can hold fixnum.
8431 (grow_specpdl): Simplify allocation by using xpalloc.
8432 (Fprog1, Fprog2): Don't assume list length fits in int. Simplify.
8433 * fileio.c (Ffind_file_name_handler, Fcopy_file, Frename_file)
8434 (Finsert_file_contents, Fwrite_region, Fdo_auto_save):
8435 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8436 (Ffind_file_name_handler, non_regular_inserted, Finsert_file_contents)
8438 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8439 (Fcopy_file, non_regular_nbytes, read_non_regular)
8440 (Finsert_file_contents):
8441 Use int, not EMACS_INT, where int is wide enough.
8442 (READ_BUF_SIZE): Verify that it fits in int.
8443 (Finsert_file_contents): Check that counts are in proper range,
8444 rather than assuming fixnums fit into ptrdiff_t etc.
8445 Don't assume fixnums fit into int.
8446 * floatfns.c (Fexpt): Avoid undefined signed * signed overflow.
8447 * fns.c (Fcompare_strings, Fstring_lessp, struct textprop_rec, concat)
8448 (string_char_byte_cache_charpos, string_char_byte_cache_bytepos)
8449 (string_char_to_byte, string_byte_to_char)
8450 (string_make_multibyte, string_to_multibyte)
8451 (string_make_unibyte, Fstring_as_unibyte, Fstring_as_multibyte)
8452 (Fstring_to_unibyte, Fsubstring, Fsubstring_no_properties)
8453 (substring_both, Fdelete, internal_equal, Ffillarray)
8454 (Fclear_string, mapcar1)
8455 (Fbase64_encode_region, Fbase64_encode_string, base64_encode_1)
8456 (Fbase64_decode_region, Fbase64_decode_string, base64_decode_1)
8457 (larger_vector, make_hash_table, maybe_resize_hash_table)
8458 (hash_lookup, hash_remove_from_table, hash_clear, sweep_weak_table)
8459 (Fmaphash, secure_hash):
8460 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8461 (concat): Check for string index and length overflow.
8462 (Fmapconcat): Don't assume fixnums fit into ptrdiff_t.
8464 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8465 (larger_vector): New API (vec, incr_min, size_max) replaces old
8466 one (vec, new_size, init). This catches size overflow.
8467 INIT was removed because it was always Qnil.
8468 All callers changed.
8469 (INDEX_SIZE_BOUND): New macro, which calculates more precisely
8470 the upper bound on a hash table index size.
8471 (make_hash_table, maybe_resize_hash_table): Use it.
8472 (secure_hash): Computer start_byte and end_byte only after
8473 they're known to be in ptrdiff_t range.
8474 * font.c (font_intern_prop, font_at, font_range, Ffont_shape_gstring)
8475 (Ffont_get_glyphs, Ffont_at):
8476 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8477 (font_style_to_value, font_prop_validate_style, font_expand_wildcards)
8478 (Flist_fonts, Fopen_font):
8479 Don't assume fixnum can fit in int.
8480 (check_gstring): Don't assume index can fit in int.
8481 (font_match_p): Check that fixnum is a character, not a nonnegative
8482 fixnum, since the later code needs to stuff it into an int.
8483 (font_find_for_lface): Use SAFE_ALLOCA_LISP, not alloca.
8484 (font_fill_lglyph_metrics): Use unsigned, not EMACS_INT, to avoid
8485 conversion overflow issues.
8486 (Fopen_font): Check for integer out of range.
8487 (Ffont_get_glyphs): Don't assume index can fit in int.
8488 * font.h: Adjust decls to match defn changes elsewhere.
8489 * fontset.c (reorder_font_vector): Redo score calculation to avoid
8491 (num_auto_fontsets, fontset_from_font): Use ptrdiff_t, not
8492 printmax_t, where ptrdiff_t is wide enough.
8493 (Finternal_char_font):
8494 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8495 * frame.c (Fset_mouse_position, Fset_mouse_pixel_position)
8496 (Fset_frame_height, Fset_frame_width, Fset_frame_size)
8497 (Fset_frame_position, x_set_frame_parameters)
8498 (x_set_line_spacing, x_set_border_width)
8499 (x_set_internal_border_width, x_set_alpha, x_figure_window_size):
8500 Check that fixnums are in proper range for system types.
8501 (frame_name_fnn_p, Fframe_parameter, Fmodify_frame_parameters):
8502 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8503 (Fmodify_frame_parameters): Don't assume fixnum fits in int.
8504 Use SAFE_ALLOCA_LISP, not alloca.
8505 * frame.h (struct frame): Use intptr_t, not EMACS_INT, where
8506 intptr_t is wide enough.
8507 * fringe.c (lookup_fringe_bitmap, get_logical_fringe_bitmap)
8508 (Fdefine_fringe_bitmap): Don't assume fixnum fits in int.
8509 (Ffringe_bitmaps_at_pos): Don't assume index fits in int.
8510 Check for fixnum out of range.
8511 * ftfont.c (ftfont_list): Don't assume index fits in int.
8512 Check that fixnums are in proper range for system types.
8513 (ftfont_shape_by_flt):
8514 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8515 * gnutls.c (emacs_gnutls_write, emacs_gnutls_read):
8516 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8517 (Fgnutls_error_fatalp, Fgnutls_error_string, Fgnutls_boot):
8518 Check that fixnums are in proper range for system types.
8519 * gnutls.h: Adjust decls to match defn changes elsewhere.
8520 * gtkutil.c (xg_dialog_run):
8521 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8522 (update_frame_tool_bar):
8523 Check that fixnums are in proper range for system types.
8524 * image.c (parse_image_spec): Redo count calculation to avoid overflow.
8525 (lookup_image): Check that fixnums are in range for system types.
8526 * indent.c (last_known_column, last_known_column_point):
8527 (current_column_bol_cache):
8528 (skip_invisible, current_column, check_display_width):
8529 (check_display_width, scan_for_column, current_column_1)
8530 (Findent_to, Fcurrent_indentation, position_indentation)
8531 (indented_beyond_p, Fmove_to_column, compute_motion):
8532 (Fcompute_motion, Fvertical_motion):
8533 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8534 (last_known_column_modified): Use EMACS_INT, not int.
8535 (check_display_width):
8537 Check that fixnums and floats are in proper range for system types.
8538 (compute_motion): Don't assume index or fixnum fits in int.
8539 (compute_motion, Fcompute_motion):
8540 Use int, not EMACS_INT, when it is wide enough.
8541 (vmotion): Omit local var start_hpos that is always 0; that way
8542 we don't need to worry about overflow in expressions involving it.
8543 * indent.h: Adjust decls to match defn changes elsewhere.
8545 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8546 Use int, not EMACS_INT, where int is wide enough.
8547 Remove unused members ovstring_chars_done and tab_offset;
8549 * insdel.c (move_gap, move_gap_both, gap_left, gap_right)
8550 (adjust_markers_for_delete, adjust_markers_for_insert, adjust_point)
8551 (adjust_markers_for_replace, make_gap_larger, make_gap_smaller)
8552 (make_gap, copy_text, insert, insert_and_inherit)
8553 (insert_before_markers, insert_before_markers_and_inherit)
8554 (insert_1, count_combining_before, count_combining_after)
8555 (insert_1_both, insert_from_string)
8556 (insert_from_string_before_markers, insert_from_string_1)
8557 (insert_from_gap, insert_from_buffer, insert_from_buffer_1)
8558 (adjust_after_replace, adjust_after_insert, replace_range)
8559 (replace_range_2, del_range, del_range_1, del_range_byte)
8560 (del_range_both, del_range_2, modify_region)
8561 (prepare_to_modify_buffer, signal_before_change)
8562 (signal_after_change, Fcombine_after_change_execute):
8563 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8564 * intervals.c (traverse_intervals, rotate_right, rotate_left)
8565 (balance_an_interval, split_interval_right, split_interval_left)
8566 (find_interval, next_interval, update_interval)
8567 (adjust_intervals_for_insertion, delete_node, delete_interval)
8568 (interval_deletion_adjustment, adjust_intervals_for_deletion)
8569 (static_offset_intervals, offset_intervals)
8570 (merge_interval_right, merge_interval_left, make_new_interval)
8571 (graft_intervals_into_buffer, temp_set_point_both)
8572 (temp_set_point, set_point, adjust_for_invis_intang)
8573 (set_point_both, move_if_not_intangible, get_property_and_range)
8574 (get_local_map, copy_intervals, copy_intervals_to_string)
8575 (compare_string_intervals, set_intervals_multibyte_1):
8576 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8577 * intervals.h: Adjust decls to match defn changes elsewhere.
8579 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8580 * keyboard.c (this_command_key_count, this_single_command_key_start)
8581 (before_command_key_count, before_command_echo_length, echo_now)
8582 (echo_length, recursive_edit_1, Frecursive_edit, Ftrack_mouse)
8583 (command_loop_1, safe_run_hooks, read_char, timer_check_2)
8584 (menu_item_eval_property, read_key_sequence, Fread_key_sequence)
8585 (Fread_key_sequence_vector, Fexecute_extended_command, Fsuspend_emacs):
8586 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8587 (last_non_minibuf_size, last_point_position, echo_truncate)
8588 (command_loop_1, adjust_point_for_property, read_char, gen_help_event)
8589 (make_lispy_position, make_lispy_event, parse_modifiers_uncached)
8590 (parse_modifiers, modify_event_symbol, Fexecute_extended_command)
8591 (stuff_buffered_input):
8592 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8593 (last_auto_save, command_loop_1, read_char):
8594 Use EMACS_INT, not int, to avoid integer overflow.
8595 (record_char): Avoid overflow in total_keys computation.
8596 (parse_modifiers_uncached): Redo index calculation to avoid overflow.
8597 * keyboard.h: Adjust decls to match defn changes elsewhere.
8598 * keymap.c (Fdefine_key, Fcurrent_active_maps, accessible_keymaps_1)
8599 (Fkey_description, Fdescribe_vector, Flookup_key):
8600 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8601 (click_position): New function, to check that positions are in range.
8602 (Fcurrent_active_maps):
8604 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8605 (Faccessible_keymaps, Fkey_description):
8606 (preferred_sequence_p):
8607 Don't assume fixnum can fit into int.
8608 (Fkey_description): Use SAFE_ALLOCA_LISP, not alloca.
8609 Check for integer overflow in size calculations.
8610 (Ftext_char_description): Use CHECK_CHARACTER, not CHECK_NUMBER, to
8611 avoid mishandling large integers.
8612 * lisp.h: Adjust decls to match defn changes elsewhere.
8613 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, struct Lisp_String)
8614 (struct vectorlike_header, struct Lisp_Subr, struct Lisp_Hash_Table)
8615 (struct Lisp_Marker):
8616 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8617 (clip_to_bounds): Now an inline function, moved here from editfns.c.
8618 (GLYPH_CODE_P): Check for overflow in system types, subsuming the
8619 need for GLYPH_CODE_CHAR_VALID_P and doing proper checking ourselves.
8620 All callers changed.
8621 (GLYPH_CODE_CHAR, GLYPH_CODE_FACE):
8622 Assume the arg has valid form, since it always does.
8623 (TYPE_RANGED_INTEGERP): Avoid bug when checking against a wide
8624 unsigned integer system type.
8625 (CHECK_RANGED_INTEGER, CHECK_TYPE_RANGED_INTEGER): New macros.
8626 (struct catchtag, specpdl_size, SPECPDL_INDEX, USE_SAFE_ALLOCA):
8627 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8628 (struct catchtag): Use EMACS_INT, not int, since it may be a fixnum.
8629 (duration_to_sec_usec): New decl.
8630 * lread.c (read_from_string_index, read_from_string_index_byte)
8631 (read_from_string_limit, readchar, unreadchar, openp)
8632 (read_internal_start, read1, oblookup):
8633 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8634 (Fload, readevalloop, Feval_buffer, Feval_region):
8635 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8636 (openp): Check for out-of-range argument to 'access'.
8637 (read1): Use int, not EMACS_INT, where int is wide enough.
8638 Don't assume fixnum fits into int.
8639 Fix off-by-one error that can read outside a buffer.
8640 (read_filtered_event): Use duration_to_sec_usec
8641 to do proper overflow checking on durations.
8642 * macros.c (Fstart_kbd_macro): Use xpalloc to check for overflow
8643 in size calculation.
8644 (Fexecute_kbd_macro):
8645 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8646 * marker.c (cached_charpos, cached_bytepos, CONSIDER)
8647 (byte_char_debug_check, buf_charpos_to_bytepos, verify_bytepos)
8648 (buf_bytepos_to_charpos, Fset_marker, set_marker_restricted)
8649 (set_marker_both, set_marker_restricted_both, marker_position)
8650 (marker_byte_position, Fbuffer_has_markers_at):
8651 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8652 (Fset_marker, set_marker_restricted): Don't assume fixnum fits in int.
8653 * menu.c (ensure_menu_items): Rename from grow_menu_items.
8654 It now merely ensures that the menu is large enough, without
8655 necessarily growing it, as this avoids some integer overflow issues.
8656 All callers changed.
8657 (keymap_panes, parse_single_submenu, Fx_popup_menu):
8658 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8659 (parse_single_submenu, Fx_popup_menu): Don't assume fixnum fits in int.
8660 Use SAFE_ALLOCA_LISP, not alloca.
8661 (find_and_return_menu_selection): Avoid unnecessary casts of pointers
8662 to EMACS_INT. Check that fixnums are in proper range for system types.
8663 * minibuf.c (minibuf_prompt_width, string_to_object)
8664 (Fminibuffer_contents, Fminibuffer_contents_no_properties)
8665 (Fminibuffer_completion_contents, Ftry_completion, Fall_completions):
8666 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8667 (get_minibuffer, read_minibuf_unwind):
8668 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8669 (read_minibuf): Omit unnecessary arg BACKUP_N, which is always nil;
8670 this simplifies overflow checking. All callers changed.
8671 (read_minibuf, Fread_buffer, Ftry_completion, Fall_completions)
8673 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8674 * nsfns.m (check_ns_display_info): Don't assume fixnum fits in long.
8675 (x_set_menu_bar_lines, x_set_tool_bar_lines, Fx_create_frame):
8676 Check that fixnums are in proper range for system types.
8677 (Fx_create_frame, Fx_show_tip):
8678 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8679 * nsfont.m (ns_findfonts, nsfont_list_family):
8680 Don't assume fixnum fits in long.
8681 * nsmenu.m (ns_update_menubar, ns_menu_show, ns_popup_dialog):
8682 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8683 (ns_update_menubar): Use intptr_t, not EMACS_INT, when intptr_t is
8685 * nsselect.m (ns_get_local_selection, clean_local_selection_data):
8686 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8687 * print.c (print_buffer_size, print_buffer_pos, print_buffer_pos_byte)
8688 (PRINTDECLARE, PRINTPREPARE):
8689 (strout, print_string):
8690 (print, print_preprocess, print_check_string_charset_prop)
8692 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8694 (temp_output_buffer_setup, Fprin1_to_string, print_object):
8695 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8696 (PRINTPREPARE): Use int, not ptrdiff_t, where int is wide enough.
8697 (printchar, strout): Use xpalloc to catch size calculation overflow.
8698 (Fexternal_debugging_output): Don't overflow EMACS_INT->int conversion.
8699 (print_error_message): Use SAFE_ALLOCA, not alloca.
8700 (print_object): Use int, not EMACS_INT, where int is wide enough.
8701 (print_depth, new_backquote_output, print_number_index):
8702 Use ptrdiff_t, not int, where int might not be wide enough.
8703 * process.c (Fdelete_process): Don't assume pid fits into EMACS_INT.
8704 (Fset_process_window_size, Fformat_network_address)
8705 (get_lisp_to_sockaddr_size, set_socket_option, Fmake_network_process)
8707 Check that fixnums are in proper range for system types.
8708 (Fsignal_process): Simplify by avoiding a goto.
8709 Check for process-ids out of pid_t range rather than relying on
8711 (process_tick, update_tick): Use EMACS_INT, not int.
8712 (Fformat_network_address, read_process_output, send_process)
8713 (Fprocess_send_region, status_notify):
8714 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8715 (Fformat_network_address, Fmake_serial_process, Fmake_network_process)
8716 (wait_reading_process_output, read_process_output, exec_sentinel):
8717 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8718 (conv_lisp_to_sockaddr): Don't assume fixnums fit into int.
8719 (Faccept_process_output): Use duration_to_sec_usec to do proper
8720 overflow checking on durations.
8721 (emacs_get_tty_pgrp, Fprocess_running_child_p, process_send_signal):
8722 Don't assume pid_t fits in int.
8723 * process.h (struct Lisp_Process): Members tick and update_tick
8724 are now of type EMACS_INT, not int.
8725 * puresize.h (PURESIZE_RATIO): Shrink this to 8/6 on 32-bit hosts
8726 configured --with-wide-int.
8727 * scroll.c (calculate_scrolling, calculate_direct_scrolling)
8728 (line_ins_del): Use int, not EMACS_INT, where int is wide enough.
8729 * search.c (looking_at_1, string_match_1):
8730 (fast_string_match, fast_c_string_match_ignore_case)
8731 (fast_string_match_ignore_case, fast_looking_at, scan_buffer)
8732 (scan_newline, find_before_next_newline, search_command)
8733 (trivial_regexp_p, search_buffer, simple_search, boyer_moore)
8734 (set_search_regs, wordify):
8737 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8738 (string_match_1, search_buffer, set_search_regs):
8740 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8741 (wordify): Check for overflow in size calculation.
8742 (Freplace_match): Avoid potential buffer overflow in search_regs.start.
8743 (Fset_match_data): Don't assume fixnum fits in ptrdiff_t.
8744 Check that fixnums are in proper range for system types.
8745 * sound.c (struct sound_device)
8746 (wav_play, au_play, vox_write, alsa_period_size, alsa_write):
8747 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8748 (Fplay_sound_internal):
8749 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8750 * syntax.c (struct lisp_parse_state, find_start_modiff)
8751 (Finternal_describe_syntax_value, scan_lists, scan_sexps_forward):
8752 (Fparse_partial_sexp):
8753 Don't assume fixnums can fit in int.
8754 (struct lisp_parse_state, find_start_pos, find_start_value)
8755 (find_start_value_byte, find_start_begv)
8756 (update_syntax_table, char_quoted, dec_bytepos)
8757 (find_defun_start, prev_char_comend_first, back_comment):
8758 (scan_words, skip_chars, skip_syntaxes, forw_comment, Fforward_comment)
8759 (scan_lists, Fbackward_prefix_chars, scan_sexps_forward):
8760 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8761 (Finternal_describe_syntax_value): Check that match_lisp is a
8762 character, not an integer, since the code stuffs it into int.
8763 (scan_words, scan_sexps_forward):
8764 Check that fixnums are in proper range for system types.
8766 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8767 (scan_sexps_forward):
8768 Use CHARACTERP, not INTEGERP, since the value must fit into int.
8769 (Fparse_partial_sexp): Fix doc; element 8 is not ignored.
8770 * syntax.h: Adjust decls to match defn changes elsewhere.
8771 (struct gl_state_s):
8772 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8773 (SETUP_SYNTAX_TABLE_FOR_OBJECT): Use PTRDIFF_MAX, not
8774 MOST_POSITIVE_FIXNUM.
8775 * sysdep.c (wait_for_termination_1, wait_for_termination)
8776 (interruptible_wait_for_termination, mkdir):
8777 Don't assume pid_t fits in int; on 64-bit AIX pid_t is 64-bit.
8778 (emacs_read, emacs_write):
8779 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8780 (system_process_attributes): Don't assume uid_t, gid_t, EMACS_INT,
8781 and double all fit in int.
8782 * term.c (set_tty_color_mode):
8783 Check that fixnums are in proper range for system types.
8784 * termhooks.h (struct input_event):
8785 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8786 * textprop.c (validate_interval_range, interval_of)
8787 (Fadd_text_properties, set_text_properties_1)
8788 (Fremove_text_properties, Fremove_list_of_text_properties)
8789 (Ftext_property_any, Ftext_property_not_all)
8790 (copy_text_properties, text_property_list, extend_property_ranges)
8791 (verify_interval_modification):
8792 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8793 (Fnext_single_char_property_change)
8794 (Fprevious_single_char_property_change):
8795 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8796 (copy_text_properties):
8797 Check for integer overflow in index calculation.
8798 * undo.c (last_boundary_position, record_point, record_insert)
8799 (record_delete, record_marker_adjustment, record_change)
8800 (record_property_change):
8801 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8802 (truncate_undo_list, Fprimitive_undo): Don't assume fixnum fits in int.
8803 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8804 * w32fns.c (Fx_create_frame, x_create_tip_frame, Fx_show_tip)
8805 (Fx_hide_tip, Fx_file_dialog):
8806 * w32menu.c (set_frame_menubar):
8807 Use ptrdiff_t, not int, for consistency with rest of code.
8808 * window.c (window_scroll_preserve_hpos, window_scroll_preserve_vpos)
8809 (select_window, Fdelete_other_windows_internal)
8810 (window_scroll_pixel_based, window_scroll_line_based)
8811 (Frecenter, Fset_window_configuration):
8812 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8813 (Fset_window_hscroll, run_window_configuration_change_hook)
8814 (set_window_buffer, temp_output_buffer_show, scroll_command)
8815 (Fscroll_other_window, Frecenter):
8816 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8817 (Fwindow_line_height, window_scroll, Fscroll_left, Fscroll_right):
8818 Don't assume fixnum fits in int.
8819 (Fset_window_scroll_bars):
8820 Check that fixnums are in proper range for system types.
8821 * xdisp.c (help_echo_pos, pos_visible_p, string_pos_nchars_ahead)
8822 (string_pos, c_string_pos, number_of_chars, init_iterator)
8823 (in_ellipses_for_invisible_text_p, init_from_display_pos)
8824 (compute_stop_pos, next_overlay_change, compute_display_string_pos)
8825 (compute_display_string_end, handle_face_prop)
8826 (face_before_or_after_it_pos, handle_invisible_prop)
8827 (handle_display_prop, handle_display_spec, handle_single_display_spec)
8828 (display_prop_intangible_p, string_buffer_position_lim)
8829 (string_buffer_position, handle_composition_prop, load_overlay_strings)
8830 (get_overlay_strings_1, get_overlay_strings)
8831 (iterate_out_of_display_property, forward_to_next_line_start)
8832 (back_to_previous_visible_line_start, reseat, reseat_to_string)
8833 (get_next_display_element, set_iterator_to_next)
8834 (get_visually_first_element, compute_stop_pos_backwards)
8835 (handle_stop_backwards, next_element_from_buffer)
8836 (move_it_in_display_line_to, move_it_in_display_line)
8837 (move_it_to, move_it_vertically_backward, move_it_by_lines)
8838 (add_to_log, message_dolog, message_log_check_duplicate)
8839 (message2, message2_nolog, message3, message3_nolog
8840 (with_echo_area_buffer, display_echo_area_1, resize_mini_window_1)
8841 (current_message_1, truncate_echo_area, truncate_message_1)
8842 (set_message, set_message_1, store_mode_line_noprop)
8843 (hscroll_window_tree, debug_delta, debug_delta_bytes, debug_end_vpos)
8844 (text_outside_line_unchanged_p, check_point_in_composition)
8845 (reconsider_clip_changes)
8846 (redisplay_internal, set_cursor_from_row, try_scrolling)
8847 (try_cursor_movement, set_vertical_scroll_bar, redisplay_window)
8848 (redisplay_window, find_last_unchanged_at_beg_row)
8849 (find_first_unchanged_at_end_row, row_containing_pos, try_window_id)
8850 (trailing_whitespace_p, find_row_edges, display_line)
8851 (RECORD_MAX_MIN_POS, Fcurrent_bidi_paragraph_direction)
8852 (display_mode_element, store_mode_line_string)
8853 (pint2str, pint2hrstr, decode_mode_spec)
8854 (display_count_lines, display_string, draw_glyphs)
8855 (x_produce_glyphs, x_insert_glyphs)
8856 (rows_from_pos_range, mouse_face_from_buffer_pos)
8857 (fast_find_string_pos, mouse_face_from_string_pos)
8858 (note_mode_line_or_margin_highlight, note_mouse_highlight):
8859 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8860 (safe_call, init_from_display_pos, handle_fontified_prop)
8861 (handle_single_display_spec, load_overlay_strings)
8862 (with_echo_area_buffer, setup_echo_area_for_printing)
8863 (display_echo_area, echo_area_display)
8864 (x_consider_frame_title, prepare_menu_bars, update_menu_bar)
8865 (update_tool_bar, hscroll_window_tree, redisplay_internal)
8866 (redisplay_window, dump_glyph_row, display_mode_line)
8867 (Fformat_mode_line, decode_mode_spec, on_hot_spot_p):
8868 (handle_display_spec, display_prop_string_p):
8869 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8870 (handle_single_display_spec, build_desired_tool_bar_string)
8871 (redisplay_tool_bar, scroll_window_tree, Fdump_glyph_matrix)
8872 (get_specified_cursor_type):
8873 Check that fixnums are in proper range for system types.
8874 (struct overlay_entry, resize_mini_window, Fdump_glyph_row)
8875 (Flookup_image_map):
8876 Don't assume fixnums fit in int.
8877 (compare_overlay_entries):
8878 Avoid mishandling comparisons due to subtraction overflow.
8879 (load_overlay_strings): Use SAFE_NALLOCA, not alloca.
8880 (last_escape_glyph_face_id, last_glyphless_glyph_face_id):
8881 (handle_tool_bar_click):
8882 Use int, not unsigned, since we prefer signed and the signedness
8883 doesn't matter here.
8884 (get_next_display_element, next_element_from_display_vector):
8885 Use int, not EMACS_INT, when int is wide enough.
8886 (start_hourglass): Use duration_to_sec_usec to do proper
8887 overflow checking on durations.
8888 * xfaces.c (Fbitmap_spec_p):
8889 Check that fixnums are in proper range for system types.
8890 (compare_fonts_by_sort_order):
8891 Avoid mishandling comparisons due to subtraction overflow.
8892 (Fx_family_fonts, realize_basic_faces):
8893 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8895 Don't assume fixnum fits in int.
8896 Use SAFE_ALLOCA_LISP, not alloca.
8897 (merge_face_heights): Remove unnecessary cast to EMACS_INT.
8898 (Finternal_make_lisp_face): Don't allocate more than MAX_FACE_ID.
8899 (face_at_buffer_position, face_for_overlay_string)
8900 (face_at_string_position):
8901 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8902 (merge_faces): Use int, not EMACS_INT, where int is wide enough.
8903 * xfns.c (x_set_menu_bar_lines, x_set_tool_bar_lines, x_icon_verify)
8905 Check that fixnums are in proper range for system types.
8906 (Fx_create_frame, x_create_tip_frame, Fx_show_tip)
8907 (Fx_hide_tip, Fx_file_dialog, Fx_select_font):
8908 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8909 (Fx_change_window_property): Don't assume fixnums fit in int.
8910 * xfont.c (xfont_chars_supported):
8911 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8912 * xmenu.c (Fx_popup_dialog, set_frame_menubar)
8913 (create_and_show_popup_menu, create_and_show_dialog, xmenu_show):
8914 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8915 * xml.c (parse_region):
8916 * xrdb.c (magic_file_p):
8917 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8918 * xselect.c (TRACE1): Don't assume pid_t promotes to int.
8919 (x_get_local_selection, x_reply_selection_request)
8920 (x_handle_selection_request, wait_for_property_change):
8921 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8922 (selection_data_to_lisp_data): Use short, not EMACS_INT, where
8923 short is wide enough.
8924 (x_send_client_event): Don't assume fixnum fits in int.
8925 * xterm.c (x_x_to_emacs_modifiers):
8926 Don't assume EMACS_INT overflows nicely into int.
8927 (x_emacs_to_x_modifiers): Use EMACS_INT, not int, because values
8929 (handle_one_xevent): NATNUMP can eval its arg twice.
8930 (x_connection_closed):
8931 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8932 * xterm.h: Adjust decls to match defn changes elsewhere.
8933 (struct scroll_bar): Use struct vectorlike_header
8934 rather than rolling our own approximation.
8935 (SCROLL_BAR_VEC_SIZE): Remove; not used.
8937 2012-05-25 Glenn Morris <rgm@gnu.org>
8939 * lisp.mk (lisp): Update for more files being compiled now.
8941 2012-05-25 Stefan Monnier <monnier@iro.umontreal.ca>
8943 * lread.c: Remove `read_pure' which makes no difference.
8944 (read_pure): Remove var.
8945 (unreadpure): Remove function.
8946 (readevalloop): Don't call read_list with -1 flag.
8947 (read1, read_vector): Don't test read_pure any more.
8948 (read_list): Simplify.
8950 * fileio.c, character.h: Minor style tweaks.
8952 2012-05-24 Dmitry Antipov <dmantipov@yandex.ru>
8954 * window.h (clip_changed): Remove useless declaration.
8956 2012-05-22 Juanma Barranquero <lekktu@gmail.com>
8958 * makefile.w32-in: Follow-up to 2012-05-22T16:20:27Z!eggert@cs.ucla.edu.
8959 (TAGS, TAGS-gmake, CONFIG_H): Remove further references to m/intel386.h.
8961 2012-05-22 Paul Eggert <eggert@cs.ucla.edu>
8964 This directory predates autoconf and is no longer needed nowadays.
8965 Move its few remaining bits of functionality to where they're needed.
8966 * m/README, m/alpha.h, m/amdx86-64.h, m/ia64.h, m/ibmrs6000.h:
8967 * m/ibms390x.h, m/intel386.h, m/m68k.h, m/macppc.h, m/sparc.h:
8968 * m/template.h: Remove.
8969 * Makefile.in (M_FILE): Remove. All uses removed.
8970 * alloc.c (POINTERS_MIGHT_HIDE_IN_OBJECTS):
8971 * lisp.h (USE_LSB_TAG):
8972 * mem-limits.h (EXCEEDS_LISP_PTR):
8973 Use VAL_MAX, not VALBITS, in #if.
8974 * lisp.h (EMACS_INT_MAX): New macro, useful in #if.
8975 (EMACS_UINT): Define unconditionally now.
8976 (BITS_PER_CHAR, BITS_PER_SHORT, BITS_PER_INT, BITS_PER_LONG)
8977 (BITS_PER_EMACS_INT): New constants, replacing
8978 what used to be in config.h, but not useful in #if.
8979 (GCTYPEBITS, VALBITS): Define unconditionally, since m/* files don't
8980 define them any more.
8981 (VAL_MAX): New macro.
8983 * puresize.h (PURESIZE_RATIO): Use EMACS_INT_MAX, not
8984 BITS_PER_EMACS_INT, in #if.
8985 * s/aix4-2.h (BROKEN_FIONREAD, BROKEN_SIGAIO, BROKEN_SIGPTY)
8986 (BROKEN_SIGPOLL): Move here from m/ibmrs6000.h, which was removed.
8987 * s/gnu-linux.h (ULIMIT_BREAK_VALUE) [__i386__]:
8988 * s/ms-w32.h (DATA_START):
8989 Move here from removed file m/intel386.h.
8990 * s/gnu.h (NLIST_STRUCT): Remove undef; 'configure' does this.
8991 * s/irix6-5.h (_LP64): Remove; lisp.h no longer needs this.
8993 2012-05-21 Paul Eggert <eggert@cs.ucla.edu>
8995 Assume C89 or later.
8996 * alloc.c, buffer.c, lisp.h: Replace POINTER_TYPE with void.
8997 * alloc.c (overrun_check_malloc, overrun_check_realloc, xmalloc)
8999 * buffer.c (mmap_free_1, mmap_enlarge): Omit needless casts.
9000 * editfns.c, fns.c, gmalloc.c, insdel.c, sysdep.c, termcap.c (NULL):
9001 * textprop.c, tparam.c (NULL): Remove.
9002 * ralloc.c, vm-limit.c (POINTER): Assume void * works.
9003 * regex.c (SIGN_EXTEND_CHAR): Assume signed char works.
9004 * regex.h (_RE_ARGS): Remove. All uses rewritten to use prototypes.
9005 * unexelf.c (ElfBitsW): Assume c89 preprocessor or better.
9006 * xterm.c (input_signal_count): Assume volatile works.
9008 2012-05-21 Ken Brown <kbrown@cornell.edu>
9010 * xgselect.c (xg_select): Fix first argument in call to 'select'
9013 2012-05-20 Ken Brown <kbrown@cornell.edu>
9015 * gmalloc.c (_free_internal_nolock, _realloc_internal_nolock)
9016 [CYGWIN]: Cast ptr to (char *) before comparing to _heapbase.
9018 2012-05-19 Ken Brown <kbrown@cornell.edu>
9020 * xfns.c (x_in_use): Remove `static' qualifier.
9021 * xterm.h (x_in_use): Declare.
9022 * xgselect.c: Include xterm.h.
9023 (xg_select): Test `x_in_use' instead of `inhibit_window_system'
9024 and `display_arg' (bug#9754).
9026 2012-05-19 Paul Eggert <eggert@cs.ucla.edu>
9028 * s/ms-w32.h (HAVE_GETDOMAINNAME): Remove; not needed.
9030 * m/vax.h: Remove; no longer needed since HAVE_FTIME is being removed.
9031 * s/ms-w32.h (HAVE_FTIME): Remove; not needed.
9033 2012-05-18 Eli Zaretskii <eliz@gnu.org>
9035 Fix compilation with -DGLYPH_DEBUG=1 on MS-Windows.
9037 * w32term.c [GLYPH_DEBUG]: Add prototype for x_check_font.
9038 (x_check_font) [GLYPH_DEBUG]: New function, copied from xterm.c.
9040 * w32fns.c (unwind_create_frame) [GLYPH_DEBUG]: Fix broken
9041 reference to image_cache->refcount.
9042 (x_create_tip_frame): Fix broken use of FRAME_IMAGE_CACHE.
9044 2012-05-17 Juri Linkov <juri@jurta.org>
9046 * search.c (Fword_search_regexp, Fword_search_backward)
9047 (Fword_search_forward, Fword_search_backward_lax)
9048 (Fword_search_forward_lax): Move functions to isearch.el
9049 (bug#10145, bug#11381).
9051 2012-05-16 Paul Eggert <eggert@cs.ucla.edu>
9053 * xgselect.c (xg_select): Just invoke 'select' if -nw (Bug#9754).
9055 2012-05-15 Stefan Monnier <monnier@iro.umontreal.ca>
9057 * lread.c (init_obarray): Declare Qt and Qnil as special.
9059 2012-05-14 Glenn Morris <rgm@gnu.org>
9061 * nsterm.m (ns_init_paths): Fix typo ("libexec" not "lib-exec").
9062 Put "libexec" before "bin", for the sake of init_callproc_1.
9064 2012-05-14 Paul Eggert <eggert@cs.ucla.edu>
9066 * keyboard.c (kbd_buffer_get_event) [!HAVE_DBUS]: Omit unused local.
9068 * unexaix.c: Port to more-recent AIX compilers.
9069 (report_error, report_error_1, make_hdr, copy_sym)
9070 (mark_x, adjust_lnnoptrs, unrelocate_symbols):
9071 Make arguments const char *, not char *, to avoid violations of C
9072 standard and to fix some AIX warnings reported by Gilles Pion.
9074 2012-05-14 Eli Zaretskii <eliz@gnu.org>
9076 * xdisp.c (handle_stop): Don't call get_overlay_strings_1 if we
9077 already have overlays loaded.
9078 (handle_single_display_spec): Before returning without displaying
9079 fringe bitmap, synchronize the bidi iterator with the main display
9080 iterator, by calling iterate_out_of_display_property.
9081 (iterate_out_of_display_property): Detect buffer iteration by
9082 testing that it->string is a Lisp string.
9083 (get_next_display_element): When the current object is exhausted,
9084 and there's something on it->stack, call set_iterator_to_next to
9085 proceed with what's on the stack, instead of returning zero.
9086 (set_iterator_to_next): If called at the end of a Lisp string,
9087 proceed to consider_string_end without incrementing string
9088 position. Don't increment display vector index past the end of
9089 the display vector. (Bug#11417)
9090 (pos_visible_p): Don't report a position visible when move_it_to
9091 stopped at the last line of window, which happens to be scanned
9092 backwards by the bidi iteration. (Bug#11464)
9094 2012-05-14 Eli Zaretskii <eliz@gnu.org>
9096 * xdisp.c (handle_single_display_spec): Return 1 for left-margin
9097 and right-margin display specs even if the spec is invalid or we
9098 are on a TTY, and thus unable to display on the fringes.
9099 That's because the text with the property will not be displayed anyway,
9100 so we need to signal to the caller that this is a "replacing"
9101 display spec. This fixes display when the spec is invalid or we
9104 2012-05-14 Paul Eggert <eggert@cs.ucla.edu>
9106 * unexaix.c (make_hdr): Fix typo in prototype.
9107 This bug broke the build on AIX. Problem reported by Gilles Pion.
9109 2012-05-14 Michael Albinus <michael.albinus@gmx.de>
9111 * keyboard.c (kbd_buffer_get_event): Read special events also in
9112 batch mode. (Bug#11415)
9114 2012-05-12 Glenn Morris <rgm@gnu.org>
9116 * ns.mk: Update for ns_appbindir no longer having trailing "/".
9118 2012-05-12 Eli Zaretskii <eliz@gnu.org>
9120 * lisp.mk (lisp): Add newcomment.elc.
9122 2012-05-12 Glenn Morris <rgm@gnu.org>
9124 * Makefile.in (MKDIR_P): New, set by configure.
9125 * ns.mk (${ns_appdir}, ${ns_appbindir}Emacs): Use $MKDIR_P.
9127 2012-05-11 Paul Eggert <eggert@cs.ucla.edu>
9129 Remove unused function hourglass_started.
9130 * dispextern.h (hourglass_started):
9131 * w32fns.c (hourglass_started):
9132 * xdisp.c (hourglass_started): Remove.
9134 2012-05-10 Juanma Barranquero <lekktu@gmail.com>
9136 * makefile.w32-in ($(BLD)/gmalloc.$(O), $(BLD)/w32menu.$(O)):
9137 Update dependencies.
9139 2012-05-10 Paul Eggert <eggert@cs.ucla.edu>
9141 * xgselect.c (xg_select): Put maxfds+1 into a var.
9142 This is slightly clearer, and pacifies Ubuntu 12.04 gcc.
9144 * sound.c (DEFAULT_ALSA_SOUND_DEVICE): Define only if HAVE_ALSA.
9146 2012-05-10 Dave Abrahams <dave@boostpro.com>
9148 * filelock.c (syms_of_filelock): New boolean create-lockfiles.
9149 (lock_file): If create_lockfiles is 0, do nothing. (Bug#11227)
9151 2012-05-09 Michael Albinus <michael.albinus@gmx.de>
9153 * dbusbind.c (xd_registered_buses): New internal Lisp object.
9154 Rename all occurences of Vdbus_registered_buses to xd_registered_buses.
9155 (syms_of_dbusbind): Remove declaration of Vdbus_registered_buses.
9156 Initialize xd_registered_buses.
9158 2012-05-09 Paul Eggert <eggert@cs.ucla.edu>
9160 Untag more efficiently if USE_LSB_TAG.
9161 This is based on a proposal by YAMAMOTO Mitsuharu in
9162 <http://lists.gnu.org/archive/html/emacs-devel/2008-01/msg01876.html>.
9163 For an admittedly artificial (nth 8000 longlist) benchmark on
9164 Fedora 15 x86-64, this yields a 25% CPU speedup. Also, it shrinks
9165 Emacs's overall text size by 1%.
9166 * lisp.h (XUNTAG): New macro.
9167 (XCONS, XVECTOR, XSTRING, XSYMBOL, XFLOAT, XMISC, XPROCESS, XWINDOW)
9168 (XTERMINAL, XSUBR, XBUFFER, XCHAR_TABLE, XSUB_CHAR_TABLE, XBOOL_VECTOR)
9169 (XSETTYPED_PSEUDOVECTOR, XHASH_TABLE, TYPED_PSEUDOVECTORP): Use it.
9170 * eval.c (Fautoload):
9171 * font.h (XFONT_SPEC, XFONT_ENTITY, XFONT_OBJECT):
9172 * frame.h (XFRAME): Use XUNTAG.
9174 Port recent dbusbind.c changes to 32-bit --with-wide-int.
9175 * dbusbind.c (xd_append_arg, xd_retrieve_arg, Fdbus_message_internal):
9176 Remove unportable assumptions about print widths of types like
9178 (xd_get_connection_address, Fdbus_init_bus): Cast Emacs integer to
9179 intptr_t when converting between pointer and integer, to avoid GCC
9180 warnings about wrong width.
9182 2012-05-09 Eli Zaretskii <eliz@gnu.org>
9184 * w32proc.c (new_child): Force Windows to reserve only 64KB of
9185 stack for each reader_thread, instead of defaulting to 8MB
9186 determined by the linker. This avoids failures in creating
9187 subprocesses on Windows 7, see the discussion in this thread:
9188 http://lists.gnu.org/archive/html/emacs-devel/2012-03/msg00119.html.
9190 2012-05-07 Jérémy Compostella <jeremy.compostella@gmail.com>
9192 Fix up display of the *Minibuf-0* buffer in the mini window.
9193 * keyboard.c (read_char): Don't clear the echo area if there's no
9195 * xdisp.c (redisplay_internal): Redisplay the mini window (with the
9196 contents of *Minibuf-0*) if there's no message displayed in its stead.
9198 2012-05-07 Michael Albinus <michael.albinus@gmx.de>
9200 * dbusbind.c (XD_DEBUG_MESSAGE): Don't print message twice in
9203 2012-05-06 Chong Yidong <cyd@gnu.org>
9205 * lisp.mk (lisp): Update.
9207 2012-05-05 Jim Meyering <meyering@redhat.com>
9209 * w32font.c (fill_in_logfont): NUL-terminate a string (Bug#11372).
9211 2012-05-04 Stefan Monnier <monnier@iro.umontreal.ca>
9213 * data.c (PUT_ERROR): New macro.
9214 (syms_of_data): Use it. Add new error type `user-error'.
9215 * undo.c (user_error): New function.
9216 (Fprimitive_undo): Use it.
9217 * print.c (print_error_message): Adjust print style for `user-error'.
9218 * keyboard.c (user_error): New function.
9219 (Fexit_recursive_edit, Fabort_recursive_edit): Use it.
9221 2012-05-03 Paul Eggert <eggert@cs.ucla.edu>
9223 Do not limit current-time-string to years 1000..9999.
9224 * editfns.c (TM_YEAR_IN_ASCTIME_RANGE): Remove.
9225 (Fcurrent_time_string): Support any year that is supported by the
9226 underlying localtime representation. Don't use asctime, as it
9227 has undefined behavior for years outside the range -999..9999.
9229 2012-05-02 Paul Eggert <eggert@cs.ucla.edu>
9231 Fix race conditions involving setenv, gmtime, localtime, asctime.
9232 Without this fix, interrupts could mess up code that uses these
9233 nonreentrant functions, since setting TZ invalidates existing
9234 tm_zone or tzname values, and since most of these functions return
9235 pointers to static storage.
9236 * editfns.c (format_time_string, Fdecode_time, Fencode_time)
9237 (Fcurrent_time_string, Fcurrent_time_zone, Fset_time_zone_rule):
9238 Grow the critical sections to include not just invoking
9239 localtime/gmtime, but also accessing these functions' results
9240 including their tm_zone values if any, and any related TZ setting.
9241 (format_time_string): Last arg is now struct tm *, not struct tm **,
9242 so that the struct tm is saved in the critical section.
9243 All callers changed. Simplify allocation of initial buffer, partly
9244 motivated by the fact that memory allocation needs to be outside
9245 the critical section.
9247 2012-05-02 Dmitry Antipov <dmantipov@yandex.ru>
9249 * intervals.c (adjust_intervals_for_insertion): Initialize `newi'
9250 with RESET_INTERVAL.
9252 * buffer.c (Fget_buffer_create, Fmake_indirect_buffer):
9253 Remove duplicated buffer name initialization.
9255 2012-05-02 Jim Meyering <jim@meyering.net>
9257 * xterm.c (x_term_init): Use memcpy instead of strncpy (Bug#11373).
9259 * xfns.c (x_window): Use xstrdup (Bug#11375).
9261 2012-05-02 Eli Zaretskii <eliz@gnu.org>
9263 * xdisp.c (pos_visible_p): If already at a newline from the
9264 display string before the 'while' loop, don't walk back the glyphs
9265 from it3.glyph_row. Solves assertion violation when the display
9266 string begins with a newline (egg.el). (Bug#11367)
9268 2012-05-01 Stefan Monnier <monnier@iro.umontreal.ca>
9270 * keyboard.c (Fexecute_extended_command, Vsuggest_key_bindings):
9273 2012-05-01 Glenn Morris <rgm@gnu.org>
9275 * syssignal.h: Remove reference to BROKEN_SIGINFO (last used in
9276 s/ptx4.h), BROKEN_SIGTSTP (last used in m/ustation.h, m/dpx2.h),
9277 and BROKEN_SIGURG (was in s/gnu-linux.h prior to 2008-02-10).
9278 All were removed before 23.1.
9280 * dispnew.c: Remove HAVE_LIBNCURSES test;
9281 it is always true on relevant platforms.
9283 * Makefile.in (LD_SWITCH_X_SITE_RPATH):
9284 Rename from LD_SWITCH_X_SITE_AUX_RPATH.
9286 * Makefile.in (LD_SWITCH_X_SITE_AUX): Remove; no longer used.
9288 2012-04-30 Andreas Schwab <schwab@linux-m68k.org>
9290 * .gdbinit (xpr): Remove checks for no longer existing misc types.
9291 (xintfwd, xboolfwd, xobjfwd, xbufobjfwd, xkbobjfwd, xbuflocal):
9294 2012-04-28 Paul Eggert <eggert@cs.ucla.edu>
9296 Do not avoid creating empty evaporating overlays (Bug#9642).
9297 * buffer.c (Fmove_overlay): Revert the change of 2012-04-23.
9298 That is, do not delete an evaporating overlay if it becomes
9299 empty after its bounds are adjusted to fit within its buffer.
9300 This fix caused other problems, and I'm reverting it until we get
9301 to the bottom of them.
9303 2012-04-27 Chong Yidong <cyd@gnu.org>
9305 * xselect.c (x_convert_selection): Initialize a pointer (Bug#11315).
9307 2012-04-27 Eli Zaretskii <eliz@gnu.org>
9309 * xdisp.c (pos_visible_p): If the window start position is beyond
9310 ZV, start the display from buffer beginning. Prevents assertion
9311 violation in init_iterator when the minibuffer window is scrolled
9314 * window.c (window_scroll_pixel_based): Likewise.
9316 2012-04-27 Chong Yidong <cyd@gnu.org>
9318 * keymap.c (where_is_internal): Doc fix (Bug#10872).
9320 2012-04-27 Glenn Morris <rgm@gnu.org>
9322 * fileio.c (Fcopy_file, Fset_file_selinux_context):
9323 Ignore ENOTSUP failures from setfilecon functions. (Bug#11245)
9325 2012-04-27 Eli Zaretskii <eliz@gnu.org>
9327 * dispnew.c (swap_glyph_pointers, copy_row_except_pointers):
9328 Don't overrun array limits of glyph row's used[] array. (Bug#11288)
9330 2012-04-26 Eli Zaretskii <eliz@gnu.org>
9332 * xdisp.c (IT_DISPLAYING_WHITESPACE): In addition to the loaded
9333 display element, check also the underlying string or buffer
9334 character. (Bug#11341)
9336 * w32menu.c: Include w32heap.h.
9337 (add_menu_item): If the call to AppendMenuW (via
9338 unicode_append_menu) fails, disable Unicode menus only if we are
9339 running on Windows 9X/Me.
9341 2012-04-24 Andreas Schwab <schwab@linux-m68k.org>
9343 * .gdbinit (xpr): Handle USE_2_TAGS_FOR_INTS.
9344 (xgetint): Add missing shift for LSB tags.
9346 2012-04-24 Martin Rudalics <rudalics@gmx.at>
9348 * keyboard.c (read_char): Don't wipe echo area for select window
9349 events: These might get delayed via `mouse-autoselect-window'
9352 2012-04-24 Juanma Barranquero <lekktu@gmail.com>
9354 * gnutls.c (init_gnutls_functions): Protect against (unlikely)
9355 manipulation of :loaded-from data.
9357 2012-04-23 Juanma Barranquero <lekktu@gmail.com>
9359 * gnutls.c (init_gnutls_functions): The value of :loaded-from is
9360 now a cons (bug#11311).
9362 2012-04-23 Paul Eggert <eggert@cs.ucla.edu>
9364 Do not create empty overlays with the evaporate property (Bug#9642).
9365 * buffer.c (Fmove_overlay): Delete an evaporating overlay
9366 if it becomes empty after its bounds are adjusted to fit within
9367 its buffer. Without this fix, in a nonempty buffer (let ((o
9368 (make-overlay 1 2))) (overlay-put o 'evaporate t) (move-overlay o 0 1))
9369 yields an empty overlay that has the evaporate property, which is
9370 not supposed to happen.
9372 Fix minor GTK3 problems found by static checking.
9373 * emacsgtkfixed.c (EMACS_TYPE_FIXED, EMACS_FIXED, EmacsFixed)
9374 (EmacsFixedPrivate, EmacsFixedClass, struct _EmacsFixed)
9375 (struct _EmacsFixedClass, emacs_fixed_get_type):
9376 Move decls here from emacsgtkfixed.h, since they needn't be public.
9377 (emacs_fixed_get_type): Now static.
9378 (emacs_fixed_class_init): Omit unused local.
9379 (emacs_fixed_child_type): Remove; unused.
9380 * emacsgtkfixed.h (EMACS_TYPE_FIXED, EMACS_FIXED, EmacsFixed)
9381 (EmacsFixedPrivate, EmacsFixedClass, struct _EmacsFixed)
9382 (struct _EmacsFixedClass): Move to emacsgtkfixed.c.
9383 (EMACS_FIXED_CLASS, EMACS_IS_FIXED, EMACS_IS_FIXED_CLASS)
9384 (EMACS_FIXED_GET_CLASS): Remove; unused.
9385 * gtkutil.c (xg_create_frame_widgets) [!HAVE_GTK3]: Omit unused local.
9387 * keyboard.c (handle_async_input): Define only if SYNC_INPUT || SIGIO.
9388 Problem reported by Juanma Barranquero for Windows -Wunused-function.
9390 2012-04-22 Paul Eggert <eggert@cs.ucla.edu>
9392 Modernize and clean up gmalloc.c to assume C89 (Bug#9119).
9393 * gmalloc.c (_MALLOC_INTERNAL, _MALLOC_H, _PP, __ptr_t)
9394 (__malloc_size_t, __malloc_ptrdiff_t):
9395 Remove. All uses removed, replaced by the definiens if needed,
9396 since we can assume C89 or better now.
9397 Include <stdint.h>, for PTRDIFF_MAX, uintptr_t.
9398 (protect_malloc_state, align, get_contiguous_space)
9399 (malloc_atfork_handler_prepare, malloc_atfork_handler_parent)
9400 (malloc_atfork_handler_child, malloc_enable_thread)
9401 (malloc_initialize_1, __malloc_initialize, morecore_nolock)
9402 (_malloc_internal_nolock, _malloc_internal, malloc, _malloc)
9403 (_free, _realloc, _free_internal_nolock, _free_internal, free, cfree)
9404 (special_realloc, _realloc_internal_nolock, _realloc_internal)
9405 (realloc, calloc, __default_morecore, memalign, valloc, checkhdr)
9406 (freehook, mallochook, reallochook, mabort, mcheck, mprobe):
9407 Define using prototypes, not old style.
9408 (align, _malloc_internal_nolock, _free_internal_nolock, memalign):
9409 Don't assume ptrdiff_t and uintptr_t are no wider than unsigned long.
9410 (align): Don't assume that signed integer overflow wraps around.
9411 Omit unused local var.
9412 (malloc_initialize_1, morecore_nolock, _malloc_internal_nolock)
9413 (_free_internal_nolock, memalign, mallochook, reallochook):
9414 Omit no-longer-needed casts.
9415 (valloc): Use getpagesize, not __getpagesize.
9416 (MAGICWORD, MAGICFREE): Now randomish size_t values, not 32-bit.
9417 (struct hdr): The 'magic' member is now size_t, not unsigned long.
9419 * dbusbind.c (XD_DBUS_VALIDATE_OBJECT): Define only if needed.
9421 2012-04-22 Michael Albinus <michael.albinus@gmx.de>
9423 Move functions from C to Lisp. Make non-blocking method calls
9424 the default. Implement further D-Bus standard interfaces.
9426 * dbusbind.c (DBUS_NUM_MESSAGE_TYPES): Declare.
9427 (QCdbus_request_name_allow_replacement)
9428 (QCdbus_request_name_replace_existing)
9429 (QCdbus_request_name_do_not_queue)
9430 (QCdbus_request_name_reply_primary_owner)
9431 (QCdbus_request_name_reply_in_queue)
9432 (QCdbus_request_name_reply_exists)
9433 (QCdbus_request_name_reply_already_owner): Move to dbus.el.
9434 (QCdbus_registered_serial, QCdbus_registered_method)
9435 (QCdbus_registered_signal): New Lisp objects.
9436 (XD_DEBUG_MESSAGE): Use sizeof.
9437 (XD_MESSAGE_TYPE_TO_STRING, XD_OBJECT_TO_STRING)
9438 (XD_DBUS_VALIDATE_BUS_ADDRESS, XD_DBUS_VALIDATE_OBJECT)
9439 (XD_DBUS_VALIDATE_BUS_NAME, XD_DBUS_VALIDATE_PATH)
9440 (XD_DBUS_VALIDATE_INTERFACE, XD_DBUS_VALIDATE_MEMBER): New macros.
9441 (XD_CHECK_DBUS_SERIAL): Rename from CHECK_DBUS_SERIAL_GET_SERIAL.
9442 (xd_signature, xd_append_arg): Allow float for integer types.
9443 (xd_get_connection_references): New function.
9444 (xd_get_connection_address): Rename from xd_initialize.
9445 Return cached address.
9446 (xd_remove_watch): Do not unset $DBUS_SESSION_BUS_ADDRESS.
9447 (xd_close_bus): Rename from Fdbus_close_bus. Not needed on Lisp
9449 (Fdbus_init_bus): New optional arg PRIVATE. Cache address.
9450 Return number of refcounts.
9451 (Fdbus_get_unique_name): Make stronger parameter check.
9452 (Fdbus_message_internal): New defun.
9453 (Fdbus_call_method, Fdbus_call_method_asynchronously)
9454 (Fdbus_method_return_internal, Fdbus_method_error_internal)
9455 (Fdbus_send_signal, Fdbus_register_service)
9456 (Fdbus_register_signal, Fdbus_register_method): Move to dbus.el.
9457 (xd_read_message_1): Obey new structure of Vdbus_registered_objects.
9458 (xd_read_queued_messages): Obey new structure of Vdbus_registered_buses.
9459 (Vdbus_compiled_version, Vdbus_runtime_version)
9460 (Vdbus_message_type_invalid, Vdbus_message_type_method_call)
9461 (Vdbus_message_type_method_return, Vdbus_message_type_error)
9462 (Vdbus_message_type_signal): New defvars.
9463 (Vdbus_registered_buses, Vdbus_registered_objects_table):
9466 2012-04-22 Paul Eggert <eggert@cs.ucla.edu>
9468 Fix GC_MALLOC_CHECK debugging output on 64-bit hosts.
9469 * alloc.c (emacs_blocked_malloc) [GC_MALLOC_CHECK]:
9470 Do not assume ptrdiff_t is the same width as 'int'.
9472 * alloc.c: Handle unusual debugging option combinations.
9473 (GC_CHECK_MARKED_OBJECTS): Undef if ! GC_MARK_STACK,
9474 since the two debugging options are incompatible.
9475 (GC_MALLOC_CHECK): Similarly, undef if GC_CHECK_MARKED_OBJECTS
9477 (mem_init, mem_insert, mem_insert_fixup):
9478 Define if GC_MARK_STACK || GC_MALLOC_CHECK.
9479 (NEED_MEM_INSERT): Remove; no longer needed.
9481 2012-04-22 Leo Liu <sdl.web@gmail.com>
9483 * sysdep.c (list_system_processes): Support Darwin (Bug#5725).
9485 2012-04-22 Paul Eggert <eggert@cs.ucla.edu>
9487 * sysdep.c [__FreeBSD__]: Minor cleanups.
9488 (list_system_processes, system_process_attributes) [__FreeBSD__]:
9489 Use Emacs indenting style more consistently. Avoid some casts.
9490 Use 'double' consistently rather than mixing 'float' and 'double'.
9492 2012-04-21 Eduard Wiebe <usenet@pusto.de>
9494 * sysdep.c (list_system_processes, system_process_attributes):
9495 Add implementation for FreeBSD (Bug#5243).
9497 2012-04-21 Andreas Schwab <schwab@linux-m68k.org>
9499 * lisp.mk (lisp): Update.
9501 2012-04-20 Paul Eggert <eggert@cs.ucla.edu>
9503 * keyboard.c (process_pending_signals): Define only if SYNC_INPUT.
9504 It is never used otherwise.
9506 2012-04-20 Stefan Monnier <monnier@iro.umontreal.ca>
9508 * print.c (print_preprocess): Only check print_depth if print-circle
9510 (print_object): Check for cycles even when print-circle is nil and
9511 print-gensym is t, but only check print_depth if print-circle is nil.
9513 2012-04-20 Chong Yidong <cyd@gnu.org>
9515 * process.c (wait_reading_process_output): If EIO occurs on a pty,
9516 set the status to "failed" and ensure that sentinel is run.
9518 2012-04-20 Glenn Morris <rgm@gnu.org>
9520 * process.c (Fset_process_inherit_coding_system_flag)
9521 (Fset_process_query_on_exit_flag): Doc fix (mention return value).
9522 (Fmake_network_process, Fmake_serial_process): Doc fix.
9524 2012-04-20 Eli Zaretskii <eliz@gnu.org>
9526 * xdisp.c (string_buffer_position_lim): Limit starting position to
9528 (set_cursor_from_row): If called for a mode-line or header-line
9529 row, return zero immediately.
9530 (try_cursor_movement): If inside continuation line, don't back up
9531 farther than the first row after the header line, if any.
9532 Don't consider the header-line row as "partially visible", even if
9533 MATRIX_ROW_PARTIALLY_VISIBLE_P returns non-zero. (Bug#11261)
9535 2012-04-20 Atsuo Ohki <ohki@gssm.otsuka.tsukuba.ac.jp> (tiny change)
9537 * lread.c (lisp_file_lexically_bound_p): Fix hang at ";-*-\n"
9540 2012-04-20 Teodor Zlatanov <tzz@lifelogs.com>
9541 2012-04-18 Paul Eggert <eggert@cs.ucla.edu>
9543 configure: new option --enable-gcc-warnings (Bug#11207)
9544 * Makefile.in (C_WARNINGS_SWITCH): Remove.
9545 (WARN_CFLAGS, WERROR_CFLAGS): New macros.
9546 (ALL_CFLAGS): Use new macros rather than old.
9547 * process.c: Ignore -Wstrict-overflow to work around GCC bug 52904.
9548 * regex.c: Ignore -Wstrict-overflow. If !emacs, also ignore
9549 -Wunused-but-set-variable, -Wunused-function, -Wunused-macros,
9550 -Wunused-result, -Wunused-variable. This should go away once
9551 the Emacs and Gnulib regex code is merged.
9552 (xmalloc, xrealloc): Now static.
9554 2012-04-17 Paul Eggert <eggert@cs.ucla.edu>
9556 * dired.c (Fsystem_groups): Remove unused local.
9558 2012-04-17 Glenn Morris <rgm@gnu.org>
9560 * dired.c (Fsystem_users): Doc fix.
9562 2012-04-17 Dmitry Antipov <dmantipov@yandex.ru>
9564 * dired.c (Fsystem_users, Fsystem_groups): New functions. (Bug#7900)
9565 (syms_of_dired): Add them.
9567 2012-04-16 Paul Eggert <eggert@cs.ucla.edu>
9569 Fix minor alloc.c problems found by static checking.
9570 * alloc.c (_malloc_internal, _free_internal) [!DOUG_LEA_MALLOC]:
9571 New extern decls, to avoid calling undeclared functions.
9572 (dont_register_blocks): Define if ((!SYSTEM_MALLOC && !SYNC_INPUT)
9573 && GC_MALLOC_CHECK), not if ((GC_MARK_STACK || defined
9574 GC_MALLOC_CHECK) && GC_MALLOC_CHECK), to match when it's used.
9575 (NEED_MEM_INSERT): New macro.
9576 (mem_insert, mem_insert_fixup) [!NEED_MEM_INSERT]: Remove; unused.
9577 Remove one incorrect comment and fix another.
9579 Fix minor ralloc.c problems found by static checking.
9580 See http://lists.gnu.org/archive/html/emacs-devel/2011-12/msg00720.html
9581 * ralloc.c (ALIGNED, ROUND_TO_PAGE, HEAP_PTR_SIZE)
9582 (r_alloc_size_in_use, r_alloc_freeze, r_alloc_thaw): Remove; unused.
9583 (r_alloc_sbrk): Now static.
9585 Improve ralloc.c interface checking.
9586 See http://lists.gnu.org/archive/html/emacs-devel/2011-12/msg00720.html
9587 * buffer.c (ralloc_reset_variable, r_alloc, r_re_alloc)
9588 (r_alloc_free) [REL_ALLOC]: Move decls from here ...
9589 * lisp.h (r_alloc, r_alloc_free, r_re_alloc, r_alloc_reset_variable)
9590 [REL_ALLOC]: ... to here, to check interface.
9591 * m/ia64.h (r_alloc, r_alloc_free) [REL_ALLOC && !_MALLOC_INTERNAL]:
9592 Remove decls. This fixes an "It stinks!".
9594 * alloc.c (which_symbols): Fix alignment issue / type clash.
9596 2012-04-15 Andreas Schwab <schwab@linux-m68k.org>
9598 * lisp.h (struct Lisp_Symbol): Remove explicit padding.
9599 (struct Lisp_Misc_Any): Likewise.
9600 (struct Lisp_Free): Likewise.
9601 * alloc.c (union aligned_Lisp_Symbol): Define.
9602 (SYMBOL_BLOCK_SIZE, struct symbol_block): Use union
9603 aligned_Lisp_Symbol instead of struct Lisp_Symbol.
9604 (union aligned_Lisp_Misc): Define.
9605 (MARKER_BLOCK_SIZE, struct marker_block): Use union
9606 aligned_Lisp_Misc instead of union Lisp_Misc.
9607 (Fmake_symbol, allocate_misc, gc_sweep): Adjust.
9609 2012-04-14 Paul Eggert <eggert@cs.ucla.edu>
9611 Make GC_MAKE_GCPROS_NOOPS the default (Bug#9926).
9612 * lisp.h (GC_MARK_STACK): Default to GC_MAKE_GCPROS_NOOPS.
9613 * s/cygwin.h, s/darwin.h, s/freebsd.h, s/gnu.h, s/irix6-5.h, s/msdos.h:
9614 * s/netbsd.h, s/sol2-6.h:
9615 Remove definition of GC_MARK_STACK, since the default now works.
9616 * s/aix4-2.h, s/hpux10-20.h, s/unixware.h:
9617 Define GC_MARK_STACK to GC_USE_GCPROS_AS_BEFORE, since that's
9618 no longer the default.
9619 * s/gnu-linux.h (GC_MARK_STACK): Adjust to change in default.
9621 2012-04-14 Atsuo Ohki <ohki@gssm.otsuka.tsukuba.ac.jp> (tiny change)
9623 * lread.c (lisp_file_lexically_bound_p):
9624 Fix hang at ";-*-\n" (bug#11238).
9626 2012-04-14 Eli Zaretskii <eliz@gnu.org>
9628 * xdisp.c (find_last_unchanged_at_beg_row): Don't consider a row
9629 "unchanged" if its end.pos is beyond ZV. (Bug#11199)
9631 2012-04-14 Jan Djärv <jan.h.d@swipnet.se>
9633 * nsterm.m (constrainFrameRect): Always constrain when there is only
9634 one screen (Bug#10962).
9636 2012-04-13 Ken Brown <kbrown@cornell.edu>
9638 * s/cygwin.h (PTY_OPEN): Don't try to close a bogus file descriptor.
9640 2012-04-13 Reuben Thomas <rrt@sc3d.org>
9642 * indent.c (Fmove_to_column): Change interactive spec (Bug#739).
9644 2012-04-11 Daniel Colascione <dancol@dancol.org>
9646 * s/cygwin.h: The vfork the #define in cygwin.h was protecting
9647 against is gone. It's better to use vfork now so that when Cygwin
9648 gains a new, working vfork, we use it automatically (bug#10398).
9650 2012-04-11 Stefan Monnier <monnier@iro.umontreal.ca>
9652 * window.c (save_window_save): Obey window-point-insertion-type.
9654 2012-04-11 Glenn Morris <rgm@gnu.org>
9656 * Makefile.in (GNUSTEP_CFLAGS): Rename from C_SWITCH_X_SYSTEM.
9658 2012-04-11 Stefan Monnier <monnier@iro.umontreal.ca>
9660 * alloc.c (lisp_align_malloc): Remove unneeded prototype.
9662 2012-04-10 Jason S. Cornez <jcornez@ravenpack.com> (tiny change)
9664 * keyboard.c: Override inhibit-quit after the third C-g (bug#6585).
9665 (force_quit_count): New var.
9666 (handle_interrupt): Use it.
9668 2012-04-10 Juanma Barranquero <lekktu@gmail.com>
9670 * w32.c (w32_delayed_load): Record the full path of the library
9671 being loaded (bug#10424).
9673 2012-04-09 Glenn Morris <rgm@gnu.org>
9675 * doc.c (Fsnarf_documentation): Check variables, functions are bound,
9676 not just in the obarray, before snarfing them. (Bug#11036)
9678 * Makefile.in ($(leimdir)/leim-list.el):
9679 Pass EMACS rather than BUILT_EMACS.
9681 2012-04-09 Teodor Zlatanov <tzz@lifelogs.com>
9683 * process.c (make_process):
9684 * process.h: Add integer `gnutls_handshakes_tried' member to
9687 * gnutls.h: Add `GNUTLS_EMACS_HANDSHAKES_LIMIT' upper limit.
9688 Add convenience `GNUTLS_LOG2i' macro.
9690 * gnutls.c (gnutls_log_function2i): Convenience log function.
9691 (emacs_gnutls_read): Use new log functions,
9692 `gnutls_handshakes_tried' process member, and
9693 `GNUTLS_EMACS_HANDSHAKES_LIMIT' to limit the number of handshake
9694 attempts per process (connection).
9696 2012-04-09 Chong Yidong <cyd@gnu.org>
9698 * eval.c (Fuser_variable_p, user_variable_p_eh)
9699 (lisp_indirect_variable): Functions deleted.
9700 (Fdefvar): Caller changed.
9702 * callint.c (Finteractive, Fcall_interactively):
9703 * minibuf.c (Fread_variable): Callers changed.
9705 2012-04-09 Eli Zaretskii <eliz@gnu.org>
9707 * xdisp.c (set_cursor_from_row): If the display string appears in
9708 the buffer at position that is closer to point than the position
9709 after the display string, display the cursor on the first glyph of
9710 the display string. Fixes cursor display when a 'display' text
9711 property immediately follows invisible text. (Bug#11094)
9713 2012-04-09 Paul Eggert <eggert@cs.ucla.edu>
9715 composite.c: use 'double' consistently
9716 * composite.c (get_composition_id): Use 'double' consistently
9717 instead of converting 'float' to 'double' and vice versa; this is
9718 easier to understand and avoids a GCC warning.
9720 2012-04-09 Glenn Morris <rgm@gnu.org>
9722 * Makefile.in: Generate leim-list with bootstrap-emacs, in
9723 preparation for dumping it with emacs. (Bug#4789)
9724 (leimdir): New variable.
9725 ($(leimdir)/leim-list.el): New rule.
9726 (emacs$(EXEEXT)): Depend on leim-list.el.
9728 * buffer.c (Qucs_set_table_for_input): Remove. (Bug#9821)
9729 (Fget_buffer_create): Don't call Qucs_set_table_for_input.
9730 (init_buffer_once, syms_of_buffer): Remove Qucs_set_table_for_input.
9732 2012-04-08 Andreas Schwab <schwab@linux-m68k.org>
9734 * lisp.h (struct Lisp_Symbol): Add explicit padding to ensure
9737 2012-04-07 Juanma Barranquero <lekktu@gmail.com>
9739 * xml.c (init_libxml2_functions) [WINDOWSNT]:
9740 Remove unused local variable.
9742 2012-04-07 Paul Eggert <eggert@cs.ucla.edu>
9744 Avoid unnecessary pointer scanning in garbage collection (Bug#10780).
9745 * alloc.c (POINTERS_MIGHT_HIDE_IN_OBJECTS): New macro.
9746 (mark_memory): Mark Lisp_Objects only if pointers might hide in
9747 objects, as mark_maybe_pointer will catch them otherwise.
9748 (GC_LISP_OBJECT_ALIGNMENT): Remove; no longer needed.
9749 * s/gnu-linux.h (GC_LISP_OBJECT_ALIGNMENT) [__mc68000__]: Likewise.
9751 2012-04-07 Paul Eggert <eggert@cs.ucla.edu>
9753 Fix typo that broke non-Windows builds.
9754 * xml.c (libxml2_loaded_p) [!!WINDOWSNT]: 'inine' -> 'inline'.
9756 2012-04-07 Eli Zaretskii <eliz@gnu.org>
9758 Support building on MS-Windows with libxml2.
9760 * makefile.w32-in (OBJ2): Add xml.$(O).
9761 (GLOBAL_SOURCES): Add xml.c.
9762 ($(BLD)/xml.$(O)): New dependency list.
9764 * xml.c (DEF_XML2_FN, LOAD_XML2_FN) [WINDOWSNT]: New macros.
9765 (fn_htmlReadMemory, fn_xmlReadMemory, fn_xmlDocGetRootElement)
9766 (fn_xmlFreeDoc, fn_xmlCleanupParser, fn_xmlCheckVersion)
9767 [!WINDOWSNT]: New macros.
9768 (init_libxml2_functions, libxml2_loaded_p): New functions.
9769 (parse_region): Call fn_xmlCheckVersion instead of using the macro
9770 LIBXML_TEST_VERSION. Call libxml2 functions via the fn_* macros.
9771 (xml_cleanup_parser): New function, export for fn_xmlCleanupParser.
9772 Calls xmlCleanupParser only if libxml2 was loaded (or statically
9774 (Flibxml_parse_html_region, Flibxml_parse_xml_region):
9775 Call init_libxml2_functions before calling libxml2 functions.
9776 (syms_of_xml) <Qlibxml2_dll>: DEFSYM it.
9778 * emacs.c: Don't include libxml/parser.h.
9779 (shut_down_emacs): Call xml_cleanup_parser, instead of calling
9780 xmlCleanupParser directly.
9782 * lisp.h [HAVE_LIBXML2]: Add prototype for xml_cleanup_parser.
9784 2012-04-07 Eli Zaretskii <eliz@gnu.org>
9786 * indent.c (Fvertical_motion): If there is a display string at
9787 point, use it.vpos to compute how many lines to backtrack after
9788 move_it_to point. (Bug#11133)
9790 2012-04-06 Eli Zaretskii <eliz@gnu.org>
9792 * buffer.h (FETCH_CHAR, FETCH_MULTIBYTE_CHAR):
9793 * character.h (STRING_CHAR, STRING_CHAR_AND_LENGTH): Add comments
9794 about subtle differences between FETCH_CHAR* and STRING_CHAR*
9795 macros related to unification of CJK characters. For the details,
9796 see the discussion following the message here:
9797 http://debbugs.gnu.org/cgi/bugreport.cgi?bug=11073#14.
9799 2012-04-04 Chong Yidong <cyd@gnu.org>
9801 * keyboard.c (Vdelayed_warnings_list): Doc fix.
9803 2012-04-01 Eli Zaretskii <eliz@gnu.org>
9805 * w32menu.c (simple_dialog_show, add_menu_item): Use SAFE_ALLOCA
9806 instead of alloca. (Bug#11138)
9808 2012-04-01 Andreas Schwab <schwab@linux-m68k.org>
9810 * w32menu.c (is_simple_dialog): Properly check lisp types.
9813 2012-03-31 Eli Zaretskii <eliz@gnu.org>
9815 * xdisp.c (move_it_by_lines): When DVPOS is positive, and the
9816 position we get to after a call to move_it_to fails the
9817 IS_POS_VALID_AFTER_MOVE_P test, move to the next buffer position
9818 only if we wind up in a string from display property. (Bug#11063)
9820 * window.c (Fdelete_other_windows_internal): Invalidate the row
9821 and column information about mouse highlight, so that redisplay
9822 restores it after reallocating the glyph matrices. (Bug#7464)
9824 * xdisp.c (set_cursor_from_row): If `cursor' property on a display
9825 string comes from a `display' text property, use the buffer
9826 position of that property as if we actually saw that position in
9828 (move_it_by_lines): Remove the assertion that
9829 "it->current_x == 0 && it->hpos == 0" which can be legitimately
9830 violated when there's a before-string at the beginning of a line.
9833 2012-03-30 Eli Zaretskii <eliz@gnu.org>
9835 * xdisp.c (append_space_for_newline): If the default face was
9836 remapped, use the remapped face for the appended newline.
9837 (extend_face_to_end_of_line): Use the remapped default face for
9838 extending the face to the end of the line.
9839 (display_line): Call extend_face_to_end_of_line when the default
9840 face was remapped. (Bug#11068)
9842 2012-03-29 Eli Zaretskii <eliz@gnu.org>
9844 * s/ms-w32.h: Discourage from defining HAVE_GETCWD.
9846 2012-03-28 Stefan Monnier <monnier@iro.umontreal.ca>
9848 * keyboard.c (safe_run_hooks_error): Don't unquote strings.
9850 2012-03-27 Glenn Morris <rgm@gnu.org>
9852 * search.c (Fword_search_backward_lax, Fword_search_forward_lax):
9855 2012-03-26 Kenichi Handa <handa@m17n.org>
9857 * dispextern.h (struct glyph): Fix previous change. Change the
9858 bit length of glyphless.ch to 25 (Bug#11082).
9860 2012-03-26 Chong Yidong <cyd@gnu.org>
9862 * keyboard.c (Vselection_inhibit_update_commands): New variable.
9863 (command_loop_1): Use it; inhibit selection update for
9864 handle-select-window too (Bug#8996).
9866 2012-03-25 Fabrice Popineau <fabrice.popineau@supelec.fr>
9868 * w32heap.c (_heap_init, _heap_term): Remove dead MSVC-specific code.
9870 2012-03-25 Kenichi Handa <handa@m17n.org>
9872 * dispextern.h (struct glyph): Change the bit length of
9873 glyphless.ch to 22 to make the member glyphless fit in 32 bits.
9875 2012-03-24 Eli Zaretskii <eliz@gnu.org>
9877 * s/ms-w32.h (tzname): Include time.h before redirecting to
9878 _tzname. Fixes the MSVC build. (Bug#9960)
9880 2012-03-24 Andreas Schwab <schwab@linux-m68k.org>
9882 * xdisp.c (produce_glyphless_glyph): Limit length of acronym to 6
9885 * xterm.c (XTread_socket): Only modify handling_signal if
9886 !SYNC_INPUT. (Bug#11080)
9888 2012-03-23 Eli Zaretskii <eliz@gnu.org>
9890 * bidi.c (bidi_fetch_char): Use STRING_CHAR_AND_LENGTH instead of
9891 FETCH_MULTIBYTE_CHAR followed by CHAR_BYTES. Prevents crashes
9892 when fetching a multibyte character consumes more bytes than
9893 CHAR_BYTES returns, due to unification of CJK characters in
9894 string_char. (Bug#11073)
9896 2012-03-23 Troels Nielsen <bn.troels@gmail.com> (tiny change)
9898 * process.c (wait_reading_process_output): Handle pty disconnect
9899 by refraining from sending oneself a SIGCHLD (bug#10933).
9901 2012-03-22 Chong Yidong <cyd@gnu.org>
9903 * dispextern.h (struct it): New member string_from_prefix_prop_p.
9905 * xdisp.c (push_prefix_prop): Rename from push_display_prop.
9906 Mark string as coming from a prefix property.
9907 (handle_face_prop): Use default face for prefix strings (Bug#4281).
9908 (pop_it, reseat_1): Save and restore string_from_prefix_prop_p.
9910 2012-03-21 Chong Yidong <cyd@gnu.org>
9912 * xfaces.c (Vface_remapping_alist): Doc fix.
9914 2012-03-20 Eli Zaretskii <eliz@gnu.org>
9916 * w32proc.c (Fw32_set_console_codepage)
9917 (Fw32_set_console_output_codepage, Fw32_get_codepage_charset):
9920 2012-03-20 Chong Yidong <cyd@gnu.org>
9922 * dispnew.c (Fredisplay, Vredisplay_preemption_period): Update doc
9923 to reflect default non-nil value of redisplay-dont-pause.
9925 2012-03-19 Kenichi Handa <handa@m17n.org>
9927 * ftfont.c (ftfont_drive_otf): Mask bits of character code to make
9928 it fit in a valid range (Bug#11003).
9930 2012-03-18 Eli Zaretskii <eliz@gnu.org>
9932 * xdisp.c (cursor_row_p): Even if the glyph row ends in a string
9933 that is not from display property, accept the row as a "cursor
9934 row" if one of the string's character has a non-nil `cursor'
9935 property. Fixes cursor positioning when there are newlines in
9936 overlay strings, e.g. in icomplete.el. (Bug#11035)
9938 2012-03-12 Paul Eggert <eggert@cs.ucla.edu>
9940 * buffer.c (compare_overlays): Don't assume args differ (Bug#6830).
9942 2012-03-12 Chong Yidong <cyd@gnu.org>
9944 * eval.c (inhibit_lisp_code): Rename from
9945 inhibit_window_configuration_change_hook; move from window.c.
9947 * xfns.c (unwind_create_frame_1, Fx_create_frame):
9948 * window.c (run_window_configuration_change_hook)
9949 (syms_of_window): Callers changed.
9951 2012-03-11 Chong Yidong <cyd@gnu.org>
9953 * keymap.c (Fkey_description): Doc fix (Bug#9700).
9955 * editfns.c (Fconstrain_to_field): Doc fix (Bug#9452).
9957 2012-03-10 Chong Yidong <cyd@gnu.org>
9959 * frame.c (other_visible_frames): Don't assume the selected frame
9960 is visible (Bug#10955).
9962 2012-03-09 Stefan Monnier <monnier@iro.umontreal.ca>
9964 * buffer.c (compare_overlays): Avoid qsort's instability (bug#6830).
9966 2012-03-08 Jan Djärv <jan.h.d@swipnet.se>
9968 * gtkutil.c (x_wm_set_size_hint): Use one row in call to
9969 FRAME_TEXT_LINES_TO_PIXEL_HEIGHT so base_height is greater than
9972 2012-03-03 Glenn Morris <rgm@gnu.org>
9974 * alloc.c (Fgarbage_collect, misc-objects-consed): Doc fixes.
9976 2012-03-02 Eli Zaretskii <eliz@gnu.org>
9978 * xdisp.c (try_window_reusing_current_matrix): Don't move cursor
9979 position past the first glyph_row that ends at ZV. (Bug#10902)
9980 (redisplay_window, next_element_from_string): Fix typos in
9982 (redisplay_window): Pass to move_it_vertically the margin in
9983 pixels, not in screen lines.
9985 2012-03-02 Glenn Morris <rgm@gnu.org>
9987 * buffer.c (buffer-list-update-hook): Doc fix.
9989 2012-02-29 Eli Zaretskii <eliz@gnu.org>
9991 * xdisp.c (get_overlay_strings_1): Under bidi redisplay, call
9992 push_it before setting up the iterator for the first overlay
9993 string, even if we have an empty string loaded.
9994 (next_overlay_string): If there's an empty string on the iterator
9995 stack, pop the stack. (Bug#10903)
9997 2012-02-25 Paul Eggert <eggert@cs.ucla.edu>
9999 Generalize fix for crash due to non-contiguous EMACS_INT (Bug#10780).
10000 Suggested by Stefan Monnier in
10001 <http://lists.gnu.org/archive/html/emacs-devel/2012-02/msg00692.html>.
10002 * alloc.c (widen_to_Lisp_Object): New static function.
10003 (mark_memory): Also mark Lisp_Objects by fetching pointer words
10004 and widening them to Lisp_Objects. This would work even if
10005 USE_LSB_TAG is defined and wide integers are used, which might
10006 happen in a future version of Emacs.
10008 2012-02-25 Chong Yidong <cyd@gnu.org>
10010 * fileio.c (Ffile_selinux_context, Fset_file_selinux_context):
10013 * xselect.c (Fx_selection_exists_p): Doc fix.
10014 (x_clipboard_manager_save_all): Print an informative message
10015 before saving to clipboard manager.
10017 2012-02-24 Chong Yidong <cyd@gnu.org>
10019 * keyboard.c (process_special_events): Handle all X selection
10020 requests in kbd_buffer, not just the next one (Bug#8869).
10022 2012-02-23 Chong Yidong <cyd@gnu.org>
10024 * xfns.c (Fx_create_frame): Avoid window-configuration-change-hook
10025 call when setting menu-bar-lines and tool-bar-lines parameters.
10026 (unwind_create_frame_1): New helper function.
10028 * window.c (inhibit_window_configuration_change_hook): New var.
10029 (run_window_configuration_change_hook): Obey it.
10030 (syms_of_window): Initialize it.
10032 2012-02-22 Chong Yidong <cyd@gnu.org>
10034 * xterm.c (x_draw_image_relief): Add missing type check for
10035 Vtool_bar_button_margin (Bug#10743).
10037 2012-02-21 Chong Yidong <cyd@gnu.org>
10039 * fileio.c (Vfile_name_handler_alist): Doc fix.
10041 * buffer.c (Fget_file_buffer): Protect against invalid file
10042 handler return value.
10044 2012-02-20 Paul Eggert <eggert@cs.ucla.edu>
10046 * .gdbinit (xreload): Don't assume EMACS_INT fits in 'long'
10047 when computing $valmask.
10049 Fix crash due to non-contiguous EMACS_INT (Bug#10780).
10050 * lisp.h (VALBITS): Move definition up, so that USE_LSB_TAG can use it.
10051 (USE_LSB_TAG): Do not define if UINTPTR_MAX >> VALBITS == 0.
10052 It's useless in that case, and it can cause problems on hosts
10053 that allocate halves of EMACS_INT values separately.
10054 Reported by Dan Horák. Diagnosed by Andreas Schwab in
10055 <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=10780#30>.
10056 * mem-limits.h (EXCEEDS_LISP_PTR): Define to 0 on hosts where
10057 UINTPTR_MAX >> VALBITS == 0. This is required by the above change;
10058 it avoids undefined behavior on hosts where shifting right by more
10059 than the word width has undefined behavior.
10061 2012-02-19 Chong Yidong <cyd@gnu.org>
10063 * fileio.c (Ffile_name_directory, Ffile_name_nondirectory)
10064 (Funhandled_file_name_directory, Ffile_name_as_directory)
10065 (Fdirectory_file_name, Fexpand_file_name)
10066 (Fsubstitute_in_file_name): Protect against invalid file handler
10067 return values (Bug#10845).
10069 2012-02-18 Eli Zaretskii <eliz@gnu.org>
10071 * .gdbinit (pitx): Fix incorrect references to fields of the
10074 2012-02-17 Chong Yidong <cyd@gnu.org>
10076 * syntax.c (Fscan_lists): Doc fix (Bug#10833).
10078 2012-02-15 Paul Eggert <eggert@cs.ucla.edu>
10080 * image.c (MAX_IMAGE_SIZE): Increase from 6.0 to 10.0; see
10081 <http://lists.gnu.org/archive/html/emacs-devel/2012-02/msg00540.html>.
10083 2012-02-15 Chong Yidong <cyd@gnu.org>
10085 * eval.c (Fdefvar, Fdefconst): Doc fix; note that the variable is
10086 marked as special. Also, starting docstrings with * is obsolete.
10088 2012-02-13 Andreas Schwab <schwab@linux-m68k.org>
10090 * gnutls.c (emacs_gnutls_write): Fix last change.
10092 2012-02-13 Lars Ingebrigtsen <larsi@gnus.org>
10094 * gnutls.c (emacs_gnutls_write): Set errno appropriately for
10097 2012-02-13 Stefan Monnier <monnier@iro.umontreal.ca>
10099 * keymap.c (Fsingle_key_description): Handle char ranges.
10101 2012-02-12 Chong Yidong <cyd@gnu.org>
10103 * xdisp.c (handle_stop): Avoid assigning -1 to it->face_id here,
10104 as that creates a dangerous corner case.
10106 * window.c (Fdelete_window_internal): Invalidate the mouse
10107 highlight (Bug#9904).
10109 2012-02-12 Glenn Morris <rgm@gnu.org>
10111 * xselect.c (Fx_own_selection_internal)
10112 (Fx_get_selection_internal, Fx_disown_selection_internal)
10113 (Fx_selection_owner_p, Fx_selection_exists_p): Doc fixes.
10114 * nsselect.m (Fx_own_selection_internal)
10115 (Fx_disown_selection_internal, Fx_selection_exists_p)
10116 (Fx_selection_owner_p, Fx_get_selection_internal):
10117 Sync docs and argument specs with the xselect.c versions.
10119 2012-02-11 Lars Ingebrigtsen <larsi@gnus.org>
10121 * gnutls.c (emacs_gnutls_write): Don't infloop if sendto fails.
10123 2012-02-11 Eli Zaretskii <eliz@gnu.org>
10125 * w32select.c (Fx_selection_exists_p): Sync doc string and
10126 argument list with xselect.c. (Bug#10783)
10128 * w16select.c (Fx_selection_exists_p): Sync doc string and
10129 argument list with xselect.c. (Bug#10783)
10131 2012-02-10 Glenn Morris <rgm@gnu.org>
10133 * fns.c (Fsecure_hash): Doc fix.
10135 2012-02-09 Kenichi Handa <handa@m17n.org>
10137 * coding.c (produce_chars): Fix updating of src_end (Bug#10701).
10139 2012-02-07 Chong Yidong <cyd@gnu.org>
10141 * buffer.c (Fbuffer_local_variables)
10142 (buffer_lisp_local_variables): Handle unbound vars correctly;
10143 don't let Qunbound leak into Lisp.
10145 2012-02-07 Glenn Morris <rgm@gnu.org>
10147 * image.c (Fimagemagick_types): Doc fix.
10149 * image.c (imagemagick-render-type): Change it from a lisp object
10150 to an integer. Move the doc here from the lisp manual.
10151 Treat all values not equal to 0 the same.
10153 2012-02-06 Chong Yidong <cyd@gnu.org>
10155 * doc.c (store_function_docstring): Avoid applying docstring of
10156 alias to base function (Bug#2603).
10158 2012-02-04 Andreas Schwab <schwab@linux-m68k.org>
10160 * .gdbinit (pp1, pv1): Remove redundant defines.
10163 2012-02-04 Chong Yidong <cyd@gnu.org>
10165 * nsterm.m: Declare a global (Bug#10694).
10167 2012-02-04 Eli Zaretskii <eliz@gnu.org>
10169 * w32.c (get_emacs_configuration_options):
10170 Include --enable-checking, if specified, in the return value.
10172 2012-02-04 Martin Rudalics <rudalics@gmx.at>
10174 * dispnew.c (change_frame_size_1): Calculate new_frame_total_cols
10175 after rounding frame sizes. (Bug#9723)
10177 2012-02-04 Eli Zaretskii <eliz@gnu.org>
10179 * keyboard.c (adjust_point_for_property): Don't position point
10180 before BEGV. (Bug#10696)
10182 2012-02-03 Paul Eggert <eggert@cs.ucla.edu>
10184 Handle overflow when computing char display width (Bug#9496).
10185 * character.c (char_width): Return EMACS_INT, not int.
10186 (char_width, c_string_width): Check for overflow when
10187 computing the width; this is possible now that individual
10188 characters can have unbounded width. Problem introduced
10189 by merge from Emacs 23 on 2012-01-19.
10191 2012-02-02 Michael Albinus <michael.albinus@gmx.de>
10193 * dbusbind.c (Fdbus_register_method): Mention the return value
10194 :ignore in the docstring.
10196 2012-02-02 Glenn Morris <rgm@gnu.org>
10198 * callproc.c (Fcall_process, Fcall_process_region): Doc fix.
10200 * nsterm.m (syms_of_nsterm) <x-toolkit-scroll-bars>:
10201 Unconditionally set to t. (Bug#10673)
10202 * nsterm.m (syms_of_nsterm) <x-toolkit-scroll-bars>:
10203 * w32term.c (syms_of_w32term) <x-toolkit-scroll-bars>:
10204 * xterm.c (syms_of_xterm) <x-toolkit-scroll-bars>: Doc fix.
10206 2012-02-02 Kenichi Handa <handa@m17n.org>
10208 (x_produce_glyphs): Cancel previous change. If cmp->glyph_len is
10209 0, do not call append_composite_glyph.
10211 2012-02-02 Kenichi Handa <handa@m17n.org>
10213 * xdisp.c (BUILD_COMPOSITE_GLYPH_STRING): Initialize first_s to
10215 (x_produce_glyphs): If the component of a composition is a null
10216 string, set it->pixel_width to 1 to avoid zero-width glyph.
10218 2012-02-01 Eli Zaretskii <eliz@gnu.org>
10220 * ralloc.c (resize_bloc, r_alloc_sbrk): Don't call memmove if its
10221 first 2 arguments are identical. This makes inserting large
10222 output from a subprocess an order of magnitude faster on
10223 MS-Windows, where all sbrk'ed memory is always contiguous.
10225 2012-01-31 Glenn Morris <rgm@gnu.org>
10227 * nsterm.m (syms_of_nsterm) <x-toolkit-scroll-bars>:
10228 * w32term.c (syms_of_w32term) <x-toolkit-scroll-bars>:
10229 * xterm.c (syms_of_xterm) <x-toolkit-scroll-bars>: Sync docs.
10231 2012-01-29 Glenn Morris <rgm@gnu.org>
10233 * gnutls.c (syms_of_gnutls): More doc (from etc/NEWS).
10235 2012-01-28 Samuel Thibault <sthibault@debian.org> (tiny change)
10237 * s/gnu.h: Define POSIX_SIGNALS (Bug#10552).
10239 2012-01-28 Chong Yidong <cyd@gnu.org>
10241 * minibuf.c (syms_of_minibuf): Doc fix (Bug#10550).
10243 2012-01-26 Chong Yidong <cyd@gnu.org>
10245 * keyboard.c (Vecho_keystrokes): Document zero value (Bug#10503).
10247 * search.c (Fsearch_forward, Fsearch_backward): Document negative
10248 repeat counts (Bug#10507).
10250 2012-01-26 Glenn Morris <rgm@gnu.org>
10252 * lread.c (syms_of_lread): Doc fix.
10254 2012-01-25 HIROSHI OOTA <nil@mad.dog.cx> (tiny change)
10256 * coding.c (encode_designation_at_bol): Change return value to
10259 2012-01-25 Chong Yidong <cyd@gnu.org>
10261 * eval.c (Fuser_variable_p): Doc fix; mention custom-variable-p.
10263 2012-01-21 Chong Yidong <cyd@gnu.org>
10265 * floatfns.c (Fcopysign): Make the second argument non-optional,
10266 since nil is not allowed anyway.
10268 2012-01-21 Andreas Schwab <schwab@linux-m68k.org>
10270 * process.c (read_process_output): Use p instead of XPROCESS (proc).
10271 (send_process): Likewise.
10273 2012-01-19 Martin Rudalics <rudalics@gmx.at>
10275 * window.c (save_window_save, Fcurrent_window_configuration)
10276 (Vwindow_persistent_parameters): Do not use Qstate.
10277 Rewrite doc-strings.
10279 2012-01-19 Kenichi Handa <handa@m17n.org>
10281 * character.c (char_width): New function.
10282 (Fchar_width, c_string_width, lisp_string_width):
10283 Use char_width (Bug#9496).
10285 2012-01-16 Martin Rudalics <rudalics@gmx.at>
10287 * window.c (Vwindow_persistent_parameters): New variable.
10288 (Fset_window_configuration, save_window_save): Handle persistent
10291 2012-01-14 Eli Zaretskii <eliz@gnu.org>
10293 * w32fns.c (signal_user_input): Don't do a QUIT, to avoid
10294 thrashing the stack of the thread. (Bug#9087)
10296 2012-01-12 Paul Eggert <eggert@cs.ucla.edu>
10298 * xdisp.c (rows_from_pos_range): Add parens as per gcc -Wparentheses.
10300 2012-01-11 Eli Zaretskii <eliz@gnu.org>
10302 * xdisp.c (rows_from_pos_range): Handle the case where the
10303 highlight ends on a newline. (Bug#10464)
10304 (mouse_face_from_buffer_pos): Fix off-by-one error in calculating
10305 he end column for display of highlight that ends on a newline
10308 2012-01-11 Glenn Morris <rgm@gnu.org>
10310 * lread.c (init_lread): If no-site-lisp, remove site-lisp dirs
10311 from load-path also when installation-directory is nil. (Bug#10208)
10313 2012-01-10 Glenn Morris <rgm@gnu.org>
10315 * emacs.c (syms_of_emacs) <installation-directory>: Doc fix.
10317 * epaths.in (PATH_LOADSEARCH, PATH_EXEC, PATH_DATA, PATH_DOC):
10318 Update template values to be closer to their typical values these days.
10320 2012-01-09 Eli Zaretskii <eliz@gnu.org>
10322 * xdisp.c (rows_from_pos_range): Accept additional argument
10323 DISP_STRING, and accept any glyph in a row whose object is that
10324 string as eligible for mouse highlight. Fixes mouse highlight of
10325 display strings from overlays. (Bug#10464)
10327 2012-01-07 Paul Eggert <eggert@cs.ucla.edu>
10329 emacs: fix an auto-save permissions race condition (Bug#10400)
10330 * fileio.c (auto_saving_dir_umask): New static var.
10331 (Fmake_directory_internal): Use it.
10332 (do_auto_save_make_dir): Set it, instead of invoking chmod after
10333 creating the directory. The old code temporarily assigns
10334 too-generous permissions to the directory.
10335 (do_auto_save_eh): Clear it.
10336 (Fdo_auto_save): Catch all errors, not just file errors, so
10337 that the var is always cleared.
10339 2012-01-07 Eli Zaretskii <eliz@gnu.org>
10341 * search.c (scan_buffer): Pass character positions to
10342 know_region_cache, not byte positions. (Bug#6540)
10344 2012-01-07 LynX <_LynX@bk.ru> (tiny change)
10346 * w32.c (sys_rename): Report EXDEV when rename of a directory
10347 fails because the target is on another logical disk. (Bug#10284)
10349 2012-01-07 David Benjamin <davidben@mit.edu> (tiny change)
10351 * xterm.c (x_embed_request_focus): New function.
10353 * xterm.h: Add prototype.
10355 * xfns.c (Fx_focus_frame): Use it for embedded frames (Bug#9977).
10357 2012-01-05 Glenn Morris <rgm@gnu.org>
10359 * emacs.c (emacs_copyright): Update short copyright year to 2012.
10361 2012-01-01 Eli Zaretskii <eliz@gnu.org>
10363 * gnutls.c (init_gnutls_functions): Load gnutls_check_version.
10364 Load gnutls_transport_set_lowat only if GnuTLS version is below
10366 (emacs_gnutls_handshake): Call gnutls_transport_set_lowat only for
10367 GnuTLS versions below 2.11.1.
10369 2011-12-31 Antoine Levitt <antoine.levitt@gmail.com>
10371 * xdisp.c (syms_of_xdisp) <window-scroll-functions>: Add warning
10372 to the doc string advising against its use for altering the way
10373 windows are scrolled.
10375 2011-12-28 Kenichi Handa <handa@m17n.org>
10377 * coding.c (Fdefine_coding_system_internal): Make an utf-8 base
10378 coding-system ASCII compatible only when it does not produce BOM
10379 on encoding (Bug#10383).
10381 2011-12-26 Jan Djärv <jan.h.d@swipnet.se>
10383 * xmenu.c (x_menu_wait_for_event): Use xg_select for Gtk3 so menus
10385 (create_and_show_popup_menu): Always use menu_position_func for
10388 2011-12-24 Andreas Schwab <schwab@linux-m68k.org>
10390 * callint.c (Fcall_interactively): Don't truncate prompt string.
10392 2011-12-23 Eli Zaretskii <eliz@gnu.org>
10394 * xdisp.c (handle_invisible_prop): Handle correctly an invisible
10395 property that ends at ZV, so that the bidi iteration could be
10396 resumed from there (after widening). (Bug#10360)
10398 2011-12-22 Jan Djärv <jan.h.d@swipnet.se>
10400 * nsfont.m (ns_spec_to_descriptor): Do not autorelease fdesc.
10402 2011-12-21 Jan Djärv <jan.h.d@swipnet.se>
10404 * nsterm.m (x_free_frame_resources):
10405 Release f->output_data.ns->miniimage.
10406 (ns_index_color): Fix indentation. Do not retain
10407 color_table->colors[i].
10409 * nsmenu.m (ns_update_menubar): Call free_menubar_widget_value_tree
10412 * nsfns.m (x_set_background_color): Assign return value from
10413 ns_index_color to face-background instead of NSColor*.
10414 (ns_implicitly_set_icon_type): Fix indentation.
10415 Change assignment in for loop to comparison.
10417 * emacs.c (ns_pool): New variable.
10418 (main): Assign ns_pool.
10419 (Fkill_emacs): Call ns_release_autorelease_pool.
10421 * nsfont.m (ns_spec_to_descriptor): Fix indentation,
10422 autorelease fdesc, release fdAttrs and tdict.
10423 (ns_get_covering_families): Release charset.
10424 (ns_findfonts): Release NSFontDescriptor created with new.
10425 (ns_uni_to_glyphs): Fix indentation.
10426 (setString): Release attrStr before assigning new value.
10428 2011-12-18 Jan Djärv <jan.h.d@swipnet.se>
10430 * nsmenu.m (NSMenuDidBeginTrackingNotification): Declare if OSX < 10.5
10432 (trackingNotification): Surround with ifdef NS_IMPL_COCOA.
10433 (syms_of_nsmenu): Set trackingMenu to 1 if not NS_IMPL_COCOA.
10435 2011-12-18 David Reitter <reitter@cmu.edu>
10437 * nsterm.m (ns_term_init): Subscribe for notifications
10438 NSMenuDidBeginTrackingNotification and NSMenuDidEndTrackingNotification
10439 to method trackingNotification in EmacsMenu.
10441 * nsmenu.m (trackingMenu): New variable.
10442 (trackingNotification): New method (from Aquamacs).
10443 (menuNeedsUpdate): Expand comment and return if trackingMenu is 0,
10444 from Aquamacs (Bug#7030).
10446 2011-12-18 Jan Djärv <jan.h.d@swipnet.se>
10448 * nsselect.m (CUT_BUFFER_SUPPORT): Remove define.
10449 (symbol_to_nsstring): Fix indentation.
10450 (ns_symbol_to_pb): New function.
10451 (Fns_get_selection_internal): Rename from Fns_get_cut_buffer_internal.
10452 (Fns_rotate_cut_buffers_internal): Remove.
10453 (Fns_store_selection_internal): Rename from
10454 Fns_store_cut_buffer_internal.
10455 (ns_get_foreign_selection, Fx_own_selection_internal)
10456 (Fx_disown_selection_internal, Fx_selection_exists_p)
10457 (Fns_get_selection_internal, Fns_store_selection_internal):
10458 Use ns_symbol_to_pb and check if return value is nil.
10459 (syms_of_nsselect): Remove ifdef CUT_BUFFER_SUPPORT. Remove defsubr
10460 Sns_rotate_cut_buffers_internal. Sns_get_cut_buffer_internal
10461 renamed to Sns_get_selection_internal, Sns_store_cut_buffer_internal
10462 renamed to Sns_store_selection_internal.
10463 (ns_handle_selection_request): Move code to Fx_own_selection_internal
10464 and remove this function.
10465 (ns_handle_selection_clear): Remove, never used.
10466 (Fx_own_selection_internal): Move code from ns_handle_selection_request
10469 2011-12-17 Ken Brown <kbrown@cornell.edu>
10471 * fileio.c (check_writable) [CYGWIN]: Return non-zero if UID or
10472 GID is unknown (Bug#10257).
10474 2011-12-17 Paul Eggert <eggert@cs.ucla.edu>
10476 * s/gnu-linux.h: Fix mark_memory typo (Bug#10286).
10477 (GC_MARK_SECONDARY_STACK): Omit removed 3rd arg to mark_memory,
10478 which caused a build failure on GNU/Linux IA-64. This problem was
10479 introduced by my 2011-10-07 patch.
10481 2011-12-15 Juri Linkov <juri@jurta.org>
10483 * image.c (imagemagick_error): New function. (Bug#10112)
10484 (imagemagick_load_image): Comment out `MagickSetResolution' call.
10485 Use `imagemagick_error' where ImageMagick functions return
10487 (Fimagemagick_types): Add `Fnreverse' to return the list in the
10490 2011-12-15 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
10492 * xftfont.c (xftfont_draw): Use the font metrics of s->font to
10493 fill background (Bug#8992).
10495 2011-12-13 Martin Rudalics <rudalics@gmx.at>
10497 * window.c (Vwindow_combination_resize)
10498 (Vwindow_combination_limit): Use t instead of non-nil in
10500 (Vrecenter_redisplay): Add first sentence of doc-string on
10502 (Frecenter): Fix doc-string typo.
10504 2011-12-11 Kenichi Handa <handa@m17n.org>
10506 * coding.c (Funencodable_char_position): Pay attention to the
10507 buffer text relocation (Bug#9389).
10509 2011-12-10 Jan Djärv <jan.h.d@swipnet.se>
10511 * xterm.c (x_term_init): Move call to gdk_window_add_filter before
10512 gtk_init (Bug#10100).
10514 2011-12-10 Eli Zaretskii <eliz@gnu.org>
10516 * xdisp.c (RECORD_MAX_MIN_POS): Use IT->cmp_it.charpos only if
10517 IT->string is nil. (Bug#10263)
10519 2011-12-10 Jan Djärv <jan.h.d@swipnet.se>
10521 * nsterm.h (x_free_frame_resources): Declare.
10523 * nsfns.m (ns_get_defaults_value): New function (Bug#10103).
10524 (Fns_get_resource, x_get_string_resource): Call ns_get_defaults_value.
10526 * nsterm.h (ns_get_defaults_value): Declare.
10528 * nsterm.m (ns_default): Call ns_get_defaults_value.
10530 2011-12-09 Eli Zaretskii <eliz@gnu.org>
10532 * xdisp.c (try_scrolling): Don't set scroll_down_p if dy is zero.
10535 2011-12-09 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
10537 * unexelf.c (unexec) [NS_IMPL_GNUSTEP]: Take account of the case
10538 that where the value of an _OBJC_* symbol points to is in the .bss
10539 section (Bug#10240).
10541 2011-12-08 Kazuhiro Ito <kzhr@d1.dion.ne.jp> (tiny change)
10543 * coding.c (encode_coding_ccl): Check (charbuf < charbuf_end)
10544 after the loop to call ccl_driver at least once (Bug#8619).
10546 2011-12-08 Kenichi Handa <handa@m17n.org>
10548 * ftfont.c (get_adstyle_property): Fix previous change
10551 2011-12-07 Juanma Barranquero <lekktu@gmail.com>
10553 * w32.c (init_environment): If no_site_lisp, remove site-lisp
10554 dirs from the default value of EMACSLOADPATH (bug#10208).
10556 2011-12-07 Glenn Morris <rgm@gnu.org>
10558 * lread.c (init_lread): If no_site_lisp, exclude site-lisp/ in
10559 installation and source directories as well. (Bug#10208)
10561 2011-12-06 Chong Yidong <cyd@gnu.org>
10563 * minibuf.c (Fread_from_minibuffer): Doc fix (Bug#10228).
10565 2011-12-06 Glenn Morris <rgm@gnu.org>
10567 * process.c (start_process_unwind): Treat any pid <= 0, except -2,
10568 as an error, not just -1. (Bug#10217)
10570 2011-12-05 Chong Yidong <cyd@gnu.org>
10572 * keyboard.c (process_special_events): New function.
10573 (swallow_events, Finput_pending_p): Use it (Bug#10195).
10575 2011-12-05 Paul Eggert <eggert@cs.ucla.edu>
10577 * coding.c (encode_designation_at_bol): Don't use uninitialized
10578 local variable (Bug#9318).
10580 2011-12-05 Kenichi Handa <handa@m17n.org>
10582 * ftfont.c (get_adstyle_property): If the font is not BDF nor PCF,
10583 return Qnil (Bug#8046, Bug#10193).
10585 2011-12-05 Kenichi Handa <handa@m17n.org>
10587 * coding.c (encode_designation_at_bol): New args charbuf_end and
10588 dst. Return the number of produced bytes. Callers changed.
10589 (coding_set_source): Return how many bytes coding->source was
10591 (coding_set_destination): Return how many bytes
10592 coding->destination was relocated.
10593 (CODING_DECODE_CHAR, CODING_ENCODE_CHAR, CODING_CHAR_CHARSET)
10594 (CODING_CHAR_CHARSET_P): Adjust for the avove changes.
10596 2011-12-05 Kazuhiro Ito <kzhr@d1.dion.ne.jp> (tiny change)
10598 * coding.c (CODING_CHAR_CHARSET_P): New macro.
10599 (encode_coding_emacs_mule, encode_coding_iso_2022): Use the above
10602 2011-12-05 Andreas Schwab <schwab@linux-m68k.org>
10604 The following changes are to fix Bug#9318.
10606 * coding.c (CODING_ENCODE_CHAR, CODING_CHAR_CHARSET): New macros.
10607 (encode_coding_emacs_mule, ENCODE_ISO_CHARACTER)
10608 (encode_coding_iso_2022, encode_coding_sjis)
10609 (encode_coding_big5, encode_coding_charset): Use the above macros.
10611 2011-12-05 Juanma Barranquero <lekktu@gmail.com>
10613 * lisp.h (process_quit_flag): Fix external declaration.
10615 2011-12-04 Stefan Monnier <monnier@iro.umontreal.ca>
10617 Don't macro-inline non-performance-critical code.
10618 * eval.c (process_quit_flag): New function.
10619 * lisp.h (QUIT): Use it.
10621 2011-12-04 Jan Djärv <jan.h.d@swipnet.se>
10623 * nsfns.m (get_geometry_from_preferences): New function.
10624 (Fx_create_frame): Call get_geometry_from_preferences (Bug#10103).
10626 2011-12-04 Andreas Schwab <schwab@linux-m68k.org>
10628 * emacs.c (Qkill_emacs): Define.
10629 (syms_of_emacs): Initialize it.
10630 * keyboard.c (interrupt_signal): Don't call Fkill_emacs here, set
10631 Qquit_flag to `kill-emacs' instead.
10632 (quit_throw_to_read_char): Add parameter `from_signal'.
10633 All callers changed. Call Fkill_emacs if requested and safe.
10634 * lisp.h (QUIT): Call Fkill_emacs if requested.
10636 2011-12-03 Jan Djärv <jan.h.d@swipnet.se>
10638 * widget.c (update_wm_hints): Return if wmshell is null.
10639 (widget_update_wm_size_hints): New function.
10641 * widget.h (widget_update_wm_size_hints): Declare.
10643 * xterm.c (x_wm_set_size_hint): If USE_X_TOOLKIT, call
10644 widget_update_wm_size_hints (Bug#10104).
10646 2011-12-03 Eli Zaretskii <eliz@gnu.org>
10648 * xdisp.c (handle_invisible_prop): If the invisible text ends just
10649 before a newline, prepare the bidi iterator for consuming the
10650 newline, and keep the current paragraph direction. (Bug#10183)
10651 (redisplay_window): Don't let `margin' become negative. (Bug#10192)
10653 2011-12-02 Juri Linkov <juri@jurta.org>
10655 * search.c (Fword_search_regexp): New Lisp function created from
10656 `wordify'. Change type of arg `lax' from `int' to `Lisp_Object'.
10657 (Fword_search_backward, Fword_search_forward)
10658 (Fword_search_backward_lax, Fword_search_forward_lax):
10659 Use `Fword_search_regexp' instead of `wordify'. Doc fix.
10660 (syms_of_search): Define `Sword_search_regexp'. (Bug#10145)
10662 2011-12-01 Stefan Monnier <monnier@iro.umontreal.ca>
10664 * fileio.c (Finsert_file_contents): Move after-change-function call
10665 to before the "handled:" label, since all "goto handled" appear in
10666 cases where the *-change-functions have already been properly called
10669 2011-12-01 Andreas Schwab <schwab@linux-m68k.org>
10671 * keyboard.c (interrupt_signal): Don't call kill-emacs when
10672 waiting for input. (Bug#10169)
10674 2011-11-30 Eli Zaretskii <eliz@gnu.org>
10676 * dispnew.c (adjust_glyph_matrix): Remove the assertion that
10677 verifies glyph row's hash code--we have just reallocated the
10678 glyphs, so their contents can be complete garbage. (Bug#10164)
10680 2011-11-30 Juanma Barranquero <lekktu@gmail.com>
10682 * dispnew.c (adjust_glyph_matrix) [XASSERTS]: Add missing check.
10684 2011-11-30 Eli Zaretskii <eliz@gnu.org>
10686 * dispnew.c (adjust_glyph_matrix) [XASSERTS]: Ensure ROW's
10687 attributes are tested _before_ calling verify_row_hash, to protect
10688 against GCC re-ordering of the tests. (Bug#10164)
10690 2011-11-29 Jan Djärv <jan.h.d@swipnet.se>
10692 * xterm.h (struct x_output): net_wm_state_hidden_seen is new.
10694 * xterm.c (handle_one_xevent): Only set async_visible and friends
10695 if net_wm_state_hidden_seen is non-zero (Bug#10002)
10696 (get_current_wm_state): Set net_wm_state_hidden_seen to 1 if
10697 _NET_WM_STATE_HIDDEN is in NET_WM_STATE.
10699 2011-11-28 Paul Eggert <eggert@cs.ucla.edu>
10701 Remove GCPRO-related macros that exist only to avoid shadowing locals.
10702 * lisp.h (GCPRO1_VAR, GCPRO2_VAR, GCPRO3_VAR, GCPRO4_VAR, GCPRO5_VAR)
10703 (GCPRO6_VAR, UNGCPRO_VAR): Remove. See
10704 <http://lists.gnu.org/archive/html/emacs-diffs/2011-11/msg00265.html>.
10705 All uses changed to use GCPRO1 etc.
10706 (GCPRO1, GCPRO2, GCPRO3, GCPRO4, GCPRO5, GCPRO6, UNGCPRO):
10707 Revert to old implementation (i.e., before 2011-03-11).
10709 2011-11-28 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
10711 * dispnew.c (scrolling_window): Truncate overlaps in copy destination
10712 of scroll runs so as to avoid assigning disabled bogus rows and
10713 unnecessary graphics copy operations.
10715 2011-11-27 Eli Zaretskii <eliz@gnu.org>
10717 * s/ms-w32.h (utimbuf) [_MSC_VER]: Don't define.
10718 (snprintf) [_MSC_VER]: Redirect to _snprintf.
10719 (strtoll) [_MSC_VER]: Redirect to _strtoi64.
10720 (malloc, free, realloc, calloc): Redirect to e_* only when
10723 * lisp.h (GCTYPEBITS): Move before first use.
10724 (ALIGN_GCTYPEBITS) [_MSC_VER]: Define.
10725 (DECL_ALIGN) [_MSC_VER]: Use it, as MSVC doesn't like bit ops in
10726 this macro definition.
10728 * s/ms-w32.h (tzname): Redirect to _tzname for all values of
10731 2011-11-27 Jan Djärv <jan.h.d@swipnet.se>
10733 * gtkutil.c (xg_create_frame_widgets):
10734 Call gtk_window_set_has_resize_grip (FALSE) if that function is
10735 present with Gtk+ 2.0.
10737 2011-11-26 Paul Eggert <eggert@cs.ucla.edu>
10739 * fileio.c (Finsert_file_contents): Undo previous change; see
10740 <http://lists.gnu.org/archive/html/emacs-diffs/2011-11/msg00265.html>.
10742 2011-11-26 Paul Eggert <eggert@cs.ucla.edu>
10744 Rename locals to avoid shadowing.
10745 * fileio.c (Finsert_file_contents):
10746 Rename inner 'gcpro1' to 'inner_gcpro1' to avoid shadowing.
10747 * process.c (wait_reading_process_output):
10748 Rename inner 'proc' to 'p' to avoid shadowing.
10749 Indent for consistency with usual Emacs style.
10751 2011-11-25 Eli Zaretskii <eliz@gnu.org>
10753 * xdisp.c (redisplay_window): If cursor row is not fully visible
10754 after recentering, and scroll-conservatively is set to a large
10755 number, scroll window by a few more lines to make the cursor fully
10756 visible and out of scroll-margin. (Bug#10105)
10757 (start_display): Don't move to the next line if the display should
10758 start at a newline that is part of a display vector or an overlay
10759 string. (Bug#10119)
10761 2011-11-24 Juri Linkov <juri@jurta.org>
10763 * image.c (imagemagick_load_image): Move `MagickSetResolution' down
10764 after the `MagickPingImage' call. (Bug#10112)
10766 2011-11-23 Chong Yidong <cyd@gnu.org>
10768 * window.c (Fcoordinates_in_window_p): Accept only live windows.
10770 2011-11-23 Martin Rudalics <rudalics@gmx.at>
10772 * buffer.c (Fkill_buffer): Run replace_buffer_in_windows before
10773 making another buffer current. (Bug#10114)
10775 2011-11-23 Glenn Morris <rgm@gnu.org>
10777 * font.c (font_find_for_lface) [HAVE_NS]: Ignore case. (Bug#2526)
10779 2011-11-23 Chong Yidong <cyd@gnu.org>
10781 * xdisp.c (compute_stop_pos): Check validity of end_charpos before
10782 using it (Bug#5984).
10784 2011-11-22 Eli Zaretskii <eliz@gnu.org>
10786 * dispnew.c (adjust_glyph_matrix): Don't verify hash code of mode-
10787 and header-lines, as they don't have one computed for them.
10790 * .gdbinit (prow): Make displayed values more self-explaining.
10791 Add row's hash code.
10793 2011-11-21 Lars Magne Ingebrigtsen <larsi@gnus.org>
10795 * process.c (wait_reading_process_output): Fix asynchrounous
10796 GnuTLS socket handling on some versions of the GnuTLS library.
10797 (wait_reading_process_output): Add comment and URL.
10799 2011-11-21 Jan Djärv <jan.h.d@swipnet.se>
10801 * xterm.c (x_clear_frame): Reinstate the XClearWindow call.
10803 2011-11-21 Chong Yidong <cyd@gnu.org>
10805 * window.c (Fnext_window, Fprevious_window): Doc fix.
10807 2011-11-20 Stefan Monnier <monnier@iro.umontreal.ca>
10809 * window.c (get_phys_cursor_glyph): Fix Lisp_Object/int mixup.
10811 2011-11-20 Juanma Barranquero <lekktu@gmail.com>
10813 * nsfont.m (syms_of_nsfont) <ns-reg-to-script>: Fix typo.
10815 2011-11-20 Martin Rudalics <rudalics@gmx.at>
10817 * window.c (Fset_window_combination_limit): Rename argument
10819 (Vwindow_combination_limit): Remove "status" from doc-string.
10821 2011-11-20 Andreas Schwab <schwab@linux-m68k.org>
10823 * m/ibms390.h: Remove.
10824 * m/ibms390x.h: Don't include "ibms390.h".
10826 2011-11-20 Stefan Monnier <monnier@iro.umontreal.ca>
10828 * fileio.c (Finsert_file_contents): Add missing gcpro1 variable.
10829 Suggested by Dmitry Antipov <dmantipov@yandex.ru>.
10831 2011-11-20 Juanma Barranquero <lekktu@gmail.com>
10833 * casetab.c (Fset_case_table):
10834 * charset.c (Fcharset_after): Fix typos.
10836 2011-11-20 Paul Eggert <eggert@cs.ucla.edu>
10838 Standardize on VIRT_ADDR_VARIES behavior (Bug#10042).
10839 Otherwise, valgrind does not work on some platforms.
10840 Problem reported by Andreas Schwab in
10841 <http://lists.gnu.org/archive/html/emacs-devel/2011-11/msg00081.html>.
10842 * puresize.h (pure, PURE_P): Always behave as if VIRT_ADDR_VARIES
10843 is set, removing the need for VIRT_ADDRESS_VARIES.
10844 (PURE_P): Use a more-efficient implementation that needs just one
10845 comparison, not two: on x86-64 with GCC 4.6.2, this cut down the
10846 number of instructions from 6 (xorl, cmpq, jge, xorl, cmpq, setge)
10847 to 4 (xorl, subq, cmpq, setbe).
10848 * alloc.c (pure): Always extern now, since that's the
10849 VIRT_ADDR_VARIES behavior.
10850 (PURE_POINTER_P): Use a single comparison, not two, for
10851 consistency with the new puresize.h.
10852 * lisp.h (PNTR_COMPARISON_TYPE): Remove; no longer needed.
10853 * m/ibms390.h, m/intel386.h, m/template.h, s/cygwin.h, s/hpux10-20.h:
10854 Remove VIRT_ADDR_VARIES no longer needed.
10856 2011-11-19 Eli Zaretskii <eliz@gnu.org>
10858 * xdisp.c (x_write_glyphs, draw_phys_cursor_glyph)
10859 (erase_phys_cursor, update_window_cursor, show_mouse_face)
10860 (cursor_in_mouse_face_p): If the cursor position is out of bounds,
10861 behave as if the cursor position were at the window margin.
10863 * window.c (get_phys_cursor_glyph): If the window is hscrolled,
10864 and the cursor position is out of bounds, behave as if the cursor
10865 position were at the window margin. (Bug#10075)
10867 2011-11-18 Chong Yidong <cyd@gnu.org>
10869 * window.c (Fwindow_combination_limit): Make first argument
10870 non-optional, since it is meaningless for live windows like the
10873 2011-11-18 Dmitry Antipov <dmantipov@yandex.ru>
10875 * keymap.c (Fwhere_is_internal): Add missing RETURN_UNGCPROs.
10877 2011-11-18 Stefan Monnier <monnier@iro.umontreal.ca>
10879 * intervals.c: Fix grafting over the whole buffer (bug#10071).
10880 (graft_intervals_into_buffer): Simplify.
10882 2011-11-18 Eli Zaretskii <eliz@gnu.org>
10884 * dispnew.c (swap_glyph_pointers): Swap the used[] arrays and the
10885 hash values of the two rows.
10886 (copy_row_except_pointers): Preserve the used[] arrays and the
10887 hash values of the two rows. (Bug#10035)
10888 (add_row_entry): Add xassert to verify that ROW's hash code is valid.
10890 * xdisp.c (row_hash): New function, body extracted from
10891 compute_line_metrics.
10892 (compute_line_metrics): Call row_hash, instead of computing the
10895 * dispnew.c (verify_row_hash): Call row_hash for computing the
10896 hash code of a row, instead of duplicating code from xdisp.c.
10898 * dispextern.h (row_hash): Add prototype.
10900 2011-11-18 Tassilo Horn <tassilo@member.fsf.org>
10902 * frame.c (delete_frame): Don't delete the terminal when the last
10903 X frame is closed if emacs is built with GTK toolkit.
10905 2011-11-17 Juanma Barranquero <lekktu@gmail.com>
10907 * window.c (syms_of_window) <window-combination-resize>: Fix typo.
10909 2011-11-17 Martin Rudalics <rudalics@gmx.at>
10911 * window.c (Vwindow_splits): Rename to
10912 Vwindow_combination_resize. Suggested by Juri Linkov.
10913 (Fsplit_window_internal): Use Vwindow_combination_resize instead
10916 2011-11-16 Juanma Barranquero <lekktu@gmail.com>
10918 * nsfns.m (Fns_font_name):
10919 * window.c (syms_of_window) <window-combination-limit>: Fix typos.
10921 2011-11-16 Martin Rudalics <rudalics@gmx.at>
10923 * window.h (window): Rename slot "nest" to "combination_limit".
10924 * window.c (Fwindow_nest): Rename to Fwindow_combination_limit.
10925 (Fset_window_nest): Rename to Fset_window_combination_limit.
10926 (Vwindow_nest): Rename to Vwindow_combination_limit.
10927 (recombine_windows, make_parent_window, make_window)
10928 (Fsplit_window_internal, saved_window)
10929 (Fset_window_configuration, save_window_save): Rename all
10930 occurrences of window_nest to window_combination_limit.
10932 2011-11-15 Juanma Barranquero <lekktu@gmail.com>
10934 * image.c (imagemagick_load_image): Fix typo.
10936 2011-11-14 Eli Zaretskii <eliz@gnu.org>
10938 * xdisp.c (display_line): Move the call to
10939 highlight_trailing_whitespace before the call to
10940 compute_line_metrics, since the latter needs to see the final
10941 faces of all the glyphs to compute ROW's hash value.
10942 Fixes assertion violations in row_equal_p. (Bug#10035)
10944 2011-11-14 Juanma Barranquero <lekktu@gmail.com>
10946 * w32proc.c (reader_thread): Don't check pending input if cp->fd < 0,
10947 just return (bug#10044).
10949 2011-11-12 Eli Zaretskii <eliz@gnu.org>
10951 * makefile.w32-in (HEAPSIZE): New variable, allows to build temacs
10952 with user-defined heap size. Bump the default size of the temacs
10953 heap to 27MB, to avoid memory warning when running temacs.
10954 ($(TEMACS)): Use HEAPSIZE instead of a hardcoded value.
10956 * dispnew.c (scrolling_window): Fix incorrect indices in accessing
10957 current_matrix and desired_matrix. (Bug#9990)
10958 (verify_row_hash) [XASSERTS]: New function.
10959 (adjust_glyph_matrix, row_equal_p): Use it in xassert to verify
10960 that the hash value of glyph rows is correct.
10962 2011-11-12 Martin Rudalics <rudalics@gmx.at>
10964 * window.h (window): Remove splits slot.
10965 * window.c (Fwindow_splits, Fset_window_splits): Remove.
10966 (Fdelete_other_windows_internal, make_parent_window)
10967 (make_window, Fsplit_window_internal, Fdelete_window_internal)
10968 (Fset_window_configuration, save_window_save): Don't deal with
10969 split status of windows.
10970 (saved_window): Remove splits slot.
10971 (Vwindow_splits): Rewrite doc-string.
10973 2011-11-11 Jan Djärv <jan.h.d@swipnet.se>
10975 * xfns.c (unwind_create_frame):
10976 * nsfns.m (unwind_create_frame):
10977 * w32fns.c (unwind_create_frame): Use Fmemq to check if frame is in
10978 Vframe_list (Bug#9999).
10980 2011-11-11 Dmitry Antipov <dmantipov@yandex.ru>
10982 * xdisp.c (syms_of_xdisp): Remove duplicated definition of Qtext.
10984 2011-11-11 Kenichi Handa <handa@m17n.org>
10986 * callproc.c (Fcall_process): Set the member dst_multibyte of
10989 2011-11-11 Johan Bockgård <bojohan@gnu.org>
10991 * xdisp.c (fill_composite_glyph_string): Always set s->face, to
10992 avoid a crash (bug#9496).
10994 2011-11-09 Chong Yidong <cyd@gnu.org>
10996 * window.c (Fwindow_inside_edges, Fwindow_inside_pixel_edges)
10997 (Fwindow_inside_absolute_pixel_edges): Only allow live windows.
10999 2011-11-08 Paul Eggert <eggert@cs.ucla.edu>
11001 * s/gnu.h (GC_MARK_STACK): Define to GC_MAKE_GCPROS_NOOPS (Bug#9926).
11003 2011-11-08 Paul Eggert <eggert@cs.ucla.edu>
11005 Avoid some portability problems by eschewing 'extern inline' functions.
11006 The trivial performance wins aren't worth the portability hassles; see
11007 <http://lists.gnu.org/archive/html/emacs-devel/2011-11/msg00084.html>
11009 * dispextern.h (window_box, window_box_height, window_text_bottom_y)
11010 (window_box_width, window_box_left, window_box_left_offset)
11011 (window_box_right, window_box_right_offset): Undo previous change,
11012 by removing the "extern"s.
11013 * intervals.c (adjust_intervals_for_insertion)
11014 (adjust_intervals_for_deletion): Undo previous change,
11015 making these static again.
11016 (offset_intervals, temp_set_point_both, temp_set_point)
11017 (copy_intervals_to_string): No longer inline.
11018 * xdisp.c (window_text_bottom_y, window_box_width)
11019 (window_box_height, window_box_left_offset)
11020 (window_box_right_offset, window_box_left, window_box_right)
11021 (window_box): No longer inline.
11023 2011-11-08 Chong Yidong <cyd@gnu.org>
11025 * window.c (Fwindow_left_column, Fwindow_top_line): Doc fix.
11026 (Fwindow_body_height, Fwindow_body_width): Move from Lisp.
11027 Signal an error if not a live window.
11028 (Fwindow_total_width, Fwindow_total_height): Move from Lisp.
11029 (Fwindow_total_size, Fwindow_body_size): Move to Lisp.
11031 2011-11-07 Juanma Barranquero <lekktu@gmail.com>
11033 * lisp.h (syms_of_abbrev): Remove declaration.
11034 Reported by CHENG Gao <chenggao@royau.me>.
11036 2011-11-07 Eli Zaretskii <eliz@gnu.org>
11038 * w32.c (check_windows_init_file): Don't look for term/w32-win.el
11039 if Vpurify_flag is non-nil. Fixes a crash when running w32 build
11040 of temacs in GUI mode.
11042 2011-11-07 Martin Rudalics <rudalics@gmx.at>
11044 * window.h: Declare delete_all_child_windows instead of
11045 delete_all_subwindows.
11046 * window.c (Fwindow_nest, Fset_window_nest)
11047 (Fset_window_new_total, Fset_window_new_normal)
11048 (Fwindow_resize_apply): Don't use term subwindow in doc-strings.
11049 (delete_all_subwindows): Rename to delete_all_child_windows.
11050 (Fdelete_other_windows_internal, Fset_window_configuration):
11051 Call delete_all_child_windows instead of delete_all_subwindows.
11052 * frame.c (delete_frame): Call delete_all_child_windows instead
11053 of delete_all_subwindows.
11055 2011-11-07 Paul Eggert <eggert@cs.ucla.edu>
11057 * alloc.c (DEADP): New macro, for porting to GNU/Hurd (Bug#9926).
11058 This is also needed for porting to any host where GC_MARK_STACK is
11059 not GC_MAKE_GCPROS_NOOPS.
11060 (which_symbols): Use it.
11062 2011-11-07 Kenichi Handa <handa@m17n.org>
11064 * coding.c (coding_set_destination): Check coding->src_pos only
11065 when coding->src_object is a buffer (bug#9910).
11067 * process.c (send_process): Set the member src_multibyte of coding
11068 to 0 (bug#9911) when sending a unibyte text.
11070 * callproc.c (Fcall_process): Set the member src_multibyte of
11071 process_coding to 0 (bug#9912).
11073 2011-11-06 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
11075 * xmenu.c (cleanup_widget_value_tree): New function.
11076 (xmenu_show, xdialog_show): Use it in record_unwind_protect instead of
11077 calling free_menubar_widget_value_tree directly (Bug#9830).
11079 2011-11-06 Paul Eggert <eggert@cs.ucla.edu>
11081 Fix some portability problems with 'inline'.
11082 * dispextern.h (window_box, window_box_height, window_text_bottom_y)
11083 (window_box_width, window_box_left, window_box_left_offset)
11084 (window_box_right, window_box_right_offset): Declare extern.
11085 Otherwise, these inline functions do not conform to C99 and
11086 are miscompiled by Microsoft compilers. Reported by Eli Zaretskii in
11087 <http://lists.gnu.org/archive/html/emacs-devel/2011-11/msg00084.html>.
11088 * intervals.c (adjust_intervals_for_insertion)
11089 (adjust_intervals_for_deletion): Now extern, because otherwise the
11090 extern inline functions 'offset_intervals' couldn't refer to it.
11091 (static_offset_intervals): Remove.
11092 (offset_intervals): Rewrite using the old contents of
11093 static_offset_intervals. The old version didn't conform to C99
11094 because an extern inline function contained a reference to an
11095 identifier with static linkage.
11097 2011-11-06 Andreas Schwab <schwab@linux-m68k.org>
11099 * keyboard.c (interrupt_signal): Don't call kill-emacs while in
11102 2011-11-06 Eli Zaretskii <eliz@gnu.org>
11104 * xdisp.c (init_iterator, reseat_to_string): Don't set the
11105 iterator's bidi_p flag if Vpurify_flag is non-nil. (Bug#9963)
11106 (Fcurrent_bidi_paragraph_direction): If Vpurify_flag is non-nil,
11107 return Qleft_to_right.
11109 2011-11-06 Chong Yidong <cyd@gnu.org>
11111 * window.c (Fwindow_live_p, Fwindow_frame, Fframe_root_window)
11112 (Fminibuffer_window, Fwindow_buffer, Fwindow_splits)
11113 (Fset_window_splits, Fwindow_nest, Fset_window_nest)
11114 (Fwindow_use_time, Fwindow_total_size, Fwindow_normal_size)
11115 (Fwindow_new_normal, Fwindow_left_column, Fwindow_top_line)
11116 (Fwindow_margins, Fwindow_fringes, Fwindow_scroll_bars)
11117 (Fwindow_vscroll): Doc fix.
11118 (Fwindow_top_child, Fwindow_left_child): Eliminate a nil default
11119 argument, since it makes no sense to pass a live window and for
11120 consistency with window-child.
11122 2011-11-05 Christoph Scholtes <cschol2112@googlemail.com>
11124 * makefile.w32-in ($(TEMACS), (gl-stamp)): Use $(THISDIR) to
11127 2011-11-05 Jason Rumney <jasonr@gnu.org>
11129 * w32font.c (font_matches_spec): Filter out non-Japanese kana fonts.
11130 (add_font_entity_to_list): Filter out non-Japanese Shift-JIS
11132 (add_font_entity_to_list): Fix logic errors in mixed boolean and
11133 bitwise arithmetic preventing use of unicode-sip and non-truetype
11136 2011-11-05 Eli Zaretskii <eliz@gnu.org>
11138 * s/ms-w32.h (fstat, stat, utime): Move redirections to
11141 * w32fns.c (x_create_tip_frame, Fx_create_frame): Rearrange
11142 initialization code to keep similarity to xfns.c after changes
11145 2011-11-05 Jan Djärv <jan.h.d@swipnet.se>
11147 * nsfns.m: Declare image_cache_refcount if GLYPH_DEBUG.
11148 (unwind_create_frame): New function (Bug#9943).
11149 (Fx_create_frame): Restructure code to be more similar to the one in
11150 xfns.c. Call record_unwind_protect with unwind_create_frame (Bug#9943).
11151 Initialize image_cache_refcount if GLYPH_DEBUG (Bug#9943).
11152 Move terminal->reference_count++ just before making the frame official
11155 * nsterm.m (x_free_frame_resources): New function.
11156 (x_destroy_window): Move code to x_free_frame_resources.
11158 * xfns.c (unwind_create_frame): Fix comment.
11159 (Fx_create_frame, x_create_tip_frame):
11160 Move terminal->reference_count++ just before making the frame
11161 official. Move initialization of image_cache_refcount and
11162 dpyinfo_refcount before calling init_frame_faces (Bug#9943).
11164 2011-11-05 Eli Zaretskii <eliz@gnu.org>
11166 Support MSVC build with newer versions of Visual Studio.
11167 * makefile.w32-in (TAGS-gmake): Don't use $(patsubst ...), as
11168 Nmake barfs on that. Use $(OBJ*_c) variables instead, defined on
11171 * lisp.h (ENUM_BF): New macro, for enumerated types in bitfields,
11172 which are not supported by MSVC.
11173 (Lisp_Symbol, Lisp_Misc_Any, Lisp_Marker, Lisp_Misc_Overlay)
11174 (Lisp_Save_Value, Lisp_Free): Use ENUM_BF for enumerated types in
11176 (Lisp_Object) [USE_LISP_UNION_TYPE]: Use ENUM_BF for enumerated
11177 types in bitfields.
11178 (DEFUN) [_MSC_VER]: Define in a different way for MSVC.
11180 * w32fns.c [_MSC_VER]: DECLARE_HANDLE for any MSVC version.
11182 2011-11-05 Fabrice Popineau <fabrice.popineau@supelec.fr> (tiny change)
11184 Support MSVC build with newer versions of Visual Studio.
11185 * w32.c: Don't include w32api.h for MSVC.
11186 (init_environment) [_MSC_VER]: Call sys_access, not _access.
11188 * s/ms-w32.h <sigset_t, ssize_t> [_MSC_VER]: Typedefs for MSVC.
11189 [_MSC_VER]: Include sys/timeb.h, sys/stat.h, and signal.h.
11190 (fstat, stat, utime) [_MSC_VER]: Redirect to their sys_* cousins.
11191 (malloc, free, realloc, calloc) [_MSC_VER]: Always redirect to the
11193 (alloca) [_MSC_VER]: Define to _alloca.
11195 * lisp.h (DECL_ALIGN) [_MSC_VER]: Define for MSVC.
11197 * regex.c <re_char> [_MSC_VER]: A separate definition for MSVC.
11199 2011-11-04 Eli Zaretskii <eliz@gnu.org>
11201 * xdisp.c (note_mouse_highlight): If either of
11202 previous/next-single-property-change returns nil, treat that as
11203 the beginning or the end of the buffer. (Bug#9955)
11205 2011-11-04 Jan Djärv <jan.h.d@swipnet.se>
11207 * gtkutil.c (xg_make_tool_item): Add callbacks if one of wimage or
11208 label is not null (Bug#9951).
11209 (xg_tool_item_stale_p): Handle the fact that wimage and/or wlbl
11212 2011-11-04 Eli Zaretskii <eliz@gnu.org>
11214 * window.c (Fwindow_body_size): Mention in the doc string that the
11215 return value is in frame's canonical units. (Bug#9949)
11217 2011-11-03 Eli Zaretskii <eliz@gnu.org>
11219 * xdisp.c (note_mouse_highlight): Initialize `area'. (Bug#9947)
11221 * w32fns.c (unwind_create_frame): If needed, free the glyph
11222 matrices of the partially constructed frame. (Bug#9943)
11223 * xfns.c (unwind_create_frame): Likewise.
11225 2011-11-01 Eli Zaretskii <eliz@gnu.org>
11227 * xdisp.c (mouse_face_from_buffer_pos): Fix a typo in a comment.
11228 Don't stop backward scan on the continuation glyph, even though
11229 its CHARPOS is positive.
11230 (mouse_face_from_buffer_pos, note_mouse_highlight):
11231 Rename cover_string to disp_string.
11233 2011-11-01 Martin Rudalics <rudalics@gmx.at>
11235 * window.c (temp_output_buffer_show): Don't use
11236 Vtemp_buffer_show_specifiers.
11237 (Vtemp_buffer_show_specifiers): Remove unused variable.
11239 2011-10-30 Eli Zaretskii <eliz@gnu.org>
11241 * xdisp.c (try_cursor_movement): Make sure ROW isn't decremented
11242 past the beginning of the current glyph matrix.
11244 2011-10-30 Adam Sjøgren <asjo@koldfront.dk> (tiny change)
11246 * xterm.c: Include X11/Xproto.h if HAVE_GTK3.
11247 (x_error_handler): Ignore BadMatch for X_SetInputFocus for
11248 HAVE_GTK3 (Bug#9869).
11250 * gtkutil.c (xg_win_to_widget, xg_event_is_for_menubar): Initialize
11251 type to GDK_NOTHING so valgrind does not complain (Bug#9901).
11253 * xterm.h (x_display_info): Add Xatom_net_wm_state_hidden (Bug#9893).
11255 * xterm.c: Declare x_handle_net_wm_state to return int.
11256 (handle_one_xevent): Check if we are iconified but don't have
11257 _NET_WM_STATE_HIDDEN. If do, treat as deiconify (Bug#9893).
11258 (get_current_wm_state): Return non-zero if not hidden,
11259 check for _NET_WM_STATE_HIDDEN (Bug#9893).
11260 (do_ewmh_fullscreen): Ignore return value from get_current_wm_state.
11261 (x_handle_net_wm_state): Return what get_current_wm_state returns.
11262 (x_term_init): Initialize dpyinfo->Xatom_net_wm_state_hidden.
11264 2011-10-29 Paul Eggert <eggert@cs.ucla.edu>
11266 * alloc.c (which_symbols): Declare EXTERNALLY_VISIBLE,
11267 so that this new function doesn't get optimized away by a
11268 whole-program optimizer. Make the 2nd arg EMACS_INT, not int.
11270 2011-10-29 Andreas Schwab <schwab@linux-m68k.org>
11272 * frame.h (MOUSE_HL_INFO): Remove excess parens.
11274 2011-10-29 Eli Zaretskii <eliz@gnu.org>
11276 Fix the `xbytecode' command.
11277 * .gdbinit (xprintbytestr): New command.
11278 (xwhichsymbols): Rename from `which'; all callers changed.
11279 (xbytecode): Print the byte-code string as well.
11281 2011-10-29 Kim Storm <storm@cua.dk>
11283 * alloc.c (which_symbols): New function.
11285 2011-10-29 Andreas Schwab <schwab@linux-m68k.org>
11287 * minibuf.c (read_minibuf_noninteractive): Allow reading empty
11290 2011-10-29 Glenn Morris <rgm@gnu.org>
11292 * process.c (wait_reading_process_output): Revert 2009-08-30 change.
11293 Not clear what it was for, and it causes various bugs. (Bug#9839)
11295 2011-10-28 Eli Zaretskii <eliz@gnu.org>
11297 * xdisp.c (note_mouse_highlight): Initialize `part', to avoid a
11298 possible random value that matches one of those tested as
11299 condition to clear the mouse face.
11301 2011-10-28 Chong Yidong <cyd@gnu.org>
11303 * xdisp.c (note_mouse_highlight): Fix use of uninitialized var.
11305 2011-10-28 Dan Nicolaescu <dann@ics.uci.edu>
11307 * window.c (make_window): Initialize phys_cursor_on_p.
11309 2011-10-28 Stefan Monnier <monnier@iro.umontreal.ca>
11311 * lisp.h (struct Lisp_Symbol): Update comments.
11313 2011-10-28 Juanma Barranquero <lekktu@gmail.com>
11315 * w32font.c (w32_load_unicows_or_gdi32): Add missing return.
11317 2011-10-28 Eli Zaretskii <eliz@gnu.org>
11319 Fix Emacs on Windows 9X (bug#8562). Thanks to oslsachem
11320 <oslsachem@gmail.com> for helping to debug this.
11322 * w32font.c (g_b_init_is_w9x, g_b_init_get_outline_metrics_w)
11323 (g_b_init_get_text_metrics_w, g_b_init_get_glyph_outline_w)
11324 (g_b_init_get_glyph_outline_w): New static variables.
11325 (GetOutlineTextMetricsW_Proc, GetTextMetricsW_Proc)
11326 (GetGlyphOutlineW_Proc): New typedefs.
11327 (w32_load_unicows_or_gdi32, get_outline_metrics_w)
11328 (get_text_metrics_w, get_glyph_outline_w, globals_of_w32font):
11330 (w32font_open_internal, compute_metrics):
11331 Call get_outline_metrics_w, get_text_metrics_w, and get_glyph_outline_w
11332 instead of calling the "wide" APIs directly.
11334 * emacs.c (main) [HAVE_NTGUI]: Call globals_of_w32font.
11336 * w32.h (syms_of_w32font): Add prototype.
11338 2011-10-27 Juanma Barranquero <lekktu@gmail.com>
11340 * window.c (Fframe_root_window, Fframe_first_window, Fwindow_end)
11341 (Fframe_selected_window, Ftemp_output_buffer_show, Fnext_window)
11342 (Fdelete_window_internal, Fwindow_parameters): Fix typos in docstrings.
11343 (Fmove_to_window_line): Doc fix.
11345 2011-10-27 Chong Yidong <cyd@gnu.org>
11347 * process.c (make_process): Set gnutls_state to NULL.
11349 * gnutls.c (emacs_gnutls_deinit): Deinit the gnutls_state if it is
11350 non-NULL, regardless of GNUTLS_INITSTAGE.
11351 (Fgnutls_boot): Cleanups. Call emacs_gnutls_deinit if we signal
11352 an error. Set process slots as soon as we allocate them.
11354 * gnutls.h (GNUTLS_LOG, GNUTLS_LOG2): Fix macros.
11356 2011-10-27 Chong Yidong <cyd@gnu.org>
11358 * gnutls.c (emacs_gnutls_deinit): New function.
11359 Deallocate credentials structures as well as calling gnutls_deinit.
11360 (Fgnutls_deinit, Fgnutls_boot): Use it.
11362 * process.c (make_process): Initialize GnuTLS credentials to NULL.
11363 (deactivate_process): Call emacs_gnutls_deinit.
11365 2011-10-27 Juanma Barranquero <lekktu@gmail.com>
11367 * image.c (x_create_x_image_and_pixmap):
11368 * w32.c (sys_rename, w32_delayed_load):
11369 * w32font.c (fill_in_logfont):
11370 * w32reg.c (x_get_string_resource): Silence compiler warnings.
11372 2011-10-26 Juanma Barranquero <lekktu@gmail.com>
11374 * w32fns.c (w32_default_color_map): New function,
11375 extracted from Fw32_default_color_map.
11376 (Fw32_default_color_map, Fx_open_connection): Use it. (Bug#9785)
11378 2011-10-25 Paul Eggert <eggert@cs.ucla.edu>
11380 * dispextern.h (Fcontrolling_tty_p): New decl (Bug#6649 part 2).
11382 2011-10-25 Stefan Monnier <monnier@iro.umontreal.ca>
11384 * keyboard.c (test_undefined): New function (bug#9751).
11385 (read_key_sequence): Use it to detect when a key is bound to `undefined'.
11387 2011-10-25 Enami Tsugutomo <tsugutomo.enami@jp.sony.com>
11389 * sysdep.c (init_sys_modes): Fix the check for the controlling
11390 terminal (Bug#6649).
11392 2011-10-20 Eli Zaretskii <eliz@gnu.org>
11394 * dispextern.h (struct bidi_it): New member next_en_type.
11396 * bidi.c (bidi_line_init): Initialize the next_en_type member.
11397 (bidi_resolve_explicit_1): When next_en_pos is valid for the
11398 current character, check also for next_en_type being WEAK_EN.
11399 (bidi_resolve_weak): Don't enter the expensive loop if the current
11400 position is before next_en_pos. Record the bidi type of the first
11401 non-ET, non-BN character we find, in addition to its position.
11402 (bidi_level_of_next_char): Invalidate next_en_type when
11403 next_en_pos is over-stepped.
11405 2011-10-20 Paul Eggert <eggert@cs.ucla.edu>
11407 Time zone name fixes for non-ASCII locales (Bug#641, Bug#9794)
11408 * editfns.c: Rewrite current-time-zone so that it invokes
11409 the equivalent of (format-time-string "%Z") to get the time zone name.
11410 This fixes a bug when the time zone name contains characters that
11411 need converting from the system time locale to Emacs internal format.
11412 This fixes a shortcoming that I introduced in my 1999-10-19 patch:
11413 that patch fixed format-time-string to do the conversion, but
11414 I forgot to fix current-time-zone.
11415 (format_time_string): New function, containing most of
11416 what Fformat_time_string used to contain.
11417 (Fformat_time_string): Rewrite in terms of format_time_string.
11418 This doesn't change this function's behavior.
11419 (current-time-zone): Rewrite to use format_time_string.
11420 This fixes the bug reported by Michael Schierl in
11421 <http://lists.gnu.org/archive/html/emacs-devel/2007-06/msg00334.html>.
11422 Jason Rumney's 2007-06-07 change worked around this bug, but
11424 * systime.h (tzname, timezone): Remove no-longer-used declarations.
11426 2011-10-19 Eli Zaretskii <eliz@gnu.org>
11428 * xdisp.c (start_display): If the character at POS is displayed
11429 via a display vector, reset IT->current.dpvec_index to zero.
11430 (try_window_reusing_current_matrix): If a line ends in a display
11431 vector or the next line starts in a display vector, continue
11432 redrawing the window even though the character position of
11433 start_row was reached.
11436 2011-10-18 Chong Yidong <cyd@gnu.org>
11438 * xdisp.c (get_next_display_element): Handle U+2010 and U+2011
11439 with nobreak-char-display too.
11441 2011-10-18 Eli Zaretskii <eliz@gnu.org>
11443 Fix part 3 of bug#9771.
11444 * bidi.c (bidi_line_init): Initialize next_en_pos to zero, not -1.
11445 (bidi_resolve_neutral): Don't enter the expensive loop looking for
11446 non-neutral characters if the current character is a paragraph
11447 separator (a.k.a. Newline). This avoids running the same
11448 expensive loop twice, once when we consume the preceding newline
11449 and the other time when the line actually needs to be displayed.
11450 Avoid the loop when we see neutrals on the base embedding level
11451 following a character whose directionality is the same as the
11452 paragraph's. This avoids running the expensive loop when a line
11453 ends in a long sequence of neutrals, like control characters.
11454 Add assertion against STRONG_AL type. Slightly rearrange code
11455 that determines the type of a neutral given the first non-neutral
11457 (bidi_level_of_next_char): Set next_en_pos to zero when
11458 invalidating its info.
11460 2011-10-17 Eli Zaretskii <eliz@gnu.org>
11462 * xdisp.c (push_display_prop): Determine whether to record string
11463 or buffer position by IT->string, not by IT->method. Allow
11464 GET_FROM_DISPLAY_VECTOR as IT->method on entry. (Bug#9771, part 4)
11465 (move_it_vertically_backward): Don't look for character position
11466 immediately after the newline when in a continuation line.
11469 2011-10-15 Martin Rudalics <rudalics@gmx.at>
11471 * window.c (coordinates_in_window): Rewrite and delabelize
11472 vertical border check. (Bug#5357) (Bug#9618)
11474 2011-10-14 Stefan Monnier <monnier@iro.umontreal.ca>
11476 * xterm.c (frame_highlight, frame_unhighlight): Ignore unexplained
11477 errors in XSetWindowBorder (bug#9310).
11479 2011-10-13 Dmitry Antipov <dmantipov@yandex.ru>
11481 * editfns.c (Fset_time_zone_rule): Replace free with xfree to
11482 avoid crash when xmalloc overrun checking is enabled.
11484 2011-10-13 Eli Zaretskii <eliz@gnu.org>
11486 * xdisp.c (Fcurrent_bidi_paragraph_direction): Initialize
11487 itb.paragraph_dir to NEUTRAL_DIR. Fixes an occasional incorrect
11488 cursor motion with <left> and <right> arrow keys.
11490 * bidi.c (bidi_init_it): Don't initialize paragraph_dir here, as
11491 some callers set that themselves.
11493 2011-10-12 Eli Zaretskii <eliz@gnu.org>
11495 * xdisp.c (find_row_edges): Handle the case where ROW comes from a
11496 display string and the previous row comes from the same string and
11497 is empty. (Bug#9739) (Bug#9738)
11499 2011-10-12 Stefan Monnier <monnier@iro.umontreal.ca>
11501 * doc.c (get_doc_string): Encode file name (bug#9735).
11503 2011-10-12 Eli Zaretskii <eliz@gnu.org>
11505 * bidi.c (bidi_level_of_next_char):
11506 * xdisp.c (get_visually_first_element): Remove old incorrect
11507 comments regarding the Unicode Line Separator character.
11509 * bidi.c (bidi_init_it): Initialize paragraph_dir to NEUTRAL_DIR.
11511 2011-10-12 Dmitry Antipov <dmantipov@yandex.ru>
11513 * alloc.c (Fgc_status): Do not access beyond zombies array
11514 boundary if nzombies > MAX_ZOMBIES.
11515 * alloc.c (dump_zombies): Add missing format specifier.
11517 2011-10-12 Paul Eggert <eggert@cs.ucla.edu>
11519 * xdisp.c (set_cursor_from_row): Simplify conditionals,
11520 to pacify GCC 4.6.1 x86-64 with -O2 -Wstrict-overflow.
11522 * lread.c (read_escape): Allow hex escapes as large as ?\xfffffff.
11523 Some packages use them to denote characters with modifiers.
11525 2011-10-11 Andreas Schwab <schwab@linux-m68k.org>
11527 * lisp.h (GCPRO1_VAR, GCPRO2_VAR, GCPRO3_VAR, GCPRO4_VAR)
11528 (GCPRO5_VAR, GCPRO6_VAR, UNGCPRO_VAR): Add whitespace to avoid
11529 matching a pp-number. Rename parameter var to var1.
11531 2011-10-11 Stefan Monnier <monnier@iro.umontreal.ca>
11533 * minibuf.c (Finternal_complete_buffer): Fix last change (bug#9709).
11535 2011-10-08 Glenn Morris <rgm@gnu.org>
11537 * callint.c (Fcall_interactively): Give a more explicit error for the
11538 'c' case with a non-character input. (Bug#8479)
11540 2011-10-08 Eli Zaretskii <eliz@gnu.org>
11542 * xdisp.c (hscroll_window_tree): Support hscroll in right-to-left
11544 (set_cursor_from_row): Fix cursor positioning in mixed L2R+R2L
11545 lines that are hscrolled on the left.
11547 * dispnew.c (buffer_posn_from_coords): Account for a possible
11548 presence of header-line. (Bug#4426)
11550 2011-10-07 Stefan Monnier <monnier@iro.umontreal.ca>
11552 * buffer.c (syms_of_buffer) <enable-multibyte-characters>:
11553 Don't advertise functionality which we discourage or doesn't work.
11555 2011-10-07 Paul Eggert <eggert@cs.ucla.edu>
11557 * alloc.c (GC_LISP_OBJECT_ALIGNMENT): Use offsetof, not __alignof__
11558 or sizeof. __alignof__ gives the wrong answer on Fedora x86-64
11559 with GCC 4.6.1 when configured with CC='gcc -m32' --with-wide-int;
11560 this makes Emacs dump core during garbage collection on rare
11561 occasions. sizeof is obviously inferior to offsetof here, so
11562 stick with offsetof.
11563 (GC_POINTER_ALIGNMENT): New macro.
11564 (mark_memory): Omit 3rd (offset) arg; caller changed.
11565 Don't assume EMACS_INT alignment is the same as pointer alignment.
11567 2011-10-03 Stefan Monnier <monnier@iro.umontreal.ca>
11569 * keyboard.c (read_key_sequence_remapped): New var.
11570 (read_key_sequence): Compute remapping in the right buffer.
11571 (command_loop_1): Use read_key_sequence's remapping directly.
11573 2011-10-02 Stefan Monnier <monnier@iro.umontreal.ca>
11575 * dired.c (file_name_completion): Don't expand file name.
11576 (Ffile_name_completion, Ffile_name_all_completions): Expand file name
11577 before checking file name handler.
11579 * minibuf.c (Finternal_complete_buffer): Only show internal buffers if
11580 they've been requested explicitly (bug#9591).
11582 2011-10-01 Andreas Schwab <schwab@linux-m68k.org>
11584 * keymap.c (Fsingle_key_description): Use make_specified_string
11585 instead of build_string to build string from push_key_description.
11588 2011-09-30 Paul Eggert <eggert@cs.ucla.edu>
11590 * buffer.h (struct buffer): Use time_t, not int, for a time stamp.
11591 This fixes a Y2038 bug on 64-bit hosts.
11592 * buffer.c (reset_buffer):
11593 * fileio.c (Fdo_auto_save, Fset_buffer_auto_saved)
11594 (Fclear_buffer_auto_save_failure):
11595 Use 0, not -1, to represent an unset failure time, since time_t
11596 might not be signed.
11598 Remove dependency on glibc malloc internals.
11599 * alloc.c (XMALLOC_OVERRUN_CHECK_OVERHEAD, XMALLOC_OVERRUN_CHECK_SIZE):
11600 Move back here from lisp.h, but with their new implementations.
11601 (XMALLOC_BASE_ALIGNMENT, COMMON_MULTIPLE, XMALLOC_HEADER_ALIGNMENT)
11602 (XMALLOC_OVERRUN_SIZE_SIZE): Move these new lisp.h macros here.
11603 * charset.c (charset_table_init): New static var.
11604 (syms_of_charset): Use it instead of xmalloc. This removes a
11605 dependency on glibc malloc internals. See Eli Zaretskii's comment in
11606 <http://lists.gnu.org/archive/html/emacs-devel/2011-09/msg00815.html>.
11607 * lisp.h (XMALLOC_OVERRUN_CHECK_OVERHEAD, XMALLOC_OVERRUN_CHECK_SIZE):
11608 Move back to alloc.c.
11609 (XMALLOC_BASE_ALIGNMENT, COMMON_MULTIPLE, XMALLOC_HEADER_ALIGNMENT)
11610 (XMALLOC_OVERRUN_SIZE_SIZE): Move to alloc.c.
11612 2011-09-30 Jan Djärv <jan.h.d@swipnet.se>
11614 * nsterm.m (windowDidResize): Call x_set_window_size only when
11615 ns_in_resize is true. Otherwise set pixelwidth/height and
11616 call change_frame_size (Bug#9628).
11618 2011-09-30 Paul Eggert <eggert@cs.ucla.edu>
11620 Port --enable-checking=all to Fedora 14 x86-64.
11621 * charset.c (syms_of_charset): Also account for glibc malloc's
11622 internal overhead when calculating the initial malloc maximum.
11624 Port --enable-checking=all to Fedora 14 x86.
11625 * alloc.c (XMALLOC_OVERRUN_CHECK_OVERHEAD, XMALLOC_OVERRUN_CHECK_SIZE):
11627 (xmalloc_put_size, xmalloc_get_size, overrun_check_malloc)
11628 (overrun_check_realloc, overrun_check_free):
11629 Use XMALLOC_OVERRUN_SIZE_SIZE, not sizeof (size_t).
11630 That way, xmalloc returns a properly-aligned pointer even if
11631 XMALLOC_OVERRUN_CHECK is defined. The old debugging code happened
11632 to align OK on typical 64-bit hosts, but not on Fedora 14 x86.
11633 * charset.c (syms_of_charset): Take XMALLOC_OVERRUN_CHECK_OVERHEAD
11634 into account when calculating the initial malloc maximum.
11635 * lisp.h (XMALLOC_OVERRUN_CHECK_OVERHEAD, XMALLOC_OVERRUN_CHECK_SIZE):
11636 Move here from alloc.c, so that charset.c can use it too.
11637 Properly align; the old code wasn't right for common 32-bit hosts
11638 when configured with --enable-checking=all.
11639 (XMALLOC_BASE_ALIGNMENT, COMMON_MULTIPLE, XMALLOC_HEADER_ALIGNMENT)
11640 (XMALLOC_OVERRUN_SIZE_SIZE): New macros.
11642 2011-09-29 Eli Zaretskii <eliz@gnu.org>
11644 * sysdep.c (snprintf) [!EOVERFLOW]: If EOVERFLOW is not defined,
11647 2011-09-28 Eli Zaretskii <eliz@gnu.org>
11649 * xdisp.c (compute_display_string_end): If there's no display
11650 string at CHARPOS, return -1.
11652 * bidi.c (bidi_fetch_char): When compute_display_string_end
11653 returns a negative value, treat the character as a normal
11654 character not covered by a display string. (Bug#9624)
11656 2011-09-28 Juanma Barranquero <lekktu@gmail.com>
11658 * lread.c (Fread_from_string): Fix typo in docstring.
11660 2011-09-27 Eli Zaretskii <eliz@gnu.org>
11662 * xdisp.c (handle_invisible_prop): If invisible text ends on a
11663 newline, reseat the iterator instead of bidi-iterating there one
11664 character at a time. (Bug#9610)
11665 (BUFFER_POS_REACHED_P, move_it_in_display_line_to): Bail when past
11666 TO_CHARPOS if the bidi iterator is at base embedding level.
11668 2011-09-27 Andreas Schwab <schwab@linux-m68k.org>
11670 * lread.c (readevalloop): Use correct code for NBSP.
11671 (read1): Likewise. (Bug#9608)
11673 2011-09-25 Michael Albinus <michael.albinus@gmx.de>
11675 * dbusbind.c (Fdbus_register_signal): When service is not
11676 registered, use nil in Vdbus_registered_objects_table. (Bug#9581)
11678 2011-09-25 Glenn Morris <rgm@gnu.org>
11680 * buffer.c (truncate-lines): Doc fix.
11682 2011-09-24 Chong Yidong <cyd@stupidchicken.com>
11684 * window.c (Fwindow_prev_buffers, Fset_window_prev_buffers)
11685 (Fset_window_next_buffers): Doc fix.
11687 2011-09-24 Glenn Morris <rgm@gnu.org>
11689 * minibuf.c (read_minibuf): Disable line truncation. (Bug#5715)
11691 2011-09-24 Paul Eggert <eggert@cs.ucla.edu>
11693 Fix minor problems found by static checking.
11694 * xdisp.c (string_from_display_spec): Don't assume vecsize fits in int.
11695 * indent.c (Fvertical_motion): Fix == vs = typo.
11697 2011-09-24 Eli Zaretskii <eliz@gnu.org>
11699 * dispnew.c (syms_of_display) <redisplay-dont-pause>:
11700 Default value is now t. Doc fix.
11702 * indent.c (Fvertical_motion): Compute and apply the overshoot
11703 logic when moving up, not only when moving down. Fix the
11704 confusing name and values of the it_overshoot_expected variable;
11705 logic changes accordingly. (Bug#9254) (Bug#9549)
11707 * xdisp.c (pos_visible_p): Produce correct pixel coordinates when
11708 CHARPOS is covered by a display string which includes newlines.
11709 (move_it_vertically_backward): Avoid inflooping when START_CHARPOS
11710 is covered by a display string with embedded newlines.
11712 2011-09-24 Michael Albinus <michael.albinus@gmx.de>
11714 * dbusbind.c (Fdbus_register_signal): Add match rule to
11715 Vdbus_registered_objects_table. (Bug#9581)
11716 (Fdbus_register_method, Vdbus_registered_objects_table):
11719 2011-09-24 Jim Meyering <meyering@redhat.com>
11721 do not ignore write error for any output size
11722 The previous change was incomplete.
11723 While it makes emacs --batch detect the vast majority of stdout
11724 write failures, errors were still ignored whenever the output size is
11725 k * (BUFSIZ+1) - 4. E.g., on a system with BUFSIZ of 4096,
11726 $ emacs --batch --eval '(print (format "%4093d" 0))' > /dev/full \
11727 && echo FAIL: ignored write error
11728 FAIL: ignored write error
11729 $ emacs --batch --eval '(print (format "%20481d" 0))' > /dev/full \
11730 && echo FAIL: ignored write error
11731 FAIL: ignored write error
11732 * emacs.c (Fkill_emacs): Also test ferror. (Bug#9574)
11734 2011-09-23 Andreas Schwab <schwab@linux-m68k.org>
11736 * emacs.c (Fkill_emacs): In noninteractive mode exit
11737 non-successfully if a write error occurred on stdout. (Bug#9574)
11739 2011-09-21 Eli Zaretskii <eliz@gnu.org>
11741 * xdisp.c (pop_it): Allow it->object that is a cons cell to pass
11744 * dispextern.h (struct it): Update the comment documenting what
11747 2011-09-20 Eli Zaretskii <eliz@gnu.org>
11749 * xdisp.c (set_cursor_from_row): If the row ends in a newline from
11750 a display string, extend search for cursor position to end of row.
11751 (find_row_edges): If the row ends in a newline from a display
11752 string, increment its MATRIX_ROW_END_CHARPOS by one. (Bug#9549)
11753 Handle the case of a display string with multiple newlines.
11754 (Fcurrent_bidi_paragraph_direction): Fix search for previous
11755 non-empty line. Fixes confusing cursor motion with arrow keys at
11756 the beginning of a line that starts with whitespace.
11758 2011-09-19 Lars Magne Ingebrigtsen <larsi@gnus.org>
11760 * lread.c (Fread_from_string): Document what FINAL-STRING-INDEX is
11763 2011-09-18 Chong Yidong <cyd@stupidchicken.com>
11765 * xfns.c (Fx_create_frame): Handle the bitmapIcon resource as
11766 boolean (Bug#9154).
11768 2011-09-18 Eli Zaretskii <eliz@gnu.org>
11770 * xdisp.c (display_line): Record maximum and minimum buffer
11771 positions even if no glyphs were produced (e.g., by a zero-width
11772 stretch). Fixes bug#9530 on a TTY. Under word-wrap, don't record
11773 buffer positions that will be removed from the glyph row because
11775 (produce_stretch_glyph): Fix a bug in :align-to on a TTY when the
11776 column is beyond frame width: don't subtract 1 "pixel" when
11777 computing width of the stretch.
11778 (reseat_at_next_visible_line_start): Undo the change made on
11779 2011-09-17 that saved paragraph information and restored it after
11780 the call to `reseat'. (Bug#9545)
11782 2011-09-18 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
11784 * xdisp.c (expose_window): Save original value of phys_cursor_on_p
11785 and turn window cursor on if cleared (Bug#9415).
11787 2011-09-18 Andreas Schwab <schwab@linux-m68k.org>
11789 * search.c (boyer_moore): Take unibyte characters from pattern
11790 literally. (Bug#9458)
11792 2011-09-18 Eli Zaretskii <eliz@gnu.org>
11794 * xdisp.c (reseat_at_next_visible_line_start): Fix last change.
11796 2011-09-18 Paul Eggert <eggert@cs.ucla.edu>
11798 Fix minor problem found by static checking.
11799 * xdisp.c (reseat_at_next_visible_line_start): Mark locals as
11800 initialized, to pacify gcc -Wuninitialized.
11802 * fileio.c: Report proper errno when syscall falls.
11803 (Finsert_file_contents): Save and restore errno,
11804 so that report_file_error outputs the correct diagnostic.
11805 (Fwrite_region) [CLASH_DETECTION]: Likewise.
11807 2011-09-18 Eli Zaretskii <eliz@gnu.org>
11809 * .gdbinit (pgx): Fix references to fields of `struct glyph'.
11811 2011-09-17 Eli Zaretskii <eliz@gnu.org>
11813 * xdisp.c (produce_stretch_glyph): Another fix for changes made on
11814 2011-08-30T17:32:44Z!eliz@gnu.org. (Bug#9530)
11816 2011-09-17 Eli Zaretskii <eliz@gnu.org>
11818 * xdisp.c (reseat_at_next_visible_line_start): Keep information
11819 about the current paragraph and restore it after the call to reseat.
11821 * bidi.c (MAX_PARAGRAPH_SEARCH): New macro.
11822 (bidi_find_paragraph_start): Search back for paragraph beginning
11823 at most MAX_PARAGRAPH_SEARCH lines; if not found, return BEGV_BYTE.
11824 (bidi_move_to_visually_next): Only trigger paragraph-related
11825 computations when the last character is a newline or at EOB, not
11826 just any NEUTRAL_B. (Bug#9470)
11828 * xdisp.c (set_cursor_from_row): Don't invoke special treatment of
11829 truncated lines if point is covered by a display string. (Bug#9524)
11831 2011-09-16 Paul Eggert <eggert@cs.ucla.edu>
11833 * xselect.c: Relax test for outgoing X longs (Bug#9498).
11834 (cons_to_x_long): New function.
11835 (lisp_data_to_selection_data): Use it. Correct the test for
11836 short-versus-long data; it was negated. Break out of vector
11837 loop, for efficiency, when a long datum is discovered.
11839 2011-09-16 Stefan Monnier <monnier@iro.umontreal.ca>
11841 * eval.c (Fquote): Document its non-consing behavior (bug#9482).
11843 2011-09-16 Eli Zaretskii <eliz@gnu.org>
11845 * image.c (tiff_handler): Work around a bug in MinGW GCC 3.x (see
11846 GCC PR/17406) by declaring this function with external scope.
11848 2011-09-15 Paul Eggert <eggert@cs.ucla.edu>
11850 * editfns.c (Fformat): Fix bug in text-property fix (Bug#9514).
11851 Don't mishandle (length (format "%%")) and (format "%4000s%%" "").
11853 2011-09-15 Andreas Schwab <schwab@linux-m68k.org>
11855 * editfns.c (Fformat): Correctly handle text properties on "%%".
11857 2011-09-15 Eli Zaretskii <eliz@gnu.org>
11859 * xterm.c (x_draw_composite_glyph_string_foreground):
11860 * w32term.c (x_draw_composite_glyph_string_foreground):
11861 * term.c (encode_terminal_code):
11862 * composite.c (composition_update_it, get_composition_id):
11863 * xdisp.c (get_next_display_element)
11864 (fill_composite_glyph_string): Add comments about special meaning
11865 of TAB characters in a composition.
11867 2011-09-15 Paul Eggert <eggert@cs.ucla.edu>
11869 * editfns.c (Fformat): Fix off-by-1 bug for "%%b" (Bug#9514).
11870 This occurs when processing a multibyte format.
11871 Problem reported by Wolfgang Jenker.
11873 2011-09-15 Johan Bockgård <bojohan@gnu.org>
11875 * xdisp.c (try_cursor_movement): Only check for exact match if
11876 cursor hpos found by set_cursor_from_row is valid. (Bug#9495)
11878 2011-09-14 Paul Eggert <eggert@cs.ucla.edu>
11880 Remove unused external symbols.
11881 * dispextern.h (calc_pixel_width_or_height): Remove decl.
11882 * xdisp.c (calc_pixel_width_or_height): Now static.
11883 * doprnt.c (exprintf) [! (HAVE_X_WINDOWS && USE_X_TOOLKIT)]: Remove.
11884 * indent.c (check_display_width):
11885 * w32term.c: Fix comment to match code.
11886 * xterm.c, xterm.h (x_catching_errors): Remove.
11888 2011-09-14 Paul Eggert <eggert@cs.ucla.edu>
11890 * xselect.c: Use signed conversions more consistently (Bug#9498).
11891 (selection_data_to_lisp_data): Assume incoming selection data are
11892 signed integers, not unsigned. This is to be consistent with
11893 outgoing selection data, which was modified to use signed integers
11894 in as part of the fix to Bug#9196 in response to Jan D.'s comment
11895 in <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9196#32> that X11
11896 expects long, not unsigned long.
11898 2011-09-14 Eli Zaretskii <eliz@gnu.org>
11900 * xdisp.c (try_window_reusing_current_matrix): Fix incorrect
11901 computation of loop end. Reported by Johan Bockgård
11904 2011-09-13 Chong Yidong <cyd@stupidchicken.com>
11906 * frame.c (Fother_visible_frames_p): Function deleted.
11908 2011-09-12 Eli Zaretskii <eliz@gnu.org>
11910 * indent.c (compute_motion): Process display vector front to back
11911 rather than the other way around. (Bug#2496)
11913 2011-09-12 Stefan Monnier <monnier@iro.umontreal.ca>
11915 * fileio.c (Finsert_file_contents): Don't assume beg_offset is 0.
11917 2011-09-11 Chong Yidong <cyd@stupidchicken.com>
11919 * minibuf.c (Fread_from_minibuffer): Doc fix.
11921 2011-09-11 Eli Zaretskii <eliz@gnu.org>
11923 * xdisp.c (produce_stretch_glyph): Fix a typo made in changes from
11924 2011-08-30T17:32:44Z!eliz@gnu.org. (Bug#9475)
11926 2011-09-11 Lars Magne Ingebrigtsen <larsi@gnus.org>
11928 * fileio.c (Fvisited_file_modtime): Document `(-1 65535)' as a
11929 value for non-existent files.
11931 2011-09-11 Eli Zaretskii <eliz@gnu.org>
11933 * fileio.c (Finsert_file_contents): If the file cannot be opened,
11934 set its "size" to -1. This will set the modtime_size field of
11935 the corresponding buffer to -1, which is what
11936 verify-visited-file-modtime expects for files that do not exist.
11939 2011-09-11 Paul Eggert <eggert@cs.ucla.edu>
11941 * keymap.h (KEY_DESCRIPTION_SIZE, push_key_description): Move decls
11943 * lisp.h: ... from here. push_key_description is no longer
11944 defined in keyboard.c, so its declaration should not be in
11945 lisp.h's "Defined in keyboard.c" section, and KEY_DESCRIPTION_SIZE
11946 logically belongs with push_key_description.
11948 2011-09-10 Paul Eggert <eggert@cs.ucla.edu>
11950 * buffer.h: Include <sys/types.h> instead of <time.h>.
11951 Otherwise, off_t wasn't defined on FreeBSD 9.0-BETA2 i386.
11952 Problem reported by Herbert J. Skuhra.
11954 2011-09-10 Lars Magne Ingebrigtsen <larsi@gnus.org>
11956 * xml.c (parse_region): Make the parsing work for
11957 non-comment-starting XML files again (bug#9144).
11959 2011-09-10 Andreas Schwab <schwab@linux-m68k.org>
11961 * image.c (gif_load): Fix calculation of bottom and right corner.
11964 2011-09-10 Eli Zaretskii <eliz@gnu.org>
11966 * xdisp.c (MAX_DISP_SCAN): Decrease to 250. Prevents sluggish
11967 redisplay in small windows.
11969 2011-09-09 Eli Zaretskii <eliz@gnu.org>
11971 * frame.c (x_report_frame_params): Cast to avoid compiler warnings.
11973 2011-09-08 Martin Rudalics <rudalics@gmx.at>
11975 * window.c (Fset_window_prev_buffers, Fset_window_next_buffers):
11976 Operate on live windows only.
11978 2011-09-08 Juanma Barranquero <lekktu@gmail.com>
11980 * emacs.c (my_heap_start): #ifdef to avoid warnings when unused.
11982 2011-09-07 Eli Zaretskii <eliz@gnu.org>
11984 * xdisp.c (move_it_in_display_line_to): Call RESTORE_IT on ppos_it
11985 only under bidi iteration.
11987 2011-09-07 Jan Djärv <jan.h.d@swipnet.se>
11989 * gtkutil.c (xg_make_tool_item): Insert comment about eventbox.
11991 2011-09-06 Paul Eggert <eggert@cs.ucla.edu>
11993 isnan: Fix porting problem to Solaris 10 with bundled gcc.
11994 Without this fix, the command to link temacs failed due to an
11995 undefined symbol __builtin_isnan. This is because
11996 /usr/include/iso/math_c99.h #defines isnan(x) to
11997 __builtin_isnan(x), but the bundled gcc, which identifies itself
11998 as gcc 3.4.3 (csl-sol210-3_4-branch+sol_rpath), does not have
12000 * floatfns.c (isnan): #undef, and then #define to a clone of
12002 (Fisnan): Always define, since it's always available now.
12003 (syms_of_floatfns): Always define isnan at the Lisp level.
12005 2011-09-06 Paul Eggert <eggert@cs.ucla.edu>
12007 * Makefile.in (gl-stamp): move-if-change now in build-aux (Bug#9169).
12009 2011-09-06 Paul Eggert <eggert@cs.ucla.edu>
12011 * fileio.c: Fix bugs with large file offsets (Bug#9428).
12012 The previous code assumed that file offsets (off_t values) fit in
12013 EMACS_INT variables, which is not true on typical 32-bit hosts.
12014 The code messed up by falsely reporting buffer overflow in cases
12015 such as (insert-file-contents "big" nil 1 2) into an empty buffer
12016 when "big" contains more than 2**29 bytes, even though this
12017 inserts just one byte and does not overflow the buffer.
12018 (Finsert_file_contents): Store file offsets as off_t
12019 values, not as EMACS_INT values. Check for overflow when
12020 converting between EMACS_INT and off_t. When checking for
12021 buffer overflow or for overlap, take the offsets into account.
12022 Don't use EMACS_INT for small values where int suffices.
12023 When checking for overlap, fix a typo: ZV was used where
12024 ZV_BYTE was intended.
12025 (Fwrite_region): Don't assume off_t fits into 'long'.
12026 * buffer.h (struct buffer.modtime_size): Now off_t, not EMACS_INT.
12028 2011-09-05 Michael Albinus <michael.albinus@gmx.de>
12030 * dbusbind.c (xd_signature_cat): Rename from signature_cat.
12032 2011-09-04 Paul Eggert <eggert@cs.ucla.edu>
12034 sprintf-related integer and memory overflow issues (Bug#9412).
12036 * doprnt.c (doprnt): Support printing ptrdiff_t and intmax_t values.
12037 (esprintf, exprintf, evxprintf): New functions.
12038 * keyboard.c (command_loop_level): Now EMACS_INT, not int.
12039 (cmd_error): Kbd macro iterations count is now EMACS_INT, not int.
12040 (modify_event_symbol): Do not assume that the length of
12041 name_alist_or_stem is safe to alloca and fits in int.
12042 (Fexecute_extended_command): Likewise for function name and binding.
12043 (Frecursion_depth): Wrap around reliably on integer overflow.
12044 * keymap.c (push_key_description): First arg is now EMACS_INT, not int,
12045 since some callers pass EMACS_INT values.
12046 (Fsingle_key_description): Don't crash if symbol name contains more
12047 than MAX_ALLOCA bytes.
12048 * minibuf.c (minibuf_level): Now EMACS_INT, not int.
12049 (get_minibuffer): Arg is now EMACS_INT, not int.
12050 * lisp.h (get_minibuffer, push_key_description): Reflect API changes.
12051 (esprintf, exprintf, evxprintf): New decls.
12052 * window.h (command_loop_level, minibuf_level): Reflect API changes.
12054 * dbusbind.c (signature_cat): New function.
12055 (xd_signature, Fdbus_register_signal):
12056 Do not overrun buffer; instead, report string overflow.
12058 * dispnew.c (add_window_display_history): Don't overrun buffer.
12059 Truncate instead; this is OK since it's just a log.
12061 * editfns.c (Fcurrent_time_zone): Don't overrun buffer
12062 even if the time zone offset is outlandishly large.
12063 Don't mishandle offset == INT_MIN.
12065 * emacs.c (main) [NS_IMPL_COCOA]: Don't overrun buffer
12066 when creating daemon; the previous buffer-overflow check was incorrect.
12068 * eval.c (verror): Simplify by rewriting in terms of evxprintf,
12069 which has the guts of the old verror function.
12071 * filelock.c (lock_file_1, lock_file): Don't blindly alloca long name;
12072 use SAFE_ALLOCA instead. Use esprintf to avoid int-overflow issues.
12074 * font.c: Include <float.h>, for DBL_MAX_10_EXP.
12075 (font_unparse_xlfd): Don't blindly alloca long strings.
12076 Don't assume XINT result fits in int, or that XFLOAT_DATA * 10
12077 fits in int, when using sprintf. Use single snprintf to count
12078 length of string rather than counting it via multiple sprintfs;
12079 that's simpler and more reliable.
12080 (font_unparse_fcname): Use it to avoid sprintf buffer overrun.
12081 (generate_otf_features) [0 && HAVE_LIBOTF]: Use esprintf, not
12082 sprintf, in case result does not fit in int.
12084 * fontset.c (num_auto_fontsets): Now printmax_t, not int.
12085 (fontset_from_font): Print it.
12087 * frame.c (tty_frame_count): Now printmax_t, not int.
12088 (make_terminal_frame, set_term_frame_name): Print it.
12089 (x_report_frame_params): In X, window IDs are unsigned long,
12090 not signed long, so print them as unsigned.
12091 (validate_x_resource_name): Check for implausibly long names,
12092 and don't assume name length fits in 'int'.
12093 (x_get_resource_string): Don't blindly alloca invocation name;
12094 use SAFE_ALLOCA. Use esprintf, not sprintf, in case result does
12097 * gtkutil.c: Include <float.h>, for DBL_MAX_10_EXP.
12098 (xg_check_special_colors, xg_set_geometry):
12099 Make sprintf buffers a bit bigger, to avoid potential buffer overrun.
12101 * lread.c (dir_warning): Don't blindly alloca buffer; use SAFE_ALLOCA.
12102 Use esprintf, not sprintf, in case result does not fit in int.
12104 * macros.c (executing_kbd_macro_iterations): Now EMACS_INT, not int.
12105 (Fend_kbd_macro): Don't mishandle MOST_NEGATIVE_FIXNUM by treating
12106 it as a large positive number.
12107 (Fexecute_kbd_macro): Don't assume repeat count fits in int.
12108 * macros.h (executing_kbd_macro_iterations): Now EMACS_INT, not int.
12110 * nsterm.m ((NSSize)windowWillResize): Use esprintf, not sprintf,
12111 in case result does not fit in int.
12113 * print.c (float_to_string): Detect width overflow more reliably.
12114 (print_object): Make sprintf buffer a bit bigger, to avoid potential
12115 buffer overrun. Don't assume list length fits in 'int'. Treat
12116 print length of 0 as 0, not as infinity; to be consistent with other
12117 uses of print length in this function. Don't overflow print length
12118 index. Don't assume hash table size fits in 'long', or that
12119 vectorlike size fits in 'unsigned long'.
12121 * process.c (make_process): Use printmax_t, not int, to format
12122 process-name gensyms.
12124 * sysdep.c (snprintf) [! HAVE_SNPRINTF]: New function.
12126 * term.c (produce_glyphless_glyph): Make sprintf buffer a bit bigger
12127 to avoid potential buffer overrun.
12129 * xfaces.c (x_update_menu_appearance): Don't overrun buffer
12130 if X resource line is longer than 512 bytes.
12132 * xfns.c (x_window): Make sprintf buffer a bit bigger
12133 to avoid potential buffer overrun.
12135 * xterm.c (x_io_error_quitter): Don't overrun sprintf buffer.
12137 * xterm.h (x_check_errors): Add ATTRIBUTE_FORMAT_PRINTF.
12139 2011-09-04 Paul Eggert <eggert@cs.ucla.edu>
12141 Integer overflow fixes for scrolling, etc.
12142 Without these, Emacs silently mishandles large integers sometimes.
12143 For example, "C-u 4294967297 M-x recenter" was treated as if
12144 it were "C-u 1 M-x recenter" on a typical 64-bit host.
12146 * xdisp.c (try_window_id): Check Emacs fixnum range before
12147 converting to 'int'.
12149 * window.c (window_scroll_line_based, Frecenter):
12150 Check that an Emacs fixnum is in range before assigning it to 'int'.
12151 (Frecenter, Fmove_to_window_line): Use EMACS_INT, not int, for
12152 values converted from Emacs fixnums.
12153 (Frecenter): Don't wrap around a line count if it is out of 'int'
12154 range; instead, treat it as an extreme value.
12155 (Fset_window_configuration, compare_window_configurations):
12156 Use ptrdiff_t, not int, for index that might exceed 2 GiB.
12158 * search.c (Freplace_match): Use ptrdiff_t, not int, for indexes
12159 that can exceed INT_MAX. Check that EMACS_INT value is in range
12160 before assigning it to the (possibly-narrower) index.
12161 (match_limit): Don't assume that a fixnum can fit in 'int'.
12163 * print.c (print_object): Use ptrdiff_t, not int, for index that can
12166 * indent.c (position_indentation): Now takes ptrdiff_t, not int.
12167 (Fvertical_motion): Don't wrap around LINES values that don't fit
12168 in 'int'. Instead, treat them as extreme values. This is good
12169 enough for windows, which can't have more than INT_MAX lines anyway.
12171 2011-09-03 Lars Magne Ingebrigtsen <larsi@gnus.org>
12173 * Require libxml/parser.h to avoid compilation warning.
12175 * emacs.c (shut_down_emacs): Call xmlCleanupParser on shutdown.
12177 * xml.c (parse_region): Don't call xmlCleanupParser after parsing,
12178 since this reportedly can destroy thread storage.
12180 2011-08-30 Chong Yidong <cyd@stupidchicken.com>
12182 * syntax.c (find_defun_start): Update all cache variables if
12183 exiting early (Bug#9401).
12185 2011-08-30 Eli Zaretskii <eliz@gnu.org>
12187 * image.c (x_bitmap_pixmap): Cast to int to avoid compiler warnings.
12189 * xdisp.c (produce_stretch_glyph): No longer static, compiled also
12190 when HAVE_WINDOW_SYSTEM is not defined. Support both GUI and TTY
12191 frames. Call tty_append_glyph in the TTY case. (Bug#9402)
12193 * term.c (tty_append_glyph): New function.
12194 (produce_stretch_glyph): Static function and its prototype deleted.
12196 * dispextern.h (produce_stretch_glyph, tty_append_glyph):
12199 2011-08-29 Paul Eggert <eggert@cs.ucla.edu>
12201 * image.c (parse_image_spec): Check for nonnegative, not for positive,
12202 when checking :margin (Bug#9390).
12203 (IMAGE_NON_NEGATIVE_INTEGER_VALUE_OR_PAIR):
12204 Rename from IMAGE_POSITIVE_INTEGER_VALUE_OR_PAIR,
12205 so that the name doesn't mislead. All uses changed.
12207 2011-08-28 Johan Bockgård <bojohan@gnu.org>
12209 * term.c (init_tty) [HAVE_GPM]: Move mouse settings after
12212 2011-08-27 Eli Zaretskii <eliz@gnu.org>
12214 * xdisp.c (move_it_to): Don't bail out early when reaching
12215 position beyond to_charpos, if we are scanning backwards.
12216 (move_it_vertically_backward): When DY == 0, make sure we get to
12217 the first character in the line after the newline.
12219 2011-08-27 Paul Eggert <eggert@cs.ucla.edu>
12221 * ccl.c: Improve and simplify overflow checking (Bug#9196).
12222 (ccl_driver): Do not generate an out-of-range pointer.
12223 (Fccl_execute_on_string): Remove unnecessary check for
12224 integer overflow, noted by Stefan Monnier in
12225 <http://lists.gnu.org/archive/html/emacs-devel/2011-08/msg00979.html>.
12226 Remove a FIXME that didn't need fixing.
12227 Simplify the newly-introduced buffer reallocation code.
12229 2011-08-27 Juanma Barranquero <lekktu@gmail.com>
12231 * makefile.w32-in ($(BLD)/alloc.$(O)): Depend on lib/verify.h.
12233 2011-08-26 Paul Eggert <eggert@cs.ucla.edu>
12235 Integer and memory overflow issues (Bug#9196).
12237 * doc.c (get_doc_string): Rework so that
12238 get_doc_string_buffer_size is the actual buffer size, rather than
12239 being 1 less than the actual buffer size; this makes xpalloc more
12242 * image.c (x_allocate_bitmap_record, cache_image):
12243 * xselect.c (Fx_register_dnd_atom):
12244 Simplify previous changes by using xpalloc.
12246 * buffer.c (overlay_str_len): Now ptrdiff_t, not EMACS_INT,
12247 since either will do and ptrdiff_t is convenient with xpalloc.
12249 * charset.c (charset_table_size)
12250 (struct charset_sort_data.priority): Now ptrdiff_t.
12251 (charset_compare): Don't overflow if priorities differ greatly.
12252 (Fsort_charsets): Don't assume list length fits in int.
12253 Check for size-calculation overflow when allocating sort data.
12254 (syms_of_charset): Allocate an initial charset table that is
12255 just under 64 KiB, to avoid problems with glibc malloc and mmap.
12257 * cmds.c (internal_self_insert): Check for size-calculation overflow.
12259 * composite.h (struct composition.glyph_len): Now int, not unsigned.
12260 The actual value is always <= INT_MAX, and leaving it unsigned made
12261 overflow checking harder.
12263 * dispextern.h (struct glyph_matrix.rows_allocated)
12264 (struct face_cache.size): Now ptrdiff_t, for convenience in use
12265 with xpalloc. The values are still always <= INT_MAX.
12267 * indent.c (compute_motion): Adjust to region_cache_forward sig change.
12269 * lisp.h (xnmalloc, xnrealloc, xpalloc): New decls.
12270 (SAFE_NALLOCA): New macro.
12272 * region-cache.c (struct boundary.pos, find_cache_boundary)
12273 (move_cache_gap, insert_cache_boundary, delete_cache_boundaries)
12274 (set_cache_region, invalidate_region_cache)
12275 (revalidate_region_cache, know_region_cache, region_cache_forward)
12276 (region_cache_backward, pp_cache):
12277 Use ptrdiff_t, not EMACS_INT, since either will do. This is needed
12278 so that ptrdiff_t * can be passed to xpalloc.
12279 (struct region_cache): Similarly, for gap_start, gap_len, cache_len,
12280 beg_unchanged, end_unchanged, buffer_beg, buffer_end members.
12281 (pp_cache): Don't assume cache_len fits in int.
12282 * region-cache.h: Adjust extern decls to match.
12284 * search.c (scan_buffer, Freplace_match): Use ptrdiff_t, not
12285 EMACS_INT, since either will do, for xpalloc.
12287 * alloc.c: Include verify.h, and check that int fits in ptrdiff_t.
12288 (xnmalloc, xnrealloc, xpalloc): New functions.
12290 * bidi.c (bidi_shelve_header_size): New constant.
12291 (bidi_cache_ensure_space, bidi_shelve_cache): Use it.
12292 (bidi_cache_ensure_space): Avoid integer overflow when allocating.
12294 * bidi.c (bidi_cache_shrink):
12295 * buffer.c (overlays_at, overlays_in, record_overlay_string)
12297 Don't update size of array until after memory allocation succeeds,
12298 because xmalloc/xrealloc may not return.
12299 (struct sortstrlist.bytes): Now ptrdiff_t, as EMACS_INT doesn't help
12300 now that we have proper integer overflow checking.
12301 (record_overlay_string, overlay_strings): Catch overflows when
12302 calculating size of overlay_str_buf.
12304 * callproc.c (Fcall_process): Check for size overflow when
12305 calculating size of args2.
12306 (child_setup): Avoid overflow by using size_t rather than ptrdiff_t.
12307 Normally we prefer signed values, but sticking with ptrdiff_t would
12308 require adding more-complicated checks.
12310 * ccl.c (Fccl_execute_on_string): Check for memory overflow.
12311 Use ptrdiff_t rather than EMACS_INT where ptrdiff_t will do.
12312 Redo buffer-overflow calculations to avoid integer overflow.
12313 Add a FIXME comment where memory seems to be over-allocated.
12315 * character.c (Fstring): Check for size-calculation overflow.
12317 * coding.c (produce_chars): Redo buffer-overflow calculations to avoid
12318 unnecessary integer overflow. Check for size overflow.
12319 (encode_coding_object): Don't update size until xmalloc succeeds.
12321 * composite.c (get_composition_id): Check for overflow in glyph
12322 length calculations.
12324 Integer and memory overflow fixes for display code.
12325 * dispextern.h (struct glyph_pool.nglyphs): Now ptrdiff_t, not int.
12326 * dispnew.c (adjust_glyph_matrix, realloc_glyph_pool)
12327 (scrolling_window): Check for overflow in size calculations.
12328 (line_draw_cost, realloc_glyph_pool, add_row_entry):
12329 Don't assume glyph table len fits in int.
12330 (struct row_entry.bucket, row_entry_pool_size, row_entry_idx)
12331 (row_table_size): Now ptrdiff_t, not int.
12332 (scrolling_window): Avoid overflow in size calculations.
12333 Don't update size until allocation succeeds.
12334 * fns.c (concat): Check for overflow in size calculations.
12335 (next_almost_prime): Verify NEXT_ALMOST_PRIME_LIMIT.
12336 * lisp.h (RANGED_INTEGERP, TYPE_RANGED_INTEGERP): New macros.
12337 (NEXT_ALMOST_PRIME_LIMIT): New constant.
12339 * doc.c (get_doc_string_buffer_size): Now ptrdiff_t, not int.
12340 (get_doc_string): Check for size calculation overflow.
12341 Don't update size until allocation succeeds.
12342 (get_doc_string, Fsubstitute_command_keys): Use ptrdiff_t, not
12343 EMACS_INT, where ptrdiff_t will do.
12344 (Fsubstitute_command_keys): Check for string overflow.
12346 * editfns.c (set_time_zone_rule): Don't assume environment length
12348 (message_length): Now ptrdiff_t, not int.
12349 (Fmessage_box): Don't update size until allocation succeeds.
12350 Don't assume message length fits in int.
12351 (Fformat): Use ptrdiff_t, not EMACS_INT, where ptrdiff_t will do.
12353 * emacs.c (main): Do not reallocate argv, since there is a null at
12354 the end that can be overwritten, and this way there's no need to
12355 worry about size-calculation overflow.
12356 (sort_args): Check for size-calculation overflow.
12358 * eval.c (init_eval_once, grow_specpdl): Don't update size until
12360 (call_debugger, grow_specpdl): Redo calculations to avoid overflow.
12362 * frame.c (set_menu_bar_lines, x_set_frame_parameters)
12363 (x_set_scroll_bar_width, x_figure_window_size):
12364 Check for integer overflow.
12365 (x_set_alpha): Do not assume XINT fits in int.
12367 * frame.h (struct frame): Use int, not EMACS_INT, where int works.
12368 This is for the members text_lines, text_cols, total_lines, total_cols,
12369 where the system imposes an 'int' limit.
12371 * fringe.c (Fdefine_fringe_bitmap):
12372 Don't update size until alloc works.
12374 * ftfont.c (ftfont_get_open_type_spec, setup_otf_gstring)
12375 (ftfont_shape_by_flt): Check for integer overflow in size calculations.
12377 * gtkutil.c (get_utf8_string, xg_store_widget_in_map):
12378 Check for size-calculation overflow.
12379 (get_utf8_string): Use ptrdiff_t, not size_t, where either will
12380 do, as we prefer signed integers.
12381 (id_to_widget.max_size, id_to_widget.used)
12382 (xg_store_widget_in_map, xg_remove_widget_from_map)
12383 (xg_get_widget_from_map, xg_get_scroll_id_for_window)
12384 (xg_remove_scroll_bar, xg_update_scrollbar_pos):
12385 Use and return ptrdiff_t, not int.
12386 (xg_gtk_scroll_destroy): Don't assume ptrdiff_t fits in int.
12387 * gtkutil.h: Change prototypes to match the above.
12389 * image.c (RANGED_INTEGERP, TYPE_RANGED_INTEGERP): Remove; these
12390 are duplicate now that they've been promoted to lisp.h.
12391 (x_allocate_bitmap_record, x_alloc_image_color)
12392 (make_image_cache, cache_image, xpm_load):
12393 Don't update size until alloc is done.
12394 (xpm_load, lookup_rgb_color, lookup_pixel_color, x_to_xcolors)
12396 Check for size calculation overflow.
12397 (ct_colors_allocated_max): New constant.
12398 (x_to_xcolors, x_detect_edges): Reorder multiplicands to avoid
12401 * keyboard.c (read_char, menu_bar_items, tool_bar_items)
12402 (read_char_x_menu_prompt, read_char_minibuf_menu_width)
12403 (read_char_minibuf_menu_prompt, follow_key, read_key_sequence):
12404 Use ptrdiff_t, not int, to count maps.
12405 (read_char_minibuf_menu_prompt): Check for overflow in size
12406 calculations. Don't update size until allocation succeeds.
12407 Redo calculations to avoid overflow.
12408 * keyboard.h: Change prototypes to match the above.
12410 * keymap.c (cmm_size, current_minor_maps): Use ptrdiff_t, not int,
12412 (current_minor_maps): Check for size calculation overflow.
12413 * keymap.h: Change prototypes to match the above.
12415 * lread.c (read1, init_obarray): Don't update size until alloc done.
12417 * macros.c (Fstart_kbd_macro): Don't update size until alloc done.
12418 (store_kbd_macro_char): Reorder multiplicands to avoid overflow.
12420 * nsterm.h (struct ns_color_table.size, struct ns_color_table.avail):
12421 Now ptrdiff_t, not int.
12422 * nsterm.m (ns_index_color): Use ptrdiff_t, not int, for table indexes.
12423 (ns_draw_fringe_bitmap): Rewrite to avoid overflow.
12425 * process.c (Fnetwork_interface_list): Check for overflow
12426 in size calculation.
12428 * region-cache.c (move_cache_gap): Check for size calculation overflow.
12430 * scroll.c (do_line_insertion_deletion_costs): Check for size calc
12431 overflow. Don't bother calling xmalloc when xrealloc will do.
12433 * search.c (Freplace_match): Check for size calculation overflow.
12434 (Fset_match_data): Don't assume list lengths fit in 'int'.
12436 * sysdep.c (system_process_attributes): Use ptrdiff_t, not int,
12437 for command line length. Do not attempt to address one before the
12438 beginning of an array, as that's not portable.
12440 * term.c (max_frame_lines): Remove; unused.
12441 (encode_terminal_src_size, encode_terminal_dst_size): Now ptrdiff_t,
12443 (encode_terminal_code, calculate_costs): Check for size
12444 calculation overflow.
12445 (encode_terminal_code): Use ptrdiff_t, not int, to record glyph
12446 table lengths and related sizes. Don't update size until alloc
12447 done. Redo calculations to avoid overflow.
12448 (calculate_costs): Don't bother calling xmalloc when xrealloc will do.
12450 * termcap.c (tgetent): Use ptrdiff_t, not int, to record results of
12451 subtracting pointers.
12452 (gobble_line): Check for overflow more carefully. Don't update size
12455 * tparam.c (tparam1): Use ptrdiff_t, not int, for sizes.
12456 Don't update size until alloc done.
12457 Redo size calculations to avoid overflow.
12458 Check for size calculation overflow.
12459 (main) [DEBUG]: Fix typo in invoking tparam1.
12461 * xdisp.c (store_mode_line_noprop_char, x_consider_frame_title):
12462 Use ptrdiff_t, not int, for sizes.
12463 (store_mode_line_noprop_char): Don't update size until alloc done.
12465 * xfaces.c (lface_id_to_name_size, Finternal_make_lisp_face):
12466 Use ptrdiff_t, not int, for sizes.
12467 (Finternal_make_lisp_face, cache_face):
12468 Check for size calculation overflow.
12469 (cache_face): Treat size calculation overflows as if they were
12470 memory exhaustion (the usual treatment), rather than aborting.
12472 * xfns.c (x_encode_text, x_set_name_internal)
12473 (Fx_change_window_property): Use ptrdiff_t, not int, to count
12474 sizes, since they can exceed INT_MAX in size. Check for size
12475 calculation overflow.
12477 * xgselect.c (gfds_size): Now ptrdiff_t, for convenience with xpalloc.
12478 (xg_select): Check for size calculation overflow.
12479 Don't update size until alloc done.
12481 * xrdb.c (get_environ_db): Don't assume path length fits in int,
12482 as sprintf is limited to int lengths.
12484 * xselect.c (X_LONG_SIZE, X_SHRT_MAX, X_SHRT_MIN, X_LONG_MAX)
12485 (X_LONG_MIN): New macros.
12486 Use them to make the following changes clearer.
12487 (MAX_SELECTION_QUANTUM): Make the other bounds on this value clearer.
12488 This change doesn't affect the value now, but it may help remind
12489 future maintainers not to raise the value too much later.
12490 (SELECTION_QUANTUM): Remove, replacing with ...
12491 (selection_quantum): ... new function, which avoids overflow.
12493 (struct selection_data.size): Now ptrdiff_t, not int, to avoid
12494 assumption that selection length fits in 'int'.
12495 (x_reply_selection_request, x_handle_selection_request)
12496 (x_get_window_property, receive_incremental_selection)
12497 (x_get_window_property_as_lisp_data, selection_data_to_lisp_data)
12498 (lisp_data_to_selection_data, clean_local_selection_data):
12499 Use ptrdiff_t, not int, to record length of selection.
12500 (x_reply_selection_request, x_get_window_property)
12501 (receive_incremental_selection, x_property_data_to_lisp):
12502 Redo calculations to avoid overflow.
12503 (x_reply_selection_request): When sending hint, ceiling it at
12504 X_LONG_MAX rather than relying on wraparound overflow to send
12506 (x_get_window_property, receive_incremental_selection)
12507 (lisp_data_to_selection_data, x_property_data_to_lisp):
12508 Check for size-calculation overflow.
12509 (x_get_window_property, receive_incremental_selection)
12510 (lisp_data_to_selection_data, Fx_register_dnd_atom):
12511 Don't store size until memory allocation succeeds.
12512 (x_get_window_property): Plug memory leak on memory exhaustion.
12513 Don't double-block input; malloc is safe here. Don't assume 2**34
12514 - 4 fits in unsigned long. Add an xassert to check
12515 XGetWindowProperty overflow. Be more careful about overflow
12516 calculations, and distinguish size from memory overflow better.
12517 (receive_incremental_selection): When tracing, don't assume
12518 unsigned int is less than INT_MAX.
12519 (x_selection_data_to_lisp_data): Remove unnecessary (and in theory
12520 harmful) conversions of unsigned short to int.
12521 (lisp_data_to_selection_data): Don't assume that integers
12522 in the range -65535 through -1 fit in an X unsigned short.
12523 Don't assume that ULONG_MAX == X_ULONG_MAX. Don't store into
12524 result parameters unless successful. Rely on cons_to_unsigned
12525 to report problems with elements; the old code wasn't right anyway.
12526 (x_check_property_data): Check for int overflow; we cannot use
12527 a wider type due to X limits.
12528 (x_handle_dnd_message): Use unsigned int, to avoid int overflow.
12530 * xsmfns.c (smc_save_yourself_CB): Check for size calc overflow.
12532 * xterm.c (x_color_cells, x_send_scrollbar_event, handle_one_xevent)
12533 (x_term_init): Check for size calculation overflow.
12534 (x_color_cells): Don't store size until memory allocation succeeds.
12535 (handle_one_xevent): Use ptrdiff_t, not int, for byte counts.
12536 Don't assume alloca size is less than MAX_ALLOCA.
12537 (x_term_init): Don't assume length fits in int (sprintf is limited
12540 Use ptrdiff_t for composition IDs.
12541 * character.c (lisp_string_width):
12542 * composite.c (composition_table_size, n_compositions)
12543 (get_composition_id, composition_gstring_from_id):
12544 * dispextern.h (struct glyph_string.cmp_id, struct composition_it.id):
12545 * xdisp.c (BUILD_COMPOSITE_GLYPH_STRING):
12546 * window.c (Frecenter):
12547 Use ptrdiff_t, not int, for composition IDs.
12548 * composite.c (get_composition_id): Check for integer overflow.
12549 * composite.h: Adjust prototypes to match the above changes.
12551 Use ptrdiff_t for hash table indexes.
12552 * category.c (hash_get_category_set):
12553 * ccl.c (ccl_driver):
12554 * charset.h (struct charset.hash_index, CHECK_CHARSET_GET_ID):
12555 * coding.c (coding_system_charset_list, detect_coding_system):
12556 * coding.h (struct coding_system.id):
12557 * composite.c (get_composition_id, gstring_lookup_cache):
12558 * fns.c (hash_lookup, hash_put, Fgethash, Fputhash):
12559 * image.c (xpm_get_color_table_h):
12560 * lisp.h (hash_lookup, hash_put):
12561 * minibuf.c (Ftest_completion):
12562 Use ptrdiff_t for hash table indexes, not int (which is too
12563 narrow, on 64-bit hosts) or EMACS_INT (which is too wide, on
12564 32-bit --with-wide-int hosts).
12566 * charset.c (Fdefine_charset_internal): Check for integer overflow.
12567 Add a FIXME comment about memory leaks.
12568 (syms_of_charset): Don't assume xmalloc returns.
12570 Don't assume that stated character widths fit in int.
12571 * character.c (Fchar_width, c_string_width, lisp_string_width):
12572 * character.h (CHAR_WIDTH):
12573 * indent.c (MULTIBYTE_BYTES_WIDTH):
12574 Use sanitize_char_width to avoid undefined and/or bad behavior
12575 with outlandish widths.
12576 * character.h (sanitize_tab_width): Rename from sanitize_width,
12577 now that we have two such functions. All uses changed.
12578 (sanitize_char_width): New inline function.
12580 Don't assume that tab-width fits in int.
12581 * character.h (sanitize_width): New inline function.
12582 (SANE_TAB_WIDTH): New macro.
12583 (ASCII_CHAR_WIDTH): Use it.
12584 * indent.c (sane_tab_width): Remove. All uses replaced by
12585 SANE_TAB_WIDTH (current_buffer).
12586 * xdisp.c (init_iterator): Use SANE_TAB_WIDTH.
12588 * fileio.c: Integer overflow issues with file modes.
12589 (Fset_file_modes, auto_save_1): Don't assume EMACS_INT fits in int.
12591 * charset.c (read_hex): New arg OVERFLOW. All uses changed.
12592 Remove unreachable code.
12593 (read_hex, load_charset_map_from_file): Check for integer overflow.
12595 * xterm.c: Don't go over XClientMessageEvent limit.
12596 (scroll_bar_windows_size): Now ptrdiff_t, as we prefer signed.
12597 (x_send_scroll_bar_event): Likewise. Check that the size does not
12598 exceed limits imposed by XClientMessageEvent, as well as the usual
12599 ptrdiff_t and size_t limits.
12601 * keyboard.c: Overflow, signedness and related fixes.
12602 (make_lispy_movement): Use same integer type in forward decl
12603 that is used in the definition.
12604 (read_key_sequence, keyremap_step):
12605 Change bufsize argument back to int, undoing my 2011-03-30 change.
12606 We prefer signed types, and int is wide enough here.
12607 (parse_tool_bar_item): Don't assume tool_bar_max_label_size is less
12608 than TYPE_MAXIMUM (EMACS_INT) / 2. Don't let the label size grow
12609 larger than STRING_BYTES_BOUND. Use ptrdiff_t for Emacs string
12610 length, not size_t. Use ptrdiff_t for index, not int.
12611 (keyremap_step, read_key_sequence): Redo bufsize check to avoid
12612 possibility of integer overflow.
12614 Overflow, signedness and related fixes for images.
12616 * dispextern.h (struct it.stack[0].u.image.image_id)
12617 (struct_it.image_id, struct image.id, struct image_cache.size)
12618 (struct image_cache.used, struct image_cache.ref_count):
12619 * gtkutil.c (update_frame_tool_bar):
12620 * image.c (x_reference_bitmap, Fimage_size, Fimage_mask_p)
12621 (Fimage_metadata, free_image_cache, clear_image_cache, lookup_image)
12622 (cache_image, mark_image_cache, x_kill_gs_process, Flookup_image):
12623 * nsmenu.m (update_frame_tool_bar):
12624 * xdisp.c (calc_pixel_width_or_height):
12625 * xfns.c (image_cache_refcount):
12626 Image IDs are now ptrdiff_t, not int, to avoid arbitrary limits
12627 on typical 64-bit hosts.
12629 * image.c (RANGED_INTEGERP, TYPE_RANGED_INTEGERP): New macros.
12630 (x_bitmap_pixmap, x_create_x_image_and_pixmap):
12631 Omit unnecessary casts to int.
12632 (parse_image_spec): Check that integers fall into 'int' range
12633 when the callers expect that.
12634 (image_ascent): Redo ascent calculation to avoid int overflow.
12635 (clear_image_cache): Avoid overflow when sqrt (INT_MAX) < nimages.
12636 (lookup_image): Remove unnecessary tests.
12637 (xbm_image_p): Locals are now of int, not EMACS_INT,
12638 since parse_image_check makes sure they fit into int.
12639 (png_load, gif_load, svg_load_image):
12640 Prefer int to unsigned where either will do.
12641 (tiff_handler): New function, combining the cores of the
12642 old tiff_error_handler and tiff_warning_handler.
12643 This function is rewritten to use vsnprintf and thereby avoid
12644 stack buffer overflows. It uses only the features of vsnprintf
12645 that are common to both POSIX and native Microsoft.
12646 (tiff_error_handler, tiff_warning_handler): Use it.
12647 (tiff_load, gif_load, imagemagick_load_image):
12648 Don't assume :index value fits in 'int'.
12649 (gif_load): Omit unnecessary cast to double, and avoid double-rounding.
12650 (imagemagick_load_image): Check that crop parameters fit into
12651 the integer types that MagickCropImage accepts. Don't assume
12652 Vimagemagick_render_type has a nonnegative value. Don't assume
12653 size_t fits in 'long'.
12654 (gs_load): Use printmax_t to print the widest integers possible.
12655 Check for integer overflow when computing image height and width.
12657 2011-08-26 Eli Zaretskii <eliz@gnu.org>
12659 * xdisp.c (redisplay_window): Don't force window start if point
12660 will be invisible in the resulting window. (Bug#9324)
12662 2011-08-25 Eli Zaretskii <eliz@gnu.org>
12664 * xdisp.c (compute_display_string_pos): Return 2 in DISP_PROP when
12665 the display spec is of the form `(space ...)'.
12666 (handle_display_spec): Return the value returned by
12667 handle_single_display_spec, not just 1 or zero.
12668 (handle_single_display_spec): If the display spec is of the form
12669 `(space ...)', and specifies display in the text area, return 2
12671 (try_cursor_movement): Check for the need to scroll more
12672 accurately, and prefer exact match for point under bidi.
12673 Don't advance `row' beyond the last row of the window.
12675 * dispextern.h (struct bidi_it): Rename the disp_prop_p member
12676 into disp_prop; all users changed.
12678 * bidi.c (bidi_fetch_char): If compute_display_string_pos returns
12679 DISP_PROP = 2, substitute the u+2029 PARAGRAPH SEPARATOR character
12680 for the text covered by the display property.
12682 2011-08-25 Chong Yidong <cyd@stupidchicken.com>
12684 * buffer.c (Fbury_buffer_internal): Rename from Funrecord_buffer.
12685 Change return value to nil.
12686 (Frecord_buffer): Delete unused function.
12688 2011-08-24 Eli Zaretskii <eliz@gnu.org>
12690 * xdisp.c (Fcurrent_bidi_paragraph_direction): For unibyte
12691 buffers, return left-to-right.
12692 (set_cursor_from_row): Consider candidate row a win if its glyph
12693 represents a newline and point is on that newline. Fixes cursor
12694 positioning on the newline at EOL of R2L text within L2R
12695 paragraph, and vice versa.
12696 (try_cursor_movement): Check continued rows, in addition to
12697 continuation rows. Fixes unwarranted scroll when point enters a
12698 continued line of R2L text within an L2R paragraph, or vice versa.
12699 (cursor_row_p): Consider the case of point being equal to
12700 MATRIX_ROW_END_CHARPOS. Prevents cursor being stuck when moving
12701 from the end of a short line to the beginning of a continued line
12702 of R2L text within L2R paragraph.
12703 (RECORD_MAX_MIN_POS): For max_pos, use IT_CHARPOS even for
12704 composed characters.
12706 * bidi.c (bidi_check_type): Use xassert.
12707 (bidi_cache_iterator_state): Update the disp_pos and disp_prop_p
12710 2011-08-23 Eli Zaretskii <eliz@gnu.org>
12712 * bidi.c (bidi_get_type): Abort if we get zero as the bidi type of
12715 2011-08-23 Chong Yidong <cyd@stupidchicken.com>
12717 * nsfont.m (ns_otf_to_script): Fix typo.
12719 2011-08-22 Kenichi Handa <handa@m17n.org>
12721 * chartab.c (Fset_char_table_extra_slot): Do not inhibit setting a
12722 extra slot even if the purpose is char-code-property-table.
12724 2011-08-23 Eli Zaretskii <eliz@gnu.org>
12726 * xdisp.c (redisplay_window): When computing centering_position,
12727 account for the height of the header line. (Bug#8874)
12729 * dispnew.c (buffer_posn_from_coords): Use buf_charpos_to_bytepos
12730 instead of CHAR_TO_BYTE. Fixes a crash when a completion
12731 candidate is selected by the mouse, and that candidate has a
12732 composed character under the mouse.
12734 * xdisp.c (x_produce_glyphs): Set it->nglyphs to 1. Fixes pixel
12735 coordinates reported by pos-visible-in-window-p for a composed
12736 character in column zero.
12738 2011-08-23 Stefan Monnier <monnier@iro.umontreal.ca>
12740 * cmds.c (Fself_insert_command): Mention post-self-insert-hook.
12742 2011-08-22 Eli Zaretskii <eliz@gnu.org>
12744 * xdisp.c (BUFFER_POS_REACHED_P): If this is a composition,
12745 consider it a hit if to_charpos is anywhere in the range of the
12746 composed buffer positions.
12748 2011-08-22 Chong Yidong <cyd@stupidchicken.com>
12750 * image.c (gif_load): Don't assume that each subimage has the same
12751 dimensions as the base image. Handle disposal method that is
12752 "undefined" by the gif spec (Bug#9335).
12754 2011-08-20 Chong Yidong <cyd@stupidchicken.com>
12756 * eval.c (Fsignal): Handle `debug' symbol in error handler (Bug#9329).
12757 (Fcondition_case): Document `debug' symbol in error handler.
12759 2011-08-19 Eli Zaretskii <eliz@gnu.org>
12761 * xfaces.c (face_at_buffer_position): Avoid repeated evaluation of
12762 face ID by FACE_FROM_ID, and avoid a crash when mouse is moved
12763 from an Org mode buffer to a Speedbar frame.
12765 * xdisp.c (RECORD_MAX_MIN_POS): If the display element comes from
12766 a composition, take its buffer position from IT->cmp_it.charpos.
12767 Fixes cursor positioning at the beginning of a line that begins
12768 with a composed character.
12770 2011-08-18 Eli Zaretskii <eliz@gnu.org>
12772 * bidi.c (bidi_get_type): If bidi_type_table reports zero as the
12773 character bidirectional type, use STRONG_L instead. Fixes crashes
12774 in a buffer produced by `describe-categories'.
12776 * dispextern.h (struct bidi_it): Move disp_pos and disp_prop_p
12777 members before the level stack, so they would be saved and
12778 restored when copying iterator state. Fixes incorrect reordering
12779 around TABs covered by display properties.
12781 2011-08-18 Andreas Schwab <schwab@linux-m68k.org>
12783 * process.c (Fnetwork_interface_list): Correctly determine buffer size.
12785 2011-08-17 Chong Yidong <cyd@stupidchicken.com>
12787 * eval.c (internal_condition_case, internal_condition_case_1)
12788 (internal_condition_case_2, internal_condition_case_n):
12789 Remove unnecessary aborts (Bug#9081).
12791 2011-08-17 Eli Zaretskii <eliz@gnu.org>
12793 * lread.c (Fload) [DOS_NT]: If `openp' returns -2, but the file
12794 has no `load' handler, try opening the file locally. (Bug#9311)
12796 2011-08-16 Ken Brown <kbrown@cornell.edu>
12798 * gmalloc.c: Expand comment.
12800 2011-08-16 Eli Zaretskii <eliz@gnu.org>
12802 * xdisp.c (set_cursor_from_row): Don't accept a previous candidate
12803 if it fails the cursor_row_p test. Fixes cursor positioning at ZV.
12805 2011-08-16 Ken Brown <kbrown@cornell.edu>
12807 Fix memory allocation problems in Cygwin build (Bug#9273).
12809 * unexcw.c ( __malloc_initialized): Declare external variable.
12810 (fixup_executable): Force the dumped emacs to reinitialize malloc.
12812 * gmalloc.c [CYGWIN] (bss_sbrk_heapbase, bss_sbrk_heapinfo):
12814 (malloc_initialize_1) [CYGWIN]: Prepare for reinitializing the
12816 (_free_internal_nolock) [CYGWIN]: Ignore requests to free storage
12817 in the static heap.
12818 [CYGWIN] (special_realloc): New function.
12819 (_realloc_internal_nolock) [CYGWIN]: Use the new function on
12820 requests to realloc storage in the static heap.
12822 2011-08-15 Paul Eggert <eggert@cs.ucla.edu>
12824 * bidi.c (bidi_initialize): Remove unused local.
12826 2011-08-15 Eli Zaretskii <eliz@gnu.org>
12829 * biditype.h: Remove file.
12830 * makefile.w32-in ($(BLD)/bidi.$(O)):
12831 * deps.mk (bidi.o): Remove biditype.h and bidimirror.h.
12833 * dispextern.h: Fix a typo in the comment to bidi_type_t.
12835 * chartab.c: Improve commentary for the uniprop_table API.
12837 * bidi.c (bidi_paragraph_init): Support zero value of
12838 bidi_ignore_explicit_marks_for_paragraph_level.
12839 (bidi_initialize): Use uniprop_table instead of including
12840 biditype.h and bidimirror.h.
12842 * xdisp.c (move_it_in_display_line_to): Don't reset pixel
12843 coordinates of the iterator when restoring from ppos_it.
12846 2011-08-14 Kenichi Handa <handa@m17n.org>
12848 * process.c (create_process): Call setup_process_coding_systems
12849 after the pid of the process is set to -1 (Bug#8162).
12851 2011-08-14 Eli Zaretskii <eliz@gnu.org>
12853 * xdisp.c (move_it_in_display_line_to): Don't invoke
12854 IT_RESET_X_ASCENT_DESCENT when iterator position was restored from
12855 ppos_it. Fixes vertical cursor motion when line beginning is
12856 covered by an image. (Bug#9296)
12858 2011-08-14 Jan Djärv <jan.h.d@swipnet.se>
12860 * nsterm.h (ns_run_ascript): Declare.
12861 (NSAPP_DATA2_RUNASSCRIPT): Define.
12863 * nsfns.m (as_script, as_result, as_status): New static variables.
12864 (ns_run_ascript): New function.
12865 (Fns_do_applescript): Set variables as_*. Make an NSApplicationDefined
12866 event with data2 set to NSAPP_DATA2_RUNASSCRIPT, post it and then start
12867 the event loop. Get status from as_status (Bug#7276).
12869 * nsterm.m (sendEvent): If event is NSApplicationDefined and
12870 data2 is NSAPP_DATA2_RUNASSCRIPT, call ns_run_ascript and then exit
12871 the event loop (Bug#7276).
12873 2011-08-14 Andreas Schwab <schwab@linux-m68k.org>
12875 * gnutls.c (QCgnutls_bootprop_priority)
12876 (QCgnutls_bootprop_trustfiles, QCgnutls_bootprop_keylist)
12877 (QCgnutls_bootprop_crlfiles, QCgnutls_bootprop_callbacks)
12878 (QCgnutls_bootprop_loglevel, QCgnutls_bootprop_hostname)
12879 (QCgnutls_bootprop_min_prime_bits, QCgnutls_bootprop_verify_flags)
12880 (QCgnutls_bootprop_verify_hostname_error)
12881 (QCgnutls_bootprop_callbacks_verify): Rename from
12882 Qgnutls_bootprop_..., all uses changed.
12884 * xfaces.c (QCignore_defface): Rename from Qignore_defface, all
12887 2011-08-14 Paul Eggert <eggert@cs.ucla.edu>
12889 * xfaces.c (Qframe_set_background_mode): Now static.
12890 * dispextern.h (Qframe_set_background_mode): Remove decl.
12892 * process.c (Fnetwork_interface_info): Declare local only if needed.
12894 2011-08-13 Jan Djärv <jan.h.d@swipnet.se>
12896 * process.c: Include ifaddrs.h and net/if_dl.h if available (Bug#8477).
12897 (Fnetwork_interface_list): Allocate in increments of bytes instead
12898 of sizeof (struct ifreq). Iterate over ifconf.ifc_req by counting
12899 bytes (Bug#8477). Count bytes correctly when ifr_addr is a struct
12901 (struct ifflag_def): notrailers is smart on OSX.
12902 (Fnetwork_interface_info): Handle case when ifr_flags is negative.
12903 Get hardware address with getifaddrs if available.
12905 2011-08-12 Eli Zaretskii <eliz@gnu.org>
12907 * xdisp.c (iterate_out_of_display_property): xassert that
12908 IT->position is set to within IT->object's boundaries. Break from
12909 the loop as soon as EOB is reached; avoids infloops in redisplay
12910 when IT->position is set up wrongly due to some bug.
12911 Set IT->current to match the bidi iterator unconditionally.
12912 (push_display_prop): Allow GET_FROM_STRING as IT->method on
12913 entry. Force push_it to save on the stack the current
12914 buffer/string position, to be restored by pop_it. Fix flags in
12915 the iterator structure wrt the object coming from a display
12916 property, as `line-prefix' and `wrap-prefix' are not ``replacing''
12917 properties. (Bug#9284)
12919 2011-08-09 Andreas Schwab <schwab@linux-m68k.org>
12921 * fontset.c (fontset_get_font_group): Add proper type checks.
12924 2011-08-09 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
12926 * unexmacosx.c (print_load_command_name): Add cases LC_FUNCTION_STARTS
12927 and LC_VERSION_MIN_MACOSX.
12928 (copy_linkedit_data) [LC_FUNCTION_STARTS]: New function.
12929 (dump_it) [LC_FUNCTION_STARTS]: Use it.
12931 2011-08-08 Eli Zaretskii <eliz@gnu.org>
12933 * xdisp.c (forward_to_next_line_start): Allow to use the
12934 no-display-properties-and-no-overlays under bidi display.
12935 Set disp_pos in the bidi iterator to avoid searches for display
12936 properties and overlays.
12938 2011-08-08 Chong Yidong <cyd@stupidchicken.com>
12940 * editfns.c (Fset_time_zone_rule): Document relationship with the
12943 * ftfont.c (ftfont_pattern_entity): Copy the extras argument to
12944 the font entity extracted from the cache (Bug#8109).
12946 2011-08-07 Chong Yidong <cyd@stupidchicken.com>
12948 * composite.c (autocmp_chars): Don't reset point. That is done by
12949 restore_point_unwind (Bug#5984).
12951 2011-08-07 Juri Linkov <juri@jurta.org>
12953 * editfns.c (Fformat_time_string): Doc fix, add tag `usage:'
12954 to show the arg `TIME' instead of `TIMEVAL'.
12956 2011-08-06 Eli Zaretskii <eliz@gnu.org>
12958 * xdisp.c (set_cursor_from_row): Fix cursor positioning when a
12959 display property strides EOL and includes a newline, as in
12960 longlines-mode. (Bug#9254)
12961 (move_it_in_display_line_to): Fix vertical-motion in a buffer with
12962 word-wrap under bidirectional display. (Bug#9224)
12964 * bidi.c (bidi_unshelve_cache): Don't reset the cache if JUST_FREE
12965 is non-zero, even if the data buffer is NULL. Fixes a crash in
12966 vertical-motion with longlines-mode. (Bug#9254)
12968 2011-08-05 Eli Zaretskii <eliz@gnu.org>
12970 * bidi.c <bidi_cache_total_alloc>: Now static.
12971 (bidi_initialize): Initialize bidi_cache_total_alloc.
12973 * xdisp.c (display_line): Release buffer allocated for shelved bidi
12976 * bidi.c (bidi_shelve_cache, bidi_unshelve_cache): Track total
12977 amount allocated this far in `bidi_cache_total_alloc'.
12978 (bidi_unshelve_cache): Accept an additional argument JUST_FREE; if
12979 non-zero, only free the data buffer without restoring the cache
12980 contents. All callers changed.
12982 * dispextern.h (bidi_unshelve_cache): Update prototype.
12984 * xdisp.c (SAVE_IT, pos_visible_p, move_it_in_display_line_to)
12985 (move_it_in_display_line, move_it_to)
12986 (move_it_vertically_backward, move_it_by_lines): Replace the call
12987 to xfree to an equivalent call to bidi_unshelve_cache.
12988 (move_it_in_display_line_to): Fix logic of returning
12989 MOVE_POS_MATCH_OR_ZV in the bidi case. (Bug#9224)
12991 2011-08-05 Eli Zaretskii <eliz@gnu.org>
12993 * xdisp.c (set_cursor_from_row): Prefer the candidate glyph that
12994 came from a string character with a `cursor' property. (Bug#9229)
12996 2011-08-04 Jan Djärv <jan.h.d@swipnet.se>
12998 * Makefile.in (LIB_PTHREAD): New variable.
12999 (LIBES): Add LIB_PTHREAD (Bug#9216).
13001 * alloc.c, emacs.c, gmalloc.c, gtkutil.c, keyboard.c, syssignal.h:
13002 Rename HAVE_GTK_AND_PTHREAD to HAVE_PTHREAD (Bug#9216).
13004 2011-08-04 Andreas Schwab <schwab@linux-m68k.org>
13006 * regex.c (re_iswctype): Remove some redundant boolean conversions.
13008 2011-08-04 Jan Djärv <jan.h.d@swipnet.se>
13010 * xterm.c (x_find_topmost_parent): New function.
13011 (x_set_frame_alpha): Find topmost parent window with
13012 x_find_topmost_parent and set the property there also (bug#9181).
13013 (handle_one_xevent): Call x_set_frame_alpha on ReparentNotify.
13015 2011-08-04 Paul Eggert <eggert@cs.ucla.edu>
13017 * callproc.c (Fcall_process): Avoid vfork clobbering
13018 the local vars buffer, coding_systems, current_dir.
13020 2011-08-03 Stefan Monnier <monnier@iro.umontreal.ca>
13022 * keymap.c (Fmake_composed_keymap): Move to subr.el.
13024 2011-08-03 Paul Eggert <eggert@cs.ucla.edu>
13026 * fontset.c (dump_fontset) [FONTSET_DEBUG]: Declare EXTERNALLY_VISIBLE
13027 so that it is not optimized away.
13029 * xdisp.c (compute_display_string_pos): Remove unused local.
13031 2011-08-02 Eli Zaretskii <eliz@gnu.org>
13033 Fix slow cursor motion and scrolling in large buffers with
13034 selective display, like Org Mode buffers. (Bug#9218)
13036 * dispextern.h (struct bidi_it): New member disp_prop_p.
13038 * xdisp.c: Remove one-slot cache of display string positions.
13039 (compute_display_string_pos): Accept an additional argument
13040 DISP_PROP_P; callers changed. Scan at most 5K characters forward
13041 for a display string or property. If found, set DISP_PROP_P
13044 * bidi.c (bidi_fetch_char): Accept an additional argument
13045 DISP_PROP_P, and pass it to compute_display_string_pos.
13046 Only handle text covered by a display string if DISP_PROP_P is returned
13047 non-zero. All callers of bidi_fetch_char changed.
13049 2011-08-02 Stefan Monnier <monnier@iro.umontreal.ca>
13051 * keymap.c (Fdefine_key): Fix Lisp_Object/int mixup; apply some CSE.
13053 2010-12-03 Don March <don@ohspite.net>
13055 * keymap.c (Fdefine_key): Fix non-prefix key error message when
13056 last character M-[char] is translated to ESC [char] (bug#7541).
13058 2011-08-02 Kenichi Handa <handa@m17n.org>
13060 * lisp.h (uniprop_table): Extern it.
13062 * chartab.c (uniprop_table): Make it non-static.
13064 2011-08-01 Eli Zaretskii <eliz@gnu.org>
13066 * xdisp.c (forward_to_next_line_start): Accept additional argument
13067 BIDI_IT_PREV, and store into it the state of the bidi iterator had
13069 (reseat_at_next_visible_line_start): Use the bidi iterator state
13070 returned by forward_to_next_line_start to restore the state of
13071 it->bidi_it after backing up to previous newline. (Bug#9212)
13073 2011-07-30 Andreas Schwab <schwab@linux-m68k.org>
13075 * regex.c (re_comp): Protoize.
13076 (re_exec): Fix return type.
13077 (regexec): Fix type of `ret'. (Bug#9203)
13079 2011-07-28 Paul Eggert <eggert@cs.ucla.edu>
13081 * image.c (check_image_size): Use 1024x1024 if unknown frame (Bug#9189).
13082 This is needed if max-image-size is a floating-point number.
13084 2011-07-28 Andreas Schwab <schwab@linux-m68k.org>
13086 * print.c (print_object): Print empty symbol as ##.
13088 * lread.c (read1): Read ## as empty symbol.
13090 2011-07-28 Alp Aker <alp.tekin.aker@gmail.com>
13092 * nsfns.m (x_set_foreground_color): Set f->foreground_pixel when
13093 setting frame foreground color (Bug#9175).
13094 (x_set_background_color): Likewise.
13096 * nsmenu.m (-setText): Size tooltip dimensions precisely to
13097 contents (Bug#9176).
13098 (EmacsTooltip -init): Remove bezels and add shadows to
13101 * nsterm.m (ns_dumpglyphs_stretch): Avoid overwriting left fringe
13102 or scroll bar (Bug#8470).
13104 * nsfont.m (nsfont_open): Remove assignment to voffset and
13105 unnecessary vars hshink, expand, hd, full_height, min_height.
13106 (nsfont_draw): Use s->ybase as baseline for glyph drawing (Bug#8913).
13108 * nsterm.h (nsfont_info): Remove voffset field.
13110 2011-07-28 Alp Aker <alp.tekin.aker@gmail.com>
13112 Implement strike-through and overline on NextStep (Bug#8863).
13114 * nsfont.m (nsfont_open): Use underline position provided by font,
13115 instead of hard-coded value of 2.
13116 (nsfont_draw): Call ns_draw_text_decoration instead.
13118 * nsterm.h: Add declaration for ns_draw_text_decoration.
13120 * nsterm.m (ns_draw_text_decoration): New function for drawing
13121 underline, overline, and strike-through.
13122 (ns_dumpglyphs_image, ns_dumpglyphs_stretch): Add call to
13123 ns_draw_text_decoration. Change treatment of cursor drawing to
13124 accommodate underlining, etc.
13126 2011-07-28 Eli Zaretskii <eliz@gnu.org>
13128 * buffer.c (init_buffer_once): Set bidi-display-reordering to t by
13131 2011-07-28 Paul Eggert <eggert@cs.ucla.edu>
13133 * alloc.c (memory_full) [!SYNC_INPUT]: Fix signal-related race.
13134 Without this fix, if a signal arrives just after memory fills up,
13135 'malloc' might be invoked reentrantly.
13137 * image.c (x_check_image_size) [!HAVE_X_WINDOWS]: Return 1.
13138 In other words, assume that every image size is allowed, on non-X
13139 hosts. This assumption is probably wrong, but it lets Emacs compile.
13141 2011-07-28 Andreas Schwab <schwab@linux-m68k.org>
13143 * regex.c (re_iswctype): Convert return values to boolean.
13145 2011-07-28 Eli Zaretskii <eliz@fencepost.gnu.org>
13147 * xdisp.c (compute_display_string_pos): Don't use cached display
13148 string position if the buffer had its restriction changed.
13151 2011-07-28 Paul Eggert <eggert@cs.ucla.edu>
13153 * callproc.c (Fcall_process): Use 'volatile' to avoid vfork clobbering.
13155 2011-07-28 Paul Eggert <eggert@cs.ucla.edu>
13157 Integer signedness and overflow and related fixes. (Bug#9079)
13159 * bidi.c: Integer size and overflow fixes.
13160 (bidi_cache_size, bidi_cache_idx, bidi_cache_last_idx)
13161 (bidi_cache_start, bidi_cache_fetch_state, bidi_cache_search)
13162 (bidi_cache_find_level_change, bidi_cache_ensure_space)
13163 (bidi_cache_iterator_state, bidi_cache_find, bidi_cache_start_stack)
13164 (bidi_find_other_level_edge):
13165 Use ptrdiff_t instead of EMACS_INT where either will do.
13166 This works better on 32-bit hosts configured --with-wide-int.
13167 (bidi_cache_ensure_space): Check for size-calculation overflow.
13168 Use % rather than repeated addition, for better worst-case speed.
13169 Don't set bidi_cache_size until after xrealloc returns, because it
13171 (bidi_dump_cached_states): Use ptrdiff_t, not int, to avoid overflow.
13172 (bidi_cache_ensure_space): Also check that the bidi cache size
13173 does not exceed that of the largest Lisp string or buffer. See Eli
13174 Zaretskii in <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9079#29>.
13176 * alloc.c (__malloc_size_t): Remove.
13177 All uses replaced by size_t. See Andreas Schwab's note
13178 <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9079#8>.
13180 * image.c: Improve checking for integer overflow.
13181 (check_image_size): Assume that f is nonnull, since
13182 it is always nonnull in practice. This is one less thing to
13183 worry about when checking for integer overflow later.
13184 (x_check_image_size): New function, which checks for integer
13185 overflow issues inside X.
13186 (x_create_x_image_and_pixmap, xbm_read_bitmap_data): Use it.
13187 This removes the need for a memory_full check.
13188 (xbm_image_p): Rewrite to avoid integer multiplication overflow.
13189 (Create_Pixmap_From_Bitmap_Data, xbm_load): Use x_check_image_size.
13190 (xbm_read_bitmap_data): Change locals back to 'int', since
13191 their values must fit in 'int'.
13192 (xpm_load_image, png_load, tiff_load):
13193 Invoke x_create_x_image_and_pixmap earlier,
13194 to avoid much needless work if the image is too large.
13195 (tiff_load): Treat overly large images as if
13196 x_create_x_image_and_pixmap failed, not as malloc failures.
13197 (gs_load): Use x_check_image_size.
13199 * gtkutil.c: Omit integer casts.
13200 (xg_get_pixbuf_from_pixmap): Remove unnecessary cast.
13201 (xg_set_toolkit_scroll_bar_thumb): Rewrite to avoid need for cast.
13203 * image.c (png_load): Don't assume height * row_bytes fits in 'int'.
13205 * xfaces.c (Fbitmap_spec_p): Fix integer overflow bug.
13206 Without this fix, (bitmap-spec-p '(34359738368 1 "x"))
13207 would wrongly return t on a 64-bit host.
13209 * dispnew.c (init_display): Use *_RANGE_OVERFLOW macros.
13210 The plain *_OVERFLOW macros run afoul of GCC bug 49705
13211 <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49705>
13212 and therefore cause GCC to emit a bogus diagnostic in some cases.
13214 * image.c: Integer signedness and overflow and related fixes.
13215 This is not an exhaustive set of fixes, but it's time to
13216 record what I've got.
13217 (lookup_pixel_color, check_image_size): Remove redundant decls.
13218 (check_image_size): Don't assume that arbitrary EMACS_INT values
13219 fit in 'int', or that arbitrary 'double' values fit in 'int'.
13220 (x_alloc_image_color, x_create_x_image_and_pixmap, png_load)
13221 (tiff_load, imagemagick_load_image):
13222 Check for overflow in size calculations.
13223 (x_create_x_image_and_pixmap): Remove unnecessary test for
13224 xmalloc returning NULL; that can't happen.
13225 (xbm_read_bitmap_data): Don't assume sizes fit into 'int'.
13226 (xpm_color_bucket): Use better integer hashing function.
13227 (xpm_cache_color): Don't possibly over-allocate memory.
13228 (struct png_memory_storage, tiff_memory_source, tiff_seek_in_memory)
13229 (gif_memory_source):
13230 Use ptrdiff_t, not int or size_t, to record sizes.
13231 (png_load): Don't assume values greater than 2**31 fit in 'int'.
13232 (our_stdio_fill_input_buffer): Prefer ptrdiff_t to size_t when
13233 either works, as we prefer signed integers.
13234 (tiff_read_from_memory, tiff_write_from_memory):
13235 Return tsize_t, not size_t, since that's what the TIFF API wants.
13236 (tiff_read_from_memory): Don't fail simply because the read would
13237 go past EOF; instead, return a short read.
13238 (tiff_load): Omit no-longer-needed casts.
13239 (Fimagemagick_types): Don't assume size fits into 'int'.
13241 Improve hashing quality when configured --with-wide-int.
13242 * fns.c (hash_string): New function, taken from sxhash_string.
13243 Do not discard information about ASCII character case; this
13244 discarding is no longer needed.
13245 (sxhash-string): Use it. Change sig to match it. Caller changed.
13246 * lisp.h: Declare it.
13247 * lread.c (hash_string): Remove, since we now use fns.c's version.
13248 The fns.c version returns a wider integer if --with-wide-int is
13249 specified, so this should help the quality of the hashing a bit.
13251 * emacs.c: Integer overflow minor fix.
13252 (heap_bss_diff): Now uprintmax_t, not unsigned long. All used changed.
13253 Define only if GNU_LINUX.
13254 (main, Fdump_emacs): Set and use heap_bss_diff only if GNU_LINUX.
13256 * dispnew.c: Integer signedness and overflow fixes.
13257 Remove unnecessary forward decls, that were a maintenance hassle.
13258 (history_tick): Now uprintmax_t, so it's more likely to avoid overflow.
13260 (adjust_glyph_matrix, realloc_glyph_pool, adjust_frame_message_buffer)
13261 (scrolling_window): Use ptrdiff_t, not int, for byte count.
13262 (prepare_desired_row, line_draw_cost):
13263 Use int, not unsigned, where either works.
13264 (save_current_matrix, restore_current_matrix):
13265 Use ptrdiff_t, not size_t, where either works.
13266 (init_display): Check for overflow more accurately, and without
13267 relying on undefined behavior.
13269 * editfns.c (pWIDE, pWIDElen, signed_wide, unsigned_wide):
13270 Remove, replacing with the new symbols in lisp.h. All uses changed.
13271 * fileio.c (make_temp_name):
13272 * filelock.c (lock_file_1, lock_file):
13273 * xdisp.c (message_dolog):
13274 Don't assume PRIdMAX etc. works; this isn't portable to pre-C99 hosts.
13275 Use pMd etc. instead.
13276 * lisp.h (printmax_t, uprintmax_t, pMd, pMu): New types and macros,
13277 replacing the pWIDE etc. symbols removed from editfns.c.
13279 * keyboard.h (num_input_events): Now uintmax_t.
13280 This is (very slightly) less likely to mess up due to wraparound.
13283 * buffer.c: Integer signedness fixes.
13284 (alloc_buffer_text, enlarge_buffer_text):
13285 Use ptrdiff_t rather than size_t when either will do, as we prefer
13288 * alloc.c: Integer signedness and overflow fixes.
13289 Do not impose an arbitrary 32-bit limit on malloc sizes when debugging.
13290 (__malloc_size_t): Default to size_t, not to int.
13291 (pure_size, pure_bytes_used_before_overflow, stack_copy_size)
13292 (Fgarbage_collect, mark_object_loop_halt, mark_object):
13293 Prefer ptrdiff_t to size_t when either would do, as we prefer
13295 (XMALLOC_OVERRUN_CHECK_OVERHEAD): New macro.
13296 (xmalloc_overrun_check_header, xmalloc_overrun_check_trailer):
13297 Now const. Initialize with values that are in range even if char
13299 (XMALLOC_PUT_SIZE, XMALLOC_GET_SIZE): Remove, replacing with ...
13300 (xmalloc_put_size, xmalloc_get_size): New functions. All uses changed.
13301 These functions do the right thing with sizes > 2**32.
13302 (check_depth): Now ptrdiff_t, not int.
13303 (overrun_check_malloc, overrun_check_realloc, overrun_check_free):
13304 Adjust to new way of storing sizes. Check for size overflow bugs
13306 (STRING_BYTES_MAX): Adjust to new overheads. The old code was
13307 slightly wrong anyway, as it missed one instance of
13308 XMALLOC_OVERRUN_CHECK_OVERHEAD.
13309 (refill_memory_reserve): Omit needless cast to size_t.
13310 (mark_object_loop_halt): Mark as externally visible.
13312 * xselect.c: Integer signedness and overflow fixes.
13313 (Fx_register_dnd_atom, x_handle_dnd_message):
13314 Use ptrdiff_t, not size_t, since we prefer signed.
13315 (Fx_register_dnd_atom): Check for ptrdiff_t (and size_t) overflow.
13316 * xterm.h (struct x_display_info): Use ptrdiff_t, not size_t, for
13317 x_dnd_atoms_size and x_dnd_atoms_length.
13319 * doprnt.c: Prefer signed to unsigned when either works.
13321 * doprnt.c (doprnt):
13323 * xdisp.c (vmessage):
13324 Use ptrdiff_t, not size_t, when using or implementing doprnt,
13325 since the sizes cannot exceed ptrdiff_t bounds anyway, and we
13326 prefer signed arithmetic to avoid comparison confusion.
13327 * doprnt.c (doprnt): Avoid a "+ 1" that can't overflow,
13328 but is a bit tricky.
13330 Assume freestanding C89 headers, string.h, stdlib.h.
13331 * data.c, doprnt.c, floatfns.c, print.c:
13332 Include float.h unconditionally.
13333 * gmalloc.c: Assume C89-at-least behavior for preprocessor,
13334 limits.h, stddef.h, string.h. Use memset instead of 'flood'.
13335 * regex.c: Likewise for stddef.h, string.h.
13336 (ISASCII): Remove; can assume it returns 1 now. All uses removed.
13337 * s/aix4-2.h (HAVE_STRING_H): Remove obsolete undef.
13338 * s/ms-w32.h (HAVE_LIMITS_H, HAVE_STRING_H, HAVE_STDLIB_H)
13339 (STDC_HEADERS): Remove obsolete defines.
13340 * sysdep.c: Include limits.h unconditionally.
13342 Assume support for memcmp, memcpy, memmove, memset.
13343 * lisp.h, sysdep.c (memcmp, memcpy, memmove, memset):
13344 * regex.c (memcmp, memcpy):
13345 Remove; we assume C89 now.
13347 * gmalloc.c (memcpy, memset, memmove): Remove; we assume C89 now.
13348 (__malloc_safe_bcopy): Remove; no longer needed.
13350 * lisp.h (struct vectorlike_header, struct Lisp_Subr): Signed sizes.
13351 Use EMACS_INT, not EMACS_UINT, for sizes. The code works equally
13352 well either way, and we prefer signed to unsigned.
13354 2011-07-27 Lars Magne Ingebrigtsen <larsi@gnus.org>
13356 * gnutls.c (emacs_gnutls_read): Don't message anything if the peer
13357 closes the connection while we're reading (bug#9182).
13359 2011-07-25 Jan Djärv <jan.h.d@swipnet.se>
13361 * nsmenu.m (ns_popup_dialog): Add an "ok" button if no buttons
13362 are specified (Bug#9168).
13364 2011-07-25 Paul Eggert <eggert@cs.ucla.edu>
13366 * bidi.c (bidi_dump_cached_states): Fix printf format mismatch.
13367 Found by GCC static checking and --with-wide-int on a 32-bit host.
13369 2011-07-25 Eli Zaretskii <eliz@gnu.org>
13371 * xdisp.c (compute_display_string_pos): Fix logic of caching
13372 previous display string position. Initialize cached_prev_pos to
13373 -1. Fixes slow-down at the beginning of a buffer.
13375 2011-07-24 Eli Zaretskii <eliz@gnu.org>
13377 * xfaces.c (check_lface_attrs) [HAVE_WINDOW_SYSTEM]: Allow `nil'
13378 for attrs[LFACE_FONTSET_INDEX].
13380 2011-07-23 Paul Eggert <eggert@cs.ucla.edu>
13382 * xml.c (parse_region): Remove unused local
13383 that was recently introduced.
13385 2011-07-23 Eli Zaretskii <eliz@gnu.org>
13387 * xfns.c (unwind_create_frame) [GLYPH_DEBUG]: Adapt to changes in
13388 2008-02-22T17:42:09Z!monnier@iro.umontreal.ca.
13390 * xdisp.c (move_it_in_display_line_to): Record the best matching
13391 position for TO_CHARPOS while scanning the line, and restore it on
13392 exit if none of the characters scanned was an exact match.
13393 Fixes vertical-motion and pos-visible-in-window-p under bidi redisplay
13394 when exact match is impossible due to invisible text, and the
13395 lines are truncated.
13397 2011-07-23 Jan Djärv <jan.h.d@swipnet.se>
13399 * nsterm.m (initFrameFromEmacs): Set NSTitledWindowMask in styleMask
13402 2011-07-22 Eli Zaretskii <eliz@gnu.org>
13404 Fix a significant slow-down of cursor motion with C-n, C-p,
13405 C-f/C-b, and C-v/M-v that couldn't keep up with keyboard
13406 auto-repeat under bidi redisplay in fontified buffers.
13407 * xdisp.c (compute_stop_pos_backwards): New function.
13408 (next_element_from_buffer): Call compute_stop_pos_backwards to
13409 find a suitable prev_stop when we find ourselves before
13411 (reseat): Don't look for prev_stop, as that could mean a very long
13413 <cached_disp_pos, cached_disp_buffer, cached_disp_modiff>
13414 <cached_disp_overlay_modiff>: Cache for last found display string
13416 (compute_display_string_pos): Return the cached position if asked
13417 about the same buffer in the same area of character positions, and
13418 the buffer wasn't changed since the time the display string
13419 position was cached.
13421 2011-07-22 Eli Zaretskii <eliz@gnu.org>
13423 * xdisp.c (rows_from_pos_range): Don't ignore glyphs whose object
13424 is an integer, which is important for empty lines. (Bug#9149)
13426 2011-07-22 Chong Yidong <cyd@stupidchicken.com>
13428 * frame.c (Fmodify_frame_parameters): In tty case, update the
13429 default face if necessary (Bug#4238).
13431 2011-07-21 Chong Yidong <cyd@stupidchicken.com>
13433 * editfns.c (Fstring_to_char): No need to explain what a character
13434 is in the docstring (Bug#6576).
13436 2011-07-20 Lars Magne Ingebrigtsen <larsi@gnus.org>
13438 * xml.c (parse_region): Make sure we always return a tree.
13440 2011-07-20 HAMANO Kiyoto <khiker.mail@gmail.com>
13442 * xml.c (parse_region): If a document contains only comments,
13445 2011-07-20 Lars Magne Ingebrigtsen <larsi@gnus.org>
13447 * xml.c (make_dom): Return comments, too.
13449 2011-07-19 Paul Eggert <eggert@cs.ucla.edu>
13452 See http://lists.gnu.org/archive/html/emacs-devel/2011-07/msg00688.html
13453 and the surrounding thread.
13454 * minibuf.c (read_minibuf_noninteractive): Rewrite to use getchar
13455 rather than fgets, and retry after EINTR. Otherwise, 'emacs
13456 --batch -f byte-compile-file' fails on OpenBSD if an inactivity
13458 * s/openbsd.h (BROKEN_SIGIO): Define.
13459 * unexelf.c (unexec) [__OpenBSD__]:
13460 Don't update the .mdebug section of the Alpha COFF symbol table.
13462 2011-07-19 Lars Magne Ingebrigtsen <larsi@gnus.org>
13464 * lread.c (syms_of_lread): Clarify when `lexical-binding' is used
13467 2011-07-18 Paul Eggert <eggert@cs.ucla.edu>
13469 * fileio.c (Fcopy_file) [!MSDOS]: Tighten created file's mask.
13470 This fixes some race conditions on the permissions of any newly
13473 * alloc.c (valid_pointer_p): Use pipe, not open.
13474 This fixes some permissions issues when debugging.
13476 * fileio.c (Fcopy_file): Adjust mode if fchown fails. (Bug#9002)
13477 If fchown fails to set both uid and gid, try to set just gid,
13478 as that is sometimes allowed. Adjust the file's mode to eliminate
13479 setuid or setgid bits that are inappropriate if fchown fails.
13481 2011-07-18 Stefan Monnier <monnier@iro.umontreal.ca>
13483 * xdisp.c (next_element_from_string, next_element_from_buffer): Use EQ
13484 to compare Lisp_Objects.
13485 * gnutls.c (syms_of_gnutls): Rename Vgnutls_log_level to
13486 global_gnutls_log_level, don't mistake it for a Lisp_Object.
13487 (init_gnutls_functions, emacs_gnutls_handle_error): Fix up uses.
13489 2011-07-17 Andreas Schwab <schwab@linux-m68k.org>
13491 * lread.c (read_integer): Unread even EOF character.
13492 (read1): Likewise. Properly record start position of symbol.
13494 * lread.c (read1): Read `#:' as empty uninterned symbol if no
13495 symbol character follows.
13497 2011-07-17 Paul Eggert <eggert@cs.ucla.edu>
13499 * fileio.c (Fcopy_file): Pacify gcc re fchown. (Bug#9002)
13500 This works around a problem with the previous change to Fcopy_file.
13501 Recent glibc declares fchown with __attribute__((warn_unused_result)),
13502 and without this change, GCC might complain about discarding
13503 fchown's return value.
13505 2011-07-16 Juanma Barranquero <lekktu@gmail.com>
13507 * makefile.w32-in (GLOBAL_SOURCES): Add gnutls.c (followup to bug#9059).
13509 2011-07-16 Paul Eggert <eggert@cs.ucla.edu>
13511 * fileio.c (Fcopy_file): Don't diagnose fchown failures. (Bug#9002)
13513 2011-07-16 Lars Magne Ingebrigtsen <larsi@gnus.org>
13515 * gnutls.c (syms_of_gnutls): Define `gnutls-log-level' here, since
13516 it's used from the C level.
13518 * process.c: Use the same condition for POLL_FOR_INPUT in both
13519 keyboard.c and process.c (bug#1858).
13521 2011-07-09 Lawrence Mitchell <wence@gmx.li>
13523 * gnutls.c (Qgnutls_bootprop_min_prime_bits): New variable.
13524 (Fgnutls_boot): Use it.
13526 2011-07-15 Andreas Schwab <schwab@linux-m68k.org>
13528 * doc.c (Fsubstitute_command_keys): Revert last change.
13530 2011-07-15 Lars Magne Ingebrigtsen <larsi@gnus.org>
13532 * doc.c (Fsubstitute_command_keys): Clarify that \= really only
13533 quotes the next character, and doesn't affect other longer
13534 sequences (bug#8935).
13536 * lread.c (syms_of_lread): Clarify that is isn't only
13537 `eval-buffer' and `eval-defun' that's affected by
13538 `lexical-binding' (bug#8460).
13540 2011-07-15 Eli Zaretskii <eliz@gnu.org>
13542 * xdisp.c (move_it_in_display_line_to): Fix vertical motion with
13543 bidi redisplay when a line includes both an image and is truncated.
13545 2011-07-14 Paul Eggert <eggert@cs.ucla.edu>
13547 Fix minor problems found by static checking.
13548 * bidi.c (bidi_cache_size): Now EMACS_INT, not size_t.
13549 (elsz): Now a signed constant, not a size_t var. We prefer signed
13550 types to unsigned, to avoid integer comparison confusion. Without
13551 this change, GCC 4.6.1 with -Wunsafe-loop-optimizations complains
13552 "cannot optimize loop, the loop counter may overflow", a symptom
13554 * indent.c (Fvertical_motion): Mark locals as initialized.
13555 * xdisp.c (reseat_to_string): Fix pointer signedness issue.
13557 2011-07-14 Lars Magne Ingebrigtsen <larsi@gnus.org>
13559 * search.c (Fre_search_backward): Mention `case-fold-search' in
13560 all the re_search_* functions (bug#8138).
13562 * keyboard.c (Fopen_dribble_file): Document when the file is
13565 2011-07-14 Eli Zaretskii <eliz@gnu.org>
13567 * bidi.c (bidi_dump_cached_states): Fix format of displaying
13570 Support bidi reordering of display and overlay strings.
13571 * xdisp.c (compute_display_string_pos)
13572 (compute_display_string_end): Accept additional argument STRING.
13573 (init_iterator, reseat_1): Initialize bidi_it->string.s to NULL.
13574 (reseat_to_string): Initialize bidi_it->string.s and
13575 bidi_it->string.schars.
13576 (Fcurrent_bidi_paragraph_direction): Initialize itb.string.s to
13577 NULL (avoids a crash in bidi_paragraph_init).
13578 Initialize itb.string.lstring.
13579 (init_iterator): Call bidi_init_it only of a valid
13580 buffer position was specified. Initialize paragraph_embedding to
13582 (reseat_to_string): Initialize the bidi iterator.
13583 (display_string): If we need to ignore text properties of
13584 LISP_STRING, set IT->stop_charpos to IT->end_charpos. (The
13585 original value of -1 will not work with bidi.)
13586 (compute_display_string_pos): First arg is now struct
13587 `text_pos *'; all callers changed. Support display properties on
13589 (compute_display_string_end): Support display properties on Lisp
13591 (init_iterator, reseat_1, reseat_to_string): Initialize the
13592 string.bufpos member to 0 (zero, for compatibility with IT_CHARPOS
13593 when iterating on a string not from display properties).
13594 (compute_display_string_pos, compute_display_string_end):
13595 Fix calculation of the object to scan. Fixes an error when using
13597 (next_element_from_buffer): Don't abort when IT_CHARPOS is before
13598 base_level_stop; instead, set base_level_stop to BEGV.
13599 Fixes crashes in vertical-motion.
13600 (next_element_from_buffer): Improve commentary for when
13601 the iterator is before prev_stop.
13602 (init_iterator): Initialize bidi_p from the default value of
13603 bidi-display-reordering, not from buffer-local value. Use the
13604 buffer-local value only if initializing for buffer iteration.
13605 (handle_invisible_prop): Support invisible properties on strings
13606 that are being bidi-reordered.
13607 (set_iterator_to_next): Support bidi reordering of C strings and
13609 (next_element_from_string): Support bidi reordering of Lisp
13611 (handle_stop_backwards): Support Lisp strings as well.
13612 (display_string): Support display of R2L glyph rows.
13613 Use IT_STRING_CHARPOS when displaying from a Lisp string.
13614 (init_iterator): Don't initialize it->bidi_p for strings
13616 (reseat_to_string): Initialize it->bidi_p for strings here.
13617 (next_element_from_string, next_element_from_c_string)
13618 (next_element_from_buffer): Add xassert's for correspondence
13619 between IT's object being iterated and it->bidi_it.string
13621 (face_before_or_after_it_pos): Support bidi iteration.
13622 (next_element_from_c_string): Handle the case of the first string
13623 character that is not the first one in the visual order.
13624 (get_visually_first_element): New function, refactored from common
13625 parts of next_element_from_buffer, next_element_from_string, and
13626 next_element_from_c_string.
13627 (tool_bar_lines_needed, redisplay_tool_bar)
13628 (display_menu_bar): Force left-to-right direction. Add a FIXME
13629 comment for making that be controlled by a user option.
13630 (push_it, pop_it): Save and restore the state of the
13631 bidi iterator. Save and restore the bidi_p flag.
13632 (pop_it): Iterate out of display property for string iteration as
13634 (iterate_out_of_display_property): Support iteration over strings.
13635 (handle_single_display_spec): Set up it->bidi_it for iteration
13636 over a display string, and call bidi_init_it.
13637 (handle_single_display_spec, next_overlay_string)
13638 (get_overlay_strings_1, push_display_prop): Set up the bidi
13639 iterator for displaying display or overlay strings.
13640 (forward_to_next_line_start): Don't use the shortcut if
13642 (back_to_previous_visible_line_start): If handle_display_prop
13643 pushed the iterator stack, restore the internal state of the bidi
13644 iterator by calling bidi_pop_it same number of times.
13645 (reseat_at_next_visible_line_start): If ON_NEWLINE_P is non-zero,
13646 and we are bidi-iterating, don't decrement the iterator position;
13647 instead, set the first_elt flag in the bidi iterator, to produce
13649 (reseat_1): Remove redundant setting of string_from_display_prop_p.
13650 (push_display_prop): xassert that we are iterating a buffer.
13651 (push_it, pop_it): Save and restore paragraph_embedding member.
13652 (handle_single_display_spec, next_overlay_string)
13653 (get_overlay_strings_1, reseat_1, reseat_to_string)
13654 (push_display_prop): Set up the `unibyte' member of bidi_it.string
13655 correctly. Don't assume unibyte strings are not bidi-reordered.
13656 (compute_display_string_pos)
13657 (compute_display_string_end): Fix handling the case of C string.
13658 (push_it, pop_it): Save and restore from_disp_prop_p.
13659 (handle_single_display_spec, push_display_prop): Set the
13660 from_disp_prop_p flag.
13661 (get_overlay_strings_1): Reset the from_disp_prop_p flag.
13662 (pop_it): Call iterate_out_of_display_property only if we are
13663 popping after iteration over a string that came from a display
13664 property. Fix a typo in popping stretch info. Add an assertion
13665 for verifying that the iterator position is in sync with the bidi
13667 (handle_single_display_spec, get_overlay_strings_1)
13668 (push_display_prop): Fix initialization of paragraph direction for
13669 string when that of the parent object is not yet determined.
13670 (reseat_1): Call bidi_init_it to resync the bidi
13671 iterator with IT's position. (Bug#7616)
13672 (find_row_edges): If ROW->start.pos gives position
13673 smaller than min_pos, use it as ROW->minpos. (Bug#7616)
13674 (handle_stop, back_to_previous_visible_line_start, reseat_1):
13675 Reset the from_disp_prop_p flag.
13676 (SAVE_IT, RESTORE_IT): New macros.
13677 (pos_visible_p, face_before_or_after_it_pos)
13678 (back_to_previous_visible_line_start)
13679 (move_it_in_display_line_to, move_it_in_display_line)
13680 (move_it_to, move_it_vertically_backward, move_it_by_lines)
13681 (try_scrolling, redisplay_window, display_line): Use them when
13682 saving a temporary copy of the iterator and restoring it back.
13683 (back_to_previous_visible_line_start, reseat_1)
13684 (init_iterator): Empty the bidi cache "stack".
13685 (move_it_in_display_line_to): If iterator ended up at
13686 EOL, but we never saw any buffer positions smaller than
13687 to_charpos, return MOVE_POS_MATCH_OR_ZV. Fixes vertical cursor
13688 motion in bidi-reordered lines.
13689 (move_it_in_display_line_to): Record prev_method and prev_pos
13690 immediately before the call to set_iterator_to_next. Fixes cursor
13691 motion in bidi-reordered lines with stretch glyphs and strings
13692 displayed in margins. (Bug#8133) (Bug#8867)
13693 Return MOVE_POS_MATCH_OR_ZV only if iterator position is past
13695 (pos_visible_p): Support positions in bidi-reordered lines.
13696 Save and restore bidi cache.
13698 * bidi.c (bidi_level_of_next_char): clen should be EMACS_NT, not int.
13699 (bidi_paragraph_info): Delete unused struct.
13700 (bidi_cache_idx, bidi_cache_last_idx): Declare EMACS_INT.
13701 (bidi_cache_start): New variable.
13702 (bidi_cache_reset): Reset bidi_cache_idx to bidi_cache_start, not
13704 (bidi_cache_fetch_state, bidi_cache_search)
13705 (bidi_cache_find_level_change, bidi_cache_iterator_state)
13706 (bidi_cache_find, bidi_peek_at_next_level)
13707 (bidi_level_of_next_char, bidi_find_other_level_edge)
13708 (bidi_move_to_visually_next): Compare cache index with
13709 bidi_cache_start rather than with zero.
13710 (bidi_fetch_char): Accept new argument STRING; all callers
13711 changed. Support iteration over a string. Support strings with
13712 display properties. Support unibyte strings. Fix the type of
13713 `len' according to what STRING_CHAR_AND_LENGTH expects.
13714 (bidi_paragraph_init, bidi_resolve_explicit_1)
13715 (bidi_resolve_explicit, bidi_resolve_weak)
13716 (bidi_level_of_next_char, bidi_move_to_visually_next):
13717 Support iteration over a string.
13718 (bidi_set_sor_type, bidi_resolve_explicit_1)
13719 (bidi_resolve_explicit, bidi_type_of_next_char): ignore_bn_limit
13720 can now be zero (for strings); special values 0 and -1 were
13721 changed to -1 and -2, respectively.
13722 (bidi_char_at_pos): New function.
13723 (bidi_paragraph_init, bidi_resolve_explicit, bidi_resolve_weak):
13724 Call it instead of FETCH_MULTIBYTE_CHAR.
13725 (bidi_move_to_visually_next): Abort if charpos or bytepos were not
13726 initialized to valid values.
13727 (bidi_init_it): Don't initialize charpos and bytepos with invalid
13729 (bidi_level_of_next_char): Allow the sentinel "position" to pass
13730 the test for valid cached positions. Fix the logic for looking up
13731 the sentinel state in the cache. GCPRO the Lisp string we are
13733 (bidi_push_it, bidi_pop_it): New functions.
13734 (bidi_initialize): Initialize the bidi cache start stack pointer.
13735 (bidi_cache_ensure_space): New function, refactored from part of
13736 bidi_cache_iterator_state. Don't assume the required size is just
13737 one BIDI_CACHE_CHUNK away.
13738 (bidi_cache_start_stack, bidi_push_it): Use IT_STACK_SIZE.
13739 (bidi_count_bytes, bidi_char_at_pos): New functions.
13740 (bidi_cache_search): Don't assume bidi_cache_last_idx is
13741 always valid if bidi_cache_idx is valid.
13742 (bidi_cache_find_level_change): xassert that bidi_cache_last_idx
13743 is valid if it's going to be used.
13744 (bidi_shelve_cache, bidi_unshelve_cache): New functions.
13745 (bidi_cache_fetch_state, bidi_cache_search)
13746 (bidi_cache_find_level_change, bidi_cache_ensure_space)
13747 (bidi_cache_iterator_state, bidi_cache_find)
13748 (bidi_find_other_level_edge, bidi_cache_start_stack):
13749 All variables related to cache indices are now EMACS_INT.
13751 * dispextern.h (struct bidi_string_data): New structure.
13752 (struct bidi_it): New member `string'. Make flag members be 1-bit
13753 fields, and put them last in the struct.
13754 (compute_display_string_pos, compute_display_string_end):
13756 (bidi_push_it, bidi_pop_it): Add prototypes.
13757 (struct iterator_stack_entry): New members bidi_p,
13758 paragraph_embedding, and from_disp_prop_p.
13759 (struct it): Member bidi_p is now a bit field 1 bit wide.
13760 (bidi_shelve_cache, bidi_unshelve_cache):
13761 Declare prototypes.
13763 * .gdbinit (xvectype, xvector, xcompiled, xchartable, xboolvector)
13764 (xpr, xfont, xbacktrace): Use "header.size" when accessing vectors
13765 and vector-like objects.
13767 * dispnew.c (buffer_posn_from_coords): Save and restore the bidi
13768 cache around display iteration.
13770 * window.c (Fwindow_end, window_scroll_pixel_based)
13771 (displayed_window_lines, Frecenter): Save and restore the bidi
13772 cache around display iteration.
13774 2011-07-14 Lars Magne Ingebrigtsen <larsi@gnus.org>
13776 * editfns.c (Fdelete_region): Clarify the use of the named
13777 parameters (bug#6788).
13779 2011-07-14 Martin Rudalics <rudalics@gmx.at>
13781 * indent.c (Fvertical_motion): Set and restore w->pointm when
13782 saving and restoring the window's buffer (Bug#9006).
13784 2011-07-13 Lars Magne Ingebrigtsen <larsi@gnus.org>
13786 * editfns.c (Fstring_to_char): Clarify just what is returned
13787 (bug#6576). Text by Eli Zaretskii.
13789 2011-07-13 Juanma Barranquero <lekktu@gmail.com>
13791 * gnutls.c (init_gnutls_functions): Honor gnutls_log_level (bug#9059).
13793 2011-07-13 Eli Zaretskii <eliz@gnu.org>
13795 * buffer.c (mmap_find): Fix a typo.
13797 2011-07-13 Johan Bockgård <bojohan@gnu.org>
13799 Fix execution of x selection hooks.
13800 * xselect.c (Qx_lost_selection_functions)
13801 (Qx_sent_selection_functions): New vars.
13802 (syms_of_xselect): DEFSYM them.
13803 (x_handle_selection_request): Pass Qx_sent_selection_functions
13804 rather than Vx_sent_selection_functions to Frun_hook_with_args.
13805 (x_handle_selection_clear,x_clear_frame_selections):
13806 Pass Qx_lost_selection_functions rather than
13807 Vx_lost_selection_functions to Frun_hook_with_args.
13809 2011-07-13 Paul Eggert <eggert@cs.ucla.edu>
13811 * buffer.c (Fget_buffer_create): Initialize inhibit_shrinking.
13812 The old code sometimes used this field without initializing it.
13814 * alloc.c (gc_sweep): Don't read past end of array.
13815 In theory, the old code could also have corrupted Emacs internals,
13816 though it'd be very unlikely.
13818 2011-07-12 Andreas Schwab <schwab@linux-m68k.org>
13820 * character.c (Fcharacterp): Don't advertise optional ignored
13821 argument. (Bug#4026)
13823 2011-07-12 Lars Magne Ingebrigtsen <larsi@gnus.org>
13825 * keymap.c (syms_of_keymap): Clarify that "modifier" is "modifier
13828 * window.c (Fset_window_start): Doc fix (bug#4199).
13829 (Fset_window_hscroll): Ditto.
13831 2011-07-12 Paul Eggert <eggert@cs.ucla.edu>
13833 Fix minor new problems caught by GCC 4.6.1.
13834 * term.c (init_tty): Remove unused local.
13835 * xsettings.c (store_monospaced_changed): Define this function only
13836 if (defined HAVE_GSETTINGS || defined HAVE_GCONF), as it's
13837 not used otherwise.
13839 2011-07-12 Chong Yidong <cyd@stupidchicken.com>
13841 * xdisp.c (Vresize_mini_windows): Minor doc fix (Bug#3300).
13843 2011-07-11 Lars Magne Ingebrigtsen <larsi@gnus.org>
13845 * xdisp.c (syms_of_xdisp): Make it explicit that the mini-windows
13846 are the mini-buffer and the echo area (bug#3320).
13848 * term.c (init_tty): Remove support for supdup, c10 and perq
13849 terminals, which are no longer supported (bug#1482).
13851 2011-07-10 Johan Bockgård <bojohan@gnu.org>
13853 * xdisp.c (Ftool_bar_lines_needed): Fix WINDOWP check.
13855 2011-07-10 Jan Djärv <jan.h.d@swipnet.se>
13857 * xmenu.c (menu_highlight_callback): Only pass frame to show_help_event
13858 for non-popups (Bug#3642).
13860 2011-07-10 Andreas Schwab <schwab@linux-m68k.org>
13862 * alloc.c (reset_malloc_hooks): Protoize.
13863 * buffer.c (mmap_init, mmap_find, mmap_free_1, mmap_enlarge)
13864 (mmap_set_vars, mmap_alloc, mmap_free, mmap_realloc): Likewise.
13865 * cm.c (losecursor): Likewise.
13866 * data.c (fmod): Likewise.
13867 * dispnew.c (swap_glyphs_in_rows): Likewise.
13868 * emacs.c (memory_warning_signal): Likewise.
13869 * floatfns.c (float_error): Likewise.
13870 * font.c (check_gstring, check_otf_features, otf_tag_symbol)
13871 (otf_open, font_otf_capability, generate_otf_features)
13872 (font_otf_DeviceTable, font_otf_ValueRecord, font_otf_Anchor):
13874 * image.c (pbm_read_file): Likewise.
13875 * indent.c (string_display_width): Likewise.
13876 * intervals.c (check_for_interval, search_for_interval)
13877 (inc_interval_count, count_intervals, root_interval)
13878 (adjust_intervals_for_insertion, make_new_interval): Likewise.
13879 * lread.c (defalias): Likewise.
13880 * ralloc.c (r_alloc_check): Likewise.
13881 * regex.c (set_image_of_range_1, set_image_of_range)
13882 (regex_grow_registers): Likewise.
13883 * sysdep.c (strerror): Likewise.
13884 * termcap.c (valid_filename_p, tprint, main): Likewise.
13885 * tparam.c (main): Likewise.
13886 * unexhp9k800.c (run_time_remap, save_data_space)
13887 (update_file_ptrs, read_header, write_header, calculate_checksum)
13888 (copy_file, copy_rest, display_header): Likewise.
13889 * widget.c (mark_shell_size_user_specified, create_frame_gcs):
13891 * xdisp.c (check_it): Likewise.
13892 * xfaces.c (register_color, unregister_color, unregister_colors):
13894 * xfns.c (print_fontset_result): Likewise.
13895 * xrdb.c (member, fatal, main): Likewise.
13897 2011-07-10 Paul Eggert <eggert@cs.ucla.edu>
13899 Fix minor problems found by static checking (Bug#9031).
13900 * chartab.c (char_table_set_range, map_sub_char_table):
13901 Remove unused locals.
13902 (uniprop_table): Now static.
13903 * composite.c (_work_char): Remove unused static var.
13905 2011-07-09 Juanma Barranquero <lekktu@gmail.com>
13907 * chartab.c (uniprop_table_uncompress): Remove unused local variable.
13909 2011-07-09 Jan Djärv <jan.h.d@swipnet.se>
13911 * gtkutil.c (qttip_cb): Remove code without function.
13913 2011-07-09 Eli Zaretskii <eliz@gnu.org>
13915 * w32.c (pthread_sigmask): New stub.
13917 2011-07-08 Paul Eggert <eggert@cs.ucla.edu>
13919 Use pthread_sigmask, not sigprocmask (Bug#9010).
13920 sigprocmask is portable only for single-threaded applications, and
13921 Emacs can be multi-threaded when it uses GTK.
13922 * Makefile.in (LIB_PTHREAD_SIGMASK): New macro.
13924 * callproc.c (Fcall_process):
13925 * process.c (create_process):
13926 * sysdep.c (sys_sigblock, sys_sigunblock, sys_sigsetmask):
13927 Use pthread_sigmask, not sigprocmask.
13929 2011-07-08 Jan Djärv <jan.h.d@swipnet.se>
13931 * gtkutil.c (qttip_cb): Set line wrap to FALSE for tooltip widget.
13932 (xg_prepare_tooltip): Revert text in x->ttip_lbl, margins was
13935 2011-07-08 Jan Djärv <jan.h.d@swipnet.se>
13937 * gtkutil.c (xg_prepare_tooltip): Fix indentation and comment.
13938 Put text in x->ttip_lbl instead of gtk_tooltip_set_text (Bug#8591).
13939 (xg_hide_tooltip): Fix comment.
13941 * nsterm.m (initFrameFromEmacs): Don't use ns_return_types
13942 in registerServicesMenuSendTypes.
13943 (validRequestorForSendType): Don't check ns_return_types.
13945 * nsfns.m (Fx_open_connection): Put NSStringPboardType into
13948 2011-07-08 Jason Rumney <jasonr@gnu.org>
13950 * w32term.c (x_make_frame_visible): Use SH_SHOWNORMAL rather than
13951 SH_SHOW for hidden windows (Bug#5482).
13953 * w32fns.c (w32_wnd_proc) [WM_TIMER, WM_SET_CURSOR]: Avoid using
13954 frame struct members of non-existent frames (Bug#6284).
13956 2011-07-08 Jan Djärv <jan.h.d@swipnet.se>
13958 * nsterm.m (keyDown): Call to wantsToDelayTextChangeNotifications and
13959 variable firstTime not needed on OSX >= 10.6.
13960 (setPosition): setFloatValue:knobProportion: is deprecated on OSX
13961 >= 10.5. Use setKnobProportion, setDoubleValue.
13963 * nsterm.h (MAC_OS_X_VERSION_10_3, MAC_OS_X_VERSION_10_4)
13964 (MAC_OS_X_VERSION_10_5): Define if not defined.
13965 (EmacsView, EmacsTooltip): Implements NSWindowDelegate on OSX >= 10.6.
13966 (EmacsMenu): Implements NSMenuDelegate on OSX >= 10.6.
13967 (EmacsToolbar): Implements NSToolbarDelegate on OSX >= 10.6.
13969 * nsselect.m (ns_string_from_pasteboard): Don't use deprecated methods
13970 cString and lossyCString on OSX >= 10.4.
13972 * nsmenu.m (fillWithWidgetValue): Don't use deprecated method
13973 sizeToFit on OSX >= 10.2.
13975 * nsimage.m (allocInitFromFile): Don't use deprecated method
13976 bestRepresentationForDevice on OSX >= 10.6.
13978 * nsfns.m (check_ns_display_info): Cast to long and use %ld in error
13981 * emacs.c: Declare unexec_init_emacs_zone.
13983 * nsgui.h: Fix compiler warning about gnulib redefining verify.
13985 * nsselect.m (ns_get_local_selection): Change to extern (Bug#8842).
13987 * nsmenu.m (ns_update_menubar): Remove useless setDelegate call
13988 on svcsMenu (Bug#8842).
13990 * nsfns.m (Fx_open_connection): Remove NSStringPboardType from
13992 (Fns_list_services): Just return Qnil on 10.6, code not working there.
13994 * nsterm.m (QUTF8_STRING): Declare.
13995 (initFrameFromEmacs): Call registerServicesMenuSendTypes.
13996 (validRequestorForSendType): Return type is (id).
13997 Change indexOfObjectIdenticalTo to indexOfObject.
13998 Check if we have local selection before returning self (Bug#8842).
13999 (writeSelectionToPasteboard): Put local selection into paste board
14000 if we have a local selection (Bug#8842).
14001 (syms_of_nsterm): DEFSYM QUTF8_STRING.
14003 * nsterm.h (MAC_OS_X_VERSION_10_6): Define here instead of nsterm.m.
14004 (ns_get_local_selection): Declare.
14006 2011-07-07 Lars Magne Ingebrigtsen <larsi@gnus.org>
14008 * keymap.c (describe_map_tree): Don't insert a double newline at
14009 the end of the buffer (bug#1169) and return whether we inserted
14012 * callint.c (Fcall_interactively): Change "reading args" to
14013 "providing args" to try to clarify what it does (bug#1010).
14015 2011-07-07 Kenichi Handa <handa@m17n.org>
14017 * composite.c (composition_compute_stop_pos): Ignore a static
14018 composition starting before CHARPOS (Bug#8915).
14020 * xdisp.c (handle_composition_prop): Likewise.
14022 2011-07-07 Eli Zaretskii <eliz@gnu.org>
14024 * term.c (produce_glyphs) <xassert>: Allow IT_GLYPHLESS in it->what.
14027 2011-07-07 Kenichi Handa <handa@m17n.org>
14029 * character.h (unicode_category_t): New enum type.
14031 * chartab.c (uniprop_decoder_t, uniprop_encoder_t): New types.
14032 (Qchar_code_property_table): New variable.
14033 (UNIPROP_TABLE_P, UNIPROP_GET_DECODER)
14034 (UNIPROP_COMPRESSED_FORM_P): New macros.
14035 (char_table_ascii): Uncompress the compressed values.
14036 (sub_char_table_ref): New arg is_uniprop. Callers changed.
14037 Uncompress the compressed values.
14038 (sub_char_table_ref_and_range): Likewise.
14039 (char_table_ref_and_range): Uncompress the compressed values.
14040 (sub_char_table_set): New arg is_uniprop. Callers changed.
14041 Uncompress the compressed values.
14042 (sub_char_table_set_range): Args changed. Callers changed.
14043 (char_table_set_range): Adjuted for the above change.
14044 (map_sub_char_table): Delete args default_val and parent. Add arg
14045 top. Give decoded values to a Lisp function.
14046 (map_char_table): Adjust for the above change. Give decoded
14047 values to a Lisp function. Gcpro more variables.
14048 (uniprop_table_uncompress)
14049 (uniprop_decode_value_run_length): New functions.
14050 (uniprop_decoder, uniprop_decoder_count): New variables.
14051 (uniprop_get_decoder, uniprop_encode_value_character)
14052 (uniprop_encode_value_run_length, uniprop_encode_value_numeric):
14054 (uniprop_encoder, uniprop_encoder_count): New variables.
14055 (uniprop_get_encoder, uniprop_table)
14056 (Funicode_property_table_internal, Fget_unicode_property_internal)
14057 (Fput_unicode_property_internal): New functions.
14058 (syms_of_chartab): DEFSYM Qchar_code_property_table, defsubr
14059 Sunicode_property_table_internal, Sget_unicode_property_internal,
14060 and Sput_unicode_property_internal. Defvar_lisp
14061 char-code-property-alist.
14063 * composite.c (CHAR_COMPOSABLE_P): Adjust for the change of
14064 Vunicode_category_table.
14066 * font.c (font_range): Adjust for the change of
14067 Vunicode_category_table.
14069 2011-07-07 Dan Nicolaescu <dann@ics.uci.edu>
14071 * m/iris4d.h: Remove file, move contents ...
14072 * s/irix6-5.h: ... here.
14074 2011-07-06 Paul Eggert <eggert@cs.ucla.edu>
14076 Remove unportable assumption about struct layout (Bug#8884).
14077 * alloc.c (mark_buffer):
14078 * buffer.c (reset_buffer_local_variables, Fbuffer_local_variables)
14079 (clone_per_buffer_values): Don't assume that
14080 sizeof (struct buffer) is a multiple of sizeof (Lisp_Object).
14081 This isn't true in general, and it's particularly not true
14082 if Emacs is configured with --with-wide-int.
14083 * buffer.h (FIRST_FIELD_PER_BUFFER, LAST_FIELD_PER_BUFFER):
14084 New macros, used in the buffer.c change.
14086 2011-07-05 Jan Djärv <jan.h.d@swipnet.se>
14088 * xsettings.c: Use both GConf and GSettings if both are available.
14089 (store_config_changed_event): Add comment.
14090 (dpyinfo_valid, store_font_name_changed, map_tool_bar_style)
14091 (store_tool_bar_style_changed): New functions.
14092 (store_monospaced_changed): Add comment. Call dpyinfo_valid.
14093 (struct xsettings): Move font inside HAVE_XFT.
14094 (GSETTINGS_TOOL_BAR_STYLE, GSETTINGS_FONT_NAME): New defines.
14095 (GSETTINGS_MONO_FONT): Rename from SYSTEM_MONO_FONT.
14096 Move inside HAVE_XFT.
14097 (something_changed_gsettingsCB): Rename from something_changedCB.
14098 Check for changes in GSETTINGS_TOOL_BAR_STYLE and GSETTINGS_FONT_NAME
14100 (GCONF_TOOL_BAR_STYLE, GCONF_FONT_NAME): New defines.
14101 (GCONF_MONO_FONT): Rename from SYSTEM_MONO_FONT. Move inside HAVE_XFT.
14102 (something_changed_gconfCB): Rename from something_changedCB.
14103 Check for changes in GCONF_TOOL_BAR_STYLE and GCONF_FONT_NAME also.
14104 (parse_settings): Move check for font inside HAVE_XFT.
14105 (read_settings, apply_xft_settings): Add comment.
14106 (read_and_apply_settings): Add comment. Call map_tool_bar_style and
14107 store_tool_bar_style_changed. Move check for font inside HAVE_XFT and
14108 call store_font_name_changed.
14109 (xft_settings_event): Add comment.
14110 (init_gsettings): Add comment. Get values for GSETTINGS_TOOL_BAR_STYLE
14111 and GSETTINGS_FONT_NAME. Move check for fonts within HAVE_XFT.
14112 (init_gconf): Add comment. Get values for GCONF_TOOL_BAR_STYLE
14113 and GCONF_FONT_NAME. Move check for fonts within HAVE_XFT.
14114 (xsettings_initialize): Call init_gsettings last.
14115 (xsettings_get_system_font, xsettings_get_system_normal_font):
14118 2011-07-05 Paul Eggert <eggert@cs.ucla.edu>
14120 Random fixes. E.g., (random) never returned negative values.
14121 * fns.c (Frandom): Use GET_EMACS_TIME for random seed, and add the
14122 subseconds part to the entropy, as that's a bit more random.
14123 Prefer signed to unsigned, since the signedness doesn't matter and
14124 in general we prefer signed. When given a limit, use a
14125 denominator equal to INTMASK + 1, not to VALMASK + 1, because the
14126 latter isn't right if USE_2_TAGS_FOR_INTS.
14127 * sysdep.c (get_random): Return a value in the range 0..INTMASK,
14128 not 0..VALMASK. Don't discard "excess" bits that random () returns.
14130 2011-07-04 Stefan Monnier <monnier@iro.umontreal.ca>
14132 * textprop.c (text_property_stickiness):
14133 Obey Vtext_property_default_nonsticky.
14134 (syms_of_textprop): Add `display' to Vtext_property_default_nonsticky.
14135 * w32fns.c (syms_of_w32fns):
14136 * xfns.c (syms_of_xfns): Don't Add `display' since it's there by default.
14138 2011-07-04 Paul Eggert <eggert@cs.ucla.edu>
14140 * fileio.c (barf_or_query_if_file_exists): Use S_ISDIR.
14141 This is more efficient than Ffile_directory_p and avoids a minor race.
14143 2011-07-04 Lars Magne Ingebrigtsen <larsi@gnus.org>
14145 * buffer.c (Foverlay_put): Say what the return value is
14148 * fileio.c (barf_or_query_if_file_exists): Check first if the file
14149 is a directory before asking whether to use the file name
14151 (barf_or_query_if_file_exists): Make the "File is a directory"
14152 error be more correct.
14154 * fns.c (Frequire): Remove the mention of the .gz files, since
14155 that's installation-specific, but keep the mention of
14156 `get-load-suffixes'.
14158 2011-07-04 Paul Eggert <eggert@cs.ucla.edu>
14160 * editfns.c (Fformat_time_string): Don't assume strlen fits in int.
14161 Report string overflow if the output is too long.
14163 2011-07-04 Juanma Barranquero <lekktu@gmail.com>
14165 * gnutls.c (Fgnutls_boot): Don't mention :verify-error.
14166 (syms_of_gnutls): Remove duplicate DEFSYM for
14167 Qgnutls_bootprop_verify_hostname_error, an error for
14168 Qgnutls_bootprop_verify_error (which is no longer used).
14170 * eval.c (find_handler_clause): Remove parameters `sig' and `data',
14171 unused since 2011-01-26T20:02:07Z!monnier@iro.umontreal.ca. All callers changed.
14172 Also (re)move comments that are misplaced or no longer relevant.
14174 2011-07-03 Lars Magne Ingebrigtsen <larsi@gnus.org>
14176 * callint.c (Finteractive): Clarify the meaning of "@" (bug#8813).
14178 2011-07-03 Chong Yidong <cyd@stupidchicken.com>
14180 * xfaces.c (Finternal_merge_in_global_face): Modify the foreground
14181 and background color parameters if they have been changed.
14183 2011-07-03 Lars Magne Ingebrigtsen <larsi@gnus.org>
14185 * editfns.c (Fformat): Clarify the - and 0 flags (bug#6659).
14187 2011-07-03 Paul Eggert <eggert@cs.ucla.edu>
14189 * xsettings.c (SYSTEM_FONT): Define only when used.
14190 No need to define when HAVE_GSETTINGS || !HAVE_XFT.
14192 * keymap.c (access_keymap_1): Now static.
14194 2011-07-02 Chong Yidong <cyd@stupidchicken.com>
14196 * keyboard.c (command_loop_1): If a down-mouse event is unbound,
14197 leave any prefix arg for the up event (Bug#1586).
14199 2011-07-02 Lars Magne Ingebrigtsen <larsi@gnus.org>
14201 * lread.c (syms_of_lread): Mention single symbols defined by
14202 `defvar' or `defconst' (bug#7154).
14204 * fns.c (Frequire): Mention .el.gz files (bug#7314).
14205 (Frequire): Mention get-load-suffixes.
14207 2011-07-02 Martin Rudalics <rudalics@gmx.at>
14209 * window.h (window): Remove clone_number slot.
14210 * window.c (Fwindow_clone_number, Fset_window_clone_number):
14212 (make_parent_window, make_window, saved_window)
14213 (Fset_window_configuration, save_window_save): Don't deal with
14215 * buffer.c (Qclone_number): Remove declaration.
14216 (sort_overlays, overlay_strings): Don't deal with clone numbers.
14218 2011-07-02 Stefan Monnier <monnier@iro.umontreal.ca>
14220 Add multiple inheritance to keymaps.
14221 * keymap.c (Fmake_composed_keymap): New function.
14222 (Fset_keymap_parent): Simplify.
14223 (fix_submap_inheritance): Remove.
14224 (access_keymap_1): New function extracted from access_keymap to handle
14225 embedded parents and handle lists of maps.
14226 (access_keymap): Use it.
14227 (Fkeymap_prompt, map_keymap_internal, map_keymap, store_in_keymap)
14228 (Fcopy_keymap): Handle embedded parents.
14229 (Fcommand_remapping, define_as_prefix): Simplify.
14230 (Fkey_binding): Simplify.
14231 (syms_of_keymap): Move minibuffer-local-completion-map,
14232 minibuffer-local-filename-completion-map,
14233 minibuffer-local-must-match-map, and
14234 minibuffer-local-filename-must-match-map to Elisp.
14235 (syms_of_keymap): Defsubr make-composed-keymap.
14236 * keyboard.c (menu_bar_items): Use map_keymap_canonical.
14237 (parse_menu_item): Trivial simplification.
14239 2011-07-01 Glenn Morris <rgm@gnu.org>
14241 * Makefile.in (SETTINGS_LIBS): Fix typo.
14243 2011-07-01 Kazuhiro Ito <kzhr@d1.dion.ne.jp> (tiny change)
14245 * coding.c (Fencode_coding_string): Record the last coding system
14246 used, as the function doc string says (bug#8738).
14248 2011-07-01 Jan Djärv <jan.h.d@swipnet.se>
14250 * xsettings.c (store_monospaced_changed): Take new font as arg and
14251 check for change against current_mono_font.
14252 (EMACS_TYPE_SETTINGS): Remove this and related defines.
14253 (emacs_settings_constructor, emacs_settings_get_property)
14254 (emacs_settings_set_property, emacs_settings_class_init)
14255 (emacs_settings_init, gsettings_obj): Remove.
14256 (something_changedCB): New function for HAVE_GSETTINGS.
14257 (something_changedCB): HAVE_GCONF: Call store_monospaced_changed
14258 with value as argument.
14259 (init_gsettings): Check that GSETTINGS_SCHEMA exists before calling
14260 g_settings_new (Bug#8967). Do not create gsettings_obj.
14261 Remove calls to g_settings_bind. Connect something_changedCB to
14264 * xgselect.c: Add defined (HAVE_GSETTINGS).
14265 (xgselect_initialize): Ditto.
14267 * process.c: Add defined (HAVE_GSETTINGS) for xgselect.h
14268 (wait_reading_process_output): Add defined (HAVE_GSETTINGS) for
14271 2011-07-01 Paul Eggert <eggert@cs.ucla.edu>
14273 * eval.c (struct backtrace): Simplify and port the data structure.
14274 Do not assume that "int nargs : BITS_PER_INT - 2;" produces a
14275 signed bit field, as this assumption is not portable and it makes
14276 Emacs crash when compiled with Sun C 5.8 on sparc. Do not use
14277 "char debug_on_exit : 1" as this is not portable either; instead,
14278 use the portable "unsigned int debug_on_exit : 1". Remove unused
14279 member evalargs. Remove obsolete comments about cc bombing out.
14281 2011-06-30 Jan Djärv <jan.h.d@swipnet.se>
14283 * xsettings.c: Include glib-object.h, gio/gio.h if HAVE_GSETTINGS.
14284 Let HAVE_GSETTINGS override HAVE_GCONF.
14285 (store_monospaced_changed): New function.
14286 (EMACS_SETTINGS): A new type derived from GObject to handle
14287 GSettings notifications.
14288 (emacs_settings_constructor, emacs_settings_get_property)
14289 (emacs_settings_set_property, emacs_settings_class_init):
14291 (gsettings_client, gsettings_obj): New variables.
14292 (GSETTINGS_SCHEMA): New define.
14293 (something_changedCB): Call store_monospaced_changed.
14294 (init_gsettings): New function.
14295 (xsettings_initialize): Call init_gsettings.
14296 (syms_of_xsettings): Initialize gsettings_client, gsettings_obj
14299 * Makefile.in (SETTINGS_CFLAGS, SETTINGS_LIBS): Rename from
14302 2011-06-29 Martin Rudalics <rudalics@gmx.at>
14304 * window.c (resize_root_window, grow_mini_window)
14305 (shrink_mini_window): Rename Qresize_root_window to
14306 Qwindow_resize_root_window and Qresize_root_window_vertically to
14307 Qwindow_resize_root_window_vertically.
14309 2011-06-28 Paul Eggert <eggert@cs.ucla.edu>
14311 * gnutls.c (Qgnutls_bootprop_verify_error): Remove unused var.
14313 2011-06-27 Juanma Barranquero <lekktu@gmail.com>
14315 * makefile.w32-in: Redesign dependencies so they reflect more
14316 clearly which files are directly included by each source file,
14317 and not through other includes.
14319 2011-06-27 Martin Rudalics <rudalics@gmx.at>
14321 * buffer.c (Qclone_number): Declare static and DEFSYM it.
14322 (sort_overlays, overlay_strings): When an overlay's clone number
14323 matches the window's clone number process the overlay even if
14324 the overlay's window property doesn't match the current window.
14326 * window.c (Fwindow_vchild): Rename to Fwindow_top_child.
14327 (Fwindow_hchild): Rename to Fwindow_left_child.
14328 (Fwindow_next): Rename to Fwindow_next_sibling.
14329 (Fwindow_prev): Rename to Fwindow_prev_sibling.
14330 (resize_window_check): Rename to window_resize_check.
14331 (resize_window_apply): Rename to window_resize_apply.
14332 (Fresize_window_apply): Rename to Fwindow_resize_apply.
14333 (Fdelete_other_windows_internal, resize_frame_windows)
14334 (Fsplit_window_internal, Fdelete_window_internal)
14335 (grow_mini_window, shrink_mini_window)
14336 (Fresize_mini_window_internal): Fix callers accordingly.
14338 2011-06-26 Jan Djärv <jan.h.d@swipnet.se>
14340 * emacsgtkfixed.h: State that this is only used with Gtk+3.
14341 (emacs_fixed_set_min_size): Remove.
14342 (emacs_fixed_new): Take frame as argument.
14344 * emacsgtkfixed.c: State that this is only used with Gtk+3.
14345 (_EmacsFixedPrivate): Remove minwidth/height.
14346 Add struct frame *f.
14347 (emacs_fixed_init): Initialize priv->f.
14348 (get_parent_class, emacs_fixed_set_min_size): Remove.
14349 (emacs_fixed_new): Set priv->f to argument.
14350 (emacs_fixed_get_preferred_width)
14351 (emacs_fixed_get_preferred_height): Use min_width/height from
14352 frames size_hint to set minimum and natural (Bug#8919).
14353 (XSetWMSizeHints, XSetWMNormalHints): Override these functions
14354 and use min_width/height from frames size_hint to set
14355 min_width/height (Bug#8919).
14357 * gtkutil.c (xg_create_frame_widgets): Pass f to emacs_fixed_new.
14358 (x_wm_set_size_hint): Remove call to emacs_fixed_set_min_size.
14361 2011-06-26 Eli Zaretskii <eliz@gnu.org>
14363 * bidi.c (bidi_paragraph_init): Test for ZV_BYTE before calling
14364 bidi_at_paragraph_end, since fast_looking_at doesn't like to be
14367 2011-06-26 Chong Yidong <cyd@stupidchicken.com>
14369 * process.c (wait_reading_process_output): Bypass select if
14370 waiting for a cell while ignoring keyboard input, and input is
14371 pending. Suggested by Jan Djärv (Bug#8869).
14373 2011-06-25 Paul Eggert <eggert@cs.ucla.edu>
14375 Use gnulib's dup2 module instead of rolling our own.
14376 * sysdep.c (dup2) [!HAVE_DUP2]: Remove; gnulib now does this.
14378 2011-06-25 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
14380 * dispnew.c (scrolling_window): Before scrolling, turn off a
14381 mouse-highlight in the window being scrolled.
14383 2011-06-24 Juanma Barranquero <lekktu@gmail.com>
14385 Move DEFSYM to lisp.h and use everywhere.
14387 * character.h (DEFSYM): Move declaration...
14388 * lisp.h (DEFSYM): ...here.
14394 * w32select.c: Don't include character.h.
14396 * alloc.c (syms_of_alloc):
14397 * buffer.c (syms_of_buffer):
14398 * bytecode.c (syms_of_bytecode):
14399 * callint.c (syms_of_callint):
14400 * casefiddle.c (syms_of_casefiddle):
14401 * casetab.c (init_casetab_once):
14402 * category.c (init_category_once, syms_of_category):
14403 * ccl.c (syms_of_ccl):
14404 * cmds.c (syms_of_cmds):
14405 * composite.c (syms_of_composite):
14406 * dbusbind.c (syms_of_dbusbind):
14407 * dired.c (syms_of_dired):
14408 * dispnew.c (syms_of_display):
14409 * doc.c (syms_of_doc):
14410 * editfns.c (syms_of_editfns):
14411 * emacs.c (syms_of_emacs):
14412 * eval.c (syms_of_eval):
14413 * fileio.c (syms_of_fileio):
14414 * fns.c (syms_of_fns):
14415 * frame.c (syms_of_frame):
14416 * fringe.c (syms_of_fringe):
14417 * insdel.c (syms_of_insdel):
14418 * keymap.c (syms_of_keymap):
14419 * lread.c (init_obarray, syms_of_lread):
14420 * macros.c (syms_of_macros):
14421 * msdos.c (syms_of_msdos):
14422 * print.c (syms_of_print):
14423 * process.c (syms_of_process):
14424 * search.c (syms_of_search):
14425 * sound.c (syms_of_sound):
14426 * syntax.c (init_syntax_once, syms_of_syntax):
14427 * terminal.c (syms_of_terminal):
14428 * textprop.c (syms_of_textprop):
14429 * undo.c (syms_of_undo):
14430 * w32.c (globals_of_w32):
14431 * window.c (syms_of_window):
14432 * xdisp.c (syms_of_xdisp):
14433 * xfaces.c (syms_of_xfaces):
14434 * xfns.c (syms_of_xfns):
14435 * xmenu.c (syms_of_xmenu):
14436 * xsettings.c (syms_of_xsettings):
14437 * xterm.c (syms_of_xterm): Use DEFSYM.
14439 2011-06-24 Teodor Zlatanov <tzz@lifelogs.com>
14441 * gnutls.c (syms_of_gnutls): Use the DEFSYM macro from character.h.
14443 2011-06-23 Paul Eggert <eggert@cs.ucla.edu>
14445 Integer and buffer overflow fixes (Bug#8873).
14447 * print.c (printchar, strout): Check for string overflow.
14448 (PRINTPREPARE, printchar, strout):
14449 Don't set size unless allocation succeeds.
14451 * minibuf.c (read_minibuf_noninteractive): Use ptrdiff_t, not int,
14452 for sizes. Check for string overflow more accurately.
14453 Simplify newline removal at end; this suppresses a GCC 4.6.0 warning.
14455 * macros.c: Integer and buffer overflow fixes.
14456 * keyboard.h (struct keyboard.kbd_macro_bufsize):
14457 * macros.c (Fstart_kbd_macro, store_kbd_macro_char):
14458 Use ptrdiff_t, not int, for sizes.
14459 Don't increment bufsize until after realloc succeeds.
14460 Check for size-calculation overflow.
14461 (Fstart_kbd_macro): Use EMACS_INT, not int, for XINT result.
14463 * lisp.h (DEFVAR_KBOARD): Use offsetof instead of char * finagling.
14465 * lread.c: Integer overflow fixes.
14466 (read_integer): Radix is now EMACS_INT, not int,
14467 to improve quality of diagnostics for out-of-range radices.
14468 Calculate buffer size correctly for out-of-range radices.
14469 (read1): Check for integer overflow in radices, and in
14470 read-circle numbers.
14471 (read_escape): Avoid int overflow.
14472 (Fload, openp, read_buffer_size, read1)
14473 (substitute_object_recurse, read_vector, read_list, map_obarray):
14474 Use ptrdiff_t, not int, for sizes.
14475 (read1): Use EMACS_INT, not int, for sizes.
14476 Check for size overflow.
14478 * image.c (cache_image): Check for size arithmetic overflow.
14480 * lread.c: Integer overflow issues.
14481 (saved_doc_string_size, saved_doc_string_length)
14482 (prev_saved_doc_string_size, prev_saved_doc_string_length):
14483 Now ptrdiff_t, not int.
14484 (read1): Don't assume doc string length fits in int. Check for
14485 out-of-range doc string lengths.
14486 (read_list): Don't assume file position fits in int.
14487 (read_escape): Check for hex character overflow.
14489 2011-06-22 Leo Liu <sdl.web@gmail.com>
14491 * minibuf.c (Fcompleting_read_default, Vcompleting_read_function):
14492 Move to minibuffer.el.
14494 2011-06-22 Paul Eggert <eggert@cs.ucla.edu>
14496 Fixes for GLYPH_DEBUG found by GCC 4.6.0 static checking.
14497 The following patches are for when GLYPH_DEBUG && !XASSERT.
14498 * dispextern.h (trace_redisplay_p, dump_glyph_string):
14499 * dispnew.c (flush_stdout):
14500 * xdisp.c (dump_glyph_row, dump_glyph_matrix, dump_glyph):
14501 Mark as externally visible.
14502 * dispnew.c (check_window_matrix_pointers): Now static.
14503 * dispnew.c (window_to_frame_vpos):
14504 * xfns.c (unwind_create_frame):
14505 * xterm.c (x_check_font): Remove unused local.
14506 * scroll.c (CHECK_BOUNDS):
14507 * xfaces.c (cache_fache): Rename local to avoid shadowing.
14508 * xfns.c, w32fns.c (image_cache_refcount, dpyinfo_refcount): Now static.
14509 * xdisp.c (check_window_end): Now a no-op if !XASSERTS.
14510 (debug_first_unchanged_at_end_vpos, debug_last_unchanged_at_beg_vpos)
14511 (debug_dvpos, debug_dy, debug_delta, debug_delta_bytes, debug_end_vpos):
14513 (debug_method_add): Use va_list and vsprintf rather than relying
14514 on undefined behavior with wrong number of arguments.
14515 (dump_glyph, dump_glyph_row, Fdump_glyph_matrix):
14516 Don't assume ptrdiff_t and EMACS_INT are the same width as int.
14517 In this code, it's OK to assume C99 behavior for ptrdiff_t formats
14518 since we're not interested in debugging glyphs with old libraries.
14519 * xfaces.c (cache_face): Move debugging code earlier; this pacifies
14520 GCC 4.6.0's static checking.
14522 2011-06-22 Paul Eggert <eggert@cs.ucla.edu>
14524 Integer overflow and signedness fixes (Bug#8873).
14525 A few related buffer overrun fixes, too.
14527 * font.c (font_score): Use EMACS_INT, not int, to store XINT value.
14529 * dispextern.h (struct face.stipple):
14530 * image.c (x_bitmap_height, x_bitmap_width, x_bitmap_pixmap)
14531 (x_bitmap_mask, x_allocate_bitmap_record)
14532 (x_create_bitmap_from_data, x_create_bitmap_from_file)
14533 (x_destroy_bitmap, x_destroy_all_bitmaps, x_create_bitmap_mask)
14534 (x_create_bitmap_from_xpm_data):
14535 * nsterm.h (struct ns_display_info.bitmaps_size, .bitmaps_last):
14536 * w32term.h (struct w32_display_info.icon_bitmap_id, .bitmaps_size)
14538 * xfaces.c (load_pixmap):
14539 * xterm.c (x_bitmap_icon, x_wm_set_icon_pixmap):
14540 * xterm.h (struct x_display_info.icon_bitmap_id, .bitmaps_size)
14541 (.bitmaps_last, struct x_output.icon_bitmap):
14542 Use ptrdiff_t, not int, for bitmap indexes.
14543 (x_allocate_bitmap_record): Check for size overflow.
14544 * dispextern.h, lisp.h: Adjust to API changes elsewhere.
14546 Use ptrdiff_t, not int, for overlay counts.
14547 * buffer.h (overlays_at, sort_overlays, GET_OVERLAYS_AT):
14548 * editfns.c (overlays_around, get_pos_property):
14549 * textprop.c (get_char_property_and_overlay):
14550 * xdisp.c (next_overlay_change, note_mouse_highlight):
14551 * xfaces.c (face_at_buffer_position):
14552 * buffer.c (OVERLAY_COUNT_MAX): New macro.
14553 (overlays_at, overlays_in, sort_overlays, Foverlays_at)
14554 (Fnext_overlay_change, Fprevious_overlay_change)
14555 (mouse_face_overlay_overlaps, Foverlays_in):
14556 Use ptrdiff_t, not int, for sizes.
14557 (overlays_at, overlays_in): Check for size-calculation overflow.
14559 * xterm.c (xim_initialize, same_x_server): Strlen may not fit in int.
14561 * xsmfns.c (smc_save_yourself_CB, x_session_initialize): Avoid strlen.
14562 (x_session_initialize): Do not assume string length fits in int.
14564 * xsettings.c (apply_xft_settings): Fix potential buffer overrun.
14565 This is unlikely, but can occur if DPI is outlandish.
14567 * xsettings.c (Ffont_get_system_normal_font, Ffont_get_system_font):
14568 * xselect.c (Fx_get_atom_name): Avoid need for strlen.
14570 * xrdb.c: Don't assume strlen fits in int; avoid some strlens.
14571 * xrdb.c (magic_file_p, search_magic_path):
14572 Omit last arg SUFFIX; it was always 0. All callers changed.
14573 (magic_file_p): Use ptrdiff_t, not int. Check for size overflow.
14575 * xfont.c (xfont_match): Avoid need for strlen.
14577 * xfns.c: Don't assume strlen fits in int.
14578 (xic_create_fontsetname, x_window): Use ptrdiff_t, not int.
14580 * xdisp.c (message_log_check_duplicate): Return intmax_t,
14581 not unsigned long, as we prefer signed integers. All callers changed.
14582 Detect integer overflow in repeat count.
14583 (message_dolog): Don't assume print length fits in 39 bytes.
14584 (display_mode_element): Don't assume strlen fits in int.
14586 * termcap.c: Don't assume sizes fit in int and never overflow.
14587 (struct termcap_buffer, tgetent): Use ptrdiff_t, not int, for sizes.
14588 (gobble_line): Check for size-calculation overflow.
14590 * minibuf.c (Fread_buffer):
14591 * lread.c (intern, intern_c_string):
14592 * image.c (xpm_scan) [HAVE_NS && !HAVE_XPM]:
14593 Don't assume string length fits in int.
14595 * keyboard.c (parse_tool_bar_item):
14596 * gtkutil.c (style_changed_cb): Avoid need for strlen.
14598 * font.c: Don't assume string length fits in int.
14599 (font_parse_xlfd, font_parse_fcname, font_unparse_fcname):
14600 Use ptrdiff_t, not int.
14601 (font_intern_prop): Don't assume string length fits in int.
14602 Don't assume integer property fits in fixnum.
14603 * font.h (font_intern_prop): 2nd arg is now ptrdiff_t, not int.
14605 * filelock.c: Fix some buffer overrun and integer overflow issues.
14606 (get_boot_time): Don't assume gzip command string fits in 100 bytes.
14607 Reformulate so as not to need the command string.
14608 Invoke gzip -cd rather than gunzip, as it's more portable.
14609 (lock_info_type, lock_file_1, lock_file):
14610 Don't assume pid_t and time_t fit in unsigned long.
14611 (LOCK_PID_MAX): Remove; we now use more-reliable bounds.
14612 (current_lock_owner): Prefer signed type for sizes.
14613 Use memcpy, not strncpy, where memcpy is what is really wanted.
14614 Don't assume (via atoi) that time_t and pid_t fit in int.
14615 Check for time_t and/or pid_t out of range, e.g., via a network share.
14616 Don't alloca where an auto var works fine.
14618 * fileio.c: Fix some integer overflow issues.
14619 (file_name_as_directory, Fexpand_file_name, Fsubstitute_in_file_name):
14620 Don't assume string length fits in int.
14621 (directory_file_name): Don't assume string length fits in long.
14622 (make_temp_name): Don't assume pid fits in int, or that its print
14623 length is less than 20.
14625 * data.c (Fsubr_name): Rewrite to avoid a strlen call.
14627 * coding.c (make_subsidiaries): Don't assume string length fits in int.
14629 * callproc.c (child_setup): Rewrite to avoid two strlen calls.
14631 * process.c (Fformat_network_address): Use EMACS_INT, not EMACS_UINT.
14632 We prefer signed integers, even for size calculations.
14634 * emacs.c: Don't assume string length fits in 'int'.
14635 (DEFINE_DUMMY_FUNCTION, sort_args): Use ptrdiff_t, not int.
14636 (main): Don't invoke strlen when not needed.
14638 * dbusbind.c (XD_ERROR): Don't arbitrarily truncate string.
14639 (XD_DEBUG_MESSAGE): Don't waste a byte.
14641 * callproc.c (getenv_internal_1, getenv_internal)
14642 (Fgetenv_internal):
14643 * buffer.c (init_buffer): Don't assume string length fits in 'int'.
14645 * lread.c (invalid_syntax): Omit length argument.
14646 All uses changed. This doesn't fix a bug, but it simplifies the
14647 code away from its former Hollerith-constant appearance, and it's
14648 one less 'int' to worry about when looking at integer-overflow issues.
14649 (string_to_number): Simplify 2011-04-26 change by invoking xsignal1.
14651 * lisp.h (DEFUN): Remove bogus use of sizeof (struct Lisp_Subr).
14652 This didn't break anything, but it didn't help either.
14653 It's confusing to put a bogus integer in a place where the actual
14654 value does not matter.
14655 (LIST_END_P): Remove unused macro and its bogus comment.
14656 (make_fixnum_or_float): Remove unnecessary cast to EMACS_INT.
14658 * lisp.h (union Lisp_Object.i): EMACS_INT, not EMACS_UINT.
14659 This is for consistency with the ordinary, non-USE_LISP_UNION_TYPE,
14661 (struct Lisp_Bool_Vector.size): EMACS_INT, not EMACS_UINT.
14662 We prefer signed types, and the value cannot exceed the EMACS_INT
14663 range anyway (because otherwise the length would not be representable).
14664 (XSET) [USE_LISP_UNION_TYPE]: Use uintptr_t and intptr_t,
14665 not EMACS_UINT and EMACS_INT, when converting pointer to integer.
14666 This avoids a GCC warning when WIDE_EMACS_INT.
14668 * indent.c (sane_tab_width): New function.
14669 (current_column, scan_for_column, Findent_to, position_indentation)
14670 (compute_motion): Use it. This is just for clarity.
14671 (Fcompute_motion): Don't assume hscroll and tab offset fit in int.
14673 * image.c (xbm_image_p): Don't assume stated width, height fit in int.
14675 * lisp.h (lint_assume): New macro.
14676 * composite.c (composition_gstring_put_cache):
14677 * ftfont.c (ftfont_shape_by_flt): Use it to pacify GCC 4.6.0.
14679 * editfns.c, insdel.c:
14680 Omit unnecessary forward decls, to simplify future changes.
14682 * ftfont.c (ftfont_shape_by_flt): Use signed integers for lengths.
14684 * font.c (Ffont_shape_gstring): Don't assume glyph len fits in 'int'.
14686 * fns.c (Ffillarray): Don't assume bool vector size fits in 'int'.
14687 Use much-faster test for byte-length change.
14688 Don't assume string byte-length fits in 'int'.
14689 Check that character arg fits in 'int'.
14690 (mapcar1): Declare byte as byte, for clarity.
14692 * alloc.c (Fmake_bool_vector): Avoid unnecessary multiplication.
14694 * fns.c (concat): Catch string overflow earlier.
14695 Do not rely on integer wraparound.
14697 * dispextern.h (struct it.overlay_strings_charpos)
14698 (struct it.selective): Now EMACS_INT, not int.
14699 * xdisp.c (forward_to_next_line_start)
14700 (back_to_previous_visible_line_start)
14701 (reseat_at_next_visible_line_start, next_element_from_buffer):
14702 Don't arbitrarily truncate the value of 'selective' to int.
14704 * xdisp.c (init_iterator): Use XINT, not XFASTINT; it might be < 0.
14706 * composite.c: Don't truncate sizes to 'int'.
14707 (composition_gstring_p, composition_reseat_it)
14708 (composition_adjust_point): Use EMACS_INT, not int.
14709 (get_composition_id, composition_gstring_put_cache): Use EMACS_INT,
14710 not EMACS_UINT, for indexes.
14712 * category.h (CATEGORY_SET_P): Remove unnecessary cast to EMACS_INT.
14714 * buffer.c: Include <verify.h>.
14715 (struct sortvec.priority, struct sortstr.priority):
14716 Now EMACS_INT, not int.
14717 (compare_overlays, cmp_for_strings): Avoid subtraction overflow.
14718 (struct sortstr.size, record_overlay_string)
14719 (struct sortstrlist.size, struct sortlist.used):
14720 Don't truncate size to int.
14721 (record_overlay_string): Check for size-calculation overflow.
14722 (init_buffer_once): Check at compile-time, not run-time.
14724 2011-06-22 Jim Meyering <meyering@redhat.com>
14726 Don't leak an XBM-image-sized buffer
14727 * image.c (xbm_load): Free the image buffer after using it.
14729 2011-06-21 Paul Eggert <eggert@cs.ucla.edu>
14732 * composite.c (find_automatic_composition): Omit needless 'return 0;'
14733 that Sun C diagnosed.
14734 * fns.c (secure_hash): Fix pointer signedness issue.
14735 * intervals.c (static_offset_intervals): New function.
14736 (offset_intervals): Use it.
14738 2011-06-21 Leo Liu <sdl.web@gmail.com>
14741 * makefile.w32-in ($(BLD)/fns.$(O)): Include sha256.h and
14744 * fns.c (secure_hash): Rename from crypto_hash_function and change
14745 the first arg to accept symbols.
14746 (Fsecure_hash): New primitive.
14747 (syms_of_fns): New symbols.
14749 2011-06-20 Deniz Dogan <deniz@dogan.se>
14751 * process.c (Fset_process_buffer): Clarify return value in
14754 2011-06-18 Chong Yidong <cyd@stupidchicken.com>
14756 * dispnew.c (add_window_display_history): Use BVAR.
14758 * xdisp.c (debug_method_add): Use BVAR.
14759 (check_window_end, dump_glyph_matrix, dump_glyph)
14760 (dump_glyph_row, dump_glyph_string): Convert arglist to ANSI C.
14762 * xfaces.c (check_lface_attrs, check_lface, dump_realized_face):
14765 * xfns.c (Fx_create_frame, x_create_tip_frame): Delay image cache
14766 check till after the cache is created in init_frame_faces.
14768 2011-06-17 Stefan Monnier <monnier@iro.umontreal.ca>
14770 * fns.c (Fsafe_length): Yet another int/Lisp_Object mixup.
14772 2011-06-16 Paul Eggert <eggert@cs.ucla.edu>
14774 * lisp.h: Include <limits.h>, for INT_MAX, LONG_MAX, LLONG_MAX.
14775 Without this, prin1 mishandles Lisp_Misc_Save_Value printing on
14776 hosts with pre-C99 libraries, because pD is wrongly defined to "t".
14778 Improve buffer-overflow checking (Bug#8873).
14779 * fileio.c (Finsert_file_contents):
14780 * insdel.c (insert_from_buffer_1, replace_range, replace_range_2):
14781 Remove the old (too-loose) buffer overflow checks.
14782 They weren't needed, since make_gap checks for buffer overflow.
14783 * insdel.c (make_gap_larger): Catch buffer overflows that were missed.
14784 The old code merely checked for Emacs fixnum overflow, and relied
14785 on undefined (wraparound) behavior. The new code avoids undefined
14786 behavior, and also checks for ptrdiff_t and/or size_t overflow.
14788 * editfns.c (Finsert_char): Don't dump core with very negative counts.
14789 Tune. Don't use wider integers than needed. Don't use alloca.
14790 Use a bigger 'string' buffer. Rewrite to avoid 'n > 0' test.
14792 * insdel.c (replace_range): Fix buf overflow when insbytes < outgoing.
14794 * insdel.c, lisp.h (buffer_overflow): New function.
14795 (insert_from_buffer_1, replace_range, replace_range_2):
14796 * insdel.c (make_gap_larger):
14797 * editfns.c (Finsert_char):
14798 * fileio.c (Finsert_file_contents): Use it, to normalize wording.
14800 * buffer.h (BUF_BYTES_MAX): Cast to ptrdiff_t so that it's signed.
14802 2011-06-15 Paul Eggert <eggert@cs.ucla.edu>
14804 Integer overflow and signedness fixes (Bug#8873, Bug#8828).
14806 * ccl.c (ASCENDING_ORDER): New macro, to work around GCC bug 43772.
14807 (GET_CCL_RANGE, IN_INT_RANGE): Use it.
14809 * fileio.c: Don't assume EMACS_INT fits in off_t.
14810 (emacs_lseek): New static function.
14811 (Finsert_file_contents, Fwrite_region): Use it.
14812 Use SEEK_SET, SEEK_CUR, SEEK_END as appropriate.
14814 * fns.c (Fload_average): Don't assume 100 * load average fits in int.
14816 * fns.c: Don't overflow int when computing a list length.
14817 * fns.c (QUIT_COUNT_HEURISTIC): New constant.
14818 (Flength, Fsafe_length): Use EMACS_INT, not int, to avoid unwanted
14819 truncation on 64-bit hosts. Check for QUIT every
14820 QUIT_COUNT_HEURISTIC entries rather than every other entry; that's
14821 faster and is responsive enough.
14822 (Flength): Report an error instead of overflowing an integer.
14823 (Fsafe_length): Return a float if the value is not representable
14824 as a fixnum. This shouldn't happen except in contrived situations.
14825 (Fnthcdr, Fsort): Don't assume list length fits in int.
14826 (Fcopy_sequence): Don't assume vector length fits in int.
14828 * alloc.c: Check that resized vectors' lengths fit in fixnums.
14829 (header_size, word_size): New constants.
14830 (allocate_vectorlike): Don't check size overflow here.
14831 (allocate_vector): Check it here instead, since this is the only
14832 caller of allocate_vectorlike that could cause overflow.
14833 Check that the new vector's length is representable as a fixnum.
14835 * fns.c (next_almost_prime): Don't return a multiple of 3 or 5.
14836 The previous code was bogus. For example, next_almost_prime (32)
14837 returned 39, which is undesirable as it is a multiple of 3; and
14838 next_almost_prime (24) returned 25, which is a multiple of 5 so
14839 why was the code bothering to check for multiples of 7?
14841 * bytecode.c (exec_byte_code): Use ptrdiff_t, not int, for vector length.
14843 * eval.c, doprnt.c (SIZE_MAX): Remove; inttypes.h defines this now.
14845 Variadic C functions now count arguments with ptrdiff_t.
14846 This partly undoes my 2011-03-30 change, which replaced int with size_t.
14847 Back then I didn't know that the Emacs coding style prefers signed int.
14848 Also, in the meantime I found a few more instances where arguments
14849 were being counted with int, which may truncate counts on 64-bit
14850 machines, or EMACS_INT, which may be unnecessarily wide.
14851 * lisp.h (struct Lisp_Subr.function.aMANY)
14852 (DEFUN_ARGS_MANY, internal_condition_case_n, safe_call):
14853 Arg counts are now ptrdiff_t, not size_t.
14854 All variadic functions and their callers changed accordingly.
14855 (struct gcpro.nvars): Now size_t, not size_t. All uses changed.
14856 * bytecode.c (exec_byte_code): Check maxdepth for overflow,
14857 to avoid potential buffer overrun. Don't assume arg counts fit in 'int'.
14858 * callint.c (Fcall_interactively): Check arg count for overflow,
14859 to avoid potential buffer overrun. Use signed char, not 'int',
14860 for 'varies' array, so that we needn't bother to check its size
14861 calculation for overflow.
14862 * editfns.c (Fformat): Use ptrdiff_t, not EMACS_INT, to count args.
14863 * eval.c (apply_lambda):
14864 * fns.c (Fmapconcat): Use XFASTINT, not XINT, to get args length.
14865 (struct textprop_rec.argnum): Now ptrdiff_t, not int. All uses changed.
14866 (mapconcat): Use ptrdiff_t, not int and EMACS_INT, to count args.
14868 * callint.c (Fcall_interactively): Don't use index var as event count.
14870 * vm-limit.c (check_memory_limits): Fix incorrect extern function decls.
14871 * mem-limits.h (SIZE): Remove; no longer used.
14873 * xterm.c (x_alloc_nearest_color_1): Prefer int to long when int works.
14875 Remove unnecessary casts.
14876 * xterm.c (x_term_init):
14877 * xfns.c (x_set_border_pixel):
14878 * widget.c (create_frame_gcs): Remove casts to unsigned long etc.
14879 These aren't needed now that we assume ANSI C.
14881 * sound.c (Fplay_sound_internal): Remove cast to unsigned long.
14882 It's more likely to cause problems (due to unsigned overflow)
14885 * dired.c (Ffile_attributes): Don't use 32-bit hack on 64-bit hosts.
14887 * unexelf.c (unexec): Don't assume BSS addr fits in unsigned.
14889 * xterm.c (handle_one_xevent): Omit unnecessary casts to unsigned.
14891 * keyboard.c (modify_event_symbol): Don't limit alist len to UINT_MAX.
14893 * lisp.h (CHAR_TABLE_SET): Omit now-redundant test.
14895 * lread.c (Fload): Don't compare a possibly-garbage time_t value.
14897 GLYPH_CODE_FACE returns EMACS_INT, not int.
14898 * dispextern.h (merge_faces):
14899 * xfaces.c (merge_faces):
14900 * xdisp.c (get_next_display_element, next_element_from_display_vector):
14901 Don't assume EMACS_INT fits in int.
14903 * character.h (CHAR_VALID_P): Remove unused parameter.
14904 * fontset.c, lisp.h, xdisp.c: All uses changed.
14906 * editfns.c (Ftranslate_region_internal): Omit redundant test.
14908 * fns.c (concat): Minor tuning based on overflow analysis.
14909 This doesn't fix any bugs. Use int to hold character, instead
14910 of constantly refetching from Emacs object. Use XFASTINT, not
14911 XINT, for value known to be a character. Don't bother comparing
14912 a single byte to 0400, as it's always less.
14914 * floatfns.c (Fexpt):
14915 * fileio.c (make_temp_name): Omit unnecessary cast to unsigned.
14917 * editfns.c (Ftranslate_region_internal): Use int, not EMACS_INT
14920 * doc.c (get_doc_string): Omit (unsigned)c that mishandled negatives.
14922 * data.c (Faset): If ARRAY is a string, check that NEWELT is a char.
14923 Without this fix, on a 64-bit host (aset S 0 4294967386) would
14924 incorrectly succeed when S was a string, because 4294967386 was
14925 truncated before it was used.
14927 * chartab.c (Fchar_table_range): Use CHARACTERP to check range.
14928 Otherwise, an out-of-range integer could cause undefined behavior
14931 * composite.c: Use int, not EMACS_INT, for characters.
14932 (fill_gstring_body, composition_compute_stop_pos): Use int, not
14933 EMACS_INT, for values that are known to be in character range.
14934 This doesn't fix any bugs but is the usual style inside Emacs and
14935 may generate better code on 32-bit machines.
14937 Make sure a 64-bit char is never passed to ENCODE_CHAR.
14938 This is for reasons similar to the recent CHAR_STRING fix.
14939 * charset.c (Fencode_char): Check that character arg is actually
14940 a character. Pass an int to ENCODE_CHAR.
14941 * charset.h (ENCODE_CHAR): Verify that the character argument is no
14942 wider than 'int', as a compile-time check to prevent future regressions
14945 * character.c (char_string): Remove unnecessary casts.
14947 Make sure a 64-bit char is never passed to CHAR_STRING.
14948 Otherwise, CHAR_STRING would do the wrong thing on a 64-bit platform,
14949 by silently ignoring the top 32 bits, allowing some values
14950 that were far too large to be valid characters.
14951 * character.h: Include <verify.h>.
14952 (CHAR_STRING, CHAR_STRING_ADVANCE): Verify that the character
14953 arguments are no wider than unsigned, as a compile-time check
14954 to prevent future regressions in this area.
14956 * editfns.c (Fchar_to_string, general_insert_function, Finsert_char)
14957 (Fsubst_char_in_region):
14959 * xdisp.c (decode_mode_spec_coding):
14960 Adjust to CHAR_STRING's new requirement.
14961 * editfns.c (Finsert_char, Fsubst_char_in_region):
14962 * fns.c (concat): Check that character args are actually
14963 characters. Without this test, these functions did the wrong
14964 thing with wildly out-of-range values on 64-bit hosts.
14966 Remove incorrect casts to 'unsigned' that lose info on 64-bit hosts.
14967 These casts should not be needed on 32-bit hosts, either.
14968 * keyboard.c (read_char):
14969 * lread.c (Fload): Remove casts to unsigned.
14971 * lisp.h (UNSIGNED_CMP): New macro.
14972 This fixes comparison bugs on 64-bit hosts.
14973 (ASCII_CHAR_P): Use it.
14974 * casefiddle.c (casify_object):
14975 * character.h (ASCII_BYTE_P, CHAR_VALID_P)
14976 (SINGLE_BYTE_CHAR_P, CHAR_STRING):
14977 * composite.h (COMPOSITION_ENCODE_RULE_VALID):
14978 * dispextern.h (FACE_FROM_ID):
14979 * keyboard.c (read_char): Use UNSIGNED_CMP.
14981 * xmenu.c (dialog_selection_callback) [!USE_GTK]: Cast to intptr_t,
14982 not to EMACS_INT, to avoid GCC warning.
14984 * xfns.c (x_set_scroll_bar_default_width): Remove unused 'int' locals.
14986 * buffer.h (PTR_BYTE_POS, BUF_PTR_BYTE_POS): Remove harmful cast.
14987 The cast incorrectly truncated 64-bit byte offsets to 32 bits, and
14988 isn't needed on 32-bit machines.
14990 * buffer.c (Fgenerate_new_buffer_name):
14991 Use EMACS_INT for count, not int.
14992 (advance_to_char_boundary): Return EMACS_INT, not int.
14994 * data.c (Qcompiled_function): Now static.
14996 * window.c (window_body_lines): Now static.
14998 * image.c (gif_load): Rename local to avoid shadowing.
15000 * lisp.h (SAFE_ALLOCA_LISP): Check for integer overflow.
15001 (struct Lisp_Save_Value): Use ptrdiff_t, not int, for 'integer' member.
15002 * alloc.c (make_save_value): Integer argument is now of type
15003 ptrdiff_t, not int.
15004 (mark_object): Use ptrdiff_t, not int.
15005 * lisp.h (pD): New macro.
15006 * print.c (print_object): Use it.
15008 * alloc.c: Use EMACS_INT, not int, to count objects.
15009 (total_conses, total_markers, total_symbols, total_vector_size)
15010 (total_free_conses, total_free_markers, total_free_symbols)
15011 (total_free_floats, total_floats, total_free_intervals)
15012 (total_intervals, total_strings, total_free_strings):
15013 Now EMACS_INT, not int. All uses changed.
15014 (Fgarbage_collect): Compute overall total using a double, so that
15015 integer overflow is less likely to be a problem. Check for overflow
15016 when converting back to an integer.
15017 (n_interval_blocks, n_string_blocks, n_float_blocks, n_cons_blocks)
15018 (n_vectors, n_symbol_blocks, n_marker_blocks): Remove.
15019 These were 'int' variables that could overflow on 64-bit hosts;
15020 they were never used, so remove them instead of repairing them.
15021 (nzombies, ngcs, max_live, max_zombies): Now EMACS_INT, not 'int'.
15022 (inhibit_garbage_collection): Set gc_cons_threshold to max value.
15023 Previously, this ceilinged at INT_MAX, but that doesn't work on
15025 (allocate_pseudovector): Don't use EMACS_INT when int would do.
15027 * alloc.c (Fmake_bool_vector): Don't assume vector size fits in int.
15028 (allocate_vectorlike): Check for ptrdiff_t overflow.
15029 (mark_vectorlike, mark_char_table, mark_object): Avoid EMACS_UINT
15030 when a (possibly-narrower) signed value would do just as well.
15031 We prefer using signed arithmetic, to avoid comparison confusion.
15033 * alloc.c: Catch some string size overflows that we were missing.
15034 (XMALLOC_OVERRUN_CHECK_SIZE) [!XMALLOC_OVERRUN_CHECK]: Define to 0,
15035 for convenience in STRING_BYTES_MAX.
15036 (STRING_BYTES_MAX): New macro, superseding the old one in lisp.h.
15037 The definition here is exact; the one in lisp.h was approximate.
15038 (allocate_string_data): Check for string overflow. This catches
15039 some instances we weren't catching before. Also, it catches
15040 size_t overflow on (unusual) hosts where SIZE_MAX <= min
15041 (PTRDIFF_MAX, MOST_POSITIVE_FIXNUM), e.g., when size_t is 32 bits
15042 and ptrdiff_t and EMACS_INT are both 64 bits.
15044 * character.c, coding.c, doprnt.c, editfns.c, eval.c:
15045 All uses of STRING_BYTES_MAX replaced by STRING_BYTES_BOUND.
15046 * lisp.h (STRING_BYTES_BOUND): Rename from STRING_BYTES_MAX.
15048 * character.c (string_escape_byte8): Fix nbytes/nchars typo.
15050 * alloc.c (Fmake_string): Check for out-of-range init.
15052 2011-06-15 Stefan Monnier <monnier@iro.umontreal.ca>
15054 * eval.c (Fdefvaralias): Also mark the target as variable-special-p.
15056 2011-06-14 Jan Djärv <jan.h.d@swipnet.se>
15058 * xfns.c (x_set_scroll_bar_default_width): Remove argument to
15059 xg_get_default_scrollbar_width.
15061 * gtkutil.c: Include emacsgtkfixed.h if HAVE_GTK3.
15062 (int_gtk_range_get_value): Move to the scroll bar part of the file.
15063 (style_changed_cb): Call update_theme_scrollbar_width and call
15064 x_set_scroll_bar_default_width and xg_frame_set_char_size for
15065 all frames (Bug#8505).
15066 (xg_create_frame_widgets): Call emacs_fixed_new if HAVE_GTK3 (Bug#8505).
15067 Call gtk_window_set_resizable if HAVE_GTK3.
15068 (x_wm_set_size_hint): Call emacs_fixed_set_min_size with min width
15069 and height if HAVE_GTK3 (Bug#8505).
15070 (scroll_bar_width_for_theme): New variable.
15071 (update_theme_scrollbar_width): New function.
15072 (xg_get_default_scrollbar_width): Move code to
15073 update_theme_scrollbar_width, just return scroll_bar_width_for_theme.
15074 (xg_initialize): Call update_theme_scrollbar_width.
15076 * gtkutil.h (xg_get_default_scrollbar_width): Remove argument.
15078 * emacsgtkfixed.c, emacsgtkfixed.h: New files.
15080 2011-06-12 Martin Rudalics <rudalics@gmx.at>
15082 * frame.c (make_frame): Call other_buffer_safely instead of
15085 * window.c (temp_output_buffer_show): Call display_buffer with
15086 second argument Vtemp_buffer_show_specifiers and reset latter
15087 immediately after the call.
15088 (Vtemp_buffer_show_specifiers): New variable.
15089 (auto_window_vscroll_p, next_screen_context_lines)
15090 (Vscroll_preserve_screen_position): Remove leading asterisks from
15093 2011-06-12 Paul Eggert <eggert@cs.ucla.edu>
15095 Fix minor problems found by GCC 4.6.0 static checking.
15096 * buffer.c (Qclone_number): Remove for now, as it's unused.
15097 (record_buffer, Funrecord_buffer): Rename local to avoid shadowing.
15098 (record_buffer): Remove unused local.
15099 * frame.c (other_visible_frames, frame_buffer_list): Now static.
15100 (set_frame_buffer_list): Remove; unused.
15101 * frame.h (other_visible_frames): Remove decl.
15102 * keyboard.h (menu_items_inuse): Declare only if USE_GTK || USE_MOTIF.
15103 * lisp.h (frame_buffer_list, set_frame_buffer_list): Remove decls.
15104 (add_gpm_wait_descriptor, delete_gpm_wait_descriptor): Declare only
15106 * menu.c (menu_items_inuse): Now static unless USE_GTK || USE_MOTIF.
15107 * process.c (add_gpm_wait_descriptor, delete_gpm_wait_descriptor):
15108 Define only if HAVE_GPM.
15109 * widget.c (EmacsFrameResize, emacsFrameClassRec): Now static.
15110 (update_hints_inhibit): Remove; never set. All uses removed.
15111 * widgetprv.h (emacsFrameClassRec): Remove decl.
15112 * window.c (delete_deletable_window): Now returns void, since it
15113 wasn't returning anything.
15114 (compare_window_configurations): Remove unused locals.
15115 * xfns.c (x_set_scroll_bar_default_width): Remove unused locals.
15116 * xmenu.c (x_menu_set_in_use): Define only if USE_GTK || USE_MOTIF.
15117 (dialog_selection_callback) [!USE_GTK]: Prefer intptr_t for integers
15118 the same widths as pointers. This follows up on the 2011-05-06 patch.
15119 * xterm.c (x_alloc_lighter_color_for_widget): Define only if USE_LUCID.
15120 * xterm.h: Likewise.
15121 (x_menu_set_in_use): Declare only if USE_GTK || USE_MOTIF.
15123 2011-06-12 Juanma Barranquero <lekktu@gmail.com>
15125 * makefile.w32-in: Update dependencies.
15126 (LISP_H): Add lib/intprops.h.
15128 2011-06-11 Chong Yidong <cyd@stupidchicken.com>
15130 * image.c (gif_load): Add animation frame delay to the metadata.
15131 (syms_of_image): Use DEFSYM. New symbol `delay'.
15133 2011-06-11 Martin Rudalics <rudalics@gmx.at>
15135 * window.c (delete_deletable_window): Re-add.
15136 (Fset_window_configuration): Rewrite to handle dead buffers and
15137 consequently deletable windows.
15138 (window_tree, Fwindow_tree): Remove. Supply functionality in
15140 (compare_window_configurations): Simplify code.
15142 2011-06-11 Andreas Schwab <schwab@linux-m68k.org>
15144 * image.c (imagemagick_load_image): Fix type mismatch.
15145 (Fimagemagick_types): Likewise.
15147 * window.h (replace_buffer_in_windows): Declare.
15149 2011-06-11 Martin Rudalics <rudalics@gmx.at>
15151 * buffer.c: New Lisp objects Qbuffer_list_update_hook and
15152 Qclone_number. Remove external declaration of Qdelete_window.
15153 (Fbuffer_list): Rewrite doc-string. Minor restructuring of
15155 (Fget_buffer_create, Fmake_indirect_buffer, Frename_buffer):
15156 Run Qbuffer_list_update_hook if allowed.
15157 (Fother_buffer): Rewrite doc-string. Major rewrite for new
15158 buffer list implementation.
15159 (other_buffer_safely): New function.
15160 (Fkill_buffer): Replace call to replace_buffer_in_all_windows by
15161 calls to replace_buffer_in_windows and
15162 replace_buffer_in_windows_safely. Run Qbuffer_list_update_hook
15164 (record_buffer): Inhibit quitting and rewrite using quittable
15165 functions. Run Qbuffer_list_update_hook if allowed.
15166 (Frecord_buffer, Funrecord_buffer): New functions.
15167 (switch_to_buffer_1, Fswitch_to_buffer): Remove.
15168 Move switch-to-buffer to window.el.
15169 (bury-buffer): Move to window.el.
15170 (Vbuffer_list_update_hook): New variable.
15172 * lisp.h (other_buffer_safely): Add prototype in buffer.c
15175 * window.h (resize_frame_windows): Move up in code.
15176 (Fwindow_frame): Remove EXFUN.
15177 (replace_buffer_in_all_windows): Remove prototype.
15178 (replace_buffer_in_windows_safely): Add prototype.
15180 * window.c: Declare Qdelete_window static again. Move down
15181 declaration of select_count.
15182 (Fnext_window, Fprevious_window): Rewrite doc-strings.
15183 (Fother_window): Move to window.el.
15184 (window_loop): Remove DELETE_BUFFER_WINDOWS and UNSHOW_BUFFER
15185 cases. Add REPLACE_BUFFER_IN_WINDOWS_SAFELY case.
15186 (Fdelete_windows_on, Freplace_buffer_in_windows): Move to
15188 (replace_buffer_in_windows): Implement by calling
15189 Qreplace_buffer_in_windows.
15190 (replace_buffer_in_all_windows): Remove with some functionality
15191 moved into replace_buffer_in_windows_safely.
15192 (replace_buffer_in_windows_safely): New function.
15193 (select_window_norecord, select_frame_norecord): Move in front
15194 of run_window_configuration_change_hook. Remove now obsolete
15196 (Fset_window_buffer): Rewrite doc-string.
15197 Call Qrecord_window_buffer.
15198 (keys_of_window): Move binding for other-window to window.el.
15200 2011-06-11 Chong Yidong <cyd@stupidchicken.com>
15202 * dispextern.h (struct image): Replace data member, whose int_val
15203 and ptr_val fields were not used by anything, with a single
15206 * image.c (Fimage_metadata, make_image, mark_image, tiff_load)
15207 (gif_clear_image, gif_load, imagemagick_load_image)
15208 (gs_clear_image, gs_load): Callers changed.
15210 2011-06-10 Paul Eggert <eggert@cs.ucla.edu>
15212 * buffer.h: Include <time.h>, for time_t.
15213 Needed to build on FreeBSD 8.2. Problem reported by Herbert J. Skuhra.
15215 Fix minor problems found by static checking.
15217 * image.c (PixelGetMagickColor): Declare if ImageMagick headers don't.
15219 Make identifiers static if they are not used in other modules.
15220 * data.c (Qcompiled_function, Qframe, Qvector):
15221 * image.c (QimageMagick, Qsvg):
15222 * minibuf.c (Qmetadata):
15223 * window.c (resize_window_check, resize_root_window): Now static.
15224 * window.h (resize_window_check, resize_root_window): Remove decls.
15226 * window.c (window_deletion_count, delete_deletable_window):
15228 (window_body_lines): Now static.
15229 (Fdelete_other_windows_internal): Mark vars as initialized.
15230 Make sure 'resize_failed' is initialized.
15231 (run_window_configuration_change_hook): Rename local to avoid shadowing.
15232 (resize_window_apply): Remove unused local.
15233 * window.h (delete_deletable_window): Remove decl.
15235 * image.c (gif_load, svg_load_image): Rename locals to avoid shadowing.
15236 (imagemagick_load_image): Fix pointer signedness problem by changing
15237 last arg from unsigned char * to char *. All uses changed.
15238 Also, fix a local for similar reasons.
15239 Remove unused locals. Remove locals to avoid shadowing.
15240 (fn_rsvg_handle_free): Remove; unused.
15241 (svg_load, svg_load_image): Fix pointer signedness problem.
15242 (imagemagick_load_image): Don't use garbage pointer image_wand.
15244 * ftfont.c (ftfont_get_metrics, ftfont_drive_otf): Remove unused locals.
15246 2011-06-10 Chong Yidong <cyd@stupidchicken.com>
15248 * image.c (gif_load): Fix omitted cast error introduced by
15251 2011-06-10 Martin Rudalics <rudalics@gmx.at>
15253 * window.h (resize_proportionally, orig_total_lines)
15254 (orig_top_line): Remove from window structure.
15255 (set_window_height, set_window_width, change_window_heights)
15256 (Fdelete_window): Remove prototypes.
15257 (resize_frame_windows): Remove duplicate declaration.
15259 2011-06-10 Eli Zaretskii <eliz@gnu.org>
15261 * window.h (resize_frame_windows, resize_window_check)
15262 (delete_deletable_window, resize_root_window)
15263 (resize_frame_windows): Declare prototypes.
15265 * window.c (resize_window_apply): Make definition be "static" to
15266 match the prototype.
15268 2011-06-10 Martin Rudalics <rudalics@gmx.at>
15270 * window.c: Remove declarations of Qwindow_size_fixed,
15271 window_min_size_1, window_min_size_2, window_min_size,
15272 size_window, window_fixed_size_p, enlarge_window, delete_window.
15273 Remove static from declaration of Qdelete_window, it's
15274 temporarily needed by Fbury_buffer.
15275 (replace_window): Don't assign orig_top_line and
15277 (Fdelete_window, delete_window): Remove. Window deletion is
15278 handled by window.el.
15279 (window_loop): Remove DELETE_OTHER_WINDOWS case.
15280 Replace Fdelete_window calls with calls to Qdelete_window.
15281 (Fdelete_other_windows): Remove. Deleting other windows is
15282 handled by window.el.
15283 (window_fixed_size_p): Remove. Fixed-sizeness of windows is
15284 handled in window.el.
15285 (window_min_size_2, window_min_size_1, window_min_size): Remove.
15286 Window minimum sizes are handled in window.el.
15287 (shrink_windows, size_window, set_window_height)
15288 (set_window_width, change_window_heights, window_height)
15289 (window_width, CURBEG, CURSIZE, enlarge_window)
15290 (adjust_window_trailing_edge, Fadjust_window_trailing_edge)
15291 (Fenlarge_window, Fshrink_window): Remove. Window resizing is
15292 handled in window.el.
15293 (make_dummy_parent): Rename to make_parent_window and give it a
15294 second argument horflag.
15295 (make_window): Don't set resize_proportionally any more.
15296 (Fsplit_window): Remove. Windows are split in window.el.
15297 (save_restore_action, save_restore_orig_size)
15298 (shrink_window_lowest_first, save_restore_orig_size): Remove.
15299 Resize mini windows in window.el.
15300 (grow_mini_window, shrink_mini_window): Implement by calling
15301 Qresize_root_window_vertically, resize_window_check and
15302 resize_window_apply.
15303 (saved_window, Fset_window_configuration, save_window_save):
15304 Do not handle orig_top_line, orig_total_lines, and
15305 resize_proportionally.
15306 (window_min_height, window_min_width): Move to window.el.
15307 (keys_of_window): Move bindings for delete-other-windows,
15308 split-window, delete-window and enlarge-window to window.el.
15310 * buffer.c: Temporarily extern Qdelete_window.
15311 (Fbury_buffer): Temporarily call Qdelete_window instead of
15312 Fdelete_window (Fbury_buffer will move to window.el soon).
15314 * frame.c (set_menu_bar_lines_1): Remove code handling
15315 orig_top_line and orig_total_lines.
15317 * dispnew.c (adjust_frame_glyphs_initially): Don't use
15318 set_window_height but set heights directly.
15319 (change_frame_size_1): Use resize_frame_windows.
15321 * xdisp.c (init_xdisp): Don't use set_window_height but set
15324 * xfns.c (x_set_menu_bar_lines, x_set_tool_bar_lines):
15325 Use resize_frame_windows instead of change_window_heights and run
15326 run_window_configuration_change_hook.
15328 * w32fns.c (x_set_tool_bar_lines): Use resize_frame_windows
15329 instead of change_window_heights and run
15330 run_window_configuration_change_hook.
15332 2011-06-09 Martin Rudalics <rudalics@gmx.at>
15334 * window.c (replace_window): Rename second argument REPLACEMENT to
15335 NEW. New third argument SETFLAG. Rewrite.
15336 (delete_window, make_dummy_parent): Call replace_window with
15338 (window_list_1): Move down in code.
15339 (run_window_configuration_change_hook): Move set_buffer part
15340 before select_frame_norecord part in order to unwind correctly.
15341 Rename count1 to count.
15342 (recombine_windows, delete_deletable_window, resize_root_window)
15343 (Fdelete_other_windows_internal)
15344 (Frun_window_configuration_change_hook, make_parent_window)
15345 (resize_window_check, resize_window_apply, Fresize_window_apply)
15346 (resize_frame_windows, Fsplit_window_internal)
15347 (Fdelete_window_internal, Fresize_mini_window_internal):
15349 (syms_of_window): New variables Vwindow_splits and Vwindow_nest.
15351 2011-06-08 Martin Rudalics <rudalics@gmx.at>
15353 * window.h (window): Add some new members to window structure -
15354 normal_lines, normal_cols, new_total, new_normal, clone_number,
15355 splits, nest, prev_buffers, next_buffers.
15356 (WINDOW_TOTAL_SIZE): Move here from window.c.
15357 (MIN_SAFE_WINDOW_WIDTH, MIN_SAFE_WINDOW_HEIGHT): Define here.
15359 * window.c (Fwindow_height, Fwindow_width, Fwindow_full_width_p):
15361 (make_dummy_parent): Set new members of windows structure.
15362 (make_window): Move down in code. Handle new members of window
15364 (Fwindow_clone_number, Fwindow_splits, Fset_window_splits)
15365 (Fwindow_nest, Fset_window_nest, Fwindow_new_total)
15366 (Fwindow_normal_size, Fwindow_new_normal, Fwindow_prev_buffers)
15367 (Fset_window_prev_buffers, Fwindow_next_buffers)
15368 (Fset_window_next_buffers, Fset_window_clone_number):
15370 (Fwindow_hscroll, Fwindow_at, Fwindow_point, Fwindow_start)
15371 (Fwindow_end, Fwindow_line_height, Fset_window_dedicated_p):
15373 (Fwindow_parameters, Fwindow_parameter, Fset_window_parameter):
15374 Argument WINDOW can be now internal window too.
15375 (Fwindow_use_time): Move up in code.
15376 (Fget_buffer_window): Rename argument FRAME to ALL-FRAMES.
15377 Rewrite doc-string.
15378 (Fset_window_configuration, saved_window)
15379 (Fcurrent_window_configuration, save_window_save): Handle new
15380 members of window structure.
15381 (WINDOW_TOTAL_SIZE, MIN_SAFE_WINDOW_WIDTH)
15382 (MIN_SAFE_WINDOW_HEIGHT): Move to window.h.
15383 (syms_of_window): New Lisp objects Qrecord_window_buffer,
15384 Qwindow_deletable_p, Qdelete_window, Qreplace_buffer_in_windows,
15385 Qget_mru_window, Qresize_root_window,
15386 Qresize_root_window_vertically, Qsafe, Qabove, Qbelow,
15387 Qauto_buffer_name; staticpro them.
15389 2011-06-07 Martin Rudalics <rudalics@gmx.at>
15391 * window.c (Fwindow_total_size, Fwindow_left_column)
15392 (Fwindow_top_line, window_body_lines, Fwindow_body_size)
15393 (Fwindow_list_1): New functions.
15394 (window_box_text_cols): Replace with window_body_cols.
15395 (Fwindow_width, Fscroll_left, Fscroll_right):
15396 Use window_body_cols instead of window_box_text_cols.
15397 (delete_window, Fset_window_configuration):
15398 Call delete_all_subwindows with window as argument.
15399 (delete_all_subwindows): Take a window as argument and not a
15400 structure. Rewrite.
15401 (window_loop): Remove handling of GET_LRU_WINDOW and
15402 GET_LARGEST_WINDOW.
15403 (Fget_lru_window, Fget_largest_window): Move to window.el.
15405 * window.h: Extern window_body_cols instead of
15406 window_box_text_cols. delete_all_subwindows now takes a
15407 Lisp_Object as argument.
15409 * indent.c (compute_motion, Fcompute_motion):
15410 Use window_body_cols instead of window_box_text_cols.
15412 * frame.c (delete_frame): Call delete_all_subwindows with root
15413 window as argument.
15415 2011-06-07 Daniel Colascione <dan.colascione@gmail.com>
15417 * fns.c (Fputhash): Document return value.
15419 2011-06-06 Chong Yidong <cyd@stupidchicken.com>
15421 * image.c (gif_load): Implement gif89a spec "no disposal" method.
15423 2011-06-06 Paul Eggert <eggert@cs.ucla.edu>
15425 Cons<->int and similar integer overflow fixes (Bug#8794).
15427 Check for overflow when converting integer to cons and back.
15428 * charset.c (Fdefine_charset_internal, Fdecode_char):
15429 Use cons_to_unsigned to catch overflow.
15430 (Fencode_char): Use INTEGER_TO_CONS.
15431 * composite.h (LGLYPH_CODE): Use cons_to_unsigned.
15432 (LGLYPH_SET_CODE): Use INTEGER_TO_CONS.
15433 * data.c (long_to_cons, cons_to_long): Remove.
15434 (cons_to_unsigned, cons_to_signed): New functions.
15435 These signal an error for invalid or out-of-range values.
15436 * dired.c (Ffile_attributes): Use INTEGER_TO_CONS.
15437 * fileio.c (Fset_visited_file_modtime): Use CONS_TO_INTEGER.
15438 * font.c (Ffont_variation_glyphs):
15439 * fontset.c (Finternal_char_font): Use INTEGER_TO_CONS.
15440 * lisp.h: Include <intprops.h>.
15441 (INTEGER_TO_CONS, CONS_TO_INTEGER): New macros.
15442 (cons_to_signed, cons_to_unsigned): New decls.
15443 (long_to_cons, cons_to_long): Remove decls.
15444 * undo.c (record_first_change): Use INTEGER_TO_CONS.
15445 (Fprimitive_undo): Use CONS_TO_INTEGER.
15446 * xfns.c (Fx_window_property): Likewise.
15447 * xselect.c: Include <limits.h>.
15448 (x_own_selection, selection_data_to_lisp_data):
15449 Use INTEGER_TO_CONS.
15450 (x_handle_selection_request, x_handle_selection_clear)
15451 (x_get_foreign_selection, Fx_disown_selection_internal)
15452 (Fx_get_atom_name, x_send_client_event): Use CONS_TO_INTEGER.
15453 (lisp_data_to_selection_data): Use cons_to_unsigned.
15454 (x_fill_property_data): Use cons_to_signed.
15455 Report values out of range.
15457 Check for buffer and string overflow more precisely.
15458 * buffer.h (BUF_BYTES_MAX): New macro.
15459 * lisp.h (STRING_BYTES_MAX): New macro.
15460 * alloc.c (Fmake_string):
15461 * character.c (string_escape_byte8):
15462 * coding.c (coding_alloc_by_realloc):
15463 * doprnt.c (doprnt):
15464 * editfns.c (Fformat):
15466 Use STRING_BYTES_MAX, not MOST_POSITIVE_FIXNUM,
15467 since they may not be the same number.
15468 * editfns.c (Finsert_char):
15469 * fileio.c (Finsert_file_contents):
15470 Likewise for BUF_BYTES_MAX.
15472 * image.c: Use ptrdiff_t, not int, for sizes.
15473 (slurp_file): Switch from int to ptrdiff_t.
15475 (slurp_file): Check that file size fits in both size_t (for
15476 malloc) and ptrdiff_t (for sanity and safety).
15478 * fileio.c (Fverify_visited_file_modtime): Avoid time overflow
15479 if b->modtime has its maximal value.
15481 * dired.c (Ffile_attributes): Don't assume EMACS_INT has >32 bits.
15483 Don't assume time_t can fit into int.
15484 * buffer.h (struct buffer.modtime): Now time_t, not int.
15485 * fileio.c (Fvisited_file_modtime): No need for time_t cast now.
15486 * undo.c (Fprimitive_undo): Use time_t, not int, for time_t value.
15488 Minor fixes for signed vs unsigned integers.
15489 * character.h (MAYBE_UNIFY_CHAR):
15490 * charset.c (maybe_unify_char):
15491 * keyboard.c (read_char, reorder_modifiers):
15492 XINT -> XFASTINT, since the integer must be nonnegative.
15493 * ftfont.c (ftfont_spec_pattern):
15494 * keymap.c (access_keymap, silly_event_symbol_error):
15495 XUINT -> XFASTINT, since the integer must be nonnegative.
15496 (Fsingle_key_description, preferred_sequence_p): XUINT -> XINT,
15497 since it makes no difference and we prefer signed.
15498 * keyboard.c (record_char): Use XUINT when all the neighbors do.
15499 (access_keymap): NATNUMP -> INTEGERP, since the integer must be
15502 2011-06-06 Stefan Monnier <monnier@iro.umontreal.ca>
15504 * window.h (Fwindow_frame): Declare.
15506 2011-06-06 Paul Eggert <eggert@cs.ucla.edu>
15508 * alloc.c: Simplify handling of large-request failures (Bug#8800).
15509 (SPARE_MEMORY): Always define.
15510 (LARGE_REQUEST): Remove.
15511 (memory_full): Use SPARE_MEMORY rather than LARGE_REQUEST.
15513 2011-06-06 Martin Rudalics <rudalics@gmx.at>
15515 * lisp.h: Move EXFUNS for Fframe_root_window,
15516 Fframe_first_window and Fset_frame_selected_window to window.h.
15518 * window.h: Move EXFUNS for Fframe_root_window,
15519 Fframe_first_window and Fset_frame_selected_window here from
15522 * frame.c (Fwindow_frame, Fframe_first_window)
15523 (Fframe_root_window, Fframe_selected_window)
15524 (Fset_frame_selected_window): Move to window.c.
15525 (Factive_minibuffer_window): Move to minibuf.c.
15526 (Fother_visible_frames_p): New function.
15528 * minibuf.c (Factive_minibuffer_window): Move here from frame.c.
15530 * window.c (decode_window, decode_any_window): Move up in code.
15531 (Fwindowp, Fwindow_live_p): Rewrite doc-strings.
15532 (inhibit_frame_unsplittable): Remove unused variable.
15533 (Fwindow_buffer): Move up and rewrite doc-string.
15534 (Fwindow_parent, Fwindow_vchild, Fwindow_hchild, Fwindow_next)
15535 (Fwindow_prev): New functions.
15536 (Fwindow_frame): Move here from frame.c. Accept any window as
15538 (Fframe_root_window, Fframe_first_window)
15539 (Fframe_selected_window): Move here from frame.c. Accept frame
15540 or arbitrary window as argument. Update doc-strings.
15541 (Fminibuffer_window): Move up in code.
15542 (Fwindow_minibuffer_p): Move up in code and simplify.
15543 (Fset_frame_selected_window): Move here from frame.c.
15545 (Fselected_window, select_window, Fselect_window): Move up in
15546 code. Minor doc-string fixes.
15548 2011-06-06 Paul Eggert <eggert@cs.ucla.edu>
15550 * alloc.c (memory_full) [SYSTEM_MALLOC]: Port to MacOS (Bug#8800).
15551 Do not assume that spare memory exists; that assumption is valid
15552 only if SYSTEM_MALLOC.
15553 (LARGE_REQUEST): New macro, so that the issue of large requests
15554 is separated from the issue of spare memory.
15556 2011-06-05 Andreas Schwab <schwab@linux-m68k.org>
15558 * editfns.c (Fformat): Correctly handle zero flag with hexadecimal
15561 * gtkutil.c (xg_get_default_scrollbar_width): Avoid warning.
15563 * xfns.c (x_set_scroll_bar_default_width): Move declarations
15566 2011-06-05 Jan Djärv <jan.h.d@swipnet.se>
15568 * gtkutil.c (xg_get_default_scrollbar_width): New function.
15570 * gtkutil.h: Declare xg_get_default_scrollbar_width.
15572 * xfns.c (x_set_scroll_bar_default_width): If USE_GTK, get
15573 min width by calling x_set_scroll_bar_default_width (Bug#8505).
15575 2011-06-05 Juanma Barranquero <lekktu@gmail.com>
15577 * xdisp.c (single_display_spec_intangible_p): Remove declaration.
15579 2011-06-04 Chong Yidong <cyd@stupidchicken.com>
15581 * xselect.c (x_clipboard_manager_save): Remove redundant arg.
15582 (x_clipboard_manager_save): Add return value.
15583 (x_clipboard_manager_error_1, x_clipboard_manager_error_2):
15584 New error handlers.
15585 (x_clipboard_manager_save_frame, x_clipboard_manager_save_all):
15586 Obey Vx_select_enable_clipboard_manager. Catch errors in
15587 x_clipboard_manager_save (Bug#8779).
15588 (Vx_select_enable_clipboard_manager): New variable.
15589 (x_get_foreign_selection): Reduce scope of x_catch_errors (Bug#8790).
15591 2011-06-04 Dan Nicolaescu <dann@ics.uci.edu>
15593 * emacs.c (main): Warn when starting a GTK emacs in daemon mode.
15595 2011-06-04 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
15597 * fringe.c (update_window_fringes): Don't update overlay arrow bitmap
15598 in the current matrix if keep_current_p is non-zero.
15600 2011-06-04 Eli Zaretskii <eliz@gnu.org>
15602 * bidi.c (bidi_level_of_next_char): Fix last change.
15604 2011-06-03 Eli Zaretskii <eliz@gnu.org>
15606 Support bidi reordering of text covered by display properties.
15608 * bidi.c (bidi_copy_it): Use offsetof instead of emulating it.
15609 (bidi_fetch_char, bidi_fetch_char_advance): New functions.
15610 (bidi_cache_search, bidi_cache_iterator_state)
15611 (bidi_paragraph_init, bidi_resolve_explicit, bidi_resolve_weak)
15612 (bidi_level_of_next_char, bidi_move_to_visually_next):
15613 Support character positions inside a run of characters covered by a
15615 (bidi_paragraph_init, bidi_resolve_explicit_1)
15616 (bidi_level_of_next_char): Call bidi_fetch_char and
15617 bidi_fetch_char_advance instead of FETCH_CHAR and
15618 FETCH_CHAR_ADVANCE.
15619 (bidi_init_it): Initialize new members.
15620 (LRE_CHAR, RLE_CHAR, PDF_CHAR, LRO_CHAR, RLO_CHAR): Remove macro
15622 (bidi_explicit_dir_char): Lookup character type in bidi_type_table,
15623 instead of using explicit *_CHAR codes.
15624 (bidi_resolve_explicit, bidi_resolve_weak):
15625 Use FETCH_MULTIBYTE_CHAR instead of FETCH_CHAR, as reordering of
15626 bidirectional text is supported only in multibyte buffers.
15627 (bidi_init_it): Accept additional argument FRAME_WINDOW_P and use
15628 it to initialize the frame_window_p member of struct bidi_it.
15629 (bidi_cache_iterator_state, bidi_resolve_explicit_1)
15630 (bidi_resolve_explicit, bidi_resolve_weak)
15631 (bidi_level_of_next_char, bidi_move_to_visually_next): Abort if
15632 bidi_it->nchars is non-positive.
15633 (bidi_level_of_next_char): Don't try to lookup the cache for the
15634 next/previous character if nothing is cached there yet, or if we
15635 were just reseat()'ed to a new position.
15637 * xdisp.c (set_cursor_from_row): Set start and stop points
15638 according to the row's direction when priming the loop that looks
15639 for the glyph on which to display cursor.
15640 (single_display_spec_intangible_p): Function deleted.
15641 (display_prop_intangible_p): Reimplement to call
15642 handle_display_spec instead of single_display_spec_intangible_p.
15643 Accept 3 additional arguments needed by handle_display_spec.
15644 This fixes incorrect cursor motion across display property with complex
15645 values: lists, `(when COND...)' forms, etc.
15646 (single_display_spec_string_p): Support property values that are
15647 lists with the argument STRING its top-level element.
15648 (display_prop_string_p): Fix the condition for processing a
15649 property that is a list to be consistent with handle_display_spec.
15650 (handle_display_spec): New function, refactored from the
15651 last portion of handle_display_prop.
15652 (compute_display_string_pos): Accept additional argument
15653 FRAME_WINDOW_P. Call handle_display_spec to determine whether the
15654 value of a `display' property is a "replacing spec".
15655 (handle_single_display_spec): Accept 2 additional arguments BUFPOS
15656 and FRAME_WINDOW_P. If IT is NULL, don't set up the iterator from
15657 the display property, but just return a value indicating whether
15658 the display property will replace the characters it covers.
15659 (Fcurrent_bidi_paragraph_direction): Initialize the nchars and
15660 frame_window_p members of struct bidi_it.
15661 (compute_display_string_pos, compute_display_string_end):
15663 (push_it): Accept second argument POSITION, where pop_it should
15664 jump to continue iteration.
15665 (reseat_1): Initialize bidi_it.disp_pos.
15667 * keyboard.c (adjust_point_for_property): Adjust the call to
15668 display_prop_intangible_p to its new signature.
15670 * dispextern.h (struct bidi_it): New member frame_window_p.
15671 (bidi_init_it): Update prototypes.
15672 (display_prop_intangible_p): Update prototype.
15673 (compute_display_string_pos, compute_display_string_end):
15674 Declare prototypes.
15675 (struct bidi_it): New members nchars and disp_pos. ch_len is now
15678 2011-06-02 Paul Eggert <eggert@cs.ucla.edu>
15680 Malloc failure behavior now depends on size of allocation.
15681 * alloc.c (buffer_memory_full, memory_full): New arg NBYTES.
15682 * lisp.h: Change signatures accordingly.
15683 * alloc.c, buffer.c, editfns.c, menu.c, minibuf.c, xterm.c:
15684 All callers changed. (Bug#8762)
15686 * gnutls.c: Use Emacs's memory allocators.
15687 Without this change, the gnutls library would invoke malloc etc.
15688 directly, which causes problems on non-SYNC_INPUT hosts, and which
15689 runs afoul of improving memory_full behavior. (Bug#8761)
15690 (fn_gnutls_global_set_mem_functions): New macro or function pointer.
15691 (emacs_gnutls_global_init): Use it to specify xmalloc, xrealloc,
15692 xfree instead of the default malloc, realloc, free.
15693 (Fgnutls_boot): No need to check for memory allocation failure,
15694 since xmalloc does that for us.
15696 Remove arbitrary limit of 2**31 entries in hash tables. (Bug#8771)
15697 * category.c (hash_get_category_set):
15698 * ccl.c (ccl_driver):
15699 * charset.c (Fdefine_charset_internal):
15700 * charset.h (struct charset.hash_index):
15701 * composite.c (get_composition_id, gstring_lookup_cache)
15702 (composition_gstring_put_cache):
15703 * composite.h (struct composition.hash_index):
15704 * dispextern.h (struct image.hash):
15705 * fns.c (next_almost_prime, larger_vector, cmpfn_eql)
15706 (cmpfn_equal, cmpfn_user_defined, hashfn_eq, hashfn_eql)
15707 (hashfn_equal, hashfn_user_defined, make_hash_table)
15708 (maybe_resize_hash_table, hash_lookup, hash_put)
15709 (hash_remove_from_table, hash_clear, sweep_weak_table, SXHASH_COMBINE)
15710 (sxhash_string, sxhash_list, sxhash_vector, sxhash_bool_vector)
15711 (Fsxhash, Fgethash, Fputhash, Fmaphash):
15712 * image.c (make_image, search_image_cache, lookup_image)
15713 (xpm_put_color_table_h):
15714 * lisp.h (struct Lisp_Hash_Table):
15715 * minibuf.c (Ftry_completion, Fall_completions, Ftest_completion):
15716 * print.c (print): Use 'EMACS_UINT' and 'EMACS_INT'
15717 for hashes and hash indexes, instead of 'unsigned' and 'int'.
15718 * alloc.c (allocate_vectorlike):
15719 Check for overflow in vector size calculations.
15720 * ccl.c (ccl_driver):
15721 Check for overflow when converting EMACS_INT to int.
15722 * fns.c, image.c: Remove unnecessary static decls that would otherwise
15723 need to be updated by these changes.
15724 * fns.c (make_hash_table, maybe_resize_hash_table):
15725 Check for integer overflow with large hash tables.
15726 (make_hash_table, maybe_resize_hash_table, Fmake_hash_table):
15727 Prefer the faster XFLOAT_DATA to XFLOATINT where either will do.
15728 (SXHASH_REDUCE): New macro.
15729 (sxhash_string, sxhash_list, sxhash_vector, sxhash_bool_vector):
15730 Use it instead of discarding useful hash info with large hash values.
15731 (sxhash_float): New function.
15732 (sxhash): Use it. No more need for "& INTMASK" due to above changes.
15733 * lisp.h (FIXNUM_BITS): New macro, useful for SXHASH_REDUCE etc.
15734 (MOST_NEGATIVE_FIXNUM, MOST_POSITIVE_FIXNUM, INTMASK):
15735 Rewrite to use FIXNUM_BITS, as this simplifies things.
15736 (next_almost_prime, larger_vector, sxhash, hash_lookup, hash_put):
15737 Adjust signatures to match updated version of code.
15738 (consing_since_gc): Now EMACS_INT, since a single hash table can
15739 use more than INT_MAX bytes.
15741 2011-06-01 Dan Nicolaescu <dann@ics.uci.edu>
15743 Make it possible to build with GCC-4.6+ -O2 -flto.
15745 * emacs.c (__malloc_initialize_hook): Mark as EXTERNALLY_VISIBLE.
15747 2011-06-01 Stefan Monnier <monnier@iro.umontreal.ca>
15749 * minibuf.c (get_minibuffer, read_minibuf_unwind):
15750 Call minibuffer-inactive-mode.
15752 2011-05-31 Juanma Barranquero <lekktu@gmail.com>
15754 * makefile.w32-in ($(BLD)/data.$(O), $(BLD)/editfns.$(O)):
15755 Update dependencies.
15757 2011-05-31 Dan Nicolaescu <dann@ics.uci.edu>
15759 * data.c (init_data): Remove code for UTS, this system is not
15762 2011-05-31 Dan Nicolaescu <dann@ics.uci.edu>
15764 Don't force ./temacs to start in terminal mode.
15766 * frame.c (make_initial_frame): Initialize faces in all cases, not
15767 only when CANNOT_DUMP is defined.
15768 * dispnew.c (init_display): Remove CANNOT_DUMP condition.
15770 2011-05-31 Dan Nicolaescu <dann@ics.uci.edu>
15772 * dispnew.c (add_window_display_history): Use const for the string
15773 pointer. Remove declaration, not needed.
15775 2011-05-31 Paul Eggert <eggert@cs.ucla.edu>
15777 Use 'inline', not 'INLINE'.
15778 <http://lists.gnu.org/archive/html/emacs-devel/2011-05/msg00914.html>
15779 * alloc.c, fontset.c (INLINE): Remove.
15780 * alloc.c, bidi.c, charset.c, coding.c, dispnew.c, fns.c, image.c:
15781 * intervals.c, keyboard.c, process.c, syntax.c, textprop.c, w32term.c:
15782 * xdisp.c, xfaces.c, xterm.c: Replace all uses of INLINE with inline.
15783 * gmalloc.c (register_heapinfo): Use inline unconditionally.
15784 * lisp.h (LISP_MAKE_RVALUE): Use inline, not __inline__.
15786 2011-05-31 Dan Nicolaescu <dann@ics.uci.edu>
15788 Make it possible to run ./temacs.
15790 * callproc.c (set_initial_environment): Remove CANNOT_DUMP code,
15791 syms_of_callproc does the same thing. Remove test for
15792 "initialized", do it in the caller.
15793 * emacs.c (main): Avoid calling set_initial_environment when dumping.
15795 2011-05-31 Stefan Monnier <monnier@iro.umontreal.ca>
15797 * minibuf.c (Finternal_complete_buffer): Return `category' metadata.
15798 (read_minibuf): Use get_minibuffer.
15799 (syms_of_minibuf): Use DEFSYM.
15800 (Qmetadata): New var.
15801 * data.c (Qbuffer): Don't make it static.
15802 (syms_of_data): Use DEFSYM.
15804 2011-05-31 Paul Eggert <eggert@cs.ucla.edu>
15806 * ccl.c (CCL_CODE_RANGE): Allow negative numbers. (Bug#8751)
15807 (CCL_CODE_MIN): New macro.
15809 2011-05-30 Paul Eggert <eggert@cs.ucla.edu>
15811 * alloc.c (lisp_align_malloc): Omit unnecessary val==NULL tests.
15813 * eval.c (Qdebug): Now static.
15814 * lisp.h (Qdebug): Remove decl. This reverts a part of the
15815 2011-04-26T11:26:05Z!dan.colascione@gmail.com that inadvertently undid part of
15816 2011-04-14T06:48:41Z!eggert@cs.ucla.edu.
15818 2011-05-29 Chong Yidong <cyd@stupidchicken.com>
15820 * image.c: Various fixes to ImageMagick code comments.
15821 (Fimagemagick_types): Doc fix.
15823 2011-05-29 Paul Eggert <eggert@cs.ucla.edu>
15825 Minor fixes prompted by GCC 4.6.0 warnings.
15827 * xselect.c (converted_selections, conversion_fail_tag): Now static.
15829 * emacs.c [HAVE_X_WINDOWS]: Include "xterm.h".
15830 (x_clipboard_manager_save_all): Move extern decl to ...
15831 * xterm.h: ... here, so that it can be checked for consistency.
15833 2011-05-29 Chong Yidong <cyd@stupidchicken.com>
15835 * xselect.c (x_clipboard_manager_save_frame)
15836 (x_clipboard_manager_save_all): New functions.
15837 (Fx_clipboard_manager_save): Lisp function deleted.
15839 * emacs.c (Fkill_emacs): Call x_clipboard_manager_save_all.
15840 * frame.c (delete_frame): Call x_clipboard_manager_save_frame.
15842 * xterm.h: Update prototype.
15844 2011-05-28 William Xu <william.xwl@gmail.com>
15846 * nsterm.m (ns_term_shutdown): Synchronize user defaults before
15847 exiting (Bug#8239).
15849 2011-05-28 Jim Meyering <meyering@redhat.com>
15851 Avoid a sign-extension bug in crypto_hash_function.
15852 * fns.c (to_uchar): Define.
15853 (crypto_hash_function): Use it to convert some newly-signed
15854 variables to unsigned, to avoid sign-extension bugs. For example,
15855 without this change, (md5 "truc") would evaluate to
15856 45723a2aff78ff4fff7fff1114760e62 rather than the expected
15857 45723a2af3788c4ff17f8d1114760e62. Reported by Antoine Levitt in
15858 https://lists.gnu.org/archive/html/emacs-devel/2011-05/msg00883.html.
15860 2011-05-27 Paul Eggert <eggert@cs.ucla.edu>
15862 Integer overflow fixes.
15864 * dbusbind.c: Serial number integer overflow fixes.
15865 (CHECK_DBUS_SERIAL_GET_SERIAL): New macro.
15866 (Fdbus_call_method_asynchronously, xd_read_message_1): Use a float
15867 to hold a serial number that is too large for a fixnum.
15868 (Fdbus_method_return_internal, Fdbus_method_error_internal):
15869 Check for serial numbers out of range. Decode any serial number
15870 that was so large that it became a float. (Bug#8722)
15872 * dbusbind.c: Use XFASTINT rather than XUINT, and check for nonneg.
15873 (Fdbus_call_method, Fdbus_call_method_asynchronously):
15874 Use XFASTINT rather than XUINT when numbers are nonnegative.
15875 (xd_append_arg, Fdbus_method_return_internal):
15876 (Fdbus_method_error_internal): Likewise. Also, for unsigned
15877 arguments, check that Lisp number is nonnegative, rather than
15878 silently wrapping negative numbers around. (Bug#8722)
15879 (xd_read_message_1): Don't assume dbus_uint32_t can fit in int.
15882 * data.c (arith_driver, Flsh): Avoid unnecessary casts to EMACS_UINT.
15884 * ccl.c (ccl_driver): Redo slightly to avoid the need for 'unsigned'.
15886 ccl: Add integer overflow checks.
15887 * ccl.c (CCL_CODE_MAX, GET_CCL_RANGE, GET_CCL_CODE, GET_CCL_INT):
15888 (IN_INT_RANGE): New macros.
15889 (ccl_driver): Use them to check for integer overflow when
15890 decoding a CCL program. Many of the new checks are whether XINT (x)
15891 fits in int; it doesn't always, on 64-bit hosts. The new version
15892 doesn't catch all possible integer overflows, but it's an
15893 improvement. (Bug#8719)
15895 * alloc.c (make_event_array): Use XINT, not XUINT.
15896 There's no need for unsigned here.
15898 * mem-limits.h (EXCEEDS_LISP_PTR) [!USE_LSB_TAG]: EMACS_UINT -> uintptr_t
15899 This follows up to the 2011-05-06 change that substituted uintptr_t
15900 for EMACS_INT. This case wasn't caught back then.
15902 Rework Fformat to avoid integer overflow issues.
15903 * editfns.c: Include <float.h> unconditionally, as it's everywhere
15904 now (part of C89). Include <verify.h>.
15905 (MAX_10_EXP, CONVERTED_BYTE_SIZE): Remove; no longer needed.
15906 (pWIDE, pWIDElen, signed_wide, unsigned_wide): New defns.
15907 (Fformat): Avoid the prepass trying to compute sizes; it was only
15908 approximate and thus did not catch overflow reliably. Instead, walk
15909 through the format just once, formatting and computing sizes as we go,
15910 checking for integer overflow at every step, and allocating a larger
15911 buffer as needed. Keep track separately whether the format is
15912 multibyte. Keep only the most-recently calculated precision, rather
15913 than them all. Record whether each argument has been converted to
15914 string. Use EMACS_INT, not int, for byte and char and arg counts.
15915 Support field widths and precisions larger than INT_MAX. Avoid
15916 sprintf's undefined behavior with conversion specifications such as %#d
15917 and %.0c. Fix bug with strchr succeeding on '\0' when looking for
15918 flags. Fix bug with (format "%c" 256.0). Avoid integer overflow when
15919 formatting out-of-range floating point numbers with int
15920 formats. (Bug#8668)
15922 * lisp.h (FIXNUM_OVERFLOW_P): Work even if arg is a NaN.
15924 * data.c: Avoid integer truncation in expressions involving floats.
15925 * data.c: Include <intprops.h>.
15926 (arith_driver): When there's an integer overflow in an expression
15927 involving floating point, convert the integers to floating point
15928 so that the resulting value does not suffer from catastrophic
15929 integer truncation. For example, on a 64-bit host (* 4
15930 most-negative-fixnum 0.5) should yield about -4.6e+18, not zero.
15931 Do not rely on undefined behavior after integer overflow.
15933 merge count_size_as_multibyte, parse_str_to_multibyte
15934 * character.c, character.h (count_size_as_multibyte):
15935 Rename from parse_str_to_multibyte; all uses changed.
15936 Check for integer overflow.
15937 * insdel.c, lisp.h (count_size_as_multibyte): Remove,
15938 since it's now a duplicate of the other. This is more of
15939 a character than a buffer op, so better that it's in character.c.
15940 * fns.c, print.c: Adjust to above changes.
15942 2011-05-27 Stefan Monnier <monnier@iro.umontreal.ca>
15944 * xselect.c (x_convert_selection): Yet another int/Lisp_Object mixup.
15946 2011-05-27 Paul Eggert <eggert@cs.ucla.edu>
15948 * xselect.c: Fix minor problems prompted by GCC 4.6.0 warnings.
15949 (x_handle_selection_request, frame_for_x_selection): Remove unused vars.
15950 (x_clipboard_manager_save): Now static.
15951 (Fx_clipboard_manager_save): Rename local to avoid shadowing.
15953 * fns.c: Fix minor problems prompted by GCC 4.6.0 warnings.
15954 (crypto_hash_function): Now static.
15955 Fix pointer signedness problems. Avoid unnecessary initializations.
15957 2011-05-27 Chong Yidong <cyd@stupidchicken.com>
15959 * termhooks.h (Vselection_alist): Make it terminal-local.
15961 * terminal.c (create_terminal): Initialize it.
15963 * xselect.c: Support for clipboard managers.
15964 (Vselection_alist): Move to termhooks.h as terminal-local var.
15965 (LOCAL_SELECTION): New macro.
15966 (x_atom_to_symbol): Handle x_display_info_for_display fail case.
15967 (symbol_to_x_atom): Remove gratuitous arg.
15968 (x_handle_selection_request, lisp_data_to_selection_data)
15969 (x_get_foreign_selection, Fx_register_dnd_atom): Callers changed.
15970 (x_own_selection, x_get_local_selection, x_convert_selection):
15971 New arg, specifying work frame. Use terminal-local Vselection_alist.
15972 (some_frame_on_display): Delete unused function.
15973 (Fx_own_selection_internal, Fx_get_selection_internal)
15974 (Fx_disown_selection_internal, Fx_selection_owner_p)
15975 (Fx_selection_exists_p): New optional frame arg.
15976 (frame_for_x_selection, Fx_clipboard_manager_save): New functions.
15977 (x_handle_selection_clear): Don't treat other terminals with the
15978 same keyboard specially. Use the terminal-local Vselection_alist.
15979 (x_clear_frame_selections): Use Frun_hook_with_args.
15981 * xterm.c (x_term_init): Intern ATOM and CLIPBOARD_MANAGER atoms.
15983 * xterm.h: Add support for those atoms.
15985 2011-05-26 Chong Yidong <cyd@stupidchicken.com>
15987 * xselect.c: ICCCM-compliant handling of MULTIPLE targets.
15988 (converted_selections, conversion_fail_tag): New global variables.
15989 (x_selection_request_lisp_error): Free the above.
15990 (x_get_local_selection): Remove unnecessary code.
15991 (x_reply_selection_request): Args changed; handle arbitrary array
15992 of converted selections stored in converted_selections.
15993 Separate the XChangeProperty and SelectionNotify steps.
15994 (x_handle_selection_request): Rewrite to handle MULTIPLE target.
15995 (x_convert_selection): New function.
15996 (x_handle_selection_event): Simplify.
15997 (x_get_foreign_selection): Don't ignore incoming requests while
15998 waiting for an answer; this will fail when we implement
15999 SAVE_TARGETS, and seems unnecessary anyway.
16000 (selection_data_to_lisp_data): Recognize ATOM_PAIR type.
16001 (Vx_sent_selection_functions): Doc fix.
16003 2011-05-26 Leo Liu <sdl.web@gmail.com>
16005 * editfns.c (Ftranspose_regions): Allow empty regions. (Bug#8699)
16007 2011-05-25 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
16009 * dispextern.h (struct glyph_row): New member fringe_bitmap_periodic_p.
16011 * dispnew.c (shift_glyph_matrix, scrolling_window): Mark scrolled row
16012 for fringe update if it has periodic bitmap.
16013 (row_equal_p): Also compare left_fringe_offset, right_fringe_offset,
16014 and fringe_bitmap_periodic_p.
16016 * fringe.c (get_fringe_bitmap_data): New function.
16017 (draw_fringe_bitmap_1, update_window_fringes): Use it.
16018 (update_window_fringes): Record periodicity of fringe bitmap in glyph
16019 row. Mark glyph row for fringe update if periodicity changed.
16021 * xdisp.c (try_window_reusing_current_matrix): Don't mark scrolled row
16022 for fringe update unless it has periodic bitmap.
16024 2011-05-25 Kenichi Handa <handa@m17n.org>
16026 * xdisp.c (get_next_display_element): Set correct it->face_id for
16027 a static composition.
16029 2011-05-24 Leo Liu <sdl.web@gmail.com>
16032 * makefile.w32-in ($(BLD)/fns.$(O)): Include sha1.h.
16034 * fns.c (crypto_hash_function, Fsha1): New function.
16035 (Fmd5): Use crypto_hash_function.
16036 (syms_of_fns): Add Ssha1.
16038 2011-05-22 Paul Eggert <eggert@cs.ucla.edu>
16040 * gnutls.c: Remove unused macros.
16041 (fn_gnutls_transport_set_lowat, fn_gnutls_transport_set_pull_function):
16042 (fn_gnutls_transport_set_push_function) [!WINDOWSNT]:
16043 Remove macros that are defined and never used.
16044 Caught by gcc -Wunused-macros (GCC 4.6.0, Fedora 14).
16046 2011-05-22 Chong Yidong <cyd@stupidchicken.com>
16048 * xselect.c (syms_of_xselect): Remove unused symbol SAVE_TARGETS.
16049 (Fx_get_selection_internal): Minor cleanup.
16050 (Fx_own_selection_internal): Rename arguments for consistency with
16053 2011-05-22 Paul Eggert <eggert@cs.ucla.edu>
16055 * xselect.c (QSAVE_TARGETS): New static var, to fix build failure.
16057 2011-05-22 Chong Yidong <cyd@stupidchicken.com>
16059 * xselect.c (syms_of_xselect): Include character.h; use DEFSYM.
16061 2011-05-21 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
16063 * dispnew.c (scrolling_window): Don't exclude the case that the
16064 last enabled row in the desired matrix touches the bottom boundary.
16066 2011-05-21 Glenn Morris <rgm@gnu.org>
16068 * Makefile.in ($(etc)/DOC): Make second command line even shorter.
16069 (SOME_MACHINE_OBJECTS): Replace FONT_OBJ by its maximal expansion,
16070 and add some more files.
16072 2011-05-20 Eli Zaretskii <eliz@gnu.org>
16074 * callproc.c (Fcall_process) [MSDOS]: Fix arguments to
16075 report_file_error introduced by the change from 2011-05-07.
16077 2011-05-20 Paul Eggert <eggert@cs.ucla.edu>
16079 * systime.h (Time): Define only if emacs is defined.
16080 This is to allow ../lib-src/profile.c to be compiled on FreeBSD,
16081 where the include path doesn't have X11/X.h by default. See
16082 <http://lists.gnu.org/archive/html/emacs-devel/2011-05/msg00561.html>.
16084 2011-05-20 Kenichi Handa <handa@m17n.org>
16086 * composite.c (find_automatic_composition): Fix previous change.
16088 2011-05-20 Glenn Morris <rgm@gnu.org>
16090 * lisp.mk: New file, split from Makefile.in.
16091 * Makefile.in (lisp): Move to separate file, inserted by @lisp_frag@.
16092 (shortlisp): Remove.
16093 ($(etc)/DOC): Edit lisp.mk rather than using $shortlisp.
16095 2011-05-19 Glenn Morris <rgm@gnu.org>
16097 * Makefile.in (MSDOS_SUPPORT_REAL, MSDOS_SUPPORT, NS_SUPPORT)
16098 (REAL_MOUSE_SUPPORT, GPM_MOUSE_SUPPORT, MOUSE_SUPPORT, TOOLTIP_SUPPORT)
16099 (BASE_WINDOW_SUPPORT, X_WINDOW_SUPPORT, WINDOW_SUPPORT): Remove.
16100 (lisp): Set the order to that of loadup.el.
16101 (shortlisp): Make it a copy of $lisp.
16102 (SOME_MACHINE_LISP): Remove.
16103 ($(etc)/DOC): Depend just on $lisp, not $SOME_MACHINE_LISP too.
16104 Use just $shortlisp, not $SOME_MACHINE_LISP too.
16106 2011-05-18 Kenichi Handa <handa@m17n.org>
16108 * composite.c (CHAR_COMPOSABLE_P): Add more check for efficiency.
16109 (BACKWARD_CHAR): Wrap the arg STOP by parenthesis.
16110 (find_automatic_composition): Mostly rewrite for efficiency.
16112 2011-05-18 Juanma Barranquero <lekktu@gmail.com>
16114 * makefile.w32-in: Update dependencies.
16116 2011-05-18 Christoph Scholtes <cschol2112@googlemail.com>
16118 * menu.c: Include limits.h (fixes the MS-Windows build broken by
16119 2011-06-18T18:49:19Z!cyd@stupidchicken.com).
16121 2011-05-18 Paul Eggert <eggert@cs.ucla.edu>
16123 Fix some integer overflow issues, such as string length overflow.
16125 * insdel.c (count_size_as_multibyte): Check for string overflow.
16127 * character.c (lisp_string_width): Check for string overflow.
16128 Use EMACS_INT, not int, for string indexes and lengths; in
16129 particular, 2nd arg is now EMACS_INT, not int. Do not crash if
16130 the resulting string length overflows an EMACS_INT; instead,
16131 report a string overflow if no precision given. When checking for
16132 precision exhaustion, use a check that cannot possibly have
16133 integer overflow. (Bug#8675)
16134 * character.h (lisp_string_width): Adjust to new signature.
16136 * alloc.c (string_overflow): New function.
16137 (Fmake_string): Use it. This doesn't change behavior, but saves
16138 a few bytes and will simplify future changes.
16139 * character.c (string_escape_byte8): Likewise.
16140 * lisp.h (string_overflow): New decl.
16142 Fixups, following up to the user-interface timestamp change.
16143 * nsterm.m (last_mouse_movement_time, ns_mouse_position): Use Time
16144 for UI timestamps, instead of unsigned long.
16145 * msdos.c (mouse_get_pos): Likewise.
16146 * w32inevt.c (movement_time, w32_console_mouse_position): Likewise.
16147 * w32gui.h (Time): Define by including "systime.h" rather than by
16148 declaring it ourselves. (Bug#8664)
16150 * dispextern.h (struct image): Don't assume time_t <= unsigned long.
16151 * image.c (clear_image_cache): Likewise.
16153 * term.c (term_mouse_position): Don't assume time_t wraparound.
16155 Be more systematic about user-interface timestamps.
16156 Before, the code sometimes used 'Time', sometimes 'unsigned long',
16157 and sometimes 'EMACS_UINT', to represent these timestamps.
16158 This change causes it to use 'Time' uniformly, as that's what X uses.
16159 This makes the code easier to follow, and makes it easier to catch
16160 integer overflow bugs such as Bug#8664.
16161 * frame.c (Fmouse_position, Fmouse_pixel_position):
16162 Use Time, not unsigned long, for user-interface timestamps.
16163 * keyboard.c (last_event_timestamp, kbd_buffer_get_event): Likewise.
16164 (button_down_time, make_lispy_position, make_lispy_movement): Likewise.
16165 * keyboard.h (last_event_timestamp): Likewise.
16166 * menu.c (Fx_popup_menu) [!HAVE_X_WINDOWS]: Likewise.
16167 * menu.h (xmenu_show): Likewise.
16168 * term.c (term_mouse_position): Likewise.
16169 * termhooks.h (struct input_event.timestamp): Likewise.
16170 (struct terminal.mouse_position_hook): Likewise.
16171 * xmenu.c (create_and_show_popup_menu, xmenu_show): Likewise.
16172 * xterm.c (XTmouse_position, x_scroll_bar_report_motion): Likewise.
16173 * systime.h (Time): New decl. Pull it in from <X11/X.h> if
16174 HAVE_X_WINDOWS, otherwise define it as unsigned long, which is
16175 what it was before.
16176 * menu.h, termhooks.h: Include "systime.h", for Time.
16178 * keyboard.c (make_lispy_event): Fix problem in integer overflow.
16179 Don't assume that the difference between two unsigned long values
16180 can fit into an integer. At this point, we know button_down_time
16181 <= event->timestamp, so the difference must be nonnegative, so
16182 there's no need to cast the result if double-click-time is
16183 nonnegative, as it should be; check that it's nonnegative, just in
16184 case. This bug is triggered when events are more than 2**31 ms
16185 apart (about 25 days). (Bug#8664)
16187 * xselect.c (last_event_timestamp): Remove duplicate decl.
16188 (x_own_selection): Remove needless cast to unsigned long.
16190 * xmenu.c (set_frame_menubar): Use int, not EMACS_UINT, for indexes
16191 that always fit in int. Use a sentinel instead of a counter, to
16192 avoid a temp and to allay GCC's concerns about possible int overflow.
16193 * frame.h (struct frame): Use int for menu_bar_items_used
16194 instead of EMACS_INT, since it always fits in int.
16196 * menu.c (grow_menu_items): Check for int overflow.
16198 * xmenu.c (set_frame_menubar): Don't mishandle vectors with no nils.
16200 * xterm.c: Use EMACS_INT for Emacs modifiers, and int for X modifiers.
16201 Before, the code was not consistent. These values cannot exceed
16202 2**31 - 1 so there's no need to make them unsigned.
16203 (x_x_to_emacs_modifiers): Accept int and return EMACS_INT.
16204 (x_emacs_to_x_modifiers): Accept EMACS_INT and return int.
16205 (x_x_to_emacs_modifiers, x_emacs_to_x_modifiers): Reject non-integers
16207 * xterm.h (x_x_to_emacs_modifiers): Adjust to signature change.
16209 * lisp.h (XINT) [USE_LISP_UNION_TYPE]: Cast to EMACS_INT.
16210 (XUINT) [USE_LISP_UNION_TYPE]: Cast to EMACS_UINT.
16211 Otherwise, GCC 4.6.0 warns about printf (pI, XINT (...)),
16212 presumably because the widths might not match.
16214 * window.c (size_window): Avoid needless test at loop start.
16216 2011-05-18 Courtney Bane <emacs-bugs-7626@cbane.org> (tiny change)
16218 * term.c (Fresume_tty): Restore hooks before reinitializing (bug#8687).
16220 2011-05-12 Drew Adams <drew.adams@oracle.com>
16222 * textprop.c (Fprevious_single_char_property_change): Doc fix (bug#8655).
16224 2011-05-12 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
16226 * w32term.c (w32_draw_fringe_bitmap): Rename local vars `left' and
16227 `width' to `bar_area_x' and `bar_area_width', respectively.
16228 (x_scroll_run): Take account of fringe background extension.
16230 * xterm.c (x_draw_fringe_bitmap) [USE_TOOLKIT_SCROLL_BARS]:
16231 Rename local vars `left' and `width' to `bar_area_x' and
16232 `bar_area_width', respectively.
16233 (x_scroll_run) [USE_TOOLKIT_SCROLL_BARS]: Take account of fringe
16234 background extension.
16236 2011-05-10 Jim Meyering <meyering@redhat.com>
16238 * xdisp.c (x_intersect_rectangles): Fix typo "the the -> the".
16240 2011-05-10 Juanma Barranquero <lekktu@gmail.com>
16242 * image.c (Finit_image_library): Return t for built-in image types,
16243 like pbm and xbm. (Bug#8640)
16245 2011-05-09 Andreas Schwab <schwab@linux-m68k.org>
16247 * w32menu.c (set_frame_menubar): Fix submenu allocation.
16249 2011-05-07 Eli Zaretskii <eliz@gnu.org>
16251 * w32console.c (Fset_screen_color): Doc fix.
16252 (Fget_screen_color): New function.
16253 (syms_of_ntterm): Defsubr it.
16255 * callproc.c (call_process_cleanup) [MSDOS]: Don't close and
16256 unlink the temporary file if Fcall_process didn't create it in the
16258 (Fcall_process) [MSDOS]: Don't create tempfile if stdout of the
16259 child process will be redirected to a file specified with `:file'.
16260 Don't try to re-open tempfile in that case, and set fd[0] to -1 as
16261 cue to call_process_cleanup not to close that handle.
16263 2011-05-07 Ben Key <bkey76@gmail.com>
16265 * makefile.w32-in: The bootstrap-temacs rule now makes use of
16266 one of two shell specific rules, either bootstrap-temacs-CMD or
16267 bootstrap-temacs-SH. The bootstrap-temacs-SH rule is identical
16268 to the previous implementation of the bootstrap-temacs rule.
16269 The bootstrap-temacs-CMD rule is similar to the previous
16270 implementation of the bootstrap-temacs rule except that it
16271 makes use of the ESC_CFLAGS variable instead of the CFLAGS
16274 These changes, along with some changes to nt/configure.bat,
16275 nt/gmake.defs, and nt/nmake.defs, are required to extend my
16276 earlier fix to add support for --cflags and --ldflags options
16277 that include quotes so that it works whether make uses cmd or
16280 2011-05-06 Michael Albinus <michael.albinus@gmx.de>
16282 * dbusbind.c (QCdbus_type_unix_fd): Declare static.
16283 (xd_remove_watch): Don't check QCdbus_type_unix_fd for SYMBOLP, it
16285 (Fdbus_init_bus, xd_read_queued_messages): Bus can be a symbol or
16286 a string. Handle both cases.
16287 (Fdbus_call_method_asynchronously, Fdbus_register_signal)
16288 (Fdbus_register_method): Use Qinvalid_function.
16290 2011-05-06 Juanma Barranquero <lekktu@gmail.com>
16292 * makefile.w32-in: Update dependencies.
16293 (LISP_H): Add inttypes.h and stdin.h.
16294 (PROCESS_H): Add unistd.h.
16296 2011-05-06 Eli Zaretskii <eliz@gnu.org>
16298 * lread.c: Include limits.h (fixes the MS-Windows build broken by
16299 2011-05-06T07:13:19Z!eggert@cs.ucla.edu).
16301 2011-05-06 Paul Eggert <eggert@cs.ucla.edu>
16303 * image.c (Finit_image_library) [!HAVE_NTGUI]: Omit unused local.
16305 * term.c (vfatal): Remove stray call to va_end.
16306 It's not needed and the C Standard doesn't allow it here anyway.
16308 Use C99's va_copy to avoid undefined behavior on x86-64 GNU/Linux.
16309 * eval.c (verror): doprnt a copy of ap, not the original. (Bug#8545)
16311 * eval.c (verror): OK to create a string of up to MOST_POSITIVE_FIXNUM
16314 * term.c: Don't include <stdarg.h>, as <lisp.h> does that.
16316 * callproc.c (Fcall_process): Use 'volatile' to avoid vfork clobbering.
16318 * process.c (Fformat_network_address): Fix typo: args2 -> *args2.
16320 * xmenu.c (set_frame_menubar): Fix typo: int * -> int (3 times).
16322 * coding.c (detect_coding_charset): Fix typo: * 2 -> *4 (Bug#8601).
16324 * charset.h (struct charset.code_space): Now has 15 elements, not 16.
16325 * charset.c (Fdefine_charset_internal): Don't initialize
16326 charset.code_space[15]. The value was garbage, on hosts with
16327 32-bit int (Bug#8600).
16329 * lread.c (read_integer): Be more consistent with string-to-number.
16330 Use string_to_number to do the actual conversion; this avoids
16331 rounding errors and fixes some other screwups. Without this fix,
16332 for example, #x1fffffffffffffff was misread as -2305843009213693952.
16333 (digit_to_number): Move earlier, for benefit of read_integer.
16334 Return -1 if the digit is out of range for the base, -2 if it is
16335 not a digit in any supported base. (Bug#8602)
16337 * doprnt.c (doprnt): Support arbitrary pI values, such as "I64".
16339 * dispnew.c (scrolling_window): Return 1 if we scrolled,
16340 to match comment at start of function. This also removes a
16341 GCC warning about overflow in a 32+64-bit port.
16343 * lisp.h (EMACS_INT, EMACS_UINT, BITS_PER_EMACS_INT, pI): Simplify.
16345 * dbusbind.c: Do not use XPNTR on a value that may be an integer.
16346 Reported by Stefan Monnier in
16347 <http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00919.html>.
16348 (xd_remove_watch, Fdbus_init_bus, xd_read_queued_messages):
16349 Use SYMBOLP-guarded XSYMBOL, not XPNTR.
16351 * lisp.h (EMACS_INTPTR): Remove. All uses changed to intptr_t.
16352 (EMACS_UINTPTR): Likewise, with uintptr_t.
16354 * lisp.h: Prefer 64-bit EMACS_INT if available.
16355 (EMACS_INT, EMACS_UINT, BITS_PER_EMACS_INT, pI): Define to 64-bit
16356 on 32-bit hosts that have 64-bit int, so that they can access
16358 However, temporarily disable this change unless the temporary
16359 symbol WIDE_EMACS_INT is defined.
16361 * lread.c, process.c: Do not include <inttypes.h>; lisp.h does it now.
16363 Prefer intptr_t/uintptr_t for integers the same widths as pointers.
16364 This removes an assumption that EMACS_INT and long are the same
16365 width as pointers. The assumption is true for Emacs porting targets
16366 now, but we want to make other targets possible.
16367 * lisp.h: Include <inttypes.h>, for INTPTR_MAX, UINTPTR_MAX.
16368 (EMACS_INTPTR, EMACS_UINTPTR): New macros.
16369 In the rest of the code, change types of integers that hold casted
16370 pointers to EMACS_INTPTR and EMACS_UINTPTR, systematically
16371 replacing EMACS_INT, long, EMACS_UINT, and unsigned long.
16372 (XTYPE): Don't cast arg to EMACS_UINT; normally is not needed.
16373 (XSET): Cast type of XTYPE arg to EMACS_INTPTR; it is needed here.
16374 No need to cast type when ORing.
16375 (XPNTR): Return a value of type EMACS_INTPTR or EMACS_UINTPTR.
16376 * alloc.c (lisp_align_malloc): Remove a no-longer-needed cast.
16377 * doc.c (store_function_docstring): Use EMACS_INTPTR, so as not to
16378 assume EMACS_INT is the same width as char *.
16379 * gtkutil.c (xg_gtk_scroll_destroy, xg_tool_bar_button_cb):
16380 (xg_tool_bar_callback, xg_tool_bar_help_callback, xg_make_tool_item):
16381 Remove no-longer-needed casts.
16382 (xg_create_scroll_bar, xg_tool_bar_button_cb, xg_tool_bar_callback):
16383 (xg_tool_bar_help_callback, xg_make_tool_item):
16384 Use EMACS_INTPTR to hold an integer
16385 that will be cast to void *; this can avoid a GCC warning
16386 if EMACS_INT is not the same width as void *.
16387 * menu.c (find_and_call_menu_selection): Remove no-longer-needed cast.
16388 * xdisp.c (display_echo_area_1, resize_mini_window_1):
16389 (current_message_1, set_message_1):
16390 Use a local to convert to proper width without a cast.
16391 * xmenu.c (dialog_selection_callback): Likewise.
16393 * sysdep.c (get_random): Don't assume EMACS_INT is no wider than long.
16394 Also, don't assume VALBITS / RAND_BITS is less than 5,
16395 and don't rely on undefined behavior when shifting a 1 left into
16397 * lisp.h (get_random): Change signature to match.
16399 * lread.c (hash_string): Use size_t, not int, for hash computation.
16400 Normally we prefer signed values; but hashing is special, because
16401 it's better to use unsigned division on hash table sizes so that
16402 the remainder is nonnegative. Also, size_t is the natural width
16403 for hashing into memory. The previous code used 'int', which doesn't
16404 retain enough info to hash well into very large tables.
16405 (oblookup, oblookup_last_bucket_number, Funintern): Likewise.
16407 * dbusbind.c: Don't possibly lose pointer info when converting.
16408 (xd_remove_watch, Fdbus_init_bus, xd_read_queued_messages):
16409 Use XPNTR rather than XHASH, so that the high-order bits of
16410 the pointer aren't lost when converting through void *.
16412 * eval.c (Fautoload): Don't double-shift a pointer.
16414 * fns.c (Frandom): Let EMACS_UINT be wider than unsigned long.
16416 2011-05-06 Juanma Barranquero <lekktu@gmail.com>
16418 * gnutls.c (DEF_GNUTLS_FN):
16419 * image.c (DEF_IMGLIB_FN): Make function pointers static.
16421 2011-05-05 Andreas Schwab <schwab@linux-m68k.org>
16423 * lread.c (lisp_file_lexically_bound_p): Stop scanning at end
16426 2011-05-05 Eli Zaretskii <eliz@gnu.org>
16428 * w32heap.c (allocate_heap) [USE_LISP_UNION_TYPE || USE_LSB_TAG]:
16429 New version that can reserve upto 2GB of heap space.
16431 2011-05-05 Chong Yidong <cyd@stupidchicken.com>
16433 * nsfns.m (Fns_read_file_name): Doc fix (Bug#8534).
16435 2011-05-05 Teodor Zlatanov <tzz@lifelogs.com>
16437 * gnutls.c (fn_gnutls_certificate_set_x509_key_file): Add alias to
16438 `gnutls_certificate_set_x509_key_file'.
16440 2011-05-05 Juanma Barranquero <lekktu@gmail.com>
16442 * makefile.w32-in ($(BLD)/image.$(O), $(BLD)/process.$(O)):
16443 Update dependencies.
16445 2011-05-04 Juanma Barranquero <lekktu@gmail.com>
16447 * gnutls.h (emacs_gnutls_write, emacs_gnutls_read):
16448 * gnutls.c (emacs_gnutls_write, emacs_gnutls_read):
16449 Remove unused parameter `fildes'.
16450 * process.c (read_process_output, send_process): Don't pass it.
16452 2011-05-04 Juanma Barranquero <lekktu@gmail.com>
16454 Fix previous change: the library cache is defined in w32.c.
16455 * image.c (CACHE_IMAGE_TYPE) [!HAVE_NTGUI]: Define to noop.
16456 (Finit_image_library): Wrap Vlibrary_cache on "#ifdef HAVE_NTGUI".
16458 2011-05-04 Juanma Barranquero <lekktu@gmail.com>
16460 Implement dynamic loading of GnuTLS on Windows.
16462 * gnutls.h (GNUTLS_EMACS_ERROR_NOT_LOADED): New macro.
16463 (emacs_gnutls_write, emacs_gnutls_read): Mark as extern.
16464 (emacs_gnutls_record_check_pending, emacs_gnutls_transport_set_errno):
16467 * gnutls.c (Qgnutls_dll): Define.
16468 (DEF_GNUTLS_FN, LOAD_GNUTLS_FN): New macros.
16469 (gnutls_*): Declare function pointers.
16470 (init_gnutls_functions): New function to initialize function pointers.
16471 (emacs_gnutls_handshake, Fgnutls_error_string, Fgnutls_deinit)
16472 (emacs_gnutls_global_init, Fgnutls_bye): Use function pointers.
16473 (emacs_gnutls_record_check_pending, emacs_gnutls_transport_set_errno):
16474 Wrappers for gnutls_record_check_pending and gnutls_transport_set_errno.
16475 (emacs_gnutls_write, emacs_gnutls_read)
16476 (emacs_gnutls_handle_error, Fgnutls_error_fatalp)
16477 (Fgnutls_available_p): New function.
16478 (Fgnutls_boot): Call Fgnutls_available_p. Use function pointers.
16479 (syms_of_gnutls) <Qgnutls_dll>: Initialize and staticpro it.
16480 (syms_of_gnutls) <Sgnutls_available_p>: defsubr it.
16482 * image.c: Include w32.h.
16483 (Vimage_type_cache): Delete.
16484 (syms_of_image) <Vimage_type_cache>: Don't initialize and staticpro it.
16485 (CACHE_IMAGE_TYPE, Finit_image_library): Use Vlibrary_cache instead.
16486 (w32_delayed_load): Move to w32.c.
16488 * w32.h (VlibraryCache, QCloaded_from, w32_delayed_load): Declare.
16490 * w32.c (QCloaded_from, Vlibrary_cache): Define.
16491 (w32_delayed_load): Move from image.c. When loading a library, record
16492 its filename in the :loaded-from property of the library id.
16493 (globals_of_w32) <QCloaded_from, Vlibrary_cache>:
16494 Initialize and staticpro them.
16495 (emacs_gnutls_pull, emacs_gnutls_push): Call emacs_gnutls_* functions.
16497 * process.c: Include lisp.h before w32.h, not after.
16498 (wait_reading_process_output): Call emacs_gnutls_record_check_pending
16499 instead of gnutls_record_check_pending.
16501 * callproc.c, emacs.c: Include lisp.h before w32.h, not after.
16503 2011-05-04 Teodor Zlatanov <tzz@lifelogs.com>
16505 * gnutls.c (Fgnutls_boot): Support :keylist and :crlfiles options
16506 instead of :keyfiles. Give GnuTLS the keylist and the CRL lists
16509 2011-05-03 Jan Djärv <jan.h.d@swipnet.se>
16511 * xterm.c (x_set_frame_alpha): Do not set property on anything
16512 else than FRAME_X_OUTER_WINDOW (Bug#8608).
16514 2011-05-02 Juanma Barranquero <lekktu@gmail.com>
16516 * sysdep.c (get_tty_size) [WINDOWSNT]: Implement. (Bug#8596)
16518 2011-05-02 Juanma Barranquero <lekktu@gmail.com>
16520 * gnutls.c (Qgnutls_log_level, Qgnutls_code, Qgnutls_anon)
16521 (Qgnutls_x509pki, Qgnutls_e_interrupted, Qgnutls_e_again)
16522 (Qgnutls_e_invalid_session, Qgnutls_e_not_ready_for_handshake)
16523 (gnutls_global_initialized, Qgnutls_bootprop_priority)
16524 (Qgnutls_bootprop_trustfiles, Qgnutls_bootprop_keyfiles)
16525 (Qgnutls_bootprop_callbacks, Qgnutls_bootprop_loglevel)
16526 (Qgnutls_bootprop_hostname, Qgnutls_bootprop_verify_flags)
16527 (Qgnutls_bootprop_verify_error, Qgnutls_bootprop_verify_hostname_error)
16528 (Qgnutls_bootprop_callbacks_verify): Make static.
16530 2011-05-01 Andreas Schwab <schwab@linux-m68k.org>
16532 * callproc.c: Indentation fixup.
16534 * sysdep.c (wait_for_termination_1): Make static.
16535 (wait_for_termination, interruptible_wait_for_termination):
16536 Move after wait_for_termination_1.
16538 2011-05-01 Lars Magne Ingebrigtsen <larsi@gnus.org>
16540 * sysdep.c (interruptible_wait_for_termination): New function
16541 which is like wait_for_termination, but allows keyboard
16544 * callproc.c (Fcall_process): Add (:file "file") as an option for
16546 (Fcall_process_region): Ditto.
16548 2011-04-30 Eli Zaretskii <eliz@gnu.org>
16550 * dosfns.c (Fint86, Fdos_memget, Fdos_memput): Use `ASIZE (FOO)'
16551 rather than `XVECTOR (FOO)->size'.
16553 * process.c: Remove HAVE_INTTYPES_H condition from inclusion of
16554 inttypes.h, as a gnulib replacement is used if it not available in
16557 2011-04-21 Eli Zaretskii <eliz@gnu.org>
16559 Lift the MOST_POSITIVE_FIXNUM/4 limitation on visited files.
16560 * fileio.c (Finsert_file_contents): Don't limit file size to 1/4
16561 of MOST_POSITIVE_FIXNUM. (Bug#8528)
16563 * coding.c (coding_alloc_by_realloc): Error out if destination
16564 will grow beyond MOST_POSITIVE_FIXNUM.
16565 (decode_coding_emacs_mule): Abort if there isn't enough place in
16566 charbuf for the composition carryover bytes. Reserve an extra
16567 space for up to 2 characters produced in a loop.
16568 (decode_coding_iso_2022): Abort if there isn't enough place in
16569 charbuf for the composition carryover bytes.
16571 2011-04-21 Eli Zaretskii <eliz@gnu.org>
16573 * doprnt.c (doprnt) [!HAVE_LONG_LONG_INT]: Error out instead of
16574 aborting when %lld or %lll format is passed.
16575 [!HAVE_UNSIGNED_LONG_LONG_INT]: Error out instead of aborting when
16576 %llo or %llx format is passed. (Bug#8545)
16578 * window.c (window_scroll_line_based): Use a marker instead of
16579 simple variables to record original value of point. (Bug#7952)
16581 * doprnt.c (doprnt): Fix the case where a multibyte sequence
16582 produced by %s or %c overflows available buffer space. (Bug#8545)
16584 2011-04-28 Paul Eggert <eggert@cs.ucla.edu>
16586 * doprnt.c (doprnt): Omit useless test; int overflow check (Bug#8545).
16587 (SIZE_MAX): Move defn after all includes, as they might #define it.
16589 2011-04-28 Juanma Barranquero <lekktu@gmail.com>
16591 * w32.c (init_environment): Warn about defaulting HOME to C:\.
16593 2011-04-28 Juanma Barranquero <lekktu@gmail.com>
16595 * keyboard.c (Qdelayed_warnings_hook): Define.
16596 (command_loop_1): Run `delayed-warnings-hook'
16597 if Vdelayed_warnings_list is non-nil.
16598 (syms_of_keyboard) <delayed-warnings-hook>: DEFSYM it.
16599 (syms_of_keyboard) <delayed-warnings-list>: DEFVAR_LISP it.
16601 2011-04-28 Eli Zaretskii <eliz@gnu.org>
16603 * doprnt.c (doprnt): Don't return value smaller than the buffer
16604 size if the message was truncated. (Bug#8545).
16606 2011-04-28 Juanma Barranquero <lekktu@gmail.com>
16608 * w32fns.c (Fx_change_window_property, Fx_delete_window_property)
16609 (Fx_window_property): #if-0 the whole functions, not just the bodies.
16611 2011-04-27 Paul Eggert <eggert@cs.ucla.edu>
16613 * doprnt.c (doprnt): Support "ll" length modifier, for long long.
16615 2011-04-27 Juanma Barranquero <lekktu@gmail.com>
16617 * makefile.w32-in: Update dependencies.
16619 2011-04-27 Eli Zaretskii <eliz@gnu.org>
16621 Improve `doprnt' and its usage. (Bug#8545)
16622 * doprnt.c (doprnt): Make sure `format' is never accessed beyond
16623 `format_end'. Remove support for %l as a conversion specifier.
16624 Don't use xrealloc. Improve diagnostics when the %l size modifier
16625 is used. Update the commentary.
16627 * eval.c (verror): Simplify calculation of size_t.
16629 * coding.c (Ffind_operation_coding_system): Fix diagnostic error
16632 2011-04-27 Yoshiaki Kasahara <kasahara@nc.kyushu-u.ac.jp> (tiny change)
16634 * buffer.c (init_buffer) [USE_MMAP_FOR_BUFFERS]: Adjust to aliasing
16637 2011-04-27 Paul Eggert <eggert@cs.ucla.edu>
16639 * nsmenu.m: Replace all uses of XVECTOR with ASIZE and AREF.
16640 This makes this file independent of the recent pseudovector change.
16642 2011-04-26 Paul Eggert <eggert@cs.ucla.edu>
16644 * keyboard.c (handle_user_signal): Fix pointer signedness problem.
16646 * gnutls.c (emacs_gnutls_handle_error): Remove unused local.
16647 (Fgnutls_boot): gnutls_certificate_verify_peers2 wants unsigned *.
16648 Remove unused local.
16649 (emacs_gnutls_write): Don't use uninitialized rtnval if nbyte <= 0.
16651 * lisp.h: Fix a problem with aliasing and vector headers. (Bug#8546)
16652 GCC 4.6.0 optimizes based on type-based alias analysis.
16653 For example, if b is of type struct buffer * and v of type struct
16654 Lisp_Vector *, then gcc -O2 was incorrectly assuming that &b->size
16655 != &v->size, and therefore "v->size = 1; b->size = 2; return
16656 v->size;" must therefore return 1. This assumption is incorrect
16657 for Emacs, since it type-puns struct Lisp_Vector * with many other
16658 types. To fix this problem, this patch adds a new type struct
16659 vectorlike_header that documents the constraints on layout of vectors
16660 and pseudovectors, and helps optimizing compilers not get fooled
16661 by Emacs's type punning. It also adds the macros XSETTYPED_PVECTYPE
16662 XSETTYPED_PSEUDOVECTOR, TYPED_PSEUDOVECTORP, for similar reasons.
16663 * lisp.h (XSETTYPED_PVECTYPE): New macro, specifying the name of
16665 (XSETPVECTYPE): Rewrite in terms of new macro.
16666 (XSETPVECTYPESIZE): New macro, specifying both type and size.
16667 This is a bit clearer, and further avoids the possibility of
16668 undesirable aliasing.
16669 (XSETTYPED_PSEUDOVECTOR): New macro, specifying the size.
16670 (XSETPSEUDOVECTOR): Rewrite in terms of XSETTYPED_PSEUDOVECTOR.
16671 (XSETSUBR): Rewrite in terms of XSETTYPED_PSEUDOVECTOR and XSIZE,
16672 since Lisp_Subr is a special case (no "next" field).
16673 (ASIZE): Now uses header.size rather than size.
16674 All previous uses of XVECTOR (foo)->size replaced to use this macro,
16675 to avoid the hassle of writing XVECTOR (foo)->header.size.
16676 (struct vectorlike_header): New type.
16677 (TYPED_PSEUDOVECTORP): New macro, also specifying the C type of the
16678 object, to help avoid aliasing.
16679 (PSEUDOVECTORP): Rewrite in terms of TYPED_PSEUDOVECTORP.
16680 (SUBRP): Likewise, since Lisp_Subr is a special case.
16681 * lisp.h (struct Lisp_Vector, struct Lisp_Char_Table):
16682 (struct Lisp_Sub_Char_Table, struct Lisp_Bool_Vector):
16683 (struct Lisp_Hash_Table): Combine first two members into a single
16684 struct vectorlike_header member. All uses of "size" and "next" members
16685 changed to be "header.size" and "header.next".
16686 * buffer.h (struct buffer): Likewise.
16687 * font.h (struct font_spec, struct font_entity, struct font): Likewise.
16688 * frame.h (struct frame): Likewise.
16689 * process.h (struct Lisp_Process): Likewise.
16690 * termhooks.h (struct terminal): Likewise.
16691 * window.c (struct save_window_data, struct saved_window): Likewise.
16692 * window.h (struct window): Likewise.
16693 * alloc.c (allocate_buffer, Fmake_bool_vector, allocate_pseudovector):
16694 Use XSETPVECTYPESIZE, not XSETPVECTYPE, to avoid aliasing problems.
16695 * buffer.c (init_buffer_once): Likewise.
16696 * lread.c (defsubr): Use XSETTYPED_PVECTYPE, since Lisp_Subr is a
16698 * process.c (Fformat_network_address): Use local var for size,
16701 * bytecode.c (exec_byte_code): Don't use XVECTOR before CHECK_VECTOR.
16703 Make the Lisp reader and string-to-float more consistent (Bug#8525)
16704 * data.c (atof): Remove decl; no longer used or needed.
16705 (digit_to_number): Move to lread.c.
16706 (Fstring_to_number): Use new string_to_number function, to be
16707 consistent with how the Lisp reader treats infinities and NaNs.
16708 Do not assume that floating-point numbers represent EMACS_INT
16709 without losing information; this is not true on most 64-bit hosts.
16710 Avoid double-rounding errors, by insisting on integers when
16711 parsing non-base-10 numbers, as the documentation specifies.
16712 * lisp.h (string_to_number): New decl, replacing ...
16713 (isfloat_string): Remove.
16714 * lread.c: Include <inttypes.h>, for uintmax_t and strtoumax.
16715 (read1): Do not accept +. and -. as integers; this
16716 appears to have been a coding error. Similarly, do not accept
16717 strings like +-1e0 as floating point numbers. Do not report
16718 overflow for integer overflows unless the base is not 10 which
16719 means we have no simple and reliable way to continue.
16720 Break out the floating-point parsing into a new
16721 function string_to_number, so that Fstring_to_number parses
16722 floating point numbers consistently with the Lisp reader.
16723 (digit_to_number): Move here from data.c. Make it static inline.
16724 (E_CHAR, EXP_INT): Remove, replacing with ...
16725 (E_EXP): New macro, to solve the "1.0e+" problem mentioned below.
16726 (string_to_number): New function, replacing isfloat_string.
16727 This function checks for valid syntax and produces the resulting
16728 Lisp float number too. Rework it so that string-to-number
16729 no longer mishandles examples like "1.0e+". Use strtoumax,
16730 so that overflow for non-base-10 numbers is reported only when
16731 there's no portable and simple way to convert to floating point.
16733 * textprop.c (set_text_properties_1): Rewrite for clarity,
16734 and to avoid GCC warning about integer overflow.
16736 * intervals.h (struct interval): Use EMACS_INT for members
16737 where EMACS_UINT might cause problems. See
16738 <http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00514.html>.
16739 (CHECK_TOTAL_LENGTH): Remove cast to EMACS_INT; no longer needed.
16740 * intervals.c (interval_deletion_adjustment): Now returns EMACS_INT.
16742 (offset_intervals): Tell GCC not to worry about length overflow
16743 when negating a negative length.
16745 * alloc.c (overrun_check_malloc, overrun_check_realloc): Now static.
16746 (overrun_check_free): Likewise.
16748 * alloc.c (SDATA_SIZE) [!GC_CHECK_STRING_BYTES]: Avoid runtime check
16749 in the common case where SDATA_DATA_OFFSET is a multiple of Emacs
16752 * gnutls.c: Fix problems found by GCC 4.6.0 on Ubuntu 10.10.
16753 (gnutls_make_error): Rename local to avoid shadowing.
16754 (gnutls_emacs_global_deinit): ifdef out; not used.
16755 (Fgnutls_boot): Use const for pointer to readonly storage.
16756 Comment out unused local. Fix pointer signedness problems.
16758 * lread.c (openp): Don't stuff size_t into an 'int'.
16759 Use <= on length, not < on length + 1, to avoid GCC 4.6.0 warning
16760 about possible signed overflow.
16762 * gtkutil.c: Fix problems found by GCC 4.6.0 on Ubuntu 10.10.
16763 (GDK_KEY_g): Don't define if already defined.
16764 (xg_prepare_tooltip): Avoid pointer signedness problem.
16765 (xg_set_toolkit_scroll_bar_thumb): Redo to avoid two casts.
16767 * process.c (Fnetwork_interface_info): Avoid left-shift undefined
16768 behavior with 1 << 31. GCC 4.6.0 warns about this on 32-bit hosts.
16770 * xfns.c (Fx_window_property): Simplify a bit,
16771 to make a bit faster and to avoid GCC 4.6.0 warning.
16772 * xselect.c (x_get_window_property, x_handle_dnd_message): Likewise.
16774 * fns.c (internal_equal): Don't assume size_t fits in int.
16776 * alloc.c (compact_small_strings): Tighten assertion a little.
16778 Replace pEd with more-general pI, and fix some printf arg casts.
16779 * lisp.h (pI): New macro, generalizing old pEd macro to other
16780 conversion specifiers. For example, use "...%"pI"d..." rather
16781 than "...%"pEd"...".
16782 (pEd): Remove. All uses replaced with similar uses of pI.
16783 * m/amdx86-64.h, m/ia64.h, m/ibms390x.h: Likewise.
16784 * alloc.c (check_pure_size): Don't overflow by converting size to int.
16785 * bidi.c (bidi_dump_cached_states): Use pI to avoid cast.
16786 * data.c (Fnumber_to_string): Use pI instead of if-then-else-abort.
16787 * dbusbind.c (xd_append_arg): Use pI to avoid cast.
16788 (Fdbus_method_return_internal, Fdbus_method_error_internal): Likewise.
16789 * font.c (font_unparse_xlfd): Avoid potential buffer overrun on
16791 (font_unparse_xlfd, font_unparse_fcname): Use pI to avoid casts.
16792 * keyboard.c (record_char, modify_event_symbol): Use pI to avoid casts.
16793 * print.c (safe_debug_print, print_object): Likewise.
16794 (print_object): Don't overflow by converting EMACS_INT or EMACS_UINT
16796 Use pI instead of if-then-else-abort. Use %p to avoid casts,
16797 avoiding the 0 flag, which is not portable.
16798 * process.c (Fmake_network_process): Use pI to avoid cast.
16799 * region-cache.c (pp_cache): Likewise.
16800 * xdisp.c (decode_mode_spec): Likewise.
16801 * xrdb.c (x_load_resources) [USE_MOTIF]: Use pI to avoid undefined
16802 behavior on 64-bit hosts with printf arg.
16803 * xselect.c (x_queue_event): Use %p to avoid casts, avoiding 0 flag.
16804 (x_stop_queuing_selection_requests): Likewise.
16805 (x_get_window_property): Don't truncate byte count to an 'int'
16808 * frame.c (frame_name_fnn_p): Get rid of strtol, which isn't right
16809 here, since it parses constructs like leading '-' and spaces,
16810 which are not wanted; and it overflows with large numbers.
16811 Instead, simply match F[0-9]+, which is what is wanted anyway.
16813 * alloc.c: Remove unportable assumptions about struct layout.
16814 (SDATA_SELECTOR, SDATA_DATA_OFFSET): New macros.
16815 (SDATA_OF_STRING, SDATA_SIZE, allocate_string_data):
16816 (allocate_vectorlike, make_pure_vector): Use the new macros,
16817 plus offsetof, to remove unportable assumptions about struct layout.
16818 These assumptions hold on all porting targets that I know of, but
16819 they are not guaranteed, they're easy to remove, and removing them
16820 makes further changes easier.
16822 * alloc.c (BLOCK BYTES): Fix typo by changing "ablock" to "ablocks".
16823 This doesn't fix a bug but makes the code clearer.
16824 (string_overrun_cookie): Now const. Use initializers that
16825 don't formally overflow signed char, to avoid warnings.
16826 (allocate_string_data) [GC_CHECK_STRING_OVERRUN]: Fix typo that
16827 can cause Emacs to crash when string overrun checking is enabled.
16828 (allocate_buffer): Don't assume sizeof (struct buffer) is a
16829 multiple of sizeof (EMACS_INT); it need not be, if
16830 alignof(EMACS_INT) < sizeof (EMACS_INT).
16831 (check_sblock, check_string_bytes, check_string_free_list): Protoize.
16833 2011-04-26 Juanma Barranquero <lekktu@gmail.com>
16835 * keyboard.c (QCrtl): Rename from Qrtl. All uses changed.
16837 2011-04-26 Teodor Zlatanov <tzz@lifelogs.com>
16839 * gnutls.c (emacs_gnutls_handshake): Return an error if we're not
16840 supposed to be handshaking. (Bug#8556)
16841 Reported by Paul Eggert <eggert@cs.ucla.edu>.
16843 2011-04-26 Daniel Colascione <dan.colascione@gmail.com>
16845 * lisp.h (Qdebug): List symbol.
16846 * eval.c (Qdebug): Restore global linkage.
16847 * keyboard.c (debug-on-event): New variable.
16848 (handle_user_signal): Break into debugger when debug-on-event
16849 matches the current signal symbol.
16851 2011-04-25 Dan Nicolaescu <dann@ics.uci.edu>
16853 * alloc.c (check_sblock, check_string_bytes)
16854 (check_string_free_list): Convert to standard C.
16856 2011-04-25 Teodor Zlatanov <tzz@lifelogs.com>
16858 * w32.c (emacs_gnutls_push): Fix typo.
16860 2011-04-25 Eli Zaretskii <eliz@gnu.org>
16862 * gnutls.c (emacs_gnutls_handshake): Avoid compiler warnings about
16863 "cast to pointer from integer of different size".
16865 Improve doprnt and its use in verror. (Bug#8545)
16866 * doprnt.c (doprnt): Document the set of format control sequences
16867 supported by the function. Use SAFE_ALLOCA instead of always
16870 * eval.c (verror): Don't limit the buffer size at size_max-1, that
16871 is one byte too soon. Don't use xrealloc; instead xfree and
16874 2011-04-24 Teodor Zlatanov <tzz@lifelogs.com>
16876 * gnutls.h: Add GNUTLS_STAGE_CALLBACKS enum to denote we're in the
16879 * gnutls.c: Renamed global_initialized to
16880 gnutls_global_initialized. Added internals for the
16881 :verify-hostname-error, :verify-error, and :verify-flags
16882 parameters of `gnutls-boot' and documented those parameters in the
16883 docstring. Start callback support.
16884 (emacs_gnutls_handshake): Add Woe32 support. Retry handshake
16885 unless a fatal error occurred. Call gnutls_alert_send_appropriate
16886 on error. Return error code.
16887 (emacs_gnutls_write): Call emacs_gnutls_handle_error.
16888 (emacs_gnutls_read): Likewise.
16889 (Fgnutls_boot): Return handshake error code.
16890 (emacs_gnutls_handle_error): New function.
16891 (wsaerror_to_errno): Likewise.
16893 * w32.h (emacs_gnutls_pull): Add prototype.
16894 (emacs_gnutls_push): Likewise.
16896 * w32.c (emacs_gnutls_pull): New function for GnuTLS on Woe32.
16897 (emacs_gnutls_push): Likewise.
16899 2011-04-24 Claudio Bley <claudio.bley@gmail.com> (tiny change)
16901 * process.c (wait_reading_process_output): Check if GnuTLS
16902 buffered some data internally if no FDs are set for TLS
16905 * makefile.w32-in (OBJ2): Add gnutls.$(O).
16906 (LIBS): Link to USER_LIBS.
16907 ($(BLD)/gnutls.$(0)): New target.
16909 2011-04-24 Eli Zaretskii <eliz@gnu.org>
16911 * xdisp.c (handle_single_display_spec): Rename the
16912 display_replaced_before_p argument into display_replaced_p, to
16913 make it consistent with the commentary. Fix typos in the
16916 * textprop.c (syms_of_textprop): Remove dead code.
16917 (copy_text_properties): Delete obsolete commentary about an
16918 interface that was deleted long ago. Fix typos in the description
16921 * msdos.c (XMenuActivate, XMenuAddSelection): Adjust argument list
16922 to changes in oldXMenu/XMenu.h from 2011-04-16.
16923 <menu_help_message, prev_menu_help_message>: Constify.
16924 (IT_menu_make_room): menu->help_text is now `const char **';
16927 * msdos.h (XMenuActivate, XMenuAddSelection): Adjust prototypes
16928 to changes in oldXMenu/XMenu.h from 2011-04-16.
16929 (struct XMenu): Declare `help_text' `const char **'.
16931 * xfaces.c <Qunspecified>: Make extern again.
16933 * syntax.c: Include sys/types.h before including regex.h, as
16936 * doc.c (get_doc_string): Improve the format passed to `error'.
16938 * doprnt.c (doprnt): Improve commentary.
16940 * term.c (init_tty) [MSDOS]: Fix 1st argument to maybe_fatal.
16942 * Makefile.in (TAGS): Depend on $(M_FILE) and $(S_FILE), and scan
16945 * makefile.w32-in (globals.h): Add a dummy recipe, to make any
16946 changes in globals.h immediately force recompilation.
16947 (TAGS): Depend on $(CURDIR)/m/intel386.h and
16948 $(CURDIR)/s/ms-w32.h.
16949 (TAGS-gmake): Scan $(CURDIR)/m/intel386.h and $(CURDIR)/s/ms-w32.h.
16951 * character.c (Fchar_direction): Function deleted.
16952 (syms_of_character): Don't defsubr it.
16953 <char-direction-table>: Deleted.
16955 2011-04-23 Eli Zaretskii <eliz@gnu.org>
16957 Fix doprnt so it could be used again safely in `verror'. (Bug#8435)
16958 * doprnt.c: Include limits.h.
16959 (SIZE_MAX): New macro.
16960 (doprnt): Return a size_t value. 2nd arg is now size_t.
16961 Many local variables are now size_t instead of int or unsigned.
16962 Improve overflow protection. Support `l' modifier for integer
16963 conversions. Support %l conversion. Don't assume an EMACS_INT
16964 argument for integer conversions and for %c.
16966 * lisp.h (doprnt): Restore prototype.
16968 * makefile.w32-in ($(BLD)/callint.$(O)): Depend on
16969 $(SRC)/character.h.
16971 * Makefile.in (base_obj): Add back doprnt.o.
16973 * deps.mk (doprnt.o): Add back prerequisites.
16974 (callint.o): Depend on character.h.
16976 * eval.c (internal_lisp_condition_case): Include the handler
16977 representation in the error message.
16978 (verror): Call doprnt instead of vsnprintf. Fix an off-by-one bug
16979 when breaking from the loop.
16981 * xdisp.c (vmessage): Call doprnt instead of vsnprintf.
16983 * callint.c (Fcall_interactively): When displaying error message
16984 about invalid control letter, pass the character's codepoint, not
16985 a pointer to its multibyte form. Improve display of the character
16986 in octal and display also its hex code.
16988 * character.c (char_string): Use %x to display the (unsigned)
16989 codepoint of an invalid character, to avoid displaying a bogus
16992 * font.c (check_otf_features): Pass SDATA of SYMBOL_NAME to
16993 `error', not SYMBOL_NAME itself.
16995 * coding.c (Fencode_sjis_char, Fencode_big5_char): Use %c for
16996 character arguments to `error'.
16998 * charset.c (check_iso_charset_parameter): Fix incorrect argument
16999 to `error' in error message about FINAL_CHAR argument. Make sure
17000 FINAL_CHAR is a character, and use %c when it is passed as
17001 argument to `error'.
17003 2011-04-23 Eli Zaretskii <eliz@gnu.org>
17005 * s/ms-w32.h (localtime): Redirect to sys_localtime.
17007 * w32.c: Include <time.h>.
17008 (sys_localtime): New function.
17010 2011-04-23 Chong Yidong <cyd@stupidchicken.com>
17012 * xdisp.c (init_xdisp): Initialize echo_area_window (Bug#6451).
17014 * buffer.c (syms_of_buffer): Doc fix (Bug#6902).
17016 2011-04-23 Samuel Thibault <sthibault@debian.org> (tiny change)
17018 * sysdep.c (wait_for_termination): On GNU Hurd, kill returns -1 on
17019 zombies (Bug#8467).
17021 2011-04-19 Eli Zaretskii <eliz@gnu.org>
17023 * syntax.h (SETUP_SYNTAX_TABLE_FOR_OBJECT): Fix setting of
17024 gl_state.e_property when gl_state.object is Qt.
17026 * insdel.c (make_gap_larger): Remove limitation of buffer size
17029 2011-04-18 Chong Yidong <cyd@stupidchicken.com>
17031 * xdisp.c (lookup_glyphless_char_display)
17032 (produce_glyphless_glyph): Handle cons cell entry in
17033 glyphless-char-display.
17034 (Vglyphless_char_display): Document it.
17036 * term.c (produce_glyphless_glyph): Handle cons cell entry in
17037 glyphless-char-display.
17039 2011-04-17 Chong Yidong <cyd@stupidchicken.com>
17041 * xdisp.c (get_next_display_element): Remove unnecessary ifdefs.
17043 * termhooks.h (FRAME_WINDOW_P): Remove duplicated definitions.
17045 * dispextern.h (FACE_SUITABLE_FOR_ASCII_CHAR_P): Add missing
17046 definition for no-X builds.
17048 2011-04-16 Paul Eggert <eggert@cs.ucla.edu>
17050 Static checks with GCC 4.6.0 and non-default toolkits.
17052 * s/sol2-6.h, s/unixware.h (PTY_TTY_NAME_SPRINTF): Protoize decl.
17054 * process.c (keyboard_bit_set): Define only if SIGIO.
17055 (send_process_trap): Mark it with NO_RETURN if it doesn't return.
17056 (send_process): Repair possible setjmp clobbering.
17058 * s/usg5-4-common.h (SETUP_SLAVE_PTY): Don't pass extra arg to 'fatal'.
17060 * eval.c: Include <stdio.h>, for vsnprintf on non-GNU/Linux hosts.
17062 * data.c (arith_error): Mark with NO_RETURN if it doesn't return.
17064 * alloc.c (bytes_used_when_full, SPARE_MEMORY, BYTES_USED):
17065 Define only if needed.
17067 * sysdep.c (_FILE_OFFSET_BITS): Make this hack even uglier
17068 by pacifying GCC about it. Maybe it's time to retire it?
17069 * xfaces.c (USG, __TIMEVAL__): Likewise.
17071 * dispextern.h (struct redisplay_interface): Rename param
17072 to avoid shadowing.
17073 * termhooks.h (struct terminal): Likewise.
17074 * xterm.c (xembed_send_message): Likewise.
17076 * insdel.c (make_gap_smaller): Define only if
17077 USE_MMAP_FOR_BUFFERS || REL_ALLOC || DOUG_LEA_MALLOC.
17079 * keyboard.c (read_char): Make a var volatile so longjmp won't clobber
17082 * emacs.c (MAX_HEAP_BSS_DIFF, my_edata): Move to where they're used,
17083 so that we aren't warned about unused symbols.
17085 * xfns.c (Fx_file_dialog): Rename local to avoid shadowing.
17087 * xdisp.c (x_produce_glyphs): Mark var as initialized (Bug#8512).
17089 * xfns.c (x_real_positions): Mark locals as initialized.
17091 * xmenu.c (xmenu_show): Don't use uninitialized vars.
17093 * xterm.c: Fix problems found by static analysis with other toolkits.
17094 (toolkit_scroll_bar_interaction): Define and use only if USE_X_TOOLKIT.
17095 (x_dispatch_event): Declare static if USE_GTK, and
17096 define if USE_GTK || USE_X_TOOLKIT.
17097 (SET_SAVED_BUTTON_EVENT): Define only if USE_X_TOOLKIT || USE_GTK.
17098 * xterm.h (x_dispatch_event): Extern only if USE_X_TOOLKIT.
17099 * xterm.c, xterm.h (x_mouse_leave): Bring this function back, but only
17100 if defined HAVE_MENUS && !defined USE_X_TOOLKIT && !defined USE_GTK.
17102 * xmenu.c (menu_help_callback): Pointer type fixes.
17103 Use const pointers when pointing at readonly data. Avoid pointer
17104 signedness clashes.
17105 (FALSE): Remove unused macro.
17106 (update_frame_menubar): Remove unused decl.
17108 * xfns.c (Fx_hide_tip): Move locals to avoid shadowing.
17110 * menu.c (push_submenu_start, push_submenu_end): Do not define unless
17111 USE_X_TOOLKIT || USE_GTK || HAVE_NS || defined HAVE_NTGUI.
17112 (single_menu_item): Rename local to avoid shadowing.
17114 * keyboard.c (make_lispy_event): Remove unused local var.
17116 * frame.c, frame.h (x_get_resource_string): Bring this back, but
17117 only if HAVE_X_WINDOWS && !USE_X_TOOLKIT.
17119 * bitmaps: Change bitmaps from unsigned char back to the X11
17120 compatible char. Avoid the old compiler warnings about
17121 out-of-range initializers by using, for example, '\xab' rather
17124 * xgselect.c (xgselect_initialize): Check vs interface
17125 even if ! (defined (USE_GTK) || defined (HAVE_GCONF)).
17127 * xmenu.c (xmenu_show): Rename parm to avoid shadowing.
17129 * xterm.c (x_create_toolkit_scroll_bar): Use const * for pointers
17130 to read-only memory.
17132 * fns.c (vector): Remove; this old hack is no longer needed.
17134 * xsmfns.c (create_client_leader_window): Rename shadowing arg.
17136 (gdk_x11_set_sm_client_id) [!USE_GTK]: Don't define.
17138 * xrdb.c (x_load_resources): Omit unused local.
17140 * xfns.c (free_frame_menubar, atof): Remove duplicate decls.
17141 (x_window): Rename locals to avoid shadowing.
17142 (USG): Use the kludged USG macro, to pacify gcc.
17144 * xterm.c (x_alloc_nearest_color_for_widget): Remove; unused.
17145 (x_term_init): Remove local to avoid shadowing.
17147 * xfns.c, xterm.c (_XEditResCheckMessages): Protoize decl.
17149 * xdisp.c, dispextern.h (set_vertical_scroll_bar): Now extern if
17150 USE_TOOLKIT_SCROLL_BARS && !USE_GTK, as xterm.c needs it then.
17152 2011-04-16 Eli Zaretskii <eliz@gnu.org>
17154 * gnutls.c (Fgnutls_boot): Don't pass Lisp_Object to `error'.
17156 Fix regex.c, syntax.c and friends for buffers > 2GB.
17157 * syntax.h (struct gl_state_s): Declare character position members
17160 * syntax.c (update_syntax_table): Declare 2nd argument EMACS_INT.
17162 * textprop.c (verify_interval_modification, interval_of):
17163 Declare arguments EMACS_INT.
17165 * intervals.c (adjust_intervals_for_insertion): Declare arguments
17168 * intervals.h (CHECK_TOTAL_LENGTH): Cast to EMACS_INT, not `int'.
17170 * indent.c (Fvertical_motion): Local variable it_start is now
17173 * regex.c (re_match, re_match_2, re_match_2_internal)
17174 (bcmp_translate, regcomp, regexec, print_double_string)
17175 (group_in_compile_stack, re_search, re_search_2, regex_compile)
17176 (re_compile_pattern, re_exec): Declare arguments and local
17177 variables `size_t' and `ssize_t' and return values `regoff_t', as
17179 (POP_FAILURE_REG_OR_COUNT) <pfreg>: Declare `long'.
17180 (CHECK_INFINITE_LOOP) <failure>: Declare `ssize_t'.
17181 <compile_stack_type>: `size' and `avail' are now `size_t'.
17183 * regex.h <regoff_t>: Use ssize_t, not int.
17184 (re_search, re_search_2, re_match, re_match_2): Arguments that
17185 specify buffer/string position and length are now ssize_t and
17186 size_t. Return type is regoff_t.
17188 2011-04-16 Ben Key <bkey76@gmail.com>
17190 * nsfont.m: Fixed bugs in ns_get_family and
17191 ns_descriptor_to_entity that were caused by using free to
17192 deallocate memory blocks that were allocated by xmalloc (via
17193 xstrdup). This caused Emacs to crash when compiled with
17194 XMALLOC_OVERRUN_CHECK defined (when Emacs was configured with
17195 --enable-checking=xmallocoverrun). xfree is now used to
17196 deallocate these memory blocks.
17198 2011-04-15 Paul Eggert <eggert@cs.ucla.edu>
17200 * sysdep.c (emacs_read): Remove unnecessary check vs MAX_RW_COUNT.
17202 emacs_write: Accept and return EMACS_INT for sizes.
17203 See http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00514.html
17205 * gnutls.c, gnutls.h (emacs_gnutls_read, emacs_gnutls_write):
17206 Accept and return EMACS_INT.
17207 (emacs_gnutls_write): Return the number of bytes written on
17209 * sysdep.c, lisp.h (emacs_read, emacs_write): Likewise.
17210 (emacs_read, emacs_write): Remove check for negative size, as the
17211 Emacs source code has been audited now.
17212 * sysdep.c (MAX_RW_COUNT): New macro, to work around kernel bugs.
17213 (emacs_read, emacs_write): Use it.
17214 * process.c (send_process): Adjust to the new signatures of
17215 emacs_write and emacs_gnutls_write. Do not attempt to store
17216 a byte offset into an 'int'; it might overflow.
17217 See http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00483.html
17219 * sound.c: Don't assume sizes fit in 'int'.
17220 (struct sound_device.period_size, alsa_period_size):
17221 Return EMACS_INT, not int.
17222 (struct sound_device.write, vox_write, alsa_write):
17223 Accept EMACS_INT, not int.
17224 (wav_play, au_play): Use EMACS_INT to store sizes and to
17225 record read return values.
17227 2011-04-15 Ben Key <bkey76@gmail.com>
17229 * keyboard.c (Qundefined): Don't declare static since it is used
17231 * xfaces.c (Qbold, Qexpanded, Qitalic, Qcondensed): Don't declare
17232 static since they are used in nsfont.m.
17234 2011-04-15 Stefan Monnier <monnier@iro.umontreal.ca>
17236 * process.c (Qprocessp): Don't declare static.
17237 * lisp.h (Qprocessp): Declare again.
17239 2011-04-15 Juanma Barranquero <lekktu@gmail.com>
17241 * font.c (Qopentype): Don't make static (used from w32uniscribe.c).
17243 2011-04-14 Paul Eggert <eggert@cs.ucla.edu>
17245 Improve C-level modularity by making more things 'static'.
17247 Don't publish debugger-only interfaces to other modules.
17248 * lisp.h (safe_debug_print, debug_output_compilation_hack):
17249 (verify_bytepos, count_markers): Move decls to the only modules
17251 * region-cache.h (pp_cache): Likewise.
17252 * window.h (check_all_windows): Likewise.
17253 * marker.c, print.c, region-cache.c, window.c: Decls moved here.
17255 * sysdep.c (croak): Now static, if
17256 defined TIOCNOTTY || defined USG5 || defined CYGWIN.
17257 * syssignal.h (croak): Declare only if not static.
17259 * alloc.c (refill_memory_reserve): Now static if
17260 !defined REL_ALLOC || defined SYSTEM_MALLOC.
17261 * lisp.h (refill_memory_reserve): Declare only if not static.
17263 * xsettings.c, xsettings.h (xsettings_get_system_normal_font):
17264 Define only if USE_LUCID.
17266 * xrdb.c (x_customization_string, x_rm_string): Now static.
17268 * xmenu.c (x_menu_wait_for_event): Export only if USE_MOTIF.
17269 * xterm.h (x_menu_wait_for_event): Declare only if USE_MOTIF.
17271 * xdisp.c (draw_row_with_mouse_face): Now static.
17272 * dispextern.h (draw_row_with_mouse_fave): Remove decl.
17274 * window.h (check_all_windows): Mark externally visible.
17276 * window.c (window_deletion_count): Now static.
17278 * undo.c: Make symbols static if they're not exported.
17279 (last_undo_buffer, last_boundary_position, pending_boundary):
17282 * textprop.c (interval_insert_behind_hooks): Now static.
17283 (interval_insert_in_front_hooks): Likewise.
17285 * term.c: Make symbols static if they're not exported.
17286 (tty_turn_off_highlight, get_tty_terminal, max_frame_cols):
17287 (max_frame_lines, tty_set_terminal_modes):
17288 (tty_reset_terminal_modes, tty_turn_off_highlight):
17289 (get_tty_terminal): Now static.
17290 (term_mouse_moveto): Do not define if HAVE_WINDOW_SYSTEM.
17291 * termhooks.h (term_mouse_moveto): Do not declare if
17292 HAVE_WINDOW_SYSTEM.
17293 * dispextern.h (tty_set_terminal_modes, tty_reset_terminal_modes):
17294 (tty_turn_off_highlight, get_tty_terminal): Remove decls.
17296 * sysdep.c: Make symbols static if they're not exported.
17297 (emacs_get_tty, emacs_set_tty, old_fcntl_flags, old_fcntl_owner):
17299 (sigprocmask_set, full_mask): Remove; unused.
17300 (wait_debugging): Mark as visible.
17301 * syssignal.h (SIGFULLMASK, full_mask): Remove decls.
17302 * systty.h (emacs_get_tty, emacs_set_tty): Remove decls.
17304 * syntax.c (syntax_temp): Define only if !__GNUC__.
17306 * sound.c (current_sound_device, current_sound): Now static.
17308 * search.c (searchbufs, searchbuf_head): Now static.
17310 * scroll.c (scroll_cost): Remove; unused.
17311 * dispextern.h (scroll_cost): Remove decl.
17313 * region-cache.h (pp_cache): Mark as externally visible.
17315 * process.c: Make symbols static if they're not exported.
17316 (process_tick, update_tick, create_process, chan_process):
17317 (Vprocess_alist, proc_buffered_char, datagram_access):
17318 (fd_callback_data, send_process_frame, process_sent_to): Now static.
17319 (deactivate_process): Mark defn as static, as well as decl.
17320 * lisp.h (create_process): Remove decl.
17321 * process.h (chan_process, Vprocess_alist): Remove decls.
17323 * print.c: Make symbols static if they're not exported.
17324 (print_depth, new_backquote_output, being_printed, print_buffer):
17325 (print_buffer_size, print_buffer_pos, print_buffer_pos_byte):
17326 (print_interval, print_number_index, initial_stderr_stream):
17328 * lisp.h (Fprinc): Remove decl.
17329 (debug_output_compilation_hack): Mark as externally visible.
17331 * sysdep.c (croak): Move decl from here to syssignal.h.
17332 * syssignal.h (croak): Put it here, so the API can be checked when
17333 'croak' is called from dissociate_if_controlling_tty.
17335 * minibuf.c: Make symbols static if they're not exported.
17336 (minibuf_save_list, choose_minibuf_frame): Now static.
17337 * lisp.h (choose_minibuf_frame): Remove decl.
17339 * lisp.h (verify_bytepos, count_markers): Mark as externally visible.
17341 * lread.c: Make symbols static if they're not exported.
17342 (read_objects, initial_obarray, oblookup_last_bucket_number):
17344 (make_symbol): Remove; unused.
17345 * lisp.h (initial_obarray, make_symbol): Remove decls.
17347 * keyboard.c: Make symbols static if they're not exported.
17348 (single_kboard, recent_keys_index, total_keys, recent_keys):
17349 (this_command_key_count_reset, raw_keybuf, raw_keybuf_count):
17350 (this_single_command_key_start, echoing, last_auto_save):
17351 (read_key_sequence_cmd, dribble, recursive_edit_unwind):
17352 (command_loop, echo_now, keyboard_init_hook, help_char_p):
17353 (quit_throw_to_read_char, command_loop_2, top_level_1, poll_timer):
17354 (Vlispy_mouse_stem, double_click_count):
17356 (force_auto_save_soon): Define only if SIGDANGER.
17357 (ignore_mouse_drag_p): Now static if
17358 !defined HAVE_WINDOW_SYSTEM || defined USE_GTK || defined HAVE_NS.
17359 (print_help): Remove; unused.
17360 (stop_character, last_timer_event): Mark as externally visible.
17361 * keyboard.h (ignore_mouse_drag_p): Declare only if
17362 defined HAVE_WINDOW_SYSTEM && !defined USE_GTK && !defined HAVE_NS.
17363 (echo_now, help_char_p, quit_throw_to_read_char): Remove decls.
17364 * lisp.h (echoing): Remove decl.
17365 (force_auto_save_soon): Declare only if SIGDANGER.
17366 * xdisp.c (redisplay_window): Simplify code, to make it more
17367 obvious that ignore_mouse_drag_p is not accessed if !defined
17368 USE_GTK && !defined HAVE_NS.
17370 * intervals.c: Make symbols static if they're not exported.
17371 (merge_properties_sticky, merge_interval_right, delete_interval):
17373 * intervals.h (merge_interval_right, delete_interval): Remove decls.
17375 * insdel.c: Make symbols static if they're not exported.
17376 However, leave prepare_to_modify_buffer alone. It's never
17377 called from outside this function, but that appears to be a bug.
17378 (combine_after_change_list, combine_after_change_buffer):
17379 (adjust_after_replace, signal_before_change): Now static.
17380 (adjust_after_replace_noundo): Remove; unused.
17381 * lisp.h (adjust_after_replace, adjust_after_replace_noundo):
17382 (signal_before_change): Remove decls.
17384 * indent.c (val_compute_motion, val_vmotion): Now static.
17386 * image.c: Make symbols static if they're not exported.
17387 * dispextern.h (x_create_bitmap_from_xpm_data): Do not declare
17389 * image.c (x_create_bitmap_from_xpm_data): Do not define if USE_GTK.
17390 (xpm_color_cache, ct_table, ct_colors_allocated): Now static.
17392 * fringe.c (standard_bitmaps): Now static.
17393 (max_used_fringe_bitmap): Now static, unless HAVE_NS.
17395 * frame.c: Make symbols static if they're not exported.
17396 (x_report_frame_params, make_terminal_frame): Now static.
17397 (get_frame_param): Now static, unless HAVE_NS.
17398 (x_fullscreen_adjust): Define if WINDOWSNT, not if HAVE_WINDOW_SYSTEM.
17399 (x_get_resource_string): Remove; not used.
17400 * frame.h (make_terminal_frame, x_report_frame_params):
17401 (x_get_resource_string); Remove decls.
17402 (x_fullscreen_adjust): Declare only if WINDOWSNT.
17403 * lisp.h (get_frame_param): Declare only if HAVE_NS.
17405 * font.c, fontset.c: Make symbols static if they're not exported.
17406 * dispextern.h (FACE_SUITABLE_FOR_ASCII_CHAR_P): New macro.
17407 (FACE_SUITABLE_FOR_CHAR_P): Use it.
17408 * font.c (font_close_object): Now static.
17409 * font.h (font_close_object): Remove.
17410 * fontset.c (FONTSET_OBJLIST): Remove.
17411 (free_realized_fontset) #if-0 the body, which does nothing.
17412 (face_suitable_for_char_p): #if-0, as it's never called.
17413 * fontset.h (face_suitable_for_char_p): Remove decl.
17414 * xfaces.c (face_at_string_position):
17415 Use FACE_SUITABLE_FOR_ASCII_CHAR_P, not FACE_SUITABLE_FOR_CHAR_P,
17416 since 0 is always ASCII.
17418 * fns.c (weak_hash_tables): Now static.
17420 * fileio.c: Make symbols static if they're not exported.
17421 (auto_saving, auto_save_mode_bits, auto_save_error_occurred):
17422 (Vwrite_region_annotation_buffers): Now static.
17424 * eval.c: Make symbols static if they're not exported.
17425 (backtrace_list, lisp_eval_depth, when_entered_debugger): Now static.
17426 * lisp.h (backtrace_list): Remove decl.
17428 * emacs.c: Make symbols static if they're not exported.
17429 (malloc_state_ptr, malloc_using_checking, syms_of_emacs):
17430 (fatal_error_code, fatal_error_signal_hook, standard_args):
17432 (fatal_error_signal): Now static, unless FLOAT_CATCH_SIGKILL.
17433 (DEFINE_DUMMY_FUNCTION): Mark function as externally visible.
17434 (__CTOR_LIST__, __DTOR_LIST__): Now externally visible.
17435 * lisp.h (fatal_error_signal_hook): Remove decl.
17436 (fatal_error_signal): Declare only if FLOAT_CATCH_SIGKILL.
17438 * editfns.c: Move a (normally-unused) function to its only use.
17439 * editfns.c, lisp.h (get_operating_system_release): Remove.
17440 * process.c (init_process) [DARWIN_OS]: Do it inline, as it is not
17441 worth the hassle of breaking this out.
17443 * xterm.c: Make symbols static if they're not exported.
17444 (x_raise_frame, x_lower_frame, x_wm_set_window_state):
17445 (x_wm_set_icon_pixmap, x_initialize, XTread_socket_fake_io_error):
17446 (x_destroy_window, x_delete_display):
17448 (x_dispatch_event): Now static if ! (USE_MOTIF || USE_X_TOOLKIT).
17449 (x_mouse_leave): Remove; unused.
17450 * xterm.h (x_display_info_for_name, x_raise_frame, x_lower_frame):
17451 (x_destroy_window, x_wm_set_window_state, x_wm_set_icon_pixmap):
17452 (x_delete_display, x_initialize, x_set_border_pixel, x_screen_planes):
17454 (x_mouse_leave): Declare only if WINDOWSNT.
17455 (x_dispatch_event): Declare only if USE_MOTIF or USE_X_TOOLKIT.
17456 (xic_create_fontsetname): Declare only if HAVE_X_WINDOWS &&
17459 * ftxfont.c: Make symbols static if they're not exported.
17460 (ftxfont_driver): Export only if !defined HAVE_XFT && def8ined
17462 * font.h (ftxfont_driver): Likewise.
17464 * xfns.c: Make symbols static if they're not exported.
17465 (x_last_font_name, x_display_info_for_name):
17466 (x_set_foreground_color, x_set_background_color, x_set_mouse_color):
17467 (x_set_cursor_color, x_set_border_pixel, x_set_border_color):
17468 (x_set_cursor_type, x_set_icon_type, x_set_icon_name):
17469 (x_set_scroll_bar_foreground, x_set_scroll_bar_background):
17470 (x_explicitly_set_name, x_set_title, xic_defaut_fontset, tip_timer):
17471 (last_show_tip_args): Now static.
17472 (xic_defaut_fontset, xic_create_fontsetname): Define only if
17473 defined HAVE_X_WINDOWS && defined USE_X_TOOLKIT
17474 (x_screen_planes): Remove; unused.
17475 * dispextern.h (x_screen_planes): Remove decl.
17477 * dispnew.c: Make symbols static if they're not exported.
17478 * dispextern.h (redraw_garbaged_frames, scrolling):
17479 (increment_row_positions): Remove.
17480 * dispnew.c (new_glyph_matrix, increment_row_positions, scrolling):
17481 (delayed_size_change, glyph_matrix_count, glyph_pool_count):
17483 (redraw_garbaged_frames): Remove; unused.
17485 * xfaces.c: Make symbols static if they're not exported.
17486 * dispextern.h (ascii_face_of_lisp_face, free_realized_face):
17488 * xterm.h (defined_color): Remove decls.
17489 (x_free_dpy_colors): Declare only if USE_X_TOOLKIT.
17490 * xfaces.c (tty_suppress_bold_inverse_default_colors_p):
17491 (menu_face_changed_default, defined_color, free_realized_face):
17492 (x_free_dpy_colors): Define only if USE_X_TOOLKIT.
17493 (ascii_face_of_lisp_face): Remove; unused.
17495 * xdisp.c: Make symbols static if they're not exported.
17496 * dispextern.h (scratch_glyph_row, window_box_edges):
17497 (glyph_to_pixel_coords, set_cursor_from_row):
17498 (get_next_display_element, set_iterator_to_next):
17499 (highlight_trailing_whitespace, frame_to_window_pixel_xy):
17500 (show_mouse_face): Remove decls
17501 * frame.h (message_buf_print): Likewise.
17502 * lisp.h (pop_message, set_message, check_point_in_composition):
17504 * xterm.h (set_vertical_scroll_bar): Likewise.
17505 * xdisp.c (list_of_error, Vmessage_stack, line_number_displayed):
17506 (message_buf_print, scratch_glyph_row, displayed_buffer):
17507 (set_iterator_to_next, pop_message, set_message, set_cursor_from_row):
17508 (get_next_display_element, show_mouse_face, window_box_edges):
17509 (frame_to_window_pixel_xy, check_point_in_composition):
17510 (set_vertical_scroll_bar, highlight_trailing_whitespace): Now static.
17511 (glyph_to_pixel_coords): Remove; unused.
17513 * dired.c (file_name_completion): Now static.
17515 * dbusbind.c (xd_in_read_queued_messages): Now static.
17517 * lisp.h (circular_list_error, FOREACH): Remove; unused.
17518 * data.c (circular_list_error): Remove.
17520 * commands.h (last_point_position, last_point_position_buffer):
17521 (last_point_position_window): Remove decls.
17522 * keyboard.c: Make these variables static.
17524 * coding.h (coding, code_convert_region, encode_coding_gap):
17526 * coding.c (Vsjis_coding_system, Vbig5_coding_system):
17527 (iso_code_class, detect_coding, code_convert_region): Now static.
17528 (encode_coding_gap): Remove; unused.
17530 * chartab.c (chartab_chars, chartab_bits): Now static.
17532 * charset.h (charset_iso_8859_1): Remove decl.
17533 * charset.c (charset_iso_8859_1, charset_emacs, map_charset_for_dump):
17536 * ccl.h (check_ccl_update, Vccl_program_table): Remove decls.
17537 * ccl.c (Vccl_program_table): Now static.
17538 (check_ccl_update): Remove; unused.
17540 * category.c (SET_CATEGORY_SET, set_category_set): Move here.
17541 * category.h: ... from here.
17542 * category.c (check_category_table, set_category_set): Now static.
17544 * casetab.c (Vascii_upcase_table, Vascii_eqv_table): Now static.
17545 * lisp.h: Remove these decls.
17547 * buffer.c (buffer_count): Remove unused var.
17549 * bidi.c (bidi_dump_cached_states): Mark as externally visible,
17550 so that it's not optimized away.
17551 (bidi_ignore_explicit_marks_for_paragraph_level): Likewise.
17552 * dispextern.h (bidi_dump_cached_states): Remove, since it's
17553 exported only to the debugger.
17555 * atimer.c (alarm_signal_handler, run_all_atimers): Now static.
17556 * atimer.h (run_all_atimers): Remove; not exported.
17558 font.c: Make copy_font_spec and merge_font_spec ordinary C functions.
17559 * font.c (copy_font_spec): Rename from Fcopy_font_spec, since it
17560 was inaccessible from Lisp.
17561 (merge_font_spec): Likewise, renaming from Fmerge_font_spec.
17562 * font.c, font.h, fontset.c, xfaces.c, xfont.c: Change all uses.
17564 alloc.c: Import and export fewer symbols, and remove unused items.
17565 * lisp.h (suppress_checking, die): Declare only if ENABLE_CHECKING
17567 (suppress_checking): Add EXTERNALLY_VISIBLE attribute, so that
17568 it's not optimized away by whole-program optimization.
17569 (message_enable_multibyte, free_misc): Remove.
17570 (catchlist, handlerlist, mark_backtrace):
17571 Declare only if BYTE_MARK_STACK.
17572 (mark_byte_stack): Likewise, fixing a ifdef-vs-if typo.
17573 * alloc.c (pure): Export only if VIRT_ADDR_VARIES is defined.
17574 (message_enable_multibyte): Remove decl.
17575 (free_misc, interval_free_list, float_block, float_block_index):
17576 (n_float_blocks, float_free_list, cons_block, cons_block_index):
17577 (cons_free_list, last_marked_index):
17579 (suppress_checking, die): Define only if ENABLE_CHECKING is defined.
17580 * eval.c (catchlist, handlerlist): Export only if BYTE_MARK_STACK.
17581 (mark_backtrace): Define only if BYTE_MARK_STACK.
17582 * xdisp.c (message_enable_multibyte): Now static.
17584 Declare Lisp_Object Q* variables to be 'static' if not exported.
17585 This makes it easier for human readers (and static analyzers)
17586 to see whether these variables are used from other modules.
17587 * alloc.c, buffer.c, bytecode.c, callint.c, casetab.c, category.c:
17588 * ccl.c, character.c, charset.c, cmds.c, coding.c, composite.c:
17589 * data.c, dbusbind.c, dired.c, editfns.c, eval.c, fileio.c, fns.c:
17590 * font.c, frame.c, fringe.c, ftfont.c, image.c, keyboard.c, keymap.c:
17591 * lread.c, macros.c, minibuf.c, print.c, process.c, search.c:
17592 * sound.c, syntax.c, textprop.c, window.c, xdisp.c, xfaces.c, xfns.c:
17593 * xmenu.c, xselect.c:
17594 Declare Q* vars static if they are not used in other modules.
17595 * ccl.h, character.h, charset.h, coding.h, composite.h, font.h:
17596 * frame.h, intervals.h, keyboard.h, lisp.h, process.h, syntax.h:
17597 Remove decls of unexported vars.
17598 * keyboard.h (EVENT_HEAD_UNMODIFIED): Remove now-unused macro.
17600 * lisp.h (DEFINE_FUNC): Make sname 'static'.
17602 Make Emacs functions such as Fatom 'static' by default.
17603 This makes it easier for human readers (and static analyzers)
17604 to see whether these functions can be called from other modules.
17605 DEFUN now defines a static function. To make the function external
17606 so that it can be used in other C modules, use the new macro DEFUE.
17607 * lisp.h (Funibyte_char_to_multibyte, Fsyntax_table_p):
17608 (Finit_image_library):
17609 (Feval_region, Fbacktrace, Ffetch_bytecode, Fswitch_to_buffer):
17610 (Ffile_executable_p, Fmake_symbolic_link, Fcommand_execute):
17611 (Fget_process, Fdocumentation_property, Fbyte_code, Ffile_attributes):
17612 Remove decls, since these functions are now static.
17613 (Funintern, Fget_internal_run_time): New decls, since these functions
17614 were already external.
17616 * alloc.c, buffer.c, callint.c, callproc.c, casefiddle.c, casetab.c:
17617 * ccl.c, character.c, chartab.c, cmds.c, coding.c, data.c, dispnew.c:
17618 * doc.c, editfns.c, emacs.c, eval.c, fileio.c, filelock.c, floatfns.c:
17619 * fns.c, font.c, fontset.c, frame.c, image.c, indent.c:
17620 * keyboard.c, keymap.c, lread.c:
17621 * macros.c, marker.c, menu.c, minibuf.c, print.c, process.c, search.c:
17622 * syntax.c, term.c, terminal.c, textprop.c, undo.c:
17623 * window.c, xdisp.c, xfaces.c, xfns.c, xmenu.c, xsettings.c:
17624 Mark functions with DEFUE instead of DEFUN,
17625 if they are used in other modules.
17626 * buffer.c (Fset_buffer_major_mode, Fdelete_overlay): New forward
17627 decls for now-static functions.
17628 * buffer.h (Fdelete_overlay): Remove decl.
17629 * callproc.c (Fgetenv_internal): Mark as internal.
17630 * composite.c (Fremove_list_of_text_properties): Remove decl.
17631 (Fcomposition_get_gstring): New forward static decl.
17632 * composite.h (Fcomposite_get_gstring): Remove decl.
17633 * dired.c (Ffile_attributes): New forward static decl.
17634 * doc.c (Fdocumntation_property): New forward static decl.
17635 * eval.c (Ffetch_bytecode): New forward static decl.
17636 (Funintern): Remove extern decl; now in .h file where it belongs.
17637 * fileio.c (Fmake_symbolic_link): New forward static decl.
17638 * image.c (Finit_image_library): New forward static decl.
17639 * insdel.c (Fcombine_after_change_execute): Make forward decl static.
17640 * intervals.h (Fprevious_property_change):
17641 (Fremove_list_of_text_properties): Remove decls.
17642 * keyboard.c (Fthis_command_keys): Remove decl.
17643 (Fcommand_execute): New forward static decl.
17644 * keymap.c (Flookup_key): New forward static decl.
17645 (Fcopy_keymap): Now static.
17646 * keymap.h (Flookup_key): Remove decl.
17647 * process.c (Fget_process): New forward static decl.
17648 (Fprocess_datagram_address): Mark as internal.
17649 * syntax.c (Fsyntax_table_p): New forward static decl.
17650 (skip_chars): Remove duplicate decl.
17651 * textprop.c (Fprevious_property_change): New forward static decl.
17652 * window.c (Fset_window_fringes, Fset_window_scroll_bars):
17654 (Fset_window_margins, Fset_window_vscroll): New forward static decls.
17655 * window.h (Fset_window_vscroll, Fset_window_margins): Remove decls.
17657 * editfns.c (Fformat): Remove unreachable code.
17659 2011-04-14 Andreas Schwab <schwab@linux-m68k.org>
17661 * fileio.c (Finsert_file_contents): Fix typo in 2005-05-13
17664 2011-04-13 Eli Zaretskii <eliz@gnu.org>
17666 * xdisp.c (handle_invisible_prop): Don't call bidi_paragraph_init
17667 when at ZV. (Bug#8487)
17669 2011-04-12 Andreas Schwab <schwab@linux-m68k.org>
17671 * charset.c (Fclear_charset_maps): Use xfree instead of free.
17673 * keyboard.c (parse_tool_bar_item): Likewise.
17674 * sound.c (sound_cleanup, alsa_close): Likewise.
17675 * termcap.c (tgetent): Likewise.
17676 * xfns.c (x_default_font_parameter): Likewise.
17677 * xsettings.c (read_and_apply_settings): Likewise.
17679 * alloc.c (overrun_check_malloc, overrun_check_realloc)
17680 (overrun_check_free): Protoize.
17682 2011-04-12 Paul Eggert <eggert@cs.ucla.edu>
17684 * sysdep.c (emacs_read, emacs_write): Check for negative sizes
17685 since callers should never pass a negative size.
17686 Change the signature to match that of plain 'read' and 'write'; see
17687 <http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00397.html>.
17688 * lisp.h: Update prototypes of emacs_write and emacs_read.
17690 2011-04-11 Eli Zaretskii <eliz@gnu.org>
17692 * xdisp.c (redisplay_window): Don't try to determine the character
17693 position of the scroll margin if the window start point w->startp
17694 is outside the buffer's accessible region. (Bug#8468)
17696 2011-04-10 Eli Zaretskii <eliz@gnu.org>
17698 Fix write-region and its subroutines for buffers > 2GB.
17699 * fileio.c (a_write, e_write): Modify declaration of arguments and
17700 local variables to support buffers larger than 2GB.
17701 (Fcopy_file): Use EMACS_INT for return value of emacs_read.
17703 * sysdep.c (emacs_write, emacs_read): Use ssize_t for last
17704 argument, local variables, and return value.
17706 * lisp.h: Update prototypes of emacs_write and emacs_read.
17708 * sound.c (vox_write): Use ssize_t for return value of emacs_write.
17710 2011-04-10 Paul Eggert <eggert@cs.ucla.edu>
17712 * xdisp.c (vmessage): Use memchr, not strnlen, which some hosts lack.
17714 Fix more problems found by GCC 4.6.0's static checks.
17716 * xdisp.c (vmessage): Use a better test for character truncation.
17718 * charset.c (load_charset_map): <, not <=, for optimization,
17719 and to avoid potential problems with integer overflow.
17720 * chartab.c (sub_char_table_set_range, char_table_set_range): Likewise.
17721 * casetab.c (set_identity, shuffle): Likewise.
17722 * editfns.c (Fformat): Likewise.
17723 * syntax.c (skip_chars): Likewise.
17725 * xmenu.c (set_frame_menubar): Allocate smaller local vectors.
17726 This also lets GCC 4.6.0 generate slightly better loop code.
17728 * callint.c (Fcall_interactively): <, not <=, for optimization.
17729 (Fcall_interactively): Count the number of arguments produced,
17730 not the number of arguments given. This is simpler and lets GCC
17731 4.6.0 generate slightly better code.
17733 * ftfont.c: Distingish more carefully between FcChar8 and char.
17734 The previous code passed unsigned char * to a functions like
17735 strlen and xstrcasecmp that expect char *, which does not
17736 conform to the C standard.
17737 (get_adstyle_property, ftfont_pattern_entity): Use FcChar8 for
17738 arguments to FcPatternGetString, and explicitly cast FcChar8 * to
17739 char * when the C standard requires it.
17741 * keyboard.c (read_char): Remove unused var.
17743 * eval.c: Port to Windows vsnprintf (Bug#8435).
17744 Include <limits.h>.
17745 (SIZE_MAX): Define if the headers do not.
17746 (verror): Do not give up if vsnprintf returns a negative count.
17747 Instead, grow the buffer. This ports to Windows vsnprintf, which
17748 does not conform to C99. Problem reported by Eli Zaretskii.
17749 Also, simplify the allocation scheme, by avoiding the need for
17750 calling realloc, and removing the ALLOCATED variable.
17752 * eval.c (verror): Initial buffer size is 4000 (not 200) bytes.
17754 Remove invocations of doprnt, as Emacs now uses vsnprintf.
17755 But keep the doprint source code for now, as we might revamp it
17756 and use it again (Bug#8435).
17757 * lisp.h (doprnt): Remove.
17758 * Makefile.in (base_obj): Remove doprnt.o.
17759 * deps.mk (doprnt.o): Remove.
17761 error: Print 32- and 64-bit integers portably (Bug#8435).
17762 Without this change, on typical 64-bit hosts error ("...%d...", N)
17763 was used to print both 32- and 64-bit integers N, which relied on
17764 undefined behavior.
17765 * lisp.h, m/amdx86-64.h, m/ia64.h, m/ibms390x.h (pEd): New macro.
17766 * lisp.h (error, verror): Mark as printf-like functions.
17767 * eval.c (verror): Use vsnprintf, not doprnt, to do the real work.
17768 Report overflow in size calculations when allocating printf buffer.
17769 Do not truncate output string at its first null byte.
17770 * xdisp.c (vmessage): Use vsnprintf, not doprnt, to do the real work.
17771 Truncate the output at a character boundary, since vsnprintf does not
17773 * charset.c (check_iso_charset_parameter): Convert internal
17774 character to string before calling 'error', since %c now has the
17776 * coding.c (Fdecode_sjis_char, Fdecode_big5_char): Avoid int
17777 overflow when computing char to be passed to 'error'. Do not
17778 pass Lisp_Object to 'error'; pass the integer instead.
17779 * nsfns.m (Fns_do_applescript): Use int, not long, since it's
17780 formatted with plain %d.
17782 * eval.c (internal_lisp_condition_case): Don't pass spurious arg.
17784 * keyboard.c (access_keymap_keyremap): Print func name, not garbage.
17786 * coding.c (Fdecode_sjis_char): Don't assume CODE fits in int.
17788 * xterm.c (x_catch_errors): Remove duplicate declaration.
17790 * term.c (maybe_fatal): Mark its 3rd arg as a printf format, too.
17792 * xdisp.c, lisp.h (message_nolog): Remove; unused.
17794 2011-04-10 Jim Meyering <meyering@redhat.com>
17796 use ssize_t and size_t for read- and write-like emacs_gnutls_* functions
17797 * gnutls.c (emacs_gnutls_read): Adjust signature to be more read-like:
17798 return ssize_t not "int", and use size_t as the buffer length.
17799 (emacs_gnutls_write): Likewise, and make the buffer pointer "const".
17800 * gnutls.h: Update declarations.
17801 * process.c (read_process_output): Use ssize_t, to match.
17802 (send_process): Likewise.
17804 2011-04-09 Chong Yidong <cyd@stupidchicken.com>
17806 * image.c (Fimagemagick_types): Doc fix, and comment cleanup.
17808 2011-04-09 Chong Yidong <cyd@stupidchicken.com>
17810 * ftfont.c (get_adstyle_property, ftfont_pattern_entity):
17811 Use unsigned char, to match FcChar8 type definition.
17813 * xterm.c (handle_one_xevent):
17814 * xmenu.c (create_and_show_popup_menu):
17815 * xselect.c (x_decline_selection_request)
17816 (x_reply_selection_request): Avoid type-punned deref of X events.
17818 2011-04-09 Eli Zaretskii <eliz@gnu.org>
17820 Fix some uses of `int' instead of EMACS_INT.
17821 * search.c (string_match_1, fast_string_match)
17822 (fast_c_string_match_ignore_case, fast_string_match_ignore_case)
17823 (scan_buffer, find_next_newline_no_quit)
17824 (find_before_next_newline, search_command, Freplace_match)
17825 (Fmatch_data): Make some `int' variables be EMACS_INT.
17827 * xdisp.c (display_count_lines): 3rd argument and return value now
17828 EMACS_INT. All callers changed.
17829 (pint2hrstr): Last argument is now EMACS_INT.
17831 * coding.c (detect_coding_utf_8, detect_coding_emacs_mule)
17832 (detect_coding_iso_2022, detect_coding_sjis, detect_coding_big5)
17833 (detect_coding_ccl, detect_coding_charset, decode_coding_utf_8)
17834 (decode_coding_utf_16, decode_coding_emacs_mule)
17835 (decode_coding_iso_2022, decode_coding_sjis, decode_coding_big5)
17836 (decode_coding_ccl, decode_coding_charset)
17837 <consumed_chars, consumed_chars_base>: Declare EMACS_INT.
17838 (decode_coding_iso_2022, decode_coding_emacs_mule)
17839 (decode_coding_sjis, decode_coding_big5, decode_coding_charset)
17840 <char_offset, last_offset>: Declare EMACS_INT.
17841 (encode_coding_utf_8, encode_coding_utf_16)
17842 (encode_coding_emacs_mule, encode_invocation_designation)
17843 (encode_designation_at_bol, encode_coding_iso_2022)
17844 (encode_coding_sjis, encode_coding_big5, encode_coding_ccl)
17845 (encode_coding_raw_text, encode_coding_charset) <produced_chars>:
17847 (ASSURE_DESTINATION): Declare more_bytes EMACS_INT.
17848 (encode_invocation_designation): Last argument P_NCHARS is now
17850 (decode_eol): Declare pos_byte, pos, and pos_end EMACS_INT.
17851 (produce_chars): from_nchars and to_nchars are now EMACS_INT.
17853 * coding.h (struct coding_system) <head_ascii>: Declare EMACS_INT.
17856 * ccl.c (Fccl_execute_on_string): Declare some variables
17859 2011-04-08 Samuel Thibault <sthibault@debian.org> (tiny change)
17861 * term.c (init_tty): Fix incorrect ifdef placement (Bug#8450).
17863 2011-03-19 Christoph Scholtes <cschol2112@googlemail.com>
17865 * process.c (Fformat_network_address): Doc fix.
17867 2011-04-08 T.V. Raman <tv.raman.tv@gmail.com> (tiny change)
17869 * xml.c (parse_region): Avoid creating spurious whitespace nodes.
17871 2011-04-08 Chong Yidong <cyd@stupidchicken.com>
17873 * keyboard.c (read_char): Call Lisp function help-form-show,
17874 instead of using internal_with_output_to_temp_buffer.
17875 (Qhelp_form_show): New var.
17876 (syms_of_keyboard): Use DEFSYM macro.
17878 * print.c (internal_with_output_to_temp_buffer): Function deleted.
17880 * lisp.h (internal_with_output_to_temp_buffer): Remove prototype.
17882 2011-04-06 Chong Yidong <cyd@stupidchicken.com>
17884 * process.c (Flist_processes): Remove to Lisp.
17885 (list_processes_1): Delete.
17887 2011-04-06 Eli Zaretskii <eliz@gnu.org>
17889 * msdos.c (careadlinkat, careadlinkatcwd): MS-DOS replacements.
17891 * w32.c (careadlinkat, careadlinkatcwd): New always-fail stubs.
17893 2011-04-06 Paul Eggert <eggert@cs.ucla.edu>
17895 Fix more problems found by GCC 4.6.0's static checks.
17897 * xmenu.c (Fx_popup_dialog): Don't assume string is free of formats.
17899 * menu.c (Fx_popup_menu): Don't assume error_name lacks printf formats.
17901 * lisp.h (message, message_nolog, fatal): Mark as printf-like.
17903 * xdisp.c (vmessage): Mark as a printf-like function.
17905 * term.c (vfatal, maybe_fatal): Mark as printf-like functions.
17907 * sound.c (sound_warning): Don't crash if arg contains a printf format.
17909 * image.c (tiff_error_handler, tiff_warning_handler): Mark as
17910 printf-like functions.
17911 (tiff_load): Add casts to remove these marks before passing them
17912 to system-supplied API.
17914 * eval.c (Fsignal): Remove excess argument to 'fatal'.
17916 * coding.c (EMIT_ONE_BYTE, EMIT_TWO_BYTES): Use unsigned, not int.
17917 This avoids several warnings with gcc -Wstrict-overflow.
17918 (DECODE_COMPOSITION_RULE): If the rule is invalid, goto invalid_code
17919 directly, rather than having caller test rule sign. This avoids
17920 some unnecessary tests.
17921 * composite.h (COMPOSITION_ENCODE_RULE_VALID): New macro.
17922 (COMPOSITION_ENCODE_RULE): Arguments now must be valid. This
17923 affects only one use, in DECODE_COMPOSITION_RULE, which is changed.
17925 * xfont.c (xfont_text_extents): Remove var that was set but not used.
17926 (xfont_open): Avoid unnecessary tests.
17928 * composite.c (composition_gstring_put_cache): Use unsigned integer.
17930 * composite.h, composite.c (composition_gstring_put_cache):
17931 Use EMACS_INT, not int, for length.
17933 * composite.h (COMPOSITION_DECODE_REFS): New macro,
17934 breaking out part of COMPOSITION_DECODE_RULE.
17935 (COMPOSITION_DECODE_RULE): Use it.
17936 * composite.c (get_composition_id): Remove unused local vars,
17937 by using the new macro.
17939 * textprop.c (set_text_properties_1): Change while to do-while,
17940 since the condition is always true at first.
17942 * intervals.c (graft_intervals_into_buffer): Mark var as used.
17943 (interval_deletion_adjustment): Return unsigned value.
17946 * process.c (list_processes_1, create_pty, read_process_output):
17947 (exec_sentinel): Remove vars that were set but not used.
17948 (create_pty): Remove unnecessary "volatile"s.
17949 (Fnetwork_interface_info): Avoid possibility of int overflow.
17950 (read_process_output): Do adaptive read buffering even if carryover.
17951 (read_process_output): Simplify nbytes computation if buffered.
17953 * bytecode.c (exec_byte_code): Rename local to avoid shadowing.
17955 * syntax.c (scan_words): Remove var that was set but not used.
17956 (update_syntax_table): Use unsigned instead of int.
17958 * lread.c (lisp_file_lexically_bound_p): Use ints rather than endptrs.
17959 (lisp_file_lexically_bound_p, read1): Use unsigned instead of int.
17960 (safe_to_load_p): Make the end-of-loop test the inverse of the in-loop.
17962 * print.c (print_error_message): Avoid int overflow.
17964 * font.c (font_list_entities): Redo for clarity,
17965 so that reader need not know FONT_DPI_INDEX + 1 == FONT_SPACING_INDEX.
17967 * font.c (font_find_for_lface, Ffont_get_glyphs): Remove unused vars.
17968 (font_score): Avoid potential overflow in diff calculation.
17970 * fns.c (substring_both): Remove var that is set but not used.
17971 (sxhash): Redo loop for clarity and to avoid wraparound warning.
17973 * eval.c (funcall_lambda): Rename local to avoid shadowing.
17975 * alloc.c (mark_object_loop_halt, mark_object): Use size_t, not int.
17976 Otherwise, GCC 4.6.0 optimizes the loop check away since the check
17977 can always succeed if overflow has undefined behavior.
17979 * search.c (boyer_moore, wordify): Remove vars set but not used.
17980 (wordify): Omit three unnecessary tests.
17982 * indent.c (MULTIBYTE_BYTES_WIDTH): Don't compute wide_column.
17983 All callers changed. This avoids the need for an unused var.
17985 * casefiddle.c (casify_region): Remove var that is set but not used.
17987 * dired.c (file_name_completion): Remove var that is set but not used.
17989 * fileio.c (Finsert_file_contents): Make EOF condition clearer.
17991 * fileio.c (Finsert_file_contents): Avoid signed integer overflow.
17992 (Finsert_file_contents): Remove unnecessary code checking fd.
17994 * minibuf.c (read_minibuf_noninteractive): Use size_t for sizes.
17995 Check for integer overflow on size calculations.
17997 * buffer.c (Fprevious_overlay_change): Remove var that is set
18000 * keyboard.c (menu_bar_items, read_char_minibuf_menu_prompt):
18001 Remove vars that are set but not used.
18002 (timer_check_2): Don't assume timer-list and idle-timer-list are lists.
18003 (timer_check_2): Mark vars as initialized.
18005 * gtkutil.c (xg_get_file_with_chooser): Mark var as initialized.
18007 * image.c (lookup_image): Remove var that is set but not used.
18008 (xbm_load): Use parse_p, for gcc -Werror=unused-but-set-variable.
18010 * fontset.c (Finternal_char_font, Ffontset_info): Remove vars
18011 that are set but not used.
18013 * xfns.c (make_invisible_cursor): Don't return garbage
18014 if XCreateBitmapFromData fails (Bug#8410).
18016 * xselect.c (x_get_local_selection, x_handle_property_notify):
18017 Remove vars that are set but not used.
18019 * xfns.c (x_create_tip_frame): Remove var that is set but not used.
18020 (make_invisible_cursor): Initialize a possibly-uninitialized variable.
18022 * xterm.c (x_scroll_bar_to_input_event) [!USE_GTK]:
18023 Remove var that is set but not used.
18024 (scroll_bar_windows_size): Now size_t, not int.
18025 (x_send_scroll_bar_event): Use size_t, not int, for sizes.
18026 Check for overflow.
18028 * xfaces.c (realize_named_face): Remove vars that are set but not used.
18029 (map_tty_color) [!defined MSDOS]: Likewise.
18031 * term.c (tty_write_glyphs): Use size_t; this avoids overflow warning.
18033 * coding.c: Remove vars that are set but not used.
18034 (DECODE_COMPOSITION_RULE): Remove 2nd arg, which is unused.
18035 All callers changed.
18036 (decode_coding_utf_8, decode_coding_utf_16 decode_coding_emacs_mule):
18037 (decode_coding_iso_2022, encode_coding_sjis, encode_coding_big5):
18038 (decode_coding_charset): Remove vars that are set but not used.
18040 * bytecode.c (Fbyte_code) [!defined BYTE_CODE_SAFE]: Remove var
18041 that is set but not used.
18043 * print.c (print_object): Remove var that is set but not used.
18045 Replace 2 copies of readlink code with 1 gnulib version (Bug#8401).
18046 The gnulib version avoids calling malloc in the usual case,
18047 and on 64-bit hosts doesn't have some arbitrary 32-bit limits.
18048 * fileio.c (Ffile_symlink_p): Use emacs_readlink.
18049 * filelock.c (current_lock_owner): Likewise.
18050 * lisp.h (READLINK_BUFSIZE, emacs_readlink): New function.
18051 * sysdep.c: Include allocator.h, careadlinkat.h.
18052 (emacs_no_realloc_allocator): New static constant.
18053 (emacs_readlink): New function.
18054 * deps.mk (sysdep.o): Depend on ../lib/allocator.h and on
18055 ../lib/careadlinkat.h.
18057 2011-04-04 Stefan Monnier <monnier@iro.umontreal.ca>
18059 * keyboard.c (safe_run_hook_funcall): Fix last change (don't stop at the
18060 first non-nil return value).
18062 2011-04-03 Jan Djärv <jan.h.d@swipnet.se>
18064 * nsterm.m (ns_update_auto_hide_menu_bar): Define MAC_OS_X_VERSION_10_6
18065 if not defined (Bug#8403).
18067 2011-04-02 Juanma Barranquero <lekktu@gmail.com>
18069 * xdisp.c (display_count_lines): Remove parameter `start',
18070 unused since 1998-01-01T02:27:27Z!rms@gnu.org. All callers changed.
18071 (get_char_face_and_encoding): Remove parameter `multibyte_p',
18072 unused since 2008-05-14T01:40:23Z!handa@m17n.org. All callers changed.
18073 (fill_stretch_glyph_string): Remove parameters `row' and `area',
18074 unused at least since Kim's GUI unification at 2003-03-16T20:45:46Z!storm@cua.dk
18075 and thereabouts. All callers changed.
18076 (get_per_char_metric): Remove parameter `f', unused since
18077 2008-05-14T01:40:23Z!handa@m17n.org. All callers changed.
18079 2011-04-02 Jim Meyering <meyering@redhat.com>
18081 do not dereference NULL upon failed strdup
18082 * nsfont.m (ns_descriptor_to_entity): Use xstrdup, not strdup.
18083 (ns_get_family): Likewise.
18085 2011-04-02 Juanma Barranquero <lekktu@gmail.com>
18087 * eval.c (unwind_to_catch) [DEBUG_GCPRO]: Remove redundant assignment.
18089 2011-04-02 Jan Djärv <jan.h.d@swipnet.se>
18091 * nsterm.m (ns_update_auto_hide_menu_bar): Only for OSX 10.6 or
18094 2011-04-01 Stefan Monnier <monnier@iro.umontreal.ca>
18096 Add lexical binding.
18098 * window.c (Ftemp_output_buffer_show): New fun.
18099 (Fsave_window_excursion):
18100 * print.c (Fwith_output_to_temp_buffer): Move to subr.el.
18102 * lread.c (lisp_file_lexically_bound_p): New function.
18103 (Fload): Bind Qlexical_binding.
18104 (readevalloop): Remove `evalfun' arg.
18105 Bind Qinternal_interpreter_environment.
18106 (Feval_buffer): Bind Qlexical_binding.
18107 (defvar_int, defvar_bool, defvar_lisp_nopro, defvar_kboard):
18109 (syms_of_lread): Declare `lexical-binding'.
18111 * lisp.h (struct Lisp_Symbol): New field `declared_special'.
18113 * keyboard.c (eval_dyn): New fun.
18114 (menu_item_eval_property): Use it.
18116 * image.c (parse_image_spec): Use Ffunctionp.
18118 * fns.c (concat, mapcar1): Accept byte-code-functions.
18120 * eval.c (Fsetq): Handle lexical vars.
18121 (Fdefun, Fdefmacro, Ffunction): Make closures when needed.
18122 (Fdefconst, Fdefvaralias, Fdefvar): Mark as dynamic.
18123 (FletX, Flet): Obey lexical binding.
18124 (Fcommandp): Handle closures.
18125 (Feval): New `lexical' arg.
18126 (eval_sub): New function extracted from Feval. Use it almost
18127 everywhere where Feval was used. Look up vars in lexical env.
18129 (Ffunctionp): Move from subr.el.
18130 (Ffuncall): Handle closures.
18131 (apply_lambda): Remove `eval_flags'.
18132 (funcall_lambda): Handle closures and new byte-code-functions.
18133 (Fspecial_variable_p): New function.
18134 (syms_of_eval): Initialize the Vinternal_interpreter_environment var,
18135 but without exporting it to Lisp.
18137 * doc.c (Fdocumentation, store_function_docstring):
18138 * data.c (Finteractive_form): Handle closures.
18140 * callint.c (Fcall_interactively): Preserve lexical-binding mode for
18143 * bytecode.c (Bstack_ref, Bstack_set, Bstack_set2, BdiscardN):
18145 (exec_byte_code): New function extracted from Fbyte_code to handle new
18146 calling convention for byte-code-functions. Add new byte-codes.
18148 * buffer.c (defvar_per_buffer): Set new `declared_special' field.
18150 * alloc.c (Fmake_symbol): Init new `declared_special' field.
18152 2011-03-31 Juanma Barranquero <lekktu@gmail.com>
18154 * xdisp.c (redisplay_internal): Fix prototype.
18156 2011-03-31 Eli Zaretskii <eliz@gnu.org>
18158 * xdisp.c (SCROLL_LIMIT): New macro.
18159 (try_scrolling): Use it when setting scroll_limit.
18160 Limit scrolling to 100 screen lines.
18161 (redisplay_window): Even when falling back on "recentering",
18162 position point in the window according to scroll-conservatively,
18163 scroll-margin, and scroll-*-aggressively variables. (Bug#6671)
18165 (try_scrolling): When point is above the window, allow searching
18166 as far as scroll_max, or one screenful, to compute vertical
18167 distance from PT to the scroll margin position. This prevents
18168 try_scrolling from unnecessarily failing when
18169 scroll-conservatively is set to a value slightly larger than the
18170 window height. Clean up the case of PT below the margin at bottom
18171 of window: scroll_max can no longer be INT_MAX. When aggressive
18172 scrolling is in use, don't let point enter the opposite scroll
18173 margin as result of the scroll.
18174 (syms_of_xdisp) <scroll-conservatively>: Document the
18175 threshold of 100 lines for never-recentering scrolling.
18177 2011-03-31 Juanma Barranquero <lekktu@gmail.com>
18179 * dispextern.h (move_it_by_lines):
18180 * xdisp.c (move_it_by_lines): Remove parameter `need_y_p', unused
18181 since 2000-12-29T14:24:09Z!gerd@gnu.org. All callers changed.
18182 (message_log_check_duplicate): Remove parameters `prev_bol' and
18183 `this_bol', unused since 1998-01-01T02:27:27Z!rms@gnu.org. All callers changed.
18184 (redisplay_internal): Remove parameter `preserve_echo_area',
18185 unused since 1999-07-21T21:43:52Z!gerd@gnu.org. All callers changed.
18187 * indent.c (Fvertical_motion):
18188 * window.c (window_scroll_pixel_based, Frecenter):
18189 Don't pass `need_y_p' to `move_it_by_lines'.
18191 2011-03-30 Stefan Monnier <monnier@iro.umontreal.ca>
18193 * eval.c (struct backtrace): Don't cheat with negative numbers, but do
18194 steal a few bits to be more compact.
18195 (interactive_p, Fbacktrace, Fbacktrace_frame, mark_backtrace):
18196 Remove unneeded casts.
18198 * bytecode.c (Fbyte_code): CAR and CDR can GC.
18200 2011-03-30 Zachary Kanfer <zkanfer@gmail.com> (tiny change)
18202 * keyboard.c (Fexecute_extended_command): Do log the "suggest key
18203 binding" message (bug#7967).
18205 2011-03-30 Paul Eggert <eggert@cs.ucla.edu>
18207 Fix more problems found by GCC 4.6.0's static checks.
18209 * unexelf.c (unexec) [! (defined _SYSTYPE_SYSV || defined __sgi)]:
18210 Remove unused local var.
18212 * editfns.c (Fmessage_box): Remove unused local var.
18214 * xdisp.c (try_window_reusing_current_matrix, x_produce_glyphs):
18215 (note_mode_line_or_margin_highlight, note_mouse_highlight):
18216 Omit unused local vars.
18217 * window.c (shrink_windows): Omit unused local var.
18218 * menu.c (digest_single_submenu): Omit unused local var.
18219 * dispnew.c (update_window) [PERIODIC_PREEMPTION_CHECKING]:
18220 Omit unused local var.
18222 * keyboard.c (parse_modifiers_uncached, parse_modifiers):
18223 Don't assume string length fits in int.
18224 (keyremap_step, read_key_sequence): Use size_t for sizes.
18225 (read_key_sequence): Don't check last_real_key_start redundantly.
18227 * callproc.c (Fcall_process, Fcall_process_region): Use SAFE_ALLOCA
18228 instead of alloca (Bug#8344).
18230 * eval.c (Fbacktrace): Don't assume nargs fits in int.
18231 (Fbacktrace_frame): Don't assume nframes fits in int.
18233 * syntax.c (scan_sexps_forward): Avoid pointer wraparound.
18235 * xterm.c (x_make_frame_visible, same_x_server): Redo to avoid overflow
18238 * term.c (produce_glyphless_glyph): Remove unnecessary test.
18240 * cm.c (calccost): Turn while-do into do-while, for clarity.
18242 * keyboard.c (syms_of_keyboard): Use the same style as later
18243 in this function when indexing through an array. This also
18244 works around GCC bug 48267.
18246 * image.c (tiff_load): Fix off-by-one image count (Bug#8336).
18248 * xselect.c (x_check_property_data): Return correct size (Bug#8335).
18250 * chartab.c (sub_char_table_ref_and_range): Redo for slight
18251 efficiency gain, and to bypass a gcc -Wstrict-overflow warning.
18253 * keyboard.c, keyboard.h (num_input_events): Now size_t.
18254 This avoids undefined behavior on integer overflow, and is a bit
18255 more convenient anyway since it is compared to a size_t variable.
18257 Variadic C functions now count arguments with size_t, not int.
18258 This avoids an unnecessary limitation on 64-bit machines, which
18259 caused (substring ...) to crash on large vectors (Bug#8344).
18260 * lisp.h (struct Lisp_Subr.function.aMANY): Now takes size_t, not int.
18261 (DEFUN_ARGS_MANY, internal_condition_case_n, safe_call): Likewise.
18262 All variadic functions and their callers changed accordingly.
18263 (struct gcpro.nvars): Now size_t, not int. All uses changed.
18264 * data.c (arith_driver, float_arith_driver): Likewise.
18265 * editfns.c (general_insert_function): Likewise.
18266 * eval.c (struct backtrace.nargs, interactive_p)
18267 (internal_condition_case_n, run_hook_with_args, apply_lambda)
18268 (funcall_lambda, mark_backtrace): Likewise.
18269 * fns.c (concat): Likewise.
18270 * frame.c (x_set_frame_parameters): Likewise.
18271 * fns.c (get_key_arg): Now accepts and returns size_t, and returns
18272 0 if not found, not -1. All callers changed.
18274 * alloc.c (garbage_collect): Don't assume stack size fits in int.
18275 (stack_copy_size): Now size_t, not int.
18276 (stack_copy, stack_copy_size): Define only if MAX_SAVE_STACK > 0.
18278 2011-03-28 Juanma Barranquero <lekktu@gmail.com>
18280 * coding.c (encode_designation_at_bol): Remove parameter `charbuf_end',
18281 unused since 2002-03-01T01:17:24Z!handa@m17n.org and 2008-02-01T16:01:31Z!miles@gnu.org.
18282 All callers changed.
18284 * lisp.h (multibyte_char_to_unibyte):
18285 * character.c (multibyte_char_to_unibyte): Remove parameter `rev_tbl',
18286 unused since 2002-03-01T01:16:34Z!handa@m17n.org and 2008-02-01T16:01:31Z!miles@gnu.org.
18287 * character.h (CHAR_TO_BYTE8):
18288 * cmds.c (internal_self_insert):
18289 * editfns.c (general_insert_function):
18290 * keymap.c (push_key_description):
18291 * search.c (Freplace_match):
18292 * xdisp.c (message_dolog, set_message_1): All callers changed.
18294 2011-03-28 Stefan Monnier <monnier@iro.umontreal.ca>
18296 * keyboard.c (safe_run_hook_funcall): New function.
18297 (safe_run_hooks_1, safe_run_hooks_error, safe_run_hooks): On error,
18298 don't set the hook to nil, but remove the offending function instead.
18299 (Qcommand_hook_internal): Remove, unused.
18300 (syms_of_keyboard): Don't initialize Qcommand_hook_internal nor define
18301 Vcommand_hook_internal.
18303 * eval.c (enum run_hooks_condition): Remove.
18304 (funcall_nil, funcall_not): New functions.
18305 (run_hook_with_args): Call each function through a `funcall' argument.
18306 Remove `cond' argument, now redundant.
18307 (Frun_hooks, Frun_hook_with_args, Frun_hook_with_args_until_success)
18308 (Frun_hook_with_args_until_failure): Adjust accordingly.
18309 (run_hook_wrapped_funcall, Frun_hook_wrapped): New functions.
18311 2011-03-28 Juanma Barranquero <lekktu@gmail.com>
18313 * dispextern.h (string_buffer_position): Remove declaration.
18315 * print.c (strout): Remove parameter `multibyte', unused since
18316 1999-08-21T19:30:21Z!gerd@gnu.org. All callers changed.
18318 * search.c (boyer_moore): Remove parameters `len', `pos' and `lim',
18319 never used since function introduction in 1998-02-08T21:33:56Z!rms@gnu.org.
18320 All callers changed.
18322 * w32.c (_wsa_errlist): Use braces for struct initializers.
18324 * xdisp.c (string_buffer_position_lim): Remove parameter `w',
18325 never used since function introduction in 2001-03-09T18:41:50Z!gerd@gnu.org.
18326 All callers changed.
18327 (string_buffer_position): Likewise. Also, make static (it's never
18328 used outside xdisp.c).
18329 (cursor_row_p): Remove parameter `w', unused since
18330 2000-10-17T16:08:57Z!gerd@gnu.org. All callers changed.
18331 (decode_mode_spec): Remove parameter `precision', introduced during
18332 Gerd Moellmann's rewrite at 1999-07-21T21:43:52Z!gerd@gnu.org, but never used.
18333 All callers changed.
18335 2011-03-27 Jan Djärv <jan.h.d@swipnet.se>
18337 * nsterm.m (syms_of_nsterm): Use doc: for ns-auto-hide-menu-bar.
18339 2011-03-27 Anders Lindgren <andlind@gmail.com>
18341 * nsterm.m (ns_menu_bar_is_hidden): New variable.
18342 (ns_constrain_all_frames, ns_menu_bar_should_be_hidden)
18343 (ns_update_auto_hide_menu_bar): New functions.
18344 (ns_update_begin): Call ns_update_auto_hide_menu_bar.
18345 (applicationDidBecomeActive): Call ns_update_auto_hide_menu_bar and
18346 ns_constrain_all_frames.
18347 (constrainFrameRect): Return at once if ns_menu_bar_should_be_hidden.
18348 (syms_of_nsterm): DEFVAR ns-auto-hide-menu-bar, init to Qnil.
18350 2011-03-27 Jan Djärv <jan.h.d@swipnet.se>
18352 * nsmenu.m (runDialogAt): Remove argument to timer_check.
18354 2011-03-27 Glenn Morris <rgm@gnu.org>
18356 * syssignal.h: Replace RETSIGTYPE with void.
18357 * atimer.c, data.c, dispnew.c, emacs.c, floatfns.c, keyboard.c:
18358 * keyboard.h, lisp.h, process.c, sysdep.c, xterm.c:
18359 Replace SIGTYPE with void everywhere.
18360 * s/usg5-4-common.h (SIGTYPE): Remove definition.
18361 * s/template.h (SIGTYPE): Remove commented out definition.
18363 2011-03-26 Eli Zaretskii <eliz@gnu.org>
18365 * xdisp.c (redisplay_window): Don't check buffer's clip_changed
18366 flag as a prerequisite for invoking try_scrolling. (Bug#6671)
18368 2011-03-26 Juanma Barranquero <lekktu@gmail.com>
18370 * w32.c (read_unc_volume): Use parameter `henum', instead of
18371 global variable `wget_enum_handle'.
18373 * keymap.c (describe_vector): Remove parameters `indices' and
18374 `char_table_depth', unused since 2002-03-01T01:43:26Z!handa@m17n.org.
18375 (describe_map, Fdescribe_vector): Adjust calls to `describe_vector'.
18377 * keyboard.h (timer_check, show_help_echo): Remove unused parameters.
18379 * keyboard.c (timer_check): Remove parameter `do_it_now',
18380 unused since 1996-04-12T06:01:29Z!rms@gnu.org.
18381 (show_help_echo): Remove parameter `ok_to_overwrite_keystroke_echo',
18382 unused since 2008-04-19T19:30:53Z!monnier@iro.umontreal.ca.
18384 * keyboard.c (read_char):
18385 * w32menu.c (w32_menu_display_help):
18386 * xmenu.c (show_help_event, menu_help_callback):
18387 Adjust calls to `show_help_echo'.
18389 * gtkutil.c (xg_maybe_add_timer):
18390 * keyboard.c (readable_events):
18391 * process.c (wait_reading_process_output):
18392 * xmenu.c (x_menu_wait_for_event): Adjust calls to `timer_check'.
18394 * insdel.c (adjust_markers_gap_motion):
18395 Remove; no-op since 1998-01-02T21:29:48Z!rms@gnu.org.
18396 (gap_left, gap_right): Don't call it.
18398 2011-03-25 Chong Yidong <cyd@stupidchicken.com>
18400 * xdisp.c (handle_fontified_prop): Discard changes to clip_changed
18401 incurred during fontification.
18403 2011-03-25 Juanma Barranquero <lekktu@gmail.com>
18405 * buffer.c (defvar_per_buffer): Remove unused parameter `doc'.
18406 (DEFVAR_PER_BUFFER): Don't pass it.
18408 * dispnew.c (row_equal_p, add_row_entry): Remove unused parameter `w'.
18409 (scrolling_window): Don't pass it.
18411 2011-03-25 Juanma Barranquero <lekktu@gmail.com>
18413 * dispextern.h (glyph_matric): Use #if GLYPH_DEBUG, not #ifdef.
18415 * fileio.c (check_executable) [DOS_NT]: Remove unused variables `len'
18417 (Fset_file_selinux_context) [HAVE_LIBSELINUX]: Move here declaration
18418 of variables specific to SELinux and computation of `encoded_absname'.
18420 * image.c (XPutPixel): Remove unused variable `height'.
18422 * keyboard.c (make_lispy_event): Remove unused variable `hpos'.
18424 * unexw32.c (get_section_info): Remove unused variable `section'.
18426 * w32.c (stat): Remove unused variables `drive_root' and `devtype'.
18427 (system_process_attributes): Remove unused variable `sess'.
18428 (sys_read): Remove unused variable `err'.
18430 * w32fns.c (top): Wrap variables with #if GLYPH_DEBUG, not #ifdef.
18431 (w32_wnd_proc): Remove unused variable `isdead'.
18432 (unwind_create_frame): Use #if GLYPH_DEBUG, not #ifdef.
18433 (Fx_server_max_request_size): Remove unused variable `dpyinfo'.
18434 (x_create_tip_frame): Remove unused variable `tem'.
18436 * w32inevt.c (w32_console_read_socket):
18437 Remove unused variable `no_events'.
18439 * w32term.c (x_draw_composite_glyph_string_foreground):
18440 Remove unused variable `width'.
18442 2011-03-24 Juanma Barranquero <lekktu@gmail.com>
18444 * w32term.c (x_set_glyph_string_clipping):
18445 Don't pass uninitialized region to CombineRgn.
18447 2011-03-23 Juanma Barranquero <lekktu@gmail.com>
18449 * w32fns.c (x_set_menu_bar_lines): Remove unused variable `olines'.
18450 (w32_wnd_proc): Pass NULL to Windows API, not uninitialized buffer.
18451 (Fx_close_connection): Remove unused variable `i'.
18453 * w32font.c (w32font_draw): Return number of glyphs.
18454 (w32font_open_internal): Remove unused variable `i'.
18455 (w32font_driver): Add missing initializer.
18457 * w32menu.c (utf8to16): Remove unused variable `utf16'.
18458 (fill_in_menu): Remove unused variable `items_added'.
18460 * w32term.c (last_mouse_press_frame): Remove static global variable.
18461 (w32_clip_to_row): Remove unused variable `f'.
18462 (x_delete_terminal): Remove unused variable `i'.
18464 * w32uniscribe.c (uniscribe_shape): Remove unused variable `nclusters'.
18465 (NOTHING): Remove unused static global variable.
18466 (uniscribe_check_otf): Remove unused variable `table'.
18467 (uniscribe_font_driver): Add missing initializers.
18469 2011-03-23 Julien Danjou <julien@danjou.info>
18471 * term.c (Fsuspend_tty, Fresume_tty):
18472 * minibuf.c (read_minibuf, run_exit_minibuf_hook):
18473 * window.c (temp_output_buffer_show):
18474 * insdel.c (signal_before_change):
18475 * frame.c (Fhandle_switch_frame):
18476 * fileio.c (Fdo_auto_save):
18477 * emacs.c (Fkill_emacs):
18478 * editfns.c (save_excursion_restore):
18479 * cmds.c (internal_self_insert):
18480 * callint.c (Fcall_interactively):
18481 * buffer.c (Fkill_all_local_variables):
18482 * keyboard.c (Fcommand_execute, Fsuspend_emacs, safe_run_hooks_1):
18484 (command_loop_1): Use Frun_hooks. Call safe_run_hooks
18485 unconditionally since it does the check itself.
18487 2011-03-23 Paul Eggert <eggert@cs.ucla.edu>
18489 Fix more problems found by GCC 4.5.2's static checks.
18491 * coding.c (encode_coding_raw_text): Avoid unnecessary test
18492 the first time through the loop, since we know p0 < p1 then.
18493 This also avoids a gcc -Wstrict-overflow warning.
18495 * lisp.h (SAFE_ALLOCA, SAFE_ALLOCA_LISP): Avoid 'int' overflow
18496 leading to a memory leak, possible in functions like
18497 load_charset_map_from_file that can allocate an unbounded number
18498 of objects (Bug#8318).
18500 * xmenu.c (set_frame_menubar): Use EMACS_UINT, not int, for indexes
18501 that could (at least in theory) be that large.
18503 * xdisp.c (message_log_check_duplicate): Return unsigned long, not int.
18504 This is less likely to overflow, and avoids undefined behavior if
18505 overflow does occur. All callers changed. Use strtoul to scan
18506 for the unsigned long integer.
18507 (pint2hrstr): Simplify and tune code slightly.
18508 This also avoids a (bogus) GCC warning with gcc -Wstrict-overflow.
18510 * scroll.c (do_scrolling): Work around GCC bug 48228.
18511 See <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48228>.
18513 * frame.c (Fmodify_frame_parameters): Simplify loop counter.
18514 This also avoids a warning with gcc -Wstrict-overflow.
18515 (validate_x_resource_name): Simplify count usage.
18516 This also avoids a warning with gcc -Wstrict-overflow.
18518 * fileio.c (Fcopy_file): Report error if fchown or fchmod
18521 * emacs.c (Fdaemon_initialized): Do not ignore I/O errors (Bug#8303).
18523 * process.c (Fmake_network_process): Use socklen_t, not int,
18524 where POSIX says socklen_t is required in portable programs.
18525 This fixes a porting bug on hosts like 64-bit HP-UX, where
18526 socklen_t is wider than int (Bug#8277).
18527 (Fmake_network_process, server_accept_connection):
18528 (wait_reading_process_output, read_process_output):
18531 * process.c: Rename or move locals to avoid shadowing.
18532 (list_processes_1, Fmake_network_process):
18533 (read_process_output_error_handler, exec_sentinel_error_handler):
18534 Rename or move locals.
18535 (Fmake_network_process): Define label "retry_connect" only if needed.
18536 (Fnetwork_interface_info): Fix pointer signedness.
18537 (process_send_signal): Add cast to avoid pointer signedness problem.
18538 (FIRST_PROC_DESC, IF_NON_BLOCKING_CONNECT): Remove unused macros.
18539 (create_process): Use 'volatile' to avoid vfork clobbering (Bug#8298).
18541 Make tparam.h and terminfo.c consistent.
18542 * cm.c (tputs, tgoto, BC, UP): Remove extern decls.
18543 Include tparam.h instead, since it declares them.
18544 * cm.h (PC): Remove extern decl; tparam.h now does this.
18545 * deps.mk (cm.o, terminfo.o): Depend on tparam.h.
18546 * terminfo.c: Include tparam.h, to check interfaces.
18547 (tparm): Make 1st arg a const pointer in decl. Put it at top level.
18548 (tparam): Adjust signature to match interface in tparam.h;
18549 this removes some undefined behavior. Check that outstring and len
18550 are zero, which they always are with Emacs.
18551 * tparam.h (PC, BC, UP): New extern decls.
18553 * xftfont.c (xftfont_shape): Now static, and defined only if needed.
18554 (xftfont_open): Rename locals to avoid shadowing.
18556 * ftfont.c (ftfont_resolve_generic_family): Fix pointer signedness.
18557 (ftfont_otf_capability, ftfont_shape): Omit decls if not needed.
18558 (OTF_TAG_SYM): Omit macro if not needed.
18559 (ftfont_list): Remove unused local.
18560 (get_adstyle_property, ftfont_pattern_entity):
18561 (ftfont_lookup_cache, ftfont_open, ftfont_anchor_point):
18562 Rename locals to avoid shadowing.
18564 * xfont.c (xfont_list_family): Mark var as initialized.
18566 * xml.c (make_dom): Now static.
18568 * composite.c (composition_compute_stop_pos): Rename local to
18570 (composition_reseat_it): Remove unused locals.
18571 (find_automatic_composition, composition_adjust_point): Likewise.
18572 (composition_update_it): Mark var as initialized.
18573 (find_automatic_composition): Mark vars as initialized,
18574 with a FIXME (Bug#8290).
18576 character.h: Rename locals to avoid shadowing.
18577 * character.h (PREV_CHAR_BOUNDARY, FETCH_STRING_CHAR_ADVANCE):
18578 (FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE, FETCH_CHAR_ADVANCE):
18579 (FETCH_CHAR_ADVANCE_NO_CHECK, INC_POS, DEC_POS, BUF_INC_POS):
18580 (BUF_DEC_POS): Be more systematic about renaming local temporaries
18581 to avoid shadowing.
18583 * textprop.c (property_change_between_p): Remove; unused.
18585 * intervals.c (interval_start_pos): Now static.
18587 * intervals.h (CHECK_TOTAL_LENGTH): Avoid empty "else".
18589 * atimer.c (start_atimer, append_atimer_lists, set_alarm):
18590 Rename locals to avoid shadowing.
18592 * sound.c (wav_play, au_play, Fplay_sound_internal):
18593 Fix pointer signedness.
18594 (alsa_choose_format): Remove unused local var.
18595 (wav_play): Initialize a variable to 0, to prevent undefined
18596 behavior (Bug#8278).
18598 * region-cache.c (insert_cache_boundary): Redo var to avoid shadowing.
18600 * region-cache.h (pp_cache): New decl, for gcc -Wmissing-prototypes.
18602 * callproc.c (Fcall_process): Use 'volatile' to avoid vfork
18603 clobbering (Bug#8298).
18604 * sysdep.c (sys_subshell): Likewise.
18605 Previously, the sys_subshell 'volatile' was incorrectly IF_LINTted out.
18607 * lisp.h (child_setup): Now NO_RETURN unless DOS_NT.
18608 This should get cleaned up, so that child_setup has the
18609 same signature on all platforms.
18611 * callproc.c (call_process_cleanup): Now static.
18612 (relocate_fd): Rename locals to avoid shadowing.
18614 2011-03-22 Chong Yidong <cyd@stupidchicken.com>
18616 * xterm.c (x_clear_frame): Remove XClearWindow call. This appears
18617 not to be necessary, and produces flickering.
18619 2011-03-20 Glenn Morris <rgm@gnu.org>
18621 * config.in: Remove file.
18623 2011-03-20 Juanma Barranquero <lekktu@gmail.com>
18625 * minibuf.c (Vcompleting_read_function): Don't declare, global variables
18626 are now in src/globals.h.
18627 (syms_of_minibuf): Remove spurious & from previous change.
18629 2011-03-20 Leo Liu <sdl.web@gmail.com>
18631 * minibuf.c (completing-read-function): New variable.
18632 (completing-read-default): Rename from completing-read.
18633 (completing-read): Call completing-read-function.
18635 2011-03-19 Juanma Barranquero <lekktu@gmail.com>
18637 * xfaces.c (Fx_load_color_file):
18638 Read color file from absolute filename (bug#8250).
18640 2011-03-19 Juanma Barranquero <lekktu@gmail.com>
18642 * makefile.w32-in: Update dependencies.
18644 2011-03-17 Eli Zaretskii <eliz@gnu.org>
18646 * makefile.w32-in ($(BLD)/unexw32.$(O)): Depend on $(SRC)/unexec.h.
18648 2011-03-17 Paul Eggert <eggert@cs.ucla.edu>
18650 Fix more problems found by GCC 4.5.2's static checks.
18652 * process.c (make_serial_process_unwind, send_process_trap):
18653 (sigchld_handler): Now static.
18655 * process.c (allocate_pty): Let PTY_ITERATION declare iteration vars.
18656 That way, the code declares only the vars that it needs.
18657 * s/aix4-2.h (PTY_ITERATION): Declare iteration vars.
18658 * s/cygwin.h (PTY_ITERATION): Likewise.
18659 * s/darwin.h (PTY_ITERATION): Likewise.
18660 * s/gnu-linux.h (PTY_ITERATION): Likewise.
18662 * s/irix6-5.h (PTY_OPEN): Declare stb, to loosen coupling.
18663 * process.c (allocate_pty): Don't declare stb unless it's needed.
18665 * bytecode.c (MAYBE_GC): Rewrite so as not to use empty "else".
18666 (CONSTANTLIM): Remove; unused.
18667 (METER_CODE, Bscan_buffer, Bread_char, Bset_mark):
18668 Define only if needed.
18670 * unexelf.c (unexec): Name an expression,
18671 to avoid gcc -Wbad-function-cast warning.
18672 Use a different way to cause a compilation error if anyone uses
18673 n rather than nn, a way that does not involve shadowing.
18674 (ELF_BSS_SECTION_NAME, OLD_PROGRAM_H): Remove; unused.
18676 * deps.mk (unexalpha.o): Remove; unused.
18678 New file unexec.h, the (simple) interface for unexec (Bug#8267).
18679 * unexec.h: New file.
18680 * deps.mk (emacs.o, unexaix.o, unexcw.o, unexcoff.o, unexelf.o):
18681 (unexhp9k800.o, unexmacosx.o, unexsol.o, unexw32.o):
18682 Depend on unexec.h.
18683 * emacs.c [!defined CANNOT_DUMP]: Include unexec.h.
18684 * unexaix.c, unexcoff.c, unexcw.c, unexelf.c, unexhp9k800.c:
18685 * unexmacosx.c, unexsol.c, unexw32.c: Include unexec.h.
18686 Change as necessary to match prototype in unexec.h.
18688 * syntax.c (Fforward_comment, scan_lists): Rename locals to avoid
18690 (back_comment, skip_chars): Mark vars as initialized.
18692 * character.h (FETCH_STRING_CHAR_ADVANCE_NO_CHECK, BUF_INC_POS):
18693 Rename locals to avoid shadowing.
18695 * lread.c (read1): Rewrite so as not to use empty "else".
18696 (Fload, readevalloop, read1): Rename locals to avoid shadowing.
18698 * print.c (Fredirect_debugging_output): Fix pointer signedess.
18700 * lisp.h (debug_output_compilation_hack): Add decl here, to avoid
18701 warning when compiling print.c.
18703 * font.c (font_unparse_fcname): Abort in an "impossible" situation
18704 instead of using an uninitialized var.
18705 (font_sort_entities): Mark var as initialized.
18707 * character.h (FETCH_CHAR_ADVANCE): Rename locals to avoid shadowing.
18709 * font.c (font_unparse_xlfd): Don't mix pointers to variables with
18710 pointers to constants.
18711 (font_parse_fcname): Remove unused vars.
18712 (font_delete_unmatched): Now static.
18713 (font_get_spec): Remove; unused.
18714 (font_style_to_value, font_prop_validate_style, font_unparse_fcname):
18715 (font_update_drivers, Ffont_get_glyphs, font_add_log):
18716 Rename or move locals to avoid shadowing.
18718 * fns.c (require_nesting_list, require_unwind): Now static.
18719 (Ffillarray): Rename locals to avoid shadowing.
18721 * floatfns.c (domain_error2): Define only if needed.
18722 (Ffrexp, Fldexp): Rename locals to avoid shadowing.
18724 * alloc.c (mark_backtrace): Move decl from here ...
18725 * lisp.h: ... to here, so that it can be checked.
18727 * eval.c (call_debugger, do_debug_on_call, grow_specpdl): Now static.
18728 (Fdefvar): Rewrite so as not to use empty "else".
18729 (lisp_indirect_variable): Name an expression,
18730 to avoid gcc -Wbad-function-cast warning.
18731 (Fdefvar): Rename locals to avoid shadowing.
18733 * callint.c (quotify_arg, quotify_args): Now static.
18734 (Fcall_interactively): Rename locals to avoid shadowing.
18735 Use const pointer when appropriate.
18737 * lisp.h (get_system_name, get_operating_system_release):
18738 Move decls here, to check interfaces.
18739 * process.c (get_operating_system_release): Move decl to lisp.h.
18740 * xrdb.c (get_system_name): Likewise.
18741 * editfns.c (init_editfns, Fuser_login_name, Fuser_uid):
18742 (Fuser_real_uid, Fuser_full_name): Remove unnecessary casts,
18743 some of which prompt warnings from gcc -Wbad-function-cast.
18744 (Fformat_time_string, Fencode_time, Finsert_char):
18745 (Ftranslate_region_internal, Fformat):
18746 Rename or remove local vars to avoid shadowing.
18747 (Ftranslate_region_internal): Mark var as initialized.
18749 * doc.c (Fdocumentation, Fsnarf_documentation): Move locals to
18752 * lisp.h (eassert): Check that the argument compiles, even if
18753 ENABLE_CHECKING is not defined.
18755 * data.c (Findirect_variable): Name an expression, to avoid
18756 gcc -Wbad-function-cast warning.
18757 (default_value, arithcompare, arith_driver, arith_error): Now static.
18758 (store_symval_forwarding): Rename local to avoid shadowing.
18759 (Fmake_variable_buffer_local, Fmake_local_variable):
18760 Mark variables as initialized.
18761 (do_blv_forwarding, do_symval_forwarding): Remove; unused.
18763 * alloc.c (check_cons_list): Do not define unless GC_CHECK_CONS_LIST.
18764 (Fmake_vector, Fvector, Fmake_byte_code, Fgarbage_collect):
18765 Rename locals to avoid shadowing.
18766 (mark_stack): Move local variables into the #ifdef region where
18768 (BLOCK_INPUT_ALLOC, UNBLOCK_INPUT_ALLOC): Define only if
18769 ! defined SYSTEM_MALLOC && ! defined SYNC_INPUT, as they are not
18771 (CHECK_ALLOCATED): Define only if GC_CHECK_MARKED_OBJECTS.
18772 (GC_STRING_CHARS): Remove; not used.
18773 (Fmemory_limit): Cast sbrk's returned value to char *.
18775 * lisp.h (check_cons_list): Declare if GC_CHECK_CONS_LIST; this
18776 avoids undefined behavior in theory.
18778 * regex.c (IF_LINT): Add defn, for benefit of ../lib-src.
18780 Use functions, not macros, for up- and down-casing (Bug#8254).
18781 * buffer.h (DOWNCASE_TABLE, UPCASE_TABLE, DOWNCASE, UPPERCASEP):
18782 (NOCASEP, LOWERCASEP, UPCASE, UPCASE1): Remove. All callers changed
18783 to use the following functions instead of these macros.
18784 (downcase): Adjust to lack of DOWNCASE_TABLE. Return int, not
18785 EMACS_INT, since callers assume the returned value fits in int.
18786 (upcase1): Likewise, for UPCASE_TABLE.
18787 (uppercasep, lowercasep, upcase): New static inline functions.
18788 * editfns.c (Fchar_equal): Remove no-longer-needed workaround for
18789 the race-condition problem in the old DOWNCASE.
18791 * regex.c (CHARSET_LOOKUP_RANGE_TABLE_RAW, POP_FAILURE_REG_OR_COUNT):
18792 Rename locals to avoid shadowing.
18793 (regex_compile, re_match_2_internal): Move locals to avoid shadowing.
18794 (regex_compile, re_search_2, re_match_2_internal):
18795 Remove unused local vars.
18796 (FREE_VAR): Rewrite so as not to use empty "else",
18797 which gcc can warn about.
18798 (regex_compile, re_match_2_internal): Mark locals as initialized.
18799 (RETALLOC_IF): Define only if needed.
18800 (WORDCHAR_P): Likewise. This one is never needed, but is used
18801 only in a comment talking about a compiler bug, so put inside
18802 the #if 0 of that comment.
18803 (CHARSET_LOOKUP_BITMAP, FAIL_STACK_FULL, RESET_FAIL_STACK):
18804 (PUSH_FAILURE_ELT, BUF_PUSH_3, STOP_ADDR_VSTRING):
18807 * search.c (boyer_moore): Rename locals to avoid shadowing.
18808 * character.h (FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE):
18809 (PREV_CHAR_BOUNDARY): Likewise.
18811 * search.c (simple_search): Remove unused var.
18813 * dired.c (compile_pattern): Move decl from here ...
18814 * lisp.h: ... to here, so that it can be checked.
18815 (struct re_registers): New forward decl.
18817 * character.h (INC_POS, DEC_POS): Rename locals to avoid shadowing.
18819 * indent.c (MULTIBYTE_BYTES_WIDTH): New args bytes, width.
18821 (MULTIBYTE_BYTES_WIDTH, scan_for_column, compute_motion):
18822 Rename locals to avoid shadowing.
18823 (Fvertical_motion): Mark locals as initialized.
18825 * casefiddle.c (casify_object, casify_region): Now static.
18826 (casify_region): Mark local as initialized.
18828 * cmds.c (internal_self_insert): Rename local to avoid shadowing.
18830 * lisp.h (GCPRO2_VAR, GCPRO3_VAR, GCPRO4_VAR, GCPRO5_VAR, GCPRO6_VAR):
18831 New macros, so that the caller can use some names other than
18832 gcpro1, gcpro2, etc.
18833 (GCPRO2, GCPRO3, GCPRO4, GCPRO5, GCPRO6): Reimplement in terms
18835 (GCPRO1_VAR, UNGCPRO_VAR): Change the meaning of the second
18836 argument, for consistency with GCPRO2_VAR, etc: it is now the
18837 prefix of the variable, not the variable itself. All uses
18839 * dired.c (directory_files_internal, file_name_completion):
18840 Rename locals to avoid shadowing.
18842 Fix a race condition diagnosed by gcc -Wsequence-point (Bug#8254).
18843 An expression of the form (DOWNCASE (x) == DOWNCASE (y)), found in
18844 dired.c's scmp function, had undefined behavior.
18845 * lisp.h (DOWNCASE_TABLE, UPCASE_TABLE, DOWNCASE, UPPERCASEP):
18846 (NOCASEP, LOWERCASEP, UPCASE, UPCASE1): Move from here ...
18847 * buffer.h: ... to here, because these macros use current_buffer,
18848 and the new implementation with inline functions needs to have
18849 current_buffer in scope now, rather than later when the macros
18851 (downcase, upcase1): New static inline functions.
18852 (DOWNCASE, UPCASE1): Reimplement using these functions.
18853 This avoids undefined behavior in expressions like
18854 DOWNCASE (x) == DOWNCASE (y), which previously suffered
18855 from race conditions in accessing the global variables
18856 case_temp1 and case_temp2.
18857 * casetab.c (case_temp1, case_temp2): Remove; no longer needed.
18858 * lisp.h (case_temp1, case_temp2): Remove their decls.
18859 * character.h (ASCII_CHAR_P): Move from here ...
18860 * lisp.h: ... to here, so that the inline functions mentioned
18861 above can use them.
18863 * dired.c (directory_files_internal_unwind): Now static.
18865 * fileio.c (file_name_as_directory, directory_file_name):
18866 (barf_or_query_if_file_exists, auto_save_error, auto_save_1):
18868 (file_name_as_directory): Use const pointers when appropriate.
18869 (Fexpand_file_name): Likewise. In particular, newdir might
18870 point at constant storage, so make it a const pointer.
18871 (Fmake_directory_internal, Fread_file_name): Remove unused vars.
18872 (Ffile_selinux_context, Fset_file_selinux_context): Fix pointer
18874 (Fset_file_times, Finsert_file_contents, auto_save_error):
18875 Rename locals to avoid shadowing.
18877 * minibuf.c (choose_minibuf_frame_1): Now static.
18878 (Ftry_completion, Fall_completions): Rename or remove locals
18879 to avoid shadowing.
18881 * marker.c (bytepos_to_charpos): Remove; unused.
18883 * lisp.h (verify_bytepos, count_markers): New decls,
18884 so that gcc does not warn that these functions aren't declared.
18886 * insdel.c (check_markers, make_gap_larger, make_gap_smaller):
18887 (reset_var_on_error, Fcombine_after_change_execute_1): Now static.
18888 (CHECK_MARKERS): Redo to avoid gcc -Wempty-body diagnostic.
18889 (copy_text): Remove unused local var.
18891 * filelock.c (within_one_second): Now static.
18892 (lock_file_1): Rename local to avoid shadowing.
18894 * buffer.c (fix_overlays_before): Mark locals as initialized.
18895 (fix_start_end_in_overlays): Likewise. This function should be
18896 simplified by using pointers-to-pointers, but that's a different
18898 (switch_to_buffer_1): Now static.
18899 (Fkill_buffer, record_buffer, Fbury_buffer, Fset_buffer_multibyte):
18900 (report_overlay_modification): Rename locals to avoid shadowing.
18902 * sysdep.c (system_process_attributes): Rename vars to avoid shadowing.
18903 Fix pointer signedness issue.
18904 (sys_subshell): Mark local as volatile if checking for lint,
18905 to suppress a gcc -Wclobbered warning that does not seem to be right.
18906 (MAXPATHLEN): Define only if needed.
18908 * process.c (serial_open, serial_configure): Move decls from here ...
18909 * systty.h: ... to here, so that they can be checked.
18911 * fns.c (get_random, seed_random): Move extern decls from here ...
18912 * lisp.h: ... to here, so that they can be checked.
18914 * sysdep.c (reset_io): Now static.
18915 (wait_for_termination_signal): Remove; unused.
18917 * keymap.c (keymap_parent, keymap_memberp, map_keymap_internal):
18918 (copy_keymap_item, append_key, push_text_char_description):
18920 (Fwhere_is_internal): Don't test CONSP (sequences) unnecessarily.
18921 (DENSE_TABLE_SIZE): Remove; unused.
18922 (get_keymap, access_keymap, Fdefine_key, Fwhere_is_internal):
18923 (describe_map_tree):
18924 Rename locals to avoid shadowing.
18926 * keyboard.c: Declare functions static if they are not used elsewhere.
18927 (echo_char, echo_dash, cmd_error, top_level_2):
18928 (poll_for_input, handle_async_input): Now static.
18929 (read_char, kbd_buffer_get_event, make_lispy_position):
18930 (make_lispy_event, make_lispy_movement, apply_modifiers):
18931 (decode_keyboard_code, tty_read_avail_input, menu_bar_items):
18932 (parse_tool_bar_item, read_key_sequence, Fread_key_sequence):
18933 (Fread_key_sequence_vector): Rename locals to avoid shadowing.
18934 (read_key_sequence, read_char): Mark locals as initialized.
18935 (Fexit_recursive_edit, Fabort_recursive_edit): Mark with NO_RETURN.
18937 * keyboard.h (make_ctrl_char): New decl.
18938 (mark_kboards): Move decl here ...
18939 * alloc.c (mark_kboards): ... from here.
18941 * lisp.h (force_auto_save_soon): New decl.
18943 * emacs.c (init_cmdargs): Rename local to avoid shadowing.
18944 (DEFINE_DUMMY_FUNCTION): New macro.
18945 (__do_global_ctors, __do_global_ctors_aux, __do_global_dtors, __main):
18947 (main): Add casts to avoid warnings
18948 if GCC considers string literals to be constants.
18950 * lisp.h (fatal_error_signal): Add decl, since it's exported.
18952 * dbusbind.c: Pointer signedness fixes.
18953 (xd_signature, xd_append_arg, xd_initialize):
18954 (Fdbus_call_method, Fdbus_call_method_asynchronously):
18955 (Fdbus_method_return_internal, Fdbus_method_error_internal):
18956 (Fdbus_send_signal, xd_read_message_1, Fdbus_register_service):
18957 (Fdbus_register_signal): Use SSDATA when the context wants char *.
18959 * dbusbind.c (Fdbus_init_bus): Add cast to avoid warning
18960 if GCC considers string literals to be constants.
18961 (Fdbus_register_service, Fdbus_register_method): Remove unused vars.
18963 2011-03-16 Stefan Monnier <monnier@iro.umontreal.ca>
18965 * print.c (PRINT_CIRCLE_CANDIDATE_P): New macro.
18966 (print_preprocess, print_object): New macro to fix last change.
18968 * print.c (print_preprocess): Don't forget font objects.
18970 2011-03-16 Juanma Barranquero <lekktu@gmail.com>
18972 * emacs.c (USAGE3): Doc fixes.
18974 2011-03-15 Andreas Schwab <schwab@linux-m68k.org>
18976 * coding.c (detect_coding_iso_2022): Reorganize code to clarify
18979 2011-03-14 Juanma Barranquero <lekktu@gmail.com>
18981 * lisp.h (VWindow_system, Qfile_name_history):
18982 * keyboard.h (lispy_function_keys) [WINDOWSNT]:
18983 * w32term.h (w32_system_caret_hwnd, w32_system_caret_height)
18984 (w32_system_caret_x, w32_system_caret_y): Declare extern.
18986 * w32select.c: Don't #include "keyboard.h".
18987 (run_protected): Add extern declaration for waiting_for_input.
18989 * w32.c (Qlocal, noninteractive1, inhibit_window_system):
18990 * w32console.c (detect_input_pending, read_input_pending)
18991 (encode_terminal_code):
18992 * w32fns.c (quit_char, lispy_function_keys, Qtooltip)
18993 (w32_system_caret_hwnd, w32_system_caret_height, w32_system_caret_x)
18994 (w32_system_caret_y, Qfile_name_history):
18995 * w32font.c (w32font_driver, QCantialias, QCotf, QClang):
18996 * w32inevt.c (reinvoke_input_signal, lispy_function_keys):
18997 * w32menu.c (Qmenu_bar, QCtoggle, QCradio, Qoverriding_local_map)
18998 (Qoverriding_terminal_local_map, Qmenu_bar_update_hook):
18999 * w32proc.c (Qlocal, report_file_error):
19000 * w32term.c (Vwindow_system, updating_frame):
19001 * w32uniscribe.c (initialized, uniscribe_font_driver):
19002 Remove unneeded extern declarations.
19004 2011-03-14 Chong Yidong <cyd@stupidchicken.com>
19006 * buffer.c (Fmake_indirect_buffer): Fix incorrect assertions.
19008 2011-03-13 Chong Yidong <cyd@stupidchicken.com>
19010 * buffer.h (BUF_BEGV, BUF_BEGV_BYTE, BUF_ZV, BUF_ZV_BYTE, BUF_PT)
19011 (BUF_PT_BYTE): Rewrite to handle indirect buffers (Bug#8219).
19012 These macros can no longer be used for assignment.
19014 * buffer.c (Fget_buffer_create, Fmake_indirect_buffer):
19015 Assign struct members directly, instead of using BUF_BEGV etc.
19016 (record_buffer_markers, fetch_buffer_markers): New functions for
19017 recording and fetching special buffer markers.
19018 (set_buffer_internal_1, set_buffer_temp): Use them.
19020 * lread.c (unreadchar): Use SET_BUF_PT_BOTH.
19022 * insdel.c (adjust_point): Use SET_BUF_PT_BOTH.
19024 * intervals.c (temp_set_point_both): Use SET_BUF_PT_BOTH.
19025 (get_local_map): Use SET_BUF_BEGV_BOTH and SET_BUF_ZV_BOTH.
19027 * xdisp.c (hscroll_window_tree):
19028 (reconsider_clip_changes): Use PT instead of BUF_PT.
19030 2011-03-13 Eli Zaretskii <eliz@gnu.org>
19032 * makefile.w32-in ($(BLD)/editfns.$(O)): Depend on
19033 $(EMACS_ROOT)/lib/intprops.h.
19035 2011-03-13 Paul Eggert <eggert@cs.ucla.edu>
19037 Fix more problems found by GCC 4.5.2's static checks.
19039 * gtkutil.c (xg_get_pixbuf_from_pixmap): Add cast from char *
19040 to unsigned char * to avoid compiler diagnostic.
19041 (xg_free_frame_widgets): Make it clear that a local variable is
19042 needed only if USE_GTK_TOOLTIP.
19043 (gdk_window_get_screen): Make it clear that this macro is needed
19044 only if USE_GTK_TOOLTIP.
19045 (int_gtk_range_get_value): New function, which avoids a diagnostic
19046 from gcc -Wbad-function-cast.
19047 (xg_set_toolkit_scroll_bar_thumb): Use it.
19048 (xg_tool_bar_callback, xg_tool_item_stale_p): Rewrite to avoid
19049 diagnostic from gcc -Wbad-function-cast.
19050 (get_utf8_string, xg_get_file_with_chooser):
19051 Rename locals to avoid shadowing.
19052 (create_dialog): Move locals to avoid shadowing.
19054 * xgselect.c (xg_select): Remove unused var.
19056 * image.c (four_corners_best): Mark locals as initialized.
19057 (gif_load): Initialize transparent_p to zero (Bug#8238).
19058 Mark another local as initialized.
19059 (my_png_error, my_error_exit): Mark with NO_RETURN.
19061 * image.c (clear_image_cache): Now static.
19062 (DIM, HAVE_STDLIB_H_1): Remove unused macros.
19063 (xpm_load): Redo to avoid "discards qualifiers" gcc warning.
19064 (x_edge_detection): Remove unnecessary cast that
19065 gcc -Wbad-function-cast diagnoses.
19066 (gif_load): Fix pointer signedness.
19067 (clear_image_cache, xbm_read_bitmap_data, x_detect_edges):
19068 (jpeg_load, gif_load): Rename locals to avoid shadowing.
19070 2011-03-12 Paul Eggert <eggert@cs.ucla.edu>
19072 Improve quality of tests for time stamp overflow.
19073 For example, without this patch (encode-time 0 0 0 1 1
19074 1152921504606846976) returns the obviously-bogus value (-948597
19075 62170) on my RHEL 5.5 x86-64 host. With the patch, it correctly
19076 reports time overflow. See
19077 <http://lists.gnu.org/archive/html/emacs-devel/2011-03/msg00470.html>.
19078 * deps.mk (editfns.o): Depend on ../lib/intprops.h.
19079 * editfns.c: Include limits.h and intprops.h.
19080 (TIME_T_MIN, TIME_T_MAX): New macros.
19081 (time_overflow): Move earlier, to before first use.
19082 (hi_time, lo_time): New functions, for an accurate test for
19083 out-of-range times.
19084 (Fcurrent_time, Fget_internal_run_time, make_time): Use them.
19085 (Fget_internal_run_time): Don't assume time_t fits in int.
19086 (make_time): Use list2 instead of Fcons twice.
19087 (Fdecode_time): More accurate test for out-of-range times.
19088 (check_tm_member): New function.
19089 (Fencode_time): Use it, to test for out-of-range times.
19090 (lisp_time_argument): Don't rely on undefined left-shift and
19091 right-shift behavior when checking for time stamp overflow.
19093 * editfns.c (time_overflow): New function, refactoring common code.
19094 (Fformat_time_string, Fdecode_time, Fencode_time):
19095 (Fcurrent_time_string): Use it.
19097 Move 'make_time' to be next to its inverse 'lisp_time_argument'.
19098 * dired.c (make_time): Move to ...
19099 * editfns.c (make_time): ... here.
19100 * systime.h: Note the move.
19102 2011-03-12 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
19104 * fringe.c (update_window_fringes): Remove unused variables.
19106 * unexmacosx.c (copy_data_segment): Also copy __got section.
19109 2011-03-12 Eli Zaretskii <eliz@gnu.org>
19111 * termcap.c [MSDOS]: Include "msdos.h".
19112 (find_capability, tgetnum, tgetflag, tgetstr, tputs, tgetent):
19113 Constify `char *' arguments and their references according to
19114 prototypes in tparam.h.
19116 * deps.mk (termcap.o): Depend on tparam.h and msdos.h.
19118 * msdos.c (XMenuAddPane): 3rd argument is `const char *' now.
19119 Adapt all references accordingly.
19121 * msdos.h (XMenuAddPane): 3rd argument is `const char *' now.
19123 2011-03-11 Tom Tromey <tromey@redhat.com>
19125 * buffer.c (syms_of_buffer): Remove obsolete comment.
19127 2011-03-11 Eli Zaretskii <eliz@gnu.org>
19129 * termhooks.h (encode_terminal_code): Declare prototype.
19131 * msdos.c (encode_terminal_code): Don't declare prototype.
19133 * term.c (encode_terminal_code): Now external again, used by
19134 w32console.c and msdos.c.
19136 * makefile.w32-in ($(BLD)/term.$(O), ($(BLD)/tparam.$(O)):
19137 Depend on $(SRC)/tparam.h, see 2011-03-11T07:24:21Z!eggert@cs.ucla.edu.
19139 2011-03-11 Paul Eggert <eggert@cs.ucla.edu>
19141 Fix some minor problems found by GCC 4.5.2's static checks.
19143 * fringe.c (update_window_fringes): Mark locals as initialized
19145 (destroy_fringe_bitmap, init_fringe_bitmap): Now static.
19147 * alloc.c (mark_fringe_data): Move decl from here ...
19148 * lisp.h (mark_fringe_data) [HAVE_WINDOW_SYSTEM]: ... to here,
19149 to check its interface.
19150 (init_fringe_once): Do not declare unless HAVE_WINDOW_SYSTEM.
19152 * fontset.c (free_realized_fontset): Now static.
19153 (Fset_fontset_font): Rename local to avoid shadowing.
19154 (fontset_font): Mark local as initialized.
19155 (FONTSET_SPEC, FONTSET_REPERTORY, RFONT_DEF_REPERTORY): Remove; unused.
19157 * xrdb.c: Include "xterm.h", to check x_load_resources's interface.
19159 * xselect.c (x_disown_buffer_selections): Remove; not used.
19160 (TRACE3) [!defined TRACE_SELECTION]: Remove; not used.
19161 (x_own_selection, Fx_disown_selection_internal): Rename locals
19162 to avoid shadowing.
19163 (x_handle_dnd_message): Remove local to avoid shadowing.
19165 * lisp.h (GCPRO1_VAR, UNGCPRO_VAR): New macros,
19166 so that the caller can use some name other than gcpro1.
19167 (GCPRO1, UNGCPRO): Reimplement in terms of the new macros.
19168 * xfns.c (Fx_create_frame, x_create_tip_frame, Fx_show_tip):
19169 (Fx_backspace_delete_keys_p):
19170 Use them to avoid shadowing, and rename vars to avoid shadowing.
19171 (x_decode_color, x_set_name, x_window): Now static.
19172 (Fx_create_frame): Add braces to silence GCC warning.
19173 (Fx_file_dialog, Fx_select_font): Fix pointer signedness.
19174 (x_real_positions, xg_set_icon_from_xpm_data, x_create_tip_frame):
19175 Remove unused locals.
19176 (Fx_create_frame, x_create_tip_frame, Fx_show_tip):
19177 (Fx_backspace_delete_keys_p): Rename locals to avoid shadowing.
19178 Some of these renamings use the new GCPRO1_VAR and UNGCPRO_VAR
19181 * xterm.h (x_mouse_leave): New decl.
19183 * xterm.c (x_copy_dpy_color, x_focus_on_frame, x_unfocus_frame):
19184 Remove unused functions.
19185 (x_shift_glyphs_for_insert, XTflash, XTring_bell):
19186 (x_calc_absolute_position): Now static.
19187 (XTread_socket): Don't define label "out" unless it's used.
19188 Don't declare local "event" unless it's used.
19189 (x_iconify_frame, x_free_frame_resources): Don't declare locals
19190 unless they are used.
19191 (XEMBED_VERSION, xembed_set_info): Don't define unless needed.
19192 (x_fatal_error_signal): Remove; not used.
19193 (x_draw_image_foreground, redo_mouse_highlight, XTmouse_position):
19194 (x_scroll_bar_report_motion, handle_one_xevent, x_draw_bar_cursor):
19195 (x_error_catcher, x_connection_closed, x_error_handler):
19196 (x_error_quitter, xembed_send_message, x_iconify_frame):
19197 (my_log_handler): Rename locals to avoid shadowing.
19198 (x_delete_glyphs, x_ins_del_lines): Mark with NO_RETURN.
19199 (x_connection_closed): Tell GCC not to suggest NO_RETURN.
19201 * xfaces.c (clear_face_cache, Fx_list_fonts, Fface_font):
19202 Rename or move locals to avoid shadowing.
19203 (tty_defined_color, merge_face_heights): Now static.
19204 (free_realized_faces_for_fontset): Remove; not used.
19205 (Fx_list_fonts): Mark variable that gcc -Wuninitialized
19206 does not deduce is never used uninitialized.
19207 (STRDUPA, LSTRDUPA, FONT_POINT_SIZE_QUANTUM): Remove; not used.
19208 (LFACEP): Define only if XASSERTS, as it's not needed otherwise.
19210 * terminal.c (store_terminal_param): Now static.
19212 * xmenu.c (menu_highlight_callback): Now static.
19213 (set_frame_menubar): Remove unused local.
19214 (xmenu_show): Rename parameter to avoid shadowing.
19215 (xmenu_show, xdialog_show, xmenu_show): Make local pointers "const"
19216 since they might point to immutable storage.
19217 (next_menubar_widget_id): Declare only if USE_X_TOOLKIT,
19218 since it's unused otherwise.
19220 * xdisp.c (produce_glyphless_glyph): Initialize lower_xoff.
19221 Add a FIXME, since the code still doesn't look right. (Bug#8215)
19222 (Fcurrent_bidi_paragraph_direction): Simplify slightly; this
19223 avoids a gcc -Wuninitialized diagnostic.
19224 (display_line, BUILD_COMPOSITE_GLYPH_STRING, draw_glyphs):
19225 (note_mouse_highlight): Mark variables that gcc -Wuninitialized
19226 does not deduce are never used uninitialized.
19228 * lisp.h (IF_LINT): New macro, copied from ../lib-src/emacsclient.c.
19230 * xdisp.c (redisplay_window): Rename local to avoid shadowing.
19231 * window.c (window_loop, size_window):
19232 (run_window_configuration_change_hook, enlarge_window): Likewise.
19234 * window.c (display_buffer): Now static.
19235 (size_window): Mark variables that gcc -Wuninitialized
19236 does not deduce are never used uninitialized.
19237 * window.h (check_all_windows): New decl, to forestall
19238 gcc -Wmissing-prototypes diagnostic.
19239 * dispextern.h (bidi_dump_cached_states): Likewise.
19241 * charset.h (CHECK_CHARSET_GET_CHARSET): Rename locals to avoid
19243 * charset.c (map_charset_for_dump, Fchar_charset): Likewise.
19244 Include <limits.h>.
19245 (Fsort_charsets): Redo min/max calculation to shorten the code a bit
19246 and to avoid gcc -Wuninitialized warning.
19247 (load_charset_map): Mark variables that gcc -Wuninitialized
19248 does not deduce are never used uninitialized.
19249 (load_charset): Abort instead of using uninitialized var (Bug#8229).
19251 * coding.c (coding_set_source, coding_set_destination):
19252 Use "else { /* comment */ }" rather than "else /* comment */;"
19253 for clarity, and to avoid gcc -Wempty-body warning.
19254 (Fdefine_coding_system_internal): Don't redeclare 'i' inside
19255 a block, when the outer 'i' will do.
19256 (decode_coding_utf_8, decode_coding_utf_16, detect_coding_emacs_mule):
19257 (emacs_mule_char, decode_coding_emacs_mule, detect_coding_iso_2022):
19258 (decode_coding_iso_2022, decode_coding_sjis, decode_coding_big5):
19259 (decode_coding_raw_text, decode_coding_charset, get_translation_table):
19260 (Fdecode_sjis_char, Fdefine_coding_system_internal):
19261 Rename locals to avoid shadowing.
19262 * character.h (FETCH_STRING_CHAR_ADVANCE): Likewise.
19263 * coding.c (emacs_mule_char, encode_invocation_designation):
19264 Now static, since they're not used elsewhere.
19265 (decode_coding_iso_2022): Add "default: abort ();" as a safety check.
19266 (decode_coding_object, encode_coding_object, detect_coding_system):
19267 (decode_coding_emacs_mule): Mark variables that gcc
19268 -Wuninitialized does not deduce are never used uninitialized.
19269 (detect_coding_iso_2022): Initialize a local variable that might
19270 be used uninitialized. Leave a FIXME because it's not clear that
19271 this initialization is needed. (Bug#8211)
19272 (ISO_CODE_LF, ISO_CODE_CR, CODING_ISO_FLAG_EUC_TW_SHIFT):
19273 (ONE_MORE_BYTE_NO_CHECK, UTF_BOM, UTF_16_INVALID_P):
19274 (SHIFT_OUT_OK, ENCODE_CONTROL_SEQUENCE_INTRODUCER):
19275 (ENCODE_DIRECTION_R2L, ENCODE_DIRECTION_L2R):
19276 Remove unused macros.
19278 * category.c (hash_get_category_set): Remove unused local var.
19279 (copy_category_table): Now static, since it's not used elsewhere.
19280 * character.c (string_count_byte8): Likewise.
19282 * ccl.c (CCL_WRITE_STRING, CCL_ENCODE_CHAR, Fccl_execute_on_string):
19283 (Fregister_code_conversion_map): Rename locals to avoid shadowing.
19285 * chartab.c (copy_sub_char_table): Now static, since it's not used
19287 (sub_char_table_ref_and_range, char_table_ref_and_range):
19288 Rename locals to avoid shadowing.
19289 (ASET_RANGE, GET_SUB_CHAR_TABLE): Remove unused macros.
19291 * bidi.c (bidi_check_type): Now static, since it's not used elsewhere.
19292 (BIDI_BOB): Remove unused macro.
19294 * cm.c (cmgoto): Mark variables that gcc -Wuninitialized does not
19295 deduce are never used uninitialized.
19296 * term.c (encode_terminal_code): Likewise.
19298 * term.c (encode_terminal_code): Now static. Remove unused local.
19300 * tparam.h: New file.
19301 * term.c, tparam.h: Include it.
19302 * deps.mk (term.o, tparam.o): Depend on tparam.h.
19303 * term.c (tputs, tgetent, tgetflag, tgetnum, tparam, tgetstr):
19304 Move these decls to tparam.h, and make them agree with what
19305 is actually in tparam.c. The previous trick of using incompatible
19306 decls in different modules does not conform to the C standard.
19307 All callers of tparam changed to use tparam's actual API.
19308 * tparam.c (tparam1, tparam, tgoto):
19309 Use const pointers where appropriate.
19311 * cm.c (calccost, cmgoto): Use const pointers where appropriate.
19312 * cm.h (struct cm): Likewise.
19313 * dispextern.h (do_line_insertion_deletion_costs): Likewise.
19314 * scroll.c (ins_del_costs, do_line_insertion_deletion_costs): Likewise.
19315 * term.c (tty_ins_del_lines, calculate_costs, struct fkey_table):
19316 (term_get_fkeys_1, append_glyphless_glyph, produce_glyphless_glyph):
19317 (turn_on_face, init_tty): Likewise.
19318 * termchar.h (struct tty_display_info): Likewise.
19320 * term.c (term_mouse_position): Rename local to avoid shadowing.
19322 * alloc.c (mark_ttys): Move decl from here ...
19323 * lisp.h (mark_ttys): ... to here, so that it's checked against defn.
19325 2011-03-11 Andreas Schwab <schwab@linux-m68k.org>
19327 * .gdbinit (pwinx, xbuffer): Fix access to buffer name.
19329 2011-03-09 Juanma Barranquero <lekktu@gmail.com>
19331 * search.c (compile_pattern_1): Remove argument regp, unused since
19332 revid:rms@gnu.org-19941211082627-3x1g1wyqkjmwloig.
19333 (compile_pattern): Don't pass it.
19335 2011-03-08 Jan Djärv <jan.h.d@swipnet.se>
19337 * xterm.h (DEFAULT_GDK_DISPLAY): New define.
19338 (GDK_WINDOW_XID, gtk_widget_get_preferred_size): New defines
19340 (GTK_WIDGET_TO_X_WIN): Use GDK_WINDOW_XID.
19342 * xmenu.c (menu_position_func): Call gtk_widget_get_preferred_size.
19344 * gtkutil.c: Include gtkx.h if HAVE_GTK3. If ! HAVE_GTK3, define
19345 gdk_window_get_screen, gdk_window_get_geometry,
19346 gdk_x11_window_lookup_for_display and GDK_KEY_g.
19347 (xg_set_screen): Use DEFAULT_GDK_DISPLAY.
19348 (xg_get_pixbuf_from_pixmap): New function.
19349 (xg_get_pixbuf_from_pix_and_mask): Change parameters from GdkPixmap
19350 to Pixmap, take frame as parameter, remove GdkColormap parameter.
19351 Call xg_get_pixbuf_from_pixmap instead of
19352 gdk_pixbuf_get_from_drawable.
19353 (xg_get_image_for_pixmap): Do not make GdkPixmaps, call
19354 xg_get_pixbuf_from_pix_and_mask with Pixmap parameters instead.
19355 (xg_check_special_colors): Use GtkStyleContext and its functions
19357 (xg_prepare_tooltip, xg_hide_tooltip): Call gdk_window_get_screen.
19358 (xg_prepare_tooltip, create_dialog, menubar_map_cb)
19359 (xg_update_frame_menubar, xg_tool_bar_detach_callback)
19360 (xg_tool_bar_attach_callback, xg_update_tool_bar_sizes):
19361 Call gtk_widget_get_preferred_size.
19362 (xg_frame_resized): gdk_window_get_geometry only takes 5
19364 (xg_win_to_widget, xg_event_is_for_menubar):
19365 Call gdk_x11_window_lookup_for_display.
19366 (xg_set_widget_bg): New function.
19367 (delete_cb): New function.
19368 (xg_create_frame_widgets): Connect delete-event to delete_cb.
19369 Call xg_set_widget_bg. Only set background pixmap for ! HAVE_GTK3
19370 (xg_set_background_color): Call xg_set_widget_bg.
19371 (xg_set_frame_icon): Call xg_get_pixbuf_from_pix_and_mask.
19372 (xg_create_scroll_bar): vadj is a GtkAdjustment for HAVE_GTK3.
19373 Only call gtk_range_set_update_policy if ! HAVE_GTK3.
19374 (xg_make_tool_item): Only connect xg_tool_bar_item_expose_callback
19376 (update_frame_tool_bar): Call gtk_widget_hide.
19377 (xg_initialize): Use GDK_KEY_g.
19379 * xsmfns.c (gdk_set_sm_client_id): Define to gdk_set_sm_client_id
19381 (x_session_initialize): Call gdk_x11_set_sm_client_id.
19383 * xterm.c (XFillRectangle): Use cairo routines for HAVE_GTK3.
19384 (x_term_init): Disable Xinput(2) with GDK_CORE_DEVICE_EVENTS.
19385 Load ~/emacs.d/gtkrc only for ! HAVE_GTK3.
19387 2011-03-08 Juanma Barranquero <lekktu@gmail.com>
19389 * w32xfns.c (select_palette): Check success of RealizePalette against
19390 GDI_ERROR, not zero.
19392 See ChangeLog.11 for earlier changes.
19394 ;; Local Variables:
19398 Copyright (C) 2011-2012 Free Software Foundation, Inc.
19400 This file is part of GNU Emacs.
19402 GNU Emacs is free software: you can redistribute it and/or modify
19403 it under the terms of the GNU General Public License as published by
19404 the Free Software Foundation, either version 3 of the License, or
19405 (at your option) any later version.
19407 GNU Emacs is distributed in the hope that it will be useful,
19408 but WITHOUT ANY WARRANTY; without even the implied warranty of
19409 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19410 GNU General Public License for more details.
19412 You should have received a copy of the GNU General Public License
19413 along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.