1 2012-11-16 enami tsugutomo <tsugutomo.enami@jp.sony.com>
3 * unexelf.c (ELFSIZE) [__NetBSD__ && _LP64]: Set to 64.
4 Needed following 2012-10-20 change. (Bug#12902)
6 2012-11-16 Glenn Morris <rgm@gnu.org>
8 * editfns.c (Fmessage): Mention message-log-max. (Bug#12849)
10 2012-11-15 Stefan Monnier <monnier@iro.umontreal.ca>
12 * eval.c (Finteractive_p): Revert lexbind-merge mishap.
14 2012-11-14 Eli Zaretskii <eliz@gnu.org>
16 * w32proc.c (timer_loop): Make sure SuspendThread and ResumeThread
17 use the same value of thread handle.
18 (start_timer_thread): If the timer thread exited (due to error),
19 clean up by closing the two handles it used. Duplicate the caller
20 thread's handle here, so it gets duplicated only once, when
21 launching the timer thread. Set priority of the timer thread, not
23 (getitimer): Don't duplicate the caller thread's handle here.
26 2012-11-13 Jan Djärv <jan.h.d@swipnet.se>
28 * nsterm.m (hold_event): Send SIGIO to make sure ns_read_socket is
31 2012-11-12 Eli Zaretskii <eliz@gnu.org>
33 * xdisp.c (decode_mode_spec): Limit the value of WIDTH argument
34 passed to pint2str and pint2hrstr to be at most the size of the
35 frame's decode_mode_spec_buffer. This avoids crashes with very
36 large values of FIELD_WIDTH argument to decode_mode_spec.
39 2012-11-07 Martin Rudalics <rudalics@gmx.at>
41 * window.c (Fsplit_window_internal): Set combination limit of
42 new parent window to t iff Vwindow_combination_limit is t;
43 fixing a regression introduced with the change from 2012-09-22.
44 (Fwindow_combination_limit, Fset_window_combination_limit):
47 2012-11-06 Eli Zaretskii <eliz@gnu.org>
49 * xdisp.c (try_scrolling): Fix correction of aggressive-scroll
50 amount when the scroll margins are too large. When scrolling
51 backwards in the buffer, give up if cannot reach point or the
52 scroll margin within a reasonable number of screen lines.
53 Fixes point position in window under scroll-up/down-aggressively when
54 point is positioned many lines beyond the window top/bottom.
57 2012-11-05 Eli Zaretskii <eliz@gnu.org>
59 * ralloc.c (relinquish): If real_morecore fails to return memory
60 to the system, don't crash; instead, leave the last heap
61 unchanged and return. (Bug#12774)
63 2012-11-03 Eli Zaretskii <eliz@gnu.org>
65 * lisp.mk: Adjust comments to the fact that term/internal is now
66 loaded from loadup.el.
68 * msdos.c (msdos_abort): Rename from emacs_abort, and make static.
69 (msdos_fatal_signal): New function.
70 (XMenuActivate): Adjust the call to kbd_buffer_events_waiting to
73 * conf_post.h (_GL_EXECINFO_INLINE) [MSDOS]: Define to "inline"
74 for GCC versions before 4.
75 (emacs_raise): Define to call msdos_fatal_signal.
77 * xdisp.c (init_from_display_pos): Fix initialization of the bidi
78 iterator when starting in the middle of a display or overlay
81 2012-11-03 Jan Djärv <jan.h.d@swipnet.se>
83 * widget.c (resize_cb): New function.
84 (EmacsFrameRealize): Add resize_cb as event handler (Bug#12733).
85 (EmacsFrameResize): Check if all is up to date before changing frame
88 2012-11-01 Eli Zaretskii <eliz@gnu.org>
90 * w32proc.c (getpgrp, setpgid): New functions. (Bug#12776)
92 2012-10-31 Paul Eggert <eggert@cs.ucla.edu>
94 Fix crash when using Emacs as commit editor for git (Bug#12697).
95 * callproc.c (setpgrp): Remove macro, as we now use setpgid
96 and it is configured in conf_post.h.
97 (Fcall_process): Don't invoke both setsid and setpgid; the former
98 is enough, if it exists.
99 * callproc.c (Fcall_process, child_setup):
100 * process.c (create_process): Use setpgid.
101 * conf_post.h (setpgid) [!HAVE_SETPGID]: New macro, which substitutes
103 * dispnew.c (init_display): Initialize the foreground group
104 if we are running a tty display.
105 * emacs.c (main): Do not worry about setpgrp; init_display does it now.
106 * lisp.h (init_foreground_group): New decl.
107 * sysdep.c (inherited_pgroup): New static var.
108 (init_foreground_group, tcsetpgrp_without_stopping)
109 (narrow_foreground_group, widen_foreground_group): New functions.
110 (init_sys_modes): Narrow foreground group.
111 (reset_sys_modes): Widen foreground group.
113 2012-10-31 Michael Albinus <michael.albinus@gmx.de>
115 * dbusbind.c: Fix cut'n'waste error. Use HAVE_DBUS_VALIDATE_INTERFACE.
117 2012-10-31 Martin Rudalics <rudalics@gmx.at>
119 * minibuf.c (read_minibuf): Restore current buffer since
120 choose_minibuf_frame calling Fset_frame_selected_window may
121 change it (Bug#12766).
123 2012-10-30 Jan Djärv <jan.h.d@swipnet.se>
125 * frame.c (Fframe_pixel_height): Fix documentation (Bug#12733).
127 2012-10-30 Kenichi Handa <handa@gnu.org>
129 * font.c (Ffont_at): If WINDOW is specified and it is not
130 displaying the current buffer, signal an error.
132 2012-10-29 Daniel Colascione <dancol@dancol.org>
134 * cygw32.h, cygw32.c (Qutf_16le, from_unicode, to_unicode):
135 In preparation for fixing bug#12739, move these functions from
138 * coding.h, coding.c: ... to here, and compile them only when
139 WINDOWSNT or CYGWIN. Moving these functions out of cygw32 proper
140 lets us write cygw32-agnostic code for the HAVE_NTGUI case.
142 2012-10-28 Eli Zaretskii <eliz@gnu.org>
144 * w32proc.c (TIMER_TICKS_PER_SEC): New macro.
145 (timer_loop, getitimer, setitimer): Use it instead of
146 CLOCKS_PER_SEC, which is no longer pertinent, since we don't use
148 (w32_get_timer_time): Use 10*TIMER_TICKS_PER_SEC instead of a
151 2012-10-28 Jan Djärv <jan.h.d@swipnet.se>
153 * nsterm.m (NO_APPDEFINED_DATA): New define.
154 (last_appdefined_event_data): New variable
155 (last_appdefined_event): Remove.
156 (ns_select): Initialize t from last_appdefined_event_data instead
157 of [last_appdefined_event data1].
158 (sendEvent:): Save [theEvent data1] to last_appdefined_event_data,
159 remove last_appdefined_event (Bug#12698).
161 2012-10-28 Stefan Monnier <monnier@iro.umontreal.ca>
163 * frame.c (x_set_font): Catch internal error.
165 2012-10-27 Eli Zaretskii <eliz@gnu.org>
167 Avoid overflow in w32 implementation of interval timers.
168 When possible, for ITIMER_PROF count only times the main thread
170 * w32proc.c <struct itimer_data>: 'expire' and 'reload' are now
171 'volatile ULONGLONG' types. All the other data which was
172 previously clock_t is now ULONGLONG. 'terminate' is 'volatile int'.
173 (GetThreadTimes_Proc): New typedef.
174 (w32_get_timer_time): New function, returns a suitable time value
176 (timer_loop): Enter critical section when accessing ULONGLONG
177 values of the itimer_data struct, as these accesses are no longer
178 atomic. Call 'w32_get_timer_time' instead of 'clock'.
179 Remove unused variable.
180 (init_timers): Initialize s_pfn_Get_Thread_Times.
181 (start_timer_thread): Don't assign itimer->caller_thread here.
182 (getitimer): Assign itimer->caller_thread here.
183 (setitimer): Always call getitimer to get the value of ticks_now.
184 (sys_spawnve): Avoid compiler warning about format mismatch.
186 2012-10-26 Eli Zaretskii <eliz@gnu.org>
188 * w32fns.c (w32_wnd_proc) <WM_MOUSEMOVE>: Don't enable tracking of
189 mouse movement events if the menu bar is active. This avoids
190 producing a busy "hour-glass" cursor by Windows if the mouse
191 pointer is positioned over a tooltip shown for some menu item.
193 2012-10-25 Paul Eggert <eggert@cs.ucla.edu>
195 Don't assume process IDs fit in int.
196 * emacs.c (shut_down_emacs) [!DOS_NT]:
197 * sysdep.c (sys_suspend) [SIGTSTP && !MSDOS]:
198 * term.c (dissociate_if_controlling_tty) [!DOS_NT]:
199 Use pid_t, not int, to store process IDs, as 'int'
200 is not wide enough on a few platforms (e.g., AIX and IRIX).
202 2012-10-23 Kenichi Handa <handa@gnu.org>
204 The following change is to make face-font-rescale-alist work
205 correctly for non-ASCII fonts.
207 * font.c (font_open_entity): Don't handle Vface_font_rescale_alist.
208 (font_open_for_lface): Handle Vface_font_rescale_alist.
210 2012-10-23 Chong Yidong <cyd@gnu.org>
212 * xfaces.c (Vfont_list_limit): Move unused variable to faces.el.
214 2012-10-21 Jan Djärv <jan.h.d@swipnet.se>
216 * nsfont.m (nsfont_open, ns_glyph_metrics): Force integer advancement
218 (nsfont_draw): Turn off LCD-smoothing (Bug#11484).
220 * xterm.c (x_focus_changed): Check if daemonp when sending focus in
223 2012-10-21 Glenn Morris <rgm@gnu.org>
225 * lisp.mk (lisp): Add cp51932.el and eucjp-ms.el.
227 2012-10-20 Paul Eggert <eggert@cs.ucla.edu>
230 * frame.c (Fmouse_position, Fmouse_pixel_position):
231 * xdisp.c (produce_stretch_glyph):
232 Declare local vars only when they're needed.
233 This is clearer and avoids a warning on OpenBSD about unused vars.
234 * frame.h (FRAME_WINDOW_P): Always evaluate its argument.
235 This is safer, and avoids OpenBSD warnings about unused vars.
236 * keyboard.c (record_menu_key): Remove unnecessary decl.
237 (poll_timer): Define only if POLL_FOR_INPUT is defined.
238 * unexelf.c (ELFSIZE) [!ElfW]: Do not define if already defined,
239 as our definition clashes with OpenBSD's.
240 * xfaces.c (load_face_colors, check_lface_attrs)
241 (get_lface_attributes_no_remap, get_lface_attributes)
242 (lface_fully_specified_p, x_supports_face_attributes_p)
243 (tty_supports_face_attributes_p, face_fontset, realize_face)
244 (realize_x_face, realize_tty_face):
245 Declare parameters to be Lisp_Object[LFACE_VECTOR_SIZE], not
246 merely Lisp_Object *. This is more informative and avoids
247 a warning on OpenBSD about accessing beyond an object's size.
249 2012-10-20 Chong Yidong <cyd@gnu.org>
251 * lread.c (Fload): Doc fix (Bug#12592).
253 2012-10-19 Kazuhiro Ito <kzhr@d1.dion.ne.jp> (tiny change)
255 * font.c (Ffont_at): Fix previous change.
257 2012-10-19 Eli Zaretskii <eliz@gnu.org>
259 * puresize.h (BASE_PURESIZE): Bump the base value to 1700000.
260 See http://lists.gnu.org/archive/html/emacs-devel/2012-10/msg00593.html
263 * alloc.c (NSTATICS): Decrease to 0x800.
265 2012-10-19 Stefan Monnier <monnier@iro.umontreal.ca>
267 * fns.c (Fnreverse): Include the problem element when signalling an
270 2012-10-18 Jan Djärv <jan.h.d@swipnet.se>
272 * nsterm.m (ns_select): Check writefds before call to
273 FD_ISSET (Bug#12668).
275 2012-10-18 Daniel Colascione <dancol@dancol.org>
277 * alloc.c (NSTATICS): Increase from 0x650 to 0x1000
278 (staticpro): If we run out of staticpro slots, die with an
279 informative error instead of just calling emacs_abort.
281 2012-10-18 Martin Rudalics <rudalics@gmx.at>
283 Fix two flaws reported by Dmitry Antipov.
284 * window.c (Ftemp_output_buffer_show): Remove.
285 (Fwindow_vscroll, Fset_window_vscroll): Use decode_live_window.
286 (syms_of_window): Remove defsubr for Stemp_output_buffer_show.
288 2012-10-17 Eli Zaretskii <eliz@gnu.org>
290 * makefile.w32-in ($(BLD)/w32.$(O)):
291 ($(BLD)/vm-limit.$(O)):
293 ($(BLD)/unexw32.$(O)):
294 ($(BLD)/fileio.$(O)):
295 ($(BLD)/dispnew.$(O)): Update dependencies.
297 * w32term.h (w32_initialize_display_info, initialize_w32_display):
300 * w32proc.c: Include ctype.h.
302 * w32.h (init_environment, check_windows_init_file)
303 (syms_of_ntproc, syms_of_ntterm, dostounix_filename)
304 (unixtodos_filename, init_winsock, srandom, random, sys_pipe)
305 (set_process_dir, sys_spawnve, register_child, sys_sleep, getwd)
306 (sys_link): Add prototypes.
308 * w32.c: Include w32select.h.
309 (sys_access, e_malloc, sys_select): Add prototypes.
310 (emacs_gnutls_pull): 'timeout' is now EMACS_TIME, not struct timeval.
312 * vm-limit.c [WINDOWSNT]: Include w32heap.h.
314 * unexw32.c: Include lisp.h and w32.h.
316 * term.c [WINDOWSNT]: Include w32term.h.
318 * process.c [WINDOWSNT]: Add prototype of sys_select.
320 * fileio.c [WINDOWSNT]: Include w32.h.
322 * dispnew.c [WINDOWSNT]: Include w32.h.
324 * cygw32.c (Fcygwin_convert_path_to_windows)
325 (Fcygwin_convert_path_from_windows): Use EQ to compare 2
326 Lisp_Object values. (Bug#12661)
328 * w32fns.c (w32_msg_pump): Use XIL instead of casting an integer
329 to Lisp_Object. (Bug#12661)
331 2012-10-17 Kenichi Handa <handa@gnu.org>
333 * xdisp.c (reseat_1): Make the information stored in it->cmp_it
336 2012-10-17 Dmitry Antipov <dmantipov@yandex.ru>
338 * buffer.c (Fkill_buffer): When unchaining the marker,
339 reset its buffer pointer to NULL (Bug#12652).
341 2012-10-17 Dmitry Antipov <dmantipov@yandex.ru>
343 Do not verify indirection counters of killed buffers (Bug#12579).
344 * buffer.h (BUFFER_CHECK_INDIRECTION): New macro.
345 * buffer.c (compact_buffer, set_buffer_internal_1): Use it.
347 2012-10-16 Dmitry Antipov <dmantipov@yandex.ru>
349 * alloc.c (Fmake_byte_code): Fix typo in comment.
350 * print.c (print_interval): Define as static to match prototype.
351 * indent.c (disptab_matches_widthtab, recompute_width_table):
354 2012-10-16 Dmitry Antipov <dmantipov@yandex.ru>
356 * editfns.c (get_system_name): Remove.
357 * lisp.h (get_system_name): Remove prototype.
358 * xrdb.c (getenv, getpwuid, getpwnam): Remove prototypes.
359 (get_environ_db): Use Vsystem_name. Avoid call to strlen.
361 2012-10-15 Daniel Colascione <dancol@dancol.org>
363 * dbusbind.c: Add comment explaining reason for previous change.
365 2012-10-15 Martin Rudalics <rudalics@gmx.at>
367 * window.c (Fwindow_end): Rewrite check whether cached position
368 can be used (Bug#12600).
369 (resize_frame_windows, grow_mini_window, shrink_mini_window):
370 Set windows_or_buffers_changed.
372 2012-10-15 Daniel Colascione <dancol@dancol.org>
374 * dbusbind.c: Fix cygw32 build break when compiling with dbus
375 enabled by undefining the symbol "interface", which the platform
376 headers define to something incompatible.
378 2012-10-14 Daniel Colascione <dancol@dancol.org>
380 * image.c (init_tiff_functions, init_imagemagick_functions)
381 (init_svg_functions): Fix cygw32 build break by using these
382 functions only when WINDOWSNT _and_ HAVE_NTGUI.
384 2012-10-14 Jan Djärv <jan.h.d@swipnet.se>
386 * nsterm.m (ns_select): Count fd:s in writefs also (Bug#12422).
388 2012-10-13 Jan Djärv <jan.h.d@swipnet.se>
390 * gtkutil.c (xg_set_widget_bg): Divide by 65535 (Bug#12612).
392 2012-10-13 HANATAKA, Shinya <bogytech@gmail.com> (tiny change)
394 * coding.c (detect_coding): Set coding->id before calling
397 2012-10-13 Andreas Schwab <schwab@linux-m68k.org>
399 * fileio.c: Formatting fixes.
401 2012-10-13 Paul Eggert <eggert@cs.ucla.edu>
403 Fix some stat-related races.
404 * fileio.c (Fwrite_region): Avoid race condition if a file is
405 removed or renamed by some other process immediately after Emacs
406 writes it but before Emacs stats it. Do not assume that stat (or
408 * image.c (slurp_file): Resolve the file name with fopen + fstat
409 rather than stat + fopen.
410 (pbm_read_file) [0]: Remove unused code with stat race.
411 * process.c (allocate_pty) [HAVE_PTYS && !PTY_ITERATION && !PTY_OPEN]:
412 Remove ineffective code with stat race.
414 2012-10-12 Stefan Monnier <monnier@iro.umontreal.ca>
416 * doc.c (get_doc_string): Don't signal an error if the file is missing.
418 2012-10-12 Jan Djärv <jan.h.d@swipnet.se>
420 * nsterm.m (hold_event_q): New static variable.
421 (EV_TRAILER, sendScrollEventAtLoc:fromEvent:): Call hold_event if
423 (hold_event): New function.
424 (ns_read_socket): If hold_event_q have events, store them and
426 (setPosition:portion:whole:): Send SIGIO to ourselves if apploopnr
429 2012-10-12 Juanma Barranquero <lekktu@gmail.com>
431 * makefile.w32-in ($(BLD)/w32select.$(O)): Update dependencies.
433 2012-10-12 Eli Zaretskii <eliz@gnu.org>
435 * makefile.w32-in ($(BLD)/fileio.$(O)): Add sys/file.h.
437 * fileio.c (check_existing): New function.
438 (make_temp_name, Ffile_exists_p, Ffile_writable_p): Call it
439 instead of calling 'stat', when what's needed is to check whether
440 a file exists. This avoids expensive system calls on MS-Windows.
443 * w32.c (init_environment): Call 'check_existing' instead of 'stat'.
445 * lread.c (openp) [WINDOWSNT]: Call 'access' instead of 'stat' to
446 determine whether a file exists and is not a directory.
448 * lisp.h (check_existing): Add prototype.
450 2012-10-12 Jan Djärv <jan.h.d@swipnet.se>
452 * nsfont.m (nsfont_open): Remove font cache, it is not GC correct.
454 2012-10-12 Glenn Morris <rgm@gnu.org>
456 * buffer.c (Fset_buffer): Doc fix. (Bug#12624)
458 2012-10-11 Stefan Monnier <monnier@iro.umontreal.ca>
460 * buffer.c (Fkill_buffer): Null out the overlay list(s) as well.
462 * eval.c (Fautoload): Remember previous autoload status in load-history.
464 2012-10-11 Paul Eggert <eggert@cs.ucla.edu>
466 lread.c, macros.c, marker.c, menu.c, minibuf.c: Use bool for booleans.
467 * lread.c (load_each_byte, new_backquote_flag, readchar)
468 (read_filtered_event, lisp_file_lexically_bound_p)
469 (safe_to_load_version, Fload, complete_filename_p, openp)
470 (build_load_history, readevalloop, read_escape, read1)
471 (string_to_number, read_vector, read_list):
472 * macros.c (Fstart_kbd_macro):
473 * marker.c (CONSIDER):
474 * menu.c (parse_single_submenu, digest_single_submenu)
475 (find_and_return_menu_selection, Fx_popup_menu):
476 * minibuf.c (read_minibuf_noninteractive, read_minibuf)
478 * nsmenu.m (ns_update_menubar, runMenuAt:forFrame:keymaps:):
480 * xmenu.c (set_frame_menubar, create_and_show_popup_menu)
481 (xmenu_show, xdialog_show):
482 Use bool for booleans.
483 * lread.c (safe_to_load_version): Rename from safe_to_load_p,
484 as it's not a predicate. All uses changed. Omit unnecessary
487 2012-10-11 Dmitry Antipov <dmantipov@yandex.ru>
489 * editfns.c (save_excursion_save): Use nil if mark points to nowhere.
490 (save_excursion_restore): Do not restore mark if it was not saved.
492 2012-10-11 Paul Eggert <eggert@cs.ucla.edu>
494 * marker.c (cached_modiff): EMACS_INT, not int.
496 * w32select.c (waiting_for_input): Declare by including "keyboard.h"
497 instead of having a wrong decl.
498 * nsmenu.m (waiting_for_input): Remove wrong decl.
500 2012-10-10 Paul Eggert <eggert@cs.ucla.edu>
502 keyboard.c, keymap.c: Use bool for booleans.
503 * dispnew.c (sit_for): Distinguish between 3-way display_option
504 and boolean do_display.
505 * keyboard.c (single_kboard, this_command_key_count_reset)
506 (waiting_for_input, echoing, immediate_quit, input_pending)
507 (interrupt_input, interrupts_deferred, pop_kboard)
508 (temporarily_switch_to_single_kboard, ignore_mouse_drag_p)
509 (command_loop_1, adjust_point_for_property)
510 (safe_run_hooks_error, input_polling_used, read_char):
511 (help_char_p, readable_events, kbd_buffer_events_waiting)
512 (kbd_buffer_get_event, timer_check_2, make_lispy_event)
513 (lucid_event_type_list_p, get_input_pending):
514 (gobble_input, menu_separator_name_p, menu_bar_item)
515 (parse_menu_item, parse_tool_bar_item, read_char_x_menu_prompt)
516 (read_char_minibuf_menu_prompt, access_keymap_keyremap)
517 (keyremap_step, test_undefined, read_key_sequence)
518 (detect_input_pending, detect_input_pending_ignore_squeezables)
519 (detect_input_pending_run_timers, requeued_events_pending_p)
520 (quit_throw_to_read_char, Fset_input_interrupt_mode):
521 * keymap.c (get_keymap, keymap_parent, keymap_memberp)
522 (access_keymap_1, access_keymap, map_keymap, get_keyelt)
523 (Fdefine_key, Flookup_key, struct accessible_keymaps_data)
524 (accessible_keymaps_1, Fkey_description, push_key_description):
525 (shadow_lookup, struct where_is_internal_data)
526 (where_is_internal, Fwhere_is_internal, where_is_internal_1)
527 (Fdescribe_buffer_bindings, describe_map_tree, struct describe_map_elt)
528 (describe_map, describe_vector):
529 * menu.c (single_menu_item):
530 * nsmenu.m (ns_update_menubar):
531 * process.c (wait_reading_process_output):
532 * search.c (scan_buffer, scan_newline):
533 Use bool for boolean.
534 * keyboard.c (timers_run, swallow_events)
535 (detect_input_pending_run_timers):
536 * process.c (wait_reading_process_output):
537 Use unsigned for counter where wraparound-on-overflow is desired,
538 since unsigned is guaranteed to have that behavior and signed is not.
539 (read_char): Use ptrdiff_t for string length.
540 (get_input_pending): Remove first argument, since it was always
541 the same pointer-to-int (now pointer-to-boolean) &input_pending,
542 and behave as if it had that value. Return new value of
543 input_pending. All callers changed.
544 * keyboard.h (struct kboard): Use unsigned : 1 for boolean member
545 immediate_echo. Use ptrdiff_t for echo_after_prompt, since it's
547 * keymap.c (push_key_description): Omit last arg, which was always 1.
550 * regex.c (immediate_quit) [emacs]: Remove duplicate decl.
552 2012-10-10 Juanma Barranquero <lekktu@gmail.com>
554 * makefile.w32-in ($(BLD)/dispnew.$(O), $(BLD)/indent.$(O))
555 ($(BLD)/term.$(O)): Update dependencies.
557 2012-10-10 Dmitry Antipov <dmantipov@yandex.ru>
559 * alloc.c (mark_object): Use meaningful PVEC_NORMAL_VECTOR.
560 * lisp.h (enum pvec_type): Adjust comments and omit explicit
561 initializer for PVEC_NORMAL_VECTOR.
563 2012-10-10 Paul Eggert <eggert@cs.ucla.edu>
565 Clean out old termopts cruft.
566 * termopts.h (flow_control, meta_key): Remove unused decls.
567 * dispnew.c, indent.c, nsterm.m, term.c, xsettings.c, xsmfns.c:
568 Don't include termopts.h.
570 2012-10-10 Dmitry Antipov <dmantipov@yandex.ru>
572 * alloc.c (gc_sweep): Use pointer-to-a-pointer loop for buffers.
574 2012-10-10 Paul Eggert <eggert@cs.ucla.edu>
576 * commands.h (immediate_quit): Remove duplicate decl.
578 2012-10-09 Jan Djärv <jan.h.d@swipnet.se>
580 * nsfont.m (Vfonts_in_cache): Remove, not needed as font.c handles
582 (nsfont_open): Remove setting of Vfonts_in_cache.
583 (syms_of_nsfont): Remove initialization of Vfonts_in_cache.
585 2012-10-09 Eli Zaretskii <eliz@gnu.org>
587 * w32fns.c (w32_last_error): Change the return value to DWORD, to
588 match what GetLastError returns. Explain why the function is
591 * frame.c (delete_frame): Rename local variable 'tooltip_frame' to
592 'is_tooltip_frame', to avoid confusion with its global namesake.
594 2012-10-08 Daniel Colascione <dancol@dancol.org>
596 * xdisp.c (start_hourglass): Call w32_note_current_window when
597 HAVE_NTGUI, not just WINDOWSNT, resolving a problem in the cygw32
598 build that caused Emacs to display the hourglass cursor forever.
600 * w32fns.c (Fx_display_color_cells): Instead of using NCOLORS,
601 which is broken under remote desktop, calculate the number of
602 colors available for a display based on the display's number of
603 planes and number of bits per pixel per plane. (bug#10397).
605 2012-10-08 Jan Djärv <jan.h.d@swipnet.se>
607 * nsfont.m (Vfonts_in_cache): New variable.
608 (nsfont_open): Use unsignedLongLongValue for cache in case wide ints
609 are used. Add cached fonts to Vfonts_in_cache.
610 (syms_of_nsfont): Initialize and staticpro Vfonts_in_cache.
612 2012-10-08 Juanma Barranquero <lekktu@gmail.com>
614 * makefile.w32-in (LOCAL_FLAGS): Don't define HAVE_NTGUI, it's now
616 (FONT_H): Define after FRAME_H.
617 ($(BLD)/emacs.$(O), $(BLD)/process.$(O), $(BLD)/w32heap.$(O)):
620 * w32term.c: Remove leftover declaration of keyboard_codepage.
622 2012-10-08 Eli Zaretskii <eliz@gnu.org>
624 * makefile.w32-in (FONT_H): Add $(FRAME_H).
625 (W32TERM_H): Add $(ATIMER_H) and $(FRAME_H).
626 ($(BLD)/emacs.$(O), $(BLD)/w32console.$(O)): Update dependencies.
627 (GLOBAL_SOURCES): Add cygw32.c.
628 ($(BLD)/unexw32.$(O)):
630 ($(BLD)/w32console.$(O)):
631 ($(BLD)/w32fns.$(O)):
632 ($(BLD)/w32heap.$(O)):
633 ($(BLD)/w32menu.$(O)):
634 ($(BLD)/w32proc.$(O)): Add w32common.h.
636 * w32fns.c (w32_color_map_lookup, x_to_w32_color): Argument is now
638 (x_to_w32_color): Don't modify the argument, modify a copy instead.
640 2012-10-08 Daniel Colascione <dancol@dancol.org>
642 * w32term.h (WM_EMACS_BRINGTOTOP, WM_EMACS_INPUT_READY)
643 (WM_EMACS_END): Change WM_EMACS_BRINGTOTOP from 22 to 21 to close
644 accidental message numbering hole. Change other messages to
647 * w32select.h (HAVE_W32SELECT): Remove.
649 * w32select.c, w32proc.c, w32menu.c, w32console.c, w32.c: Include
650 w32common.h instead of w32heap.h.
652 * w32heap.h (ROUND_UP, ROUND_DOWN, get_page_size)
653 (get_allocation_unit, get_processor_type, get_w32_major_version)
654 (get_w32_minor_version, sysinfo_cache, osinfo_cache)
655 (w32_major_version, w32_minor_version, w32_build_number, OS_9X)
656 (OS_NT, os_subtype, cache_system_info): Move declarations to
659 * w32heap.c: Include w32common.h.
660 (sysinfo_cache, syspage_mask, osinfo_cache, w32_major_version)
661 (w32_minor_version, w32_build_number, w32_subtype):
662 Remove duplicate definitions.
664 * w32fns.c: Include w32common.h; include w32heap.h only in
667 (Fx_file_dialog): Clarify comment on GetOpenFileName structure.
668 Use `report_file_error' instead of `error' in order to better
669 inform users of what went wrong. Increase NTGUI_UNICODE file
670 dialog box file name length to 32k, the maximum allowed by the NT
673 * w32common.h: New file.
674 (ROUND_UP, ROUND_DOWN, get_page_size)
675 (get_allocation_unit, get_processor_type, get_w32_major_version)
676 (get_w32_minor_version, sysinfo_cache, osinfo_cache)
677 (w32_major_version, w32_minor_version, w32_build_number, OS_9X)
678 (OS_NT, os_subtype, cache_system_info): Move here.
680 * unexw32.c, unexcw.c: Include w32common.h.
682 * emacs.c (main): Use (defined (WINDOWSNT) || defined
683 HAVE_NTGUI) instead of removed HAVE_W32SELECT to decide whether
684 to call syms_of_w32select.
686 * cygw32.h: Remove obsolete EXFUN declarations.
688 * cygw32.c (Qutf_16_le): Rename to Qutf_16le.
690 * Makefile.in (SOME_MACHINE_OBJECTS): Reverse accidental removal
691 of w32inevt.o from SOME_MACHINE_OBJECTS.
693 2012-10-08 Daniel Colascione <dancol@dancol.org>
695 * image.c: Permanent fix for JPEG compilation issue --- limit
696 jpeglib `boolean' redefinition to Cygwin builds.
698 2012-10-08 Eli Zaretskii <eliz@gnu.org>
700 * image.c (CHECK_LIB_AVAILABLE): Remove, no longer used.
702 * emacs.c (DAEMON_MUST_EXEC) [HAVE_NTGUI]: Define this only on
705 2012-10-08 Daniel Colascione <dancol@dancol.org>
707 * xfaces.c, xdisp.c, window.c, w32xfns.c, w32term.h, w32term.c,
708 w32select.h w32select.c, w32proc.c, w32menu.c, w32inevt.c,
709 w32help.c, w32font.c, w32font.c, w32fns.c, w32console.c, w32.h,
710 w32.c, unexw32.c, termhooks.h, process.c, menu.c, keyboard.h,
711 keyboard.c, image.c, frame.h, frame.c, fontset.c, font.h, font.c,
712 emacs.c, dispextern.h, cygw32.h, cygw32.c, conf_post.h,
713 Makefile.in: use HAVE_NTGUI for W32 GUI and WINDOWSNT for the
714 operating system. defined(HAVE_NTGUI) && !defined(WINDOWSNT) is
715 now a supported configuration.
717 * Makefile.in: consolidate image variables into LIBIMAGE; add
718 W32_OBJ and W32_LIBS. Compile new files.
721 (_DebPrint) declare tracing facility for W32 debugging. We need
722 to unify tracing later.
724 (NTGUI_UNICODE) Define when compiling for Cygwin to allow the
725 unconditional use of W32 Unicode functions. Cygwin runs only on
726 100% Unicode operating systems.
728 * cygw32.c: New file. Define Cygwin-specific facilities.
729 (Fcygwin_convert_path_to_windows)
730 (Fcygwin_convert_path_from_windows): New user functions for
731 accessing Cygwin path-munging routines.
733 * cygw32.h: New file.
734 (WCSDATA, to_unicode, from_unicode): Define facilities for storing
735 UTF-16LE strings temporarily inside non-Lisp-visible string
738 (w32_strerror): Just what it says on the tin.
740 * emacs.c: Make the NS fork-then-exec code for daemon-launching
741 also run for Cygwin; both systems have the same problem with using
742 GUI facilities in a forked child. Also call syms_of_cygw32,
743 syms_of_w32select in correct places.
745 (DAEMON_MUST_EXEC): new macro defined to signal that a platform
746 needs fork-then-exec for daemon launching.
748 * font.h: Include frame.h.
750 * image.c: Use the image library cache machinery only when we're
751 compiling for native WINDOWSNT; Cygwin can use shared libraries
752 like any other Unixlike system.
754 * keyboard.c: Clarify a comment regarding the input loop.
756 * menu.c: When NTGUI_UNICODE is defined, use Unicode menu
757 functions directly instead of trying to detect at runtime that our
758 host operating system supports them. We make this change for two
759 reasons: Cygwin lacks support for the multibyte character
760 conversion functions used by the legacy menu code, and Cygwin
761 never needs to rely on non-Unicode APIs.
763 * unexw32.c (hinst): Declare extern.
765 * w32.c: Change header order;
766 (w32_strerror): Move to w32fns.c because we need it for
767 non-WINDOWSNT builds.
769 * w32.h: Add #error macro to make sure we don't include w32.h for
770 Cygwin builds. Remove w32select declarations.
772 * w32console.c (w32_sys_ring_bell, Fset_message_beep): Move to
773 w32fns.c. w32console.c is WINDOWSNT-only.
775 * w32fns.c: Include cygw32.h or w32.h depending on CYGWIN; more
776 NTGUI_UNICODE tweaks. (See above.) Change _snprintf to the more
778 (faked_key, sysinfo_cache, osinfo_cahce, syspage_mask)
779 (w32_major_version, w32_minor_version, w32_build_number)
780 (os_subtype, sound_type): Define here
781 (w32_defined_color): Make color parameter const for consistency
782 with other _defined_color functions.
783 (w32_createwindow): Unconditionally call w32_init_class instead of
784 doing so only when hprevinst is non-NULL. Plumbing hprevinst
785 through the code is complex and unnecessary because class
786 registration is practically free.
787 (w32_name_of_message): New EMACSDEBUG-only function.
788 (Fset_message_beep): Move here
789 (Fx_open_connection): Require that the display name for Windows be
790 "w32" for consistency, emacsclient disambiguation, and maybe, one
791 day, multi-window-system support.
792 (file_dialog_callback): NTGUI_UNICODE changes; encode and decode
793 Cygwin files for W32 GUI facilities, since these clearly don't
796 (w32_strerror, w32_console_toggle_lock_key, w32_kbd_mods_to_emacs)
797 (w32_kbd_patch_key, w32_sys_ring_bell): Move here.
798 (Ssystem_move_file_to_trash): Define only for native WINDOWSNT.
799 (w32_last_error): Remove.
801 * w32font.c: Define _strlwr to strlwr for non-WINDOWSNT builds.
803 * w32heap.c (syspage_mask): Declare here.
804 (cache_system_info): Remove.
806 * w32inevt.c (faked_key): Define globally, not statically.
807 (w32_kbd_mods_to_emacs, w32_kbd_patch_key, faked_key)
808 (w32_console_toggle_lock_key): Move to w32fns.c.
810 * w32menu.c: Include setjmp.h. NTGUI_UNICODE changes throughout.
812 * w32proc.c (_DebPrint): Move to w32fns.c.
813 * w32select.c: Include string.h, stdio.h for Cygwin.
814 * w32select.h: New File.
816 * w32term.c: Include io.h for non-CYGWIN builds; needed for
818 (w32_message_fd): New variable. Under Cygwin, holds the file
819 descriptor the system used to tell us about pending thread
822 (w32_init_term): Remove incorrect calls to fcntl and init_sigio
823 that prevented compilation under non-WINDOWSNT systems.
825 (w32_initialize): Open /dev/windows and assign it to
826 w32_message_fd. Provide w32 feature.
828 * w32term.h: Include frame.h, atimer.h. Declare various frame functions.
829 (WM_EMACS_INPUT_READY): add.
830 (prepend_msg, w32_message_fd): Declare globally.
833 (keyboard_handle): Use only when WINDOWSNT.
834 (notify_msg_ready): New function. Posts a message to the main
835 thread's message queue under CYGWIN, which wakes up the main
836 thread from select(2) by making the /dev/windows file descriptor
837 ready. Under WINDOWSNT, it sets an event the same way the old
840 (post, prepend_msg): Actually call notify_msg_ready instead of
841 setting the input event directly.
843 2012-10-07 Eli Zaretskii <eliz@gnu.org>
845 * ralloc.c (relinquish): If a heap is ready to be relinquished,
846 but it still has blocs in it, don't return it to the system,
847 instead of aborting. (Bug#12402)
849 2012-10-07 Jan Djärv <jan.h.d@swipnet.se>
851 * nsterm.m (ns_dumpglyphs_image): Only draw slice of image (Bug#12506).
853 * nsterm.m (ns_update_auto_hide_menu_bar): Remove defintion of
854 MAC_OS_X_VERSION_10_6.
855 (syms_of_nsterm): Remove comment about Panther and above for
857 * nsterm.h (MAC_OS_X_VERSION_10_3, onTiger): Remove.
858 (EmacsApp): Remove check for >= MAC_OS_X_VERSION_10_4.
859 (struct nsfont_info): Remove check for >= MAC_OS_X_VERSION_10_3.
861 * nsselect.m (ns_string_from_pasteboard): Remove check for >=
862 MAC_OS_X_VERSION_10_4.
864 * nsmenu.m (fillWithWidgetValue:): Remove code for <
865 MAC_OS_X_VERSION_10_2.
867 * nsimage.m (setPixmapData, getPixelAtX, setAlphaAtX): Remove onTiger.
869 * nsfns.m (Fns_list_services): Remove comment and check for OSX < 10.4.
870 (ns_do_applescript): Remove check for >= MAC_OS_X_VERSION_10_4.
872 * nsterm.m (ns_in_resize): Remove (Bug#12479).
873 (ns_resize_handle_rect, mouseDown, mouseUp, mouseDragged): Remove.
874 (ns_clear_frame, sendEvent, windowDidResize, drawRect:):
875 Remove ns_in_resize check.
876 (ns_clear_frame_area): Remove resize handle code.
878 * nsfns.m (ns_in_resize): Remove.
879 (x_set_icon_name, ns_set_name, ns_set_name_as_filename):
880 Remove ns_in_resize check.
882 2012-10-07 Paul Eggert <eggert@cs.ucla.edu>
884 Improve sys_siglist detection.
885 * sysdep.c (sys_siglist, init_signals): Use _sys_siglist if it's
886 defined as a macro, as is done in Solaris.
887 (sys_siglist_entries): New macro.
888 (save_strsignal): Use it.
889 * syssignal.h (safe_strsignal): Now ATTRIBUTE_CONST, to pacify
890 GCC 4.7.2 on Fedora 17 with the fixed sys_siglist detection.
892 2012-10-06 Jan Djärv <jan.h.d@swipnet.se>
894 * nsfns.m (Fx_create_frame): Call x_default_parameter with
895 fullscreen/Fullscreen.
897 * nsterm.h (EmacsView): Rename tbar_height to tibar_height.
900 * nsterm.m (x_make_frame_visible): Check for fullscreen.
901 (ns_fullscreen_hook): Activate old style fullscreen with a timer.
902 (ns_term_init): Set activateIgnoringOtherApps if old style fullscreen.
903 (windowDidResize:): Check for correct window if old style fullscreen.
904 Capitalize word in comment. Remove incorrect comment.
905 (initFrameFromEmacs:): tbar_height renamed tibar_height.
906 (windowDidEnterFullScreen:): Toggle toolbar for fullscreen to fix
907 error in drawing background.
908 (toggleFullScreen:): Remove comment. Rearrange calls.
909 Set toolbar values to zero, save old height in tobar_height.
910 Restore tool bar height when leaving fullscreen.
911 (canBecomeMainWindow): New function.
913 2012-10-06 Paul Eggert <eggert@cs.ucla.edu>
915 * keyboard.c (read_char): Remove unnecessary 'volatile's and label.
917 2012-10-05 Eli Zaretskii <eliz@gnu.org>
919 * w32proc.c (stop_timer_thread): Fix declaration of 'err'.
921 * w32.c (utime): Open the file with FILE_FLAG_BACKUP_SEMANTICS, so
922 that time stamps of directories could also be changed.
923 Don't request the too broad GENERIC_WRITE, only the more restrictive
924 FILE_WRITE_ATTRIBUTES access rights.
926 * fileio.c (Fset_file_times): Special-case ignoring errors for
927 directories only on MSDOS, not on MS-Windows.
929 2012-10-05 Ikumi Keita <ikumi@ikumi.que.jp> (tiny change)
931 * minibuf.c (Fcompleting_read): Doc fix. (Bug#12555)
933 2012-10-04 Eli Zaretskii <eliz@gnu.org>
935 * w32.c (utime): Test for INVALID_HANDLE_VALUE, not for NULL, to
936 see whether CreateFile failed.
938 2012-10-04 Paul Eggert <eggert@cs.ucla.edu>
940 * profiler.c (handle_profiler_signal): Inhibit pending signals too,
941 to avoid similar races.
942 * keyboard.c (pending_signals): Now bool, not int.
944 Port timers to OpenBSD, plus check for timer failures.
945 OpenBSD problem reported by Han Boetes.
946 * profiler.c (setup_cpu_timer): Check for failure of timer_settime
948 (Fprofiler_cpu_stop): Don't assume HAVE_SETITIMER.
949 * syssignal.h (HAVE_ITIMERSPEC): New macro. This is for platforms
950 like OpenBSD, which has timer_settime but does not declare it.
951 OpenBSD does not define SIGEV_SIGNAL, so use that when deciding
952 whether to use itimerspec-related primitives. All uses of
953 HAVE_TIMER_SETTIME replaced with HAVE_ITIMERSPEC.
955 2012-10-02 Paul Eggert <eggert@cs.ucla.edu>
957 * profiler.c (handle_profiler_signal): Fix a malloc race
958 that caused Emacs to hang on Fedora 17 when profiling Lisp.
960 2012-10-02 Jan Djärv <jan.h.d@swipnet.se>
962 * nsterm.m (windowDidEnterFullScreen): Remove fprintf.
964 2012-10-02 Eli Zaretskii <eliz@gnu.org>
966 * w32proc.c (sys_wait): Declare 'signame' 'const char *', to be
967 consistent with the change in return value of 'safe_strsignal'.
969 2012-10-02 Paul Eggert <eggert@cs.ucla.edu>
971 Prefer plain 'static' to 'static inline' (Bug#12541).
972 * bidi.c (bidi_get_type, bidi_check_type, bidi_get_category)
973 (bidi_set_sor_type, bidi_push_embedding_level)
974 (bidi_pop_embedding_level, bidi_remember_char, bidi_copy_it)
975 (bidi_cache_reset, bidi_cache_shrink, bidi_cache_fetch_state)
976 (bidi_cache_search, bidi_cache_ensure_space)
977 (bidi_cache_iterator_state, bidi_cache_find)
978 (bidi_peek_at_next_level, bidi_set_paragraph_end)
979 (bidi_count_bytes, bidi_char_at_pos, bidi_fetch_char)
980 (bidi_explicit_dir_char, bidi_resolve_neutral_1):
981 Now 'static', not 'static inline'.
983 Count overruns when profiling; change units to ns.
984 * profiler.c (handle_profiler_signal): Count sampling intervals, not ms.
985 Give extra weight to samples after overruns, to attempt to count
986 the time more accurately.
987 (setup_cpu_timer): Change sampling interval units from ms to ns, since
988 the underlying primitives nominally do ns.
989 (Fprofiler_cpu_start): Document the change. Mention that
990 the sampling intervals are only approximate.
992 2012-10-02 Stefan Monnier <monnier@iro.umontreal.ca>
994 * frame.c (Fmake_terminal_frame): Prefer safer CONSP over !NILP.
996 * coding.h (ENCODE_FILE, DECODE_FILE, DECODE_SYSTEM): Remove special
997 case for the special 0 coding-system.
999 * buffer.c (Fset_buffer_multibyte): Signal an error instead of widening.
1000 (Fmake_overlay): Remove redundant tests.
1001 (fix_start_end_in_overlays): Remove redundant recentering.
1003 2012-10-02 Juanma Barranquero <lekktu@gmail.com>
1005 * makefile.w32-in ($(BLD)/alloc.$(O), $(BLD)/gmalloc.$(O)):
1006 Update dependencies.
1008 2012-10-01 Paul Eggert <eggert@cs.ucla.edu>
1010 Fix a malloc race condition involving strsignal.
1011 A signal can arrive in the middle of a malloc, and Emacs's signal
1012 handler can invoke strsignal, which can invoke malloc, which is
1013 not portable. This race condition bug makes Emacs hang on GNU/Linux.
1014 Fix it by altering the signal handler so that it does not invoke
1016 * emacs.c (shut_down_emacs): Use safe_strsignal, not strsignal.
1017 * process.c (status_message): Use const pointer, in case strsignal
1018 is #defined to safe_strsignal.
1019 * sysdep.c (sys_siglist, init_signals): Always define and
1020 initialize a substitute sys_siglist if the system does not define
1021 one, even if HAVE_STRSIGNAL.
1022 (safe_strsignal): Rename from strsignal. Always define,
1023 using sys_siglist. Return a const pointer.
1024 * syssignal.h (safe_strsignal): New decl.
1025 (strsignal) [!HAVE_STRSIGNAL]: Define in terms of safe_strsignal.
1027 2012-10-01 Eli Zaretskii <eliz@gnu.org>
1029 * w32proc.c (timer_loop): Fix code that waits for timer
1030 expiration, to avoid high CPU usage.
1032 2012-10-01 Stefan Monnier <monnier@iro.umontreal.ca>
1034 * fns.c (check_hash_table, get_key_arg, maybe_resize_hash_table)
1035 (sweep_weak_table): Remove redundant prototypes.
1037 2012-10-01 Fabrice Popineau <fabrice.popineau@gmail.com>
1039 * emacs.c: Move the inclusion of TERM_HEADER after including
1040 windows.h on WINDOWSNT. This avoids compilation problems with
1043 2012-10-01 Eli Zaretskii <eliz@gnu.org>
1045 * unexw32.c (OFFSET_TO_RVA, RVA_TO_OFFSET)
1046 (RVA_TO_SECTION_OFFSET): Encode all macro arguments in parentheses.
1047 (RVA_TO_PTR): Cast the result of RVA_TO_OFFSET to 'unsigned char *',
1048 as the previous version used 'void *'.
1050 * ralloc.c (ROUNDUP): Fix last change.
1051 (MEM_ROUNDUP): Don't cast MEM_ALIGN, it is already of type
1054 * w32proc.c <disable_itimers>: New static flag.
1055 (init_timers): Initialize it to zero, after creating the critical
1056 sections used by the timer threads.
1057 (term_timers): Set to 1 before deleting the critical sections.
1058 (getitimer, setitimer): If disable_itimers is non-zero, return an
1059 error indication without doing anything. Reported by Fabrice
1060 Popineau <fabrice.popineau@supelec.fr> as part of bug#12544.
1061 (alarm) [HAVE_SETITIMER]: Be more conformant to the expected
1063 [!HAVE_SETITIMER]: Behave as the previous version that didn't
1066 * emacs.c (shut_down_emacs) [WINDOWSNT]: Move the call to
1067 term_ntproc after all the other bookkeeping, to get timers working
1068 as long as possible.
1070 2012-10-01 Paul Eggert <eggert@cs.ucla.edu>
1072 * xdisp.c (syms_of_xdisp): Default message-log-max to 1000, not 100.
1073 Suggested by Juri Linkov in
1074 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00821.html>.
1076 Prefer plain 'static' to 'static inline' (Bug#12541).
1077 With static functions, modern compilers inline pretty well by
1078 themselves; advice from programmers often hurts as much as it helps.
1079 On my host (x86-64, Fedora 17, GCC 4.7.2, default 'configure'),
1080 this change shrinks the text size of the Emacs executable by 1.1%
1081 without affecting CPU significantly in my benchmark.
1082 * alloc.c (mem_find, live_string_p, live_cons_p, live_symbol_p)
1083 (live_float_p, live_misc_p, live_vector_p, live_buffer_p)
1084 (mark_maybe_object, mark_maybe_pointer, bounded_number):
1085 * buffer.c (bset_abbrev_mode, bset_abbrev_table)
1086 (bset_auto_fill_function, bset_auto_save_file_format)
1087 (bset_auto_save_file_name, bset_backed_up, bset_begv_marker)
1088 (bset_bidi_display_reordering, bset_buffer_file_coding_system)
1089 (bset_cache_long_line_scans, bset_case_fold_search)
1090 (bset_ctl_arrow, bset_cursor_in_non_selected_windows)
1091 (bset_cursor_type, bset_display_table, bset_extra_line_spacing)
1092 (bset_file_format, bset_file_truename, bset_fringe_cursor_alist)
1093 (bset_fringe_indicator_alist, bset_fringes_outside_margins)
1094 (bset_header_line_format, bset_indicate_buffer_boundaries)
1095 (bset_indicate_empty_lines, bset_invisibility_spec)
1096 (bset_left_fringe_width, bset_major_mode, bset_mark)
1097 (bset_minor_modes, bset_mode_line_format, bset_mode_name)
1098 (bset_name, bset_overwrite_mode, bset_pt_marker)
1099 (bset_right_fringe_width, bset_save_length)
1100 (bset_scroll_bar_width, bset_scroll_down_aggressively)
1101 (bset_scroll_up_aggressively, bset_selective_display)
1102 (bset_selective_display_ellipses, bset_vertical_scroll_bar_type)
1103 (bset_word_wrap, bset_zv_marker, set_buffer_overlays_before)
1104 (set_buffer_overlays_after):
1105 * category.c (bset_category_table):
1106 * charset.c (read_hex):
1107 * coding.c (produce_composition, produce_charset)
1108 (handle_composition_annotation, handle_charset_annotation)
1110 * dispnew.c (swap_glyph_pointers, copy_row_except_pointers)
1111 (assign_row, set_frame_matrix_frame, make_current)
1113 * eval.c (set_specpdl_symbol, set_specpdl_old_value):
1114 * fns.c (maybe_resize_hash_table):
1115 * frame.c (fset_buffer_predicate, fset_minibuffer_window):
1116 * gmalloc.c (register_heapinfo):
1117 * image.c (lookup_image_type):
1118 * intervals.c (set_interval_object, set_interval_left)
1119 (set_interval_right, copy_interval_parent, rotate_right)
1120 (rotate_left, balance_possible_root_interval):
1121 * keyboard.c (kset_echo_string, kset_kbd_queue)
1122 (kset_keyboard_translate_table, kset_last_prefix_arg)
1123 (kset_last_repeatable_command, kset_local_function_key_map)
1124 (kset_overriding_terminal_local_map, kset_real_last_command)
1125 (kset_system_key_syms, clear_event, set_prop):
1126 * lread.c (digit_to_number):
1127 * marker.c (attach_marker, live_buffer, set_marker_internal):
1128 * nsterm.m (ns_compute_glyph_string_overhangs):
1129 * process.c (pset_buffer, pset_command)
1130 (pset_decode_coding_system, pset_decoding_buf)
1131 (pset_encode_coding_system, pset_encoding_buf, pset_filter)
1132 (pset_log, pset_mark, pset_name, pset_plist, pset_sentinel)
1133 (pset_status, pset_tty_name, pset_type, pset_write_queue):
1134 * syntax.c (bset_syntax_table, dec_bytepos):
1135 * terminal.c (tset_param_alist):
1136 * textprop.c (interval_has_some_properties)
1137 (interval_has_some_properties_list):
1138 * window.c (wset_combination_limit, wset_dedicated)
1139 (wset_display_table, wset_hchild, wset_left_fringe_width)
1140 (wset_left_margin_cols, wset_new_normal, wset_new_total)
1141 (wset_normal_cols, wset_normal_lines, wset_parent, wset_pointm)
1142 (wset_right_fringe_width, wset_right_margin_cols)
1143 (wset_scroll_bar_width, wset_start, wset_temslot, wset_vchild)
1144 (wset_vertical_scroll_bar_type, wset_window_parameters):
1145 * xdisp.c (wset_base_line_number, wset_base_line_pos)
1146 (wset_column_number_displayed, wset_region_showing)
1147 (window_box_edges, run_window_scroll_functions)
1148 (append_glyph_string_lists, prepend_glyph_string_lists)
1149 (append_glyph_string, set_glyph_string_background_width)
1150 (append_glyph, append_composite_glyph)
1151 (take_vertical_position_into_account):
1152 * xfaces.c (x_create_gc, x_free_gc, merge_face_vectors)
1153 (face_attr_equal_p, lface_equal_p, hash_string_case_insensitive)
1154 (lface_hash, lface_same_font_attributes_p, lookup_face):
1155 * xml.c (libxml2_loaded_p):
1156 * xterm.c (x_set_mode_line_face_gc, x_set_glyph_string_gc)
1157 (x_set_glyph_string_clipping, x_clear_glyph_string_rect):
1158 Now 'static', not 'static inline'.
1161 (bidi_copy_it): Do the whole copy with a single memcpy.
1162 (bidi_char_at_pos): Merge the two STRING_CHAR calls into one.
1164 Revert the FOLLOW-SYMLINKS change for file-attributes.
1165 Doing it right would require several changes to Tramp, and there's
1166 not enough time to get that tested before the freeze today.
1167 * dired.c (directory_files_internal, Ffile_attributes):
1170 * frame.c (x_report_frame_params): Port better to wider ints.
1171 Do not assume that EMACS_UINT is the same width as uprintmax_t,
1172 or that pointers can be printed in 15 decimal digits.
1173 Avoid GCC warnings if EMACS_UINT is wider than a pointer.
1175 2012-09-30 Fabrice Popineau <fabrice.popineau@supelec.fr>
1177 Support x64 build on MS-Windows.
1178 * w32term.h (SCROLL_BAR_PACK, SCROLL_BAR_UNPACK): Define for x64.
1179 (SET_SCROLL_BAR_W32_WINDOW): Cast ID to intptr_t, for
1180 compatibility with x64.
1181 (x_get_focus_frame): Add prototype.
1183 * w32term.c (w32_draw_underwave): Don't use GCC extensions for
1184 defining an XRectangle structure.
1186 * w32proc.c (RVA_TO_PTR, w32_executable_type): Fix pointer
1187 arithmetics for compatibility with x64.
1189 * w32menu.c (add_menu_item): Use UINT_PTR instead of UINT, for
1190 compatibility with x64.
1192 * w32heap.h: Adjust prototypes and declarations.
1194 * w32heap.c (RVA_TO_PTR, allocate_heap, sbrk, init_heap)
1195 (round_heap): Use DWORD_PTR, ptrdiff_t and size_t instead of
1196 DWORD, long, and unsigned long, for compatibility with x64.
1197 (allocate_heap) [_WIN64]: Reserve 32GB of memory.
1198 (sbrk): Argument is now of type ptrdiff_t.
1200 * w32fns.c (HMONITOR): Condition declaration on _WIN32_WINNT being
1202 (w32_msg_pump): Use WPARAM type for 'result'.
1204 * w32.c (init_environment, get_emacs_configuration): Support AMD64
1206 (init_ntproc): Cast arguments of _open_osfhandle to intptr_t, for
1207 compatibility with x64.
1209 * vm-limit.c (lim_data): Now size_t.
1210 (check_memory_limits): Adjust prototypes of real_morecore and
1211 __morecore to receive argument of type ptrdiff_t. Use size_t for
1212 five_percent and data_size.
1214 * unexw32.c: Use DWORD_PTR instead of DWORD for file-scope
1215 variables, for compatibility with x64.
1216 (rva_to_section, offset_to_section, relocate_offset)
1217 (OFFSET_TO_RVA, RVA_TO_OFFSET, RVA_TO_SECTION_OFFSET)
1218 (PTR_TO_RVA, RVA_TO_PTR, OFFSET_TO_PTR, get_section_info)
1219 (copy_executable_and_dump_data): Use DWORD_PTR instead of DWORD
1220 for compatibility with x64.
1222 * sysdep.c (STDERR_FILENO): Define if not already defined.
1224 * ralloc.c (real_morecore): Argument type is now ptrdiff_t.
1225 (__morecore): Argument type is now ptrdiff_t.
1226 (ROUNDUP, MEM_ROUNDUP): Use size_t instead of 'unsigned long'.
1227 (relinquish): Use ptrdiff_t type for 'excess'.
1228 (r_alloc_sbrk): Argument type is now ptrdiff_t.
1230 * makefile.w32-in (HEAPSIZE): Get value from EMACS_HEAPSIZE.
1231 (bootstrap-temacs-CMD, bootstrap-temacs-SH): Use $(EMACS_PURESIZE)
1232 instead of a literal number.
1234 * gmalloc.c [WINDOWSNT]: Include w32heap.h.
1235 (min): Define only if not already defined.
1237 * frame.c (x_report_frame_params): Use EMACS_UINT for the return
1238 value of FRAME_X_WINDOW, to fit a 64-bit pointer on 64-bit Windows
1241 * image.c (x_bitmap_pixmap): Return ptrdiff_t, not int, since
1242 'bitmaps' is a pointer.
1244 * dispextern.h (x_bitmap_pixmap): Adjust prototype.
1246 * alloc.c (gdb_make_enums_visible): Now conditional on __GNUC__.
1248 2012-09-30 Paul Eggert <eggert@cs.ucla.edu>
1250 file-attributes has a new optional arg FOLLOW-SYMLINKS.
1251 * dired.c (directory_files_internal, Ffile_attributes):
1252 New arg follow_symlinks. All uses changed.
1254 2012-09-30 Stefan Monnier <monnier@iro.umontreal.ca>
1256 * .gdbinit (xbacktrace): Adjust to recent "struct backtrace" change.
1258 2012-09-30 Eli Zaretskii <eliz@gnu.org>
1260 Support atimers and CPU profiler via profile.c on MS-Windows.
1261 * w32proc.c (sig_mask, crit_sig): New static variables.
1262 (sys_signal): Support SIGALRM and SIGPROF.
1263 (sigemptyset, sigaddset, sigfillset, sigprocmask)
1264 (pthread_sigmask, setpgrp): Move here from w32.c. sigaddset,
1265 sigfillset, and sigprocmask are no longer no-ops.
1266 (sigismember): New function.
1267 (struct itimer_data): New definition.
1268 (ticks_now, real_itimer, prof_itimer, clocks_min, crit_real)
1269 (crit_prof): New static variables.
1270 (MAX_SINGLE_SLEEP): New definition.
1271 (timer_loop, stop_timer_thread, term_timers, init_timers)
1272 (start_timer_thread, getitimer, setitimer): New functions.
1273 (alarm): No longer a no-op, calls setitimer.
1275 * w32.c (term_ntproc): Call term_timers.
1276 (init_ntproc): Make sure all signals are unblocked at startup, to
1277 erase any traces of dumping. Call init_timers.
1279 * w32fns.c (hourglass_timer, HOURGLASS_ID): Remove.
1280 Windows-specific code to display the hourglass mouse pointer is no
1282 (w32_wnd_proc): Remove code that handled the WM_TIMER message due
1283 to hourglass timer expiration.
1284 (start_hourglass, cancel_hourglass, DEFAULT_HOURGLASS_DELAY):
1285 Remove, no longer used.
1286 (w32_note_current_window, show_hourglass, hide_hourglass):
1287 New functions, in support of hourglass cursor display similar to other
1289 (syms_of_w32fns): Don't initialize hourglass_timer.
1291 * xdisp.c (start_hourglass, cancel_hourglass): Now used on
1293 (start_hourglass) [WINDOWSNT]: Call w32_note_current_window.
1295 * w32.h (init_timers, term_timers): Add prototypes.
1297 2012-09-30 Kenichi Handa <handa@gnu.org>
1299 * coding.c (decode_coding_ccl, encode_coding_ccl): Pay attention
1300 to the buffer relocation which may be caused by ccl_driver.
1302 2012-09-30 Jan Djärv <jan.h.d@swipnet.se>
1304 * xfns.c (Fx_file_dialog): Update comment.
1306 * w32fns.c (Fx_file_dialog): Update comment.
1308 * nsfns.m (Fns_read_file_name): Add argument DIR_ONLY_P.
1309 Initialize panel name field if OSX >= 10.6.
1311 * fileio.c (Fnext_read_file_uses_dialog_p): Add HAVE_NS.
1313 * nsfns.m (ns_frame_parm_handlers): Add x_set_fullscreen.
1315 * nsterm.m (NEW_STYLE_FS): New define.
1316 (ns_fullscreen_hook, windowWillEnterFullScreen)
1317 (windowDidEnterFullScreen, windowWillExitFullScreen)
1318 (windowDidExitFullScreen, toggleFullScreen, handleFS)
1319 (setFSValue): New functions.
1320 (EmacsFSWindow): New implementation.
1321 (canBecomeKeyWindow): New function for EmacsFSWindow.
1322 (ns_create_terminal): Set fullscreen_hook to ns_fullscreen_hook.
1323 (dealloc): Release nonfs_window if in fullscreen.
1324 (updateFrameSize:): Call windowDidMove to update top/left.
1325 (windowWillResize:toSize:): Check if frame is still maximized.
1326 (initFrameFromEmacs:): Initialize fs_state, fs_before_fs,
1327 next_maximized, maximized_width, maximized_height and nonfs_window.
1328 Call setCollectionBehavior if NEW_STYLE_FS. Initialize bwidth and
1330 (windowWillUseStandardFrame:defaultFrame:): Update frame parameter
1331 fullscreen. Set maximized_width/height. Act on next_maximized.
1333 * nsterm.h (MAC_OS_X_VERSION_10_7, MAC_OS_X_VERSION_10_8): New.
1334 (EmacsView): Add variables for fullscreen.
1335 (handleFS, setFSValue, toggleFullScreen): New in EmacsView.
1336 (EmacsFSWindow): New interface for fullscreen.
1338 2012-09-30 Juanma Barranquero <lekktu@gmail.com>
1340 * makefile.w32-in ($(BLD)/profiler.$(O)): Update dependencies.
1342 2012-09-30 Chong Yidong <cyd@gnu.org>
1344 * fns.c (Frandom): Doc fix.
1346 2012-09-30 Martin Rudalics <rudalics@gmx.at>
1348 * window.c (Vwindow_combination_limit): New default value.
1349 (Qwindow_size): New symbol replacing Qtemp_buffer_resize.
1351 2012-09-30 Paul Eggert <eggert@cs.ucla.edu>
1353 * syssignal.h (PROFILER_CPU_SUPPORT): Don't define if PROFILING.
1354 Suggested by Eli Zaretskii in
1355 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00811.html>.
1357 2012-09-30 Eli Zaretskii <eliz@gnu.org>
1359 * profiler.c (Fprofiler_cpu_stop): Use timer_settime only if
1360 HAVE_TIMER_SETTIME is defined.
1362 2012-09-30 Paul Eggert <eggert@cs.ucla.edu>
1364 Profiler improvements: more-accurate timers, overflow checks.
1365 * profiler.c: Don't include stdio.h, limits.h, sys/time.h,
1366 signal.h, setjmp.h. Include systime.h instead.
1367 (saturated_add): New function.
1368 (record_backtrace, current_sample_interval): Use EMACS_INT, not size_t.
1369 (record_backtrace, handle_profiler_signal): Saturate on fixnum overflow.
1370 (profiler_timer, profiler_timer_ok) [HAVE_TIMER_SETTIME]:
1372 (enum profiler_cpu_running): New enum.
1373 (profiler_cpu_running): Now of that enum type, not bool.
1374 All uses changed to store the new value.
1375 (handle_profiler_signal): Rename from sigprof_handler_1,
1376 for consistency with other handlers. Do not check whether
1377 cpu_log is a hash-table if garbage collecting, since it
1378 doesn't matter in that case.
1379 (deliver_profiler_signal): Rename from sigprof_handler,
1380 for consistency with other handlers.
1381 (setup_cpu_timer): New function, with much of what used to be in
1382 Fprofiler_cpu_start. Check for out-of-range argument.
1383 Prefer timer_settime if available, and prefer
1384 thread cputime clocks, then process cputime clocks, then
1385 monotonic clocks, to the old realtime clock. Use make_timeval
1386 to round more-correctly when falling back to setitimer.
1387 (Fprofiler_cpu_start): Use it.
1388 (Fprofiler_cpu_stop): Prefer timer_settime if available.
1389 Don't assume that passing NULL as the 2nd argument of setitimer
1390 is the same as passing a pointer to all-zero storage.
1391 Ignore SIGPROF afterwards.
1392 (malloc_probe): Saturate at MOST_POSITIVE_FIXNUM.
1393 * sysdep.c (emacs_sigaction_init): Also mask out SIGPROF in
1394 non-fatal signal handlers. Ignore SIGPROF on startup.
1395 * syssignal.h (PROFILER_CPU_SUPPORT): Define this macro here, not
1396 in profiler.c, since sysdep.c now uses it.
1398 * sysdep.c (handle_fatal_signal): Bump backtrace size to 40.
1399 Suggested by Eli Zaretskii in
1400 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00796.html>.
1402 2012-09-29 Juanma Barranquero <lekktu@gmail.com>
1404 * makefile.w32-in ($(BLD)/profiler.$(O)): Update dependencies.
1406 2012-09-29 Stefan Monnier <monnier@iro.umontreal.ca>
1408 * lisp.h (struct backtrace): Remove indirection for `function' field.
1409 * xdisp.c (redisplay_internal):
1410 * profiler.c (record_backtrace, sigprof_handler_1):
1411 * alloc.c (Fgarbage_collect):
1412 * eval.c (interactive_p, Fsignal, eval_sub, Ffuncall, Fbacktrace)
1413 (Fbacktrace_frame): Adjust accordingly.
1415 2012-09-28 Glenn Morris <rgm@gnu.org>
1417 * eval.c (Frun_hook_with_args, Frun_hook_with_args_until_success)
1418 (Frun_hook_with_args_until_failure): Doc fixes.
1420 2012-09-28 Eli Zaretskii <eliz@gnu.org>
1422 * xdisp.c (syms_of_xdisp) <Qredisplay_internal>: Rename from
1423 Qautomatic_redisplay and change the symbol name. All users changed.
1425 2012-09-28 Tomohiro Matsuyama <tomo@cx4a.org>
1427 * profiler.c (sigprof_handler): Fix race condition.
1429 2012-09-28 Glenn Morris <rgm@gnu.org>
1431 * lread.c (lisp_file_lexically_bound_p): Handle #! lines. (Bug#12528)
1433 2012-09-27 Paul Eggert <eggert@cs.ucla.edu>
1435 Check more robustly for timer_settime.
1436 * Makefile.in (LIB_TIMER_TIME): New macro.
1438 * atimer.c (alarm_timer, alarm_timer_ok, set_alarm, init_atimer):
1439 Use HAVE_TIMER_SETTIME, not SIGEV_SIGNAL, to decide whether to
1442 2012-09-26 Tomohiro Matsuyama <tomo@cx4a.org>
1444 * profiler.c (Fprofiler_cpu_start): Remove unnecessary flag SA_SIGINFO.
1446 2012-09-26 Juanma Barranquero <lekktu@gmail.com>
1448 * makefile.w32-in ($(BLD)/profiler.$(O)): Update dependencies.
1450 2012-09-26 Paul Eggert <eggert@cs.ucla.edu>
1452 * character.h (MAYBE_UNIFY_CHAR): Remove.
1453 * charset.c, charset.h (maybe_unify_char): Now static.
1454 * charset.c (decode_char): Use maybe_unify_char, not MAYBE_UNIFY_CHAR.
1455 Since this stuff is now private to charset.c, there's no need for
1456 a public macro and no need to inline by hand.
1458 2012-09-26 Tomohiro Matsuyama <tomo@cx4a.org>
1459 Stefan Monnier <monnier@iro.umontreal.ca>
1460 Juanma Barranquero <lekktu@gmail.com>
1462 * profiler.c: New file.
1463 * Makefile.in (base_obj): Add profiler.o.
1464 * makefile.w32-in (OBJ2, GLOBAL_SOURCES): Add profiler.c.
1465 ($(BLD)/profiler.$(O)): New target.
1466 * emacs.c (main): Call syms_of_profiler.
1467 * alloc.c (Qautomatic_gc): New constant.
1468 (MALLOC_PROBE): New macro.
1469 (xmalloc, xzalloc, xrealloc, lisp_malloc, lisp_align_malloc): Use it.
1470 (total_bytes_of_live_objects): New function.
1471 (Fgarbage_collect): Use it. Record itself in backtrace_list.
1472 Call malloc_probe for the memory profiler.
1473 (syms_of_alloc): Define Qautomatic_gc.
1474 * eval.c (eval_sub, Ffuncall): Reorder assignments to avoid
1476 (struct backtrace): Move definition...
1477 * lisp.h (struct backtrace): ..here.
1478 (Qautomatic_gc, profiler_memory_running): Declare vars.
1479 (malloc_probe, syms_of_profiler): Declare functions.
1480 * xdisp.c (Qautomatic_redisplay): New constant.
1481 (redisplay_internal): Record itself in backtrace_list.
1482 (syms_of_xdisp): Define Qautomatic_redisplay.
1484 2012-09-25 Eli Zaretskii <eliz@gnu.org>
1485 2012-09-25 Juanma Barranquero <lekktu@gmail.com>
1487 * makefile.w32-in ($(BLD)/callproc.$(O)): Update dependencies.
1489 2012-09-25 Paul Eggert <eggert@cs.ucla.edu>
1491 Prefer POSIX timers if available.
1492 They avoid a race if the timer is too close to the current time.
1493 * atimer.c (alarm_timer, alarm_timer_ok) [SIGEV_SIGNAL]: New static vars.
1494 (set_alarm) [SIGEV_SIGNAL]: Use POSIX timers if available.
1495 (init_atimer) [SIGEV_SIGNAL]: Initialize them.
1497 2012-09-25 Eli Zaretskii <eliz@gnu.org>
1499 * coding.c (CHAR_STRING_ADVANCE_NO_UNIFY): Make it an alias of
1500 CHAR_STRING_ADVANCE.
1501 (STRING_CHAR_ADVANCE_NO_UNIFY): Make it an alias of
1502 STRING_CHAR_ADVANCE.
1504 2012-09-25 Juanma Barranquero <lekktu@gmail.com>
1506 Move Vlibrary_cache to emacs.c and reset before dumping.
1508 * lisp.h (reset_image_types): Declare.
1509 [WINDOWSNT] (Vlibrary_cache): Declare.
1511 * image.c (reset_image_types): New function.
1513 * emacs.c [WINDOWSNT] (Vlibrary_cache): Move from w32.c.
1514 (syms_of_emacs) [WINDOWSNT] <Vlibrary_cache>: Initialize and staticpro.
1515 (Fdump_emacs): Reset Vlibrary_cache and image_types.
1517 * w32.c (Vlibrary_cache): Do not define; moved to emacs.c
1518 (globals_of_w32) <Vlibrary_cache>: Do not initialize.
1520 * w32.h (Vlibrary_cache): Do not declare.
1522 2012-09-25 Eli Zaretskii <eliz@gnu.org>
1524 * w32proc.c (sys_signal): Handle all signals defined by the
1525 MS-Windows runtime, not just SIGCHLD. Actually install the signal
1526 handlers for signals supported by Windows. Don't override
1527 term_ntproc as the handler for SIGABRT.
1528 (sigaction): Rewrite to call sys_signal instead of duplicating its
1530 (sys_kill): Improve commentary.
1532 * w32.c (term_ntproc): Accept (and ignore) one argument, for
1533 consistency with a signature of a signal handler. All callers
1535 (init_ntproc): Accept an argument DUMPING. If dumping, don't
1536 install term_ntproc as a signal handler for SIGABRT, as that
1537 should be done by the dumped Emacs.
1539 * w32.h (init_ntproc, term_ntproc): Adjust prototypes.
1541 * w32select.c (term_w32select): Protect against repeated
1542 invocation by setting clipboard_owner to NULL after calling
1545 * emacs.c (shut_down_emacs, main): Adapt the calls to init_ntproc
1546 and term_ntproc to their modified signatures.
1548 * character.c (char_string, string_char): Remove calls to
1549 MAYBE_UNIFY_CHAR. See the discussion starting at
1550 http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00433.html
1553 2012-09-25 Chong Yidong <cyd@gnu.org>
1555 * xdisp.c (mode_line_inverse_video): Delete obsolete variable.
1557 2012-09-24 Stefan Monnier <monnier@iro.umontreal.ca>
1559 * bytecode.c (exec_byte_code): Signal an error instead of aborting,
1560 when encountering an unknown bytecode.
1562 2012-09-24 Paul Eggert <eggert@cs.ucla.edu>
1564 image.c, indent.c: Use bool for booleans.
1565 * dispextern.h (struct image_type): Members valid_p, load, init
1566 now return bool, not int. All uses changed.
1567 * image.c: Omit unnecessary static decls.
1568 (x_create_bitmap_mask, x_build_heuristic_mask):
1569 Return void, not int, since callers don't care about the return value.
1570 (x_create_bitmap_mask, define_image_type, valid_image_p)
1571 (struct image_keyword, parse_image_spec, image_spec_value)
1572 (check_image_size, image_background)
1573 (image_background_transparent, x_clear_image_1)
1574 (postprocess_image, lookup_image, x_check_image_size)
1575 (x_create_x_image_and_pixmap, xbm_image_p)
1576 (Create_Pixmap_From_Bitmap_Data, xbm_read_bitmap_data)
1577 (xbm_load_image, xbm_file_p, xbm_load, xpm_lookup_color)
1578 (init_xpm_functions, xpm_valid_color_symbols_p, xpm_image_p)
1579 (xpm_load, xpm_load_image, lookup_rgb_color, lookup_pixel_color)
1580 (x_to_xcolors, x_build_heuristic_mask, pbm_image_p, pbm_load)
1581 (png_image_p, init_png_functions, png_load_body, png_load)
1582 (jpeg_image_p, init_jpeg_functions, jpeg_load_body, jpeg_load)
1583 (tiff_image_p, init_tiff_functions, tiff_load, gif_image_p)
1584 (init_gif_functions, gif_load, imagemagick_image_p)
1585 (imagemagick_load_image, imagemagick_load, svg_image_p)
1586 (init_svg_functions, svg_load, svg_load_image, gs_image_p)
1588 * nsimage.m (ns_load_image):
1589 * nsterm.m (ns_defined_color):
1590 * xfaces.c (tty_lookup_color, tty_defined_color, defined_color):
1591 * xfns.c (x_defined_color):
1592 * xterm.c (x_alloc_lighter_color_for_widget)
1593 (x_alloc_nearest_color_1, x_alloc_nearest_color)
1594 (x_alloc_lighter_color):
1595 * indent.c (disptab_matches_widthtab, current_column)
1596 (scan_for_column, string_display_width, indented_beyond_p)
1597 (compute_motion, vmotion, Fvertical_motion):
1598 Use bool for booleans.
1600 2012-09-24 Chong Yidong <cyd@gnu.org>
1602 * chartab.c (Fset_char_table_default): Obsolete function removed.
1604 2012-09-23 Paul Eggert <eggert@cs.ucla.edu>
1606 Move pid_t related decls out of lisp.h.
1607 * lisp.h, syswait.h (record_child_status_change, wait_for_termination)
1608 (interruptible_wait_for_termination):
1609 Move these decls from lisp.h to syswait.h, since they use pid_t.
1610 Needed on FreeBSD; see Herbert J. Skuhra in
1611 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00571.html>.
1612 * callproc.c: Include syswait.h.
1614 gnutls.c, gtkutil.c: Use bool for boolean.
1615 * gnutls.c (gnutls_global_initialized, init_gnutls_functions)
1616 (emacs_gnutls_handle_error):
1617 * gtkutil.c (xg_check_special_colors, xg_prepare_tooltip)
1618 (xg_hide_tooltip, xg_create_frame_widgets)
1619 (create_dialog, xg_uses_old_file_dialog)
1620 (xg_get_file_with_chooser, xg_get_file_with_selection)
1621 (xg_get_file_name, xg_have_tear_offs, create_menus, xg_create_widget)
1622 (xg_item_label_same_p, xg_update_menubar)
1623 (xg_modify_menubar_widgets, xg_event_is_for_menubar)
1624 (xg_ignore_gtk_scrollbar, xg_set_toolkit_scroll_bar_thumb)
1625 (xg_event_is_for_scrollbar, xg_pack_tool_bar, xg_make_tool_item)
1626 (is_box_type, xg_tool_item_stale_p, xg_update_tool_bar_sizes)
1627 (update_frame_tool_bar, free_frame_tool_bar):
1628 * gtkutil.c, w32term.c, xterm.c (x_wm_set_size_hint):
1629 * nsmenu.m (ns_update_menubar):
1630 * nsmenu.m, w32menu.c, xmenu.c (set_frame_menubar):
1631 * xfns.c (Fx_show_tip) [USE_GTK]:
1632 Use bool for boolean.
1633 * gtkutil.c (xg_update_frame_menubar):
1634 * xmenu.c (update_frame_menubar):
1635 Return void, not int, since caller ignores return value.
1636 * gtkutil.c (xg_change_toolbar_position):
1639 2012-09-23 Juanma Barranquero <lekktu@gmail.com>
1641 * makefile.w32-in (BLOCKINPUT_H): Remove.
1642 (SYSSIGNAL_H): New macro.
1643 ($(BLD)/alloc.$(O), $(BLD)/atimer.$(O), $(BLD)/buffer.$(O))
1644 ($(BLD)/callproc.$(O), $(BLD)/data.$(O), $(BLD)/dired.$(O))
1645 ($(BLD)/dispnew.$(O), $(BLD)/editfns.$(O), $(BLD)/emacs.$(O))
1646 ($(BLD)/eval.$(O), $(BLD)/fileio.$(O), $(BLD)/floatfns.$(O))
1647 ($(BLD)/fns.$(O), $(BLD)/fontset.$(O), $(BLD)/frame.$(O))
1648 ($(BLD)/fringe.$(O), $(BLD)/image.$(O), $(BLD)/insdel.$(O))
1649 ($(BLD)/keyboard.$(O), $(BLD)/keymap.$(O), $(BLD)/lread.$(O))
1650 ($(BLD)/menu.$(O), $(BLD)/w32inevt.$(O), $(BLD)/w32proc.$(O))
1651 ($(BLD)/print.$(O), $(BLD)/process.$(O), $(BLD)/ralloc.$(O))
1652 ($(BLD)/search.$(O), $(BLD)/sound.$(O), $(BLD)/sysdep.$(O))
1653 ($(BLD)/term.$(O), $(BLD)/window.$(O), $(BLD)/xdisp.$(O))
1654 ($(BLD)/xfaces.$(O), $(BLD)/w32fns.$(O), $(BLD)/w32menu.$(O))
1655 ($(BLD)/w32term.$(O), $(BLD)/w32select.$(O), $(BLD)/w32reg.$(O))
1656 ($(BLD)/w32xfns.$(O)): Update dependencies.
1658 2012-09-23 Eli Zaretskii <eliz@gnu.org>
1660 * .gdbinit: Set breakpoint on terminate_due_to_signal, not on
1661 fatal_error_backtrace.
1663 * w32proc.c (sys_kill): Undo last change: don't do anything when
1664 invoked to deliver SIGABRT to our own process. This is now
1665 handled by emacs_raise.
1667 2012-09-23 Juanma Barranquero <lekktu@gmail.com>
1669 * w32term.c (w32_read_socket): Remove leftover reference to
1670 interrupt_input_pending.
1672 2012-09-23 Paul Eggert <eggert@cs.ucla.edu>
1674 Do not use SA_NODEFER.
1675 Problem reported by Dani Moncayo in
1676 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00557.html>.
1678 * sysdep.c (emacs_abort): Do not reset signal handler.
1679 * emacs.c (terminate_due_to_signal): Reset signal handler here.
1680 * sysdep.c (init_signals): Do not use SA_NODEFER. It wasn't
1681 wanted even on POSIXish hosts, and it doesn't work on Windows.
1683 2012-09-23 Jan Djärv <jan.h.d@swipnet.se>
1685 * xterm.c (x_term_init): Call fixup_locale before and after calling
1686 gtk_init (Bug#12392).
1688 2012-09-23 Chong Yidong <cyd@gnu.org>
1690 * w32.c (w32_delayed_load): Remove LIBRARIES argument; always use
1691 Vdynamic_library_alist.
1693 * gnutls.c (init_gnutls_functions): Caller changed; remove arg.
1694 (Fgnutls_available_p): Caller changed.
1696 * xml.c (init_libxml2_functions, Flibxml_parse_html_region)
1697 (Flibxml_parse_xml_region): Likewise.
1699 * dispextern.h (struct image_type): Remove arg from init function.
1701 * image.c (Finit_image_library, lookup_image_type)
1702 (define_image_type): Remove now-unneeded second arg.
1703 (init_xpm_functions, init_png_functions, init_jpeg_functions)
1704 (init_tiff_functions, init_gif_functions, init_svg_functions):
1705 Arglist and w32_delayed_load calling convention changed.
1706 (gs_type): Remove init_gs_functions; there is no such function.
1707 (valid_image_p, make_image): Fix caller to lookup_image_type.
1709 2012-09-23 Paul Eggert <eggert@cs.ucla.edu>
1711 Simplify and avoid signal-handling races (Bug#12471).
1713 * sysdep.c (emacs_abort) [HAVE_NTGUI]:
1714 Avoid recursive loop if there's a fatal error in the function itself.
1715 * atimer.c (pending_atimers):
1716 * blockinput.h: Don't include "atimer.h"; no longer needed.
1717 (interrupt_input_pending): Remove. All uses removed.
1718 pending_signals now counts both atimers and ordinary interrupts.
1719 This is less racy than having three separate pending-signal flags.
1720 (block_input, unblock_input, totally_unblock_input, unblock_input_to)
1722 Rename from their upper-case counterparts BLOCK_INPUT,
1723 UNBLOCK_INPUT, TOTALLY_UNBLOCK_INPUT, UNBLOCK_INPUT_TO,
1724 INPUT_BLOCKED_P, and turn into functions. All uses changed.
1725 This makes it easier to access volatile variables more accurately.
1726 (BLOCK_INPUT_RESIGNAL): Remove. All uses replaced by unblock_input ().
1727 (input_blocked_p): Prefer this to 'interrupt_input_blocked', as
1728 that's more reliable if the code is buggy and sets
1729 interrupt_input_blocked to a negative value. All uses changed.
1730 * atimer.c (deliver_alarm_signal):
1731 Remove. No need to deliver this to the parent; any thread can
1732 handle this signal now. All uses replaced by underlying handler.
1733 * atimer.c (turn_on_atimers):
1734 * dispnew.c (handle_window_change_signal):
1735 * emacs.c (handle_danger_signal):
1736 * keyboard.c (kbd_buffer_get_event):
1737 Don't reestablish signal handler; not needed with sigaction.
1738 * blockinput.h (UNBLOCK_INPUT_TO, TOTALLY_UNBLOCK_INPUT)
1740 Rework to avoid unnecessary accesses to volatile variables.
1741 (UNBLOCK_INPUT_TO): Now a function.
1742 (totally_unblock_input, unblock_input): New decls.
1743 * data.c (handle_arith_signal, deliver_arith_signal): Move to sysdep.c
1744 (init_data): Remove. Necessary stuff now done in init_signal.
1745 * emacs.c, xdisp.c: Include "atimer.h", since we invoke atimer functions.
1746 * emacs.c (handle_fatal_signal, deliver_fatal_signal): Move to sysdep.c.
1747 (fatal_error_code): Remove; no longer needed.
1748 (terminate_due_to_signal): Rename from fatal_error_backtrace, since
1749 it doesn't always backtrace. All uses changed. No need to reset
1750 signal to default, since sigaction and/or die does that for us now.
1751 Use emacs_raise (FOO), not kill (getpid (), FOO).
1752 (main): Check more-accurately whether we're dumping.
1753 Move fatal-error setup to sysdep.c
1754 * floatfns.c: Do not include "syssignal.h"; no longer needed.
1755 * gtkutil.c (xg_get_file_name, xg_get_font):
1756 Remove no-longer-needed signal-mask manipulation.
1757 * keyboard.c, process.c (POLL_FOR_INPUT):
1758 Don't depend on USE_ASYNC_EVENTS, a symbol that is never defined.
1759 * keyboard.c (read_avail_input): Remove.
1760 All uses replaced by gobble_input.
1761 (Ftop_level): Use TOTALLY_UNBLOCK_INPUT rather than open code.
1762 (kbd_buffer_store_event_hold, gobble_input):
1763 (record_asynch_buffer_change) [USABLE_SIGIO]:
1764 (store_user_signal_events):
1765 No need to mess with signal mask.
1766 (gobble_input): If blocking input and there are terminals, simply
1767 set pending_signals to 1 and return. All hooks changed to not
1768 worry about whether input is blocked.
1769 (process_pending_signals): Clear pending_signals before processing
1770 them, in case a signal comes in while we're processing.
1771 By convention callers now test pending_signals before calling us.
1772 (UNBLOCK_INPUT_TO, unblock_input, totally_unblock_input):
1773 New functions, to support changes to blockinput.h.
1774 (handle_input_available_signal): Now extern.
1775 (reinvoke_input_signal): Remove. All uses replaced by
1777 (quit_count): Now volatile, since a signal handler uses it.
1778 (handle_interrupt): Now takes bool IN_SIGNAL_HANDLER as arg.
1779 All callers changed. Block SIGINT only if not already blocked.
1780 Clear sigmask reliably, even if Fsignal returns, which it can.
1781 Omit unnecessary accesses to volatile var.
1782 (quit_throw_to_read_char): No need to restore sigmask.
1783 * keyboard.c (gobble_input, handle_user_signal):
1784 * process.c (wait_reading_process_output):
1785 Call signal-handling code rather than killing ourselves.
1786 * lisp.h: Include <float.h>, for...
1787 (IEEE_FLOATING_POINT): New macro, moved here to avoid duplication.
1788 (pending_signals): Now volatile.
1789 (syms_of_data): Now const if IEEE floating point.
1790 (handle_input_available_signal) [USABLE_SIGIO]:
1791 (terminate_due_to_signal, record_child_status_change): New decls.
1792 * process.c (create_process): Avoid disaster if memory is exhausted
1793 while we're processing a vfork, by tightening the critical section
1795 (send_process_frame, process_sent_to, handle_pipe_signal)
1796 (deliver_pipe_signal): Remove. No longer needed, as Emacs now
1798 (send_process): No need for setjmp/longjmp any more, since the
1799 SIGPIPE stuff is now gone. Instead, report an error if errno
1801 (record_child_status_change): Now extern. PID and W are now args.
1802 Return void, not bool. All callers changed.
1803 * sysdep.c (wait_debugging) [(BSD_SYSTEM || HPUX) && !defined (__GNU__)]:
1804 Remove. All uses removed. This bug should be fixed now in a
1806 (wait_for_termination_1): Use waitpid rather than sigsuspend,
1807 and record the child status change directly. This avoids the
1808 need to futz with the signal mask.
1809 (process_fatal_action): Move here from emacs.c.
1810 (emacs_sigaction_flags): New function, containing
1811 much of what used to be in emacs_sigaction_init.
1812 (emacs_sigaction_init): Use it. Block nonfatal system signals that are
1813 caught by emacs, to make races less likely.
1814 (deliver_process_signal): Rename from handle_on_main_thread.
1816 (BACKTRACE_LIMIT_MAX): Now at top level.
1817 (thread_backtrace_buffer, threadback_backtrace_pointers):
1819 (deliver_thread_signal, deliver_fatal_thread_signal):
1820 New functions, for more-accurate delivery of thread-specific signals.
1821 (handle_fatal_signal, deliver_fatal_signal): Move here from emacs.c.
1822 (deliver_arith_signal): Handle in this thread, not
1823 in the main thread, since it's triggered by this thread.
1824 (maybe_fatal_sig): New function.
1825 (init_signals): New arg DUMPING so that we can be more accurate
1826 about whether we're dumping. Caller changed.
1827 Treat thread-specific signals differently from process-general signals.
1828 Block all signals while handling fatal error; that's safer.
1829 xsignal from SIGFPE only on non-IEEE hosts, treating it as fatal
1831 When batch, ignore SIGHUP, SIGINT, SIGTERM if they were already ignored.
1832 Ignore SIGPIPE unless batch.
1833 (emacs_backtrace): Output backtrace for the appropriate thread,
1834 which is not necessarily the main thread.
1835 * syssignal.h: Include <stdbool.h>.
1836 (emacs_raise): New macro.
1837 * xterm.c (x_connection_signal): Remove; no longer needed
1838 now that we use sigaction.
1839 (x_connection_closed): No need to mess with sigmask now.
1840 (x_initialize): No need to reset SIGPIPE handler here, since
1841 init_signals does this for us now.
1843 2012-09-23 Jan Djärv <jan.h.d@swipnet.se>
1845 * nsterm.m (ns_dumpglyphs_image): dr is a new rect to draw image into,
1846 background rect may be larger (Bug#12245).
1848 2012-09-23 Chong Yidong <cyd@gnu.org>
1850 * keyboard.c (timer_check): Avoid quitting during Fcopy_sequence.
1852 2012-09-22 Paul Eggert <eggert@cs.ucla.edu>
1854 * .gdbinit: Just stop at fatal_error_backtrace.
1855 See Stefan Monnier's request in
1856 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00549.html>.
1857 Remove no-longer-used query of system type.
1859 2012-09-22 Chong Yidong <cyd@gnu.org>
1861 * search.c (Freplace_match): Doc fix (Bug#12325).
1863 * minibuf.c (Finternal_complete_buffer): Doc fix (Bug#12391).
1865 * editfns.c (Fline_beginning_position): Doc fix (Bug#12416).
1866 (Fline_end_position): Doc fix.
1868 * cmds.c (Fforward_char, Fbackward_char): Doc fix (Bug#12414).
1870 2012-09-22 Chong Yidong <cyd@gnu.org>
1872 * dispextern.h (struct image_type): Add new slot, storing a type
1873 initialization function.
1875 * image.c (define_image_type): Call the image initializer function
1876 if it is defined. Arguments and return value changed.
1877 (valid_image_p, make_image): Callers changed.
1878 (xbm_type, xpm_type, pbm_type, png_type, jpeg_type, tiff_type)
1879 (gif_type, imagemagick_type, svg_type, gs_type):
1880 Add initialization functions.
1881 (Finit_image_library): Call lookup_image_type.
1882 (CHECK_LIB_AVAILABLE): Macro deleted.
1883 (lookup_image_type): Call define_image_type here, rather than via
1884 Finit_image_library, and without using CHECK_LIB_AVAILABLE.
1885 (syms_of_image): Move define_image_type calls for xbm_type and
1886 pbm_type to lookup_image_type.
1888 2012-09-22 Eli Zaretskii <eliz@gnu.org>
1890 * keyboard.c (timer_check_2): Move calculation of 'timers' and
1891 'idle_timers' from here ...
1892 (timer_check): ... to here. Use Fcopy_sequence to copy the timer
1893 lists, to avoid infloops when the timer does something stupid,
1894 like reinvoke itself with the same or smaller time-out.
1897 2012-09-22 Martin Rudalics <rudalics@gmx.at>
1899 * window.c (Fsplit_window_internal): Handle only Qt value of
1900 Vwindow_combination_limit separately.
1901 (Qtemp_buffer_resize): New symbol.
1902 (Vwindow_combination_limit): New default value.
1905 2012-09-22 Eli Zaretskii <eliz@gnu.org>
1907 * xdisp.c (next_overlay_string): Initialize it->end_charpos for
1908 the new overlay string. (Bug#10159)
1910 2012-09-22 Paul Eggert <eggert@cs.ucla.edu>
1912 * emacs.c (shut_down_emacs): Don't assume stderr is buffered,
1913 or that fprintf is async-signal-safe. POSIX doesn't require
1916 2012-09-22 Chong Yidong <cyd@gnu.org>
1918 * buffer.c (Fset_buffer_modified_p): Handle indirect buffers
1921 2012-09-22 Kenichi Handa <handa@gnu.org>
1923 * composite.c (composition_reseat_it): Handle the case that a
1924 grapheme cluster is not covered by a single font (Bug#12352).
1926 2012-09-21 Chong Yidong <cyd@gnu.org>
1928 * image.c (define_image_type): Avoid adding duplicate types to
1929 image_types (Bug#12463). Suggested by Jörg Walter.
1931 2012-09-21 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
1933 * unexmacosx.c: Define LC_DATA_IN_CODE if not defined.
1934 (print_load_command_name): Add case LC_DATA_IN_CODE.
1935 (dump_it) [LC_DATA_IN_CODE]: Call copy_linkedit_data.
1937 2012-09-21 Glenn Morris <rgm@gnu.org>
1939 * eval.c (Frun_hook_with_args_until_success)
1940 (Frun_hook_with_args_until_failure): Doc fixes. (Bug#12393)
1942 2012-09-21 Andreas Schwab <schwab@linux-m68k.org>
1944 * fileio.c (Ffile_selinux_context): Only call freecon when
1945 lgetfilecon succeeded.
1946 (Fset_file_selinux_context): Likewise. (Bug#12444)
1948 2012-09-21 Eli Zaretskii <eliz@gnu.org>
1950 * xdisp.c (try_window_reusing_current_matrix): Under bidi
1951 reordering, locate the cursor by calling set_cursor_from_row; if
1952 that fails, clear the desired glyph matrix before returning a
1953 failure indication to the caller. Fixes leaving garbled display
1954 when fast scrolling with a down-key. (Bug#12403)
1955 (compute_stop_pos_backwards): Fix a typo that caused crashes while
1956 scrolling through multibyte text.
1958 2012-09-20 Stefan Monnier <monnier@iro.umontreal.ca>
1960 * alloc.c (mark_object) <PVEC_WINDOW>: Mark prev/next_buffers *after*
1961 calling mark_vectorlike since that's the one that marks the window.
1962 (mark_discard_killed_buffers): Mark the final cdr.
1963 * window.h (struct window): Move prev/next_buffers to the
1964 non-standard fields.
1965 * window.c (make_window): Initialize prev/next_buffers manually.
1967 2012-09-20 Paul Eggert <eggert@cs.ucla.edu>
1969 Omit unused arg EXPECTED from socket hooks.
1970 * keyboard.c (gobble_input, read_avail_input, tty_read_avail_input):
1971 * nsterm.m (ns_term_init):
1972 * termhooks.h (struct terminal.read_socket_hook):
1973 * w32inevt.c (w32_console_read_socket):
1974 * w32term.c (w32_read_socket):
1975 * xterm.c (XTread_socket):
1976 Omit unused arg EXPECTED. All callers changed.
1977 (store_user_signal_events): Return void, not int, since callers no
1978 longer care about the return value. All uses changed.
1980 2012-09-20 Juanma Barranquero <lekktu@gmail.com>
1982 * w32gui.h (XParseGeometry): Do not declare.
1984 2012-09-19 Paul Eggert <eggert@cs.ucla.edu>
1986 * w32inevt.c (w32_console_read_socket): Return -1 on failure, not 0.
1987 Ignore 'expected'. See Eli Zaretskii in
1988 <http://bugs.gnu.org/12471#8> (last line).
1990 * frame.c (read_integer): Remove. All uses replaced by strtol/strtoul.
1991 (XParseGeometry): Now static. Substitute extremal values for
1992 values that are out of range.
1994 2012-09-19 Jan Djärv <jan.h.d@swipnet.se>
1996 * w32xfns.c (read_integer, XParseGeometry): Move to frame.c.
1998 * nsfns.m (XParseGeometry): Remove.
1999 (Fx_create_frame): Call x_set_offset to correctly interpret
2000 top_pos in geometry.
2002 * frame.c (read_integer, XParseGeometry): Move from w32xfns.c.
2003 (Fx_parse_geometry): If there is a space in string, call
2004 Qns_parse_geometry, otherwise do as on other terms (Bug#12368).
2006 2012-09-17 Eli Zaretskii <eliz@gnu.org>
2008 * search.c (scan_buffer): Use character positions in calls to
2009 region_cache_forward and region_cache_backward, not byte
2010 positions. (Bug#12196)
2012 * w32term.c (w32_read_socket): Set pending_signals to 1, like
2013 xterm.c does. Reported by Daniel Colascione <dancol@dancol.org>.
2015 * ralloc.c (r_alloc_init) [!SYSTEM_MALLOC]: Initialize
2016 __malloc_extra_blocks to 32 instead of 64, like alloc.c did in
2017 emacs_blocked_malloc, now deleted.
2019 2012-09-17 Paul Eggert <eggert@cs.ucla.edu>
2021 Remove no-longer-needed Solaris 2.4 vfork bug workaround.
2022 The workaround was for improving performance on Solaris 2.4, but
2023 is getting in the way now. Emacs will still work if someone is
2024 still running Solaris 2.4 in a museum somewhere; Sun dropped
2025 support for Solaris 2.4 in 2003.
2026 * callproc.c (Fcall_process) [HAVE_WORKING_VFORK]:
2027 * process.c (create_process) [HAVE_WORKING_VFORK]:
2028 Omit now-unnecessary workaround for the Solaris 2.4 vfork bug,
2029 since Emacs no longer uses vfork on that platform.
2031 2012-09-17 Glenn Morris <rgm@gnu.org>
2033 * emacs.c: Use COPYRIGHT.
2035 2012-09-16 Paul Eggert <eggert@cs.ucla.edu>
2037 Remove configure's --without-sync-input option (Bug#12450).
2038 When auditing signal-handling in preparation for cleaning it up,
2039 I found that SYNC_INPUT has race conditions and would be a real
2040 pain to fix. Since it's an undocumented and deprecated
2041 configure-time option, now seems like a good time to remove it.
2042 Also see <http://bugs.gnu.org/11080#16>.
2043 * alloc.c (_bytes_used, __malloc_extra_blocks, _malloc_internal)
2044 (_free_internal) [!DOUG_LEA_MALLOC]: Remove decls.
2045 (alloc_mutex) [!SYSTEM_MALLOC && !SYNC_INPUT && HAVE_PTHREAD]:
2046 (malloc_hysteresis):
2047 (check_depth) [XMALLOC_OVERRUN_CHECK]:
2048 (MALLOC_BLOCK_INPUT, MALLOC_UNBLOCK_INPUT):
2049 (__malloc_hook, __realloc_hook, __free_hook, BYTES_USED)
2050 (dont_register_blocks, bytes_used_when_reconsidered)
2051 (bytes_used_when_full, emacs_blocked_free, emacs_blocked_malloc)
2052 (emacs_blocked_realloc, reset_malloc_hooks, uninterrupt_malloc):
2053 [!SYSTEM_MALLOC && !SYNC_INPUT]:
2054 Remove. All uses removed.
2055 (MALLOC_BLOCK_INPUT, MALLOC_UNBLOCK_INPUT): Use a different
2056 implementation, one that depends on whether the new macro
2057 XMALLOC_BLOCK_INPUT_CHECK is defined, not on whether SYNC_INPUT
2059 * atimer.c (run_timers, handle_alarm_signal):
2060 * keyboard.c (pending_signal, poll_for_input_1, poll_for_input)
2061 (handle_async_input, process_pending_signals)
2062 (handle_input_available_signal, init_keyboard):
2063 * nsterm.m (ns_read_socket):
2064 * process.c (wait_reading_process_output):
2065 * regex.c (immediate_quit, IMMEDIATE_QUIT_CHECK):
2066 * sysdep.c (emacs_sigaction_init) [SA_RESTART]:
2068 * xterm.c (XTread_socket):
2070 * conf_post.h (SA_RESTART) [IRIX6_5]: Do not #undef.
2071 * eval.c (handling_signal): Remove. All uses removed.
2072 * lisp.h (ELSE_PENDING_SIGNALS): Remove.
2073 All uses replaced with the SYNC_INPUT version.
2074 (reset_malloc_hooks, uninterrupt_malloc, handling_signal):
2076 * sysdep.c, syssignal.h (main_thread) [FORWARD_SIGNAL_TO_MAIN_THREAD]:
2079 * font.c (Ffont_shape_gstring): Remove unused local.
2081 2012-09-16 Glenn Morris <rgm@gnu.org>
2083 * Makefile.in (clean): No longer run nextstep's clean.
2085 * Makefile.in (ns_appdir, ns_appbindir, ns_appsrc): Remove variables.
2087 (ns-app): Move here from ns.mk, and simplify.
2088 (clean): Simplify nextstep entry.
2089 * ns.mk: Remove file.
2091 2012-09-17 Kenichi Handa <handa@gnu.org>
2093 * font.c (Ffont_shape_gstring): Fix previous change; GLYPHs may
2094 not covert the last few charactes.
2096 2012-09-16 Kenichi Handa <handa@gnu.org>
2098 * font.c (Ffont_shape_gstring): Don't adjust grapheme cluster
2099 here, but just check the validity of glyphs in the glyph-string.
2101 2012-09-16 Martin Rudalics <rudalics@gmx.at>
2103 * window.c (Fwindow_parameter, Fset_window_parameter):
2104 Accept any window as argument (Bug#12452).
2106 2012-09-16 Jan Djärv <jan.h.d@swipnet.se>
2108 * nsfns.m (Fx_open_connection): Move initialization of ns_*_types
2109 to ns_term_init to avoid memory leak.
2111 * nsterm.m (ns_update_begin): Initialize bp after lcokFocus, use
2112 explicit retain/release.
2113 (ns_term_init): Only allow one display. Initialize outerpool and
2116 2012-09-15 Paul Eggert <eggert@cs.ucla.edu>
2118 Port _setjmp fix to POSIXish hosts as well as Microsoft.
2119 * image.c (_setjmp) [!HAVE__SETJMP]: Restore definition, as
2120 it's needed on POSIXish hosts that lack _setjmp. Attempt to solve
2121 the Microsoft problem in a different way, by altering ../nt/config.nt.
2123 2012-09-15 Eli Zaretskii <eliz@gnu.org>
2138 * w16select.c: Remove inclusion of setjmp.h, as it is now included
2139 by lisp.h. This completes removal of setjmp.h inclusion
2140 erroneously announced in the previous commit. (Bug#12446)
2142 * lisp.h [!HAVE__SETJMP, !HAVE_SIGSETJMP]: Make the commentary
2145 * image.c (_setjmp) [!HAVE__SETJMP]: Define only if 'setjmp' is
2146 not defined as a macro. The latter happens on MS-Windows.
2149 2012-09-15 Paul Eggert <eggert@cs.ucla.edu>
2151 Port better to POSIX hosts lacking _setjmp (Bug#12446).
2152 * lisp.h: Include <setjmp.h> here, since we use its symbols here.
2153 Some instances of '#include <setjmp.h>' removed, if the
2154 only reason for the instance was because "lisp.h" was included.
2155 (sys_jmp_buf, sys_setjmp, sys_longjmp): New symbols.
2156 Unless otherwise specified, replace all uses of jmp_buf, _setjmp,
2157 and _longjmp with the new symbols. Emacs already uses _setjmp if
2158 available, so this change affects only POSIXish hosts that have
2159 sigsetjmp but not _setjmp, such as some versions of Solaris and
2160 Unixware. (Also, POSIX-2008 marks _setjmp as obsolescent.)
2161 * image.c (_setjmp, _longjmp) [HAVE_PNG && !HAVE__SETJMP]: New macros.
2162 (png_load_body) [HAVE_PNG]:
2163 (PNG_LONGJMP) [HAVE_PNG && PNG_LIBPNG_VER < 10500]:
2164 (PNG_JMPBUF) [HAVE_PNG && PNG_LIBPNG_VER >= 10500]:
2165 Use _setjmp and _longjmp rather than sys_setjmp and sys_longjmp,
2166 since PNG requires jmp_buf. This is the only exception to the
2167 general rule that we now use sys_setjmp and sys_longjmp.
2168 This exception is OK since this code does not change the signal
2169 mask or longjmp out of a signal handler.
2171 2012-09-14 Paul Eggert <eggert@cs.ucla.edu>
2173 * alloc.c [!SYSTEM_MALLOC && !SYNC_INPUT && HAVE_PTHREAD]:
2174 Include "syssignal.h", for 'main_thread'.
2176 2012-09-14 Dmitry Antipov <dmantipov@yandex.ru>
2178 Avoid out-of-range marker position (Bug#12426).
2179 * insdel.c (replace_range, replace_range_2):
2180 Adjust markers before overlays, as suggested by comments.
2181 (insert_1_both, insert_from_buffer_1, adjust_after_replace):
2182 Remove redundant check before calling offset_intervals.
2184 2012-09-14 Martin Rudalics <rudalics@gmx.at>
2186 * xdisp.c (Fformat_mode_line): Unconditionally save/restore
2187 current buffer (Bug#12387).
2189 2012-09-14 Juanma Barranquero <lekktu@gmail.com>
2191 * makefile.w32-in ($(BLD)/alloc.$(O)): Update dependencies.
2193 2012-09-13 Paul Eggert <eggert@cs.ucla.edu>
2195 Use a more backwards-compatible timer format (Bug#12430).
2196 * keyboard.c (decode_timer): Get PSECS from the 8th (origin-0)
2197 vector element, not from the 4th, since PSECS is now at the end.
2198 (Fcurrent_idle_time): Doc fix.
2200 2012-09-13 Dmitry Antipov <dmantipov@yandex.ru>
2202 Function to mark objects and remove killed buffers at once.
2203 * alloc.c (discard_killed_buffers): Rename to ...
2204 (mark_discard_killed buffers) ... new name. Add marking
2205 of remaining objects. Fix comment. Adjust users.
2206 (mark_object): Do not touch frame buffer lists here.
2207 * frame.c (delete_frame): Reset frame buffer lists here.
2209 2012-09-13 Paul Eggert <eggert@cs.ucla.edu>
2211 Better workaround for GNOME bug when --enable-gcc-warnings.
2212 * emacsgtkfixed.c (G_STATIC_ASSERT): Remove, undoing last change.
2213 Instead, disable -Wunused-local-typedefs. See Dmitry Antipov in
2214 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00335.html>.
2216 Simplify SIGIO usage (Bug#12408).
2217 The code that dealt with SIGIO was crufty and confusing, e.g., it
2218 played tricks like "#undef SIGIO" but these tricks were not used
2219 consistently. Simplify mostly by not #undeffing standard symbols,
2220 e.g., use "defined USABLE_SIGIO" (our symbol, which we can define
2221 or not as we please) rather than "defined SIGIO" (standard symbol
2222 that we probably shouldn't #undef).
2223 * conf_post.h [USG5_4]: Do not include <sys/wait.h> here.
2224 Modules that need it can include it.
2225 [USG5_4 && emacs]: Likewise, do not include the streams stuff here.
2226 * dispextern.h (ignore_sigio): New decl.
2227 * emacs.c (shut_down_emacs): Invoke unrequest_sigio
2228 unconditionally, since it's now a no-op if !USABLE_SIGIO.
2229 * emacs.c (shut_down_emacs):
2230 * keyboard.c (kbd_buffer_store_event_hold):
2231 Use ignore_sigio rather than invoking 'signal' directly.
2232 * keyboard.c (USABLE_FIONREAD && USG5_4): Include <sys/filio.h>,
2234 (FIONREAD, SIGIO): Do not #undef.
2235 (tty_read_avail_input): Use #error rather than a syntax error.
2236 * process.c [USG5_4]: Include <sys/stream.h> and <sys/stropts.h>,
2237 for I_PIPE, used by SETUP_SLAVE_PTY.
2238 (DATAGRAM_SOCKETS): Simplify defn, based on USABLE_FIONREAD.
2239 * sysdep.c (croak): Remove; no longer needed. This bit of
2240 temporary code, with Fred N. Fish's comment that it's temporary,
2241 has been in Emacs since at least 1992!
2242 (init_sigio, reset_sigio, request_sigio, unrequest_sigio):
2243 Arrange for them to be no-ops in all cases when ! USABLE_SIGIO.
2244 * syssignal.h (croak): Remove decl.
2245 (SIGIO, SIGPOO, SIGAIO, SIGPTY): Do not #undef; that's too fragile.
2246 * systty.h [!NO_TERMIO]: Do not include <termio.h>; no longer needed
2247 now that we're termios-only.
2248 (FIONREAD, ASYNC) [BROKEN_FIONREAD]: Do not #undef.
2249 * term.c (dissociate_if_controlling_tty): Use #error rather than
2252 Work around GCC and GNOME bugs when --enable-gcc-warnings.
2253 * emacsgtkfixed.c (G_STATIC_ASSERT): Redefine to use 'verify',
2254 to work around GNOME bug 683906.
2255 * image.c (jpeg_load_body) [HAVE_JPEG && lint]: Pacify gcc -Wclobber.
2256 (struct my_jpeg_error_mgr) [HAVE_JPEG && lint]: New member fp.
2257 This works around GCC bug 54561.
2259 2012-09-12 Paul Eggert <eggert@cs.ucla.edu>
2261 More fixes for 'volatile' and setjmp/longjmp.
2262 * eval.c (Fdefvar, Fcondition_case): Remove unnecessary 'volatile's.
2263 * image.c (struct png_load_context) [HAVE_PNG]: New type.
2264 (png_load_body) [HAVE_PNG]:
2265 (jpeg_load_body) [HAVE_JPEG]:
2266 New function, with most of the old parent function's body.
2267 (png_load) [HAVE_PNG]:
2268 (jpeg_load) [HAVE_JPEG]:
2269 Invoke the new function, to avoid longjmp munging our locals.
2270 (struct my_jpeg_error_mgr) [HAVE_JPEG]: New members cinfo, failure_code.
2271 (my_error_exit) [HAVE_JPEG]: Don't trust 'setjmp' to return 2 when
2272 longjmp is passed 2, as the C standard doesn't guarantee this.
2273 Instead, store the failure code into mgr->failure_code.
2275 2012-09-12 Stefan Monnier <monnier@iro.umontreal.ca>
2277 * keyboard.c (read_char, requeued_events_pending_p, Finput_pending_p)
2278 (Fdiscard_input, quit_throw_to_read_char, init_keyboard)
2279 (syms_of_keyboard): Remove support for unread-command-char.
2281 2012-09-12 Eli Zaretskii <eliz@gnu.org>
2283 * w32proc.c (sys_kill): If PID is our process ID and the signal is
2284 SIGABRT, call emacs_abort. Avoids silently exiting upon assertion
2285 violation. (Bug#12426)
2287 2012-09-12 Paul Eggert <eggert@cs.ucla.edu>
2289 * image.c (jpeg_memory_src): Don't assume string len fits in unsigned.
2291 2012-09-12 Stefan Monnier <monnier@iro.umontreal.ca>
2293 * eval.c: Add `inhibit-debugger'.
2294 (Qinhibit_debugger): New symbol.
2295 (call_debugger): Bind it instead of Qdebug_on_error.
2296 (maybe_call_debugger): Test Vinhibit_debugger.
2297 (syms_of_eval): Define inhibit-debugger.
2298 * xdisp.c (set_message): Don't bind Qinhibit_debug_on_message.
2299 (syms_of_xdisp): Remove inhibit-debug-on-message.
2301 2012-09-11 Paul Eggert <eggert@cs.ucla.edu>
2303 Avoid _setjmp/_longjmp problems with local nonvolatile variables.
2304 If a nonvolatile local variable is written before a _longjmp to
2305 the frame containing the variable, and is read after the _longjmp,
2306 the value read is indeterminate. Some local variables of type
2307 'struct handler' and 'struct catchtag' are used in this way, so
2308 mark each of their slots as volatile if the slot can be set before
2309 _longjmp and read afterwards.
2310 * lisp.h (struct handler): var and chosen_clause are now volatile.
2311 (struct catchtag): val, next, and pdlcount are now volatile.
2313 * bidi.c (bidi_push_it, bidi_pop_it):
2314 * fns.c (copy_hash_table):
2315 * image.c (define_image_type):
2316 * keyboard.c (kbd_buffer_store_event_hold):
2317 * process.c (Fprocess_send_eof):
2318 * xfaces.c (x_create_gc) [HAVE_NS]:
2319 * xgselect.c (xg_select):
2320 Prefer assignment to memcpy when either will do.
2322 * alloc.c (discard_killed_buffers): Tune and simplify a bit.
2323 Use pointer-to-a-pointer to simplify and avoid a NILP check each
2324 time an item is removed. No need to mark this function 'inline';
2325 the compiler knows better than we do.
2327 2012-09-11 Jan Djärv <jan.h.d@swipnet.se>
2329 * nsterm.m (ns_judge_scroll_bars): Pass NO to updateFrameSize.
2330 (updateFrameSize:): Add delay parameter to updateFrameSize, send it
2331 to change_frame_size (Bug#12388).
2332 (windowDidResize:): Pass YES to updateFrameSize.
2334 * nsterm.h: Add delay parameter to updateFrameSize.
2336 2012-09-11 Dmitry Antipov <dmantipov@yandex.ru>
2338 Discard killed buffers from deleted window and frame objects.
2339 This reduces an amount of references to killed buffers and
2340 helps GC to reclaim them faster.
2341 * alloc.c (discard_killed_buffers): New function.
2342 (mark_object): Use it for deleted windows and frames.
2343 (mark_object): If symbol's value is set up for a killed buffer
2344 or deleted frame, restore its global binding.
2345 * data.c (swap_in_global_binding): Add GC notice.
2346 (swap_in_symval_forwarding): Use convenient set_blv_where.
2347 * window.c (wset_next_buffers, wset_prev_buffers): Move ...
2348 * window.h: ... to here.
2350 2012-09-11 Dmitry Antipov <dmantipov@yandex.ru>
2352 Convenient macro to check whether the buffer is live.
2353 * buffer.h (BUFFER_LIVE_P): New macro.
2354 * alloc.c, buffer.c, editfns.c, insdel.c, lread.c, marker.c:
2355 * minibuf.c, print.c, process.c, window.c, xdisp.c: Use it.
2357 2012-09-11 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
2359 * xdisp.c (right_overwritten, right_overwriting): Also handle gstring
2360 composition cases (Bug#12364).
2362 * xterm.c (x_draw_glyph_string): Avoid overwriting inverted left
2363 overhang of succeeding glyphs overlapping box cursor.
2365 * w32term.c (x_draw_glyph_string): Likewise.
2367 2012-09-11 Paul Eggert <eggert@cs.ucla.edu>
2369 Simplify, document, and port floating-point (Bug#12381).
2370 The porting part of this patch fixes bugs on non-IEEE platforms
2371 with frexp, ldexp, logb.
2372 * data.c, lisp.h (Qdomain_error, Qsingularity_error, Qunderflow_error):
2374 * floatfns.c: Simplify discussion of functions that Emacs doesn't
2375 support, by removing commented-out code and briefly listing the
2376 C89 functions excluded. The commented-out stuff was confusing
2377 maintenance, e.g., we thought we needed cbrt but it was commented out.
2378 (logb): Remove decl; no longer needed.
2379 (isfinite): New macro, if not already supplied.
2380 (isnan): Don't replace any existing macro.
2381 (Ffrexp, Fldexp): Define even if !HAVE_COPYSIGN, as frexp and ldexp
2382 are present on all C89 platforms.
2383 (Ffrexp): Do not special-case zero, as frexp does the right thing
2385 (Flogb): Do not use logb, as it doesn't have the desired meaning
2386 on hosts that use non-base-2 floating point. Instead, stick with
2387 frexp, which is C89 anyway. Do not pass an infinity or a NaN to
2388 frexp, to avoid getting an unspecified result.
2390 * xdisp.c (Qinhibit_debug_on_message): Now static.
2392 2012-09-10 Jan Djärv <jan.h.d@swipnet.se>
2394 * nsterm.m (ns_update_begin): Set clip path to whole view by using
2395 NSBezierPath (Bug#12131).
2397 2012-09-10 Chong Yidong <cyd@gnu.org>
2399 * fns.c (Fdelq, Fdelete): Doc fix.
2401 2012-09-10 Paul Eggert <eggert@cs.ucla.edu>
2403 * lisp.h (XSETINT, XSETCONS, XSETVECTOR, XSETSTRING, XSETSYMBOL)
2404 (XSETFLOAT, XSETMISC): Parenthesize macro bodies.
2406 2012-09-09 Stefan Monnier <monnier@iro.umontreal.ca>
2408 * lisp.h (make_lisp_ptr): New macro to replace XSET.
2409 (XSETCONS, XSETVECTOR, XSETSTRING, XSETSYMBOL, XSETFLOAT, XSETMISC):
2412 2012-09-09 Eli Zaretskii <eliz@gnu.org>
2414 * fringe.c (draw_fringe_bitmap_1): Don't reduce the width of the
2415 left fringe if the window has a left margin. This avoids leaving
2416 traces of the cursor because its leftmost pixel is not drawn over.
2418 * dispnew.c (update_window_line): When the left margin area of a
2419 screen line is updated, set the redraw_fringe_bitmaps_p flag of
2420 that screen line. (Bug#12277)
2422 2012-09-09 Paul Eggert <eggert@cs.ucla.edu>
2424 Assume C89 or later for math functions (Bug#12381).
2425 This simplifies the code, and makes it a bit smaller and faster,
2426 and (most important) makes it easier to clean up signal handling
2427 since we can stop worring about floating-point exceptions in
2428 library code. That was a problem before C89, but the problem
2429 went away many years ago on all practical Emacs targets.
2430 * data.c, image.c, lread.c, print.c:
2431 Don't include <math.h>; no longer needed.
2432 * data.c, floatfns.c (IEEE_FLOATING_POINT): Don't worry that it
2433 might be autoconfigured, as that never happens.
2435 * doprnt.c (DBL_MAX_10_EXP):
2436 * print.c (DBL_DIG):
2437 Remove. C89 or later always defines these.
2438 * floatfns.c (HAVE_MATHERR, FLOAT_CHECK_ERRNO, FLOAT_CHECK_DOMAIN)
2439 (in_float, float_error_arg, float_error_arg2, float_error_fn_name)
2440 (arith_error, domain_error, domain_error2):
2441 Remove all this pre-C89 cruft. Do not include <errno.h> as that's
2442 no longer needed -- we simply return what C returns. All uses removed.
2443 (IN_FLOAT, IN_FLOAT2): Remove. All uses replaced with
2445 (FLOAT_TO_INT, FLOAT_TO_INT2, range_error, range_error2):
2446 Remove. All uses expanded, as these macros are no longer used
2447 more than once and are now more trouble than they're worth.
2448 (Ftan): Use tan, not sin / cos.
2449 (Flogb): Assume C89 frexp.
2450 (fmod_float): Assume C89 fmod.
2451 (matherr) [HAVE_MATHERR]: Remove; no longer needed.
2452 (init_floatfns): Remove. All uses removed.
2454 2012-09-08 Jan Djärv <jan.h.d@swipnet.se>
2456 * nsterm.m (ns_draw_fringe_bitmap, ns_dumpglyphs_image): Take back
2457 compositeToPoint for OSX < 10.6 (Bug#12390).
2459 2012-09-08 Paul Eggert <eggert@cs.ucla.edu>
2461 * floatfns.c (Ftan): Use tan (x), not (sin (x) / cos (x)).
2462 This produces more-accurate results.
2464 2012-09-08 Jan Djärv <jan.h.d@swipnet.se>
2466 * nsterm.m (updateFrameSize): Call setFrame: on the view when size
2467 changes (Bug#12088).
2469 2012-09-08 Chong Yidong <cyd@gnu.org>
2471 * syntax.c (Fstring_to_syntax): Doc fix.
2473 2012-09-08 Jan Djärv <jan.h.d@swipnet.se>
2475 * nsterm.m (ns_clip_to_row): Remove code that deals with drawing fringe
2476 in the internal border.
2477 (x_set_window_size): Remove static variables and their usage.
2478 (ns_redraw_scroll_bars): Fix NSTRACE arg.
2479 (ns_after_update_window_line, ns_draw_fringe_bitmap):
2480 Remove fringe/internal border adjustment (Bug#11052).
2481 (ns_draw_fringe_bitmap): Make code more like other terms (xterm.c).
2482 (ns_draw_window_cursor): Remove fringe/internal border adjustment.
2483 (ns_fix_rect_ibw): Remove.
2484 (ns_get_glyph_string_clip_rect): Remove call to ns_fix_rect_ibw.
2485 (ns_dumpglyphs_box_or_relief): Ditto.
2486 (ns_maybe_dumpglyphs_background): Remove fringe/internal border
2488 (ns_dumpglyphs_image): Ditto.
2489 (ns_dumpglyphs_stretch): Fix coding style. Remove fringe/internal
2491 (ns_set_vertical_scroll_bar): Remove variables barOnVeryLeft/Right and
2492 their usage. Add fringe_extended_p and its use as in other terms.
2493 (ns_judge_scroll_bars): Code style fix. Call updateFrameSize if
2494 scroll bar was removed.
2495 (updateFrameSize): New function.
2496 (windowDidResize): Move code to updateFrameSize and call it.
2498 * nsterm.h (EmacsView): Add updateFrameSize.
2500 2012-09-07 Chong Yidong <cyd@gnu.org>
2502 * textprop.c (Fget_text_property): Minor doc fix (Bug#12323).
2504 * data.c (Flocal_variable_if_set_p): Doc fix (Bug#10713).
2506 2012-09-07 Paul Eggert <eggert@cs.ucla.edu>
2508 More signal-handler cleanup (Bug#12327).
2509 * emacs.c (main): Convert three 'signal' calls to 'sigaction' calls.
2510 Problem introduced when merging patches. Noted by Eli Zaretskii in
2511 <http://bugs.gnu.org/12327#67>.
2512 * floatfns.c: Comment fix.
2513 * lisp.h (force_auto_save_soon): Declare regardless of SIGDANGER.
2514 SIGDANGER might not be in scope so "#ifdef SIGDANGER" is not right,
2515 and anyway the declaration is harmless even if SIGDANGER is not defined.
2516 * syssignal.h (SIGIO): Also #undef if (! defined FIONREAD ||
2517 defined BROKEN_FIONREAD). systty.h formerly did this, but other
2518 source files not surprisingly expected syssignal.h to define, or
2519 not define, SIGIO, and it's cleaner to do it that way, for consistency.
2520 Include <sys/ioctl.h>, for FIONREAD.
2521 * systty.h (SIGIO): Do not #undef here; it's now syssignal.h's job.
2522 This eliminates a problem whereby other files mysteriously had
2523 to include "syssignal.h" before including "systty.h" if they
2524 wanted to use "#ifdef SIGIO".
2526 2012-09-07 Eli Zaretskii <eliz@gnu.org>
2528 * w32proc.c (sigaction): New function, emulates Posix 'sigaction'.
2530 * w32.c (sigemptyset): Empty the set.
2531 (sigsetmask, sigmask, sigblock, sigunblock): Remove unused functions.
2533 * alloc.c [ENABLE_CHECKING]: Include signal.h, since we need SIGABRT.
2535 2012-09-07 Dmitry Antipov <dmantipov@yandex.ru>
2537 * alloc.c (mark_buffer): Revert unsafe marking optimization.
2538 (mark_object): Likewise for frame objects.
2540 2012-09-07 Paul Eggert <eggert@cs.ucla.edu>
2542 * syssignal.h (handle_on_main_thread): Always declare,
2543 even if FORWARD_SIGNAL_TO_MAIN_THREAD is not defined.
2544 This ports to platforms without HAVE_PTHREAD.
2546 2012-09-06 Paul Eggert <eggert@cs.ucla.edu>
2548 Signal-handler cleanup (Bug#12327).
2549 Emacs's signal handlers were written in the old 4.2BSD style with
2550 sigblock and sigmask and so forth, and this led to some
2551 inefficiencies and confusion. Rewrite these to use
2552 pthread_sigmask etc. without copying signal sets around. Also,
2553 get rid of the confusing macros 'SIGNAL_THREAD_CHECK' and
2554 'signal', and instead use functions that do not attempt to take
2555 over the system name space. This patch causes Emacs's text
2556 segment to shrink by 0.7% on my platform, Fedora 17 x86-64.
2557 * alloc.c, emacsgtkfixed.c, nsfns.m, widget.c, xmenu.c:
2558 Do not include <signal.h> or "syssignal.h", as these
2559 modules do not use signals.
2560 * atimer.c, callproc.c, data.c, dispnew.c, emacs.c, floatfns.c:
2561 * gtkutil.c, keyboard.c, process.c, sound.c, sysdep.c, term.c, xterm.c:
2562 Do not include <signal.h>, as "syssignal.h" does that for us now.
2563 * atimer.c (sigmask_atimers): New function.
2564 (block_atimers, unblock_atimers): New functions,
2565 replacing the old macros BLOCK_ATIMERS and UNBLOCK_ATIMERS.
2567 * conf_post.h [SIGNAL_H_AHB]: Do not include <signal.h>;
2568 no longer needed here.
2569 * emacs.c (main): Inspect existing signal handler with sigaction,
2570 so that there's no need to block and unblock SIGHUP.
2571 * sysdep.c (struct save_signal): New member 'action', replacing
2572 old member 'handler'.
2573 (save_signal_handlers, restore_signal_handlers):
2574 Use sigaction instead of 'signal' to save and restore.
2575 (get_set_sighandler, set_sighandler) [!WINDOWSNT]:
2576 New function. All users of 'signal' modified to use set_sighandler
2577 if they're writeonly, and to use sys_signal if they're read+write.
2578 (emacs_sigaction_init, forwarded_signal): New functions.
2579 (sys_signal): Remove. All uses replaced by calls to sigaction
2580 and emacs_sigaction_init, or by direct calls to 'signal'.
2581 (sys_sigmask) [!__GNUC__]: Remove; no longer needed.
2582 (sys_sigblock, sys_sigunblock, sys_sigsetmask): Remove;
2583 all uses replaced by pthread_sigmask etc. calls.
2584 * syssignal.h: Include <signal.h>.
2585 (emacs_sigaction_init, forwarded_signal): New decls.
2586 (SIGMASKTYPE): Remove. All uses replaced by its definiens, sigset_t.
2587 (SIGEMPTYMASK): Remove; all uses replaced by its definiens, empty_mask.
2588 (sigmask, sys_sigmask): Remove; no longer needed.
2589 (sigpause): Remove. All uses replaced by its definiens, sigsuspend.
2590 (sigblock, sigunblock, sigfree):
2591 (sigsetmask) [!defined sigsetmask]:
2592 Remove. All uses replaced by pthread_sigmask.
2593 (signal): Remove. Its remaining uses (with SIG_DFL and SIG_IGN)
2594 no longer need to be replaced, and its typical old uses
2595 are now done via emacs_sigaction_init and sigaction.
2596 (sys_sigblock, sys_sigunblock, sys_sigsetmask): Remove decls.
2597 (sys_sigdel): Remove; unused.
2598 (NSIG): Remove a FIXME; the code's fine. Remove an unnecessary ifdef.
2600 2012-09-06 Eli Zaretskii <eliz@gnu.org>
2602 * process.c (CAN_HANDLE_MULTIPLE_CHILDREN): Fix a typo that broke
2603 SIGCHLD handling on systems that don't have WNOHANG. (Bug#12327)
2605 2012-09-06 Dmitry Antipov <dmantipov@yandex.ru>
2607 Explicitly mark buffer_defaults and buffer_local_symbols.
2608 * alloc.c (Fgarbage_collect): Mark buffer_defaults and
2609 mark_local_symbols here.
2610 (mark_object): If GC_CHECK_MARKED_OBJECTS, simplify checking
2611 since special buffers aren't marked here any more.
2612 (allocate_buffer): Chain new buffer with all_buffers here...
2613 * buffer.c (Fget_buffer_create, Fmake_indirect_buffer): ...and
2615 (Vbuffer_defaults, Vbuffer_local_symbols): Remove.
2616 (syms_of_buffer): Remove staticpro of the above.
2617 (init_buffer_once): Set names for buffer_defaults and
2618 buffer_local_symbols.
2620 2012-09-06 Paul Eggert <eggert@cs.ucla.edu>
2622 Use bool for booleans in font-related modules.
2623 * font.c (font_intern_prop, font_style_to_value)
2624 (font_style_symbolic, font_parse_xlfd, font_parse_fcname)
2625 (generate_otf_features, font_check_otf_features, font_check_otf)
2626 (font_match_p, font_list_entities, font_at):
2627 * fontset.c (fontset_id_valid_p, reorder_font_vector
2628 (fontset_find_font, Fset_fontset_font)
2629 (face_suitable_for_char_p) [0]:
2630 * ftfont.c (fc_initialized, ftfont_get_open_type_spec)
2631 (ftfont_open, ftfont_text_extents, ftfont_check_otf):
2632 (m17n_flt_initialized, ftfont_shape_by_flt):
2633 * ftxfont.c (ftxfont_draw_bitmap, ftxfont_draw):
2634 * nsfont.m (nsfont_draw):
2635 * w32font.c (w32font_draw):
2636 * w32term.c (x_draw_glyphless_glyph_string_foreground):
2637 Use bool for booleans.
2638 * font.h: Adjust to above API changes.
2639 (struct font, struct font_driver, struct font_driver_list):
2640 Use bool for booleans.
2641 (struct font): Remove useless member encoding_type.
2643 * fontset.c, xftfont.c: Omit unnecessary static decls.
2645 2012-09-06 Dmitry Antipov <dmantipov@yandex.ru>
2647 * alloc.c (mark_object): Revert window marking code
2648 since it's unsafe for the Fset_window_configuration.
2650 2012-09-05 Paul Eggert <eggert@cs.ucla.edu>
2652 Fix race conditions with signal handlers and errno (Bug#12327).
2653 Be more systematic about preserving errno whenever a signal
2654 handler returns, even if it's not in the main thread. Do this by
2655 renaming signal handlers to distinguish between signal delivery
2656 and signal handling. All uses changed.
2657 * atimer.c (deliver_alarm_signal): Rename from alarm_signal_handler.
2658 * data.c (deliver_arith_signal): Rename from arith_error.
2659 * dispnew.c (deliver_window_change_signal): Rename from
2660 window_change_signal.
2661 * emacs.c (deliver_error_signal): Rename from fatal_error_signal.
2662 (deliver_danger_signal) [SIGDANGER]: Rename from memory_warning_signal.
2663 * keyboard.c (deliver_input_available_signal): Rename from
2664 input_available_signal.
2665 (deliver_user_signal): Rename from handle_user_signal.
2666 (deliver_interrupt_signal): Rename from interrupt_signal.
2667 * process.c (deliver_pipe_signal): Rename from send_process_trap.
2668 (deliver_child_signal): Rename from sigchld_handler.
2669 * atimer.c (handle_alarm_signal):
2670 * data.c (handle_arith_signal):
2671 * dispnew.c (handle_window_change_signal):
2672 * emacs.c (handle_fatal_signal, handle_danger_signal):
2673 * keyboard.c (handle_input_available_signal):
2674 * keyboard.c (handle_user_signal, handle_interrupt_signal):
2675 * process.c (handle_pipe_signal, handle_child_signal):
2676 New functions, with the actual signal-handling code taken from the
2677 original respective signal handlers, sans the sporadic attempts to
2678 preserve errno, since that's now done by handle_on_main_thread.
2679 * atimer.c (alarm_signal_handler): Remove unnecessary decl.
2680 * emacs.c, floatfns.c, lisp.h: Remove unused FLOAT_CATCH_SIGKILL cruft.
2681 * emacs.c (main_thread) [FORWARD_SIGNAL_TO_MAIN_THREAD]:
2683 (main) [FORWARD_SIGNAL_TO_MAIN_THREAD]:
2684 Move initialization of main_thread to sysdep.c's init_signals.
2685 * process.c (waitpid) [!WNOHANG]: #define to wait; that's good enough for
2686 our usage, and simplifies the mainline code.
2687 (record_child_status_change): New static function, as a helper
2688 for handle_child_signal, and with most of the old child handler's
2690 (CAN_HANDLE_MULTIPLE_CHILDREN): New constant.
2691 (handle_child_signal): Use the above.
2692 * sysdep.c (main_thread) [FORWARD_SIGNAL_TO_MAIN_THREAD]:
2693 Moved here from emacs.c.
2694 (init_signals) [FORWARD_SIGNAL_TO_MAIN_THREAD]: Initialize it;
2695 code moved here from emacs.c's main function.
2696 * sysdep.c, syssignal.h (handle_on_main_thread): New function,
2697 replacing the old SIGNAL_THREAD_CHECK. All uses changed.
2698 This lets callers save and restore errno properly.
2700 2012-09-05 Dmitry Antipov <dmantipov@yandex.ru>
2702 Remove redundant or unused things here and there.
2703 * lisp.h (CYCLE_CHECK, CHAR_TABLE_TRANSLATE): Remove.
2704 * conf_post.h (RE_TRANSLATE): Use char_table_translate.
2705 * editfns.c (Fcompare_buffer_substrings): Likewise.
2706 * frame.h (struct terminal, struct font_driver_list):
2707 Remove redundant declarations.
2708 * window.h (Qleft, Qright): Likewise.
2710 2012-09-05 Dmitry Antipov <dmantipov@yandex.ru>
2712 Do not mark objects from deleted buffers, windows and frames.
2713 * alloc.c (mark_buffer): Mark just the buffer if it is dead.
2714 (mark_object): Likewise for windows and frames.
2716 2012-09-05 Dmitry Antipov <dmantipov@yandex.ru>
2718 * alloc.c (valid_lisp_object_p): Treat killed buffers,
2719 buffer_defaults and buffer_local_symbols as valid objects.
2720 Return special value to denote them.
2722 2012-09-05 Paul Eggert <eggert@cs.ucla.edu>
2724 * fileio.c, filelock.c, floatfns.c, fns.c: Use bool for boolean.
2725 * fileio.c (auto_saving, auto_save_error_occurred, make_temp_name)
2726 (Fexpand_file_name, barf_or_query_if_file_exists, Fcopy_file)
2727 (file_name_absolute_p, Fsubstitute_in_file_name):
2728 (check_executable, check_writable, Ffile_accessible_directory_p)
2729 (Fset_file_selinux_context, Fdefault_file_modes)
2730 (Finsert_file_contents, choose_write_coding_system)
2731 (Fwrite_region, build_annotations, a_write, e_write)
2733 * filelock.c (boot_time_initialized, get_boot_time)
2734 (get_boot_time_1, lock_file_1, within_one_second):
2735 * floatfns.c (in_float):
2736 * fns.c (concat, internal_equal, Frequire, base64_encode_1)
2737 (base64_decode_1, cmpfn_eql, cmpfn_user_defined)
2738 (sweep_weak_table, sweep_weak_hash_tables, secure_hash):
2739 * lisp.h (struct Lisp_Hash_Table.cmpfn):
2740 * window.c (compare_window_configurations):
2741 Use bool for booleans.
2742 * fileio.c (auto_saving_dir_umask, auto_saving_mode_bits)
2743 (Fdefault_file_modes): Now mode_t, not int, for modes.
2744 (Fdo_auto_save): Set a boolean to 1 rather than using ++.
2745 (internal_delete_file): Now returns void, not a (boolean) int,
2746 since nobody was looking at the return value.
2747 * lisp.h, window.h: Adjust to above API changes.
2749 * xdisp.c (set_message): Simplify and reindent last change.
2751 2012-09-05 Juanma Barranquero <lekktu@gmail.com>
2753 * makefile.w32-in ($(BLD)/sysdep.$(O)): Update dependencies.
2755 2012-09-04 Lars Ingebrigtsen <larsi@gnus.org>
2757 * eval.c (call_debugger): Make the function non-static so that we
2758 can call it from set_message.
2760 * xdisp.c (set_message): Implement the new variable `debug-on-message'.
2761 (syms_of_xdisp): Defvar it and `inhibit-debug-on-message'.
2763 2012-09-04 Paul Eggert <eggert@cs.ucla.edu>
2765 Give more-useful info on a fatal error (Bug#12328).
2766 * alloc.c [ENABLE_CHECKING]: Do not include <execinfo.h>.
2767 (die) [ENABLE_CHECKING]: Call fatal_error_backtrace instead
2768 of doing the work ourselves.
2769 * emacs.c (fatal_error_signal): Let fatal_error_backtrace
2770 do most of the work.
2771 (fatal_error_backtrace): New function, taken from the guts
2772 of the old fatal_error_signal, but with a new option to output
2774 (shut_down_emacs) [!DOS_NT]: Use strsignal to give more-useful
2775 info about the signal than just its number.
2776 * lisp.h (fatal_error_backtrace, emacs_backtrace): New decls.
2777 * sysdep.c: Include <execinfo.h>
2778 (emacs_backtrace): New function, taken partly from the previous
2779 code of the 'die' function.
2780 (emacs_abort): Call fatal_error_backtrace rather than abort.
2782 2012-09-04 Stefan Monnier <monnier@iro.umontreal.ca>
2784 * lread.c (readevalloop): Call internal-macroexpand-for-load to perform
2785 eager (load-time) macro-expansion.
2786 * lisp.mk (lisp): Add macroexp.
2788 2012-09-04 Paul Eggert <eggert@cs.ucla.edu>
2790 Simplify redefinition of 'abort' (Bug#12316).
2791 Do not try to redefine the 'abort' function. Instead, redo
2792 the code so that it calls 'emacs_abort' rather than 'abort'.
2793 This removes the need for the NO_ABORT configure-time macro
2794 and makes it easier to change the abort code to do a backtrace.
2795 * .gdbinit: Just stop at emacs_abort, not at w32_abort or abort.
2796 * emacs.c (abort) [!DOS_NT && !NO_ABORT]:
2797 Remove; sysdep.c's emacs_abort now takes its place.
2798 * lisp.h (emacs_abort): New decl. All calls from Emacs code to
2799 'abort' changed to use 'emacs_abort'.
2800 * msdos.c (dos_abort) [defined abort]: Remove; not used.
2801 (abort) [!defined abort]: Rename to ...
2802 (emacs_abort): ... new name.
2803 * sysdep.c (emacs_abort) [!HAVE_NTGUI]: New function, taking
2804 the place of the old 'abort' in emacs.c.
2805 * w32.c, w32fns.c (abort): Do not #undef.
2806 * w32.c (emacs_abort): Rename from w32_abort.
2808 2012-09-04 Eli Zaretskii <eliz@gnu.org>
2810 * w32uniscribe.c (uniscribe_shape): Reverse the sign of
2811 offsets[j].dv, since the y axis of the screen coordinates points
2812 down, while the y axis of the font definition coordinates points
2813 up. This fixes display of Arabic diacritics such as KASRA and
2814 KASRATAN. (Bug#11860)
2816 2012-09-04 Paul Eggert <eggert@cs.ucla.edu>
2818 Be more systematic about _setjmp vs setjmp.
2819 * alloc.c (test_setjmp, mark_stack):
2820 * image.c (PNG_LONGJMP) [PNG_LIBPNG_VER < 10500]:
2821 (PNG_JMPBUF) [! (PNG_LIBPNG_VER < 10500)]:
2822 (png_load, my_error_exit, jpeg_load):
2823 * process.c (send_process_trap, send_process):
2824 Uniformly prefer _setjmp and _longjmp to setjmp and longjmp.
2825 The underscored versions are up to 30x faster on some hosts.
2826 Formerly, the code used setjmp+longjmp sometimes and
2827 _setjmp+_longjmp at other times, with no particular reason to
2828 prefer setjmp+longjmp.
2830 2012-09-03 Paul Eggert <eggert@cs.ucla.edu>
2832 Fix minor problem found by static checking.
2833 * buffer.c (Fdelete_all_overlays): Return nil.
2835 2012-09-03 Martin Rudalics <rudalics@gmx.at>
2837 * buffer.c (Fdelete_all_overlays): New function.
2839 2012-09-03 Chong Yidong <cyd@gnu.org>
2841 * gtkutil.c: Add extern decl for Qxft.
2843 2012-09-02 Paul Eggert <eggert@cs.ucla.edu>
2845 * emacs.c, eval.c: Use bool for boolean.
2846 * emacs.c (initialized, inhibit_window_system, running_asynch_code):
2847 (malloc_using_checking) [DOUG_LEA_MALLOC]:
2848 (display_arg) [HAVE_X_WINDOWS || HAVE_NS]:
2849 (noninteractive, no_site_lisp, fatal_error_in_progress, argmatch)
2850 (main, decode_env_path, Fdaemon_initialized):
2851 * eval.c (call_debugger, Finteractive_p, interactive_p):
2852 (unwind_to_catch, Fsignal, wants_debugger, skip_debugger)
2853 (maybe_call_debugger, Fbacktrace):
2854 * process.c (read_process_output, exec_sentinel):
2855 Use bool for booleans.
2856 * emacs.c (shut_down_emacs): Omit unused boolean argument NO_X.
2857 All callers changed.
2858 * eval.c (interactive_p): Omit always-true boolean argument
2859 EXCLUDE_SUBRS_P. All callers changed.
2860 * dispextern.h, lisp.h: Reflect above API changes.
2861 * firstfile.c (dummy): Use the address of 'main', whose signature
2862 won't change, instead of the address of 'initialize', whose
2863 signature just changed from int to bool.
2864 * lisp.h (fatal_error_in_progress): New decl of boolean, moved here ...
2865 * msdos.c (fatal_error_in_progress): ... from here.
2866 * xdisp.c (redisplaying_p): Now a boolean. Set it to 1 instead
2868 (redisplay_internal, unwind_redisplay): Simply clear
2869 REDISPLAYING_P when unwinding, instead of saving its previous,
2870 always-false value and then restoring it.
2872 Clean up some extern decls.
2873 Mostly, this hoists extern decls out of .c files and into .h files.
2874 That way, we're more likely to catch errors if the interfaces change.
2875 * alloc.c [USE_GTK]: Include "gtkutil.h" so that we need not
2876 declare xg_mark_data.
2877 * dispextern.h (x_frame_parm_handlers):
2879 * lisp.h (Qlexical_binding, Qinternal_interpreter_environment)
2880 (Qextra_light, Qlight, Qsemi_light, Qsemi_bold, Qbold, Qextra_bold)
2881 (Qultra_bold, Qoblique, Qitalic):
2882 Move extern decl here from .c file.
2883 * alloc.c (xg_mark_data) [USE_GTK]:
2885 * eval.c (Qlexical_binding):
2886 * fns.c (time) [!HAVE_UNISTD_H]:
2887 * gtkutil.c (Qxft, Qnormal, Qextra_light, Qlight, Qsemi_light)
2888 (Qsemi_bold, Qbold, Qextra_bold, Qultra_bold, Qoblique, Qitalic):
2889 * image.c (Vlibrary_cache, QCloaded_from) [HAVE_NTGUI]:
2890 * lread.c (Qinternal_interpreter_environment):
2891 * minibuf.c (Qbuffer):
2892 * process.c (QCfamily, QCfilter):
2893 * widget.c (free_frame_faces):
2894 * xfaces.c (free_frame_menubar) [USE_X_TOOLKIT]:
2895 * xfont.c (x_clear_errors):
2896 * xterm.c (x_frame_parm_handlers):
2897 Remove now-redundant extern decls.
2898 * keyboard.c, keyboard.h (ignore_mouse_drag_p) [USE_GTK || HAVE_NS]:
2899 * xfaces.c (Qultra_light, Qreverse_oblique, Qreverse_italic):
2901 * xfaces.c: Remove unnecessary static decls.
2902 * xterm.c (updating_frame): Remove decl of nonexistent object.
2904 * Makefile.in (gl-stamp): Don't scan $(SOME_MACHINE_OBJECTS)
2905 when building globals.h, as the objects that are not built on
2906 this host are not needed to compile C files on this host.
2908 2012-09-02 Jan Djärv <jan.h.d@swipnet.se>
2910 * gtkutil.h: Remove prototype for x_wm_set_size_hint.
2912 * frame.h: Add missing prototype for x_wm_set_size_hint.
2914 2012-09-02 Paul Eggert <eggert@cs.ucla.edu>
2916 * doc.c, editfns.c, insdel.c, intervals.c: Use bool for boolean.
2917 * doc.c (read_bytecode_char, get_doc_string, reread_doc_file)
2918 (Fdocumentation, Fdocumentation_property, Fsnarf_documentation)
2919 (Fsubstitute_command_keys):
2920 * editfns.c (region_limit, find_field, Fconstrain_to_field)
2921 (save_excursion_save, save_excursion_restore)
2922 (disassemble_lisp_time, decode_time_components, emacs_nmemftime)
2923 (format_time_string, general_insert_function)
2924 (make_buffer_string, make_buffer_string_both)
2925 (Fsubst_char_in_region, Ftranslate_region_internal, Fformat):
2926 * insdel.c (check_markers, gap_left, adjust_markers_for_insert)
2927 (copy_text, insert_1, insert_1_both, insert_from_string)
2928 (insert_from_string_before_markers, insert_from_string_1)
2929 (insert_from_buffer, insert_from_buffer_1, replace_range)
2930 (replace_range_2, del_range_1, del_range_byte, del_range_both)
2931 (del_range_2, modify_region):
2932 * intervals.c (intervals_equal, balance_possible_root_interval)
2933 (adjust_intervals_for_insertion, merge_properties_sticky)
2934 (graft_intervals_into_buffer, lookup_char_property)
2935 (adjust_for_invis_intang, set_point_both)
2936 (get_property_and_range, compare_string_intervals)
2937 (set_intervals_multibyte_1, set_intervals_multibyte):
2938 * keyboard.c (decode_timer):
2939 Use bool for boolean.
2940 * intervals.h, lisp.h, systime.h: Reflect above API changes.
2941 * editfns.c (struct info): Use 1-bit unsigned bitfields for booleans.
2943 2012-09-02 Chong Yidong <cyd@gnu.org>
2945 * keymap.c (push_key_description): Print M-TAB as C-M-i
2948 2012-09-02 Juanma Barranquero <lekktu@gmail.com>
2950 * makefile.w32-in (CCL_H, W32FONT_H): New macros.
2951 (ATIMER_H, FONT_H, $(BLD)/alloc.$(O), $(BLD)/callproc.$(O))
2952 ($(BLD)/editfns.$(O), $(BLD)/ccl.$(O), $(BLD)/chartab.$(O))
2953 ($(BLD)/coding.$(O), $(BLD)/sysdep.$(O), $(BLD)/fontset.$(O))
2954 ($(BLD)/sysdep.$(O), $(BLD)/w32fns.$(O), $(BLD)/keyboard.$(O))
2955 ($(BLD)/w32term.$(O), $(BLD)/w32menu.$(O), $(BLD)/process.$(O))
2956 ($(BLD)/w32font.$(O), $(BLD)/w32uniscribe.$(O)): Update dependencies.
2958 2012-09-01 Eli Zaretskii <eliz@gnu.org>
2960 * w32uniscribe.c (uniscribe_shape): Handle correctly the case of
2961 more than one grapheme cluster passed to the shaper: compute the
2962 offset adjustment values separately for each cluster. (Bug#11860)
2964 * image.c: Restore mistakenly removed inclusion of w32.h. Without
2965 it, GCC doesn't see prototypes of w32_delayed_load, and complains
2966 about implicit conversions from integer to pointer.
2968 2012-09-01 Daniel Colascione <dancol@dancol.org>
2970 * w32fns.c (x_display_info_for_name): Prevent crash if w32 window
2971 system used too early.
2973 2012-09-01 Paul Eggert <eggert@cs.ucla.edu>
2975 Better seed support for (random).
2976 * emacs.c (main): Call init_random.
2977 * fns.c (Frandom): Set the seed from a string argument, if given.
2978 Remove long-obsolete Gentzel cruft.
2979 * lisp.h, sysdep.c (seed_random): Now takes address and size, not long.
2980 (init_random): New function.
2982 2012-09-01 Daniel Colascione <dancol@dancol.org>
2984 * xterm.h: Add header guards. Declare x_menubar_window_to_frame.
2985 Remove x_set_frame_alpha, x_bitmap_icon, x_make_frame_visible,
2986 x_make_frame_invisible, x_iconify_frame, x_free_frame_resources,
2987 x_wm_set_size_hint, x_query_colors, x_real_positions,
2988 x_set_menu_bar_lines, x_char_width, x_char_height, x_sync,
2989 x_set_tool_bar_lines, x_activate_menubar, and free_frame_menubar,
2990 all of which have been moved to common code.
2992 * xfaces.c: Include TERM_HEADER instead of listing all possible
2993 window-system headers.
2995 * w32xfns.c (x_sync): Correct definition of x_sync (a no-op here)
2998 * w32term.h (FRAME_X_WINDOW): Use FRAME_W32_WINDOW instead of
2999 directly accessing frame internals.
3001 * w32font.h: Include font.h. Define syms_of_w32font and
3004 * process.c: Include TERM_HEADER instead of listing all possible
3005 window-system headers.
3007 * nsterm.h: Remove declarations now in frame.h.
3008 Define FRAME_X_SCREEN, FRAME_X_VISUAL.
3010 * menu.c: Include TERM_HEADER instead of listing all possible
3011 window-system headers.
3013 * keyboard.h: Declare ignore_mouse_drag_p whenever we have a
3016 * keyboard.c: Include TERM_HEADER instead of listing all possible
3017 window-system headers.
3019 * image.c: Include TERM_HEADER instead of listing all possible
3020 window-system headers. Declare Vlibrary_cache when compiling for
3023 * gtkutil.h (xg_list_node_): Include xterm.h to pick up needed
3024 window system declarations.
3026 * frame.h: Move common functions here: set_frame_menubar,
3027 x_set_window_size, x_sync, x_get_focus_frame,
3028 x_set_mouse_position, x_set_mouse_pixel_position,
3029 x_make_frame_visible, x_make_frame_invisible, x_iconify_frame,
3030 x_char_width, x_char_height, x_pixel_width, x_pixel_height,
3031 x_set_frame_alpha, x_set_menu_bar_lines, x_set_tool_bar_lines,
3032 x_activate_menubar, x_real_positions, x_bitmap_icon,
3033 x_set_menu_bar_lines, free_frame_menubar, x_free_frame_resources,
3036 * frame.c: Include TERM_HEADER instead of listing all possible
3037 window-system headers.
3039 * font.c: Include TERM_HEADER instead of listing all possible
3040 window-system headers.
3042 * emacs.c: Include TERM_HEADER.
3044 * dispnew.c: Include TERM_HEADER instead of listing all possible
3045 window-system headers.
3047 * ccl.h: Include character.h.
3049 * Makefile.in: Define WINDOW_SYSTEM_OBJ to hold objects needed for
3050 the current window system; include in list of objects to link into
3053 2012-08-31 Dmitry Antipov <dmantipov@yandex.ru>
3055 Remove mark_ttys function and fix tty_display_info initialization.
3056 * lisp.h (mark_ttys): Remove prototype.
3057 * alloc.c (Fgarbage_collect): Remove redundant (and the only) call
3058 to mark_ttys because all possible values of 'top_frame' slot are
3059 the frames which are reachable from Vframe_list.
3060 * term.c (mark_ttys): Remove.
3061 (init_tty): Safely initialize 'top_frame' slot with Qnil.
3063 2012-08-31 Dmitry Antipov <dmantipov@yandex.ru>
3065 Change struct frame bitfields from unsigned char to unsigned.
3066 * frame.h (struct frame): Change type of 'display_preempted',
3067 'visible', 'iconified', 'has_minibuffer', 'wants_modeline',
3068 'auto_raise', 'auto_lower', 'no_split', 'explicit_name',
3069 'window_sizes_changed', 'mouse_moved' and 'pointer_invisible'
3070 bitfields from unsigned char to unsigned.
3072 2012-08-31 Dmitry Antipov <dmantipov@yandex.ru>
3074 Remove unused member of struct x_output and struct w32_output.
3075 * xterm.h (struct x_output): Remove unused field 'needs_exposure'.
3076 * w32term.h (struct w32_output): Likewise.
3078 2012-08-30 Jan Djärv <jan.h.d@swipnet.se>
3080 * gtkutil.c (x_wm_set_size_hint): Use 1 col for base_width so it
3081 does not become zero (Bug#12234).
3083 2012-08-30 Paul Eggert <eggert@cs.ucla.edu>
3085 * dispnew.c (update_frame_1): Pacify gcc -Wstrict-overflow
3086 for GCC 4.7.1 x86-64.
3088 2012-08-30 Glenn Morris <rgm@gnu.org>
3090 * lread.c (init_lread): For out-of-tree builds, only add the
3091 source directory's site-lisp dir to the load-path if it exists,
3092 consistent with in-tree builds. (Bug#12302)
3094 2012-08-28 Jan Djärv <jan.h.d@swipnet.se>
3096 * nsmenu.m (initWithContentRect:styleMask:backing:defer:): Initialize
3097 button_values to NULL. Call setStykeMask so dialogs get a close button.
3098 (windowShouldClose:): Set window_closed.
3099 (dealloc): New member, free button_values.
3100 (process_dialog:): Make member function. Remove window argument,
3101 replace window with self. Count buttons and allocate and store values
3103 (addButton:value:row:): value is int with the name tag. Call setTag
3104 with tag. Remove return self, declare return value as void.
3105 (addString:row:): Remove return self, declare return value as void.
3106 (addSplit): Remove return self, declare return value as void.
3107 (clicked:): Remove return self, declare return value as void.
3108 Set dialog_return to button_values[seltag]. Code formatting change.
3109 (initFromContents:isQuestion:): Adjust call to process_dialog.
3110 Code formatting change.
3111 (timeout_handler:): Set timer_fired to YES.
3112 (runDialogAt:): Set timer_fired to NO.
3113 Handle click on close button as quit.
3115 * nsterm.h (EmacsDialogPanel): Make timer_fired BOOL.
3116 Add window_closed and button_values. Add void as return value for
3117 add(Button|String|Split). addButton takes int instead of Lisp_Object.
3118 Add process_dialog as new member.
3120 2012-08-28 Eli Zaretskii <eliz@gnu.org>
3122 * ralloc.c (free_bloc): Don't dereference a 'heap' structure if it
3123 is not one of the heaps we manage. (Bug#12242)
3125 2012-08-28 Glenn Morris <rgm@gnu.org>
3127 * eval.c (Fcalled_interactively_p): Doc fix. (Bug#11747)
3129 2012-08-28 Martin Rudalics <rudalics@gmx.at>
3131 * window.c (Fset_window_configuration): Remove handling of
3132 auto-buffer-name window parameter. Install revision of reverted
3135 2012-08-28 Dmitry Antipov <dmantipov@yandex.ru>
3137 Do not allow to set major mode for a dead buffer.
3138 * buffer.c (Fset_buffer_major_mode): Signal an error
3139 if the buffer is dead.
3140 (Fother_buffer, other_buffer_safely): Remove redundant
3143 2012-08-28 Dmitry Antipov <dmantipov@yandex.ru>
3145 Always use set_buffer_if_live to restore original buffer at unwind.
3146 * buffer.h (record_unwind_current_buffer): New function.
3147 * bytecode.c, dispnew.c, editfns.c, fileio.c, fns.c, insdel.c:
3148 * keyboard.c, keymap.c, minibuf.c, print.c, process.c, textprop.c:
3149 * undo.c, window.c: Adjust users.
3150 * buffer.c (set_buffer_if_live): Fix comment.
3152 2012-08-28 Dmitry Antipov <dmantipov@yandex.ru>
3154 Fix usage of set_buffer_internal.
3155 * buffer.h (set_buffer_internal): Make it BUFFER_INLINE.
3156 * buffer.c (set_buffer_if_live): Use set_buffer_internal.
3157 * coding.c (decode_coding): Omit redundant test.
3158 * fileio.c (decide_coding_unwind): Likewise.
3159 * fns.c (secure_hash): Likewise.
3160 * insdel.c (modify_region): Likewise.
3161 * keyboard.c (command_loop_1): Likewise.
3162 * print.c (PRINTFINISH): Likewise.
3163 * xdisp.c (run_window_scroll_functions): Use set_buffer_internal.
3165 2012-08-27 Paul Eggert <eggert@cs.ucla.edu>
3167 * dispnew.c: Use bool for boolean.
3168 (frame_garbaged, display_completed, delayed_size_change)
3169 (fonts_changed_p, add_window_display_history)
3170 (add_frame_display_history, verify_row_hash)
3171 (adjust_glyph_matrix, clear_window_matrices, glyph_row_slice_p)
3172 (row_equal_p, realloc_glyph_pool)
3173 (allocate_matrices_for_frame_redisplay)
3174 (showing_window_margins_p)
3175 (adjust_frame_glyphs_for_frame_redisplay)
3176 (build_frame_matrix_from_leaf_window, make_current)
3177 (mirrored_line_dance, mirror_line_dance, update_frame)
3178 (update_window_tree, update_single_window)
3179 (check_current_matrix_flags, update_window, update_text_area)
3180 (update_window_line, set_window_update_flags, scrolling_window)
3181 (update_frame_1, scrolling, buffer_posn_from_coords)
3182 (do_pending_window_change, change_frame_size)
3183 (change_frame_size_1, sit_for):
3184 Use bool for boolean.
3185 (clear_glyph_matrix_rows): Rename from enable_glyph_matrix_rows,
3186 and remove last int (actually boolean) argument, which was always 0.
3187 All callers changed.
3188 * dispextern.h, frame.h, lisp.h: Reflect above API changes.
3189 * dispextern.h (struct composition_it): Use bool for boolean.
3190 (struct glyph_matrix): Don't assume buffer sizes can fit in 'int'.
3191 (struct bidi_it): Use unsigned:1, not int, for boolean prev_was_pdf.
3192 * dired.c (file_name_completion):
3193 Use bool for boolean. (This was missed in an earlier change.)
3195 2012-08-27 Martin Rudalics <rudalics@gmx.at>
3197 * window.c (Fset_window_configuration): Revert first part of
3200 2012-08-27 Jan Djärv <jan.h.d@swipnet.se>
3202 * nsterm.h (NSPanel): New class variable dialog_return.
3204 * nsmenu.m (initWithContentRect:styleMask:backing:defer:):
3205 Initialize dialog_return.
3206 (windowShouldClose:): Use stop instead of stopModalWithCode.
3207 (clicked:): Ditto, and also set dialog_return (Bug#12258).
3208 (timeout_handler:): Use stop instead of abortModal. Send a dummy
3210 (runDialogAt:): Make ret Lisp_Object. Set it from dialog_return when
3213 2012-08-27 Paul Eggert <eggert@cs.ucla.edu>
3215 * composite.c, data.c, dbusbind.c, dired.c: Use bool for booleans.
3216 * composite.c (find_composition, composition_gstring_p)
3217 (composition_reseat_it, find_automatic_composition):
3218 * data.c (let_shadows_buffer_binding_p)
3219 (let_shadows_global_binding_p, set_internal, make_blv)
3220 (Fmake_variable_buffer_local, Fmake_local_variable)
3221 (Fmake_variable_frame_local, arithcompare, cons_to_unsigned)
3222 (cons_to_signed, arith_driver):
3223 * dbusbind.c (xd_in_read_queued_messages):
3224 * dired.c (directory_files_internal, file_name_completion):
3225 Use bool for booleans.
3226 * dired.c (file_name_completion):
3227 * process.h (fd_callback):
3228 Omit int (actually boolean) argument. It wasn't being used.
3230 * composite.h, lisp.h: Reflect above API changes.
3232 * cmds.c, coding.c: Use bool for booleans.
3233 * cmds.c (move_point, Fself_insert_command):
3234 * coding.h (struct composition status, struct coding_system):
3235 * coding.c (detect_coding_utf_8, encode_coding_utf_8)
3236 (detect_coding_utf_16, encode_coding_utf_16, detect_coding_emacs_mule)
3237 (emacs_mule_char, decode_coding_emacs_mule)
3238 (encode_coding_emacs_mule, detect_coding_iso_2022)
3239 (decode_coding_iso_2022, encode_invocation_designation)
3240 (encode_designation_at_bol, encode_coding_iso_2022)
3241 (detect_coding_sjis, detect_coding_big5, decode_coding_sjis)
3242 (decode_coding_big5, encode_coding_sjis, encode_coding_big5)
3243 (detect_coding_ccl, encode_coding_ccl, decode_coding_raw_text)
3244 (encode_coding_raw_text, detect_coding_charset)
3245 (decode_coding_charset, encode_coding_charset, detect_eol)
3246 (detect_coding, get_translation_table, produce_chars)
3247 (consume_chars, reused_workbuf_in_use)
3248 (make_conversion_work_buffer, code_conversion_save)
3249 (decode_coding_object, encode_coding_object)
3250 (detect_coding_system, char_encodable_p)
3251 (Funencodable_char_position, code_convert_region)
3252 (code_convert_string, code_convert_string_norecord)
3253 (Fset_coding_system_priority):
3254 * fileio.c (Finsert_file_contents):
3255 Use bool for booleans.
3256 * coding.h, lisp.h: Reflect above API changes.
3257 * coding.c: Remove unnecessary static function decls.
3258 (detect_coding): Use unsigned, not signed, to copy an unsigned field.
3259 (decode_coding, encode_coding, decode_coding_gap): Return 'void',
3260 not a boolean 'int', since callers never look at the return value.
3261 (ALLOC_CONVERSION_WORK_AREA): Assume caller returns 'void', not 'int'.
3262 * coding.h (decoding_buffer_size, encoding_buffer_size)
3263 (emacs_mule_string_char): Remove unused extern decls.
3264 (struct iso_2022_spec, struct coding_system):
3265 Use 'unsigned int : 1' for boolean fields, since there's more than one.
3266 (struct emacs_mule_spec): Remove unused field 'full_support'.
3267 All initializations removed.
3268 * cmds.c (internal_self_insert): Don't assume EMACS_INT fits in 'int'.
3270 2012-08-27 Dmitry Antipov <dmantipov@yandex.ru>
3272 Fix spare memory change (Bug#12286).
3273 * alloc.c (mark_maybe_pointer): Handle MEM_TYPE_SPARE.
3274 (valid_lisp_object_p): Likewise.
3276 2012-08-27 Martin Rudalics <rudalics@gmx.at>
3278 * window.c (Fset_window_configuration): Record any window's old
3279 buffer if it's replaced (see Bug#8789). If the new current
3280 buffer doesn't appear in the selected window, go to its old
3283 2012-08-27 Dmitry Antipov <dmantipov@yandex.ru>
3285 Special MEM_TYPE_SPARE to denote reserved memory.
3286 * alloc.c (enum mem_type): New memory type.
3287 (refill_memory_reserve): Use new type for spare memory.
3288 This prevents live_cons_p and live_string_p from incorrect
3289 detection of uninitialized objects from spare memory as live.
3291 2012-08-26 Paul Eggert <eggert@cs.ucla.edu>
3294 * Makefile.in (.PHONY): versioclean -> versionclean.
3296 Remove unused external symbols.
3297 * data.c (Qcons, Qfloat, Qmisc, Qstring, Qvector):
3298 * window.c (Qwindow_valid_p, decode_valid_window):
3299 Now static, not extern.
3300 * data.c (Qinterval): Remove; unused.
3301 (syms_of_data): Do not define 'interval'.
3302 * lisp.h (Qinteger, Qstring, Qmisc, Qvector, Qfloat, Qcons):
3303 * window.h (decode_valid_window):
3306 * character.c, charset.c, chartab.c: Use bool for booleans.
3307 * character.c (lisp_string_width, string_count_byte8)
3308 (string_escape_byte8):
3309 * charset.c (charset_map_loaded, load_charset_map, read_hex):
3310 (load_charset_map_from_file, map_charset_chars)
3311 (Fdefine_charset_internal, define_charset_internal)
3312 (Fdeclare_equiv_charset, find_charsets_in_text)
3313 (Ffind_charset_region, char_charset, Fiso_charset):
3314 * chartab.c (sub_char_table_ref, sub_char_table_ref_and_range)
3315 (sub_char_table_set, sub_char_table_set_range)
3316 (char_table_set_range, optimize_sub_char_table)
3317 (map_sub_char_table):
3318 Use bool for boolean.
3319 * character.c (str_to_unibyte): Omit last boolean argument; it was
3320 always 0. All callers changed.
3321 * character.h, charset.h: Adjust to match previous changes.
3322 * character.h (char_printable_p): Remove decl of nonexistent function.
3323 * charset.h (struct charset): Members code_linear_p, iso_chars_96,
3324 ascii_compatible_p, supplementary_p, compact_codes_p, unified_p
3325 are all boolean, so make them single-bit bitfields.
3327 * lisp.h (ASET): Remove attempt to detect side effects.
3328 It was meant to be temporary and it often doesn't work,
3329 because when IDX has side effects the behavior of IDX==IDX
3330 is undefined. See Stefan Monnier in
3331 <http://lists.gnu.org/archive/html/emacs-devel/2012-08/msg00762.html>.
3333 2012-08-26 Barry OReilly <gundaetiapo@gmail.com> (tiny change)
3335 * lisp.h (functionp): New function (extracted from Ffunctionp).
3336 (FUNCTIONP): Use it.
3337 * eval.c (Ffunctionp): Use it.
3339 2012-08-25 Paul Eggert <eggert@cs.ucla.edu>
3341 * xgselect.c (xg_select): Use auto storage for the GPollFD buffer
3342 as that's faster and simpler than static storage. Don't bother
3343 with the g_main_context_query overhead if g_main_context_pending
3344 says no events are pending.
3345 (gfds, gfds_size): Remove these static vars.
3346 (xgselect_initialize): Remove; no longer needed.
3347 All uses and decls removed.
3349 * emacs.c (fatal_error_signal_hook): Remove.
3350 All uses removed. This leftover from old code was always 0.
3352 * casefiddle.c, casetab.c, category.c: Use bool for boolean.
3353 * casefiddle.c (casify_object, casify_region):
3354 * casetab.c (set_case_table):
3355 * category.c, category.h (word_boundary_p):
3356 * category.h (CHAR_HAS_CATEGORY):
3357 Use bool for booleans, instead of int.
3359 2012-08-25 Eli Zaretskii <eliz@gnu.org>
3361 * makefile.w32-in ($(BLD)/alloc.$(O)): Depend on $(GNU_LIB)/execinfo.h.
3363 2012-08-25 Paul Eggert <eggert@cs.ucla.edu>
3365 On assertion failure, print backtrace if available.
3366 * alloc.c [ENABLE_CHECKING]: Include <execinfo.h>.
3367 (die) [ENABLE_CHECKING]: Print a backtrace if available.
3368 * Makefile.in (LIB_EXECINFO): New macro.
3371 * bytecode.c, callint.c, callproc.c: Use bool for boolean.
3372 * bytecode.c (exec_byte_code):
3373 * callint.c (check_mark, Fcall_interactively):
3374 * callproc.c (Fcall_process, add_env, child_setup, getenv_internal_1)
3375 (getenv_internal, sync_process_alive, call_process_exited):
3376 * lisp.h (USE_SAFE_ALLOCA):
3377 Use bool for booleans, instead of int.
3378 * lisp.h, process.h: Adjust prototypes to match above changes.
3379 * callint.c (Fcall_interactively): Don't assume the mark's
3380 offset fits in 'int'.
3382 2012-08-24 Paul Eggert <eggert@cs.ucla.edu>
3384 * buffer.c, buffer.h: Use bool for boolean.
3385 * buffer.c (reset_buffer_local_variables)
3386 (buffer_lisp_local_variables, Fset_buffer_modified_p)
3387 (Frestore_buffer_modified_p, Fset_buffer_multibyte):
3388 (overlays_at, overlays_in, mouse_face_overlay_overlaps)
3389 (overlay_touches_p, overlay_strings, Foverlay_put)
3390 (report_overlay_modification, call_overlay_mod_hooks):
3391 (mmap_enlarge, mmap_set_vars):
3392 * buffer.h (buffer_has_overlays, uppercasep, lowercasep):
3393 Use bool for booleans, instead of int.
3394 * buffer.c (compact_buffer, mmap_free_1): Return void, not int,
3395 since the 1-or-0 return value is always ignored anyway.
3396 (mmap_initialized_p):
3397 * buffer.h (struct buffer_text.inhibit_shrinking): Now bool, not int.
3398 * buffer.h, lisp.h: Adjust prototypes to match above changes.
3400 2012-08-23 Paul Eggert <eggert@cs.ucla.edu>
3402 * bidi.c: Use bool for boolean.
3403 This is a bit more readable, and makes the text segment of bidi.o
3404 0.4% smaller on my platform (GCC 4.7.1 x86-64, Fedora 15).
3405 Presumably it's faster too.
3406 (bidi_initialized, bidi_ignore_explicit_marks_for_paragraph_level):
3408 (bidi_cache_find_level_change, bidi_cache_iterator_state)
3409 (bidi_unshelve_cache, bidi_init_it, bidi_count_bytes)
3410 (bidi_char_at_pos, bidi_fetch_char, bidi_paragraph_init)
3411 (bidi_explicit_dir_char, bidi_level_of_next_char)
3412 (bidi_find_other_level_edge, bidi_move_to_visually_next):
3413 Use bool for booleans, instead of int.
3414 * dispextern.h (bidi_init_it, bidi_paragraph_init)
3415 (bidi_unshelve_cache): Adjust decls to match code.
3417 2012-08-23 Martin Rudalics <rudalics@gmx.at>
3419 * keyboard.c (Fposn_at_x_y): Do not allow internal window as
3422 2012-08-23 Paul Eggert <eggert@cs.ucla.edu>
3424 * atimer.c, atimer.h (turn_on_atimers): Use bool for boolean.
3425 * atimer.h: Include <stdbool.h>.
3427 2012-08-22 Dan Nicolaescu <dann@gnu.org>
3429 * frame.h (FRAME_W32_P, FRAME_MSDOS_P, FRAME_NS_P): Change to
3430 compile time tests instead of run time tests on systems that do
3432 (FRAME_MAC_P): Remove leftover from deleted code.
3433 * frame.c (syms_of_frame): Remove leftover from deleted code.
3435 2012-08-22 Jan Djärv <jan.h.d@swipnet.se>
3437 * nsterm.m (insertText:): Don't clear modifiers if code is space.
3439 2012-08-22 Paul Eggert <eggert@cs.ucla.edu>
3441 * fontset.c (FONTSET_ADD): Return void, not Lisp_Object.
3442 Otherwise, the compiler complains about (A?B:C) where B is void
3443 and C is Lisp_Object. This fixes an incompatibility with Sun C 5.12.
3444 (fontset_add): Return void, for FONTSET_ADD.
3446 2012-08-21 Paul Eggert <eggert@cs.ucla.edu>
3448 * alloc.c: Use bool for booleans.
3449 (gc_in_progress, abort_on_gc)
3450 (setjmp_tested_p) [!GC_SAVE_REGISTERS_ON_STACK && !GC_SETJMP_WORKS]:
3451 (dont_register_blocks) [GC_MALLOC_CHECK]:
3452 (suppress_checking) [ENABLE_CHECKING]: Now bool, not int.
3453 (check_string_bytes, make_specified_string, memory_full)
3454 (live_string_p, live_cons_p, live_symbol_p, live_float_p)
3455 (live_misc_p, live_vector_p, live_buffer_p, mark_maybe_object)
3456 (mark_stack, valid_pointer_p, make_pure_string)
3457 (Fgarbage_collect, survives_gc_p, gc_sweep):
3458 Use bool for booleans, instead of int.
3459 (test_setjmp) [!GC_SAVE_REGISTERS_ON_STACK && !GC_SETJMP_WORKS]:
3460 Remove unused local.
3461 * alloc.c (PURE_POINTER_P):
3462 * lisp.h (STRING_MULTIBYTE): Document that it returns a boolean.
3463 * editfns.c (Fformat):
3464 * fileio.c (Fexpand_file_name, Fsubstitute_in_file_name)
3466 * fns.c (sweep_weak_table):
3467 * lisp.h (suppress_checking, push_message, survives_gc_p)
3468 (make_pure_string, gc_in_progress, abort_on_gc):
3469 * lread.c (readchar, read1):
3470 * print.c (Fprin1_to_string):
3471 * xdisp.c (push_message):
3472 Use bool for booleans affected directly or indirectly by
3475 Make recently-introduced setters macros.
3476 * fontset.c (set_fontset_id, set_fontset_name, set_fontset_ascii)
3477 (set_fontset_base, set_fontset_frame, set_fontset_nofont_face)
3478 (set_fontset_default, set_fontset_fallback): Rename from their
3479 upper-case counterparts, and make them functions rather than macros.
3480 This is more consistent with the other recently-introduced setters.
3481 These don't need to be inline, since they're local.
3483 2012-08-21 Jan Djärv <jan.h.d@swipnet.se>
3485 * nsterm.m (fd_handler:): Alloc and release a NSAutoreleasePool in
3486 the loop (Bug#12247).
3488 2012-08-21 Paul Eggert <eggert@cs.ucla.edu>
3490 * lisp.h (vcopy): Use memcpy rather than our own loop.
3491 This fixes a performance regression introduced by the recent
3492 addition of vcopy. This means 'vcopy' will need to be modified
3493 for a copying collector, but that's OK. Also, tighten the
3494 checking in the assertion.
3496 2012-08-21 Eli Zaretskii <eliz@gnu.org>
3498 * w32uniscribe.c (uniscribe_shape): Fix producing gstring
3499 components for RTL text (Bug#11860). Adjust X-OFFSET of each
3500 non-base glyph for the width of the base character, according to
3501 what x_draw_composite_glyph_string_foreground expects.
3502 Generate WADJUST value according to composition_gstring_width's
3503 expectations, to produce correct width of the composed character.
3504 Reverse the sign of the DU offset produced by ScriptPlace.
3506 2012-08-21 Paul Eggert <eggert@cs.ucla.edu>
3508 * dbusbind.c (xd_remove_watch): Do not assume C99 comments.
3510 2012-08-21 Dmitry Antipov <dmantipov@yandex.ru>
3512 Avoid direct writes to contents member of struct Lisp_Vector.
3513 * lisp.h (vcopy): New function to copy data into vector.
3514 * dispnew.c (Fframe_or_buffer_changed_p): Use AREF and ASET.
3515 * fns.c (Ffillarray): Use ASET.
3516 * keyboard.c (timer_check_2): Use AREF and ASET.
3517 (append_tool_bar_item, Frecent_keys): Use vcopy.
3518 * lread.c (read_vector): Use ASET.
3519 * msdos.c (Frecent_doskeys): Use vcopy.
3520 * xface.c (Finternal_copy_lisp_face): Use vcopy.
3521 (Finternal_merge_in_global_face): Use ASET and vcopy.
3522 * xfont.c (xfont_list_pattern): Likewise.
3524 2012-08-21 Martin Rudalics <rudalics@gmx.at>
3526 * window.c (Fwindow_point): For the selected window always return
3527 the position of its buffer's point.
3528 (Fset_window_point): For the selected window always go in its
3529 buffer to the specified position.
3531 2012-08-21 Dmitry Antipov <dmantipov@yandex.ru>
3533 Setter macros for fontsets.
3534 * fontset.c (SET_FONTSET_ID, SET_FONTSET_NAME, SET_FONTSET_ASCII)
3535 (SET_FONTSET_BASE, SET_FONTSET_FRAME, SET_FONTSET_NOFONT_FACE)
3536 (SET_FONTSET_DEFAULT, SET_FONTSET_FALLBACK): New macros.
3539 2012-08-20 Glenn Morris <rgm@gnu.org>
3541 * Makefile.in (emacs$(EXEEXT), bootstrap-emacs$(EXEEXT)):
3542 Don't assume that `ln -f' works.
3544 2012-08-20 Eli Zaretskii <eliz@gnu.org>
3546 * .gdbinit: Use "set $dummy = ..." to avoid warnings from GDB 7.5
3547 and later about non-assignments with no effect. See discussion at
3548 http://sourceware.org/ml/gdb-patches/2012-08/msg00518.html for
3551 2012-08-20 Dmitry Antipov <dmantipov@yandex.ru>
3553 Inline setter functions for Lisp_Objects slots of struct specbinding.
3554 * eval.c (set_specpdl_symbol, set_specpdl_old_value): New functions.
3557 2012-08-20 Martin Rudalics <rudalics@gmx.at>
3559 * window.c (select_window): Always make selected window's buffer
3562 2012-08-20 Dmitry Antipov <dmantipov@yandex.ru>
3564 Use AREF and ASET for docstrings of category tables.
3565 * category.h (CATEGORY_DOCSTRING): Use AREF.
3566 (SET_CATEGORY_DOCSTRING): Use ASET.
3567 * category.c (Fdefine_category): Use SET_CATEGORY_DOCSTRING.
3569 2012-08-20 Dmitry Antipov <dmantipov@yandex.ru>
3571 Inline setter functions for hash table members.
3572 * lisp.h (set_hash_key, set_hash_value, set_hash_next)
3573 (set_hash_hash, set_hash_index): Rename with _slot suffix.
3574 (set_hash_key_and_value, set_hash_index, set_hash_next)
3575 (set_hash_hash): New functions.
3576 * charset.c, fns.c: Adjust users.
3578 2012-08-20 Dmitry Antipov <dmantipov@yandex.ru>
3580 Inline getter and setter functions for per-buffer values.
3581 * buffer.h (per_buffer_default, set_per_buffer_default)
3582 (per_buffer_value, set_per_buffer_value): New functions.
3583 (PER_BUFFER_VALUE, PER_BUFFER_DEFAULT): Remove.
3584 * buffer.c, data.c: Adjust users.
3586 2012-08-20 Juanma Barranquero <lekktu@gmail.com>
3588 * makefile.w32-in ($(BLD)/vm-limit.$(O)): Update dependencies.
3590 2012-08-19 Paul Eggert <eggert@cs.ucla.edu>
3592 Rely on <config.h> + <unistd.h> to declare 'environ',
3593 as gnulib does this if the system doesn't.
3594 * callproc.c, editfns.c, process.c (environ) [!USE_CRT_DLL]:
3595 Remove declaration. MS-Windows declares it on stdlib.h which is
3596 included by conf_post.h.
3597 * emacs.c (environ) [DOUG_LEA_MALLOC]:
3598 * vm-limit.c (environ) [ORDINARY_LINK]: Remove decl.
3599 * vm-limit.c: Include <unistd.h>, for 'environ'.
3601 * unexaix.c, unexcoff.c: Include "mem-limits.h".
3602 (start_of_data): Remove decl; mem-limits.h provides it.
3604 * xdisp.c (handle_invisible_prop): Make it a bit faster
3605 and avoid a gcc -Wmaybe-uninitialized diagnostic.
3607 2012-08-19 Chong Yidong <cyd@gnu.org>
3609 * xdisp.c (handle_invisible_prop): Fix ellipses at overlay string
3612 2012-08-19 Andreas Schwab <schwab@linux-m68k.org>
3614 * .gdbinit: Use call instead of set when calling a function in the
3617 * data.c (set_internal): Don't use set_blv_found.
3618 (Fkill_local_variable): Likewise.
3620 2012-08-18 Alp Aker <alp.tekin.aker@gmail.com>
3622 * nsfont.m (ns_ascii_average_width): Ensure the string
3623 ascii_printable is initialized with a null-terminated character
3624 array. Otherwise, it can contain undesired extra characters.
3626 2012-08-18 Paul Eggert <eggert@cs.ucla.edu>
3628 port new setting code to Sun C 5.8 2005/10/13
3629 * chartab.c, lisp.h (char_table_set, char_table_set_range):
3630 Return void, not Lisp_Object. Otherwise, the compiler
3631 complains about (A?B:C) where B is void and C is Lisp_Object
3632 when compiling CHAR_TABLE_SET, due to the recent change to
3633 the API of sub_char_table_set_contents.
3635 2012-08-18 Chong Yidong <cyd@gnu.org>
3637 * xdisp.c (handle_invisible_prop): Obey TEXT_PROP_MEANS_INVISIBLE
3638 for the string case (Bug#3874).
3640 2012-08-18 Paul Eggert <eggert@cs.ucla.edu>
3642 * buffer.h (BSET): Remove (Bug#12215).
3643 Replace all uses with calls to new setter functions.
3644 (bset_bidi_paragraph_direction, bset_case_canon_table)
3645 (bset_case_eqv_table, bset_directory, bset_display_count)
3646 (bset_display_time, bset_downcase_table)
3647 (bset_enable_multibyte_characters, bset_filename, bset_keymap)
3648 (bset_last_selected_window, bset_local_var_alist)
3649 (bset_mark_active, bset_point_before_scroll, bset_read_only)
3650 (bset_truncate_lines, bset_undo_list, bset_upcase_table)
3652 * buffer.c (bset_abbrev_mode, bset_abbrev_table)
3653 (bset_auto_fill_function, bset_auto_save_file_format)
3654 (bset_auto_save_file_name, bset_backed_up, bset_begv_marker)
3655 (bset_bidi_display_reordering, bset_buffer_file_coding_system)
3656 (bset_cache_long_line_scans, bset_case_fold_search)
3657 (bset_ctl_arrow, bset_cursor_in_non_selected_windows)
3658 (bset_cursor_type, bset_display_table, bset_extra_line_spacing)
3659 (bset_file_format, bset_file_truename, bset_fringe_cursor_alist)
3660 (bset_fringe_indicator_alist, bset_fringes_outside_margins)
3661 (bset_header_line_format, bset_indicate_buffer_boundaries)
3662 (bset_indicate_empty_lines, bset_invisibility_spec)
3663 (bset_left_fringe_width, bset_major_mode, bset_mark)
3664 (bset_minor_modes, bset_mode_line_format, bset_mode_name)
3665 (bset_name, bset_overwrite_mode, bset_pt_marker)
3666 (bset_right_fringe_width, bset_save_length)
3667 (bset_scroll_bar_width, bset_scroll_down_aggressively)
3668 (bset_scroll_up_aggressively, bset_selective_display)
3669 (bset_selective_display_ellipses, bset_vertical_scroll_bar_type)
3670 (bset_word_wrap, bset_zv_marker):
3671 * category.c (bset_category_table):
3672 * syntax.c (bset_syntax_table):
3673 New setter functions.
3675 * process.h (PSET): Remove (Bug#12215).
3676 Replace all uses with calls to new setter functions.
3677 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
3678 (PROCESS_INLINE): New macro.
3679 (pset_childp): New setter function.
3680 (pset_gnutls_cred_type) [HAVE_GNUTLS]: New setter function.
3681 * process.c (PROCESS_INLINE):
3682 Define to EXTERN_INLINE, so that the corresponding functions
3683 are compiled into code.
3684 (pset_buffer, pset_command, pset_decode_coding_system)
3685 (pset_decoding_buf, pset_encode_coding_system)
3686 (pset_encoding_buf, pset_filter, pset_log, pset_mark, pset_name)
3687 (pset_plist, pset_sentinel, pset_status, pset_tty_name)
3688 (pset_type, pset_write_queue): New setter functions.
3690 * window.h (WSET): Remove (Bug#12215).
3691 Replace all uses with calls to new setter functions.
3692 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
3693 (WINDOW_INLINE): New macro.
3694 (wset_buffer, wset_frame, wset_left_col, wset_next, wset_prev)
3695 (wset_redisplay_end_trigger, wset_top_line, wset_total_cols)
3696 (wset_total_lines, wset_vertical_scroll_bar)
3697 (wset_window_end_pos, wset_window_end_valid)
3698 (wset_window_end_vpos): New setter functions.
3699 * window.c (WINDOW_INLINE):
3700 Define to EXTERN_INLINE, so that the corresponding functions
3701 are compiled into code.
3702 (wset_combination_limit, wset_dedicated, wset_display_table)
3703 (wset_hchild, wset_left_fringe_width, wset_left_margin_cols)
3704 (wset_new_normal, wset_new_total, wset_next_buffers)
3705 (wset_normal_cols, wset_normal_lines, wset_parent, wset_pointm)
3706 (wset_prev_buffers, wset_right_fringe_width)
3707 (wset_right_margin_cols, wset_scroll_bar_width, wset_start)
3708 (wset_temslot, wset_vchild, wset_vertical_scroll_bar_type)
3709 (wset_window_parameters):
3710 * xdisp.c (wset_base_line_number, wset_base_line_pos)
3711 (wset_column_number_displayed, wset_region_showing):
3712 New setter functions.
3714 * termhooks.h (TSET): Remove (Bug#12215).
3715 Replace all uses with calls to new setter functions.
3716 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
3717 (TERMHOOKS_INLINE): New macro.
3718 (tset_charset_list, tset_selection_alist): New setter functions.
3719 * terminal.c (TERMHOOKS_INLINE):
3720 Define to EXTERN_INLINE, so that the corresponding functions
3721 are compiled into code.
3722 (tset_param_alist): New setter function.
3724 2012-08-17 Paul Eggert <eggert@cs.ucla.edu>
3726 * keyboard.h (KSET): Remove (Bug#12215).
3727 Replace all uses with calls to new setter functions.
3728 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
3729 (KEYBOARD_INLINE): New macro.
3730 (kset_default_minibuffer_frame, kset_defining_kbd_macro)
3731 (kset_input_decode_map, kset_last_command, kset_last_kbd_macro)
3732 (kset_prefix_arg, kset_system_key_alist, kset_window_system):
3733 New setter functions.
3734 * keyboard.c (KEYBOARD_INLINE):
3735 Define to EXTERN_INLINE, so that the corresponding functions
3736 are compiled into code.
3737 (kset_echo_string, kset_kbd_queue)
3738 (kset_keyboard_translate_table, kset_last_prefix_arg)
3739 (kset_last_repeatable_command, kset_local_function_key_map)
3740 (kset_overriding_terminal_local_map, kset_real_last_command)
3741 (kset_system_key_syms): New setter functions.
3743 * frame.h (FSET): Remove (Bug#12215).
3744 Replace all uses with calls to new setter functions.
3745 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
3746 (FRAME_INLINE): New macro.
3747 (fset_buffer_list, fset_buried_buffer_list, fset_condemned_scroll_bars)
3748 (fset_current_tool_bar_string, fset_desired_tool_bar_string)
3749 (fset_face_alist, fset_focus_frame, fset_icon_name, fset_menu_bar_items)
3750 (fset_menu_bar_vector, fset_menu_bar_window, fset_name)
3751 (fset_param_alist, fset_root_window, fset_scroll_bars)
3752 (fset_selected_window, fset_title, fset_tool_bar_items)
3753 (fset_tool_bar_position, fset_tool_bar_window): New functions.
3754 * frame.c (FRAME_INLINE):
3755 Define to EXTERN_INLINE, so that the corresponding functions
3756 are compiled into code.
3757 (fset_buffer_predicate, fset_minibuffer_window): New setter functions.
3759 A few more naming-convention fixes for getters and setters.
3760 * buffer.c (set_buffer_overlays_before): Move here from buffer.h,
3761 and rename from buffer_overlays_set_before.
3762 (set_buffer_overlays_after): Move here from buffer.h, and rename
3763 from buffer_overlays_set_after.
3764 * buffer.h (buffer_intervals): Rename from buffer_get_intervals.
3766 (set_buffer_intervals): Rename from buffer_set_intervals.
3767 * intervals.c (set_interval_object): Move here from intervals.h,
3768 and rename from interval_set_object.
3769 (set_interval_left): Move here from intervals.h, and rename from
3771 (set_interval_right): Move here from intervals.h, and rename from
3773 (copy_interval_parent): Move here from intervals.h, and rename from
3774 interval_copy_parent.
3775 * intervals.h (set_interval_parent): Rename from interval_set_parent.
3776 (set_interval_plist): Rename from interval_set_plist.
3777 Return void, not Lisp_Object, since no caller uses the result.
3778 * lisp.h (string_intervals): Rename from string_get_intervals.
3779 (set_string_intervals): Rename from string_set_intervals.
3781 * lisp.h (set_char_table_extras): Rename from char_table_set_extras.
3782 (set_char_table_contents): Rename from char_table_set_contents.
3783 (set_sub_char_table_contents): Rename from sub_char_table_set_contents.
3784 All uses changed. See the end of
3785 <http://lists.gnu.org/archive/html/emacs-devel/2012-08/msg00549.html>.
3787 * lisp.h (CSET): Remove (Bug#12215).
3788 (set_char_table_ascii, set_char_table_defalt, set_char_table_parent)
3789 (set_char_table_purpose): New functions,
3790 replacing CSET. All uses changed. For example, replace
3791 "CSET (XCHAR_TABLE (char_table), parent, parent);" with
3792 "set_char_table_parent (char_table, parent);".
3793 The old version was confusing because it used the same name
3794 'parent' for two different things.
3796 2012-08-17 Dmitry Antipov <dmantipov@yandex.ru>
3798 Functions to get and set Lisp_Object fields of buffer-local variables.
3799 * lisp.h (blv_found, set_blv_found, blv_value, set_blv_value)
3800 (set_blv_where, set_blv_defcell, set_blv_valcell): New functions.
3801 (BLV_FOUND, SET_BLV_FOUND, BLV_VALUE, SET_BLV_VALUE): Remove.
3802 * data.c, eval.c, frame.c: Adjust users.
3804 2012-08-17 Chong Yidong <cyd@gnu.org>
3806 * xfaces.c (merge_face_vectors): If the target font specfies a
3807 font spec, make the font's attributes take precedence over
3808 directly-specified attributes.
3809 (merge_face_ref): Recognize :font.
3811 2012-08-17 Dmitry Antipov <dmantipov@yandex.ru>
3813 Do not use memcpy for copying intervals.
3814 * intervals.c (reproduce_interval): New function.
3815 (reproduce_tree, reproduce_tree_obj): Use it.
3816 (reproduce_tree_obj): Remove prototype.
3818 2012-08-17 Paul Eggert <eggert@cs.ucla.edu>
3820 * lisp.h (duration_to_sec_usec): Remove unused decl.
3822 2012-08-17 Alp Aker <alp.tekin.aker@gmail.com>
3824 * nsfont.m (ns_ascii_average_width): Send initWithFormat selector
3825 to an allocated instance of NSString, not to the class itself.
3827 2012-08-17 Juanma Barranquero <lekktu@gmail.com>
3829 * makefile.w32-in (C_CTYPE_H): New macro.
3830 (LISP_H, $(BLD)/ccl.$(O), $(BLD)/doc.$(O), $(BLD)/w32console.$(O)):
3831 ($(BLD)/fontset.$(O), $(BLD)/frame.$(O), $(BLD)/composite.$(O)):
3832 ($(BLD)/sysdep.$(O), $(BLD)/w32uniscribe.$(O)): Update dependencies.
3834 2012-08-16 Paul Eggert <eggert@cs.ucla.edu>
3836 Use ASCII tests for character types.
3837 * category.c, dispnew.c, doprnt.c, editfns.c, syntax.c, term.c:
3839 Don't include <ctype.h>; was not needed.
3840 * charset.c, doc.c, fileio.c, font.c, frame.c, gtkutil.c, image.c:
3841 * sysdep.c, xfaces.c:
3842 Include <c-ctype.h> instead of <ctype.h>.
3843 * nsterm.m: Include <c-ctype.h>.
3844 * charset.c (read_hex):
3845 * doc.c (Fsnarf_documentation):
3846 * fileio.c (IS_DRIVE) [WINDOWSNT]:
3847 (DRIVE_LETTER) [DOS_NT]:
3848 (Ffile_name_directory, Fexpand_file_name)
3849 (Fsubstitute_in_file_name):
3850 * font.c (font_parse_xlfd, font_parse_fcname):
3851 * frame.c (x_set_font_backend):
3852 * gtkutil.c (xg_get_font):
3853 * image.c (xbm_scan, xpm_scan, pbm_scan_number):
3854 * nsimage.m (hexchar):
3855 * nsterm.m (ns_xlfd_to_fontname):
3856 * sysdep.c (system_process_attributes):
3857 * xfaces.c (hash_string_case_insensitive):
3858 Use C-locale tests instead of locale-specific tests for character
3859 types, since we want the ASCII interpretation here, not the
3860 interpretation suitable for whatever happens to be the current locale.
3862 2012-08-16 Martin Rudalics <rudalics@gmx.at>
3864 Consistently check windows for validity/liveness
3865 (Bug#11984, Bug#12025, Bug#12026).
3866 * lisp.h (CHECK_VALID_WINDOW): New macro.
3867 * window.c (decode_window): Rename to decode_live_window.
3868 (decode_valid_window, Fwindow_valid_p): New functions.
3869 (Fwindow_frame, Fframe_root_window, Fwindow_minibuffer_p)
3870 (Fframe_first_window, Fframe_selected_window, Fwindow_parent)
3871 (Fwindow_top_child, Fwindow_left_child, Fwindow_next_sibling)
3872 (Fwindow_prev_sibling, Fwindow_combination_limit)
3873 (Fset_window_combination_limit, Fwindow_use_time)
3874 (Fwindow_total_height, Fwindow_total_width, Fwindow_new_total)
3875 (Fwindow_normal_size, Fwindow_new_normal, Fwindow_left_column)
3876 (Fwindow_top_line, Fwindow_body_height, Fwindow_body_width)
3877 (Fwindow_hscroll, Fset_window_hscroll)
3878 (Fwindow_redisplay_end_trigger)
3879 (Fset_window_redisplay_end_trigger, Fwindow_edges)
3880 (Fwindow_pixel_edges, Fwindow_absolute_pixel_edges)
3881 (Fwindow_inside_edges, Fwindow_inside_pixel_edges)
3882 (Fcoordinates_in_window_p, Fwindow_point, Fwindow_start)
3883 (Fwindow_end, Fset_window_point, Fset_window_start)
3884 (Fpos_visible_in_window_p, Fwindow_line_height)
3885 (Fwindow_dedicated_p, Fset_window_dedicated_p)
3886 (Fwindow_prev_buffers, Fset_window_prev_buffers)
3887 (Fwindow_next_buffers, Fwindow_parameters, Fwindow_parameter)
3888 (Fset_window_parameter, Fwindow_display_table)
3889 (Fset_window_display_table, Fdelete_other_windows_internal)
3890 (Fset_window_buffer, Fset_window_new_total)
3891 (Fset_window_new_normal, Fdelete_window_internal)
3892 (Fwindow_text_height, Fset_window_margins, Fwindow_margins)
3893 (Fset_window_fringes, Fwindow_fringes, Fset_window_scroll_bars)
3894 (Fwindow_scroll_bars): Check whether argument window is a valid or
3895 live window. Update doc-strings.
3896 (syms_of_window): New symbol Qwindow_valid_p.
3897 * keyboard.c (Fposn_at_x_y): Check whether argument
3898 frame_or_window denotes a valid window.
3900 2012-08-16 Dmitry Antipov <dmantipov@yandex.ru>
3902 Fix previous char table change.
3903 * lisp.h (CHAR_TABLE_SET): Use sub_char_table_set_contents.
3904 * chartab.c (optimize_sub_char_table): Likewise.
3906 2012-08-16 Chong Yidong <cyd@gnu.org>
3908 * gtkutil.c (xg_get_font): Demand an Xft font (Bug#3228).
3910 * xfont.c (xfont_open):
3911 * xftfont.c (xftfont_open): Set the font's max_width field.
3913 * nsfont.m (nsfont_open): Similar to the Xft backend, set
3914 min_width to space_width and average_width to the average over
3915 printable ASCII characters.
3916 (ns_char_width): Code cleanup.
3917 (ns_ascii_average_width): New utility function.
3919 * font.h (struct font): Update comments.
3921 2012-08-16 Dmitry Antipov <dmantipov@yandex.ru>
3923 Simple interface to set Lisp_Object fields of character tables.
3924 * lisp.h (CSET): New macro.
3925 (char_table_set_extras, char_table_set_contents)
3926 (sub_char_table_set_contents): New function.
3927 * casetab.c, category.c, chartab.c, fns.c, fontset.c, search.c:
3928 * syntax.c: Adjust users.
3930 2012-08-16 Stefan Monnier <monnier@iro.umontreal.ca>
3932 * eval.c (eval_sub): Bind lexical-binding.
3933 * lread.c (Qlexical_binding): Make non-static.
3935 2012-08-15 Jan Djärv <jan.h.d@swipnet.se>
3937 * nsmenu.m (popupSession): Remove.
3938 (pop_down_menu): Remove endModalSession.
3939 (timeout_handler:): New method.
3940 (runDialogAt:): Get next timeout. Start a NSTimer with that timeout.
3941 Call runModalForWindow. Check timer_fired when it returns.
3942 If not set, cancel timer and break out of loop.
3943 Otherwise loop again, with a new timeout.
3945 * nsterm.m: Include fcntl.h if present.
3946 (fd_entry, t_readfds, inNsSelect): Remove.
3947 (select_writefds, select_valid, select_timeout, selfds)
3948 (select_mutex, apploopnr): Add.
3949 (EV_TRAILER): Call kbd_buffer_store_event_hold only if q_event_ptr.
3950 Otherwise call kbd_buffer_store_event.
3951 (ns_send_appdefined): Remove release of fd_entry.
3952 (ns_read_socket): Always send appdefined. Remove inNsSelect check.
3953 Increment and decrement apploopnr.
3954 (ns_select): If no file descriptors, just do a NSTimer.
3955 Otherwise copy read/write masks and start select thread (fd_handler).
3956 Start main loop and wait for application defined event.
3957 Inform select thread to stop selecting after main loop is exited.
3958 (ns_term_init): Create selfds pipe and set non-blocking.
3959 Initialize select_mutex. Start the select thread (fd_handler).
3960 (fd_handler:): Loop forever, wait for info from the main thread
3961 to either start or stop selecting. When select returns, send
3962 and appdefined event.
3963 (sendScrollEventAtLoc:fromEvent:): Check if q_event_ptr is set.
3964 If not call kbd_buffer_store_event.
3966 * nsterm.h (EmacsApp): fd_handler takes id argument.
3967 (EmacsDialogPanel): Add timer_fired and timeout_handler.
3969 * gtkutil.c (xg_mark_data): Use FRAME_X_P.
3971 2012-08-15 Eli Zaretskii <eliz@gnu.org>
3973 * region-cache.c (move_cache_gap): Update gap_len using the actual
3974 growth of the boundaries array. Do not change cache_len.
3977 2012-08-15 Dmitry Antipov <dmantipov@yandex.ru>
3979 Generalize and cleanup font subsystem checks.
3980 * font.h (FONT_DEBUG, font_assert): Remove.
3981 * font.c, fontset.c, w32font.c, xfont.c, xftfont.c:
3982 Change font_assert to eassert. Use eassert where appropriate.
3984 2012-08-15 Dmitry Antipov <dmantipov@yandex.ru>
3986 * gtkutil.c (xg_get_font): Use pango_units_to_double.
3988 2012-08-15 Chong Yidong <cyd@gnu.org>
3990 * gtkutil.c (xg_get_font): Rename from xg_get_font_name.
3991 When using the new font chooser, use gtk_font_chooser_get_font_desc to
3992 extract the font descriptor instead of just the font name.
3993 In that case, return a font spec instead of a string.
3994 (x_last_font_name): Move to this file from xfns.c.
3996 * xfns.c (Fx_select_font): The return value can also be a font
3997 spec. Move x_last_font_name management to gtkutil.c.
3999 * xfaces.c: Make font weight and style symbols non-static.
4001 2012-08-15 Stefan Monnier <monnier@iro.umontreal.ca>
4003 * minibuf.c (read_minibuf): Ignore caller's inhibit-read-only
4006 2012-08-14 Stefan Monnier <monnier@iro.umontreal.ca>
4008 * alloc.c (Fgarbage_collect): Use plural form consistently.
4010 2012-08-14 Eli Zaretskii <eliz@gnu.org>
4012 * keyboard.c (command_loop_1): Reset ignore_mouse_drag_p flag each
4013 iteration through the command loop. Fixes a problem whereby mouse
4014 movements are ignored until the first mouse click.
4016 2012-08-14 Paul Eggert <eggert@cs.ucla.edu>
4018 Use bool, not int, for Lisp booleans.
4019 This is more natural, and on my platform (GCC 4.7.1 x86-64) it
4020 makes Emacs a bit smaller and presumably a bit faster.
4021 * lisp.h: Include <stdbool.h>.
4022 (struct Lisp_Boolfwd, defvar_bool):
4023 * lread.c (defvar_bool): Use bool, not int, for Lisp booleans.
4024 * regex.c [!emacs]: Include <stdbool.h>.
4025 (false, true): Remove; <stdbool.h> does this for us now.
4027 2012-08-14 Chong Yidong <cyd@gnu.org>
4029 * character.c (Fcharacterp): Doc fix (Bug#12076).
4031 * data.c (Findirect_variable): Doc fix (Bug#11040).
4033 * chartab.c (Fmap_char_table): Doc fix (Bug#12061).
4035 * editfns.c (Fformat): Doc fix (Bug#12059).
4036 (Fsave_current_buffer): Doc fix (Bug#11542).
4038 2012-08-14 Barry OReilly <gundaetiapo@gmail.com> (tiny change)
4040 * keyboard.c (access_keymap_keyremap): Accept anonymous functions
4043 2012-08-14 Martin Rudalics <rudalics@gmx.at>
4045 * frame.c (make_frame_without_minibuffer, make_minibuffer_frame)
4046 (delete_frame, Fmake_frame_invisible, Ficonify_frame):
4047 * minibuf.c (choose_minibuf_frame, read_minibuf):
4048 * w32fns.c (x_create_tip_frame):
4049 * xfns.c (x_create_tip_frame): Call set_window_buffer instead of
4050 Fset_window_buffer (Bug#11984, Bug#12025, Bug#12026).
4052 2012-08-14 Paul Eggert <eggert@cs.ucla.edu>
4054 * intervals.c (offset_intervals): Remove obsolete comment.
4056 2012-08-14 Andreas Schwab <schwab@linux-m68k.org>
4058 * gtkutil.c (find_rtl_image, update_frame_tool_bar): Use NILP.
4060 2012-08-14 Gergely Risko <gergely@risko.hu>
4062 * coding.c (decode_coding): Record buffer modification before
4063 disabling undo_list (Bug#11773).
4065 2012-08-14 Dmitry Antipov <dmantipov@yandex.ru>
4067 Revert and cleanup some recent overlay changes.
4068 * buffer.h (enum overlay_type): Remove.
4069 (buffer_get_overlays, buffer_set_overlays): Likewise.
4070 (buffer_set_overlays_before, buffer_set_overlays_after):
4071 New function. Adjust users.
4072 (unchain_both): Add eassert.
4074 2012-08-14 Dmitry Antipov <dmantipov@yandex.ru>
4076 * gtkutil.c (update_frame_tool_bar): Use EQ where appropriate.
4078 2012-08-14 Paul Eggert <eggert@cs.ucla.edu>
4080 * gtkutil.c (xg_mark_data): Don't assume C99.
4082 2012-08-13 Jan Djärv <jan.h.d@swipnet.se>
4084 * gtkutil.c (xg_frame_tb_info): New struct.
4085 (TB_INFO_KEY): New define.
4086 (xg_free_frame_widgets): Free xg_frame_tb_info for frame if present.
4087 (xg_mark_data): Mark Lisp_Objects in xg_frame_tb_info.
4088 (xg_create_tool_bar): Allocate and initialize a xg_frame_tb_info
4090 (update_frame_tool_bar): Return early if data in xg_frame_tb_info
4091 is up to date. Otherwise store new data.
4092 (free_frame_tool_bar): Free xg_frame_tb_info if present.
4094 2012-08-13 Dmitry Antipov <dmantipov@yandex.ru>
4096 Use KSET for write access to Lisp_Object members of struct kboard.
4097 * keyboard.h (KSET): New macro.
4098 * callint.c, category.c, frame.c, keyboard.c, keyboard.h, macros.c:
4099 * msdos.c, nsfns.m, nsterm.m, term.c, w32fns.c, w32term.c, xfns.c:
4100 * xterm.c: Adjust users.
4102 2012-08-13 Dmitry Antipov <dmantipov@yandex.ru>
4104 Use BSET for write access to Lisp_Object members of struct buffer.
4105 * buffer.h (BSET): New macro.
4106 * buffer.c, casetab.c, cmds.c, coding.c, data.c, editfns.c:
4107 * fileio.c, frame.c, indent.c, insdel.c, intervals.c, keymap.c:
4108 * minibuf.c, print.c, process.c, syntax.c, undo.c, w32fns.c:
4109 * window.c, xdisp.c, xfns.c: Adjust users.
4111 2012-08-11 BT Templeton <bpt@hcoop.net> (tiny change)
4113 * lread.c (syms_of_lread): Initialize Vlexical_binding.
4115 2012-08-11 Jan Djärv <jan.h.d@swipnet.se>
4117 * nsterm.m (not_in_argv): New function.
4118 (application:openFile, application:openTempFile:):
4119 (application:openFileWithoutUI:, application:openFiles:): Open file
4120 if not_in_argv returns non-zero (bug#12171).
4122 * gtkutil.c (gtk_font_chooser_dialog_new, GTK_FONT_CHOOSER)
4123 (gtk_font_chooser_set_font, gtk_font_chooser_get_font):
4124 Define for Gtk+ versions less than 3.2.
4125 (xg_get_font_name): Use those functions/macros here.
4126 Reported by Frans Oilinki <moilinki@gmail.com>.
4128 2012-08-11 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
4130 * unexmacosx.c (copy_data_segment): Copy initialized data in
4131 statically linked libraries from input file rather than memory.
4133 * unexmacosx.c (print_load_command_name): Add cases LC_MAIN,
4134 LC_SOURCE_VERSION, and LC_DYLIB_CODE_SIGN_DRS.
4135 (dump_it) [LC_DYLIB_CODE_SIGN_DRS]: Call copy_linkedit_data.
4137 2012-08-10 Glenn Morris <rgm@gnu.org>
4139 * conf_post.h (IF_LINT, lint_assume): Move here from lisp.h.
4140 * lisp.h (IF_LINT, lint_assume): Move to conf_post.h.
4142 2012-08-10 Dmitry Antipov <dmantipov@yandex.ru>
4144 Fix last change to allow compilation with low optimization levels.
4145 * intervals.c (INTERVALS_INLINE): Define to EXTERN_INLINE.
4146 Reported by Jan Djärv <jan.h.d@swipnet.se>.
4148 2012-08-10 Dmitry Antipov <dmantipov@yandex.ru>
4150 Use common inline syntax in intervals.h.
4151 * intervals.h (INTERVALS_INLINE): New macro.
4152 Change all users from LISP_INLINE.
4154 2012-08-10 Dmitry Antipov <dmantipov@yandex.ru>
4156 Define Qnone once for all platforms.
4157 * frame.c (Qnone): Define here.
4158 (syms_of_frame): DEFSYM it.
4159 * lisp.h (Qnone): New declaration.
4160 * nsfns.m, nsterm.h, nsterm.m, w32fns.c, w32font.c:
4161 * xfns.c: Remove duplication. Adjust users.
4163 2012-08-10 Dmitry Antipov <dmantipov@yandex.ru>
4165 Remove unused macros from intervals.h.
4166 * intervals.h (MERGE_INSERTIONS, DISPLAY_INVISIBLE_GLYPH): Remove.
4167 * intervals.c: Adjust comment.
4169 2012-08-10 Eli Zaretskii <eliz@gnu.org>
4171 * w32fns.c <w32_unicode_gui>: New static variable.
4172 (globals_of_w32fns): Initialize it according to os_subtype.
4173 (w32_init_class, w32_msg_pump, w32_wnd_proc): Use it instead of
4176 2012-08-10 Joakim Hårsman <joakim.harsman@gmail.com> (tiny change)
4177 Eli Zaretskii <eliz@gnu.org>
4179 Fix bug #10299 with Unicode characters sent by customized
4180 keyboards created by MSKLC.
4181 * w32fns.c (INIT_WINDOW_CLASS): New macro.
4182 (w32_init_class): Use it to initialize the Emacs class with either
4183 ANSI or Unicode API calls.
4184 (w32_msg_pump): Call GetMessageW and DispatchMessageW on NT and
4186 (w32_wnd_proc): If the character code sent by WM_CHAR or
4187 WM_SYSCHAR is above 255, post a WM_UNICHAR message, not the
4188 original message. Call DefWindowProcW on NT and later.
4190 2012-08-10 Glenn Morris <rgm@gnu.org>
4192 * Makefile.in (config_h): Fix conf_post.h out-of-tree build location.
4194 * lisp.h (DIRECTORY_SEP): Let configure set it.
4196 2012-08-09 Dmitry Antipov <dmantipov@yandex.ru>
4198 Use TSET for write access to Lisp_Object slots of struct terminal.
4199 * termhooks.h (TSET): New macro.
4200 * coding.c, terminal.c, xselect.c: Adjust users.
4202 2012-08-08 Stefan Monnier <monnier@iro.umontreal.ca>
4204 * xdisp.c (safe_eval_handler): Remove prototype. Receive args describing
4205 the failing expression, include them in the error message.
4206 * eval.c (internal_condition_case_n): Pass nargs and args to hfun.
4207 * lisp.h (internal_condition_case_n): Update declaration.
4209 2012-08-08 Dmitry Antipov <dmantipov@yandex.ru>
4211 Inline functions to examine and change buffer overlays.
4212 * buffer.c (unchain_both): New function.
4213 * buffer.h (buffer_get_overlays, buffer_set_overlays):
4214 (buffer_has_overlays): New function.
4215 (enum overlay_type): New enum.
4216 * alloc.c, buffer.c, editfns.c, fileio.c, indent.c:
4217 * insdel.c, intervals.c, print.c, xdisp.c: Adjust users.
4219 2012-08-08 Dmitry Antipov <dmantipov@yandex.ru>
4221 Inline functions to examine and change buffer intervals.
4222 * alloc.c (mark_interval_tree): Remove.
4223 (MARK_INTERVAL_TREE): Simplify.
4224 (UNMARK_BALANCE_INTERVALS): Remove. Adjust users.
4225 * intervals.c (buffer_balance_intervals): New function.
4226 (graft_intervals_into_buffer): Adjust indentation.
4227 (set_intervals_multibyte): Simplify.
4228 * buffer.h (BUF_INTERVALS): Remove.
4229 (buffer_get_intervals, buffer_set_intervals): New function.
4230 * alloc.c, buffer.c, editfns.c, fileio.c, indent.c, insdel.c:
4231 * intervals.c, textprop.c: Adjust users.
4233 2012-08-08 Dmitry Antipov <dmantipov@yandex.ru>
4235 Inline functions to examine and change string intervals.
4236 * lisp.h (STRING_INTERVALS, STRING_SET_INTERVALS): Remove.
4237 (string_get_intervals, string_set_intervals): New function.
4238 * alloc.c, buffer.c, editfns.c, fns.c, insdel.c, intervals.c:
4239 * lread.c, print.c, textprop.c: Adjust users.
4241 2012-08-08 Glenn Morris <rgm@gnu.org>
4243 * lisp.mk (lisp): Remove language/persian.elc.
4245 2012-08-08 Dmitry Antipov <dmantipov@yandex.ru>
4248 * intervals.h (NULL_INTERVAL, DEFAULT_INTERVAL): Remove.
4249 (NULL_INTERVAL_P): Likewise. Adjust users.
4250 (FRONT_STICKY_P, END_NONSTICKY_P, FRONT_NONSTICKY_P):
4251 Adjust comment. Move under #if 0.
4252 * alloc.c, buffer.c, editfns.c, fns.c, insdel.c, intervals.c:
4253 * print.c, syntax.c, textprop.c, xdisp.c: Adjust users.
4255 2012-08-08 Dmitry Antipov <dmantipov@yandex.ru>
4257 Check total length of intervals with eassert.
4258 * intervals.h (CHECK_TOTAL_LENGTH): Remove.
4259 * intervals.c: Change all users to eassert.
4261 2012-08-07 Eli Zaretskii <eliz@gnu.org>
4263 * .gdbinit (xframe, xwindow, nextcons, xcar, xcdr, xlist):
4264 Rename fields to match removal of FGET and WGET and disuse of
4265 INTERNAL_FIELD in Lisp_Cons.
4267 2012-08-07 Dmitry Antipov <dmantipov@yandex.ru>
4269 Revert and cleanup Lisp_Cons, Lisp_Misc and Lisp_Symbol things.
4270 * lisp.h (struct Lisp_Symbol): Change xname to meaningful
4271 name since all xname users are fixed long time ago. Do not
4273 (set_symbol_name, set_symbol_function, set_symbol_plist):
4274 (set_symbol_next, set_overlay_plist): New function.
4275 (struct Lisp_Cons): Do not use INTERNAL_FIELD.
4276 (struct Lisp_Overlay): Likewise.
4277 (CVAR, MVAR, SVAR): Remove.
4278 * alloc.c, buffer.c, buffer.h, bytecode.c, cmds.c, data.c:
4279 * doc.c, eval.c, fns.c, keyboard.c, lread.c, nsselect.m:
4280 * xterm.c: Adjust users.
4281 * .gdbinit: Change to use name field of struct Lisp_Symbol
4284 2012-08-07 Dmitry Antipov <dmantipov@yandex.ru>
4286 Basic functions to set Lisp_Object and pointer slots of intervals.
4287 * intervals.h (interval_set_parent, interval_set_object):
4288 (interval_set_left, interval_set_right, interval_set_plist):
4289 (interval_copy_parent): New function.
4290 (SET_INTERVAL_OBJECT, SET_INTERVAL_PARENT, INTERVAL_PTR_SIZE): Remove.
4291 (RESET_INTERVAL, COPY_INTERVAL_CACHE, MERGE_INTERVAL_CACHE):
4293 (INTERVAL_SIZE): Remove. Adjust users.
4294 * alloc.c, intervals.c, lread.c, textprop.c: Use new functions.
4296 2012-08-07 Dmitry Antipov <dmantipov@yandex.ru>
4298 Drop PGET and revert read access to Lisp_Objects slots of Lisp_Process.
4299 * process.h (PGET): Remove.
4300 (struct Lisp_Process): Do not use INTERNAL_FIELD.
4301 * gnutls.c, print.c, process.c, sysdep.c, w32.c, xdisp.c: Adjust users.
4303 2012-08-07 Dmitry Antipov <dmantipov@yandex.ru>
4305 Drop WGET and revert read access to Lisp_Objects slots of struct window.
4306 * window.h (WGET): Remove.
4307 (struct window): Do not use INTERNAL_FIELD.
4308 * alloc.c, buffer.c, composite.c, dispextern.h, dispnew.c, editfns.c:
4309 * fileio.c, font.c, fontset.c, frame.c, frame.h, fringe.c, indent.c:
4310 * insdel.c, keyboard.c, keymap.c, lisp.h, minibuf.c, msdos.c, nsfns.m:
4311 * nsmenu.m, nsterm.m, print.c, textprop.c, w32fns.c, w32menu.c:
4312 * w32term.c, window.c, xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c:
4315 2012-08-07 Chong Yidong <cyd@gnu.org>
4317 * window.c (Fwindow_edges, Fwindow_pixel_edges)
4318 (Fwindow_absolute_pixel_edges, Fdelete_other_windows_internal)
4319 (Fdelete_window_internal): Signal an error if the window is not on
4320 a live frame (Bug#12025).
4322 2012-08-07 Dmitry Antipov <dmantipov@yandex.ru>
4324 Drop FGET and revert read access to Lisp_Objects slots of struct frame.
4325 * frame.h (FGET): Remove.
4326 (struct frame): Do not use INTERNAL_FIELD.
4327 * buffer.c, data.c, dispnew.c, dosfns.c, eval.c, fontset.c, frame.c:
4328 * fringe.c, gtkutil.c, minibuf.c, msdos.c, nsfns.m, nsmenu.m, nsterm.m:
4329 * print.c, term.c, w32fns.c, w32menu.c, w32term.c, window.c, window.h:
4330 * xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c: Adjust users.
4332 2012-08-06 Juanma Barranquero <lekktu@gmail.com>
4334 * w32.c: Silence compiler warnings.
4335 (map_w32_filename): Remove unused variable `is_fat'.
4336 (chase_symlinks): Add parentheses around expression.
4338 2012-08-06 Glenn Morris <rgm@gnu.org>
4340 * sysdep.c: Respect BROKEN_GETWD.
4342 * dispnew.c (GNU_LIBRARY_PENDING_OUTPUT_COUNT, PENDING_OUTPUT_COUNT):
4343 Let configure handle it.
4344 (stdio_ext.h) [DISPNEW_NEEDS_STDIO_EXT]: Include it.
4346 2012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
4348 Use GCALIGNMENT where appropriate.
4349 * alloc.c (XMALLOC_HEADER_ALIGNMENT, roundup_size):
4350 (union aligned_Lisp_Symbol, union aligned_Lisp_Misc):
4351 (mark_maybe_pointer, pure_alloc): Change to use GCALIGNMENT.
4353 2012-08-06 Eli Zaretskii <eliz@gnu.org>
4355 * w32menu.c (set_frame_menubar, initialize_frame_menubar):
4356 Don't use FRAME_MENU_BAR_ITEMS as an lvalue.
4358 2012-08-06 Stefan Monnier <monnier@iro.umontreal.ca>
4360 * buffer.h (struct buffer): Revert `indirections' to a simple int;
4361 that should be sufficient for everyone.
4363 2012-08-06 Jan Djärv <jan.h.d@swipnet.se>
4365 * keyboard.c (timer_check_2): Add break so timer_check returns next
4368 2012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
4370 Fix Windows build errors introduced after converting to WGET and WSET.
4371 * w32term.c (w32_set_vertical_scroll_bar): Change to use WSET.
4372 Reported by Andy Moreton <andrewjmoreton@gmail.com>.
4374 2012-08-06 Jan Djärv <jan.h.d@swipnet.se>
4376 * nsterm.m (ns_frame_rehighlight): Use FSET.
4378 * nsmenu.m (ns_update_menubar): Use FSET.
4380 2012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
4382 Separate read and write access to Lisp_Object slots of Lisp_Process.
4383 * process.h (PGET, PSET): New macros similar to AREF and ASET.
4384 * gnutls.c, print.c, process.c, sysdep.c, w32.c, xdisp.c: Adjust users.
4386 2012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
4388 Separate read and write access to Lisp_Object slots of struct window.
4389 * window.h (WGET, WSET): New macros similar to AREF and ASET.
4390 * alloc.c, buffer.c, composite.c, dispextern.h, dispnew.c, editfns.c:
4391 * fileio.c, font.c, fontset.c, frame.c, frame.h, fringe.c, indent.c:
4392 * insdel.c, keyboard.c, keymap.c, lisp.h, minibuf.c, msdos.c, nsfns.m:
4393 * nsmenu.m, nsterm.m, print.c, textprop.c, w32fns.c, w32menu.c:
4394 * w32term.c, window.c, xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c:
4397 2012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
4399 Fix Windows build errors introduced after converting to FGET and FSET.
4400 * w32term.c (x_frame_rehighlight, x_scroll_bar_create):
4401 (w32_condemn_scroll_bars, w32_redeem_scroll_bar):
4402 (w32_judge_scroll_bars): Change to use FSET.
4403 Reported by Andy Moreton <andrewjmoreton@gmail.com>.
4405 2012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
4407 Fix replacement typo.
4408 * window.c (replace_window): Set root_window instead of
4409 selected_window. This fixes a total window subsystem
4410 malfunction reported by Bastien Guerry <bzg@gnu.org>.
4412 2012-08-06 Glenn Morris <rgm@gnu.org>
4414 * lisp.mk (lisp): Add language/persian.elc.
4416 2012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
4418 Separate read and write access to Lisp_Object slots of struct frame.
4419 * frame.h (FGET, FSET): New macros similar to AREF and ASET.
4420 * buffer.c, data.c, dispnew.c, dosfns.c, eval.c, fontset.c, frame.c:
4421 * fringe.c, gtkutil.c, minibuf.c, msdos.c, nsfns.m, nsmenu.m, nsterm.m:
4422 * print.c, term.c, w32fns.c, w32menu.c, w32term.c, window.c, window.h:
4423 * xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c: Adjust users.
4425 2012-08-05 Andreas Schwab <schwab@linux-m68k.org>
4427 * emacs.c (decode_env_path): Only use defaulted if WINDOWSNT.
4429 2012-08-05 Dmitry Antipov <dmantipov@yandex.ru>
4431 Generalize common compile-time constants.
4432 * lisp.h (header_size, bool_header_size, word_size): Now here.
4433 (struct Lisp_Vector): Add comment.
4434 (struct Lisp_Bool_Vector): Move up to define handy constants.
4435 (VECSIZE, PSEUDOVECSIZE): Simplify.
4436 (SAFE_ALLOCA_LISP): Use new constant. Adjust indentation.
4437 * buffer.c, buffer.h, bytecode.c, callint.c, eval.c, fns.c:
4438 * font.c, fontset.c, keyboard.c, keymap.c, macros.c, menu.c:
4439 * msdos.c, w32menu.c, w32term.h, window.c, xdisp.c, xfaces.c:
4440 * xfont.c, xmenu.c: Use word_size where appropriate.
4442 2012-08-05 Lawrence Mitchell <wence@gmx.li>
4444 * search.c (Freplace_match): Treat \? in the replacement text
4445 literally (Bug#8161).
4447 2012-08-05 Chong Yidong <cyd@gnu.org>
4449 * term.c (Vsuspend_tty_functions, Vresume_tty_functions):
4450 * frame.c (Vdelete_frame_functions):
4451 * emacs.c (Vkill_emacs_hook): Doc fix.
4453 2012-08-04 Eli Zaretskii <eliz@gnu.org>
4455 * xfns.c (x_set_menu_bar_lines): Fix compilation error in
4456 --with-x-toolkit=no builds.
4457 Reported by Carsten Mattner <carstenmattner@gmail.com>.
4459 2012-08-04 Chong Yidong <cyd@gnu.org>
4461 * syntax.c (Fmodify_syntax_entry): Doc fix.
4463 2012-08-04 Eli Zaretskii <eliz@gnu.org>
4465 Fix startup warnings about ../site-lisp on MS-Windows. (Bug#11959)
4466 * w32.c (init_environment): Change the default values of many
4467 environment variables in dflt_envvars[] to NULL, to avoid pushing
4468 them into environment when they were not already defined.
4469 Remove the code that deletes site-lisp subdirectories from the default
4470 value of EMACSLOADPATH, as it is no longer needed.
4471 (check_windows_init_file): Now external, not static.
4472 Use Vload_path as is, without adding anything, as this function is now
4473 called when Vload_path is already set up.
4475 * w32.h (check_windows_init_file): Add prototype.
4477 * emacs.c (init_cmdargs) [WINDOWSNT]: When running from the build
4478 directory, ignore the /*/i386/ tail in Vinvocation_directory, for
4479 compatibility with Posix platforms.
4480 (main): Move the call to check_windows_init_file to here from
4482 (decode_env_path) [WINDOWSNT]: Expand the %emacs_dir%/ prefix, if
4483 any, in the DEFALT argument into the root of the Emacs build or
4484 installation tree, as appropriate.
4486 * callproc.c (init_callproc_1): Call decode_env_path instead of
4487 doing its equivalent by hand.
4488 (init_callproc): Replace DOS_NT condition with MSDOS, thus letting
4489 the code that sets Vexec_path run on MS-Windows.
4491 * lread.c (init_lread): Add comments to #ifdef's.
4493 * msdos.c (dos_set_window_size, IT_update_begin)
4494 (IT_frame_up_to_date, IT_set_frame_parameters): Use FVAR and WVAR
4495 instead of direct references.
4497 2012-08-04 Paul Eggert <eggert@cs.ucla.edu>
4499 Export DEFAULT_REHASH_* to GDB.
4500 * lisp.h (DEFAULT_REHASH_THRESHOLD, DEFAULT_REHASH_SIZE):
4501 Now constants, not macros.
4503 2012-08-03 Paul Eggert <eggert@cs.ucla.edu>
4505 Remove unnecessary casts involving pointers.
4506 These casts are no longer needed now that we assume C89 or later,
4507 since they involve casting to or from void *.
4508 * alloc.c (make_pure_string, make_pure_c_string, pure_cons)
4509 (make_pure_float, make_pure_vector):
4510 * lisp.h (SAFE_ALLOCA, SAFE_ALLOCA_LISP):
4511 * macros.c (Fstart_kbd_macro):
4512 * menu.c (find_and_return_menu_selection):
4513 * minibuf.c (read_minibuf_noninteractive):
4514 * sysdep.c (closedir):
4515 * xdisp.c (x_produce_glyphs):
4516 * xfaces.c (compare_fonts_by_sort_order):
4517 * xfns.c (x_real_positions, select_visual):
4518 * xselect.c (x_stop_queuing_selection_requests)
4519 (x_get_window_property, x_get_window_property_as_lisp_data):
4520 * xterm.c (x_set_frame_alpha, x_find_modifier_meanings):
4521 Remove unnecessary pointer casts.
4522 * alloc.c (record_xmalloc): New function.
4523 * lisp.h (record_xmalloc): New decl.
4524 (SAFE_ALLOCA): Now takes just one arg -- the size -- and acts
4525 more like a function. This is because the pointer cast is not
4526 needed. All uses changed.
4527 * print.c (print_string, print_error_message): Avoid length recalc.
4529 Improve fix for macroexp crash with debugging (Bug#12118).
4530 * lisp.h (ASET) [ENABLE_CHECKING]: Pay attention to
4531 ARRAY_MARK_FLAG when checking subscripts, because ASET is
4532 not supposed to be invoked from the garbage collector.
4533 See Andreas Schwab in <http://bugs.gnu.org/12118#25>.
4534 (gc_aset): New function, which is like ASET but can be
4535 used in the garbage collector.
4536 (set_hash_key, set_hash_value, set_hash_next, set_hash_hash)
4537 (set_hash_index): Use it instead of ASET.
4539 2012-08-03 Eli Zaretskii <eliz@gnu.org>
4541 Support symlinks on latest versions of MS-Windows.
4542 * w32.c: Include winioctl.h and aclapi.h.
4543 (is_symlink, chase_symlinks, enable_privilege, restore_privilege)
4544 (revert_to_self): Forward declarations of static functions.
4545 <static BOOL g_b_init_get_security_info>:
4546 <g_b_init_create_symbolic_link>: New static flags.
4547 (globals_of_w32): Initialize them to zero.
4548 (GetSecurityInfo_Proc, CreateSymbolicLink_Proc): New typedefs.
4549 (map_w32_filename): Improve commentary. Simplify switch.
4550 (SYMBOLIC_LINK_FLAG_DIRECTORY): Define if not defined in system
4551 headers (most versions of MinGW w32api don't).
4552 (get_security_info, create_symbolic_link)
4553 (get_file_security_desc_by_handle, is_symlink, chase_symlinks):
4555 (sys_access, sys_chmod): Call 'chase_symlinks' to resolve symlinks
4556 in the argument file name.
4557 (sys_access): Call unc_volume_file_attributes only if
4558 GetFileAttributes fails with network-related error codes.
4559 (sys_rename): Diagnose renaming of a symlink when the user doesn't
4560 have the required privileges.
4561 (get_file_security_desc_by_name): Rename from
4562 get_file_security_desc.
4563 (stat_worker): New function, with most of the guts of 'stat', and
4564 with addition of handling of symlinks and support for 'lstat'.
4565 If possible, get file's attributes and security information by
4566 handle, not by name. Produce S_IFLNK bit for symlinks, when
4567 called from 'lstat'.
4568 (stat, lstat): New functions, call 'stat_worker'.
4569 (symlink, readlink, careadlinkat): Rewritten to create and resolve
4570 symlinks when the underlying filesystem supports them.
4572 2012-08-02 Paul Eggert <eggert@cs.ucla.edu>
4574 Fix macroexp crash on Windows with debugging (Bug#12118).
4575 * lisp.h (ASET) [ENABLE_CHECKING]: Ignore ARRAY_MARK_FLAG when
4576 checking subscripts; problem introduced with the recent
4577 "ASET (a, i, v)" rather than "AREF (a, i) = v" patch.
4578 (ARRAY_MARK_FLAG): Now a macro as well as a constant,
4579 since it's used in non-static inline functions now.
4581 * xfaces.c (face_at_buffer_position, face_for_overlay_string):
4582 Don't assume buffer size fits in 'int'. Remove unused local.
4584 Use C99-style 'extern inline' if available.
4585 * buffer.h (BUFFER_INLINE):
4586 * category.h (CATEGORY_INLINE):
4587 * character.h (CHARACTER_INLINE):
4588 * charset.h (CHARSET_INLINE):
4589 * composite.h (COMPOSITE_INLINE):
4590 * dispextern.h (DISPEXTERN_INLINE):
4591 * lisp.h (LISP_INLINE):
4592 * systime.h (SYSTIME_INLINE):
4593 New macro, replacing 'static inline' in this header.
4594 * buffer.h, category.h, character.h, charset.h, composite.h:
4595 * dispextern.h, lisp.h, systime.h:
4596 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
4597 * alloc.c (LISP_INLINE):
4598 * buffer.c (BUFFER_INLINE):
4599 * category.c (CATEGORY_INLINE):
4600 * character.c (CHARACTER_INLINE):
4601 * charset.c (CHARSET_INLINE):
4602 * composite.c (COMPOSITE_INLINE):
4603 * dispnew.c (DISPEXTERN_INLINE):
4604 * sysdep.c (SYSTIME_INLINE):
4605 Define to EXTERN_INLINE, so that the corresponding functions
4606 are compiled into code.
4607 * conf_post.h (INLINE, EXTERN_INLINE, INLINE_HEADER_BEGIN)
4608 (INLINE_HEADER_END): New macros.
4609 * lisp.h (PSEUDOVECTOR_FLAG): Now a macro as well as a constant,
4610 since it's used in non-static inline functions now.
4611 (VALMASK) [!USE_LSB_TAG]: Likewise.
4613 2012-08-02 Glenn Morris <rgm@gnu.org>
4615 * s/: Remove empty directory.
4617 * s/ms-w32.h: Move to ../nt/inc.
4618 * makefile.w32-in (TAGS, TAGS-gmake, MS_W32_H):
4619 Update for new ms-w32.h location.
4621 2012-08-02 Paul Eggert <eggert@cs.ucla.edu>
4624 * syswait.h (WRETCODE): Remove, consistently with ../configure.ac.
4626 2012-08-02 Glenn Morris <rgm@gnu.org>
4628 * nsterm.m (ns_exec_path, ns_load_path): Use SEPCHAR rather than
4629 hard-coding the path separator.
4631 2012-08-01 Paul Eggert <eggert@cs.ucla.edu>
4633 Use "ASET (a, i, v)" rather than "AREF (a, i) = v".
4634 This how ASET and AREF are supposed to work, and makes
4635 it easier to think about future improvements. See
4636 <http://lists.gnu.org/archive/html/emacs-devel/2012-08/msg00026.html>.
4637 * charset.h (set_charset_attr): New function.
4638 All lvalue-style uses of CHARSET_DECODER etc. changed to use it.
4639 * lisp.h (ASET): Rewrite so as not to use AREF in an lvalue style.
4640 (aref_addr): New function. All uses of &AREF(...) changed.
4641 (set_hash_key, set_hash_value, set_hash_next, set_hash_hash)
4642 (set_hash_index): New functions. All lvalue-style uses of
4643 HASH_KEY etc. changed.
4644 * keyboard.c (set_prop): New function. All lvalue-style uses
4647 2012-08-01 Alp Aker <alp.tekin.aker@gmail.com>
4649 * nsterm.m (ns_set_vertical_scroll_bar, ns_redeem_scroll_bar)
4650 (EmacsWindow-accessibilityAttributeValue, EmacsScroller-initFrame:)
4651 (EmacsScroller-dealloc): Adjust to use WVAR. (Bug#12114)
4652 * nsfns.m (ns_set_name_as_filename): Likewise.
4653 * nsmenu.m (ns_update_menubar): Likewise.
4654 * nsselect.m (symbol_to_nsstring): Adjust to use SVAR.
4656 2012-08-01 Eli Zaretskii <eliz@gnu.org>
4658 * .gdbinit (xcar, xcdr, xlist, xwindow, nextcons, xprintsym):
4659 Adapt to latest changes in field names of the corresponding Lisp
4662 * xdisp.c (try_window_id): Use WVAR in IF_DEBUG code.
4664 2012-08-01 Glenn Morris <rgm@gnu.org>
4666 * s/msdos.h: Remove file.
4667 * conf_post.h [MSDOS]: New section, moved from s/msdos.h.
4668 * Makefile.in (S_FILE): Remove.
4669 (config_h): Remove S_FILE.
4671 2012-08-01 Juanma Barranquero <lekktu@gmail.com>
4673 * s/ms-w32.h (DEVICE_SEP, IS_DIRECTORY_SEP, IS_ANY_SEP):
4674 Remove; moved to nt/config.nt.
4676 2012-08-01 Dmitry Antipov <dmantipov@yandex.ru>
4678 Use INTERNAL_FIELD for conses and overlays.
4679 * lisp.h (struct Lisp_Cons): Use INTERNAL_FIELD.
4680 Remove obsolete comment.
4682 (struct Lisp_Overlay): Use INTERNAL_FIELD.
4683 * alloc.c, buffer.c, buffer.h, fns.c: Adjust users.
4685 2012-08-01 Dmitry Antipov <dmantipov@yandex.ru>
4687 Use INTERNAL_FIELD for symbols.
4688 * lisp.h (SVAR): New macro. Adjust users.
4689 * alloc.c, bytecode.c, cmds.c, data.c, doc.c, eval.c:
4690 * fns.c, keyboard.c, lread.c, xterm.c: Users changed.
4692 2012-08-01 Dmitry Antipov <dmantipov@yandex.ru>
4694 Use INTERNAL_FIELD for processes.
4695 * process.h (PVAR): New macro. Adjust style.
4696 (struct Lisp_Process): Change Lisp_Object members to INTERNAL_FIELD.
4697 * print.c, process.c, sysdep.c, w32.c, xdisp.c: Users changed.
4699 2012-08-01 Dmitry Antipov <dmantipov@yandex.ru>
4701 Use INTERNAL_FIELD for windows.
4702 * window.h (WVAR): New macro.
4703 (struct window): Change Lisp_Object members to INTERNAL_FIELD.
4704 * alloc.c, buffer.c, composite.c, dispextern.h, dispnew.c, editfns.c:
4705 * fileio.c, font.c, fontset.c, frame.c, frame.h, fringe.c, indent.c:
4706 * insdel.c, keyboard.c, keymap.c, lisp.h, minibuf.c, nsterm.m, print.c:
4707 * textprop.c, w32fns.c, w32menu.c, w32term.c, window.c, xdisp.c:
4708 * xfaces.c, xfns.c, xmenu.c, xterm.c: Users changed.
4710 2012-08-01 Paul Eggert <eggert@cs.ucla.edu>
4712 * coding.h (CODING_ATTR_FLUSHING): Remove; unused and wouldn't work.
4714 2012-08-01 Glenn Morris <rgm@gnu.org>
4716 * lisp.h (IS_DIRECTORY_SEP, IS_DEVICE_SEP, IS_ANY_SEP):
4717 Move to configure.ac.
4719 2012-08-01 Juanma Barranquero <lekktu@gmail.com>
4721 * makefile.w32-in (CONFIG_H): Update dependencies.
4722 (CONF_POST_H): New macro.
4724 * s/ms-w32.h (SEPCHAR, NULL_DEVICE): Remove; moved to nt/config.nt.
4726 2012-07-31 Glenn Morris <rgm@gnu.org>
4728 * Makefile.in (S_FILE): No longer set by configure.
4730 * conf_post.h (config_opsysfile): Move earlier, so that WINDOWSNT
4732 (alloca.h) [WINDOWSNT]: Don't include it on MS Windows.
4734 * process.h (NULL_DEVICE):
4735 * emacs.c (SEPCHAR):
4736 * editfns.c (USER_FULL_NAME): Let configure set them.
4738 * s/README, s/template.h: Remove files.
4740 * conf_post.h [HPUX]: Undefine HAVE_RANDOM and HAVE_RINT.
4742 * conf_post.h (AMPERSAND_FULL_NAME, subprocesses):
4743 Move to configure.ac.
4745 2012-07-31 Eli Zaretskii <eliz@gnu.org>
4747 * .gdbinit (xframe): Adapt to introduction of FVAR and the
4748 resulting renaming of 'struct frame' members.
4750 * w32menu.c (w32_menu_show): Revert bogus introduction of FVAR.
4752 * fontset.c (dump_fontset): Fix compilation with ENABLE_CHECKING
4753 after introduction of FVAR.
4755 2012-07-31 Jan Djärv <jan.h.d@swipnet.se>
4757 * nsmenu.m (update_frame_tool_bar): Change key from NSObject* to id.
4759 * nsterm.m (ns_draw_fringe_bitmap, ns_dumpglyphs_image): Use drawInRect
4760 instead of compositeToPoint.
4761 (applicationShouldTerminate): Pass NS String literal to NSRunAlertPanel.
4763 * nsfns.m, nsmenu.m, nsterm.m: Adopt to struct frame/FVAR changes.
4765 2012-07-31 Dmitry Antipov <dmantipov@yandex.ru>
4767 Generalize INTERNAL_FIELD between buffers, keyboards and frames.
4768 * lisp.h (INTERNAL_FIELD): New macro.
4769 * buffer.h (BUFFER_INTERNAL_FIELD): Remove.
4770 (BVAR): Change to use INTERNAL_FIELD.
4771 * keyboard.h (KBOARD_INTERNAL_FIELD): Likewise.
4772 (KVAR): Change to use INTERNAL_FIELD.
4773 * frame.h (FVAR): New macro.
4774 (struct frame): Use INTERNAL_FIELD for all Lisp_Object fields.
4775 * alloc.c, buffer.c, data.c, dispnew.c, dosfns.c, eval.c, frame.c:
4776 * fringe.c, gtkutil.c, minibuf.c, nsfns.m, nsterm.m, print.c:
4777 * term.c, w32fns.c, w32menu.c, w32term.c, window.c, window.h:
4778 * xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c: Users changed.
4780 2012-07-31 Dmitry Antipov <dmantipov@yandex.ru>
4782 Miscellaneous fixes for non-default X toolkits.
4783 * xfns.c (Fx_file_dialog): Change to SSDATA to avoid warnings.
4784 * xterm.c (x_frame_of_widget): Remove redundant prototype.
4785 Move under #ifdef USE_LUCID.
4786 (x_create_toolkit_scroll_bar): Adjust scroll_bar_name
4787 definition and usage to avoid warnings.
4789 2012-07-31 Jan Djärv <jan.h.d@swipnet.se>
4791 * nsterm.m (openFiles): Fix previous checkin.
4793 2012-07-31 Paul Eggert <eggert@cs.ucla.edu>
4795 * indent.c (compute_motion): Remove unused local.
4797 2012-07-31 Glenn Morris <rgm@gnu.org>
4799 * s/usg5-4-common.h (wait3, WRETCODE): Let configure set them.
4801 * conf_post.h [USG5_4]:
4802 Move remaining contents of s/usg5-4-common.h here.
4803 * s/usg5-4-common.h: Remove file.
4805 * conf_post.h [IRIX6_5]: Move remaining contents of s/irix6-5.h here.
4806 * s/irix6-5.h: Remove file.
4808 * conf_post.h [DARWIN_OS]: Move remaining contents of s/darwin.h here.
4809 * s/darwin.h: Remove file.
4811 * conf_post.h [HPUX]: Move random, srandom here from s/hpux10-20.h.
4812 * s/hpux10-20.h: Remove file, which is now empty.
4814 2012-07-30 Glenn Morris <rgm@gnu.org>
4816 * conf_post.h: New, split from configure.ac's AH_BOTTOM.
4817 * Makefile.in (config_h): Add conf_post.h.
4818 * makefile.w32-in (CONFIG_H): Add conf_post.h.
4820 2012-07-30 Jan Djärv <jan.h.d@swipnet.se>
4822 * nsterm.m (ns_do_open_file): New variable.
4823 (ns_term_init): Set ns_do_open_file to YES after run returns.
4824 (openFile, openTempFile, openFileWithoutUI, openFiles):
4825 Open files only if ns_do_open_file.
4827 2012-07-30 Paul Eggert <eggert@cs.ucla.edu>
4829 * lisp.h (SWITCH_ENUM_CAST): Remove. All uses removed.
4830 This no-op macro hasn't been needed for many years.
4831 * src/regex.c (SWITCH_ENUM_CAST) [!emacs]: Likewise.
4833 Export DIRECTORY_SEP, TYPEMASK, VALMASK to GDB.
4834 * alloc.c (gdb_make_enums_visible) [USE_LSB_TAG]: Add lsb_bits.
4835 * lisp.h (enum lsb_bits) [USE_LSB_TAG]: New enum, for
4836 gdb_make_enums_visible.
4837 (TYPEMASK, VALMASK) [USE_LSB_TAGS]: Now enum constants, not macros.
4838 (DIRECTORY_SEP): Now a constant, not a macro.
4840 2012-07-30 Eli Zaretskii <eliz@gnu.org>
4842 * w32fns.c (w32_wnd_proc): Pass w32_keyboard_codepage to
4843 w32_kbd_patch_key as the 2nd arg. (Bug#12082)
4845 * w32term.c <w32_keyboard_codepage>: Renamed from
4846 keyboard_codepage and now external. All users changed.
4848 * w32term.h: Add declaration of w32_keyboard_codepage.
4850 * w32inevt.c (w32_kbd_patch_key): Accept an additional argument --
4851 the codepage to translate keys to Unicode. If this argument is
4852 -1, use the value returned by GetConsoleCP. All callers changed.
4854 2012-07-30 Paul Eggert <eggert@cs.ucla.edu>
4856 Update .PHONY listings in makefiles.
4857 * Makefile.in (.PHONY): Add all, mostlyclean, clean,
4858 bootstrap-clean, distclean, maintainer-clean, versioclean,
4861 * lisp.h (STRING_BYTES_BOUND): Cast entire result to ptrdiff_t.
4862 This is a bit clearer. Fix some commentary typos.
4864 2012-07-30 Glenn Morris <rgm@gnu.org>
4866 * s/netbsd.h: Let configure include signal.h if needed.
4867 Remove file, which is now empty.
4869 * s/usg5-4-common.h (_longjmp, _setjmp, TIOCSIGSEND):
4870 Let configure set them.
4871 * s/irix6-5.h (_longjmp, _setjmp, TIOCSIGSEND):
4872 No more need to undefine.
4874 2012-07-30 Andreas Schwab <schwab@linux-m68k.org>
4876 * keymap.c (Fkey_description): Don't remove 0x80 bit from
4877 non-single-byte char when adding meta modifier. (Bug#12090)
4879 2012-07-30 Dmitry Antipov <dmantipov@yandex.ru>
4881 Convert safe_call to use variable number of arguments.
4882 * xdisp.c (safe_call): Convert to use varargs. Adjust users.
4883 (safe_call2): Fix comment.
4884 * lisp.h (safe_call): Adjust prototype.
4885 * coding.c (encode_coding_object): Change to use safe_call2.
4886 * xfaces.c (merge_face_heights): Change to use safe_call1.
4888 2012-07-30 Glenn Morris <rgm@gnu.org>
4890 * s/aix4-2.h (sigmask): No need to undefine it, since syssignal.h
4891 does that unconditionally. Remove file, which is now empty.
4893 * s/freebsd.h, s/gnu-linux.h, s/sol2-6.h, s/unixware.h:
4896 2012-07-30 Paul Eggert <eggert@cs.ucla.edu>
4898 Export to GDB most of lisp.h's remaining object-like macros.
4899 * lisp.h (min, max): Move earlier, because they're used earlier now.
4900 (INTMASK, ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK)
4901 (CHAR_TABLE_STANDARD_SLOTS, CHARTAB_SIZE_BITS_0)
4902 (CHARTAB_SIZE_BITS_1, CHARTAB_SIZE_BITS_2, CHARTAB_SIZE_BITS_3)
4903 (DEFAULT_HASH_SIZE, COMPILED_ARGLIST, COMPILED_BYTECODE)
4904 (COMPILED_CONSTANTS, COMPILED_STACK_DEPTH, COMPILED_DOC_STRING)
4905 (COMPILED_INTERACTIVE, CHAR_ALT, CHAR_SUPER, CHAR_HYPER, CHAR_SHIFT)
4906 (CHAR_CTL, CHAR_META, CHAR_MODIFIER_MASK, CHARACTERBITS)
4907 (MANY, UNEVALLED, FLOAT_TO_STRING_BUFSIZE, MAX_ALLOCA):
4908 Now constants, for GDB. They need not be macros.
4909 (MOST_POSITIVE_FIXNUM, MOST_NEGATIVE_FIXNUM, STRING_BYTES_BOUND):
4910 Now constants, for GDB, as well as macros, for static initializers.
4911 (CHAR_TABLE_STANDARD_SLOTS, CHAR_TABLE_EXTRA_SLOTS):
4912 Move to after the definition of struct Lisp_Char_Table,
4913 since the former now needs that type defined.
4914 (enum CHARTAB_SIZE_BITS, enum CHAR_TABLE_STANDARD_SLOTS)
4915 (enum DEFAULT_HASH_SIZE, enum Lisp_Compiled, enum char_bits)
4916 (enum maxargs, enum FLOAT_TO_STRING_BUFSIZE, enum MAX_ALLOCA):
4917 New enums, for gdb_make_enums_visible.
4918 (GLYPH_MODE_LINE_FACE): Remove; unused.
4919 * alloc.c (STRING_BYTES_MAX): Now a constant, not a macro.
4920 (gdb_make_enums_visible): Add enum CHARTAB_SIZE_BITS, enum
4921 CHAR_TABLE_STANDARD_SLOTS, enum char_bits, enum DEFAULT_HASH_SIZE,
4922 enum FLOAT_TO_STRING_BUFSIZE, enum Lisp_Bits, enum Lisp_Compiled,
4923 enum maxargs, enum MAX_ALLOCA.
4924 (ARRAY_MARK_FLAG_VAL, PSEUDOVECTOR_FLAG_VAL, VALMASK_VAL): Remove.
4925 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Remove;
4926 no longer needed, now that they are done in lisp.h.
4928 2012-07-30 Dmitry Antipov <dmantipov@yandex.ru>
4930 Cleanup string bytes checking.
4931 * alloc.c (GC_STRING_BYTES, CHECK_STRING_BYTES): Remove. Convert
4932 all users to STRING_BYTES or string_bytes if GC_CHECK_STRING_BYTES.
4933 (check_string_bytes): Define to empty if not GC_CHECK_STRING_BYTES.
4934 (check_sblock, compact_small_strings): Simplify.
4936 2012-07-29 Paul Eggert <eggert@cs.ucla.edu>
4938 * lisp.h (LISP_INT_TAG, LISP_INT1_TAG, LISP_STRING_TAG): Remove.
4939 These macros are confusing and no longer need to be defined, as
4940 the enum values now suffice. All uses replaced with definiens.
4941 (Lisp_Int1, Lisp_String): Define directly; this is clearer.
4943 2012-07-29 Juanma Barranquero <lekktu@gmail.com>
4945 * makefile.w32-in (LISP_H, $(BLD)/emacs.$(O), $(BLD)/w32inevt.$(O))
4946 ($(BLD)/w32console.$(O)): Update dependencies.
4948 2012-07-29 Dmitry Antipov <dmantipov@yandex.ru>
4950 Remove HIDE_LISP_IMPLEMENTATION and cleanup cons free list check.
4951 * lisp.h (HIDE_LISP_IMPLEMENTATION): Remove as useless for a long
4953 (CHECK_CONS_LIST): Remove. Convert all users to check_cons_list.
4955 2012-07-29 Jan Djärv <jan.h.d@swipnet.se>
4957 * lread.c (init_lread): Remove if-statement in ifdef HAVE_NS before
4958 setting sitelisp (Bug#12010).
4960 2012-07-29 Eli Zaretskii <eliz@gnu.org>
4962 * w32heap.h (OS_9X): Rename from OS_WINDOWS_95.
4964 * w32heap.c (cache_system_info):
4965 * w32.c (sys_rename):
4966 * w32proc.c (find_child_console, sys_kill): All users changed.
4968 2012-07-29 Paul Eggert <eggert@cs.ucla.edu>
4970 * alloc.c (Fgarbage_collect): Indent as per usual Emacs style.
4972 2012-07-29 Eli Zaretskii <eliz@gnu.org>
4974 * makefile.w32-in (LISP_H): Add $(NT_INC)/stdalign.h.
4976 2012-07-29 Dmitry Antipov <dmantipov@yandex.ru>
4978 Cleanup statistics calculation in Fgarbage_collect.
4979 * alloc.c (Fgarbage_collect): Rename t1 to meaningful start.
4980 Fix zombies percentage calculation. Simplify elapsed time calculation.
4982 2012-07-29 Dmitry Antipov <dmantipov@yandex.ru>
4984 Generalize marker debugging code under MARKER_DEBUG and use eassert.
4985 * insdel.c (CHECK_MARKERS, check_markers_debug_flag): Remove.
4986 (gap_left, gap_right, adjust_markers_for_delete, insert_1_both)
4987 (insert_from_string_1, insert_from_gap, insert_from_buffer_1)
4988 (replace_range, replace_range_2, del_range_2): Change to eassert.
4989 * marker.c (byte_char_debug_check): Adjust style.
4991 2012-07-29 Paul Eggert <eggert@cs.ucla.edu>
4993 Don't use the abbreviation "win" to refer to Windows (Bug#10421).
4994 * regex.c (MAX_BUF_SIZE): Remove some incorrect and
4995 long-ago-commented-out code that talks about "WIN32".
4996 * w32heap.h (OS_WINDOWS_95): Rename from OS_WIN95.
4999 2012-07-28 Paul Eggert <eggert@cs.ucla.edu>
5001 Use Gnulib stdalign module (Bug#9772, Bug#9960).
5002 * alloc.c (XMALLOC_BASE_ALIGNMENT, GC_POINTER_ALIGNMENT, pure_alloc):
5003 Simplify by using alignof.
5004 (pure_alloc) [! USE_LSB_TAG]: Don't over-align EMACS_INT values.
5005 * lisp.h: Include <stdalign.h>.
5006 (GCALIGNMENT): New macro and constant.
5007 (DECL_ALIGN): Remove. All uses replaced by alignas (GCALIGNMENT).
5008 (USE_LSB_TAG): ifdef on alignas, not on DECL_ALIGN.
5009 (stdalign): New macro, if not already defined.
5011 2012-07-28 Eli Zaretskii <eliz@gnu.org>
5013 Fix non-ASCII input in non-GUI frames on MS-Windows. (Bug#12055)
5014 * w32inevt.c: Include w32inevt.h.
5015 (w32_read_console_input): New inline function, calls either
5016 ReadConsoleInputA or ReadConsoleInputW, depending on the value of
5017 w32_console_unicode_input.
5018 (fill_queue): Call w32_read_console_input instead of ReadConsoleInput.
5019 (w32_kbd_patch_key, key_event): Use the codepage returned by
5020 GetConsoleCP, rather than the ANSI codepage returned by GetLocaleInfo.
5021 (key_event): use uChar.UnicodeChar only if
5022 w32_console_unicode_input is non-zero.
5024 * w32console.c: Include w32heap.h.
5025 <w32_console_unicode_input>: New global variable.
5026 (initialize_w32_display): Set w32_console_unicode_input to 1 on NT
5027 family of Windows, zero otherwise.
5029 * w32inevt.h: Declare w32_console_unicode_input.
5031 * xdisp.c (init_iterator): Don't reference tip_frame in a build
5032 --without-x. (Bug#11742)
5034 2012-07-27 Paul Eggert <eggert@cs.ucla.edu>
5036 Adjust GDB to reflect pvec_type changes (Bug#12036).
5037 * .gdbinit (xvectype, xpr, xbacktrace): Adjust to reflect the
5038 2012-07-04 changes to pseudovector representation.
5039 Problem reported by Eli Zaretskii in <http://bugs.gnu.org/12036#30>.
5041 2012-07-27 Michael Albinus <michael.albinus@gmx.de>
5043 * dbusbind.c (XD_DBUS_VALIDATE_BUS_ADDRESS): Canonicalize session
5045 (xd_close_bus, Fdbus_init_bus): Handle reference counter properly.
5047 2012-07-27 Eli Zaretskii <eliz@gnu.org>
5049 * alloc.c (listn): Fix the order the arguments are consed onto the
5052 * lisp.h (enum constype): Use CONSTYPE_HEAP and CONSTYPE_PURE for
5053 enumeration constants, as PURE and HEAP are too general, and clash
5054 with other headers and sources, such as gmalloc.c and the
5055 MS-Windows system headers. All users changed.
5057 2012-07-27 Dmitry Antipov <dmantipov@yandex.ru>
5059 Revert last save_excursion_save and save_excursion_restore changes.
5060 * alloc.c, editfns.c, marker.c, lisp.h: Revert.
5061 Lots of crashes reported by Chong Yidong <cyd@gnu.org>.
5063 2012-07-27 Dmitry Antipov <dmantipov@yandex.ru>
5065 Fix recently-introduced typos in Windows port.
5066 Reported by Martin Rudalics <rudalics@gmx.at>.
5067 * w32.c (init_environment): Replace comma with semicolon.
5068 * w32fns.c (syms_of_w32fns): Add missing parenthesis.
5070 2012-07-27 Paul Eggert <eggert@cs.ucla.edu>
5072 Improve GDB symbol export (Bug#12036).
5073 * .gdbinit (xgetptr, xgetint, xgettype): Set $bugfix in different
5074 arms of an 'if', not using conditional expressions; otherwise GDB
5075 complains about the types in the unevaluated arm when the argument
5076 is an integer literal.
5077 (xgetint): Simplify expression.
5078 * alloc.c (gdb_make_enums_visible): New constant. This ports to
5079 GCC 3.4.2 the export of symbols to GDB. Problem reported by Eli
5080 Zaretskii in <http://bugs.gnu.org/12036#13>.
5081 * lisp.h (PUBLISH_TO_GDB): Remove. All uses removed. No longer
5082 needed now that we have gdb_make_enums_visible.
5083 (enum CHECK_LISP_OBJECT_TYPE, enum Lisp_Bits, enum More_Lisp_Bits)
5084 (enum enum_USE_LSB_TAG):
5085 New enum types, packaging up enums that need to be exported to GDB.
5087 2012-07-27 Dmitry Antipov <dmantipov@yandex.ru>
5089 Utility function to make a list from specified amount of objects.
5090 * lisp.h (enum constype): New datatype.
5091 (listn): New prototype.
5092 * alloc.c (listn): New function.
5093 (Fmemory_use_count, syms_of_alloc): Use it.
5094 * buffer.c (syms_of_buffer): Likewise.
5095 * callint.c (syms_of_callint): Likewise.
5096 * charset.c (define_charset_internal): Likewise.
5097 * coding.c (syms_of_coding): Likewise.
5098 * keymap.c (syms_of_keymap): Likewise.
5099 * search.c (syms_of_search): Likewise.
5100 * syntax.c (syms_of_syntax): Likewise.
5101 * w32.c (init_environment): Likewise.
5102 * w32fns.c (Fw32_battery_status, syms_of_w32fns): Likewise.
5103 * xdisp.c (syms_of_xdisp): Likewise.
5104 * xfns.c (syms_of_xfns): Likewise.
5106 2012-07-27 Dmitry Antipov <dmantipov@yandex.ru>
5108 Fast save_excursion_save and save_excursion_restore.
5109 * lisp.h (struct Lisp_Excursion): New data type.
5110 (PVEC_EXCURSION): New pseudovector type.
5111 (XEXCURSION, XSETEXCURSION, EXCURSIONP): Convenient macros
5112 to deal with it. Adjust comments.
5113 (init_marker, attach_marker): New prototype.
5114 (unchain_marker): Adjust prototype.
5115 * marker.c (attach_marker): Change to global.
5116 (init_marker): New function.
5117 * alloc.c (Fmake_marker, build_marker): Use it.
5118 (build_marker): More easserts.
5119 (mark_object): Handle struct Lisp_Excursion.
5120 * editfns.c (save_excursion_save, save_excursion_restore):
5121 Reimplement to use struct Lisp_Excursion. Add comments.
5123 2012-07-26 Paul Eggert <eggert@cs.ucla.edu>
5125 Fix export of symbols to GDB (Bug#12036).
5126 * alloc.c (ARRAY_MARK_FLAG_VAL, PSEUDOVECTOR_FLAG_VAL, VALMASK_VAL)
5127 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Move these here from
5128 emacs.c, as this is a more-suitable home. Had this been done earlier
5129 the fix for 12036 would have avoided some of the problems noted in
5130 <http://bugs.gnu.org/12036#13> by Eli Zaretskii, as the scope problems
5131 would have been more obvious.
5132 * emacs.c: Do not include <verify.h>; no longer needed.
5133 (gdb_CHECK_LISP_OBJECT_TYPE, gdb_DATA_SEG_BITS)
5134 (gdb_GCTYPEBITS, gdb_USE_LSB_TAG)
5135 (CHECK_LISP_OBJECT_TYPE, DATA_SEG_BITS, GCTYPEBITS, USE_LSB_TAG):
5136 Remove; now done in lisp.h.
5137 * lisp.h (PUBLISH_TO_GDB): New macro.
5138 (GCTYPEBITS, USE_LSB_TAG, CHECK_LISP_OBJECT_TYPE, enum pvec_type)
5139 (DATA_SEG_BITS): Use it.
5140 (GCTYPEBITS, USE_LSB_TAG): Now also an enum, for GDB.
5141 (CHECK_LISP_OBJECT_TYPE, DATA_SEG_BITS): Now just an enum, for GDB.
5142 * mem-limits.h (EXCEEDS_LISP_PTR): Redo so that DATA_SEG_BITS need
5143 not be usable in #if. This simplifies things.
5145 2012-07-26 Juanma Barranquero <lekktu@gmail.com>
5147 * makefile.w32-in ($(BLD)/emacs.$(O)): Update dependencies.
5149 2012-07-26 Paul Eggert <eggert@cs.ucla.edu>
5151 Simplify export of symbols to GDB (Bug#12036).
5152 * .gdbinit (xgetptr, xgetint, xgettype): Don't use "set $bugfix =
5153 $bugfix.i", as this doesn't work (with GDB 7.4.1, anyway).
5154 (xgetptr, xgetint, xgettype, xcoding, xcharset, xprintbytestr):
5155 Adjust to changes in lisp.h and emacs.c, by using
5156 CHECK_LISP_OBJECT_TYPE rather than gdb_use_struct, VALMASK instead
5157 of $valmask, DATA_SEG_BITS instead of gdb_data_seg_bits,
5158 INTTYPEBITS instead of gdb_gctypebits - 1, USE_LSB_TAG instead of
5159 gdb_use_lsb, (1 << GCTYPEBITS) - 1 instead of $tagmask, VALBITS
5160 instead of gdb_valbits.
5161 (xvectype, xvector, xpr, xprintstr, xbacktrace): Similarly, use
5162 PSEUDOVECTOR_FLAG instead of PVEC_FLAG, and ARRAY_MARK_FLAG
5163 instead of gdb_array_mark_flag.
5164 (xboolvector): Get size from $->size, not $->header.size.
5165 Use BOOL_VECTOR_BITS_PER_CHAR rather than mystery constants.
5166 (xreload, hook-run, hookpost-run): Remove.
5167 * emacs.c: Include <verify.h>.
5168 (gdb_use_lsb, gdb_use_struct, gdb_valbits, gdb_gctypebits)
5169 (gdb_data_seg_bits, PVEC_FLAG, gdb_array_mark_flag, gdb_pvec_type):
5171 (gdb_CHECK_LISP_OBJECT_TYPE, gdb_DATA_SEG_BITS, gdb_GCTYPEBITS)
5172 (gdb_USE_LSB_TAG): New enum constants.
5173 (CHECK_LISP_OBJECT_TYPE, DATA_SEG_BITS, GCTYPEBITS, USE_LSB_TAG):
5174 Also define these as enum constants, so they're visible to GDB.
5175 (ARRAY_MARK_FLAG_VAL, PSEUDOVECTOR_FLAG_VAL, VALMASK_VAL): New macros.
5176 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Also define these
5177 as constants, so they're visible to GDB.
5178 * lisp.h (VALBITS, INTTYPEBITS, FIXNUM_BITS, PSEUDOVECTOR_SIZE_BITS)
5179 (PSEUDOVECTOR_SIZE_MASK, PVEC_TYPE_MASK, BOOL_VECTOR_BITS_PER_CHAR):
5180 Now enum constants, not macros, so they're visible to GDB.
5181 (CHECK_LISP_OBJECT_TYPE, DATA_SEG_BITS): Default to 0, as this is
5182 more convenient now. All uses changed.
5183 (VALMASK) [USE_LSB_TAG]: Also define in this case.
5184 * mem-limits.h (EXCEEDS_LISP_PTR): Adjust to DATA_SEG_BITS change.
5186 2012-07-26 Dmitry Antipov <dmantipov@yandex.ru>
5188 Explicitly free restriction data that are not needed anymore.
5189 * editfns.c (save_restriction_restore): Free restriction data.
5191 2012-07-26 Stefan Monnier <monnier@iro.umontreal.ca>
5193 * eval.c (Fautoload_do_load): Rename from do_autoload, export to Lisp,
5194 add argument, tune behavior, and adjust all callers.
5196 2012-07-25 Paul Eggert <eggert@cs.ucla.edu>
5198 Use typedef for EMACS_INT, EMACS_UINT.
5199 * lisp.h, s/ms-w32.h (EMACS_INT, EMACS_UINT): Use typedefs rather
5200 than macros. This simplifies debugging in the usual case, since
5201 it lets GDB show addresses as 'EMACS_INT *' rather than 'long int *'
5202 and it allows expressions involving EMACS_INT casts.
5203 * .gdbinit (xreload): Simplify by using EMACS_INT cast.
5205 2012-07-25 Jan Djärv <jan.h.d@swipnet.se>
5207 * nsterm.m (ns_read_socket): Return early if there is a modal
5210 2012-07-25 Martin Rudalics <rudalics@gmx.at>
5212 * frame.c (Fredirect_frame_focus): In doc-string don't mention
5213 that FOCUS-FRAME can be omitted.
5215 2012-07-25 Dmitry Antipov <dmantipov@yandex.ru>
5217 Adjust buffer text indirection counters at the end of Fkill_buffer.
5218 * buffer.c (Fkill_buffer): Adjust indirection counters when the
5219 buffer is definitely dead. This should really fix an issue reported
5220 by Christoph Scholtes again. (Bug#12007).
5221 (init_buffer_once): Initialize indirection counters of
5222 buffer_defaults and buffer_local_symbols (for sanity and safety).
5224 2012-07-24 Eli Zaretskii <eliz@gnu.org>
5226 * xdisp.c (init_iterator): Don't compute dimensions of truncation
5227 and continuation glyphs on tooltip frames, leave them at zero.
5228 Avoids continued lines in tooltips. (Bug#11832)
5230 2012-07-24 Dmitry Antipov <dmantipov@yandex.ru>
5232 Simplify copy_overlay.
5233 * buffer.c (copy_overlay): Simplify. Use build_marker.
5234 * lisp.h (struct Lisp_Overlay): Restore comment with minor tweaks.
5236 2012-07-23 Eli Zaretskii <eliz@gnu.org>
5238 * print.c (print_object): Don't crash when a frame's name is nil
5239 or invalid. (Bug#12025)
5241 * window.c (decode_any_window): Disable CHECK_LIVE_FRAME test, as
5242 it signals an error when a tooltip frame is being created.
5244 2012-07-23 Dmitry Antipov <dmantipov@yandex.ru>
5246 Cleanup miscellaneous objects allocation and initialization.
5247 * alloc.c (allocate_misc): Change to static. Add argument to
5248 specify the subtype. Adjust comment and users.
5249 (build_overlay): New function.
5250 * buffer.c (copy_overlays, Fmake_overlay): Use it.
5251 * lisp.h (struct Lisp_Overlay): Remove obsolete comment.
5252 (allocate_misc): Remove prototype.
5253 (build_overlay): Add prototype.
5255 2012-07-23 Dmitry Antipov <dmantipov@yandex.ru>
5257 Swap buffer text indirection counters in Fbuffer_swap_text.
5258 * buffer.c (Fbuffer_swap_text): Swap indirections too.
5259 This avoids crash reported by Christoph Scholtes at
5260 http://lists.gnu.org/archive/html/bug-gnu-emacs/2012-07/msg00785.html.
5262 2012-07-22 Jan Djärv <jan.h.d@swipnet.se>
5264 * nsmenu.m (Popdown_data): New struct.
5265 (pop_down_menu): p->pointer is Popdown_data. Release the pool and
5267 (ns_popup_dialog): Use NSAutoreleasePool and pass it to pop_down_menu.
5268 (initWithContentRect): Make imgView and contentView non-static
5269 and autorelease them. Also autorelease img and matrix (Bug#12005).
5270 (dealloc): Remove (Bug#12005).
5272 2012-07-22 Dmitry Antipov <dmantipov@yandex.ru>
5274 Adjust consing_since_gc when objects are explicitly freed.
5275 * alloc.c (GC_DEFAULT_THRESHOLD): New macro.
5276 (Fgarbage_collect): Use it. Change minimum to 1/10 of default.
5277 (free_cons, free_misc): Subtract object size from consing_since_gc.
5279 2012-07-22 Dmitry Antipov <dmantipov@yandex.ru>
5281 Simplify and cleanup markers positioning code.
5282 * marker.c (attach_marker): More useful eassert.
5283 (live_buffer, set_marker_internal): New function.
5284 (Fset_marker, set_marker_restricted): Use set_marker_internal.
5285 (set_marker_both, set_marker_restricted_both): Use live_buffer.
5287 2012-07-22 Paul Eggert <eggert@cs.ucla.edu>
5289 * buffer.h (struct buffer.indirections): Now ptrdiff_t, not int,
5290 as it's limited by the amount of memory, not by INT_MAX.
5292 2012-07-21 Eli Zaretskii <eliz@gnu.org>
5294 * keyboard.c (keys_of_keyboard): Bind language-change to 'ignore'
5295 in special-event-map. See the discussion at
5296 http://lists.gnu.org/archive/html/emacs-devel/2012-06/msg00417.html
5299 * w32menu.c (add_menu_item): Cast to ULONG_PTR when assigning
5300 info.dwItemData. Fixes crashes on 64-bit Windows.
5301 Suggested by Fabrice Popineau <fabrice.popineau@supelec.fr>.
5303 2012-07-21 Jan Djärv <jan.h.d@swipnet.se>
5305 * nsterm.m (accessibilityAttributeValue): New function. (Bug#11134).
5306 (conversationIdentifier): Return value is NSInteger.
5307 * nsterm.m (accessibilityAttributeValue): Surround with NS_IMPL_COCOA.
5309 2012-07-21 Chong Yidong <cyd@gnu.org>
5311 * window.c (decode_any_window): Signal an error if the window is
5312 on a dead frame (Bug#11984).
5314 2012-07-20 Dmitry Antipov <dmantipov@yandex.ru>
5316 Add indirection counting to speed up Fkill_buffer.
5317 * buffer.h (struct buffer): New member.
5318 * buffer.c (Fget_buffer_create): Set indirection counter to 0.
5319 (Fmake_indirect_buffer): Set indirection counter to -1, increment
5320 base buffer indirection counter.
5321 (compact_buffer): If ENABLE_CHECKING, verify indirection counters.
5322 (Fkill_buffer): Adjust indirection counters as needed, don't walk
5323 through buffer list if indirection counter is 0.
5325 2012-07-20 Dmitry Antipov <dmantipov@yandex.ru>
5327 Extend the value returned by Fgarbage_collect with heap statistics.
5328 * alloc.c (Qheap): New symbol.
5329 (syms_of_alloc): DEFSYM it.
5330 (Fgarbage_collect): If DOUG_LEA_MALLOC, add mallinfo data.
5331 (Fmemory_free): Remove.
5332 (syms_of_alloc): Don't defsubr it.
5333 * buffer.c (Fcompact_buffer): Remove.
5334 (syms_of_buffer): Don't defsubr it.
5336 2012-07-20 Dmitry Antipov <dmantipov@yandex.ru>
5338 Make maybe_gc inline.
5339 Verify that inlining is always possible (GCC 4.7.1, -O3 -Winline).
5340 * lisp.h (consing_since_gc, gc_relative_threshold)
5341 (memory_full_cons_threshold): Revert declaration.
5342 (maybe_gc): Remove prototype, define as inline.
5343 * alloc.c: Remove old commented-out code.
5344 (consing_since_gc, gc_relative_threshold)
5345 (memory_full_cons_threshold): Revert to global.
5348 2012-07-20 Dmitry Antipov <dmantipov@yandex.ru>
5350 Simple wrapper for make_unibyte_string, adjust font_open_by_name.
5351 * lisp.h (build_unibyte_string): New function.
5352 * dosfns.c, fileio.c, fns.c, ftfont.c, process.c:
5353 * sysdep.c, w32fns.c, xfns.c: Use it.
5354 * font.c (font_open_by_name): Change 2nd and 3rd args to the only arg
5355 of type Lisp_Object to avoid redundant calls to make_unibyte_string.
5356 Adjust users accordingly.
5357 * font.h (font_open_by_name): Adjust prototype.
5359 2012-07-20 Dmitry Antipov <dmantipov@yandex.ru>
5361 Cleanup calls to Fgarbage_collect.
5362 * lisp.h (maybe_gc): New prototype.
5363 (consing_since_gc, gc_relative_threshold, memory_full_cons_threshold):
5364 Remove declarations.
5365 * alloc.c (maybe_gc): New function.
5366 (consing_since_gc, gc_relative_threshold, memory_full_cons_threshold):
5368 * bytecode.c (MAYBE_GC): Use maybe_gc.
5369 * eval.c (eval_sub, Ffuncall): Likewise.
5370 * keyboard.c (read_char): Likewise. Adjust call to maybe_gc
5371 to avoid dependency from auto-save feature.
5373 2012-07-19 Paul Eggert <eggert@cs.ucla.edu>
5375 * buffer.h (FOR_EACH_BUFFER): Rename from 'for_each_buffer'.
5376 (FOR_EACH_PER_BUFFER_OBJECT_AT): Rename from
5377 'for_each_per_buffer_object_at'.
5378 All uses changed. It's better to use upper-case for macros that
5379 cannot be implemented as functions, to give the reader a clue
5380 that they're special.
5382 2012-07-19 Stefan Monnier <monnier@iro.umontreal.ca>
5384 * alloc.c (Fgarbage_collect): Tweak docstring.
5386 2012-07-19 Dmitry Antipov <dmantipov@yandex.ru>
5388 Tweak the value returned from Fgarbage_collect again.
5389 * alloc.c (Fgarbage_collect): New return value, as confirmed in
5390 http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00418.html.
5391 Adjust documentation.
5392 (total_vector_bytes): Rename to total_vector_slots, adjust
5394 (total_free_vector_bytes): Rename to total_free_vector_slots,
5396 (Qstring_bytes, Qvector_slots): New symbols.
5397 (syms_of_alloc): DEFSYM them.
5399 2012-07-19 Dmitry Antipov <dmantipov@yandex.ru>
5401 Buffer compaction primitive which may be used from Lisp.
5402 * buffer.c (compact_buffer, Fcompact_buffer): New function.
5403 (syms_of_buffer): Register Fcompact_buffer.
5404 * alloc.c (Fgarbage_collect): Use compact_buffer.
5405 * buffer.h (compact_buffer): New prototype.
5406 (struct buffer_text): New member.
5408 2012-07-19 Dmitry Antipov <dmantipov@yandex.ru>
5410 New macro to iterate over all buffers, miscellaneous cleanups.
5411 * lisp.h (all_buffers): Remove declaration.
5412 * buffer.h (all_buffers): Add declaration, with comment.
5413 (for_each_buffer): New macro.
5414 * alloc.c (Fgarbage_collect, mark_object): Use it.
5415 * buffer.c (Fkill_buffer, Fbuffer_swap_text, Fset_buffer_multibyte)
5416 (init_buffer): Likewise.
5417 * data.c (Fset_default): Likewise.
5418 * coding.c (code_conversion_restore): Remove redundant check
5420 * buffer.c (Fkill_buffer): Likewise. Remove obsolete comment.
5422 2012-07-18 Andreas Schwab <schwab@linux-m68k.org>
5424 Fix bug that created negative-length intervals.
5425 * intervals.c (merge_interval_right, merge_interval_left):
5426 Do not zero out this interval if it is absorbed by its children,
5427 as this interval's total length doesn't change in that case. See
5428 <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00403.html>.
5430 2012-07-18 Paul Eggert <eggert@cs.ucla.edu>
5432 * alloc.c (Fmake_bool_vector): Fix off-by-8 bug
5433 when invoking (make-bool-vector N t) and N is a positive
5434 multiple of 8 -- the last 8 bits were mistakenly cleared.
5436 Remove some struct layout assumptions in bool vectors.
5437 * alloc.c (bool_header_size): New constant.
5438 (header_size, word_size): Move earlier, as they're now used earlier.
5439 Use 'word_size' in a few more places, where it's appropriate.
5440 (Fmake_bool_vector, sweep_vectors): Don't assume that there is no
5441 padding before the data member of a bool vector.
5442 (sweep_vectors): Use PSEUDOVECTOR_TYPEP, in an eassert, rather
5443 than doing the check by hand with an abort ().
5445 2012-07-18 Stefan Monnier <monnier@iro.umontreal.ca>
5447 * eval.c (Fdefvar): Don't check constants since we only set the var if
5448 it's not yet defined anyway (bug#11904).
5450 * lisp.h (last_undo_boundary): Declare new var.
5451 * keyboard.c (command_loop_1): Set it.
5452 * cmds.c (Fself_insert_command): Use it to only remove boundaries that
5453 were auto-added by the command loop (bug#11774).
5455 2012-07-18 Andreas Schwab <schwab@linux-m68k.org>
5457 * w32font.c (Qsymbol): Remove local definition.
5458 (syms_of_w32font): Don't DEFSYM it.
5460 2012-07-18 Dmitry Antipov <dmantipov@yandex.ru>
5462 Fix sweep_vectors to handle large bool vectors correctly.
5463 * alloc.c (sweep_vectors): Account total_vector_bytes for
5464 bool vectors larger than VBLOCK_BYTES_MAX.
5466 2012-07-18 Chong Yidong <cyd@gnu.org>
5468 * frame.c (x_set_frame_parameters): Revert bogus change introduced
5469 in 2012-05-25 commit by Paul Eggert (Bug#11738).
5471 2012-07-18 Dmitry Antipov <dmantipov@yandex.ru>
5473 Return more descriptive data from Fgarbage_collect.
5474 Suggested by Stefan Monnier in
5475 http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00369.html.
5476 * alloc.c (bounded_number): New function.
5477 (total_buffers, total_vectors): New variable.
5478 (total_string_size): Rename to total_string_bytes, adjust users.
5479 (total_vector_size): Rename to total_vector_bytes, adjust users.
5480 (sweep_vectors): Account total_vectors and total_vector_bytes.
5481 (Fgarbage_collect): New return value. Adjust documentation.
5482 (gc_sweep): Account total_buffers.
5483 (Fmemory_free, Fmemory_use_counts): Use bounded_number.
5484 (VECTOR_SIZE): Remove.
5485 * data.c (Qfloat, Qvector, Qsymbol, Qstring, Qcons): Make global.
5486 (Qinterval, Qmisc): New symbols.
5487 (syms_of_data): Initialize them.
5488 * lisp.h (Qinterval, Qsymbol, Qstring, Qmisc, Qvector, Qfloat)
5489 (Qcons, Qbuffer): New declarations.
5491 2012-07-17 Paul Eggert <eggert@cs.ucla.edu>
5493 * alloc.c (Fmemory_free): Account for memory-free's own storage.
5494 Round up, not down. Improve doc.
5496 2012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
5498 Restore old code in allocate_string_data to avoid Faset breakage.
5499 Reported by Julien Danjou <julien@danjou.info> in
5500 http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00371.html.
5501 * alloc.c (allocate_string_data): Restore old code with minor
5502 adjustments, fix comment to explain this subtle issue.
5504 2012-07-17 Eli Zaretskii <eliz@gnu.org>
5506 Remove FILE_SYSTEM_CASE.
5507 * s/msdos.h (FILE_SYSTEM_CASE): Don't define.
5509 * fileio.c (FILE_SYSTEM_CASE): Don't define.
5510 (Ffile_name_directory, Fexpand_file_name): Don't use FILE_SYSTEM_CASE.
5511 Fixes problems on MS-DOS with Vtemp_file_name_pattern when
5512 call-process-region passes it through expand-file-name.
5514 * dired.c (file_name_completion): Don't use FILE_SYSTEM_CASE.
5516 2012-07-17 Andreas Schwab <schwab@linux-m68k.org>
5518 Fix crash when creating indirect buffer (Bug#11917)
5519 * buffer.c (buffer_lisp_local_variables): Add argument CLONE.
5520 Don't handle unbound variables specially if non-zero.
5521 (Fbuffer_local_variables): Pass zero.
5522 (clone_per_buffer_values): Pass non-zero.
5524 2012-07-17 Andreas Schwab <schwab@linux-m68k.org>
5526 * gnutls.c (emacs_gnutls_handshake): Revert last change. Add QUIT
5527 to make the loop interruptible.
5529 2012-07-17 Andreas Schwab <schwab@linux-m68k.org>
5531 * gnutls.c (emacs_gnutls_handshake): Only retry if
5532 GNUTLS_E_INTERRUPTED.
5534 2012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
5536 Cleanup and convert miscellaneous checks to eassert.
5537 * alloc.c (mark_interval): Fix comment, partially rephrase
5538 old comment from intervals.h (see below).
5539 * intervals.c (find_interval, adjust_intervals_for_insertion)
5540 (delete_interval, adjust_intervals_for_deletion)
5541 (graft_intervals_into_buffer, temp_set_point_both, copy_intervals):
5543 (adjust_intervals_for_insertion, make_new_interval):
5544 Remove obsolete and unused code.
5545 * intervals.h (struct interval): Remove obsolete comment.
5546 * textprotp.c (erase_properties): Remove unused code.
5547 (Fadd_text_properties, set_text_properties_1, Fremove_text_properties)
5548 (Fremove_list_of_text_properties): Convert to eassert.
5550 2012-07-17 Chong Yidong <cyd@gnu.org>
5552 * editfns.c (Finsert_char): Doc fix.
5554 2012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
5556 Fix previous change to make Fmemory_free always accurate.
5557 * alloc.c (make_interval): Update total_free_intervals.
5558 (make_float): Likewise for total_free_floats.
5559 (free_cons, Fcons): Likewise for total_free_conses.
5560 (SETUP_ON_FREE_LIST, allocate_vector_from_block):
5561 Likewise for total_free_vector_bytes.
5562 (Fmake_symbol): Likewise for total_free_symbols.
5563 (bytes_free): Remove.
5565 2012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
5567 Simple free memory accounting feature.
5568 * alloc.c (bytes_free, total_free_vector_bytes): New variable.
5569 (sweep_vectors): Accumulate size of free vectors.
5570 (Fgarbage_collect): Setup bytes_free.
5571 (Fmemory_free): New function.
5572 (syms_of_alloc): Register it.
5574 2012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
5576 Cleanup overlays checking.
5577 * buffer.h (OVERLAY_VALID): Remove as useless synonym of OVERLAYP.
5578 * buffer.c (overlay_touches_p, recenter_overlay_lists): Change to
5579 eassert and OVERLAYP.
5580 (sort_overlays): Change to use OVERLAYP.
5582 2012-07-16 René Kyllingstad <Rene@Kyllingstad.com> (tiny change)
5584 * editfns.c (Finsert_char): Make it interactive, and make the
5585 second arg optional. Copy interactive spec and docstring from
5588 2012-07-17 Paul Eggert <eggert@cs.ucla.edu>
5590 * floatfns.c (Fabs): Do not wrap fabs inside IN_FLOAT (Bug#11913).
5591 Unlike the other wrapped functions, fabs has an unspecified
5594 2012-07-16 Jan Djärv <jan.h.d@swipnet.se>
5596 * nsterm.m (keyDown): Interpret flags without left/right bits
5597 as the left key (Bug#11670).
5599 2012-07-16 Dmitry Antipov <dmantipov@yandex.ru>
5601 Remove empty and useless init functions.
5602 * lisp.h (init_character_once, init_fns, init_image)
5603 (init_filelock, init_sound): Remove prototype.
5604 * character.c (init_character_once): Remove.
5605 * filelock.c (init_filelock): Likewise.
5606 * fns.c (init_fns): Likewise.
5607 * image.c (init_image): Likewise.
5608 * sound.c (init_sound): Likewise.
5609 * emacs.c (main): Adjust accordingly.
5611 2012-07-16 Dmitry Antipov <dmantipov@yandex.ru>
5613 * gtkutil.h: Tiny cleanups.
5614 (use_old_gtk_file_dialog): Remove useless declaration.
5615 (xg_uses_old_file_dialog): Add suggested const attribute.
5617 2012-07-15 Eli Zaretskii <eliz@gnu.org>
5619 * bidi.c (MAX_STRONG_CHAR_SEARCH): New macro.
5620 (bidi_paragraph_init): Use it to limit search forward for a strong
5621 directional character in abnormally large paragraphs full of
5622 neutral or weak characters. (Bug#11943)
5624 2012-07-15 Stefano Facchini <stefano.facchini@gmail.com> (tiny change)
5626 * gtkutil.c (xg_create_tool_bar): Apply "primary-toolbar" style to
5627 the toolbar (Bug#9451).
5628 (xg_make_tool_item): Give the widget event box a transparent
5631 2012-07-15 Dmitry Antipov <dmantipov@yandex.ru>
5633 Cleanup basic allocation variables and functions.
5634 * alloc.c (ignore_warnings, init_intervals, init_float)
5635 (init_cons, init_symbol, init_marker): Remove.
5636 (interval_block_index): Initialize to INTERVAL_BLOCK_SIZE.
5637 (float_block_index): Initialize to FLOAT_BLOCK_SIZE.
5638 (cons_block_index): Initialize to CONS_BLOCK_SIZE.
5639 (symbol_block_size): Initialize to SYMBOL_BLOCK_SIZE.
5640 (marker_block_index): Initialize to MARKER_BLOCK_SIZE.
5641 (staticidx, init_alloc_once, init_strings, free_ablock):
5642 Remove redundant initialization.
5643 * fns.c (init_weak_hash_tables): Remove.
5644 * lisp.h (init_weak_hash_tables): Remove prototype.
5646 2012-07-15 Dmitry Antipov <dmantipov@yandex.ru>
5648 Use zero_vector where appropriate.
5649 * alloc.c (zero_vector): Define as Lisp_Object. Adjust users
5651 * lisp.h (zero_vector): New declaration.
5652 * font.c (null_vector): Remove.
5653 (syms_of_font): Remove initialization and staticpro.
5654 (font_list_entities, font_find_for_lface): Change to use zero_vector.
5655 * keymap.c (Faccessible_keymaps): Likewise.
5657 2012-07-15 Leo Liu <sdl.web@gmail.com>
5659 * fringe.c: Fix typo in comments.
5661 2012-07-14 Leo Liu <sdl.web@gmail.com>
5663 * fringe.c: Add a new bitmap exclamation-mark.
5665 2012-07-14 Eli Zaretskii <eliz@gnu.org>
5667 * gmalloc.c (GMALLOC_INHIBIT_VALLOC): Don't reference.
5669 * s/msdos.h (BSD_SYSTEM, DATA_START, GC_SETJMP_WORKS, HAVE_MOUSE)
5670 (HAVE_MENUS): Don't define, defined by editing config.in with
5672 (GMALLOC_INHIBIT_VALLOC): Don't define.
5673 (MODE_LINE_BINARY_TEXT): Remove, not used anymore.
5675 2012-07-14 Juanma Barranquero <lekktu@gmail.com>
5677 * s/ms-w32.h (GC_SETJMP_WORKS, GC_MARK_STACK): Set in nt/config.nt.
5679 2012-07-14 Glenn Morris <rgm@gnu.org>
5681 * s/aix4-2.h, s/freebsd.h, s/gnu-linux.h, s/hpux10-20.h:
5682 * s/irix6-5.h, s/netbsd.h, s/sol2-6.h, s/unixware.h:
5683 Let configure set GC_SETJMP_WORKS, GC_MARK_STACK.
5685 2012-07-13 Glenn Morris <rgm@gnu.org>
5687 * s/gnu-linux.h (GC_MARK_SECONDARY_STACK): Let configure set it.
5689 * s/usg5-4-common.h (SETUP_SLAVE_PTY): Let configure set it.
5690 * s/irix6-5.h (SETUP_SLAVE_PTY): No more need to unset it.
5692 2012-07-13 Jan Djärv <jan.h.d@swipnet.se>
5694 * nsterm.m (uRect): Only define if NS_IMPL_GNUSTEP.
5695 (x_free_frame_resources): Pass x_free_frame_resources to NSTRACE.
5696 (ns_lisp_to_color, ns_string_to_lispmod, ns_term_init)
5697 (ns_term_shutdown, requestService, initFrameFromEmacs): Use SSDATA
5699 (ns_exec_path, ns_load_path, changeFont): Put () around assignment used
5700 as boolean expression.
5701 (x_set_window_size): Remove unused variable toolbar.
5702 (ns_get_color_default, ns_mod_to_lisp): Remove.
5703 (ns_mouse_position): Remove unused variables xchar and ychar.
5704 (ns_compute_glyph_string_overhangs): Remove unused variable face.
5705 (ns_set_vertical_scroll_bar): Remove unused variable count.
5706 (ns_delete_terminal): Remove unused variable i.
5707 (ns_term_init): Remove unused variables r, g and b.
5708 (mouseDown): Remove unused variable window.
5709 (windowDidResize): Move definition of theWindow inside NS_IMPL_GNUSTEP.
5710 (initFrameFromEmacs): Remove unused variable vbextra.
5711 (mouseEntered): Remove unused variables p and dpyinfo.
5712 (mouseExited): Remove unused variables p and r.
5713 (ns_define_frame_cursor, ns_clear_frame_area)
5714 (ns_draw_window_cursor, ns_initialize_display_info): Make static.
5715 (menuDown): Assign [sender tag] to variable and cast the variable.
5717 * nsterm.h (menuDown): Add id as type to argument sender.
5718 (ns_display_info_for_name): Add Lisp_Object argument.
5719 (ns_term_init): Add Lisp_Object argument.
5720 (ns_map_event_to_object): Add void argument.
5721 (ns_string_from_pasteboard, ns_string_to_pasteboard): Add correct
5722 prototype with arguments and only declare if __OBJC__.
5723 (nxatoms_of_nsselect): Add void argument.
5724 (ns_lisp_to_cursor_type): Add Lisp_Object argument.
5725 (ns_alloc_autorelease_pool): Add void argument.
5726 (ns_release_autorelease_pool): Add void* argument.
5727 (ns_get_defaults_value): Add const char* argument.
5729 * nsmenu.m (ns_update_menubar, ns_menu_show, process_dialog)
5730 (initFromContents): Use SSDATA where appropriate.
5731 (ns_update_menubar): Add braces to ambigous if-else.
5732 (initWithTitle): Put () around assignment in if statement.
5733 (ns_menu_show): Remove unused variables window and keymap.
5734 (update_frame_tool_bar): Remove unused variable selected_p.
5735 (initWithContentRect): Remove unused variable this_cmd_name.
5737 * nsimage.m (ns_load_image, allocInitFromFile): Use SSDATA where
5739 (setXBMColor): Remove unused variable len.
5740 (setPixmapData): Put () around assignment in loop statement.
5742 * nsfont.m (ns_get_family, ns_lang_to_script, ns_otf_to_script)
5743 (ns_registry_to_script, ns_get_req_script, nsfont_open): Use SSDATA
5745 (ns_get_covering_families, ns_findfonts, nsfont_list_family): Put ()
5746 around assignment in loop statement.
5747 (nsfont_open): Remove unused variable i.
5748 (nsfont_open): Remove unused variable len.
5749 (nsfont_draw): Remove unused variable cs.
5751 * nsfns.m (x_set_icon_name, ns_set_name_internal)
5752 (ns_set_name_as_filename, ns_implicitly_set_icon_type)
5753 (x_set_icon_type, ns_lisp_to_cursor_type, Fns_read_file_name)
5754 (Fns_get_resource, Fns_set_resource, Fx_open_connection)
5755 (Fns_font_name, Fns_perform_service)
5756 (Fns_convert_utf8_nfd_to_nfc, ns_do_applescript)
5757 (Fns_do_applescript, Fx_show_tip): Use SSDATA where appropriate.
5758 (ns_set_name): Remove unused variable view.
5759 (x_set_menu_bar_lines): Remove unused variable olines.
5760 (x_set_tool_bar_lines): Remove unused variable root_window.
5761 (Fns_list_colors): Put () around assignment in while statement.
5762 (Fns_perform_service): Remove unused variable len.
5763 (Fns_display_usable_bounds): Remove unused variable top.
5764 (syms_of_nsfns): Remove unused variable i.
5766 * nsmenu.m (ns_update_menubar): Exchange place of argument 2 and 3 to
5769 2012-07-13 Kalle Kankare <kalle.kankare@iki.fi> (tiny change)
5771 * image.c (Fimagemagick_types): Initialize ex with GetExceptionInfo
5772 and free it with DestroyExceptionInfo (Bug#11558).
5774 2012-07-13 Juanma Barranquero <lekktu@gmail.com>
5776 * s/ms-w32.h (FIRST_PTY_LETTER, HAVE_SOCKETS): Move to nt/config.nt.
5777 (HAVE_ATTRIBUTE_ALIGNED, HAVE_C99_STRTOLD, HAVE___BUILTIN_UNWIND_INIT):
5778 Set here, not in nt/config.nt.
5780 2012-07-13 Eli Zaretskii <eliz@gnu.org>
5782 * xdisp.c (move_it_in_display_line_to): On GUI terminals, allow
5783 cursor overflow into the last glyph on display line when the right
5784 fringe is off. (Bug#11832)
5786 2012-07-13 Paul Eggert <eggert@cs.ucla.edu>
5788 * xdisp.c (produce_special_glyphs): Now static.
5789 * dispextern.h (produce_special_glyphs): Remove decl.
5791 2012-07-13 Glenn Morris <rgm@gnu.org>
5793 * s/bsd-common.h, s/cygwin.h: Remove empty files.
5794 * s/freebsd.h, s/netbsd.h: Do not include bsd-common.h.
5796 * s/usg5-4-common.h (USG, USG5):
5797 * s/template.h (USG5, USG, HPUX, BSD4_2, BSD_SYSTEM):
5798 * s/sol2-6.h (SOLARIS2):
5799 * s/irix6-5.h (IRIX6_5):
5800 * s/hpux10-20.h (USG, USG5, HPUX):
5801 * s/gnu-linux.h (USG, GNU_LINUX):
5802 * s/freebsd.h (BSD_SYSTEM):
5803 * s/darwin.h (BSD4_2, BSD_SYSTEM, DARWIN_OS):
5804 * s/cygwin.h (CYGWIN):
5805 * s/bsd-common.h (BSD_SYSTEM, BSD4_2):
5806 * s/aix4-2.h (USG, USG5, _AIX): Move "system type" macros to configure.
5808 2012-07-13 BT Templeton <bpt@hcoop.net> (tiny change)
5810 * nsfont.m (ns_charset_covers): Don't abort if no bitmap (Bug#11853).
5812 2012-07-13 Glenn Morris <rgm@gnu.org>
5814 * s/usg5-4-common.h (NSIG_MINIMUM): Let configure set it.
5816 * s/gnu-linux.h, s/irix6-5.h: Let configure set ULIMIT_BREAK_VALUE.
5818 * process.c (init_process_emacs): Replace MIN_PTY_KERNEL_VERSION.
5819 * s/darwin.h (MIN_PTY_KERNEL_VERSION): Remove single-use macro.
5821 2012-07-12 Glenn Morris <rgm@gnu.org>
5823 * s/darwin.h (SYSTEM_PURESIZE_EXTRA): Move to configure.
5825 * process.c (init_process_emacs): Rename from init_process.
5826 The old name is also the name of a Mach system call.
5827 * lisp.h, emacs.c: Update for this name change.
5828 * nsgui.h, sysselect.h, s/darwin.h: Remove workaround that is no
5831 2012-07-12 Eli Zaretskii <eliz@gnu.org>
5833 * xdisp.c (insert_left_trunc_glyphs): Fix incorrect size in
5834 memmove call that removes glyphs covered by the left truncation
5835 glyph. Improve commentary.
5836 (display_line): Fix display of continuation glyphs on GUI frames
5837 when the right fringe is turned off and variable-size fonts are
5838 used in the window. Move the code that appends a stretch glyph to
5839 produce_special_glyphs, so that it could be used for truncation
5840 and continuation glyphs alike.
5841 (produce_special_glyphs) [HAVE_WINDOW_SYSTEM]: Produce a stretch
5842 glyph of a suitably computed width, to align the special glyphs at
5843 the window margin. Code moved from display_line. (Bug#11832)
5845 2012-07-12 Glenn Morris <rgm@gnu.org>
5847 * s/aix4-2.h, s/hpux10-20.h: Let configure set NO_EDITRES.
5849 * s/gnu-linux.h, s/hpux10-20.h:
5850 Do not unconditionally define HAVE_XRMSETDATABASE.
5852 * s/gnu-linux.h (UNIX98_PTYS): Let configure set it.
5854 2012-07-12 Paul Eggert <eggert@cs.ucla.edu>
5856 Fix typos that broke OS X build.
5857 Reported by Randal L. Schwartz in
5858 <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00225.html>.
5859 * nsterm.m (ns_timeout): Add missing local decl.
5860 (ns_get_color): snprintf -> sprintf, to fix typo.
5862 2012-07-12 Glenn Morris <rgm@gnu.org>
5864 * src/s/aix4-2.h, src/s/cygwin.h, src/s/darwin.h:
5865 * src/s/gnu-linux.h, src/s/hpux10-20.h, src/s/irix6-5.h:
5866 * src/s/sol2-6.h, src/s/unixware.h, src/s/usg5-4-common.h:
5867 Move PTY_NAME_SPRINTF, PTY_TTY_NAME_SPRINTF to configure.
5869 * s/cygwin.h, s/darwin.h, s/gnu-linux.h, s/irix6-5.h:
5870 Move PTY_OPEN to configure.
5872 * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/darwin.h:
5873 * s/gnu-linux.h, s/hpux10-20.h, s/irix6-5.h, s/template.h:
5874 * s/usg5-4-common.h: Move FIRST_PTY_LETTER, PTY_ITERATION to configure.
5876 2012-07-12 Dmitry Antipov <dmantipov@yandex.ru>
5878 Use empty_unibyte_string where applicable.
5879 * keyboard.c (parse_tool_bar_item): Use empty_unibyte_string.
5880 * lread.c (read1): Likewise.
5881 * xsettings.c (syms_of_xsettings): Likewise.
5883 2012-07-12 Glenn Morris <rgm@gnu.org>
5885 * s/cygwin.h (G_SLICE_ALWAYS_MALLOC):
5886 * s/freebsd.h (BROKEN_PTY_READ_AFTER_EAGAIN):
5887 * s/irix6-5.h (SETPGRP_RELEASES_CTTY, PREFER_VSUSP):
5888 * s/hpux10-20.h (RUN_TIME_REMAP):
5889 * s/bsd-common.h (TABDLY): Move to configure.
5891 * s/hpux10-20.h, s/sol2-6.h: Move XOS_NEEDS_TIME_H to configure.
5893 * s/bsd-common.h, s/darwin.h: Move TAB3 to configure.
5895 * s/aix4-2.h (BROKEN_FIONREAD, BROKEN_SIGAIO, BROKEN_SIGPTY)
5896 (BROKEN_SIGPOLL, BROKEN_GET_CURRENT_DIR_NAME): Let configure set them.
5898 * s/darwin.h (NO_ABORT, NO_MATHERR): Let configure set them.
5900 * s/bsd-common.h, s/cygwin.h, s/gnu-linux.h, s/irix6-5.h:
5901 * s/template.h: Move NARROWPROTO to configure.
5903 2012-07-11 Glenn Morris <rgm@gnu.org>
5905 * s/gnu-linux.h, s/sol2-6.h: No longer define POSIX,
5906 unused since 2011-01-17 change to systty.h.
5908 * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/darwin.h, s/gnu-linux.h:
5909 * s/hpux10-20.h, s/template.h, s/usg5-4-common.h:
5910 Move HAVE_PTYS and HAVE_SOCKETS to configure.
5912 2012-07-11 Paul Eggert <eggert@cs.ucla.edu>
5914 * s/sol2-6.h (HAVE_LIBKSTAT): Remove. (Bug#11914)
5916 2012-07-11 Glenn Morris <rgm@gnu.org>
5918 * s/darwin.h, s/gnu-linux.h, s/template.h:
5919 Move INTERRUPT_INPUT to configure.
5921 2012-07-11 Dmitry Antipov <dmantipov@yandex.ru>
5923 Minor adjustments to interning code.
5924 * lisp.h (intern, intern_c_string): Redefine as static inline
5925 wrappers for intern_1 and intern_c_string_1, respectively.
5926 (intern_1, intern_c_string_1): Rename prototypes.
5927 * lread.c (intern_1, intern_c_string_1, oblookup):
5928 Simplify Vobarray checking.
5929 * font.c (font_intern_prop): Likewise. Adjust comment.
5930 * w32font.c (intern_font_name): Likewise.
5932 2012-07-11 Andreas Schwab <schwab@linux-m68k.org>
5934 * gnutls.c (Fgnutls_boot): Properly parse :keylist argument.
5936 * coding.c (Fdefine_coding_system_internal): Use XCAR/XCDR instead
5937 of Fcar/Fcdr if possible.
5938 * font.c (check_otf_features): Likewise.
5939 * fontset.c (Fnew_fontset): Likewise.
5940 * gnutls.c (Fgnutls_boot): Likewise.
5941 * minibuf.c (read_minibuf): Likewise.
5942 * msdos.c (IT_set_frame_parameters): Likewise.
5943 * xmenu.c (Fx_popup_dialog): Likewise.
5944 * w32menu.c (Fx_popup_dialog): Likewise.
5946 2012-07-11 Glenn Morris <rgm@gnu.org>
5948 * s/bsd-common.h, s/cygwin.h: No need to undefine INTERRUPT_INPUT,
5949 since nothing has defined it on these platforms.
5951 * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/gnu-linux.h:
5952 * s/irix6-5.h: Move SIGNALS_VIA_CHARACTERS to configure.
5954 * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/darwin.h:
5955 * s/gnu-linux.h, s/hpux10-20.h, s/template.h, s/usg5-4-common.h:
5956 Move CLASH_DETECTION to configure.
5958 * s/gnu.h: Remove file, which is now empty.
5960 * s/gnu.h, s/gnu-linux.h:
5961 Move GNU_LIBRARY_PENDING_OUTPUT_COUNT to configure.
5963 2012-07-11 John Wiegley <johnw@newartisans.com>
5965 * alloc.c (mark_memory): Guard the "no_address_safety_analysis"
5966 function attribute, so we only use it if it exists in the
5969 2012-07-11 Dmitry Antipov <dmantipov@yandex.ru>
5971 Avoid call to strlen in fast_c_string_match_ignore_case.
5972 * search.c (fast_c_string_match_ignore_case): Change to use
5973 length argument. Adjust users accordingly.
5974 * lisp.h (fast_c_string_match_ignore_case): Adjust prototype.
5976 2012-07-11 Paul Eggert <eggert@cs.ucla.edu>
5978 Assume mkdir, rmdir.
5979 * sysdep.c (mkdir) [!HAVE_MKDIR]: Remove.
5980 * sysdep.c (rmdir) [!HAVE_RMDIR]: Remove.
5983 * sysdep.c (rename) [!HAVE_RENAME]: Remove.
5986 * s/hpux10-20.h (HAVE_PERROR): Remove.
5987 * sysdep.c (perror) [HPUX && !HAVE_PERROR]:
5988 Remove dummy definition, as this problem was obsolete long ago.
5991 * sysdep.c (strerror) [!HAVE_STRERROR && !WINDOWSNT]: Remove.
5993 2012-07-11 Dmitry Antipov <dmantipov@yandex.ru>
5995 Avoid calls to strlen in font processing functions.
5996 * font.c (font_parse_name, font_parse_xlfd, font_parse_fcname)
5997 (font_open_by_name): Change to use length argument.
5998 Adjust users accordingly.
5999 * font.h (font_open_by_name, font_parse_xlfd, font_unparse_xlfd):
6001 * xfont.c (xfont_decode_coding_xlfd, font_unparse_xlfd):
6002 Change to return ptrdiff_t.
6003 (xfont_list_pattern, xfont_match): Use length returned by
6004 xfont_decode_coding_xlfd.
6005 * xfns.c (x_default_font_parameter): Omit useless xstrdup.
6007 2012-07-11 Glenn Morris <rgm@gnu.org>
6009 * s/darwin.h, s/freebsd.h, s/netbsd.h:
6010 Move DONT_REOPEN_PTY to configure.
6012 * sound.c (DEFAULT_SOUND_DEVICE) [!WINDOWSNT]:
6013 * s/netbsd.h (DEFAULT_SOUND_DEVICE): Let configure set it.
6015 2012-07-10 Paul Eggert <eggert@cs.ucla.edu>
6017 Remove "#define unix" that is no longer needed (Bug#11905).
6018 * s/aix4-2.h (unix): Remove; no longer needed.
6020 EMACS_TIME simplification (Bug#11875).
6021 This replaces macros (which typically do not work in GDB)
6022 with functions, typedefs and enums, making the code easier to debug.
6023 The functional style also makes code easier to read and maintain.
6024 * systime.h: Include <sys/time.h> on all hosts, not just if
6025 WINDOWSNT, since 'struct timeval' is needed in general.
6026 (EMACS_TIME): Now a typedef, not a macro.
6027 (EMACS_TIME_RESOLUTION, LOG10_EMACS_TIME_RESOLUTION): Now constants,
6029 (EMACS_SECS, EMACS_NSECS, EMACS_TIME_SIGN, EMACS_TIME_VALID_P)
6030 (EMACS_TIME_FROM_DOUBLE, EMACS_TIME_TO_DOUBLE, EMACS_TIME_EQ)
6031 (EMACS_TIME_NE, EMACS_TIME_GT, EMACS_TIME_GE, EMACS_TIME_LT)
6032 (EMACS_TIME_LE): Now functions, not macros.
6033 (EMACS_SET_SECS, EMACS_SET_NSECS, EMACS_SET_SECS_NSECS)
6034 (EMACS_SET_USECS, EMACS_SET_SECS_USECS): Remove these macros,
6035 which are not functions. All uses rewritten to use:
6036 (make_emacs_time): New function.
6037 (EMACS_SECS_ADDR, EMACS_SET_INVALID_TIME, EMACS_GET_TIME)
6038 (EMACS_ADD_TIME, EMACS_SUB_TIME): Remove these macros, which are
6039 not functions. All uses rewritten to use the following, respectively:
6040 (emacs_secs_addr, invalid_emacs_time, get_emacs_time)
6041 (add_emacs_time, sub_emacs_time): New functions.
6042 * atimer.c: Don't include <sys/time.h>, as "systime.h" does this.
6043 * fileio.c (Fcopy_file):
6044 * xterm.c (XTflash): Get the current time closer to when it's used.
6045 * makefile.w32-in ($(BLD)/atimer.$(O)): Update dependencies.
6047 * bytecode.c (targets): Suppress -Woverride-init warnings.
6049 Simplify by avoiding confusing use of strncpy etc.
6050 * doc.c (Fsnarf_documentation):
6051 * fileio.c (Ffile_name_directory, Fsubstitute_in_file_name):
6052 * frame.c (Fmake_terminal_frame):
6053 * gtkutil.c (get_utf8_string):
6055 * nsmenu.m (ns_update_menubar):
6056 * regex.c (regerror):
6057 Prefer memcpy to strncpy and strncat when either will do.
6058 * fileio.c (Fsubstitute_in_file_name):
6059 * keyboard.c (MULTI_LETTER_MOD, parse_modifiers_uncached)
6060 (menu_separator_name_p):
6061 * nsmenu.m (ns_update_menubar):
6062 Prefer memcmp to strncmp when either will do.
6063 * nsterm.m: Include <ftoastr.h>.
6065 * s/gnu-linux.h, s/sol2-6.h, s/unixware.h (PTY_TTY_NAME_SPRINTF):
6066 Prefer snprintf to strncpy.
6067 * nsterm.m (ns_term_init):
6068 * widget.c (set_frame_size) [0]: Prefer xstrdup to xmalloc + strncpy.
6069 * nsterm.m (ns_term_init):
6070 Avoid the need for strncpy, by using build_string or
6071 make_unibyte_string directly. Use dtoastr, not snprintf.
6072 * process.c (Fmake_network_process): Diagnose service names that
6073 are too long, rather than silently truncating them or creating
6074 non-null-terminated names.
6075 (Fnetwork_interface_info): Likewise, for interface names.
6076 * sysdep.c (system_process_attributes) [GNU_LINUX]:
6077 Prefer sprintf to strncat.
6078 * xdisp.c (debug_method_add) [GLYPH_DEBUG]:
6079 Prefer vsnprintf to vsprintf + strncpy.
6081 2012-07-10 Glenn Morris <rgm@gnu.org>
6083 * dispnew.c (PENDING_OUTPUT_COUNT) [!__GNU_LIBRARY__]:
6084 Clarify fallback case.
6086 2012-07-10 Dmitry Antipov <dmantipov@yandex.ru>
6088 Use XCAR and XCDR instead of Fcar and Fcdr where possible.
6089 * callint.c, coding.c, doc.c, editfns.c, eval.c, font.c, fontset.c,
6090 * frame.c, gnutls.c, minibuf.c, msdos.c, textprop.c, w32fns.c,
6091 * w32menu.c, window.c, xmenu.c: Change to use XCAR and XCDR
6092 where argument type is known to be a Lisp_Cons.
6094 2012-07-10 Tom Tromey <tromey@redhat.com>
6096 * bytecode.c (BYTE_CODE_THREADED): New macro.
6097 (BYTE_CODES): New macro. Replaces all old byte-code defines.
6098 (enum byte_code_op): New type.
6099 (CASE, NEXT, FIRST, CASE_DEFAULT, CASE_ABORT): New macros.
6100 (exec_byte_code): Use them. Use token threading when applicable.
6102 2012-07-10 Dmitry Antipov <dmantipov@yandex.ru>
6104 Optimize pure C strings initialization.
6105 * lisp.h (make_pure_string): Fix prototype.
6106 (build_pure_c_string): New function, defined as static inline. This
6107 provides a better opportunity to optimize away calls to strlen when
6108 the function is called with compile-time constant argument.
6109 * alloc.c (make_pure_c_string): Fix comment. Change to add nchars
6110 argument, adjust users accordingly. Use build_pure_c_string where
6112 * buffer.c, coding.c, data.c, dbusbind.c, fileio.c, fontset.c, frame.c,
6113 * keyboard.c, keymap.c, lread.c, search.c, syntax.c, w32fns.c, xdisp.c,
6114 * xfaces.c, xfns.c, xterm.c: Use build_pure_c_string where appropriate.
6116 2012-07-10 Dmitry Antipov <dmantipov@yandex.ru>
6118 Avoid calls to strlen in miscellaneous functions.
6119 * buffer.c (init_buffer): Use precalculated len, adjust if needed.
6120 * font.c (Ffont_xlfd_name): Likewise. Change to call make_string.
6121 * lread.c (openp): Likewise.
6123 2012-07-10 Dmitry Antipov <dmantipov@yandex.ru>
6125 Avoid calls to strlen in path processing functions.
6126 * fileio.c (file_name_as_directory): Add comment. Change to add
6127 srclen argument and return the length of result. Adjust users
6129 (directory_file_name): Fix comment. Change to add srclen argument,
6130 swap 1st and 2nd arguments to obey the common convention.
6131 Adjust users accordingly.
6132 * filelock.c (fill_in_lock_file_name): Avoid calls to strlen.
6134 2012-07-10 Glenn Morris <rgm@gnu.org>
6136 * s/cygwin.h, s/darwin.h, s/freebsd.h, s/netbsd.h, s/unixware.h:
6137 Move PENDING_OUTPUT_COUNT definition to configure.
6139 * s/irix6-5.h (DATA_START, DATA_SEG_BITS):
6140 * s/hpux10-20.h (DATA_SEG_BITS, DATA_START):
6141 * s/gnu.h (DATA_START): Move definitions to configure.
6143 * s/irix6-5.h (SETUP_SLAVE_PTY, PTY_NAME_SPRINTF): Drop ifdef guards.
6144 We include usg5-4-common.h, which defines them both.
6146 * s/gnu.h: Don't include fcntl.h (every file in Emacs that uses
6147 O_RDONLY already includes it).
6149 Stop ns builds setting the EMACSLOADPATH environment variable.
6150 * nsterm.m (ns_load_path): Rename from ns_init_paths.
6151 Now it does not set EMACSLOADPATH, just returns the load-path string.
6152 * nsterm.h: Update accordingly.
6153 * lread.c [HAVE_NS]: Include nsterm.h.
6154 (init_lread) [HAVE_NS]: Use ns_load_path.
6155 * emacs.c (main) [HAVE_NS]: No longer call ns_init_paths.
6157 2012-07-09 Glenn Morris <rgm@gnu.org>
6159 * s/gnu.h (SIGNALS_VIA_CHARACTERS): No need to define it here,
6160 since the included bsd-common.h does so.
6162 Stop ns builds setting the EMACSPATH environment variable.
6163 * nsterm.m (ns_exec_path): New function, split from ns_init_paths.
6164 (ns_init_paths): Do not set EMACSPATH.
6165 * nsterm.h (ns_exec_path): Add it.
6166 * callproc.c (init_callproc_1, init_callproc) [HAVE_NS]:
6169 * nsterm.m, nsterm.h (ns_etc_directory): Fix type, empty return.
6171 2012-07-09 Paul Eggert <eggert@cs.ucla.edu>
6173 * process.c (wait_reading_process_output): 'waitchannels' was unset
6174 when read_kbd || !NILP (wait_for_cell); fix this.
6176 Add GCC-style 'const' attribute to functions that can use it.
6177 * character.h (char_resolve_modifier_mask):
6178 * keyboard.h (make_ctrl_char):
6179 * lisp.h (multibyte_char_to_unibyte, multibyte_char_to_unibyte_safe)
6180 (init_character_once, next_almost_prime, init_fns, init_image)
6181 (flush_pending_output, init_sound):
6182 * mem-limits.h (start_of_data):
6183 * menu.h (finish_menu_items):
6184 Add ATTRIBUTE_CONST.
6185 * emacs.c (DEFINE_DUMMY_FUNCTION):
6186 Declare the dummy function with ATTRIBUTE_CONST.
6187 * lisp.h (Fbyteorder, Fmax_char, Fidentity):
6188 Add decls with ATTRIBUTE_CONST.
6190 Minor improvements to make_formatted_string.
6191 * alloc.c (make_formatted_string): Prefer int to ptrdiff_t
6192 where int is good enough, as vsprintf returns an int.
6193 * lisp.h (make_formatted_string): Add ATTRIBUTE_FORMAT_PRINTF.
6195 2012-07-09 Dmitry Antipov <dmantipov@yandex.ru>
6197 Use make_formatted_string to avoid double length calculation.
6198 * lisp.h (make_formatted_string): New prototype.
6199 * alloc.c (make_formatted_string): New function.
6200 * buffer.c (Fgenerate_new_buffer_name): Use it.
6201 * dbusbind.c (syms_of_dbusbind): Likewise.
6202 * editfns.c (Fcurrent_time_zone): Likewise.
6203 * filelock.c (get_boot_time): Likewise.
6204 * frame.c (make_terminal_frame, set_term_frame_name)
6205 (x_report_frame_params): Likewise.
6206 * image.c (gs_load): Likewise.
6207 * minibuf.c (get_minibuffer): Likewise.
6208 * msdos.c (dos_set_window_size): Likewise.
6209 * process.c (make_process): Likewise.
6210 * xdisp.c (ensure_echo_area_buffers): Likewise.
6211 * xsettings.c (apply_xft_settings): Likewise.
6213 2012-07-09 Glenn Morris <rgm@gnu.org>
6215 Stop ns builds polluting the environment with EMACSDATA, EMACSDOC.
6216 * nsterm.m (ns_etc_directory): New function, split from ns_init_paths.
6217 (ns_init_paths): Do not set EMACSDATA, EMACSDOC.
6218 * nsterm.h (ns_etc_directory): Add it.
6219 * callproc.c [HAVE_NS]: Include nsterm.h.
6220 (init_callproc_1, init_callproc) [HAVE_NS]: Use ns_etc_directory.
6222 2012-07-09 Dmitry Antipov <dmantipov@yandex.ru>
6224 Move marker debugging code under MARKER_DEBUG.
6225 * marker.c (MARKER_DEBUG): Move marker debugging code under
6226 #ifdef MARKER_DEBUG because byte_char_debug_check is too slow
6227 for bootstrap with --enable-checking (~3x slowdown reported
6228 by Juanma Barranquero <lekktu@gmail.com>).
6229 (verify_bytepos): Move under #ifdef MARKER_DEBUG.
6231 2012-07-08 Paul Eggert <eggert@cs.ucla.edu>
6233 * systime.h (EMACS_SUB_TIME): Clarify behavior with unsigned time_t.
6234 See <http://bugs.gnu.org/11825#29>.
6236 2012-07-08 Eli Zaretskii <eliz@gnu.org>
6238 * xdisp.c (fill_glyphless_glyph_string): If the face of the glyph
6239 has no font, use the frame's font. (Bug#11813)
6240 (display_line): Add commentary about displaying truncation glyphs
6242 (produce_special_glyphs): Move here from term.c.
6244 * term.c (produce_special_glyphs): Move to xdisp.c.
6246 * dispextern.h (produce_special_glyphs): Move prototype to xdisp.c
6249 2012-07-07 Andreas Schwab <schwab@linux-m68k.org>
6251 * xdisp.c (display_line): Avoid warning about implicit declaration
6254 * frame.c (get_frame_param): Define only if HAVE_WINDOW_SYSTEM.
6256 * lisp.h: Remove empty conditional.
6258 2012-07-07 Paul Eggert <eggert@cs.ucla.edu>
6260 * lread.c (load_path_check): Now static.
6262 Fix some minor --with-ns problems found by static checking.
6263 * frame.c (Ftool_bar_pixel_width) [!FRAME_TOOLBAR_WIDTH]:
6264 (x_set_font) [!HAVE_X_WINDOWS]:
6265 * image.c (xpm_load_image) [HAVE_NS]:
6266 (x_to_xcolors) [!HAVE_X_WINDOWS && !HAVE_NTGUI]:
6267 (x_disable_image) [!HAVE_NS && !HAVE_NTGUI]:
6268 Remove unused local.
6269 (Fx_parse_geometry) [HAVE_NS]: Don't return garbage.
6270 (xpm_load_image) [HAVE_NS && !HAVE_XPM]: Remove unused label.
6271 * image.c (x_create_bitmap_from_file) [HAVE_NS]:
6272 (xpm_load_image, xpm_load) [HAVE_NS && !HAVE_XPM]:
6273 * nsselect.m (symbol_to_nsstring, ns_string_to_pasteboard_internal):
6274 * xfaces.c (Fx_load_color_file) [!HAVE_X_WINDOWS]:
6275 Fix pointer signedness problem.
6276 * xfaces.c (FRAME_X_FONT_TABLE):
6277 * xterm.h (FRAME_X_FONT_TABLE): Remove unused, incompatible macros.
6279 2012-07-07 Glenn Morris <rgm@gnu.org>
6281 * lread.c (load_path_check): New function, split from init_lread.
6282 (init_lread): Reorganize. Motivation:
6283 If EMACSLOADPATH is set, check/warn about that rather than the
6284 defaults, which we are not going to use. Hence we can remove
6285 the turn_off_warning and WINDOWSNT || HAVE_NS tests.
6286 Don't warn if site-lisp directories are missing.
6287 If not installed, start from a blank load-path, since
6288 PATH_LOADSEARCH refers to the eventual installation directories.
6290 2012-07-07 Eli Zaretskii <eliz@gnu.org>
6292 Support truncation and continuation glyphs on GUI frames, when
6293 fringes are disabled. (Bug#11832)
6294 * xdisp.c (init_iterator): Get dimensions of truncation and
6295 continuation glyphs even if on GUI frames.
6296 Adjust it->last_visible_x on GUI frames when the left or right fringes,
6297 or both, are absent.
6298 (start_display, move_it_in_display_line_to): Handle the case of a
6299 GUI frame without a fringe to display continuation or truncation
6301 (insert_left_trunc_glyphs): Support GUI frames: make sure
6302 truncation glyphs overwrite enough glyphs from the current line to
6303 have sufficient space in pixels.
6304 (display_line): Support truncation and continuation glyphs on GUI
6305 frames. If some spare pixels are left on the line after inserting
6306 the truncation glyphs, fill that space with a stretch glyph of a
6307 suitably computed width.
6309 * term.c (produce_special_glyphs): Call PRODUCE_GLYPHS, not
6310 produce_glyphs, to support GUI sessions.
6312 2012-07-07 Paul Eggert <eggert@cs.ucla.edu>
6314 * sysdep.c (ULLONG_MAX): Define if not already defined (Bug#11781).
6316 * sysdep.c (list_system_processes): Port to NetBSD-current (Bug#11797).
6318 Do not require float-time's arg to fit in time_t (Bug#11825).
6319 This works better on hosts where time_t is unsigned, and where
6320 float-time is applied to the (negative) difference between two times.
6321 * editfns.c (decode_time_components): Last arg is now double *,
6322 not int *, and means to store all the result as a double, without
6323 worrying about whether the seconds part fits in time_t.
6324 All callers changed.
6325 (lisp_time_argument): Remove last int * arg, as it's no longer needed.
6326 All callers changed.
6327 (Ffloat_time): Do not fail merely because the specified time falls
6328 outside of time_t range.
6330 2012-07-07 Glenn Morris <rgm@gnu.org>
6332 * s/darwin.h (HAVE_RES_INIT, HAVE_LIBRESOLV):
6333 * s/hpux10-20.h (HAVE_RINT, HAVE_RANDOM):
6334 * s/unixware.h (HAVE_GETWD): Move undefs to configure (effectively).
6336 2012-07-07 Juanma Barranquero <lekktu@gmail.com>
6338 * makefile.w32-in (DISPEXTERN_H, $(BLD)/regex.$(O)):
6339 Update dependencies.
6341 * s/ms-w32.h [_MSC_VER]: Remove strcasecmp, strncasecmp.
6343 2012-07-06 Paul Eggert <eggert@cs.ucla.edu>
6345 Use c_strcasecmp for ASCII case-insensitive comparison (Bug#11786).
6346 * dispextern.h, nsfns.m, nsterm.m: Include <c-strcase.h>.
6347 * dispextern.h (xstrcasecmp): Rewrite using c_strcasecmp.
6348 * nsfns.m (x_get_string_resource): Use c_strncasecmp, not strncasecmp.
6349 * nsterm.m (ns_default): Use c_strcasecmp, not strcasecmp.
6350 * xfaces.c (xstrcasecmp) [!HAVE_STRCASECMP]: Remove.
6352 * xfont.c (compare_font_names): Redo to omit the need for casts.
6354 2012-07-06 Andreas Schwab <schwab@linux-m68k.org>
6356 * xfns.c (Fx_change_window_property): Doc fix.
6357 * w32fns.c (Fx_change_window_property): Doc fix.
6359 * w32fns.c (Fx_window_property): Accept the same arguments as the
6360 X Windows version. Doc fix.
6361 * xfns.c (Fx_window_property): Doc fix. (Bug#11870)
6363 2012-07-06 Juanma Barranquero <lekktu@gmail.com>
6364 Eli Zaretskii <eliz@gnu.org>
6366 * s/ms-w32.h: Settings not specific to Windows moved to nt/config.nt.
6367 Windows-specific code from nt/config.nt moved here.
6368 Obsolete settings removed.
6370 2012-07-06 Paul Eggert <eggert@cs.ucla.edu>
6372 * process.c: Avoid unnecessary calls to gettime.
6373 (wait_reading_process_output): Don't get the time of day
6374 when gobbling data immediately and not waiting, as there's no need
6375 for it in that case. This removes a FIXME.
6377 2012-07-06 Jan Djärv <jan.h.d@swipnet.se>
6379 * gtkutil.c (xg_event_is_for_scrollbar): Assign gwin when HAVE_GTK3
6380 is defined (Bug#11768).
6382 2012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
6384 Fix marker debugging code.
6385 * marker.c (byte_char_debug_check): Do not perform the check
6386 if buffer is not multibyte.
6387 (buf_charpos_to_bytepos, buf_bytepos_to_charpos):
6388 Call byte_char_debug_check with correct arguments.
6390 2012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
6392 Compile marker debugging code only if ENABLE_CHECKING is defined.
6393 * marker.c (byte_char_debug_check, count_markers):
6394 Use only if ENABLE_CHECKING is defined.
6395 (byte_debug_flag): Remove.
6396 (CONSIDER, buf_charpos_to_bytepos, buf_bytepos_to_charpos):
6397 Always call byte_char_debug_check if ENABLE_CHECKING is defined.
6399 2012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
6401 Avoid code repetition in marker-related functions.
6402 * marker.c (attach_marker): New function.
6403 (Fset_marker, set_marker_restricted, set_marker_both)
6404 (set_marker_restricted_both): Use it.
6405 (Fset_marker, set_marker_restricted, Fbuffer_has_markers_at):
6406 Consistently rename charno to charpos.
6407 (marker_position): Add eassert.
6408 (marker_byte_position): Convert to eassert.
6410 2012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
6412 Simplify list operations in unchain_overlay and unchain_marker.
6413 * buffer.c (unchain_overlay): Simplify. Add comment.
6414 * marker.c (unchain_marker): Simplify. Fix comments.
6416 2012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
6418 Introduce fast path for the widely used marker operation.
6419 * alloc.c (build_marker): New function.
6420 * lisp.h (build_marker): New prototype.
6421 * buffer.c (clone_per_buffer_values, Fmake_indirect_buffer): Use it.
6422 * composite.c (autocmp_chars): Likewise.
6423 * editfns.c (buildmark): Remove.
6424 (Fpoint_marker, Fpoint_min_marker, Fpoint_max_marker)
6425 (save_restriction_save): Use build_marker.
6426 * marker.c (buf_charpos_to_bytepos, buf_bytepos_to_charpos): Likewise.
6427 * window.c (save_window_save): Likewise.
6429 2012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
6431 Do not use Fdelete_overlay in delete_all_overlays
6432 to avoid redundant calls to unchain_overlay.
6433 * buffer.c (drop_overlay): New function.
6434 (delete_all_overlays, Fdelete_overlay): Use it.
6435 * minibuf.c (get_minibuffer): Fix comment.
6437 2012-07-06 Paul Eggert <eggert@cs.ucla.edu>
6439 Port to OpenBSD 5.1 amd64.
6440 * sysdep.c [BSD_SYSTEM]: Include <sys/param.h> before <sys/sysctl.h>.
6441 This is needed for OpenBSD, and should be harmless on all BSD systems.
6442 Also, include <sys/sysctl.h>, as it should be available on all
6443 BSD_SYSTEM hosts given that we're already calling sysctl in that case.
6444 (list_system_processes) [__OpenBSD__]: Use DARWIN_OS style mib, but
6445 use p_pid member, not kp_proc.pid.
6447 2012-07-06 Glenn Morris <rgm@gnu.org>
6449 * Makefile.in (emacs$(EXEEXT)): Don't check for load-path shadows.
6451 2012-07-05 Paul Eggert <eggert@cs.ucla.edu>
6453 More xmalloc and related cleanup.
6454 * alloc.c, bidi.c, buffer.c, buffer.h, bytecode.c, callint.c:
6455 * callproc.c, charset.c, coding.c, composite.c, data.c, dispnew.c:
6456 * doc.c, editfns.c, emacs.c, eval.c, fileio.c, filelock.c, fns.c:
6457 * font.c, fontset.c, frame.c, fringe.c, ftfont.c, ftxfont.c, gmalloc.c:
6458 * gtkutil.c, image.c, keyboard.c, keymap.c, lread.c, macros.c, menu.c:
6459 * nsfns.m, nsfont.m, nsmenu.m, nsterm.m, print.c, process.c, ralloc.c:
6460 * regex.c, region-cache.c, scroll.c, search.c, sound.c, syntax.c:
6461 * sysdep.c, term.c, termcap.c, unexmacosx.c, window.c, xdisp.c:
6462 * xfaces.c, xfns.c, xftfont.c, xgselect.c, xmenu.c, xrdb.c, xselect.c:
6464 Omit needless casts involving void * pointers and allocation.
6465 Prefer "P = xmalloc (sizeof *P)" to "P = xmalloc (sizeof (TYPE_OF_P))",
6466 as the former is more robust if P's type is changed.
6467 Prefer xzalloc to xmalloc + memset 0.
6468 Simplify malloc-or-realloc to realloc.
6469 Don't worry about xmalloc returning a null pointer.
6470 Prefer xstrdup to xmalloc + strcpy.
6471 * editfns.c (Fmessage_box): Grow message_text by at least 80 when
6473 * keyboard.c (apply_modifiers_uncached): Prefer local array to
6474 alloca of a constant.
6476 2012-07-05 Eli Zaretskii <eliz@gnu.org>
6478 * xdisp.c (display_line): Fix horizontal pixel coordinates when
6479 hscroll is larger than the line width. Fixes long and futile
6480 looping inside extend_face_to_end_of_line (on a TTY) producing
6481 glyphs that are not needed and thrown away.
6483 2012-07-05 Dmitry Antipov <dmantipov@yandex.ru>
6485 * marker.c (set_marker_restricted_both): Simplify by using
6488 2012-07-05 Paul Eggert <eggert@cs.ucla.edu>
6490 * editfns.c (region_limit): Simplify by using clip_to_bounds.
6492 2012-07-05 Jan Djärv <jan.h.d@swipnet.se>
6494 * gtkutil.c (gtk_scrollbar_new, gtk_box_new): Define when HAVE_GTK3 is
6495 not defined (Bug#11768).
6496 (xg_create_frame_widgets): Use gtk_plug_new_for_display (Bug#11768).
6497 (xg_create_frame_widgets, create_dialog, xg_get_file_with_chooser)
6498 (make_widget_for_menu_item, xg_make_tool_item): Use gtk_box_new
6499 followed by gtk_box_set_homogeneous (Bug#11768).
6500 (xg_update_menu_item): Use GTK_IS_BOX (Bug#11768).
6501 (update_theme_scrollbar_width, xg_create_scroll_bar):
6502 Use gtk_scrollbar_new (Bug#11768).
6503 (xg_event_is_for_scrollbar): Use Gdk Device functions for HAVE_GTK3.
6504 (is_box_type): New function (Bug#11768).
6505 (xg_tool_item_stale_p): Call is_box_type.
6506 (xg_initialize): Get settings by calling gtk_settings_get_for_screen
6507 with default display (Bug#11768).
6509 2012-07-05 Eli Zaretskii <eliz@gnu.org>
6511 * xdisp.c (window_hscroll_limited): New function.
6512 (pos_visible_p, init_iterator): Use it to avoid overflow of pixel
6513 coordinates when window's hscroll is set to insanely large
6516 2012-07-05 Juanma Barranquero <lekktu@gmail.com>
6518 * makefile.w32-in ($(BLD)/dired.$(O), $(BLD)/fileio.$(O)): Fix typo.
6519 ($(BLD)/terminal.$(O), $(BLD)/syntax.$(O)): Update dependencies.
6521 2012-07-05 Dmitry Antipov <dmantipov@yandex.ru>
6524 * lisp.h (xzalloc): New prototype. Omit needless casts.
6525 * alloc.c (xzalloc): New function. Omit needless casts.
6526 * charset.c: Omit needless casts. Convert all calls to
6527 xmalloc with following memset to xzalloc.
6528 * dispnew.c: Likewise.
6529 * fringe.c: Likewise.
6530 * image.c: Likewise.
6531 * sound.c: Likewise.
6533 * w32fns.c: Likewise.
6534 * w32font.c: Likewise.
6535 * w32term.c: Likewise.
6536 * xfaces.c: Likewise.
6538 * xterm.c: Likewise.
6539 * atimer.c: Omit needless casts.
6540 * buffer.c: Likewise.
6541 * callproc.c: Likewise.
6543 * coding.c: Likewise.
6544 * composite.c: Likewise.
6546 * doprnt.c: Likewise.
6547 * editfns.c: Likewise.
6548 * emacs.c: Likewise.
6550 * filelock.c: Likewise.
6552 * gtkutil.c: Likewise.
6553 * keyboard.c: Likewise.
6555 * lread.c: Likewise.
6556 * minibuf.c: Likewise.
6557 * msdos.c: Likewise.
6558 * print.c: Likewise.
6559 * process.c: Likewise.
6560 * region-cache.c: Likewise.
6561 * search.c: Likewise.
6562 * sysdep.c: Likewise.
6563 * termcap.c: Likewise.
6564 * terminal.c: Likewise.
6565 * tparam.c: Likewise.
6566 * w16select.c: Likewise.
6568 * w32reg.c: Likewise.
6569 * w32select.c: Likewise.
6570 * w32uniscribe.c: Likewise.
6571 * widget.c: Likewise.
6572 * xdisp.c: Likewise.
6573 * xmenu.c: Likewise.
6575 * xselect.c: Likewise.
6577 2012-07-05 Paul Eggert <eggert@cs.ucla.edu>
6579 * fileio.c (time_error_value): Check the right error number.
6580 Problem reported by Troels Nielsen in
6581 <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00095.html>.
6583 2012-07-04 Paul Eggert <eggert@cs.ucla.edu>
6585 * window.c (set_window_hscroll): Revert the 100000 hscroll limit.
6586 This should be fixed in a better way; see Eli Zaretskii in
6587 <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00088.html>.
6588 (HSCROLL_MAX): Remove; this is now internal to set_window_hscroll.
6590 * fileio.c (time_error_value): Rename from special_mtime.
6591 The old name's problems were noted by Eli Zaretskii in
6592 <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00087.html>.
6594 * emacs.c (gdb_pvec_type): Change it back to enum pvec_type.
6595 This variable's comment says Emacs needs at least one GDB-visible
6596 symbol of type enum pvec_type, to work around GDB problems.
6597 The symbol's value doesn't matter.
6599 * alloc.c (PSEUDOVECTOR_NBYTES): Remove stray ';'
6600 that causes compilation to fail on pre-C99 compilers.
6602 2012-07-04 Juanma Barranquero <lekktu@gmail.com>
6604 * s/ms-w32.h (LISP_FLOAT_TYPE, HAVE_MEMCMP, HAVE_MEMCPY)
6605 (HAVE_MEMMOVE, HAVE_MEMSET): Don't set, obsolete.
6607 2012-07-04 Dmitry Antipov <dmantipov@yandex.ru>
6609 * buffer.c (init_buffer_once): Fix initialization of
6610 headers for buffer_defaults and buffer_local_symbols.
6611 Reported by Juanma Barranquero <lekktu@gmail.com>.
6613 2012-07-04 Stefan Monnier <monnier@iro.umontreal.ca>
6615 Turn VECTOR_FREE_LIST_FLAG into PVEC_FREE.
6616 * lisp.h (enum pvec_type): Use fewer bits.
6617 (PSEUDOVECTOR_SIZE_BITS): New constant.
6618 (PSEUDOVECTOR_SIZE_MASK, PVEC_TYPE_MASK): Use it.
6619 (XSETPVECTYPESIZE, XSETTYPED_PSEUDOVECTOR, DEFUN): Adapt code to
6620 change in pvec_type.
6621 (PSEUDOVECTOR_TYPEP): New macro.
6622 (TYPED_PSEUDOVECTORP): Use it.
6623 * fns.c (internal_equal): Adapt code to extract pvectype.
6624 * emacs.c (gdb_pvec_type): Update type.
6625 * alloc.c (PSEUDOVECTOR_NBYTES): New macro.
6626 (VECTOR_FREE_LIST_SIZE_MASK): Remove (=> PSEUDOVECTOR_SIZE_MASK).
6627 (VECTOR_FREE_LIST_FLAG): Remove (=> PVEC_FREE).
6628 (SETUP_ON_FREE_LIST): Use XSETPVECTYPESIZE.
6629 (sweep_vectors): Use it. Use local var `total_bytes' instead of
6630 abusing vector->header.next.nbytes.
6631 (live_vector_p): Use PVEC_TYPE.
6632 (mark_object): Adapt code to extract pvectype. Use switch.
6634 2012-07-04 Paul Eggert <eggert@cs.ucla.edu>
6636 * doprnt.c (doprnt): Don't assume string length fits in 'int'.
6637 Tighten new eassert a bit.
6639 2012-07-04 Dmitry Antipov <dmantipov@yandex.ru>
6641 Fix compilation with --enable-gcc-warnings and -O1
6643 * doprnt.c (doprnt): Change type of tem to int, initialize
6644 to avoid compiler warning. Add eassert.
6645 * search.c (simple_search): Initialize match_byte to avoid
6646 compiler warning. Add eassert.
6648 2012-07-04 Paul Eggert <eggert@cs.ucla.edu>
6650 Avoid weird behavior with large horizontal scrolls.
6651 Without this change, for example, large hscroll values would
6652 mess up Emacs's display on Fedora 15 x86, presumably due to
6653 overflows in int calculations in the display code.
6654 Also, if buffers had long lines, Emacs would freeze.
6655 * window.c (HSCROLL_MAX): Reduce to 100000, and make it visible to GDB.
6656 (set_window_hscroll): New function, containing the old guts of
6657 Fset_window_hscroll. Return the clipped value.
6658 (Fset_window_hscroll, Fscroll_left, Fscroll_right): Use it.
6659 This avoids the need to check against PTRDIFF_MAX.
6661 * buffer.c (Fgenerate_new_buffer_name): Fix sprintf format mismatch.
6663 2012-07-04 Dmitry Antipov <dmantipov@yandex.ru>
6665 * buffer.c (Fgenerate_new_buffer_name): Fix type mismatch.
6667 2012-07-04 Paul Eggert <eggert@cs.ucla.edu>
6669 * regex.c: Suppress GCC warning on RHEL 6. (Bug#11207)
6670 Conditionalize the pragmas on GCC 4.5 or later, not GCC 4.3 or later,
6671 since GCC 4.4.6 issues a bogus warning for them.
6673 Fix bugs in file timestamp newness comparisons.
6674 * fileio.c (Ffile_newer_than_file_p):
6675 * lread.c (Fload): Use full timestamp resolution of files,
6676 not just the 1-second resolution, so that files that are only
6677 slightly newer still count as newer.
6678 * fileio.c (Ffile_newer_than_file_p): Don't assume file
6679 timestamps fit in 'int'; this fixes a Y2038 bug on most hosts.
6681 2012-07-03 Paul Eggert <eggert@cs.ucla.edu>
6683 * fileio.c: Improve handling of file time marker. (Bug#11852)
6684 (special_mtime): New function.
6685 (Finsert_file_contents, Fverify_visited_file_modtime):
6686 Use it to set special mtime values consistently.
6688 2012-07-03 Andreas Schwab <schwab@linux-m68k.org>
6690 * fileio.c (Finsert_file_contents): Properly handle st_mtime
6691 marker for non-existing file. (Bug#11852)
6693 2012-07-03 Glenn Morris <rgm@gnu.org>
6695 * lisp.h (Fread_file_name): Restore EXFUN (it's not a normal DEFUN
6696 and did not make it into globals.h).
6698 2012-07-03 Tom Tromey <tromey@redhat.com>
6700 * window.c (Fset_window_margins, Fset_window_fringes)
6701 (Fset_window_scroll_bars, Fset_window_vscroll): No longer static.
6702 * textprop.c (Fprevious_property_change): No longer static.
6703 * syntax.c (Fsyntax_table_p): No longer static.
6704 * process.c (Fget_process, Fprocess_datagram_address): No longer
6706 * keymap.c (Flookup_key, Fcopy_keymap): No longer static.
6707 * keyboard.c (Fcommand_execute): No longer static.
6709 * insdel.c (Fcombine_after_change_execute): No longer static.
6710 * image.c (Finit_image_library): No longer static.
6711 * fileio.c (Fmake_symbolic_link): No longer static.
6712 * eval.c (Ffetch_bytecode): No longer static.
6713 * editfns.c (Fuser_full_name): No longer static.
6714 * doc.c (Fdocumentation_property, Fsnarf_documentation):
6716 * buffer.c (Fset_buffer_major_mode, Fdelete_overlay): No longer
6718 * dired.c (Ffile_attributes): No longer static.
6719 * composite.c (Fcomposition_get_gstring): No longer static.
6720 * callproc.c (Fgetenv_internal): No longer static.
6722 * ccl.h: Remove EXFUNs.
6723 * buffer.h: Remove EXFUNs.
6724 * dispextern.h: Remove EXFUNs.
6725 * intervals.h: Remove EXFUNs.
6726 * fontset.h: Remove EXFUN.
6727 * font.h: Remove EXFUNs.
6728 * dosfns.c (system_process_attributes): Remove EXFUN.
6729 * keymap.h: Remove EXFUNs.
6730 * lisp.h: Remove EXFUNs.
6731 * w32term.h: Remove EXFUNs.
6732 * window.h: Remove EXFUNs.
6733 * xsettings.h: Remove EXFUN.
6734 * xterm.h: Remove EXFUN.
6736 2012-07-03 Glenn Morris <rgm@gnu.org>
6738 * lisp.h (Frandom): Make it visible to C.
6739 * buffer.c (Fgenerate_new_buffer_name): Speed up finding a new
6740 buffer for invisible buffers. (Bug#1229)
6742 2012-07-03 Dmitry Antipov <dmantipov@yandex.ru>
6744 Fix block vector allocation code to allow VECTOR_BLOCK_SIZE
6745 values which aren't power of 2.
6746 * alloc.c (VECTOR_FREE_LIST_SIZE_MASK): New macro.
6747 Verify its value and the value of VECTOR_BLOCK_SIZE. Adjust users
6750 2012-07-03 Stefan Monnier <monnier@iro.umontreal.ca>
6752 * lisp.h (Lisp_Misc, Lisp_Fwd): Move around to group better.
6754 * alloc.c (mark_object): Revert part of last patch to use `switch'.
6756 2012-07-03 Dmitry Antipov <dmantipov@yandex.ru>
6758 * alloc.c (allocate_vector_block): Remove redundant
6759 calls to mallopt if DOUG_LEA_MALLOC is defined.
6760 (allocate_vectorlike): If DOUG_LEA_MALLOC is defined,
6761 avoid calls to mallopt if zero_vector is returned.
6763 2012-07-03 Dmitry Antipov <dmantipov@yandex.ru>
6765 * alloc.c (check_string_bytes): If GC_CHECK_STRING_BYTES
6766 is enabled, avoid dereferencing NULL current_sblock if
6769 2012-07-03 Dmitry Antipov <dmantipov@yandex.ru>
6771 Cleanup basic buffer management.
6772 * buffer.h (struct buffer): Change layout to use generic vector
6773 marking code. Fix some comments. Change type of 'clip_changed'
6774 to bitfield. Remove unused #ifndef old.
6775 (FIRST_FIELD_PER_BUFFER, LAST_FIELD_PER_BUFFER): Remove.
6776 (GET_OVERLAYS_AT): Fix indentation.
6777 (for_each_per_buffer_object_at): New macro.
6778 * buffer.c (clone_per_buffer_values, reset_buffer_local_variables)
6779 (Fbuffer_local_variables): Use it.
6780 (init_buffer_once, syms_of_buffer): Remove unused #ifndef old.
6781 * alloc.c (allocate_buffer): Adjust to match new layout of
6782 struct buffer. Fix comment.
6783 (mark_overlay): New function.
6784 (mark_buffer): Use it. Use mark_vectorlike to mark normal
6785 Lisp area of struct buffer.
6786 (mark_object): Use it. Adjust marking of misc objects
6787 and related comments.
6789 2012-07-02 Paul Eggert <eggert@cs.ucla.edu>
6791 * alloc.c (mark_object): Remove "#ifdef GC_CHECK_MARKED_OBJECTS"
6792 wrapper that is not needed because the wrapped code is a no-op (zero
6793 machine instructions) when GC_CHECK_MARKED_OBJECTS is not defined.
6794 This avoids a -Wunused-macros diagnostic with GCC 4.7.1 x86-64.
6796 2012-07-02 Dmitry Antipov <dmantipov@yandex.ru>
6798 * alloc.c (mark_buffer): Simplify. Remove prototype.
6799 (mark_object): Add comment. Reorganize marking of vector-like
6800 objects. Use CHECK_LIVE for all vector-like objects except buffers
6801 and subroutines when GC_CHECK_MARKED_OBJECTS is defined.
6802 Avoid redundant calls to mark_vectorlike for bool vectors.
6804 2012-06-30 Glenn Morris <rgm@gnu.org>
6806 * nsterm.m (ns_init_paths): Ignore site-lisp if --no-site-lisp.
6808 * epaths.in (PATH_SITELOADSEARCH): New.
6809 * lread.c (init_lread): Use PATH_SITELOADSEARCH.
6810 This is rather than relying on --enable-locallisppath elements
6811 having "site-lisp" in their names. (Bug#10208#25, 11658)
6813 2012-06-30 Eli Zaretskii <eliz@gnu.org>
6815 * w32proc.c (sys_select): Accept and ignore one more argument.
6817 * w32.c (emacs_gnutls_pull): Call select with one more argument.
6819 * sysselect.h [DOS_NT]: Don't include sys/select.h.
6820 (pselect) [!MS_DOS]: Redirect to sys_select.
6822 * sysdep.c: Don't include dos.h and dosfns.h.
6824 * process.c (sys_select):
6825 * msdos.c (sys_select): Accept one more argument and ignore it.
6827 * msdos.c (event_timestamp, sys_select): Use gnulib's gettime;
6828 adapt data types and code to that.
6831 * msdos.c (gettime, settime): Define away the prototypes in dos.h,
6832 which clashes with the gnulib function of the same name.
6834 2012-06-30 Andreas Schwab <schwab@linux-m68k.org>
6836 * font.c (font_style_to_value, font_style_symbolic)
6837 (font_prop_validate_style): Add type checks for values in
6840 * lisp.h (CHECK_RANGED_INTEGER): Make value to check the first
6842 * character.c, charset.c, menu.c, process.c, window.c: Adjust all
6845 2012-06-29 Eli Zaretskii <eliz@gnu.org>
6847 * xdisp.c (try_window_id): Undo last change.
6849 * w32.c (getwd): Adjust commentary about startup_dir.
6850 (init_environment): Always call sys_access, even in non-MSVC
6851 builds. Don't chdir to the directory of the Emacs executable.
6852 This undoes code from 1997 which was justified by the need to
6853 "avoid conflicts when removing and renaming directories". But its
6854 downside was that every relative file name was being interpreted
6855 relative to the directory of the Emacs executable, which can never
6856 be TRT. In particular, it broke sys_access when called with
6857 relative file names.
6858 (sys_access): Map GetLastError to errno.
6860 2012-06-29 Dmitry Antipov <dmantipov@yandex.ru>
6862 * window.h (struct window): Change type of 'fringes_outside_margins'
6863 to bitfield. Fix comment. Adjust users accordingly.
6864 (struct window): Change type of 'window_end_bytepos' to ptrdiff_t.
6866 * xdisp.c (try_window_id): Change type of 'first_vpos' and 'vpos'
6869 2012-06-29 Andreas Schwab <schwab@linux-m68k.org>
6871 * gnutls.c (emacs_gnutls_handshake):
6872 Add QUIT to make the loop interruptible.
6874 2012-06-29 Glenn Morris <rgm@gnu.org>
6876 * charset.c (init_charset): Make lack of etc/charsets fatal.
6878 2012-06-29 Dmitry Antipov <dmantipov@yandex.ru>
6880 * editfns.c (region_limit): Fix type mismatch.
6882 2012-06-29 Dmitry Antipov <dmantipov@yandex.ru>
6884 * nsfns.m: Fix GLYPH_DEBUG usage assuming that it may be
6885 undefined. Convert from xassert to eassert.
6886 * nsmenu.m: Convert from xassert to eassert.
6887 * nsterm.m: Likewise.
6889 2012-06-28 Stefan Monnier <monnier@iro.umontreal.ca>
6891 * editfns.c (region_limit): Clip to narrowing (bug#11770).
6893 2012-06-28 Paul Eggert <eggert@cs.ucla.edu>
6895 Avoid integer overflow on scroll-left and scroll-right.
6896 * window.c (HSCROLL_MAX): New macro.
6897 (Fscroll_left, Fscroll_right): Avoid undefined behavior on integer
6898 overflow when requested scroll falls outside ptrdiff_t range.
6900 2012-06-28 Dmitry Antipov <dmantipov@yandex.ru>
6902 * window.h (struct window): Change type of 'hscroll',
6903 'min_hscroll' and 'last_point' from Lisp_Object to ptrdiff_t,
6904 'last_modified' and 'last_overlay_modified' to EMACS_INT.
6905 Adjust users accordingly.
6906 * xdisp.c (try_cursor_movement): Replace type check with eassert.
6907 * window.c (Fscroll_left, Fscroll_right): Change type of 'hscroll'
6908 from EMACS_INT to ptrdiff_t.
6909 (make_window): Omit redundant initialization.
6911 2012-06-28 Juanma Barranquero <lekktu@gmail.com>
6913 * makefile.w32-in ($(BLD)/regex.$(O)): Update dependencies.
6915 2012-06-28 Dmitry Antipov <dmantipov@yandex.ru>
6917 * window.h (struct window): Change type of 'use_time' and
6918 'sequence_number' from Lisp_Object to int.
6919 * frame.c (make_frame): Adjust users accordingly.
6920 * print.c (print_object): Likewise.
6921 * window.c (select_window, Fwindow_use_time, make_parent_window)
6922 (make_window): Likewise.
6924 2012-06-28 Dmitry Antipov <dmantipov@yandex.ru>
6926 * dispextern.h (GLYPH_DEBUG): Now defined in config.h if
6927 enabled with --enable-checking=[all,glyphs] configure option.
6928 Fix GLYPH_DEBUG usage assuming that it may be undefined,
6929 adjust comments accordingly.
6930 * dispnew.c: Fix GLYPH_DEBUG usage assuming that it may be
6931 undefined, adjust comments accordingly.
6932 * image.c: Likewise.
6933 * scroll.c: Likewise.
6934 * w32fns.c: Likewise.
6935 * w32term.c: Likewise.
6936 * xdisp.c: Likewise.
6937 * xfaces.c: Likewise.
6939 * xterm.c: Likewise.
6941 2012-06-28 Dmitry Antipov <dmantipov@yandex.ru>
6943 Generalize run-time debugging checks.
6944 * dispextern.h (XASSERTS): Remove.
6945 * fontset.c (xassert): Remove.
6946 Convert from xassert to eassert.
6947 * alloc.c: Convert from xassert to eassert.
6949 * dispnew.c: Likewise.
6951 * fringe.c: Likewise.
6952 * ftfont.c: Likewise.
6953 * gtkutil.c: Likewise.
6954 * image.c: Likewise.
6955 * keyboard.c: Likewise.
6957 * process.c: Likewise.
6958 * scroll.c: Likewise.
6959 * sound.c: Likewise.
6961 * w32console.c: Likewise.
6962 * w32fns.c: Likewise.
6963 * w32term.c: Likewise.
6964 * window.c: Likewise.
6965 * xdisp.c: Likewise.
6966 * xfaces.c: Likewise.
6968 * xselect.c: Likewise.
6969 * xterm.c: Likewise.
6971 2012-06-27 Stefan Monnier <monnier@iro.umontreal.ca>
6973 * fns.c (maybe_resize_hash_table): Output message when growing the
6976 2012-06-27 Dmitry Antipov <dmantipov@yandex.ru>
6978 * alloc.c (allocate_string_data): Remove dead code.
6979 * xsettings.c (XSETTINGS_FONT_NAME): Move under HAVE_XFT to
6980 avoid GCC warning about unused macro.
6982 2012-06-27 Dmitry Antipov <dmantipov@yandex.ru>
6984 * alloc.c (allocate_string): Omit intervals initialization.
6985 * alloc.c (make_uninit_multibyte_string): Initialize intervals
6986 as in make_pure_string and make_pure_c_string.
6988 2012-06-27 Dmitry Antipov <dmantipov@yandex.ru>
6990 * alloc.c (allocate_string): Fix last change.
6992 2012-06-27 Dmitry Antipov <dmantipov@yandex.ru>
6994 * alloc.c (allocate_string): Remove two redundant calls
6995 to memset, add explicit initialization where appropriate.
6997 2012-06-27 Glenn Morris <rgm@gnu.org>
6999 * lisp.mk (lisp): Remove paths.elc.
7001 2012-06-27 Chong Yidong <cyd@gnu.org>
7003 * doc.c (Fsubstitute_command_keys): Fix punctuation.
7005 2012-06-26 John Wiegley <johnw@newartisans.com>
7007 * unexmacosx.c (copy_data_segment): Add two section names used
7008 on Mac OS X Lion: __mod_init_func and __mod_term_func.
7010 * alloc.c (mark_memory): Do not check with -faddress-sanitizer
7011 when building with Clang.
7013 2012-06-26 Stefan Monnier <monnier@iro.umontreal.ca>
7015 * eval.c (Fapply): Allow calling it with a single argument.
7017 2012-06-26 Eli Zaretskii <eliz@gnu.org>
7019 * s/ms-w32.h (strcasecmp, strncasecmp) [_MSC_VER]: Redirect to
7020 _stricmp and _strnicmp.
7021 (HAVE_STRCASECMP, HAVE_STRNCASECMP): Define to 1.
7023 2012-06-26 Dmitry Antipov <dmantipov@yandex.ru>
7025 * alloc.c (allocate_window): Zero out non-Lisp part of newly
7027 (allocate_process): Likewise for new process.
7028 (allocate_terminal): Change to use offsetof.
7029 (allocate_frame): Likewise.
7030 * frame.c (make_frame): Omit redundant initialization.
7031 * window.c (make_parent_window): Use memset.
7032 (make_window): Omit redundant initialization.
7033 * process.c (make_process): Omit redundant initialization.
7034 * terminal.c (create_terminal): Likewise.
7036 2012-06-26 Dmitry Antipov <dmantipov@yandex.ru>
7038 * term.c (delete_tty): Remove redundant call to memset.
7040 2012-06-26 Dmitry Antipov <dmantipov@yandex.ru>
7042 * alloc.c: Remove build_string.
7043 * lisp.h: Define build_string as static inline. This provides
7044 a better opportunity to optimize away calls to strlen when the
7045 function is called with compile-time constant argument.
7046 * image.c (imagemagick_error): Convert to build_string.
7047 * w32proc.c (sys_spawnve): Likewise.
7048 * xterm.c (x_term_init): Likewise.
7050 2012-06-26 Paul Eggert <eggert@cs.ucla.edu>
7052 Use sprintf return value instead of invoking strlen on result.
7053 In the old days this wasn't portable, since some sprintf
7054 implementations returned char *. But they died out years ago and
7055 Emacs already assumes sprintf returns int.
7056 Similarly for float_to_string.
7057 This patch speeds up (number-to-string 1000) by 3% on Fedora 15 x86-64.
7058 * ccl.c (ccl_driver):
7059 * character.c (string_escape_byte8):
7060 * data.c (Fnumber_to_string):
7061 * doprnt.c (doprnt):
7062 * print.c (print_object):
7063 * xdisp.c (message_dolog):
7064 * xfns.c (syms_of_xfns):
7065 Use sprintf or float_to_string result to avoid need to call strlen.
7066 * data.c (Fnumber_to_string):
7067 Use make_unibyte_string, since the string must be ASCII.
7068 * lisp.h, print.c (float_to_string): Now returns int length.
7069 * term.c (produce_glyphless_glyph):
7070 Use sprintf result rather than recomputing it.
7072 Clean out last vestiges of the old HAVE_CONFIG_H stuff.
7073 * Makefile.in (ALL_CFLAGS):
7074 * makefile.w32-in (LOCAL_FLAGS): Remove -DHAVE_CONFIG_H.
7075 * gmalloc.c, regex.c: Include <config.h> unconditionally.
7077 2012-06-25 Dmitry Antipov <dmantipov@yandex.ru>
7079 * dispextern.h (xstrcasecmp): Define to library function
7080 strcasecmp if available.
7081 * xfaces.c: Do not use xstrcasecmp if strcasecmp is available.
7083 2012-06-25 Andreas Schwab <schwab@linux-m68k.org>
7085 * keyboard.c (menu_bar_items, menu_bar_item, read_key_sequence):
7086 Avoid comma operator.
7087 * menu.c (push_submenu_start, push_submenu_end)
7088 (push_left_right_boundary, push_menu_pane): Likewise.
7089 * msdos.c (dos_rawgetc): Likewise.
7091 2012-06-25 Dmitry Antipov <dmantipov@yandex.ru>
7093 * xfns.c (xic_create_fontsetname): Remove redundant calls
7096 2012-06-25 Paul Eggert <eggert@cs.ucla.edu>
7098 * gtkutil.c (get_utf8_string): Remove redundant assignment.
7099 sprintf already null-terminates its output.
7101 * xfns.c (x_window): Remove redundant cast.
7103 2012-06-25 Dmitry Antipov <dmantipov@yandex.ru>
7105 * xmenu.c (xmenu_show, xdialog_show): Explicit cast from
7106 `const char *' to `char *' to avoid compiler warning.
7108 2012-06-24 Paul Eggert <eggert@cs.ucla.edu>
7110 * xterm.c (x_term_init): Build proper-sized _XSETTINGS_Snnn string
7111 instead of truncating it to 63 (admittedly a generous limit).
7113 * process.c: Fix spelling and caps in comments.
7115 2012-06-24 Dan Nicolaescu <dann@ics.uci.edu>
7117 * emacs.c (setpgrp): Remove definition, unused.
7118 * sysdep.c (setpgrp): Remove definition, not used in this file.
7120 2012-06-24 Juanma Barranquero <lekktu@gmail.com>
7122 * makefile.w32-in: Update dependencies.
7124 2012-06-24 Eli Zaretskii <eliz@gnu.org>
7126 * makefile.w32-in (TIMESPEC_H): Remove nt/inc/sys/time.h.
7127 (SYSTIME_H): Add nt/inc/sys/time.h.
7129 * systime.h [WINDOWSNT]: Include sys/time.h.
7131 * s/ms-w32.h (struct timespec): Definition moved from
7132 nt/inc/sys/time.h. Suggested by Paul Eggert <eggert@cs.ucla.edu>.
7134 2012-06-24 Paul Eggert <eggert@cs.ucla.edu>
7136 Switch from NO_RETURN to C11's _Noreturn (Bug#11750).
7137 * buffer.h (buffer_slot_type_mismatch):
7138 * data.c (arith_error) [!FORWARD_SIGNAL_TO_MAIN_THREAD]:
7139 * eval.c (unwind_to_catch):
7140 * image.c (my_png_error, my_error_exit):
7141 * keyboard.c (quit_throw_to_read_char, user_error)
7142 (Fexit_recursive_edit, Fabort_recursive_edit):
7143 * lisp.h (die, args_out_of_range, args_out_of_range_3)
7144 (wrong_type_argument, buffer_overflow, __executable_start)
7145 (memory_full, buffer_memory_full, string_overflow, Fthrow)
7146 (xsignal, xsignal0, xsignal1, xsignal2, xsignal3, signal_error)
7147 (error, verror, nsberror, report_file_error, Ftop_level, Fkill_emacs)
7149 (child_setup) [!DOS_NT]:
7150 * lread.c (end_of_file_error, invalid_syntax):
7151 * process.c (send_process_trap) [!FORWARD_SIGNAL_TO_MAIN_THREAD]:
7152 * puresize.h (pure_write_error):
7153 * search.c (matcher_overflow):
7154 * sound.c (sound_perror, alsa_sound_perror):
7155 * sysdep.c, syssignal.h (croak):
7156 * term.c (maybe_fatal, vfatal):
7157 * textprop.c (text_read_only):
7158 * undo.c (user_error):
7159 * unexmacosx.c (unexec_error):
7160 * xterm.c (x_ins_del_lines, x_delete_glyphs):
7161 Use _Noreturn rather than NO_RETURN.
7162 No need for separate decl merely because of _Noreturn.
7163 * sound.c (sound_warning, parse_sound):
7164 Remove unnecessary forward decls.
7166 2012-06-24 Paul Eggert <eggert@cs.ucla.edu>
7168 Fix bug when time_t is unsigned and as wide as intmax_t (Bug#9000).
7169 * lisp.h (WAIT_READING_MAX): New macro.
7170 * dispnew.c (Fsleep_for, sit_for):
7171 * keyboard.c (kbd_buffer_get_event):
7172 * process.c (Faccept_process_output):
7173 Use it to avoid bogus compiler warnings with obsolescent GCC versions.
7174 This improves on the previous patch, which introduced a bug
7175 when time_t is unsigned and as wide as intmax_t.
7176 See <http://bugs.gnu.org/9000#51>.
7178 2012-06-23 Eli Zaretskii <eliz@gnu.org>
7180 * dispnew.c (sit_for, Fsleep_for):
7181 * keyboard.c (kbd_buffer_get_event):
7182 * process.c (Faccept_process_output): Avoid compiler warnings when
7183 comparing a 32-bit time_t with a 64-bit INTMAX_MAX.
7185 2012-06-23 Juanma Barranquero <lekktu@gmail.com>
7187 * makefile.w32-in: Update dependencies.
7189 * w32.c (ltime): Add return type and declare static.
7190 (w32_get_internal_run_time): Remove usused variable `time_100ns'.
7192 2012-06-23 Paul Eggert <eggert@cs.ucla.edu>
7194 * sysdep.c [__FreeBSD__]: Fix more recently-introduced typos.
7195 Privately reported by Herbert J. Skuhra.
7196 (make_lisp_timeval) [__FreeBSD__]: Rename from TIMELIST.
7198 (system_process_attributes) [__FreeBSD__]: Invoke make_lisp_time,
7199 not make_lisp_timeval, when the argument is of type EMACS_TIME.
7201 2012-06-23 Eli Zaretskii <eliz@gnu.org>
7203 * w32proc.c (Fw32_get_locale_info): Fix an off-by-one error in
7204 last argument of make_unibyte_string.
7206 * keyboard.c (kbd_buffer_get_event): Include the codepage and the
7207 language ID in the event parameters.
7209 * w32term.c (w32_read_socket): Put the new keyboard codepage into
7210 event.code, not the obscure "character set ID".
7212 2012-06-23 Chong Yidong <cyd@gnu.org>
7214 * xmenu.c (x_menu_wait_for_event): Adapt GTK3 to new xg_select.
7216 2012-06-23 Eli Zaretskii <eliz@gnu.org>
7218 Fix the MS-Windows build broken by 2012-06-22T21:17:42Z!eggert@cs.ucla.edu.
7219 * w32.c (fdutimens): New function.
7221 * w32proc.c (sys_select): Adapt to change in the EMACS_TIME type.
7223 * s/ms-w32.h (pselect): Redirect to sys_select.
7225 * sysselect.h [WINDOWSNT]: Don't include sys/select.h.
7227 * ralloc.c (r_alloc_inhibit_buffer_relocation): Fix stupid thinko
7228 in the logic of incrementing and decrementing the value of
7229 use_relocatable_buffers.
7231 2012-06-23 Paul Eggert <eggert@cs.ucla.edu>
7233 * sysdep.c [__FreeBSD__]: Fix recently-introduced typos.
7234 Privately reported by Herbert J. Skuhra.
7235 [__FreeBSD__]: Remove "*/" typo after "#include".
7236 (timeval_to_EMACS_TIME) [__FreeBSD__]: New static function.
7237 (TIMEVAL) [__FreeBSD__]: Now a static function rather than a macro.
7238 (TIMEVAL, system_process_attributes) [__FreeBSD__]:
7239 Don't assume EMACS_TIME and struct timeval are the same type.
7241 2012-06-22 Paul Eggert <eggert@cs.ucla.edu>
7243 Support higher-resolution time stamps (Bug#9000).
7244 The time stamps are only nanosecond-resolution at the C level,
7245 since that's the best that any real-world system supports now.
7246 But they are picosecond-resolution at the Lisp level, as that's
7247 easy, and leaves room for future OS improvements.
7249 * Makefile.in (LIB_CLOCK_GETTIME): New macro.
7252 * alloc.c (Fgarbage_collect): Port to higher-res time stamps.
7253 Don't get current time unless it's needed.
7255 * atimer.c: Include <sys/time.h> unconditionally, since gnulib
7256 now provides it if it's absent.
7257 (start_atimer): Port to higher-res time stamps.
7258 Check for time stamp overflow. Don't get current time more
7259 often than is needed.
7261 * buffer.h (struct buffer): Buffer modtime now has high resolution.
7262 Include systime.h, not time.h.
7263 (NONEXISTENT_MODTIME_NSECS, UNKNOWN_MODTIME_NSECS): New macros.
7265 * dired.c: Include stat-time.h.
7266 (Ffile-attributes): File times now have higher resolution.
7268 * dispextern.h [HAVE_WINDOW_SYSTEM]: Include systime.h.
7269 (struct image): Timestamp now has higher resolution.
7271 * dispnew.c (PERIODIC_PREEMPTION_CHECKING): Remove, as Emacs always
7272 has at least microseconds now. All uses removed.
7273 (update_frame, update_single_window, update_window, update_frame_1)
7274 (Fsleep_for, sit_for): Port to higher-resolution time stamps.
7275 (duration_to_sec_usec): Remove; no longer needed.
7277 * editfns.c (time_overflow): Now extern.
7278 (Fcurrent_time, Fget_internal_run_time, make_time, lisp_time_argument)
7279 (float-time, Fformat_time_string, Fcurrent_time_string)
7280 (Fcurrent_time_zone): Accept and generate higher-resolution
7282 (make_time_tail, make_lisp_time, dissassemble_lisp_time)
7283 (decode_time_components, lisp_seconds_argument): New functions.
7284 (make_time): Now static.
7285 (lisp_time_argument): Now returns EMACS_TIME. New arg ppsec.
7286 Report an error if the time is invalid, rather than having the caller
7289 * fileio.c: Include <stat-time.h>
7290 (Fcopy_file): Copy higher-resolution time stamps.
7291 Prefer to set the time stamp via a file descriptor if that works.
7292 (Fset_file_times, Finsert_file_contents, Fwrite_region)
7293 (Fverify_visited_file_modtime, Fclear_visited_file_modtime)
7294 (Fvisited_file_modtime, Fset_visited_file_modtime):
7295 Support higher-resolution time stamps.
7297 * fns.c (Frandom): Use nanoseconds, not microseconds, for seed.
7299 * gtkutil.c (xg_maybe_add_timer): Port to higher-res time stamps.
7301 * image.c (prepare_image_for_display, clear_image_cache)
7302 (lookup_image): Port to higer-resolution time stamps.
7304 * keyboard.c (start_polling, bind_polling_period):
7305 Check for time stamp overflow.
7306 (read_char, kbd_buffer_get_event, timer_start_idle)
7307 (timer_stop_idle, timer_resume_idle, timer_check_2, timer_check)
7308 (Fcurrent_idle_time, init_keyboard, set_waiting_for_input):
7309 Port to higher-resolution time stamps. Do not assume time_t is signed.
7310 (decode_timer): New function. Timers are now vectors of length 9,
7311 not 8, to accommodate the picosecond component.
7312 (timer_check_2): Use it.
7314 * nsterm.m (select_timeout, timeval_subtract): Remove.
7315 (ns_timeout): Use Emacs's facilities for time stamp arithmetic,
7316 as they're a bit more accurate and handle overflow better.
7317 (ns_select): Change prototype to be compatible with pselect.
7318 (ns_select, ns_term_shutdown): Port to ns-resolution time stamps.
7319 * nsterm.h (ns_select): Adjust prototype.
7321 * msdos.c (EMACS_TIME_ZERO_OR_NEG_P): Remove, as it assumes
7322 us-resolution time stamps.
7323 (sys_select): Use the new EMACS_TIME_SIGN macro instead.
7325 * lread.c (read_filtered_event): Port to ns-resolution time stamps.
7327 * lisp.h (time_overflow): New decl.
7328 (wait_reading_process_output): First arg is now intmax_t, not int,
7329 to accommodate larger waits.
7331 * process.h (struct Lisp_Process.read_output_delay):
7332 Now counts nanoseconds, not microseconds.
7333 * process.c (ADAPTIVE_READ_BUFFERING): Don't worry about
7335 (READ_OUTPUT_DELAY_INCREMENT, Faccept_process_output)
7336 (wait_reading_process_output):
7337 Port to ns-resolution time stamps.
7338 (Faccept_process_output, wait_reading_process_output):
7339 Check for time stamp overflow. Do not assume time_t is signed.
7340 (select_wrapper): Remove; we now use pselect.
7341 (Fprocess_attributes): Now generates ns-resolution time stamps.
7343 * sysdep.c: Include utimens.h. Don't include utime.h
7344 or worry about struct utimbuf; gnulib does that for us now.
7345 (gettimeofday): Remove; gnulib provides a substitute.
7346 (make_timeval): New function.
7347 (set_file_times): Now sets ns-resolution time stamps.
7348 New arg FD; all uses changed.
7349 (time_from_jiffies, ltime_from_jiffies, get_up_time)
7350 (system_process_attributes):
7351 Now returns ns-resolution time stamp. All uses changed.
7352 Check for time stamp overflow.
7354 * sysselect.h: Don't depend on HAVE_SYS_SELECT_H; gnulib
7355 provides a substitute now.
7357 * systime.h: Include timespec.h rather than sys/time.h and time.h,
7358 since it guarantees struct timespec.
7359 (EMACS_TIME): Now struct timespec, so that we can support
7360 ns-resolution time stamps.
7361 (EMACS_TIME_RESOLUTION, LOG10_EMACS_TIME_RESOLUTION): New macros.
7362 (EMACS_HAS_USECS): Remove; Emacs always has sub-second time stamps now.
7363 (EMACS_USECS): Remove.
7364 (EMACS_SET_USECS): The underlying time stamp now has ns resolution,
7365 so multiply the arg by 1000 before storing it.
7366 (EMACS_NSECS, EMACS_SECS_ADDR, EMACS_SET_NSECS, EMACS_SET_SECS_NSECS):
7368 (EMACS_GET_TIME, EMACS_ADD_TIME, EMACS_SUB_TIME):
7369 Port to ns-resolution time stamps.
7370 (EMACS_TIME_NEG_P): Remove; replaced by....
7371 (EMACS_TIME_SIGN): New macro.
7372 (EMACS_SET_INVALID_TIME, EMACS_TIME_VALID_P)
7373 (EMACS_TIME_FROM_DOUBLE, EMACS_TIME_TO_DOUBLE): New macros.
7374 (set_file_times, make_time, lisp_time_argument): Adjust signature.
7375 (make_timeval, make_lisp_time, decode_time_components): New decls.
7376 (EMACS_TIME_CMP): Remove; no longer used. Plus, it was buggy, in
7377 that it mishandled time_t overflow. You can't compare by subtracting!
7378 (EMACS_TIME_EQ, EMACS_TIME_NE, EMACS_TIME_GT, EMACS_TIME_GE)
7379 (EMACS_TIME_LT, EMACS_TIME_LE): Rewrite in terms of timespec_cmp.
7381 * term.c: Include <sys/time.h>.
7382 (timeval_to_Time): New function, for proper overflow wraparound.
7383 (term_mouse_position, term_mouse_click): Use it.
7385 * undo.c (record_first_change): Support higher-resolution time stamps
7387 (Fprimitive_undo): Use them when restoring time stamps.
7389 * w32.c (ltime, U64_TO_LISP_TIME, process_times, emacs_gnutls_pull)
7390 (w32_get_internal_run_time):
7391 Port to higher-resolution Emacs time stamps.
7392 (ltime): Now accepts single 64-bit integer, as that's more convenient
7395 * xdisp.c (start_hourglass): Port to ns-resolution time stamps.
7397 * xgselect.c, xgselect.h (xg_select): Add sigmask argument,
7398 for compatibility with pselect. Support ns-resolution time stamps.
7400 * xmenu.c (x_menu_wait_for_event): Support ns-resolution time stamps.
7402 * xselect.c (wait_for_property_change, x_get_foreign_selection):
7403 Check for time stamp overflow, and support ns-resolution time stamps.
7405 * xterm.c: Don't include sys/time.h; gnulib does that for us now.
7406 Don't worry about whether HAVE_TIMEVAL and HAVE_SELECT are set.
7407 (timeval_subtract): Remove; no longer needed.
7408 (XTflash, XTring_bell, x_wait_for_event):
7409 Port to ns-resolution time stamps. Don't assume time_t is signed.
7411 2012-06-22 Chong Yidong <cyd@gnu.org>
7413 * xdisp.c (x_consider_frame_title): Revert last change.
7415 2012-06-22 Eli Zaretskii <eliz@gnu.org>
7417 * alloc.c (NSTATICS): Enlarge to 0x650. Otherwise, Emacs compiled
7418 with -DENABLE_CHECKING -DXASSERTS -DGLYPH_DEBUG=1 -DBYTE_CODE_METER
7419 aborts in staticpro during startup. (Without -DBYTE_CODE_METER,
7420 staticidx goes up to 1597 out of 1600 = 0x640.)
7422 2012-06-20 Paul Eggert <eggert@cs.ucla.edu>
7424 * fileio.c (Fdefault_file_modes): Block input while fiddling with umask.
7425 Otherwise, the umask might be mistakenly 0 while handling input signals.
7427 2012-06-19 Stefan Monnier <monnier@iro.umontreal.ca>
7429 * minibuf.c (Fread_string): Bind minibuffer-completion-table.
7431 2012-06-19 Dmitry Antipov <dmantipov@yandex.ru>
7433 * alloc.c, bytecode.c, ccl.c, coding.c, composite.c, data.c, dosfns.c:
7434 * font.c, image.c, keyboard.c, lread.c, menu.c, minibuf.c, msdos.c:
7435 * print.c, syntax.c, window.c, xmenu.c, xselect.c: Replace direct
7436 access to `contents' member of Lisp_Vector objects with AREF and ASET
7439 2012-06-19 Chong Yidong <cyd@gnu.org>
7441 * frame.c (delete_frame): When selecting a frame on a different
7442 text terminal, do not alter the terminal's top-frame.
7444 * xdisp.c (format_mode_line_unwind_data): Record the target
7445 frame's selected window and its terminal's top-frame.
7446 (unwind_format_mode_line): Restore them.
7447 (x_consider_frame_title, display_mode_line, Fformat_mode_line):
7449 (x_consider_frame_title): Do not condition on HAVE_WINDOW_SYSTEM,
7450 since tty frames can be explicitly named.
7451 (prepare_menu_bars): Likewise.
7453 * term.c (Ftty_top_frame): New function.
7455 2012-06-18 Paul Eggert <eggert@cs.ucla.edu>
7457 Port byte-code-meter to modern targets.
7458 * bytecode.c (METER_CODE) [BYTE_CODE_METER]: Don't assume
7459 !CHECK_LISP_OBJECT_TYPE && !USE_LSB_TAG. Problem with
7460 CHECK_LISP_OBJECT_TYPE reported by Dmitry Antipov in
7461 <http://lists.gnu.org/archive/html/emacs-devel/2012-06/msg00282.html>.
7462 (METER_1, METER_2): Simplify.
7464 2012-06-18 Stefan Monnier <monnier@iro.umontreal.ca>
7466 * data.c (Fdefalias): Return `symbol' (bug#11686).
7468 2012-06-18 Martin Rudalics <rudalics@gmx.at>
7470 * buffer.c (Fkill_buffer): Don't throw an error when the buffer
7471 gets killed during executing of this function (Bug#11665).
7472 Try to always return Qt when the buffer has been actually killed.
7473 (Vkill_buffer_query_functions): In doc-string say that functions
7474 run by this hook should not change the current buffer.
7476 2012-06-18 Paul Eggert <eggert@cs.ucla.edu>
7478 Fix recently-introduced process.c problems found by static checking.
7479 * process.c (write_queue_push, write_queue_pop, send_process):
7480 Use ptrdiff_t, not int or EMACS_INT, for buffer lengths and offsets.
7481 (write_queue_pop): Fix pointer signedness problem.
7482 (send_process): Remove unused local.
7484 2012-06-17 Chong Yidong <cyd@gnu.org>
7486 * xdisp.c (redisplay_internal): No need to redisplay terminal
7487 frames that are not on top.
7489 2012-06-17 Troels Nielsen <bn.troels@gmail.com>
7491 * process.c (make_process): Initialize write_queue.
7492 (write_queue_push, write_queue_pop): New functions.
7493 (send_process): Use them to maintain correct ordering of process
7496 2012-06-17 Paul Eggert <eggert@cs.ucla.edu>
7498 * lisp.h (eassert): Assume C89 or later.
7499 This removes the need for CHECK.
7500 (CHECK): Remove. Its comments about always evaluating its
7501 argument were confusing, as 'eassert' typically does not evaluate
7504 * coding.c (produce_chars): Use ptrdiff_t, not int.
7506 * xterm.c (x_draw_underwave): Check for integer overflow.
7507 This pacifies gcc 4.7.0 -Wunsafe-loop-optimizations on x86-64.
7509 2012-06-17 Jan Djärv <jan.h.d@swipnet.se>
7511 * nsterm.m (x_free_frame_resources): Move xfree so freed memory isn't
7512 referenced (Bug#11583).
7514 2012-06-16 Aurelien Aptel <aurelien.aptel@gmail.com>
7516 Implement wave-style variant of underlining.
7517 * dispextern.h (face_underline_type): New enum.
7518 (face): Add field for underline type.
7519 * nsterm.m (ns_draw_underwave): New function.
7520 (ns_draw_text_decoration): Use it.
7521 * w32term.c (w32_restore_glyph_string_clip, w32_draw_underwave):
7523 (x_draw_glyph_string): Use them.
7524 * xfaces.c (Qline, Qwave): New Lisp objects.
7525 (check_lface_attrs, merge_face_ref)
7526 (Finternal_set_lisp_face_attribute, realize_x_face):
7527 Handle wave-style underline face attributes.
7528 * xterm.c (x_draw_underwave): New function.
7529 (x_draw_glyph_string): Use it.
7531 2012-06-16 Juanma Barranquero <lekktu@gmail.com>
7533 * makefile.w32-in ($(BLD)/emacs.$(O), $(BLD)/fringe.$(O))
7534 ($(BLD)/xml.$(O), $(BLD)/intervals.$(O), $(BLD)/macros.$(O))
7535 ($(BLD)/minibuf.$(O), $(BLD)/regex.$(O), $(BLD)/region-cache.$(O))
7536 ($(BLD)/textprop.$(O), $(BLD)/undo.$(O), $(BLD)/window.$(O))
7537 ($(BLD)/w32select.$(O)): Update dependencies.
7539 2012-06-16 Andreas Schwab <schwab@linux-m68k.org>
7541 * buffer.h (FETCH_MULTIBYTE_CHAR): Define as inline.
7542 (BUF_FETCH_MULTIBYTE_CHAR): Likewise.
7543 * character.c (_fetch_multibyte_char_p): Remove.
7544 * alloc.c: Include "character.h" before "buffer.h".
7546 * buffer.c: Likewise.
7547 * bytecode.c: Likewise.
7548 * callint.c: Likewise.
7549 * callproc.c: Likewise.
7550 * casefiddle.c: Likewise.
7551 * casetab.c: Likewise.
7552 * category.c: Likewise.
7554 * coding.c: Likewise.
7555 * composite.c: Likewise.
7556 * dired.c: Likewise.
7557 * dispnew.c: Likewise.
7559 * dosfns.c: Likewise.
7560 * editfns.c: Likewise.
7561 * emacs.c: Likewise.
7562 * fileio.c: Likewise.
7563 * filelock.c: Likewise.
7565 * fontset.c: Likewise.
7566 * fringe.c: Likewise.
7567 * indent.c: Likewise.
7568 * insdel.c: Likewise.
7569 * intervals.c: Likewise.
7570 * keyboard.c: Likewise.
7571 * keymap.c: Likewise.
7572 * lread.c: Likewise.
7573 * macros.c: Likewise.
7574 * marker.c: Likewise.
7575 * minibuf.c: Likewise.
7576 * nsfns.m: Likewise.
7577 * nsmenu.m: Likewise.
7578 * print.c: Likewise.
7579 * process.c: Likewise.
7580 * regex.c: Likewise.
7581 * region-cache.c: Likewise.
7582 * search.c: Likewise.
7583 * syntax.c: Likewise.
7585 * textprop.c: Likewise.
7587 * unexsol.c: Likewise.
7588 * w16select.c: Likewise.
7589 * w32fns.c: Likewise.
7590 * w32menu.c: Likewise.
7591 * window.c: Likewise.
7592 * xdisp.c: Likewise.
7594 * xmenu.c: Likewise.
7596 * xselect.c: Likewise.
7598 2012-06-16 Eli Zaretskii <eliz@gnu.org>
7600 * xdisp.c (set_cursor_from_row): Don't dereference glyphs_end.
7601 If all the glyphs of the glyph row came from strings, and we have no
7602 cursor positioning clues, put the cursor on the first glyph of the
7604 (handle_face_prop): Use chunk-relative overlay string index when
7605 indexing into it->string_overlays array. (Bug#11653)
7606 (set_cursor_from_row): Use the leftmost glyph as GLYPH_BEFORE, not
7607 the rightmost. (Bug#11720)
7609 2012-06-16 Andreas Schwab <schwab@linux-m68k.org>
7611 * category.h (CHAR_HAS_CATEGORY): Define as inline.
7612 (CATEGORY_MEMBER): Enforce 1/0 value.
7613 * category.c (_temp_category_set): Remove.
7615 2012-06-16 Eli Zaretskii <eliz@gnu.org>
7617 * window.c (Fdelete_other_windows_internal)
7618 (Fdelete_window_internal): Don't access frame's mouse highlight
7619 info of the initial frame. (Bug#11677)
7621 2012-06-14 Paul Eggert <eggert@cs.ucla.edu>
7623 * .gdbinit (xgetint): Fix recently-introduced paren typo.
7624 Assume USE_2_TAGS_FOR_INTS.
7625 (xreload): Adjust $tagmask width to match recent lisp.h change.
7627 Simplify lisp.h in minor ways that should not affect code.
7628 * lisp.h (USE_2_TAGS_FOR_INTS): Remove, as it was always defined.
7629 (LISP_INT_TAG, case_Lisp_Int, LISP_STRING_TAG, LISP_INT_TAG_P)
7630 (LISP_INT1_TAG, enum Lisp_Type, XINT, XUINT, make_number):
7631 Simplify under the assumption that USE_2_TAGS_FOR_INTS is defined.
7632 (INTTYPEBITS): New macro, for clarity.
7633 (INTMASK, MOST_POSITIVE_FIXNUM): Use it.
7634 (LISP_INT1_TAG, LISP_STRING_TAG, LISP_INT_TAG_P):
7635 Simplify now that USE_LSB_TAG is always defined.
7636 (TYPEMASK, XINT) [USE_LSB_TAG]: Remove unnecessary cast.
7637 (make_number) [!USE_LSB_TAG]: Use INTMASK; that's simpler.
7639 2012-06-13 Juanma Barranquero <lekktu@gmail.com>
7641 * makefile.w32-in ($(BLD)/data.$(O)): Update dependencies.
7643 2012-06-13 Glenn Morris <rgm@gnu.org>
7645 * s/bsd-common.h (BSD4_3):
7646 * s/usg5-4-common.h (USG5_4): No longer define; unused.
7648 2012-06-13 Andreas Schwab <schwab@linux-m68k.org>
7650 * lisp.h (Lisp_Object) [CHECK_LISP_OBJECT_TYPE]: Define as struct
7653 (XHASH, XTYPE, XINT, XUINT, make_number, XSET, XPNTR, XUNTAG):
7655 * emacs.c (gdb_use_struct): Rename from gdb_use_union.
7656 * .gdbinit: Check gdb_use_struct instead of gdb_use_union.
7657 * alloc.c (widen_to_Lisp_Object): Remove.
7658 (mark_memory): Use XIL instead of widen_to_Lisp_Object.
7659 * frame.c (delete_frame): Remove outdated comment.
7660 * w32fns.c (Fw32_register_hot_key): Use XLI instead of checking
7661 USE_LISP_UNION_TYPE.
7662 (Fw32_unregister_hot_key): Likewise.
7663 (Fw32_toggle_lock_key): Likewise.
7664 * w32menu.c (add_menu_item): Likewise.
7665 (w32_menu_display_help): Use XIL instead of checking
7666 USE_LISP_UNION_TYPE.
7667 * w32heap.c (allocate_heap): Don't check USE_LISP_UNION_TYPE.
7668 (init_heap): Likewise.
7669 * w32term.c (w32_read_socket): Update comment.
7671 2012-06-13 Glenn Morris <rgm@gnu.org>
7673 * s/usg5-4-common.h, src/s/unixware.h:
7674 Remove define/undef of HAVE_SYSV_SIGPAUSE (not used since 2010-05-04).
7676 * s/gnu.h (POSIX_SIGNALS): Remove (not used since 2010-05-04).
7678 2012-06-13 Paul Eggert <eggert@cs.ucla.edu>
7680 USE_LISP_UNION_TYPE + USE_LSB_TAG cleanup (Bug#11604)
7681 * alloc.c (make_number) [!defined make_number]:
7682 Remove, as lisp.h always defines this now.
7683 (mark_maybe_pointer): Simplify since USE_LSB_TAG is always defined now.
7684 (roundup_size): Verify that it is a power of 2.
7685 * data.c (Fmake_variable_buffer_local, Fmake_local_variable):
7686 * ftfont.c (ftfont_driver): Use LISP_INITIALLY_ZERO.
7687 * lisp.h (USE_LSB_TAG): Allow the builder to compile with
7688 -DUSE_LSB_TAG=0, to override the automatically-selected default.
7689 USE_LSB_TAG now is always defined to be either 0 or 1.
7691 (union Lisp_Object): Don't worry about WORDS_BIGENDIAN; the
7692 code works fine either way, and efficiency is not a concern here,
7693 as the union type is for debugging, not for production.
7694 (LISP_MAKE_RVALUE, make_number) [USE_LISP_UNION_TYPE]:
7695 Use an inline function on all platforms when using the union type,
7696 since this is simpler and 'static inline' can be used portably
7698 (LISP_INITIALLY_ZERO): New macro.
7699 (XFASTINT, XSETFASTINT) [USE_LISP_UNION_TYPE]: Remove.
7700 (XSET) [USE_LISP_UNION_TYPE]: Don't overparenthesize.
7702 2012-06-12 Glenn Morris <rgm@gnu.org>
7704 * s/gnu-kfreebsd.h, s/hpux11.h, s/openbsd.h, s/sol2-10.h: Remove files.
7706 * s/gnu-linux.h (HAVE_PROCFS): Move to configure.
7708 * s/hpux10-20.h, s/openbsd.h, s/usg5-4-common.h:
7709 Move BROKEN_SIGIO to configure.
7711 * s/bsd-common.h, s/darwin.h, s/gnu-kfreebsd.h, s/hpux10-20.h:
7712 Move NO_TERMIO to configure.
7714 2012-06-12 Chong Yidong <cyd@gnu.org>
7716 * image.c (imagemagick_load_image): Use MagickFlattenImage if
7717 MagickMergeImageLayers is undefined. Use pixel pusher loop if
7718 MagickExportImagePixels is undefined.
7720 2012-06-12 Paul Eggert <eggert@cs.ucla.edu>
7722 * image.c (imagemagick_load_image): Remove unused label.
7724 2012-06-11 Glenn Morris <rgm@gnu.org>
7726 * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/darwin.h:
7727 * s/gnu-kfreebsd.h, s/gnu-linux.h, s/gnu.h, s/hpux10-20.h:
7728 * s/irix6-5.h, s/ms-w32.h, s/msdos.h, s/template.h:
7729 * s/usg5-4-common.h: Move SYSTEM_TYPE to configure.
7731 2012-06-11 Stefan Monnier <monnier@iro.umontreal.ca>
7733 * alloc.c (make_byte_code): New function.
7734 (Fmake_byte_code): Use it. Don't purify here.
7735 * lread.c (read1): Use it as well to avoid extra allocation.
7737 2012-06-11 Chong Yidong <cyd@gnu.org>
7739 * image.c (imagemagick_load_image): Implement transparency.
7741 2012-06-10 Andreas Schwab <schwab@linux-m68k.org>
7743 * regex.c (at_begline_loc_p): Also recognize `(?N:' and correctly
7744 account for preceding backslashes. (Bug#11663)
7746 2012-06-09 Chong Yidong <cyd@gnu.org>
7748 * term.c: Support italics in capable terminals (Bug#9652).
7749 (no_color_bit): Replace unused NC_BLINK with NC_ITALIC.
7750 (turn_on_face): Output using TS_enter_italic_mode if available.
7751 Don't handle unused blinking and alt-charset cases.
7752 (turn_off_face): Handle italic case; discard unused tty_blinking_p
7753 and tty_alt_charset_p cases.
7754 (tty_capable_p, init_tty): Support italics.
7756 * termchar.h (struct tty_display_info): Add field for italics.
7757 Remove unused blink field.
7759 * xfaces.c (tty_supports_face_attributes_p, realize_tty_face):
7762 * dispextern.h: Replace unused TTY_CAP_BLINK with TTY_CAP_ITALIC.
7763 (struct face): Remove unused fields tty_dim_p, tty_blinking_p, and
7764 tty_alt_charset_p. Add tty_italic_p.
7766 2012-06-09 Michael Albinus <michael.albinus@gmx.de>
7768 * dbusbind.c (XD_BASIC_DBUS_TYPE): Use dbus_type_is_valid and
7769 dbus_type_is_basic if available.
7770 (xd_extract_signed, xd_extract_unsigned): Rename from
7771 extract_signed and extract_unsigned, respectively. Adapt callers.
7773 2012-06-09 Chong Yidong <cyd@gnu.org>
7775 * xfaces.c (face_for_overlay_string): Handle face remapping (Bug#2066).
7777 * fringe.c (Fset_fringe_bitmap_face): Handle the noninteractive
7780 2012-06-08 Paul Eggert <eggert@cs.ucla.edu>
7782 * xdisp.c (vmessage): Treat frame message as multibyte.
7783 Without this change, (let ((§ 1)) (make-variable-buffer-local '§))
7784 would generate the diagnostic "Making \302\247 buffer-local while
7787 2012-06-08 Eli Zaretskii <eliz@gnu.org>
7789 * dispnew.c (showing_window_margins_p): Undo last change, which
7790 was done due to an inadvertent commit.
7791 (adjust_frame_glyphs_for_frame_redisplay): Do call
7792 showing_window_margins_p.
7794 2012-06-08 Stefan Monnier <monnier@iro.umontreal.ca>
7796 * eval.c (Fmake_var_non_special): New primitive.
7797 (syms_of_eval): Defsubr it.
7798 * lread.c (syms_of_lread): Mark `values' as lexically scoped.
7800 2012-06-08 Juanma Barranquero <lekktu@gmail.com>
7802 * dispnew.c (showing_window_margins_p): Wrap in #if 0 to prevent unused
7803 function warning (the only call is inside #if 0 since 2012-06-08T08:44:45Z!eliz@gnu.org).
7805 2012-06-08 Eli Zaretskii <eliz@gnu.org>
7807 * alloc.c (allocate_vectorlike): Fix last change.
7809 2012-06-08 Dmitry Antipov <dmantipov@yandex.ru>
7811 Block-based vector allocation of small vectors.
7812 * lisp.h (struct vectorlike_header): New field `nbytes',
7813 adjust comment accordingly.
7814 * alloc.c (enum mem_type): New type `MEM_TYPE_VECTOR_BLOCK'
7815 to denote vector blocks. Adjust users (live_vector_p,
7816 mark_maybe_pointer, valid_lisp_object_p) accordingly.
7817 (COMMON_MULTIPLE): Move outside #if USE_LSB_TAG.
7818 (VECTOR_BLOCK_SIZE, vroundup, VECTOR_BLOCK_BYTES),
7819 (VBLOCK_BYTES_MIN, VBLOCK_BYTES_MAX, VECTOR_MAX_FREE_LIST_INDEX),
7820 (VECTOR_FREE_LIST_FLAG, ADVANCE, VINDEX, SETUP_ON_FREE_LIST),
7821 (VECTOR_SIZE, VECTOR_IN_BLOCK): New macros.
7822 (roundup_size): New constant.
7823 (struct vector_block): New data type.
7824 (vector_blocks, vector_free_lists, zero_vector): New variables.
7825 (all_vectors): Rename to `large_vectors'.
7826 (allocate_vector_from_block, init_vectors, allocate_vector_from_block)
7827 (sweep_vectors): New functions.
7828 (allocate_vectorlike): Return `zero_vector' as the only vector of
7829 0 items. Allocate new vector from block if vector size is less than
7830 or equal to VBLOCK_BYTES_MAX.
7831 (Fgarbage_collect): Move all vector sweeping code to sweep_vectors.
7832 (init_alloc_once): Add call to init_vectors.
7834 2012-06-08 Stefan Monnier <monnier@iro.umontreal.ca>
7836 * eval.c (Fmacroexpand): Stop if the macro returns the same form.
7838 2012-06-07 Paul Eggert <eggert@cs.ucla.edu>
7840 * doprnt.c (doprnt): Truncate multibyte char correctly.
7841 Without this change, doprnt (buf, 2, "%s", FORMAT_END, AP)
7842 would mishandle a string argument "Xc" if X was a multibyte
7843 character of length 2: it would truncate after X's first byte
7844 rather than including all of X.
7846 2012-06-06 Chong Yidong <cyd@gnu.org>
7848 * buffer.c (word_wrap): Doc fix.
7850 2012-06-04 Paul Eggert <eggert@cs.ucla.edu>
7852 * xdisp.c (note_mode_line_or_margin_highlight): Pacify gcc -Wall.
7854 2012-06-03 Glenn Morris <rgm@gnu.org>
7856 * xdisp.c (tool-bar-style): Doc fix.
7858 2012-06-03 Ulrich Müller <ulm@gentoo.org>
7860 * Makefile.in (PAXCTL): Define.
7861 (temacs$(EXEEXT)): Disable memory randomization for the temacs
7862 binary via PaX flags if the paxctl utility is available.
7863 (emacs$(EXEEXT), bootstrap-emacs$(EXEEXT)):
7864 Restore PaX flags to their default. (Bug#11398)
7866 2012-06-03 Chong Yidong <cyd@gnu.org>
7868 * xdisp.c (decode_mode_spec_coding): Display a space for a unibyte
7871 2012-06-03 Chong Yidong <cyd@gnu.org>
7873 * xdisp.c (calc_pixel_width_or_height): Use Fbuffer_local_value.
7874 (note_mode_line_or_margin_highlight): If there is no help echo,
7875 use mode-line-default-help-echo. Handle the case where the mouse
7876 position is past the end of the mode line string.
7878 * buffer.c (buffer_local_value_1): New function, split from
7879 Fbuffer_local_value; can return Qunbound.
7880 (Fbuffer_local_value): Use it.
7881 (Vmode_line_format): Docstring tweaks.
7883 2012-06-02 Paul Eggert <eggert@cs.ucla.edu>
7885 * sysdep.c (system_process_attributes): Improve comment.
7887 2012-06-02 Stefan Monnier <monnier@iro.umontreal.ca>
7889 * keyboard.c: Export real-this-command to Elisp.
7890 (syms_of_keyboard): Rename real_this_command to Vreal_this_command
7891 and DEFVAR it. Update all users.
7893 2012-06-02 Paul Eggert <eggert@cs.ucla.edu>
7895 * minibuf.c (Fassoc_string): Remove duplicate declaration.
7897 * sysdep.c (system_process_attributes) [SOLARIS2 && HAVE_PROCFS]:
7898 Convert pctcpu and pctmem to Lisp float properly.
7899 Let the compiler fold better, as 100.0/0x8000 is exact.
7901 2012-06-02 Andreas Schwab <schwab@linux-m68k.org>
7903 * alloc.c (CONS_BLOCK_SIZE): Account for padding at the end of
7906 2012-06-01 Paul Eggert <eggert@cs.ucla.edu>
7908 * xfns.c (x_set_tool_bar_lines) [USE_GTK]: Adjust to bitfield change.
7910 2012-06-01 Dmitry Antipov <dmantipov@yandex.ru>
7912 For a 'struct window', replace some Lisp_Object fields to
7913 bitfields where appropriate, remove unused fields.
7914 * window.h (struct window): Remove unused 'last_mark_x' and
7915 'last_mark_y' fields. Rename 'mini_p' field to 'mini',
7916 change its type from Lisp_Object to bitfield.
7917 Change type of 'force_start', 'optional_new_start',
7918 'last_had_star', 'update_mode_line' and 'start_at_line_beg'
7919 fields from Lisp_Object to bitfield. Adjust users accordingly.
7921 2012-05-31 Paul Eggert <eggert@cs.ucla.edu>
7923 Pacify gcc -Wdouble-precision when using Xaw.
7924 * xterm.c (xaw_jump_callback, x_set_toolkit_scroll_bar_thumb)
7925 [HAVE_X_WINDOWS && USE_TOOLKIT_SCROLL_BARS && !USE_MOTIF && !USE_GTK]:
7926 Use 'float' consistently, rather than 'float' in most places
7927 and 'double' in a couple of places.
7929 2012-05-31 Eli Zaretskii <eliz@gnu.org>
7931 * xdisp.c (handle_stop): Detect whether we have overlay strings
7932 loaded by testing it->current.overlay_string_index to be
7933 non-negative, instead of checking whether n_overlay_strings is
7934 positive. (Bug#11587)
7936 2012-05-31 Chong Yidong <cyd@gnu.org>
7938 * keymap.c (describe_map_tree): Revert 2011-07-07 change (Bug#1169).
7940 * doc.c (Fsubstitute_command_keys): Doc fix.
7942 2012-05-31 Eli Zaretskii <eliz@gnu.org>
7944 * search.c (search_buffer): Remove calls to
7945 r_alloc_inhibit_buffer_relocation, as it is now called by
7946 maybe_unify_char, which was the cause of relocation of buffer text
7949 2012-05-31 Eli Zaretskii <eliz@gnu.org>
7951 * charset.c (maybe_unify_char): Inhibit relocation of buffer text
7952 for the duration of call to load_charset, to avoid problems with
7953 callers of maybe_unify_char that access buffer text through C
7956 * ralloc.c (r_alloc_inhibit_buffer_relocation): Increment and
7957 decrement the inhibition flag, instead of just setting or
7960 2012-05-31 Paul Eggert <eggert@cs.ucla.edu>
7962 Remove obsolete '#define static' cruft.
7963 * s/hpux10-20.h (_FILE_OFFSET_BITS): Don't #undef.
7964 This #undef was "temporary" in 2000; it is no longer needed
7965 now that '#define static' has gone away.
7966 * xfns.c, xterm.h (gray_bitmap_width, gray_bitmap_height)
7967 (gray_bitmap_bits): Remove; no longer needed.
7968 All uses replaced with definiens.
7969 * xterm.c: Include "bitmaps/gray.xbm".
7971 2012-05-30 Paul Eggert <eggert@cs.ucla.edu>
7973 Clean up __executable_start, monstartup when --enable-profiling.
7974 The following changes affect the code only when profiling.
7975 * dispnew.c (__executable_start): Rename from safe_bcopy.
7976 Define only on platforms that need it.
7977 * emacs.c: Include <sys/gmon.h> when profiling.
7978 (_mcleanup): Remove decl, since <sys/gmon.h> does it now.
7979 (__executable_start): Remove decl, since lisp.h does it now.
7980 (safe_bcopy): Remove decl; no longer has that name.
7981 (main): Coalesce #if into single bit of code, for simplicity.
7982 Cast pointers to uintptr_t, since standard libraries want integers
7984 * lisp.h (__executable_start): New decl.
7986 2012-05-31 Glenn Morris <rgm@gnu.org>
7988 * image.c (Fimagemagick_types): Doc fix.
7990 2012-05-30 Jim Meyering <meyering@redhat.com>
7992 * callproc.c (Fcall_process_region): Include directory component
7993 in mkstemp error message (Bug#11586).
7995 2012-05-30 Paul Eggert <eggert@cs.ucla.edu>
7997 * alloc.c, lisp.h (make_pure_vector): Now static.
7999 2012-05-30 Stefan Monnier <monnier@iro.umontreal.ca>
8001 * eval.c (Fdefun, Fdefmacro, Vmacro_declaration_function):
8002 Move to byte-run.el.
8003 (Fautoload): Do the hash-doc more carefully.
8004 * data.c (Fdefalias): Purify definition, except for keymaps.
8005 (Qdefun): Move from eval.c.
8006 * lisp.h (Qdefun): Remove.
8007 * lread.c (read1): Tiny simplification.
8009 2012-05-29 Troels Nielsen <bn.troels@gmail.com>
8011 Do not create empty overlays with the evaporate property (Bug#9642).
8012 * buffer.c (Fmove_overlay): Reinstate the earlier fix for
8013 Bug#9642, but explicitly check that the buffer the overlay would
8014 be moved to is live and rearrange lines to make sure that errors
8015 will not put the overlay in an inconsistent state.
8016 (Fdelete_overlay): Cosmetics.
8018 2012-05-28 Eli Zaretskii <eliz@gnu.org>
8020 * w32term.c (my_bring_window_to_top): New function.
8021 (x_raise_frame): Use handle returned by DeferWindowPos, which
8022 could be different from the original one.
8023 Call my_bring_window_to_top instead of my_set_foreground_window.
8026 * w32fns.c (w32_wnd_proc): Accept and process WM_EMACS_BRINGTOTOP
8027 by calling BringWindowToTop.
8029 * w32term.h (WM_EMACS_BRINGTOTOP): New message.
8030 (WM_EMACS_END): Increase by one.
8032 2012-05-28 Paul Eggert <eggert@cs.ucla.edu>
8034 * bidi.c (bidi_mirror_char): Put eassert before conversion to int.
8035 This avoids undefined behavior that might cause the eassert
8036 to not catch an out-of-range value.
8038 2012-05-28 Juanma Barranquero <lekktu@gmail.com>
8040 * makefile.w32-in ($(BLD)/w32inevt.$(O), $(BLD)/w32console.$(O)):
8041 Update dependencies.
8043 2012-05-27 Eli Zaretskii <eliz@gnu.org>
8045 * bidi.c (bidi_mirror_char): Fix last change.
8047 2012-05-27 Andreas Schwab <schwab@linux-m68k.org>
8049 * unexmacosx.c (copy_data_segment): Truncate after 16 characters
8050 when referring to sectname field in printf format.
8052 2012-05-27 Paul Eggert <eggert@cs.ucla.edu>
8054 * lisp.h [REL_ALLOC]: Omit duplicate prototypes.
8055 Only r_alloc_inhibit_buffer_relocation needed to be added;
8056 the others were already declared.
8058 * bidi.c (bidi_mirror_char): Don't possibly truncate the integer
8059 before checking whether it's out of range. Put the check inside
8061 <http://lists.gnu.org/archive/html/emacs-devel/2012-05/msg00485.html>.
8063 2012-05-27 Ken Brown <kbrown@cornell.edu>
8065 * callproc.c (Fcall_process): Restore a line that was accidentally
8066 commented out in the 2011-02-13 change (bug#11547).
8068 2012-05-27 Eli Zaretskii <eliz@gnu.org>
8070 * lisp.h [REL_ALLOC]: Add prototypes for external functions
8071 defined on ralloc.c.
8073 * buffer.c [REL_ALLOC]: Remove prototypes of
8074 r_alloc_reset_variable, r_alloc, r_re_alloc, and r_alloc_free,
8075 they are now on lisp.h.
8077 * ralloc.c (r_alloc_inhibit_buffer_relocation): New function.
8079 * search.c (search_buffer): Use it to inhibit relocation of buffer
8080 text while re_search_2 is doing its job, because re_search_2 is
8081 passed C pointers to buffer text. (Bug#11519)
8083 * msdos.c (internal_terminal_init) <Vwindow_system_version>:
8086 * xdisp.c (move_it_to): Under MOVE_TO_Y, when restoring iterator
8087 state after an additional call to move_it_in_display_line_to, keep
8088 the values of it->max_ascent and it->max_descent found for the
8090 (pos_visible_p): Revert the comparison against bottom_y to what it
8091 was in revid eliz@gnu.org-20120513182235-4p6386j761ld0nwb.
8094 2012-05-26 Paul Eggert <eggert@cs.ucla.edu>
8096 Fix coding-related core dumps with gcc -ftrapv.
8097 The code was computing A - B, where A and B are pointers, and B is
8098 random garbage. This can lead to core dumps on platforms that
8099 have special pointer registers, and it also leads to core dumps on
8100 x86-64 when compiled with gcc -ftrapv. The fix is to compute
8101 A - B only when B is initialized properly.
8102 * coding.c (coding_set_source, coding_set_destination): Return void.
8103 (coding_change_source, coding_change_destinations): New functions,
8104 with the old behaviors of coding_set_source and coding_set_destination.
8105 All callers that need an offset changed to use these new functions.
8107 2012-05-26 Glenn Morris <rgm@gnu.org>
8109 * nsterm.m (ns_init_paths): Don't mess with INFOPATH. (Bug#2791)
8111 2012-05-26 Eli Zaretskii <eliz@gnu.org>
8113 Extend mouse support on W32 text-mode console.
8114 * xdisp.c (draw_row_with_mouse_face):
8115 Call tty_draw_row_with_mouse_face for WINDOWSNT as well.
8117 * w32console.c: Include window.h.
8118 (w32con_write_glyphs_with_face, tty_draw_row_with_mouse_face):
8120 (initialize_w32_display): Initialize mouse-highlight data.
8122 * w32inevt.c: Include termchar.h and window.h.
8123 (do_mouse_event): Support mouse-autoselect-window. When the mouse
8124 moves, call note_mouse_highlight. If help_echo changed, call
8125 gen_help_event to produce help-echo message in the echo area.
8126 Call clear_mouse_face if mouse_face_hidden is set in the mouse
8129 2012-05-26 Paul Eggert <eggert@cs.ucla.edu>
8131 * lread.c (read1): Simplify slightly to avoid an overflow warning
8132 with GCC 4.7.0 on x86-64.
8134 2012-05-26 Eli Zaretskii <eliz@gnu.org>
8136 * bidi.c (bidi_mirror_char): Revert last change: an int is
8137 definitely wide enough here.
8139 2012-05-25 Paul Eggert <eggert@cs.ucla.edu>
8141 Fix integer width and related bugs (Bug#9874).
8142 * alloc.c (pure_bytes_used_lisp, pure_bytes_used_non_lisp):
8143 (allocate_vectorlike, buffer_memory_full, struct sdata, SDATA_SIZE)
8144 (string_bytes, check_sblock, allocate_string_data):
8145 (compact_small_strings, Fmake_bool_vector, make_string)
8146 (make_unibyte_string, make_multibyte_string)
8147 (make_string_from_bytes, make_specified_string)
8148 (allocate_vectorlike, Fmake_vector, find_string_data_in_pure)
8149 (make_pure_string, make_pure_c_string, make_pure_vector, Fpurecopy)
8151 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8152 (allocate_pseudovector):
8153 Use int, not EMACS_INT, where int is wide enough.
8154 (inhibit_garbage_collection, Fgarbage_collect):
8155 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8156 * bidi.c (bidi_mirror_char): Use EMACS_INT, not int, where
8157 int might not be wide enough.
8158 (bidi_cache_search, bidi_cache_find, bidi_init_it)
8159 (bidi_count_bytes, bidi_char_at_pos, bidi_fetch_char)
8160 (bidi_at_paragraph_end, bidi_find_paragraph_start)
8161 (bidi_paragraph_init, bidi_resolve_explicit, bidi_resolve_weak)
8162 (bidi_level_of_next_char, bidi_move_to_visually_next):
8163 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8164 * buffer.c (copy_overlays, Fgenerate_new_buffer_name)
8165 (Fkill_buffer, Fset_buffer_major_mode)
8166 (advance_to_char_boundary, Fbuffer_swap_text)
8167 (Fset_buffer_multibyte, overlays_at, overlays_in)
8168 (overlay_touches_p, struct sortvec, record_overlay_string)
8169 (overlay_strings, recenter_overlay_lists)
8170 (adjust_overlays_for_insert, adjust_overlays_for_delete)
8171 (fix_start_end_in_overlays, fix_overlays_before, modify_overlay)
8172 (Fmove_overlay, Fnext_overlay_change, Fprevious_overlay_change)
8173 (Foverlay_recenter, last_overlay_modification_hooks_used)
8174 (report_overlay_modification, evaporate_overlays, enlarge_buffer_text):
8175 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8176 (validate_region): Omit unnecessary test for b <= e,
8177 since that's guaranteed by the previous test.
8178 (adjust_overlays_for_delete): Avoid pos + length overflow.
8179 (Fmove_overlay, Fdelete_overlay, add_overlay_mod_hooklist)
8180 (report_overlay_modification):
8181 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8182 (Foverlays_at, Fnext_overlay_change, Fprevious_overlay_change):
8183 Omit pointer cast, which isn't needed anyway, and doesn't work
8184 after the EMACS_INT -> ptrdiff_t change.
8185 (Fmove_overlay): Clip BEG and END to ptrdiff_t to avoid overflow.
8186 * buffer.h: Adjust decls to match defn changes elsewhere.
8187 (struct buffer_text, struct buffer):
8188 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8189 Use EMACS_INT, not int, where int might not be wide enough.
8190 * bytecode.c (unmark_byte_stack, exec_byte_code): Use ptrdiff_t,
8191 not int, to avoid needless 32-bit limit on 64-bit hosts.
8192 (exec_byte_code): Use tighter memory-full test, one that checks
8193 for alloca overflow. Don't compute the address of the object just
8194 before an array, as that's not portable. Use EMACS_INT, not
8195 ptrdiff_t or int, where ptrdiff_t or int might not be wide enough.
8196 * callint.c (Fcall_interactively):
8197 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8198 * callproc.c (call_process_kill, Fcall_process):
8199 Don't assume pid_t fits into an Emacs fixnum.
8200 (call_process_cleanup, Fcall_process, child_setup):
8201 Don't assume pid_t fits into int.
8202 (call_process_cleanup, Fcall_process, delete_temp_file)
8203 (Fcall_process_region):
8204 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8205 (Fcall_process): Simplify handling of volatile integers.
8206 Use int, not EMACS_INT, where int will do.
8207 * casefiddle.c (casify_object, casify_region, operate_on_word)
8208 (Fupcase_word, Fdowncase_word, Fcapitalize_word):
8209 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8210 (casify_object): Avoid integer overflow when overallocating buffer.
8211 * casetab.c (set_identity, shuffle): Prefer int to unsigned when
8212 either works. Use lint_assume to convince GCC 4.6.1 that it's OK.
8213 * category.c (Fchar_category_set): Don't assume fixnum fits in int.
8214 * category.h (CATEGORYP): Don't assume arg is nonnegative.
8215 * ccl.c (GET_CCL_INT): Remove; no longer needed, since the
8216 integers are now checked earlier. All uses replaced with XINT.
8218 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8219 For CCL_MapSingle, check that content and value are in int range.
8220 (ccl_driver, Fregister_code_conversion_map):
8221 Check that Vcode_version_map_vector is a vector.
8222 (resolve_symbol_ccl_program): Check that vector header is in range.
8223 Always copy the vector, so that we can check its contents reliably
8224 now rather than having to recheck each instruction as it's being
8225 executed. Check that vector words fit in 'int'.
8226 (ccl_get_compiled_code, Fregister_ccl_program)
8227 (Fregister_code_conversion_map): Use ptrdiff_t, not int, for
8228 program indexes, to avoid needless 32-bit limit on 64-bit hosts.
8229 (Fccl_execute, Fccl_execute_on_string): Check that initial reg
8230 contents are in range.
8231 (Fccl_execute_on_string): Check that status is in range.
8232 * ccl.h (struct ccl_program.idx): Now ptrdiff_t, not int.
8233 * character.c (char_resolve_modifier_mask, Fchar_resolve_modifiers):
8234 Accept and return EMACS_INT, not int, because callers can pass values
8236 (c_string_width, strwidth, lisp_string_width, chars_in_text)
8237 (multibyte_chars_in_text, parse_str_as_multibyte)
8238 (str_as_multibyte, count_size_as_multibyte, str_to_multibyte)
8239 (str_as_unibyte, str_to_unibyte, string_count_byte8)
8240 (string_escape_byte8, Fget_byte):
8241 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8242 (Funibyte_string): Use CHECK_RANGED_INTEGER, not CHECK_NATNUM, to
8243 avoid mishandling large integers.
8244 * character.h: Adjust decls to match defn changes elsewhere.
8245 * charset.c (load_charset_map_from_file, find_charsets_in_text)
8246 (Ffind_charset_region):
8247 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8248 (load_charset_map_from_file): Redo idx calculation to avoid overflow.
8249 (load_charset_map_from_vector, Fdefine_charset_internal):
8250 Don't assume fixnum fits in int.
8251 (load_charset_map_from_vector, Fmap_charset_chars):
8252 Remove now-unnecessary CHECK_NATNUMs.
8253 (Fdefine_charset_internal): Check ranges here, more carefully.
8254 Don't rely on undefined behavior with signed left shift overflow.
8255 Don't assume unsigned int fits into fixnum, or that fixnum fits
8256 into unsigned int. Don't require max_code to be a valid fixnum;
8257 that's not true for gb10830 4-byte on a 32-bit host. Allow
8258 invalid_code to be a cons, for the same reason. Require code_offset
8259 to be a character. Avoid int overflow if max_char is close
8261 (CODE_POINT_TO_INDEX): On 32-bit hosts, return int, not unsigned;
8262 this is intended anyway and avoids some undefined behavior.
8263 (load_charset_map): Pass unsigned, not int, as 2nd arg of
8264 INDEX_TO_CODE_POINT, as that's what it expects.
8265 (Funify_charset, encode_char): Don't stuff unsigned vals into int vars.
8266 * charset.h (DECODE_CHAR): Return int, not unsigned;
8267 this is what was intended anyway, and it avoids undefined behavior.
8268 (CHARSET_OFFSET): Remove unused macro, instead of fixing its
8269 integer-overflow issues.
8270 (ENCODE_CHAR): Return unsigned on all hosts, not just on 32-bit hosts.
8271 Formerly, it returned EMACS_INT on 64-bit hosts in the common case
8272 where the argument is EMACS_INT, and this behavior is not intended.
8273 * chartab.c (Fmake_char_table, Fset_char_table_range)
8274 (uniprop_get_decoder, uniprop_get_encoder):
8275 Don't assume fixnum fits in int.
8276 * cmds.c (move_point): New function, that does the gist of
8277 Fforward_char and Fbackward_char, but does so while checking
8278 for integer overflow more accurately.
8279 (Fforward_char, Fbackward_char): Use it.
8280 (Fforward_line, Fend_of_line, internal_self_insert)
8281 (internal_self_insert):
8282 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8283 Fix a FIXME, by checking for integer overflow when calculating
8284 target_clm and actual_clm.
8285 * coding.c (detect_coding_XXX, encode_coding_XXX, CODING_DECODE_CHAR)
8286 (CODING_ENCODE_CHAR, CODING_CHAR_CHARSET, CODING_CHAR_CHARSET_P)
8287 (ASSURE_DESTINATION, coding_alloc_by_realloc)
8288 (coding_alloc_by_making_gap, alloc_destination)
8289 (detect_coding_utf_8, encode_coding_utf_8, decode_coding_utf_16)
8290 (encode_coding_utf_16, detect_coding_emacs_mule)
8291 (decode_coding_emacs_mule, encode_coding_emacs_mule)
8292 (detect_coding_iso_2022, decode_coding_iso_2022)
8293 (encode_invocation_designation, encode_designation_at_bol)
8294 (encode_coding_iso_2022, detect_coding_sjis, detect_coding_big5)
8295 (decode_coding_sjis, decode_coding_big5, encode_coding_sjis)
8296 (encode_coding_big5, detect_coding_ccl, decode_coding_ccl)
8297 (encode_coding_ccl, encode_coding_raw_text)
8298 (detect_coding_charset, decode_coding_charset)
8299 (encode_coding_charset, detect_eol, decode_eol, produce_chars)
8300 (produce_composition, produce_charset, produce_annotation)
8301 (decode_coding, handle_composition_annotation)
8302 (handle_charset_annotation, consume_chars, decode_coding_gap)
8303 (decode_coding_object, encode_coding_object, detect_coding_system)
8304 (Ffind_coding_systems_region_internal, Fcheck_coding_systems_region)
8305 (code_convert_region, code_convert_string)
8306 (Fdefine_coding_system_internal)
8307 (coding_set_source, coding_set_destination):
8308 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8309 (setup_iso_safe_charsets, consume_chars, Funencodable_char_position)
8310 (Fdefine_coding_system_internal):
8311 Don't assume fixnums fit in int.
8312 (decode_coding_gap, decode_coding_object, encode_coding_object)
8313 (Fread_coding_system, Fdetect_coding_region)
8314 (Funencodable_char_position, Fcheck_coding_systems_region)
8315 (get_translation, handle_composition_annotation, consume_chars):
8316 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8317 (consume_chars): Rewrite to not calculate an address outside buffer.
8318 (Ffind_operation_coding_system): NATNUMP can eval its arg twice.
8319 Don't access memory outside of the args array.
8320 (Fdefine_coding_system_internal): Check for charset-id overflow.
8321 (ENCODE_ISO_CHARACTER): Use unsigned, not int, to store the unsigned
8322 result of ENCODE_CHAR.
8323 * coding.h: Adjust decls to match defn changes elsewhere.
8324 (struct coding_system):
8325 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8326 * composite.c (get_composition_id, find_composition)
8327 (run_composition_function, update_compositions)
8328 (compose_text, composition_gstring_put_cache)
8329 (composition_gstring_p, composition_gstring_width)
8330 (fill_gstring_header, fill_gstring_body, autocmp_chars)
8331 (composition_compute_stop_pos, composition_reseat_it)
8332 (composition_update_it, struct position_record)
8333 (find_automatic_composition, composition_adjust_point)
8334 (Fcomposition_get_gstring, Ffind_composition_internal):
8335 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8336 (update_compositions):
8337 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8338 * composite.h: Adjust decls to match defn changes elsewhere.
8339 (struct composition):
8340 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8341 * data.c (let_shadows_buffer_binding_p, let_shadows_global_binding_p):
8342 Do not attempt to compute the address of the object just before a
8343 buffer; this is not portable.
8345 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8346 (Faset): Use int, not EMACS_INT, where int is wide enough.
8347 (Fstring_to_number): Don't assume fixnums fit in int.
8348 (Frem): Don't assume arg is nonnegative.
8349 * dbusbind.c (xd_append_arg): Check for integers out of range.
8350 (Fdbus_call_method): Don't overflow the timeout int.
8351 (extract_signed, extract_unsigned): New functions.
8352 (XD_CHECK_DBUS_SERIAL): Remove; superseded by extract_unsigned.
8353 (xd_get_connection_references): Return ptrdiff_t, not int.
8355 (xd_signature, xd_append_arg, xd_retrieve_arg, Fdbus_message_internal)
8356 (xd_read_message_1):
8357 Use int, not unsigned, where the dbus API uses int.
8358 (Fdbus_message_internal): Don't overflow mtype.
8359 (syms_of_dbusbind): Allocate right-sized buffer for integers.
8360 * dired.c (directory_files_internal, file_name_completion, scmp)
8361 (file_name_completion_stat):
8362 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8363 (file_name_completion): Don't overflow matchcount.
8364 (file_name_completion_stat): Use SAFE_ALLOCA, not alloca.
8365 * dispextern.h: Adjust decls to match defn changes elsewhere.
8366 (struct text_pos, struct glyph, struct bidi_saved_info)
8367 (struct bidi_string_data, struct bidi_it, struct composition_it)
8369 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8370 (struct display_pos, struct composition_it, struct it):
8371 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8372 * dispnew.c (increment_matrix_positions)
8373 (increment_row_positions, mode_line_string)
8374 (marginal_area_string):
8375 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8376 (change_frame_size_1, Fredisplay, Fframe_or_buffer_changed_p):
8377 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8378 (duration_to_sec_usec): New function, to check for overflow better.
8379 (Fsleep_for, sit_for): Use it.
8380 * doc.c (get_doc_string, store_function_docstring):
8381 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8382 (get_doc_string, Fsnarf_documentation):
8383 Use int, not EMACS_INT, where int is wide enough.
8385 Use SAFE_ALLOCA, not alloca.
8386 Check for overflow when converting EMACS_INT to off_t.
8387 * doprnt.c (doprnt):
8388 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8389 * editfns.c (init_editfns, Fuser_uid, Fuser_real_uid):
8390 Don't assume uid_t fits into fixnum.
8391 (buildmark, Fgoto_char, overlays_around, find_field, Fdelete_field)
8392 (Ffield_string, Ffield_string_no_properties, Ffield_beginning)
8393 (Ffield_end, Fconstrain_to_field, Fline_beginning_position)
8394 (Fline_end_position, Fprevious_char, Fchar_after, Fchar_before)
8395 (general_insert_function)
8396 (Finsert_char, make_buffer_string, make_buffer_string_both)
8397 (update_buffer_properties, Fbuffer_substring)
8398 (Fbuffer_substring_no_properties, Fcompare_buffer_substrings)
8399 (Fsubst_char_in_region, check_translation)
8400 (Ftranslate_region_internal, save_restriction_restore, Fformat)
8401 (transpose_markers, Ftranspose_regions):
8402 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8403 (clip_to_bounds): Move to lisp.h as an inline function).
8404 (Fconstrain_to_field): Don't assume integers are nonnegative.
8405 (Fline_beginning_position, Fsave_excursion, Fsave_current_buffer):
8406 (Fsubst_char_in_region, Fsave_restriction):
8407 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8408 (Femacs_pid): Don't assume pid_t fits into fixnum.
8409 (lo_time): Use int, not EMACS_INT, when int suffices.
8410 (lisp_time_argument): Check for usec out of range.
8411 (Fencode_time): Don't assume fixnum fits in int.
8412 (Fuser_login_name, Fuser_full_name): Signal an error
8413 if a uid argument is out of range, rather than relying on
8415 (Fformat_time_string): Remove now-unnecessary check.
8416 lisp_time_argument checks for out-of-range usec now.
8417 Use ptrdiff_t, not size_t, where ptrdiff_t will do.
8418 * emacs.c (gdb_valbits, gdb_gctypebits): Now int, not EMACS_INT.
8419 (gdb_data_seg_bits): Now uintptr_t, not EMACS_INT.
8420 (PVEC_FLAG, gdb_array_mark_flag): Now ptrdiff_t, not EMACS_INT.
8421 (init_cmdargs, Fdump_emacs):
8422 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8423 (Fkill_emacs): Don't assume fixnum fits in int; instead, take just
8424 the bottom (typically) 32 bits of the fixnum.
8425 * eval.c (specpdl_size, call_debugger):
8426 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8427 (when_entered_debugger, Fbacktrace_debug):
8428 Don't assume fixnum can fit in int.
8429 (Fdefvaralias, Fdefvar): Do not attempt to compute the address of
8430 the object just before a buffer; this is not portable.
8431 (FletX, Flet, Funwind_protect, do_autoload, Feval, funcall_lambda)
8432 (grow_specpdl, unbind_to):
8433 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8434 (Fapply, apply_lambda): Don't assume ptrdiff_t can hold fixnum.
8435 (grow_specpdl): Simplify allocation by using xpalloc.
8436 (Fprog1, Fprog2): Don't assume list length fits in int. Simplify.
8437 * fileio.c (Ffind_file_name_handler, Fcopy_file, Frename_file)
8438 (Finsert_file_contents, Fwrite_region, Fdo_auto_save):
8439 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8440 (Ffind_file_name_handler, non_regular_inserted, Finsert_file_contents)
8442 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8443 (Fcopy_file, non_regular_nbytes, read_non_regular)
8444 (Finsert_file_contents):
8445 Use int, not EMACS_INT, where int is wide enough.
8446 (READ_BUF_SIZE): Verify that it fits in int.
8447 (Finsert_file_contents): Check that counts are in proper range,
8448 rather than assuming fixnums fit into ptrdiff_t etc.
8449 Don't assume fixnums fit into int.
8450 * floatfns.c (Fexpt): Avoid undefined signed * signed overflow.
8451 * fns.c (Fcompare_strings, Fstring_lessp, struct textprop_rec, concat)
8452 (string_char_byte_cache_charpos, string_char_byte_cache_bytepos)
8453 (string_char_to_byte, string_byte_to_char)
8454 (string_make_multibyte, string_to_multibyte)
8455 (string_make_unibyte, Fstring_as_unibyte, Fstring_as_multibyte)
8456 (Fstring_to_unibyte, Fsubstring, Fsubstring_no_properties)
8457 (substring_both, Fdelete, internal_equal, Ffillarray)
8458 (Fclear_string, mapcar1)
8459 (Fbase64_encode_region, Fbase64_encode_string, base64_encode_1)
8460 (Fbase64_decode_region, Fbase64_decode_string, base64_decode_1)
8461 (larger_vector, make_hash_table, maybe_resize_hash_table)
8462 (hash_lookup, hash_remove_from_table, hash_clear, sweep_weak_table)
8463 (Fmaphash, secure_hash):
8464 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8465 (concat): Check for string index and length overflow.
8466 (Fmapconcat): Don't assume fixnums fit into ptrdiff_t.
8468 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8469 (larger_vector): New API (vec, incr_min, size_max) replaces old
8470 one (vec, new_size, init). This catches size overflow.
8471 INIT was removed because it was always Qnil.
8472 All callers changed.
8473 (INDEX_SIZE_BOUND): New macro, which calculates more precisely
8474 the upper bound on a hash table index size.
8475 (make_hash_table, maybe_resize_hash_table): Use it.
8476 (secure_hash): Computer start_byte and end_byte only after
8477 they're known to be in ptrdiff_t range.
8478 * font.c (font_intern_prop, font_at, font_range, Ffont_shape_gstring)
8479 (Ffont_get_glyphs, Ffont_at):
8480 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8481 (font_style_to_value, font_prop_validate_style, font_expand_wildcards)
8482 (Flist_fonts, Fopen_font):
8483 Don't assume fixnum can fit in int.
8484 (check_gstring): Don't assume index can fit in int.
8485 (font_match_p): Check that fixnum is a character, not a nonnegative
8486 fixnum, since the later code needs to stuff it into an int.
8487 (font_find_for_lface): Use SAFE_ALLOCA_LISP, not alloca.
8488 (font_fill_lglyph_metrics): Use unsigned, not EMACS_INT, to avoid
8489 conversion overflow issues.
8490 (Fopen_font): Check for integer out of range.
8491 (Ffont_get_glyphs): Don't assume index can fit in int.
8492 * font.h: Adjust decls to match defn changes elsewhere.
8493 * fontset.c (reorder_font_vector): Redo score calculation to avoid
8495 (num_auto_fontsets, fontset_from_font): Use ptrdiff_t, not
8496 printmax_t, where ptrdiff_t is wide enough.
8497 (Finternal_char_font):
8498 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8499 * frame.c (Fset_mouse_position, Fset_mouse_pixel_position)
8500 (Fset_frame_height, Fset_frame_width, Fset_frame_size)
8501 (Fset_frame_position, x_set_frame_parameters)
8502 (x_set_line_spacing, x_set_border_width)
8503 (x_set_internal_border_width, x_set_alpha, x_figure_window_size):
8504 Check that fixnums are in proper range for system types.
8505 (frame_name_fnn_p, Fframe_parameter, Fmodify_frame_parameters):
8506 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8507 (Fmodify_frame_parameters): Don't assume fixnum fits in int.
8508 Use SAFE_ALLOCA_LISP, not alloca.
8509 * frame.h (struct frame): Use intptr_t, not EMACS_INT, where
8510 intptr_t is wide enough.
8511 * fringe.c (lookup_fringe_bitmap, get_logical_fringe_bitmap)
8512 (Fdefine_fringe_bitmap): Don't assume fixnum fits in int.
8513 (Ffringe_bitmaps_at_pos): Don't assume index fits in int.
8514 Check for fixnum out of range.
8515 * ftfont.c (ftfont_list): Don't assume index fits in int.
8516 Check that fixnums are in proper range for system types.
8517 (ftfont_shape_by_flt):
8518 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8519 * gnutls.c (emacs_gnutls_write, emacs_gnutls_read):
8520 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8521 (Fgnutls_error_fatalp, Fgnutls_error_string, Fgnutls_boot):
8522 Check that fixnums are in proper range for system types.
8523 * gnutls.h: Adjust decls to match defn changes elsewhere.
8524 * gtkutil.c (xg_dialog_run):
8525 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8526 (update_frame_tool_bar):
8527 Check that fixnums are in proper range for system types.
8528 * image.c (parse_image_spec): Redo count calculation to avoid overflow.
8529 (lookup_image): Check that fixnums are in range for system types.
8530 * indent.c (last_known_column, last_known_column_point):
8531 (current_column_bol_cache):
8532 (skip_invisible, current_column, check_display_width):
8533 (check_display_width, scan_for_column, current_column_1)
8534 (Findent_to, Fcurrent_indentation, position_indentation)
8535 (indented_beyond_p, Fmove_to_column, compute_motion):
8536 (Fcompute_motion, Fvertical_motion):
8537 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8538 (last_known_column_modified): Use EMACS_INT, not int.
8539 (check_display_width):
8541 Check that fixnums and floats are in proper range for system types.
8542 (compute_motion): Don't assume index or fixnum fits in int.
8543 (compute_motion, Fcompute_motion):
8544 Use int, not EMACS_INT, when it is wide enough.
8545 (vmotion): Omit local var start_hpos that is always 0; that way
8546 we don't need to worry about overflow in expressions involving it.
8547 * indent.h: Adjust decls to match defn changes elsewhere.
8549 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8550 Use int, not EMACS_INT, where int is wide enough.
8551 Remove unused members ovstring_chars_done and tab_offset;
8553 * insdel.c (move_gap, move_gap_both, gap_left, gap_right)
8554 (adjust_markers_for_delete, adjust_markers_for_insert, adjust_point)
8555 (adjust_markers_for_replace, make_gap_larger, make_gap_smaller)
8556 (make_gap, copy_text, insert, insert_and_inherit)
8557 (insert_before_markers, insert_before_markers_and_inherit)
8558 (insert_1, count_combining_before, count_combining_after)
8559 (insert_1_both, insert_from_string)
8560 (insert_from_string_before_markers, insert_from_string_1)
8561 (insert_from_gap, insert_from_buffer, insert_from_buffer_1)
8562 (adjust_after_replace, adjust_after_insert, replace_range)
8563 (replace_range_2, del_range, del_range_1, del_range_byte)
8564 (del_range_both, del_range_2, modify_region)
8565 (prepare_to_modify_buffer, signal_before_change)
8566 (signal_after_change, Fcombine_after_change_execute):
8567 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8568 * intervals.c (traverse_intervals, rotate_right, rotate_left)
8569 (balance_an_interval, split_interval_right, split_interval_left)
8570 (find_interval, next_interval, update_interval)
8571 (adjust_intervals_for_insertion, delete_node, delete_interval)
8572 (interval_deletion_adjustment, adjust_intervals_for_deletion)
8573 (static_offset_intervals, offset_intervals)
8574 (merge_interval_right, merge_interval_left, make_new_interval)
8575 (graft_intervals_into_buffer, temp_set_point_both)
8576 (temp_set_point, set_point, adjust_for_invis_intang)
8577 (set_point_both, move_if_not_intangible, get_property_and_range)
8578 (get_local_map, copy_intervals, copy_intervals_to_string)
8579 (compare_string_intervals, set_intervals_multibyte_1):
8580 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8581 * intervals.h: Adjust decls to match defn changes elsewhere.
8583 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8584 * keyboard.c (this_command_key_count, this_single_command_key_start)
8585 (before_command_key_count, before_command_echo_length, echo_now)
8586 (echo_length, recursive_edit_1, Frecursive_edit, Ftrack_mouse)
8587 (command_loop_1, safe_run_hooks, read_char, timer_check_2)
8588 (menu_item_eval_property, read_key_sequence, Fread_key_sequence)
8589 (Fread_key_sequence_vector, Fexecute_extended_command, Fsuspend_emacs):
8590 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8591 (last_non_minibuf_size, last_point_position, echo_truncate)
8592 (command_loop_1, adjust_point_for_property, read_char, gen_help_event)
8593 (make_lispy_position, make_lispy_event, parse_modifiers_uncached)
8594 (parse_modifiers, modify_event_symbol, Fexecute_extended_command)
8595 (stuff_buffered_input):
8596 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8597 (last_auto_save, command_loop_1, read_char):
8598 Use EMACS_INT, not int, to avoid integer overflow.
8599 (record_char): Avoid overflow in total_keys computation.
8600 (parse_modifiers_uncached): Redo index calculation to avoid overflow.
8601 * keyboard.h: Adjust decls to match defn changes elsewhere.
8602 * keymap.c (Fdefine_key, Fcurrent_active_maps, accessible_keymaps_1)
8603 (Fkey_description, Fdescribe_vector, Flookup_key):
8604 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8605 (click_position): New function, to check that positions are in range.
8606 (Fcurrent_active_maps):
8608 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8609 (Faccessible_keymaps, Fkey_description):
8610 (preferred_sequence_p):
8611 Don't assume fixnum can fit into int.
8612 (Fkey_description): Use SAFE_ALLOCA_LISP, not alloca.
8613 Check for integer overflow in size calculations.
8614 (Ftext_char_description): Use CHECK_CHARACTER, not CHECK_NUMBER, to
8615 avoid mishandling large integers.
8616 * lisp.h: Adjust decls to match defn changes elsewhere.
8617 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, struct Lisp_String)
8618 (struct vectorlike_header, struct Lisp_Subr, struct Lisp_Hash_Table)
8619 (struct Lisp_Marker):
8620 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8621 (clip_to_bounds): Now an inline function, moved here from editfns.c.
8622 (GLYPH_CODE_P): Check for overflow in system types, subsuming the
8623 need for GLYPH_CODE_CHAR_VALID_P and doing proper checking ourselves.
8624 All callers changed.
8625 (GLYPH_CODE_CHAR, GLYPH_CODE_FACE):
8626 Assume the arg has valid form, since it always does.
8627 (TYPE_RANGED_INTEGERP): Avoid bug when checking against a wide
8628 unsigned integer system type.
8629 (CHECK_RANGED_INTEGER, CHECK_TYPE_RANGED_INTEGER): New macros.
8630 (struct catchtag, specpdl_size, SPECPDL_INDEX, USE_SAFE_ALLOCA):
8631 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8632 (struct catchtag): Use EMACS_INT, not int, since it may be a fixnum.
8633 (duration_to_sec_usec): New decl.
8634 * lread.c (read_from_string_index, read_from_string_index_byte)
8635 (read_from_string_limit, readchar, unreadchar, openp)
8636 (read_internal_start, read1, oblookup):
8637 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8638 (Fload, readevalloop, Feval_buffer, Feval_region):
8639 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8640 (openp): Check for out-of-range argument to 'access'.
8641 (read1): Use int, not EMACS_INT, where int is wide enough.
8642 Don't assume fixnum fits into int.
8643 Fix off-by-one error that can read outside a buffer.
8644 (read_filtered_event): Use duration_to_sec_usec
8645 to do proper overflow checking on durations.
8646 * macros.c (Fstart_kbd_macro): Use xpalloc to check for overflow
8647 in size calculation.
8648 (Fexecute_kbd_macro):
8649 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8650 * marker.c (cached_charpos, cached_bytepos, CONSIDER)
8651 (byte_char_debug_check, buf_charpos_to_bytepos, verify_bytepos)
8652 (buf_bytepos_to_charpos, Fset_marker, set_marker_restricted)
8653 (set_marker_both, set_marker_restricted_both, marker_position)
8654 (marker_byte_position, Fbuffer_has_markers_at):
8655 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8656 (Fset_marker, set_marker_restricted): Don't assume fixnum fits in int.
8657 * menu.c (ensure_menu_items): Rename from grow_menu_items.
8658 It now merely ensures that the menu is large enough, without
8659 necessarily growing it, as this avoids some integer overflow issues.
8660 All callers changed.
8661 (keymap_panes, parse_single_submenu, Fx_popup_menu):
8662 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8663 (parse_single_submenu, Fx_popup_menu): Don't assume fixnum fits in int.
8664 Use SAFE_ALLOCA_LISP, not alloca.
8665 (find_and_return_menu_selection): Avoid unnecessary casts of pointers
8666 to EMACS_INT. Check that fixnums are in proper range for system types.
8667 * minibuf.c (minibuf_prompt_width, string_to_object)
8668 (Fminibuffer_contents, Fminibuffer_contents_no_properties)
8669 (Fminibuffer_completion_contents, Ftry_completion, Fall_completions):
8670 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8671 (get_minibuffer, read_minibuf_unwind):
8672 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8673 (read_minibuf): Omit unnecessary arg BACKUP_N, which is always nil;
8674 this simplifies overflow checking. All callers changed.
8675 (read_minibuf, Fread_buffer, Ftry_completion, Fall_completions)
8677 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8678 * nsfns.m (check_ns_display_info): Don't assume fixnum fits in long.
8679 (x_set_menu_bar_lines, x_set_tool_bar_lines, Fx_create_frame):
8680 Check that fixnums are in proper range for system types.
8681 (Fx_create_frame, Fx_show_tip):
8682 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8683 * nsfont.m (ns_findfonts, nsfont_list_family):
8684 Don't assume fixnum fits in long.
8685 * nsmenu.m (ns_update_menubar, ns_menu_show, ns_popup_dialog):
8686 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8687 (ns_update_menubar): Use intptr_t, not EMACS_INT, when intptr_t is
8689 * nsselect.m (ns_get_local_selection, clean_local_selection_data):
8690 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8691 * print.c (print_buffer_size, print_buffer_pos, print_buffer_pos_byte)
8692 (PRINTDECLARE, PRINTPREPARE):
8693 (strout, print_string):
8694 (print, print_preprocess, print_check_string_charset_prop)
8696 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8698 (temp_output_buffer_setup, Fprin1_to_string, print_object):
8699 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8700 (PRINTPREPARE): Use int, not ptrdiff_t, where int is wide enough.
8701 (printchar, strout): Use xpalloc to catch size calculation overflow.
8702 (Fexternal_debugging_output): Don't overflow EMACS_INT->int conversion.
8703 (print_error_message): Use SAFE_ALLOCA, not alloca.
8704 (print_object): Use int, not EMACS_INT, where int is wide enough.
8705 (print_depth, new_backquote_output, print_number_index):
8706 Use ptrdiff_t, not int, where int might not be wide enough.
8707 * process.c (Fdelete_process): Don't assume pid fits into EMACS_INT.
8708 (Fset_process_window_size, Fformat_network_address)
8709 (get_lisp_to_sockaddr_size, set_socket_option, Fmake_network_process)
8711 Check that fixnums are in proper range for system types.
8712 (Fsignal_process): Simplify by avoiding a goto.
8713 Check for process-ids out of pid_t range rather than relying on
8715 (process_tick, update_tick): Use EMACS_INT, not int.
8716 (Fformat_network_address, read_process_output, send_process)
8717 (Fprocess_send_region, status_notify):
8718 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8719 (Fformat_network_address, Fmake_serial_process, Fmake_network_process)
8720 (wait_reading_process_output, read_process_output, exec_sentinel):
8721 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8722 (conv_lisp_to_sockaddr): Don't assume fixnums fit into int.
8723 (Faccept_process_output): Use duration_to_sec_usec to do proper
8724 overflow checking on durations.
8725 (emacs_get_tty_pgrp, Fprocess_running_child_p, process_send_signal):
8726 Don't assume pid_t fits in int.
8727 * process.h (struct Lisp_Process): Members tick and update_tick
8728 are now of type EMACS_INT, not int.
8729 * puresize.h (PURESIZE_RATIO): Shrink this to 8/6 on 32-bit hosts
8730 configured --with-wide-int.
8731 * scroll.c (calculate_scrolling, calculate_direct_scrolling)
8732 (line_ins_del): Use int, not EMACS_INT, where int is wide enough.
8733 * search.c (looking_at_1, string_match_1):
8734 (fast_string_match, fast_c_string_match_ignore_case)
8735 (fast_string_match_ignore_case, fast_looking_at, scan_buffer)
8736 (scan_newline, find_before_next_newline, search_command)
8737 (trivial_regexp_p, search_buffer, simple_search, boyer_moore)
8738 (set_search_regs, wordify):
8741 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8742 (string_match_1, search_buffer, set_search_regs):
8744 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8745 (wordify): Check for overflow in size calculation.
8746 (Freplace_match): Avoid potential buffer overflow in search_regs.start.
8747 (Fset_match_data): Don't assume fixnum fits in ptrdiff_t.
8748 Check that fixnums are in proper range for system types.
8749 * sound.c (struct sound_device)
8750 (wav_play, au_play, vox_write, alsa_period_size, alsa_write):
8751 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8752 (Fplay_sound_internal):
8753 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8754 * syntax.c (struct lisp_parse_state, find_start_modiff)
8755 (Finternal_describe_syntax_value, scan_lists, scan_sexps_forward):
8756 (Fparse_partial_sexp):
8757 Don't assume fixnums can fit in int.
8758 (struct lisp_parse_state, find_start_pos, find_start_value)
8759 (find_start_value_byte, find_start_begv)
8760 (update_syntax_table, char_quoted, dec_bytepos)
8761 (find_defun_start, prev_char_comend_first, back_comment):
8762 (scan_words, skip_chars, skip_syntaxes, forw_comment, Fforward_comment)
8763 (scan_lists, Fbackward_prefix_chars, scan_sexps_forward):
8764 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8765 (Finternal_describe_syntax_value): Check that match_lisp is a
8766 character, not an integer, since the code stuffs it into int.
8767 (scan_words, scan_sexps_forward):
8768 Check that fixnums are in proper range for system types.
8770 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8771 (scan_sexps_forward):
8772 Use CHARACTERP, not INTEGERP, since the value must fit into int.
8773 (Fparse_partial_sexp): Fix doc; element 8 is not ignored.
8774 * syntax.h: Adjust decls to match defn changes elsewhere.
8775 (struct gl_state_s):
8776 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8777 (SETUP_SYNTAX_TABLE_FOR_OBJECT): Use PTRDIFF_MAX, not
8778 MOST_POSITIVE_FIXNUM.
8779 * sysdep.c (wait_for_termination_1, wait_for_termination)
8780 (interruptible_wait_for_termination, mkdir):
8781 Don't assume pid_t fits in int; on 64-bit AIX pid_t is 64-bit.
8782 (emacs_read, emacs_write):
8783 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8784 (system_process_attributes): Don't assume uid_t, gid_t, EMACS_INT,
8785 and double all fit in int.
8786 * term.c (set_tty_color_mode):
8787 Check that fixnums are in proper range for system types.
8788 * termhooks.h (struct input_event):
8789 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8790 * textprop.c (validate_interval_range, interval_of)
8791 (Fadd_text_properties, set_text_properties_1)
8792 (Fremove_text_properties, Fremove_list_of_text_properties)
8793 (Ftext_property_any, Ftext_property_not_all)
8794 (copy_text_properties, text_property_list, extend_property_ranges)
8795 (verify_interval_modification):
8796 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8797 (Fnext_single_char_property_change)
8798 (Fprevious_single_char_property_change):
8799 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8800 (copy_text_properties):
8801 Check for integer overflow in index calculation.
8802 * undo.c (last_boundary_position, record_point, record_insert)
8803 (record_delete, record_marker_adjustment, record_change)
8804 (record_property_change):
8805 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8806 (truncate_undo_list, Fprimitive_undo): Don't assume fixnum fits in int.
8807 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8808 * w32fns.c (Fx_create_frame, x_create_tip_frame, Fx_show_tip)
8809 (Fx_hide_tip, Fx_file_dialog):
8810 * w32menu.c (set_frame_menubar):
8811 Use ptrdiff_t, not int, for consistency with rest of code.
8812 * window.c (window_scroll_preserve_hpos, window_scroll_preserve_vpos)
8813 (select_window, Fdelete_other_windows_internal)
8814 (window_scroll_pixel_based, window_scroll_line_based)
8815 (Frecenter, Fset_window_configuration):
8816 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8817 (Fset_window_hscroll, run_window_configuration_change_hook)
8818 (set_window_buffer, temp_output_buffer_show, scroll_command)
8819 (Fscroll_other_window, Frecenter):
8820 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8821 (Fwindow_line_height, window_scroll, Fscroll_left, Fscroll_right):
8822 Don't assume fixnum fits in int.
8823 (Fset_window_scroll_bars):
8824 Check that fixnums are in proper range for system types.
8825 * xdisp.c (help_echo_pos, pos_visible_p, string_pos_nchars_ahead)
8826 (string_pos, c_string_pos, number_of_chars, init_iterator)
8827 (in_ellipses_for_invisible_text_p, init_from_display_pos)
8828 (compute_stop_pos, next_overlay_change, compute_display_string_pos)
8829 (compute_display_string_end, handle_face_prop)
8830 (face_before_or_after_it_pos, handle_invisible_prop)
8831 (handle_display_prop, handle_display_spec, handle_single_display_spec)
8832 (display_prop_intangible_p, string_buffer_position_lim)
8833 (string_buffer_position, handle_composition_prop, load_overlay_strings)
8834 (get_overlay_strings_1, get_overlay_strings)
8835 (iterate_out_of_display_property, forward_to_next_line_start)
8836 (back_to_previous_visible_line_start, reseat, reseat_to_string)
8837 (get_next_display_element, set_iterator_to_next)
8838 (get_visually_first_element, compute_stop_pos_backwards)
8839 (handle_stop_backwards, next_element_from_buffer)
8840 (move_it_in_display_line_to, move_it_in_display_line)
8841 (move_it_to, move_it_vertically_backward, move_it_by_lines)
8842 (add_to_log, message_dolog, message_log_check_duplicate)
8843 (message2, message2_nolog, message3, message3_nolog
8844 (with_echo_area_buffer, display_echo_area_1, resize_mini_window_1)
8845 (current_message_1, truncate_echo_area, truncate_message_1)
8846 (set_message, set_message_1, store_mode_line_noprop)
8847 (hscroll_window_tree, debug_delta, debug_delta_bytes, debug_end_vpos)
8848 (text_outside_line_unchanged_p, check_point_in_composition)
8849 (reconsider_clip_changes)
8850 (redisplay_internal, set_cursor_from_row, try_scrolling)
8851 (try_cursor_movement, set_vertical_scroll_bar, redisplay_window)
8852 (redisplay_window, find_last_unchanged_at_beg_row)
8853 (find_first_unchanged_at_end_row, row_containing_pos, try_window_id)
8854 (trailing_whitespace_p, find_row_edges, display_line)
8855 (RECORD_MAX_MIN_POS, Fcurrent_bidi_paragraph_direction)
8856 (display_mode_element, store_mode_line_string)
8857 (pint2str, pint2hrstr, decode_mode_spec)
8858 (display_count_lines, display_string, draw_glyphs)
8859 (x_produce_glyphs, x_insert_glyphs)
8860 (rows_from_pos_range, mouse_face_from_buffer_pos)
8861 (fast_find_string_pos, mouse_face_from_string_pos)
8862 (note_mode_line_or_margin_highlight, note_mouse_highlight):
8863 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8864 (safe_call, init_from_display_pos, handle_fontified_prop)
8865 (handle_single_display_spec, load_overlay_strings)
8866 (with_echo_area_buffer, setup_echo_area_for_printing)
8867 (display_echo_area, echo_area_display)
8868 (x_consider_frame_title, prepare_menu_bars, update_menu_bar)
8869 (update_tool_bar, hscroll_window_tree, redisplay_internal)
8870 (redisplay_window, dump_glyph_row, display_mode_line)
8871 (Fformat_mode_line, decode_mode_spec, on_hot_spot_p):
8872 (handle_display_spec, display_prop_string_p):
8873 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8874 (handle_single_display_spec, build_desired_tool_bar_string)
8875 (redisplay_tool_bar, scroll_window_tree, Fdump_glyph_matrix)
8876 (get_specified_cursor_type):
8877 Check that fixnums are in proper range for system types.
8878 (struct overlay_entry, resize_mini_window, Fdump_glyph_row)
8879 (Flookup_image_map):
8880 Don't assume fixnums fit in int.
8881 (compare_overlay_entries):
8882 Avoid mishandling comparisons due to subtraction overflow.
8883 (load_overlay_strings): Use SAFE_NALLOCA, not alloca.
8884 (last_escape_glyph_face_id, last_glyphless_glyph_face_id):
8885 (handle_tool_bar_click):
8886 Use int, not unsigned, since we prefer signed and the signedness
8887 doesn't matter here.
8888 (get_next_display_element, next_element_from_display_vector):
8889 Use int, not EMACS_INT, when int is wide enough.
8890 (start_hourglass): Use duration_to_sec_usec to do proper
8891 overflow checking on durations.
8892 * xfaces.c (Fbitmap_spec_p):
8893 Check that fixnums are in proper range for system types.
8894 (compare_fonts_by_sort_order):
8895 Avoid mishandling comparisons due to subtraction overflow.
8896 (Fx_family_fonts, realize_basic_faces):
8897 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8899 Don't assume fixnum fits in int.
8900 Use SAFE_ALLOCA_LISP, not alloca.
8901 (merge_face_heights): Remove unnecessary cast to EMACS_INT.
8902 (Finternal_make_lisp_face): Don't allocate more than MAX_FACE_ID.
8903 (face_at_buffer_position, face_for_overlay_string)
8904 (face_at_string_position):
8905 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8906 (merge_faces): Use int, not EMACS_INT, where int is wide enough.
8907 * xfns.c (x_set_menu_bar_lines, x_set_tool_bar_lines, x_icon_verify)
8909 Check that fixnums are in proper range for system types.
8910 (Fx_create_frame, x_create_tip_frame, Fx_show_tip)
8911 (Fx_hide_tip, Fx_file_dialog, Fx_select_font):
8912 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8913 (Fx_change_window_property): Don't assume fixnums fit in int.
8914 * xfont.c (xfont_chars_supported):
8915 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8916 * xmenu.c (Fx_popup_dialog, set_frame_menubar)
8917 (create_and_show_popup_menu, create_and_show_dialog, xmenu_show):
8918 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8919 * xml.c (parse_region):
8920 * xrdb.c (magic_file_p):
8921 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8922 * xselect.c (TRACE1): Don't assume pid_t promotes to int.
8923 (x_get_local_selection, x_reply_selection_request)
8924 (x_handle_selection_request, wait_for_property_change):
8925 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8926 (selection_data_to_lisp_data): Use short, not EMACS_INT, where
8927 short is wide enough.
8928 (x_send_client_event): Don't assume fixnum fits in int.
8929 * xterm.c (x_x_to_emacs_modifiers):
8930 Don't assume EMACS_INT overflows nicely into int.
8931 (x_emacs_to_x_modifiers): Use EMACS_INT, not int, because values
8933 (handle_one_xevent): NATNUMP can eval its arg twice.
8934 (x_connection_closed):
8935 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8936 * xterm.h: Adjust decls to match defn changes elsewhere.
8937 (struct scroll_bar): Use struct vectorlike_header
8938 rather than rolling our own approximation.
8939 (SCROLL_BAR_VEC_SIZE): Remove; not used.
8941 2012-05-25 Glenn Morris <rgm@gnu.org>
8943 * lisp.mk (lisp): Update for more files being compiled now.
8945 2012-05-25 Stefan Monnier <monnier@iro.umontreal.ca>
8947 * lread.c: Remove `read_pure' which makes no difference.
8948 (read_pure): Remove var.
8949 (unreadpure): Remove function.
8950 (readevalloop): Don't call read_list with -1 flag.
8951 (read1, read_vector): Don't test read_pure any more.
8952 (read_list): Simplify.
8954 * fileio.c, character.h: Minor style tweaks.
8956 2012-05-24 Dmitry Antipov <dmantipov@yandex.ru>
8958 * window.h (clip_changed): Remove useless declaration.
8960 2012-05-22 Juanma Barranquero <lekktu@gmail.com>
8962 * makefile.w32-in: Follow-up to 2012-05-22T16:20:27Z!eggert@cs.ucla.edu.
8963 (TAGS, TAGS-gmake, CONFIG_H): Remove further references to m/intel386.h.
8965 2012-05-22 Paul Eggert <eggert@cs.ucla.edu>
8968 This directory predates autoconf and is no longer needed nowadays.
8969 Move its few remaining bits of functionality to where they're needed.
8970 * m/README, m/alpha.h, m/amdx86-64.h, m/ia64.h, m/ibmrs6000.h:
8971 * m/ibms390x.h, m/intel386.h, m/m68k.h, m/macppc.h, m/sparc.h:
8972 * m/template.h: Remove.
8973 * Makefile.in (M_FILE): Remove. All uses removed.
8974 * alloc.c (POINTERS_MIGHT_HIDE_IN_OBJECTS):
8975 * lisp.h (USE_LSB_TAG):
8976 * mem-limits.h (EXCEEDS_LISP_PTR):
8977 Use VAL_MAX, not VALBITS, in #if.
8978 * lisp.h (EMACS_INT_MAX): New macro, useful in #if.
8979 (EMACS_UINT): Define unconditionally now.
8980 (BITS_PER_CHAR, BITS_PER_SHORT, BITS_PER_INT, BITS_PER_LONG)
8981 (BITS_PER_EMACS_INT): New constants, replacing
8982 what used to be in config.h, but not useful in #if.
8983 (GCTYPEBITS, VALBITS): Define unconditionally, since m/* files don't
8984 define them any more.
8985 (VAL_MAX): New macro.
8987 * puresize.h (PURESIZE_RATIO): Use EMACS_INT_MAX, not
8988 BITS_PER_EMACS_INT, in #if.
8989 * s/aix4-2.h (BROKEN_FIONREAD, BROKEN_SIGAIO, BROKEN_SIGPTY)
8990 (BROKEN_SIGPOLL): Move here from m/ibmrs6000.h, which was removed.
8991 * s/gnu-linux.h (ULIMIT_BREAK_VALUE) [__i386__]:
8992 * s/ms-w32.h (DATA_START):
8993 Move here from removed file m/intel386.h.
8994 * s/gnu.h (NLIST_STRUCT): Remove undef; 'configure' does this.
8995 * s/irix6-5.h (_LP64): Remove; lisp.h no longer needs this.
8997 2012-05-21 Paul Eggert <eggert@cs.ucla.edu>
8999 Assume C89 or later.
9000 * alloc.c, buffer.c, lisp.h: Replace POINTER_TYPE with void.
9001 * alloc.c (overrun_check_malloc, overrun_check_realloc, xmalloc)
9003 * buffer.c (mmap_free_1, mmap_enlarge): Omit needless casts.
9004 * editfns.c, fns.c, gmalloc.c, insdel.c, sysdep.c, termcap.c (NULL):
9005 * textprop.c, tparam.c (NULL): Remove.
9006 * ralloc.c, vm-limit.c (POINTER): Assume void * works.
9007 * regex.c (SIGN_EXTEND_CHAR): Assume signed char works.
9008 * regex.h (_RE_ARGS): Remove. All uses rewritten to use prototypes.
9009 * unexelf.c (ElfBitsW): Assume c89 preprocessor or better.
9010 * xterm.c (input_signal_count): Assume volatile works.
9012 2012-05-21 Ken Brown <kbrown@cornell.edu>
9014 * xgselect.c (xg_select): Fix first argument in call to 'select'
9017 2012-05-20 Ken Brown <kbrown@cornell.edu>
9019 * gmalloc.c (_free_internal_nolock, _realloc_internal_nolock)
9020 [CYGWIN]: Cast ptr to (char *) before comparing to _heapbase.
9022 2012-05-19 Ken Brown <kbrown@cornell.edu>
9024 * xfns.c (x_in_use): Remove `static' qualifier.
9025 * xterm.h (x_in_use): Declare.
9026 * xgselect.c: Include xterm.h.
9027 (xg_select): Test `x_in_use' instead of `inhibit_window_system'
9028 and `display_arg' (bug#9754).
9030 2012-05-19 Paul Eggert <eggert@cs.ucla.edu>
9032 * s/ms-w32.h (HAVE_GETDOMAINNAME): Remove; not needed.
9034 * m/vax.h: Remove; no longer needed since HAVE_FTIME is being removed.
9035 * s/ms-w32.h (HAVE_FTIME): Remove; not needed.
9037 2012-05-18 Eli Zaretskii <eliz@gnu.org>
9039 Fix compilation with -DGLYPH_DEBUG=1 on MS-Windows.
9041 * w32term.c [GLYPH_DEBUG]: Add prototype for x_check_font.
9042 (x_check_font) [GLYPH_DEBUG]: New function, copied from xterm.c.
9044 * w32fns.c (unwind_create_frame) [GLYPH_DEBUG]: Fix broken
9045 reference to image_cache->refcount.
9046 (x_create_tip_frame): Fix broken use of FRAME_IMAGE_CACHE.
9048 2012-05-17 Juri Linkov <juri@jurta.org>
9050 * search.c (Fword_search_regexp, Fword_search_backward)
9051 (Fword_search_forward, Fword_search_backward_lax)
9052 (Fword_search_forward_lax): Move functions to isearch.el
9053 (bug#10145, bug#11381).
9055 2012-05-16 Paul Eggert <eggert@cs.ucla.edu>
9057 * xgselect.c (xg_select): Just invoke 'select' if -nw (Bug#9754).
9059 2012-05-15 Stefan Monnier <monnier@iro.umontreal.ca>
9061 * lread.c (init_obarray): Declare Qt and Qnil as special.
9063 2012-05-14 Glenn Morris <rgm@gnu.org>
9065 * nsterm.m (ns_init_paths): Fix typo ("libexec" not "lib-exec").
9066 Put "libexec" before "bin", for the sake of init_callproc_1.
9068 2012-05-14 Paul Eggert <eggert@cs.ucla.edu>
9070 * keyboard.c (kbd_buffer_get_event) [!HAVE_DBUS]: Omit unused local.
9072 * unexaix.c: Port to more-recent AIX compilers.
9073 (report_error, report_error_1, make_hdr, copy_sym)
9074 (mark_x, adjust_lnnoptrs, unrelocate_symbols):
9075 Make arguments const char *, not char *, to avoid violations of C
9076 standard and to fix some AIX warnings reported by Gilles Pion.
9078 2012-05-14 Eli Zaretskii <eliz@gnu.org>
9080 * xdisp.c (handle_stop): Don't call get_overlay_strings_1 if we
9081 already have overlays loaded.
9082 (handle_single_display_spec): Before returning without displaying
9083 fringe bitmap, synchronize the bidi iterator with the main display
9084 iterator, by calling iterate_out_of_display_property.
9085 (iterate_out_of_display_property): Detect buffer iteration by
9086 testing that it->string is a Lisp string.
9087 (get_next_display_element): When the current object is exhausted,
9088 and there's something on it->stack, call set_iterator_to_next to
9089 proceed with what's on the stack, instead of returning zero.
9090 (set_iterator_to_next): If called at the end of a Lisp string,
9091 proceed to consider_string_end without incrementing string
9092 position. Don't increment display vector index past the end of
9093 the display vector. (Bug#11417)
9094 (pos_visible_p): Don't report a position visible when move_it_to
9095 stopped at the last line of window, which happens to be scanned
9096 backwards by the bidi iteration. (Bug#11464)
9098 2012-05-14 Eli Zaretskii <eliz@gnu.org>
9100 * xdisp.c (handle_single_display_spec): Return 1 for left-margin
9101 and right-margin display specs even if the spec is invalid or we
9102 are on a TTY, and thus unable to display on the fringes.
9103 That's because the text with the property will not be displayed anyway,
9104 so we need to signal to the caller that this is a "replacing"
9105 display spec. This fixes display when the spec is invalid or we
9108 2012-05-14 Paul Eggert <eggert@cs.ucla.edu>
9110 * unexaix.c (make_hdr): Fix typo in prototype.
9111 This bug broke the build on AIX. Problem reported by Gilles Pion.
9113 2012-05-14 Michael Albinus <michael.albinus@gmx.de>
9115 * keyboard.c (kbd_buffer_get_event): Read special events also in
9116 batch mode. (Bug#11415)
9118 2012-05-12 Glenn Morris <rgm@gnu.org>
9120 * ns.mk: Update for ns_appbindir no longer having trailing "/".
9122 2012-05-12 Eli Zaretskii <eliz@gnu.org>
9124 * lisp.mk (lisp): Add newcomment.elc.
9126 2012-05-12 Glenn Morris <rgm@gnu.org>
9128 * Makefile.in (MKDIR_P): New, set by configure.
9129 * ns.mk (${ns_appdir}, ${ns_appbindir}Emacs): Use $MKDIR_P.
9131 2012-05-11 Paul Eggert <eggert@cs.ucla.edu>
9133 Remove unused function hourglass_started.
9134 * dispextern.h (hourglass_started):
9135 * w32fns.c (hourglass_started):
9136 * xdisp.c (hourglass_started): Remove.
9138 2012-05-10 Juanma Barranquero <lekktu@gmail.com>
9140 * makefile.w32-in ($(BLD)/gmalloc.$(O), $(BLD)/w32menu.$(O)):
9141 Update dependencies.
9143 2012-05-10 Paul Eggert <eggert@cs.ucla.edu>
9145 * xgselect.c (xg_select): Put maxfds+1 into a var.
9146 This is slightly clearer, and pacifies Ubuntu 12.04 gcc.
9148 * sound.c (DEFAULT_ALSA_SOUND_DEVICE): Define only if HAVE_ALSA.
9150 2012-05-10 Dave Abrahams <dave@boostpro.com>
9152 * filelock.c (syms_of_filelock): New boolean create-lockfiles.
9153 (lock_file): If create_lockfiles is 0, do nothing. (Bug#11227)
9155 2012-05-09 Michael Albinus <michael.albinus@gmx.de>
9157 * dbusbind.c (xd_registered_buses): New internal Lisp object.
9158 Rename all occurences of Vdbus_registered_buses to xd_registered_buses.
9159 (syms_of_dbusbind): Remove declaration of Vdbus_registered_buses.
9160 Initialize xd_registered_buses.
9162 2012-05-09 Paul Eggert <eggert@cs.ucla.edu>
9164 Untag more efficiently if USE_LSB_TAG.
9165 This is based on a proposal by YAMAMOTO Mitsuharu in
9166 <http://lists.gnu.org/archive/html/emacs-devel/2008-01/msg01876.html>.
9167 For an admittedly artificial (nth 8000 longlist) benchmark on
9168 Fedora 15 x86-64, this yields a 25% CPU speedup. Also, it shrinks
9169 Emacs's overall text size by 1%.
9170 * lisp.h (XUNTAG): New macro.
9171 (XCONS, XVECTOR, XSTRING, XSYMBOL, XFLOAT, XMISC, XPROCESS, XWINDOW)
9172 (XTERMINAL, XSUBR, XBUFFER, XCHAR_TABLE, XSUB_CHAR_TABLE, XBOOL_VECTOR)
9173 (XSETTYPED_PSEUDOVECTOR, XHASH_TABLE, TYPED_PSEUDOVECTORP): Use it.
9174 * eval.c (Fautoload):
9175 * font.h (XFONT_SPEC, XFONT_ENTITY, XFONT_OBJECT):
9176 * frame.h (XFRAME): Use XUNTAG.
9178 Port recent dbusbind.c changes to 32-bit --with-wide-int.
9179 * dbusbind.c (xd_append_arg, xd_retrieve_arg, Fdbus_message_internal):
9180 Remove unportable assumptions about print widths of types like
9182 (xd_get_connection_address, Fdbus_init_bus): Cast Emacs integer to
9183 intptr_t when converting between pointer and integer, to avoid GCC
9184 warnings about wrong width.
9186 2012-05-09 Eli Zaretskii <eliz@gnu.org>
9188 * w32proc.c (new_child): Force Windows to reserve only 64KB of
9189 stack for each reader_thread, instead of defaulting to 8MB
9190 determined by the linker. This avoids failures in creating
9191 subprocesses on Windows 7, see the discussion in this thread:
9192 http://lists.gnu.org/archive/html/emacs-devel/2012-03/msg00119.html.
9194 2012-05-07 Jérémy Compostella <jeremy.compostella@gmail.com>
9196 Fix up display of the *Minibuf-0* buffer in the mini window.
9197 * keyboard.c (read_char): Don't clear the echo area if there's no
9199 * xdisp.c (redisplay_internal): Redisplay the mini window (with the
9200 contents of *Minibuf-0*) if there's no message displayed in its stead.
9202 2012-05-07 Michael Albinus <michael.albinus@gmx.de>
9204 * dbusbind.c (XD_DEBUG_MESSAGE): Don't print message twice in
9207 2012-05-06 Chong Yidong <cyd@gnu.org>
9209 * lisp.mk (lisp): Update.
9211 2012-05-05 Jim Meyering <meyering@redhat.com>
9213 * w32font.c (fill_in_logfont): NUL-terminate a string (Bug#11372).
9215 2012-05-04 Stefan Monnier <monnier@iro.umontreal.ca>
9217 * data.c (PUT_ERROR): New macro.
9218 (syms_of_data): Use it. Add new error type `user-error'.
9219 * undo.c (user_error): New function.
9220 (Fprimitive_undo): Use it.
9221 * print.c (print_error_message): Adjust print style for `user-error'.
9222 * keyboard.c (user_error): New function.
9223 (Fexit_recursive_edit, Fabort_recursive_edit): Use it.
9225 2012-05-03 Paul Eggert <eggert@cs.ucla.edu>
9227 Do not limit current-time-string to years 1000..9999.
9228 * editfns.c (TM_YEAR_IN_ASCTIME_RANGE): Remove.
9229 (Fcurrent_time_string): Support any year that is supported by the
9230 underlying localtime representation. Don't use asctime, as it
9231 has undefined behavior for years outside the range -999..9999.
9233 2012-05-02 Paul Eggert <eggert@cs.ucla.edu>
9235 Fix race conditions involving setenv, gmtime, localtime, asctime.
9236 Without this fix, interrupts could mess up code that uses these
9237 nonreentrant functions, since setting TZ invalidates existing
9238 tm_zone or tzname values, and since most of these functions return
9239 pointers to static storage.
9240 * editfns.c (format_time_string, Fdecode_time, Fencode_time)
9241 (Fcurrent_time_string, Fcurrent_time_zone, Fset_time_zone_rule):
9242 Grow the critical sections to include not just invoking
9243 localtime/gmtime, but also accessing these functions' results
9244 including their tm_zone values if any, and any related TZ setting.
9245 (format_time_string): Last arg is now struct tm *, not struct tm **,
9246 so that the struct tm is saved in the critical section.
9247 All callers changed. Simplify allocation of initial buffer, partly
9248 motivated by the fact that memory allocation needs to be outside
9249 the critical section.
9251 2012-05-02 Dmitry Antipov <dmantipov@yandex.ru>
9253 * intervals.c (adjust_intervals_for_insertion): Initialize `newi'
9254 with RESET_INTERVAL.
9256 * buffer.c (Fget_buffer_create, Fmake_indirect_buffer):
9257 Remove duplicated buffer name initialization.
9259 2012-05-02 Jim Meyering <jim@meyering.net>
9261 * xterm.c (x_term_init): Use memcpy instead of strncpy (Bug#11373).
9263 * xfns.c (x_window): Use xstrdup (Bug#11375).
9265 2012-05-02 Eli Zaretskii <eliz@gnu.org>
9267 * xdisp.c (pos_visible_p): If already at a newline from the
9268 display string before the 'while' loop, don't walk back the glyphs
9269 from it3.glyph_row. Solves assertion violation when the display
9270 string begins with a newline (egg.el). (Bug#11367)
9272 2012-05-01 Stefan Monnier <monnier@iro.umontreal.ca>
9274 * keyboard.c (Fexecute_extended_command, Vsuggest_key_bindings):
9277 2012-05-01 Glenn Morris <rgm@gnu.org>
9279 * syssignal.h: Remove reference to BROKEN_SIGINFO (last used in
9280 s/ptx4.h), BROKEN_SIGTSTP (last used in m/ustation.h, m/dpx2.h),
9281 and BROKEN_SIGURG (was in s/gnu-linux.h prior to 2008-02-10).
9282 All were removed before 23.1.
9284 * dispnew.c: Remove HAVE_LIBNCURSES test;
9285 it is always true on relevant platforms.
9287 * Makefile.in (LD_SWITCH_X_SITE_RPATH):
9288 Rename from LD_SWITCH_X_SITE_AUX_RPATH.
9290 * Makefile.in (LD_SWITCH_X_SITE_AUX): Remove; no longer used.
9292 2012-04-30 Andreas Schwab <schwab@linux-m68k.org>
9294 * .gdbinit (xpr): Remove checks for no longer existing misc types.
9295 (xintfwd, xboolfwd, xobjfwd, xbufobjfwd, xkbobjfwd, xbuflocal):
9298 2012-04-28 Paul Eggert <eggert@cs.ucla.edu>
9300 Do not avoid creating empty evaporating overlays (Bug#9642).
9301 * buffer.c (Fmove_overlay): Revert the change of 2012-04-23.
9302 That is, do not delete an evaporating overlay if it becomes
9303 empty after its bounds are adjusted to fit within its buffer.
9304 This fix caused other problems, and I'm reverting it until we get
9305 to the bottom of them.
9307 2012-04-27 Chong Yidong <cyd@gnu.org>
9309 * xselect.c (x_convert_selection): Initialize a pointer (Bug#11315).
9311 2012-04-27 Eli Zaretskii <eliz@gnu.org>
9313 * xdisp.c (pos_visible_p): If the window start position is beyond
9314 ZV, start the display from buffer beginning. Prevents assertion
9315 violation in init_iterator when the minibuffer window is scrolled
9318 * window.c (window_scroll_pixel_based): Likewise.
9320 2012-04-27 Chong Yidong <cyd@gnu.org>
9322 * keymap.c (where_is_internal): Doc fix (Bug#10872).
9324 2012-04-27 Glenn Morris <rgm@gnu.org>
9326 * fileio.c (Fcopy_file, Fset_file_selinux_context):
9327 Ignore ENOTSUP failures from setfilecon functions. (Bug#11245)
9329 2012-04-27 Eli Zaretskii <eliz@gnu.org>
9331 * dispnew.c (swap_glyph_pointers, copy_row_except_pointers):
9332 Don't overrun array limits of glyph row's used[] array. (Bug#11288)
9334 2012-04-26 Eli Zaretskii <eliz@gnu.org>
9336 * xdisp.c (IT_DISPLAYING_WHITESPACE): In addition to the loaded
9337 display element, check also the underlying string or buffer
9338 character. (Bug#11341)
9340 * w32menu.c: Include w32heap.h.
9341 (add_menu_item): If the call to AppendMenuW (via
9342 unicode_append_menu) fails, disable Unicode menus only if we are
9343 running on Windows 9X/Me.
9345 2012-04-24 Andreas Schwab <schwab@linux-m68k.org>
9347 * .gdbinit (xpr): Handle USE_2_TAGS_FOR_INTS.
9348 (xgetint): Add missing shift for LSB tags.
9350 2012-04-24 Martin Rudalics <rudalics@gmx.at>
9352 * keyboard.c (read_char): Don't wipe echo area for select window
9353 events: These might get delayed via `mouse-autoselect-window'
9356 2012-04-24 Juanma Barranquero <lekktu@gmail.com>
9358 * gnutls.c (init_gnutls_functions): Protect against (unlikely)
9359 manipulation of :loaded-from data.
9361 2012-04-23 Juanma Barranquero <lekktu@gmail.com>
9363 * gnutls.c (init_gnutls_functions): The value of :loaded-from is
9364 now a cons (bug#11311).
9366 2012-04-23 Paul Eggert <eggert@cs.ucla.edu>
9368 Do not create empty overlays with the evaporate property (Bug#9642).
9369 * buffer.c (Fmove_overlay): Delete an evaporating overlay
9370 if it becomes empty after its bounds are adjusted to fit within
9371 its buffer. Without this fix, in a nonempty buffer (let ((o
9372 (make-overlay 1 2))) (overlay-put o 'evaporate t) (move-overlay o 0 1))
9373 yields an empty overlay that has the evaporate property, which is
9374 not supposed to happen.
9376 Fix minor GTK3 problems found by static checking.
9377 * emacsgtkfixed.c (EMACS_TYPE_FIXED, EMACS_FIXED, EmacsFixed)
9378 (EmacsFixedPrivate, EmacsFixedClass, struct _EmacsFixed)
9379 (struct _EmacsFixedClass, emacs_fixed_get_type):
9380 Move decls here from emacsgtkfixed.h, since they needn't be public.
9381 (emacs_fixed_get_type): Now static.
9382 (emacs_fixed_class_init): Omit unused local.
9383 (emacs_fixed_child_type): Remove; unused.
9384 * emacsgtkfixed.h (EMACS_TYPE_FIXED, EMACS_FIXED, EmacsFixed)
9385 (EmacsFixedPrivate, EmacsFixedClass, struct _EmacsFixed)
9386 (struct _EmacsFixedClass): Move to emacsgtkfixed.c.
9387 (EMACS_FIXED_CLASS, EMACS_IS_FIXED, EMACS_IS_FIXED_CLASS)
9388 (EMACS_FIXED_GET_CLASS): Remove; unused.
9389 * gtkutil.c (xg_create_frame_widgets) [!HAVE_GTK3]: Omit unused local.
9391 * keyboard.c (handle_async_input): Define only if SYNC_INPUT || SIGIO.
9392 Problem reported by Juanma Barranquero for Windows -Wunused-function.
9394 2012-04-22 Paul Eggert <eggert@cs.ucla.edu>
9396 Modernize and clean up gmalloc.c to assume C89 (Bug#9119).
9397 * gmalloc.c (_MALLOC_INTERNAL, _MALLOC_H, _PP, __ptr_t)
9398 (__malloc_size_t, __malloc_ptrdiff_t):
9399 Remove. All uses removed, replaced by the definiens if needed,
9400 since we can assume C89 or better now.
9401 Include <stdint.h>, for PTRDIFF_MAX, uintptr_t.
9402 (protect_malloc_state, align, get_contiguous_space)
9403 (malloc_atfork_handler_prepare, malloc_atfork_handler_parent)
9404 (malloc_atfork_handler_child, malloc_enable_thread)
9405 (malloc_initialize_1, __malloc_initialize, morecore_nolock)
9406 (_malloc_internal_nolock, _malloc_internal, malloc, _malloc)
9407 (_free, _realloc, _free_internal_nolock, _free_internal, free, cfree)
9408 (special_realloc, _realloc_internal_nolock, _realloc_internal)
9409 (realloc, calloc, __default_morecore, memalign, valloc, checkhdr)
9410 (freehook, mallochook, reallochook, mabort, mcheck, mprobe):
9411 Define using prototypes, not old style.
9412 (align, _malloc_internal_nolock, _free_internal_nolock, memalign):
9413 Don't assume ptrdiff_t and uintptr_t are no wider than unsigned long.
9414 (align): Don't assume that signed integer overflow wraps around.
9415 Omit unused local var.
9416 (malloc_initialize_1, morecore_nolock, _malloc_internal_nolock)
9417 (_free_internal_nolock, memalign, mallochook, reallochook):
9418 Omit no-longer-needed casts.
9419 (valloc): Use getpagesize, not __getpagesize.
9420 (MAGICWORD, MAGICFREE): Now randomish size_t values, not 32-bit.
9421 (struct hdr): The 'magic' member is now size_t, not unsigned long.
9423 * dbusbind.c (XD_DBUS_VALIDATE_OBJECT): Define only if needed.
9425 2012-04-22 Michael Albinus <michael.albinus@gmx.de>
9427 Move functions from C to Lisp. Make non-blocking method calls
9428 the default. Implement further D-Bus standard interfaces.
9430 * dbusbind.c (DBUS_NUM_MESSAGE_TYPES): Declare.
9431 (QCdbus_request_name_allow_replacement)
9432 (QCdbus_request_name_replace_existing)
9433 (QCdbus_request_name_do_not_queue)
9434 (QCdbus_request_name_reply_primary_owner)
9435 (QCdbus_request_name_reply_in_queue)
9436 (QCdbus_request_name_reply_exists)
9437 (QCdbus_request_name_reply_already_owner): Move to dbus.el.
9438 (QCdbus_registered_serial, QCdbus_registered_method)
9439 (QCdbus_registered_signal): New Lisp objects.
9440 (XD_DEBUG_MESSAGE): Use sizeof.
9441 (XD_MESSAGE_TYPE_TO_STRING, XD_OBJECT_TO_STRING)
9442 (XD_DBUS_VALIDATE_BUS_ADDRESS, XD_DBUS_VALIDATE_OBJECT)
9443 (XD_DBUS_VALIDATE_BUS_NAME, XD_DBUS_VALIDATE_PATH)
9444 (XD_DBUS_VALIDATE_INTERFACE, XD_DBUS_VALIDATE_MEMBER): New macros.
9445 (XD_CHECK_DBUS_SERIAL): Rename from CHECK_DBUS_SERIAL_GET_SERIAL.
9446 (xd_signature, xd_append_arg): Allow float for integer types.
9447 (xd_get_connection_references): New function.
9448 (xd_get_connection_address): Rename from xd_initialize.
9449 Return cached address.
9450 (xd_remove_watch): Do not unset $DBUS_SESSION_BUS_ADDRESS.
9451 (xd_close_bus): Rename from Fdbus_close_bus. Not needed on Lisp
9453 (Fdbus_init_bus): New optional arg PRIVATE. Cache address.
9454 Return number of refcounts.
9455 (Fdbus_get_unique_name): Make stronger parameter check.
9456 (Fdbus_message_internal): New defun.
9457 (Fdbus_call_method, Fdbus_call_method_asynchronously)
9458 (Fdbus_method_return_internal, Fdbus_method_error_internal)
9459 (Fdbus_send_signal, Fdbus_register_service)
9460 (Fdbus_register_signal, Fdbus_register_method): Move to dbus.el.
9461 (xd_read_message_1): Obey new structure of Vdbus_registered_objects.
9462 (xd_read_queued_messages): Obey new structure of Vdbus_registered_buses.
9463 (Vdbus_compiled_version, Vdbus_runtime_version)
9464 (Vdbus_message_type_invalid, Vdbus_message_type_method_call)
9465 (Vdbus_message_type_method_return, Vdbus_message_type_error)
9466 (Vdbus_message_type_signal): New defvars.
9467 (Vdbus_registered_buses, Vdbus_registered_objects_table):
9470 2012-04-22 Paul Eggert <eggert@cs.ucla.edu>
9472 Fix GC_MALLOC_CHECK debugging output on 64-bit hosts.
9473 * alloc.c (emacs_blocked_malloc) [GC_MALLOC_CHECK]:
9474 Do not assume ptrdiff_t is the same width as 'int'.
9476 * alloc.c: Handle unusual debugging option combinations.
9477 (GC_CHECK_MARKED_OBJECTS): Undef if ! GC_MARK_STACK,
9478 since the two debugging options are incompatible.
9479 (GC_MALLOC_CHECK): Similarly, undef if GC_CHECK_MARKED_OBJECTS
9481 (mem_init, mem_insert, mem_insert_fixup):
9482 Define if GC_MARK_STACK || GC_MALLOC_CHECK.
9483 (NEED_MEM_INSERT): Remove; no longer needed.
9485 2012-04-22 Leo Liu <sdl.web@gmail.com>
9487 * sysdep.c (list_system_processes): Support Darwin (Bug#5725).
9489 2012-04-22 Paul Eggert <eggert@cs.ucla.edu>
9491 * sysdep.c [__FreeBSD__]: Minor cleanups.
9492 (list_system_processes, system_process_attributes) [__FreeBSD__]:
9493 Use Emacs indenting style more consistently. Avoid some casts.
9494 Use 'double' consistently rather than mixing 'float' and 'double'.
9496 2012-04-21 Eduard Wiebe <usenet@pusto.de>
9498 * sysdep.c (list_system_processes, system_process_attributes):
9499 Add implementation for FreeBSD (Bug#5243).
9501 2012-04-21 Andreas Schwab <schwab@linux-m68k.org>
9503 * lisp.mk (lisp): Update.
9505 2012-04-20 Paul Eggert <eggert@cs.ucla.edu>
9507 * keyboard.c (process_pending_signals): Define only if SYNC_INPUT.
9508 It is never used otherwise.
9510 2012-04-20 Stefan Monnier <monnier@iro.umontreal.ca>
9512 * print.c (print_preprocess): Only check print_depth if print-circle
9514 (print_object): Check for cycles even when print-circle is nil and
9515 print-gensym is t, but only check print_depth if print-circle is nil.
9517 2012-04-20 Chong Yidong <cyd@gnu.org>
9519 * process.c (wait_reading_process_output): If EIO occurs on a pty,
9520 set the status to "failed" and ensure that sentinel is run.
9522 2012-04-20 Glenn Morris <rgm@gnu.org>
9524 * process.c (Fset_process_inherit_coding_system_flag)
9525 (Fset_process_query_on_exit_flag): Doc fix (mention return value).
9526 (Fmake_network_process, Fmake_serial_process): Doc fix.
9528 2012-04-20 Eli Zaretskii <eliz@gnu.org>
9530 * xdisp.c (string_buffer_position_lim): Limit starting position to
9532 (set_cursor_from_row): If called for a mode-line or header-line
9533 row, return zero immediately.
9534 (try_cursor_movement): If inside continuation line, don't back up
9535 farther than the first row after the header line, if any.
9536 Don't consider the header-line row as "partially visible", even if
9537 MATRIX_ROW_PARTIALLY_VISIBLE_P returns non-zero. (Bug#11261)
9539 2012-04-20 Atsuo Ohki <ohki@gssm.otsuka.tsukuba.ac.jp> (tiny change)
9541 * lread.c (lisp_file_lexically_bound_p): Fix hang at ";-*-\n"
9544 2012-04-20 Teodor Zlatanov <tzz@lifelogs.com>
9545 2012-04-18 Paul Eggert <eggert@cs.ucla.edu>
9547 configure: new option --enable-gcc-warnings (Bug#11207)
9548 * Makefile.in (C_WARNINGS_SWITCH): Remove.
9549 (WARN_CFLAGS, WERROR_CFLAGS): New macros.
9550 (ALL_CFLAGS): Use new macros rather than old.
9551 * process.c: Ignore -Wstrict-overflow to work around GCC bug 52904.
9552 * regex.c: Ignore -Wstrict-overflow. If !emacs, also ignore
9553 -Wunused-but-set-variable, -Wunused-function, -Wunused-macros,
9554 -Wunused-result, -Wunused-variable. This should go away once
9555 the Emacs and Gnulib regex code is merged.
9556 (xmalloc, xrealloc): Now static.
9558 2012-04-17 Paul Eggert <eggert@cs.ucla.edu>
9560 * dired.c (Fsystem_groups): Remove unused local.
9562 2012-04-17 Glenn Morris <rgm@gnu.org>
9564 * dired.c (Fsystem_users): Doc fix.
9566 2012-04-17 Dmitry Antipov <dmantipov@yandex.ru>
9568 * dired.c (Fsystem_users, Fsystem_groups): New functions. (Bug#7900)
9569 (syms_of_dired): Add them.
9571 2012-04-16 Paul Eggert <eggert@cs.ucla.edu>
9573 Fix minor alloc.c problems found by static checking.
9574 * alloc.c (_malloc_internal, _free_internal) [!DOUG_LEA_MALLOC]:
9575 New extern decls, to avoid calling undeclared functions.
9576 (dont_register_blocks): Define if ((!SYSTEM_MALLOC && !SYNC_INPUT)
9577 && GC_MALLOC_CHECK), not if ((GC_MARK_STACK || defined
9578 GC_MALLOC_CHECK) && GC_MALLOC_CHECK), to match when it's used.
9579 (NEED_MEM_INSERT): New macro.
9580 (mem_insert, mem_insert_fixup) [!NEED_MEM_INSERT]: Remove; unused.
9581 Remove one incorrect comment and fix another.
9583 Fix minor ralloc.c problems found by static checking.
9584 See http://lists.gnu.org/archive/html/emacs-devel/2011-12/msg00720.html
9585 * ralloc.c (ALIGNED, ROUND_TO_PAGE, HEAP_PTR_SIZE)
9586 (r_alloc_size_in_use, r_alloc_freeze, r_alloc_thaw): Remove; unused.
9587 (r_alloc_sbrk): Now static.
9589 Improve ralloc.c interface checking.
9590 See http://lists.gnu.org/archive/html/emacs-devel/2011-12/msg00720.html
9591 * buffer.c (ralloc_reset_variable, r_alloc, r_re_alloc)
9592 (r_alloc_free) [REL_ALLOC]: Move decls from here ...
9593 * lisp.h (r_alloc, r_alloc_free, r_re_alloc, r_alloc_reset_variable)
9594 [REL_ALLOC]: ... to here, to check interface.
9595 * m/ia64.h (r_alloc, r_alloc_free) [REL_ALLOC && !_MALLOC_INTERNAL]:
9596 Remove decls. This fixes an "It stinks!".
9598 * alloc.c (which_symbols): Fix alignment issue / type clash.
9600 2012-04-15 Andreas Schwab <schwab@linux-m68k.org>
9602 * lisp.h (struct Lisp_Symbol): Remove explicit padding.
9603 (struct Lisp_Misc_Any): Likewise.
9604 (struct Lisp_Free): Likewise.
9605 * alloc.c (union aligned_Lisp_Symbol): Define.
9606 (SYMBOL_BLOCK_SIZE, struct symbol_block): Use union
9607 aligned_Lisp_Symbol instead of struct Lisp_Symbol.
9608 (union aligned_Lisp_Misc): Define.
9609 (MARKER_BLOCK_SIZE, struct marker_block): Use union
9610 aligned_Lisp_Misc instead of union Lisp_Misc.
9611 (Fmake_symbol, allocate_misc, gc_sweep): Adjust.
9613 2012-04-14 Paul Eggert <eggert@cs.ucla.edu>
9615 Make GC_MAKE_GCPROS_NOOPS the default (Bug#9926).
9616 * lisp.h (GC_MARK_STACK): Default to GC_MAKE_GCPROS_NOOPS.
9617 * s/cygwin.h, s/darwin.h, s/freebsd.h, s/gnu.h, s/irix6-5.h, s/msdos.h:
9618 * s/netbsd.h, s/sol2-6.h:
9619 Remove definition of GC_MARK_STACK, since the default now works.
9620 * s/aix4-2.h, s/hpux10-20.h, s/unixware.h:
9621 Define GC_MARK_STACK to GC_USE_GCPROS_AS_BEFORE, since that's
9622 no longer the default.
9623 * s/gnu-linux.h (GC_MARK_STACK): Adjust to change in default.
9625 2012-04-14 Atsuo Ohki <ohki@gssm.otsuka.tsukuba.ac.jp> (tiny change)
9627 * lread.c (lisp_file_lexically_bound_p):
9628 Fix hang at ";-*-\n" (bug#11238).
9630 2012-04-14 Eli Zaretskii <eliz@gnu.org>
9632 * xdisp.c (find_last_unchanged_at_beg_row): Don't consider a row
9633 "unchanged" if its end.pos is beyond ZV. (Bug#11199)
9635 2012-04-14 Jan Djärv <jan.h.d@swipnet.se>
9637 * nsterm.m (constrainFrameRect): Always constrain when there is only
9638 one screen (Bug#10962).
9640 2012-04-13 Ken Brown <kbrown@cornell.edu>
9642 * s/cygwin.h (PTY_OPEN): Don't try to close a bogus file descriptor.
9644 2012-04-13 Reuben Thomas <rrt@sc3d.org>
9646 * indent.c (Fmove_to_column): Change interactive spec (Bug#739).
9648 2012-04-11 Daniel Colascione <dancol@dancol.org>
9650 * s/cygwin.h: The vfork the #define in cygwin.h was protecting
9651 against is gone. It's better to use vfork now so that when Cygwin
9652 gains a new, working vfork, we use it automatically (bug#10398).
9654 2012-04-11 Stefan Monnier <monnier@iro.umontreal.ca>
9656 * window.c (save_window_save): Obey window-point-insertion-type.
9658 2012-04-11 Glenn Morris <rgm@gnu.org>
9660 * Makefile.in (GNUSTEP_CFLAGS): Rename from C_SWITCH_X_SYSTEM.
9662 2012-04-11 Stefan Monnier <monnier@iro.umontreal.ca>
9664 * alloc.c (lisp_align_malloc): Remove unneeded prototype.
9666 2012-04-10 Jason S. Cornez <jcornez@ravenpack.com> (tiny change)
9668 * keyboard.c: Override inhibit-quit after the third C-g (bug#6585).
9669 (force_quit_count): New var.
9670 (handle_interrupt): Use it.
9672 2012-04-10 Juanma Barranquero <lekktu@gmail.com>
9674 * w32.c (w32_delayed_load): Record the full path of the library
9675 being loaded (bug#10424).
9677 2012-04-09 Glenn Morris <rgm@gnu.org>
9679 * doc.c (Fsnarf_documentation): Check variables, functions are bound,
9680 not just in the obarray, before snarfing them. (Bug#11036)
9682 * Makefile.in ($(leimdir)/leim-list.el):
9683 Pass EMACS rather than BUILT_EMACS.
9685 2012-04-09 Teodor Zlatanov <tzz@lifelogs.com>
9687 * process.c (make_process):
9688 * process.h: Add integer `gnutls_handshakes_tried' member to
9691 * gnutls.h: Add `GNUTLS_EMACS_HANDSHAKES_LIMIT' upper limit.
9692 Add convenience `GNUTLS_LOG2i' macro.
9694 * gnutls.c (gnutls_log_function2i): Convenience log function.
9695 (emacs_gnutls_read): Use new log functions,
9696 `gnutls_handshakes_tried' process member, and
9697 `GNUTLS_EMACS_HANDSHAKES_LIMIT' to limit the number of handshake
9698 attempts per process (connection).
9700 2012-04-09 Chong Yidong <cyd@gnu.org>
9702 * eval.c (Fuser_variable_p, user_variable_p_eh)
9703 (lisp_indirect_variable): Functions deleted.
9704 (Fdefvar): Caller changed.
9706 * callint.c (Finteractive, Fcall_interactively):
9707 * minibuf.c (Fread_variable): Callers changed.
9709 2012-04-09 Eli Zaretskii <eliz@gnu.org>
9711 * xdisp.c (set_cursor_from_row): If the display string appears in
9712 the buffer at position that is closer to point than the position
9713 after the display string, display the cursor on the first glyph of
9714 the display string. Fixes cursor display when a 'display' text
9715 property immediately follows invisible text. (Bug#11094)
9717 2012-04-09 Paul Eggert <eggert@cs.ucla.edu>
9719 composite.c: use 'double' consistently
9720 * composite.c (get_composition_id): Use 'double' consistently
9721 instead of converting 'float' to 'double' and vice versa; this is
9722 easier to understand and avoids a GCC warning.
9724 2012-04-09 Glenn Morris <rgm@gnu.org>
9726 * Makefile.in: Generate leim-list with bootstrap-emacs, in
9727 preparation for dumping it with emacs. (Bug#4789)
9728 (leimdir): New variable.
9729 ($(leimdir)/leim-list.el): New rule.
9730 (emacs$(EXEEXT)): Depend on leim-list.el.
9732 * buffer.c (Qucs_set_table_for_input): Remove. (Bug#9821)
9733 (Fget_buffer_create): Don't call Qucs_set_table_for_input.
9734 (init_buffer_once, syms_of_buffer): Remove Qucs_set_table_for_input.
9736 2012-04-08 Andreas Schwab <schwab@linux-m68k.org>
9738 * lisp.h (struct Lisp_Symbol): Add explicit padding to ensure
9741 2012-04-07 Juanma Barranquero <lekktu@gmail.com>
9743 * xml.c (init_libxml2_functions) [WINDOWSNT]:
9744 Remove unused local variable.
9746 2012-04-07 Paul Eggert <eggert@cs.ucla.edu>
9748 Avoid unnecessary pointer scanning in garbage collection (Bug#10780).
9749 * alloc.c (POINTERS_MIGHT_HIDE_IN_OBJECTS): New macro.
9750 (mark_memory): Mark Lisp_Objects only if pointers might hide in
9751 objects, as mark_maybe_pointer will catch them otherwise.
9752 (GC_LISP_OBJECT_ALIGNMENT): Remove; no longer needed.
9753 * s/gnu-linux.h (GC_LISP_OBJECT_ALIGNMENT) [__mc68000__]: Likewise.
9755 2012-04-07 Paul Eggert <eggert@cs.ucla.edu>
9757 Fix typo that broke non-Windows builds.
9758 * xml.c (libxml2_loaded_p) [!!WINDOWSNT]: 'inine' -> 'inline'.
9760 2012-04-07 Eli Zaretskii <eliz@gnu.org>
9762 Support building on MS-Windows with libxml2.
9764 * makefile.w32-in (OBJ2): Add xml.$(O).
9765 (GLOBAL_SOURCES): Add xml.c.
9766 ($(BLD)/xml.$(O)): New dependency list.
9768 * xml.c (DEF_XML2_FN, LOAD_XML2_FN) [WINDOWSNT]: New macros.
9769 (fn_htmlReadMemory, fn_xmlReadMemory, fn_xmlDocGetRootElement)
9770 (fn_xmlFreeDoc, fn_xmlCleanupParser, fn_xmlCheckVersion)
9771 [!WINDOWSNT]: New macros.
9772 (init_libxml2_functions, libxml2_loaded_p): New functions.
9773 (parse_region): Call fn_xmlCheckVersion instead of using the macro
9774 LIBXML_TEST_VERSION. Call libxml2 functions via the fn_* macros.
9775 (xml_cleanup_parser): New function, export for fn_xmlCleanupParser.
9776 Calls xmlCleanupParser only if libxml2 was loaded (or statically
9778 (Flibxml_parse_html_region, Flibxml_parse_xml_region):
9779 Call init_libxml2_functions before calling libxml2 functions.
9780 (syms_of_xml) <Qlibxml2_dll>: DEFSYM it.
9782 * emacs.c: Don't include libxml/parser.h.
9783 (shut_down_emacs): Call xml_cleanup_parser, instead of calling
9784 xmlCleanupParser directly.
9786 * lisp.h [HAVE_LIBXML2]: Add prototype for xml_cleanup_parser.
9788 2012-04-07 Eli Zaretskii <eliz@gnu.org>
9790 * indent.c (Fvertical_motion): If there is a display string at
9791 point, use it.vpos to compute how many lines to backtrack after
9792 move_it_to point. (Bug#11133)
9794 2012-04-06 Eli Zaretskii <eliz@gnu.org>
9796 * buffer.h (FETCH_CHAR, FETCH_MULTIBYTE_CHAR):
9797 * character.h (STRING_CHAR, STRING_CHAR_AND_LENGTH): Add comments
9798 about subtle differences between FETCH_CHAR* and STRING_CHAR*
9799 macros related to unification of CJK characters. For the details,
9800 see the discussion following the message here:
9801 http://debbugs.gnu.org/cgi/bugreport.cgi?bug=11073#14.
9803 2012-04-04 Chong Yidong <cyd@gnu.org>
9805 * keyboard.c (Vdelayed_warnings_list): Doc fix.
9807 2012-04-01 Eli Zaretskii <eliz@gnu.org>
9809 * w32menu.c (simple_dialog_show, add_menu_item): Use SAFE_ALLOCA
9810 instead of alloca. (Bug#11138)
9812 2012-04-01 Andreas Schwab <schwab@linux-m68k.org>
9814 * w32menu.c (is_simple_dialog): Properly check lisp types.
9817 2012-03-31 Eli Zaretskii <eliz@gnu.org>
9819 * xdisp.c (move_it_by_lines): When DVPOS is positive, and the
9820 position we get to after a call to move_it_to fails the
9821 IS_POS_VALID_AFTER_MOVE_P test, move to the next buffer position
9822 only if we wind up in a string from display property. (Bug#11063)
9824 * window.c (Fdelete_other_windows_internal): Invalidate the row
9825 and column information about mouse highlight, so that redisplay
9826 restores it after reallocating the glyph matrices. (Bug#7464)
9828 * xdisp.c (set_cursor_from_row): If `cursor' property on a display
9829 string comes from a `display' text property, use the buffer
9830 position of that property as if we actually saw that position in
9832 (move_it_by_lines): Remove the assertion that
9833 "it->current_x == 0 && it->hpos == 0" which can be legitimately
9834 violated when there's a before-string at the beginning of a line.
9837 2012-03-30 Eli Zaretskii <eliz@gnu.org>
9839 * xdisp.c (append_space_for_newline): If the default face was
9840 remapped, use the remapped face for the appended newline.
9841 (extend_face_to_end_of_line): Use the remapped default face for
9842 extending the face to the end of the line.
9843 (display_line): Call extend_face_to_end_of_line when the default
9844 face was remapped. (Bug#11068)
9846 2012-03-29 Eli Zaretskii <eliz@gnu.org>
9848 * s/ms-w32.h: Discourage from defining HAVE_GETCWD.
9850 2012-03-28 Stefan Monnier <monnier@iro.umontreal.ca>
9852 * keyboard.c (safe_run_hooks_error): Don't unquote strings.
9854 2012-03-27 Glenn Morris <rgm@gnu.org>
9856 * search.c (Fword_search_backward_lax, Fword_search_forward_lax):
9859 2012-03-26 Kenichi Handa <handa@m17n.org>
9861 * dispextern.h (struct glyph): Fix previous change. Change the
9862 bit length of glyphless.ch to 25 (Bug#11082).
9864 2012-03-26 Chong Yidong <cyd@gnu.org>
9866 * keyboard.c (Vselection_inhibit_update_commands): New variable.
9867 (command_loop_1): Use it; inhibit selection update for
9868 handle-select-window too (Bug#8996).
9870 2012-03-25 Fabrice Popineau <fabrice.popineau@supelec.fr>
9872 * w32heap.c (_heap_init, _heap_term): Remove dead MSVC-specific code.
9874 2012-03-25 Kenichi Handa <handa@m17n.org>
9876 * dispextern.h (struct glyph): Change the bit length of
9877 glyphless.ch to 22 to make the member glyphless fit in 32 bits.
9879 2012-03-24 Eli Zaretskii <eliz@gnu.org>
9881 * s/ms-w32.h (tzname): Include time.h before redirecting to
9882 _tzname. Fixes the MSVC build. (Bug#9960)
9884 2012-03-24 Andreas Schwab <schwab@linux-m68k.org>
9886 * xdisp.c (produce_glyphless_glyph): Limit length of acronym to 6
9889 * xterm.c (XTread_socket): Only modify handling_signal if
9890 !SYNC_INPUT. (Bug#11080)
9892 2012-03-23 Eli Zaretskii <eliz@gnu.org>
9894 * bidi.c (bidi_fetch_char): Use STRING_CHAR_AND_LENGTH instead of
9895 FETCH_MULTIBYTE_CHAR followed by CHAR_BYTES. Prevents crashes
9896 when fetching a multibyte character consumes more bytes than
9897 CHAR_BYTES returns, due to unification of CJK characters in
9898 string_char. (Bug#11073)
9900 2012-03-23 Troels Nielsen <bn.troels@gmail.com> (tiny change)
9902 * process.c (wait_reading_process_output): Handle pty disconnect
9903 by refraining from sending oneself a SIGCHLD (bug#10933).
9905 2012-03-22 Chong Yidong <cyd@gnu.org>
9907 * dispextern.h (struct it): New member string_from_prefix_prop_p.
9909 * xdisp.c (push_prefix_prop): Rename from push_display_prop.
9910 Mark string as coming from a prefix property.
9911 (handle_face_prop): Use default face for prefix strings (Bug#4281).
9912 (pop_it, reseat_1): Save and restore string_from_prefix_prop_p.
9914 2012-03-21 Chong Yidong <cyd@gnu.org>
9916 * xfaces.c (Vface_remapping_alist): Doc fix.
9918 2012-03-20 Eli Zaretskii <eliz@gnu.org>
9920 * w32proc.c (Fw32_set_console_codepage)
9921 (Fw32_set_console_output_codepage, Fw32_get_codepage_charset):
9924 2012-03-20 Chong Yidong <cyd@gnu.org>
9926 * dispnew.c (Fredisplay, Vredisplay_preemption_period): Update doc
9927 to reflect default non-nil value of redisplay-dont-pause.
9929 2012-03-19 Kenichi Handa <handa@m17n.org>
9931 * ftfont.c (ftfont_drive_otf): Mask bits of character code to make
9932 it fit in a valid range (Bug#11003).
9934 2012-03-18 Eli Zaretskii <eliz@gnu.org>
9936 * xdisp.c (cursor_row_p): Even if the glyph row ends in a string
9937 that is not from display property, accept the row as a "cursor
9938 row" if one of the string's character has a non-nil `cursor'
9939 property. Fixes cursor positioning when there are newlines in
9940 overlay strings, e.g. in icomplete.el. (Bug#11035)
9942 2012-03-12 Paul Eggert <eggert@cs.ucla.edu>
9944 * buffer.c (compare_overlays): Don't assume args differ (Bug#6830).
9946 2012-03-12 Chong Yidong <cyd@gnu.org>
9948 * eval.c (inhibit_lisp_code): Rename from
9949 inhibit_window_configuration_change_hook; move from window.c.
9951 * xfns.c (unwind_create_frame_1, Fx_create_frame):
9952 * window.c (run_window_configuration_change_hook)
9953 (syms_of_window): Callers changed.
9955 2012-03-11 Chong Yidong <cyd@gnu.org>
9957 * keymap.c (Fkey_description): Doc fix (Bug#9700).
9959 * editfns.c (Fconstrain_to_field): Doc fix (Bug#9452).
9961 2012-03-10 Chong Yidong <cyd@gnu.org>
9963 * frame.c (other_visible_frames): Don't assume the selected frame
9964 is visible (Bug#10955).
9966 2012-03-09 Stefan Monnier <monnier@iro.umontreal.ca>
9968 * buffer.c (compare_overlays): Avoid qsort's instability (bug#6830).
9970 2012-03-08 Jan Djärv <jan.h.d@swipnet.se>
9972 * gtkutil.c (x_wm_set_size_hint): Use one row in call to
9973 FRAME_TEXT_LINES_TO_PIXEL_HEIGHT so base_height is greater than
9976 2012-03-03 Glenn Morris <rgm@gnu.org>
9978 * alloc.c (Fgarbage_collect, misc-objects-consed): Doc fixes.
9980 2012-03-02 Eli Zaretskii <eliz@gnu.org>
9982 * xdisp.c (try_window_reusing_current_matrix): Don't move cursor
9983 position past the first glyph_row that ends at ZV. (Bug#10902)
9984 (redisplay_window, next_element_from_string): Fix typos in
9986 (redisplay_window): Pass to move_it_vertically the margin in
9987 pixels, not in screen lines.
9989 2012-03-02 Glenn Morris <rgm@gnu.org>
9991 * buffer.c (buffer-list-update-hook): Doc fix.
9993 2012-02-29 Eli Zaretskii <eliz@gnu.org>
9995 * xdisp.c (get_overlay_strings_1): Under bidi redisplay, call
9996 push_it before setting up the iterator for the first overlay
9997 string, even if we have an empty string loaded.
9998 (next_overlay_string): If there's an empty string on the iterator
9999 stack, pop the stack. (Bug#10903)
10001 2012-02-25 Paul Eggert <eggert@cs.ucla.edu>
10003 Generalize fix for crash due to non-contiguous EMACS_INT (Bug#10780).
10004 Suggested by Stefan Monnier in
10005 <http://lists.gnu.org/archive/html/emacs-devel/2012-02/msg00692.html>.
10006 * alloc.c (widen_to_Lisp_Object): New static function.
10007 (mark_memory): Also mark Lisp_Objects by fetching pointer words
10008 and widening them to Lisp_Objects. This would work even if
10009 USE_LSB_TAG is defined and wide integers are used, which might
10010 happen in a future version of Emacs.
10012 2012-02-25 Chong Yidong <cyd@gnu.org>
10014 * fileio.c (Ffile_selinux_context, Fset_file_selinux_context):
10017 * xselect.c (Fx_selection_exists_p): Doc fix.
10018 (x_clipboard_manager_save_all): Print an informative message
10019 before saving to clipboard manager.
10021 2012-02-24 Chong Yidong <cyd@gnu.org>
10023 * keyboard.c (process_special_events): Handle all X selection
10024 requests in kbd_buffer, not just the next one (Bug#8869).
10026 2012-02-23 Chong Yidong <cyd@gnu.org>
10028 * xfns.c (Fx_create_frame): Avoid window-configuration-change-hook
10029 call when setting menu-bar-lines and tool-bar-lines parameters.
10030 (unwind_create_frame_1): New helper function.
10032 * window.c (inhibit_window_configuration_change_hook): New var.
10033 (run_window_configuration_change_hook): Obey it.
10034 (syms_of_window): Initialize it.
10036 2012-02-22 Chong Yidong <cyd@gnu.org>
10038 * xterm.c (x_draw_image_relief): Add missing type check for
10039 Vtool_bar_button_margin (Bug#10743).
10041 2012-02-21 Chong Yidong <cyd@gnu.org>
10043 * fileio.c (Vfile_name_handler_alist): Doc fix.
10045 * buffer.c (Fget_file_buffer): Protect against invalid file
10046 handler return value.
10048 2012-02-20 Paul Eggert <eggert@cs.ucla.edu>
10050 * .gdbinit (xreload): Don't assume EMACS_INT fits in 'long'
10051 when computing $valmask.
10053 Fix crash due to non-contiguous EMACS_INT (Bug#10780).
10054 * lisp.h (VALBITS): Move definition up, so that USE_LSB_TAG can use it.
10055 (USE_LSB_TAG): Do not define if UINTPTR_MAX >> VALBITS == 0.
10056 It's useless in that case, and it can cause problems on hosts
10057 that allocate halves of EMACS_INT values separately.
10058 Reported by Dan Horák. Diagnosed by Andreas Schwab in
10059 <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=10780#30>.
10060 * mem-limits.h (EXCEEDS_LISP_PTR): Define to 0 on hosts where
10061 UINTPTR_MAX >> VALBITS == 0. This is required by the above change;
10062 it avoids undefined behavior on hosts where shifting right by more
10063 than the word width has undefined behavior.
10065 2012-02-19 Chong Yidong <cyd@gnu.org>
10067 * fileio.c (Ffile_name_directory, Ffile_name_nondirectory)
10068 (Funhandled_file_name_directory, Ffile_name_as_directory)
10069 (Fdirectory_file_name, Fexpand_file_name)
10070 (Fsubstitute_in_file_name): Protect against invalid file handler
10071 return values (Bug#10845).
10073 2012-02-18 Eli Zaretskii <eliz@gnu.org>
10075 * .gdbinit (pitx): Fix incorrect references to fields of the
10078 2012-02-17 Chong Yidong <cyd@gnu.org>
10080 * syntax.c (Fscan_lists): Doc fix (Bug#10833).
10082 2012-02-15 Paul Eggert <eggert@cs.ucla.edu>
10084 * image.c (MAX_IMAGE_SIZE): Increase from 6.0 to 10.0; see
10085 <http://lists.gnu.org/archive/html/emacs-devel/2012-02/msg00540.html>.
10087 2012-02-15 Chong Yidong <cyd@gnu.org>
10089 * eval.c (Fdefvar, Fdefconst): Doc fix; note that the variable is
10090 marked as special. Also, starting docstrings with * is obsolete.
10092 2012-02-13 Andreas Schwab <schwab@linux-m68k.org>
10094 * gnutls.c (emacs_gnutls_write): Fix last change.
10096 2012-02-13 Lars Ingebrigtsen <larsi@gnus.org>
10098 * gnutls.c (emacs_gnutls_write): Set errno appropriately for
10101 2012-02-13 Stefan Monnier <monnier@iro.umontreal.ca>
10103 * keymap.c (Fsingle_key_description): Handle char ranges.
10105 2012-02-12 Chong Yidong <cyd@gnu.org>
10107 * xdisp.c (handle_stop): Avoid assigning -1 to it->face_id here,
10108 as that creates a dangerous corner case.
10110 * window.c (Fdelete_window_internal): Invalidate the mouse
10111 highlight (Bug#9904).
10113 2012-02-12 Glenn Morris <rgm@gnu.org>
10115 * xselect.c (Fx_own_selection_internal)
10116 (Fx_get_selection_internal, Fx_disown_selection_internal)
10117 (Fx_selection_owner_p, Fx_selection_exists_p): Doc fixes.
10118 * nsselect.m (Fx_own_selection_internal)
10119 (Fx_disown_selection_internal, Fx_selection_exists_p)
10120 (Fx_selection_owner_p, Fx_get_selection_internal):
10121 Sync docs and argument specs with the xselect.c versions.
10123 2012-02-11 Lars Ingebrigtsen <larsi@gnus.org>
10125 * gnutls.c (emacs_gnutls_write): Don't infloop if sendto fails.
10127 2012-02-11 Eli Zaretskii <eliz@gnu.org>
10129 * w32select.c (Fx_selection_exists_p): Sync doc string and
10130 argument list with xselect.c. (Bug#10783)
10132 * w16select.c (Fx_selection_exists_p): Sync doc string and
10133 argument list with xselect.c. (Bug#10783)
10135 2012-02-10 Glenn Morris <rgm@gnu.org>
10137 * fns.c (Fsecure_hash): Doc fix.
10139 2012-02-09 Kenichi Handa <handa@m17n.org>
10141 * coding.c (produce_chars): Fix updating of src_end (Bug#10701).
10143 2012-02-07 Chong Yidong <cyd@gnu.org>
10145 * buffer.c (Fbuffer_local_variables)
10146 (buffer_lisp_local_variables): Handle unbound vars correctly;
10147 don't let Qunbound leak into Lisp.
10149 2012-02-07 Glenn Morris <rgm@gnu.org>
10151 * image.c (Fimagemagick_types): Doc fix.
10153 * image.c (imagemagick-render-type): Change it from a lisp object
10154 to an integer. Move the doc here from the lisp manual.
10155 Treat all values not equal to 0 the same.
10157 2012-02-06 Chong Yidong <cyd@gnu.org>
10159 * doc.c (store_function_docstring): Avoid applying docstring of
10160 alias to base function (Bug#2603).
10162 2012-02-04 Andreas Schwab <schwab@linux-m68k.org>
10164 * .gdbinit (pp1, pv1): Remove redundant defines.
10167 2012-02-04 Chong Yidong <cyd@gnu.org>
10169 * nsterm.m: Declare a global (Bug#10694).
10171 2012-02-04 Eli Zaretskii <eliz@gnu.org>
10173 * w32.c (get_emacs_configuration_options):
10174 Include --enable-checking, if specified, in the return value.
10176 2012-02-04 Martin Rudalics <rudalics@gmx.at>
10178 * dispnew.c (change_frame_size_1): Calculate new_frame_total_cols
10179 after rounding frame sizes. (Bug#9723)
10181 2012-02-04 Eli Zaretskii <eliz@gnu.org>
10183 * keyboard.c (adjust_point_for_property): Don't position point
10184 before BEGV. (Bug#10696)
10186 2012-02-03 Paul Eggert <eggert@cs.ucla.edu>
10188 Handle overflow when computing char display width (Bug#9496).
10189 * character.c (char_width): Return EMACS_INT, not int.
10190 (char_width, c_string_width): Check for overflow when
10191 computing the width; this is possible now that individual
10192 characters can have unbounded width. Problem introduced
10193 by merge from Emacs 23 on 2012-01-19.
10195 2012-02-02 Michael Albinus <michael.albinus@gmx.de>
10197 * dbusbind.c (Fdbus_register_method): Mention the return value
10198 :ignore in the docstring.
10200 2012-02-02 Glenn Morris <rgm@gnu.org>
10202 * callproc.c (Fcall_process, Fcall_process_region): Doc fix.
10204 * nsterm.m (syms_of_nsterm) <x-toolkit-scroll-bars>:
10205 Unconditionally set to t. (Bug#10673)
10206 * nsterm.m (syms_of_nsterm) <x-toolkit-scroll-bars>:
10207 * w32term.c (syms_of_w32term) <x-toolkit-scroll-bars>:
10208 * xterm.c (syms_of_xterm) <x-toolkit-scroll-bars>: Doc fix.
10210 2012-02-02 Kenichi Handa <handa@m17n.org>
10212 (x_produce_glyphs): Cancel previous change. If cmp->glyph_len is
10213 0, do not call append_composite_glyph.
10215 2012-02-02 Kenichi Handa <handa@m17n.org>
10217 * xdisp.c (BUILD_COMPOSITE_GLYPH_STRING): Initialize first_s to
10219 (x_produce_glyphs): If the component of a composition is a null
10220 string, set it->pixel_width to 1 to avoid zero-width glyph.
10222 2012-02-01 Eli Zaretskii <eliz@gnu.org>
10224 * ralloc.c (resize_bloc, r_alloc_sbrk): Don't call memmove if its
10225 first 2 arguments are identical. This makes inserting large
10226 output from a subprocess an order of magnitude faster on
10227 MS-Windows, where all sbrk'ed memory is always contiguous.
10229 2012-01-31 Glenn Morris <rgm@gnu.org>
10231 * nsterm.m (syms_of_nsterm) <x-toolkit-scroll-bars>:
10232 * w32term.c (syms_of_w32term) <x-toolkit-scroll-bars>:
10233 * xterm.c (syms_of_xterm) <x-toolkit-scroll-bars>: Sync docs.
10235 2012-01-29 Glenn Morris <rgm@gnu.org>
10237 * gnutls.c (syms_of_gnutls): More doc (from etc/NEWS).
10239 2012-01-28 Samuel Thibault <sthibault@debian.org> (tiny change)
10241 * s/gnu.h: Define POSIX_SIGNALS (Bug#10552).
10243 2012-01-28 Chong Yidong <cyd@gnu.org>
10245 * minibuf.c (syms_of_minibuf): Doc fix (Bug#10550).
10247 2012-01-26 Chong Yidong <cyd@gnu.org>
10249 * keyboard.c (Vecho_keystrokes): Document zero value (Bug#10503).
10251 * search.c (Fsearch_forward, Fsearch_backward): Document negative
10252 repeat counts (Bug#10507).
10254 2012-01-26 Glenn Morris <rgm@gnu.org>
10256 * lread.c (syms_of_lread): Doc fix.
10258 2012-01-25 HIROSHI OOTA <nil@mad.dog.cx> (tiny change)
10260 * coding.c (encode_designation_at_bol): Change return value to
10263 2012-01-25 Chong Yidong <cyd@gnu.org>
10265 * eval.c (Fuser_variable_p): Doc fix; mention custom-variable-p.
10267 2012-01-21 Chong Yidong <cyd@gnu.org>
10269 * floatfns.c (Fcopysign): Make the second argument non-optional,
10270 since nil is not allowed anyway.
10272 2012-01-21 Andreas Schwab <schwab@linux-m68k.org>
10274 * process.c (read_process_output): Use p instead of XPROCESS (proc).
10275 (send_process): Likewise.
10277 2012-01-19 Martin Rudalics <rudalics@gmx.at>
10279 * window.c (save_window_save, Fcurrent_window_configuration)
10280 (Vwindow_persistent_parameters): Do not use Qstate.
10281 Rewrite doc-strings.
10283 2012-01-19 Kenichi Handa <handa@m17n.org>
10285 * character.c (char_width): New function.
10286 (Fchar_width, c_string_width, lisp_string_width):
10287 Use char_width (Bug#9496).
10289 2012-01-16 Martin Rudalics <rudalics@gmx.at>
10291 * window.c (Vwindow_persistent_parameters): New variable.
10292 (Fset_window_configuration, save_window_save): Handle persistent
10295 2012-01-14 Eli Zaretskii <eliz@gnu.org>
10297 * w32fns.c (signal_user_input): Don't do a QUIT, to avoid
10298 thrashing the stack of the thread. (Bug#9087)
10300 2012-01-12 Paul Eggert <eggert@cs.ucla.edu>
10302 * xdisp.c (rows_from_pos_range): Add parens as per gcc -Wparentheses.
10304 2012-01-11 Eli Zaretskii <eliz@gnu.org>
10306 * xdisp.c (rows_from_pos_range): Handle the case where the
10307 highlight ends on a newline. (Bug#10464)
10308 (mouse_face_from_buffer_pos): Fix off-by-one error in calculating
10309 he end column for display of highlight that ends on a newline
10312 2012-01-11 Glenn Morris <rgm@gnu.org>
10314 * lread.c (init_lread): If no-site-lisp, remove site-lisp dirs
10315 from load-path also when installation-directory is nil. (Bug#10208)
10317 2012-01-10 Glenn Morris <rgm@gnu.org>
10319 * emacs.c (syms_of_emacs) <installation-directory>: Doc fix.
10321 * epaths.in (PATH_LOADSEARCH, PATH_EXEC, PATH_DATA, PATH_DOC):
10322 Update template values to be closer to their typical values these days.
10324 2012-01-09 Eli Zaretskii <eliz@gnu.org>
10326 * xdisp.c (rows_from_pos_range): Accept additional argument
10327 DISP_STRING, and accept any glyph in a row whose object is that
10328 string as eligible for mouse highlight. Fixes mouse highlight of
10329 display strings from overlays. (Bug#10464)
10331 2012-01-07 Paul Eggert <eggert@cs.ucla.edu>
10333 emacs: fix an auto-save permissions race condition (Bug#10400)
10334 * fileio.c (auto_saving_dir_umask): New static var.
10335 (Fmake_directory_internal): Use it.
10336 (do_auto_save_make_dir): Set it, instead of invoking chmod after
10337 creating the directory. The old code temporarily assigns
10338 too-generous permissions to the directory.
10339 (do_auto_save_eh): Clear it.
10340 (Fdo_auto_save): Catch all errors, not just file errors, so
10341 that the var is always cleared.
10343 2012-01-07 Eli Zaretskii <eliz@gnu.org>
10345 * search.c (scan_buffer): Pass character positions to
10346 know_region_cache, not byte positions. (Bug#6540)
10348 2012-01-07 LynX <_LynX@bk.ru> (tiny change)
10350 * w32.c (sys_rename): Report EXDEV when rename of a directory
10351 fails because the target is on another logical disk. (Bug#10284)
10353 2012-01-07 David Benjamin <davidben@mit.edu> (tiny change)
10355 * xterm.c (x_embed_request_focus): New function.
10357 * xterm.h: Add prototype.
10359 * xfns.c (Fx_focus_frame): Use it for embedded frames (Bug#9977).
10361 2012-01-05 Glenn Morris <rgm@gnu.org>
10363 * emacs.c (emacs_copyright): Update short copyright year to 2012.
10365 2012-01-01 Eli Zaretskii <eliz@gnu.org>
10367 * gnutls.c (init_gnutls_functions): Load gnutls_check_version.
10368 Load gnutls_transport_set_lowat only if GnuTLS version is below
10370 (emacs_gnutls_handshake): Call gnutls_transport_set_lowat only for
10371 GnuTLS versions below 2.11.1.
10373 2011-12-31 Antoine Levitt <antoine.levitt@gmail.com>
10375 * xdisp.c (syms_of_xdisp) <window-scroll-functions>: Add warning
10376 to the doc string advising against its use for altering the way
10377 windows are scrolled.
10379 2011-12-28 Kenichi Handa <handa@m17n.org>
10381 * coding.c (Fdefine_coding_system_internal): Make an utf-8 base
10382 coding-system ASCII compatible only when it does not produce BOM
10383 on encoding (Bug#10383).
10385 2011-12-26 Jan Djärv <jan.h.d@swipnet.se>
10387 * xmenu.c (x_menu_wait_for_event): Use xg_select for Gtk3 so menus
10389 (create_and_show_popup_menu): Always use menu_position_func for
10392 2011-12-24 Andreas Schwab <schwab@linux-m68k.org>
10394 * callint.c (Fcall_interactively): Don't truncate prompt string.
10396 2011-12-23 Eli Zaretskii <eliz@gnu.org>
10398 * xdisp.c (handle_invisible_prop): Handle correctly an invisible
10399 property that ends at ZV, so that the bidi iteration could be
10400 resumed from there (after widening). (Bug#10360)
10402 2011-12-22 Jan Djärv <jan.h.d@swipnet.se>
10404 * nsfont.m (ns_spec_to_descriptor): Do not autorelease fdesc.
10406 2011-12-21 Jan Djärv <jan.h.d@swipnet.se>
10408 * nsterm.m (x_free_frame_resources):
10409 Release f->output_data.ns->miniimage.
10410 (ns_index_color): Fix indentation. Do not retain
10411 color_table->colors[i].
10413 * nsmenu.m (ns_update_menubar): Call free_menubar_widget_value_tree
10416 * nsfns.m (x_set_background_color): Assign return value from
10417 ns_index_color to face-background instead of NSColor*.
10418 (ns_implicitly_set_icon_type): Fix indentation.
10419 Change assignment in for loop to comparison.
10421 * emacs.c (ns_pool): New variable.
10422 (main): Assign ns_pool.
10423 (Fkill_emacs): Call ns_release_autorelease_pool.
10425 * nsfont.m (ns_spec_to_descriptor): Fix indentation,
10426 autorelease fdesc, release fdAttrs and tdict.
10427 (ns_get_covering_families): Release charset.
10428 (ns_findfonts): Release NSFontDescriptor created with new.
10429 (ns_uni_to_glyphs): Fix indentation.
10430 (setString): Release attrStr before assigning new value.
10432 2011-12-18 Jan Djärv <jan.h.d@swipnet.se>
10434 * nsmenu.m (NSMenuDidBeginTrackingNotification): Declare if OSX < 10.5
10436 (trackingNotification): Surround with ifdef NS_IMPL_COCOA.
10437 (syms_of_nsmenu): Set trackingMenu to 1 if not NS_IMPL_COCOA.
10439 2011-12-18 David Reitter <reitter@cmu.edu>
10441 * nsterm.m (ns_term_init): Subscribe for notifications
10442 NSMenuDidBeginTrackingNotification and NSMenuDidEndTrackingNotification
10443 to method trackingNotification in EmacsMenu.
10445 * nsmenu.m (trackingMenu): New variable.
10446 (trackingNotification): New method (from Aquamacs).
10447 (menuNeedsUpdate): Expand comment and return if trackingMenu is 0,
10448 from Aquamacs (Bug#7030).
10450 2011-12-18 Jan Djärv <jan.h.d@swipnet.se>
10452 * nsselect.m (CUT_BUFFER_SUPPORT): Remove define.
10453 (symbol_to_nsstring): Fix indentation.
10454 (ns_symbol_to_pb): New function.
10455 (Fns_get_selection_internal): Rename from Fns_get_cut_buffer_internal.
10456 (Fns_rotate_cut_buffers_internal): Remove.
10457 (Fns_store_selection_internal): Rename from
10458 Fns_store_cut_buffer_internal.
10459 (ns_get_foreign_selection, Fx_own_selection_internal)
10460 (Fx_disown_selection_internal, Fx_selection_exists_p)
10461 (Fns_get_selection_internal, Fns_store_selection_internal):
10462 Use ns_symbol_to_pb and check if return value is nil.
10463 (syms_of_nsselect): Remove ifdef CUT_BUFFER_SUPPORT. Remove defsubr
10464 Sns_rotate_cut_buffers_internal. Sns_get_cut_buffer_internal
10465 renamed to Sns_get_selection_internal, Sns_store_cut_buffer_internal
10466 renamed to Sns_store_selection_internal.
10467 (ns_handle_selection_request): Move code to Fx_own_selection_internal
10468 and remove this function.
10469 (ns_handle_selection_clear): Remove, never used.
10470 (Fx_own_selection_internal): Move code from ns_handle_selection_request
10473 2011-12-17 Ken Brown <kbrown@cornell.edu>
10475 * fileio.c (check_writable) [CYGWIN]: Return non-zero if UID or
10476 GID is unknown (Bug#10257).
10478 2011-12-17 Paul Eggert <eggert@cs.ucla.edu>
10480 * s/gnu-linux.h: Fix mark_memory typo (Bug#10286).
10481 (GC_MARK_SECONDARY_STACK): Omit removed 3rd arg to mark_memory,
10482 which caused a build failure on GNU/Linux IA-64. This problem was
10483 introduced by my 2011-10-07 patch.
10485 2011-12-15 Juri Linkov <juri@jurta.org>
10487 * image.c (imagemagick_error): New function. (Bug#10112)
10488 (imagemagick_load_image): Comment out `MagickSetResolution' call.
10489 Use `imagemagick_error' where ImageMagick functions return
10491 (Fimagemagick_types): Add `Fnreverse' to return the list in the
10494 2011-12-15 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
10496 * xftfont.c (xftfont_draw): Use the font metrics of s->font to
10497 fill background (Bug#8992).
10499 2011-12-13 Martin Rudalics <rudalics@gmx.at>
10501 * window.c (Vwindow_combination_resize)
10502 (Vwindow_combination_limit): Use t instead of non-nil in
10504 (Vrecenter_redisplay): Add first sentence of doc-string on
10506 (Frecenter): Fix doc-string typo.
10508 2011-12-11 Kenichi Handa <handa@m17n.org>
10510 * coding.c (Funencodable_char_position): Pay attention to the
10511 buffer text relocation (Bug#9389).
10513 2011-12-10 Jan Djärv <jan.h.d@swipnet.se>
10515 * xterm.c (x_term_init): Move call to gdk_window_add_filter before
10516 gtk_init (Bug#10100).
10518 2011-12-10 Eli Zaretskii <eliz@gnu.org>
10520 * xdisp.c (RECORD_MAX_MIN_POS): Use IT->cmp_it.charpos only if
10521 IT->string is nil. (Bug#10263)
10523 2011-12-10 Jan Djärv <jan.h.d@swipnet.se>
10525 * nsterm.h (x_free_frame_resources): Declare.
10527 * nsfns.m (ns_get_defaults_value): New function (Bug#10103).
10528 (Fns_get_resource, x_get_string_resource): Call ns_get_defaults_value.
10530 * nsterm.h (ns_get_defaults_value): Declare.
10532 * nsterm.m (ns_default): Call ns_get_defaults_value.
10534 2011-12-09 Eli Zaretskii <eliz@gnu.org>
10536 * xdisp.c (try_scrolling): Don't set scroll_down_p if dy is zero.
10539 2011-12-09 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
10541 * unexelf.c (unexec) [NS_IMPL_GNUSTEP]: Take account of the case
10542 that where the value of an _OBJC_* symbol points to is in the .bss
10543 section (Bug#10240).
10545 2011-12-08 Kazuhiro Ito <kzhr@d1.dion.ne.jp> (tiny change)
10547 * coding.c (encode_coding_ccl): Check (charbuf < charbuf_end)
10548 after the loop to call ccl_driver at least once (Bug#8619).
10550 2011-12-08 Kenichi Handa <handa@m17n.org>
10552 * ftfont.c (get_adstyle_property): Fix previous change
10555 2011-12-07 Juanma Barranquero <lekktu@gmail.com>
10557 * w32.c (init_environment): If no_site_lisp, remove site-lisp
10558 dirs from the default value of EMACSLOADPATH (bug#10208).
10560 2011-12-07 Glenn Morris <rgm@gnu.org>
10562 * lread.c (init_lread): If no_site_lisp, exclude site-lisp/ in
10563 installation and source directories as well. (Bug#10208)
10565 2011-12-06 Chong Yidong <cyd@gnu.org>
10567 * minibuf.c (Fread_from_minibuffer): Doc fix (Bug#10228).
10569 2011-12-06 Glenn Morris <rgm@gnu.org>
10571 * process.c (start_process_unwind): Treat any pid <= 0, except -2,
10572 as an error, not just -1. (Bug#10217)
10574 2011-12-05 Chong Yidong <cyd@gnu.org>
10576 * keyboard.c (process_special_events): New function.
10577 (swallow_events, Finput_pending_p): Use it (Bug#10195).
10579 2011-12-05 Paul Eggert <eggert@cs.ucla.edu>
10581 * coding.c (encode_designation_at_bol): Don't use uninitialized
10582 local variable (Bug#9318).
10584 2011-12-05 Kenichi Handa <handa@m17n.org>
10586 * ftfont.c (get_adstyle_property): If the font is not BDF nor PCF,
10587 return Qnil (Bug#8046, Bug#10193).
10589 2011-12-05 Kenichi Handa <handa@m17n.org>
10591 * coding.c (encode_designation_at_bol): New args charbuf_end and
10592 dst. Return the number of produced bytes. Callers changed.
10593 (coding_set_source): Return how many bytes coding->source was
10595 (coding_set_destination): Return how many bytes
10596 coding->destination was relocated.
10597 (CODING_DECODE_CHAR, CODING_ENCODE_CHAR, CODING_CHAR_CHARSET)
10598 (CODING_CHAR_CHARSET_P): Adjust for the avove changes.
10600 2011-12-05 Kazuhiro Ito <kzhr@d1.dion.ne.jp> (tiny change)
10602 * coding.c (CODING_CHAR_CHARSET_P): New macro.
10603 (encode_coding_emacs_mule, encode_coding_iso_2022): Use the above
10606 2011-12-05 Andreas Schwab <schwab@linux-m68k.org>
10608 The following changes are to fix Bug#9318.
10610 * coding.c (CODING_ENCODE_CHAR, CODING_CHAR_CHARSET): New macros.
10611 (encode_coding_emacs_mule, ENCODE_ISO_CHARACTER)
10612 (encode_coding_iso_2022, encode_coding_sjis)
10613 (encode_coding_big5, encode_coding_charset): Use the above macros.
10615 2011-12-05 Juanma Barranquero <lekktu@gmail.com>
10617 * lisp.h (process_quit_flag): Fix external declaration.
10619 2011-12-04 Stefan Monnier <monnier@iro.umontreal.ca>
10621 Don't macro-inline non-performance-critical code.
10622 * eval.c (process_quit_flag): New function.
10623 * lisp.h (QUIT): Use it.
10625 2011-12-04 Jan Djärv <jan.h.d@swipnet.se>
10627 * nsfns.m (get_geometry_from_preferences): New function.
10628 (Fx_create_frame): Call get_geometry_from_preferences (Bug#10103).
10630 2011-12-04 Andreas Schwab <schwab@linux-m68k.org>
10632 * emacs.c (Qkill_emacs): Define.
10633 (syms_of_emacs): Initialize it.
10634 * keyboard.c (interrupt_signal): Don't call Fkill_emacs here, set
10635 Qquit_flag to `kill-emacs' instead.
10636 (quit_throw_to_read_char): Add parameter `from_signal'.
10637 All callers changed. Call Fkill_emacs if requested and safe.
10638 * lisp.h (QUIT): Call Fkill_emacs if requested.
10640 2011-12-03 Jan Djärv <jan.h.d@swipnet.se>
10642 * widget.c (update_wm_hints): Return if wmshell is null.
10643 (widget_update_wm_size_hints): New function.
10645 * widget.h (widget_update_wm_size_hints): Declare.
10647 * xterm.c (x_wm_set_size_hint): If USE_X_TOOLKIT, call
10648 widget_update_wm_size_hints (Bug#10104).
10650 2011-12-03 Eli Zaretskii <eliz@gnu.org>
10652 * xdisp.c (handle_invisible_prop): If the invisible text ends just
10653 before a newline, prepare the bidi iterator for consuming the
10654 newline, and keep the current paragraph direction. (Bug#10183)
10655 (redisplay_window): Don't let `margin' become negative. (Bug#10192)
10657 2011-12-02 Juri Linkov <juri@jurta.org>
10659 * search.c (Fword_search_regexp): New Lisp function created from
10660 `wordify'. Change type of arg `lax' from `int' to `Lisp_Object'.
10661 (Fword_search_backward, Fword_search_forward)
10662 (Fword_search_backward_lax, Fword_search_forward_lax):
10663 Use `Fword_search_regexp' instead of `wordify'. Doc fix.
10664 (syms_of_search): Define `Sword_search_regexp'. (Bug#10145)
10666 2011-12-01 Stefan Monnier <monnier@iro.umontreal.ca>
10668 * fileio.c (Finsert_file_contents): Move after-change-function call
10669 to before the "handled:" label, since all "goto handled" appear in
10670 cases where the *-change-functions have already been properly called
10673 2011-12-01 Andreas Schwab <schwab@linux-m68k.org>
10675 * keyboard.c (interrupt_signal): Don't call kill-emacs when
10676 waiting for input. (Bug#10169)
10678 2011-11-30 Eli Zaretskii <eliz@gnu.org>
10680 * dispnew.c (adjust_glyph_matrix): Remove the assertion that
10681 verifies glyph row's hash code--we have just reallocated the
10682 glyphs, so their contents can be complete garbage. (Bug#10164)
10684 2011-11-30 Juanma Barranquero <lekktu@gmail.com>
10686 * dispnew.c (adjust_glyph_matrix) [XASSERTS]: Add missing check.
10688 2011-11-30 Eli Zaretskii <eliz@gnu.org>
10690 * dispnew.c (adjust_glyph_matrix) [XASSERTS]: Ensure ROW's
10691 attributes are tested _before_ calling verify_row_hash, to protect
10692 against GCC re-ordering of the tests. (Bug#10164)
10694 2011-11-29 Jan Djärv <jan.h.d@swipnet.se>
10696 * xterm.h (struct x_output): net_wm_state_hidden_seen is new.
10698 * xterm.c (handle_one_xevent): Only set async_visible and friends
10699 if net_wm_state_hidden_seen is non-zero (Bug#10002)
10700 (get_current_wm_state): Set net_wm_state_hidden_seen to 1 if
10701 _NET_WM_STATE_HIDDEN is in NET_WM_STATE.
10703 2011-11-28 Paul Eggert <eggert@cs.ucla.edu>
10705 Remove GCPRO-related macros that exist only to avoid shadowing locals.
10706 * lisp.h (GCPRO1_VAR, GCPRO2_VAR, GCPRO3_VAR, GCPRO4_VAR, GCPRO5_VAR)
10707 (GCPRO6_VAR, UNGCPRO_VAR): Remove. See
10708 <http://lists.gnu.org/archive/html/emacs-diffs/2011-11/msg00265.html>.
10709 All uses changed to use GCPRO1 etc.
10710 (GCPRO1, GCPRO2, GCPRO3, GCPRO4, GCPRO5, GCPRO6, UNGCPRO):
10711 Revert to old implementation (i.e., before 2011-03-11).
10713 2011-11-28 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
10715 * dispnew.c (scrolling_window): Truncate overlaps in copy destination
10716 of scroll runs so as to avoid assigning disabled bogus rows and
10717 unnecessary graphics copy operations.
10719 2011-11-27 Eli Zaretskii <eliz@gnu.org>
10721 * s/ms-w32.h (utimbuf) [_MSC_VER]: Don't define.
10722 (snprintf) [_MSC_VER]: Redirect to _snprintf.
10723 (strtoll) [_MSC_VER]: Redirect to _strtoi64.
10724 (malloc, free, realloc, calloc): Redirect to e_* only when
10727 * lisp.h (GCTYPEBITS): Move before first use.
10728 (ALIGN_GCTYPEBITS) [_MSC_VER]: Define.
10729 (DECL_ALIGN) [_MSC_VER]: Use it, as MSVC doesn't like bit ops in
10730 this macro definition.
10732 * s/ms-w32.h (tzname): Redirect to _tzname for all values of
10735 2011-11-27 Jan Djärv <jan.h.d@swipnet.se>
10737 * gtkutil.c (xg_create_frame_widgets):
10738 Call gtk_window_set_has_resize_grip (FALSE) if that function is
10739 present with Gtk+ 2.0.
10741 2011-11-26 Paul Eggert <eggert@cs.ucla.edu>
10743 * fileio.c (Finsert_file_contents): Undo previous change; see
10744 <http://lists.gnu.org/archive/html/emacs-diffs/2011-11/msg00265.html>.
10746 2011-11-26 Paul Eggert <eggert@cs.ucla.edu>
10748 Rename locals to avoid shadowing.
10749 * fileio.c (Finsert_file_contents):
10750 Rename inner 'gcpro1' to 'inner_gcpro1' to avoid shadowing.
10751 * process.c (wait_reading_process_output):
10752 Rename inner 'proc' to 'p' to avoid shadowing.
10753 Indent for consistency with usual Emacs style.
10755 2011-11-25 Eli Zaretskii <eliz@gnu.org>
10757 * xdisp.c (redisplay_window): If cursor row is not fully visible
10758 after recentering, and scroll-conservatively is set to a large
10759 number, scroll window by a few more lines to make the cursor fully
10760 visible and out of scroll-margin. (Bug#10105)
10761 (start_display): Don't move to the next line if the display should
10762 start at a newline that is part of a display vector or an overlay
10763 string. (Bug#10119)
10765 2011-11-24 Juri Linkov <juri@jurta.org>
10767 * image.c (imagemagick_load_image): Move `MagickSetResolution' down
10768 after the `MagickPingImage' call. (Bug#10112)
10770 2011-11-23 Chong Yidong <cyd@gnu.org>
10772 * window.c (Fcoordinates_in_window_p): Accept only live windows.
10774 2011-11-23 Martin Rudalics <rudalics@gmx.at>
10776 * buffer.c (Fkill_buffer): Run replace_buffer_in_windows before
10777 making another buffer current. (Bug#10114)
10779 2011-11-23 Glenn Morris <rgm@gnu.org>
10781 * font.c (font_find_for_lface) [HAVE_NS]: Ignore case. (Bug#2526)
10783 2011-11-23 Chong Yidong <cyd@gnu.org>
10785 * xdisp.c (compute_stop_pos): Check validity of end_charpos before
10786 using it (Bug#5984).
10788 2011-11-22 Eli Zaretskii <eliz@gnu.org>
10790 * dispnew.c (adjust_glyph_matrix): Don't verify hash code of mode-
10791 and header-lines, as they don't have one computed for them.
10794 * .gdbinit (prow): Make displayed values more self-explaining.
10795 Add row's hash code.
10797 2011-11-21 Lars Magne Ingebrigtsen <larsi@gnus.org>
10799 * process.c (wait_reading_process_output): Fix asynchrounous
10800 GnuTLS socket handling on some versions of the GnuTLS library.
10801 (wait_reading_process_output): Add comment and URL.
10803 2011-11-21 Jan Djärv <jan.h.d@swipnet.se>
10805 * xterm.c (x_clear_frame): Reinstate the XClearWindow call.
10807 2011-11-21 Chong Yidong <cyd@gnu.org>
10809 * window.c (Fnext_window, Fprevious_window): Doc fix.
10811 2011-11-20 Stefan Monnier <monnier@iro.umontreal.ca>
10813 * window.c (get_phys_cursor_glyph): Fix Lisp_Object/int mixup.
10815 2011-11-20 Juanma Barranquero <lekktu@gmail.com>
10817 * nsfont.m (syms_of_nsfont) <ns-reg-to-script>: Fix typo.
10819 2011-11-20 Martin Rudalics <rudalics@gmx.at>
10821 * window.c (Fset_window_combination_limit): Rename argument
10823 (Vwindow_combination_limit): Remove "status" from doc-string.
10825 2011-11-20 Andreas Schwab <schwab@linux-m68k.org>
10827 * m/ibms390.h: Remove.
10828 * m/ibms390x.h: Don't include "ibms390.h".
10830 2011-11-20 Stefan Monnier <monnier@iro.umontreal.ca>
10832 * fileio.c (Finsert_file_contents): Add missing gcpro1 variable.
10833 Suggested by Dmitry Antipov <dmantipov@yandex.ru>.
10835 2011-11-20 Juanma Barranquero <lekktu@gmail.com>
10837 * casetab.c (Fset_case_table):
10838 * charset.c (Fcharset_after): Fix typos.
10840 2011-11-20 Paul Eggert <eggert@cs.ucla.edu>
10842 Standardize on VIRT_ADDR_VARIES behavior (Bug#10042).
10843 Otherwise, valgrind does not work on some platforms.
10844 Problem reported by Andreas Schwab in
10845 <http://lists.gnu.org/archive/html/emacs-devel/2011-11/msg00081.html>.
10846 * puresize.h (pure, PURE_P): Always behave as if VIRT_ADDR_VARIES
10847 is set, removing the need for VIRT_ADDRESS_VARIES.
10848 (PURE_P): Use a more-efficient implementation that needs just one
10849 comparison, not two: on x86-64 with GCC 4.6.2, this cut down the
10850 number of instructions from 6 (xorl, cmpq, jge, xorl, cmpq, setge)
10851 to 4 (xorl, subq, cmpq, setbe).
10852 * alloc.c (pure): Always extern now, since that's the
10853 VIRT_ADDR_VARIES behavior.
10854 (PURE_POINTER_P): Use a single comparison, not two, for
10855 consistency with the new puresize.h.
10856 * lisp.h (PNTR_COMPARISON_TYPE): Remove; no longer needed.
10857 * m/ibms390.h, m/intel386.h, m/template.h, s/cygwin.h, s/hpux10-20.h:
10858 Remove VIRT_ADDR_VARIES no longer needed.
10860 2011-11-19 Eli Zaretskii <eliz@gnu.org>
10862 * xdisp.c (x_write_glyphs, draw_phys_cursor_glyph)
10863 (erase_phys_cursor, update_window_cursor, show_mouse_face)
10864 (cursor_in_mouse_face_p): If the cursor position is out of bounds,
10865 behave as if the cursor position were at the window margin.
10867 * window.c (get_phys_cursor_glyph): If the window is hscrolled,
10868 and the cursor position is out of bounds, behave as if the cursor
10869 position were at the window margin. (Bug#10075)
10871 2011-11-18 Chong Yidong <cyd@gnu.org>
10873 * window.c (Fwindow_combination_limit): Make first argument
10874 non-optional, since it is meaningless for live windows like the
10877 2011-11-18 Dmitry Antipov <dmantipov@yandex.ru>
10879 * keymap.c (Fwhere_is_internal): Add missing RETURN_UNGCPROs.
10881 2011-11-18 Stefan Monnier <monnier@iro.umontreal.ca>
10883 * intervals.c: Fix grafting over the whole buffer (bug#10071).
10884 (graft_intervals_into_buffer): Simplify.
10886 2011-11-18 Eli Zaretskii <eliz@gnu.org>
10888 * dispnew.c (swap_glyph_pointers): Swap the used[] arrays and the
10889 hash values of the two rows.
10890 (copy_row_except_pointers): Preserve the used[] arrays and the
10891 hash values of the two rows. (Bug#10035)
10892 (add_row_entry): Add xassert to verify that ROW's hash code is valid.
10894 * xdisp.c (row_hash): New function, body extracted from
10895 compute_line_metrics.
10896 (compute_line_metrics): Call row_hash, instead of computing the
10899 * dispnew.c (verify_row_hash): Call row_hash for computing the
10900 hash code of a row, instead of duplicating code from xdisp.c.
10902 * dispextern.h (row_hash): Add prototype.
10904 2011-11-18 Tassilo Horn <tassilo@member.fsf.org>
10906 * frame.c (delete_frame): Don't delete the terminal when the last
10907 X frame is closed if emacs is built with GTK toolkit.
10909 2011-11-17 Juanma Barranquero <lekktu@gmail.com>
10911 * window.c (syms_of_window) <window-combination-resize>: Fix typo.
10913 2011-11-17 Martin Rudalics <rudalics@gmx.at>
10915 * window.c (Vwindow_splits): Rename to
10916 Vwindow_combination_resize. Suggested by Juri Linkov.
10917 (Fsplit_window_internal): Use Vwindow_combination_resize instead
10920 2011-11-16 Juanma Barranquero <lekktu@gmail.com>
10922 * nsfns.m (Fns_font_name):
10923 * window.c (syms_of_window) <window-combination-limit>: Fix typos.
10925 2011-11-16 Martin Rudalics <rudalics@gmx.at>
10927 * window.h (window): Rename slot "nest" to "combination_limit".
10928 * window.c (Fwindow_nest): Rename to Fwindow_combination_limit.
10929 (Fset_window_nest): Rename to Fset_window_combination_limit.
10930 (Vwindow_nest): Rename to Vwindow_combination_limit.
10931 (recombine_windows, make_parent_window, make_window)
10932 (Fsplit_window_internal, saved_window)
10933 (Fset_window_configuration, save_window_save): Rename all
10934 occurrences of window_nest to window_combination_limit.
10936 2011-11-15 Juanma Barranquero <lekktu@gmail.com>
10938 * image.c (imagemagick_load_image): Fix typo.
10940 2011-11-14 Eli Zaretskii <eliz@gnu.org>
10942 * xdisp.c (display_line): Move the call to
10943 highlight_trailing_whitespace before the call to
10944 compute_line_metrics, since the latter needs to see the final
10945 faces of all the glyphs to compute ROW's hash value.
10946 Fixes assertion violations in row_equal_p. (Bug#10035)
10948 2011-11-14 Juanma Barranquero <lekktu@gmail.com>
10950 * w32proc.c (reader_thread): Don't check pending input if cp->fd < 0,
10951 just return (bug#10044).
10953 2011-11-12 Eli Zaretskii <eliz@gnu.org>
10955 * makefile.w32-in (HEAPSIZE): New variable, allows to build temacs
10956 with user-defined heap size. Bump the default size of the temacs
10957 heap to 27MB, to avoid memory warning when running temacs.
10958 ($(TEMACS)): Use HEAPSIZE instead of a hardcoded value.
10960 * dispnew.c (scrolling_window): Fix incorrect indices in accessing
10961 current_matrix and desired_matrix. (Bug#9990)
10962 (verify_row_hash) [XASSERTS]: New function.
10963 (adjust_glyph_matrix, row_equal_p): Use it in xassert to verify
10964 that the hash value of glyph rows is correct.
10966 2011-11-12 Martin Rudalics <rudalics@gmx.at>
10968 * window.h (window): Remove splits slot.
10969 * window.c (Fwindow_splits, Fset_window_splits): Remove.
10970 (Fdelete_other_windows_internal, make_parent_window)
10971 (make_window, Fsplit_window_internal, Fdelete_window_internal)
10972 (Fset_window_configuration, save_window_save): Don't deal with
10973 split status of windows.
10974 (saved_window): Remove splits slot.
10975 (Vwindow_splits): Rewrite doc-string.
10977 2011-11-11 Jan Djärv <jan.h.d@swipnet.se>
10979 * xfns.c (unwind_create_frame):
10980 * nsfns.m (unwind_create_frame):
10981 * w32fns.c (unwind_create_frame): Use Fmemq to check if frame is in
10982 Vframe_list (Bug#9999).
10984 2011-11-11 Dmitry Antipov <dmantipov@yandex.ru>
10986 * xdisp.c (syms_of_xdisp): Remove duplicated definition of Qtext.
10988 2011-11-11 Kenichi Handa <handa@m17n.org>
10990 * callproc.c (Fcall_process): Set the member dst_multibyte of
10993 2011-11-11 Johan Bockgård <bojohan@gnu.org>
10995 * xdisp.c (fill_composite_glyph_string): Always set s->face, to
10996 avoid a crash (bug#9496).
10998 2011-11-09 Chong Yidong <cyd@gnu.org>
11000 * window.c (Fwindow_inside_edges, Fwindow_inside_pixel_edges)
11001 (Fwindow_inside_absolute_pixel_edges): Only allow live windows.
11003 2011-11-08 Paul Eggert <eggert@cs.ucla.edu>
11005 * s/gnu.h (GC_MARK_STACK): Define to GC_MAKE_GCPROS_NOOPS (Bug#9926).
11007 2011-11-08 Paul Eggert <eggert@cs.ucla.edu>
11009 Avoid some portability problems by eschewing 'extern inline' functions.
11010 The trivial performance wins aren't worth the portability hassles; see
11011 <http://lists.gnu.org/archive/html/emacs-devel/2011-11/msg00084.html>
11013 * dispextern.h (window_box, window_box_height, window_text_bottom_y)
11014 (window_box_width, window_box_left, window_box_left_offset)
11015 (window_box_right, window_box_right_offset): Undo previous change,
11016 by removing the "extern"s.
11017 * intervals.c (adjust_intervals_for_insertion)
11018 (adjust_intervals_for_deletion): Undo previous change,
11019 making these static again.
11020 (offset_intervals, temp_set_point_both, temp_set_point)
11021 (copy_intervals_to_string): No longer inline.
11022 * xdisp.c (window_text_bottom_y, window_box_width)
11023 (window_box_height, window_box_left_offset)
11024 (window_box_right_offset, window_box_left, window_box_right)
11025 (window_box): No longer inline.
11027 2011-11-08 Chong Yidong <cyd@gnu.org>
11029 * window.c (Fwindow_left_column, Fwindow_top_line): Doc fix.
11030 (Fwindow_body_height, Fwindow_body_width): Move from Lisp.
11031 Signal an error if not a live window.
11032 (Fwindow_total_width, Fwindow_total_height): Move from Lisp.
11033 (Fwindow_total_size, Fwindow_body_size): Move to Lisp.
11035 2011-11-07 Juanma Barranquero <lekktu@gmail.com>
11037 * lisp.h (syms_of_abbrev): Remove declaration.
11038 Reported by CHENG Gao <chenggao@royau.me>.
11040 2011-11-07 Eli Zaretskii <eliz@gnu.org>
11042 * w32.c (check_windows_init_file): Don't look for term/w32-win.el
11043 if Vpurify_flag is non-nil. Fixes a crash when running w32 build
11044 of temacs in GUI mode.
11046 2011-11-07 Martin Rudalics <rudalics@gmx.at>
11048 * window.h: Declare delete_all_child_windows instead of
11049 delete_all_subwindows.
11050 * window.c (Fwindow_nest, Fset_window_nest)
11051 (Fset_window_new_total, Fset_window_new_normal)
11052 (Fwindow_resize_apply): Don't use term subwindow in doc-strings.
11053 (delete_all_subwindows): Rename to delete_all_child_windows.
11054 (Fdelete_other_windows_internal, Fset_window_configuration):
11055 Call delete_all_child_windows instead of delete_all_subwindows.
11056 * frame.c (delete_frame): Call delete_all_child_windows instead
11057 of delete_all_subwindows.
11059 2011-11-07 Paul Eggert <eggert@cs.ucla.edu>
11061 * alloc.c (DEADP): New macro, for porting to GNU/Hurd (Bug#9926).
11062 This is also needed for porting to any host where GC_MARK_STACK is
11063 not GC_MAKE_GCPROS_NOOPS.
11064 (which_symbols): Use it.
11066 2011-11-07 Kenichi Handa <handa@m17n.org>
11068 * coding.c (coding_set_destination): Check coding->src_pos only
11069 when coding->src_object is a buffer (bug#9910).
11071 * process.c (send_process): Set the member src_multibyte of coding
11072 to 0 (bug#9911) when sending a unibyte text.
11074 * callproc.c (Fcall_process): Set the member src_multibyte of
11075 process_coding to 0 (bug#9912).
11077 2011-11-06 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
11079 * xmenu.c (cleanup_widget_value_tree): New function.
11080 (xmenu_show, xdialog_show): Use it in record_unwind_protect instead of
11081 calling free_menubar_widget_value_tree directly (Bug#9830).
11083 2011-11-06 Paul Eggert <eggert@cs.ucla.edu>
11085 Fix some portability problems with 'inline'.
11086 * dispextern.h (window_box, window_box_height, window_text_bottom_y)
11087 (window_box_width, window_box_left, window_box_left_offset)
11088 (window_box_right, window_box_right_offset): Declare extern.
11089 Otherwise, these inline functions do not conform to C99 and
11090 are miscompiled by Microsoft compilers. Reported by Eli Zaretskii in
11091 <http://lists.gnu.org/archive/html/emacs-devel/2011-11/msg00084.html>.
11092 * intervals.c (adjust_intervals_for_insertion)
11093 (adjust_intervals_for_deletion): Now extern, because otherwise the
11094 extern inline functions 'offset_intervals' couldn't refer to it.
11095 (static_offset_intervals): Remove.
11096 (offset_intervals): Rewrite using the old contents of
11097 static_offset_intervals. The old version didn't conform to C99
11098 because an extern inline function contained a reference to an
11099 identifier with static linkage.
11101 2011-11-06 Andreas Schwab <schwab@linux-m68k.org>
11103 * keyboard.c (interrupt_signal): Don't call kill-emacs while in
11106 2011-11-06 Eli Zaretskii <eliz@gnu.org>
11108 * xdisp.c (init_iterator, reseat_to_string): Don't set the
11109 iterator's bidi_p flag if Vpurify_flag is non-nil. (Bug#9963)
11110 (Fcurrent_bidi_paragraph_direction): If Vpurify_flag is non-nil,
11111 return Qleft_to_right.
11113 2011-11-06 Chong Yidong <cyd@gnu.org>
11115 * window.c (Fwindow_live_p, Fwindow_frame, Fframe_root_window)
11116 (Fminibuffer_window, Fwindow_buffer, Fwindow_splits)
11117 (Fset_window_splits, Fwindow_nest, Fset_window_nest)
11118 (Fwindow_use_time, Fwindow_total_size, Fwindow_normal_size)
11119 (Fwindow_new_normal, Fwindow_left_column, Fwindow_top_line)
11120 (Fwindow_margins, Fwindow_fringes, Fwindow_scroll_bars)
11121 (Fwindow_vscroll): Doc fix.
11122 (Fwindow_top_child, Fwindow_left_child): Eliminate a nil default
11123 argument, since it makes no sense to pass a live window and for
11124 consistency with window-child.
11126 2011-11-05 Christoph Scholtes <cschol2112@googlemail.com>
11128 * makefile.w32-in ($(TEMACS), (gl-stamp)): Use $(THISDIR) to
11131 2011-11-05 Jason Rumney <jasonr@gnu.org>
11133 * w32font.c (font_matches_spec): Filter out non-Japanese kana fonts.
11134 (add_font_entity_to_list): Filter out non-Japanese Shift-JIS
11136 (add_font_entity_to_list): Fix logic errors in mixed boolean and
11137 bitwise arithmetic preventing use of unicode-sip and non-truetype
11140 2011-11-05 Eli Zaretskii <eliz@gnu.org>
11142 * s/ms-w32.h (fstat, stat, utime): Move redirections to
11145 * w32fns.c (x_create_tip_frame, Fx_create_frame): Rearrange
11146 initialization code to keep similarity to xfns.c after changes
11149 2011-11-05 Jan Djärv <jan.h.d@swipnet.se>
11151 * nsfns.m: Declare image_cache_refcount if GLYPH_DEBUG.
11152 (unwind_create_frame): New function (Bug#9943).
11153 (Fx_create_frame): Restructure code to be more similar to the one in
11154 xfns.c. Call record_unwind_protect with unwind_create_frame (Bug#9943).
11155 Initialize image_cache_refcount if GLYPH_DEBUG (Bug#9943).
11156 Move terminal->reference_count++ just before making the frame official
11159 * nsterm.m (x_free_frame_resources): New function.
11160 (x_destroy_window): Move code to x_free_frame_resources.
11162 * xfns.c (unwind_create_frame): Fix comment.
11163 (Fx_create_frame, x_create_tip_frame):
11164 Move terminal->reference_count++ just before making the frame
11165 official. Move initialization of image_cache_refcount and
11166 dpyinfo_refcount before calling init_frame_faces (Bug#9943).
11168 2011-11-05 Eli Zaretskii <eliz@gnu.org>
11170 Support MSVC build with newer versions of Visual Studio.
11171 * makefile.w32-in (TAGS-gmake): Don't use $(patsubst ...), as
11172 Nmake barfs on that. Use $(OBJ*_c) variables instead, defined on
11175 * lisp.h (ENUM_BF): New macro, for enumerated types in bitfields,
11176 which are not supported by MSVC.
11177 (Lisp_Symbol, Lisp_Misc_Any, Lisp_Marker, Lisp_Misc_Overlay)
11178 (Lisp_Save_Value, Lisp_Free): Use ENUM_BF for enumerated types in
11180 (Lisp_Object) [USE_LISP_UNION_TYPE]: Use ENUM_BF for enumerated
11181 types in bitfields.
11182 (DEFUN) [_MSC_VER]: Define in a different way for MSVC.
11184 * w32fns.c [_MSC_VER]: DECLARE_HANDLE for any MSVC version.
11186 2011-11-05 Fabrice Popineau <fabrice.popineau@supelec.fr> (tiny change)
11188 Support MSVC build with newer versions of Visual Studio.
11189 * w32.c: Don't include w32api.h for MSVC.
11190 (init_environment) [_MSC_VER]: Call sys_access, not _access.
11192 * s/ms-w32.h <sigset_t, ssize_t> [_MSC_VER]: Typedefs for MSVC.
11193 [_MSC_VER]: Include sys/timeb.h, sys/stat.h, and signal.h.
11194 (fstat, stat, utime) [_MSC_VER]: Redirect to their sys_* cousins.
11195 (malloc, free, realloc, calloc) [_MSC_VER]: Always redirect to the
11197 (alloca) [_MSC_VER]: Define to _alloca.
11199 * lisp.h (DECL_ALIGN) [_MSC_VER]: Define for MSVC.
11201 * regex.c <re_char> [_MSC_VER]: A separate definition for MSVC.
11203 2011-11-04 Eli Zaretskii <eliz@gnu.org>
11205 * xdisp.c (note_mouse_highlight): If either of
11206 previous/next-single-property-change returns nil, treat that as
11207 the beginning or the end of the buffer. (Bug#9955)
11209 2011-11-04 Jan Djärv <jan.h.d@swipnet.se>
11211 * gtkutil.c (xg_make_tool_item): Add callbacks if one of wimage or
11212 label is not null (Bug#9951).
11213 (xg_tool_item_stale_p): Handle the fact that wimage and/or wlbl
11216 2011-11-04 Eli Zaretskii <eliz@gnu.org>
11218 * window.c (Fwindow_body_size): Mention in the doc string that the
11219 return value is in frame's canonical units. (Bug#9949)
11221 2011-11-03 Eli Zaretskii <eliz@gnu.org>
11223 * xdisp.c (note_mouse_highlight): Initialize `area'. (Bug#9947)
11225 * w32fns.c (unwind_create_frame): If needed, free the glyph
11226 matrices of the partially constructed frame. (Bug#9943)
11227 * xfns.c (unwind_create_frame): Likewise.
11229 2011-11-01 Eli Zaretskii <eliz@gnu.org>
11231 * xdisp.c (mouse_face_from_buffer_pos): Fix a typo in a comment.
11232 Don't stop backward scan on the continuation glyph, even though
11233 its CHARPOS is positive.
11234 (mouse_face_from_buffer_pos, note_mouse_highlight):
11235 Rename cover_string to disp_string.
11237 2011-11-01 Martin Rudalics <rudalics@gmx.at>
11239 * window.c (temp_output_buffer_show): Don't use
11240 Vtemp_buffer_show_specifiers.
11241 (Vtemp_buffer_show_specifiers): Remove unused variable.
11243 2011-10-30 Eli Zaretskii <eliz@gnu.org>
11245 * xdisp.c (try_cursor_movement): Make sure ROW isn't decremented
11246 past the beginning of the current glyph matrix.
11248 2011-10-30 Adam Sjøgren <asjo@koldfront.dk> (tiny change)
11250 * xterm.c: Include X11/Xproto.h if HAVE_GTK3.
11251 (x_error_handler): Ignore BadMatch for X_SetInputFocus for
11252 HAVE_GTK3 (Bug#9869).
11254 * gtkutil.c (xg_win_to_widget, xg_event_is_for_menubar): Initialize
11255 type to GDK_NOTHING so valgrind does not complain (Bug#9901).
11257 * xterm.h (x_display_info): Add Xatom_net_wm_state_hidden (Bug#9893).
11259 * xterm.c: Declare x_handle_net_wm_state to return int.
11260 (handle_one_xevent): Check if we are iconified but don't have
11261 _NET_WM_STATE_HIDDEN. If do, treat as deiconify (Bug#9893).
11262 (get_current_wm_state): Return non-zero if not hidden,
11263 check for _NET_WM_STATE_HIDDEN (Bug#9893).
11264 (do_ewmh_fullscreen): Ignore return value from get_current_wm_state.
11265 (x_handle_net_wm_state): Return what get_current_wm_state returns.
11266 (x_term_init): Initialize dpyinfo->Xatom_net_wm_state_hidden.
11268 2011-10-29 Paul Eggert <eggert@cs.ucla.edu>
11270 * alloc.c (which_symbols): Declare EXTERNALLY_VISIBLE,
11271 so that this new function doesn't get optimized away by a
11272 whole-program optimizer. Make the 2nd arg EMACS_INT, not int.
11274 2011-10-29 Andreas Schwab <schwab@linux-m68k.org>
11276 * frame.h (MOUSE_HL_INFO): Remove excess parens.
11278 2011-10-29 Eli Zaretskii <eliz@gnu.org>
11280 Fix the `xbytecode' command.
11281 * .gdbinit (xprintbytestr): New command.
11282 (xwhichsymbols): Rename from `which'; all callers changed.
11283 (xbytecode): Print the byte-code string as well.
11285 2011-10-29 Kim Storm <storm@cua.dk>
11287 * alloc.c (which_symbols): New function.
11289 2011-10-29 Andreas Schwab <schwab@linux-m68k.org>
11291 * minibuf.c (read_minibuf_noninteractive): Allow reading empty
11294 2011-10-29 Glenn Morris <rgm@gnu.org>
11296 * process.c (wait_reading_process_output): Revert 2009-08-30 change.
11297 Not clear what it was for, and it causes various bugs. (Bug#9839)
11299 2011-10-28 Eli Zaretskii <eliz@gnu.org>
11301 * xdisp.c (note_mouse_highlight): Initialize `part', to avoid a
11302 possible random value that matches one of those tested as
11303 condition to clear the mouse face.
11305 2011-10-28 Chong Yidong <cyd@gnu.org>
11307 * xdisp.c (note_mouse_highlight): Fix use of uninitialized var.
11309 2011-10-28 Dan Nicolaescu <dann@ics.uci.edu>
11311 * window.c (make_window): Initialize phys_cursor_on_p.
11313 2011-10-28 Stefan Monnier <monnier@iro.umontreal.ca>
11315 * lisp.h (struct Lisp_Symbol): Update comments.
11317 2011-10-28 Juanma Barranquero <lekktu@gmail.com>
11319 * w32font.c (w32_load_unicows_or_gdi32): Add missing return.
11321 2011-10-28 Eli Zaretskii <eliz@gnu.org>
11323 Fix Emacs on Windows 9X (bug#8562). Thanks to oslsachem
11324 <oslsachem@gmail.com> for helping to debug this.
11326 * w32font.c (g_b_init_is_w9x, g_b_init_get_outline_metrics_w)
11327 (g_b_init_get_text_metrics_w, g_b_init_get_glyph_outline_w)
11328 (g_b_init_get_glyph_outline_w): New static variables.
11329 (GetOutlineTextMetricsW_Proc, GetTextMetricsW_Proc)
11330 (GetGlyphOutlineW_Proc): New typedefs.
11331 (w32_load_unicows_or_gdi32, get_outline_metrics_w)
11332 (get_text_metrics_w, get_glyph_outline_w, globals_of_w32font):
11334 (w32font_open_internal, compute_metrics):
11335 Call get_outline_metrics_w, get_text_metrics_w, and get_glyph_outline_w
11336 instead of calling the "wide" APIs directly.
11338 * emacs.c (main) [HAVE_NTGUI]: Call globals_of_w32font.
11340 * w32.h (syms_of_w32font): Add prototype.
11342 2011-10-27 Juanma Barranquero <lekktu@gmail.com>
11344 * window.c (Fframe_root_window, Fframe_first_window, Fwindow_end)
11345 (Fframe_selected_window, Ftemp_output_buffer_show, Fnext_window)
11346 (Fdelete_window_internal, Fwindow_parameters): Fix typos in docstrings.
11347 (Fmove_to_window_line): Doc fix.
11349 2011-10-27 Chong Yidong <cyd@gnu.org>
11351 * process.c (make_process): Set gnutls_state to NULL.
11353 * gnutls.c (emacs_gnutls_deinit): Deinit the gnutls_state if it is
11354 non-NULL, regardless of GNUTLS_INITSTAGE.
11355 (Fgnutls_boot): Cleanups. Call emacs_gnutls_deinit if we signal
11356 an error. Set process slots as soon as we allocate them.
11358 * gnutls.h (GNUTLS_LOG, GNUTLS_LOG2): Fix macros.
11360 2011-10-27 Chong Yidong <cyd@gnu.org>
11362 * gnutls.c (emacs_gnutls_deinit): New function.
11363 Deallocate credentials structures as well as calling gnutls_deinit.
11364 (Fgnutls_deinit, Fgnutls_boot): Use it.
11366 * process.c (make_process): Initialize GnuTLS credentials to NULL.
11367 (deactivate_process): Call emacs_gnutls_deinit.
11369 2011-10-27 Juanma Barranquero <lekktu@gmail.com>
11371 * image.c (x_create_x_image_and_pixmap):
11372 * w32.c (sys_rename, w32_delayed_load):
11373 * w32font.c (fill_in_logfont):
11374 * w32reg.c (x_get_string_resource): Silence compiler warnings.
11376 2011-10-26 Juanma Barranquero <lekktu@gmail.com>
11378 * w32fns.c (w32_default_color_map): New function,
11379 extracted from Fw32_default_color_map.
11380 (Fw32_default_color_map, Fx_open_connection): Use it. (Bug#9785)
11382 2011-10-25 Paul Eggert <eggert@cs.ucla.edu>
11384 * dispextern.h (Fcontrolling_tty_p): New decl (Bug#6649 part 2).
11386 2011-10-25 Stefan Monnier <monnier@iro.umontreal.ca>
11388 * keyboard.c (test_undefined): New function (bug#9751).
11389 (read_key_sequence): Use it to detect when a key is bound to `undefined'.
11391 2011-10-25 Enami Tsugutomo <tsugutomo.enami@jp.sony.com>
11393 * sysdep.c (init_sys_modes): Fix the check for the controlling
11394 terminal (Bug#6649).
11396 2011-10-20 Eli Zaretskii <eliz@gnu.org>
11398 * dispextern.h (struct bidi_it): New member next_en_type.
11400 * bidi.c (bidi_line_init): Initialize the next_en_type member.
11401 (bidi_resolve_explicit_1): When next_en_pos is valid for the
11402 current character, check also for next_en_type being WEAK_EN.
11403 (bidi_resolve_weak): Don't enter the expensive loop if the current
11404 position is before next_en_pos. Record the bidi type of the first
11405 non-ET, non-BN character we find, in addition to its position.
11406 (bidi_level_of_next_char): Invalidate next_en_type when
11407 next_en_pos is over-stepped.
11409 2011-10-20 Paul Eggert <eggert@cs.ucla.edu>
11411 Time zone name fixes for non-ASCII locales (Bug#641, Bug#9794)
11412 * editfns.c: Rewrite current-time-zone so that it invokes
11413 the equivalent of (format-time-string "%Z") to get the time zone name.
11414 This fixes a bug when the time zone name contains characters that
11415 need converting from the system time locale to Emacs internal format.
11416 This fixes a shortcoming that I introduced in my 1999-10-19 patch:
11417 that patch fixed format-time-string to do the conversion, but
11418 I forgot to fix current-time-zone.
11419 (format_time_string): New function, containing most of
11420 what Fformat_time_string used to contain.
11421 (Fformat_time_string): Rewrite in terms of format_time_string.
11422 This doesn't change this function's behavior.
11423 (current-time-zone): Rewrite to use format_time_string.
11424 This fixes the bug reported by Michael Schierl in
11425 <http://lists.gnu.org/archive/html/emacs-devel/2007-06/msg00334.html>.
11426 Jason Rumney's 2007-06-07 change worked around this bug, but
11428 * systime.h (tzname, timezone): Remove no-longer-used declarations.
11430 2011-10-19 Eli Zaretskii <eliz@gnu.org>
11432 * xdisp.c (start_display): If the character at POS is displayed
11433 via a display vector, reset IT->current.dpvec_index to zero.
11434 (try_window_reusing_current_matrix): If a line ends in a display
11435 vector or the next line starts in a display vector, continue
11436 redrawing the window even though the character position of
11437 start_row was reached.
11440 2011-10-18 Chong Yidong <cyd@gnu.org>
11442 * xdisp.c (get_next_display_element): Handle U+2010 and U+2011
11443 with nobreak-char-display too.
11445 2011-10-18 Eli Zaretskii <eliz@gnu.org>
11447 Fix part 3 of bug#9771.
11448 * bidi.c (bidi_line_init): Initialize next_en_pos to zero, not -1.
11449 (bidi_resolve_neutral): Don't enter the expensive loop looking for
11450 non-neutral characters if the current character is a paragraph
11451 separator (a.k.a. Newline). This avoids running the same
11452 expensive loop twice, once when we consume the preceding newline
11453 and the other time when the line actually needs to be displayed.
11454 Avoid the loop when we see neutrals on the base embedding level
11455 following a character whose directionality is the same as the
11456 paragraph's. This avoids running the expensive loop when a line
11457 ends in a long sequence of neutrals, like control characters.
11458 Add assertion against STRONG_AL type. Slightly rearrange code
11459 that determines the type of a neutral given the first non-neutral
11461 (bidi_level_of_next_char): Set next_en_pos to zero when
11462 invalidating its info.
11464 2011-10-17 Eli Zaretskii <eliz@gnu.org>
11466 * xdisp.c (push_display_prop): Determine whether to record string
11467 or buffer position by IT->string, not by IT->method. Allow
11468 GET_FROM_DISPLAY_VECTOR as IT->method on entry. (Bug#9771, part 4)
11469 (move_it_vertically_backward): Don't look for character position
11470 immediately after the newline when in a continuation line.
11473 2011-10-15 Martin Rudalics <rudalics@gmx.at>
11475 * window.c (coordinates_in_window): Rewrite and delabelize
11476 vertical border check. (Bug#5357) (Bug#9618)
11478 2011-10-14 Stefan Monnier <monnier@iro.umontreal.ca>
11480 * xterm.c (frame_highlight, frame_unhighlight): Ignore unexplained
11481 errors in XSetWindowBorder (bug#9310).
11483 2011-10-13 Dmitry Antipov <dmantipov@yandex.ru>
11485 * editfns.c (Fset_time_zone_rule): Replace free with xfree to
11486 avoid crash when xmalloc overrun checking is enabled.
11488 2011-10-13 Eli Zaretskii <eliz@gnu.org>
11490 * xdisp.c (Fcurrent_bidi_paragraph_direction): Initialize
11491 itb.paragraph_dir to NEUTRAL_DIR. Fixes an occasional incorrect
11492 cursor motion with <left> and <right> arrow keys.
11494 * bidi.c (bidi_init_it): Don't initialize paragraph_dir here, as
11495 some callers set that themselves.
11497 2011-10-12 Eli Zaretskii <eliz@gnu.org>
11499 * xdisp.c (find_row_edges): Handle the case where ROW comes from a
11500 display string and the previous row comes from the same string and
11501 is empty. (Bug#9739) (Bug#9738)
11503 2011-10-12 Stefan Monnier <monnier@iro.umontreal.ca>
11505 * doc.c (get_doc_string): Encode file name (bug#9735).
11507 2011-10-12 Eli Zaretskii <eliz@gnu.org>
11509 * bidi.c (bidi_level_of_next_char):
11510 * xdisp.c (get_visually_first_element): Remove old incorrect
11511 comments regarding the Unicode Line Separator character.
11513 * bidi.c (bidi_init_it): Initialize paragraph_dir to NEUTRAL_DIR.
11515 2011-10-12 Dmitry Antipov <dmantipov@yandex.ru>
11517 * alloc.c (Fgc_status): Do not access beyond zombies array
11518 boundary if nzombies > MAX_ZOMBIES.
11519 * alloc.c (dump_zombies): Add missing format specifier.
11521 2011-10-12 Paul Eggert <eggert@cs.ucla.edu>
11523 * xdisp.c (set_cursor_from_row): Simplify conditionals,
11524 to pacify GCC 4.6.1 x86-64 with -O2 -Wstrict-overflow.
11526 * lread.c (read_escape): Allow hex escapes as large as ?\xfffffff.
11527 Some packages use them to denote characters with modifiers.
11529 2011-10-11 Andreas Schwab <schwab@linux-m68k.org>
11531 * lisp.h (GCPRO1_VAR, GCPRO2_VAR, GCPRO3_VAR, GCPRO4_VAR)
11532 (GCPRO5_VAR, GCPRO6_VAR, UNGCPRO_VAR): Add whitespace to avoid
11533 matching a pp-number. Rename parameter var to var1.
11535 2011-10-11 Stefan Monnier <monnier@iro.umontreal.ca>
11537 * minibuf.c (Finternal_complete_buffer): Fix last change (bug#9709).
11539 2011-10-08 Glenn Morris <rgm@gnu.org>
11541 * callint.c (Fcall_interactively): Give a more explicit error for the
11542 'c' case with a non-character input. (Bug#8479)
11544 2011-10-08 Eli Zaretskii <eliz@gnu.org>
11546 * xdisp.c (hscroll_window_tree): Support hscroll in right-to-left
11548 (set_cursor_from_row): Fix cursor positioning in mixed L2R+R2L
11549 lines that are hscrolled on the left.
11551 * dispnew.c (buffer_posn_from_coords): Account for a possible
11552 presence of header-line. (Bug#4426)
11554 2011-10-07 Stefan Monnier <monnier@iro.umontreal.ca>
11556 * buffer.c (syms_of_buffer) <enable-multibyte-characters>:
11557 Don't advertise functionality which we discourage or doesn't work.
11559 2011-10-07 Paul Eggert <eggert@cs.ucla.edu>
11561 * alloc.c (GC_LISP_OBJECT_ALIGNMENT): Use offsetof, not __alignof__
11562 or sizeof. __alignof__ gives the wrong answer on Fedora x86-64
11563 with GCC 4.6.1 when configured with CC='gcc -m32' --with-wide-int;
11564 this makes Emacs dump core during garbage collection on rare
11565 occasions. sizeof is obviously inferior to offsetof here, so
11566 stick with offsetof.
11567 (GC_POINTER_ALIGNMENT): New macro.
11568 (mark_memory): Omit 3rd (offset) arg; caller changed.
11569 Don't assume EMACS_INT alignment is the same as pointer alignment.
11571 2011-10-03 Stefan Monnier <monnier@iro.umontreal.ca>
11573 * keyboard.c (read_key_sequence_remapped): New var.
11574 (read_key_sequence): Compute remapping in the right buffer.
11575 (command_loop_1): Use read_key_sequence's remapping directly.
11577 2011-10-02 Stefan Monnier <monnier@iro.umontreal.ca>
11579 * dired.c (file_name_completion): Don't expand file name.
11580 (Ffile_name_completion, Ffile_name_all_completions): Expand file name
11581 before checking file name handler.
11583 * minibuf.c (Finternal_complete_buffer): Only show internal buffers if
11584 they've been requested explicitly (bug#9591).
11586 2011-10-01 Andreas Schwab <schwab@linux-m68k.org>
11588 * keymap.c (Fsingle_key_description): Use make_specified_string
11589 instead of build_string to build string from push_key_description.
11592 2011-09-30 Paul Eggert <eggert@cs.ucla.edu>
11594 * buffer.h (struct buffer): Use time_t, not int, for a time stamp.
11595 This fixes a Y2038 bug on 64-bit hosts.
11596 * buffer.c (reset_buffer):
11597 * fileio.c (Fdo_auto_save, Fset_buffer_auto_saved)
11598 (Fclear_buffer_auto_save_failure):
11599 Use 0, not -1, to represent an unset failure time, since time_t
11600 might not be signed.
11602 Remove dependency on glibc malloc internals.
11603 * alloc.c (XMALLOC_OVERRUN_CHECK_OVERHEAD, XMALLOC_OVERRUN_CHECK_SIZE):
11604 Move back here from lisp.h, but with their new implementations.
11605 (XMALLOC_BASE_ALIGNMENT, COMMON_MULTIPLE, XMALLOC_HEADER_ALIGNMENT)
11606 (XMALLOC_OVERRUN_SIZE_SIZE): Move these new lisp.h macros here.
11607 * charset.c (charset_table_init): New static var.
11608 (syms_of_charset): Use it instead of xmalloc. This removes a
11609 dependency on glibc malloc internals. See Eli Zaretskii's comment in
11610 <http://lists.gnu.org/archive/html/emacs-devel/2011-09/msg00815.html>.
11611 * lisp.h (XMALLOC_OVERRUN_CHECK_OVERHEAD, XMALLOC_OVERRUN_CHECK_SIZE):
11612 Move back to alloc.c.
11613 (XMALLOC_BASE_ALIGNMENT, COMMON_MULTIPLE, XMALLOC_HEADER_ALIGNMENT)
11614 (XMALLOC_OVERRUN_SIZE_SIZE): Move to alloc.c.
11616 2011-09-30 Jan Djärv <jan.h.d@swipnet.se>
11618 * nsterm.m (windowDidResize): Call x_set_window_size only when
11619 ns_in_resize is true. Otherwise set pixelwidth/height and
11620 call change_frame_size (Bug#9628).
11622 2011-09-30 Paul Eggert <eggert@cs.ucla.edu>
11624 Port --enable-checking=all to Fedora 14 x86-64.
11625 * charset.c (syms_of_charset): Also account for glibc malloc's
11626 internal overhead when calculating the initial malloc maximum.
11628 Port --enable-checking=all to Fedora 14 x86.
11629 * alloc.c (XMALLOC_OVERRUN_CHECK_OVERHEAD, XMALLOC_OVERRUN_CHECK_SIZE):
11631 (xmalloc_put_size, xmalloc_get_size, overrun_check_malloc)
11632 (overrun_check_realloc, overrun_check_free):
11633 Use XMALLOC_OVERRUN_SIZE_SIZE, not sizeof (size_t).
11634 That way, xmalloc returns a properly-aligned pointer even if
11635 XMALLOC_OVERRUN_CHECK is defined. The old debugging code happened
11636 to align OK on typical 64-bit hosts, but not on Fedora 14 x86.
11637 * charset.c (syms_of_charset): Take XMALLOC_OVERRUN_CHECK_OVERHEAD
11638 into account when calculating the initial malloc maximum.
11639 * lisp.h (XMALLOC_OVERRUN_CHECK_OVERHEAD, XMALLOC_OVERRUN_CHECK_SIZE):
11640 Move here from alloc.c, so that charset.c can use it too.
11641 Properly align; the old code wasn't right for common 32-bit hosts
11642 when configured with --enable-checking=all.
11643 (XMALLOC_BASE_ALIGNMENT, COMMON_MULTIPLE, XMALLOC_HEADER_ALIGNMENT)
11644 (XMALLOC_OVERRUN_SIZE_SIZE): New macros.
11646 2011-09-29 Eli Zaretskii <eliz@gnu.org>
11648 * sysdep.c (snprintf) [!EOVERFLOW]: If EOVERFLOW is not defined,
11651 2011-09-28 Eli Zaretskii <eliz@gnu.org>
11653 * xdisp.c (compute_display_string_end): If there's no display
11654 string at CHARPOS, return -1.
11656 * bidi.c (bidi_fetch_char): When compute_display_string_end
11657 returns a negative value, treat the character as a normal
11658 character not covered by a display string. (Bug#9624)
11660 2011-09-28 Juanma Barranquero <lekktu@gmail.com>
11662 * lread.c (Fread_from_string): Fix typo in docstring.
11664 2011-09-27 Eli Zaretskii <eliz@gnu.org>
11666 * xdisp.c (handle_invisible_prop): If invisible text ends on a
11667 newline, reseat the iterator instead of bidi-iterating there one
11668 character at a time. (Bug#9610)
11669 (BUFFER_POS_REACHED_P, move_it_in_display_line_to): Bail when past
11670 TO_CHARPOS if the bidi iterator is at base embedding level.
11672 2011-09-27 Andreas Schwab <schwab@linux-m68k.org>
11674 * lread.c (readevalloop): Use correct code for NBSP.
11675 (read1): Likewise. (Bug#9608)
11677 2011-09-25 Michael Albinus <michael.albinus@gmx.de>
11679 * dbusbind.c (Fdbus_register_signal): When service is not
11680 registered, use nil in Vdbus_registered_objects_table. (Bug#9581)
11682 2011-09-25 Glenn Morris <rgm@gnu.org>
11684 * buffer.c (truncate-lines): Doc fix.
11686 2011-09-24 Chong Yidong <cyd@stupidchicken.com>
11688 * window.c (Fwindow_prev_buffers, Fset_window_prev_buffers)
11689 (Fset_window_next_buffers): Doc fix.
11691 2011-09-24 Glenn Morris <rgm@gnu.org>
11693 * minibuf.c (read_minibuf): Disable line truncation. (Bug#5715)
11695 2011-09-24 Paul Eggert <eggert@cs.ucla.edu>
11697 Fix minor problems found by static checking.
11698 * xdisp.c (string_from_display_spec): Don't assume vecsize fits in int.
11699 * indent.c (Fvertical_motion): Fix == vs = typo.
11701 2011-09-24 Eli Zaretskii <eliz@gnu.org>
11703 * dispnew.c (syms_of_display) <redisplay-dont-pause>:
11704 Default value is now t. Doc fix.
11706 * indent.c (Fvertical_motion): Compute and apply the overshoot
11707 logic when moving up, not only when moving down. Fix the
11708 confusing name and values of the it_overshoot_expected variable;
11709 logic changes accordingly. (Bug#9254) (Bug#9549)
11711 * xdisp.c (pos_visible_p): Produce correct pixel coordinates when
11712 CHARPOS is covered by a display string which includes newlines.
11713 (move_it_vertically_backward): Avoid inflooping when START_CHARPOS
11714 is covered by a display string with embedded newlines.
11716 2011-09-24 Michael Albinus <michael.albinus@gmx.de>
11718 * dbusbind.c (Fdbus_register_signal): Add match rule to
11719 Vdbus_registered_objects_table. (Bug#9581)
11720 (Fdbus_register_method, Vdbus_registered_objects_table):
11723 2011-09-24 Jim Meyering <meyering@redhat.com>
11725 do not ignore write error for any output size
11726 The previous change was incomplete.
11727 While it makes emacs --batch detect the vast majority of stdout
11728 write failures, errors were still ignored whenever the output size is
11729 k * (BUFSIZ+1) - 4. E.g., on a system with BUFSIZ of 4096,
11730 $ emacs --batch --eval '(print (format "%4093d" 0))' > /dev/full \
11731 && echo FAIL: ignored write error
11732 FAIL: ignored write error
11733 $ emacs --batch --eval '(print (format "%20481d" 0))' > /dev/full \
11734 && echo FAIL: ignored write error
11735 FAIL: ignored write error
11736 * emacs.c (Fkill_emacs): Also test ferror. (Bug#9574)
11738 2011-09-23 Andreas Schwab <schwab@linux-m68k.org>
11740 * emacs.c (Fkill_emacs): In noninteractive mode exit
11741 non-successfully if a write error occurred on stdout. (Bug#9574)
11743 2011-09-21 Eli Zaretskii <eliz@gnu.org>
11745 * xdisp.c (pop_it): Allow it->object that is a cons cell to pass
11748 * dispextern.h (struct it): Update the comment documenting what
11751 2011-09-20 Eli Zaretskii <eliz@gnu.org>
11753 * xdisp.c (set_cursor_from_row): If the row ends in a newline from
11754 a display string, extend search for cursor position to end of row.
11755 (find_row_edges): If the row ends in a newline from a display
11756 string, increment its MATRIX_ROW_END_CHARPOS by one. (Bug#9549)
11757 Handle the case of a display string with multiple newlines.
11758 (Fcurrent_bidi_paragraph_direction): Fix search for previous
11759 non-empty line. Fixes confusing cursor motion with arrow keys at
11760 the beginning of a line that starts with whitespace.
11762 2011-09-19 Lars Magne Ingebrigtsen <larsi@gnus.org>
11764 * lread.c (Fread_from_string): Document what FINAL-STRING-INDEX is
11767 2011-09-18 Chong Yidong <cyd@stupidchicken.com>
11769 * xfns.c (Fx_create_frame): Handle the bitmapIcon resource as
11770 boolean (Bug#9154).
11772 2011-09-18 Eli Zaretskii <eliz@gnu.org>
11774 * xdisp.c (display_line): Record maximum and minimum buffer
11775 positions even if no glyphs were produced (e.g., by a zero-width
11776 stretch). Fixes bug#9530 on a TTY. Under word-wrap, don't record
11777 buffer positions that will be removed from the glyph row because
11779 (produce_stretch_glyph): Fix a bug in :align-to on a TTY when the
11780 column is beyond frame width: don't subtract 1 "pixel" when
11781 computing width of the stretch.
11782 (reseat_at_next_visible_line_start): Undo the change made on
11783 2011-09-17 that saved paragraph information and restored it after
11784 the call to `reseat'. (Bug#9545)
11786 2011-09-18 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
11788 * xdisp.c (expose_window): Save original value of phys_cursor_on_p
11789 and turn window cursor on if cleared (Bug#9415).
11791 2011-09-18 Andreas Schwab <schwab@linux-m68k.org>
11793 * search.c (boyer_moore): Take unibyte characters from pattern
11794 literally. (Bug#9458)
11796 2011-09-18 Eli Zaretskii <eliz@gnu.org>
11798 * xdisp.c (reseat_at_next_visible_line_start): Fix last change.
11800 2011-09-18 Paul Eggert <eggert@cs.ucla.edu>
11802 Fix minor problem found by static checking.
11803 * xdisp.c (reseat_at_next_visible_line_start): Mark locals as
11804 initialized, to pacify gcc -Wuninitialized.
11806 * fileio.c: Report proper errno when syscall falls.
11807 (Finsert_file_contents): Save and restore errno,
11808 so that report_file_error outputs the correct diagnostic.
11809 (Fwrite_region) [CLASH_DETECTION]: Likewise.
11811 2011-09-18 Eli Zaretskii <eliz@gnu.org>
11813 * .gdbinit (pgx): Fix references to fields of `struct glyph'.
11815 2011-09-17 Eli Zaretskii <eliz@gnu.org>
11817 * xdisp.c (produce_stretch_glyph): Another fix for changes made on
11818 2011-08-30T17:32:44Z!eliz@gnu.org. (Bug#9530)
11820 2011-09-17 Eli Zaretskii <eliz@gnu.org>
11822 * xdisp.c (reseat_at_next_visible_line_start): Keep information
11823 about the current paragraph and restore it after the call to reseat.
11825 * bidi.c (MAX_PARAGRAPH_SEARCH): New macro.
11826 (bidi_find_paragraph_start): Search back for paragraph beginning
11827 at most MAX_PARAGRAPH_SEARCH lines; if not found, return BEGV_BYTE.
11828 (bidi_move_to_visually_next): Only trigger paragraph-related
11829 computations when the last character is a newline or at EOB, not
11830 just any NEUTRAL_B. (Bug#9470)
11832 * xdisp.c (set_cursor_from_row): Don't invoke special treatment of
11833 truncated lines if point is covered by a display string. (Bug#9524)
11835 2011-09-16 Paul Eggert <eggert@cs.ucla.edu>
11837 * xselect.c: Relax test for outgoing X longs (Bug#9498).
11838 (cons_to_x_long): New function.
11839 (lisp_data_to_selection_data): Use it. Correct the test for
11840 short-versus-long data; it was negated. Break out of vector
11841 loop, for efficiency, when a long datum is discovered.
11843 2011-09-16 Stefan Monnier <monnier@iro.umontreal.ca>
11845 * eval.c (Fquote): Document its non-consing behavior (bug#9482).
11847 2011-09-16 Eli Zaretskii <eliz@gnu.org>
11849 * image.c (tiff_handler): Work around a bug in MinGW GCC 3.x (see
11850 GCC PR/17406) by declaring this function with external scope.
11852 2011-09-15 Paul Eggert <eggert@cs.ucla.edu>
11854 * editfns.c (Fformat): Fix bug in text-property fix (Bug#9514).
11855 Don't mishandle (length (format "%%")) and (format "%4000s%%" "").
11857 2011-09-15 Andreas Schwab <schwab@linux-m68k.org>
11859 * editfns.c (Fformat): Correctly handle text properties on "%%".
11861 2011-09-15 Eli Zaretskii <eliz@gnu.org>
11863 * xterm.c (x_draw_composite_glyph_string_foreground):
11864 * w32term.c (x_draw_composite_glyph_string_foreground):
11865 * term.c (encode_terminal_code):
11866 * composite.c (composition_update_it, get_composition_id):
11867 * xdisp.c (get_next_display_element)
11868 (fill_composite_glyph_string): Add comments about special meaning
11869 of TAB characters in a composition.
11871 2011-09-15 Paul Eggert <eggert@cs.ucla.edu>
11873 * editfns.c (Fformat): Fix off-by-1 bug for "%%b" (Bug#9514).
11874 This occurs when processing a multibyte format.
11875 Problem reported by Wolfgang Jenker.
11877 2011-09-15 Johan Bockgård <bojohan@gnu.org>
11879 * xdisp.c (try_cursor_movement): Only check for exact match if
11880 cursor hpos found by set_cursor_from_row is valid. (Bug#9495)
11882 2011-09-14 Paul Eggert <eggert@cs.ucla.edu>
11884 Remove unused external symbols.
11885 * dispextern.h (calc_pixel_width_or_height): Remove decl.
11886 * xdisp.c (calc_pixel_width_or_height): Now static.
11887 * doprnt.c (exprintf) [! (HAVE_X_WINDOWS && USE_X_TOOLKIT)]: Remove.
11888 * indent.c (check_display_width):
11889 * w32term.c: Fix comment to match code.
11890 * xterm.c, xterm.h (x_catching_errors): Remove.
11892 2011-09-14 Paul Eggert <eggert@cs.ucla.edu>
11894 * xselect.c: Use signed conversions more consistently (Bug#9498).
11895 (selection_data_to_lisp_data): Assume incoming selection data are
11896 signed integers, not unsigned. This is to be consistent with
11897 outgoing selection data, which was modified to use signed integers
11898 in as part of the fix to Bug#9196 in response to Jan D.'s comment
11899 in <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9196#32> that X11
11900 expects long, not unsigned long.
11902 2011-09-14 Eli Zaretskii <eliz@gnu.org>
11904 * xdisp.c (try_window_reusing_current_matrix): Fix incorrect
11905 computation of loop end. Reported by Johan Bockgård
11908 2011-09-13 Chong Yidong <cyd@stupidchicken.com>
11910 * frame.c (Fother_visible_frames_p): Function deleted.
11912 2011-09-12 Eli Zaretskii <eliz@gnu.org>
11914 * indent.c (compute_motion): Process display vector front to back
11915 rather than the other way around. (Bug#2496)
11917 2011-09-12 Stefan Monnier <monnier@iro.umontreal.ca>
11919 * fileio.c (Finsert_file_contents): Don't assume beg_offset is 0.
11921 2011-09-11 Chong Yidong <cyd@stupidchicken.com>
11923 * minibuf.c (Fread_from_minibuffer): Doc fix.
11925 2011-09-11 Eli Zaretskii <eliz@gnu.org>
11927 * xdisp.c (produce_stretch_glyph): Fix a typo made in changes from
11928 2011-08-30T17:32:44Z!eliz@gnu.org. (Bug#9475)
11930 2011-09-11 Lars Magne Ingebrigtsen <larsi@gnus.org>
11932 * fileio.c (Fvisited_file_modtime): Document `(-1 65535)' as a
11933 value for non-existent files.
11935 2011-09-11 Eli Zaretskii <eliz@gnu.org>
11937 * fileio.c (Finsert_file_contents): If the file cannot be opened,
11938 set its "size" to -1. This will set the modtime_size field of
11939 the corresponding buffer to -1, which is what
11940 verify-visited-file-modtime expects for files that do not exist.
11943 2011-09-11 Paul Eggert <eggert@cs.ucla.edu>
11945 * keymap.h (KEY_DESCRIPTION_SIZE, push_key_description): Move decls
11947 * lisp.h: ... from here. push_key_description is no longer
11948 defined in keyboard.c, so its declaration should not be in
11949 lisp.h's "Defined in keyboard.c" section, and KEY_DESCRIPTION_SIZE
11950 logically belongs with push_key_description.
11952 2011-09-10 Paul Eggert <eggert@cs.ucla.edu>
11954 * buffer.h: Include <sys/types.h> instead of <time.h>.
11955 Otherwise, off_t wasn't defined on FreeBSD 9.0-BETA2 i386.
11956 Problem reported by Herbert J. Skuhra.
11958 2011-09-10 Lars Magne Ingebrigtsen <larsi@gnus.org>
11960 * xml.c (parse_region): Make the parsing work for
11961 non-comment-starting XML files again (bug#9144).
11963 2011-09-10 Andreas Schwab <schwab@linux-m68k.org>
11965 * image.c (gif_load): Fix calculation of bottom and right corner.
11968 2011-09-10 Eli Zaretskii <eliz@gnu.org>
11970 * xdisp.c (MAX_DISP_SCAN): Decrease to 250. Prevents sluggish
11971 redisplay in small windows.
11973 2011-09-09 Eli Zaretskii <eliz@gnu.org>
11975 * frame.c (x_report_frame_params): Cast to avoid compiler warnings.
11977 2011-09-08 Martin Rudalics <rudalics@gmx.at>
11979 * window.c (Fset_window_prev_buffers, Fset_window_next_buffers):
11980 Operate on live windows only.
11982 2011-09-08 Juanma Barranquero <lekktu@gmail.com>
11984 * emacs.c (my_heap_start): #ifdef to avoid warnings when unused.
11986 2011-09-07 Eli Zaretskii <eliz@gnu.org>
11988 * xdisp.c (move_it_in_display_line_to): Call RESTORE_IT on ppos_it
11989 only under bidi iteration.
11991 2011-09-07 Jan Djärv <jan.h.d@swipnet.se>
11993 * gtkutil.c (xg_make_tool_item): Insert comment about eventbox.
11995 2011-09-06 Paul Eggert <eggert@cs.ucla.edu>
11997 isnan: Fix porting problem to Solaris 10 with bundled gcc.
11998 Without this fix, the command to link temacs failed due to an
11999 undefined symbol __builtin_isnan. This is because
12000 /usr/include/iso/math_c99.h #defines isnan(x) to
12001 __builtin_isnan(x), but the bundled gcc, which identifies itself
12002 as gcc 3.4.3 (csl-sol210-3_4-branch+sol_rpath), does not have
12004 * floatfns.c (isnan): #undef, and then #define to a clone of
12006 (Fisnan): Always define, since it's always available now.
12007 (syms_of_floatfns): Always define isnan at the Lisp level.
12009 2011-09-06 Paul Eggert <eggert@cs.ucla.edu>
12011 * Makefile.in (gl-stamp): move-if-change now in build-aux (Bug#9169).
12013 2011-09-06 Paul Eggert <eggert@cs.ucla.edu>
12015 * fileio.c: Fix bugs with large file offsets (Bug#9428).
12016 The previous code assumed that file offsets (off_t values) fit in
12017 EMACS_INT variables, which is not true on typical 32-bit hosts.
12018 The code messed up by falsely reporting buffer overflow in cases
12019 such as (insert-file-contents "big" nil 1 2) into an empty buffer
12020 when "big" contains more than 2**29 bytes, even though this
12021 inserts just one byte and does not overflow the buffer.
12022 (Finsert_file_contents): Store file offsets as off_t
12023 values, not as EMACS_INT values. Check for overflow when
12024 converting between EMACS_INT and off_t. When checking for
12025 buffer overflow or for overlap, take the offsets into account.
12026 Don't use EMACS_INT for small values where int suffices.
12027 When checking for overlap, fix a typo: ZV was used where
12028 ZV_BYTE was intended.
12029 (Fwrite_region): Don't assume off_t fits into 'long'.
12030 * buffer.h (struct buffer.modtime_size): Now off_t, not EMACS_INT.
12032 2011-09-05 Michael Albinus <michael.albinus@gmx.de>
12034 * dbusbind.c (xd_signature_cat): Rename from signature_cat.
12036 2011-09-04 Paul Eggert <eggert@cs.ucla.edu>
12038 sprintf-related integer and memory overflow issues (Bug#9412).
12040 * doprnt.c (doprnt): Support printing ptrdiff_t and intmax_t values.
12041 (esprintf, exprintf, evxprintf): New functions.
12042 * keyboard.c (command_loop_level): Now EMACS_INT, not int.
12043 (cmd_error): Kbd macro iterations count is now EMACS_INT, not int.
12044 (modify_event_symbol): Do not assume that the length of
12045 name_alist_or_stem is safe to alloca and fits in int.
12046 (Fexecute_extended_command): Likewise for function name and binding.
12047 (Frecursion_depth): Wrap around reliably on integer overflow.
12048 * keymap.c (push_key_description): First arg is now EMACS_INT, not int,
12049 since some callers pass EMACS_INT values.
12050 (Fsingle_key_description): Don't crash if symbol name contains more
12051 than MAX_ALLOCA bytes.
12052 * minibuf.c (minibuf_level): Now EMACS_INT, not int.
12053 (get_minibuffer): Arg is now EMACS_INT, not int.
12054 * lisp.h (get_minibuffer, push_key_description): Reflect API changes.
12055 (esprintf, exprintf, evxprintf): New decls.
12056 * window.h (command_loop_level, minibuf_level): Reflect API changes.
12058 * dbusbind.c (signature_cat): New function.
12059 (xd_signature, Fdbus_register_signal):
12060 Do not overrun buffer; instead, report string overflow.
12062 * dispnew.c (add_window_display_history): Don't overrun buffer.
12063 Truncate instead; this is OK since it's just a log.
12065 * editfns.c (Fcurrent_time_zone): Don't overrun buffer
12066 even if the time zone offset is outlandishly large.
12067 Don't mishandle offset == INT_MIN.
12069 * emacs.c (main) [NS_IMPL_COCOA]: Don't overrun buffer
12070 when creating daemon; the previous buffer-overflow check was incorrect.
12072 * eval.c (verror): Simplify by rewriting in terms of evxprintf,
12073 which has the guts of the old verror function.
12075 * filelock.c (lock_file_1, lock_file): Don't blindly alloca long name;
12076 use SAFE_ALLOCA instead. Use esprintf to avoid int-overflow issues.
12078 * font.c: Include <float.h>, for DBL_MAX_10_EXP.
12079 (font_unparse_xlfd): Don't blindly alloca long strings.
12080 Don't assume XINT result fits in int, or that XFLOAT_DATA * 10
12081 fits in int, when using sprintf. Use single snprintf to count
12082 length of string rather than counting it via multiple sprintfs;
12083 that's simpler and more reliable.
12084 (font_unparse_fcname): Use it to avoid sprintf buffer overrun.
12085 (generate_otf_features) [0 && HAVE_LIBOTF]: Use esprintf, not
12086 sprintf, in case result does not fit in int.
12088 * fontset.c (num_auto_fontsets): Now printmax_t, not int.
12089 (fontset_from_font): Print it.
12091 * frame.c (tty_frame_count): Now printmax_t, not int.
12092 (make_terminal_frame, set_term_frame_name): Print it.
12093 (x_report_frame_params): In X, window IDs are unsigned long,
12094 not signed long, so print them as unsigned.
12095 (validate_x_resource_name): Check for implausibly long names,
12096 and don't assume name length fits in 'int'.
12097 (x_get_resource_string): Don't blindly alloca invocation name;
12098 use SAFE_ALLOCA. Use esprintf, not sprintf, in case result does
12101 * gtkutil.c: Include <float.h>, for DBL_MAX_10_EXP.
12102 (xg_check_special_colors, xg_set_geometry):
12103 Make sprintf buffers a bit bigger, to avoid potential buffer overrun.
12105 * lread.c (dir_warning): Don't blindly alloca buffer; use SAFE_ALLOCA.
12106 Use esprintf, not sprintf, in case result does not fit in int.
12108 * macros.c (executing_kbd_macro_iterations): Now EMACS_INT, not int.
12109 (Fend_kbd_macro): Don't mishandle MOST_NEGATIVE_FIXNUM by treating
12110 it as a large positive number.
12111 (Fexecute_kbd_macro): Don't assume repeat count fits in int.
12112 * macros.h (executing_kbd_macro_iterations): Now EMACS_INT, not int.
12114 * nsterm.m ((NSSize)windowWillResize): Use esprintf, not sprintf,
12115 in case result does not fit in int.
12117 * print.c (float_to_string): Detect width overflow more reliably.
12118 (print_object): Make sprintf buffer a bit bigger, to avoid potential
12119 buffer overrun. Don't assume list length fits in 'int'. Treat
12120 print length of 0 as 0, not as infinity; to be consistent with other
12121 uses of print length in this function. Don't overflow print length
12122 index. Don't assume hash table size fits in 'long', or that
12123 vectorlike size fits in 'unsigned long'.
12125 * process.c (make_process): Use printmax_t, not int, to format
12126 process-name gensyms.
12128 * sysdep.c (snprintf) [! HAVE_SNPRINTF]: New function.
12130 * term.c (produce_glyphless_glyph): Make sprintf buffer a bit bigger
12131 to avoid potential buffer overrun.
12133 * xfaces.c (x_update_menu_appearance): Don't overrun buffer
12134 if X resource line is longer than 512 bytes.
12136 * xfns.c (x_window): Make sprintf buffer a bit bigger
12137 to avoid potential buffer overrun.
12139 * xterm.c (x_io_error_quitter): Don't overrun sprintf buffer.
12141 * xterm.h (x_check_errors): Add ATTRIBUTE_FORMAT_PRINTF.
12143 2011-09-04 Paul Eggert <eggert@cs.ucla.edu>
12145 Integer overflow fixes for scrolling, etc.
12146 Without these, Emacs silently mishandles large integers sometimes.
12147 For example, "C-u 4294967297 M-x recenter" was treated as if
12148 it were "C-u 1 M-x recenter" on a typical 64-bit host.
12150 * xdisp.c (try_window_id): Check Emacs fixnum range before
12151 converting to 'int'.
12153 * window.c (window_scroll_line_based, Frecenter):
12154 Check that an Emacs fixnum is in range before assigning it to 'int'.
12155 (Frecenter, Fmove_to_window_line): Use EMACS_INT, not int, for
12156 values converted from Emacs fixnums.
12157 (Frecenter): Don't wrap around a line count if it is out of 'int'
12158 range; instead, treat it as an extreme value.
12159 (Fset_window_configuration, compare_window_configurations):
12160 Use ptrdiff_t, not int, for index that might exceed 2 GiB.
12162 * search.c (Freplace_match): Use ptrdiff_t, not int, for indexes
12163 that can exceed INT_MAX. Check that EMACS_INT value is in range
12164 before assigning it to the (possibly-narrower) index.
12165 (match_limit): Don't assume that a fixnum can fit in 'int'.
12167 * print.c (print_object): Use ptrdiff_t, not int, for index that can
12170 * indent.c (position_indentation): Now takes ptrdiff_t, not int.
12171 (Fvertical_motion): Don't wrap around LINES values that don't fit
12172 in 'int'. Instead, treat them as extreme values. This is good
12173 enough for windows, which can't have more than INT_MAX lines anyway.
12175 2011-09-03 Lars Magne Ingebrigtsen <larsi@gnus.org>
12177 * Require libxml/parser.h to avoid compilation warning.
12179 * emacs.c (shut_down_emacs): Call xmlCleanupParser on shutdown.
12181 * xml.c (parse_region): Don't call xmlCleanupParser after parsing,
12182 since this reportedly can destroy thread storage.
12184 2011-08-30 Chong Yidong <cyd@stupidchicken.com>
12186 * syntax.c (find_defun_start): Update all cache variables if
12187 exiting early (Bug#9401).
12189 2011-08-30 Eli Zaretskii <eliz@gnu.org>
12191 * image.c (x_bitmap_pixmap): Cast to int to avoid compiler warnings.
12193 * xdisp.c (produce_stretch_glyph): No longer static, compiled also
12194 when HAVE_WINDOW_SYSTEM is not defined. Support both GUI and TTY
12195 frames. Call tty_append_glyph in the TTY case. (Bug#9402)
12197 * term.c (tty_append_glyph): New function.
12198 (produce_stretch_glyph): Static function and its prototype deleted.
12200 * dispextern.h (produce_stretch_glyph, tty_append_glyph):
12203 2011-08-29 Paul Eggert <eggert@cs.ucla.edu>
12205 * image.c (parse_image_spec): Check for nonnegative, not for positive,
12206 when checking :margin (Bug#9390).
12207 (IMAGE_NON_NEGATIVE_INTEGER_VALUE_OR_PAIR):
12208 Rename from IMAGE_POSITIVE_INTEGER_VALUE_OR_PAIR,
12209 so that the name doesn't mislead. All uses changed.
12211 2011-08-28 Johan Bockgård <bojohan@gnu.org>
12213 * term.c (init_tty) [HAVE_GPM]: Move mouse settings after
12216 2011-08-27 Eli Zaretskii <eliz@gnu.org>
12218 * xdisp.c (move_it_to): Don't bail out early when reaching
12219 position beyond to_charpos, if we are scanning backwards.
12220 (move_it_vertically_backward): When DY == 0, make sure we get to
12221 the first character in the line after the newline.
12223 2011-08-27 Paul Eggert <eggert@cs.ucla.edu>
12225 * ccl.c: Improve and simplify overflow checking (Bug#9196).
12226 (ccl_driver): Do not generate an out-of-range pointer.
12227 (Fccl_execute_on_string): Remove unnecessary check for
12228 integer overflow, noted by Stefan Monnier in
12229 <http://lists.gnu.org/archive/html/emacs-devel/2011-08/msg00979.html>.
12230 Remove a FIXME that didn't need fixing.
12231 Simplify the newly-introduced buffer reallocation code.
12233 2011-08-27 Juanma Barranquero <lekktu@gmail.com>
12235 * makefile.w32-in ($(BLD)/alloc.$(O)): Depend on lib/verify.h.
12237 2011-08-26 Paul Eggert <eggert@cs.ucla.edu>
12239 Integer and memory overflow issues (Bug#9196).
12241 * doc.c (get_doc_string): Rework so that
12242 get_doc_string_buffer_size is the actual buffer size, rather than
12243 being 1 less than the actual buffer size; this makes xpalloc more
12246 * image.c (x_allocate_bitmap_record, cache_image):
12247 * xselect.c (Fx_register_dnd_atom):
12248 Simplify previous changes by using xpalloc.
12250 * buffer.c (overlay_str_len): Now ptrdiff_t, not EMACS_INT,
12251 since either will do and ptrdiff_t is convenient with xpalloc.
12253 * charset.c (charset_table_size)
12254 (struct charset_sort_data.priority): Now ptrdiff_t.
12255 (charset_compare): Don't overflow if priorities differ greatly.
12256 (Fsort_charsets): Don't assume list length fits in int.
12257 Check for size-calculation overflow when allocating sort data.
12258 (syms_of_charset): Allocate an initial charset table that is
12259 just under 64 KiB, to avoid problems with glibc malloc and mmap.
12261 * cmds.c (internal_self_insert): Check for size-calculation overflow.
12263 * composite.h (struct composition.glyph_len): Now int, not unsigned.
12264 The actual value is always <= INT_MAX, and leaving it unsigned made
12265 overflow checking harder.
12267 * dispextern.h (struct glyph_matrix.rows_allocated)
12268 (struct face_cache.size): Now ptrdiff_t, for convenience in use
12269 with xpalloc. The values are still always <= INT_MAX.
12271 * indent.c (compute_motion): Adjust to region_cache_forward sig change.
12273 * lisp.h (xnmalloc, xnrealloc, xpalloc): New decls.
12274 (SAFE_NALLOCA): New macro.
12276 * region-cache.c (struct boundary.pos, find_cache_boundary)
12277 (move_cache_gap, insert_cache_boundary, delete_cache_boundaries)
12278 (set_cache_region, invalidate_region_cache)
12279 (revalidate_region_cache, know_region_cache, region_cache_forward)
12280 (region_cache_backward, pp_cache):
12281 Use ptrdiff_t, not EMACS_INT, since either will do. This is needed
12282 so that ptrdiff_t * can be passed to xpalloc.
12283 (struct region_cache): Similarly, for gap_start, gap_len, cache_len,
12284 beg_unchanged, end_unchanged, buffer_beg, buffer_end members.
12285 (pp_cache): Don't assume cache_len fits in int.
12286 * region-cache.h: Adjust extern decls to match.
12288 * search.c (scan_buffer, Freplace_match): Use ptrdiff_t, not
12289 EMACS_INT, since either will do, for xpalloc.
12291 * alloc.c: Include verify.h, and check that int fits in ptrdiff_t.
12292 (xnmalloc, xnrealloc, xpalloc): New functions.
12294 * bidi.c (bidi_shelve_header_size): New constant.
12295 (bidi_cache_ensure_space, bidi_shelve_cache): Use it.
12296 (bidi_cache_ensure_space): Avoid integer overflow when allocating.
12298 * bidi.c (bidi_cache_shrink):
12299 * buffer.c (overlays_at, overlays_in, record_overlay_string)
12301 Don't update size of array until after memory allocation succeeds,
12302 because xmalloc/xrealloc may not return.
12303 (struct sortstrlist.bytes): Now ptrdiff_t, as EMACS_INT doesn't help
12304 now that we have proper integer overflow checking.
12305 (record_overlay_string, overlay_strings): Catch overflows when
12306 calculating size of overlay_str_buf.
12308 * callproc.c (Fcall_process): Check for size overflow when
12309 calculating size of args2.
12310 (child_setup): Avoid overflow by using size_t rather than ptrdiff_t.
12311 Normally we prefer signed values, but sticking with ptrdiff_t would
12312 require adding more-complicated checks.
12314 * ccl.c (Fccl_execute_on_string): Check for memory overflow.
12315 Use ptrdiff_t rather than EMACS_INT where ptrdiff_t will do.
12316 Redo buffer-overflow calculations to avoid integer overflow.
12317 Add a FIXME comment where memory seems to be over-allocated.
12319 * character.c (Fstring): Check for size-calculation overflow.
12321 * coding.c (produce_chars): Redo buffer-overflow calculations to avoid
12322 unnecessary integer overflow. Check for size overflow.
12323 (encode_coding_object): Don't update size until xmalloc succeeds.
12325 * composite.c (get_composition_id): Check for overflow in glyph
12326 length calculations.
12328 Integer and memory overflow fixes for display code.
12329 * dispextern.h (struct glyph_pool.nglyphs): Now ptrdiff_t, not int.
12330 * dispnew.c (adjust_glyph_matrix, realloc_glyph_pool)
12331 (scrolling_window): Check for overflow in size calculations.
12332 (line_draw_cost, realloc_glyph_pool, add_row_entry):
12333 Don't assume glyph table len fits in int.
12334 (struct row_entry.bucket, row_entry_pool_size, row_entry_idx)
12335 (row_table_size): Now ptrdiff_t, not int.
12336 (scrolling_window): Avoid overflow in size calculations.
12337 Don't update size until allocation succeeds.
12338 * fns.c (concat): Check for overflow in size calculations.
12339 (next_almost_prime): Verify NEXT_ALMOST_PRIME_LIMIT.
12340 * lisp.h (RANGED_INTEGERP, TYPE_RANGED_INTEGERP): New macros.
12341 (NEXT_ALMOST_PRIME_LIMIT): New constant.
12343 * doc.c (get_doc_string_buffer_size): Now ptrdiff_t, not int.
12344 (get_doc_string): Check for size calculation overflow.
12345 Don't update size until allocation succeeds.
12346 (get_doc_string, Fsubstitute_command_keys): Use ptrdiff_t, not
12347 EMACS_INT, where ptrdiff_t will do.
12348 (Fsubstitute_command_keys): Check for string overflow.
12350 * editfns.c (set_time_zone_rule): Don't assume environment length
12352 (message_length): Now ptrdiff_t, not int.
12353 (Fmessage_box): Don't update size until allocation succeeds.
12354 Don't assume message length fits in int.
12355 (Fformat): Use ptrdiff_t, not EMACS_INT, where ptrdiff_t will do.
12357 * emacs.c (main): Do not reallocate argv, since there is a null at
12358 the end that can be overwritten, and this way there's no need to
12359 worry about size-calculation overflow.
12360 (sort_args): Check for size-calculation overflow.
12362 * eval.c (init_eval_once, grow_specpdl): Don't update size until
12364 (call_debugger, grow_specpdl): Redo calculations to avoid overflow.
12366 * frame.c (set_menu_bar_lines, x_set_frame_parameters)
12367 (x_set_scroll_bar_width, x_figure_window_size):
12368 Check for integer overflow.
12369 (x_set_alpha): Do not assume XINT fits in int.
12371 * frame.h (struct frame): Use int, not EMACS_INT, where int works.
12372 This is for the members text_lines, text_cols, total_lines, total_cols,
12373 where the system imposes an 'int' limit.
12375 * fringe.c (Fdefine_fringe_bitmap):
12376 Don't update size until alloc works.
12378 * ftfont.c (ftfont_get_open_type_spec, setup_otf_gstring)
12379 (ftfont_shape_by_flt): Check for integer overflow in size calculations.
12381 * gtkutil.c (get_utf8_string, xg_store_widget_in_map):
12382 Check for size-calculation overflow.
12383 (get_utf8_string): Use ptrdiff_t, not size_t, where either will
12384 do, as we prefer signed integers.
12385 (id_to_widget.max_size, id_to_widget.used)
12386 (xg_store_widget_in_map, xg_remove_widget_from_map)
12387 (xg_get_widget_from_map, xg_get_scroll_id_for_window)
12388 (xg_remove_scroll_bar, xg_update_scrollbar_pos):
12389 Use and return ptrdiff_t, not int.
12390 (xg_gtk_scroll_destroy): Don't assume ptrdiff_t fits in int.
12391 * gtkutil.h: Change prototypes to match the above.
12393 * image.c (RANGED_INTEGERP, TYPE_RANGED_INTEGERP): Remove; these
12394 are duplicate now that they've been promoted to lisp.h.
12395 (x_allocate_bitmap_record, x_alloc_image_color)
12396 (make_image_cache, cache_image, xpm_load):
12397 Don't update size until alloc is done.
12398 (xpm_load, lookup_rgb_color, lookup_pixel_color, x_to_xcolors)
12400 Check for size calculation overflow.
12401 (ct_colors_allocated_max): New constant.
12402 (x_to_xcolors, x_detect_edges): Reorder multiplicands to avoid
12405 * keyboard.c (read_char, menu_bar_items, tool_bar_items)
12406 (read_char_x_menu_prompt, read_char_minibuf_menu_width)
12407 (read_char_minibuf_menu_prompt, follow_key, read_key_sequence):
12408 Use ptrdiff_t, not int, to count maps.
12409 (read_char_minibuf_menu_prompt): Check for overflow in size
12410 calculations. Don't update size until allocation succeeds.
12411 Redo calculations to avoid overflow.
12412 * keyboard.h: Change prototypes to match the above.
12414 * keymap.c (cmm_size, current_minor_maps): Use ptrdiff_t, not int,
12416 (current_minor_maps): Check for size calculation overflow.
12417 * keymap.h: Change prototypes to match the above.
12419 * lread.c (read1, init_obarray): Don't update size until alloc done.
12421 * macros.c (Fstart_kbd_macro): Don't update size until alloc done.
12422 (store_kbd_macro_char): Reorder multiplicands to avoid overflow.
12424 * nsterm.h (struct ns_color_table.size, struct ns_color_table.avail):
12425 Now ptrdiff_t, not int.
12426 * nsterm.m (ns_index_color): Use ptrdiff_t, not int, for table indexes.
12427 (ns_draw_fringe_bitmap): Rewrite to avoid overflow.
12429 * process.c (Fnetwork_interface_list): Check for overflow
12430 in size calculation.
12432 * region-cache.c (move_cache_gap): Check for size calculation overflow.
12434 * scroll.c (do_line_insertion_deletion_costs): Check for size calc
12435 overflow. Don't bother calling xmalloc when xrealloc will do.
12437 * search.c (Freplace_match): Check for size calculation overflow.
12438 (Fset_match_data): Don't assume list lengths fit in 'int'.
12440 * sysdep.c (system_process_attributes): Use ptrdiff_t, not int,
12441 for command line length. Do not attempt to address one before the
12442 beginning of an array, as that's not portable.
12444 * term.c (max_frame_lines): Remove; unused.
12445 (encode_terminal_src_size, encode_terminal_dst_size): Now ptrdiff_t,
12447 (encode_terminal_code, calculate_costs): Check for size
12448 calculation overflow.
12449 (encode_terminal_code): Use ptrdiff_t, not int, to record glyph
12450 table lengths and related sizes. Don't update size until alloc
12451 done. Redo calculations to avoid overflow.
12452 (calculate_costs): Don't bother calling xmalloc when xrealloc will do.
12454 * termcap.c (tgetent): Use ptrdiff_t, not int, to record results of
12455 subtracting pointers.
12456 (gobble_line): Check for overflow more carefully. Don't update size
12459 * tparam.c (tparam1): Use ptrdiff_t, not int, for sizes.
12460 Don't update size until alloc done.
12461 Redo size calculations to avoid overflow.
12462 Check for size calculation overflow.
12463 (main) [DEBUG]: Fix typo in invoking tparam1.
12465 * xdisp.c (store_mode_line_noprop_char, x_consider_frame_title):
12466 Use ptrdiff_t, not int, for sizes.
12467 (store_mode_line_noprop_char): Don't update size until alloc done.
12469 * xfaces.c (lface_id_to_name_size, Finternal_make_lisp_face):
12470 Use ptrdiff_t, not int, for sizes.
12471 (Finternal_make_lisp_face, cache_face):
12472 Check for size calculation overflow.
12473 (cache_face): Treat size calculation overflows as if they were
12474 memory exhaustion (the usual treatment), rather than aborting.
12476 * xfns.c (x_encode_text, x_set_name_internal)
12477 (Fx_change_window_property): Use ptrdiff_t, not int, to count
12478 sizes, since they can exceed INT_MAX in size. Check for size
12479 calculation overflow.
12481 * xgselect.c (gfds_size): Now ptrdiff_t, for convenience with xpalloc.
12482 (xg_select): Check for size calculation overflow.
12483 Don't update size until alloc done.
12485 * xrdb.c (get_environ_db): Don't assume path length fits in int,
12486 as sprintf is limited to int lengths.
12488 * xselect.c (X_LONG_SIZE, X_SHRT_MAX, X_SHRT_MIN, X_LONG_MAX)
12489 (X_LONG_MIN): New macros.
12490 Use them to make the following changes clearer.
12491 (MAX_SELECTION_QUANTUM): Make the other bounds on this value clearer.
12492 This change doesn't affect the value now, but it may help remind
12493 future maintainers not to raise the value too much later.
12494 (SELECTION_QUANTUM): Remove, replacing with ...
12495 (selection_quantum): ... new function, which avoids overflow.
12497 (struct selection_data.size): Now ptrdiff_t, not int, to avoid
12498 assumption that selection length fits in 'int'.
12499 (x_reply_selection_request, x_handle_selection_request)
12500 (x_get_window_property, receive_incremental_selection)
12501 (x_get_window_property_as_lisp_data, selection_data_to_lisp_data)
12502 (lisp_data_to_selection_data, clean_local_selection_data):
12503 Use ptrdiff_t, not int, to record length of selection.
12504 (x_reply_selection_request, x_get_window_property)
12505 (receive_incremental_selection, x_property_data_to_lisp):
12506 Redo calculations to avoid overflow.
12507 (x_reply_selection_request): When sending hint, ceiling it at
12508 X_LONG_MAX rather than relying on wraparound overflow to send
12510 (x_get_window_property, receive_incremental_selection)
12511 (lisp_data_to_selection_data, x_property_data_to_lisp):
12512 Check for size-calculation overflow.
12513 (x_get_window_property, receive_incremental_selection)
12514 (lisp_data_to_selection_data, Fx_register_dnd_atom):
12515 Don't store size until memory allocation succeeds.
12516 (x_get_window_property): Plug memory leak on memory exhaustion.
12517 Don't double-block input; malloc is safe here. Don't assume 2**34
12518 - 4 fits in unsigned long. Add an xassert to check
12519 XGetWindowProperty overflow. Be more careful about overflow
12520 calculations, and distinguish size from memory overflow better.
12521 (receive_incremental_selection): When tracing, don't assume
12522 unsigned int is less than INT_MAX.
12523 (x_selection_data_to_lisp_data): Remove unnecessary (and in theory
12524 harmful) conversions of unsigned short to int.
12525 (lisp_data_to_selection_data): Don't assume that integers
12526 in the range -65535 through -1 fit in an X unsigned short.
12527 Don't assume that ULONG_MAX == X_ULONG_MAX. Don't store into
12528 result parameters unless successful. Rely on cons_to_unsigned
12529 to report problems with elements; the old code wasn't right anyway.
12530 (x_check_property_data): Check for int overflow; we cannot use
12531 a wider type due to X limits.
12532 (x_handle_dnd_message): Use unsigned int, to avoid int overflow.
12534 * xsmfns.c (smc_save_yourself_CB): Check for size calc overflow.
12536 * xterm.c (x_color_cells, x_send_scrollbar_event, handle_one_xevent)
12537 (x_term_init): Check for size calculation overflow.
12538 (x_color_cells): Don't store size until memory allocation succeeds.
12539 (handle_one_xevent): Use ptrdiff_t, not int, for byte counts.
12540 Don't assume alloca size is less than MAX_ALLOCA.
12541 (x_term_init): Don't assume length fits in int (sprintf is limited
12544 Use ptrdiff_t for composition IDs.
12545 * character.c (lisp_string_width):
12546 * composite.c (composition_table_size, n_compositions)
12547 (get_composition_id, composition_gstring_from_id):
12548 * dispextern.h (struct glyph_string.cmp_id, struct composition_it.id):
12549 * xdisp.c (BUILD_COMPOSITE_GLYPH_STRING):
12550 * window.c (Frecenter):
12551 Use ptrdiff_t, not int, for composition IDs.
12552 * composite.c (get_composition_id): Check for integer overflow.
12553 * composite.h: Adjust prototypes to match the above changes.
12555 Use ptrdiff_t for hash table indexes.
12556 * category.c (hash_get_category_set):
12557 * ccl.c (ccl_driver):
12558 * charset.h (struct charset.hash_index, CHECK_CHARSET_GET_ID):
12559 * coding.c (coding_system_charset_list, detect_coding_system):
12560 * coding.h (struct coding_system.id):
12561 * composite.c (get_composition_id, gstring_lookup_cache):
12562 * fns.c (hash_lookup, hash_put, Fgethash, Fputhash):
12563 * image.c (xpm_get_color_table_h):
12564 * lisp.h (hash_lookup, hash_put):
12565 * minibuf.c (Ftest_completion):
12566 Use ptrdiff_t for hash table indexes, not int (which is too
12567 narrow, on 64-bit hosts) or EMACS_INT (which is too wide, on
12568 32-bit --with-wide-int hosts).
12570 * charset.c (Fdefine_charset_internal): Check for integer overflow.
12571 Add a FIXME comment about memory leaks.
12572 (syms_of_charset): Don't assume xmalloc returns.
12574 Don't assume that stated character widths fit in int.
12575 * character.c (Fchar_width, c_string_width, lisp_string_width):
12576 * character.h (CHAR_WIDTH):
12577 * indent.c (MULTIBYTE_BYTES_WIDTH):
12578 Use sanitize_char_width to avoid undefined and/or bad behavior
12579 with outlandish widths.
12580 * character.h (sanitize_tab_width): Rename from sanitize_width,
12581 now that we have two such functions. All uses changed.
12582 (sanitize_char_width): New inline function.
12584 Don't assume that tab-width fits in int.
12585 * character.h (sanitize_width): New inline function.
12586 (SANE_TAB_WIDTH): New macro.
12587 (ASCII_CHAR_WIDTH): Use it.
12588 * indent.c (sane_tab_width): Remove. All uses replaced by
12589 SANE_TAB_WIDTH (current_buffer).
12590 * xdisp.c (init_iterator): Use SANE_TAB_WIDTH.
12592 * fileio.c: Integer overflow issues with file modes.
12593 (Fset_file_modes, auto_save_1): Don't assume EMACS_INT fits in int.
12595 * charset.c (read_hex): New arg OVERFLOW. All uses changed.
12596 Remove unreachable code.
12597 (read_hex, load_charset_map_from_file): Check for integer overflow.
12599 * xterm.c: Don't go over XClientMessageEvent limit.
12600 (scroll_bar_windows_size): Now ptrdiff_t, as we prefer signed.
12601 (x_send_scroll_bar_event): Likewise. Check that the size does not
12602 exceed limits imposed by XClientMessageEvent, as well as the usual
12603 ptrdiff_t and size_t limits.
12605 * keyboard.c: Overflow, signedness and related fixes.
12606 (make_lispy_movement): Use same integer type in forward decl
12607 that is used in the definition.
12608 (read_key_sequence, keyremap_step):
12609 Change bufsize argument back to int, undoing my 2011-03-30 change.
12610 We prefer signed types, and int is wide enough here.
12611 (parse_tool_bar_item): Don't assume tool_bar_max_label_size is less
12612 than TYPE_MAXIMUM (EMACS_INT) / 2. Don't let the label size grow
12613 larger than STRING_BYTES_BOUND. Use ptrdiff_t for Emacs string
12614 length, not size_t. Use ptrdiff_t for index, not int.
12615 (keyremap_step, read_key_sequence): Redo bufsize check to avoid
12616 possibility of integer overflow.
12618 Overflow, signedness and related fixes for images.
12620 * dispextern.h (struct it.stack[0].u.image.image_id)
12621 (struct_it.image_id, struct image.id, struct image_cache.size)
12622 (struct image_cache.used, struct image_cache.ref_count):
12623 * gtkutil.c (update_frame_tool_bar):
12624 * image.c (x_reference_bitmap, Fimage_size, Fimage_mask_p)
12625 (Fimage_metadata, free_image_cache, clear_image_cache, lookup_image)
12626 (cache_image, mark_image_cache, x_kill_gs_process, Flookup_image):
12627 * nsmenu.m (update_frame_tool_bar):
12628 * xdisp.c (calc_pixel_width_or_height):
12629 * xfns.c (image_cache_refcount):
12630 Image IDs are now ptrdiff_t, not int, to avoid arbitrary limits
12631 on typical 64-bit hosts.
12633 * image.c (RANGED_INTEGERP, TYPE_RANGED_INTEGERP): New macros.
12634 (x_bitmap_pixmap, x_create_x_image_and_pixmap):
12635 Omit unnecessary casts to int.
12636 (parse_image_spec): Check that integers fall into 'int' range
12637 when the callers expect that.
12638 (image_ascent): Redo ascent calculation to avoid int overflow.
12639 (clear_image_cache): Avoid overflow when sqrt (INT_MAX) < nimages.
12640 (lookup_image): Remove unnecessary tests.
12641 (xbm_image_p): Locals are now of int, not EMACS_INT,
12642 since parse_image_check makes sure they fit into int.
12643 (png_load, gif_load, svg_load_image):
12644 Prefer int to unsigned where either will do.
12645 (tiff_handler): New function, combining the cores of the
12646 old tiff_error_handler and tiff_warning_handler.
12647 This function is rewritten to use vsnprintf and thereby avoid
12648 stack buffer overflows. It uses only the features of vsnprintf
12649 that are common to both POSIX and native Microsoft.
12650 (tiff_error_handler, tiff_warning_handler): Use it.
12651 (tiff_load, gif_load, imagemagick_load_image):
12652 Don't assume :index value fits in 'int'.
12653 (gif_load): Omit unnecessary cast to double, and avoid double-rounding.
12654 (imagemagick_load_image): Check that crop parameters fit into
12655 the integer types that MagickCropImage accepts. Don't assume
12656 Vimagemagick_render_type has a nonnegative value. Don't assume
12657 size_t fits in 'long'.
12658 (gs_load): Use printmax_t to print the widest integers possible.
12659 Check for integer overflow when computing image height and width.
12661 2011-08-26 Eli Zaretskii <eliz@gnu.org>
12663 * xdisp.c (redisplay_window): Don't force window start if point
12664 will be invisible in the resulting window. (Bug#9324)
12666 2011-08-25 Eli Zaretskii <eliz@gnu.org>
12668 * xdisp.c (compute_display_string_pos): Return 2 in DISP_PROP when
12669 the display spec is of the form `(space ...)'.
12670 (handle_display_spec): Return the value returned by
12671 handle_single_display_spec, not just 1 or zero.
12672 (handle_single_display_spec): If the display spec is of the form
12673 `(space ...)', and specifies display in the text area, return 2
12675 (try_cursor_movement): Check for the need to scroll more
12676 accurately, and prefer exact match for point under bidi.
12677 Don't advance `row' beyond the last row of the window.
12679 * dispextern.h (struct bidi_it): Rename the disp_prop_p member
12680 into disp_prop; all users changed.
12682 * bidi.c (bidi_fetch_char): If compute_display_string_pos returns
12683 DISP_PROP = 2, substitute the u+2029 PARAGRAPH SEPARATOR character
12684 for the text covered by the display property.
12686 2011-08-25 Chong Yidong <cyd@stupidchicken.com>
12688 * buffer.c (Fbury_buffer_internal): Rename from Funrecord_buffer.
12689 Change return value to nil.
12690 (Frecord_buffer): Delete unused function.
12692 2011-08-24 Eli Zaretskii <eliz@gnu.org>
12694 * xdisp.c (Fcurrent_bidi_paragraph_direction): For unibyte
12695 buffers, return left-to-right.
12696 (set_cursor_from_row): Consider candidate row a win if its glyph
12697 represents a newline and point is on that newline. Fixes cursor
12698 positioning on the newline at EOL of R2L text within L2R
12699 paragraph, and vice versa.
12700 (try_cursor_movement): Check continued rows, in addition to
12701 continuation rows. Fixes unwarranted scroll when point enters a
12702 continued line of R2L text within an L2R paragraph, or vice versa.
12703 (cursor_row_p): Consider the case of point being equal to
12704 MATRIX_ROW_END_CHARPOS. Prevents cursor being stuck when moving
12705 from the end of a short line to the beginning of a continued line
12706 of R2L text within L2R paragraph.
12707 (RECORD_MAX_MIN_POS): For max_pos, use IT_CHARPOS even for
12708 composed characters.
12710 * bidi.c (bidi_check_type): Use xassert.
12711 (bidi_cache_iterator_state): Update the disp_pos and disp_prop_p
12714 2011-08-23 Eli Zaretskii <eliz@gnu.org>
12716 * bidi.c (bidi_get_type): Abort if we get zero as the bidi type of
12719 2011-08-23 Chong Yidong <cyd@stupidchicken.com>
12721 * nsfont.m (ns_otf_to_script): Fix typo.
12723 2011-08-22 Kenichi Handa <handa@m17n.org>
12725 * chartab.c (Fset_char_table_extra_slot): Do not inhibit setting a
12726 extra slot even if the purpose is char-code-property-table.
12728 2011-08-23 Eli Zaretskii <eliz@gnu.org>
12730 * xdisp.c (redisplay_window): When computing centering_position,
12731 account for the height of the header line. (Bug#8874)
12733 * dispnew.c (buffer_posn_from_coords): Use buf_charpos_to_bytepos
12734 instead of CHAR_TO_BYTE. Fixes a crash when a completion
12735 candidate is selected by the mouse, and that candidate has a
12736 composed character under the mouse.
12738 * xdisp.c (x_produce_glyphs): Set it->nglyphs to 1. Fixes pixel
12739 coordinates reported by pos-visible-in-window-p for a composed
12740 character in column zero.
12742 2011-08-23 Stefan Monnier <monnier@iro.umontreal.ca>
12744 * cmds.c (Fself_insert_command): Mention post-self-insert-hook.
12746 2011-08-22 Eli Zaretskii <eliz@gnu.org>
12748 * xdisp.c (BUFFER_POS_REACHED_P): If this is a composition,
12749 consider it a hit if to_charpos is anywhere in the range of the
12750 composed buffer positions.
12752 2011-08-22 Chong Yidong <cyd@stupidchicken.com>
12754 * image.c (gif_load): Don't assume that each subimage has the same
12755 dimensions as the base image. Handle disposal method that is
12756 "undefined" by the gif spec (Bug#9335).
12758 2011-08-20 Chong Yidong <cyd@stupidchicken.com>
12760 * eval.c (Fsignal): Handle `debug' symbol in error handler (Bug#9329).
12761 (Fcondition_case): Document `debug' symbol in error handler.
12763 2011-08-19 Eli Zaretskii <eliz@gnu.org>
12765 * xfaces.c (face_at_buffer_position): Avoid repeated evaluation of
12766 face ID by FACE_FROM_ID, and avoid a crash when mouse is moved
12767 from an Org mode buffer to a Speedbar frame.
12769 * xdisp.c (RECORD_MAX_MIN_POS): If the display element comes from
12770 a composition, take its buffer position from IT->cmp_it.charpos.
12771 Fixes cursor positioning at the beginning of a line that begins
12772 with a composed character.
12774 2011-08-18 Eli Zaretskii <eliz@gnu.org>
12776 * bidi.c (bidi_get_type): If bidi_type_table reports zero as the
12777 character bidirectional type, use STRONG_L instead. Fixes crashes
12778 in a buffer produced by `describe-categories'.
12780 * dispextern.h (struct bidi_it): Move disp_pos and disp_prop_p
12781 members before the level stack, so they would be saved and
12782 restored when copying iterator state. Fixes incorrect reordering
12783 around TABs covered by display properties.
12785 2011-08-18 Andreas Schwab <schwab@linux-m68k.org>
12787 * process.c (Fnetwork_interface_list): Correctly determine buffer size.
12789 2011-08-17 Chong Yidong <cyd@stupidchicken.com>
12791 * eval.c (internal_condition_case, internal_condition_case_1)
12792 (internal_condition_case_2, internal_condition_case_n):
12793 Remove unnecessary aborts (Bug#9081).
12795 2011-08-17 Eli Zaretskii <eliz@gnu.org>
12797 * lread.c (Fload) [DOS_NT]: If `openp' returns -2, but the file
12798 has no `load' handler, try opening the file locally. (Bug#9311)
12800 2011-08-16 Ken Brown <kbrown@cornell.edu>
12802 * gmalloc.c: Expand comment.
12804 2011-08-16 Eli Zaretskii <eliz@gnu.org>
12806 * xdisp.c (set_cursor_from_row): Don't accept a previous candidate
12807 if it fails the cursor_row_p test. Fixes cursor positioning at ZV.
12809 2011-08-16 Ken Brown <kbrown@cornell.edu>
12811 Fix memory allocation problems in Cygwin build (Bug#9273).
12813 * unexcw.c ( __malloc_initialized): Declare external variable.
12814 (fixup_executable): Force the dumped emacs to reinitialize malloc.
12816 * gmalloc.c [CYGWIN] (bss_sbrk_heapbase, bss_sbrk_heapinfo):
12818 (malloc_initialize_1) [CYGWIN]: Prepare for reinitializing the
12820 (_free_internal_nolock) [CYGWIN]: Ignore requests to free storage
12821 in the static heap.
12822 [CYGWIN] (special_realloc): New function.
12823 (_realloc_internal_nolock) [CYGWIN]: Use the new function on
12824 requests to realloc storage in the static heap.
12826 2011-08-15 Paul Eggert <eggert@cs.ucla.edu>
12828 * bidi.c (bidi_initialize): Remove unused local.
12830 2011-08-15 Eli Zaretskii <eliz@gnu.org>
12833 * biditype.h: Remove file.
12834 * makefile.w32-in ($(BLD)/bidi.$(O)):
12835 * deps.mk (bidi.o): Remove biditype.h and bidimirror.h.
12837 * dispextern.h: Fix a typo in the comment to bidi_type_t.
12839 * chartab.c: Improve commentary for the uniprop_table API.
12841 * bidi.c (bidi_paragraph_init): Support zero value of
12842 bidi_ignore_explicit_marks_for_paragraph_level.
12843 (bidi_initialize): Use uniprop_table instead of including
12844 biditype.h and bidimirror.h.
12846 * xdisp.c (move_it_in_display_line_to): Don't reset pixel
12847 coordinates of the iterator when restoring from ppos_it.
12850 2011-08-14 Kenichi Handa <handa@m17n.org>
12852 * process.c (create_process): Call setup_process_coding_systems
12853 after the pid of the process is set to -1 (Bug#8162).
12855 2011-08-14 Eli Zaretskii <eliz@gnu.org>
12857 * xdisp.c (move_it_in_display_line_to): Don't invoke
12858 IT_RESET_X_ASCENT_DESCENT when iterator position was restored from
12859 ppos_it. Fixes vertical cursor motion when line beginning is
12860 covered by an image. (Bug#9296)
12862 2011-08-14 Jan Djärv <jan.h.d@swipnet.se>
12864 * nsterm.h (ns_run_ascript): Declare.
12865 (NSAPP_DATA2_RUNASSCRIPT): Define.
12867 * nsfns.m (as_script, as_result, as_status): New static variables.
12868 (ns_run_ascript): New function.
12869 (Fns_do_applescript): Set variables as_*. Make an NSApplicationDefined
12870 event with data2 set to NSAPP_DATA2_RUNASSCRIPT, post it and then start
12871 the event loop. Get status from as_status (Bug#7276).
12873 * nsterm.m (sendEvent): If event is NSApplicationDefined and
12874 data2 is NSAPP_DATA2_RUNASSCRIPT, call ns_run_ascript and then exit
12875 the event loop (Bug#7276).
12877 2011-08-14 Andreas Schwab <schwab@linux-m68k.org>
12879 * gnutls.c (QCgnutls_bootprop_priority)
12880 (QCgnutls_bootprop_trustfiles, QCgnutls_bootprop_keylist)
12881 (QCgnutls_bootprop_crlfiles, QCgnutls_bootprop_callbacks)
12882 (QCgnutls_bootprop_loglevel, QCgnutls_bootprop_hostname)
12883 (QCgnutls_bootprop_min_prime_bits, QCgnutls_bootprop_verify_flags)
12884 (QCgnutls_bootprop_verify_hostname_error)
12885 (QCgnutls_bootprop_callbacks_verify): Rename from
12886 Qgnutls_bootprop_..., all uses changed.
12888 * xfaces.c (QCignore_defface): Rename from Qignore_defface, all
12891 2011-08-14 Paul Eggert <eggert@cs.ucla.edu>
12893 * xfaces.c (Qframe_set_background_mode): Now static.
12894 * dispextern.h (Qframe_set_background_mode): Remove decl.
12896 * process.c (Fnetwork_interface_info): Declare local only if needed.
12898 2011-08-13 Jan Djärv <jan.h.d@swipnet.se>
12900 * process.c: Include ifaddrs.h and net/if_dl.h if available (Bug#8477).
12901 (Fnetwork_interface_list): Allocate in increments of bytes instead
12902 of sizeof (struct ifreq). Iterate over ifconf.ifc_req by counting
12903 bytes (Bug#8477). Count bytes correctly when ifr_addr is a struct
12905 (struct ifflag_def): notrailers is smart on OSX.
12906 (Fnetwork_interface_info): Handle case when ifr_flags is negative.
12907 Get hardware address with getifaddrs if available.
12909 2011-08-12 Eli Zaretskii <eliz@gnu.org>
12911 * xdisp.c (iterate_out_of_display_property): xassert that
12912 IT->position is set to within IT->object's boundaries. Break from
12913 the loop as soon as EOB is reached; avoids infloops in redisplay
12914 when IT->position is set up wrongly due to some bug.
12915 Set IT->current to match the bidi iterator unconditionally.
12916 (push_display_prop): Allow GET_FROM_STRING as IT->method on
12917 entry. Force push_it to save on the stack the current
12918 buffer/string position, to be restored by pop_it. Fix flags in
12919 the iterator structure wrt the object coming from a display
12920 property, as `line-prefix' and `wrap-prefix' are not ``replacing''
12921 properties. (Bug#9284)
12923 2011-08-09 Andreas Schwab <schwab@linux-m68k.org>
12925 * fontset.c (fontset_get_font_group): Add proper type checks.
12928 2011-08-09 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
12930 * unexmacosx.c (print_load_command_name): Add cases LC_FUNCTION_STARTS
12931 and LC_VERSION_MIN_MACOSX.
12932 (copy_linkedit_data) [LC_FUNCTION_STARTS]: New function.
12933 (dump_it) [LC_FUNCTION_STARTS]: Use it.
12935 2011-08-08 Eli Zaretskii <eliz@gnu.org>
12937 * xdisp.c (forward_to_next_line_start): Allow to use the
12938 no-display-properties-and-no-overlays under bidi display.
12939 Set disp_pos in the bidi iterator to avoid searches for display
12940 properties and overlays.
12942 2011-08-08 Chong Yidong <cyd@stupidchicken.com>
12944 * editfns.c (Fset_time_zone_rule): Document relationship with the
12947 * ftfont.c (ftfont_pattern_entity): Copy the extras argument to
12948 the font entity extracted from the cache (Bug#8109).
12950 2011-08-07 Chong Yidong <cyd@stupidchicken.com>
12952 * composite.c (autocmp_chars): Don't reset point. That is done by
12953 restore_point_unwind (Bug#5984).
12955 2011-08-07 Juri Linkov <juri@jurta.org>
12957 * editfns.c (Fformat_time_string): Doc fix, add tag `usage:'
12958 to show the arg `TIME' instead of `TIMEVAL'.
12960 2011-08-06 Eli Zaretskii <eliz@gnu.org>
12962 * xdisp.c (set_cursor_from_row): Fix cursor positioning when a
12963 display property strides EOL and includes a newline, as in
12964 longlines-mode. (Bug#9254)
12965 (move_it_in_display_line_to): Fix vertical-motion in a buffer with
12966 word-wrap under bidirectional display. (Bug#9224)
12968 * bidi.c (bidi_unshelve_cache): Don't reset the cache if JUST_FREE
12969 is non-zero, even if the data buffer is NULL. Fixes a crash in
12970 vertical-motion with longlines-mode. (Bug#9254)
12972 2011-08-05 Eli Zaretskii <eliz@gnu.org>
12974 * bidi.c <bidi_cache_total_alloc>: Now static.
12975 (bidi_initialize): Initialize bidi_cache_total_alloc.
12977 * xdisp.c (display_line): Release buffer allocated for shelved bidi
12980 * bidi.c (bidi_shelve_cache, bidi_unshelve_cache): Track total
12981 amount allocated this far in `bidi_cache_total_alloc'.
12982 (bidi_unshelve_cache): Accept an additional argument JUST_FREE; if
12983 non-zero, only free the data buffer without restoring the cache
12984 contents. All callers changed.
12986 * dispextern.h (bidi_unshelve_cache): Update prototype.
12988 * xdisp.c (SAVE_IT, pos_visible_p, move_it_in_display_line_to)
12989 (move_it_in_display_line, move_it_to)
12990 (move_it_vertically_backward, move_it_by_lines): Replace the call
12991 to xfree to an equivalent call to bidi_unshelve_cache.
12992 (move_it_in_display_line_to): Fix logic of returning
12993 MOVE_POS_MATCH_OR_ZV in the bidi case. (Bug#9224)
12995 2011-08-05 Eli Zaretskii <eliz@gnu.org>
12997 * xdisp.c (set_cursor_from_row): Prefer the candidate glyph that
12998 came from a string character with a `cursor' property. (Bug#9229)
13000 2011-08-04 Jan Djärv <jan.h.d@swipnet.se>
13002 * Makefile.in (LIB_PTHREAD): New variable.
13003 (LIBES): Add LIB_PTHREAD (Bug#9216).
13005 * alloc.c, emacs.c, gmalloc.c, gtkutil.c, keyboard.c, syssignal.h:
13006 Rename HAVE_GTK_AND_PTHREAD to HAVE_PTHREAD (Bug#9216).
13008 2011-08-04 Andreas Schwab <schwab@linux-m68k.org>
13010 * regex.c (re_iswctype): Remove some redundant boolean conversions.
13012 2011-08-04 Jan Djärv <jan.h.d@swipnet.se>
13014 * xterm.c (x_find_topmost_parent): New function.
13015 (x_set_frame_alpha): Find topmost parent window with
13016 x_find_topmost_parent and set the property there also (bug#9181).
13017 (handle_one_xevent): Call x_set_frame_alpha on ReparentNotify.
13019 2011-08-04 Paul Eggert <eggert@cs.ucla.edu>
13021 * callproc.c (Fcall_process): Avoid vfork clobbering
13022 the local vars buffer, coding_systems, current_dir.
13024 2011-08-03 Stefan Monnier <monnier@iro.umontreal.ca>
13026 * keymap.c (Fmake_composed_keymap): Move to subr.el.
13028 2011-08-03 Paul Eggert <eggert@cs.ucla.edu>
13030 * fontset.c (dump_fontset) [FONTSET_DEBUG]: Declare EXTERNALLY_VISIBLE
13031 so that it is not optimized away.
13033 * xdisp.c (compute_display_string_pos): Remove unused local.
13035 2011-08-02 Eli Zaretskii <eliz@gnu.org>
13037 Fix slow cursor motion and scrolling in large buffers with
13038 selective display, like Org Mode buffers. (Bug#9218)
13040 * dispextern.h (struct bidi_it): New member disp_prop_p.
13042 * xdisp.c: Remove one-slot cache of display string positions.
13043 (compute_display_string_pos): Accept an additional argument
13044 DISP_PROP_P; callers changed. Scan at most 5K characters forward
13045 for a display string or property. If found, set DISP_PROP_P
13048 * bidi.c (bidi_fetch_char): Accept an additional argument
13049 DISP_PROP_P, and pass it to compute_display_string_pos.
13050 Only handle text covered by a display string if DISP_PROP_P is returned
13051 non-zero. All callers of bidi_fetch_char changed.
13053 2011-08-02 Stefan Monnier <monnier@iro.umontreal.ca>
13055 * keymap.c (Fdefine_key): Fix Lisp_Object/int mixup; apply some CSE.
13057 2010-12-03 Don March <don@ohspite.net>
13059 * keymap.c (Fdefine_key): Fix non-prefix key error message when
13060 last character M-[char] is translated to ESC [char] (bug#7541).
13062 2011-08-02 Kenichi Handa <handa@m17n.org>
13064 * lisp.h (uniprop_table): Extern it.
13066 * chartab.c (uniprop_table): Make it non-static.
13068 2011-08-01 Eli Zaretskii <eliz@gnu.org>
13070 * xdisp.c (forward_to_next_line_start): Accept additional argument
13071 BIDI_IT_PREV, and store into it the state of the bidi iterator had
13073 (reseat_at_next_visible_line_start): Use the bidi iterator state
13074 returned by forward_to_next_line_start to restore the state of
13075 it->bidi_it after backing up to previous newline. (Bug#9212)
13077 2011-07-30 Andreas Schwab <schwab@linux-m68k.org>
13079 * regex.c (re_comp): Protoize.
13080 (re_exec): Fix return type.
13081 (regexec): Fix type of `ret'. (Bug#9203)
13083 2011-07-28 Paul Eggert <eggert@cs.ucla.edu>
13085 * image.c (check_image_size): Use 1024x1024 if unknown frame (Bug#9189).
13086 This is needed if max-image-size is a floating-point number.
13088 2011-07-28 Andreas Schwab <schwab@linux-m68k.org>
13090 * print.c (print_object): Print empty symbol as ##.
13092 * lread.c (read1): Read ## as empty symbol.
13094 2011-07-28 Alp Aker <alp.tekin.aker@gmail.com>
13096 * nsfns.m (x_set_foreground_color): Set f->foreground_pixel when
13097 setting frame foreground color (Bug#9175).
13098 (x_set_background_color): Likewise.
13100 * nsmenu.m (-setText): Size tooltip dimensions precisely to
13101 contents (Bug#9176).
13102 (EmacsTooltip -init): Remove bezels and add shadows to
13105 * nsterm.m (ns_dumpglyphs_stretch): Avoid overwriting left fringe
13106 or scroll bar (Bug#8470).
13108 * nsfont.m (nsfont_open): Remove assignment to voffset and
13109 unnecessary vars hshink, expand, hd, full_height, min_height.
13110 (nsfont_draw): Use s->ybase as baseline for glyph drawing (Bug#8913).
13112 * nsterm.h (nsfont_info): Remove voffset field.
13114 2011-07-28 Alp Aker <alp.tekin.aker@gmail.com>
13116 Implement strike-through and overline on NextStep (Bug#8863).
13118 * nsfont.m (nsfont_open): Use underline position provided by font,
13119 instead of hard-coded value of 2.
13120 (nsfont_draw): Call ns_draw_text_decoration instead.
13122 * nsterm.h: Add declaration for ns_draw_text_decoration.
13124 * nsterm.m (ns_draw_text_decoration): New function for drawing
13125 underline, overline, and strike-through.
13126 (ns_dumpglyphs_image, ns_dumpglyphs_stretch): Add call to
13127 ns_draw_text_decoration. Change treatment of cursor drawing to
13128 accommodate underlining, etc.
13130 2011-07-28 Eli Zaretskii <eliz@gnu.org>
13132 * buffer.c (init_buffer_once): Set bidi-display-reordering to t by
13135 2011-07-28 Paul Eggert <eggert@cs.ucla.edu>
13137 * alloc.c (memory_full) [!SYNC_INPUT]: Fix signal-related race.
13138 Without this fix, if a signal arrives just after memory fills up,
13139 'malloc' might be invoked reentrantly.
13141 * image.c (x_check_image_size) [!HAVE_X_WINDOWS]: Return 1.
13142 In other words, assume that every image size is allowed, on non-X
13143 hosts. This assumption is probably wrong, but it lets Emacs compile.
13145 2011-07-28 Andreas Schwab <schwab@linux-m68k.org>
13147 * regex.c (re_iswctype): Convert return values to boolean.
13149 2011-07-28 Eli Zaretskii <eliz@fencepost.gnu.org>
13151 * xdisp.c (compute_display_string_pos): Don't use cached display
13152 string position if the buffer had its restriction changed.
13155 2011-07-28 Paul Eggert <eggert@cs.ucla.edu>
13157 * callproc.c (Fcall_process): Use 'volatile' to avoid vfork clobbering.
13159 2011-07-28 Paul Eggert <eggert@cs.ucla.edu>
13161 Integer signedness and overflow and related fixes. (Bug#9079)
13163 * bidi.c: Integer size and overflow fixes.
13164 (bidi_cache_size, bidi_cache_idx, bidi_cache_last_idx)
13165 (bidi_cache_start, bidi_cache_fetch_state, bidi_cache_search)
13166 (bidi_cache_find_level_change, bidi_cache_ensure_space)
13167 (bidi_cache_iterator_state, bidi_cache_find, bidi_cache_start_stack)
13168 (bidi_find_other_level_edge):
13169 Use ptrdiff_t instead of EMACS_INT where either will do.
13170 This works better on 32-bit hosts configured --with-wide-int.
13171 (bidi_cache_ensure_space): Check for size-calculation overflow.
13172 Use % rather than repeated addition, for better worst-case speed.
13173 Don't set bidi_cache_size until after xrealloc returns, because it
13175 (bidi_dump_cached_states): Use ptrdiff_t, not int, to avoid overflow.
13176 (bidi_cache_ensure_space): Also check that the bidi cache size
13177 does not exceed that of the largest Lisp string or buffer. See Eli
13178 Zaretskii in <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9079#29>.
13180 * alloc.c (__malloc_size_t): Remove.
13181 All uses replaced by size_t. See Andreas Schwab's note
13182 <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9079#8>.
13184 * image.c: Improve checking for integer overflow.
13185 (check_image_size): Assume that f is nonnull, since
13186 it is always nonnull in practice. This is one less thing to
13187 worry about when checking for integer overflow later.
13188 (x_check_image_size): New function, which checks for integer
13189 overflow issues inside X.
13190 (x_create_x_image_and_pixmap, xbm_read_bitmap_data): Use it.
13191 This removes the need for a memory_full check.
13192 (xbm_image_p): Rewrite to avoid integer multiplication overflow.
13193 (Create_Pixmap_From_Bitmap_Data, xbm_load): Use x_check_image_size.
13194 (xbm_read_bitmap_data): Change locals back to 'int', since
13195 their values must fit in 'int'.
13196 (xpm_load_image, png_load, tiff_load):
13197 Invoke x_create_x_image_and_pixmap earlier,
13198 to avoid much needless work if the image is too large.
13199 (tiff_load): Treat overly large images as if
13200 x_create_x_image_and_pixmap failed, not as malloc failures.
13201 (gs_load): Use x_check_image_size.
13203 * gtkutil.c: Omit integer casts.
13204 (xg_get_pixbuf_from_pixmap): Remove unnecessary cast.
13205 (xg_set_toolkit_scroll_bar_thumb): Rewrite to avoid need for cast.
13207 * image.c (png_load): Don't assume height * row_bytes fits in 'int'.
13209 * xfaces.c (Fbitmap_spec_p): Fix integer overflow bug.
13210 Without this fix, (bitmap-spec-p '(34359738368 1 "x"))
13211 would wrongly return t on a 64-bit host.
13213 * dispnew.c (init_display): Use *_RANGE_OVERFLOW macros.
13214 The plain *_OVERFLOW macros run afoul of GCC bug 49705
13215 <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49705>
13216 and therefore cause GCC to emit a bogus diagnostic in some cases.
13218 * image.c: Integer signedness and overflow and related fixes.
13219 This is not an exhaustive set of fixes, but it's time to
13220 record what I've got.
13221 (lookup_pixel_color, check_image_size): Remove redundant decls.
13222 (check_image_size): Don't assume that arbitrary EMACS_INT values
13223 fit in 'int', or that arbitrary 'double' values fit in 'int'.
13224 (x_alloc_image_color, x_create_x_image_and_pixmap, png_load)
13225 (tiff_load, imagemagick_load_image):
13226 Check for overflow in size calculations.
13227 (x_create_x_image_and_pixmap): Remove unnecessary test for
13228 xmalloc returning NULL; that can't happen.
13229 (xbm_read_bitmap_data): Don't assume sizes fit into 'int'.
13230 (xpm_color_bucket): Use better integer hashing function.
13231 (xpm_cache_color): Don't possibly over-allocate memory.
13232 (struct png_memory_storage, tiff_memory_source, tiff_seek_in_memory)
13233 (gif_memory_source):
13234 Use ptrdiff_t, not int or size_t, to record sizes.
13235 (png_load): Don't assume values greater than 2**31 fit in 'int'.
13236 (our_stdio_fill_input_buffer): Prefer ptrdiff_t to size_t when
13237 either works, as we prefer signed integers.
13238 (tiff_read_from_memory, tiff_write_from_memory):
13239 Return tsize_t, not size_t, since that's what the TIFF API wants.
13240 (tiff_read_from_memory): Don't fail simply because the read would
13241 go past EOF; instead, return a short read.
13242 (tiff_load): Omit no-longer-needed casts.
13243 (Fimagemagick_types): Don't assume size fits into 'int'.
13245 Improve hashing quality when configured --with-wide-int.
13246 * fns.c (hash_string): New function, taken from sxhash_string.
13247 Do not discard information about ASCII character case; this
13248 discarding is no longer needed.
13249 (sxhash-string): Use it. Change sig to match it. Caller changed.
13250 * lisp.h: Declare it.
13251 * lread.c (hash_string): Remove, since we now use fns.c's version.
13252 The fns.c version returns a wider integer if --with-wide-int is
13253 specified, so this should help the quality of the hashing a bit.
13255 * emacs.c: Integer overflow minor fix.
13256 (heap_bss_diff): Now uprintmax_t, not unsigned long. All used changed.
13257 Define only if GNU_LINUX.
13258 (main, Fdump_emacs): Set and use heap_bss_diff only if GNU_LINUX.
13260 * dispnew.c: Integer signedness and overflow fixes.
13261 Remove unnecessary forward decls, that were a maintenance hassle.
13262 (history_tick): Now uprintmax_t, so it's more likely to avoid overflow.
13264 (adjust_glyph_matrix, realloc_glyph_pool, adjust_frame_message_buffer)
13265 (scrolling_window): Use ptrdiff_t, not int, for byte count.
13266 (prepare_desired_row, line_draw_cost):
13267 Use int, not unsigned, where either works.
13268 (save_current_matrix, restore_current_matrix):
13269 Use ptrdiff_t, not size_t, where either works.
13270 (init_display): Check for overflow more accurately, and without
13271 relying on undefined behavior.
13273 * editfns.c (pWIDE, pWIDElen, signed_wide, unsigned_wide):
13274 Remove, replacing with the new symbols in lisp.h. All uses changed.
13275 * fileio.c (make_temp_name):
13276 * filelock.c (lock_file_1, lock_file):
13277 * xdisp.c (message_dolog):
13278 Don't assume PRIdMAX etc. works; this isn't portable to pre-C99 hosts.
13279 Use pMd etc. instead.
13280 * lisp.h (printmax_t, uprintmax_t, pMd, pMu): New types and macros,
13281 replacing the pWIDE etc. symbols removed from editfns.c.
13283 * keyboard.h (num_input_events): Now uintmax_t.
13284 This is (very slightly) less likely to mess up due to wraparound.
13287 * buffer.c: Integer signedness fixes.
13288 (alloc_buffer_text, enlarge_buffer_text):
13289 Use ptrdiff_t rather than size_t when either will do, as we prefer
13292 * alloc.c: Integer signedness and overflow fixes.
13293 Do not impose an arbitrary 32-bit limit on malloc sizes when debugging.
13294 (__malloc_size_t): Default to size_t, not to int.
13295 (pure_size, pure_bytes_used_before_overflow, stack_copy_size)
13296 (Fgarbage_collect, mark_object_loop_halt, mark_object):
13297 Prefer ptrdiff_t to size_t when either would do, as we prefer
13299 (XMALLOC_OVERRUN_CHECK_OVERHEAD): New macro.
13300 (xmalloc_overrun_check_header, xmalloc_overrun_check_trailer):
13301 Now const. Initialize with values that are in range even if char
13303 (XMALLOC_PUT_SIZE, XMALLOC_GET_SIZE): Remove, replacing with ...
13304 (xmalloc_put_size, xmalloc_get_size): New functions. All uses changed.
13305 These functions do the right thing with sizes > 2**32.
13306 (check_depth): Now ptrdiff_t, not int.
13307 (overrun_check_malloc, overrun_check_realloc, overrun_check_free):
13308 Adjust to new way of storing sizes. Check for size overflow bugs
13310 (STRING_BYTES_MAX): Adjust to new overheads. The old code was
13311 slightly wrong anyway, as it missed one instance of
13312 XMALLOC_OVERRUN_CHECK_OVERHEAD.
13313 (refill_memory_reserve): Omit needless cast to size_t.
13314 (mark_object_loop_halt): Mark as externally visible.
13316 * xselect.c: Integer signedness and overflow fixes.
13317 (Fx_register_dnd_atom, x_handle_dnd_message):
13318 Use ptrdiff_t, not size_t, since we prefer signed.
13319 (Fx_register_dnd_atom): Check for ptrdiff_t (and size_t) overflow.
13320 * xterm.h (struct x_display_info): Use ptrdiff_t, not size_t, for
13321 x_dnd_atoms_size and x_dnd_atoms_length.
13323 * doprnt.c: Prefer signed to unsigned when either works.
13325 * doprnt.c (doprnt):
13327 * xdisp.c (vmessage):
13328 Use ptrdiff_t, not size_t, when using or implementing doprnt,
13329 since the sizes cannot exceed ptrdiff_t bounds anyway, and we
13330 prefer signed arithmetic to avoid comparison confusion.
13331 * doprnt.c (doprnt): Avoid a "+ 1" that can't overflow,
13332 but is a bit tricky.
13334 Assume freestanding C89 headers, string.h, stdlib.h.
13335 * data.c, doprnt.c, floatfns.c, print.c:
13336 Include float.h unconditionally.
13337 * gmalloc.c: Assume C89-at-least behavior for preprocessor,
13338 limits.h, stddef.h, string.h. Use memset instead of 'flood'.
13339 * regex.c: Likewise for stddef.h, string.h.
13340 (ISASCII): Remove; can assume it returns 1 now. All uses removed.
13341 * s/aix4-2.h (HAVE_STRING_H): Remove obsolete undef.
13342 * s/ms-w32.h (HAVE_LIMITS_H, HAVE_STRING_H, HAVE_STDLIB_H)
13343 (STDC_HEADERS): Remove obsolete defines.
13344 * sysdep.c: Include limits.h unconditionally.
13346 Assume support for memcmp, memcpy, memmove, memset.
13347 * lisp.h, sysdep.c (memcmp, memcpy, memmove, memset):
13348 * regex.c (memcmp, memcpy):
13349 Remove; we assume C89 now.
13351 * gmalloc.c (memcpy, memset, memmove): Remove; we assume C89 now.
13352 (__malloc_safe_bcopy): Remove; no longer needed.
13354 * lisp.h (struct vectorlike_header, struct Lisp_Subr): Signed sizes.
13355 Use EMACS_INT, not EMACS_UINT, for sizes. The code works equally
13356 well either way, and we prefer signed to unsigned.
13358 2011-07-27 Lars Magne Ingebrigtsen <larsi@gnus.org>
13360 * gnutls.c (emacs_gnutls_read): Don't message anything if the peer
13361 closes the connection while we're reading (bug#9182).
13363 2011-07-25 Jan Djärv <jan.h.d@swipnet.se>
13365 * nsmenu.m (ns_popup_dialog): Add an "ok" button if no buttons
13366 are specified (Bug#9168).
13368 2011-07-25 Paul Eggert <eggert@cs.ucla.edu>
13370 * bidi.c (bidi_dump_cached_states): Fix printf format mismatch.
13371 Found by GCC static checking and --with-wide-int on a 32-bit host.
13373 2011-07-25 Eli Zaretskii <eliz@gnu.org>
13375 * xdisp.c (compute_display_string_pos): Fix logic of caching
13376 previous display string position. Initialize cached_prev_pos to
13377 -1. Fixes slow-down at the beginning of a buffer.
13379 2011-07-24 Eli Zaretskii <eliz@gnu.org>
13381 * xfaces.c (check_lface_attrs) [HAVE_WINDOW_SYSTEM]: Allow `nil'
13382 for attrs[LFACE_FONTSET_INDEX].
13384 2011-07-23 Paul Eggert <eggert@cs.ucla.edu>
13386 * xml.c (parse_region): Remove unused local
13387 that was recently introduced.
13389 2011-07-23 Eli Zaretskii <eliz@gnu.org>
13391 * xfns.c (unwind_create_frame) [GLYPH_DEBUG]: Adapt to changes in
13392 2008-02-22T17:42:09Z!monnier@iro.umontreal.ca.
13394 * xdisp.c (move_it_in_display_line_to): Record the best matching
13395 position for TO_CHARPOS while scanning the line, and restore it on
13396 exit if none of the characters scanned was an exact match.
13397 Fixes vertical-motion and pos-visible-in-window-p under bidi redisplay
13398 when exact match is impossible due to invisible text, and the
13399 lines are truncated.
13401 2011-07-23 Jan Djärv <jan.h.d@swipnet.se>
13403 * nsterm.m (initFrameFromEmacs): Set NSTitledWindowMask in styleMask
13406 2011-07-22 Eli Zaretskii <eliz@gnu.org>
13408 Fix a significant slow-down of cursor motion with C-n, C-p,
13409 C-f/C-b, and C-v/M-v that couldn't keep up with keyboard
13410 auto-repeat under bidi redisplay in fontified buffers.
13411 * xdisp.c (compute_stop_pos_backwards): New function.
13412 (next_element_from_buffer): Call compute_stop_pos_backwards to
13413 find a suitable prev_stop when we find ourselves before
13415 (reseat): Don't look for prev_stop, as that could mean a very long
13417 <cached_disp_pos, cached_disp_buffer, cached_disp_modiff>
13418 <cached_disp_overlay_modiff>: Cache for last found display string
13420 (compute_display_string_pos): Return the cached position if asked
13421 about the same buffer in the same area of character positions, and
13422 the buffer wasn't changed since the time the display string
13423 position was cached.
13425 2011-07-22 Eli Zaretskii <eliz@gnu.org>
13427 * xdisp.c (rows_from_pos_range): Don't ignore glyphs whose object
13428 is an integer, which is important for empty lines. (Bug#9149)
13430 2011-07-22 Chong Yidong <cyd@stupidchicken.com>
13432 * frame.c (Fmodify_frame_parameters): In tty case, update the
13433 default face if necessary (Bug#4238).
13435 2011-07-21 Chong Yidong <cyd@stupidchicken.com>
13437 * editfns.c (Fstring_to_char): No need to explain what a character
13438 is in the docstring (Bug#6576).
13440 2011-07-20 Lars Magne Ingebrigtsen <larsi@gnus.org>
13442 * xml.c (parse_region): Make sure we always return a tree.
13444 2011-07-20 HAMANO Kiyoto <khiker.mail@gmail.com>
13446 * xml.c (parse_region): If a document contains only comments,
13449 2011-07-20 Lars Magne Ingebrigtsen <larsi@gnus.org>
13451 * xml.c (make_dom): Return comments, too.
13453 2011-07-19 Paul Eggert <eggert@cs.ucla.edu>
13456 See http://lists.gnu.org/archive/html/emacs-devel/2011-07/msg00688.html
13457 and the surrounding thread.
13458 * minibuf.c (read_minibuf_noninteractive): Rewrite to use getchar
13459 rather than fgets, and retry after EINTR. Otherwise, 'emacs
13460 --batch -f byte-compile-file' fails on OpenBSD if an inactivity
13462 * s/openbsd.h (BROKEN_SIGIO): Define.
13463 * unexelf.c (unexec) [__OpenBSD__]:
13464 Don't update the .mdebug section of the Alpha COFF symbol table.
13466 2011-07-19 Lars Magne Ingebrigtsen <larsi@gnus.org>
13468 * lread.c (syms_of_lread): Clarify when `lexical-binding' is used
13471 2011-07-18 Paul Eggert <eggert@cs.ucla.edu>
13473 * fileio.c (Fcopy_file) [!MSDOS]: Tighten created file's mask.
13474 This fixes some race conditions on the permissions of any newly
13477 * alloc.c (valid_pointer_p): Use pipe, not open.
13478 This fixes some permissions issues when debugging.
13480 * fileio.c (Fcopy_file): Adjust mode if fchown fails. (Bug#9002)
13481 If fchown fails to set both uid and gid, try to set just gid,
13482 as that is sometimes allowed. Adjust the file's mode to eliminate
13483 setuid or setgid bits that are inappropriate if fchown fails.
13485 2011-07-18 Stefan Monnier <monnier@iro.umontreal.ca>
13487 * xdisp.c (next_element_from_string, next_element_from_buffer): Use EQ
13488 to compare Lisp_Objects.
13489 * gnutls.c (syms_of_gnutls): Rename Vgnutls_log_level to
13490 global_gnutls_log_level, don't mistake it for a Lisp_Object.
13491 (init_gnutls_functions, emacs_gnutls_handle_error): Fix up uses.
13493 2011-07-17 Andreas Schwab <schwab@linux-m68k.org>
13495 * lread.c (read_integer): Unread even EOF character.
13496 (read1): Likewise. Properly record start position of symbol.
13498 * lread.c (read1): Read `#:' as empty uninterned symbol if no
13499 symbol character follows.
13501 2011-07-17 Paul Eggert <eggert@cs.ucla.edu>
13503 * fileio.c (Fcopy_file): Pacify gcc re fchown. (Bug#9002)
13504 This works around a problem with the previous change to Fcopy_file.
13505 Recent glibc declares fchown with __attribute__((warn_unused_result)),
13506 and without this change, GCC might complain about discarding
13507 fchown's return value.
13509 2011-07-16 Juanma Barranquero <lekktu@gmail.com>
13511 * makefile.w32-in (GLOBAL_SOURCES): Add gnutls.c (followup to bug#9059).
13513 2011-07-16 Paul Eggert <eggert@cs.ucla.edu>
13515 * fileio.c (Fcopy_file): Don't diagnose fchown failures. (Bug#9002)
13517 2011-07-16 Lars Magne Ingebrigtsen <larsi@gnus.org>
13519 * gnutls.c (syms_of_gnutls): Define `gnutls-log-level' here, since
13520 it's used from the C level.
13522 * process.c: Use the same condition for POLL_FOR_INPUT in both
13523 keyboard.c and process.c (bug#1858).
13525 2011-07-09 Lawrence Mitchell <wence@gmx.li>
13527 * gnutls.c (Qgnutls_bootprop_min_prime_bits): New variable.
13528 (Fgnutls_boot): Use it.
13530 2011-07-15 Andreas Schwab <schwab@linux-m68k.org>
13532 * doc.c (Fsubstitute_command_keys): Revert last change.
13534 2011-07-15 Lars Magne Ingebrigtsen <larsi@gnus.org>
13536 * doc.c (Fsubstitute_command_keys): Clarify that \= really only
13537 quotes the next character, and doesn't affect other longer
13538 sequences (bug#8935).
13540 * lread.c (syms_of_lread): Clarify that is isn't only
13541 `eval-buffer' and `eval-defun' that's affected by
13542 `lexical-binding' (bug#8460).
13544 2011-07-15 Eli Zaretskii <eliz@gnu.org>
13546 * xdisp.c (move_it_in_display_line_to): Fix vertical motion with
13547 bidi redisplay when a line includes both an image and is truncated.
13549 2011-07-14 Paul Eggert <eggert@cs.ucla.edu>
13551 Fix minor problems found by static checking.
13552 * bidi.c (bidi_cache_size): Now EMACS_INT, not size_t.
13553 (elsz): Now a signed constant, not a size_t var. We prefer signed
13554 types to unsigned, to avoid integer comparison confusion. Without
13555 this change, GCC 4.6.1 with -Wunsafe-loop-optimizations complains
13556 "cannot optimize loop, the loop counter may overflow", a symptom
13558 * indent.c (Fvertical_motion): Mark locals as initialized.
13559 * xdisp.c (reseat_to_string): Fix pointer signedness issue.
13561 2011-07-14 Lars Magne Ingebrigtsen <larsi@gnus.org>
13563 * search.c (Fre_search_backward): Mention `case-fold-search' in
13564 all the re_search_* functions (bug#8138).
13566 * keyboard.c (Fopen_dribble_file): Document when the file is
13569 2011-07-14 Eli Zaretskii <eliz@gnu.org>
13571 * bidi.c (bidi_dump_cached_states): Fix format of displaying
13574 Support bidi reordering of display and overlay strings.
13575 * xdisp.c (compute_display_string_pos)
13576 (compute_display_string_end): Accept additional argument STRING.
13577 (init_iterator, reseat_1): Initialize bidi_it->string.s to NULL.
13578 (reseat_to_string): Initialize bidi_it->string.s and
13579 bidi_it->string.schars.
13580 (Fcurrent_bidi_paragraph_direction): Initialize itb.string.s to
13581 NULL (avoids a crash in bidi_paragraph_init).
13582 Initialize itb.string.lstring.
13583 (init_iterator): Call bidi_init_it only of a valid
13584 buffer position was specified. Initialize paragraph_embedding to
13586 (reseat_to_string): Initialize the bidi iterator.
13587 (display_string): If we need to ignore text properties of
13588 LISP_STRING, set IT->stop_charpos to IT->end_charpos. (The
13589 original value of -1 will not work with bidi.)
13590 (compute_display_string_pos): First arg is now struct
13591 `text_pos *'; all callers changed. Support display properties on
13593 (compute_display_string_end): Support display properties on Lisp
13595 (init_iterator, reseat_1, reseat_to_string): Initialize the
13596 string.bufpos member to 0 (zero, for compatibility with IT_CHARPOS
13597 when iterating on a string not from display properties).
13598 (compute_display_string_pos, compute_display_string_end):
13599 Fix calculation of the object to scan. Fixes an error when using
13601 (next_element_from_buffer): Don't abort when IT_CHARPOS is before
13602 base_level_stop; instead, set base_level_stop to BEGV.
13603 Fixes crashes in vertical-motion.
13604 (next_element_from_buffer): Improve commentary for when
13605 the iterator is before prev_stop.
13606 (init_iterator): Initialize bidi_p from the default value of
13607 bidi-display-reordering, not from buffer-local value. Use the
13608 buffer-local value only if initializing for buffer iteration.
13609 (handle_invisible_prop): Support invisible properties on strings
13610 that are being bidi-reordered.
13611 (set_iterator_to_next): Support bidi reordering of C strings and
13613 (next_element_from_string): Support bidi reordering of Lisp
13615 (handle_stop_backwards): Support Lisp strings as well.
13616 (display_string): Support display of R2L glyph rows.
13617 Use IT_STRING_CHARPOS when displaying from a Lisp string.
13618 (init_iterator): Don't initialize it->bidi_p for strings
13620 (reseat_to_string): Initialize it->bidi_p for strings here.
13621 (next_element_from_string, next_element_from_c_string)
13622 (next_element_from_buffer): Add xassert's for correspondence
13623 between IT's object being iterated and it->bidi_it.string
13625 (face_before_or_after_it_pos): Support bidi iteration.
13626 (next_element_from_c_string): Handle the case of the first string
13627 character that is not the first one in the visual order.
13628 (get_visually_first_element): New function, refactored from common
13629 parts of next_element_from_buffer, next_element_from_string, and
13630 next_element_from_c_string.
13631 (tool_bar_lines_needed, redisplay_tool_bar)
13632 (display_menu_bar): Force left-to-right direction. Add a FIXME
13633 comment for making that be controlled by a user option.
13634 (push_it, pop_it): Save and restore the state of the
13635 bidi iterator. Save and restore the bidi_p flag.
13636 (pop_it): Iterate out of display property for string iteration as
13638 (iterate_out_of_display_property): Support iteration over strings.
13639 (handle_single_display_spec): Set up it->bidi_it for iteration
13640 over a display string, and call bidi_init_it.
13641 (handle_single_display_spec, next_overlay_string)
13642 (get_overlay_strings_1, push_display_prop): Set up the bidi
13643 iterator for displaying display or overlay strings.
13644 (forward_to_next_line_start): Don't use the shortcut if
13646 (back_to_previous_visible_line_start): If handle_display_prop
13647 pushed the iterator stack, restore the internal state of the bidi
13648 iterator by calling bidi_pop_it same number of times.
13649 (reseat_at_next_visible_line_start): If ON_NEWLINE_P is non-zero,
13650 and we are bidi-iterating, don't decrement the iterator position;
13651 instead, set the first_elt flag in the bidi iterator, to produce
13653 (reseat_1): Remove redundant setting of string_from_display_prop_p.
13654 (push_display_prop): xassert that we are iterating a buffer.
13655 (push_it, pop_it): Save and restore paragraph_embedding member.
13656 (handle_single_display_spec, next_overlay_string)
13657 (get_overlay_strings_1, reseat_1, reseat_to_string)
13658 (push_display_prop): Set up the `unibyte' member of bidi_it.string
13659 correctly. Don't assume unibyte strings are not bidi-reordered.
13660 (compute_display_string_pos)
13661 (compute_display_string_end): Fix handling the case of C string.
13662 (push_it, pop_it): Save and restore from_disp_prop_p.
13663 (handle_single_display_spec, push_display_prop): Set the
13664 from_disp_prop_p flag.
13665 (get_overlay_strings_1): Reset the from_disp_prop_p flag.
13666 (pop_it): Call iterate_out_of_display_property only if we are
13667 popping after iteration over a string that came from a display
13668 property. Fix a typo in popping stretch info. Add an assertion
13669 for verifying that the iterator position is in sync with the bidi
13671 (handle_single_display_spec, get_overlay_strings_1)
13672 (push_display_prop): Fix initialization of paragraph direction for
13673 string when that of the parent object is not yet determined.
13674 (reseat_1): Call bidi_init_it to resync the bidi
13675 iterator with IT's position. (Bug#7616)
13676 (find_row_edges): If ROW->start.pos gives position
13677 smaller than min_pos, use it as ROW->minpos. (Bug#7616)
13678 (handle_stop, back_to_previous_visible_line_start, reseat_1):
13679 Reset the from_disp_prop_p flag.
13680 (SAVE_IT, RESTORE_IT): New macros.
13681 (pos_visible_p, face_before_or_after_it_pos)
13682 (back_to_previous_visible_line_start)
13683 (move_it_in_display_line_to, move_it_in_display_line)
13684 (move_it_to, move_it_vertically_backward, move_it_by_lines)
13685 (try_scrolling, redisplay_window, display_line): Use them when
13686 saving a temporary copy of the iterator and restoring it back.
13687 (back_to_previous_visible_line_start, reseat_1)
13688 (init_iterator): Empty the bidi cache "stack".
13689 (move_it_in_display_line_to): If iterator ended up at
13690 EOL, but we never saw any buffer positions smaller than
13691 to_charpos, return MOVE_POS_MATCH_OR_ZV. Fixes vertical cursor
13692 motion in bidi-reordered lines.
13693 (move_it_in_display_line_to): Record prev_method and prev_pos
13694 immediately before the call to set_iterator_to_next. Fixes cursor
13695 motion in bidi-reordered lines with stretch glyphs and strings
13696 displayed in margins. (Bug#8133) (Bug#8867)
13697 Return MOVE_POS_MATCH_OR_ZV only if iterator position is past
13699 (pos_visible_p): Support positions in bidi-reordered lines.
13700 Save and restore bidi cache.
13702 * bidi.c (bidi_level_of_next_char): clen should be EMACS_NT, not int.
13703 (bidi_paragraph_info): Delete unused struct.
13704 (bidi_cache_idx, bidi_cache_last_idx): Declare EMACS_INT.
13705 (bidi_cache_start): New variable.
13706 (bidi_cache_reset): Reset bidi_cache_idx to bidi_cache_start, not
13708 (bidi_cache_fetch_state, bidi_cache_search)
13709 (bidi_cache_find_level_change, bidi_cache_iterator_state)
13710 (bidi_cache_find, bidi_peek_at_next_level)
13711 (bidi_level_of_next_char, bidi_find_other_level_edge)
13712 (bidi_move_to_visually_next): Compare cache index with
13713 bidi_cache_start rather than with zero.
13714 (bidi_fetch_char): Accept new argument STRING; all callers
13715 changed. Support iteration over a string. Support strings with
13716 display properties. Support unibyte strings. Fix the type of
13717 `len' according to what STRING_CHAR_AND_LENGTH expects.
13718 (bidi_paragraph_init, bidi_resolve_explicit_1)
13719 (bidi_resolve_explicit, bidi_resolve_weak)
13720 (bidi_level_of_next_char, bidi_move_to_visually_next):
13721 Support iteration over a string.
13722 (bidi_set_sor_type, bidi_resolve_explicit_1)
13723 (bidi_resolve_explicit, bidi_type_of_next_char): ignore_bn_limit
13724 can now be zero (for strings); special values 0 and -1 were
13725 changed to -1 and -2, respectively.
13726 (bidi_char_at_pos): New function.
13727 (bidi_paragraph_init, bidi_resolve_explicit, bidi_resolve_weak):
13728 Call it instead of FETCH_MULTIBYTE_CHAR.
13729 (bidi_move_to_visually_next): Abort if charpos or bytepos were not
13730 initialized to valid values.
13731 (bidi_init_it): Don't initialize charpos and bytepos with invalid
13733 (bidi_level_of_next_char): Allow the sentinel "position" to pass
13734 the test for valid cached positions. Fix the logic for looking up
13735 the sentinel state in the cache. GCPRO the Lisp string we are
13737 (bidi_push_it, bidi_pop_it): New functions.
13738 (bidi_initialize): Initialize the bidi cache start stack pointer.
13739 (bidi_cache_ensure_space): New function, refactored from part of
13740 bidi_cache_iterator_state. Don't assume the required size is just
13741 one BIDI_CACHE_CHUNK away.
13742 (bidi_cache_start_stack, bidi_push_it): Use IT_STACK_SIZE.
13743 (bidi_count_bytes, bidi_char_at_pos): New functions.
13744 (bidi_cache_search): Don't assume bidi_cache_last_idx is
13745 always valid if bidi_cache_idx is valid.
13746 (bidi_cache_find_level_change): xassert that bidi_cache_last_idx
13747 is valid if it's going to be used.
13748 (bidi_shelve_cache, bidi_unshelve_cache): New functions.
13749 (bidi_cache_fetch_state, bidi_cache_search)
13750 (bidi_cache_find_level_change, bidi_cache_ensure_space)
13751 (bidi_cache_iterator_state, bidi_cache_find)
13752 (bidi_find_other_level_edge, bidi_cache_start_stack):
13753 All variables related to cache indices are now EMACS_INT.
13755 * dispextern.h (struct bidi_string_data): New structure.
13756 (struct bidi_it): New member `string'. Make flag members be 1-bit
13757 fields, and put them last in the struct.
13758 (compute_display_string_pos, compute_display_string_end):
13760 (bidi_push_it, bidi_pop_it): Add prototypes.
13761 (struct iterator_stack_entry): New members bidi_p,
13762 paragraph_embedding, and from_disp_prop_p.
13763 (struct it): Member bidi_p is now a bit field 1 bit wide.
13764 (bidi_shelve_cache, bidi_unshelve_cache):
13765 Declare prototypes.
13767 * .gdbinit (xvectype, xvector, xcompiled, xchartable, xboolvector)
13768 (xpr, xfont, xbacktrace): Use "header.size" when accessing vectors
13769 and vector-like objects.
13771 * dispnew.c (buffer_posn_from_coords): Save and restore the bidi
13772 cache around display iteration.
13774 * window.c (Fwindow_end, window_scroll_pixel_based)
13775 (displayed_window_lines, Frecenter): Save and restore the bidi
13776 cache around display iteration.
13778 2011-07-14 Lars Magne Ingebrigtsen <larsi@gnus.org>
13780 * editfns.c (Fdelete_region): Clarify the use of the named
13781 parameters (bug#6788).
13783 2011-07-14 Martin Rudalics <rudalics@gmx.at>
13785 * indent.c (Fvertical_motion): Set and restore w->pointm when
13786 saving and restoring the window's buffer (Bug#9006).
13788 2011-07-13 Lars Magne Ingebrigtsen <larsi@gnus.org>
13790 * editfns.c (Fstring_to_char): Clarify just what is returned
13791 (bug#6576). Text by Eli Zaretskii.
13793 2011-07-13 Juanma Barranquero <lekktu@gmail.com>
13795 * gnutls.c (init_gnutls_functions): Honor gnutls_log_level (bug#9059).
13797 2011-07-13 Eli Zaretskii <eliz@gnu.org>
13799 * buffer.c (mmap_find): Fix a typo.
13801 2011-07-13 Johan Bockgård <bojohan@gnu.org>
13803 Fix execution of x selection hooks.
13804 * xselect.c (Qx_lost_selection_functions)
13805 (Qx_sent_selection_functions): New vars.
13806 (syms_of_xselect): DEFSYM them.
13807 (x_handle_selection_request): Pass Qx_sent_selection_functions
13808 rather than Vx_sent_selection_functions to Frun_hook_with_args.
13809 (x_handle_selection_clear,x_clear_frame_selections):
13810 Pass Qx_lost_selection_functions rather than
13811 Vx_lost_selection_functions to Frun_hook_with_args.
13813 2011-07-13 Paul Eggert <eggert@cs.ucla.edu>
13815 * buffer.c (Fget_buffer_create): Initialize inhibit_shrinking.
13816 The old code sometimes used this field without initializing it.
13818 * alloc.c (gc_sweep): Don't read past end of array.
13819 In theory, the old code could also have corrupted Emacs internals,
13820 though it'd be very unlikely.
13822 2011-07-12 Andreas Schwab <schwab@linux-m68k.org>
13824 * character.c (Fcharacterp): Don't advertise optional ignored
13825 argument. (Bug#4026)
13827 2011-07-12 Lars Magne Ingebrigtsen <larsi@gnus.org>
13829 * keymap.c (syms_of_keymap): Clarify that "modifier" is "modifier
13832 * window.c (Fset_window_start): Doc fix (bug#4199).
13833 (Fset_window_hscroll): Ditto.
13835 2011-07-12 Paul Eggert <eggert@cs.ucla.edu>
13837 Fix minor new problems caught by GCC 4.6.1.
13838 * term.c (init_tty): Remove unused local.
13839 * xsettings.c (store_monospaced_changed): Define this function only
13840 if (defined HAVE_GSETTINGS || defined HAVE_GCONF), as it's
13841 not used otherwise.
13843 2011-07-12 Chong Yidong <cyd@stupidchicken.com>
13845 * xdisp.c (Vresize_mini_windows): Minor doc fix (Bug#3300).
13847 2011-07-11 Lars Magne Ingebrigtsen <larsi@gnus.org>
13849 * xdisp.c (syms_of_xdisp): Make it explicit that the mini-windows
13850 are the mini-buffer and the echo area (bug#3320).
13852 * term.c (init_tty): Remove support for supdup, c10 and perq
13853 terminals, which are no longer supported (bug#1482).
13855 2011-07-10 Johan Bockgård <bojohan@gnu.org>
13857 * xdisp.c (Ftool_bar_lines_needed): Fix WINDOWP check.
13859 2011-07-10 Jan Djärv <jan.h.d@swipnet.se>
13861 * xmenu.c (menu_highlight_callback): Only pass frame to show_help_event
13862 for non-popups (Bug#3642).
13864 2011-07-10 Andreas Schwab <schwab@linux-m68k.org>
13866 * alloc.c (reset_malloc_hooks): Protoize.
13867 * buffer.c (mmap_init, mmap_find, mmap_free_1, mmap_enlarge)
13868 (mmap_set_vars, mmap_alloc, mmap_free, mmap_realloc): Likewise.
13869 * cm.c (losecursor): Likewise.
13870 * data.c (fmod): Likewise.
13871 * dispnew.c (swap_glyphs_in_rows): Likewise.
13872 * emacs.c (memory_warning_signal): Likewise.
13873 * floatfns.c (float_error): Likewise.
13874 * font.c (check_gstring, check_otf_features, otf_tag_symbol)
13875 (otf_open, font_otf_capability, generate_otf_features)
13876 (font_otf_DeviceTable, font_otf_ValueRecord, font_otf_Anchor):
13878 * image.c (pbm_read_file): Likewise.
13879 * indent.c (string_display_width): Likewise.
13880 * intervals.c (check_for_interval, search_for_interval)
13881 (inc_interval_count, count_intervals, root_interval)
13882 (adjust_intervals_for_insertion, make_new_interval): Likewise.
13883 * lread.c (defalias): Likewise.
13884 * ralloc.c (r_alloc_check): Likewise.
13885 * regex.c (set_image_of_range_1, set_image_of_range)
13886 (regex_grow_registers): Likewise.
13887 * sysdep.c (strerror): Likewise.
13888 * termcap.c (valid_filename_p, tprint, main): Likewise.
13889 * tparam.c (main): Likewise.
13890 * unexhp9k800.c (run_time_remap, save_data_space)
13891 (update_file_ptrs, read_header, write_header, calculate_checksum)
13892 (copy_file, copy_rest, display_header): Likewise.
13893 * widget.c (mark_shell_size_user_specified, create_frame_gcs):
13895 * xdisp.c (check_it): Likewise.
13896 * xfaces.c (register_color, unregister_color, unregister_colors):
13898 * xfns.c (print_fontset_result): Likewise.
13899 * xrdb.c (member, fatal, main): Likewise.
13901 2011-07-10 Paul Eggert <eggert@cs.ucla.edu>
13903 Fix minor problems found by static checking (Bug#9031).
13904 * chartab.c (char_table_set_range, map_sub_char_table):
13905 Remove unused locals.
13906 (uniprop_table): Now static.
13907 * composite.c (_work_char): Remove unused static var.
13909 2011-07-09 Juanma Barranquero <lekktu@gmail.com>
13911 * chartab.c (uniprop_table_uncompress): Remove unused local variable.
13913 2011-07-09 Jan Djärv <jan.h.d@swipnet.se>
13915 * gtkutil.c (qttip_cb): Remove code without function.
13917 2011-07-09 Eli Zaretskii <eliz@gnu.org>
13919 * w32.c (pthread_sigmask): New stub.
13921 2011-07-08 Paul Eggert <eggert@cs.ucla.edu>
13923 Use pthread_sigmask, not sigprocmask (Bug#9010).
13924 sigprocmask is portable only for single-threaded applications, and
13925 Emacs can be multi-threaded when it uses GTK.
13926 * Makefile.in (LIB_PTHREAD_SIGMASK): New macro.
13928 * callproc.c (Fcall_process):
13929 * process.c (create_process):
13930 * sysdep.c (sys_sigblock, sys_sigunblock, sys_sigsetmask):
13931 Use pthread_sigmask, not sigprocmask.
13933 2011-07-08 Jan Djärv <jan.h.d@swipnet.se>
13935 * gtkutil.c (qttip_cb): Set line wrap to FALSE for tooltip widget.
13936 (xg_prepare_tooltip): Revert text in x->ttip_lbl, margins was
13939 2011-07-08 Jan Djärv <jan.h.d@swipnet.se>
13941 * gtkutil.c (xg_prepare_tooltip): Fix indentation and comment.
13942 Put text in x->ttip_lbl instead of gtk_tooltip_set_text (Bug#8591).
13943 (xg_hide_tooltip): Fix comment.
13945 * nsterm.m (initFrameFromEmacs): Don't use ns_return_types
13946 in registerServicesMenuSendTypes.
13947 (validRequestorForSendType): Don't check ns_return_types.
13949 * nsfns.m (Fx_open_connection): Put NSStringPboardType into
13952 2011-07-08 Jason Rumney <jasonr@gnu.org>
13954 * w32term.c (x_make_frame_visible): Use SH_SHOWNORMAL rather than
13955 SH_SHOW for hidden windows (Bug#5482).
13957 * w32fns.c (w32_wnd_proc) [WM_TIMER, WM_SET_CURSOR]: Avoid using
13958 frame struct members of non-existent frames (Bug#6284).
13960 2011-07-08 Jan Djärv <jan.h.d@swipnet.se>
13962 * nsterm.m (keyDown): Call to wantsToDelayTextChangeNotifications and
13963 variable firstTime not needed on OSX >= 10.6.
13964 (setPosition): setFloatValue:knobProportion: is deprecated on OSX
13965 >= 10.5. Use setKnobProportion, setDoubleValue.
13967 * nsterm.h (MAC_OS_X_VERSION_10_3, MAC_OS_X_VERSION_10_4)
13968 (MAC_OS_X_VERSION_10_5): Define if not defined.
13969 (EmacsView, EmacsTooltip): Implements NSWindowDelegate on OSX >= 10.6.
13970 (EmacsMenu): Implements NSMenuDelegate on OSX >= 10.6.
13971 (EmacsToolbar): Implements NSToolbarDelegate on OSX >= 10.6.
13973 * nsselect.m (ns_string_from_pasteboard): Don't use deprecated methods
13974 cString and lossyCString on OSX >= 10.4.
13976 * nsmenu.m (fillWithWidgetValue): Don't use deprecated method
13977 sizeToFit on OSX >= 10.2.
13979 * nsimage.m (allocInitFromFile): Don't use deprecated method
13980 bestRepresentationForDevice on OSX >= 10.6.
13982 * nsfns.m (check_ns_display_info): Cast to long and use %ld in error
13985 * emacs.c: Declare unexec_init_emacs_zone.
13987 * nsgui.h: Fix compiler warning about gnulib redefining verify.
13989 * nsselect.m (ns_get_local_selection): Change to extern (Bug#8842).
13991 * nsmenu.m (ns_update_menubar): Remove useless setDelegate call
13992 on svcsMenu (Bug#8842).
13994 * nsfns.m (Fx_open_connection): Remove NSStringPboardType from
13996 (Fns_list_services): Just return Qnil on 10.6, code not working there.
13998 * nsterm.m (QUTF8_STRING): Declare.
13999 (initFrameFromEmacs): Call registerServicesMenuSendTypes.
14000 (validRequestorForSendType): Return type is (id).
14001 Change indexOfObjectIdenticalTo to indexOfObject.
14002 Check if we have local selection before returning self (Bug#8842).
14003 (writeSelectionToPasteboard): Put local selection into paste board
14004 if we have a local selection (Bug#8842).
14005 (syms_of_nsterm): DEFSYM QUTF8_STRING.
14007 * nsterm.h (MAC_OS_X_VERSION_10_6): Define here instead of nsterm.m.
14008 (ns_get_local_selection): Declare.
14010 2011-07-07 Lars Magne Ingebrigtsen <larsi@gnus.org>
14012 * keymap.c (describe_map_tree): Don't insert a double newline at
14013 the end of the buffer (bug#1169) and return whether we inserted
14016 * callint.c (Fcall_interactively): Change "reading args" to
14017 "providing args" to try to clarify what it does (bug#1010).
14019 2011-07-07 Kenichi Handa <handa@m17n.org>
14021 * composite.c (composition_compute_stop_pos): Ignore a static
14022 composition starting before CHARPOS (Bug#8915).
14024 * xdisp.c (handle_composition_prop): Likewise.
14026 2011-07-07 Eli Zaretskii <eliz@gnu.org>
14028 * term.c (produce_glyphs) <xassert>: Allow IT_GLYPHLESS in it->what.
14031 2011-07-07 Kenichi Handa <handa@m17n.org>
14033 * character.h (unicode_category_t): New enum type.
14035 * chartab.c (uniprop_decoder_t, uniprop_encoder_t): New types.
14036 (Qchar_code_property_table): New variable.
14037 (UNIPROP_TABLE_P, UNIPROP_GET_DECODER)
14038 (UNIPROP_COMPRESSED_FORM_P): New macros.
14039 (char_table_ascii): Uncompress the compressed values.
14040 (sub_char_table_ref): New arg is_uniprop. Callers changed.
14041 Uncompress the compressed values.
14042 (sub_char_table_ref_and_range): Likewise.
14043 (char_table_ref_and_range): Uncompress the compressed values.
14044 (sub_char_table_set): New arg is_uniprop. Callers changed.
14045 Uncompress the compressed values.
14046 (sub_char_table_set_range): Args changed. Callers changed.
14047 (char_table_set_range): Adjuted for the above change.
14048 (map_sub_char_table): Delete args default_val and parent. Add arg
14049 top. Give decoded values to a Lisp function.
14050 (map_char_table): Adjust for the above change. Give decoded
14051 values to a Lisp function. Gcpro more variables.
14052 (uniprop_table_uncompress)
14053 (uniprop_decode_value_run_length): New functions.
14054 (uniprop_decoder, uniprop_decoder_count): New variables.
14055 (uniprop_get_decoder, uniprop_encode_value_character)
14056 (uniprop_encode_value_run_length, uniprop_encode_value_numeric):
14058 (uniprop_encoder, uniprop_encoder_count): New variables.
14059 (uniprop_get_encoder, uniprop_table)
14060 (Funicode_property_table_internal, Fget_unicode_property_internal)
14061 (Fput_unicode_property_internal): New functions.
14062 (syms_of_chartab): DEFSYM Qchar_code_property_table, defsubr
14063 Sunicode_property_table_internal, Sget_unicode_property_internal,
14064 and Sput_unicode_property_internal. Defvar_lisp
14065 char-code-property-alist.
14067 * composite.c (CHAR_COMPOSABLE_P): Adjust for the change of
14068 Vunicode_category_table.
14070 * font.c (font_range): Adjust for the change of
14071 Vunicode_category_table.
14073 2011-07-07 Dan Nicolaescu <dann@ics.uci.edu>
14075 * m/iris4d.h: Remove file, move contents ...
14076 * s/irix6-5.h: ... here.
14078 2011-07-06 Paul Eggert <eggert@cs.ucla.edu>
14080 Remove unportable assumption about struct layout (Bug#8884).
14081 * alloc.c (mark_buffer):
14082 * buffer.c (reset_buffer_local_variables, Fbuffer_local_variables)
14083 (clone_per_buffer_values): Don't assume that
14084 sizeof (struct buffer) is a multiple of sizeof (Lisp_Object).
14085 This isn't true in general, and it's particularly not true
14086 if Emacs is configured with --with-wide-int.
14087 * buffer.h (FIRST_FIELD_PER_BUFFER, LAST_FIELD_PER_BUFFER):
14088 New macros, used in the buffer.c change.
14090 2011-07-05 Jan Djärv <jan.h.d@swipnet.se>
14092 * xsettings.c: Use both GConf and GSettings if both are available.
14093 (store_config_changed_event): Add comment.
14094 (dpyinfo_valid, store_font_name_changed, map_tool_bar_style)
14095 (store_tool_bar_style_changed): New functions.
14096 (store_monospaced_changed): Add comment. Call dpyinfo_valid.
14097 (struct xsettings): Move font inside HAVE_XFT.
14098 (GSETTINGS_TOOL_BAR_STYLE, GSETTINGS_FONT_NAME): New defines.
14099 (GSETTINGS_MONO_FONT): Rename from SYSTEM_MONO_FONT.
14100 Move inside HAVE_XFT.
14101 (something_changed_gsettingsCB): Rename from something_changedCB.
14102 Check for changes in GSETTINGS_TOOL_BAR_STYLE and GSETTINGS_FONT_NAME
14104 (GCONF_TOOL_BAR_STYLE, GCONF_FONT_NAME): New defines.
14105 (GCONF_MONO_FONT): Rename from SYSTEM_MONO_FONT. Move inside HAVE_XFT.
14106 (something_changed_gconfCB): Rename from something_changedCB.
14107 Check for changes in GCONF_TOOL_BAR_STYLE and GCONF_FONT_NAME also.
14108 (parse_settings): Move check for font inside HAVE_XFT.
14109 (read_settings, apply_xft_settings): Add comment.
14110 (read_and_apply_settings): Add comment. Call map_tool_bar_style and
14111 store_tool_bar_style_changed. Move check for font inside HAVE_XFT and
14112 call store_font_name_changed.
14113 (xft_settings_event): Add comment.
14114 (init_gsettings): Add comment. Get values for GSETTINGS_TOOL_BAR_STYLE
14115 and GSETTINGS_FONT_NAME. Move check for fonts within HAVE_XFT.
14116 (init_gconf): Add comment. Get values for GCONF_TOOL_BAR_STYLE
14117 and GCONF_FONT_NAME. Move check for fonts within HAVE_XFT.
14118 (xsettings_initialize): Call init_gsettings last.
14119 (xsettings_get_system_font, xsettings_get_system_normal_font):
14122 2011-07-05 Paul Eggert <eggert@cs.ucla.edu>
14124 Random fixes. E.g., (random) never returned negative values.
14125 * fns.c (Frandom): Use GET_EMACS_TIME for random seed, and add the
14126 subseconds part to the entropy, as that's a bit more random.
14127 Prefer signed to unsigned, since the signedness doesn't matter and
14128 in general we prefer signed. When given a limit, use a
14129 denominator equal to INTMASK + 1, not to VALMASK + 1, because the
14130 latter isn't right if USE_2_TAGS_FOR_INTS.
14131 * sysdep.c (get_random): Return a value in the range 0..INTMASK,
14132 not 0..VALMASK. Don't discard "excess" bits that random () returns.
14134 2011-07-04 Stefan Monnier <monnier@iro.umontreal.ca>
14136 * textprop.c (text_property_stickiness):
14137 Obey Vtext_property_default_nonsticky.
14138 (syms_of_textprop): Add `display' to Vtext_property_default_nonsticky.
14139 * w32fns.c (syms_of_w32fns):
14140 * xfns.c (syms_of_xfns): Don't Add `display' since it's there by default.
14142 2011-07-04 Paul Eggert <eggert@cs.ucla.edu>
14144 * fileio.c (barf_or_query_if_file_exists): Use S_ISDIR.
14145 This is more efficient than Ffile_directory_p and avoids a minor race.
14147 2011-07-04 Lars Magne Ingebrigtsen <larsi@gnus.org>
14149 * buffer.c (Foverlay_put): Say what the return value is
14152 * fileio.c (barf_or_query_if_file_exists): Check first if the file
14153 is a directory before asking whether to use the file name
14155 (barf_or_query_if_file_exists): Make the "File is a directory"
14156 error be more correct.
14158 * fns.c (Frequire): Remove the mention of the .gz files, since
14159 that's installation-specific, but keep the mention of
14160 `get-load-suffixes'.
14162 2011-07-04 Paul Eggert <eggert@cs.ucla.edu>
14164 * editfns.c (Fformat_time_string): Don't assume strlen fits in int.
14165 Report string overflow if the output is too long.
14167 2011-07-04 Juanma Barranquero <lekktu@gmail.com>
14169 * gnutls.c (Fgnutls_boot): Don't mention :verify-error.
14170 (syms_of_gnutls): Remove duplicate DEFSYM for
14171 Qgnutls_bootprop_verify_hostname_error, an error for
14172 Qgnutls_bootprop_verify_error (which is no longer used).
14174 * eval.c (find_handler_clause): Remove parameters `sig' and `data',
14175 unused since 2011-01-26T20:02:07Z!monnier@iro.umontreal.ca. All callers changed.
14176 Also (re)move comments that are misplaced or no longer relevant.
14178 2011-07-03 Lars Magne Ingebrigtsen <larsi@gnus.org>
14180 * callint.c (Finteractive): Clarify the meaning of "@" (bug#8813).
14182 2011-07-03 Chong Yidong <cyd@stupidchicken.com>
14184 * xfaces.c (Finternal_merge_in_global_face): Modify the foreground
14185 and background color parameters if they have been changed.
14187 2011-07-03 Lars Magne Ingebrigtsen <larsi@gnus.org>
14189 * editfns.c (Fformat): Clarify the - and 0 flags (bug#6659).
14191 2011-07-03 Paul Eggert <eggert@cs.ucla.edu>
14193 * xsettings.c (SYSTEM_FONT): Define only when used.
14194 No need to define when HAVE_GSETTINGS || !HAVE_XFT.
14196 * keymap.c (access_keymap_1): Now static.
14198 2011-07-02 Chong Yidong <cyd@stupidchicken.com>
14200 * keyboard.c (command_loop_1): If a down-mouse event is unbound,
14201 leave any prefix arg for the up event (Bug#1586).
14203 2011-07-02 Lars Magne Ingebrigtsen <larsi@gnus.org>
14205 * lread.c (syms_of_lread): Mention single symbols defined by
14206 `defvar' or `defconst' (bug#7154).
14208 * fns.c (Frequire): Mention .el.gz files (bug#7314).
14209 (Frequire): Mention get-load-suffixes.
14211 2011-07-02 Martin Rudalics <rudalics@gmx.at>
14213 * window.h (window): Remove clone_number slot.
14214 * window.c (Fwindow_clone_number, Fset_window_clone_number):
14216 (make_parent_window, make_window, saved_window)
14217 (Fset_window_configuration, save_window_save): Don't deal with
14219 * buffer.c (Qclone_number): Remove declaration.
14220 (sort_overlays, overlay_strings): Don't deal with clone numbers.
14222 2011-07-02 Stefan Monnier <monnier@iro.umontreal.ca>
14224 Add multiple inheritance to keymaps.
14225 * keymap.c (Fmake_composed_keymap): New function.
14226 (Fset_keymap_parent): Simplify.
14227 (fix_submap_inheritance): Remove.
14228 (access_keymap_1): New function extracted from access_keymap to handle
14229 embedded parents and handle lists of maps.
14230 (access_keymap): Use it.
14231 (Fkeymap_prompt, map_keymap_internal, map_keymap, store_in_keymap)
14232 (Fcopy_keymap): Handle embedded parents.
14233 (Fcommand_remapping, define_as_prefix): Simplify.
14234 (Fkey_binding): Simplify.
14235 (syms_of_keymap): Move minibuffer-local-completion-map,
14236 minibuffer-local-filename-completion-map,
14237 minibuffer-local-must-match-map, and
14238 minibuffer-local-filename-must-match-map to Elisp.
14239 (syms_of_keymap): Defsubr make-composed-keymap.
14240 * keyboard.c (menu_bar_items): Use map_keymap_canonical.
14241 (parse_menu_item): Trivial simplification.
14243 2011-07-01 Glenn Morris <rgm@gnu.org>
14245 * Makefile.in (SETTINGS_LIBS): Fix typo.
14247 2011-07-01 Kazuhiro Ito <kzhr@d1.dion.ne.jp> (tiny change)
14249 * coding.c (Fencode_coding_string): Record the last coding system
14250 used, as the function doc string says (bug#8738).
14252 2011-07-01 Jan Djärv <jan.h.d@swipnet.se>
14254 * xsettings.c (store_monospaced_changed): Take new font as arg and
14255 check for change against current_mono_font.
14256 (EMACS_TYPE_SETTINGS): Remove this and related defines.
14257 (emacs_settings_constructor, emacs_settings_get_property)
14258 (emacs_settings_set_property, emacs_settings_class_init)
14259 (emacs_settings_init, gsettings_obj): Remove.
14260 (something_changedCB): New function for HAVE_GSETTINGS.
14261 (something_changedCB): HAVE_GCONF: Call store_monospaced_changed
14262 with value as argument.
14263 (init_gsettings): Check that GSETTINGS_SCHEMA exists before calling
14264 g_settings_new (Bug#8967). Do not create gsettings_obj.
14265 Remove calls to g_settings_bind. Connect something_changedCB to
14268 * xgselect.c: Add defined (HAVE_GSETTINGS).
14269 (xgselect_initialize): Ditto.
14271 * process.c: Add defined (HAVE_GSETTINGS) for xgselect.h
14272 (wait_reading_process_output): Add defined (HAVE_GSETTINGS) for
14275 2011-07-01 Paul Eggert <eggert@cs.ucla.edu>
14277 * eval.c (struct backtrace): Simplify and port the data structure.
14278 Do not assume that "int nargs : BITS_PER_INT - 2;" produces a
14279 signed bit field, as this assumption is not portable and it makes
14280 Emacs crash when compiled with Sun C 5.8 on sparc. Do not use
14281 "char debug_on_exit : 1" as this is not portable either; instead,
14282 use the portable "unsigned int debug_on_exit : 1". Remove unused
14283 member evalargs. Remove obsolete comments about cc bombing out.
14285 2011-06-30 Jan Djärv <jan.h.d@swipnet.se>
14287 * xsettings.c: Include glib-object.h, gio/gio.h if HAVE_GSETTINGS.
14288 Let HAVE_GSETTINGS override HAVE_GCONF.
14289 (store_monospaced_changed): New function.
14290 (EMACS_SETTINGS): A new type derived from GObject to handle
14291 GSettings notifications.
14292 (emacs_settings_constructor, emacs_settings_get_property)
14293 (emacs_settings_set_property, emacs_settings_class_init):
14295 (gsettings_client, gsettings_obj): New variables.
14296 (GSETTINGS_SCHEMA): New define.
14297 (something_changedCB): Call store_monospaced_changed.
14298 (init_gsettings): New function.
14299 (xsettings_initialize): Call init_gsettings.
14300 (syms_of_xsettings): Initialize gsettings_client, gsettings_obj
14303 * Makefile.in (SETTINGS_CFLAGS, SETTINGS_LIBS): Rename from
14306 2011-06-29 Martin Rudalics <rudalics@gmx.at>
14308 * window.c (resize_root_window, grow_mini_window)
14309 (shrink_mini_window): Rename Qresize_root_window to
14310 Qwindow_resize_root_window and Qresize_root_window_vertically to
14311 Qwindow_resize_root_window_vertically.
14313 2011-06-28 Paul Eggert <eggert@cs.ucla.edu>
14315 * gnutls.c (Qgnutls_bootprop_verify_error): Remove unused var.
14317 2011-06-27 Juanma Barranquero <lekktu@gmail.com>
14319 * makefile.w32-in: Redesign dependencies so they reflect more
14320 clearly which files are directly included by each source file,
14321 and not through other includes.
14323 2011-06-27 Martin Rudalics <rudalics@gmx.at>
14325 * buffer.c (Qclone_number): Declare static and DEFSYM it.
14326 (sort_overlays, overlay_strings): When an overlay's clone number
14327 matches the window's clone number process the overlay even if
14328 the overlay's window property doesn't match the current window.
14330 * window.c (Fwindow_vchild): Rename to Fwindow_top_child.
14331 (Fwindow_hchild): Rename to Fwindow_left_child.
14332 (Fwindow_next): Rename to Fwindow_next_sibling.
14333 (Fwindow_prev): Rename to Fwindow_prev_sibling.
14334 (resize_window_check): Rename to window_resize_check.
14335 (resize_window_apply): Rename to window_resize_apply.
14336 (Fresize_window_apply): Rename to Fwindow_resize_apply.
14337 (Fdelete_other_windows_internal, resize_frame_windows)
14338 (Fsplit_window_internal, Fdelete_window_internal)
14339 (grow_mini_window, shrink_mini_window)
14340 (Fresize_mini_window_internal): Fix callers accordingly.
14342 2011-06-26 Jan Djärv <jan.h.d@swipnet.se>
14344 * emacsgtkfixed.h: State that this is only used with Gtk+3.
14345 (emacs_fixed_set_min_size): Remove.
14346 (emacs_fixed_new): Take frame as argument.
14348 * emacsgtkfixed.c: State that this is only used with Gtk+3.
14349 (_EmacsFixedPrivate): Remove minwidth/height.
14350 Add struct frame *f.
14351 (emacs_fixed_init): Initialize priv->f.
14352 (get_parent_class, emacs_fixed_set_min_size): Remove.
14353 (emacs_fixed_new): Set priv->f to argument.
14354 (emacs_fixed_get_preferred_width)
14355 (emacs_fixed_get_preferred_height): Use min_width/height from
14356 frames size_hint to set minimum and natural (Bug#8919).
14357 (XSetWMSizeHints, XSetWMNormalHints): Override these functions
14358 and use min_width/height from frames size_hint to set
14359 min_width/height (Bug#8919).
14361 * gtkutil.c (xg_create_frame_widgets): Pass f to emacs_fixed_new.
14362 (x_wm_set_size_hint): Remove call to emacs_fixed_set_min_size.
14365 2011-06-26 Eli Zaretskii <eliz@gnu.org>
14367 * bidi.c (bidi_paragraph_init): Test for ZV_BYTE before calling
14368 bidi_at_paragraph_end, since fast_looking_at doesn't like to be
14371 2011-06-26 Chong Yidong <cyd@stupidchicken.com>
14373 * process.c (wait_reading_process_output): Bypass select if
14374 waiting for a cell while ignoring keyboard input, and input is
14375 pending. Suggested by Jan Djärv (Bug#8869).
14377 2011-06-25 Paul Eggert <eggert@cs.ucla.edu>
14379 Use gnulib's dup2 module instead of rolling our own.
14380 * sysdep.c (dup2) [!HAVE_DUP2]: Remove; gnulib now does this.
14382 2011-06-25 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
14384 * dispnew.c (scrolling_window): Before scrolling, turn off a
14385 mouse-highlight in the window being scrolled.
14387 2011-06-24 Juanma Barranquero <lekktu@gmail.com>
14389 Move DEFSYM to lisp.h and use everywhere.
14391 * character.h (DEFSYM): Move declaration...
14392 * lisp.h (DEFSYM): ...here.
14398 * w32select.c: Don't include character.h.
14400 * alloc.c (syms_of_alloc):
14401 * buffer.c (syms_of_buffer):
14402 * bytecode.c (syms_of_bytecode):
14403 * callint.c (syms_of_callint):
14404 * casefiddle.c (syms_of_casefiddle):
14405 * casetab.c (init_casetab_once):
14406 * category.c (init_category_once, syms_of_category):
14407 * ccl.c (syms_of_ccl):
14408 * cmds.c (syms_of_cmds):
14409 * composite.c (syms_of_composite):
14410 * dbusbind.c (syms_of_dbusbind):
14411 * dired.c (syms_of_dired):
14412 * dispnew.c (syms_of_display):
14413 * doc.c (syms_of_doc):
14414 * editfns.c (syms_of_editfns):
14415 * emacs.c (syms_of_emacs):
14416 * eval.c (syms_of_eval):
14417 * fileio.c (syms_of_fileio):
14418 * fns.c (syms_of_fns):
14419 * frame.c (syms_of_frame):
14420 * fringe.c (syms_of_fringe):
14421 * insdel.c (syms_of_insdel):
14422 * keymap.c (syms_of_keymap):
14423 * lread.c (init_obarray, syms_of_lread):
14424 * macros.c (syms_of_macros):
14425 * msdos.c (syms_of_msdos):
14426 * print.c (syms_of_print):
14427 * process.c (syms_of_process):
14428 * search.c (syms_of_search):
14429 * sound.c (syms_of_sound):
14430 * syntax.c (init_syntax_once, syms_of_syntax):
14431 * terminal.c (syms_of_terminal):
14432 * textprop.c (syms_of_textprop):
14433 * undo.c (syms_of_undo):
14434 * w32.c (globals_of_w32):
14435 * window.c (syms_of_window):
14436 * xdisp.c (syms_of_xdisp):
14437 * xfaces.c (syms_of_xfaces):
14438 * xfns.c (syms_of_xfns):
14439 * xmenu.c (syms_of_xmenu):
14440 * xsettings.c (syms_of_xsettings):
14441 * xterm.c (syms_of_xterm): Use DEFSYM.
14443 2011-06-24 Teodor Zlatanov <tzz@lifelogs.com>
14445 * gnutls.c (syms_of_gnutls): Use the DEFSYM macro from character.h.
14447 2011-06-23 Paul Eggert <eggert@cs.ucla.edu>
14449 Integer and buffer overflow fixes (Bug#8873).
14451 * print.c (printchar, strout): Check for string overflow.
14452 (PRINTPREPARE, printchar, strout):
14453 Don't set size unless allocation succeeds.
14455 * minibuf.c (read_minibuf_noninteractive): Use ptrdiff_t, not int,
14456 for sizes. Check for string overflow more accurately.
14457 Simplify newline removal at end; this suppresses a GCC 4.6.0 warning.
14459 * macros.c: Integer and buffer overflow fixes.
14460 * keyboard.h (struct keyboard.kbd_macro_bufsize):
14461 * macros.c (Fstart_kbd_macro, store_kbd_macro_char):
14462 Use ptrdiff_t, not int, for sizes.
14463 Don't increment bufsize until after realloc succeeds.
14464 Check for size-calculation overflow.
14465 (Fstart_kbd_macro): Use EMACS_INT, not int, for XINT result.
14467 * lisp.h (DEFVAR_KBOARD): Use offsetof instead of char * finagling.
14469 * lread.c: Integer overflow fixes.
14470 (read_integer): Radix is now EMACS_INT, not int,
14471 to improve quality of diagnostics for out-of-range radices.
14472 Calculate buffer size correctly for out-of-range radices.
14473 (read1): Check for integer overflow in radices, and in
14474 read-circle numbers.
14475 (read_escape): Avoid int overflow.
14476 (Fload, openp, read_buffer_size, read1)
14477 (substitute_object_recurse, read_vector, read_list, map_obarray):
14478 Use ptrdiff_t, not int, for sizes.
14479 (read1): Use EMACS_INT, not int, for sizes.
14480 Check for size overflow.
14482 * image.c (cache_image): Check for size arithmetic overflow.
14484 * lread.c: Integer overflow issues.
14485 (saved_doc_string_size, saved_doc_string_length)
14486 (prev_saved_doc_string_size, prev_saved_doc_string_length):
14487 Now ptrdiff_t, not int.
14488 (read1): Don't assume doc string length fits in int. Check for
14489 out-of-range doc string lengths.
14490 (read_list): Don't assume file position fits in int.
14491 (read_escape): Check for hex character overflow.
14493 2011-06-22 Leo Liu <sdl.web@gmail.com>
14495 * minibuf.c (Fcompleting_read_default, Vcompleting_read_function):
14496 Move to minibuffer.el.
14498 2011-06-22 Paul Eggert <eggert@cs.ucla.edu>
14500 Fixes for GLYPH_DEBUG found by GCC 4.6.0 static checking.
14501 The following patches are for when GLYPH_DEBUG && !XASSERT.
14502 * dispextern.h (trace_redisplay_p, dump_glyph_string):
14503 * dispnew.c (flush_stdout):
14504 * xdisp.c (dump_glyph_row, dump_glyph_matrix, dump_glyph):
14505 Mark as externally visible.
14506 * dispnew.c (check_window_matrix_pointers): Now static.
14507 * dispnew.c (window_to_frame_vpos):
14508 * xfns.c (unwind_create_frame):
14509 * xterm.c (x_check_font): Remove unused local.
14510 * scroll.c (CHECK_BOUNDS):
14511 * xfaces.c (cache_fache): Rename local to avoid shadowing.
14512 * xfns.c, w32fns.c (image_cache_refcount, dpyinfo_refcount): Now static.
14513 * xdisp.c (check_window_end): Now a no-op if !XASSERTS.
14514 (debug_first_unchanged_at_end_vpos, debug_last_unchanged_at_beg_vpos)
14515 (debug_dvpos, debug_dy, debug_delta, debug_delta_bytes, debug_end_vpos):
14517 (debug_method_add): Use va_list and vsprintf rather than relying
14518 on undefined behavior with wrong number of arguments.
14519 (dump_glyph, dump_glyph_row, Fdump_glyph_matrix):
14520 Don't assume ptrdiff_t and EMACS_INT are the same width as int.
14521 In this code, it's OK to assume C99 behavior for ptrdiff_t formats
14522 since we're not interested in debugging glyphs with old libraries.
14523 * xfaces.c (cache_face): Move debugging code earlier; this pacifies
14524 GCC 4.6.0's static checking.
14526 2011-06-22 Paul Eggert <eggert@cs.ucla.edu>
14528 Integer overflow and signedness fixes (Bug#8873).
14529 A few related buffer overrun fixes, too.
14531 * font.c (font_score): Use EMACS_INT, not int, to store XINT value.
14533 * dispextern.h (struct face.stipple):
14534 * image.c (x_bitmap_height, x_bitmap_width, x_bitmap_pixmap)
14535 (x_bitmap_mask, x_allocate_bitmap_record)
14536 (x_create_bitmap_from_data, x_create_bitmap_from_file)
14537 (x_destroy_bitmap, x_destroy_all_bitmaps, x_create_bitmap_mask)
14538 (x_create_bitmap_from_xpm_data):
14539 * nsterm.h (struct ns_display_info.bitmaps_size, .bitmaps_last):
14540 * w32term.h (struct w32_display_info.icon_bitmap_id, .bitmaps_size)
14542 * xfaces.c (load_pixmap):
14543 * xterm.c (x_bitmap_icon, x_wm_set_icon_pixmap):
14544 * xterm.h (struct x_display_info.icon_bitmap_id, .bitmaps_size)
14545 (.bitmaps_last, struct x_output.icon_bitmap):
14546 Use ptrdiff_t, not int, for bitmap indexes.
14547 (x_allocate_bitmap_record): Check for size overflow.
14548 * dispextern.h, lisp.h: Adjust to API changes elsewhere.
14550 Use ptrdiff_t, not int, for overlay counts.
14551 * buffer.h (overlays_at, sort_overlays, GET_OVERLAYS_AT):
14552 * editfns.c (overlays_around, get_pos_property):
14553 * textprop.c (get_char_property_and_overlay):
14554 * xdisp.c (next_overlay_change, note_mouse_highlight):
14555 * xfaces.c (face_at_buffer_position):
14556 * buffer.c (OVERLAY_COUNT_MAX): New macro.
14557 (overlays_at, overlays_in, sort_overlays, Foverlays_at)
14558 (Fnext_overlay_change, Fprevious_overlay_change)
14559 (mouse_face_overlay_overlaps, Foverlays_in):
14560 Use ptrdiff_t, not int, for sizes.
14561 (overlays_at, overlays_in): Check for size-calculation overflow.
14563 * xterm.c (xim_initialize, same_x_server): Strlen may not fit in int.
14565 * xsmfns.c (smc_save_yourself_CB, x_session_initialize): Avoid strlen.
14566 (x_session_initialize): Do not assume string length fits in int.
14568 * xsettings.c (apply_xft_settings): Fix potential buffer overrun.
14569 This is unlikely, but can occur if DPI is outlandish.
14571 * xsettings.c (Ffont_get_system_normal_font, Ffont_get_system_font):
14572 * xselect.c (Fx_get_atom_name): Avoid need for strlen.
14574 * xrdb.c: Don't assume strlen fits in int; avoid some strlens.
14575 * xrdb.c (magic_file_p, search_magic_path):
14576 Omit last arg SUFFIX; it was always 0. All callers changed.
14577 (magic_file_p): Use ptrdiff_t, not int. Check for size overflow.
14579 * xfont.c (xfont_match): Avoid need for strlen.
14581 * xfns.c: Don't assume strlen fits in int.
14582 (xic_create_fontsetname, x_window): Use ptrdiff_t, not int.
14584 * xdisp.c (message_log_check_duplicate): Return intmax_t,
14585 not unsigned long, as we prefer signed integers. All callers changed.
14586 Detect integer overflow in repeat count.
14587 (message_dolog): Don't assume print length fits in 39 bytes.
14588 (display_mode_element): Don't assume strlen fits in int.
14590 * termcap.c: Don't assume sizes fit in int and never overflow.
14591 (struct termcap_buffer, tgetent): Use ptrdiff_t, not int, for sizes.
14592 (gobble_line): Check for size-calculation overflow.
14594 * minibuf.c (Fread_buffer):
14595 * lread.c (intern, intern_c_string):
14596 * image.c (xpm_scan) [HAVE_NS && !HAVE_XPM]:
14597 Don't assume string length fits in int.
14599 * keyboard.c (parse_tool_bar_item):
14600 * gtkutil.c (style_changed_cb): Avoid need for strlen.
14602 * font.c: Don't assume string length fits in int.
14603 (font_parse_xlfd, font_parse_fcname, font_unparse_fcname):
14604 Use ptrdiff_t, not int.
14605 (font_intern_prop): Don't assume string length fits in int.
14606 Don't assume integer property fits in fixnum.
14607 * font.h (font_intern_prop): 2nd arg is now ptrdiff_t, not int.
14609 * filelock.c: Fix some buffer overrun and integer overflow issues.
14610 (get_boot_time): Don't assume gzip command string fits in 100 bytes.
14611 Reformulate so as not to need the command string.
14612 Invoke gzip -cd rather than gunzip, as it's more portable.
14613 (lock_info_type, lock_file_1, lock_file):
14614 Don't assume pid_t and time_t fit in unsigned long.
14615 (LOCK_PID_MAX): Remove; we now use more-reliable bounds.
14616 (current_lock_owner): Prefer signed type for sizes.
14617 Use memcpy, not strncpy, where memcpy is what is really wanted.
14618 Don't assume (via atoi) that time_t and pid_t fit in int.
14619 Check for time_t and/or pid_t out of range, e.g., via a network share.
14620 Don't alloca where an auto var works fine.
14622 * fileio.c: Fix some integer overflow issues.
14623 (file_name_as_directory, Fexpand_file_name, Fsubstitute_in_file_name):
14624 Don't assume string length fits in int.
14625 (directory_file_name): Don't assume string length fits in long.
14626 (make_temp_name): Don't assume pid fits in int, or that its print
14627 length is less than 20.
14629 * data.c (Fsubr_name): Rewrite to avoid a strlen call.
14631 * coding.c (make_subsidiaries): Don't assume string length fits in int.
14633 * callproc.c (child_setup): Rewrite to avoid two strlen calls.
14635 * process.c (Fformat_network_address): Use EMACS_INT, not EMACS_UINT.
14636 We prefer signed integers, even for size calculations.
14638 * emacs.c: Don't assume string length fits in 'int'.
14639 (DEFINE_DUMMY_FUNCTION, sort_args): Use ptrdiff_t, not int.
14640 (main): Don't invoke strlen when not needed.
14642 * dbusbind.c (XD_ERROR): Don't arbitrarily truncate string.
14643 (XD_DEBUG_MESSAGE): Don't waste a byte.
14645 * callproc.c (getenv_internal_1, getenv_internal)
14646 (Fgetenv_internal):
14647 * buffer.c (init_buffer): Don't assume string length fits in 'int'.
14649 * lread.c (invalid_syntax): Omit length argument.
14650 All uses changed. This doesn't fix a bug, but it simplifies the
14651 code away from its former Hollerith-constant appearance, and it's
14652 one less 'int' to worry about when looking at integer-overflow issues.
14653 (string_to_number): Simplify 2011-04-26 change by invoking xsignal1.
14655 * lisp.h (DEFUN): Remove bogus use of sizeof (struct Lisp_Subr).
14656 This didn't break anything, but it didn't help either.
14657 It's confusing to put a bogus integer in a place where the actual
14658 value does not matter.
14659 (LIST_END_P): Remove unused macro and its bogus comment.
14660 (make_fixnum_or_float): Remove unnecessary cast to EMACS_INT.
14662 * lisp.h (union Lisp_Object.i): EMACS_INT, not EMACS_UINT.
14663 This is for consistency with the ordinary, non-USE_LISP_UNION_TYPE,
14665 (struct Lisp_Bool_Vector.size): EMACS_INT, not EMACS_UINT.
14666 We prefer signed types, and the value cannot exceed the EMACS_INT
14667 range anyway (because otherwise the length would not be representable).
14668 (XSET) [USE_LISP_UNION_TYPE]: Use uintptr_t and intptr_t,
14669 not EMACS_UINT and EMACS_INT, when converting pointer to integer.
14670 This avoids a GCC warning when WIDE_EMACS_INT.
14672 * indent.c (sane_tab_width): New function.
14673 (current_column, scan_for_column, Findent_to, position_indentation)
14674 (compute_motion): Use it. This is just for clarity.
14675 (Fcompute_motion): Don't assume hscroll and tab offset fit in int.
14677 * image.c (xbm_image_p): Don't assume stated width, height fit in int.
14679 * lisp.h (lint_assume): New macro.
14680 * composite.c (composition_gstring_put_cache):
14681 * ftfont.c (ftfont_shape_by_flt): Use it to pacify GCC 4.6.0.
14683 * editfns.c, insdel.c:
14684 Omit unnecessary forward decls, to simplify future changes.
14686 * ftfont.c (ftfont_shape_by_flt): Use signed integers for lengths.
14688 * font.c (Ffont_shape_gstring): Don't assume glyph len fits in 'int'.
14690 * fns.c (Ffillarray): Don't assume bool vector size fits in 'int'.
14691 Use much-faster test for byte-length change.
14692 Don't assume string byte-length fits in 'int'.
14693 Check that character arg fits in 'int'.
14694 (mapcar1): Declare byte as byte, for clarity.
14696 * alloc.c (Fmake_bool_vector): Avoid unnecessary multiplication.
14698 * fns.c (concat): Catch string overflow earlier.
14699 Do not rely on integer wraparound.
14701 * dispextern.h (struct it.overlay_strings_charpos)
14702 (struct it.selective): Now EMACS_INT, not int.
14703 * xdisp.c (forward_to_next_line_start)
14704 (back_to_previous_visible_line_start)
14705 (reseat_at_next_visible_line_start, next_element_from_buffer):
14706 Don't arbitrarily truncate the value of 'selective' to int.
14708 * xdisp.c (init_iterator): Use XINT, not XFASTINT; it might be < 0.
14710 * composite.c: Don't truncate sizes to 'int'.
14711 (composition_gstring_p, composition_reseat_it)
14712 (composition_adjust_point): Use EMACS_INT, not int.
14713 (get_composition_id, composition_gstring_put_cache): Use EMACS_INT,
14714 not EMACS_UINT, for indexes.
14716 * category.h (CATEGORY_SET_P): Remove unnecessary cast to EMACS_INT.
14718 * buffer.c: Include <verify.h>.
14719 (struct sortvec.priority, struct sortstr.priority):
14720 Now EMACS_INT, not int.
14721 (compare_overlays, cmp_for_strings): Avoid subtraction overflow.
14722 (struct sortstr.size, record_overlay_string)
14723 (struct sortstrlist.size, struct sortlist.used):
14724 Don't truncate size to int.
14725 (record_overlay_string): Check for size-calculation overflow.
14726 (init_buffer_once): Check at compile-time, not run-time.
14728 2011-06-22 Jim Meyering <meyering@redhat.com>
14730 Don't leak an XBM-image-sized buffer
14731 * image.c (xbm_load): Free the image buffer after using it.
14733 2011-06-21 Paul Eggert <eggert@cs.ucla.edu>
14736 * composite.c (find_automatic_composition): Omit needless 'return 0;'
14737 that Sun C diagnosed.
14738 * fns.c (secure_hash): Fix pointer signedness issue.
14739 * intervals.c (static_offset_intervals): New function.
14740 (offset_intervals): Use it.
14742 2011-06-21 Leo Liu <sdl.web@gmail.com>
14745 * makefile.w32-in ($(BLD)/fns.$(O)): Include sha256.h and
14748 * fns.c (secure_hash): Rename from crypto_hash_function and change
14749 the first arg to accept symbols.
14750 (Fsecure_hash): New primitive.
14751 (syms_of_fns): New symbols.
14753 2011-06-20 Deniz Dogan <deniz@dogan.se>
14755 * process.c (Fset_process_buffer): Clarify return value in
14758 2011-06-18 Chong Yidong <cyd@stupidchicken.com>
14760 * dispnew.c (add_window_display_history): Use BVAR.
14762 * xdisp.c (debug_method_add): Use BVAR.
14763 (check_window_end, dump_glyph_matrix, dump_glyph)
14764 (dump_glyph_row, dump_glyph_string): Convert arglist to ANSI C.
14766 * xfaces.c (check_lface_attrs, check_lface, dump_realized_face):
14769 * xfns.c (Fx_create_frame, x_create_tip_frame): Delay image cache
14770 check till after the cache is created in init_frame_faces.
14772 2011-06-17 Stefan Monnier <monnier@iro.umontreal.ca>
14774 * fns.c (Fsafe_length): Yet another int/Lisp_Object mixup.
14776 2011-06-16 Paul Eggert <eggert@cs.ucla.edu>
14778 * lisp.h: Include <limits.h>, for INT_MAX, LONG_MAX, LLONG_MAX.
14779 Without this, prin1 mishandles Lisp_Misc_Save_Value printing on
14780 hosts with pre-C99 libraries, because pD is wrongly defined to "t".
14782 Improve buffer-overflow checking (Bug#8873).
14783 * fileio.c (Finsert_file_contents):
14784 * insdel.c (insert_from_buffer_1, replace_range, replace_range_2):
14785 Remove the old (too-loose) buffer overflow checks.
14786 They weren't needed, since make_gap checks for buffer overflow.
14787 * insdel.c (make_gap_larger): Catch buffer overflows that were missed.
14788 The old code merely checked for Emacs fixnum overflow, and relied
14789 on undefined (wraparound) behavior. The new code avoids undefined
14790 behavior, and also checks for ptrdiff_t and/or size_t overflow.
14792 * editfns.c (Finsert_char): Don't dump core with very negative counts.
14793 Tune. Don't use wider integers than needed. Don't use alloca.
14794 Use a bigger 'string' buffer. Rewrite to avoid 'n > 0' test.
14796 * insdel.c (replace_range): Fix buf overflow when insbytes < outgoing.
14798 * insdel.c, lisp.h (buffer_overflow): New function.
14799 (insert_from_buffer_1, replace_range, replace_range_2):
14800 * insdel.c (make_gap_larger):
14801 * editfns.c (Finsert_char):
14802 * fileio.c (Finsert_file_contents): Use it, to normalize wording.
14804 * buffer.h (BUF_BYTES_MAX): Cast to ptrdiff_t so that it's signed.
14806 2011-06-15 Paul Eggert <eggert@cs.ucla.edu>
14808 Integer overflow and signedness fixes (Bug#8873, Bug#8828).
14810 * ccl.c (ASCENDING_ORDER): New macro, to work around GCC bug 43772.
14811 (GET_CCL_RANGE, IN_INT_RANGE): Use it.
14813 * fileio.c: Don't assume EMACS_INT fits in off_t.
14814 (emacs_lseek): New static function.
14815 (Finsert_file_contents, Fwrite_region): Use it.
14816 Use SEEK_SET, SEEK_CUR, SEEK_END as appropriate.
14818 * fns.c (Fload_average): Don't assume 100 * load average fits in int.
14820 * fns.c: Don't overflow int when computing a list length.
14821 * fns.c (QUIT_COUNT_HEURISTIC): New constant.
14822 (Flength, Fsafe_length): Use EMACS_INT, not int, to avoid unwanted
14823 truncation on 64-bit hosts. Check for QUIT every
14824 QUIT_COUNT_HEURISTIC entries rather than every other entry; that's
14825 faster and is responsive enough.
14826 (Flength): Report an error instead of overflowing an integer.
14827 (Fsafe_length): Return a float if the value is not representable
14828 as a fixnum. This shouldn't happen except in contrived situations.
14829 (Fnthcdr, Fsort): Don't assume list length fits in int.
14830 (Fcopy_sequence): Don't assume vector length fits in int.
14832 * alloc.c: Check that resized vectors' lengths fit in fixnums.
14833 (header_size, word_size): New constants.
14834 (allocate_vectorlike): Don't check size overflow here.
14835 (allocate_vector): Check it here instead, since this is the only
14836 caller of allocate_vectorlike that could cause overflow.
14837 Check that the new vector's length is representable as a fixnum.
14839 * fns.c (next_almost_prime): Don't return a multiple of 3 or 5.
14840 The previous code was bogus. For example, next_almost_prime (32)
14841 returned 39, which is undesirable as it is a multiple of 3; and
14842 next_almost_prime (24) returned 25, which is a multiple of 5 so
14843 why was the code bothering to check for multiples of 7?
14845 * bytecode.c (exec_byte_code): Use ptrdiff_t, not int, for vector length.
14847 * eval.c, doprnt.c (SIZE_MAX): Remove; inttypes.h defines this now.
14849 Variadic C functions now count arguments with ptrdiff_t.
14850 This partly undoes my 2011-03-30 change, which replaced int with size_t.
14851 Back then I didn't know that the Emacs coding style prefers signed int.
14852 Also, in the meantime I found a few more instances where arguments
14853 were being counted with int, which may truncate counts on 64-bit
14854 machines, or EMACS_INT, which may be unnecessarily wide.
14855 * lisp.h (struct Lisp_Subr.function.aMANY)
14856 (DEFUN_ARGS_MANY, internal_condition_case_n, safe_call):
14857 Arg counts are now ptrdiff_t, not size_t.
14858 All variadic functions and their callers changed accordingly.
14859 (struct gcpro.nvars): Now size_t, not size_t. All uses changed.
14860 * bytecode.c (exec_byte_code): Check maxdepth for overflow,
14861 to avoid potential buffer overrun. Don't assume arg counts fit in 'int'.
14862 * callint.c (Fcall_interactively): Check arg count for overflow,
14863 to avoid potential buffer overrun. Use signed char, not 'int',
14864 for 'varies' array, so that we needn't bother to check its size
14865 calculation for overflow.
14866 * editfns.c (Fformat): Use ptrdiff_t, not EMACS_INT, to count args.
14867 * eval.c (apply_lambda):
14868 * fns.c (Fmapconcat): Use XFASTINT, not XINT, to get args length.
14869 (struct textprop_rec.argnum): Now ptrdiff_t, not int. All uses changed.
14870 (mapconcat): Use ptrdiff_t, not int and EMACS_INT, to count args.
14872 * callint.c (Fcall_interactively): Don't use index var as event count.
14874 * vm-limit.c (check_memory_limits): Fix incorrect extern function decls.
14875 * mem-limits.h (SIZE): Remove; no longer used.
14877 * xterm.c (x_alloc_nearest_color_1): Prefer int to long when int works.
14879 Remove unnecessary casts.
14880 * xterm.c (x_term_init):
14881 * xfns.c (x_set_border_pixel):
14882 * widget.c (create_frame_gcs): Remove casts to unsigned long etc.
14883 These aren't needed now that we assume ANSI C.
14885 * sound.c (Fplay_sound_internal): Remove cast to unsigned long.
14886 It's more likely to cause problems (due to unsigned overflow)
14889 * dired.c (Ffile_attributes): Don't use 32-bit hack on 64-bit hosts.
14891 * unexelf.c (unexec): Don't assume BSS addr fits in unsigned.
14893 * xterm.c (handle_one_xevent): Omit unnecessary casts to unsigned.
14895 * keyboard.c (modify_event_symbol): Don't limit alist len to UINT_MAX.
14897 * lisp.h (CHAR_TABLE_SET): Omit now-redundant test.
14899 * lread.c (Fload): Don't compare a possibly-garbage time_t value.
14901 GLYPH_CODE_FACE returns EMACS_INT, not int.
14902 * dispextern.h (merge_faces):
14903 * xfaces.c (merge_faces):
14904 * xdisp.c (get_next_display_element, next_element_from_display_vector):
14905 Don't assume EMACS_INT fits in int.
14907 * character.h (CHAR_VALID_P): Remove unused parameter.
14908 * fontset.c, lisp.h, xdisp.c: All uses changed.
14910 * editfns.c (Ftranslate_region_internal): Omit redundant test.
14912 * fns.c (concat): Minor tuning based on overflow analysis.
14913 This doesn't fix any bugs. Use int to hold character, instead
14914 of constantly refetching from Emacs object. Use XFASTINT, not
14915 XINT, for value known to be a character. Don't bother comparing
14916 a single byte to 0400, as it's always less.
14918 * floatfns.c (Fexpt):
14919 * fileio.c (make_temp_name): Omit unnecessary cast to unsigned.
14921 * editfns.c (Ftranslate_region_internal): Use int, not EMACS_INT
14924 * doc.c (get_doc_string): Omit (unsigned)c that mishandled negatives.
14926 * data.c (Faset): If ARRAY is a string, check that NEWELT is a char.
14927 Without this fix, on a 64-bit host (aset S 0 4294967386) would
14928 incorrectly succeed when S was a string, because 4294967386 was
14929 truncated before it was used.
14931 * chartab.c (Fchar_table_range): Use CHARACTERP to check range.
14932 Otherwise, an out-of-range integer could cause undefined behavior
14935 * composite.c: Use int, not EMACS_INT, for characters.
14936 (fill_gstring_body, composition_compute_stop_pos): Use int, not
14937 EMACS_INT, for values that are known to be in character range.
14938 This doesn't fix any bugs but is the usual style inside Emacs and
14939 may generate better code on 32-bit machines.
14941 Make sure a 64-bit char is never passed to ENCODE_CHAR.
14942 This is for reasons similar to the recent CHAR_STRING fix.
14943 * charset.c (Fencode_char): Check that character arg is actually
14944 a character. Pass an int to ENCODE_CHAR.
14945 * charset.h (ENCODE_CHAR): Verify that the character argument is no
14946 wider than 'int', as a compile-time check to prevent future regressions
14949 * character.c (char_string): Remove unnecessary casts.
14951 Make sure a 64-bit char is never passed to CHAR_STRING.
14952 Otherwise, CHAR_STRING would do the wrong thing on a 64-bit platform,
14953 by silently ignoring the top 32 bits, allowing some values
14954 that were far too large to be valid characters.
14955 * character.h: Include <verify.h>.
14956 (CHAR_STRING, CHAR_STRING_ADVANCE): Verify that the character
14957 arguments are no wider than unsigned, as a compile-time check
14958 to prevent future regressions in this area.
14960 * editfns.c (Fchar_to_string, general_insert_function, Finsert_char)
14961 (Fsubst_char_in_region):
14963 * xdisp.c (decode_mode_spec_coding):
14964 Adjust to CHAR_STRING's new requirement.
14965 * editfns.c (Finsert_char, Fsubst_char_in_region):
14966 * fns.c (concat): Check that character args are actually
14967 characters. Without this test, these functions did the wrong
14968 thing with wildly out-of-range values on 64-bit hosts.
14970 Remove incorrect casts to 'unsigned' that lose info on 64-bit hosts.
14971 These casts should not be needed on 32-bit hosts, either.
14972 * keyboard.c (read_char):
14973 * lread.c (Fload): Remove casts to unsigned.
14975 * lisp.h (UNSIGNED_CMP): New macro.
14976 This fixes comparison bugs on 64-bit hosts.
14977 (ASCII_CHAR_P): Use it.
14978 * casefiddle.c (casify_object):
14979 * character.h (ASCII_BYTE_P, CHAR_VALID_P)
14980 (SINGLE_BYTE_CHAR_P, CHAR_STRING):
14981 * composite.h (COMPOSITION_ENCODE_RULE_VALID):
14982 * dispextern.h (FACE_FROM_ID):
14983 * keyboard.c (read_char): Use UNSIGNED_CMP.
14985 * xmenu.c (dialog_selection_callback) [!USE_GTK]: Cast to intptr_t,
14986 not to EMACS_INT, to avoid GCC warning.
14988 * xfns.c (x_set_scroll_bar_default_width): Remove unused 'int' locals.
14990 * buffer.h (PTR_BYTE_POS, BUF_PTR_BYTE_POS): Remove harmful cast.
14991 The cast incorrectly truncated 64-bit byte offsets to 32 bits, and
14992 isn't needed on 32-bit machines.
14994 * buffer.c (Fgenerate_new_buffer_name):
14995 Use EMACS_INT for count, not int.
14996 (advance_to_char_boundary): Return EMACS_INT, not int.
14998 * data.c (Qcompiled_function): Now static.
15000 * window.c (window_body_lines): Now static.
15002 * image.c (gif_load): Rename local to avoid shadowing.
15004 * lisp.h (SAFE_ALLOCA_LISP): Check for integer overflow.
15005 (struct Lisp_Save_Value): Use ptrdiff_t, not int, for 'integer' member.
15006 * alloc.c (make_save_value): Integer argument is now of type
15007 ptrdiff_t, not int.
15008 (mark_object): Use ptrdiff_t, not int.
15009 * lisp.h (pD): New macro.
15010 * print.c (print_object): Use it.
15012 * alloc.c: Use EMACS_INT, not int, to count objects.
15013 (total_conses, total_markers, total_symbols, total_vector_size)
15014 (total_free_conses, total_free_markers, total_free_symbols)
15015 (total_free_floats, total_floats, total_free_intervals)
15016 (total_intervals, total_strings, total_free_strings):
15017 Now EMACS_INT, not int. All uses changed.
15018 (Fgarbage_collect): Compute overall total using a double, so that
15019 integer overflow is less likely to be a problem. Check for overflow
15020 when converting back to an integer.
15021 (n_interval_blocks, n_string_blocks, n_float_blocks, n_cons_blocks)
15022 (n_vectors, n_symbol_blocks, n_marker_blocks): Remove.
15023 These were 'int' variables that could overflow on 64-bit hosts;
15024 they were never used, so remove them instead of repairing them.
15025 (nzombies, ngcs, max_live, max_zombies): Now EMACS_INT, not 'int'.
15026 (inhibit_garbage_collection): Set gc_cons_threshold to max value.
15027 Previously, this ceilinged at INT_MAX, but that doesn't work on
15029 (allocate_pseudovector): Don't use EMACS_INT when int would do.
15031 * alloc.c (Fmake_bool_vector): Don't assume vector size fits in int.
15032 (allocate_vectorlike): Check for ptrdiff_t overflow.
15033 (mark_vectorlike, mark_char_table, mark_object): Avoid EMACS_UINT
15034 when a (possibly-narrower) signed value would do just as well.
15035 We prefer using signed arithmetic, to avoid comparison confusion.
15037 * alloc.c: Catch some string size overflows that we were missing.
15038 (XMALLOC_OVERRUN_CHECK_SIZE) [!XMALLOC_OVERRUN_CHECK]: Define to 0,
15039 for convenience in STRING_BYTES_MAX.
15040 (STRING_BYTES_MAX): New macro, superseding the old one in lisp.h.
15041 The definition here is exact; the one in lisp.h was approximate.
15042 (allocate_string_data): Check for string overflow. This catches
15043 some instances we weren't catching before. Also, it catches
15044 size_t overflow on (unusual) hosts where SIZE_MAX <= min
15045 (PTRDIFF_MAX, MOST_POSITIVE_FIXNUM), e.g., when size_t is 32 bits
15046 and ptrdiff_t and EMACS_INT are both 64 bits.
15048 * character.c, coding.c, doprnt.c, editfns.c, eval.c:
15049 All uses of STRING_BYTES_MAX replaced by STRING_BYTES_BOUND.
15050 * lisp.h (STRING_BYTES_BOUND): Rename from STRING_BYTES_MAX.
15052 * character.c (string_escape_byte8): Fix nbytes/nchars typo.
15054 * alloc.c (Fmake_string): Check for out-of-range init.
15056 2011-06-15 Stefan Monnier <monnier@iro.umontreal.ca>
15058 * eval.c (Fdefvaralias): Also mark the target as variable-special-p.
15060 2011-06-14 Jan Djärv <jan.h.d@swipnet.se>
15062 * xfns.c (x_set_scroll_bar_default_width): Remove argument to
15063 xg_get_default_scrollbar_width.
15065 * gtkutil.c: Include emacsgtkfixed.h if HAVE_GTK3.
15066 (int_gtk_range_get_value): Move to the scroll bar part of the file.
15067 (style_changed_cb): Call update_theme_scrollbar_width and call
15068 x_set_scroll_bar_default_width and xg_frame_set_char_size for
15069 all frames (Bug#8505).
15070 (xg_create_frame_widgets): Call emacs_fixed_new if HAVE_GTK3 (Bug#8505).
15071 Call gtk_window_set_resizable if HAVE_GTK3.
15072 (x_wm_set_size_hint): Call emacs_fixed_set_min_size with min width
15073 and height if HAVE_GTK3 (Bug#8505).
15074 (scroll_bar_width_for_theme): New variable.
15075 (update_theme_scrollbar_width): New function.
15076 (xg_get_default_scrollbar_width): Move code to
15077 update_theme_scrollbar_width, just return scroll_bar_width_for_theme.
15078 (xg_initialize): Call update_theme_scrollbar_width.
15080 * gtkutil.h (xg_get_default_scrollbar_width): Remove argument.
15082 * emacsgtkfixed.c, emacsgtkfixed.h: New files.
15084 2011-06-12 Martin Rudalics <rudalics@gmx.at>
15086 * frame.c (make_frame): Call other_buffer_safely instead of
15089 * window.c (temp_output_buffer_show): Call display_buffer with
15090 second argument Vtemp_buffer_show_specifiers and reset latter
15091 immediately after the call.
15092 (Vtemp_buffer_show_specifiers): New variable.
15093 (auto_window_vscroll_p, next_screen_context_lines)
15094 (Vscroll_preserve_screen_position): Remove leading asterisks from
15097 2011-06-12 Paul Eggert <eggert@cs.ucla.edu>
15099 Fix minor problems found by GCC 4.6.0 static checking.
15100 * buffer.c (Qclone_number): Remove for now, as it's unused.
15101 (record_buffer, Funrecord_buffer): Rename local to avoid shadowing.
15102 (record_buffer): Remove unused local.
15103 * frame.c (other_visible_frames, frame_buffer_list): Now static.
15104 (set_frame_buffer_list): Remove; unused.
15105 * frame.h (other_visible_frames): Remove decl.
15106 * keyboard.h (menu_items_inuse): Declare only if USE_GTK || USE_MOTIF.
15107 * lisp.h (frame_buffer_list, set_frame_buffer_list): Remove decls.
15108 (add_gpm_wait_descriptor, delete_gpm_wait_descriptor): Declare only
15110 * menu.c (menu_items_inuse): Now static unless USE_GTK || USE_MOTIF.
15111 * process.c (add_gpm_wait_descriptor, delete_gpm_wait_descriptor):
15112 Define only if HAVE_GPM.
15113 * widget.c (EmacsFrameResize, emacsFrameClassRec): Now static.
15114 (update_hints_inhibit): Remove; never set. All uses removed.
15115 * widgetprv.h (emacsFrameClassRec): Remove decl.
15116 * window.c (delete_deletable_window): Now returns void, since it
15117 wasn't returning anything.
15118 (compare_window_configurations): Remove unused locals.
15119 * xfns.c (x_set_scroll_bar_default_width): Remove unused locals.
15120 * xmenu.c (x_menu_set_in_use): Define only if USE_GTK || USE_MOTIF.
15121 (dialog_selection_callback) [!USE_GTK]: Prefer intptr_t for integers
15122 the same widths as pointers. This follows up on the 2011-05-06 patch.
15123 * xterm.c (x_alloc_lighter_color_for_widget): Define only if USE_LUCID.
15124 * xterm.h: Likewise.
15125 (x_menu_set_in_use): Declare only if USE_GTK || USE_MOTIF.
15127 2011-06-12 Juanma Barranquero <lekktu@gmail.com>
15129 * makefile.w32-in: Update dependencies.
15130 (LISP_H): Add lib/intprops.h.
15132 2011-06-11 Chong Yidong <cyd@stupidchicken.com>
15134 * image.c (gif_load): Add animation frame delay to the metadata.
15135 (syms_of_image): Use DEFSYM. New symbol `delay'.
15137 2011-06-11 Martin Rudalics <rudalics@gmx.at>
15139 * window.c (delete_deletable_window): Re-add.
15140 (Fset_window_configuration): Rewrite to handle dead buffers and
15141 consequently deletable windows.
15142 (window_tree, Fwindow_tree): Remove. Supply functionality in
15144 (compare_window_configurations): Simplify code.
15146 2011-06-11 Andreas Schwab <schwab@linux-m68k.org>
15148 * image.c (imagemagick_load_image): Fix type mismatch.
15149 (Fimagemagick_types): Likewise.
15151 * window.h (replace_buffer_in_windows): Declare.
15153 2011-06-11 Martin Rudalics <rudalics@gmx.at>
15155 * buffer.c: New Lisp objects Qbuffer_list_update_hook and
15156 Qclone_number. Remove external declaration of Qdelete_window.
15157 (Fbuffer_list): Rewrite doc-string. Minor restructuring of
15159 (Fget_buffer_create, Fmake_indirect_buffer, Frename_buffer):
15160 Run Qbuffer_list_update_hook if allowed.
15161 (Fother_buffer): Rewrite doc-string. Major rewrite for new
15162 buffer list implementation.
15163 (other_buffer_safely): New function.
15164 (Fkill_buffer): Replace call to replace_buffer_in_all_windows by
15165 calls to replace_buffer_in_windows and
15166 replace_buffer_in_windows_safely. Run Qbuffer_list_update_hook
15168 (record_buffer): Inhibit quitting and rewrite using quittable
15169 functions. Run Qbuffer_list_update_hook if allowed.
15170 (Frecord_buffer, Funrecord_buffer): New functions.
15171 (switch_to_buffer_1, Fswitch_to_buffer): Remove.
15172 Move switch-to-buffer to window.el.
15173 (bury-buffer): Move to window.el.
15174 (Vbuffer_list_update_hook): New variable.
15176 * lisp.h (other_buffer_safely): Add prototype in buffer.c
15179 * window.h (resize_frame_windows): Move up in code.
15180 (Fwindow_frame): Remove EXFUN.
15181 (replace_buffer_in_all_windows): Remove prototype.
15182 (replace_buffer_in_windows_safely): Add prototype.
15184 * window.c: Declare Qdelete_window static again. Move down
15185 declaration of select_count.
15186 (Fnext_window, Fprevious_window): Rewrite doc-strings.
15187 (Fother_window): Move to window.el.
15188 (window_loop): Remove DELETE_BUFFER_WINDOWS and UNSHOW_BUFFER
15189 cases. Add REPLACE_BUFFER_IN_WINDOWS_SAFELY case.
15190 (Fdelete_windows_on, Freplace_buffer_in_windows): Move to
15192 (replace_buffer_in_windows): Implement by calling
15193 Qreplace_buffer_in_windows.
15194 (replace_buffer_in_all_windows): Remove with some functionality
15195 moved into replace_buffer_in_windows_safely.
15196 (replace_buffer_in_windows_safely): New function.
15197 (select_window_norecord, select_frame_norecord): Move in front
15198 of run_window_configuration_change_hook. Remove now obsolete
15200 (Fset_window_buffer): Rewrite doc-string.
15201 Call Qrecord_window_buffer.
15202 (keys_of_window): Move binding for other-window to window.el.
15204 2011-06-11 Chong Yidong <cyd@stupidchicken.com>
15206 * dispextern.h (struct image): Replace data member, whose int_val
15207 and ptr_val fields were not used by anything, with a single
15210 * image.c (Fimage_metadata, make_image, mark_image, tiff_load)
15211 (gif_clear_image, gif_load, imagemagick_load_image)
15212 (gs_clear_image, gs_load): Callers changed.
15214 2011-06-10 Paul Eggert <eggert@cs.ucla.edu>
15216 * buffer.h: Include <time.h>, for time_t.
15217 Needed to build on FreeBSD 8.2. Problem reported by Herbert J. Skuhra.
15219 Fix minor problems found by static checking.
15221 * image.c (PixelGetMagickColor): Declare if ImageMagick headers don't.
15223 Make identifiers static if they are not used in other modules.
15224 * data.c (Qcompiled_function, Qframe, Qvector):
15225 * image.c (QimageMagick, Qsvg):
15226 * minibuf.c (Qmetadata):
15227 * window.c (resize_window_check, resize_root_window): Now static.
15228 * window.h (resize_window_check, resize_root_window): Remove decls.
15230 * window.c (window_deletion_count, delete_deletable_window):
15232 (window_body_lines): Now static.
15233 (Fdelete_other_windows_internal): Mark vars as initialized.
15234 Make sure 'resize_failed' is initialized.
15235 (run_window_configuration_change_hook): Rename local to avoid shadowing.
15236 (resize_window_apply): Remove unused local.
15237 * window.h (delete_deletable_window): Remove decl.
15239 * image.c (gif_load, svg_load_image): Rename locals to avoid shadowing.
15240 (imagemagick_load_image): Fix pointer signedness problem by changing
15241 last arg from unsigned char * to char *. All uses changed.
15242 Also, fix a local for similar reasons.
15243 Remove unused locals. Remove locals to avoid shadowing.
15244 (fn_rsvg_handle_free): Remove; unused.
15245 (svg_load, svg_load_image): Fix pointer signedness problem.
15246 (imagemagick_load_image): Don't use garbage pointer image_wand.
15248 * ftfont.c (ftfont_get_metrics, ftfont_drive_otf): Remove unused locals.
15250 2011-06-10 Chong Yidong <cyd@stupidchicken.com>
15252 * image.c (gif_load): Fix omitted cast error introduced by
15255 2011-06-10 Martin Rudalics <rudalics@gmx.at>
15257 * window.h (resize_proportionally, orig_total_lines)
15258 (orig_top_line): Remove from window structure.
15259 (set_window_height, set_window_width, change_window_heights)
15260 (Fdelete_window): Remove prototypes.
15261 (resize_frame_windows): Remove duplicate declaration.
15263 2011-06-10 Eli Zaretskii <eliz@gnu.org>
15265 * window.h (resize_frame_windows, resize_window_check)
15266 (delete_deletable_window, resize_root_window)
15267 (resize_frame_windows): Declare prototypes.
15269 * window.c (resize_window_apply): Make definition be "static" to
15270 match the prototype.
15272 2011-06-10 Martin Rudalics <rudalics@gmx.at>
15274 * window.c: Remove declarations of Qwindow_size_fixed,
15275 window_min_size_1, window_min_size_2, window_min_size,
15276 size_window, window_fixed_size_p, enlarge_window, delete_window.
15277 Remove static from declaration of Qdelete_window, it's
15278 temporarily needed by Fbury_buffer.
15279 (replace_window): Don't assign orig_top_line and
15281 (Fdelete_window, delete_window): Remove. Window deletion is
15282 handled by window.el.
15283 (window_loop): Remove DELETE_OTHER_WINDOWS case.
15284 Replace Fdelete_window calls with calls to Qdelete_window.
15285 (Fdelete_other_windows): Remove. Deleting other windows is
15286 handled by window.el.
15287 (window_fixed_size_p): Remove. Fixed-sizeness of windows is
15288 handled in window.el.
15289 (window_min_size_2, window_min_size_1, window_min_size): Remove.
15290 Window minimum sizes are handled in window.el.
15291 (shrink_windows, size_window, set_window_height)
15292 (set_window_width, change_window_heights, window_height)
15293 (window_width, CURBEG, CURSIZE, enlarge_window)
15294 (adjust_window_trailing_edge, Fadjust_window_trailing_edge)
15295 (Fenlarge_window, Fshrink_window): Remove. Window resizing is
15296 handled in window.el.
15297 (make_dummy_parent): Rename to make_parent_window and give it a
15298 second argument horflag.
15299 (make_window): Don't set resize_proportionally any more.
15300 (Fsplit_window): Remove. Windows are split in window.el.
15301 (save_restore_action, save_restore_orig_size)
15302 (shrink_window_lowest_first, save_restore_orig_size): Remove.
15303 Resize mini windows in window.el.
15304 (grow_mini_window, shrink_mini_window): Implement by calling
15305 Qresize_root_window_vertically, resize_window_check and
15306 resize_window_apply.
15307 (saved_window, Fset_window_configuration, save_window_save):
15308 Do not handle orig_top_line, orig_total_lines, and
15309 resize_proportionally.
15310 (window_min_height, window_min_width): Move to window.el.
15311 (keys_of_window): Move bindings for delete-other-windows,
15312 split-window, delete-window and enlarge-window to window.el.
15314 * buffer.c: Temporarily extern Qdelete_window.
15315 (Fbury_buffer): Temporarily call Qdelete_window instead of
15316 Fdelete_window (Fbury_buffer will move to window.el soon).
15318 * frame.c (set_menu_bar_lines_1): Remove code handling
15319 orig_top_line and orig_total_lines.
15321 * dispnew.c (adjust_frame_glyphs_initially): Don't use
15322 set_window_height but set heights directly.
15323 (change_frame_size_1): Use resize_frame_windows.
15325 * xdisp.c (init_xdisp): Don't use set_window_height but set
15328 * xfns.c (x_set_menu_bar_lines, x_set_tool_bar_lines):
15329 Use resize_frame_windows instead of change_window_heights and run
15330 run_window_configuration_change_hook.
15332 * w32fns.c (x_set_tool_bar_lines): Use resize_frame_windows
15333 instead of change_window_heights and run
15334 run_window_configuration_change_hook.
15336 2011-06-09 Martin Rudalics <rudalics@gmx.at>
15338 * window.c (replace_window): Rename second argument REPLACEMENT to
15339 NEW. New third argument SETFLAG. Rewrite.
15340 (delete_window, make_dummy_parent): Call replace_window with
15342 (window_list_1): Move down in code.
15343 (run_window_configuration_change_hook): Move set_buffer part
15344 before select_frame_norecord part in order to unwind correctly.
15345 Rename count1 to count.
15346 (recombine_windows, delete_deletable_window, resize_root_window)
15347 (Fdelete_other_windows_internal)
15348 (Frun_window_configuration_change_hook, make_parent_window)
15349 (resize_window_check, resize_window_apply, Fresize_window_apply)
15350 (resize_frame_windows, Fsplit_window_internal)
15351 (Fdelete_window_internal, Fresize_mini_window_internal):
15353 (syms_of_window): New variables Vwindow_splits and Vwindow_nest.
15355 2011-06-08 Martin Rudalics <rudalics@gmx.at>
15357 * window.h (window): Add some new members to window structure -
15358 normal_lines, normal_cols, new_total, new_normal, clone_number,
15359 splits, nest, prev_buffers, next_buffers.
15360 (WINDOW_TOTAL_SIZE): Move here from window.c.
15361 (MIN_SAFE_WINDOW_WIDTH, MIN_SAFE_WINDOW_HEIGHT): Define here.
15363 * window.c (Fwindow_height, Fwindow_width, Fwindow_full_width_p):
15365 (make_dummy_parent): Set new members of windows structure.
15366 (make_window): Move down in code. Handle new members of window
15368 (Fwindow_clone_number, Fwindow_splits, Fset_window_splits)
15369 (Fwindow_nest, Fset_window_nest, Fwindow_new_total)
15370 (Fwindow_normal_size, Fwindow_new_normal, Fwindow_prev_buffers)
15371 (Fset_window_prev_buffers, Fwindow_next_buffers)
15372 (Fset_window_next_buffers, Fset_window_clone_number):
15374 (Fwindow_hscroll, Fwindow_at, Fwindow_point, Fwindow_start)
15375 (Fwindow_end, Fwindow_line_height, Fset_window_dedicated_p):
15377 (Fwindow_parameters, Fwindow_parameter, Fset_window_parameter):
15378 Argument WINDOW can be now internal window too.
15379 (Fwindow_use_time): Move up in code.
15380 (Fget_buffer_window): Rename argument FRAME to ALL-FRAMES.
15381 Rewrite doc-string.
15382 (Fset_window_configuration, saved_window)
15383 (Fcurrent_window_configuration, save_window_save): Handle new
15384 members of window structure.
15385 (WINDOW_TOTAL_SIZE, MIN_SAFE_WINDOW_WIDTH)
15386 (MIN_SAFE_WINDOW_HEIGHT): Move to window.h.
15387 (syms_of_window): New Lisp objects Qrecord_window_buffer,
15388 Qwindow_deletable_p, Qdelete_window, Qreplace_buffer_in_windows,
15389 Qget_mru_window, Qresize_root_window,
15390 Qresize_root_window_vertically, Qsafe, Qabove, Qbelow,
15391 Qauto_buffer_name; staticpro them.
15393 2011-06-07 Martin Rudalics <rudalics@gmx.at>
15395 * window.c (Fwindow_total_size, Fwindow_left_column)
15396 (Fwindow_top_line, window_body_lines, Fwindow_body_size)
15397 (Fwindow_list_1): New functions.
15398 (window_box_text_cols): Replace with window_body_cols.
15399 (Fwindow_width, Fscroll_left, Fscroll_right):
15400 Use window_body_cols instead of window_box_text_cols.
15401 (delete_window, Fset_window_configuration):
15402 Call delete_all_subwindows with window as argument.
15403 (delete_all_subwindows): Take a window as argument and not a
15404 structure. Rewrite.
15405 (window_loop): Remove handling of GET_LRU_WINDOW and
15406 GET_LARGEST_WINDOW.
15407 (Fget_lru_window, Fget_largest_window): Move to window.el.
15409 * window.h: Extern window_body_cols instead of
15410 window_box_text_cols. delete_all_subwindows now takes a
15411 Lisp_Object as argument.
15413 * indent.c (compute_motion, Fcompute_motion):
15414 Use window_body_cols instead of window_box_text_cols.
15416 * frame.c (delete_frame): Call delete_all_subwindows with root
15417 window as argument.
15419 2011-06-07 Daniel Colascione <dan.colascione@gmail.com>
15421 * fns.c (Fputhash): Document return value.
15423 2011-06-06 Chong Yidong <cyd@stupidchicken.com>
15425 * image.c (gif_load): Implement gif89a spec "no disposal" method.
15427 2011-06-06 Paul Eggert <eggert@cs.ucla.edu>
15429 Cons<->int and similar integer overflow fixes (Bug#8794).
15431 Check for overflow when converting integer to cons and back.
15432 * charset.c (Fdefine_charset_internal, Fdecode_char):
15433 Use cons_to_unsigned to catch overflow.
15434 (Fencode_char): Use INTEGER_TO_CONS.
15435 * composite.h (LGLYPH_CODE): Use cons_to_unsigned.
15436 (LGLYPH_SET_CODE): Use INTEGER_TO_CONS.
15437 * data.c (long_to_cons, cons_to_long): Remove.
15438 (cons_to_unsigned, cons_to_signed): New functions.
15439 These signal an error for invalid or out-of-range values.
15440 * dired.c (Ffile_attributes): Use INTEGER_TO_CONS.
15441 * fileio.c (Fset_visited_file_modtime): Use CONS_TO_INTEGER.
15442 * font.c (Ffont_variation_glyphs):
15443 * fontset.c (Finternal_char_font): Use INTEGER_TO_CONS.
15444 * lisp.h: Include <intprops.h>.
15445 (INTEGER_TO_CONS, CONS_TO_INTEGER): New macros.
15446 (cons_to_signed, cons_to_unsigned): New decls.
15447 (long_to_cons, cons_to_long): Remove decls.
15448 * undo.c (record_first_change): Use INTEGER_TO_CONS.
15449 (Fprimitive_undo): Use CONS_TO_INTEGER.
15450 * xfns.c (Fx_window_property): Likewise.
15451 * xselect.c: Include <limits.h>.
15452 (x_own_selection, selection_data_to_lisp_data):
15453 Use INTEGER_TO_CONS.
15454 (x_handle_selection_request, x_handle_selection_clear)
15455 (x_get_foreign_selection, Fx_disown_selection_internal)
15456 (Fx_get_atom_name, x_send_client_event): Use CONS_TO_INTEGER.
15457 (lisp_data_to_selection_data): Use cons_to_unsigned.
15458 (x_fill_property_data): Use cons_to_signed.
15459 Report values out of range.
15461 Check for buffer and string overflow more precisely.
15462 * buffer.h (BUF_BYTES_MAX): New macro.
15463 * lisp.h (STRING_BYTES_MAX): New macro.
15464 * alloc.c (Fmake_string):
15465 * character.c (string_escape_byte8):
15466 * coding.c (coding_alloc_by_realloc):
15467 * doprnt.c (doprnt):
15468 * editfns.c (Fformat):
15470 Use STRING_BYTES_MAX, not MOST_POSITIVE_FIXNUM,
15471 since they may not be the same number.
15472 * editfns.c (Finsert_char):
15473 * fileio.c (Finsert_file_contents):
15474 Likewise for BUF_BYTES_MAX.
15476 * image.c: Use ptrdiff_t, not int, for sizes.
15477 (slurp_file): Switch from int to ptrdiff_t.
15479 (slurp_file): Check that file size fits in both size_t (for
15480 malloc) and ptrdiff_t (for sanity and safety).
15482 * fileio.c (Fverify_visited_file_modtime): Avoid time overflow
15483 if b->modtime has its maximal value.
15485 * dired.c (Ffile_attributes): Don't assume EMACS_INT has >32 bits.
15487 Don't assume time_t can fit into int.
15488 * buffer.h (struct buffer.modtime): Now time_t, not int.
15489 * fileio.c (Fvisited_file_modtime): No need for time_t cast now.
15490 * undo.c (Fprimitive_undo): Use time_t, not int, for time_t value.
15492 Minor fixes for signed vs unsigned integers.
15493 * character.h (MAYBE_UNIFY_CHAR):
15494 * charset.c (maybe_unify_char):
15495 * keyboard.c (read_char, reorder_modifiers):
15496 XINT -> XFASTINT, since the integer must be nonnegative.
15497 * ftfont.c (ftfont_spec_pattern):
15498 * keymap.c (access_keymap, silly_event_symbol_error):
15499 XUINT -> XFASTINT, since the integer must be nonnegative.
15500 (Fsingle_key_description, preferred_sequence_p): XUINT -> XINT,
15501 since it makes no difference and we prefer signed.
15502 * keyboard.c (record_char): Use XUINT when all the neighbors do.
15503 (access_keymap): NATNUMP -> INTEGERP, since the integer must be
15506 2011-06-06 Stefan Monnier <monnier@iro.umontreal.ca>
15508 * window.h (Fwindow_frame): Declare.
15510 2011-06-06 Paul Eggert <eggert@cs.ucla.edu>
15512 * alloc.c: Simplify handling of large-request failures (Bug#8800).
15513 (SPARE_MEMORY): Always define.
15514 (LARGE_REQUEST): Remove.
15515 (memory_full): Use SPARE_MEMORY rather than LARGE_REQUEST.
15517 2011-06-06 Martin Rudalics <rudalics@gmx.at>
15519 * lisp.h: Move EXFUNS for Fframe_root_window,
15520 Fframe_first_window and Fset_frame_selected_window to window.h.
15522 * window.h: Move EXFUNS for Fframe_root_window,
15523 Fframe_first_window and Fset_frame_selected_window here from
15526 * frame.c (Fwindow_frame, Fframe_first_window)
15527 (Fframe_root_window, Fframe_selected_window)
15528 (Fset_frame_selected_window): Move to window.c.
15529 (Factive_minibuffer_window): Move to minibuf.c.
15530 (Fother_visible_frames_p): New function.
15532 * minibuf.c (Factive_minibuffer_window): Move here from frame.c.
15534 * window.c (decode_window, decode_any_window): Move up in code.
15535 (Fwindowp, Fwindow_live_p): Rewrite doc-strings.
15536 (inhibit_frame_unsplittable): Remove unused variable.
15537 (Fwindow_buffer): Move up and rewrite doc-string.
15538 (Fwindow_parent, Fwindow_vchild, Fwindow_hchild, Fwindow_next)
15539 (Fwindow_prev): New functions.
15540 (Fwindow_frame): Move here from frame.c. Accept any window as
15542 (Fframe_root_window, Fframe_first_window)
15543 (Fframe_selected_window): Move here from frame.c. Accept frame
15544 or arbitrary window as argument. Update doc-strings.
15545 (Fminibuffer_window): Move up in code.
15546 (Fwindow_minibuffer_p): Move up in code and simplify.
15547 (Fset_frame_selected_window): Move here from frame.c.
15549 (Fselected_window, select_window, Fselect_window): Move up in
15550 code. Minor doc-string fixes.
15552 2011-06-06 Paul Eggert <eggert@cs.ucla.edu>
15554 * alloc.c (memory_full) [SYSTEM_MALLOC]: Port to MacOS (Bug#8800).
15555 Do not assume that spare memory exists; that assumption is valid
15556 only if SYSTEM_MALLOC.
15557 (LARGE_REQUEST): New macro, so that the issue of large requests
15558 is separated from the issue of spare memory.
15560 2011-06-05 Andreas Schwab <schwab@linux-m68k.org>
15562 * editfns.c (Fformat): Correctly handle zero flag with hexadecimal
15565 * gtkutil.c (xg_get_default_scrollbar_width): Avoid warning.
15567 * xfns.c (x_set_scroll_bar_default_width): Move declarations
15570 2011-06-05 Jan Djärv <jan.h.d@swipnet.se>
15572 * gtkutil.c (xg_get_default_scrollbar_width): New function.
15574 * gtkutil.h: Declare xg_get_default_scrollbar_width.
15576 * xfns.c (x_set_scroll_bar_default_width): If USE_GTK, get
15577 min width by calling x_set_scroll_bar_default_width (Bug#8505).
15579 2011-06-05 Juanma Barranquero <lekktu@gmail.com>
15581 * xdisp.c (single_display_spec_intangible_p): Remove declaration.
15583 2011-06-04 Chong Yidong <cyd@stupidchicken.com>
15585 * xselect.c (x_clipboard_manager_save): Remove redundant arg.
15586 (x_clipboard_manager_save): Add return value.
15587 (x_clipboard_manager_error_1, x_clipboard_manager_error_2):
15588 New error handlers.
15589 (x_clipboard_manager_save_frame, x_clipboard_manager_save_all):
15590 Obey Vx_select_enable_clipboard_manager. Catch errors in
15591 x_clipboard_manager_save (Bug#8779).
15592 (Vx_select_enable_clipboard_manager): New variable.
15593 (x_get_foreign_selection): Reduce scope of x_catch_errors (Bug#8790).
15595 2011-06-04 Dan Nicolaescu <dann@ics.uci.edu>
15597 * emacs.c (main): Warn when starting a GTK emacs in daemon mode.
15599 2011-06-04 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
15601 * fringe.c (update_window_fringes): Don't update overlay arrow bitmap
15602 in the current matrix if keep_current_p is non-zero.
15604 2011-06-04 Eli Zaretskii <eliz@gnu.org>
15606 * bidi.c (bidi_level_of_next_char): Fix last change.
15608 2011-06-03 Eli Zaretskii <eliz@gnu.org>
15610 Support bidi reordering of text covered by display properties.
15612 * bidi.c (bidi_copy_it): Use offsetof instead of emulating it.
15613 (bidi_fetch_char, bidi_fetch_char_advance): New functions.
15614 (bidi_cache_search, bidi_cache_iterator_state)
15615 (bidi_paragraph_init, bidi_resolve_explicit, bidi_resolve_weak)
15616 (bidi_level_of_next_char, bidi_move_to_visually_next):
15617 Support character positions inside a run of characters covered by a
15619 (bidi_paragraph_init, bidi_resolve_explicit_1)
15620 (bidi_level_of_next_char): Call bidi_fetch_char and
15621 bidi_fetch_char_advance instead of FETCH_CHAR and
15622 FETCH_CHAR_ADVANCE.
15623 (bidi_init_it): Initialize new members.
15624 (LRE_CHAR, RLE_CHAR, PDF_CHAR, LRO_CHAR, RLO_CHAR): Remove macro
15626 (bidi_explicit_dir_char): Lookup character type in bidi_type_table,
15627 instead of using explicit *_CHAR codes.
15628 (bidi_resolve_explicit, bidi_resolve_weak):
15629 Use FETCH_MULTIBYTE_CHAR instead of FETCH_CHAR, as reordering of
15630 bidirectional text is supported only in multibyte buffers.
15631 (bidi_init_it): Accept additional argument FRAME_WINDOW_P and use
15632 it to initialize the frame_window_p member of struct bidi_it.
15633 (bidi_cache_iterator_state, bidi_resolve_explicit_1)
15634 (bidi_resolve_explicit, bidi_resolve_weak)
15635 (bidi_level_of_next_char, bidi_move_to_visually_next): Abort if
15636 bidi_it->nchars is non-positive.
15637 (bidi_level_of_next_char): Don't try to lookup the cache for the
15638 next/previous character if nothing is cached there yet, or if we
15639 were just reseat()'ed to a new position.
15641 * xdisp.c (set_cursor_from_row): Set start and stop points
15642 according to the row's direction when priming the loop that looks
15643 for the glyph on which to display cursor.
15644 (single_display_spec_intangible_p): Function deleted.
15645 (display_prop_intangible_p): Reimplement to call
15646 handle_display_spec instead of single_display_spec_intangible_p.
15647 Accept 3 additional arguments needed by handle_display_spec.
15648 This fixes incorrect cursor motion across display property with complex
15649 values: lists, `(when COND...)' forms, etc.
15650 (single_display_spec_string_p): Support property values that are
15651 lists with the argument STRING its top-level element.
15652 (display_prop_string_p): Fix the condition for processing a
15653 property that is a list to be consistent with handle_display_spec.
15654 (handle_display_spec): New function, refactored from the
15655 last portion of handle_display_prop.
15656 (compute_display_string_pos): Accept additional argument
15657 FRAME_WINDOW_P. Call handle_display_spec to determine whether the
15658 value of a `display' property is a "replacing spec".
15659 (handle_single_display_spec): Accept 2 additional arguments BUFPOS
15660 and FRAME_WINDOW_P. If IT is NULL, don't set up the iterator from
15661 the display property, but just return a value indicating whether
15662 the display property will replace the characters it covers.
15663 (Fcurrent_bidi_paragraph_direction): Initialize the nchars and
15664 frame_window_p members of struct bidi_it.
15665 (compute_display_string_pos, compute_display_string_end):
15667 (push_it): Accept second argument POSITION, where pop_it should
15668 jump to continue iteration.
15669 (reseat_1): Initialize bidi_it.disp_pos.
15671 * keyboard.c (adjust_point_for_property): Adjust the call to
15672 display_prop_intangible_p to its new signature.
15674 * dispextern.h (struct bidi_it): New member frame_window_p.
15675 (bidi_init_it): Update prototypes.
15676 (display_prop_intangible_p): Update prototype.
15677 (compute_display_string_pos, compute_display_string_end):
15678 Declare prototypes.
15679 (struct bidi_it): New members nchars and disp_pos. ch_len is now
15682 2011-06-02 Paul Eggert <eggert@cs.ucla.edu>
15684 Malloc failure behavior now depends on size of allocation.
15685 * alloc.c (buffer_memory_full, memory_full): New arg NBYTES.
15686 * lisp.h: Change signatures accordingly.
15687 * alloc.c, buffer.c, editfns.c, menu.c, minibuf.c, xterm.c:
15688 All callers changed. (Bug#8762)
15690 * gnutls.c: Use Emacs's memory allocators.
15691 Without this change, the gnutls library would invoke malloc etc.
15692 directly, which causes problems on non-SYNC_INPUT hosts, and which
15693 runs afoul of improving memory_full behavior. (Bug#8761)
15694 (fn_gnutls_global_set_mem_functions): New macro or function pointer.
15695 (emacs_gnutls_global_init): Use it to specify xmalloc, xrealloc,
15696 xfree instead of the default malloc, realloc, free.
15697 (Fgnutls_boot): No need to check for memory allocation failure,
15698 since xmalloc does that for us.
15700 Remove arbitrary limit of 2**31 entries in hash tables. (Bug#8771)
15701 * category.c (hash_get_category_set):
15702 * ccl.c (ccl_driver):
15703 * charset.c (Fdefine_charset_internal):
15704 * charset.h (struct charset.hash_index):
15705 * composite.c (get_composition_id, gstring_lookup_cache)
15706 (composition_gstring_put_cache):
15707 * composite.h (struct composition.hash_index):
15708 * dispextern.h (struct image.hash):
15709 * fns.c (next_almost_prime, larger_vector, cmpfn_eql)
15710 (cmpfn_equal, cmpfn_user_defined, hashfn_eq, hashfn_eql)
15711 (hashfn_equal, hashfn_user_defined, make_hash_table)
15712 (maybe_resize_hash_table, hash_lookup, hash_put)
15713 (hash_remove_from_table, hash_clear, sweep_weak_table, SXHASH_COMBINE)
15714 (sxhash_string, sxhash_list, sxhash_vector, sxhash_bool_vector)
15715 (Fsxhash, Fgethash, Fputhash, Fmaphash):
15716 * image.c (make_image, search_image_cache, lookup_image)
15717 (xpm_put_color_table_h):
15718 * lisp.h (struct Lisp_Hash_Table):
15719 * minibuf.c (Ftry_completion, Fall_completions, Ftest_completion):
15720 * print.c (print): Use 'EMACS_UINT' and 'EMACS_INT'
15721 for hashes and hash indexes, instead of 'unsigned' and 'int'.
15722 * alloc.c (allocate_vectorlike):
15723 Check for overflow in vector size calculations.
15724 * ccl.c (ccl_driver):
15725 Check for overflow when converting EMACS_INT to int.
15726 * fns.c, image.c: Remove unnecessary static decls that would otherwise
15727 need to be updated by these changes.
15728 * fns.c (make_hash_table, maybe_resize_hash_table):
15729 Check for integer overflow with large hash tables.
15730 (make_hash_table, maybe_resize_hash_table, Fmake_hash_table):
15731 Prefer the faster XFLOAT_DATA to XFLOATINT where either will do.
15732 (SXHASH_REDUCE): New macro.
15733 (sxhash_string, sxhash_list, sxhash_vector, sxhash_bool_vector):
15734 Use it instead of discarding useful hash info with large hash values.
15735 (sxhash_float): New function.
15736 (sxhash): Use it. No more need for "& INTMASK" due to above changes.
15737 * lisp.h (FIXNUM_BITS): New macro, useful for SXHASH_REDUCE etc.
15738 (MOST_NEGATIVE_FIXNUM, MOST_POSITIVE_FIXNUM, INTMASK):
15739 Rewrite to use FIXNUM_BITS, as this simplifies things.
15740 (next_almost_prime, larger_vector, sxhash, hash_lookup, hash_put):
15741 Adjust signatures to match updated version of code.
15742 (consing_since_gc): Now EMACS_INT, since a single hash table can
15743 use more than INT_MAX bytes.
15745 2011-06-01 Dan Nicolaescu <dann@ics.uci.edu>
15747 Make it possible to build with GCC-4.6+ -O2 -flto.
15749 * emacs.c (__malloc_initialize_hook): Mark as EXTERNALLY_VISIBLE.
15751 2011-06-01 Stefan Monnier <monnier@iro.umontreal.ca>
15753 * minibuf.c (get_minibuffer, read_minibuf_unwind):
15754 Call minibuffer-inactive-mode.
15756 2011-05-31 Juanma Barranquero <lekktu@gmail.com>
15758 * makefile.w32-in ($(BLD)/data.$(O), $(BLD)/editfns.$(O)):
15759 Update dependencies.
15761 2011-05-31 Dan Nicolaescu <dann@ics.uci.edu>
15763 * data.c (init_data): Remove code for UTS, this system is not
15766 2011-05-31 Dan Nicolaescu <dann@ics.uci.edu>
15768 Don't force ./temacs to start in terminal mode.
15770 * frame.c (make_initial_frame): Initialize faces in all cases, not
15771 only when CANNOT_DUMP is defined.
15772 * dispnew.c (init_display): Remove CANNOT_DUMP condition.
15774 2011-05-31 Dan Nicolaescu <dann@ics.uci.edu>
15776 * dispnew.c (add_window_display_history): Use const for the string
15777 pointer. Remove declaration, not needed.
15779 2011-05-31 Paul Eggert <eggert@cs.ucla.edu>
15781 Use 'inline', not 'INLINE'.
15782 <http://lists.gnu.org/archive/html/emacs-devel/2011-05/msg00914.html>
15783 * alloc.c, fontset.c (INLINE): Remove.
15784 * alloc.c, bidi.c, charset.c, coding.c, dispnew.c, fns.c, image.c:
15785 * intervals.c, keyboard.c, process.c, syntax.c, textprop.c, w32term.c:
15786 * xdisp.c, xfaces.c, xterm.c: Replace all uses of INLINE with inline.
15787 * gmalloc.c (register_heapinfo): Use inline unconditionally.
15788 * lisp.h (LISP_MAKE_RVALUE): Use inline, not __inline__.
15790 2011-05-31 Dan Nicolaescu <dann@ics.uci.edu>
15792 Make it possible to run ./temacs.
15794 * callproc.c (set_initial_environment): Remove CANNOT_DUMP code,
15795 syms_of_callproc does the same thing. Remove test for
15796 "initialized", do it in the caller.
15797 * emacs.c (main): Avoid calling set_initial_environment when dumping.
15799 2011-05-31 Stefan Monnier <monnier@iro.umontreal.ca>
15801 * minibuf.c (Finternal_complete_buffer): Return `category' metadata.
15802 (read_minibuf): Use get_minibuffer.
15803 (syms_of_minibuf): Use DEFSYM.
15804 (Qmetadata): New var.
15805 * data.c (Qbuffer): Don't make it static.
15806 (syms_of_data): Use DEFSYM.
15808 2011-05-31 Paul Eggert <eggert@cs.ucla.edu>
15810 * ccl.c (CCL_CODE_RANGE): Allow negative numbers. (Bug#8751)
15811 (CCL_CODE_MIN): New macro.
15813 2011-05-30 Paul Eggert <eggert@cs.ucla.edu>
15815 * alloc.c (lisp_align_malloc): Omit unnecessary val==NULL tests.
15817 * eval.c (Qdebug): Now static.
15818 * lisp.h (Qdebug): Remove decl. This reverts a part of the
15819 2011-04-26T11:26:05Z!dan.colascione@gmail.com that inadvertently undid part of
15820 2011-04-14T06:48:41Z!eggert@cs.ucla.edu.
15822 2011-05-29 Chong Yidong <cyd@stupidchicken.com>
15824 * image.c: Various fixes to ImageMagick code comments.
15825 (Fimagemagick_types): Doc fix.
15827 2011-05-29 Paul Eggert <eggert@cs.ucla.edu>
15829 Minor fixes prompted by GCC 4.6.0 warnings.
15831 * xselect.c (converted_selections, conversion_fail_tag): Now static.
15833 * emacs.c [HAVE_X_WINDOWS]: Include "xterm.h".
15834 (x_clipboard_manager_save_all): Move extern decl to ...
15835 * xterm.h: ... here, so that it can be checked for consistency.
15837 2011-05-29 Chong Yidong <cyd@stupidchicken.com>
15839 * xselect.c (x_clipboard_manager_save_frame)
15840 (x_clipboard_manager_save_all): New functions.
15841 (Fx_clipboard_manager_save): Lisp function deleted.
15843 * emacs.c (Fkill_emacs): Call x_clipboard_manager_save_all.
15844 * frame.c (delete_frame): Call x_clipboard_manager_save_frame.
15846 * xterm.h: Update prototype.
15848 2011-05-28 William Xu <william.xwl@gmail.com>
15850 * nsterm.m (ns_term_shutdown): Synchronize user defaults before
15851 exiting (Bug#8239).
15853 2011-05-28 Jim Meyering <meyering@redhat.com>
15855 Avoid a sign-extension bug in crypto_hash_function.
15856 * fns.c (to_uchar): Define.
15857 (crypto_hash_function): Use it to convert some newly-signed
15858 variables to unsigned, to avoid sign-extension bugs. For example,
15859 without this change, (md5 "truc") would evaluate to
15860 45723a2aff78ff4fff7fff1114760e62 rather than the expected
15861 45723a2af3788c4ff17f8d1114760e62. Reported by Antoine Levitt in
15862 https://lists.gnu.org/archive/html/emacs-devel/2011-05/msg00883.html.
15864 2011-05-27 Paul Eggert <eggert@cs.ucla.edu>
15866 Integer overflow fixes.
15868 * dbusbind.c: Serial number integer overflow fixes.
15869 (CHECK_DBUS_SERIAL_GET_SERIAL): New macro.
15870 (Fdbus_call_method_asynchronously, xd_read_message_1): Use a float
15871 to hold a serial number that is too large for a fixnum.
15872 (Fdbus_method_return_internal, Fdbus_method_error_internal):
15873 Check for serial numbers out of range. Decode any serial number
15874 that was so large that it became a float. (Bug#8722)
15876 * dbusbind.c: Use XFASTINT rather than XUINT, and check for nonneg.
15877 (Fdbus_call_method, Fdbus_call_method_asynchronously):
15878 Use XFASTINT rather than XUINT when numbers are nonnegative.
15879 (xd_append_arg, Fdbus_method_return_internal):
15880 (Fdbus_method_error_internal): Likewise. Also, for unsigned
15881 arguments, check that Lisp number is nonnegative, rather than
15882 silently wrapping negative numbers around. (Bug#8722)
15883 (xd_read_message_1): Don't assume dbus_uint32_t can fit in int.
15886 * data.c (arith_driver, Flsh): Avoid unnecessary casts to EMACS_UINT.
15888 * ccl.c (ccl_driver): Redo slightly to avoid the need for 'unsigned'.
15890 ccl: Add integer overflow checks.
15891 * ccl.c (CCL_CODE_MAX, GET_CCL_RANGE, GET_CCL_CODE, GET_CCL_INT):
15892 (IN_INT_RANGE): New macros.
15893 (ccl_driver): Use them to check for integer overflow when
15894 decoding a CCL program. Many of the new checks are whether XINT (x)
15895 fits in int; it doesn't always, on 64-bit hosts. The new version
15896 doesn't catch all possible integer overflows, but it's an
15897 improvement. (Bug#8719)
15899 * alloc.c (make_event_array): Use XINT, not XUINT.
15900 There's no need for unsigned here.
15902 * mem-limits.h (EXCEEDS_LISP_PTR) [!USE_LSB_TAG]: EMACS_UINT -> uintptr_t
15903 This follows up to the 2011-05-06 change that substituted uintptr_t
15904 for EMACS_INT. This case wasn't caught back then.
15906 Rework Fformat to avoid integer overflow issues.
15907 * editfns.c: Include <float.h> unconditionally, as it's everywhere
15908 now (part of C89). Include <verify.h>.
15909 (MAX_10_EXP, CONVERTED_BYTE_SIZE): Remove; no longer needed.
15910 (pWIDE, pWIDElen, signed_wide, unsigned_wide): New defns.
15911 (Fformat): Avoid the prepass trying to compute sizes; it was only
15912 approximate and thus did not catch overflow reliably. Instead, walk
15913 through the format just once, formatting and computing sizes as we go,
15914 checking for integer overflow at every step, and allocating a larger
15915 buffer as needed. Keep track separately whether the format is
15916 multibyte. Keep only the most-recently calculated precision, rather
15917 than them all. Record whether each argument has been converted to
15918 string. Use EMACS_INT, not int, for byte and char and arg counts.
15919 Support field widths and precisions larger than INT_MAX. Avoid
15920 sprintf's undefined behavior with conversion specifications such as %#d
15921 and %.0c. Fix bug with strchr succeeding on '\0' when looking for
15922 flags. Fix bug with (format "%c" 256.0). Avoid integer overflow when
15923 formatting out-of-range floating point numbers with int
15924 formats. (Bug#8668)
15926 * lisp.h (FIXNUM_OVERFLOW_P): Work even if arg is a NaN.
15928 * data.c: Avoid integer truncation in expressions involving floats.
15929 * data.c: Include <intprops.h>.
15930 (arith_driver): When there's an integer overflow in an expression
15931 involving floating point, convert the integers to floating point
15932 so that the resulting value does not suffer from catastrophic
15933 integer truncation. For example, on a 64-bit host (* 4
15934 most-negative-fixnum 0.5) should yield about -4.6e+18, not zero.
15935 Do not rely on undefined behavior after integer overflow.
15937 merge count_size_as_multibyte, parse_str_to_multibyte
15938 * character.c, character.h (count_size_as_multibyte):
15939 Rename from parse_str_to_multibyte; all uses changed.
15940 Check for integer overflow.
15941 * insdel.c, lisp.h (count_size_as_multibyte): Remove,
15942 since it's now a duplicate of the other. This is more of
15943 a character than a buffer op, so better that it's in character.c.
15944 * fns.c, print.c: Adjust to above changes.
15946 2011-05-27 Stefan Monnier <monnier@iro.umontreal.ca>
15948 * xselect.c (x_convert_selection): Yet another int/Lisp_Object mixup.
15950 2011-05-27 Paul Eggert <eggert@cs.ucla.edu>
15952 * xselect.c: Fix minor problems prompted by GCC 4.6.0 warnings.
15953 (x_handle_selection_request, frame_for_x_selection): Remove unused vars.
15954 (x_clipboard_manager_save): Now static.
15955 (Fx_clipboard_manager_save): Rename local to avoid shadowing.
15957 * fns.c: Fix minor problems prompted by GCC 4.6.0 warnings.
15958 (crypto_hash_function): Now static.
15959 Fix pointer signedness problems. Avoid unnecessary initializations.
15961 2011-05-27 Chong Yidong <cyd@stupidchicken.com>
15963 * termhooks.h (Vselection_alist): Make it terminal-local.
15965 * terminal.c (create_terminal): Initialize it.
15967 * xselect.c: Support for clipboard managers.
15968 (Vselection_alist): Move to termhooks.h as terminal-local var.
15969 (LOCAL_SELECTION): New macro.
15970 (x_atom_to_symbol): Handle x_display_info_for_display fail case.
15971 (symbol_to_x_atom): Remove gratuitous arg.
15972 (x_handle_selection_request, lisp_data_to_selection_data)
15973 (x_get_foreign_selection, Fx_register_dnd_atom): Callers changed.
15974 (x_own_selection, x_get_local_selection, x_convert_selection):
15975 New arg, specifying work frame. Use terminal-local Vselection_alist.
15976 (some_frame_on_display): Delete unused function.
15977 (Fx_own_selection_internal, Fx_get_selection_internal)
15978 (Fx_disown_selection_internal, Fx_selection_owner_p)
15979 (Fx_selection_exists_p): New optional frame arg.
15980 (frame_for_x_selection, Fx_clipboard_manager_save): New functions.
15981 (x_handle_selection_clear): Don't treat other terminals with the
15982 same keyboard specially. Use the terminal-local Vselection_alist.
15983 (x_clear_frame_selections): Use Frun_hook_with_args.
15985 * xterm.c (x_term_init): Intern ATOM and CLIPBOARD_MANAGER atoms.
15987 * xterm.h: Add support for those atoms.
15989 2011-05-26 Chong Yidong <cyd@stupidchicken.com>
15991 * xselect.c: ICCCM-compliant handling of MULTIPLE targets.
15992 (converted_selections, conversion_fail_tag): New global variables.
15993 (x_selection_request_lisp_error): Free the above.
15994 (x_get_local_selection): Remove unnecessary code.
15995 (x_reply_selection_request): Args changed; handle arbitrary array
15996 of converted selections stored in converted_selections.
15997 Separate the XChangeProperty and SelectionNotify steps.
15998 (x_handle_selection_request): Rewrite to handle MULTIPLE target.
15999 (x_convert_selection): New function.
16000 (x_handle_selection_event): Simplify.
16001 (x_get_foreign_selection): Don't ignore incoming requests while
16002 waiting for an answer; this will fail when we implement
16003 SAVE_TARGETS, and seems unnecessary anyway.
16004 (selection_data_to_lisp_data): Recognize ATOM_PAIR type.
16005 (Vx_sent_selection_functions): Doc fix.
16007 2011-05-26 Leo Liu <sdl.web@gmail.com>
16009 * editfns.c (Ftranspose_regions): Allow empty regions. (Bug#8699)
16011 2011-05-25 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
16013 * dispextern.h (struct glyph_row): New member fringe_bitmap_periodic_p.
16015 * dispnew.c (shift_glyph_matrix, scrolling_window): Mark scrolled row
16016 for fringe update if it has periodic bitmap.
16017 (row_equal_p): Also compare left_fringe_offset, right_fringe_offset,
16018 and fringe_bitmap_periodic_p.
16020 * fringe.c (get_fringe_bitmap_data): New function.
16021 (draw_fringe_bitmap_1, update_window_fringes): Use it.
16022 (update_window_fringes): Record periodicity of fringe bitmap in glyph
16023 row. Mark glyph row for fringe update if periodicity changed.
16025 * xdisp.c (try_window_reusing_current_matrix): Don't mark scrolled row
16026 for fringe update unless it has periodic bitmap.
16028 2011-05-25 Kenichi Handa <handa@m17n.org>
16030 * xdisp.c (get_next_display_element): Set correct it->face_id for
16031 a static composition.
16033 2011-05-24 Leo Liu <sdl.web@gmail.com>
16036 * makefile.w32-in ($(BLD)/fns.$(O)): Include sha1.h.
16038 * fns.c (crypto_hash_function, Fsha1): New function.
16039 (Fmd5): Use crypto_hash_function.
16040 (syms_of_fns): Add Ssha1.
16042 2011-05-22 Paul Eggert <eggert@cs.ucla.edu>
16044 * gnutls.c: Remove unused macros.
16045 (fn_gnutls_transport_set_lowat, fn_gnutls_transport_set_pull_function):
16046 (fn_gnutls_transport_set_push_function) [!WINDOWSNT]:
16047 Remove macros that are defined and never used.
16048 Caught by gcc -Wunused-macros (GCC 4.6.0, Fedora 14).
16050 2011-05-22 Chong Yidong <cyd@stupidchicken.com>
16052 * xselect.c (syms_of_xselect): Remove unused symbol SAVE_TARGETS.
16053 (Fx_get_selection_internal): Minor cleanup.
16054 (Fx_own_selection_internal): Rename arguments for consistency with
16057 2011-05-22 Paul Eggert <eggert@cs.ucla.edu>
16059 * xselect.c (QSAVE_TARGETS): New static var, to fix build failure.
16061 2011-05-22 Chong Yidong <cyd@stupidchicken.com>
16063 * xselect.c (syms_of_xselect): Include character.h; use DEFSYM.
16065 2011-05-21 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
16067 * dispnew.c (scrolling_window): Don't exclude the case that the
16068 last enabled row in the desired matrix touches the bottom boundary.
16070 2011-05-21 Glenn Morris <rgm@gnu.org>
16072 * Makefile.in ($(etc)/DOC): Make second command line even shorter.
16073 (SOME_MACHINE_OBJECTS): Replace FONT_OBJ by its maximal expansion,
16074 and add some more files.
16076 2011-05-20 Eli Zaretskii <eliz@gnu.org>
16078 * callproc.c (Fcall_process) [MSDOS]: Fix arguments to
16079 report_file_error introduced by the change from 2011-05-07.
16081 2011-05-20 Paul Eggert <eggert@cs.ucla.edu>
16083 * systime.h (Time): Define only if emacs is defined.
16084 This is to allow ../lib-src/profile.c to be compiled on FreeBSD,
16085 where the include path doesn't have X11/X.h by default. See
16086 <http://lists.gnu.org/archive/html/emacs-devel/2011-05/msg00561.html>.
16088 2011-05-20 Kenichi Handa <handa@m17n.org>
16090 * composite.c (find_automatic_composition): Fix previous change.
16092 2011-05-20 Glenn Morris <rgm@gnu.org>
16094 * lisp.mk: New file, split from Makefile.in.
16095 * Makefile.in (lisp): Move to separate file, inserted by @lisp_frag@.
16096 (shortlisp): Remove.
16097 ($(etc)/DOC): Edit lisp.mk rather than using $shortlisp.
16099 2011-05-19 Glenn Morris <rgm@gnu.org>
16101 * Makefile.in (MSDOS_SUPPORT_REAL, MSDOS_SUPPORT, NS_SUPPORT)
16102 (REAL_MOUSE_SUPPORT, GPM_MOUSE_SUPPORT, MOUSE_SUPPORT, TOOLTIP_SUPPORT)
16103 (BASE_WINDOW_SUPPORT, X_WINDOW_SUPPORT, WINDOW_SUPPORT): Remove.
16104 (lisp): Set the order to that of loadup.el.
16105 (shortlisp): Make it a copy of $lisp.
16106 (SOME_MACHINE_LISP): Remove.
16107 ($(etc)/DOC): Depend just on $lisp, not $SOME_MACHINE_LISP too.
16108 Use just $shortlisp, not $SOME_MACHINE_LISP too.
16110 2011-05-18 Kenichi Handa <handa@m17n.org>
16112 * composite.c (CHAR_COMPOSABLE_P): Add more check for efficiency.
16113 (BACKWARD_CHAR): Wrap the arg STOP by parenthesis.
16114 (find_automatic_composition): Mostly rewrite for efficiency.
16116 2011-05-18 Juanma Barranquero <lekktu@gmail.com>
16118 * makefile.w32-in: Update dependencies.
16120 2011-05-18 Christoph Scholtes <cschol2112@googlemail.com>
16122 * menu.c: Include limits.h (fixes the MS-Windows build broken by
16123 2011-06-18T18:49:19Z!cyd@stupidchicken.com).
16125 2011-05-18 Paul Eggert <eggert@cs.ucla.edu>
16127 Fix some integer overflow issues, such as string length overflow.
16129 * insdel.c (count_size_as_multibyte): Check for string overflow.
16131 * character.c (lisp_string_width): Check for string overflow.
16132 Use EMACS_INT, not int, for string indexes and lengths; in
16133 particular, 2nd arg is now EMACS_INT, not int. Do not crash if
16134 the resulting string length overflows an EMACS_INT; instead,
16135 report a string overflow if no precision given. When checking for
16136 precision exhaustion, use a check that cannot possibly have
16137 integer overflow. (Bug#8675)
16138 * character.h (lisp_string_width): Adjust to new signature.
16140 * alloc.c (string_overflow): New function.
16141 (Fmake_string): Use it. This doesn't change behavior, but saves
16142 a few bytes and will simplify future changes.
16143 * character.c (string_escape_byte8): Likewise.
16144 * lisp.h (string_overflow): New decl.
16146 Fixups, following up to the user-interface timestamp change.
16147 * nsterm.m (last_mouse_movement_time, ns_mouse_position): Use Time
16148 for UI timestamps, instead of unsigned long.
16149 * msdos.c (mouse_get_pos): Likewise.
16150 * w32inevt.c (movement_time, w32_console_mouse_position): Likewise.
16151 * w32gui.h (Time): Define by including "systime.h" rather than by
16152 declaring it ourselves. (Bug#8664)
16154 * dispextern.h (struct image): Don't assume time_t <= unsigned long.
16155 * image.c (clear_image_cache): Likewise.
16157 * term.c (term_mouse_position): Don't assume time_t wraparound.
16159 Be more systematic about user-interface timestamps.
16160 Before, the code sometimes used 'Time', sometimes 'unsigned long',
16161 and sometimes 'EMACS_UINT', to represent these timestamps.
16162 This change causes it to use 'Time' uniformly, as that's what X uses.
16163 This makes the code easier to follow, and makes it easier to catch
16164 integer overflow bugs such as Bug#8664.
16165 * frame.c (Fmouse_position, Fmouse_pixel_position):
16166 Use Time, not unsigned long, for user-interface timestamps.
16167 * keyboard.c (last_event_timestamp, kbd_buffer_get_event): Likewise.
16168 (button_down_time, make_lispy_position, make_lispy_movement): Likewise.
16169 * keyboard.h (last_event_timestamp): Likewise.
16170 * menu.c (Fx_popup_menu) [!HAVE_X_WINDOWS]: Likewise.
16171 * menu.h (xmenu_show): Likewise.
16172 * term.c (term_mouse_position): Likewise.
16173 * termhooks.h (struct input_event.timestamp): Likewise.
16174 (struct terminal.mouse_position_hook): Likewise.
16175 * xmenu.c (create_and_show_popup_menu, xmenu_show): Likewise.
16176 * xterm.c (XTmouse_position, x_scroll_bar_report_motion): Likewise.
16177 * systime.h (Time): New decl. Pull it in from <X11/X.h> if
16178 HAVE_X_WINDOWS, otherwise define it as unsigned long, which is
16179 what it was before.
16180 * menu.h, termhooks.h: Include "systime.h", for Time.
16182 * keyboard.c (make_lispy_event): Fix problem in integer overflow.
16183 Don't assume that the difference between two unsigned long values
16184 can fit into an integer. At this point, we know button_down_time
16185 <= event->timestamp, so the difference must be nonnegative, so
16186 there's no need to cast the result if double-click-time is
16187 nonnegative, as it should be; check that it's nonnegative, just in
16188 case. This bug is triggered when events are more than 2**31 ms
16189 apart (about 25 days). (Bug#8664)
16191 * xselect.c (last_event_timestamp): Remove duplicate decl.
16192 (x_own_selection): Remove needless cast to unsigned long.
16194 * xmenu.c (set_frame_menubar): Use int, not EMACS_UINT, for indexes
16195 that always fit in int. Use a sentinel instead of a counter, to
16196 avoid a temp and to allay GCC's concerns about possible int overflow.
16197 * frame.h (struct frame): Use int for menu_bar_items_used
16198 instead of EMACS_INT, since it always fits in int.
16200 * menu.c (grow_menu_items): Check for int overflow.
16202 * xmenu.c (set_frame_menubar): Don't mishandle vectors with no nils.
16204 * xterm.c: Use EMACS_INT for Emacs modifiers, and int for X modifiers.
16205 Before, the code was not consistent. These values cannot exceed
16206 2**31 - 1 so there's no need to make them unsigned.
16207 (x_x_to_emacs_modifiers): Accept int and return EMACS_INT.
16208 (x_emacs_to_x_modifiers): Accept EMACS_INT and return int.
16209 (x_x_to_emacs_modifiers, x_emacs_to_x_modifiers): Reject non-integers
16211 * xterm.h (x_x_to_emacs_modifiers): Adjust to signature change.
16213 * lisp.h (XINT) [USE_LISP_UNION_TYPE]: Cast to EMACS_INT.
16214 (XUINT) [USE_LISP_UNION_TYPE]: Cast to EMACS_UINT.
16215 Otherwise, GCC 4.6.0 warns about printf (pI, XINT (...)),
16216 presumably because the widths might not match.
16218 * window.c (size_window): Avoid needless test at loop start.
16220 2011-05-18 Courtney Bane <emacs-bugs-7626@cbane.org> (tiny change)
16222 * term.c (Fresume_tty): Restore hooks before reinitializing (bug#8687).
16224 2011-05-12 Drew Adams <drew.adams@oracle.com>
16226 * textprop.c (Fprevious_single_char_property_change): Doc fix (bug#8655).
16228 2011-05-12 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
16230 * w32term.c (w32_draw_fringe_bitmap): Rename local vars `left' and
16231 `width' to `bar_area_x' and `bar_area_width', respectively.
16232 (x_scroll_run): Take account of fringe background extension.
16234 * xterm.c (x_draw_fringe_bitmap) [USE_TOOLKIT_SCROLL_BARS]:
16235 Rename local vars `left' and `width' to `bar_area_x' and
16236 `bar_area_width', respectively.
16237 (x_scroll_run) [USE_TOOLKIT_SCROLL_BARS]: Take account of fringe
16238 background extension.
16240 2011-05-10 Jim Meyering <meyering@redhat.com>
16242 * xdisp.c (x_intersect_rectangles): Fix typo "the the -> the".
16244 2011-05-10 Juanma Barranquero <lekktu@gmail.com>
16246 * image.c (Finit_image_library): Return t for built-in image types,
16247 like pbm and xbm. (Bug#8640)
16249 2011-05-09 Andreas Schwab <schwab@linux-m68k.org>
16251 * w32menu.c (set_frame_menubar): Fix submenu allocation.
16253 2011-05-07 Eli Zaretskii <eliz@gnu.org>
16255 * w32console.c (Fset_screen_color): Doc fix.
16256 (Fget_screen_color): New function.
16257 (syms_of_ntterm): Defsubr it.
16259 * callproc.c (call_process_cleanup) [MSDOS]: Don't close and
16260 unlink the temporary file if Fcall_process didn't create it in the
16262 (Fcall_process) [MSDOS]: Don't create tempfile if stdout of the
16263 child process will be redirected to a file specified with `:file'.
16264 Don't try to re-open tempfile in that case, and set fd[0] to -1 as
16265 cue to call_process_cleanup not to close that handle.
16267 2011-05-07 Ben Key <bkey76@gmail.com>
16269 * makefile.w32-in: The bootstrap-temacs rule now makes use of
16270 one of two shell specific rules, either bootstrap-temacs-CMD or
16271 bootstrap-temacs-SH. The bootstrap-temacs-SH rule is identical
16272 to the previous implementation of the bootstrap-temacs rule.
16273 The bootstrap-temacs-CMD rule is similar to the previous
16274 implementation of the bootstrap-temacs rule except that it
16275 makes use of the ESC_CFLAGS variable instead of the CFLAGS
16278 These changes, along with some changes to nt/configure.bat,
16279 nt/gmake.defs, and nt/nmake.defs, are required to extend my
16280 earlier fix to add support for --cflags and --ldflags options
16281 that include quotes so that it works whether make uses cmd or
16284 2011-05-06 Michael Albinus <michael.albinus@gmx.de>
16286 * dbusbind.c (QCdbus_type_unix_fd): Declare static.
16287 (xd_remove_watch): Don't check QCdbus_type_unix_fd for SYMBOLP, it
16289 (Fdbus_init_bus, xd_read_queued_messages): Bus can be a symbol or
16290 a string. Handle both cases.
16291 (Fdbus_call_method_asynchronously, Fdbus_register_signal)
16292 (Fdbus_register_method): Use Qinvalid_function.
16294 2011-05-06 Juanma Barranquero <lekktu@gmail.com>
16296 * makefile.w32-in: Update dependencies.
16297 (LISP_H): Add inttypes.h and stdin.h.
16298 (PROCESS_H): Add unistd.h.
16300 2011-05-06 Eli Zaretskii <eliz@gnu.org>
16302 * lread.c: Include limits.h (fixes the MS-Windows build broken by
16303 2011-05-06T07:13:19Z!eggert@cs.ucla.edu).
16305 2011-05-06 Paul Eggert <eggert@cs.ucla.edu>
16307 * image.c (Finit_image_library) [!HAVE_NTGUI]: Omit unused local.
16309 * term.c (vfatal): Remove stray call to va_end.
16310 It's not needed and the C Standard doesn't allow it here anyway.
16312 Use C99's va_copy to avoid undefined behavior on x86-64 GNU/Linux.
16313 * eval.c (verror): doprnt a copy of ap, not the original. (Bug#8545)
16315 * eval.c (verror): OK to create a string of up to MOST_POSITIVE_FIXNUM
16318 * term.c: Don't include <stdarg.h>, as <lisp.h> does that.
16320 * callproc.c (Fcall_process): Use 'volatile' to avoid vfork clobbering.
16322 * process.c (Fformat_network_address): Fix typo: args2 -> *args2.
16324 * xmenu.c (set_frame_menubar): Fix typo: int * -> int (3 times).
16326 * coding.c (detect_coding_charset): Fix typo: * 2 -> *4 (Bug#8601).
16328 * charset.h (struct charset.code_space): Now has 15 elements, not 16.
16329 * charset.c (Fdefine_charset_internal): Don't initialize
16330 charset.code_space[15]. The value was garbage, on hosts with
16331 32-bit int (Bug#8600).
16333 * lread.c (read_integer): Be more consistent with string-to-number.
16334 Use string_to_number to do the actual conversion; this avoids
16335 rounding errors and fixes some other screwups. Without this fix,
16336 for example, #x1fffffffffffffff was misread as -2305843009213693952.
16337 (digit_to_number): Move earlier, for benefit of read_integer.
16338 Return -1 if the digit is out of range for the base, -2 if it is
16339 not a digit in any supported base. (Bug#8602)
16341 * doprnt.c (doprnt): Support arbitrary pI values, such as "I64".
16343 * dispnew.c (scrolling_window): Return 1 if we scrolled,
16344 to match comment at start of function. This also removes a
16345 GCC warning about overflow in a 32+64-bit port.
16347 * lisp.h (EMACS_INT, EMACS_UINT, BITS_PER_EMACS_INT, pI): Simplify.
16349 * dbusbind.c: Do not use XPNTR on a value that may be an integer.
16350 Reported by Stefan Monnier in
16351 <http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00919.html>.
16352 (xd_remove_watch, Fdbus_init_bus, xd_read_queued_messages):
16353 Use SYMBOLP-guarded XSYMBOL, not XPNTR.
16355 * lisp.h (EMACS_INTPTR): Remove. All uses changed to intptr_t.
16356 (EMACS_UINTPTR): Likewise, with uintptr_t.
16358 * lisp.h: Prefer 64-bit EMACS_INT if available.
16359 (EMACS_INT, EMACS_UINT, BITS_PER_EMACS_INT, pI): Define to 64-bit
16360 on 32-bit hosts that have 64-bit int, so that they can access
16362 However, temporarily disable this change unless the temporary
16363 symbol WIDE_EMACS_INT is defined.
16365 * lread.c, process.c: Do not include <inttypes.h>; lisp.h does it now.
16367 Prefer intptr_t/uintptr_t for integers the same widths as pointers.
16368 This removes an assumption that EMACS_INT and long are the same
16369 width as pointers. The assumption is true for Emacs porting targets
16370 now, but we want to make other targets possible.
16371 * lisp.h: Include <inttypes.h>, for INTPTR_MAX, UINTPTR_MAX.
16372 (EMACS_INTPTR, EMACS_UINTPTR): New macros.
16373 In the rest of the code, change types of integers that hold casted
16374 pointers to EMACS_INTPTR and EMACS_UINTPTR, systematically
16375 replacing EMACS_INT, long, EMACS_UINT, and unsigned long.
16376 (XTYPE): Don't cast arg to EMACS_UINT; normally is not needed.
16377 (XSET): Cast type of XTYPE arg to EMACS_INTPTR; it is needed here.
16378 No need to cast type when ORing.
16379 (XPNTR): Return a value of type EMACS_INTPTR or EMACS_UINTPTR.
16380 * alloc.c (lisp_align_malloc): Remove a no-longer-needed cast.
16381 * doc.c (store_function_docstring): Use EMACS_INTPTR, so as not to
16382 assume EMACS_INT is the same width as char *.
16383 * gtkutil.c (xg_gtk_scroll_destroy, xg_tool_bar_button_cb):
16384 (xg_tool_bar_callback, xg_tool_bar_help_callback, xg_make_tool_item):
16385 Remove no-longer-needed casts.
16386 (xg_create_scroll_bar, xg_tool_bar_button_cb, xg_tool_bar_callback):
16387 (xg_tool_bar_help_callback, xg_make_tool_item):
16388 Use EMACS_INTPTR to hold an integer
16389 that will be cast to void *; this can avoid a GCC warning
16390 if EMACS_INT is not the same width as void *.
16391 * menu.c (find_and_call_menu_selection): Remove no-longer-needed cast.
16392 * xdisp.c (display_echo_area_1, resize_mini_window_1):
16393 (current_message_1, set_message_1):
16394 Use a local to convert to proper width without a cast.
16395 * xmenu.c (dialog_selection_callback): Likewise.
16397 * sysdep.c (get_random): Don't assume EMACS_INT is no wider than long.
16398 Also, don't assume VALBITS / RAND_BITS is less than 5,
16399 and don't rely on undefined behavior when shifting a 1 left into
16401 * lisp.h (get_random): Change signature to match.
16403 * lread.c (hash_string): Use size_t, not int, for hash computation.
16404 Normally we prefer signed values; but hashing is special, because
16405 it's better to use unsigned division on hash table sizes so that
16406 the remainder is nonnegative. Also, size_t is the natural width
16407 for hashing into memory. The previous code used 'int', which doesn't
16408 retain enough info to hash well into very large tables.
16409 (oblookup, oblookup_last_bucket_number, Funintern): Likewise.
16411 * dbusbind.c: Don't possibly lose pointer info when converting.
16412 (xd_remove_watch, Fdbus_init_bus, xd_read_queued_messages):
16413 Use XPNTR rather than XHASH, so that the high-order bits of
16414 the pointer aren't lost when converting through void *.
16416 * eval.c (Fautoload): Don't double-shift a pointer.
16418 * fns.c (Frandom): Let EMACS_UINT be wider than unsigned long.
16420 2011-05-06 Juanma Barranquero <lekktu@gmail.com>
16422 * gnutls.c (DEF_GNUTLS_FN):
16423 * image.c (DEF_IMGLIB_FN): Make function pointers static.
16425 2011-05-05 Andreas Schwab <schwab@linux-m68k.org>
16427 * lread.c (lisp_file_lexically_bound_p): Stop scanning at end
16430 2011-05-05 Eli Zaretskii <eliz@gnu.org>
16432 * w32heap.c (allocate_heap) [USE_LISP_UNION_TYPE || USE_LSB_TAG]:
16433 New version that can reserve upto 2GB of heap space.
16435 2011-05-05 Chong Yidong <cyd@stupidchicken.com>
16437 * nsfns.m (Fns_read_file_name): Doc fix (Bug#8534).
16439 2011-05-05 Teodor Zlatanov <tzz@lifelogs.com>
16441 * gnutls.c (fn_gnutls_certificate_set_x509_key_file): Add alias to
16442 `gnutls_certificate_set_x509_key_file'.
16444 2011-05-05 Juanma Barranquero <lekktu@gmail.com>
16446 * makefile.w32-in ($(BLD)/image.$(O), $(BLD)/process.$(O)):
16447 Update dependencies.
16449 2011-05-04 Juanma Barranquero <lekktu@gmail.com>
16451 * gnutls.h (emacs_gnutls_write, emacs_gnutls_read):
16452 * gnutls.c (emacs_gnutls_write, emacs_gnutls_read):
16453 Remove unused parameter `fildes'.
16454 * process.c (read_process_output, send_process): Don't pass it.
16456 2011-05-04 Juanma Barranquero <lekktu@gmail.com>
16458 Fix previous change: the library cache is defined in w32.c.
16459 * image.c (CACHE_IMAGE_TYPE) [!HAVE_NTGUI]: Define to noop.
16460 (Finit_image_library): Wrap Vlibrary_cache on "#ifdef HAVE_NTGUI".
16462 2011-05-04 Juanma Barranquero <lekktu@gmail.com>
16464 Implement dynamic loading of GnuTLS on Windows.
16466 * gnutls.h (GNUTLS_EMACS_ERROR_NOT_LOADED): New macro.
16467 (emacs_gnutls_write, emacs_gnutls_read): Mark as extern.
16468 (emacs_gnutls_record_check_pending, emacs_gnutls_transport_set_errno):
16471 * gnutls.c (Qgnutls_dll): Define.
16472 (DEF_GNUTLS_FN, LOAD_GNUTLS_FN): New macros.
16473 (gnutls_*): Declare function pointers.
16474 (init_gnutls_functions): New function to initialize function pointers.
16475 (emacs_gnutls_handshake, Fgnutls_error_string, Fgnutls_deinit)
16476 (emacs_gnutls_global_init, Fgnutls_bye): Use function pointers.
16477 (emacs_gnutls_record_check_pending, emacs_gnutls_transport_set_errno):
16478 Wrappers for gnutls_record_check_pending and gnutls_transport_set_errno.
16479 (emacs_gnutls_write, emacs_gnutls_read)
16480 (emacs_gnutls_handle_error, Fgnutls_error_fatalp)
16481 (Fgnutls_available_p): New function.
16482 (Fgnutls_boot): Call Fgnutls_available_p. Use function pointers.
16483 (syms_of_gnutls) <Qgnutls_dll>: Initialize and staticpro it.
16484 (syms_of_gnutls) <Sgnutls_available_p>: defsubr it.
16486 * image.c: Include w32.h.
16487 (Vimage_type_cache): Delete.
16488 (syms_of_image) <Vimage_type_cache>: Don't initialize and staticpro it.
16489 (CACHE_IMAGE_TYPE, Finit_image_library): Use Vlibrary_cache instead.
16490 (w32_delayed_load): Move to w32.c.
16492 * w32.h (VlibraryCache, QCloaded_from, w32_delayed_load): Declare.
16494 * w32.c (QCloaded_from, Vlibrary_cache): Define.
16495 (w32_delayed_load): Move from image.c. When loading a library, record
16496 its filename in the :loaded-from property of the library id.
16497 (globals_of_w32) <QCloaded_from, Vlibrary_cache>:
16498 Initialize and staticpro them.
16499 (emacs_gnutls_pull, emacs_gnutls_push): Call emacs_gnutls_* functions.
16501 * process.c: Include lisp.h before w32.h, not after.
16502 (wait_reading_process_output): Call emacs_gnutls_record_check_pending
16503 instead of gnutls_record_check_pending.
16505 * callproc.c, emacs.c: Include lisp.h before w32.h, not after.
16507 2011-05-04 Teodor Zlatanov <tzz@lifelogs.com>
16509 * gnutls.c (Fgnutls_boot): Support :keylist and :crlfiles options
16510 instead of :keyfiles. Give GnuTLS the keylist and the CRL lists
16513 2011-05-03 Jan Djärv <jan.h.d@swipnet.se>
16515 * xterm.c (x_set_frame_alpha): Do not set property on anything
16516 else than FRAME_X_OUTER_WINDOW (Bug#8608).
16518 2011-05-02 Juanma Barranquero <lekktu@gmail.com>
16520 * sysdep.c (get_tty_size) [WINDOWSNT]: Implement. (Bug#8596)
16522 2011-05-02 Juanma Barranquero <lekktu@gmail.com>
16524 * gnutls.c (Qgnutls_log_level, Qgnutls_code, Qgnutls_anon)
16525 (Qgnutls_x509pki, Qgnutls_e_interrupted, Qgnutls_e_again)
16526 (Qgnutls_e_invalid_session, Qgnutls_e_not_ready_for_handshake)
16527 (gnutls_global_initialized, Qgnutls_bootprop_priority)
16528 (Qgnutls_bootprop_trustfiles, Qgnutls_bootprop_keyfiles)
16529 (Qgnutls_bootprop_callbacks, Qgnutls_bootprop_loglevel)
16530 (Qgnutls_bootprop_hostname, Qgnutls_bootprop_verify_flags)
16531 (Qgnutls_bootprop_verify_error, Qgnutls_bootprop_verify_hostname_error)
16532 (Qgnutls_bootprop_callbacks_verify): Make static.
16534 2011-05-01 Andreas Schwab <schwab@linux-m68k.org>
16536 * callproc.c: Indentation fixup.
16538 * sysdep.c (wait_for_termination_1): Make static.
16539 (wait_for_termination, interruptible_wait_for_termination):
16540 Move after wait_for_termination_1.
16542 2011-05-01 Lars Magne Ingebrigtsen <larsi@gnus.org>
16544 * sysdep.c (interruptible_wait_for_termination): New function
16545 which is like wait_for_termination, but allows keyboard
16548 * callproc.c (Fcall_process): Add (:file "file") as an option for
16550 (Fcall_process_region): Ditto.
16552 2011-04-30 Eli Zaretskii <eliz@gnu.org>
16554 * dosfns.c (Fint86, Fdos_memget, Fdos_memput): Use `ASIZE (FOO)'
16555 rather than `XVECTOR (FOO)->size'.
16557 * process.c: Remove HAVE_INTTYPES_H condition from inclusion of
16558 inttypes.h, as a gnulib replacement is used if it not available in
16561 2011-04-21 Eli Zaretskii <eliz@gnu.org>
16563 Lift the MOST_POSITIVE_FIXNUM/4 limitation on visited files.
16564 * fileio.c (Finsert_file_contents): Don't limit file size to 1/4
16565 of MOST_POSITIVE_FIXNUM. (Bug#8528)
16567 * coding.c (coding_alloc_by_realloc): Error out if destination
16568 will grow beyond MOST_POSITIVE_FIXNUM.
16569 (decode_coding_emacs_mule): Abort if there isn't enough place in
16570 charbuf for the composition carryover bytes. Reserve an extra
16571 space for up to 2 characters produced in a loop.
16572 (decode_coding_iso_2022): Abort if there isn't enough place in
16573 charbuf for the composition carryover bytes.
16575 2011-04-21 Eli Zaretskii <eliz@gnu.org>
16577 * doprnt.c (doprnt) [!HAVE_LONG_LONG_INT]: Error out instead of
16578 aborting when %lld or %lll format is passed.
16579 [!HAVE_UNSIGNED_LONG_LONG_INT]: Error out instead of aborting when
16580 %llo or %llx format is passed. (Bug#8545)
16582 * window.c (window_scroll_line_based): Use a marker instead of
16583 simple variables to record original value of point. (Bug#7952)
16585 * doprnt.c (doprnt): Fix the case where a multibyte sequence
16586 produced by %s or %c overflows available buffer space. (Bug#8545)
16588 2011-04-28 Paul Eggert <eggert@cs.ucla.edu>
16590 * doprnt.c (doprnt): Omit useless test; int overflow check (Bug#8545).
16591 (SIZE_MAX): Move defn after all includes, as they might #define it.
16593 2011-04-28 Juanma Barranquero <lekktu@gmail.com>
16595 * w32.c (init_environment): Warn about defaulting HOME to C:\.
16597 2011-04-28 Juanma Barranquero <lekktu@gmail.com>
16599 * keyboard.c (Qdelayed_warnings_hook): Define.
16600 (command_loop_1): Run `delayed-warnings-hook'
16601 if Vdelayed_warnings_list is non-nil.
16602 (syms_of_keyboard) <delayed-warnings-hook>: DEFSYM it.
16603 (syms_of_keyboard) <delayed-warnings-list>: DEFVAR_LISP it.
16605 2011-04-28 Eli Zaretskii <eliz@gnu.org>
16607 * doprnt.c (doprnt): Don't return value smaller than the buffer
16608 size if the message was truncated. (Bug#8545).
16610 2011-04-28 Juanma Barranquero <lekktu@gmail.com>
16612 * w32fns.c (Fx_change_window_property, Fx_delete_window_property)
16613 (Fx_window_property): #if-0 the whole functions, not just the bodies.
16615 2011-04-27 Paul Eggert <eggert@cs.ucla.edu>
16617 * doprnt.c (doprnt): Support "ll" length modifier, for long long.
16619 2011-04-27 Juanma Barranquero <lekktu@gmail.com>
16621 * makefile.w32-in: Update dependencies.
16623 2011-04-27 Eli Zaretskii <eliz@gnu.org>
16625 Improve `doprnt' and its usage. (Bug#8545)
16626 * doprnt.c (doprnt): Make sure `format' is never accessed beyond
16627 `format_end'. Remove support for %l as a conversion specifier.
16628 Don't use xrealloc. Improve diagnostics when the %l size modifier
16629 is used. Update the commentary.
16631 * eval.c (verror): Simplify calculation of size_t.
16633 * coding.c (Ffind_operation_coding_system): Fix diagnostic error
16636 2011-04-27 Yoshiaki Kasahara <kasahara@nc.kyushu-u.ac.jp> (tiny change)
16638 * buffer.c (init_buffer) [USE_MMAP_FOR_BUFFERS]: Adjust to aliasing
16641 2011-04-27 Paul Eggert <eggert@cs.ucla.edu>
16643 * nsmenu.m: Replace all uses of XVECTOR with ASIZE and AREF.
16644 This makes this file independent of the recent pseudovector change.
16646 2011-04-26 Paul Eggert <eggert@cs.ucla.edu>
16648 * keyboard.c (handle_user_signal): Fix pointer signedness problem.
16650 * gnutls.c (emacs_gnutls_handle_error): Remove unused local.
16651 (Fgnutls_boot): gnutls_certificate_verify_peers2 wants unsigned *.
16652 Remove unused local.
16653 (emacs_gnutls_write): Don't use uninitialized rtnval if nbyte <= 0.
16655 * lisp.h: Fix a problem with aliasing and vector headers. (Bug#8546)
16656 GCC 4.6.0 optimizes based on type-based alias analysis.
16657 For example, if b is of type struct buffer * and v of type struct
16658 Lisp_Vector *, then gcc -O2 was incorrectly assuming that &b->size
16659 != &v->size, and therefore "v->size = 1; b->size = 2; return
16660 v->size;" must therefore return 1. This assumption is incorrect
16661 for Emacs, since it type-puns struct Lisp_Vector * with many other
16662 types. To fix this problem, this patch adds a new type struct
16663 vectorlike_header that documents the constraints on layout of vectors
16664 and pseudovectors, and helps optimizing compilers not get fooled
16665 by Emacs's type punning. It also adds the macros XSETTYPED_PVECTYPE
16666 XSETTYPED_PSEUDOVECTOR, TYPED_PSEUDOVECTORP, for similar reasons.
16667 * lisp.h (XSETTYPED_PVECTYPE): New macro, specifying the name of
16669 (XSETPVECTYPE): Rewrite in terms of new macro.
16670 (XSETPVECTYPESIZE): New macro, specifying both type and size.
16671 This is a bit clearer, and further avoids the possibility of
16672 undesirable aliasing.
16673 (XSETTYPED_PSEUDOVECTOR): New macro, specifying the size.
16674 (XSETPSEUDOVECTOR): Rewrite in terms of XSETTYPED_PSEUDOVECTOR.
16675 (XSETSUBR): Rewrite in terms of XSETTYPED_PSEUDOVECTOR and XSIZE,
16676 since Lisp_Subr is a special case (no "next" field).
16677 (ASIZE): Now uses header.size rather than size.
16678 All previous uses of XVECTOR (foo)->size replaced to use this macro,
16679 to avoid the hassle of writing XVECTOR (foo)->header.size.
16680 (struct vectorlike_header): New type.
16681 (TYPED_PSEUDOVECTORP): New macro, also specifying the C type of the
16682 object, to help avoid aliasing.
16683 (PSEUDOVECTORP): Rewrite in terms of TYPED_PSEUDOVECTORP.
16684 (SUBRP): Likewise, since Lisp_Subr is a special case.
16685 * lisp.h (struct Lisp_Vector, struct Lisp_Char_Table):
16686 (struct Lisp_Sub_Char_Table, struct Lisp_Bool_Vector):
16687 (struct Lisp_Hash_Table): Combine first two members into a single
16688 struct vectorlike_header member. All uses of "size" and "next" members
16689 changed to be "header.size" and "header.next".
16690 * buffer.h (struct buffer): Likewise.
16691 * font.h (struct font_spec, struct font_entity, struct font): Likewise.
16692 * frame.h (struct frame): Likewise.
16693 * process.h (struct Lisp_Process): Likewise.
16694 * termhooks.h (struct terminal): Likewise.
16695 * window.c (struct save_window_data, struct saved_window): Likewise.
16696 * window.h (struct window): Likewise.
16697 * alloc.c (allocate_buffer, Fmake_bool_vector, allocate_pseudovector):
16698 Use XSETPVECTYPESIZE, not XSETPVECTYPE, to avoid aliasing problems.
16699 * buffer.c (init_buffer_once): Likewise.
16700 * lread.c (defsubr): Use XSETTYPED_PVECTYPE, since Lisp_Subr is a
16702 * process.c (Fformat_network_address): Use local var for size,
16705 * bytecode.c (exec_byte_code): Don't use XVECTOR before CHECK_VECTOR.
16707 Make the Lisp reader and string-to-float more consistent (Bug#8525)
16708 * data.c (atof): Remove decl; no longer used or needed.
16709 (digit_to_number): Move to lread.c.
16710 (Fstring_to_number): Use new string_to_number function, to be
16711 consistent with how the Lisp reader treats infinities and NaNs.
16712 Do not assume that floating-point numbers represent EMACS_INT
16713 without losing information; this is not true on most 64-bit hosts.
16714 Avoid double-rounding errors, by insisting on integers when
16715 parsing non-base-10 numbers, as the documentation specifies.
16716 * lisp.h (string_to_number): New decl, replacing ...
16717 (isfloat_string): Remove.
16718 * lread.c: Include <inttypes.h>, for uintmax_t and strtoumax.
16719 (read1): Do not accept +. and -. as integers; this
16720 appears to have been a coding error. Similarly, do not accept
16721 strings like +-1e0 as floating point numbers. Do not report
16722 overflow for integer overflows unless the base is not 10 which
16723 means we have no simple and reliable way to continue.
16724 Break out the floating-point parsing into a new
16725 function string_to_number, so that Fstring_to_number parses
16726 floating point numbers consistently with the Lisp reader.
16727 (digit_to_number): Move here from data.c. Make it static inline.
16728 (E_CHAR, EXP_INT): Remove, replacing with ...
16729 (E_EXP): New macro, to solve the "1.0e+" problem mentioned below.
16730 (string_to_number): New function, replacing isfloat_string.
16731 This function checks for valid syntax and produces the resulting
16732 Lisp float number too. Rework it so that string-to-number
16733 no longer mishandles examples like "1.0e+". Use strtoumax,
16734 so that overflow for non-base-10 numbers is reported only when
16735 there's no portable and simple way to convert to floating point.
16737 * textprop.c (set_text_properties_1): Rewrite for clarity,
16738 and to avoid GCC warning about integer overflow.
16740 * intervals.h (struct interval): Use EMACS_INT for members
16741 where EMACS_UINT might cause problems. See
16742 <http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00514.html>.
16743 (CHECK_TOTAL_LENGTH): Remove cast to EMACS_INT; no longer needed.
16744 * intervals.c (interval_deletion_adjustment): Now returns EMACS_INT.
16746 (offset_intervals): Tell GCC not to worry about length overflow
16747 when negating a negative length.
16749 * alloc.c (overrun_check_malloc, overrun_check_realloc): Now static.
16750 (overrun_check_free): Likewise.
16752 * alloc.c (SDATA_SIZE) [!GC_CHECK_STRING_BYTES]: Avoid runtime check
16753 in the common case where SDATA_DATA_OFFSET is a multiple of Emacs
16756 * gnutls.c: Fix problems found by GCC 4.6.0 on Ubuntu 10.10.
16757 (gnutls_make_error): Rename local to avoid shadowing.
16758 (gnutls_emacs_global_deinit): ifdef out; not used.
16759 (Fgnutls_boot): Use const for pointer to readonly storage.
16760 Comment out unused local. Fix pointer signedness problems.
16762 * lread.c (openp): Don't stuff size_t into an 'int'.
16763 Use <= on length, not < on length + 1, to avoid GCC 4.6.0 warning
16764 about possible signed overflow.
16766 * gtkutil.c: Fix problems found by GCC 4.6.0 on Ubuntu 10.10.
16767 (GDK_KEY_g): Don't define if already defined.
16768 (xg_prepare_tooltip): Avoid pointer signedness problem.
16769 (xg_set_toolkit_scroll_bar_thumb): Redo to avoid two casts.
16771 * process.c (Fnetwork_interface_info): Avoid left-shift undefined
16772 behavior with 1 << 31. GCC 4.6.0 warns about this on 32-bit hosts.
16774 * xfns.c (Fx_window_property): Simplify a bit,
16775 to make a bit faster and to avoid GCC 4.6.0 warning.
16776 * xselect.c (x_get_window_property, x_handle_dnd_message): Likewise.
16778 * fns.c (internal_equal): Don't assume size_t fits in int.
16780 * alloc.c (compact_small_strings): Tighten assertion a little.
16782 Replace pEd with more-general pI, and fix some printf arg casts.
16783 * lisp.h (pI): New macro, generalizing old pEd macro to other
16784 conversion specifiers. For example, use "...%"pI"d..." rather
16785 than "...%"pEd"...".
16786 (pEd): Remove. All uses replaced with similar uses of pI.
16787 * m/amdx86-64.h, m/ia64.h, m/ibms390x.h: Likewise.
16788 * alloc.c (check_pure_size): Don't overflow by converting size to int.
16789 * bidi.c (bidi_dump_cached_states): Use pI to avoid cast.
16790 * data.c (Fnumber_to_string): Use pI instead of if-then-else-abort.
16791 * dbusbind.c (xd_append_arg): Use pI to avoid cast.
16792 (Fdbus_method_return_internal, Fdbus_method_error_internal): Likewise.
16793 * font.c (font_unparse_xlfd): Avoid potential buffer overrun on
16795 (font_unparse_xlfd, font_unparse_fcname): Use pI to avoid casts.
16796 * keyboard.c (record_char, modify_event_symbol): Use pI to avoid casts.
16797 * print.c (safe_debug_print, print_object): Likewise.
16798 (print_object): Don't overflow by converting EMACS_INT or EMACS_UINT
16800 Use pI instead of if-then-else-abort. Use %p to avoid casts,
16801 avoiding the 0 flag, which is not portable.
16802 * process.c (Fmake_network_process): Use pI to avoid cast.
16803 * region-cache.c (pp_cache): Likewise.
16804 * xdisp.c (decode_mode_spec): Likewise.
16805 * xrdb.c (x_load_resources) [USE_MOTIF]: Use pI to avoid undefined
16806 behavior on 64-bit hosts with printf arg.
16807 * xselect.c (x_queue_event): Use %p to avoid casts, avoiding 0 flag.
16808 (x_stop_queuing_selection_requests): Likewise.
16809 (x_get_window_property): Don't truncate byte count to an 'int'
16812 * frame.c (frame_name_fnn_p): Get rid of strtol, which isn't right
16813 here, since it parses constructs like leading '-' and spaces,
16814 which are not wanted; and it overflows with large numbers.
16815 Instead, simply match F[0-9]+, which is what is wanted anyway.
16817 * alloc.c: Remove unportable assumptions about struct layout.
16818 (SDATA_SELECTOR, SDATA_DATA_OFFSET): New macros.
16819 (SDATA_OF_STRING, SDATA_SIZE, allocate_string_data):
16820 (allocate_vectorlike, make_pure_vector): Use the new macros,
16821 plus offsetof, to remove unportable assumptions about struct layout.
16822 These assumptions hold on all porting targets that I know of, but
16823 they are not guaranteed, they're easy to remove, and removing them
16824 makes further changes easier.
16826 * alloc.c (BLOCK BYTES): Fix typo by changing "ablock" to "ablocks".
16827 This doesn't fix a bug but makes the code clearer.
16828 (string_overrun_cookie): Now const. Use initializers that
16829 don't formally overflow signed char, to avoid warnings.
16830 (allocate_string_data) [GC_CHECK_STRING_OVERRUN]: Fix typo that
16831 can cause Emacs to crash when string overrun checking is enabled.
16832 (allocate_buffer): Don't assume sizeof (struct buffer) is a
16833 multiple of sizeof (EMACS_INT); it need not be, if
16834 alignof(EMACS_INT) < sizeof (EMACS_INT).
16835 (check_sblock, check_string_bytes, check_string_free_list): Protoize.
16837 2011-04-26 Juanma Barranquero <lekktu@gmail.com>
16839 * keyboard.c (QCrtl): Rename from Qrtl. All uses changed.
16841 2011-04-26 Teodor Zlatanov <tzz@lifelogs.com>
16843 * gnutls.c (emacs_gnutls_handshake): Return an error if we're not
16844 supposed to be handshaking. (Bug#8556)
16845 Reported by Paul Eggert <eggert@cs.ucla.edu>.
16847 2011-04-26 Daniel Colascione <dan.colascione@gmail.com>
16849 * lisp.h (Qdebug): List symbol.
16850 * eval.c (Qdebug): Restore global linkage.
16851 * keyboard.c (debug-on-event): New variable.
16852 (handle_user_signal): Break into debugger when debug-on-event
16853 matches the current signal symbol.
16855 2011-04-25 Dan Nicolaescu <dann@ics.uci.edu>
16857 * alloc.c (check_sblock, check_string_bytes)
16858 (check_string_free_list): Convert to standard C.
16860 2011-04-25 Teodor Zlatanov <tzz@lifelogs.com>
16862 * w32.c (emacs_gnutls_push): Fix typo.
16864 2011-04-25 Eli Zaretskii <eliz@gnu.org>
16866 * gnutls.c (emacs_gnutls_handshake): Avoid compiler warnings about
16867 "cast to pointer from integer of different size".
16869 Improve doprnt and its use in verror. (Bug#8545)
16870 * doprnt.c (doprnt): Document the set of format control sequences
16871 supported by the function. Use SAFE_ALLOCA instead of always
16874 * eval.c (verror): Don't limit the buffer size at size_max-1, that
16875 is one byte too soon. Don't use xrealloc; instead xfree and
16878 2011-04-24 Teodor Zlatanov <tzz@lifelogs.com>
16880 * gnutls.h: Add GNUTLS_STAGE_CALLBACKS enum to denote we're in the
16883 * gnutls.c: Renamed global_initialized to
16884 gnutls_global_initialized. Added internals for the
16885 :verify-hostname-error, :verify-error, and :verify-flags
16886 parameters of `gnutls-boot' and documented those parameters in the
16887 docstring. Start callback support.
16888 (emacs_gnutls_handshake): Add Woe32 support. Retry handshake
16889 unless a fatal error occurred. Call gnutls_alert_send_appropriate
16890 on error. Return error code.
16891 (emacs_gnutls_write): Call emacs_gnutls_handle_error.
16892 (emacs_gnutls_read): Likewise.
16893 (Fgnutls_boot): Return handshake error code.
16894 (emacs_gnutls_handle_error): New function.
16895 (wsaerror_to_errno): Likewise.
16897 * w32.h (emacs_gnutls_pull): Add prototype.
16898 (emacs_gnutls_push): Likewise.
16900 * w32.c (emacs_gnutls_pull): New function for GnuTLS on Woe32.
16901 (emacs_gnutls_push): Likewise.
16903 2011-04-24 Claudio Bley <claudio.bley@gmail.com> (tiny change)
16905 * process.c (wait_reading_process_output): Check if GnuTLS
16906 buffered some data internally if no FDs are set for TLS
16909 * makefile.w32-in (OBJ2): Add gnutls.$(O).
16910 (LIBS): Link to USER_LIBS.
16911 ($(BLD)/gnutls.$(0)): New target.
16913 2011-04-24 Eli Zaretskii <eliz@gnu.org>
16915 * xdisp.c (handle_single_display_spec): Rename the
16916 display_replaced_before_p argument into display_replaced_p, to
16917 make it consistent with the commentary. Fix typos in the
16920 * textprop.c (syms_of_textprop): Remove dead code.
16921 (copy_text_properties): Delete obsolete commentary about an
16922 interface that was deleted long ago. Fix typos in the description
16925 * msdos.c (XMenuActivate, XMenuAddSelection): Adjust argument list
16926 to changes in oldXMenu/XMenu.h from 2011-04-16.
16927 <menu_help_message, prev_menu_help_message>: Constify.
16928 (IT_menu_make_room): menu->help_text is now `const char **';
16931 * msdos.h (XMenuActivate, XMenuAddSelection): Adjust prototypes
16932 to changes in oldXMenu/XMenu.h from 2011-04-16.
16933 (struct XMenu): Declare `help_text' `const char **'.
16935 * xfaces.c <Qunspecified>: Make extern again.
16937 * syntax.c: Include sys/types.h before including regex.h, as
16940 * doc.c (get_doc_string): Improve the format passed to `error'.
16942 * doprnt.c (doprnt): Improve commentary.
16944 * term.c (init_tty) [MSDOS]: Fix 1st argument to maybe_fatal.
16946 * Makefile.in (TAGS): Depend on $(M_FILE) and $(S_FILE), and scan
16949 * makefile.w32-in (globals.h): Add a dummy recipe, to make any
16950 changes in globals.h immediately force recompilation.
16951 (TAGS): Depend on $(CURDIR)/m/intel386.h and
16952 $(CURDIR)/s/ms-w32.h.
16953 (TAGS-gmake): Scan $(CURDIR)/m/intel386.h and $(CURDIR)/s/ms-w32.h.
16955 * character.c (Fchar_direction): Function deleted.
16956 (syms_of_character): Don't defsubr it.
16957 <char-direction-table>: Deleted.
16959 2011-04-23 Eli Zaretskii <eliz@gnu.org>
16961 Fix doprnt so it could be used again safely in `verror'. (Bug#8435)
16962 * doprnt.c: Include limits.h.
16963 (SIZE_MAX): New macro.
16964 (doprnt): Return a size_t value. 2nd arg is now size_t.
16965 Many local variables are now size_t instead of int or unsigned.
16966 Improve overflow protection. Support `l' modifier for integer
16967 conversions. Support %l conversion. Don't assume an EMACS_INT
16968 argument for integer conversions and for %c.
16970 * lisp.h (doprnt): Restore prototype.
16972 * makefile.w32-in ($(BLD)/callint.$(O)): Depend on
16973 $(SRC)/character.h.
16975 * Makefile.in (base_obj): Add back doprnt.o.
16977 * deps.mk (doprnt.o): Add back prerequisites.
16978 (callint.o): Depend on character.h.
16980 * eval.c (internal_lisp_condition_case): Include the handler
16981 representation in the error message.
16982 (verror): Call doprnt instead of vsnprintf. Fix an off-by-one bug
16983 when breaking from the loop.
16985 * xdisp.c (vmessage): Call doprnt instead of vsnprintf.
16987 * callint.c (Fcall_interactively): When displaying error message
16988 about invalid control letter, pass the character's codepoint, not
16989 a pointer to its multibyte form. Improve display of the character
16990 in octal and display also its hex code.
16992 * character.c (char_string): Use %x to display the (unsigned)
16993 codepoint of an invalid character, to avoid displaying a bogus
16996 * font.c (check_otf_features): Pass SDATA of SYMBOL_NAME to
16997 `error', not SYMBOL_NAME itself.
16999 * coding.c (Fencode_sjis_char, Fencode_big5_char): Use %c for
17000 character arguments to `error'.
17002 * charset.c (check_iso_charset_parameter): Fix incorrect argument
17003 to `error' in error message about FINAL_CHAR argument. Make sure
17004 FINAL_CHAR is a character, and use %c when it is passed as
17005 argument to `error'.
17007 2011-04-23 Eli Zaretskii <eliz@gnu.org>
17009 * s/ms-w32.h (localtime): Redirect to sys_localtime.
17011 * w32.c: Include <time.h>.
17012 (sys_localtime): New function.
17014 2011-04-23 Chong Yidong <cyd@stupidchicken.com>
17016 * xdisp.c (init_xdisp): Initialize echo_area_window (Bug#6451).
17018 * buffer.c (syms_of_buffer): Doc fix (Bug#6902).
17020 2011-04-23 Samuel Thibault <sthibault@debian.org> (tiny change)
17022 * sysdep.c (wait_for_termination): On GNU Hurd, kill returns -1 on
17023 zombies (Bug#8467).
17025 2011-04-19 Eli Zaretskii <eliz@gnu.org>
17027 * syntax.h (SETUP_SYNTAX_TABLE_FOR_OBJECT): Fix setting of
17028 gl_state.e_property when gl_state.object is Qt.
17030 * insdel.c (make_gap_larger): Remove limitation of buffer size
17033 2011-04-18 Chong Yidong <cyd@stupidchicken.com>
17035 * xdisp.c (lookup_glyphless_char_display)
17036 (produce_glyphless_glyph): Handle cons cell entry in
17037 glyphless-char-display.
17038 (Vglyphless_char_display): Document it.
17040 * term.c (produce_glyphless_glyph): Handle cons cell entry in
17041 glyphless-char-display.
17043 2011-04-17 Chong Yidong <cyd@stupidchicken.com>
17045 * xdisp.c (get_next_display_element): Remove unnecessary ifdefs.
17047 * termhooks.h (FRAME_WINDOW_P): Remove duplicated definitions.
17049 * dispextern.h (FACE_SUITABLE_FOR_ASCII_CHAR_P): Add missing
17050 definition for no-X builds.
17052 2011-04-16 Paul Eggert <eggert@cs.ucla.edu>
17054 Static checks with GCC 4.6.0 and non-default toolkits.
17056 * s/sol2-6.h, s/unixware.h (PTY_TTY_NAME_SPRINTF): Protoize decl.
17058 * process.c (keyboard_bit_set): Define only if SIGIO.
17059 (send_process_trap): Mark it with NO_RETURN if it doesn't return.
17060 (send_process): Repair possible setjmp clobbering.
17062 * s/usg5-4-common.h (SETUP_SLAVE_PTY): Don't pass extra arg to 'fatal'.
17064 * eval.c: Include <stdio.h>, for vsnprintf on non-GNU/Linux hosts.
17066 * data.c (arith_error): Mark with NO_RETURN if it doesn't return.
17068 * alloc.c (bytes_used_when_full, SPARE_MEMORY, BYTES_USED):
17069 Define only if needed.
17071 * sysdep.c (_FILE_OFFSET_BITS): Make this hack even uglier
17072 by pacifying GCC about it. Maybe it's time to retire it?
17073 * xfaces.c (USG, __TIMEVAL__): Likewise.
17075 * dispextern.h (struct redisplay_interface): Rename param
17076 to avoid shadowing.
17077 * termhooks.h (struct terminal): Likewise.
17078 * xterm.c (xembed_send_message): Likewise.
17080 * insdel.c (make_gap_smaller): Define only if
17081 USE_MMAP_FOR_BUFFERS || REL_ALLOC || DOUG_LEA_MALLOC.
17083 * keyboard.c (read_char): Make a var volatile so longjmp won't clobber
17086 * emacs.c (MAX_HEAP_BSS_DIFF, my_edata): Move to where they're used,
17087 so that we aren't warned about unused symbols.
17089 * xfns.c (Fx_file_dialog): Rename local to avoid shadowing.
17091 * xdisp.c (x_produce_glyphs): Mark var as initialized (Bug#8512).
17093 * xfns.c (x_real_positions): Mark locals as initialized.
17095 * xmenu.c (xmenu_show): Don't use uninitialized vars.
17097 * xterm.c: Fix problems found by static analysis with other toolkits.
17098 (toolkit_scroll_bar_interaction): Define and use only if USE_X_TOOLKIT.
17099 (x_dispatch_event): Declare static if USE_GTK, and
17100 define if USE_GTK || USE_X_TOOLKIT.
17101 (SET_SAVED_BUTTON_EVENT): Define only if USE_X_TOOLKIT || USE_GTK.
17102 * xterm.h (x_dispatch_event): Extern only if USE_X_TOOLKIT.
17103 * xterm.c, xterm.h (x_mouse_leave): Bring this function back, but only
17104 if defined HAVE_MENUS && !defined USE_X_TOOLKIT && !defined USE_GTK.
17106 * xmenu.c (menu_help_callback): Pointer type fixes.
17107 Use const pointers when pointing at readonly data. Avoid pointer
17108 signedness clashes.
17109 (FALSE): Remove unused macro.
17110 (update_frame_menubar): Remove unused decl.
17112 * xfns.c (Fx_hide_tip): Move locals to avoid shadowing.
17114 * menu.c (push_submenu_start, push_submenu_end): Do not define unless
17115 USE_X_TOOLKIT || USE_GTK || HAVE_NS || defined HAVE_NTGUI.
17116 (single_menu_item): Rename local to avoid shadowing.
17118 * keyboard.c (make_lispy_event): Remove unused local var.
17120 * frame.c, frame.h (x_get_resource_string): Bring this back, but
17121 only if HAVE_X_WINDOWS && !USE_X_TOOLKIT.
17123 * bitmaps: Change bitmaps from unsigned char back to the X11
17124 compatible char. Avoid the old compiler warnings about
17125 out-of-range initializers by using, for example, '\xab' rather
17128 * xgselect.c (xgselect_initialize): Check vs interface
17129 even if ! (defined (USE_GTK) || defined (HAVE_GCONF)).
17131 * xmenu.c (xmenu_show): Rename parm to avoid shadowing.
17133 * xterm.c (x_create_toolkit_scroll_bar): Use const * for pointers
17134 to read-only memory.
17136 * fns.c (vector): Remove; this old hack is no longer needed.
17138 * xsmfns.c (create_client_leader_window): Rename shadowing arg.
17140 (gdk_x11_set_sm_client_id) [!USE_GTK]: Don't define.
17142 * xrdb.c (x_load_resources): Omit unused local.
17144 * xfns.c (free_frame_menubar, atof): Remove duplicate decls.
17145 (x_window): Rename locals to avoid shadowing.
17146 (USG): Use the kludged USG macro, to pacify gcc.
17148 * xterm.c (x_alloc_nearest_color_for_widget): Remove; unused.
17149 (x_term_init): Remove local to avoid shadowing.
17151 * xfns.c, xterm.c (_XEditResCheckMessages): Protoize decl.
17153 * xdisp.c, dispextern.h (set_vertical_scroll_bar): Now extern if
17154 USE_TOOLKIT_SCROLL_BARS && !USE_GTK, as xterm.c needs it then.
17156 2011-04-16 Eli Zaretskii <eliz@gnu.org>
17158 * gnutls.c (Fgnutls_boot): Don't pass Lisp_Object to `error'.
17160 Fix regex.c, syntax.c and friends for buffers > 2GB.
17161 * syntax.h (struct gl_state_s): Declare character position members
17164 * syntax.c (update_syntax_table): Declare 2nd argument EMACS_INT.
17166 * textprop.c (verify_interval_modification, interval_of):
17167 Declare arguments EMACS_INT.
17169 * intervals.c (adjust_intervals_for_insertion): Declare arguments
17172 * intervals.h (CHECK_TOTAL_LENGTH): Cast to EMACS_INT, not `int'.
17174 * indent.c (Fvertical_motion): Local variable it_start is now
17177 * regex.c (re_match, re_match_2, re_match_2_internal)
17178 (bcmp_translate, regcomp, regexec, print_double_string)
17179 (group_in_compile_stack, re_search, re_search_2, regex_compile)
17180 (re_compile_pattern, re_exec): Declare arguments and local
17181 variables `size_t' and `ssize_t' and return values `regoff_t', as
17183 (POP_FAILURE_REG_OR_COUNT) <pfreg>: Declare `long'.
17184 (CHECK_INFINITE_LOOP) <failure>: Declare `ssize_t'.
17185 <compile_stack_type>: `size' and `avail' are now `size_t'.
17187 * regex.h <regoff_t>: Use ssize_t, not int.
17188 (re_search, re_search_2, re_match, re_match_2): Arguments that
17189 specify buffer/string position and length are now ssize_t and
17190 size_t. Return type is regoff_t.
17192 2011-04-16 Ben Key <bkey76@gmail.com>
17194 * nsfont.m: Fixed bugs in ns_get_family and
17195 ns_descriptor_to_entity that were caused by using free to
17196 deallocate memory blocks that were allocated by xmalloc (via
17197 xstrdup). This caused Emacs to crash when compiled with
17198 XMALLOC_OVERRUN_CHECK defined (when Emacs was configured with
17199 --enable-checking=xmallocoverrun). xfree is now used to
17200 deallocate these memory blocks.
17202 2011-04-15 Paul Eggert <eggert@cs.ucla.edu>
17204 * sysdep.c (emacs_read): Remove unnecessary check vs MAX_RW_COUNT.
17206 emacs_write: Accept and return EMACS_INT for sizes.
17207 See http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00514.html
17209 * gnutls.c, gnutls.h (emacs_gnutls_read, emacs_gnutls_write):
17210 Accept and return EMACS_INT.
17211 (emacs_gnutls_write): Return the number of bytes written on
17213 * sysdep.c, lisp.h (emacs_read, emacs_write): Likewise.
17214 (emacs_read, emacs_write): Remove check for negative size, as the
17215 Emacs source code has been audited now.
17216 * sysdep.c (MAX_RW_COUNT): New macro, to work around kernel bugs.
17217 (emacs_read, emacs_write): Use it.
17218 * process.c (send_process): Adjust to the new signatures of
17219 emacs_write and emacs_gnutls_write. Do not attempt to store
17220 a byte offset into an 'int'; it might overflow.
17221 See http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00483.html
17223 * sound.c: Don't assume sizes fit in 'int'.
17224 (struct sound_device.period_size, alsa_period_size):
17225 Return EMACS_INT, not int.
17226 (struct sound_device.write, vox_write, alsa_write):
17227 Accept EMACS_INT, not int.
17228 (wav_play, au_play): Use EMACS_INT to store sizes and to
17229 record read return values.
17231 2011-04-15 Ben Key <bkey76@gmail.com>
17233 * keyboard.c (Qundefined): Don't declare static since it is used
17235 * xfaces.c (Qbold, Qexpanded, Qitalic, Qcondensed): Don't declare
17236 static since they are used in nsfont.m.
17238 2011-04-15 Stefan Monnier <monnier@iro.umontreal.ca>
17240 * process.c (Qprocessp): Don't declare static.
17241 * lisp.h (Qprocessp): Declare again.
17243 2011-04-15 Juanma Barranquero <lekktu@gmail.com>
17245 * font.c (Qopentype): Don't make static (used from w32uniscribe.c).
17247 2011-04-14 Paul Eggert <eggert@cs.ucla.edu>
17249 Improve C-level modularity by making more things 'static'.
17251 Don't publish debugger-only interfaces to other modules.
17252 * lisp.h (safe_debug_print, debug_output_compilation_hack):
17253 (verify_bytepos, count_markers): Move decls to the only modules
17255 * region-cache.h (pp_cache): Likewise.
17256 * window.h (check_all_windows): Likewise.
17257 * marker.c, print.c, region-cache.c, window.c: Decls moved here.
17259 * sysdep.c (croak): Now static, if
17260 defined TIOCNOTTY || defined USG5 || defined CYGWIN.
17261 * syssignal.h (croak): Declare only if not static.
17263 * alloc.c (refill_memory_reserve): Now static if
17264 !defined REL_ALLOC || defined SYSTEM_MALLOC.
17265 * lisp.h (refill_memory_reserve): Declare only if not static.
17267 * xsettings.c, xsettings.h (xsettings_get_system_normal_font):
17268 Define only if USE_LUCID.
17270 * xrdb.c (x_customization_string, x_rm_string): Now static.
17272 * xmenu.c (x_menu_wait_for_event): Export only if USE_MOTIF.
17273 * xterm.h (x_menu_wait_for_event): Declare only if USE_MOTIF.
17275 * xdisp.c (draw_row_with_mouse_face): Now static.
17276 * dispextern.h (draw_row_with_mouse_fave): Remove decl.
17278 * window.h (check_all_windows): Mark externally visible.
17280 * window.c (window_deletion_count): Now static.
17282 * undo.c: Make symbols static if they're not exported.
17283 (last_undo_buffer, last_boundary_position, pending_boundary):
17286 * textprop.c (interval_insert_behind_hooks): Now static.
17287 (interval_insert_in_front_hooks): Likewise.
17289 * term.c: Make symbols static if they're not exported.
17290 (tty_turn_off_highlight, get_tty_terminal, max_frame_cols):
17291 (max_frame_lines, tty_set_terminal_modes):
17292 (tty_reset_terminal_modes, tty_turn_off_highlight):
17293 (get_tty_terminal): Now static.
17294 (term_mouse_moveto): Do not define if HAVE_WINDOW_SYSTEM.
17295 * termhooks.h (term_mouse_moveto): Do not declare if
17296 HAVE_WINDOW_SYSTEM.
17297 * dispextern.h (tty_set_terminal_modes, tty_reset_terminal_modes):
17298 (tty_turn_off_highlight, get_tty_terminal): Remove decls.
17300 * sysdep.c: Make symbols static if they're not exported.
17301 (emacs_get_tty, emacs_set_tty, old_fcntl_flags, old_fcntl_owner):
17303 (sigprocmask_set, full_mask): Remove; unused.
17304 (wait_debugging): Mark as visible.
17305 * syssignal.h (SIGFULLMASK, full_mask): Remove decls.
17306 * systty.h (emacs_get_tty, emacs_set_tty): Remove decls.
17308 * syntax.c (syntax_temp): Define only if !__GNUC__.
17310 * sound.c (current_sound_device, current_sound): Now static.
17312 * search.c (searchbufs, searchbuf_head): Now static.
17314 * scroll.c (scroll_cost): Remove; unused.
17315 * dispextern.h (scroll_cost): Remove decl.
17317 * region-cache.h (pp_cache): Mark as externally visible.
17319 * process.c: Make symbols static if they're not exported.
17320 (process_tick, update_tick, create_process, chan_process):
17321 (Vprocess_alist, proc_buffered_char, datagram_access):
17322 (fd_callback_data, send_process_frame, process_sent_to): Now static.
17323 (deactivate_process): Mark defn as static, as well as decl.
17324 * lisp.h (create_process): Remove decl.
17325 * process.h (chan_process, Vprocess_alist): Remove decls.
17327 * print.c: Make symbols static if they're not exported.
17328 (print_depth, new_backquote_output, being_printed, print_buffer):
17329 (print_buffer_size, print_buffer_pos, print_buffer_pos_byte):
17330 (print_interval, print_number_index, initial_stderr_stream):
17332 * lisp.h (Fprinc): Remove decl.
17333 (debug_output_compilation_hack): Mark as externally visible.
17335 * sysdep.c (croak): Move decl from here to syssignal.h.
17336 * syssignal.h (croak): Put it here, so the API can be checked when
17337 'croak' is called from dissociate_if_controlling_tty.
17339 * minibuf.c: Make symbols static if they're not exported.
17340 (minibuf_save_list, choose_minibuf_frame): Now static.
17341 * lisp.h (choose_minibuf_frame): Remove decl.
17343 * lisp.h (verify_bytepos, count_markers): Mark as externally visible.
17345 * lread.c: Make symbols static if they're not exported.
17346 (read_objects, initial_obarray, oblookup_last_bucket_number):
17348 (make_symbol): Remove; unused.
17349 * lisp.h (initial_obarray, make_symbol): Remove decls.
17351 * keyboard.c: Make symbols static if they're not exported.
17352 (single_kboard, recent_keys_index, total_keys, recent_keys):
17353 (this_command_key_count_reset, raw_keybuf, raw_keybuf_count):
17354 (this_single_command_key_start, echoing, last_auto_save):
17355 (read_key_sequence_cmd, dribble, recursive_edit_unwind):
17356 (command_loop, echo_now, keyboard_init_hook, help_char_p):
17357 (quit_throw_to_read_char, command_loop_2, top_level_1, poll_timer):
17358 (Vlispy_mouse_stem, double_click_count):
17360 (force_auto_save_soon): Define only if SIGDANGER.
17361 (ignore_mouse_drag_p): Now static if
17362 !defined HAVE_WINDOW_SYSTEM || defined USE_GTK || defined HAVE_NS.
17363 (print_help): Remove; unused.
17364 (stop_character, last_timer_event): Mark as externally visible.
17365 * keyboard.h (ignore_mouse_drag_p): Declare only if
17366 defined HAVE_WINDOW_SYSTEM && !defined USE_GTK && !defined HAVE_NS.
17367 (echo_now, help_char_p, quit_throw_to_read_char): Remove decls.
17368 * lisp.h (echoing): Remove decl.
17369 (force_auto_save_soon): Declare only if SIGDANGER.
17370 * xdisp.c (redisplay_window): Simplify code, to make it more
17371 obvious that ignore_mouse_drag_p is not accessed if !defined
17372 USE_GTK && !defined HAVE_NS.
17374 * intervals.c: Make symbols static if they're not exported.
17375 (merge_properties_sticky, merge_interval_right, delete_interval):
17377 * intervals.h (merge_interval_right, delete_interval): Remove decls.
17379 * insdel.c: Make symbols static if they're not exported.
17380 However, leave prepare_to_modify_buffer alone. It's never
17381 called from outside this function, but that appears to be a bug.
17382 (combine_after_change_list, combine_after_change_buffer):
17383 (adjust_after_replace, signal_before_change): Now static.
17384 (adjust_after_replace_noundo): Remove; unused.
17385 * lisp.h (adjust_after_replace, adjust_after_replace_noundo):
17386 (signal_before_change): Remove decls.
17388 * indent.c (val_compute_motion, val_vmotion): Now static.
17390 * image.c: Make symbols static if they're not exported.
17391 * dispextern.h (x_create_bitmap_from_xpm_data): Do not declare
17393 * image.c (x_create_bitmap_from_xpm_data): Do not define if USE_GTK.
17394 (xpm_color_cache, ct_table, ct_colors_allocated): Now static.
17396 * fringe.c (standard_bitmaps): Now static.
17397 (max_used_fringe_bitmap): Now static, unless HAVE_NS.
17399 * frame.c: Make symbols static if they're not exported.
17400 (x_report_frame_params, make_terminal_frame): Now static.
17401 (get_frame_param): Now static, unless HAVE_NS.
17402 (x_fullscreen_adjust): Define if WINDOWSNT, not if HAVE_WINDOW_SYSTEM.
17403 (x_get_resource_string): Remove; not used.
17404 * frame.h (make_terminal_frame, x_report_frame_params):
17405 (x_get_resource_string); Remove decls.
17406 (x_fullscreen_adjust): Declare only if WINDOWSNT.
17407 * lisp.h (get_frame_param): Declare only if HAVE_NS.
17409 * font.c, fontset.c: Make symbols static if they're not exported.
17410 * dispextern.h (FACE_SUITABLE_FOR_ASCII_CHAR_P): New macro.
17411 (FACE_SUITABLE_FOR_CHAR_P): Use it.
17412 * font.c (font_close_object): Now static.
17413 * font.h (font_close_object): Remove.
17414 * fontset.c (FONTSET_OBJLIST): Remove.
17415 (free_realized_fontset) #if-0 the body, which does nothing.
17416 (face_suitable_for_char_p): #if-0, as it's never called.
17417 * fontset.h (face_suitable_for_char_p): Remove decl.
17418 * xfaces.c (face_at_string_position):
17419 Use FACE_SUITABLE_FOR_ASCII_CHAR_P, not FACE_SUITABLE_FOR_CHAR_P,
17420 since 0 is always ASCII.
17422 * fns.c (weak_hash_tables): Now static.
17424 * fileio.c: Make symbols static if they're not exported.
17425 (auto_saving, auto_save_mode_bits, auto_save_error_occurred):
17426 (Vwrite_region_annotation_buffers): Now static.
17428 * eval.c: Make symbols static if they're not exported.
17429 (backtrace_list, lisp_eval_depth, when_entered_debugger): Now static.
17430 * lisp.h (backtrace_list): Remove decl.
17432 * emacs.c: Make symbols static if they're not exported.
17433 (malloc_state_ptr, malloc_using_checking, syms_of_emacs):
17434 (fatal_error_code, fatal_error_signal_hook, standard_args):
17436 (fatal_error_signal): Now static, unless FLOAT_CATCH_SIGKILL.
17437 (DEFINE_DUMMY_FUNCTION): Mark function as externally visible.
17438 (__CTOR_LIST__, __DTOR_LIST__): Now externally visible.
17439 * lisp.h (fatal_error_signal_hook): Remove decl.
17440 (fatal_error_signal): Declare only if FLOAT_CATCH_SIGKILL.
17442 * editfns.c: Move a (normally-unused) function to its only use.
17443 * editfns.c, lisp.h (get_operating_system_release): Remove.
17444 * process.c (init_process) [DARWIN_OS]: Do it inline, as it is not
17445 worth the hassle of breaking this out.
17447 * xterm.c: Make symbols static if they're not exported.
17448 (x_raise_frame, x_lower_frame, x_wm_set_window_state):
17449 (x_wm_set_icon_pixmap, x_initialize, XTread_socket_fake_io_error):
17450 (x_destroy_window, x_delete_display):
17452 (x_dispatch_event): Now static if ! (USE_MOTIF || USE_X_TOOLKIT).
17453 (x_mouse_leave): Remove; unused.
17454 * xterm.h (x_display_info_for_name, x_raise_frame, x_lower_frame):
17455 (x_destroy_window, x_wm_set_window_state, x_wm_set_icon_pixmap):
17456 (x_delete_display, x_initialize, x_set_border_pixel, x_screen_planes):
17458 (x_mouse_leave): Declare only if WINDOWSNT.
17459 (x_dispatch_event): Declare only if USE_MOTIF or USE_X_TOOLKIT.
17460 (xic_create_fontsetname): Declare only if HAVE_X_WINDOWS &&
17463 * ftxfont.c: Make symbols static if they're not exported.
17464 (ftxfont_driver): Export only if !defined HAVE_XFT && def8ined
17466 * font.h (ftxfont_driver): Likewise.
17468 * xfns.c: Make symbols static if they're not exported.
17469 (x_last_font_name, x_display_info_for_name):
17470 (x_set_foreground_color, x_set_background_color, x_set_mouse_color):
17471 (x_set_cursor_color, x_set_border_pixel, x_set_border_color):
17472 (x_set_cursor_type, x_set_icon_type, x_set_icon_name):
17473 (x_set_scroll_bar_foreground, x_set_scroll_bar_background):
17474 (x_explicitly_set_name, x_set_title, xic_defaut_fontset, tip_timer):
17475 (last_show_tip_args): Now static.
17476 (xic_defaut_fontset, xic_create_fontsetname): Define only if
17477 defined HAVE_X_WINDOWS && defined USE_X_TOOLKIT
17478 (x_screen_planes): Remove; unused.
17479 * dispextern.h (x_screen_planes): Remove decl.
17481 * dispnew.c: Make symbols static if they're not exported.
17482 * dispextern.h (redraw_garbaged_frames, scrolling):
17483 (increment_row_positions): Remove.
17484 * dispnew.c (new_glyph_matrix, increment_row_positions, scrolling):
17485 (delayed_size_change, glyph_matrix_count, glyph_pool_count):
17487 (redraw_garbaged_frames): Remove; unused.
17489 * xfaces.c: Make symbols static if they're not exported.
17490 * dispextern.h (ascii_face_of_lisp_face, free_realized_face):
17492 * xterm.h (defined_color): Remove decls.
17493 (x_free_dpy_colors): Declare only if USE_X_TOOLKIT.
17494 * xfaces.c (tty_suppress_bold_inverse_default_colors_p):
17495 (menu_face_changed_default, defined_color, free_realized_face):
17496 (x_free_dpy_colors): Define only if USE_X_TOOLKIT.
17497 (ascii_face_of_lisp_face): Remove; unused.
17499 * xdisp.c: Make symbols static if they're not exported.
17500 * dispextern.h (scratch_glyph_row, window_box_edges):
17501 (glyph_to_pixel_coords, set_cursor_from_row):
17502 (get_next_display_element, set_iterator_to_next):
17503 (highlight_trailing_whitespace, frame_to_window_pixel_xy):
17504 (show_mouse_face): Remove decls
17505 * frame.h (message_buf_print): Likewise.
17506 * lisp.h (pop_message, set_message, check_point_in_composition):
17508 * xterm.h (set_vertical_scroll_bar): Likewise.
17509 * xdisp.c (list_of_error, Vmessage_stack, line_number_displayed):
17510 (message_buf_print, scratch_glyph_row, displayed_buffer):
17511 (set_iterator_to_next, pop_message, set_message, set_cursor_from_row):
17512 (get_next_display_element, show_mouse_face, window_box_edges):
17513 (frame_to_window_pixel_xy, check_point_in_composition):
17514 (set_vertical_scroll_bar, highlight_trailing_whitespace): Now static.
17515 (glyph_to_pixel_coords): Remove; unused.
17517 * dired.c (file_name_completion): Now static.
17519 * dbusbind.c (xd_in_read_queued_messages): Now static.
17521 * lisp.h (circular_list_error, FOREACH): Remove; unused.
17522 * data.c (circular_list_error): Remove.
17524 * commands.h (last_point_position, last_point_position_buffer):
17525 (last_point_position_window): Remove decls.
17526 * keyboard.c: Make these variables static.
17528 * coding.h (coding, code_convert_region, encode_coding_gap):
17530 * coding.c (Vsjis_coding_system, Vbig5_coding_system):
17531 (iso_code_class, detect_coding, code_convert_region): Now static.
17532 (encode_coding_gap): Remove; unused.
17534 * chartab.c (chartab_chars, chartab_bits): Now static.
17536 * charset.h (charset_iso_8859_1): Remove decl.
17537 * charset.c (charset_iso_8859_1, charset_emacs, map_charset_for_dump):
17540 * ccl.h (check_ccl_update, Vccl_program_table): Remove decls.
17541 * ccl.c (Vccl_program_table): Now static.
17542 (check_ccl_update): Remove; unused.
17544 * category.c (SET_CATEGORY_SET, set_category_set): Move here.
17545 * category.h: ... from here.
17546 * category.c (check_category_table, set_category_set): Now static.
17548 * casetab.c (Vascii_upcase_table, Vascii_eqv_table): Now static.
17549 * lisp.h: Remove these decls.
17551 * buffer.c (buffer_count): Remove unused var.
17553 * bidi.c (bidi_dump_cached_states): Mark as externally visible,
17554 so that it's not optimized away.
17555 (bidi_ignore_explicit_marks_for_paragraph_level): Likewise.
17556 * dispextern.h (bidi_dump_cached_states): Remove, since it's
17557 exported only to the debugger.
17559 * atimer.c (alarm_signal_handler, run_all_atimers): Now static.
17560 * atimer.h (run_all_atimers): Remove; not exported.
17562 font.c: Make copy_font_spec and merge_font_spec ordinary C functions.
17563 * font.c (copy_font_spec): Rename from Fcopy_font_spec, since it
17564 was inaccessible from Lisp.
17565 (merge_font_spec): Likewise, renaming from Fmerge_font_spec.
17566 * font.c, font.h, fontset.c, xfaces.c, xfont.c: Change all uses.
17568 alloc.c: Import and export fewer symbols, and remove unused items.
17569 * lisp.h (suppress_checking, die): Declare only if ENABLE_CHECKING
17571 (suppress_checking): Add EXTERNALLY_VISIBLE attribute, so that
17572 it's not optimized away by whole-program optimization.
17573 (message_enable_multibyte, free_misc): Remove.
17574 (catchlist, handlerlist, mark_backtrace):
17575 Declare only if BYTE_MARK_STACK.
17576 (mark_byte_stack): Likewise, fixing a ifdef-vs-if typo.
17577 * alloc.c (pure): Export only if VIRT_ADDR_VARIES is defined.
17578 (message_enable_multibyte): Remove decl.
17579 (free_misc, interval_free_list, float_block, float_block_index):
17580 (n_float_blocks, float_free_list, cons_block, cons_block_index):
17581 (cons_free_list, last_marked_index):
17583 (suppress_checking, die): Define only if ENABLE_CHECKING is defined.
17584 * eval.c (catchlist, handlerlist): Export only if BYTE_MARK_STACK.
17585 (mark_backtrace): Define only if BYTE_MARK_STACK.
17586 * xdisp.c (message_enable_multibyte): Now static.
17588 Declare Lisp_Object Q* variables to be 'static' if not exported.
17589 This makes it easier for human readers (and static analyzers)
17590 to see whether these variables are used from other modules.
17591 * alloc.c, buffer.c, bytecode.c, callint.c, casetab.c, category.c:
17592 * ccl.c, character.c, charset.c, cmds.c, coding.c, composite.c:
17593 * data.c, dbusbind.c, dired.c, editfns.c, eval.c, fileio.c, fns.c:
17594 * font.c, frame.c, fringe.c, ftfont.c, image.c, keyboard.c, keymap.c:
17595 * lread.c, macros.c, minibuf.c, print.c, process.c, search.c:
17596 * sound.c, syntax.c, textprop.c, window.c, xdisp.c, xfaces.c, xfns.c:
17597 * xmenu.c, xselect.c:
17598 Declare Q* vars static if they are not used in other modules.
17599 * ccl.h, character.h, charset.h, coding.h, composite.h, font.h:
17600 * frame.h, intervals.h, keyboard.h, lisp.h, process.h, syntax.h:
17601 Remove decls of unexported vars.
17602 * keyboard.h (EVENT_HEAD_UNMODIFIED): Remove now-unused macro.
17604 * lisp.h (DEFINE_FUNC): Make sname 'static'.
17606 Make Emacs functions such as Fatom 'static' by default.
17607 This makes it easier for human readers (and static analyzers)
17608 to see whether these functions can be called from other modules.
17609 DEFUN now defines a static function. To make the function external
17610 so that it can be used in other C modules, use the new macro DEFUE.
17611 * lisp.h (Funibyte_char_to_multibyte, Fsyntax_table_p):
17612 (Finit_image_library):
17613 (Feval_region, Fbacktrace, Ffetch_bytecode, Fswitch_to_buffer):
17614 (Ffile_executable_p, Fmake_symbolic_link, Fcommand_execute):
17615 (Fget_process, Fdocumentation_property, Fbyte_code, Ffile_attributes):
17616 Remove decls, since these functions are now static.
17617 (Funintern, Fget_internal_run_time): New decls, since these functions
17618 were already external.
17620 * alloc.c, buffer.c, callint.c, callproc.c, casefiddle.c, casetab.c:
17621 * ccl.c, character.c, chartab.c, cmds.c, coding.c, data.c, dispnew.c:
17622 * doc.c, editfns.c, emacs.c, eval.c, fileio.c, filelock.c, floatfns.c:
17623 * fns.c, font.c, fontset.c, frame.c, image.c, indent.c:
17624 * keyboard.c, keymap.c, lread.c:
17625 * macros.c, marker.c, menu.c, minibuf.c, print.c, process.c, search.c:
17626 * syntax.c, term.c, terminal.c, textprop.c, undo.c:
17627 * window.c, xdisp.c, xfaces.c, xfns.c, xmenu.c, xsettings.c:
17628 Mark functions with DEFUE instead of DEFUN,
17629 if they are used in other modules.
17630 * buffer.c (Fset_buffer_major_mode, Fdelete_overlay): New forward
17631 decls for now-static functions.
17632 * buffer.h (Fdelete_overlay): Remove decl.
17633 * callproc.c (Fgetenv_internal): Mark as internal.
17634 * composite.c (Fremove_list_of_text_properties): Remove decl.
17635 (Fcomposition_get_gstring): New forward static decl.
17636 * composite.h (Fcomposite_get_gstring): Remove decl.
17637 * dired.c (Ffile_attributes): New forward static decl.
17638 * doc.c (Fdocumntation_property): New forward static decl.
17639 * eval.c (Ffetch_bytecode): New forward static decl.
17640 (Funintern): Remove extern decl; now in .h file where it belongs.
17641 * fileio.c (Fmake_symbolic_link): New forward static decl.
17642 * image.c (Finit_image_library): New forward static decl.
17643 * insdel.c (Fcombine_after_change_execute): Make forward decl static.
17644 * intervals.h (Fprevious_property_change):
17645 (Fremove_list_of_text_properties): Remove decls.
17646 * keyboard.c (Fthis_command_keys): Remove decl.
17647 (Fcommand_execute): New forward static decl.
17648 * keymap.c (Flookup_key): New forward static decl.
17649 (Fcopy_keymap): Now static.
17650 * keymap.h (Flookup_key): Remove decl.
17651 * process.c (Fget_process): New forward static decl.
17652 (Fprocess_datagram_address): Mark as internal.
17653 * syntax.c (Fsyntax_table_p): New forward static decl.
17654 (skip_chars): Remove duplicate decl.
17655 * textprop.c (Fprevious_property_change): New forward static decl.
17656 * window.c (Fset_window_fringes, Fset_window_scroll_bars):
17658 (Fset_window_margins, Fset_window_vscroll): New forward static decls.
17659 * window.h (Fset_window_vscroll, Fset_window_margins): Remove decls.
17661 * editfns.c (Fformat): Remove unreachable code.
17663 2011-04-14 Andreas Schwab <schwab@linux-m68k.org>
17665 * fileio.c (Finsert_file_contents): Fix typo in 2005-05-13
17668 2011-04-13 Eli Zaretskii <eliz@gnu.org>
17670 * xdisp.c (handle_invisible_prop): Don't call bidi_paragraph_init
17671 when at ZV. (Bug#8487)
17673 2011-04-12 Andreas Schwab <schwab@linux-m68k.org>
17675 * charset.c (Fclear_charset_maps): Use xfree instead of free.
17677 * keyboard.c (parse_tool_bar_item): Likewise.
17678 * sound.c (sound_cleanup, alsa_close): Likewise.
17679 * termcap.c (tgetent): Likewise.
17680 * xfns.c (x_default_font_parameter): Likewise.
17681 * xsettings.c (read_and_apply_settings): Likewise.
17683 * alloc.c (overrun_check_malloc, overrun_check_realloc)
17684 (overrun_check_free): Protoize.
17686 2011-04-12 Paul Eggert <eggert@cs.ucla.edu>
17688 * sysdep.c (emacs_read, emacs_write): Check for negative sizes
17689 since callers should never pass a negative size.
17690 Change the signature to match that of plain 'read' and 'write'; see
17691 <http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00397.html>.
17692 * lisp.h: Update prototypes of emacs_write and emacs_read.
17694 2011-04-11 Eli Zaretskii <eliz@gnu.org>
17696 * xdisp.c (redisplay_window): Don't try to determine the character
17697 position of the scroll margin if the window start point w->startp
17698 is outside the buffer's accessible region. (Bug#8468)
17700 2011-04-10 Eli Zaretskii <eliz@gnu.org>
17702 Fix write-region and its subroutines for buffers > 2GB.
17703 * fileio.c (a_write, e_write): Modify declaration of arguments and
17704 local variables to support buffers larger than 2GB.
17705 (Fcopy_file): Use EMACS_INT for return value of emacs_read.
17707 * sysdep.c (emacs_write, emacs_read): Use ssize_t for last
17708 argument, local variables, and return value.
17710 * lisp.h: Update prototypes of emacs_write and emacs_read.
17712 * sound.c (vox_write): Use ssize_t for return value of emacs_write.
17714 2011-04-10 Paul Eggert <eggert@cs.ucla.edu>
17716 * xdisp.c (vmessage): Use memchr, not strnlen, which some hosts lack.
17718 Fix more problems found by GCC 4.6.0's static checks.
17720 * xdisp.c (vmessage): Use a better test for character truncation.
17722 * charset.c (load_charset_map): <, not <=, for optimization,
17723 and to avoid potential problems with integer overflow.
17724 * chartab.c (sub_char_table_set_range, char_table_set_range): Likewise.
17725 * casetab.c (set_identity, shuffle): Likewise.
17726 * editfns.c (Fformat): Likewise.
17727 * syntax.c (skip_chars): Likewise.
17729 * xmenu.c (set_frame_menubar): Allocate smaller local vectors.
17730 This also lets GCC 4.6.0 generate slightly better loop code.
17732 * callint.c (Fcall_interactively): <, not <=, for optimization.
17733 (Fcall_interactively): Count the number of arguments produced,
17734 not the number of arguments given. This is simpler and lets GCC
17735 4.6.0 generate slightly better code.
17737 * ftfont.c: Distingish more carefully between FcChar8 and char.
17738 The previous code passed unsigned char * to a functions like
17739 strlen and xstrcasecmp that expect char *, which does not
17740 conform to the C standard.
17741 (get_adstyle_property, ftfont_pattern_entity): Use FcChar8 for
17742 arguments to FcPatternGetString, and explicitly cast FcChar8 * to
17743 char * when the C standard requires it.
17745 * keyboard.c (read_char): Remove unused var.
17747 * eval.c: Port to Windows vsnprintf (Bug#8435).
17748 Include <limits.h>.
17749 (SIZE_MAX): Define if the headers do not.
17750 (verror): Do not give up if vsnprintf returns a negative count.
17751 Instead, grow the buffer. This ports to Windows vsnprintf, which
17752 does not conform to C99. Problem reported by Eli Zaretskii.
17753 Also, simplify the allocation scheme, by avoiding the need for
17754 calling realloc, and removing the ALLOCATED variable.
17756 * eval.c (verror): Initial buffer size is 4000 (not 200) bytes.
17758 Remove invocations of doprnt, as Emacs now uses vsnprintf.
17759 But keep the doprint source code for now, as we might revamp it
17760 and use it again (Bug#8435).
17761 * lisp.h (doprnt): Remove.
17762 * Makefile.in (base_obj): Remove doprnt.o.
17763 * deps.mk (doprnt.o): Remove.
17765 error: Print 32- and 64-bit integers portably (Bug#8435).
17766 Without this change, on typical 64-bit hosts error ("...%d...", N)
17767 was used to print both 32- and 64-bit integers N, which relied on
17768 undefined behavior.
17769 * lisp.h, m/amdx86-64.h, m/ia64.h, m/ibms390x.h (pEd): New macro.
17770 * lisp.h (error, verror): Mark as printf-like functions.
17771 * eval.c (verror): Use vsnprintf, not doprnt, to do the real work.
17772 Report overflow in size calculations when allocating printf buffer.
17773 Do not truncate output string at its first null byte.
17774 * xdisp.c (vmessage): Use vsnprintf, not doprnt, to do the real work.
17775 Truncate the output at a character boundary, since vsnprintf does not
17777 * charset.c (check_iso_charset_parameter): Convert internal
17778 character to string before calling 'error', since %c now has the
17780 * coding.c (Fdecode_sjis_char, Fdecode_big5_char): Avoid int
17781 overflow when computing char to be passed to 'error'. Do not
17782 pass Lisp_Object to 'error'; pass the integer instead.
17783 * nsfns.m (Fns_do_applescript): Use int, not long, since it's
17784 formatted with plain %d.
17786 * eval.c (internal_lisp_condition_case): Don't pass spurious arg.
17788 * keyboard.c (access_keymap_keyremap): Print func name, not garbage.
17790 * coding.c (Fdecode_sjis_char): Don't assume CODE fits in int.
17792 * xterm.c (x_catch_errors): Remove duplicate declaration.
17794 * term.c (maybe_fatal): Mark its 3rd arg as a printf format, too.
17796 * xdisp.c, lisp.h (message_nolog): Remove; unused.
17798 2011-04-10 Jim Meyering <meyering@redhat.com>
17800 use ssize_t and size_t for read- and write-like emacs_gnutls_* functions
17801 * gnutls.c (emacs_gnutls_read): Adjust signature to be more read-like:
17802 return ssize_t not "int", and use size_t as the buffer length.
17803 (emacs_gnutls_write): Likewise, and make the buffer pointer "const".
17804 * gnutls.h: Update declarations.
17805 * process.c (read_process_output): Use ssize_t, to match.
17806 (send_process): Likewise.
17808 2011-04-09 Chong Yidong <cyd@stupidchicken.com>
17810 * image.c (Fimagemagick_types): Doc fix, and comment cleanup.
17812 2011-04-09 Chong Yidong <cyd@stupidchicken.com>
17814 * ftfont.c (get_adstyle_property, ftfont_pattern_entity):
17815 Use unsigned char, to match FcChar8 type definition.
17817 * xterm.c (handle_one_xevent):
17818 * xmenu.c (create_and_show_popup_menu):
17819 * xselect.c (x_decline_selection_request)
17820 (x_reply_selection_request): Avoid type-punned deref of X events.
17822 2011-04-09 Eli Zaretskii <eliz@gnu.org>
17824 Fix some uses of `int' instead of EMACS_INT.
17825 * search.c (string_match_1, fast_string_match)
17826 (fast_c_string_match_ignore_case, fast_string_match_ignore_case)
17827 (scan_buffer, find_next_newline_no_quit)
17828 (find_before_next_newline, search_command, Freplace_match)
17829 (Fmatch_data): Make some `int' variables be EMACS_INT.
17831 * xdisp.c (display_count_lines): 3rd argument and return value now
17832 EMACS_INT. All callers changed.
17833 (pint2hrstr): Last argument is now EMACS_INT.
17835 * coding.c (detect_coding_utf_8, detect_coding_emacs_mule)
17836 (detect_coding_iso_2022, detect_coding_sjis, detect_coding_big5)
17837 (detect_coding_ccl, detect_coding_charset, decode_coding_utf_8)
17838 (decode_coding_utf_16, decode_coding_emacs_mule)
17839 (decode_coding_iso_2022, decode_coding_sjis, decode_coding_big5)
17840 (decode_coding_ccl, decode_coding_charset)
17841 <consumed_chars, consumed_chars_base>: Declare EMACS_INT.
17842 (decode_coding_iso_2022, decode_coding_emacs_mule)
17843 (decode_coding_sjis, decode_coding_big5, decode_coding_charset)
17844 <char_offset, last_offset>: Declare EMACS_INT.
17845 (encode_coding_utf_8, encode_coding_utf_16)
17846 (encode_coding_emacs_mule, encode_invocation_designation)
17847 (encode_designation_at_bol, encode_coding_iso_2022)
17848 (encode_coding_sjis, encode_coding_big5, encode_coding_ccl)
17849 (encode_coding_raw_text, encode_coding_charset) <produced_chars>:
17851 (ASSURE_DESTINATION): Declare more_bytes EMACS_INT.
17852 (encode_invocation_designation): Last argument P_NCHARS is now
17854 (decode_eol): Declare pos_byte, pos, and pos_end EMACS_INT.
17855 (produce_chars): from_nchars and to_nchars are now EMACS_INT.
17857 * coding.h (struct coding_system) <head_ascii>: Declare EMACS_INT.
17860 * ccl.c (Fccl_execute_on_string): Declare some variables
17863 2011-04-08 Samuel Thibault <sthibault@debian.org> (tiny change)
17865 * term.c (init_tty): Fix incorrect ifdef placement (Bug#8450).
17867 2011-03-19 Christoph Scholtes <cschol2112@googlemail.com>
17869 * process.c (Fformat_network_address): Doc fix.
17871 2011-04-08 T.V. Raman <tv.raman.tv@gmail.com> (tiny change)
17873 * xml.c (parse_region): Avoid creating spurious whitespace nodes.
17875 2011-04-08 Chong Yidong <cyd@stupidchicken.com>
17877 * keyboard.c (read_char): Call Lisp function help-form-show,
17878 instead of using internal_with_output_to_temp_buffer.
17879 (Qhelp_form_show): New var.
17880 (syms_of_keyboard): Use DEFSYM macro.
17882 * print.c (internal_with_output_to_temp_buffer): Function deleted.
17884 * lisp.h (internal_with_output_to_temp_buffer): Remove prototype.
17886 2011-04-06 Chong Yidong <cyd@stupidchicken.com>
17888 * process.c (Flist_processes): Remove to Lisp.
17889 (list_processes_1): Delete.
17891 2011-04-06 Eli Zaretskii <eliz@gnu.org>
17893 * msdos.c (careadlinkat, careadlinkatcwd): MS-DOS replacements.
17895 * w32.c (careadlinkat, careadlinkatcwd): New always-fail stubs.
17897 2011-04-06 Paul Eggert <eggert@cs.ucla.edu>
17899 Fix more problems found by GCC 4.6.0's static checks.
17901 * xmenu.c (Fx_popup_dialog): Don't assume string is free of formats.
17903 * menu.c (Fx_popup_menu): Don't assume error_name lacks printf formats.
17905 * lisp.h (message, message_nolog, fatal): Mark as printf-like.
17907 * xdisp.c (vmessage): Mark as a printf-like function.
17909 * term.c (vfatal, maybe_fatal): Mark as printf-like functions.
17911 * sound.c (sound_warning): Don't crash if arg contains a printf format.
17913 * image.c (tiff_error_handler, tiff_warning_handler): Mark as
17914 printf-like functions.
17915 (tiff_load): Add casts to remove these marks before passing them
17916 to system-supplied API.
17918 * eval.c (Fsignal): Remove excess argument to 'fatal'.
17920 * coding.c (EMIT_ONE_BYTE, EMIT_TWO_BYTES): Use unsigned, not int.
17921 This avoids several warnings with gcc -Wstrict-overflow.
17922 (DECODE_COMPOSITION_RULE): If the rule is invalid, goto invalid_code
17923 directly, rather than having caller test rule sign. This avoids
17924 some unnecessary tests.
17925 * composite.h (COMPOSITION_ENCODE_RULE_VALID): New macro.
17926 (COMPOSITION_ENCODE_RULE): Arguments now must be valid. This
17927 affects only one use, in DECODE_COMPOSITION_RULE, which is changed.
17929 * xfont.c (xfont_text_extents): Remove var that was set but not used.
17930 (xfont_open): Avoid unnecessary tests.
17932 * composite.c (composition_gstring_put_cache): Use unsigned integer.
17934 * composite.h, composite.c (composition_gstring_put_cache):
17935 Use EMACS_INT, not int, for length.
17937 * composite.h (COMPOSITION_DECODE_REFS): New macro,
17938 breaking out part of COMPOSITION_DECODE_RULE.
17939 (COMPOSITION_DECODE_RULE): Use it.
17940 * composite.c (get_composition_id): Remove unused local vars,
17941 by using the new macro.
17943 * textprop.c (set_text_properties_1): Change while to do-while,
17944 since the condition is always true at first.
17946 * intervals.c (graft_intervals_into_buffer): Mark var as used.
17947 (interval_deletion_adjustment): Return unsigned value.
17950 * process.c (list_processes_1, create_pty, read_process_output):
17951 (exec_sentinel): Remove vars that were set but not used.
17952 (create_pty): Remove unnecessary "volatile"s.
17953 (Fnetwork_interface_info): Avoid possibility of int overflow.
17954 (read_process_output): Do adaptive read buffering even if carryover.
17955 (read_process_output): Simplify nbytes computation if buffered.
17957 * bytecode.c (exec_byte_code): Rename local to avoid shadowing.
17959 * syntax.c (scan_words): Remove var that was set but not used.
17960 (update_syntax_table): Use unsigned instead of int.
17962 * lread.c (lisp_file_lexically_bound_p): Use ints rather than endptrs.
17963 (lisp_file_lexically_bound_p, read1): Use unsigned instead of int.
17964 (safe_to_load_p): Make the end-of-loop test the inverse of the in-loop.
17966 * print.c (print_error_message): Avoid int overflow.
17968 * font.c (font_list_entities): Redo for clarity,
17969 so that reader need not know FONT_DPI_INDEX + 1 == FONT_SPACING_INDEX.
17971 * font.c (font_find_for_lface, Ffont_get_glyphs): Remove unused vars.
17972 (font_score): Avoid potential overflow in diff calculation.
17974 * fns.c (substring_both): Remove var that is set but not used.
17975 (sxhash): Redo loop for clarity and to avoid wraparound warning.
17977 * eval.c (funcall_lambda): Rename local to avoid shadowing.
17979 * alloc.c (mark_object_loop_halt, mark_object): Use size_t, not int.
17980 Otherwise, GCC 4.6.0 optimizes the loop check away since the check
17981 can always succeed if overflow has undefined behavior.
17983 * search.c (boyer_moore, wordify): Remove vars set but not used.
17984 (wordify): Omit three unnecessary tests.
17986 * indent.c (MULTIBYTE_BYTES_WIDTH): Don't compute wide_column.
17987 All callers changed. This avoids the need for an unused var.
17989 * casefiddle.c (casify_region): Remove var that is set but not used.
17991 * dired.c (file_name_completion): Remove var that is set but not used.
17993 * fileio.c (Finsert_file_contents): Make EOF condition clearer.
17995 * fileio.c (Finsert_file_contents): Avoid signed integer overflow.
17996 (Finsert_file_contents): Remove unnecessary code checking fd.
17998 * minibuf.c (read_minibuf_noninteractive): Use size_t for sizes.
17999 Check for integer overflow on size calculations.
18001 * buffer.c (Fprevious_overlay_change): Remove var that is set
18004 * keyboard.c (menu_bar_items, read_char_minibuf_menu_prompt):
18005 Remove vars that are set but not used.
18006 (timer_check_2): Don't assume timer-list and idle-timer-list are lists.
18007 (timer_check_2): Mark vars as initialized.
18009 * gtkutil.c (xg_get_file_with_chooser): Mark var as initialized.
18011 * image.c (lookup_image): Remove var that is set but not used.
18012 (xbm_load): Use parse_p, for gcc -Werror=unused-but-set-variable.
18014 * fontset.c (Finternal_char_font, Ffontset_info): Remove vars
18015 that are set but not used.
18017 * xfns.c (make_invisible_cursor): Don't return garbage
18018 if XCreateBitmapFromData fails (Bug#8410).
18020 * xselect.c (x_get_local_selection, x_handle_property_notify):
18021 Remove vars that are set but not used.
18023 * xfns.c (x_create_tip_frame): Remove var that is set but not used.
18024 (make_invisible_cursor): Initialize a possibly-uninitialized variable.
18026 * xterm.c (x_scroll_bar_to_input_event) [!USE_GTK]:
18027 Remove var that is set but not used.
18028 (scroll_bar_windows_size): Now size_t, not int.
18029 (x_send_scroll_bar_event): Use size_t, not int, for sizes.
18030 Check for overflow.
18032 * xfaces.c (realize_named_face): Remove vars that are set but not used.
18033 (map_tty_color) [!defined MSDOS]: Likewise.
18035 * term.c (tty_write_glyphs): Use size_t; this avoids overflow warning.
18037 * coding.c: Remove vars that are set but not used.
18038 (DECODE_COMPOSITION_RULE): Remove 2nd arg, which is unused.
18039 All callers changed.
18040 (decode_coding_utf_8, decode_coding_utf_16 decode_coding_emacs_mule):
18041 (decode_coding_iso_2022, encode_coding_sjis, encode_coding_big5):
18042 (decode_coding_charset): Remove vars that are set but not used.
18044 * bytecode.c (Fbyte_code) [!defined BYTE_CODE_SAFE]: Remove var
18045 that is set but not used.
18047 * print.c (print_object): Remove var that is set but not used.
18049 Replace 2 copies of readlink code with 1 gnulib version (Bug#8401).
18050 The gnulib version avoids calling malloc in the usual case,
18051 and on 64-bit hosts doesn't have some arbitrary 32-bit limits.
18052 * fileio.c (Ffile_symlink_p): Use emacs_readlink.
18053 * filelock.c (current_lock_owner): Likewise.
18054 * lisp.h (READLINK_BUFSIZE, emacs_readlink): New function.
18055 * sysdep.c: Include allocator.h, careadlinkat.h.
18056 (emacs_no_realloc_allocator): New static constant.
18057 (emacs_readlink): New function.
18058 * deps.mk (sysdep.o): Depend on ../lib/allocator.h and on
18059 ../lib/careadlinkat.h.
18061 2011-04-04 Stefan Monnier <monnier@iro.umontreal.ca>
18063 * keyboard.c (safe_run_hook_funcall): Fix last change (don't stop at the
18064 first non-nil return value).
18066 2011-04-03 Jan Djärv <jan.h.d@swipnet.se>
18068 * nsterm.m (ns_update_auto_hide_menu_bar): Define MAC_OS_X_VERSION_10_6
18069 if not defined (Bug#8403).
18071 2011-04-02 Juanma Barranquero <lekktu@gmail.com>
18073 * xdisp.c (display_count_lines): Remove parameter `start',
18074 unused since 1998-01-01T02:27:27Z!rms@gnu.org. All callers changed.
18075 (get_char_face_and_encoding): Remove parameter `multibyte_p',
18076 unused since 2008-05-14T01:40:23Z!handa@m17n.org. All callers changed.
18077 (fill_stretch_glyph_string): Remove parameters `row' and `area',
18078 unused at least since Kim's GUI unification at 2003-03-16T20:45:46Z!storm@cua.dk
18079 and thereabouts. All callers changed.
18080 (get_per_char_metric): Remove parameter `f', unused since
18081 2008-05-14T01:40:23Z!handa@m17n.org. All callers changed.
18083 2011-04-02 Jim Meyering <meyering@redhat.com>
18085 do not dereference NULL upon failed strdup
18086 * nsfont.m (ns_descriptor_to_entity): Use xstrdup, not strdup.
18087 (ns_get_family): Likewise.
18089 2011-04-02 Juanma Barranquero <lekktu@gmail.com>
18091 * eval.c (unwind_to_catch) [DEBUG_GCPRO]: Remove redundant assignment.
18093 2011-04-02 Jan Djärv <jan.h.d@swipnet.se>
18095 * nsterm.m (ns_update_auto_hide_menu_bar): Only for OSX 10.6 or
18098 2011-04-01 Stefan Monnier <monnier@iro.umontreal.ca>
18100 Add lexical binding.
18102 * window.c (Ftemp_output_buffer_show): New fun.
18103 (Fsave_window_excursion):
18104 * print.c (Fwith_output_to_temp_buffer): Move to subr.el.
18106 * lread.c (lisp_file_lexically_bound_p): New function.
18107 (Fload): Bind Qlexical_binding.
18108 (readevalloop): Remove `evalfun' arg.
18109 Bind Qinternal_interpreter_environment.
18110 (Feval_buffer): Bind Qlexical_binding.
18111 (defvar_int, defvar_bool, defvar_lisp_nopro, defvar_kboard):
18113 (syms_of_lread): Declare `lexical-binding'.
18115 * lisp.h (struct Lisp_Symbol): New field `declared_special'.
18117 * keyboard.c (eval_dyn): New fun.
18118 (menu_item_eval_property): Use it.
18120 * image.c (parse_image_spec): Use Ffunctionp.
18122 * fns.c (concat, mapcar1): Accept byte-code-functions.
18124 * eval.c (Fsetq): Handle lexical vars.
18125 (Fdefun, Fdefmacro, Ffunction): Make closures when needed.
18126 (Fdefconst, Fdefvaralias, Fdefvar): Mark as dynamic.
18127 (FletX, Flet): Obey lexical binding.
18128 (Fcommandp): Handle closures.
18129 (Feval): New `lexical' arg.
18130 (eval_sub): New function extracted from Feval. Use it almost
18131 everywhere where Feval was used. Look up vars in lexical env.
18133 (Ffunctionp): Move from subr.el.
18134 (Ffuncall): Handle closures.
18135 (apply_lambda): Remove `eval_flags'.
18136 (funcall_lambda): Handle closures and new byte-code-functions.
18137 (Fspecial_variable_p): New function.
18138 (syms_of_eval): Initialize the Vinternal_interpreter_environment var,
18139 but without exporting it to Lisp.
18141 * doc.c (Fdocumentation, store_function_docstring):
18142 * data.c (Finteractive_form): Handle closures.
18144 * callint.c (Fcall_interactively): Preserve lexical-binding mode for
18147 * bytecode.c (Bstack_ref, Bstack_set, Bstack_set2, BdiscardN):
18149 (exec_byte_code): New function extracted from Fbyte_code to handle new
18150 calling convention for byte-code-functions. Add new byte-codes.
18152 * buffer.c (defvar_per_buffer): Set new `declared_special' field.
18154 * alloc.c (Fmake_symbol): Init new `declared_special' field.
18156 2011-03-31 Juanma Barranquero <lekktu@gmail.com>
18158 * xdisp.c (redisplay_internal): Fix prototype.
18160 2011-03-31 Eli Zaretskii <eliz@gnu.org>
18162 * xdisp.c (SCROLL_LIMIT): New macro.
18163 (try_scrolling): Use it when setting scroll_limit.
18164 Limit scrolling to 100 screen lines.
18165 (redisplay_window): Even when falling back on "recentering",
18166 position point in the window according to scroll-conservatively,
18167 scroll-margin, and scroll-*-aggressively variables. (Bug#6671)
18169 (try_scrolling): When point is above the window, allow searching
18170 as far as scroll_max, or one screenful, to compute vertical
18171 distance from PT to the scroll margin position. This prevents
18172 try_scrolling from unnecessarily failing when
18173 scroll-conservatively is set to a value slightly larger than the
18174 window height. Clean up the case of PT below the margin at bottom
18175 of window: scroll_max can no longer be INT_MAX. When aggressive
18176 scrolling is in use, don't let point enter the opposite scroll
18177 margin as result of the scroll.
18178 (syms_of_xdisp) <scroll-conservatively>: Document the
18179 threshold of 100 lines for never-recentering scrolling.
18181 2011-03-31 Juanma Barranquero <lekktu@gmail.com>
18183 * dispextern.h (move_it_by_lines):
18184 * xdisp.c (move_it_by_lines): Remove parameter `need_y_p', unused
18185 since 2000-12-29T14:24:09Z!gerd@gnu.org. All callers changed.
18186 (message_log_check_duplicate): Remove parameters `prev_bol' and
18187 `this_bol', unused since 1998-01-01T02:27:27Z!rms@gnu.org. All callers changed.
18188 (redisplay_internal): Remove parameter `preserve_echo_area',
18189 unused since 1999-07-21T21:43:52Z!gerd@gnu.org. All callers changed.
18191 * indent.c (Fvertical_motion):
18192 * window.c (window_scroll_pixel_based, Frecenter):
18193 Don't pass `need_y_p' to `move_it_by_lines'.
18195 2011-03-30 Stefan Monnier <monnier@iro.umontreal.ca>
18197 * eval.c (struct backtrace): Don't cheat with negative numbers, but do
18198 steal a few bits to be more compact.
18199 (interactive_p, Fbacktrace, Fbacktrace_frame, mark_backtrace):
18200 Remove unneeded casts.
18202 * bytecode.c (Fbyte_code): CAR and CDR can GC.
18204 2011-03-30 Zachary Kanfer <zkanfer@gmail.com> (tiny change)
18206 * keyboard.c (Fexecute_extended_command): Do log the "suggest key
18207 binding" message (bug#7967).
18209 2011-03-30 Paul Eggert <eggert@cs.ucla.edu>
18211 Fix more problems found by GCC 4.6.0's static checks.
18213 * unexelf.c (unexec) [! (defined _SYSTYPE_SYSV || defined __sgi)]:
18214 Remove unused local var.
18216 * editfns.c (Fmessage_box): Remove unused local var.
18218 * xdisp.c (try_window_reusing_current_matrix, x_produce_glyphs):
18219 (note_mode_line_or_margin_highlight, note_mouse_highlight):
18220 Omit unused local vars.
18221 * window.c (shrink_windows): Omit unused local var.
18222 * menu.c (digest_single_submenu): Omit unused local var.
18223 * dispnew.c (update_window) [PERIODIC_PREEMPTION_CHECKING]:
18224 Omit unused local var.
18226 * keyboard.c (parse_modifiers_uncached, parse_modifiers):
18227 Don't assume string length fits in int.
18228 (keyremap_step, read_key_sequence): Use size_t for sizes.
18229 (read_key_sequence): Don't check last_real_key_start redundantly.
18231 * callproc.c (Fcall_process, Fcall_process_region): Use SAFE_ALLOCA
18232 instead of alloca (Bug#8344).
18234 * eval.c (Fbacktrace): Don't assume nargs fits in int.
18235 (Fbacktrace_frame): Don't assume nframes fits in int.
18237 * syntax.c (scan_sexps_forward): Avoid pointer wraparound.
18239 * xterm.c (x_make_frame_visible, same_x_server): Redo to avoid overflow
18242 * term.c (produce_glyphless_glyph): Remove unnecessary test.
18244 * cm.c (calccost): Turn while-do into do-while, for clarity.
18246 * keyboard.c (syms_of_keyboard): Use the same style as later
18247 in this function when indexing through an array. This also
18248 works around GCC bug 48267.
18250 * image.c (tiff_load): Fix off-by-one image count (Bug#8336).
18252 * xselect.c (x_check_property_data): Return correct size (Bug#8335).
18254 * chartab.c (sub_char_table_ref_and_range): Redo for slight
18255 efficiency gain, and to bypass a gcc -Wstrict-overflow warning.
18257 * keyboard.c, keyboard.h (num_input_events): Now size_t.
18258 This avoids undefined behavior on integer overflow, and is a bit
18259 more convenient anyway since it is compared to a size_t variable.
18261 Variadic C functions now count arguments with size_t, not int.
18262 This avoids an unnecessary limitation on 64-bit machines, which
18263 caused (substring ...) to crash on large vectors (Bug#8344).
18264 * lisp.h (struct Lisp_Subr.function.aMANY): Now takes size_t, not int.
18265 (DEFUN_ARGS_MANY, internal_condition_case_n, safe_call): Likewise.
18266 All variadic functions and their callers changed accordingly.
18267 (struct gcpro.nvars): Now size_t, not int. All uses changed.
18268 * data.c (arith_driver, float_arith_driver): Likewise.
18269 * editfns.c (general_insert_function): Likewise.
18270 * eval.c (struct backtrace.nargs, interactive_p)
18271 (internal_condition_case_n, run_hook_with_args, apply_lambda)
18272 (funcall_lambda, mark_backtrace): Likewise.
18273 * fns.c (concat): Likewise.
18274 * frame.c (x_set_frame_parameters): Likewise.
18275 * fns.c (get_key_arg): Now accepts and returns size_t, and returns
18276 0 if not found, not -1. All callers changed.
18278 * alloc.c (garbage_collect): Don't assume stack size fits in int.
18279 (stack_copy_size): Now size_t, not int.
18280 (stack_copy, stack_copy_size): Define only if MAX_SAVE_STACK > 0.
18282 2011-03-28 Juanma Barranquero <lekktu@gmail.com>
18284 * coding.c (encode_designation_at_bol): Remove parameter `charbuf_end',
18285 unused since 2002-03-01T01:17:24Z!handa@m17n.org and 2008-02-01T16:01:31Z!miles@gnu.org.
18286 All callers changed.
18288 * lisp.h (multibyte_char_to_unibyte):
18289 * character.c (multibyte_char_to_unibyte): Remove parameter `rev_tbl',
18290 unused since 2002-03-01T01:16:34Z!handa@m17n.org and 2008-02-01T16:01:31Z!miles@gnu.org.
18291 * character.h (CHAR_TO_BYTE8):
18292 * cmds.c (internal_self_insert):
18293 * editfns.c (general_insert_function):
18294 * keymap.c (push_key_description):
18295 * search.c (Freplace_match):
18296 * xdisp.c (message_dolog, set_message_1): All callers changed.
18298 2011-03-28 Stefan Monnier <monnier@iro.umontreal.ca>
18300 * keyboard.c (safe_run_hook_funcall): New function.
18301 (safe_run_hooks_1, safe_run_hooks_error, safe_run_hooks): On error,
18302 don't set the hook to nil, but remove the offending function instead.
18303 (Qcommand_hook_internal): Remove, unused.
18304 (syms_of_keyboard): Don't initialize Qcommand_hook_internal nor define
18305 Vcommand_hook_internal.
18307 * eval.c (enum run_hooks_condition): Remove.
18308 (funcall_nil, funcall_not): New functions.
18309 (run_hook_with_args): Call each function through a `funcall' argument.
18310 Remove `cond' argument, now redundant.
18311 (Frun_hooks, Frun_hook_with_args, Frun_hook_with_args_until_success)
18312 (Frun_hook_with_args_until_failure): Adjust accordingly.
18313 (run_hook_wrapped_funcall, Frun_hook_wrapped): New functions.
18315 2011-03-28 Juanma Barranquero <lekktu@gmail.com>
18317 * dispextern.h (string_buffer_position): Remove declaration.
18319 * print.c (strout): Remove parameter `multibyte', unused since
18320 1999-08-21T19:30:21Z!gerd@gnu.org. All callers changed.
18322 * search.c (boyer_moore): Remove parameters `len', `pos' and `lim',
18323 never used since function introduction in 1998-02-08T21:33:56Z!rms@gnu.org.
18324 All callers changed.
18326 * w32.c (_wsa_errlist): Use braces for struct initializers.
18328 * xdisp.c (string_buffer_position_lim): Remove parameter `w',
18329 never used since function introduction in 2001-03-09T18:41:50Z!gerd@gnu.org.
18330 All callers changed.
18331 (string_buffer_position): Likewise. Also, make static (it's never
18332 used outside xdisp.c).
18333 (cursor_row_p): Remove parameter `w', unused since
18334 2000-10-17T16:08:57Z!gerd@gnu.org. All callers changed.
18335 (decode_mode_spec): Remove parameter `precision', introduced during
18336 Gerd Moellmann's rewrite at 1999-07-21T21:43:52Z!gerd@gnu.org, but never used.
18337 All callers changed.
18339 2011-03-27 Jan Djärv <jan.h.d@swipnet.se>
18341 * nsterm.m (syms_of_nsterm): Use doc: for ns-auto-hide-menu-bar.
18343 2011-03-27 Anders Lindgren <andlind@gmail.com>
18345 * nsterm.m (ns_menu_bar_is_hidden): New variable.
18346 (ns_constrain_all_frames, ns_menu_bar_should_be_hidden)
18347 (ns_update_auto_hide_menu_bar): New functions.
18348 (ns_update_begin): Call ns_update_auto_hide_menu_bar.
18349 (applicationDidBecomeActive): Call ns_update_auto_hide_menu_bar and
18350 ns_constrain_all_frames.
18351 (constrainFrameRect): Return at once if ns_menu_bar_should_be_hidden.
18352 (syms_of_nsterm): DEFVAR ns-auto-hide-menu-bar, init to Qnil.
18354 2011-03-27 Jan Djärv <jan.h.d@swipnet.se>
18356 * nsmenu.m (runDialogAt): Remove argument to timer_check.
18358 2011-03-27 Glenn Morris <rgm@gnu.org>
18360 * syssignal.h: Replace RETSIGTYPE with void.
18361 * atimer.c, data.c, dispnew.c, emacs.c, floatfns.c, keyboard.c:
18362 * keyboard.h, lisp.h, process.c, sysdep.c, xterm.c:
18363 Replace SIGTYPE with void everywhere.
18364 * s/usg5-4-common.h (SIGTYPE): Remove definition.
18365 * s/template.h (SIGTYPE): Remove commented out definition.
18367 2011-03-26 Eli Zaretskii <eliz@gnu.org>
18369 * xdisp.c (redisplay_window): Don't check buffer's clip_changed
18370 flag as a prerequisite for invoking try_scrolling. (Bug#6671)
18372 2011-03-26 Juanma Barranquero <lekktu@gmail.com>
18374 * w32.c (read_unc_volume): Use parameter `henum', instead of
18375 global variable `wget_enum_handle'.
18377 * keymap.c (describe_vector): Remove parameters `indices' and
18378 `char_table_depth', unused since 2002-03-01T01:43:26Z!handa@m17n.org.
18379 (describe_map, Fdescribe_vector): Adjust calls to `describe_vector'.
18381 * keyboard.h (timer_check, show_help_echo): Remove unused parameters.
18383 * keyboard.c (timer_check): Remove parameter `do_it_now',
18384 unused since 1996-04-12T06:01:29Z!rms@gnu.org.
18385 (show_help_echo): Remove parameter `ok_to_overwrite_keystroke_echo',
18386 unused since 2008-04-19T19:30:53Z!monnier@iro.umontreal.ca.
18388 * keyboard.c (read_char):
18389 * w32menu.c (w32_menu_display_help):
18390 * xmenu.c (show_help_event, menu_help_callback):
18391 Adjust calls to `show_help_echo'.
18393 * gtkutil.c (xg_maybe_add_timer):
18394 * keyboard.c (readable_events):
18395 * process.c (wait_reading_process_output):
18396 * xmenu.c (x_menu_wait_for_event): Adjust calls to `timer_check'.
18398 * insdel.c (adjust_markers_gap_motion):
18399 Remove; no-op since 1998-01-02T21:29:48Z!rms@gnu.org.
18400 (gap_left, gap_right): Don't call it.
18402 2011-03-25 Chong Yidong <cyd@stupidchicken.com>
18404 * xdisp.c (handle_fontified_prop): Discard changes to clip_changed
18405 incurred during fontification.
18407 2011-03-25 Juanma Barranquero <lekktu@gmail.com>
18409 * buffer.c (defvar_per_buffer): Remove unused parameter `doc'.
18410 (DEFVAR_PER_BUFFER): Don't pass it.
18412 * dispnew.c (row_equal_p, add_row_entry): Remove unused parameter `w'.
18413 (scrolling_window): Don't pass it.
18415 2011-03-25 Juanma Barranquero <lekktu@gmail.com>
18417 * dispextern.h (glyph_matric): Use #if GLYPH_DEBUG, not #ifdef.
18419 * fileio.c (check_executable) [DOS_NT]: Remove unused variables `len'
18421 (Fset_file_selinux_context) [HAVE_LIBSELINUX]: Move here declaration
18422 of variables specific to SELinux and computation of `encoded_absname'.
18424 * image.c (XPutPixel): Remove unused variable `height'.
18426 * keyboard.c (make_lispy_event): Remove unused variable `hpos'.
18428 * unexw32.c (get_section_info): Remove unused variable `section'.
18430 * w32.c (stat): Remove unused variables `drive_root' and `devtype'.
18431 (system_process_attributes): Remove unused variable `sess'.
18432 (sys_read): Remove unused variable `err'.
18434 * w32fns.c (top): Wrap variables with #if GLYPH_DEBUG, not #ifdef.
18435 (w32_wnd_proc): Remove unused variable `isdead'.
18436 (unwind_create_frame): Use #if GLYPH_DEBUG, not #ifdef.
18437 (Fx_server_max_request_size): Remove unused variable `dpyinfo'.
18438 (x_create_tip_frame): Remove unused variable `tem'.
18440 * w32inevt.c (w32_console_read_socket):
18441 Remove unused variable `no_events'.
18443 * w32term.c (x_draw_composite_glyph_string_foreground):
18444 Remove unused variable `width'.
18446 2011-03-24 Juanma Barranquero <lekktu@gmail.com>
18448 * w32term.c (x_set_glyph_string_clipping):
18449 Don't pass uninitialized region to CombineRgn.
18451 2011-03-23 Juanma Barranquero <lekktu@gmail.com>
18453 * w32fns.c (x_set_menu_bar_lines): Remove unused variable `olines'.
18454 (w32_wnd_proc): Pass NULL to Windows API, not uninitialized buffer.
18455 (Fx_close_connection): Remove unused variable `i'.
18457 * w32font.c (w32font_draw): Return number of glyphs.
18458 (w32font_open_internal): Remove unused variable `i'.
18459 (w32font_driver): Add missing initializer.
18461 * w32menu.c (utf8to16): Remove unused variable `utf16'.
18462 (fill_in_menu): Remove unused variable `items_added'.
18464 * w32term.c (last_mouse_press_frame): Remove static global variable.
18465 (w32_clip_to_row): Remove unused variable `f'.
18466 (x_delete_terminal): Remove unused variable `i'.
18468 * w32uniscribe.c (uniscribe_shape): Remove unused variable `nclusters'.
18469 (NOTHING): Remove unused static global variable.
18470 (uniscribe_check_otf): Remove unused variable `table'.
18471 (uniscribe_font_driver): Add missing initializers.
18473 2011-03-23 Julien Danjou <julien@danjou.info>
18475 * term.c (Fsuspend_tty, Fresume_tty):
18476 * minibuf.c (read_minibuf, run_exit_minibuf_hook):
18477 * window.c (temp_output_buffer_show):
18478 * insdel.c (signal_before_change):
18479 * frame.c (Fhandle_switch_frame):
18480 * fileio.c (Fdo_auto_save):
18481 * emacs.c (Fkill_emacs):
18482 * editfns.c (save_excursion_restore):
18483 * cmds.c (internal_self_insert):
18484 * callint.c (Fcall_interactively):
18485 * buffer.c (Fkill_all_local_variables):
18486 * keyboard.c (Fcommand_execute, Fsuspend_emacs, safe_run_hooks_1):
18488 (command_loop_1): Use Frun_hooks. Call safe_run_hooks
18489 unconditionally since it does the check itself.
18491 2011-03-23 Paul Eggert <eggert@cs.ucla.edu>
18493 Fix more problems found by GCC 4.5.2's static checks.
18495 * coding.c (encode_coding_raw_text): Avoid unnecessary test
18496 the first time through the loop, since we know p0 < p1 then.
18497 This also avoids a gcc -Wstrict-overflow warning.
18499 * lisp.h (SAFE_ALLOCA, SAFE_ALLOCA_LISP): Avoid 'int' overflow
18500 leading to a memory leak, possible in functions like
18501 load_charset_map_from_file that can allocate an unbounded number
18502 of objects (Bug#8318).
18504 * xmenu.c (set_frame_menubar): Use EMACS_UINT, not int, for indexes
18505 that could (at least in theory) be that large.
18507 * xdisp.c (message_log_check_duplicate): Return unsigned long, not int.
18508 This is less likely to overflow, and avoids undefined behavior if
18509 overflow does occur. All callers changed. Use strtoul to scan
18510 for the unsigned long integer.
18511 (pint2hrstr): Simplify and tune code slightly.
18512 This also avoids a (bogus) GCC warning with gcc -Wstrict-overflow.
18514 * scroll.c (do_scrolling): Work around GCC bug 48228.
18515 See <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48228>.
18517 * frame.c (Fmodify_frame_parameters): Simplify loop counter.
18518 This also avoids a warning with gcc -Wstrict-overflow.
18519 (validate_x_resource_name): Simplify count usage.
18520 This also avoids a warning with gcc -Wstrict-overflow.
18522 * fileio.c (Fcopy_file): Report error if fchown or fchmod
18525 * emacs.c (Fdaemon_initialized): Do not ignore I/O errors (Bug#8303).
18527 * process.c (Fmake_network_process): Use socklen_t, not int,
18528 where POSIX says socklen_t is required in portable programs.
18529 This fixes a porting bug on hosts like 64-bit HP-UX, where
18530 socklen_t is wider than int (Bug#8277).
18531 (Fmake_network_process, server_accept_connection):
18532 (wait_reading_process_output, read_process_output):
18535 * process.c: Rename or move locals to avoid shadowing.
18536 (list_processes_1, Fmake_network_process):
18537 (read_process_output_error_handler, exec_sentinel_error_handler):
18538 Rename or move locals.
18539 (Fmake_network_process): Define label "retry_connect" only if needed.
18540 (Fnetwork_interface_info): Fix pointer signedness.
18541 (process_send_signal): Add cast to avoid pointer signedness problem.
18542 (FIRST_PROC_DESC, IF_NON_BLOCKING_CONNECT): Remove unused macros.
18543 (create_process): Use 'volatile' to avoid vfork clobbering (Bug#8298).
18545 Make tparam.h and terminfo.c consistent.
18546 * cm.c (tputs, tgoto, BC, UP): Remove extern decls.
18547 Include tparam.h instead, since it declares them.
18548 * cm.h (PC): Remove extern decl; tparam.h now does this.
18549 * deps.mk (cm.o, terminfo.o): Depend on tparam.h.
18550 * terminfo.c: Include tparam.h, to check interfaces.
18551 (tparm): Make 1st arg a const pointer in decl. Put it at top level.
18552 (tparam): Adjust signature to match interface in tparam.h;
18553 this removes some undefined behavior. Check that outstring and len
18554 are zero, which they always are with Emacs.
18555 * tparam.h (PC, BC, UP): New extern decls.
18557 * xftfont.c (xftfont_shape): Now static, and defined only if needed.
18558 (xftfont_open): Rename locals to avoid shadowing.
18560 * ftfont.c (ftfont_resolve_generic_family): Fix pointer signedness.
18561 (ftfont_otf_capability, ftfont_shape): Omit decls if not needed.
18562 (OTF_TAG_SYM): Omit macro if not needed.
18563 (ftfont_list): Remove unused local.
18564 (get_adstyle_property, ftfont_pattern_entity):
18565 (ftfont_lookup_cache, ftfont_open, ftfont_anchor_point):
18566 Rename locals to avoid shadowing.
18568 * xfont.c (xfont_list_family): Mark var as initialized.
18570 * xml.c (make_dom): Now static.
18572 * composite.c (composition_compute_stop_pos): Rename local to
18574 (composition_reseat_it): Remove unused locals.
18575 (find_automatic_composition, composition_adjust_point): Likewise.
18576 (composition_update_it): Mark var as initialized.
18577 (find_automatic_composition): Mark vars as initialized,
18578 with a FIXME (Bug#8290).
18580 character.h: Rename locals to avoid shadowing.
18581 * character.h (PREV_CHAR_BOUNDARY, FETCH_STRING_CHAR_ADVANCE):
18582 (FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE, FETCH_CHAR_ADVANCE):
18583 (FETCH_CHAR_ADVANCE_NO_CHECK, INC_POS, DEC_POS, BUF_INC_POS):
18584 (BUF_DEC_POS): Be more systematic about renaming local temporaries
18585 to avoid shadowing.
18587 * textprop.c (property_change_between_p): Remove; unused.
18589 * intervals.c (interval_start_pos): Now static.
18591 * intervals.h (CHECK_TOTAL_LENGTH): Avoid empty "else".
18593 * atimer.c (start_atimer, append_atimer_lists, set_alarm):
18594 Rename locals to avoid shadowing.
18596 * sound.c (wav_play, au_play, Fplay_sound_internal):
18597 Fix pointer signedness.
18598 (alsa_choose_format): Remove unused local var.
18599 (wav_play): Initialize a variable to 0, to prevent undefined
18600 behavior (Bug#8278).
18602 * region-cache.c (insert_cache_boundary): Redo var to avoid shadowing.
18604 * region-cache.h (pp_cache): New decl, for gcc -Wmissing-prototypes.
18606 * callproc.c (Fcall_process): Use 'volatile' to avoid vfork
18607 clobbering (Bug#8298).
18608 * sysdep.c (sys_subshell): Likewise.
18609 Previously, the sys_subshell 'volatile' was incorrectly IF_LINTted out.
18611 * lisp.h (child_setup): Now NO_RETURN unless DOS_NT.
18612 This should get cleaned up, so that child_setup has the
18613 same signature on all platforms.
18615 * callproc.c (call_process_cleanup): Now static.
18616 (relocate_fd): Rename locals to avoid shadowing.
18618 2011-03-22 Chong Yidong <cyd@stupidchicken.com>
18620 * xterm.c (x_clear_frame): Remove XClearWindow call. This appears
18621 not to be necessary, and produces flickering.
18623 2011-03-20 Glenn Morris <rgm@gnu.org>
18625 * config.in: Remove file.
18627 2011-03-20 Juanma Barranquero <lekktu@gmail.com>
18629 * minibuf.c (Vcompleting_read_function): Don't declare, global variables
18630 are now in src/globals.h.
18631 (syms_of_minibuf): Remove spurious & from previous change.
18633 2011-03-20 Leo Liu <sdl.web@gmail.com>
18635 * minibuf.c (completing-read-function): New variable.
18636 (completing-read-default): Rename from completing-read.
18637 (completing-read): Call completing-read-function.
18639 2011-03-19 Juanma Barranquero <lekktu@gmail.com>
18641 * xfaces.c (Fx_load_color_file):
18642 Read color file from absolute filename (bug#8250).
18644 2011-03-19 Juanma Barranquero <lekktu@gmail.com>
18646 * makefile.w32-in: Update dependencies.
18648 2011-03-17 Eli Zaretskii <eliz@gnu.org>
18650 * makefile.w32-in ($(BLD)/unexw32.$(O)): Depend on $(SRC)/unexec.h.
18652 2011-03-17 Paul Eggert <eggert@cs.ucla.edu>
18654 Fix more problems found by GCC 4.5.2's static checks.
18656 * process.c (make_serial_process_unwind, send_process_trap):
18657 (sigchld_handler): Now static.
18659 * process.c (allocate_pty): Let PTY_ITERATION declare iteration vars.
18660 That way, the code declares only the vars that it needs.
18661 * s/aix4-2.h (PTY_ITERATION): Declare iteration vars.
18662 * s/cygwin.h (PTY_ITERATION): Likewise.
18663 * s/darwin.h (PTY_ITERATION): Likewise.
18664 * s/gnu-linux.h (PTY_ITERATION): Likewise.
18666 * s/irix6-5.h (PTY_OPEN): Declare stb, to loosen coupling.
18667 * process.c (allocate_pty): Don't declare stb unless it's needed.
18669 * bytecode.c (MAYBE_GC): Rewrite so as not to use empty "else".
18670 (CONSTANTLIM): Remove; unused.
18671 (METER_CODE, Bscan_buffer, Bread_char, Bset_mark):
18672 Define only if needed.
18674 * unexelf.c (unexec): Name an expression,
18675 to avoid gcc -Wbad-function-cast warning.
18676 Use a different way to cause a compilation error if anyone uses
18677 n rather than nn, a way that does not involve shadowing.
18678 (ELF_BSS_SECTION_NAME, OLD_PROGRAM_H): Remove; unused.
18680 * deps.mk (unexalpha.o): Remove; unused.
18682 New file unexec.h, the (simple) interface for unexec (Bug#8267).
18683 * unexec.h: New file.
18684 * deps.mk (emacs.o, unexaix.o, unexcw.o, unexcoff.o, unexelf.o):
18685 (unexhp9k800.o, unexmacosx.o, unexsol.o, unexw32.o):
18686 Depend on unexec.h.
18687 * emacs.c [!defined CANNOT_DUMP]: Include unexec.h.
18688 * unexaix.c, unexcoff.c, unexcw.c, unexelf.c, unexhp9k800.c:
18689 * unexmacosx.c, unexsol.c, unexw32.c: Include unexec.h.
18690 Change as necessary to match prototype in unexec.h.
18692 * syntax.c (Fforward_comment, scan_lists): Rename locals to avoid
18694 (back_comment, skip_chars): Mark vars as initialized.
18696 * character.h (FETCH_STRING_CHAR_ADVANCE_NO_CHECK, BUF_INC_POS):
18697 Rename locals to avoid shadowing.
18699 * lread.c (read1): Rewrite so as not to use empty "else".
18700 (Fload, readevalloop, read1): Rename locals to avoid shadowing.
18702 * print.c (Fredirect_debugging_output): Fix pointer signedess.
18704 * lisp.h (debug_output_compilation_hack): Add decl here, to avoid
18705 warning when compiling print.c.
18707 * font.c (font_unparse_fcname): Abort in an "impossible" situation
18708 instead of using an uninitialized var.
18709 (font_sort_entities): Mark var as initialized.
18711 * character.h (FETCH_CHAR_ADVANCE): Rename locals to avoid shadowing.
18713 * font.c (font_unparse_xlfd): Don't mix pointers to variables with
18714 pointers to constants.
18715 (font_parse_fcname): Remove unused vars.
18716 (font_delete_unmatched): Now static.
18717 (font_get_spec): Remove; unused.
18718 (font_style_to_value, font_prop_validate_style, font_unparse_fcname):
18719 (font_update_drivers, Ffont_get_glyphs, font_add_log):
18720 Rename or move locals to avoid shadowing.
18722 * fns.c (require_nesting_list, require_unwind): Now static.
18723 (Ffillarray): Rename locals to avoid shadowing.
18725 * floatfns.c (domain_error2): Define only if needed.
18726 (Ffrexp, Fldexp): Rename locals to avoid shadowing.
18728 * alloc.c (mark_backtrace): Move decl from here ...
18729 * lisp.h: ... to here, so that it can be checked.
18731 * eval.c (call_debugger, do_debug_on_call, grow_specpdl): Now static.
18732 (Fdefvar): Rewrite so as not to use empty "else".
18733 (lisp_indirect_variable): Name an expression,
18734 to avoid gcc -Wbad-function-cast warning.
18735 (Fdefvar): Rename locals to avoid shadowing.
18737 * callint.c (quotify_arg, quotify_args): Now static.
18738 (Fcall_interactively): Rename locals to avoid shadowing.
18739 Use const pointer when appropriate.
18741 * lisp.h (get_system_name, get_operating_system_release):
18742 Move decls here, to check interfaces.
18743 * process.c (get_operating_system_release): Move decl to lisp.h.
18744 * xrdb.c (get_system_name): Likewise.
18745 * editfns.c (init_editfns, Fuser_login_name, Fuser_uid):
18746 (Fuser_real_uid, Fuser_full_name): Remove unnecessary casts,
18747 some of which prompt warnings from gcc -Wbad-function-cast.
18748 (Fformat_time_string, Fencode_time, Finsert_char):
18749 (Ftranslate_region_internal, Fformat):
18750 Rename or remove local vars to avoid shadowing.
18751 (Ftranslate_region_internal): Mark var as initialized.
18753 * doc.c (Fdocumentation, Fsnarf_documentation): Move locals to
18756 * lisp.h (eassert): Check that the argument compiles, even if
18757 ENABLE_CHECKING is not defined.
18759 * data.c (Findirect_variable): Name an expression, to avoid
18760 gcc -Wbad-function-cast warning.
18761 (default_value, arithcompare, arith_driver, arith_error): Now static.
18762 (store_symval_forwarding): Rename local to avoid shadowing.
18763 (Fmake_variable_buffer_local, Fmake_local_variable):
18764 Mark variables as initialized.
18765 (do_blv_forwarding, do_symval_forwarding): Remove; unused.
18767 * alloc.c (check_cons_list): Do not define unless GC_CHECK_CONS_LIST.
18768 (Fmake_vector, Fvector, Fmake_byte_code, Fgarbage_collect):
18769 Rename locals to avoid shadowing.
18770 (mark_stack): Move local variables into the #ifdef region where
18772 (BLOCK_INPUT_ALLOC, UNBLOCK_INPUT_ALLOC): Define only if
18773 ! defined SYSTEM_MALLOC && ! defined SYNC_INPUT, as they are not
18775 (CHECK_ALLOCATED): Define only if GC_CHECK_MARKED_OBJECTS.
18776 (GC_STRING_CHARS): Remove; not used.
18777 (Fmemory_limit): Cast sbrk's returned value to char *.
18779 * lisp.h (check_cons_list): Declare if GC_CHECK_CONS_LIST; this
18780 avoids undefined behavior in theory.
18782 * regex.c (IF_LINT): Add defn, for benefit of ../lib-src.
18784 Use functions, not macros, for up- and down-casing (Bug#8254).
18785 * buffer.h (DOWNCASE_TABLE, UPCASE_TABLE, DOWNCASE, UPPERCASEP):
18786 (NOCASEP, LOWERCASEP, UPCASE, UPCASE1): Remove. All callers changed
18787 to use the following functions instead of these macros.
18788 (downcase): Adjust to lack of DOWNCASE_TABLE. Return int, not
18789 EMACS_INT, since callers assume the returned value fits in int.
18790 (upcase1): Likewise, for UPCASE_TABLE.
18791 (uppercasep, lowercasep, upcase): New static inline functions.
18792 * editfns.c (Fchar_equal): Remove no-longer-needed workaround for
18793 the race-condition problem in the old DOWNCASE.
18795 * regex.c (CHARSET_LOOKUP_RANGE_TABLE_RAW, POP_FAILURE_REG_OR_COUNT):
18796 Rename locals to avoid shadowing.
18797 (regex_compile, re_match_2_internal): Move locals to avoid shadowing.
18798 (regex_compile, re_search_2, re_match_2_internal):
18799 Remove unused local vars.
18800 (FREE_VAR): Rewrite so as not to use empty "else",
18801 which gcc can warn about.
18802 (regex_compile, re_match_2_internal): Mark locals as initialized.
18803 (RETALLOC_IF): Define only if needed.
18804 (WORDCHAR_P): Likewise. This one is never needed, but is used
18805 only in a comment talking about a compiler bug, so put inside
18806 the #if 0 of that comment.
18807 (CHARSET_LOOKUP_BITMAP, FAIL_STACK_FULL, RESET_FAIL_STACK):
18808 (PUSH_FAILURE_ELT, BUF_PUSH_3, STOP_ADDR_VSTRING):
18811 * search.c (boyer_moore): Rename locals to avoid shadowing.
18812 * character.h (FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE):
18813 (PREV_CHAR_BOUNDARY): Likewise.
18815 * search.c (simple_search): Remove unused var.
18817 * dired.c (compile_pattern): Move decl from here ...
18818 * lisp.h: ... to here, so that it can be checked.
18819 (struct re_registers): New forward decl.
18821 * character.h (INC_POS, DEC_POS): Rename locals to avoid shadowing.
18823 * indent.c (MULTIBYTE_BYTES_WIDTH): New args bytes, width.
18825 (MULTIBYTE_BYTES_WIDTH, scan_for_column, compute_motion):
18826 Rename locals to avoid shadowing.
18827 (Fvertical_motion): Mark locals as initialized.
18829 * casefiddle.c (casify_object, casify_region): Now static.
18830 (casify_region): Mark local as initialized.
18832 * cmds.c (internal_self_insert): Rename local to avoid shadowing.
18834 * lisp.h (GCPRO2_VAR, GCPRO3_VAR, GCPRO4_VAR, GCPRO5_VAR, GCPRO6_VAR):
18835 New macros, so that the caller can use some names other than
18836 gcpro1, gcpro2, etc.
18837 (GCPRO2, GCPRO3, GCPRO4, GCPRO5, GCPRO6): Reimplement in terms
18839 (GCPRO1_VAR, UNGCPRO_VAR): Change the meaning of the second
18840 argument, for consistency with GCPRO2_VAR, etc: it is now the
18841 prefix of the variable, not the variable itself. All uses
18843 * dired.c (directory_files_internal, file_name_completion):
18844 Rename locals to avoid shadowing.
18846 Fix a race condition diagnosed by gcc -Wsequence-point (Bug#8254).
18847 An expression of the form (DOWNCASE (x) == DOWNCASE (y)), found in
18848 dired.c's scmp function, had undefined behavior.
18849 * lisp.h (DOWNCASE_TABLE, UPCASE_TABLE, DOWNCASE, UPPERCASEP):
18850 (NOCASEP, LOWERCASEP, UPCASE, UPCASE1): Move from here ...
18851 * buffer.h: ... to here, because these macros use current_buffer,
18852 and the new implementation with inline functions needs to have
18853 current_buffer in scope now, rather than later when the macros
18855 (downcase, upcase1): New static inline functions.
18856 (DOWNCASE, UPCASE1): Reimplement using these functions.
18857 This avoids undefined behavior in expressions like
18858 DOWNCASE (x) == DOWNCASE (y), which previously suffered
18859 from race conditions in accessing the global variables
18860 case_temp1 and case_temp2.
18861 * casetab.c (case_temp1, case_temp2): Remove; no longer needed.
18862 * lisp.h (case_temp1, case_temp2): Remove their decls.
18863 * character.h (ASCII_CHAR_P): Move from here ...
18864 * lisp.h: ... to here, so that the inline functions mentioned
18865 above can use them.
18867 * dired.c (directory_files_internal_unwind): Now static.
18869 * fileio.c (file_name_as_directory, directory_file_name):
18870 (barf_or_query_if_file_exists, auto_save_error, auto_save_1):
18872 (file_name_as_directory): Use const pointers when appropriate.
18873 (Fexpand_file_name): Likewise. In particular, newdir might
18874 point at constant storage, so make it a const pointer.
18875 (Fmake_directory_internal, Fread_file_name): Remove unused vars.
18876 (Ffile_selinux_context, Fset_file_selinux_context): Fix pointer
18878 (Fset_file_times, Finsert_file_contents, auto_save_error):
18879 Rename locals to avoid shadowing.
18881 * minibuf.c (choose_minibuf_frame_1): Now static.
18882 (Ftry_completion, Fall_completions): Rename or remove locals
18883 to avoid shadowing.
18885 * marker.c (bytepos_to_charpos): Remove; unused.
18887 * lisp.h (verify_bytepos, count_markers): New decls,
18888 so that gcc does not warn that these functions aren't declared.
18890 * insdel.c (check_markers, make_gap_larger, make_gap_smaller):
18891 (reset_var_on_error, Fcombine_after_change_execute_1): Now static.
18892 (CHECK_MARKERS): Redo to avoid gcc -Wempty-body diagnostic.
18893 (copy_text): Remove unused local var.
18895 * filelock.c (within_one_second): Now static.
18896 (lock_file_1): Rename local to avoid shadowing.
18898 * buffer.c (fix_overlays_before): Mark locals as initialized.
18899 (fix_start_end_in_overlays): Likewise. This function should be
18900 simplified by using pointers-to-pointers, but that's a different
18902 (switch_to_buffer_1): Now static.
18903 (Fkill_buffer, record_buffer, Fbury_buffer, Fset_buffer_multibyte):
18904 (report_overlay_modification): Rename locals to avoid shadowing.
18906 * sysdep.c (system_process_attributes): Rename vars to avoid shadowing.
18907 Fix pointer signedness issue.
18908 (sys_subshell): Mark local as volatile if checking for lint,
18909 to suppress a gcc -Wclobbered warning that does not seem to be right.
18910 (MAXPATHLEN): Define only if needed.
18912 * process.c (serial_open, serial_configure): Move decls from here ...
18913 * systty.h: ... to here, so that they can be checked.
18915 * fns.c (get_random, seed_random): Move extern decls from here ...
18916 * lisp.h: ... to here, so that they can be checked.
18918 * sysdep.c (reset_io): Now static.
18919 (wait_for_termination_signal): Remove; unused.
18921 * keymap.c (keymap_parent, keymap_memberp, map_keymap_internal):
18922 (copy_keymap_item, append_key, push_text_char_description):
18924 (Fwhere_is_internal): Don't test CONSP (sequences) unnecessarily.
18925 (DENSE_TABLE_SIZE): Remove; unused.
18926 (get_keymap, access_keymap, Fdefine_key, Fwhere_is_internal):
18927 (describe_map_tree):
18928 Rename locals to avoid shadowing.
18930 * keyboard.c: Declare functions static if they are not used elsewhere.
18931 (echo_char, echo_dash, cmd_error, top_level_2):
18932 (poll_for_input, handle_async_input): Now static.
18933 (read_char, kbd_buffer_get_event, make_lispy_position):
18934 (make_lispy_event, make_lispy_movement, apply_modifiers):
18935 (decode_keyboard_code, tty_read_avail_input, menu_bar_items):
18936 (parse_tool_bar_item, read_key_sequence, Fread_key_sequence):
18937 (Fread_key_sequence_vector): Rename locals to avoid shadowing.
18938 (read_key_sequence, read_char): Mark locals as initialized.
18939 (Fexit_recursive_edit, Fabort_recursive_edit): Mark with NO_RETURN.
18941 * keyboard.h (make_ctrl_char): New decl.
18942 (mark_kboards): Move decl here ...
18943 * alloc.c (mark_kboards): ... from here.
18945 * lisp.h (force_auto_save_soon): New decl.
18947 * emacs.c (init_cmdargs): Rename local to avoid shadowing.
18948 (DEFINE_DUMMY_FUNCTION): New macro.
18949 (__do_global_ctors, __do_global_ctors_aux, __do_global_dtors, __main):
18951 (main): Add casts to avoid warnings
18952 if GCC considers string literals to be constants.
18954 * lisp.h (fatal_error_signal): Add decl, since it's exported.
18956 * dbusbind.c: Pointer signedness fixes.
18957 (xd_signature, xd_append_arg, xd_initialize):
18958 (Fdbus_call_method, Fdbus_call_method_asynchronously):
18959 (Fdbus_method_return_internal, Fdbus_method_error_internal):
18960 (Fdbus_send_signal, xd_read_message_1, Fdbus_register_service):
18961 (Fdbus_register_signal): Use SSDATA when the context wants char *.
18963 * dbusbind.c (Fdbus_init_bus): Add cast to avoid warning
18964 if GCC considers string literals to be constants.
18965 (Fdbus_register_service, Fdbus_register_method): Remove unused vars.
18967 2011-03-16 Stefan Monnier <monnier@iro.umontreal.ca>
18969 * print.c (PRINT_CIRCLE_CANDIDATE_P): New macro.
18970 (print_preprocess, print_object): New macro to fix last change.
18972 * print.c (print_preprocess): Don't forget font objects.
18974 2011-03-16 Juanma Barranquero <lekktu@gmail.com>
18976 * emacs.c (USAGE3): Doc fixes.
18978 2011-03-15 Andreas Schwab <schwab@linux-m68k.org>
18980 * coding.c (detect_coding_iso_2022): Reorganize code to clarify
18983 2011-03-14 Juanma Barranquero <lekktu@gmail.com>
18985 * lisp.h (VWindow_system, Qfile_name_history):
18986 * keyboard.h (lispy_function_keys) [WINDOWSNT]:
18987 * w32term.h (w32_system_caret_hwnd, w32_system_caret_height)
18988 (w32_system_caret_x, w32_system_caret_y): Declare extern.
18990 * w32select.c: Don't #include "keyboard.h".
18991 (run_protected): Add extern declaration for waiting_for_input.
18993 * w32.c (Qlocal, noninteractive1, inhibit_window_system):
18994 * w32console.c (detect_input_pending, read_input_pending)
18995 (encode_terminal_code):
18996 * w32fns.c (quit_char, lispy_function_keys, Qtooltip)
18997 (w32_system_caret_hwnd, w32_system_caret_height, w32_system_caret_x)
18998 (w32_system_caret_y, Qfile_name_history):
18999 * w32font.c (w32font_driver, QCantialias, QCotf, QClang):
19000 * w32inevt.c (reinvoke_input_signal, lispy_function_keys):
19001 * w32menu.c (Qmenu_bar, QCtoggle, QCradio, Qoverriding_local_map)
19002 (Qoverriding_terminal_local_map, Qmenu_bar_update_hook):
19003 * w32proc.c (Qlocal, report_file_error):
19004 * w32term.c (Vwindow_system, updating_frame):
19005 * w32uniscribe.c (initialized, uniscribe_font_driver):
19006 Remove unneeded extern declarations.
19008 2011-03-14 Chong Yidong <cyd@stupidchicken.com>
19010 * buffer.c (Fmake_indirect_buffer): Fix incorrect assertions.
19012 2011-03-13 Chong Yidong <cyd@stupidchicken.com>
19014 * buffer.h (BUF_BEGV, BUF_BEGV_BYTE, BUF_ZV, BUF_ZV_BYTE, BUF_PT)
19015 (BUF_PT_BYTE): Rewrite to handle indirect buffers (Bug#8219).
19016 These macros can no longer be used for assignment.
19018 * buffer.c (Fget_buffer_create, Fmake_indirect_buffer):
19019 Assign struct members directly, instead of using BUF_BEGV etc.
19020 (record_buffer_markers, fetch_buffer_markers): New functions for
19021 recording and fetching special buffer markers.
19022 (set_buffer_internal_1, set_buffer_temp): Use them.
19024 * lread.c (unreadchar): Use SET_BUF_PT_BOTH.
19026 * insdel.c (adjust_point): Use SET_BUF_PT_BOTH.
19028 * intervals.c (temp_set_point_both): Use SET_BUF_PT_BOTH.
19029 (get_local_map): Use SET_BUF_BEGV_BOTH and SET_BUF_ZV_BOTH.
19031 * xdisp.c (hscroll_window_tree):
19032 (reconsider_clip_changes): Use PT instead of BUF_PT.
19034 2011-03-13 Eli Zaretskii <eliz@gnu.org>
19036 * makefile.w32-in ($(BLD)/editfns.$(O)): Depend on
19037 $(EMACS_ROOT)/lib/intprops.h.
19039 2011-03-13 Paul Eggert <eggert@cs.ucla.edu>
19041 Fix more problems found by GCC 4.5.2's static checks.
19043 * gtkutil.c (xg_get_pixbuf_from_pixmap): Add cast from char *
19044 to unsigned char * to avoid compiler diagnostic.
19045 (xg_free_frame_widgets): Make it clear that a local variable is
19046 needed only if USE_GTK_TOOLTIP.
19047 (gdk_window_get_screen): Make it clear that this macro is needed
19048 only if USE_GTK_TOOLTIP.
19049 (int_gtk_range_get_value): New function, which avoids a diagnostic
19050 from gcc -Wbad-function-cast.
19051 (xg_set_toolkit_scroll_bar_thumb): Use it.
19052 (xg_tool_bar_callback, xg_tool_item_stale_p): Rewrite to avoid
19053 diagnostic from gcc -Wbad-function-cast.
19054 (get_utf8_string, xg_get_file_with_chooser):
19055 Rename locals to avoid shadowing.
19056 (create_dialog): Move locals to avoid shadowing.
19058 * xgselect.c (xg_select): Remove unused var.
19060 * image.c (four_corners_best): Mark locals as initialized.
19061 (gif_load): Initialize transparent_p to zero (Bug#8238).
19062 Mark another local as initialized.
19063 (my_png_error, my_error_exit): Mark with NO_RETURN.
19065 * image.c (clear_image_cache): Now static.
19066 (DIM, HAVE_STDLIB_H_1): Remove unused macros.
19067 (xpm_load): Redo to avoid "discards qualifiers" gcc warning.
19068 (x_edge_detection): Remove unnecessary cast that
19069 gcc -Wbad-function-cast diagnoses.
19070 (gif_load): Fix pointer signedness.
19071 (clear_image_cache, xbm_read_bitmap_data, x_detect_edges):
19072 (jpeg_load, gif_load): Rename locals to avoid shadowing.
19074 2011-03-12 Paul Eggert <eggert@cs.ucla.edu>
19076 Improve quality of tests for time stamp overflow.
19077 For example, without this patch (encode-time 0 0 0 1 1
19078 1152921504606846976) returns the obviously-bogus value (-948597
19079 62170) on my RHEL 5.5 x86-64 host. With the patch, it correctly
19080 reports time overflow. See
19081 <http://lists.gnu.org/archive/html/emacs-devel/2011-03/msg00470.html>.
19082 * deps.mk (editfns.o): Depend on ../lib/intprops.h.
19083 * editfns.c: Include limits.h and intprops.h.
19084 (TIME_T_MIN, TIME_T_MAX): New macros.
19085 (time_overflow): Move earlier, to before first use.
19086 (hi_time, lo_time): New functions, for an accurate test for
19087 out-of-range times.
19088 (Fcurrent_time, Fget_internal_run_time, make_time): Use them.
19089 (Fget_internal_run_time): Don't assume time_t fits in int.
19090 (make_time): Use list2 instead of Fcons twice.
19091 (Fdecode_time): More accurate test for out-of-range times.
19092 (check_tm_member): New function.
19093 (Fencode_time): Use it, to test for out-of-range times.
19094 (lisp_time_argument): Don't rely on undefined left-shift and
19095 right-shift behavior when checking for time stamp overflow.
19097 * editfns.c (time_overflow): New function, refactoring common code.
19098 (Fformat_time_string, Fdecode_time, Fencode_time):
19099 (Fcurrent_time_string): Use it.
19101 Move 'make_time' to be next to its inverse 'lisp_time_argument'.
19102 * dired.c (make_time): Move to ...
19103 * editfns.c (make_time): ... here.
19104 * systime.h: Note the move.
19106 2011-03-12 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
19108 * fringe.c (update_window_fringes): Remove unused variables.
19110 * unexmacosx.c (copy_data_segment): Also copy __got section.
19113 2011-03-12 Eli Zaretskii <eliz@gnu.org>
19115 * termcap.c [MSDOS]: Include "msdos.h".
19116 (find_capability, tgetnum, tgetflag, tgetstr, tputs, tgetent):
19117 Constify `char *' arguments and their references according to
19118 prototypes in tparam.h.
19120 * deps.mk (termcap.o): Depend on tparam.h and msdos.h.
19122 * msdos.c (XMenuAddPane): 3rd argument is `const char *' now.
19123 Adapt all references accordingly.
19125 * msdos.h (XMenuAddPane): 3rd argument is `const char *' now.
19127 2011-03-11 Tom Tromey <tromey@redhat.com>
19129 * buffer.c (syms_of_buffer): Remove obsolete comment.
19131 2011-03-11 Eli Zaretskii <eliz@gnu.org>
19133 * termhooks.h (encode_terminal_code): Declare prototype.
19135 * msdos.c (encode_terminal_code): Don't declare prototype.
19137 * term.c (encode_terminal_code): Now external again, used by
19138 w32console.c and msdos.c.
19140 * makefile.w32-in ($(BLD)/term.$(O), ($(BLD)/tparam.$(O)):
19141 Depend on $(SRC)/tparam.h, see 2011-03-11T07:24:21Z!eggert@cs.ucla.edu.
19143 2011-03-11 Paul Eggert <eggert@cs.ucla.edu>
19145 Fix some minor problems found by GCC 4.5.2's static checks.
19147 * fringe.c (update_window_fringes): Mark locals as initialized
19149 (destroy_fringe_bitmap, init_fringe_bitmap): Now static.
19151 * alloc.c (mark_fringe_data): Move decl from here ...
19152 * lisp.h (mark_fringe_data) [HAVE_WINDOW_SYSTEM]: ... to here,
19153 to check its interface.
19154 (init_fringe_once): Do not declare unless HAVE_WINDOW_SYSTEM.
19156 * fontset.c (free_realized_fontset): Now static.
19157 (Fset_fontset_font): Rename local to avoid shadowing.
19158 (fontset_font): Mark local as initialized.
19159 (FONTSET_SPEC, FONTSET_REPERTORY, RFONT_DEF_REPERTORY): Remove; unused.
19161 * xrdb.c: Include "xterm.h", to check x_load_resources's interface.
19163 * xselect.c (x_disown_buffer_selections): Remove; not used.
19164 (TRACE3) [!defined TRACE_SELECTION]: Remove; not used.
19165 (x_own_selection, Fx_disown_selection_internal): Rename locals
19166 to avoid shadowing.
19167 (x_handle_dnd_message): Remove local to avoid shadowing.
19169 * lisp.h (GCPRO1_VAR, UNGCPRO_VAR): New macros,
19170 so that the caller can use some name other than gcpro1.
19171 (GCPRO1, UNGCPRO): Reimplement in terms of the new macros.
19172 * xfns.c (Fx_create_frame, x_create_tip_frame, Fx_show_tip):
19173 (Fx_backspace_delete_keys_p):
19174 Use them to avoid shadowing, and rename vars to avoid shadowing.
19175 (x_decode_color, x_set_name, x_window): Now static.
19176 (Fx_create_frame): Add braces to silence GCC warning.
19177 (Fx_file_dialog, Fx_select_font): Fix pointer signedness.
19178 (x_real_positions, xg_set_icon_from_xpm_data, x_create_tip_frame):
19179 Remove unused locals.
19180 (Fx_create_frame, x_create_tip_frame, Fx_show_tip):
19181 (Fx_backspace_delete_keys_p): Rename locals to avoid shadowing.
19182 Some of these renamings use the new GCPRO1_VAR and UNGCPRO_VAR
19185 * xterm.h (x_mouse_leave): New decl.
19187 * xterm.c (x_copy_dpy_color, x_focus_on_frame, x_unfocus_frame):
19188 Remove unused functions.
19189 (x_shift_glyphs_for_insert, XTflash, XTring_bell):
19190 (x_calc_absolute_position): Now static.
19191 (XTread_socket): Don't define label "out" unless it's used.
19192 Don't declare local "event" unless it's used.
19193 (x_iconify_frame, x_free_frame_resources): Don't declare locals
19194 unless they are used.
19195 (XEMBED_VERSION, xembed_set_info): Don't define unless needed.
19196 (x_fatal_error_signal): Remove; not used.
19197 (x_draw_image_foreground, redo_mouse_highlight, XTmouse_position):
19198 (x_scroll_bar_report_motion, handle_one_xevent, x_draw_bar_cursor):
19199 (x_error_catcher, x_connection_closed, x_error_handler):
19200 (x_error_quitter, xembed_send_message, x_iconify_frame):
19201 (my_log_handler): Rename locals to avoid shadowing.
19202 (x_delete_glyphs, x_ins_del_lines): Mark with NO_RETURN.
19203 (x_connection_closed): Tell GCC not to suggest NO_RETURN.
19205 * xfaces.c (clear_face_cache, Fx_list_fonts, Fface_font):
19206 Rename or move locals to avoid shadowing.
19207 (tty_defined_color, merge_face_heights): Now static.
19208 (free_realized_faces_for_fontset): Remove; not used.
19209 (Fx_list_fonts): Mark variable that gcc -Wuninitialized
19210 does not deduce is never used uninitialized.
19211 (STRDUPA, LSTRDUPA, FONT_POINT_SIZE_QUANTUM): Remove; not used.
19212 (LFACEP): Define only if XASSERTS, as it's not needed otherwise.
19214 * terminal.c (store_terminal_param): Now static.
19216 * xmenu.c (menu_highlight_callback): Now static.
19217 (set_frame_menubar): Remove unused local.
19218 (xmenu_show): Rename parameter to avoid shadowing.
19219 (xmenu_show, xdialog_show, xmenu_show): Make local pointers "const"
19220 since they might point to immutable storage.
19221 (next_menubar_widget_id): Declare only if USE_X_TOOLKIT,
19222 since it's unused otherwise.
19224 * xdisp.c (produce_glyphless_glyph): Initialize lower_xoff.
19225 Add a FIXME, since the code still doesn't look right. (Bug#8215)
19226 (Fcurrent_bidi_paragraph_direction): Simplify slightly; this
19227 avoids a gcc -Wuninitialized diagnostic.
19228 (display_line, BUILD_COMPOSITE_GLYPH_STRING, draw_glyphs):
19229 (note_mouse_highlight): Mark variables that gcc -Wuninitialized
19230 does not deduce are never used uninitialized.
19232 * lisp.h (IF_LINT): New macro, copied from ../lib-src/emacsclient.c.
19234 * xdisp.c (redisplay_window): Rename local to avoid shadowing.
19235 * window.c (window_loop, size_window):
19236 (run_window_configuration_change_hook, enlarge_window): Likewise.
19238 * window.c (display_buffer): Now static.
19239 (size_window): Mark variables that gcc -Wuninitialized
19240 does not deduce are never used uninitialized.
19241 * window.h (check_all_windows): New decl, to forestall
19242 gcc -Wmissing-prototypes diagnostic.
19243 * dispextern.h (bidi_dump_cached_states): Likewise.
19245 * charset.h (CHECK_CHARSET_GET_CHARSET): Rename locals to avoid
19247 * charset.c (map_charset_for_dump, Fchar_charset): Likewise.
19248 Include <limits.h>.
19249 (Fsort_charsets): Redo min/max calculation to shorten the code a bit
19250 and to avoid gcc -Wuninitialized warning.
19251 (load_charset_map): Mark variables that gcc -Wuninitialized
19252 does not deduce are never used uninitialized.
19253 (load_charset): Abort instead of using uninitialized var (Bug#8229).
19255 * coding.c (coding_set_source, coding_set_destination):
19256 Use "else { /* comment */ }" rather than "else /* comment */;"
19257 for clarity, and to avoid gcc -Wempty-body warning.
19258 (Fdefine_coding_system_internal): Don't redeclare 'i' inside
19259 a block, when the outer 'i' will do.
19260 (decode_coding_utf_8, decode_coding_utf_16, detect_coding_emacs_mule):
19261 (emacs_mule_char, decode_coding_emacs_mule, detect_coding_iso_2022):
19262 (decode_coding_iso_2022, decode_coding_sjis, decode_coding_big5):
19263 (decode_coding_raw_text, decode_coding_charset, get_translation_table):
19264 (Fdecode_sjis_char, Fdefine_coding_system_internal):
19265 Rename locals to avoid shadowing.
19266 * character.h (FETCH_STRING_CHAR_ADVANCE): Likewise.
19267 * coding.c (emacs_mule_char, encode_invocation_designation):
19268 Now static, since they're not used elsewhere.
19269 (decode_coding_iso_2022): Add "default: abort ();" as a safety check.
19270 (decode_coding_object, encode_coding_object, detect_coding_system):
19271 (decode_coding_emacs_mule): Mark variables that gcc
19272 -Wuninitialized does not deduce are never used uninitialized.
19273 (detect_coding_iso_2022): Initialize a local variable that might
19274 be used uninitialized. Leave a FIXME because it's not clear that
19275 this initialization is needed. (Bug#8211)
19276 (ISO_CODE_LF, ISO_CODE_CR, CODING_ISO_FLAG_EUC_TW_SHIFT):
19277 (ONE_MORE_BYTE_NO_CHECK, UTF_BOM, UTF_16_INVALID_P):
19278 (SHIFT_OUT_OK, ENCODE_CONTROL_SEQUENCE_INTRODUCER):
19279 (ENCODE_DIRECTION_R2L, ENCODE_DIRECTION_L2R):
19280 Remove unused macros.
19282 * category.c (hash_get_category_set): Remove unused local var.
19283 (copy_category_table): Now static, since it's not used elsewhere.
19284 * character.c (string_count_byte8): Likewise.
19286 * ccl.c (CCL_WRITE_STRING, CCL_ENCODE_CHAR, Fccl_execute_on_string):
19287 (Fregister_code_conversion_map): Rename locals to avoid shadowing.
19289 * chartab.c (copy_sub_char_table): Now static, since it's not used
19291 (sub_char_table_ref_and_range, char_table_ref_and_range):
19292 Rename locals to avoid shadowing.
19293 (ASET_RANGE, GET_SUB_CHAR_TABLE): Remove unused macros.
19295 * bidi.c (bidi_check_type): Now static, since it's not used elsewhere.
19296 (BIDI_BOB): Remove unused macro.
19298 * cm.c (cmgoto): Mark variables that gcc -Wuninitialized does not
19299 deduce are never used uninitialized.
19300 * term.c (encode_terminal_code): Likewise.
19302 * term.c (encode_terminal_code): Now static. Remove unused local.
19304 * tparam.h: New file.
19305 * term.c, tparam.h: Include it.
19306 * deps.mk (term.o, tparam.o): Depend on tparam.h.
19307 * term.c (tputs, tgetent, tgetflag, tgetnum, tparam, tgetstr):
19308 Move these decls to tparam.h, and make them agree with what
19309 is actually in tparam.c. The previous trick of using incompatible
19310 decls in different modules does not conform to the C standard.
19311 All callers of tparam changed to use tparam's actual API.
19312 * tparam.c (tparam1, tparam, tgoto):
19313 Use const pointers where appropriate.
19315 * cm.c (calccost, cmgoto): Use const pointers where appropriate.
19316 * cm.h (struct cm): Likewise.
19317 * dispextern.h (do_line_insertion_deletion_costs): Likewise.
19318 * scroll.c (ins_del_costs, do_line_insertion_deletion_costs): Likewise.
19319 * term.c (tty_ins_del_lines, calculate_costs, struct fkey_table):
19320 (term_get_fkeys_1, append_glyphless_glyph, produce_glyphless_glyph):
19321 (turn_on_face, init_tty): Likewise.
19322 * termchar.h (struct tty_display_info): Likewise.
19324 * term.c (term_mouse_position): Rename local to avoid shadowing.
19326 * alloc.c (mark_ttys): Move decl from here ...
19327 * lisp.h (mark_ttys): ... to here, so that it's checked against defn.
19329 2011-03-11 Andreas Schwab <schwab@linux-m68k.org>
19331 * .gdbinit (pwinx, xbuffer): Fix access to buffer name.
19333 2011-03-09 Juanma Barranquero <lekktu@gmail.com>
19335 * search.c (compile_pattern_1): Remove argument regp, unused since
19336 revid:rms@gnu.org-19941211082627-3x1g1wyqkjmwloig.
19337 (compile_pattern): Don't pass it.
19339 2011-03-08 Jan Djärv <jan.h.d@swipnet.se>
19341 * xterm.h (DEFAULT_GDK_DISPLAY): New define.
19342 (GDK_WINDOW_XID, gtk_widget_get_preferred_size): New defines
19344 (GTK_WIDGET_TO_X_WIN): Use GDK_WINDOW_XID.
19346 * xmenu.c (menu_position_func): Call gtk_widget_get_preferred_size.
19348 * gtkutil.c: Include gtkx.h if HAVE_GTK3. If ! HAVE_GTK3, define
19349 gdk_window_get_screen, gdk_window_get_geometry,
19350 gdk_x11_window_lookup_for_display and GDK_KEY_g.
19351 (xg_set_screen): Use DEFAULT_GDK_DISPLAY.
19352 (xg_get_pixbuf_from_pixmap): New function.
19353 (xg_get_pixbuf_from_pix_and_mask): Change parameters from GdkPixmap
19354 to Pixmap, take frame as parameter, remove GdkColormap parameter.
19355 Call xg_get_pixbuf_from_pixmap instead of
19356 gdk_pixbuf_get_from_drawable.
19357 (xg_get_image_for_pixmap): Do not make GdkPixmaps, call
19358 xg_get_pixbuf_from_pix_and_mask with Pixmap parameters instead.
19359 (xg_check_special_colors): Use GtkStyleContext and its functions
19361 (xg_prepare_tooltip, xg_hide_tooltip): Call gdk_window_get_screen.
19362 (xg_prepare_tooltip, create_dialog, menubar_map_cb)
19363 (xg_update_frame_menubar, xg_tool_bar_detach_callback)
19364 (xg_tool_bar_attach_callback, xg_update_tool_bar_sizes):
19365 Call gtk_widget_get_preferred_size.
19366 (xg_frame_resized): gdk_window_get_geometry only takes 5
19368 (xg_win_to_widget, xg_event_is_for_menubar):
19369 Call gdk_x11_window_lookup_for_display.
19370 (xg_set_widget_bg): New function.
19371 (delete_cb): New function.
19372 (xg_create_frame_widgets): Connect delete-event to delete_cb.
19373 Call xg_set_widget_bg. Only set background pixmap for ! HAVE_GTK3
19374 (xg_set_background_color): Call xg_set_widget_bg.
19375 (xg_set_frame_icon): Call xg_get_pixbuf_from_pix_and_mask.
19376 (xg_create_scroll_bar): vadj is a GtkAdjustment for HAVE_GTK3.
19377 Only call gtk_range_set_update_policy if ! HAVE_GTK3.
19378 (xg_make_tool_item): Only connect xg_tool_bar_item_expose_callback
19380 (update_frame_tool_bar): Call gtk_widget_hide.
19381 (xg_initialize): Use GDK_KEY_g.
19383 * xsmfns.c (gdk_set_sm_client_id): Define to gdk_set_sm_client_id
19385 (x_session_initialize): Call gdk_x11_set_sm_client_id.
19387 * xterm.c (XFillRectangle): Use cairo routines for HAVE_GTK3.
19388 (x_term_init): Disable Xinput(2) with GDK_CORE_DEVICE_EVENTS.
19389 Load ~/emacs.d/gtkrc only for ! HAVE_GTK3.
19391 2011-03-08 Juanma Barranquero <lekktu@gmail.com>
19393 * w32xfns.c (select_palette): Check success of RealizePalette against
19394 GDI_ERROR, not zero.
19396 See ChangeLog.11 for earlier changes.
19398 ;; Local Variables:
19402 Copyright (C) 2011-2012 Free Software Foundation, Inc.
19404 This file is part of GNU Emacs.
19406 GNU Emacs is free software: you can redistribute it and/or modify
19407 it under the terms of the GNU General Public License as published by
19408 the Free Software Foundation, either version 3 of the License, or
19409 (at your option) any later version.
19411 GNU Emacs is distributed in the hope that it will be useful,
19412 but WITHOUT ANY WARRANTY; without even the implied warranty of
19413 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19414 GNU General Public License for more details.
19416 You should have received a copy of the GNU General Public License
19417 along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.